0001-Add-simulator-from-riscv-binutils-2.29-branch.patch 595 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092
  1. From 7e15907dafac40b524dfeb566a06eb8290e38de6 Mon Sep 17 00:00:00 2001
  2. From: Jim Wilson <jimw@sifive.com>
  3. Date: Tue, 27 Nov 2018 12:22:33 -0800
  4. Subject: [PATCH 01/48] Add simulator from riscv-binutils-2.29 branch.
  5. ---
  6. gdb/configure.tgt | 1 +
  7. include/gdb/sim-riscv.h | 99 +
  8. sim/common/nltvals.def | 48 +
  9. sim/configure | 22 +-
  10. sim/configure.tgt | 3 +
  11. sim/riscv/ChangeLog | 16 +
  12. sim/riscv/Makefile.in | 35 +
  13. sim/riscv/aclocal.m4 | 119 +
  14. sim/riscv/config.in | 248 +
  15. sim/riscv/configure | 16131 ++++++++++++++++++++++++
  16. sim/riscv/configure.ac | 30 +
  17. sim/riscv/interp.c | 220 +
  18. sim/riscv/machs.c | 125 +
  19. sim/riscv/machs.h | 45 +
  20. sim/riscv/model_list.def | 9 +
  21. sim/riscv/sim-main.c | 2468 ++++
  22. sim/riscv/sim-main.h | 100 +
  23. sim/testsuite/configure | 17 +-
  24. sim/testsuite/sim/riscv/ChangeLog | 3 +
  25. sim/testsuite/sim/riscv/allinsn.exp | 15 +
  26. sim/testsuite/sim/riscv/pass.s | 7 +
  27. sim/testsuite/sim/riscv/testutils.inc | 50 +
  28. 22 files changed, 19809 insertions(+), 2 deletions(-)
  29. create mode 100644 include/gdb/sim-riscv.h
  30. create mode 100644 sim/riscv/ChangeLog
  31. create mode 100644 sim/riscv/Makefile.in
  32. create mode 100644 sim/riscv/aclocal.m4
  33. create mode 100644 sim/riscv/config.in
  34. create mode 100755 sim/riscv/configure
  35. create mode 100644 sim/riscv/configure.ac
  36. create mode 100644 sim/riscv/interp.c
  37. create mode 100644 sim/riscv/machs.c
  38. create mode 100644 sim/riscv/machs.h
  39. create mode 100644 sim/riscv/model_list.def
  40. create mode 100644 sim/riscv/sim-main.c
  41. create mode 100644 sim/riscv/sim-main.h
  42. create mode 100644 sim/testsuite/sim/riscv/ChangeLog
  43. create mode 100644 sim/testsuite/sim/riscv/allinsn.exp
  44. create mode 100644 sim/testsuite/sim/riscv/pass.s
  45. create mode 100644 sim/testsuite/sim/riscv/testutils.inc
  46. diff --git a/gdb/configure.tgt b/gdb/configure.tgt
  47. index a3e11c4b9b..2410253e61 100644
  48. --- a/gdb/configure.tgt
  49. +++ b/gdb/configure.tgt
  50. @@ -553,6 +553,7 @@ riscv*-*-linux*)
  51. riscv*-*-*)
  52. # Target: RISC-V architecture
  53. gdb_target_obs=""
  54. + gdb_sim=../sim/riscv/libsim.a
  55. ;;
  56. rl78-*-elf)
  57. diff --git a/include/gdb/sim-riscv.h b/include/gdb/sim-riscv.h
  58. new file mode 100644
  59. index 0000000000..a554f34450
  60. --- /dev/null
  61. +++ b/include/gdb/sim-riscv.h
  62. @@ -0,0 +1,99 @@
  63. +/* This file defines the interface between the RISC-V simulator and GDB.
  64. +
  65. + Copyright (C) 2005-2015 Free Software Foundation, Inc.
  66. +
  67. + This file is part of GDB.
  68. +
  69. + This program is free software; you can redistribute it and/or modify
  70. + it under the terms of the GNU General Public License as published by
  71. + the Free Software Foundation; either version 3 of the License, or
  72. + (at your option) any later version.
  73. +
  74. + This program is distributed in the hope that it will be useful,
  75. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  76. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  77. + GNU General Public License for more details.
  78. +
  79. + You should have received a copy of the GNU General Public License
  80. + along with this program. If not, see <http://www.gnu.org/licenses/>. */
  81. +
  82. +/* Order has to match gdb riscv-tdep list. */
  83. +enum sim_riscv_regnum {
  84. + SIM_RISCV_ZERO_REGNUM = 0,
  85. + SIM_RISCV_RA_REGNUM,
  86. + SIM_RISCV_SP_REGNUM,
  87. + SIM_RISCV_GP_REGNUM,
  88. + SIM_RISCV_TP_REGNUM,
  89. + SIM_RISCV_T0_REGNUM,
  90. + SIM_RISCV_T1_REGNUM,
  91. + SIM_RISCV_T2_REGNUM,
  92. + SIM_RISCV_S0_REGNUM,
  93. +#define SIM_RISCV_FP_REGNUM SIM_RISCV_S0_REGNUM
  94. + SIM_RISCV_S1_REGNUM,
  95. + SIM_RISCV_A0_REGNUM,
  96. + SIM_RISCV_A1_REGNUM,
  97. + SIM_RISCV_A2_REGNUM,
  98. + SIM_RISCV_A3_REGNUM,
  99. + SIM_RISCV_A4_REGNUM,
  100. + SIM_RISCV_A5_REGNUM,
  101. + SIM_RISCV_A6_REGNUM,
  102. + SIM_RISCV_A7_REGNUM,
  103. + SIM_RISCV_S2_REGNUM,
  104. + SIM_RISCV_S3_REGNUM,
  105. + SIM_RISCV_S4_REGNUM,
  106. + SIM_RISCV_S5_REGNUM,
  107. + SIM_RISCV_S6_REGNUM,
  108. + SIM_RISCV_S7_REGNUM,
  109. + SIM_RISCV_S8_REGNUM,
  110. + SIM_RISCV_S9_REGNUM,
  111. + SIM_RISCV_S10_REGNUM,
  112. + SIM_RISCV_S11_REGNUM,
  113. + SIM_RISCV_T3_REGNUM,
  114. + SIM_RISCV_T4_REGNUM,
  115. + SIM_RISCV_T5_REGNUM,
  116. + SIM_RISCV_T6_REGNUM,
  117. + SIM_RISCV_PC_REGNUM,
  118. + SIM_RISCV_FT0_REGNUM,
  119. +#define SIM_RISCV_FIRST_FP_REGNUM SIM_RISCV_FT0_REGNUM
  120. + SIM_RISCV_FT1_REGNUM,
  121. + SIM_RISCV_FT2_REGNUM,
  122. + SIM_RISCV_FT3_REGNUM,
  123. + SIM_RISCV_FT4_REGNUM,
  124. + SIM_RISCV_FT5_REGNUM,
  125. + SIM_RISCV_FT6_REGNUM,
  126. + SIM_RISCV_FT7_REGNUM,
  127. + SIM_RISCV_FS0_REGNUM,
  128. + SIM_RISCV_FS1_REGNUM,
  129. + SIM_RISCV_FA0_REGNUM,
  130. + SIM_RISCV_FA1_REGNUM,
  131. + SIM_RISCV_FA2_REGNUM,
  132. + SIM_RISCV_FA3_REGNUM,
  133. + SIM_RISCV_FA4_REGNUM,
  134. + SIM_RISCV_FA5_REGNUM,
  135. + SIM_RISCV_FA6_REGNUM,
  136. + SIM_RISCV_FA7_REGNUM,
  137. + SIM_RISCV_FS2_REGNUM,
  138. + SIM_RISCV_FS3_REGNUM,
  139. + SIM_RISCV_FS4_REGNUM,
  140. + SIM_RISCV_FS5_REGNUM,
  141. + SIM_RISCV_FS6_REGNUM,
  142. + SIM_RISCV_FS7_REGNUM,
  143. + SIM_RISCV_FS8_REGNUM,
  144. + SIM_RISCV_FS9_REGNUM,
  145. + SIM_RISCV_FS10_REGNUM,
  146. + SIM_RISCV_FS11_REGNUM,
  147. + SIM_RISCV_FT8_REGNUM,
  148. + SIM_RISCV_FT9_REGNUM,
  149. + SIM_RISCV_FT10_REGNUM,
  150. + SIM_RISCV_FT11_REGNUM,
  151. +#define SIM_RISCV_LAST_FP_REGNUM SIM_RISCV_FT11_REGNUM
  152. +
  153. +#define SIM_RISCV_FIRST_CSR_REGNUM SIM_RISCV_LAST_FP_REGNUM + 1
  154. +#define DECLARE_CSR(name, num, class, def_ver, abort_ver) \
  155. + SIM_RISCV_ ## num ## _REGNUM,
  156. +#include "opcode/riscv-opc.h"
  157. +#undef DECLARE_CSR
  158. +#define SIM_RISCV_LAST_CSR_REGNUM SIM_RISCV_LAST_REGNUM - 1
  159. +
  160. + SIM_RISCV_LAST_REGNUM
  161. +};
  162. diff --git a/sim/common/nltvals.def b/sim/common/nltvals.def
  163. index 92ccc9aded..60467f343d 100644
  164. --- a/sim/common/nltvals.def
  165. +++ b/sim/common/nltvals.def
  166. @@ -605,3 +605,51 @@
  167. /* end pru sys target macros */
  168. #endif
  169. #endif
  170. +#ifdef NL_TARGET_riscv
  171. +#ifdef sys_defs
  172. +/* from syscall.h */
  173. +/* begin riscv sys target macros */
  174. + { "SYS_access", 1033 },
  175. + { "SYS_brk", 214 },
  176. + { "SYS_chdir", 49 },
  177. + { "SYS_close", 57 },
  178. + { "SYS_dup", 23 },
  179. + { "SYS_exit", 93 },
  180. + { "SYS_exit_group", 94 },
  181. + { "SYS_faccessat", 48 },
  182. + { "SYS_fcntl", 25 },
  183. + { "SYS_fstat", 80 },
  184. + { "SYS_fstatat", 79 },
  185. + { "SYS_getcwd", 17 },
  186. + { "SYS_getdents", 61 },
  187. + { "SYS_getegid", 177 },
  188. + { "SYS_geteuid", 175 },
  189. + { "SYS_getgid", 176 },
  190. + { "SYS_getmainvars", 2011 },
  191. + { "SYS_getpid", 172 },
  192. + { "SYS_gettimeofday", 169 },
  193. + { "SYS_getuid", 174 },
  194. + { "SYS_kill", 129 },
  195. + { "SYS_link", 1025 },
  196. + { "SYS_lseek", 62 },
  197. + { "SYS_lstat", 1039 },
  198. + { "SYS_mkdir", 1030 },
  199. + { "SYS_mmap", 222 },
  200. + { "SYS_mremap", 216 },
  201. + { "SYS_munmap", 215 },
  202. + { "SYS_open", 1024 },
  203. + { "SYS_openat", 56 },
  204. + { "SYS_pread", 67 },
  205. + { "SYS_pwrite", 68 },
  206. + { "SYS_read", 63 },
  207. + { "SYS_rt_sigaction", 134 },
  208. + { "SYS_stat", 1038 },
  209. + { "SYS_time", 1062 },
  210. + { "SYS_times", 153 },
  211. + { "SYS_uname", 160 },
  212. + { "SYS_unlink", 1026 },
  213. + { "SYS_write", 64 },
  214. + { "SYS_writev", 66 },
  215. +/* end riscv sys target macros */
  216. +#endif
  217. +#endif
  218. diff --git a/sim/configure b/sim/configure
  219. index 34f1a15a4c..7ff3b468b1 100755
  220. --- a/sim/configure
  221. +++ b/sim/configure
  222. @@ -633,6 +633,7 @@ infodir
  223. docdir
  224. oldincludedir
  225. includedir
  226. +runstatedir
  227. localstatedir
  228. sharedstatedir
  229. sysconfdir
  230. @@ -688,6 +689,7 @@ moxie
  231. msp430
  232. or1k
  233. pru
  234. +riscv
  235. rl78
  236. rx
  237. sh64
  238. @@ -735,6 +737,7 @@ datadir='${datarootdir}'
  239. sysconfdir='${prefix}/etc'
  240. sharedstatedir='${prefix}/com'
  241. localstatedir='${prefix}/var'
  242. +runstatedir='${localstatedir}/run'
  243. includedir='${prefix}/include'
  244. oldincludedir='/usr/include'
  245. docdir='${datarootdir}/doc/${PACKAGE}'
  246. @@ -987,6 +990,15 @@ do
  247. | -silent | --silent | --silen | --sile | --sil)
  248. silent=yes ;;
  249. + -runstatedir | --runstatedir | --runstatedi | --runstated \
  250. + | --runstate | --runstat | --runsta | --runst | --runs \
  251. + | --run | --ru | --r)
  252. + ac_prev=runstatedir ;;
  253. + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
  254. + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
  255. + | --run=* | --ru=* | --r=*)
  256. + runstatedir=$ac_optarg ;;
  257. +
  258. -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  259. ac_prev=sbindir ;;
  260. -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  261. @@ -1124,7 +1136,7 @@ fi
  262. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
  263. datadir sysconfdir sharedstatedir localstatedir includedir \
  264. oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
  265. - libdir localedir mandir
  266. + libdir localedir mandir runstatedir
  267. do
  268. eval ac_val=\$$ac_var
  269. # Remove trailing slashes.
  270. @@ -1277,6 +1289,7 @@ Fine tuning of the installation directories:
  271. --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
  272. --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
  273. --localstatedir=DIR modifiable single-machine data [PREFIX/var]
  274. + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
  275. --libdir=DIR object code libraries [EPREFIX/lib]
  276. --includedir=DIR C header files [PREFIX/include]
  277. --oldincludedir=DIR C header files for non-gcc [/usr/include]
  278. @@ -3853,6 +3866,13 @@ subdirs="$subdirs aarch64"
  279. subdirs="$subdirs pru"
  280. + ;;
  281. + riscv*-*-*)
  282. +
  283. + sim_arch=riscv
  284. + subdirs="$subdirs riscv"
  285. +
  286. +
  287. ;;
  288. rl78-*-*)
  289. diff --git a/sim/configure.tgt b/sim/configure.tgt
  290. index c115c3c8dd..54a6342733 100644
  291. --- a/sim/configure.tgt
  292. +++ b/sim/configure.tgt
  293. @@ -85,6 +85,9 @@ case "${target}" in
  294. pru*-*-*)
  295. SIM_ARCH(pru)
  296. ;;
  297. + riscv*-*-*)
  298. + SIM_ARCH(riscv)
  299. + ;;
  300. rl78-*-*)
  301. SIM_ARCH(rl78)
  302. ;;
  303. diff --git a/sim/riscv/ChangeLog b/sim/riscv/ChangeLog
  304. new file mode 100644
  305. index 0000000000..8ab02a7a06
  306. --- /dev/null
  307. +++ b/sim/riscv/ChangeLog
  308. @@ -0,0 +1,16 @@
  309. +2018-11-26 Jim Wilson <jimw@sifive.com>
  310. +
  311. + * sim-main.c (execute_a): Check xlen_requirement not subset.
  312. + (step_once): Likewise.
  313. + (execute_one): Check xlen_requirement against cpu instead of subset.
  314. + New local index. Set to index of last non-zero char in subset.
  315. + Delete local subset. Use op->subset[index] instead of subset.
  316. + Delete '3' and '6' support from switch.
  317. +
  318. +2015-04-27 Mike Frysinger <vapier@gentoo.org>
  319. + Kito Cheng, Kuan-Lin Chen, Monk Chiang, Palmer Dabbelt, Jim Wilson
  320. +
  321. + * configure.ac, interp.c, Makefile.in, README, README-ISA,
  322. + sim-main.c, sim-main.h: New files for example simulator.
  323. + * aclocal.m4, config.in, configure: Regenerated.
  324. +
  325. diff --git a/sim/riscv/Makefile.in b/sim/riscv/Makefile.in
  326. new file mode 100644
  327. index 0000000000..2902cf68c7
  328. --- /dev/null
  329. +++ b/sim/riscv/Makefile.in
  330. @@ -0,0 +1,35 @@
  331. +# Makefile template for Configure for the example basic simulator.
  332. +# Copyright (C) 2005-2015 Free Software Foundation, Inc.
  333. +# Written by Mike Frysinger.
  334. +#
  335. +# This program is free software; you can redistribute it and/or modify
  336. +# it under the terms of the GNU General Public License as published by
  337. +# the Free Software Foundation; either version 3 of the License, or
  338. +# (at your option) any later version.
  339. +#
  340. +# This program is distributed in the hope that it will be useful,
  341. +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  342. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  343. +# GNU General Public License for more details.
  344. +#
  345. +# You should have received a copy of the GNU General Public License
  346. +# along with this program. If not, see <http://www.gnu.org/licenses/>.
  347. +
  348. +# This selects the newlib/libgloss syscall definitions.
  349. +NL_TARGET = -DNL_TARGET_riscv
  350. +
  351. +## COMMON_PRE_CONFIG_FRAG
  352. +
  353. +SIM_OBJS = \
  354. + $(SIM_NEW_COMMON_OBJS) \
  355. + sim-hload.o \
  356. + sim-model.o \
  357. + sim-reason.o \
  358. + sim-reg.o \
  359. + sim-resume.o \
  360. + sim-stop.o \
  361. + interp.o \
  362. + machs.o \
  363. + sim-main.o
  364. +
  365. +## COMMON_POST_CONFIG_FRAG
  366. diff --git a/sim/riscv/aclocal.m4 b/sim/riscv/aclocal.m4
  367. new file mode 100644
  368. index 0000000000..c81c155ac9
  369. --- /dev/null
  370. +++ b/sim/riscv/aclocal.m4
  371. @@ -0,0 +1,119 @@
  372. +# generated automatically by aclocal 1.14.1 -*- Autoconf -*-
  373. +
  374. +# Copyright (C) 1996-2013 Free Software Foundation, Inc.
  375. +
  376. +# This file is free software; the Free Software Foundation
  377. +# gives unlimited permission to copy and/or distribute it,
  378. +# with or without modifications, as long as this notice is preserved.
  379. +
  380. +# This program is distributed in the hope that it will be useful,
  381. +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  382. +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  383. +# PARTICULAR PURPOSE.
  384. +
  385. +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
  386. +# AM_CONDITIONAL -*- Autoconf -*-
  387. +
  388. +# Copyright (C) 1997-2013 Free Software Foundation, Inc.
  389. +#
  390. +# This file is free software; the Free Software Foundation
  391. +# gives unlimited permission to copy and/or distribute it,
  392. +# with or without modifications, as long as this notice is preserved.
  393. +
  394. +# AM_CONDITIONAL(NAME, SHELL-CONDITION)
  395. +# -------------------------------------
  396. +# Define a conditional.
  397. +AC_DEFUN([AM_CONDITIONAL],
  398. +[AC_PREREQ([2.52])dnl
  399. + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
  400. + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
  401. +AC_SUBST([$1_TRUE])dnl
  402. +AC_SUBST([$1_FALSE])dnl
  403. +_AM_SUBST_NOTMAKE([$1_TRUE])dnl
  404. +_AM_SUBST_NOTMAKE([$1_FALSE])dnl
  405. +m4_define([_AM_COND_VALUE_$1], [$2])dnl
  406. +if $2; then
  407. + $1_TRUE=
  408. + $1_FALSE='#'
  409. +else
  410. + $1_TRUE='#'
  411. + $1_FALSE=
  412. +fi
  413. +AC_CONFIG_COMMANDS_PRE(
  414. +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
  415. + AC_MSG_ERROR([[conditional "$1" was never defined.
  416. +Usually this means the macro was only invoked conditionally.]])
  417. +fi])])
  418. +
  419. +# Copyright (C) 2003-2013 Free Software Foundation, Inc.
  420. +#
  421. +# This file is free software; the Free Software Foundation
  422. +# gives unlimited permission to copy and/or distribute it,
  423. +# with or without modifications, as long as this notice is preserved.
  424. +
  425. +# Check whether the underlying file-system supports filenames
  426. +# with a leading dot. For instance MS-DOS doesn't.
  427. +AC_DEFUN([AM_SET_LEADING_DOT],
  428. +[rm -rf .tst 2>/dev/null
  429. +mkdir .tst 2>/dev/null
  430. +if test -d .tst; then
  431. + am__leading_dot=.
  432. +else
  433. + am__leading_dot=_
  434. +fi
  435. +rmdir .tst 2>/dev/null
  436. +AC_SUBST([am__leading_dot])])
  437. +
  438. +# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
  439. +# From Jim Meyering
  440. +
  441. +# Copyright (C) 1996-2013 Free Software Foundation, Inc.
  442. +#
  443. +# This file is free software; the Free Software Foundation
  444. +# gives unlimited permission to copy and/or distribute it,
  445. +# with or without modifications, as long as this notice is preserved.
  446. +
  447. +# AM_MAINTAINER_MODE([DEFAULT-MODE])
  448. +# ----------------------------------
  449. +# Control maintainer-specific portions of Makefiles.
  450. +# Default is to disable them, unless 'enable' is passed literally.
  451. +# For symmetry, 'disable' may be passed as well. Anyway, the user
  452. +# can override the default with the --enable/--disable switch.
  453. +AC_DEFUN([AM_MAINTAINER_MODE],
  454. +[m4_case(m4_default([$1], [disable]),
  455. + [enable], [m4_define([am_maintainer_other], [disable])],
  456. + [disable], [m4_define([am_maintainer_other], [enable])],
  457. + [m4_define([am_maintainer_other], [enable])
  458. + m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
  459. +AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
  460. + dnl maintainer-mode's default is 'disable' unless 'enable' is passed
  461. + AC_ARG_ENABLE([maintainer-mode],
  462. + [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
  463. + am_maintainer_other[ make rules and dependencies not useful
  464. + (and sometimes confusing) to the casual installer])],
  465. + [USE_MAINTAINER_MODE=$enableval],
  466. + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
  467. + AC_MSG_RESULT([$USE_MAINTAINER_MODE])
  468. + AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
  469. + MAINT=$MAINTAINER_MODE_TRUE
  470. + AC_SUBST([MAINT])dnl
  471. +]
  472. +)
  473. +
  474. +# Copyright (C) 2006-2013 Free Software Foundation, Inc.
  475. +#
  476. +# This file is free software; the Free Software Foundation
  477. +# gives unlimited permission to copy and/or distribute it,
  478. +# with or without modifications, as long as this notice is preserved.
  479. +
  480. +# _AM_SUBST_NOTMAKE(VARIABLE)
  481. +# ---------------------------
  482. +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
  483. +# This macro is traced by Automake.
  484. +AC_DEFUN([_AM_SUBST_NOTMAKE])
  485. +
  486. +# AM_SUBST_NOTMAKE(VARIABLE)
  487. +# --------------------------
  488. +# Public sister of _AM_SUBST_NOTMAKE.
  489. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
  490. +
  491. diff --git a/sim/riscv/config.in b/sim/riscv/config.in
  492. new file mode 100644
  493. index 0000000000..aa3e45ca4a
  494. --- /dev/null
  495. +++ b/sim/riscv/config.in
  496. @@ -0,0 +1,248 @@
  497. +/* config.in. Generated from configure.ac by autoheader. */
  498. +
  499. +/* Define if building universal (internal helper macro) */
  500. +#undef AC_APPLE_UNIVERSAL_BUILD
  501. +
  502. +/* Sim debug setting */
  503. +#undef DEBUG
  504. +
  505. +/* Define to 1 if translation of program messages to the user's native
  506. + language is requested. */
  507. +#undef ENABLE_NLS
  508. +
  509. +/* Define to 1 if you have the <dlfcn.h> header file. */
  510. +#undef HAVE_DLFCN_H
  511. +
  512. +/* Define to 1 if you have the <errno.h> header file. */
  513. +#undef HAVE_ERRNO_H
  514. +
  515. +/* Define to 1 if you have the <fcntl.h> header file. */
  516. +#undef HAVE_FCNTL_H
  517. +
  518. +/* Define to 1 if you have the <fpu_control.h> header file. */
  519. +#undef HAVE_FPU_CONTROL_H
  520. +
  521. +/* Define to 1 if you have the `ftruncate' function. */
  522. +#undef HAVE_FTRUNCATE
  523. +
  524. +/* Define to 1 if you have the `getrusage' function. */
  525. +#undef HAVE_GETRUSAGE
  526. +
  527. +/* Define to 1 if you have the <inttypes.h> header file. */
  528. +#undef HAVE_INTTYPES_H
  529. +
  530. +/* Define to 1 if you have the `nsl' library (-lnsl). */
  531. +#undef HAVE_LIBNSL
  532. +
  533. +/* Define to 1 if you have the `socket' library (-lsocket). */
  534. +#undef HAVE_LIBSOCKET
  535. +
  536. +/* Define to 1 if you have the `lstat' function. */
  537. +#undef HAVE_LSTAT
  538. +
  539. +/* Define to 1 if you have the <memory.h> header file. */
  540. +#undef HAVE_MEMORY_H
  541. +
  542. +/* Define to 1 if you have the `mmap' function. */
  543. +#undef HAVE_MMAP
  544. +
  545. +/* Define to 1 if you have the `munmap' function. */
  546. +#undef HAVE_MUNMAP
  547. +
  548. +/* Define to 1 if you have the `posix_fallocate' function. */
  549. +#undef HAVE_POSIX_FALLOCATE
  550. +
  551. +/* Define to 1 if you have the `sigaction' function. */
  552. +#undef HAVE_SIGACTION
  553. +
  554. +/* Define to 1 if the system has the type `socklen_t'. */
  555. +#undef HAVE_SOCKLEN_T
  556. +
  557. +/* Define to 1 if you have the <stdint.h> header file. */
  558. +#undef HAVE_STDINT_H
  559. +
  560. +/* Define to 1 if you have the <stdlib.h> header file. */
  561. +#undef HAVE_STDLIB_H
  562. +
  563. +/* Define to 1 if you have the <strings.h> header file. */
  564. +#undef HAVE_STRINGS_H
  565. +
  566. +/* Define to 1 if you have the <string.h> header file. */
  567. +#undef HAVE_STRING_H
  568. +
  569. +/* Define to 1 if `struct stat' is a member of `st_atime'. */
  570. +#undef HAVE_STRUCT_STAT_ST_ATIME
  571. +
  572. +/* Define to 1 if `struct stat' is a member of `st_blksize'. */
  573. +#undef HAVE_STRUCT_STAT_ST_BLKSIZE
  574. +
  575. +/* Define to 1 if `struct stat' is a member of `st_blocks'. */
  576. +#undef HAVE_STRUCT_STAT_ST_BLOCKS
  577. +
  578. +/* Define to 1 if `struct stat' is a member of `st_ctime'. */
  579. +#undef HAVE_STRUCT_STAT_ST_CTIME
  580. +
  581. +/* Define to 1 if `struct stat' is a member of `st_dev'. */
  582. +#undef HAVE_STRUCT_STAT_ST_DEV
  583. +
  584. +/* Define to 1 if `struct stat' is a member of `st_gid'. */
  585. +#undef HAVE_STRUCT_STAT_ST_GID
  586. +
  587. +/* Define to 1 if `struct stat' is a member of `st_ino'. */
  588. +#undef HAVE_STRUCT_STAT_ST_INO
  589. +
  590. +/* Define to 1 if `struct stat' is a member of `st_mode'. */
  591. +#undef HAVE_STRUCT_STAT_ST_MODE
  592. +
  593. +/* Define to 1 if `struct stat' is a member of `st_mtime'. */
  594. +#undef HAVE_STRUCT_STAT_ST_MTIME
  595. +
  596. +/* Define to 1 if `struct stat' is a member of `st_nlink'. */
  597. +#undef HAVE_STRUCT_STAT_ST_NLINK
  598. +
  599. +/* Define to 1 if `struct stat' is a member of `st_rdev'. */
  600. +#undef HAVE_STRUCT_STAT_ST_RDEV
  601. +
  602. +/* Define to 1 if `struct stat' is a member of `st_size'. */
  603. +#undef HAVE_STRUCT_STAT_ST_SIZE
  604. +
  605. +/* Define to 1 if `struct stat' is a member of `st_uid'. */
  606. +#undef HAVE_STRUCT_STAT_ST_UID
  607. +
  608. +/* Define to 1 if you have the <sys/mman.h> header file. */
  609. +#undef HAVE_SYS_MMAN_H
  610. +
  611. +/* Define to 1 if you have the <sys/resource.h> header file. */
  612. +#undef HAVE_SYS_RESOURCE_H
  613. +
  614. +/* Define to 1 if you have the <sys/stat.h> header file. */
  615. +#undef HAVE_SYS_STAT_H
  616. +
  617. +/* Define to 1 if you have the <sys/times.h> header file. */
  618. +#undef HAVE_SYS_TIMES_H
  619. +
  620. +/* Define to 1 if you have the <sys/time.h> header file. */
  621. +#undef HAVE_SYS_TIME_H
  622. +
  623. +/* Define to 1 if you have the <sys/types.h> header file. */
  624. +#undef HAVE_SYS_TYPES_H
  625. +
  626. +/* Define to 1 if you have the `time' function. */
  627. +#undef HAVE_TIME
  628. +
  629. +/* Define to 1 if you have the <time.h> header file. */
  630. +#undef HAVE_TIME_H
  631. +
  632. +/* Define to 1 if you have the `truncate' function. */
  633. +#undef HAVE_TRUNCATE
  634. +
  635. +/* Define to 1 if you have the <unistd.h> header file. */
  636. +#undef HAVE_UNISTD_H
  637. +
  638. +/* Define to 1 if you have the <windows.h> header file. */
  639. +#undef HAVE_WINDOWS_H
  640. +
  641. +/* Define to 1 if you have the `__setfpucw' function. */
  642. +#undef HAVE___SETFPUCW
  643. +
  644. +/* Define to the sub-directory in which libtool stores uninstalled libraries.
  645. + */
  646. +#undef LT_OBJDIR
  647. +
  648. +/* Name of this package. */
  649. +#undef PACKAGE
  650. +
  651. +/* Define to the address where bug reports for this package should be sent. */
  652. +#undef PACKAGE_BUGREPORT
  653. +
  654. +/* Define to the full name of this package. */
  655. +#undef PACKAGE_NAME
  656. +
  657. +/* Define to the full name and version of this package. */
  658. +#undef PACKAGE_STRING
  659. +
  660. +/* Define to the one symbol short name of this package. */
  661. +#undef PACKAGE_TARNAME
  662. +
  663. +/* Define to the home page for this package. */
  664. +#undef PACKAGE_URL
  665. +
  666. +/* Define to the version of this package. */
  667. +#undef PACKAGE_VERSION
  668. +
  669. +/* Additional package description */
  670. +#undef PKGVERSION
  671. +
  672. +/* Sim profile settings */
  673. +#undef PROFILE
  674. +
  675. +/* Bug reporting address */
  676. +#undef REPORT_BUGS_TO
  677. +
  678. +/* Define as the return type of signal handlers (`int' or `void'). */
  679. +#undef RETSIGTYPE
  680. +
  681. +/* Define to 1 if you have the ANSI C header files. */
  682. +#undef STDC_HEADERS
  683. +
  684. +/* Enable extensions on AIX 3, Interix. */
  685. +#ifndef _ALL_SOURCE
  686. +# undef _ALL_SOURCE
  687. +#endif
  688. +/* Enable GNU extensions on systems that have them. */
  689. +#ifndef _GNU_SOURCE
  690. +# undef _GNU_SOURCE
  691. +#endif
  692. +/* Enable threading extensions on Solaris. */
  693. +#ifndef _POSIX_PTHREAD_SEMANTICS
  694. +# undef _POSIX_PTHREAD_SEMANTICS
  695. +#endif
  696. +/* Enable extensions on HP NonStop. */
  697. +#ifndef _TANDEM_SOURCE
  698. +# undef _TANDEM_SOURCE
  699. +#endif
  700. +/* Enable general extensions on Solaris. */
  701. +#ifndef __EXTENSIONS__
  702. +# undef __EXTENSIONS__
  703. +#endif
  704. +
  705. +
  706. +/* Sim assert settings */
  707. +#undef WITH_ASSERT
  708. +
  709. +/* Sim debug setting */
  710. +#undef WITH_DEBUG
  711. +
  712. +/* Sim default environment */
  713. +#undef WITH_ENVIRONMENT
  714. +
  715. +/* Sim profile settings */
  716. +#undef WITH_PROFILE
  717. +
  718. +/* How to route I/O */
  719. +#undef WITH_STDIO
  720. +
  721. +/* Sim trace settings */
  722. +#undef WITH_TRACE
  723. +
  724. +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
  725. + significant byte first (like Motorola and SPARC, unlike Intel). */
  726. +#if defined AC_APPLE_UNIVERSAL_BUILD
  727. +# if defined __BIG_ENDIAN__
  728. +# define WORDS_BIGENDIAN 1
  729. +# endif
  730. +#else
  731. +# ifndef WORDS_BIGENDIAN
  732. +# undef WORDS_BIGENDIAN
  733. +# endif
  734. +#endif
  735. +
  736. +/* Define to 1 if on MINIX. */
  737. +#undef _MINIX
  738. +
  739. +/* Define to 2 if the system does not provide POSIX.1 features except with
  740. + this defined. */
  741. +#undef _POSIX_1_SOURCE
  742. +
  743. +/* Define to 1 if you need to in order for `stat' and other things to work. */
  744. +#undef _POSIX_SOURCE
  745. diff --git a/sim/riscv/configure b/sim/riscv/configure
  746. new file mode 100755
  747. index 0000000000..4c53d6b576
  748. --- /dev/null
  749. +++ b/sim/riscv/configure
  750. @@ -0,0 +1,16131 @@
  751. +#! /bin/sh
  752. +# Guess values for system-dependent variables and create Makefiles.
  753. +# Generated by GNU Autoconf 2.69.
  754. +#
  755. +#
  756. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
  757. +#
  758. +#
  759. +# This configure script is free software; the Free Software Foundation
  760. +# gives unlimited permission to copy, distribute and modify it.
  761. +## -------------------- ##
  762. +## M4sh Initialization. ##
  763. +## -------------------- ##
  764. +
  765. +# Be more Bourne compatible
  766. +DUALCASE=1; export DUALCASE # for MKS sh
  767. +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
  768. + emulate sh
  769. + NULLCMD=:
  770. + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  771. + # is contrary to our usage. Disable this feature.
  772. + alias -g '${1+"$@"}'='"$@"'
  773. + setopt NO_GLOB_SUBST
  774. +else
  775. + case `(set -o) 2>/dev/null` in #(
  776. + *posix*) :
  777. + set -o posix ;; #(
  778. + *) :
  779. + ;;
  780. +esac
  781. +fi
  782. +
  783. +
  784. +as_nl='
  785. +'
  786. +export as_nl
  787. +# Printing a long string crashes Solaris 7 /usr/bin/printf.
  788. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  789. +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
  790. +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
  791. +# Prefer a ksh shell builtin over an external printf program on Solaris,
  792. +# but without wasting forks for bash or zsh.
  793. +if test -z "$BASH_VERSION$ZSH_VERSION" \
  794. + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
  795. + as_echo='print -r --'
  796. + as_echo_n='print -rn --'
  797. +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  798. + as_echo='printf %s\n'
  799. + as_echo_n='printf %s'
  800. +else
  801. + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
  802. + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
  803. + as_echo_n='/usr/ucb/echo -n'
  804. + else
  805. + as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
  806. + as_echo_n_body='eval
  807. + arg=$1;
  808. + case $arg in #(
  809. + *"$as_nl"*)
  810. + expr "X$arg" : "X\\(.*\\)$as_nl";
  811. + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
  812. + esac;
  813. + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
  814. + '
  815. + export as_echo_n_body
  816. + as_echo_n='sh -c $as_echo_n_body as_echo'
  817. + fi
  818. + export as_echo_body
  819. + as_echo='sh -c $as_echo_body as_echo'
  820. +fi
  821. +
  822. +# The user is always right.
  823. +if test "${PATH_SEPARATOR+set}" != set; then
  824. + PATH_SEPARATOR=:
  825. + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
  826. + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
  827. + PATH_SEPARATOR=';'
  828. + }
  829. +fi
  830. +
  831. +
  832. +# IFS
  833. +# We need space, tab and new line, in precisely that order. Quoting is
  834. +# there to prevent editors from complaining about space-tab.
  835. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word
  836. +# splitting by setting IFS to empty value.)
  837. +IFS=" "" $as_nl"
  838. +
  839. +# Find who we are. Look in the path if we contain no directory separator.
  840. +as_myself=
  841. +case $0 in #((
  842. + *[\\/]* ) as_myself=$0 ;;
  843. + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  844. +for as_dir in $PATH
  845. +do
  846. + IFS=$as_save_IFS
  847. + test -z "$as_dir" && as_dir=.
  848. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
  849. + done
  850. +IFS=$as_save_IFS
  851. +
  852. + ;;
  853. +esac
  854. +# We did not find ourselves, most probably we were run as `sh COMMAND'
  855. +# in which case we are not to be found in the path.
  856. +if test "x$as_myself" = x; then
  857. + as_myself=$0
  858. +fi
  859. +if test ! -f "$as_myself"; then
  860. + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
  861. + exit 1
  862. +fi
  863. +
  864. +# Unset variables that we do not need and which cause bugs (e.g. in
  865. +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
  866. +# suppresses any "Segmentation fault" message there. '((' could
  867. +# trigger a bug in pdksh 5.2.14.
  868. +for as_var in BASH_ENV ENV MAIL MAILPATH
  869. +do eval test x\${$as_var+set} = xset \
  870. + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
  871. +done
  872. +PS1='$ '
  873. +PS2='> '
  874. +PS4='+ '
  875. +
  876. +# NLS nuisances.
  877. +LC_ALL=C
  878. +export LC_ALL
  879. +LANGUAGE=C
  880. +export LANGUAGE
  881. +
  882. +# CDPATH.
  883. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  884. +
  885. +# Use a proper internal environment variable to ensure we don't fall
  886. + # into an infinite loop, continuously re-executing ourselves.
  887. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
  888. + _as_can_reexec=no; export _as_can_reexec;
  889. + # We cannot yet assume a decent shell, so we have to provide a
  890. +# neutralization value for shells without unset; and this also
  891. +# works around shells that cannot unset nonexistent variables.
  892. +# Preserve -v and -x to the replacement shell.
  893. +BASH_ENV=/dev/null
  894. +ENV=/dev/null
  895. +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
  896. +case $- in # ((((
  897. + *v*x* | *x*v* ) as_opts=-vx ;;
  898. + *v* ) as_opts=-v ;;
  899. + *x* ) as_opts=-x ;;
  900. + * ) as_opts= ;;
  901. +esac
  902. +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
  903. +# Admittedly, this is quite paranoid, since all the known shells bail
  904. +# out after a failed `exec'.
  905. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
  906. +as_fn_exit 255
  907. + fi
  908. + # We don't want this to propagate to other subprocesses.
  909. + { _as_can_reexec=; unset _as_can_reexec;}
  910. +if test "x$CONFIG_SHELL" = x; then
  911. + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
  912. + emulate sh
  913. + NULLCMD=:
  914. + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
  915. + # is contrary to our usage. Disable this feature.
  916. + alias -g '\${1+\"\$@\"}'='\"\$@\"'
  917. + setopt NO_GLOB_SUBST
  918. +else
  919. + case \`(set -o) 2>/dev/null\` in #(
  920. + *posix*) :
  921. + set -o posix ;; #(
  922. + *) :
  923. + ;;
  924. +esac
  925. +fi
  926. +"
  927. + as_required="as_fn_return () { (exit \$1); }
  928. +as_fn_success () { as_fn_return 0; }
  929. +as_fn_failure () { as_fn_return 1; }
  930. +as_fn_ret_success () { return 0; }
  931. +as_fn_ret_failure () { return 1; }
  932. +
  933. +exitcode=0
  934. +as_fn_success || { exitcode=1; echo as_fn_success failed.; }
  935. +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
  936. +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
  937. +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
  938. +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
  939. +
  940. +else
  941. + exitcode=1; echo positional parameters were not saved.
  942. +fi
  943. +test x\$exitcode = x0 || exit 1
  944. +test -x / || exit 1"
  945. + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
  946. + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
  947. + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
  948. + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
  949. +test \$(( 1 + 1 )) = 2 || exit 1
  950. +
  951. + test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
  952. + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  953. + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
  954. + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
  955. + PATH=/empty FPATH=/empty; export PATH FPATH
  956. + test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
  957. + || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
  958. + if (eval "$as_required") 2>/dev/null; then :
  959. + as_have_required=yes
  960. +else
  961. + as_have_required=no
  962. +fi
  963. + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
  964. +
  965. +else
  966. + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  967. +as_found=false
  968. +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
  969. +do
  970. + IFS=$as_save_IFS
  971. + test -z "$as_dir" && as_dir=.
  972. + as_found=:
  973. + case $as_dir in #(
  974. + /*)
  975. + for as_base in sh bash ksh sh5; do
  976. + # Try only shells that exist, to save several forks.
  977. + as_shell=$as_dir/$as_base
  978. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
  979. + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
  980. + CONFIG_SHELL=$as_shell as_have_required=yes
  981. + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
  982. + break 2
  983. +fi
  984. +fi
  985. + done;;
  986. + esac
  987. + as_found=false
  988. +done
  989. +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
  990. + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
  991. + CONFIG_SHELL=$SHELL as_have_required=yes
  992. +fi; }
  993. +IFS=$as_save_IFS
  994. +
  995. +
  996. + if test "x$CONFIG_SHELL" != x; then :
  997. + export CONFIG_SHELL
  998. + # We cannot yet assume a decent shell, so we have to provide a
  999. +# neutralization value for shells without unset; and this also
  1000. +# works around shells that cannot unset nonexistent variables.
  1001. +# Preserve -v and -x to the replacement shell.
  1002. +BASH_ENV=/dev/null
  1003. +ENV=/dev/null
  1004. +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
  1005. +case $- in # ((((
  1006. + *v*x* | *x*v* ) as_opts=-vx ;;
  1007. + *v* ) as_opts=-v ;;
  1008. + *x* ) as_opts=-x ;;
  1009. + * ) as_opts= ;;
  1010. +esac
  1011. +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
  1012. +# Admittedly, this is quite paranoid, since all the known shells bail
  1013. +# out after a failed `exec'.
  1014. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
  1015. +exit 255
  1016. +fi
  1017. +
  1018. + if test x$as_have_required = xno; then :
  1019. + $as_echo "$0: This script requires a shell more modern than all"
  1020. + $as_echo "$0: the shells that I found on your system."
  1021. + if test x${ZSH_VERSION+set} = xset ; then
  1022. + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
  1023. + $as_echo "$0: be upgraded to zsh 4.3.4 or later."
  1024. + else
  1025. + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
  1026. +$0: including any error possibly output before this
  1027. +$0: message. Then install a modern shell, or manually run
  1028. +$0: the script under such a shell if you do have one."
  1029. + fi
  1030. + exit 1
  1031. +fi
  1032. +fi
  1033. +fi
  1034. +SHELL=${CONFIG_SHELL-/bin/sh}
  1035. +export SHELL
  1036. +# Unset more variables known to interfere with behavior of common tools.
  1037. +CLICOLOR_FORCE= GREP_OPTIONS=
  1038. +unset CLICOLOR_FORCE GREP_OPTIONS
  1039. +
  1040. +## --------------------- ##
  1041. +## M4sh Shell Functions. ##
  1042. +## --------------------- ##
  1043. +# as_fn_unset VAR
  1044. +# ---------------
  1045. +# Portably unset VAR.
  1046. +as_fn_unset ()
  1047. +{
  1048. + { eval $1=; unset $1;}
  1049. +}
  1050. +as_unset=as_fn_unset
  1051. +
  1052. +# as_fn_set_status STATUS
  1053. +# -----------------------
  1054. +# Set $? to STATUS, without forking.
  1055. +as_fn_set_status ()
  1056. +{
  1057. + return $1
  1058. +} # as_fn_set_status
  1059. +
  1060. +# as_fn_exit STATUS
  1061. +# -----------------
  1062. +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
  1063. +as_fn_exit ()
  1064. +{
  1065. + set +e
  1066. + as_fn_set_status $1
  1067. + exit $1
  1068. +} # as_fn_exit
  1069. +
  1070. +# as_fn_mkdir_p
  1071. +# -------------
  1072. +# Create "$as_dir" as a directory, including parents if necessary.
  1073. +as_fn_mkdir_p ()
  1074. +{
  1075. +
  1076. + case $as_dir in #(
  1077. + -*) as_dir=./$as_dir;;
  1078. + esac
  1079. + test -d "$as_dir" || eval $as_mkdir_p || {
  1080. + as_dirs=
  1081. + while :; do
  1082. + case $as_dir in #(
  1083. + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
  1084. + *) as_qdir=$as_dir;;
  1085. + esac
  1086. + as_dirs="'$as_qdir' $as_dirs"
  1087. + as_dir=`$as_dirname -- "$as_dir" ||
  1088. +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
  1089. + X"$as_dir" : 'X\(//\)[^/]' \| \
  1090. + X"$as_dir" : 'X\(//\)$' \| \
  1091. + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
  1092. +$as_echo X"$as_dir" |
  1093. + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
  1094. + s//\1/
  1095. + q
  1096. + }
  1097. + /^X\(\/\/\)[^/].*/{
  1098. + s//\1/
  1099. + q
  1100. + }
  1101. + /^X\(\/\/\)$/{
  1102. + s//\1/
  1103. + q
  1104. + }
  1105. + /^X\(\/\).*/{
  1106. + s//\1/
  1107. + q
  1108. + }
  1109. + s/.*/./; q'`
  1110. + test -d "$as_dir" && break
  1111. + done
  1112. + test -z "$as_dirs" || eval "mkdir $as_dirs"
  1113. + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
  1114. +
  1115. +
  1116. +} # as_fn_mkdir_p
  1117. +
  1118. +# as_fn_executable_p FILE
  1119. +# -----------------------
  1120. +# Test if FILE is an executable regular file.
  1121. +as_fn_executable_p ()
  1122. +{
  1123. + test -f "$1" && test -x "$1"
  1124. +} # as_fn_executable_p
  1125. +# as_fn_append VAR VALUE
  1126. +# ----------------------
  1127. +# Append the text in VALUE to the end of the definition contained in VAR. Take
  1128. +# advantage of any shell optimizations that allow amortized linear growth over
  1129. +# repeated appends, instead of the typical quadratic growth present in naive
  1130. +# implementations.
  1131. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
  1132. + eval 'as_fn_append ()
  1133. + {
  1134. + eval $1+=\$2
  1135. + }'
  1136. +else
  1137. + as_fn_append ()
  1138. + {
  1139. + eval $1=\$$1\$2
  1140. + }
  1141. +fi # as_fn_append
  1142. +
  1143. +# as_fn_arith ARG...
  1144. +# ------------------
  1145. +# Perform arithmetic evaluation on the ARGs, and store the result in the
  1146. +# global $as_val. Take advantage of shells that can avoid forks. The arguments
  1147. +# must be portable across $(()) and expr.
  1148. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
  1149. + eval 'as_fn_arith ()
  1150. + {
  1151. + as_val=$(( $* ))
  1152. + }'
  1153. +else
  1154. + as_fn_arith ()
  1155. + {
  1156. + as_val=`expr "$@" || test $? -eq 1`
  1157. + }
  1158. +fi # as_fn_arith
  1159. +
  1160. +
  1161. +# as_fn_error STATUS ERROR [LINENO LOG_FD]
  1162. +# ----------------------------------------
  1163. +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
  1164. +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
  1165. +# script with STATUS, using 1 if that was 0.
  1166. +as_fn_error ()
  1167. +{
  1168. + as_status=$1; test $as_status -eq 0 && as_status=1
  1169. + if test "$4"; then
  1170. + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  1171. + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
  1172. + fi
  1173. + $as_echo "$as_me: error: $2" >&2
  1174. + as_fn_exit $as_status
  1175. +} # as_fn_error
  1176. +
  1177. +if expr a : '\(a\)' >/dev/null 2>&1 &&
  1178. + test "X`expr 00001 : '.*\(...\)'`" = X001; then
  1179. + as_expr=expr
  1180. +else
  1181. + as_expr=false
  1182. +fi
  1183. +
  1184. +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
  1185. + as_basename=basename
  1186. +else
  1187. + as_basename=false
  1188. +fi
  1189. +
  1190. +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
  1191. + as_dirname=dirname
  1192. +else
  1193. + as_dirname=false
  1194. +fi
  1195. +
  1196. +as_me=`$as_basename -- "$0" ||
  1197. +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
  1198. + X"$0" : 'X\(//\)$' \| \
  1199. + X"$0" : 'X\(/\)' \| . 2>/dev/null ||
  1200. +$as_echo X/"$0" |
  1201. + sed '/^.*\/\([^/][^/]*\)\/*$/{
  1202. + s//\1/
  1203. + q
  1204. + }
  1205. + /^X\/\(\/\/\)$/{
  1206. + s//\1/
  1207. + q
  1208. + }
  1209. + /^X\/\(\/\).*/{
  1210. + s//\1/
  1211. + q
  1212. + }
  1213. + s/.*/./; q'`
  1214. +
  1215. +# Avoid depending upon Character Ranges.
  1216. +as_cr_letters='abcdefghijklmnopqrstuvwxyz'
  1217. +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
  1218. +as_cr_Letters=$as_cr_letters$as_cr_LETTERS
  1219. +as_cr_digits='0123456789'
  1220. +as_cr_alnum=$as_cr_Letters$as_cr_digits
  1221. +
  1222. +
  1223. + as_lineno_1=$LINENO as_lineno_1a=$LINENO
  1224. + as_lineno_2=$LINENO as_lineno_2a=$LINENO
  1225. + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
  1226. + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
  1227. + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
  1228. + sed -n '
  1229. + p
  1230. + /[$]LINENO/=
  1231. + ' <$as_myself |
  1232. + sed '
  1233. + s/[$]LINENO.*/&-/
  1234. + t lineno
  1235. + b
  1236. + :lineno
  1237. + N
  1238. + :loop
  1239. + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
  1240. + t loop
  1241. + s/-\n.*//
  1242. + ' >$as_me.lineno &&
  1243. + chmod +x "$as_me.lineno" ||
  1244. + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
  1245. +
  1246. + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
  1247. + # already done that, so ensure we don't try to do so again and fall
  1248. + # in an infinite loop. This has already happened in practice.
  1249. + _as_can_reexec=no; export _as_can_reexec
  1250. + # Don't try to exec as it changes $[0], causing all sort of problems
  1251. + # (the dirname of $[0] is not the place where we might find the
  1252. + # original and so on. Autoconf is especially sensitive to this).
  1253. + . "./$as_me.lineno"
  1254. + # Exit status is that of the last command.
  1255. + exit
  1256. +}
  1257. +
  1258. +ECHO_C= ECHO_N= ECHO_T=
  1259. +case `echo -n x` in #(((((
  1260. +-n*)
  1261. + case `echo 'xy\c'` in
  1262. + *c*) ECHO_T=' ';; # ECHO_T is single tab character.
  1263. + xy) ECHO_C='\c';;
  1264. + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
  1265. + ECHO_T=' ';;
  1266. + esac;;
  1267. +*)
  1268. + ECHO_N='-n';;
  1269. +esac
  1270. +
  1271. +rm -f conf$$ conf$$.exe conf$$.file
  1272. +if test -d conf$$.dir; then
  1273. + rm -f conf$$.dir/conf$$.file
  1274. +else
  1275. + rm -f conf$$.dir
  1276. + mkdir conf$$.dir 2>/dev/null
  1277. +fi
  1278. +if (echo >conf$$.file) 2>/dev/null; then
  1279. + if ln -s conf$$.file conf$$ 2>/dev/null; then
  1280. + as_ln_s='ln -s'
  1281. + # ... but there are two gotchas:
  1282. + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
  1283. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
  1284. + # In both cases, we have to default to `cp -pR'.
  1285. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
  1286. + as_ln_s='cp -pR'
  1287. + elif ln conf$$.file conf$$ 2>/dev/null; then
  1288. + as_ln_s=ln
  1289. + else
  1290. + as_ln_s='cp -pR'
  1291. + fi
  1292. +else
  1293. + as_ln_s='cp -pR'
  1294. +fi
  1295. +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
  1296. +rmdir conf$$.dir 2>/dev/null
  1297. +
  1298. +if mkdir -p . 2>/dev/null; then
  1299. + as_mkdir_p='mkdir -p "$as_dir"'
  1300. +else
  1301. + test -d ./-p && rmdir ./-p
  1302. + as_mkdir_p=false
  1303. +fi
  1304. +
  1305. +as_test_x='test -x'
  1306. +as_executable_p=as_fn_executable_p
  1307. +
  1308. +# Sed expression to map a string onto a valid CPP name.
  1309. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
  1310. +
  1311. +# Sed expression to map a string onto a valid variable name.
  1312. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
  1313. +
  1314. +SHELL=${CONFIG_SHELL-/bin/sh}
  1315. +
  1316. +
  1317. +test -n "$DJDIR" || exec 7<&0 </dev/null
  1318. +exec 6>&1
  1319. +
  1320. +# Name of the host.
  1321. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
  1322. +# so uname gets run too.
  1323. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
  1324. +
  1325. +#
  1326. +# Initializations.
  1327. +#
  1328. +ac_default_prefix=/usr/local
  1329. +ac_clean_files=
  1330. +ac_config_libobj_dir=.
  1331. +LIBOBJS=
  1332. +cross_compiling=no
  1333. +subdirs=
  1334. +MFLAGS=
  1335. +MAKEFLAGS=
  1336. +
  1337. +# Identity of this package.
  1338. +PACKAGE_NAME=
  1339. +PACKAGE_TARNAME=
  1340. +PACKAGE_VERSION=
  1341. +PACKAGE_STRING=
  1342. +PACKAGE_BUGREPORT=
  1343. +PACKAGE_URL=
  1344. +
  1345. +ac_unique_file="Makefile.in"
  1346. +# Factoring default headers for most tests.
  1347. +ac_includes_default="\
  1348. +#include <stdio.h>
  1349. +#ifdef HAVE_SYS_TYPES_H
  1350. +# include <sys/types.h>
  1351. +#endif
  1352. +#ifdef HAVE_SYS_STAT_H
  1353. +# include <sys/stat.h>
  1354. +#endif
  1355. +#ifdef STDC_HEADERS
  1356. +# include <stdlib.h>
  1357. +# include <stddef.h>
  1358. +#else
  1359. +# ifdef HAVE_STDLIB_H
  1360. +# include <stdlib.h>
  1361. +# endif
  1362. +#endif
  1363. +#ifdef HAVE_STRING_H
  1364. +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
  1365. +# include <memory.h>
  1366. +# endif
  1367. +# include <string.h>
  1368. +#endif
  1369. +#ifdef HAVE_STRINGS_H
  1370. +# include <strings.h>
  1371. +#endif
  1372. +#ifdef HAVE_INTTYPES_H
  1373. +# include <inttypes.h>
  1374. +#endif
  1375. +#ifdef HAVE_STDINT_H
  1376. +# include <stdint.h>
  1377. +#endif
  1378. +#ifdef HAVE_UNISTD_H
  1379. +# include <unistd.h>
  1380. +#endif"
  1381. +
  1382. +ac_subst_vars='LTLIBOBJS
  1383. +LIBOBJS
  1384. +cgen_breaks
  1385. +REPORT_BUGS_TEXI
  1386. +REPORT_BUGS_TO
  1387. +PKGVERSION
  1388. +MAINT
  1389. +MAINTAINER_MODE_FALSE
  1390. +MAINTAINER_MODE_TRUE
  1391. +lt_cv_dlopen_libs
  1392. +OTOOL64
  1393. +OTOOL
  1394. +LIPO
  1395. +NMEDIT
  1396. +DSYMUTIL
  1397. +AWK
  1398. +STRIP
  1399. +OBJDUMP
  1400. +LN_S
  1401. +NM
  1402. +ac_ct_DUMPBIN
  1403. +DUMPBIN
  1404. +LD
  1405. +FGREP
  1406. +SED
  1407. +LIBTOOL
  1408. +PLUGINS_FALSE
  1409. +PLUGINS_TRUE
  1410. +zlibinc
  1411. +zlibdir
  1412. +CATOBJEXT
  1413. +GENCAT
  1414. +INSTOBJEXT
  1415. +DATADIRNAME
  1416. +CATALOGS
  1417. +POSUB
  1418. +GMSGFMT
  1419. +XGETTEXT
  1420. +INCINTL
  1421. +LIBINTL_DEP
  1422. +LIBINTL
  1423. +USE_NLS
  1424. +GMAKE_FALSE
  1425. +GMAKE_TRUE
  1426. +MAKE
  1427. +CCDEPMODE
  1428. +DEPDIR
  1429. +am__leading_dot
  1430. +PACKAGE
  1431. +RANLIB
  1432. +AR
  1433. +HDEFINES
  1434. +CC_FOR_BUILD
  1435. +INSTALL_DATA
  1436. +INSTALL_SCRIPT
  1437. +INSTALL_PROGRAM
  1438. +EGREP
  1439. +GREP
  1440. +CPP
  1441. +target_os
  1442. +target_vendor
  1443. +target_cpu
  1444. +target
  1445. +host_os
  1446. +host_vendor
  1447. +host_cpu
  1448. +host
  1449. +build_os
  1450. +build_vendor
  1451. +build_cpu
  1452. +build
  1453. +OBJEXT
  1454. +EXEEXT
  1455. +ac_ct_CC
  1456. +CPPFLAGS
  1457. +LDFLAGS
  1458. +CFLAGS
  1459. +CC
  1460. +WERROR_CFLAGS
  1461. +WARN_CFLAGS
  1462. +sim_reserved_bits
  1463. +sim_inline
  1464. +sim_hw
  1465. +sim_hw_objs
  1466. +sim_hw_cflags
  1467. +sim_default_model
  1468. +sim_scache
  1469. +sim_float
  1470. +sim_endian
  1471. +sim_bitsize
  1472. +sim_alignment
  1473. +target_alias
  1474. +host_alias
  1475. +build_alias
  1476. +LIBS
  1477. +ECHO_T
  1478. +ECHO_N
  1479. +ECHO_C
  1480. +DEFS
  1481. +mandir
  1482. +localedir
  1483. +libdir
  1484. +psdir
  1485. +pdfdir
  1486. +dvidir
  1487. +htmldir
  1488. +infodir
  1489. +docdir
  1490. +oldincludedir
  1491. +includedir
  1492. +runstatedir
  1493. +localstatedir
  1494. +sharedstatedir
  1495. +sysconfdir
  1496. +datadir
  1497. +datarootdir
  1498. +libexecdir
  1499. +sbindir
  1500. +bindir
  1501. +program_transform_name
  1502. +prefix
  1503. +exec_prefix
  1504. +PACKAGE_URL
  1505. +PACKAGE_BUGREPORT
  1506. +PACKAGE_STRING
  1507. +PACKAGE_VERSION
  1508. +PACKAGE_TARNAME
  1509. +PACKAGE_NAME
  1510. +PATH_SEPARATOR
  1511. +SHELL'
  1512. +ac_subst_files=''
  1513. +ac_user_opts='
  1514. +enable_option_checking
  1515. +with_system_zlib
  1516. +enable_plugins
  1517. +enable_shared
  1518. +enable_static
  1519. +with_pic
  1520. +enable_fast_install
  1521. +with_gnu_ld
  1522. +enable_libtool_lock
  1523. +enable_maintainer_mode
  1524. +enable_sim_debug
  1525. +enable_sim_stdio
  1526. +enable_sim_trace
  1527. +enable_sim_profile
  1528. +enable_sim_assert
  1529. +enable_sim_environment
  1530. +enable_sim_inline
  1531. +with_pkgversion
  1532. +with_bugurl
  1533. +enable_sim_endian
  1534. +enable_sim_alignment
  1535. +enable_werror
  1536. +enable_build_warnings
  1537. +enable_sim_build_warnings
  1538. +enable_sim_default_model
  1539. +enable_sim_bitsize
  1540. +'
  1541. + ac_precious_vars='build_alias
  1542. +host_alias
  1543. +target_alias
  1544. +CC
  1545. +CFLAGS
  1546. +LDFLAGS
  1547. +LIBS
  1548. +CPPFLAGS
  1549. +CPP'
  1550. +
  1551. +
  1552. +# Initialize some variables set by options.
  1553. +ac_init_help=
  1554. +ac_init_version=false
  1555. +ac_unrecognized_opts=
  1556. +ac_unrecognized_sep=
  1557. +# The variables have the same names as the options, with
  1558. +# dashes changed to underlines.
  1559. +cache_file=/dev/null
  1560. +exec_prefix=NONE
  1561. +no_create=
  1562. +no_recursion=
  1563. +prefix=NONE
  1564. +program_prefix=NONE
  1565. +program_suffix=NONE
  1566. +program_transform_name=s,x,x,
  1567. +silent=
  1568. +site=
  1569. +srcdir=
  1570. +verbose=
  1571. +x_includes=NONE
  1572. +x_libraries=NONE
  1573. +
  1574. +# Installation directory options.
  1575. +# These are left unexpanded so users can "make install exec_prefix=/foo"
  1576. +# and all the variables that are supposed to be based on exec_prefix
  1577. +# by default will actually change.
  1578. +# Use braces instead of parens because sh, perl, etc. also accept them.
  1579. +# (The list follows the same order as the GNU Coding Standards.)
  1580. +bindir='${exec_prefix}/bin'
  1581. +sbindir='${exec_prefix}/sbin'
  1582. +libexecdir='${exec_prefix}/libexec'
  1583. +datarootdir='${prefix}/share'
  1584. +datadir='${datarootdir}'
  1585. +sysconfdir='${prefix}/etc'
  1586. +sharedstatedir='${prefix}/com'
  1587. +localstatedir='${prefix}/var'
  1588. +runstatedir='${localstatedir}/run'
  1589. +includedir='${prefix}/include'
  1590. +oldincludedir='/usr/include'
  1591. +docdir='${datarootdir}/doc/${PACKAGE}'
  1592. +infodir='${datarootdir}/info'
  1593. +htmldir='${docdir}'
  1594. +dvidir='${docdir}'
  1595. +pdfdir='${docdir}'
  1596. +psdir='${docdir}'
  1597. +libdir='${exec_prefix}/lib'
  1598. +localedir='${datarootdir}/locale'
  1599. +mandir='${datarootdir}/man'
  1600. +
  1601. +ac_prev=
  1602. +ac_dashdash=
  1603. +for ac_option
  1604. +do
  1605. + # If the previous option needs an argument, assign it.
  1606. + if test -n "$ac_prev"; then
  1607. + eval $ac_prev=\$ac_option
  1608. + ac_prev=
  1609. + continue
  1610. + fi
  1611. +
  1612. + case $ac_option in
  1613. + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
  1614. + *=) ac_optarg= ;;
  1615. + *) ac_optarg=yes ;;
  1616. + esac
  1617. +
  1618. + # Accept the important Cygnus configure options, so we can diagnose typos.
  1619. +
  1620. + case $ac_dashdash$ac_option in
  1621. + --)
  1622. + ac_dashdash=yes ;;
  1623. +
  1624. + -bindir | --bindir | --bindi | --bind | --bin | --bi)
  1625. + ac_prev=bindir ;;
  1626. + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  1627. + bindir=$ac_optarg ;;
  1628. +
  1629. + -build | --build | --buil | --bui | --bu)
  1630. + ac_prev=build_alias ;;
  1631. + -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  1632. + build_alias=$ac_optarg ;;
  1633. +
  1634. + -cache-file | --cache-file | --cache-fil | --cache-fi \
  1635. + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  1636. + ac_prev=cache_file ;;
  1637. + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  1638. + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  1639. + cache_file=$ac_optarg ;;
  1640. +
  1641. + --config-cache | -C)
  1642. + cache_file=config.cache ;;
  1643. +
  1644. + -datadir | --datadir | --datadi | --datad)
  1645. + ac_prev=datadir ;;
  1646. + -datadir=* | --datadir=* | --datadi=* | --datad=*)
  1647. + datadir=$ac_optarg ;;
  1648. +
  1649. + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
  1650. + | --dataroo | --dataro | --datar)
  1651. + ac_prev=datarootdir ;;
  1652. + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
  1653. + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
  1654. + datarootdir=$ac_optarg ;;
  1655. +
  1656. + -disable-* | --disable-*)
  1657. + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
  1658. + # Reject names that are not valid shell variable names.
  1659. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
  1660. + as_fn_error $? "invalid feature name: $ac_useropt"
  1661. + ac_useropt_orig=$ac_useropt
  1662. + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
  1663. + case $ac_user_opts in
  1664. + *"
  1665. +"enable_$ac_useropt"
  1666. +"*) ;;
  1667. + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
  1668. + ac_unrecognized_sep=', ';;
  1669. + esac
  1670. + eval enable_$ac_useropt=no ;;
  1671. +
  1672. + -docdir | --docdir | --docdi | --doc | --do)
  1673. + ac_prev=docdir ;;
  1674. + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
  1675. + docdir=$ac_optarg ;;
  1676. +
  1677. + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
  1678. + ac_prev=dvidir ;;
  1679. + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
  1680. + dvidir=$ac_optarg ;;
  1681. +
  1682. + -enable-* | --enable-*)
  1683. + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
  1684. + # Reject names that are not valid shell variable names.
  1685. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
  1686. + as_fn_error $? "invalid feature name: $ac_useropt"
  1687. + ac_useropt_orig=$ac_useropt
  1688. + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
  1689. + case $ac_user_opts in
  1690. + *"
  1691. +"enable_$ac_useropt"
  1692. +"*) ;;
  1693. + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
  1694. + ac_unrecognized_sep=', ';;
  1695. + esac
  1696. + eval enable_$ac_useropt=\$ac_optarg ;;
  1697. +
  1698. + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  1699. + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  1700. + | --exec | --exe | --ex)
  1701. + ac_prev=exec_prefix ;;
  1702. + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  1703. + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  1704. + | --exec=* | --exe=* | --ex=*)
  1705. + exec_prefix=$ac_optarg ;;
  1706. +
  1707. + -gas | --gas | --ga | --g)
  1708. + # Obsolete; use --with-gas.
  1709. + with_gas=yes ;;
  1710. +
  1711. + -help | --help | --hel | --he | -h)
  1712. + ac_init_help=long ;;
  1713. + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
  1714. + ac_init_help=recursive ;;
  1715. + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
  1716. + ac_init_help=short ;;
  1717. +
  1718. + -host | --host | --hos | --ho)
  1719. + ac_prev=host_alias ;;
  1720. + -host=* | --host=* | --hos=* | --ho=*)
  1721. + host_alias=$ac_optarg ;;
  1722. +
  1723. + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
  1724. + ac_prev=htmldir ;;
  1725. + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
  1726. + | --ht=*)
  1727. + htmldir=$ac_optarg ;;
  1728. +
  1729. + -includedir | --includedir | --includedi | --included | --include \
  1730. + | --includ | --inclu | --incl | --inc)
  1731. + ac_prev=includedir ;;
  1732. + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  1733. + | --includ=* | --inclu=* | --incl=* | --inc=*)
  1734. + includedir=$ac_optarg ;;
  1735. +
  1736. + -infodir | --infodir | --infodi | --infod | --info | --inf)
  1737. + ac_prev=infodir ;;
  1738. + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  1739. + infodir=$ac_optarg ;;
  1740. +
  1741. + -libdir | --libdir | --libdi | --libd)
  1742. + ac_prev=libdir ;;
  1743. + -libdir=* | --libdir=* | --libdi=* | --libd=*)
  1744. + libdir=$ac_optarg ;;
  1745. +
  1746. + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  1747. + | --libexe | --libex | --libe)
  1748. + ac_prev=libexecdir ;;
  1749. + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  1750. + | --libexe=* | --libex=* | --libe=*)
  1751. + libexecdir=$ac_optarg ;;
  1752. +
  1753. + -localedir | --localedir | --localedi | --localed | --locale)
  1754. + ac_prev=localedir ;;
  1755. + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
  1756. + localedir=$ac_optarg ;;
  1757. +
  1758. + -localstatedir | --localstatedir | --localstatedi | --localstated \
  1759. + | --localstate | --localstat | --localsta | --localst | --locals)
  1760. + ac_prev=localstatedir ;;
  1761. + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  1762. + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
  1763. + localstatedir=$ac_optarg ;;
  1764. +
  1765. + -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  1766. + ac_prev=mandir ;;
  1767. + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  1768. + mandir=$ac_optarg ;;
  1769. +
  1770. + -nfp | --nfp | --nf)
  1771. + # Obsolete; use --without-fp.
  1772. + with_fp=no ;;
  1773. +
  1774. + -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  1775. + | --no-cr | --no-c | -n)
  1776. + no_create=yes ;;
  1777. +
  1778. + -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  1779. + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  1780. + no_recursion=yes ;;
  1781. +
  1782. + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  1783. + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  1784. + | --oldin | --oldi | --old | --ol | --o)
  1785. + ac_prev=oldincludedir ;;
  1786. + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  1787. + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  1788. + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  1789. + oldincludedir=$ac_optarg ;;
  1790. +
  1791. + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  1792. + ac_prev=prefix ;;
  1793. + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  1794. + prefix=$ac_optarg ;;
  1795. +
  1796. + -program-prefix | --program-prefix | --program-prefi | --program-pref \
  1797. + | --program-pre | --program-pr | --program-p)
  1798. + ac_prev=program_prefix ;;
  1799. + -program-prefix=* | --program-prefix=* | --program-prefi=* \
  1800. + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  1801. + program_prefix=$ac_optarg ;;
  1802. +
  1803. + -program-suffix | --program-suffix | --program-suffi | --program-suff \
  1804. + | --program-suf | --program-su | --program-s)
  1805. + ac_prev=program_suffix ;;
  1806. + -program-suffix=* | --program-suffix=* | --program-suffi=* \
  1807. + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  1808. + program_suffix=$ac_optarg ;;
  1809. +
  1810. + -program-transform-name | --program-transform-name \
  1811. + | --program-transform-nam | --program-transform-na \
  1812. + | --program-transform-n | --program-transform- \
  1813. + | --program-transform | --program-transfor \
  1814. + | --program-transfo | --program-transf \
  1815. + | --program-trans | --program-tran \
  1816. + | --progr-tra | --program-tr | --program-t)
  1817. + ac_prev=program_transform_name ;;
  1818. + -program-transform-name=* | --program-transform-name=* \
  1819. + | --program-transform-nam=* | --program-transform-na=* \
  1820. + | --program-transform-n=* | --program-transform-=* \
  1821. + | --program-transform=* | --program-transfor=* \
  1822. + | --program-transfo=* | --program-transf=* \
  1823. + | --program-trans=* | --program-tran=* \
  1824. + | --progr-tra=* | --program-tr=* | --program-t=*)
  1825. + program_transform_name=$ac_optarg ;;
  1826. +
  1827. + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
  1828. + ac_prev=pdfdir ;;
  1829. + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
  1830. + pdfdir=$ac_optarg ;;
  1831. +
  1832. + -psdir | --psdir | --psdi | --psd | --ps)
  1833. + ac_prev=psdir ;;
  1834. + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
  1835. + psdir=$ac_optarg ;;
  1836. +
  1837. + -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  1838. + | -silent | --silent | --silen | --sile | --sil)
  1839. + silent=yes ;;
  1840. +
  1841. + -runstatedir | --runstatedir | --runstatedi | --runstated \
  1842. + | --runstate | --runstat | --runsta | --runst | --runs \
  1843. + | --run | --ru | --r)
  1844. + ac_prev=runstatedir ;;
  1845. + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
  1846. + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
  1847. + | --run=* | --ru=* | --r=*)
  1848. + runstatedir=$ac_optarg ;;
  1849. +
  1850. + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  1851. + ac_prev=sbindir ;;
  1852. + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  1853. + | --sbi=* | --sb=*)
  1854. + sbindir=$ac_optarg ;;
  1855. +
  1856. + -sharedstatedir | --sharedstatedir | --sharedstatedi \
  1857. + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  1858. + | --sharedst | --shareds | --shared | --share | --shar \
  1859. + | --sha | --sh)
  1860. + ac_prev=sharedstatedir ;;
  1861. + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  1862. + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  1863. + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  1864. + | --sha=* | --sh=*)
  1865. + sharedstatedir=$ac_optarg ;;
  1866. +
  1867. + -site | --site | --sit)
  1868. + ac_prev=site ;;
  1869. + -site=* | --site=* | --sit=*)
  1870. + site=$ac_optarg ;;
  1871. +
  1872. + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  1873. + ac_prev=srcdir ;;
  1874. + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  1875. + srcdir=$ac_optarg ;;
  1876. +
  1877. + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  1878. + | --syscon | --sysco | --sysc | --sys | --sy)
  1879. + ac_prev=sysconfdir ;;
  1880. + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  1881. + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  1882. + sysconfdir=$ac_optarg ;;
  1883. +
  1884. + -target | --target | --targe | --targ | --tar | --ta | --t)
  1885. + ac_prev=target_alias ;;
  1886. + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  1887. + target_alias=$ac_optarg ;;
  1888. +
  1889. + -v | -verbose | --verbose | --verbos | --verbo | --verb)
  1890. + verbose=yes ;;
  1891. +
  1892. + -version | --version | --versio | --versi | --vers | -V)
  1893. + ac_init_version=: ;;
  1894. +
  1895. + -with-* | --with-*)
  1896. + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
  1897. + # Reject names that are not valid shell variable names.
  1898. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
  1899. + as_fn_error $? "invalid package name: $ac_useropt"
  1900. + ac_useropt_orig=$ac_useropt
  1901. + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
  1902. + case $ac_user_opts in
  1903. + *"
  1904. +"with_$ac_useropt"
  1905. +"*) ;;
  1906. + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
  1907. + ac_unrecognized_sep=', ';;
  1908. + esac
  1909. + eval with_$ac_useropt=\$ac_optarg ;;
  1910. +
  1911. + -without-* | --without-*)
  1912. + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
  1913. + # Reject names that are not valid shell variable names.
  1914. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
  1915. + as_fn_error $? "invalid package name: $ac_useropt"
  1916. + ac_useropt_orig=$ac_useropt
  1917. + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
  1918. + case $ac_user_opts in
  1919. + *"
  1920. +"with_$ac_useropt"
  1921. +"*) ;;
  1922. + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
  1923. + ac_unrecognized_sep=', ';;
  1924. + esac
  1925. + eval with_$ac_useropt=no ;;
  1926. +
  1927. + --x)
  1928. + # Obsolete; use --with-x.
  1929. + with_x=yes ;;
  1930. +
  1931. + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  1932. + | --x-incl | --x-inc | --x-in | --x-i)
  1933. + ac_prev=x_includes ;;
  1934. + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  1935. + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  1936. + x_includes=$ac_optarg ;;
  1937. +
  1938. + -x-libraries | --x-libraries | --x-librarie | --x-librari \
  1939. + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  1940. + ac_prev=x_libraries ;;
  1941. + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  1942. + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  1943. + x_libraries=$ac_optarg ;;
  1944. +
  1945. + -*) as_fn_error $? "unrecognized option: \`$ac_option'
  1946. +Try \`$0 --help' for more information"
  1947. + ;;
  1948. +
  1949. + *=*)
  1950. + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
  1951. + # Reject names that are not valid shell variable names.
  1952. + case $ac_envvar in #(
  1953. + '' | [0-9]* | *[!_$as_cr_alnum]* )
  1954. + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
  1955. + esac
  1956. + eval $ac_envvar=\$ac_optarg
  1957. + export $ac_envvar ;;
  1958. +
  1959. + *)
  1960. + # FIXME: should be removed in autoconf 3.0.
  1961. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
  1962. + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
  1963. + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
  1964. + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
  1965. + ;;
  1966. +
  1967. + esac
  1968. +done
  1969. +
  1970. +if test -n "$ac_prev"; then
  1971. + ac_option=--`echo $ac_prev | sed 's/_/-/g'`
  1972. + as_fn_error $? "missing argument to $ac_option"
  1973. +fi
  1974. +
  1975. +if test -n "$ac_unrecognized_opts"; then
  1976. + case $enable_option_checking in
  1977. + no) ;;
  1978. + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
  1979. + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
  1980. + esac
  1981. +fi
  1982. +
  1983. +# Check all directory arguments for consistency.
  1984. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
  1985. + datadir sysconfdir sharedstatedir localstatedir includedir \
  1986. + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
  1987. + libdir localedir mandir runstatedir
  1988. +do
  1989. + eval ac_val=\$$ac_var
  1990. + # Remove trailing slashes.
  1991. + case $ac_val in
  1992. + */ )
  1993. + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
  1994. + eval $ac_var=\$ac_val;;
  1995. + esac
  1996. + # Be sure to have absolute directory names.
  1997. + case $ac_val in
  1998. + [\\/$]* | ?:[\\/]* ) continue;;
  1999. + NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
  2000. + esac
  2001. + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
  2002. +done
  2003. +
  2004. +# There might be people who depend on the old broken behavior: `$host'
  2005. +# used to hold the argument of --host etc.
  2006. +# FIXME: To remove some day.
  2007. +build=$build_alias
  2008. +host=$host_alias
  2009. +target=$target_alias
  2010. +
  2011. +# FIXME: To remove some day.
  2012. +if test "x$host_alias" != x; then
  2013. + if test "x$build_alias" = x; then
  2014. + cross_compiling=maybe
  2015. + elif test "x$build_alias" != "x$host_alias"; then
  2016. + cross_compiling=yes
  2017. + fi
  2018. +fi
  2019. +
  2020. +ac_tool_prefix=
  2021. +test -n "$host_alias" && ac_tool_prefix=$host_alias-
  2022. +
  2023. +test "$silent" = yes && exec 6>/dev/null
  2024. +
  2025. +
  2026. +ac_pwd=`pwd` && test -n "$ac_pwd" &&
  2027. +ac_ls_di=`ls -di .` &&
  2028. +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
  2029. + as_fn_error $? "working directory cannot be determined"
  2030. +test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
  2031. + as_fn_error $? "pwd does not report name of working directory"
  2032. +
  2033. +
  2034. +# Find the source files, if location was not specified.
  2035. +if test -z "$srcdir"; then
  2036. + ac_srcdir_defaulted=yes
  2037. + # Try the directory containing this script, then the parent directory.
  2038. + ac_confdir=`$as_dirname -- "$as_myself" ||
  2039. +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
  2040. + X"$as_myself" : 'X\(//\)[^/]' \| \
  2041. + X"$as_myself" : 'X\(//\)$' \| \
  2042. + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
  2043. +$as_echo X"$as_myself" |
  2044. + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
  2045. + s//\1/
  2046. + q
  2047. + }
  2048. + /^X\(\/\/\)[^/].*/{
  2049. + s//\1/
  2050. + q
  2051. + }
  2052. + /^X\(\/\/\)$/{
  2053. + s//\1/
  2054. + q
  2055. + }
  2056. + /^X\(\/\).*/{
  2057. + s//\1/
  2058. + q
  2059. + }
  2060. + s/.*/./; q'`
  2061. + srcdir=$ac_confdir
  2062. + if test ! -r "$srcdir/$ac_unique_file"; then
  2063. + srcdir=..
  2064. + fi
  2065. +else
  2066. + ac_srcdir_defaulted=no
  2067. +fi
  2068. +if test ! -r "$srcdir/$ac_unique_file"; then
  2069. + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
  2070. + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
  2071. +fi
  2072. +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
  2073. +ac_abs_confdir=`(
  2074. + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
  2075. + pwd)`
  2076. +# When building in place, set srcdir=.
  2077. +if test "$ac_abs_confdir" = "$ac_pwd"; then
  2078. + srcdir=.
  2079. +fi
  2080. +# Remove unnecessary trailing slashes from srcdir.
  2081. +# Double slashes in file names in object file debugging info
  2082. +# mess up M-x gdb in Emacs.
  2083. +case $srcdir in
  2084. +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
  2085. +esac
  2086. +for ac_var in $ac_precious_vars; do
  2087. + eval ac_env_${ac_var}_set=\${${ac_var}+set}
  2088. + eval ac_env_${ac_var}_value=\$${ac_var}
  2089. + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
  2090. + eval ac_cv_env_${ac_var}_value=\$${ac_var}
  2091. +done
  2092. +
  2093. +#
  2094. +# Report the --help message.
  2095. +#
  2096. +if test "$ac_init_help" = "long"; then
  2097. + # Omit some internal or obsolete options to make the list less imposing.
  2098. + # This message is too long to be a string in the A/UX 3.1 sh.
  2099. + cat <<_ACEOF
  2100. +\`configure' configures this package to adapt to many kinds of systems.
  2101. +
  2102. +Usage: $0 [OPTION]... [VAR=VALUE]...
  2103. +
  2104. +To assign environment variables (e.g., CC, CFLAGS...), specify them as
  2105. +VAR=VALUE. See below for descriptions of some of the useful variables.
  2106. +
  2107. +Defaults for the options are specified in brackets.
  2108. +
  2109. +Configuration:
  2110. + -h, --help display this help and exit
  2111. + --help=short display options specific to this package
  2112. + --help=recursive display the short help of all the included packages
  2113. + -V, --version display version information and exit
  2114. + -q, --quiet, --silent do not print \`checking ...' messages
  2115. + --cache-file=FILE cache test results in FILE [disabled]
  2116. + -C, --config-cache alias for \`--cache-file=config.cache'
  2117. + -n, --no-create do not create output files
  2118. + --srcdir=DIR find the sources in DIR [configure dir or \`..']
  2119. +
  2120. +Installation directories:
  2121. + --prefix=PREFIX install architecture-independent files in PREFIX
  2122. + [$ac_default_prefix]
  2123. + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
  2124. + [PREFIX]
  2125. +
  2126. +By default, \`make install' will install all the files in
  2127. +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
  2128. +an installation prefix other than \`$ac_default_prefix' using \`--prefix',
  2129. +for instance \`--prefix=\$HOME'.
  2130. +
  2131. +For better control, use the options below.
  2132. +
  2133. +Fine tuning of the installation directories:
  2134. + --bindir=DIR user executables [EPREFIX/bin]
  2135. + --sbindir=DIR system admin executables [EPREFIX/sbin]
  2136. + --libexecdir=DIR program executables [EPREFIX/libexec]
  2137. + --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
  2138. + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
  2139. + --localstatedir=DIR modifiable single-machine data [PREFIX/var]
  2140. + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
  2141. + --libdir=DIR object code libraries [EPREFIX/lib]
  2142. + --includedir=DIR C header files [PREFIX/include]
  2143. + --oldincludedir=DIR C header files for non-gcc [/usr/include]
  2144. + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
  2145. + --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
  2146. + --infodir=DIR info documentation [DATAROOTDIR/info]
  2147. + --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
  2148. + --mandir=DIR man documentation [DATAROOTDIR/man]
  2149. + --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
  2150. + --htmldir=DIR html documentation [DOCDIR]
  2151. + --dvidir=DIR dvi documentation [DOCDIR]
  2152. + --pdfdir=DIR pdf documentation [DOCDIR]
  2153. + --psdir=DIR ps documentation [DOCDIR]
  2154. +_ACEOF
  2155. +
  2156. + cat <<\_ACEOF
  2157. +
  2158. +Program names:
  2159. + --program-prefix=PREFIX prepend PREFIX to installed program names
  2160. + --program-suffix=SUFFIX append SUFFIX to installed program names
  2161. + --program-transform-name=PROGRAM run sed PROGRAM on installed program names
  2162. +
  2163. +System types:
  2164. + --build=BUILD configure for building on BUILD [guessed]
  2165. + --host=HOST cross-compile to build programs to run on HOST [BUILD]
  2166. + --target=TARGET configure for building compilers for TARGET [HOST]
  2167. +_ACEOF
  2168. +fi
  2169. +
  2170. +if test -n "$ac_init_help"; then
  2171. +
  2172. + cat <<\_ACEOF
  2173. +
  2174. +Optional Features:
  2175. + --disable-option-checking ignore unrecognized --enable/--with options
  2176. + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
  2177. + --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
  2178. + --enable-plugins Enable support for plugins
  2179. + --enable-shared[=PKGS] build shared libraries [default=yes]
  2180. + --enable-static[=PKGS] build static libraries [default=yes]
  2181. + --enable-fast-install[=PKGS]
  2182. + optimize for fast installation [default=yes]
  2183. + --disable-libtool-lock avoid locking (might break parallel builds)
  2184. + --enable-maintainer-mode
  2185. + enable make rules and dependencies not useful (and
  2186. + sometimes confusing) to the casual installer
  2187. + --enable-sim-debug=opts Enable debugging flags (for developers of the sim
  2188. + itself)
  2189. + --enable-sim-stdio Specify whether to use stdio for console
  2190. + input/output
  2191. + --enable-sim-trace=opts Enable tracing of simulated programs
  2192. + --enable-sim-profile=opts
  2193. + Enable profiling flags
  2194. + --enable-sim-assert Specify whether to perform random assertions
  2195. + --enable-sim-environment=environment
  2196. + Specify mixed, user, virtual or operating
  2197. + environment
  2198. + --enable-sim-inline=inlines
  2199. + Specify which functions should be inlined
  2200. + --enable-sim-endian=endian
  2201. + Specify target byte endian orientation
  2202. + --enable-sim-alignment=align
  2203. + Specify strict, nonstrict or forced alignment of
  2204. + memory accesses
  2205. + --enable-werror treat compile warnings as errors
  2206. + --enable-build-warnings enable build-time compiler warnings if gcc is used
  2207. + --enable-sim-build-warnings
  2208. + enable SIM specific build-time compiler warnings if
  2209. + gcc is used
  2210. + --enable-sim-default-model=model
  2211. + Specify default model to simulate
  2212. + --enable-sim-bitsize=N Specify target bitsize (32 or 64)
  2213. +
  2214. +Optional Packages:
  2215. + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
  2216. + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
  2217. + --with-system-zlib use installed libz
  2218. + --with-pic try to use only PIC/non-PIC objects [default=use
  2219. + both]
  2220. + --with-gnu-ld assume the C compiler uses GNU ld [default=no]
  2221. + --with-pkgversion=PKG Use PKG in the version string in place of "SIM"
  2222. + --with-bugurl=URL Direct users to URL to report a bug
  2223. +
  2224. +Some influential environment variables:
  2225. + CC C compiler command
  2226. + CFLAGS C compiler flags
  2227. + LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
  2228. + nonstandard directory <lib dir>
  2229. + LIBS libraries to pass to the linker, e.g. -l<library>
  2230. + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
  2231. + you have headers in a nonstandard directory <include dir>
  2232. + CPP C preprocessor
  2233. +
  2234. +Use these variables to override the choices made by `configure' or to help
  2235. +it to find libraries and programs with nonstandard names/locations.
  2236. +
  2237. +Report bugs to the package provider.
  2238. +_ACEOF
  2239. +ac_status=$?
  2240. +fi
  2241. +
  2242. +if test "$ac_init_help" = "recursive"; then
  2243. + # If there are subdirs, report their specific --help.
  2244. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
  2245. + test -d "$ac_dir" ||
  2246. + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
  2247. + continue
  2248. + ac_builddir=.
  2249. +
  2250. +case "$ac_dir" in
  2251. +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
  2252. +*)
  2253. + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
  2254. + # A ".." for each directory in $ac_dir_suffix.
  2255. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
  2256. + case $ac_top_builddir_sub in
  2257. + "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
  2258. + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
  2259. + esac ;;
  2260. +esac
  2261. +ac_abs_top_builddir=$ac_pwd
  2262. +ac_abs_builddir=$ac_pwd$ac_dir_suffix
  2263. +# for backward compatibility:
  2264. +ac_top_builddir=$ac_top_build_prefix
  2265. +
  2266. +case $srcdir in
  2267. + .) # We are building in place.
  2268. + ac_srcdir=.
  2269. + ac_top_srcdir=$ac_top_builddir_sub
  2270. + ac_abs_top_srcdir=$ac_pwd ;;
  2271. + [\\/]* | ?:[\\/]* ) # Absolute name.
  2272. + ac_srcdir=$srcdir$ac_dir_suffix;
  2273. + ac_top_srcdir=$srcdir
  2274. + ac_abs_top_srcdir=$srcdir ;;
  2275. + *) # Relative name.
  2276. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
  2277. + ac_top_srcdir=$ac_top_build_prefix$srcdir
  2278. + ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
  2279. +esac
  2280. +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
  2281. +
  2282. + cd "$ac_dir" || { ac_status=$?; continue; }
  2283. + # Check for guested configure.
  2284. + if test -f "$ac_srcdir/configure.gnu"; then
  2285. + echo &&
  2286. + $SHELL "$ac_srcdir/configure.gnu" --help=recursive
  2287. + elif test -f "$ac_srcdir/configure"; then
  2288. + echo &&
  2289. + $SHELL "$ac_srcdir/configure" --help=recursive
  2290. + else
  2291. + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
  2292. + fi || ac_status=$?
  2293. + cd "$ac_pwd" || { ac_status=$?; break; }
  2294. + done
  2295. +fi
  2296. +
  2297. +test -n "$ac_init_help" && exit $ac_status
  2298. +if $ac_init_version; then
  2299. + cat <<\_ACEOF
  2300. +configure
  2301. +generated by GNU Autoconf 2.69
  2302. +
  2303. +Copyright (C) 2012 Free Software Foundation, Inc.
  2304. +This configure script is free software; the Free Software Foundation
  2305. +gives unlimited permission to copy, distribute and modify it.
  2306. +_ACEOF
  2307. + exit
  2308. +fi
  2309. +
  2310. +## ------------------------ ##
  2311. +## Autoconf initialization. ##
  2312. +## ------------------------ ##
  2313. +
  2314. +# ac_fn_c_try_compile LINENO
  2315. +# --------------------------
  2316. +# Try to compile conftest.$ac_ext, and return whether this succeeded.
  2317. +ac_fn_c_try_compile ()
  2318. +{
  2319. + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  2320. + rm -f conftest.$ac_objext
  2321. + if { { ac_try="$ac_compile"
  2322. +case "(($ac_try" in
  2323. + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  2324. + *) ac_try_echo=$ac_try;;
  2325. +esac
  2326. +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
  2327. +$as_echo "$ac_try_echo"; } >&5
  2328. + (eval "$ac_compile") 2>conftest.err
  2329. + ac_status=$?
  2330. + if test -s conftest.err; then
  2331. + grep -v '^ *+' conftest.err >conftest.er1
  2332. + cat conftest.er1 >&5
  2333. + mv -f conftest.er1 conftest.err
  2334. + fi
  2335. + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  2336. + test $ac_status = 0; } && {
  2337. + test -z "$ac_c_werror_flag" ||
  2338. + test ! -s conftest.err
  2339. + } && test -s conftest.$ac_objext; then :
  2340. + ac_retval=0
  2341. +else
  2342. + $as_echo "$as_me: failed program was:" >&5
  2343. +sed 's/^/| /' conftest.$ac_ext >&5
  2344. +
  2345. + ac_retval=1
  2346. +fi
  2347. + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  2348. + as_fn_set_status $ac_retval
  2349. +
  2350. +} # ac_fn_c_try_compile
  2351. +
  2352. +# ac_fn_c_try_cpp LINENO
  2353. +# ----------------------
  2354. +# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
  2355. +ac_fn_c_try_cpp ()
  2356. +{
  2357. + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  2358. + if { { ac_try="$ac_cpp conftest.$ac_ext"
  2359. +case "(($ac_try" in
  2360. + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  2361. + *) ac_try_echo=$ac_try;;
  2362. +esac
  2363. +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
  2364. +$as_echo "$ac_try_echo"; } >&5
  2365. + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
  2366. + ac_status=$?
  2367. + if test -s conftest.err; then
  2368. + grep -v '^ *+' conftest.err >conftest.er1
  2369. + cat conftest.er1 >&5
  2370. + mv -f conftest.er1 conftest.err
  2371. + fi
  2372. + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  2373. + test $ac_status = 0; } > conftest.i && {
  2374. + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
  2375. + test ! -s conftest.err
  2376. + }; then :
  2377. + ac_retval=0
  2378. +else
  2379. + $as_echo "$as_me: failed program was:" >&5
  2380. +sed 's/^/| /' conftest.$ac_ext >&5
  2381. +
  2382. + ac_retval=1
  2383. +fi
  2384. + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  2385. + as_fn_set_status $ac_retval
  2386. +
  2387. +} # ac_fn_c_try_cpp
  2388. +
  2389. +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
  2390. +# -------------------------------------------------------
  2391. +# Tests whether HEADER exists, giving a warning if it cannot be compiled using
  2392. +# the include files in INCLUDES and setting the cache variable VAR
  2393. +# accordingly.
  2394. +ac_fn_c_check_header_mongrel ()
  2395. +{
  2396. + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  2397. + if eval \${$3+:} false; then :
  2398. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
  2399. +$as_echo_n "checking for $2... " >&6; }
  2400. +if eval \${$3+:} false; then :
  2401. + $as_echo_n "(cached) " >&6
  2402. +fi
  2403. +eval ac_res=\$$3
  2404. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  2405. +$as_echo "$ac_res" >&6; }
  2406. +else
  2407. + # Is the header compilable?
  2408. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
  2409. +$as_echo_n "checking $2 usability... " >&6; }
  2410. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  2411. +/* end confdefs.h. */
  2412. +$4
  2413. +#include <$2>
  2414. +_ACEOF
  2415. +if ac_fn_c_try_compile "$LINENO"; then :
  2416. + ac_header_compiler=yes
  2417. +else
  2418. + ac_header_compiler=no
  2419. +fi
  2420. +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  2421. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
  2422. +$as_echo "$ac_header_compiler" >&6; }
  2423. +
  2424. +# Is the header present?
  2425. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
  2426. +$as_echo_n "checking $2 presence... " >&6; }
  2427. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  2428. +/* end confdefs.h. */
  2429. +#include <$2>
  2430. +_ACEOF
  2431. +if ac_fn_c_try_cpp "$LINENO"; then :
  2432. + ac_header_preproc=yes
  2433. +else
  2434. + ac_header_preproc=no
  2435. +fi
  2436. +rm -f conftest.err conftest.i conftest.$ac_ext
  2437. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
  2438. +$as_echo "$ac_header_preproc" >&6; }
  2439. +
  2440. +# So? What about this header?
  2441. +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
  2442. + yes:no: )
  2443. + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
  2444. +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
  2445. + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
  2446. +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
  2447. + ;;
  2448. + no:yes:* )
  2449. + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
  2450. +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
  2451. + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
  2452. +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
  2453. + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
  2454. +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
  2455. + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
  2456. +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
  2457. + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
  2458. +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
  2459. + ;;
  2460. +esac
  2461. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
  2462. +$as_echo_n "checking for $2... " >&6; }
  2463. +if eval \${$3+:} false; then :
  2464. + $as_echo_n "(cached) " >&6
  2465. +else
  2466. + eval "$3=\$ac_header_compiler"
  2467. +fi
  2468. +eval ac_res=\$$3
  2469. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  2470. +$as_echo "$ac_res" >&6; }
  2471. +fi
  2472. + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  2473. +
  2474. +} # ac_fn_c_check_header_mongrel
  2475. +
  2476. +# ac_fn_c_try_run LINENO
  2477. +# ----------------------
  2478. +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
  2479. +# that executables *can* be run.
  2480. +ac_fn_c_try_run ()
  2481. +{
  2482. + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  2483. + if { { ac_try="$ac_link"
  2484. +case "(($ac_try" in
  2485. + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  2486. + *) ac_try_echo=$ac_try;;
  2487. +esac
  2488. +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
  2489. +$as_echo "$ac_try_echo"; } >&5
  2490. + (eval "$ac_link") 2>&5
  2491. + ac_status=$?
  2492. + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  2493. + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
  2494. + { { case "(($ac_try" in
  2495. + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  2496. + *) ac_try_echo=$ac_try;;
  2497. +esac
  2498. +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
  2499. +$as_echo "$ac_try_echo"; } >&5
  2500. + (eval "$ac_try") 2>&5
  2501. + ac_status=$?
  2502. + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  2503. + test $ac_status = 0; }; }; then :
  2504. + ac_retval=0
  2505. +else
  2506. + $as_echo "$as_me: program exited with status $ac_status" >&5
  2507. + $as_echo "$as_me: failed program was:" >&5
  2508. +sed 's/^/| /' conftest.$ac_ext >&5
  2509. +
  2510. + ac_retval=$ac_status
  2511. +fi
  2512. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo
  2513. + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  2514. + as_fn_set_status $ac_retval
  2515. +
  2516. +} # ac_fn_c_try_run
  2517. +
  2518. +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
  2519. +# -------------------------------------------------------
  2520. +# Tests whether HEADER exists and can be compiled using the include files in
  2521. +# INCLUDES, setting the cache variable VAR accordingly.
  2522. +ac_fn_c_check_header_compile ()
  2523. +{
  2524. + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  2525. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
  2526. +$as_echo_n "checking for $2... " >&6; }
  2527. +if eval \${$3+:} false; then :
  2528. + $as_echo_n "(cached) " >&6
  2529. +else
  2530. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  2531. +/* end confdefs.h. */
  2532. +$4
  2533. +#include <$2>
  2534. +_ACEOF
  2535. +if ac_fn_c_try_compile "$LINENO"; then :
  2536. + eval "$3=yes"
  2537. +else
  2538. + eval "$3=no"
  2539. +fi
  2540. +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  2541. +fi
  2542. +eval ac_res=\$$3
  2543. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  2544. +$as_echo "$ac_res" >&6; }
  2545. + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  2546. +
  2547. +} # ac_fn_c_check_header_compile
  2548. +
  2549. +# ac_fn_c_try_link LINENO
  2550. +# -----------------------
  2551. +# Try to link conftest.$ac_ext, and return whether this succeeded.
  2552. +ac_fn_c_try_link ()
  2553. +{
  2554. + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  2555. + rm -f conftest.$ac_objext conftest$ac_exeext
  2556. + if { { ac_try="$ac_link"
  2557. +case "(($ac_try" in
  2558. + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  2559. + *) ac_try_echo=$ac_try;;
  2560. +esac
  2561. +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
  2562. +$as_echo "$ac_try_echo"; } >&5
  2563. + (eval "$ac_link") 2>conftest.err
  2564. + ac_status=$?
  2565. + if test -s conftest.err; then
  2566. + grep -v '^ *+' conftest.err >conftest.er1
  2567. + cat conftest.er1 >&5
  2568. + mv -f conftest.er1 conftest.err
  2569. + fi
  2570. + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  2571. + test $ac_status = 0; } && {
  2572. + test -z "$ac_c_werror_flag" ||
  2573. + test ! -s conftest.err
  2574. + } && test -s conftest$ac_exeext && {
  2575. + test "$cross_compiling" = yes ||
  2576. + test -x conftest$ac_exeext
  2577. + }; then :
  2578. + ac_retval=0
  2579. +else
  2580. + $as_echo "$as_me: failed program was:" >&5
  2581. +sed 's/^/| /' conftest.$ac_ext >&5
  2582. +
  2583. + ac_retval=1
  2584. +fi
  2585. + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
  2586. + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
  2587. + # interfere with the next link command; also delete a directory that is
  2588. + # left behind by Apple's compiler. We do this before executing the actions.
  2589. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo
  2590. + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  2591. + as_fn_set_status $ac_retval
  2592. +
  2593. +} # ac_fn_c_try_link
  2594. +
  2595. +# ac_fn_c_check_func LINENO FUNC VAR
  2596. +# ----------------------------------
  2597. +# Tests whether FUNC exists, setting the cache variable VAR accordingly
  2598. +ac_fn_c_check_func ()
  2599. +{
  2600. + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  2601. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
  2602. +$as_echo_n "checking for $2... " >&6; }
  2603. +if eval \${$3+:} false; then :
  2604. + $as_echo_n "(cached) " >&6
  2605. +else
  2606. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  2607. +/* end confdefs.h. */
  2608. +/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
  2609. + For example, HP-UX 11i <limits.h> declares gettimeofday. */
  2610. +#define $2 innocuous_$2
  2611. +
  2612. +/* System header to define __stub macros and hopefully few prototypes,
  2613. + which can conflict with char $2 (); below.
  2614. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  2615. + <limits.h> exists even on freestanding compilers. */
  2616. +
  2617. +#ifdef __STDC__
  2618. +# include <limits.h>
  2619. +#else
  2620. +# include <assert.h>
  2621. +#endif
  2622. +
  2623. +#undef $2
  2624. +
  2625. +/* Override any GCC internal prototype to avoid an error.
  2626. + Use char because int might match the return type of a GCC
  2627. + builtin and then its argument prototype would still apply. */
  2628. +#ifdef __cplusplus
  2629. +extern "C"
  2630. +#endif
  2631. +char $2 ();
  2632. +/* The GNU C library defines this for functions which it implements
  2633. + to always fail with ENOSYS. Some functions are actually named
  2634. + something starting with __ and the normal name is an alias. */
  2635. +#if defined __stub_$2 || defined __stub___$2
  2636. +choke me
  2637. +#endif
  2638. +
  2639. +int
  2640. +main ()
  2641. +{
  2642. +return $2 ();
  2643. + ;
  2644. + return 0;
  2645. +}
  2646. +_ACEOF
  2647. +if ac_fn_c_try_link "$LINENO"; then :
  2648. + eval "$3=yes"
  2649. +else
  2650. + eval "$3=no"
  2651. +fi
  2652. +rm -f core conftest.err conftest.$ac_objext \
  2653. + conftest$ac_exeext conftest.$ac_ext
  2654. +fi
  2655. +eval ac_res=\$$3
  2656. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  2657. +$as_echo "$ac_res" >&6; }
  2658. + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  2659. +
  2660. +} # ac_fn_c_check_func
  2661. +
  2662. +# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
  2663. +# ----------------------------------------------------
  2664. +# Tries to find if the field MEMBER exists in type AGGR, after including
  2665. +# INCLUDES, setting cache variable VAR accordingly.
  2666. +ac_fn_c_check_member ()
  2667. +{
  2668. + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  2669. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
  2670. +$as_echo_n "checking for $2.$3... " >&6; }
  2671. +if eval \${$4+:} false; then :
  2672. + $as_echo_n "(cached) " >&6
  2673. +else
  2674. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  2675. +/* end confdefs.h. */
  2676. +$5
  2677. +int
  2678. +main ()
  2679. +{
  2680. +static $2 ac_aggr;
  2681. +if (ac_aggr.$3)
  2682. +return 0;
  2683. + ;
  2684. + return 0;
  2685. +}
  2686. +_ACEOF
  2687. +if ac_fn_c_try_compile "$LINENO"; then :
  2688. + eval "$4=yes"
  2689. +else
  2690. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  2691. +/* end confdefs.h. */
  2692. +$5
  2693. +int
  2694. +main ()
  2695. +{
  2696. +static $2 ac_aggr;
  2697. +if (sizeof ac_aggr.$3)
  2698. +return 0;
  2699. + ;
  2700. + return 0;
  2701. +}
  2702. +_ACEOF
  2703. +if ac_fn_c_try_compile "$LINENO"; then :
  2704. + eval "$4=yes"
  2705. +else
  2706. + eval "$4=no"
  2707. +fi
  2708. +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  2709. +fi
  2710. +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  2711. +fi
  2712. +eval ac_res=\$$4
  2713. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  2714. +$as_echo "$ac_res" >&6; }
  2715. + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  2716. +
  2717. +} # ac_fn_c_check_member
  2718. +
  2719. +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
  2720. +# -------------------------------------------
  2721. +# Tests whether TYPE exists after having included INCLUDES, setting cache
  2722. +# variable VAR accordingly.
  2723. +ac_fn_c_check_type ()
  2724. +{
  2725. + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  2726. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
  2727. +$as_echo_n "checking for $2... " >&6; }
  2728. +if eval \${$3+:} false; then :
  2729. + $as_echo_n "(cached) " >&6
  2730. +else
  2731. + eval "$3=no"
  2732. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  2733. +/* end confdefs.h. */
  2734. +$4
  2735. +int
  2736. +main ()
  2737. +{
  2738. +if (sizeof ($2))
  2739. + return 0;
  2740. + ;
  2741. + return 0;
  2742. +}
  2743. +_ACEOF
  2744. +if ac_fn_c_try_compile "$LINENO"; then :
  2745. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  2746. +/* end confdefs.h. */
  2747. +$4
  2748. +int
  2749. +main ()
  2750. +{
  2751. +if (sizeof (($2)))
  2752. + return 0;
  2753. + ;
  2754. + return 0;
  2755. +}
  2756. +_ACEOF
  2757. +if ac_fn_c_try_compile "$LINENO"; then :
  2758. +
  2759. +else
  2760. + eval "$3=yes"
  2761. +fi
  2762. +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  2763. +fi
  2764. +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  2765. +fi
  2766. +eval ac_res=\$$3
  2767. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  2768. +$as_echo "$ac_res" >&6; }
  2769. + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  2770. +
  2771. +} # ac_fn_c_check_type
  2772. +cat >config.log <<_ACEOF
  2773. +This file contains any messages produced by compilers while
  2774. +running configure, to aid debugging if configure makes a mistake.
  2775. +
  2776. +It was created by $as_me, which was
  2777. +generated by GNU Autoconf 2.69. Invocation command line was
  2778. +
  2779. + $ $0 $@
  2780. +
  2781. +_ACEOF
  2782. +exec 5>>config.log
  2783. +{
  2784. +cat <<_ASUNAME
  2785. +## --------- ##
  2786. +## Platform. ##
  2787. +## --------- ##
  2788. +
  2789. +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
  2790. +uname -m = `(uname -m) 2>/dev/null || echo unknown`
  2791. +uname -r = `(uname -r) 2>/dev/null || echo unknown`
  2792. +uname -s = `(uname -s) 2>/dev/null || echo unknown`
  2793. +uname -v = `(uname -v) 2>/dev/null || echo unknown`
  2794. +
  2795. +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
  2796. +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
  2797. +
  2798. +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
  2799. +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
  2800. +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
  2801. +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
  2802. +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
  2803. +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
  2804. +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
  2805. +
  2806. +_ASUNAME
  2807. +
  2808. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  2809. +for as_dir in $PATH
  2810. +do
  2811. + IFS=$as_save_IFS
  2812. + test -z "$as_dir" && as_dir=.
  2813. + $as_echo "PATH: $as_dir"
  2814. + done
  2815. +IFS=$as_save_IFS
  2816. +
  2817. +} >&5
  2818. +
  2819. +cat >&5 <<_ACEOF
  2820. +
  2821. +
  2822. +## ----------- ##
  2823. +## Core tests. ##
  2824. +## ----------- ##
  2825. +
  2826. +_ACEOF
  2827. +
  2828. +
  2829. +# Keep a trace of the command line.
  2830. +# Strip out --no-create and --no-recursion so they do not pile up.
  2831. +# Strip out --silent because we don't want to record it for future runs.
  2832. +# Also quote any args containing shell meta-characters.
  2833. +# Make two passes to allow for proper duplicate-argument suppression.
  2834. +ac_configure_args=
  2835. +ac_configure_args0=
  2836. +ac_configure_args1=
  2837. +ac_must_keep_next=false
  2838. +for ac_pass in 1 2
  2839. +do
  2840. + for ac_arg
  2841. + do
  2842. + case $ac_arg in
  2843. + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
  2844. + -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  2845. + | -silent | --silent | --silen | --sile | --sil)
  2846. + continue ;;
  2847. + *\'*)
  2848. + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
  2849. + esac
  2850. + case $ac_pass in
  2851. + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
  2852. + 2)
  2853. + as_fn_append ac_configure_args1 " '$ac_arg'"
  2854. + if test $ac_must_keep_next = true; then
  2855. + ac_must_keep_next=false # Got value, back to normal.
  2856. + else
  2857. + case $ac_arg in
  2858. + *=* | --config-cache | -C | -disable-* | --disable-* \
  2859. + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
  2860. + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
  2861. + | -with-* | --with-* | -without-* | --without-* | --x)
  2862. + case "$ac_configure_args0 " in
  2863. + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
  2864. + esac
  2865. + ;;
  2866. + -* ) ac_must_keep_next=true ;;
  2867. + esac
  2868. + fi
  2869. + as_fn_append ac_configure_args " '$ac_arg'"
  2870. + ;;
  2871. + esac
  2872. + done
  2873. +done
  2874. +{ ac_configure_args0=; unset ac_configure_args0;}
  2875. +{ ac_configure_args1=; unset ac_configure_args1;}
  2876. +
  2877. +# When interrupted or exit'd, cleanup temporary files, and complete
  2878. +# config.log. We remove comments because anyway the quotes in there
  2879. +# would cause problems or look ugly.
  2880. +# WARNING: Use '\'' to represent an apostrophe within the trap.
  2881. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
  2882. +trap 'exit_status=$?
  2883. + # Save into config.log some information that might help in debugging.
  2884. + {
  2885. + echo
  2886. +
  2887. + $as_echo "## ---------------- ##
  2888. +## Cache variables. ##
  2889. +## ---------------- ##"
  2890. + echo
  2891. + # The following way of writing the cache mishandles newlines in values,
  2892. +(
  2893. + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
  2894. + eval ac_val=\$$ac_var
  2895. + case $ac_val in #(
  2896. + *${as_nl}*)
  2897. + case $ac_var in #(
  2898. + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
  2899. +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
  2900. + esac
  2901. + case $ac_var in #(
  2902. + _ | IFS | as_nl) ;; #(
  2903. + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
  2904. + *) { eval $ac_var=; unset $ac_var;} ;;
  2905. + esac ;;
  2906. + esac
  2907. + done
  2908. + (set) 2>&1 |
  2909. + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
  2910. + *${as_nl}ac_space=\ *)
  2911. + sed -n \
  2912. + "s/'\''/'\''\\\\'\'''\''/g;
  2913. + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
  2914. + ;; #(
  2915. + *)
  2916. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
  2917. + ;;
  2918. + esac |
  2919. + sort
  2920. +)
  2921. + echo
  2922. +
  2923. + $as_echo "## ----------------- ##
  2924. +## Output variables. ##
  2925. +## ----------------- ##"
  2926. + echo
  2927. + for ac_var in $ac_subst_vars
  2928. + do
  2929. + eval ac_val=\$$ac_var
  2930. + case $ac_val in
  2931. + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
  2932. + esac
  2933. + $as_echo "$ac_var='\''$ac_val'\''"
  2934. + done | sort
  2935. + echo
  2936. +
  2937. + if test -n "$ac_subst_files"; then
  2938. + $as_echo "## ------------------- ##
  2939. +## File substitutions. ##
  2940. +## ------------------- ##"
  2941. + echo
  2942. + for ac_var in $ac_subst_files
  2943. + do
  2944. + eval ac_val=\$$ac_var
  2945. + case $ac_val in
  2946. + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
  2947. + esac
  2948. + $as_echo "$ac_var='\''$ac_val'\''"
  2949. + done | sort
  2950. + echo
  2951. + fi
  2952. +
  2953. + if test -s confdefs.h; then
  2954. + $as_echo "## ----------- ##
  2955. +## confdefs.h. ##
  2956. +## ----------- ##"
  2957. + echo
  2958. + cat confdefs.h
  2959. + echo
  2960. + fi
  2961. + test "$ac_signal" != 0 &&
  2962. + $as_echo "$as_me: caught signal $ac_signal"
  2963. + $as_echo "$as_me: exit $exit_status"
  2964. + } >&5
  2965. + rm -f core *.core core.conftest.* &&
  2966. + rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
  2967. + exit $exit_status
  2968. +' 0
  2969. +for ac_signal in 1 2 13 15; do
  2970. + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
  2971. +done
  2972. +ac_signal=0
  2973. +
  2974. +# confdefs.h avoids OS command line length limits that DEFS can exceed.
  2975. +rm -f -r conftest* confdefs.h
  2976. +
  2977. +$as_echo "/* confdefs.h */" > confdefs.h
  2978. +
  2979. +# Predefined preprocessor variables.
  2980. +
  2981. +cat >>confdefs.h <<_ACEOF
  2982. +#define PACKAGE_NAME "$PACKAGE_NAME"
  2983. +_ACEOF
  2984. +
  2985. +cat >>confdefs.h <<_ACEOF
  2986. +#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
  2987. +_ACEOF
  2988. +
  2989. +cat >>confdefs.h <<_ACEOF
  2990. +#define PACKAGE_VERSION "$PACKAGE_VERSION"
  2991. +_ACEOF
  2992. +
  2993. +cat >>confdefs.h <<_ACEOF
  2994. +#define PACKAGE_STRING "$PACKAGE_STRING"
  2995. +_ACEOF
  2996. +
  2997. +cat >>confdefs.h <<_ACEOF
  2998. +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
  2999. +_ACEOF
  3000. +
  3001. +cat >>confdefs.h <<_ACEOF
  3002. +#define PACKAGE_URL "$PACKAGE_URL"
  3003. +_ACEOF
  3004. +
  3005. +
  3006. +# Let the site file select an alternate cache file if it wants to.
  3007. +# Prefer an explicitly selected file to automatically selected ones.
  3008. +ac_site_file1=NONE
  3009. +ac_site_file2=NONE
  3010. +if test -n "$CONFIG_SITE"; then
  3011. + # We do not want a PATH search for config.site.
  3012. + case $CONFIG_SITE in #((
  3013. + -*) ac_site_file1=./$CONFIG_SITE;;
  3014. + */*) ac_site_file1=$CONFIG_SITE;;
  3015. + *) ac_site_file1=./$CONFIG_SITE;;
  3016. + esac
  3017. +elif test "x$prefix" != xNONE; then
  3018. + ac_site_file1=$prefix/share/config.site
  3019. + ac_site_file2=$prefix/etc/config.site
  3020. +else
  3021. + ac_site_file1=$ac_default_prefix/share/config.site
  3022. + ac_site_file2=$ac_default_prefix/etc/config.site
  3023. +fi
  3024. +for ac_site_file in "$ac_site_file1" "$ac_site_file2"
  3025. +do
  3026. + test "x$ac_site_file" = xNONE && continue
  3027. + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
  3028. + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
  3029. +$as_echo "$as_me: loading site script $ac_site_file" >&6;}
  3030. + sed 's/^/| /' "$ac_site_file" >&5
  3031. + . "$ac_site_file" \
  3032. + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  3033. +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  3034. +as_fn_error $? "failed to load site script $ac_site_file
  3035. +See \`config.log' for more details" "$LINENO" 5; }
  3036. + fi
  3037. +done
  3038. +
  3039. +if test -r "$cache_file"; then
  3040. + # Some versions of bash will fail to source /dev/null (special files
  3041. + # actually), so we avoid doing that. DJGPP emulates it as a regular file.
  3042. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then
  3043. + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
  3044. +$as_echo "$as_me: loading cache $cache_file" >&6;}
  3045. + case $cache_file in
  3046. + [\\/]* | ?:[\\/]* ) . "$cache_file";;
  3047. + *) . "./$cache_file";;
  3048. + esac
  3049. + fi
  3050. +else
  3051. + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
  3052. +$as_echo "$as_me: creating cache $cache_file" >&6;}
  3053. + >$cache_file
  3054. +fi
  3055. +
  3056. +# Check that the precious variables saved in the cache have kept the same
  3057. +# value.
  3058. +ac_cache_corrupted=false
  3059. +for ac_var in $ac_precious_vars; do
  3060. + eval ac_old_set=\$ac_cv_env_${ac_var}_set
  3061. + eval ac_new_set=\$ac_env_${ac_var}_set
  3062. + eval ac_old_val=\$ac_cv_env_${ac_var}_value
  3063. + eval ac_new_val=\$ac_env_${ac_var}_value
  3064. + case $ac_old_set,$ac_new_set in
  3065. + set,)
  3066. + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
  3067. +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
  3068. + ac_cache_corrupted=: ;;
  3069. + ,set)
  3070. + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
  3071. +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
  3072. + ac_cache_corrupted=: ;;
  3073. + ,);;
  3074. + *)
  3075. + if test "x$ac_old_val" != "x$ac_new_val"; then
  3076. + # differences in whitespace do not lead to failure.
  3077. + ac_old_val_w=`echo x $ac_old_val`
  3078. + ac_new_val_w=`echo x $ac_new_val`
  3079. + if test "$ac_old_val_w" != "$ac_new_val_w"; then
  3080. + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
  3081. +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
  3082. + ac_cache_corrupted=:
  3083. + else
  3084. + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
  3085. +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
  3086. + eval $ac_var=\$ac_old_val
  3087. + fi
  3088. + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
  3089. +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
  3090. + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
  3091. +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
  3092. + fi;;
  3093. + esac
  3094. + # Pass precious variables to config.status.
  3095. + if test "$ac_new_set" = set; then
  3096. + case $ac_new_val in
  3097. + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
  3098. + *) ac_arg=$ac_var=$ac_new_val ;;
  3099. + esac
  3100. + case " $ac_configure_args " in
  3101. + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
  3102. + *) as_fn_append ac_configure_args " '$ac_arg'" ;;
  3103. + esac
  3104. + fi
  3105. +done
  3106. +if $ac_cache_corrupted; then
  3107. + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  3108. +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  3109. + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
  3110. +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
  3111. + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
  3112. +fi
  3113. +## -------------------- ##
  3114. +## Main body of script. ##
  3115. +## -------------------- ##
  3116. +
  3117. +ac_ext=c
  3118. +ac_cpp='$CPP $CPPFLAGS'
  3119. +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  3120. +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  3121. +ac_compiler_gnu=$ac_cv_c_compiler_gnu
  3122. +
  3123. +
  3124. +# This file contains common code used by all simulators.
  3125. +#
  3126. +# SIM_AC_COMMON invokes AC macros used by all simulators and by the common
  3127. +# directory. It is intended to be invoked before any target specific stuff.
  3128. +# SIM_AC_OUTPUT is a cover function to AC_OUTPUT to generate the Makefile.
  3129. +# It is intended to be invoked last.
  3130. +#
  3131. +# The simulator's configure.ac should look like:
  3132. +#
  3133. +# dnl Process this file with autoconf to produce a configure script.
  3134. +# AC_PREREQ(2.64)dnl
  3135. +# AC_INIT(Makefile.in)
  3136. +# sinclude(../common/aclocal.m4)
  3137. +#
  3138. +# SIM_AC_COMMON
  3139. +#
  3140. +# ... target specific stuff ...
  3141. +#
  3142. +# SIM_AC_OUTPUT
  3143. +
  3144. +# Include global overrides and fixes for Autoconf.
  3145. +
  3146. +
  3147. +
  3148. +
  3149. +
  3150. +
  3151. +
  3152. +
  3153. +
  3154. +
  3155. +
  3156. +
  3157. +
  3158. +
  3159. +
  3160. +
  3161. +
  3162. +
  3163. +
  3164. +
  3165. +
  3166. +
  3167. +
  3168. +
  3169. +
  3170. +
  3171. +
  3172. +
  3173. +
  3174. +
  3175. +
  3176. +
  3177. +
  3178. +
  3179. +
  3180. +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
  3181. +#
  3182. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
  3183. +# 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
  3184. +# Written by Gordon Matzigkeit, 1996
  3185. +#
  3186. +# This file is free software; the Free Software Foundation gives
  3187. +# unlimited permission to copy and/or distribute it, with or without
  3188. +# modifications, as long as this notice is preserved.
  3189. +
  3190. +
  3191. +
  3192. +# serial 56 LT_INIT
  3193. +
  3194. +
  3195. +# LT_PREREQ(VERSION)
  3196. +# ------------------
  3197. +# Complain and exit if this libtool version is less that VERSION.
  3198. +
  3199. +
  3200. +
  3201. +# _LT_CHECK_BUILDDIR
  3202. +# ------------------
  3203. +# Complain if the absolute build directory name contains unusual characters
  3204. +
  3205. +
  3206. +
  3207. +# LT_INIT([OPTIONS])
  3208. +# ------------------
  3209. +# LT_INIT
  3210. +
  3211. +# Old names:
  3212. +# This is what autoupdate's m4 run will expand. It fires
  3213. +# the warning (with _au_warn_XXX), outputs it into the
  3214. +# updated configure.ac (with AC_DIAGNOSE), and then outputs
  3215. +# the replacement expansion.
  3216. +
  3217. +
  3218. +# This is an auxiliary macro that is also run when
  3219. +# autoupdate runs m4. It simply calls m4_warning, but
  3220. +# we need a wrapper so that each warning is emitted only
  3221. +# once. We break the quoting in m4_warning's argument in
  3222. +# order to expand this macro's arguments, not AU_DEFUN's.
  3223. +
  3224. +
  3225. +# Finally, this is the expansion that is picked up by
  3226. +# autoconf. It tells the user to run autoupdate, and
  3227. +# then outputs the replacement expansion. We do not care
  3228. +# about autoupdate's warning because that contains
  3229. +# information on what to do *after* running autoupdate.
  3230. +
  3231. +# This is what autoupdate's m4 run will expand. It fires
  3232. +# the warning (with _au_warn_XXX), outputs it into the
  3233. +# updated configure.ac (with AC_DIAGNOSE), and then outputs
  3234. +# the replacement expansion.
  3235. +
  3236. +
  3237. +# This is an auxiliary macro that is also run when
  3238. +# autoupdate runs m4. It simply calls m4_warning, but
  3239. +# we need a wrapper so that each warning is emitted only
  3240. +# once. We break the quoting in m4_warning's argument in
  3241. +# order to expand this macro's arguments, not AU_DEFUN's.
  3242. +
  3243. +
  3244. +# Finally, this is the expansion that is picked up by
  3245. +# autoconf. It tells the user to run autoupdate, and
  3246. +# then outputs the replacement expansion. We do not care
  3247. +# about autoupdate's warning because that contains
  3248. +# information on what to do *after* running autoupdate.
  3249. +
  3250. +
  3251. +
  3252. +# _LT_CC_BASENAME(CC)
  3253. +# -------------------
  3254. +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
  3255. +
  3256. +
  3257. +
  3258. +# _LT_FILEUTILS_DEFAULTS
  3259. +# ----------------------
  3260. +# It is okay to use these file commands and assume they have been set
  3261. +# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
  3262. +# _LT_FILEUTILS_DEFAULTS
  3263. +
  3264. +
  3265. +# _LT_SETUP
  3266. +# ---------
  3267. +# _LT_SETUP
  3268. +
  3269. +
  3270. +# _LT_PREPARE_SED_QUOTE_VARS
  3271. +# --------------------------
  3272. +# Define a few sed substitution that help us do robust quoting.
  3273. +
  3274. +
  3275. +# _LT_PROG_LTMAIN
  3276. +# ---------------
  3277. +# Note that this code is called both from `configure', and `config.status'
  3278. +# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
  3279. +# `config.status' has no value for ac_aux_dir unless we are using Automake,
  3280. +# so we pass a copy along to make sure it has a sensible value anyway.
  3281. +# _LT_PROG_LTMAIN
  3282. +
  3283. +
  3284. +## ------------------------------------- ##
  3285. +## Accumulate code for creating libtool. ##
  3286. +## ------------------------------------- ##
  3287. +
  3288. +# So that we can recreate a full libtool script including additional
  3289. +# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
  3290. +# in macros and then make a single call at the end using the `libtool'
  3291. +# label.
  3292. +
  3293. +
  3294. +# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
  3295. +# ----------------------------------------
  3296. +# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  3297. +
  3298. +
  3299. +# Initialize.
  3300. +
  3301. +
  3302. +
  3303. +# _LT_CONFIG_LIBTOOL([COMMANDS])
  3304. +# ------------------------------
  3305. +# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  3306. +
  3307. +
  3308. +# Initialize.
  3309. +
  3310. +
  3311. +
  3312. +# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
  3313. +# -----------------------------------------------------
  3314. +
  3315. +
  3316. +
  3317. +# _LT_FORMAT_COMMENT([COMMENT])
  3318. +# -----------------------------
  3319. +# Add leading comment marks to the start of each line, and a trailing
  3320. +# full-stop to the whole comment if one is not present already.
  3321. +
  3322. +
  3323. +
  3324. +
  3325. +## ------------------------ ##
  3326. +## FIXME: Eliminate VARNAME ##
  3327. +## ------------------------ ##
  3328. +
  3329. +
  3330. +# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
  3331. +# -------------------------------------------------------------------
  3332. +# CONFIGNAME is the name given to the value in the libtool script.
  3333. +# VARNAME is the (base) name used in the configure script.
  3334. +# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
  3335. +# VARNAME. Any other value will be used directly.
  3336. +
  3337. +
  3338. +
  3339. +# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
  3340. +# --------------------------------------------------------
  3341. +
  3342. +
  3343. +
  3344. +# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
  3345. +# ------------------------------------------------
  3346. +
  3347. +
  3348. +
  3349. +# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
  3350. +# ---------------------------------------------------------
  3351. +
  3352. +
  3353. +
  3354. +# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
  3355. +# --------------------------------------------------
  3356. +
  3357. +
  3358. +
  3359. +# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
  3360. +# ---------------------------------------------------
  3361. +
  3362. +
  3363. +
  3364. +# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
  3365. +# ---------------------------------------------------
  3366. +
  3367. +
  3368. +
  3369. +
  3370. +# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
  3371. +# ------------------------------------------------
  3372. +
  3373. +
  3374. +
  3375. +
  3376. +# _LT_CONFIG_STATUS_DECLARE([VARNAME])
  3377. +# ------------------------------------
  3378. +# Quote a variable value, and forward it to `config.status' so that its
  3379. +# declaration there will have the same value as in `configure'. VARNAME
  3380. +# must have a single quote delimited value for this to work.
  3381. +
  3382. +
  3383. +
  3384. +# _LT_CONFIG_STATUS_DECLARATIONS
  3385. +# ------------------------------
  3386. +# We delimit libtool config variables with single quotes, so when
  3387. +# we write them to config.status, we have to be sure to quote all
  3388. +# embedded single quotes properly. In configure, this macro expands
  3389. +# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
  3390. +#
  3391. +# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
  3392. +
  3393. +
  3394. +
  3395. +# _LT_LIBTOOL_TAGS
  3396. +# ----------------
  3397. +# Output comment and list of tags supported by the script
  3398. +
  3399. +
  3400. +
  3401. +# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
  3402. +# -----------------------------------
  3403. +# Extract the dictionary values for VARNAME (optionally with TAG) and
  3404. +# expand to a commented shell variable setting:
  3405. +#
  3406. +# # Some comment about what VAR is for.
  3407. +# visible_name=$lt_internal_name
  3408. +
  3409. +
  3410. +
  3411. +# _LT_LIBTOOL_CONFIG_VARS
  3412. +# -----------------------
  3413. +# Produce commented declarations of non-tagged libtool config variables
  3414. +# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
  3415. +# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
  3416. +# section) are produced by _LT_LIBTOOL_TAG_VARS.
  3417. +
  3418. +
  3419. +
  3420. +# _LT_LIBTOOL_TAG_VARS(TAG)
  3421. +# -------------------------
  3422. +
  3423. +
  3424. +
  3425. +# _LT_TAGVAR(VARNAME, [TAGNAME])
  3426. +# ------------------------------
  3427. +
  3428. +
  3429. +
  3430. +# _LT_CONFIG_COMMANDS
  3431. +# -------------------
  3432. +# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
  3433. +# variables for single and double quote escaping we saved from calls
  3434. +# to _LT_DECL, we can put quote escaped variables declarations
  3435. +# into `config.status', and then the shell code to quote escape them in
  3436. +# for loops in `config.status'. Finally, any additional code accumulated
  3437. +# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
  3438. +#_LT_CONFIG_COMMANDS
  3439. +
  3440. +
  3441. +# Initialize.
  3442. +
  3443. +
  3444. +# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
  3445. +# ------------------------------------
  3446. +# Generate a child script FILE with all initialization necessary to
  3447. +# reuse the environment learned by the parent script, and make the
  3448. +# file executable. If COMMENT is supplied, it is inserted after the
  3449. +# `#!' sequence but before initialization text begins. After this
  3450. +# macro, additional text can be appended to FILE to form the body of
  3451. +# the child script. The macro ends with non-zero status if the
  3452. +# file could not be fully written (such as if the disk is full).
  3453. +# _LT_GENERATED_FILE_INIT
  3454. +
  3455. +# LT_OUTPUT
  3456. +# ---------
  3457. +# This macro allows early generation of the libtool script (before
  3458. +# AC_OUTPUT is called), incase it is used in configure for compilation
  3459. +# tests.
  3460. +# LT_OUTPUT
  3461. +
  3462. +
  3463. +# _LT_CONFIG(TAG)
  3464. +# ---------------
  3465. +# If TAG is the built-in tag, create an initial libtool script with a
  3466. +# default configuration from the untagged config vars. Otherwise add code
  3467. +# to config.status for appending the configuration named by TAG from the
  3468. +# matching tagged config vars.
  3469. +# _LT_CONFIG
  3470. +
  3471. +
  3472. +# LT_SUPPORTED_TAG(TAG)
  3473. +# ---------------------
  3474. +# Trace this macro to discover what tags are supported by the libtool
  3475. +# --tag option, using:
  3476. +# autoconf --trace 'LT_SUPPORTED_TAG:$1'
  3477. +
  3478. +
  3479. +
  3480. +# C support is built-in for now
  3481. +
  3482. +
  3483. +
  3484. +
  3485. +# LT_LANG(LANG)
  3486. +# -------------
  3487. +# Enable libtool support for the given language if not already enabled.
  3488. +# LT_LANG
  3489. +
  3490. +
  3491. +# _LT_LANG(LANGNAME)
  3492. +# ------------------
  3493. +# _LT_LANG
  3494. +
  3495. +
  3496. +# _LT_LANG_DEFAULT_CONFIG
  3497. +# -----------------------
  3498. +# _LT_LANG_DEFAULT_CONFIG
  3499. +
  3500. +# Obsolete macros:
  3501. +# This is what autoupdate's m4 run will expand. It fires
  3502. +# the warning (with _au_warn_XXX), outputs it into the
  3503. +# updated configure.ac (with AC_DIAGNOSE), and then outputs
  3504. +# the replacement expansion.
  3505. +
  3506. +
  3507. +# This is an auxiliary macro that is also run when
  3508. +# autoupdate runs m4. It simply calls m4_warning, but
  3509. +# we need a wrapper so that each warning is emitted only
  3510. +# once. We break the quoting in m4_warning's argument in
  3511. +# order to expand this macro's arguments, not AU_DEFUN's.
  3512. +
  3513. +
  3514. +# Finally, this is the expansion that is picked up by
  3515. +# autoconf. It tells the user to run autoupdate, and
  3516. +# then outputs the replacement expansion. We do not care
  3517. +# about autoupdate's warning because that contains
  3518. +# information on what to do *after* running autoupdate.
  3519. +
  3520. +# This is what autoupdate's m4 run will expand. It fires
  3521. +# the warning (with _au_warn_XXX), outputs it into the
  3522. +# updated configure.ac (with AC_DIAGNOSE), and then outputs
  3523. +# the replacement expansion.
  3524. +
  3525. +
  3526. +# This is an auxiliary macro that is also run when
  3527. +# autoupdate runs m4. It simply calls m4_warning, but
  3528. +# we need a wrapper so that each warning is emitted only
  3529. +# once. We break the quoting in m4_warning's argument in
  3530. +# order to expand this macro's arguments, not AU_DEFUN's.
  3531. +
  3532. +
  3533. +# Finally, this is the expansion that is picked up by
  3534. +# autoconf. It tells the user to run autoupdate, and
  3535. +# then outputs the replacement expansion. We do not care
  3536. +# about autoupdate's warning because that contains
  3537. +# information on what to do *after* running autoupdate.
  3538. +
  3539. +# This is what autoupdate's m4 run will expand. It fires
  3540. +# the warning (with _au_warn_XXX), outputs it into the
  3541. +# updated configure.ac (with AC_DIAGNOSE), and then outputs
  3542. +# the replacement expansion.
  3543. +
  3544. +
  3545. +# This is an auxiliary macro that is also run when
  3546. +# autoupdate runs m4. It simply calls m4_warning, but
  3547. +# we need a wrapper so that each warning is emitted only
  3548. +# once. We break the quoting in m4_warning's argument in
  3549. +# order to expand this macro's arguments, not AU_DEFUN's.
  3550. +
  3551. +
  3552. +# Finally, this is the expansion that is picked up by
  3553. +# autoconf. It tells the user to run autoupdate, and
  3554. +# then outputs the replacement expansion. We do not care
  3555. +# about autoupdate's warning because that contains
  3556. +# information on what to do *after* running autoupdate.
  3557. +
  3558. +# This is what autoupdate's m4 run will expand. It fires
  3559. +# the warning (with _au_warn_XXX), outputs it into the
  3560. +# updated configure.ac (with AC_DIAGNOSE), and then outputs
  3561. +# the replacement expansion.
  3562. +
  3563. +
  3564. +# This is an auxiliary macro that is also run when
  3565. +# autoupdate runs m4. It simply calls m4_warning, but
  3566. +# we need a wrapper so that each warning is emitted only
  3567. +# once. We break the quoting in m4_warning's argument in
  3568. +# order to expand this macro's arguments, not AU_DEFUN's.
  3569. +
  3570. +
  3571. +# Finally, this is the expansion that is picked up by
  3572. +# autoconf. It tells the user to run autoupdate, and
  3573. +# then outputs the replacement expansion. We do not care
  3574. +# about autoupdate's warning because that contains
  3575. +# information on what to do *after* running autoupdate.
  3576. +
  3577. +# This is what autoupdate's m4 run will expand. It fires
  3578. +# the warning (with _au_warn_XXX), outputs it into the
  3579. +# updated configure.ac (with AC_DIAGNOSE), and then outputs
  3580. +# the replacement expansion.
  3581. +
  3582. +
  3583. +# This is an auxiliary macro that is also run when
  3584. +# autoupdate runs m4. It simply calls m4_warning, but
  3585. +# we need a wrapper so that each warning is emitted only
  3586. +# once. We break the quoting in m4_warning's argument in
  3587. +# order to expand this macro's arguments, not AU_DEFUN's.
  3588. +
  3589. +
  3590. +# Finally, this is the expansion that is picked up by
  3591. +# autoconf. It tells the user to run autoupdate, and
  3592. +# then outputs the replacement expansion. We do not care
  3593. +# about autoupdate's warning because that contains
  3594. +# information on what to do *after* running autoupdate.
  3595. +
  3596. +
  3597. +
  3598. +# _LT_TAG_COMPILER
  3599. +# ----------------
  3600. +# _LT_TAG_COMPILER
  3601. +
  3602. +
  3603. +# _LT_COMPILER_BOILERPLATE
  3604. +# ------------------------
  3605. +# Check for compiler boilerplate output or warnings with
  3606. +# the simple compiler test code.
  3607. +# _LT_COMPILER_BOILERPLATE
  3608. +
  3609. +
  3610. +# _LT_LINKER_BOILERPLATE
  3611. +# ----------------------
  3612. +# Check for linker boilerplate output or warnings with
  3613. +# the simple link test code.
  3614. +# _LT_LINKER_BOILERPLATE
  3615. +
  3616. +# _LT_REQUIRED_DARWIN_CHECKS
  3617. +# -------------------------
  3618. +
  3619. +
  3620. +
  3621. +# _LT_DARWIN_LINKER_FEATURES
  3622. +# --------------------------
  3623. +# Checks for linker and compiler features on darwin
  3624. +
  3625. +
  3626. +# _LT_SYS_MODULE_PATH_AIX
  3627. +# -----------------------
  3628. +# Links a minimal program and checks the executable
  3629. +# for the system default hardcoded library path. In most cases,
  3630. +# this is /usr/lib:/lib, but when the MPI compilers are used
  3631. +# the location of the communication and MPI libs are included too.
  3632. +# If we don't find anything, use the default library path according
  3633. +# to the aix ld manual.
  3634. +# _LT_SYS_MODULE_PATH_AIX
  3635. +
  3636. +
  3637. +# _LT_SHELL_INIT(ARG)
  3638. +# -------------------
  3639. +# _LT_SHELL_INIT
  3640. +
  3641. +
  3642. +
  3643. +# _LT_PROG_ECHO_BACKSLASH
  3644. +# -----------------------
  3645. +# Find how we can fake an echo command that does not interpret backslash.
  3646. +# In particular, with Autoconf 2.60 or later we add some code to the start
  3647. +# of the generated configure script which will find a shell with a builtin
  3648. +# printf (which we can use as an echo command).
  3649. +# _LT_PROG_ECHO_BACKSLASH
  3650. +
  3651. +
  3652. +# _LT_ENABLE_LOCK
  3653. +# ---------------
  3654. +# _LT_ENABLE_LOCK
  3655. +
  3656. +
  3657. +# _LT_CMD_OLD_ARCHIVE
  3658. +# -------------------
  3659. +# _LT_CMD_OLD_ARCHIVE
  3660. +
  3661. +
  3662. +# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  3663. +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
  3664. +# ----------------------------------------------------------------
  3665. +# Check whether the given compiler option works
  3666. +# _LT_COMPILER_OPTION
  3667. +
  3668. +# Old name:
  3669. +# This is what autoupdate's m4 run will expand. It fires
  3670. +# the warning (with _au_warn_XXX), outputs it into the
  3671. +# updated configure.ac (with AC_DIAGNOSE), and then outputs
  3672. +# the replacement expansion.
  3673. +
  3674. +
  3675. +# This is an auxiliary macro that is also run when
  3676. +# autoupdate runs m4. It simply calls m4_warning, but
  3677. +# we need a wrapper so that each warning is emitted only
  3678. +# once. We break the quoting in m4_warning's argument in
  3679. +# order to expand this macro's arguments, not AU_DEFUN's.
  3680. +
  3681. +
  3682. +# Finally, this is the expansion that is picked up by
  3683. +# autoconf. It tells the user to run autoupdate, and
  3684. +# then outputs the replacement expansion. We do not care
  3685. +# about autoupdate's warning because that contains
  3686. +# information on what to do *after* running autoupdate.
  3687. +
  3688. +
  3689. +
  3690. +# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  3691. +# [ACTION-SUCCESS], [ACTION-FAILURE])
  3692. +# ----------------------------------------------------
  3693. +# Check whether the given linker option works
  3694. +# _LT_LINKER_OPTION
  3695. +
  3696. +# Old name:
  3697. +# This is what autoupdate's m4 run will expand. It fires
  3698. +# the warning (with _au_warn_XXX), outputs it into the
  3699. +# updated configure.ac (with AC_DIAGNOSE), and then outputs
  3700. +# the replacement expansion.
  3701. +
  3702. +
  3703. +# This is an auxiliary macro that is also run when
  3704. +# autoupdate runs m4. It simply calls m4_warning, but
  3705. +# we need a wrapper so that each warning is emitted only
  3706. +# once. We break the quoting in m4_warning's argument in
  3707. +# order to expand this macro's arguments, not AU_DEFUN's.
  3708. +
  3709. +
  3710. +# Finally, this is the expansion that is picked up by
  3711. +# autoconf. It tells the user to run autoupdate, and
  3712. +# then outputs the replacement expansion. We do not care
  3713. +# about autoupdate's warning because that contains
  3714. +# information on what to do *after* running autoupdate.
  3715. +
  3716. +
  3717. +
  3718. +# LT_CMD_MAX_LEN
  3719. +#---------------
  3720. +# LT_CMD_MAX_LEN
  3721. +
  3722. +# Old name:
  3723. +# This is what autoupdate's m4 run will expand. It fires
  3724. +# the warning (with _au_warn_XXX), outputs it into the
  3725. +# updated configure.ac (with AC_DIAGNOSE), and then outputs
  3726. +# the replacement expansion.
  3727. +
  3728. +
  3729. +# This is an auxiliary macro that is also run when
  3730. +# autoupdate runs m4. It simply calls m4_warning, but
  3731. +# we need a wrapper so that each warning is emitted only
  3732. +# once. We break the quoting in m4_warning's argument in
  3733. +# order to expand this macro's arguments, not AU_DEFUN's.
  3734. +
  3735. +
  3736. +# Finally, this is the expansion that is picked up by
  3737. +# autoconf. It tells the user to run autoupdate, and
  3738. +# then outputs the replacement expansion. We do not care
  3739. +# about autoupdate's warning because that contains
  3740. +# information on what to do *after* running autoupdate.
  3741. +
  3742. +
  3743. +
  3744. +# _LT_HEADER_DLFCN
  3745. +# ----------------
  3746. +# _LT_HEADER_DLFCN
  3747. +
  3748. +
  3749. +# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
  3750. +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
  3751. +# ----------------------------------------------------------------
  3752. +# _LT_TRY_DLOPEN_SELF
  3753. +
  3754. +
  3755. +# LT_SYS_DLOPEN_SELF
  3756. +# ------------------
  3757. +# LT_SYS_DLOPEN_SELF
  3758. +
  3759. +# Old name:
  3760. +# This is what autoupdate's m4 run will expand. It fires
  3761. +# the warning (with _au_warn_XXX), outputs it into the
  3762. +# updated configure.ac (with AC_DIAGNOSE), and then outputs
  3763. +# the replacement expansion.
  3764. +
  3765. +
  3766. +# This is an auxiliary macro that is also run when
  3767. +# autoupdate runs m4. It simply calls m4_warning, but
  3768. +# we need a wrapper so that each warning is emitted only
  3769. +# once. We break the quoting in m4_warning's argument in
  3770. +# order to expand this macro's arguments, not AU_DEFUN's.
  3771. +
  3772. +
  3773. +# Finally, this is the expansion that is picked up by
  3774. +# autoconf. It tells the user to run autoupdate, and
  3775. +# then outputs the replacement expansion. We do not care
  3776. +# about autoupdate's warning because that contains
  3777. +# information on what to do *after* running autoupdate.
  3778. +
  3779. +
  3780. +
  3781. +# _LT_COMPILER_C_O([TAGNAME])
  3782. +# ---------------------------
  3783. +# Check to see if options -c and -o are simultaneously supported by compiler.
  3784. +# This macro does not hard code the compiler like AC_PROG_CC_C_O.
  3785. +# _LT_COMPILER_C_O
  3786. +
  3787. +
  3788. +# _LT_COMPILER_FILE_LOCKS([TAGNAME])
  3789. +# ----------------------------------
  3790. +# Check to see if we can do hard links to lock some files if needed
  3791. +# _LT_COMPILER_FILE_LOCKS
  3792. +
  3793. +
  3794. +# _LT_CHECK_OBJDIR
  3795. +# ----------------
  3796. +# _LT_CHECK_OBJDIR
  3797. +
  3798. +
  3799. +# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
  3800. +# --------------------------------------
  3801. +# Check hardcoding attributes.
  3802. +# _LT_LINKER_HARDCODE_LIBPATH
  3803. +
  3804. +
  3805. +# _LT_CMD_STRIPLIB
  3806. +# ----------------
  3807. +# _LT_CMD_STRIPLIB
  3808. +
  3809. +
  3810. +# _LT_SYS_DYNAMIC_LINKER([TAG])
  3811. +# -----------------------------
  3812. +# PORTME Fill in your ld.so characteristics
  3813. +# _LT_SYS_DYNAMIC_LINKER
  3814. +
  3815. +
  3816. +# _LT_PATH_TOOL_PREFIX(TOOL)
  3817. +# --------------------------
  3818. +# find a file program which can recognize shared library
  3819. +# _LT_PATH_TOOL_PREFIX
  3820. +
  3821. +# Old name:
  3822. +# This is what autoupdate's m4 run will expand. It fires
  3823. +# the warning (with _au_warn_XXX), outputs it into the
  3824. +# updated configure.ac (with AC_DIAGNOSE), and then outputs
  3825. +# the replacement expansion.
  3826. +
  3827. +
  3828. +# This is an auxiliary macro that is also run when
  3829. +# autoupdate runs m4. It simply calls m4_warning, but
  3830. +# we need a wrapper so that each warning is emitted only
  3831. +# once. We break the quoting in m4_warning's argument in
  3832. +# order to expand this macro's arguments, not AU_DEFUN's.
  3833. +
  3834. +
  3835. +# Finally, this is the expansion that is picked up by
  3836. +# autoconf. It tells the user to run autoupdate, and
  3837. +# then outputs the replacement expansion. We do not care
  3838. +# about autoupdate's warning because that contains
  3839. +# information on what to do *after* running autoupdate.
  3840. +
  3841. +
  3842. +
  3843. +# _LT_PATH_MAGIC
  3844. +# --------------
  3845. +# find a file program which can recognize a shared library
  3846. +# _LT_PATH_MAGIC
  3847. +
  3848. +
  3849. +# LT_PATH_LD
  3850. +# ----------
  3851. +# find the pathname to the GNU or non-GNU linker
  3852. +# LT_PATH_LD
  3853. +
  3854. +# Old names:
  3855. +# This is what autoupdate's m4 run will expand. It fires
  3856. +# the warning (with _au_warn_XXX), outputs it into the
  3857. +# updated configure.ac (with AC_DIAGNOSE), and then outputs
  3858. +# the replacement expansion.
  3859. +
  3860. +
  3861. +# This is an auxiliary macro that is also run when
  3862. +# autoupdate runs m4. It simply calls m4_warning, but
  3863. +# we need a wrapper so that each warning is emitted only
  3864. +# once. We break the quoting in m4_warning's argument in
  3865. +# order to expand this macro's arguments, not AU_DEFUN's.
  3866. +
  3867. +
  3868. +# Finally, this is the expansion that is picked up by
  3869. +# autoconf. It tells the user to run autoupdate, and
  3870. +# then outputs the replacement expansion. We do not care
  3871. +# about autoupdate's warning because that contains
  3872. +# information on what to do *after* running autoupdate.
  3873. +
  3874. +# This is what autoupdate's m4 run will expand. It fires
  3875. +# the warning (with _au_warn_XXX), outputs it into the
  3876. +# updated configure.ac (with AC_DIAGNOSE), and then outputs
  3877. +# the replacement expansion.
  3878. +
  3879. +
  3880. +# This is an auxiliary macro that is also run when
  3881. +# autoupdate runs m4. It simply calls m4_warning, but
  3882. +# we need a wrapper so that each warning is emitted only
  3883. +# once. We break the quoting in m4_warning's argument in
  3884. +# order to expand this macro's arguments, not AU_DEFUN's.
  3885. +
  3886. +
  3887. +# Finally, this is the expansion that is picked up by
  3888. +# autoconf. It tells the user to run autoupdate, and
  3889. +# then outputs the replacement expansion. We do not care
  3890. +# about autoupdate's warning because that contains
  3891. +# information on what to do *after* running autoupdate.
  3892. +
  3893. +
  3894. +
  3895. +# _LT_PATH_LD_GNU
  3896. +#- --------------
  3897. +# _LT_PATH_LD_GNU
  3898. +
  3899. +
  3900. +# _LT_CMD_RELOAD
  3901. +# --------------
  3902. +# find reload flag for linker
  3903. +# -- PORTME Some linkers may need a different reload flag.
  3904. +# _LT_CMD_RELOAD
  3905. +
  3906. +
  3907. +# _LT_CHECK_MAGIC_METHOD
  3908. +# ----------------------
  3909. +# how to check for library dependencies
  3910. +# -- PORTME fill in with the dynamic library characteristics
  3911. +# _LT_CHECK_MAGIC_METHOD
  3912. +
  3913. +
  3914. +# LT_PATH_NM
  3915. +# ----------
  3916. +# find the pathname to a BSD- or MS-compatible name lister
  3917. +# LT_PATH_NM
  3918. +
  3919. +# Old names:
  3920. +# This is what autoupdate's m4 run will expand. It fires
  3921. +# the warning (with _au_warn_XXX), outputs it into the
  3922. +# updated configure.ac (with AC_DIAGNOSE), and then outputs
  3923. +# the replacement expansion.
  3924. +
  3925. +
  3926. +# This is an auxiliary macro that is also run when
  3927. +# autoupdate runs m4. It simply calls m4_warning, but
  3928. +# we need a wrapper so that each warning is emitted only
  3929. +# once. We break the quoting in m4_warning's argument in
  3930. +# order to expand this macro's arguments, not AU_DEFUN's.
  3931. +
  3932. +
  3933. +# Finally, this is the expansion that is picked up by
  3934. +# autoconf. It tells the user to run autoupdate, and
  3935. +# then outputs the replacement expansion. We do not care
  3936. +# about autoupdate's warning because that contains
  3937. +# information on what to do *after* running autoupdate.
  3938. +
  3939. +# This is what autoupdate's m4 run will expand. It fires
  3940. +# the warning (with _au_warn_XXX), outputs it into the
  3941. +# updated configure.ac (with AC_DIAGNOSE), and then outputs
  3942. +# the replacement expansion.
  3943. +
  3944. +
  3945. +# This is an auxiliary macro that is also run when
  3946. +# autoupdate runs m4. It simply calls m4_warning, but
  3947. +# we need a wrapper so that each warning is emitted only
  3948. +# once. We break the quoting in m4_warning's argument in
  3949. +# order to expand this macro's arguments, not AU_DEFUN's.
  3950. +
  3951. +
  3952. +# Finally, this is the expansion that is picked up by
  3953. +# autoconf. It tells the user to run autoupdate, and
  3954. +# then outputs the replacement expansion. We do not care
  3955. +# about autoupdate's warning because that contains
  3956. +# information on what to do *after* running autoupdate.
  3957. +
  3958. +
  3959. +
  3960. +# LT_LIB_M
  3961. +# --------
  3962. +# check for math library
  3963. +# LT_LIB_M
  3964. +
  3965. +# Old name:
  3966. +# This is what autoupdate's m4 run will expand. It fires
  3967. +# the warning (with _au_warn_XXX), outputs it into the
  3968. +# updated configure.ac (with AC_DIAGNOSE), and then outputs
  3969. +# the replacement expansion.
  3970. +
  3971. +
  3972. +# This is an auxiliary macro that is also run when
  3973. +# autoupdate runs m4. It simply calls m4_warning, but
  3974. +# we need a wrapper so that each warning is emitted only
  3975. +# once. We break the quoting in m4_warning's argument in
  3976. +# order to expand this macro's arguments, not AU_DEFUN's.
  3977. +
  3978. +
  3979. +# Finally, this is the expansion that is picked up by
  3980. +# autoconf. It tells the user to run autoupdate, and
  3981. +# then outputs the replacement expansion. We do not care
  3982. +# about autoupdate's warning because that contains
  3983. +# information on what to do *after* running autoupdate.
  3984. +
  3985. +
  3986. +
  3987. +# _LT_COMPILER_NO_RTTI([TAGNAME])
  3988. +# -------------------------------
  3989. +# _LT_COMPILER_NO_RTTI
  3990. +
  3991. +
  3992. +# _LT_CMD_GLOBAL_SYMBOLS
  3993. +# ----------------------
  3994. + # _LT_CMD_GLOBAL_SYMBOLS
  3995. +
  3996. +
  3997. +# _LT_COMPILER_PIC([TAGNAME])
  3998. +# ---------------------------
  3999. +# _LT_COMPILER_PIC
  4000. +
  4001. +
  4002. +# _LT_LINKER_SHLIBS([TAGNAME])
  4003. +# ----------------------------
  4004. +# See if the linker supports building shared libraries.
  4005. +# _LT_LINKER_SHLIBS
  4006. +
  4007. +
  4008. +# _LT_LANG_C_CONFIG([TAG])
  4009. +# ------------------------
  4010. +# Ensure that the configuration variables for a C compiler are suitably
  4011. +# defined. These variables are subsequently used by _LT_CONFIG to write
  4012. +# the compiler configuration to `libtool'.
  4013. +# _LT_LANG_C_CONFIG
  4014. +
  4015. +
  4016. +# _LT_LANG_CXX_CONFIG([TAG])
  4017. +# --------------------------
  4018. +# Ensure that the configuration variables for a C++ compiler are suitably
  4019. +# defined. These variables are subsequently used by _LT_CONFIG to write
  4020. +# the compiler configuration to `libtool'.
  4021. +# _LT_LANG_CXX_CONFIG
  4022. +
  4023. +
  4024. +# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
  4025. +# ---------------------------------
  4026. +# Figure out "hidden" library dependencies from verbose
  4027. +# compiler output when linking a shared library.
  4028. +# Parse the compiler output and extract the necessary
  4029. +# objects, libraries and library flags.
  4030. +# _LT_SYS_HIDDEN_LIBDEPS
  4031. +
  4032. +
  4033. +# _LT_LANG_F77_CONFIG([TAG])
  4034. +# --------------------------
  4035. +# Ensure that the configuration variables for a Fortran 77 compiler are
  4036. +# suitably defined. These variables are subsequently used by _LT_CONFIG
  4037. +# to write the compiler configuration to `libtool'.
  4038. +# _LT_LANG_F77_CONFIG
  4039. +
  4040. +
  4041. +# _LT_LANG_FC_CONFIG([TAG])
  4042. +# -------------------------
  4043. +# Ensure that the configuration variables for a Fortran compiler are
  4044. +# suitably defined. These variables are subsequently used by _LT_CONFIG
  4045. +# to write the compiler configuration to `libtool'.
  4046. +# _LT_LANG_FC_CONFIG
  4047. +
  4048. +
  4049. +# _LT_LANG_GCJ_CONFIG([TAG])
  4050. +# --------------------------
  4051. +# Ensure that the configuration variables for the GNU Java Compiler compiler
  4052. +# are suitably defined. These variables are subsequently used by _LT_CONFIG
  4053. +# to write the compiler configuration to `libtool'.
  4054. +# _LT_LANG_GCJ_CONFIG
  4055. +
  4056. +
  4057. +# _LT_LANG_RC_CONFIG([TAG])
  4058. +# -------------------------
  4059. +# Ensure that the configuration variables for the Windows resource compiler
  4060. +# are suitably defined. These variables are subsequently used by _LT_CONFIG
  4061. +# to write the compiler configuration to `libtool'.
  4062. +# _LT_LANG_RC_CONFIG
  4063. +
  4064. +
  4065. +# LT_PROG_GCJ
  4066. +# -----------
  4067. +
  4068. +
  4069. +# Old name:
  4070. +# This is what autoupdate's m4 run will expand. It fires
  4071. +# the warning (with _au_warn_XXX), outputs it into the
  4072. +# updated configure.ac (with AC_DIAGNOSE), and then outputs
  4073. +# the replacement expansion.
  4074. +
  4075. +
  4076. +# This is an auxiliary macro that is also run when
  4077. +# autoupdate runs m4. It simply calls m4_warning, but
  4078. +# we need a wrapper so that each warning is emitted only
  4079. +# once. We break the quoting in m4_warning's argument in
  4080. +# order to expand this macro's arguments, not AU_DEFUN's.
  4081. +
  4082. +
  4083. +# Finally, this is the expansion that is picked up by
  4084. +# autoconf. It tells the user to run autoupdate, and
  4085. +# then outputs the replacement expansion. We do not care
  4086. +# about autoupdate's warning because that contains
  4087. +# information on what to do *after* running autoupdate.
  4088. +
  4089. +
  4090. +
  4091. +# LT_PROG_RC
  4092. +# ----------
  4093. +
  4094. +
  4095. +# Old name:
  4096. +# This is what autoupdate's m4 run will expand. It fires
  4097. +# the warning (with _au_warn_XXX), outputs it into the
  4098. +# updated configure.ac (with AC_DIAGNOSE), and then outputs
  4099. +# the replacement expansion.
  4100. +
  4101. +
  4102. +# This is an auxiliary macro that is also run when
  4103. +# autoupdate runs m4. It simply calls m4_warning, but
  4104. +# we need a wrapper so that each warning is emitted only
  4105. +# once. We break the quoting in m4_warning's argument in
  4106. +# order to expand this macro's arguments, not AU_DEFUN's.
  4107. +
  4108. +
  4109. +# Finally, this is the expansion that is picked up by
  4110. +# autoconf. It tells the user to run autoupdate, and
  4111. +# then outputs the replacement expansion. We do not care
  4112. +# about autoupdate's warning because that contains
  4113. +# information on what to do *after* running autoupdate.
  4114. +
  4115. +
  4116. +
  4117. +# _LT_DECL_EGREP
  4118. +# --------------
  4119. +# If we don't have a new enough Autoconf to choose the best grep
  4120. +# available, choose the one first in the user's PATH.
  4121. +
  4122. +
  4123. +
  4124. +# _LT_DECL_OBJDUMP
  4125. +# --------------
  4126. +# If we don't have a new enough Autoconf to choose the best objdump
  4127. +# available, choose the one first in the user's PATH.
  4128. +
  4129. +
  4130. +
  4131. +# _LT_DECL_SED
  4132. +# ------------
  4133. +# Check for a fully-functional sed program, that truncates
  4134. +# as few characters as possible. Prefer GNU sed if found.
  4135. +# _LT_DECL_SED
  4136. +
  4137. +#m4_ifndef
  4138. +
  4139. +# Old name:
  4140. +# This is what autoupdate's m4 run will expand. It fires
  4141. +# the warning (with _au_warn_XXX), outputs it into the
  4142. +# updated configure.ac (with AC_DIAGNOSE), and then outputs
  4143. +# the replacement expansion.
  4144. +
  4145. +
  4146. +# This is an auxiliary macro that is also run when
  4147. +# autoupdate runs m4. It simply calls m4_warning, but
  4148. +# we need a wrapper so that each warning is emitted only
  4149. +# once. We break the quoting in m4_warning's argument in
  4150. +# order to expand this macro's arguments, not AU_DEFUN's.
  4151. +
  4152. +
  4153. +# Finally, this is the expansion that is picked up by
  4154. +# autoconf. It tells the user to run autoupdate, and
  4155. +# then outputs the replacement expansion. We do not care
  4156. +# about autoupdate's warning because that contains
  4157. +# information on what to do *after* running autoupdate.
  4158. +
  4159. +
  4160. +
  4161. +# _LT_CHECK_SHELL_FEATURES
  4162. +# ------------------------
  4163. +# Find out whether the shell is Bourne or XSI compatible,
  4164. +# or has some other useful features.
  4165. +# _LT_CHECK_SHELL_FEATURES
  4166. +
  4167. +
  4168. +# _LT_PROG_XSI_SHELLFNS
  4169. +# ---------------------
  4170. +# Bourne and XSI compatible variants of some useful shell functions.
  4171. +
  4172. +
  4173. +# Helper functions for option handling. -*- Autoconf -*-
  4174. +#
  4175. +# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
  4176. +# Inc.
  4177. +# Written by Gary V. Vaughan, 2004
  4178. +#
  4179. +# This file is free software; the Free Software Foundation gives
  4180. +# unlimited permission to copy and/or distribute it, with or without
  4181. +# modifications, as long as this notice is preserved.
  4182. +
  4183. +# serial 6 ltoptions.m4
  4184. +
  4185. +# This is to help aclocal find these macros, as it can't see m4_define.
  4186. +
  4187. +
  4188. +
  4189. +# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
  4190. +# ------------------------------------------
  4191. +
  4192. +
  4193. +
  4194. +# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
  4195. +# ---------------------------------------
  4196. +# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
  4197. +# matching handler defined, dispatch to it. Other OPTION-NAMEs are
  4198. +# saved as a flag.
  4199. +
  4200. +
  4201. +
  4202. +# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
  4203. +# ------------------------------------------------------------
  4204. +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  4205. +
  4206. +
  4207. +
  4208. +# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
  4209. +# -------------------------------------------------------
  4210. +# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
  4211. +# are set.
  4212. +
  4213. +
  4214. +
  4215. +# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
  4216. +# ----------------------------------------
  4217. +# OPTION-LIST is a space-separated list of Libtool options associated
  4218. +# with MACRO-NAME. If any OPTION has a matching handler declared with
  4219. +# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
  4220. +# the unknown option and exit.
  4221. +# _LT_SET_OPTIONS
  4222. +
  4223. +
  4224. +## --------------------------------- ##
  4225. +## Macros to handle LT_INIT options. ##
  4226. +## --------------------------------- ##
  4227. +
  4228. +# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
  4229. +# -----------------------------------------
  4230. +
  4231. +
  4232. +
  4233. +# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
  4234. +# -----------------------------------------------
  4235. +# LT_OPTION_DEFINE
  4236. +
  4237. +
  4238. +# dlopen
  4239. +# ------
  4240. +
  4241. +
  4242. +# This is what autoupdate's m4 run will expand. It fires
  4243. +# the warning (with _au_warn_XXX), outputs it into the
  4244. +# updated configure.ac (with AC_DIAGNOSE), and then outputs
  4245. +# the replacement expansion.
  4246. +
  4247. +
  4248. +# This is an auxiliary macro that is also run when
  4249. +# autoupdate runs m4. It simply calls m4_warning, but
  4250. +# we need a wrapper so that each warning is emitted only
  4251. +# once. We break the quoting in m4_warning's argument in
  4252. +# order to expand this macro's arguments, not AU_DEFUN's.
  4253. +
  4254. +
  4255. +# Finally, this is the expansion that is picked up by
  4256. +# autoconf. It tells the user to run autoupdate, and
  4257. +# then outputs the replacement expansion. We do not care
  4258. +# about autoupdate's warning because that contains
  4259. +# information on what to do *after* running autoupdate.
  4260. +
  4261. +
  4262. +
  4263. +
  4264. +# win32-dll
  4265. +# ---------
  4266. +# Declare package support for building win32 dll's.
  4267. +# win32-dll
  4268. +
  4269. +# This is what autoupdate's m4 run will expand. It fires
  4270. +# the warning (with _au_warn_XXX), outputs it into the
  4271. +# updated configure.ac (with AC_DIAGNOSE), and then outputs
  4272. +# the replacement expansion.
  4273. +
  4274. +
  4275. +# This is an auxiliary macro that is also run when
  4276. +# autoupdate runs m4. It simply calls m4_warning, but
  4277. +# we need a wrapper so that each warning is emitted only
  4278. +# once. We break the quoting in m4_warning's argument in
  4279. +# order to expand this macro's arguments, not AU_DEFUN's.
  4280. +
  4281. +
  4282. +# Finally, this is the expansion that is picked up by
  4283. +# autoconf. It tells the user to run autoupdate, and
  4284. +# then outputs the replacement expansion. We do not care
  4285. +# about autoupdate's warning because that contains
  4286. +# information on what to do *after* running autoupdate.
  4287. +
  4288. +
  4289. +
  4290. +
  4291. +# _LT_ENABLE_SHARED([DEFAULT])
  4292. +# ----------------------------
  4293. +# implement the --enable-shared flag, and supports the `shared' and
  4294. +# `disable-shared' LT_INIT options.
  4295. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  4296. +# _LT_ENABLE_SHARED
  4297. +
  4298. +
  4299. +
  4300. +
  4301. +# Old names:
  4302. +
  4303. +
  4304. +
  4305. +
  4306. +# This is what autoupdate's m4 run will expand. It fires
  4307. +# the warning (with _au_warn_XXX), outputs it into the
  4308. +# updated configure.ac (with AC_DIAGNOSE), and then outputs
  4309. +# the replacement expansion.
  4310. +
  4311. +
  4312. +# This is an auxiliary macro that is also run when
  4313. +# autoupdate runs m4. It simply calls m4_warning, but
  4314. +# we need a wrapper so that each warning is emitted only
  4315. +# once. We break the quoting in m4_warning's argument in
  4316. +# order to expand this macro's arguments, not AU_DEFUN's.
  4317. +
  4318. +
  4319. +# Finally, this is the expansion that is picked up by
  4320. +# autoconf. It tells the user to run autoupdate, and
  4321. +# then outputs the replacement expansion. We do not care
  4322. +# about autoupdate's warning because that contains
  4323. +# information on what to do *after* running autoupdate.
  4324. +
  4325. +# This is what autoupdate's m4 run will expand. It fires
  4326. +# the warning (with _au_warn_XXX), outputs it into the
  4327. +# updated configure.ac (with AC_DIAGNOSE), and then outputs
  4328. +# the replacement expansion.
  4329. +
  4330. +
  4331. +# This is an auxiliary macro that is also run when
  4332. +# autoupdate runs m4. It simply calls m4_warning, but
  4333. +# we need a wrapper so that each warning is emitted only
  4334. +# once. We break the quoting in m4_warning's argument in
  4335. +# order to expand this macro's arguments, not AU_DEFUN's.
  4336. +
  4337. +
  4338. +# Finally, this is the expansion that is picked up by
  4339. +# autoconf. It tells the user to run autoupdate, and
  4340. +# then outputs the replacement expansion. We do not care
  4341. +# about autoupdate's warning because that contains
  4342. +# information on what to do *after* running autoupdate.
  4343. +
  4344. +
  4345. +
  4346. +
  4347. +
  4348. +# _LT_ENABLE_STATIC([DEFAULT])
  4349. +# ----------------------------
  4350. +# implement the --enable-static flag, and support the `static' and
  4351. +# `disable-static' LT_INIT options.
  4352. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  4353. +# _LT_ENABLE_STATIC
  4354. +
  4355. +
  4356. +
  4357. +
  4358. +# Old names:
  4359. +
  4360. +
  4361. +
  4362. +
  4363. +# This is what autoupdate's m4 run will expand. It fires
  4364. +# the warning (with _au_warn_XXX), outputs it into the
  4365. +# updated configure.ac (with AC_DIAGNOSE), and then outputs
  4366. +# the replacement expansion.
  4367. +
  4368. +
  4369. +# This is an auxiliary macro that is also run when
  4370. +# autoupdate runs m4. It simply calls m4_warning, but
  4371. +# we need a wrapper so that each warning is emitted only
  4372. +# once. We break the quoting in m4_warning's argument in
  4373. +# order to expand this macro's arguments, not AU_DEFUN's.
  4374. +
  4375. +
  4376. +# Finally, this is the expansion that is picked up by
  4377. +# autoconf. It tells the user to run autoupdate, and
  4378. +# then outputs the replacement expansion. We do not care
  4379. +# about autoupdate's warning because that contains
  4380. +# information on what to do *after* running autoupdate.
  4381. +
  4382. +# This is what autoupdate's m4 run will expand. It fires
  4383. +# the warning (with _au_warn_XXX), outputs it into the
  4384. +# updated configure.ac (with AC_DIAGNOSE), and then outputs
  4385. +# the replacement expansion.
  4386. +
  4387. +
  4388. +# This is an auxiliary macro that is also run when
  4389. +# autoupdate runs m4. It simply calls m4_warning, but
  4390. +# we need a wrapper so that each warning is emitted only
  4391. +# once. We break the quoting in m4_warning's argument in
  4392. +# order to expand this macro's arguments, not AU_DEFUN's.
  4393. +
  4394. +
  4395. +# Finally, this is the expansion that is picked up by
  4396. +# autoconf. It tells the user to run autoupdate, and
  4397. +# then outputs the replacement expansion. We do not care
  4398. +# about autoupdate's warning because that contains
  4399. +# information on what to do *after* running autoupdate.
  4400. +
  4401. +
  4402. +
  4403. +
  4404. +
  4405. +# _LT_ENABLE_FAST_INSTALL([DEFAULT])
  4406. +# ----------------------------------
  4407. +# implement the --enable-fast-install flag, and support the `fast-install'
  4408. +# and `disable-fast-install' LT_INIT options.
  4409. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  4410. +# _LT_ENABLE_FAST_INSTALL
  4411. +
  4412. +
  4413. +
  4414. +
  4415. +# Old names:
  4416. +# This is what autoupdate's m4 run will expand. It fires
  4417. +# the warning (with _au_warn_XXX), outputs it into the
  4418. +# updated configure.ac (with AC_DIAGNOSE), and then outputs
  4419. +# the replacement expansion.
  4420. +
  4421. +
  4422. +# This is an auxiliary macro that is also run when
  4423. +# autoupdate runs m4. It simply calls m4_warning, but
  4424. +# we need a wrapper so that each warning is emitted only
  4425. +# once. We break the quoting in m4_warning's argument in
  4426. +# order to expand this macro's arguments, not AU_DEFUN's.
  4427. +
  4428. +
  4429. +# Finally, this is the expansion that is picked up by
  4430. +# autoconf. It tells the user to run autoupdate, and
  4431. +# then outputs the replacement expansion. We do not care
  4432. +# about autoupdate's warning because that contains
  4433. +# information on what to do *after* running autoupdate.
  4434. +
  4435. +
  4436. +# This is what autoupdate's m4 run will expand. It fires
  4437. +# the warning (with _au_warn_XXX), outputs it into the
  4438. +# updated configure.ac (with AC_DIAGNOSE), and then outputs
  4439. +# the replacement expansion.
  4440. +
  4441. +
  4442. +# This is an auxiliary macro that is also run when
  4443. +# autoupdate runs m4. It simply calls m4_warning, but
  4444. +# we need a wrapper so that each warning is emitted only
  4445. +# once. We break the quoting in m4_warning's argument in
  4446. +# order to expand this macro's arguments, not AU_DEFUN's.
  4447. +
  4448. +
  4449. +# Finally, this is the expansion that is picked up by
  4450. +# autoconf. It tells the user to run autoupdate, and
  4451. +# then outputs the replacement expansion. We do not care
  4452. +# about autoupdate's warning because that contains
  4453. +# information on what to do *after* running autoupdate.
  4454. +
  4455. +
  4456. +
  4457. +
  4458. +# _LT_WITH_PIC([MODE])
  4459. +# --------------------
  4460. +# implement the --with-pic flag, and support the `pic-only' and `no-pic'
  4461. +# LT_INIT options.
  4462. +# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
  4463. +# _LT_WITH_PIC
  4464. +
  4465. +
  4466. +
  4467. +
  4468. +# Old name:
  4469. +# This is what autoupdate's m4 run will expand. It fires
  4470. +# the warning (with _au_warn_XXX), outputs it into the
  4471. +# updated configure.ac (with AC_DIAGNOSE), and then outputs
  4472. +# the replacement expansion.
  4473. +
  4474. +
  4475. +# This is an auxiliary macro that is also run when
  4476. +# autoupdate runs m4. It simply calls m4_warning, but
  4477. +# we need a wrapper so that each warning is emitted only
  4478. +# once. We break the quoting in m4_warning's argument in
  4479. +# order to expand this macro's arguments, not AU_DEFUN's.
  4480. +
  4481. +
  4482. +# Finally, this is the expansion that is picked up by
  4483. +# autoconf. It tells the user to run autoupdate, and
  4484. +# then outputs the replacement expansion. We do not care
  4485. +# about autoupdate's warning because that contains
  4486. +# information on what to do *after* running autoupdate.
  4487. +
  4488. +
  4489. +
  4490. +## ----------------- ##
  4491. +## LTDL_INIT Options ##
  4492. +## ----------------- ##
  4493. +
  4494. +
  4495. +
  4496. +
  4497. +
  4498. +
  4499. +
  4500. +
  4501. +
  4502. +
  4503. +# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
  4504. +#
  4505. +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
  4506. +# Written by Gary V. Vaughan, 2004
  4507. +#
  4508. +# This file is free software; the Free Software Foundation gives
  4509. +# unlimited permission to copy and/or distribute it, with or without
  4510. +# modifications, as long as this notice is preserved.
  4511. +
  4512. +# serial 6 ltsugar.m4
  4513. +
  4514. +# This is to help aclocal find these macros, as it can't see m4_define.
  4515. +
  4516. +
  4517. +
  4518. +# lt_join(SEP, ARG1, [ARG2...])
  4519. +# -----------------------------
  4520. +# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
  4521. +# associated separator.
  4522. +# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
  4523. +# versions in m4sugar had bugs.
  4524. +
  4525. +
  4526. +
  4527. +
  4528. +# lt_car(LIST)
  4529. +# lt_cdr(LIST)
  4530. +# ------------
  4531. +# Manipulate m4 lists.
  4532. +# These macros are necessary as long as will still need to support
  4533. +# Autoconf-2.59 which quotes differently.
  4534. +
  4535. +
  4536. +
  4537. +
  4538. +
  4539. +# lt_append(MACRO-NAME, STRING, [SEPARATOR])
  4540. +# ------------------------------------------
  4541. +# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
  4542. +# Note that neither SEPARATOR nor STRING are expanded; they are appended
  4543. +# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
  4544. +# No SEPARATOR is output if MACRO-NAME was previously undefined (different
  4545. +# than defined and empty).
  4546. +#
  4547. +# This macro is needed until we can rely on Autoconf 2.62, since earlier
  4548. +# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
  4549. +
  4550. +
  4551. +
  4552. +
  4553. +# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
  4554. +# ----------------------------------------------------------
  4555. +# Produce a SEP delimited list of all paired combinations of elements of
  4556. +# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
  4557. +# has the form PREFIXmINFIXSUFFIXn.
  4558. +# Needed until we can rely on m4_combine added in Autoconf 2.62.
  4559. +
  4560. +
  4561. +
  4562. +# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
  4563. +# -----------------------------------------------------------------------
  4564. +# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
  4565. +# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
  4566. +
  4567. +
  4568. +
  4569. +# lt_dict_add(DICT, KEY, VALUE)
  4570. +# -----------------------------
  4571. +
  4572. +
  4573. +
  4574. +# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
  4575. +# --------------------------------------------
  4576. +
  4577. +
  4578. +
  4579. +# lt_dict_fetch(DICT, KEY, [SUBKEY])
  4580. +# ----------------------------------
  4581. +
  4582. +
  4583. +
  4584. +# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
  4585. +# -----------------------------------------------------------------
  4586. +
  4587. +
  4588. +
  4589. +# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
  4590. +# --------------------------------------------------------------
  4591. +
  4592. +
  4593. +# ltversion.m4 -- version numbers -*- Autoconf -*-
  4594. +#
  4595. +# Copyright (C) 2004 Free Software Foundation, Inc.
  4596. +# Written by Scott James Remnant, 2004
  4597. +#
  4598. +# This file is free software; the Free Software Foundation gives
  4599. +# unlimited permission to copy and/or distribute it, with or without
  4600. +# modifications, as long as this notice is preserved.
  4601. +
  4602. +# Generated from ltversion.in.
  4603. +
  4604. +# serial 3134 ltversion.m4
  4605. +# This file is part of GNU Libtool
  4606. +
  4607. +
  4608. +
  4609. +
  4610. +
  4611. +
  4612. +# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
  4613. +#
  4614. +# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
  4615. +# Written by Scott James Remnant, 2004.
  4616. +#
  4617. +# This file is free software; the Free Software Foundation gives
  4618. +# unlimited permission to copy and/or distribute it, with or without
  4619. +# modifications, as long as this notice is preserved.
  4620. +
  4621. +# serial 4 lt~obsolete.m4
  4622. +
  4623. +# These exist entirely to fool aclocal when bootstrapping libtool.
  4624. +#
  4625. +# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
  4626. +# which have later been changed to m4_define as they aren't part of the
  4627. +# exported API, or moved to Autoconf or Automake where they belong.
  4628. +#
  4629. +# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
  4630. +# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
  4631. +# using a macro with the same name in our local m4/libtool.m4 it'll
  4632. +# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
  4633. +# and doesn't know about Autoconf macros at all.)
  4634. +#
  4635. +# So we provide this file, which has a silly filename so it's always
  4636. +# included after everything else. This provides aclocal with the
  4637. +# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
  4638. +# because those macros already exist, or will be overwritten later.
  4639. +# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
  4640. +#
  4641. +# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
  4642. +# Yes, that means every name once taken will need to remain here until
  4643. +# we give up compatibility with versions before 1.7, at which point
  4644. +# we need to keep only those names which we still refer to.
  4645. +
  4646. +# This is to help aclocal find these macros, as it can't see m4_define.
  4647. +
  4648. +
  4649. +
  4650. +
  4651. +
  4652. +
  4653. +
  4654. +
  4655. +
  4656. +
  4657. +
  4658. +
  4659. +
  4660. +
  4661. +
  4662. +
  4663. +
  4664. +
  4665. +
  4666. +
  4667. +
  4668. +
  4669. +
  4670. +
  4671. +
  4672. +
  4673. +
  4674. +
  4675. +
  4676. +
  4677. +
  4678. +
  4679. +
  4680. +
  4681. +
  4682. +
  4683. +
  4684. +
  4685. +
  4686. +
  4687. +
  4688. +
  4689. +
  4690. +
  4691. +
  4692. +
  4693. +
  4694. +
  4695. +
  4696. +
  4697. +
  4698. +
  4699. +
  4700. +
  4701. +
  4702. +
  4703. +
  4704. +
  4705. +
  4706. +
  4707. +
  4708. +
  4709. +
  4710. +
  4711. +## -*- Autoconf -*-
  4712. +
  4713. +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007
  4714. +# Free Software Foundation, Inc.
  4715. +#
  4716. +# This file is free software; the Free Software Foundation
  4717. +# gives unlimited permission to copy and/or distribute it,
  4718. +# with or without modifications, as long as this notice is preserved.
  4719. +
  4720. +# serial 8
  4721. +
  4722. +# Based on depend.m4 from automake 1.9, modified for standalone use in
  4723. +# an environment where GNU make is required.
  4724. +
  4725. +# ZW_PROG_COMPILER_DEPENDENCIES
  4726. +# -----------------------------
  4727. +# Variant of _AM_DEPENDENCIES which just does the dependency probe and
  4728. +# sets fooDEPMODE accordingly. Cache-variable compatible with
  4729. +# original; not side-effect compatible. As the users of this macro
  4730. +# may require accurate dependencies for correct builds, it does *not*
  4731. +# honor --disable-dependency-checking, and failure to detect a usable
  4732. +# method is an error. depcomp is assumed to be located in
  4733. +# $ac_aux_dir.
  4734. +#
  4735. +# FIXME: Should use the Autoconf 2.5x language-selection mechanism.
  4736. +
  4737. +
  4738. +
  4739. +# AM_SET_DEPDIR
  4740. +# -------------
  4741. +# Choose a directory name for dependency files.
  4742. +
  4743. +
  4744. +# ZW_CREATE_DEPDIR
  4745. +# ----------------
  4746. +# As AM_SET_DEPDIR, but also create the directory at config.status time.
  4747. +
  4748. +
  4749. +
  4750. +
  4751. +
  4752. +
  4753. +
  4754. +
  4755. +
  4756. +
  4757. +
  4758. +
  4759. +
  4760. +
  4761. +
  4762. +
  4763. +
  4764. +
  4765. +
  4766. +
  4767. +
  4768. +
  4769. +
  4770. +
  4771. +
  4772. +
  4773. +
  4774. +
  4775. +
  4776. +
  4777. +
  4778. +
  4779. +
  4780. +
  4781. +
  4782. +
  4783. +
  4784. +
  4785. +
  4786. +
  4787. +
  4788. +
  4789. +
  4790. +
  4791. +
  4792. +
  4793. +
  4794. +
  4795. +
  4796. +
  4797. +
  4798. +
  4799. +
  4800. +
  4801. +
  4802. +
  4803. +
  4804. +
  4805. +
  4806. +
  4807. +
  4808. +
  4809. +
  4810. +
  4811. +
  4812. +
  4813. +# intl sister-directory configuration rules.
  4814. +#
  4815. +
  4816. +# The idea behind this macro is that there's no need to repeat all the
  4817. +# autoconf probes done by the intl directory - it's already done them
  4818. +# for us. In fact, there's no need even to look at the cache for the
  4819. +# answers. All we need to do is nab a few pieces of information.
  4820. +# The intl directory is set up to make this easy, by generating a
  4821. +# small file which can be sourced as a shell script; then we produce
  4822. +# the necessary substitutions and definitions for this directory.
  4823. +
  4824. +
  4825. +
  4826. +# Autoconf M4 include file defining utility macros for complex Canadian
  4827. +# cross builds.
  4828. +
  4829. +
  4830. +
  4831. +
  4832. +
  4833. +
  4834. +
  4835. +
  4836. +
  4837. +####
  4838. +# _NCN_TOOL_PREFIXES: Some stuff that oughtta be done in AC_CANONICAL_SYSTEM
  4839. +# or AC_INIT.
  4840. +# These demand that AC_CANONICAL_SYSTEM be called beforehand.
  4841. +
  4842. +####
  4843. +# NCN_STRICT_CHECK_TOOLS(variable, progs-to-check-for,[value-if-not-found],[path])
  4844. +# Like plain AC_CHECK_TOOLS, but require prefix if build!=host.
  4845. +
  4846. +
  4847. +####
  4848. +# NCN_STRICT_CHECK_TARGET_TOOLS(variable, progs-to-check-for,[value-if-not-found],[path])
  4849. +# Like CVS Autoconf AC_CHECK_TARGET_TOOLS, but require prefix if build!=target.
  4850. +
  4851. +
  4852. +
  4853. +# Backported from Autoconf 2.5x; can go away when and if
  4854. +# we switch. Put the OS path separator in $PATH_SEPARATOR.
  4855. +
  4856. +
  4857. +
  4858. +
  4859. +
  4860. +
  4861. +
  4862. +
  4863. +# ACX_HAVE_GCC_FOR_TARGET
  4864. +# Check if the variable GCC_FOR_TARGET really points to a GCC binary.
  4865. +
  4866. +
  4867. +# ACX_CHECK_INSTALLED_TARGET_TOOL(VAR, PROG)
  4868. +# Searching for installed target binutils. We need to take extra care,
  4869. +# else we may find the wrong assembler, linker, etc., and lose.
  4870. +#
  4871. +# First try --with-build-time-tools, if specified.
  4872. +#
  4873. +# For build != host, we ask the installed GCC for the name of the tool it
  4874. +# uses, and accept it if it is an absolute path. This is because the
  4875. +# only good choice for a compiler is the same GCC version that is being
  4876. +# installed (or we couldn't make target libraries), and we assume that
  4877. +# on the host system we'll have not only the same GCC version, but also
  4878. +# the same binutils version.
  4879. +#
  4880. +# For build == host, search the same directories that the installed
  4881. +# compiler will search. We used to do this for the assembler, linker,
  4882. +# and nm only; for simplicity of configuration, however, we extend this
  4883. +# criterion to tools (such as ar and ranlib) that are never invoked by
  4884. +# the compiler, to avoid mismatches.
  4885. +#
  4886. +# Also note we have to check MD_EXEC_PREFIX before checking the user's path
  4887. +# if build == target. This makes the most sense only when bootstrapping,
  4888. +# but we also do so when build != host. In this case, we hope that the
  4889. +# build and host systems will have similar contents of MD_EXEC_PREFIX.
  4890. +#
  4891. +# If we do not find a suitable binary, then try the user's path.
  4892. +
  4893. +
  4894. +###
  4895. +# AC_PROG_CPP_WERROR
  4896. +# Used for autoconf 2.5x to force AC_PREPROC_IFELSE to reject code which
  4897. +# triggers warnings from the preprocessor. Will be in autoconf 2.58.
  4898. +# For now, using this also overrides header checks to use only the
  4899. +# preprocessor (matches 2.13 behavior; matching 2.58's behavior is a
  4900. +# bit harder from here).
  4901. +# Eventually autoconf will default to checking headers with the compiler
  4902. +# instead, and we'll have to do this differently.
  4903. +
  4904. +# AC_PROG_CPP_WERROR
  4905. +
  4906. +# Test for GNAT.
  4907. +# We require the gnatbind & gnatmake programs, as well as a compiler driver
  4908. +# that understands Ada. We use the user's CC setting, already found, and
  4909. +# possibly add $1 to the command-line parameters.
  4910. +#
  4911. +# Sets the shell variable have_gnat to yes or no as appropriate, and
  4912. +# substitutes GNATBIND and GNATMAKE.
  4913. +
  4914. +
  4915. +
  4916. +
  4917. +
  4918. +
  4919. +
  4920. +
  4921. +
  4922. +
  4923. +
  4924. +
  4925. +
  4926. +
  4927. +
  4928. +
  4929. +
  4930. +
  4931. +
  4932. +
  4933. +
  4934. +
  4935. +
  4936. +
  4937. +
  4938. +ac_ext=c
  4939. +ac_cpp='$CPP $CPPFLAGS'
  4940. +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  4941. +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  4942. +ac_compiler_gnu=$ac_cv_c_compiler_gnu
  4943. +if test -n "$ac_tool_prefix"; then
  4944. + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
  4945. +set dummy ${ac_tool_prefix}gcc; ac_word=$2
  4946. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  4947. +$as_echo_n "checking for $ac_word... " >&6; }
  4948. +if ${ac_cv_prog_CC+:} false; then :
  4949. + $as_echo_n "(cached) " >&6
  4950. +else
  4951. + if test -n "$CC"; then
  4952. + ac_cv_prog_CC="$CC" # Let the user override the test.
  4953. +else
  4954. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  4955. +for as_dir in $PATH
  4956. +do
  4957. + IFS=$as_save_IFS
  4958. + test -z "$as_dir" && as_dir=.
  4959. + for ac_exec_ext in '' $ac_executable_extensions; do
  4960. + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  4961. + ac_cv_prog_CC="${ac_tool_prefix}gcc"
  4962. + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  4963. + break 2
  4964. + fi
  4965. +done
  4966. + done
  4967. +IFS=$as_save_IFS
  4968. +
  4969. +fi
  4970. +fi
  4971. +CC=$ac_cv_prog_CC
  4972. +if test -n "$CC"; then
  4973. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
  4974. +$as_echo "$CC" >&6; }
  4975. +else
  4976. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  4977. +$as_echo "no" >&6; }
  4978. +fi
  4979. +
  4980. +
  4981. +fi
  4982. +if test -z "$ac_cv_prog_CC"; then
  4983. + ac_ct_CC=$CC
  4984. + # Extract the first word of "gcc", so it can be a program name with args.
  4985. +set dummy gcc; ac_word=$2
  4986. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  4987. +$as_echo_n "checking for $ac_word... " >&6; }
  4988. +if ${ac_cv_prog_ac_ct_CC+:} false; then :
  4989. + $as_echo_n "(cached) " >&6
  4990. +else
  4991. + if test -n "$ac_ct_CC"; then
  4992. + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
  4993. +else
  4994. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  4995. +for as_dir in $PATH
  4996. +do
  4997. + IFS=$as_save_IFS
  4998. + test -z "$as_dir" && as_dir=.
  4999. + for ac_exec_ext in '' $ac_executable_extensions; do
  5000. + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  5001. + ac_cv_prog_ac_ct_CC="gcc"
  5002. + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  5003. + break 2
  5004. + fi
  5005. +done
  5006. + done
  5007. +IFS=$as_save_IFS
  5008. +
  5009. +fi
  5010. +fi
  5011. +ac_ct_CC=$ac_cv_prog_ac_ct_CC
  5012. +if test -n "$ac_ct_CC"; then
  5013. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
  5014. +$as_echo "$ac_ct_CC" >&6; }
  5015. +else
  5016. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  5017. +$as_echo "no" >&6; }
  5018. +fi
  5019. +
  5020. + if test "x$ac_ct_CC" = x; then
  5021. + CC=""
  5022. + else
  5023. + case $cross_compiling:$ac_tool_warned in
  5024. +yes:)
  5025. +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  5026. +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  5027. +ac_tool_warned=yes ;;
  5028. +esac
  5029. + CC=$ac_ct_CC
  5030. + fi
  5031. +else
  5032. + CC="$ac_cv_prog_CC"
  5033. +fi
  5034. +
  5035. +if test -z "$CC"; then
  5036. + if test -n "$ac_tool_prefix"; then
  5037. + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
  5038. +set dummy ${ac_tool_prefix}cc; ac_word=$2
  5039. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  5040. +$as_echo_n "checking for $ac_word... " >&6; }
  5041. +if ${ac_cv_prog_CC+:} false; then :
  5042. + $as_echo_n "(cached) " >&6
  5043. +else
  5044. + if test -n "$CC"; then
  5045. + ac_cv_prog_CC="$CC" # Let the user override the test.
  5046. +else
  5047. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  5048. +for as_dir in $PATH
  5049. +do
  5050. + IFS=$as_save_IFS
  5051. + test -z "$as_dir" && as_dir=.
  5052. + for ac_exec_ext in '' $ac_executable_extensions; do
  5053. + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  5054. + ac_cv_prog_CC="${ac_tool_prefix}cc"
  5055. + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  5056. + break 2
  5057. + fi
  5058. +done
  5059. + done
  5060. +IFS=$as_save_IFS
  5061. +
  5062. +fi
  5063. +fi
  5064. +CC=$ac_cv_prog_CC
  5065. +if test -n "$CC"; then
  5066. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
  5067. +$as_echo "$CC" >&6; }
  5068. +else
  5069. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  5070. +$as_echo "no" >&6; }
  5071. +fi
  5072. +
  5073. +
  5074. + fi
  5075. +fi
  5076. +if test -z "$CC"; then
  5077. + # Extract the first word of "cc", so it can be a program name with args.
  5078. +set dummy cc; ac_word=$2
  5079. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  5080. +$as_echo_n "checking for $ac_word... " >&6; }
  5081. +if ${ac_cv_prog_CC+:} false; then :
  5082. + $as_echo_n "(cached) " >&6
  5083. +else
  5084. + if test -n "$CC"; then
  5085. + ac_cv_prog_CC="$CC" # Let the user override the test.
  5086. +else
  5087. + ac_prog_rejected=no
  5088. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  5089. +for as_dir in $PATH
  5090. +do
  5091. + IFS=$as_save_IFS
  5092. + test -z "$as_dir" && as_dir=.
  5093. + for ac_exec_ext in '' $ac_executable_extensions; do
  5094. + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  5095. + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
  5096. + ac_prog_rejected=yes
  5097. + continue
  5098. + fi
  5099. + ac_cv_prog_CC="cc"
  5100. + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  5101. + break 2
  5102. + fi
  5103. +done
  5104. + done
  5105. +IFS=$as_save_IFS
  5106. +
  5107. +if test $ac_prog_rejected = yes; then
  5108. + # We found a bogon in the path, so make sure we never use it.
  5109. + set dummy $ac_cv_prog_CC
  5110. + shift
  5111. + if test $# != 0; then
  5112. + # We chose a different compiler from the bogus one.
  5113. + # However, it has the same basename, so the bogon will be chosen
  5114. + # first if we set CC to just the basename; use the full file name.
  5115. + shift
  5116. + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
  5117. + fi
  5118. +fi
  5119. +fi
  5120. +fi
  5121. +CC=$ac_cv_prog_CC
  5122. +if test -n "$CC"; then
  5123. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
  5124. +$as_echo "$CC" >&6; }
  5125. +else
  5126. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  5127. +$as_echo "no" >&6; }
  5128. +fi
  5129. +
  5130. +
  5131. +fi
  5132. +if test -z "$CC"; then
  5133. + if test -n "$ac_tool_prefix"; then
  5134. + for ac_prog in cl.exe
  5135. + do
  5136. + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
  5137. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2
  5138. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  5139. +$as_echo_n "checking for $ac_word... " >&6; }
  5140. +if ${ac_cv_prog_CC+:} false; then :
  5141. + $as_echo_n "(cached) " >&6
  5142. +else
  5143. + if test -n "$CC"; then
  5144. + ac_cv_prog_CC="$CC" # Let the user override the test.
  5145. +else
  5146. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  5147. +for as_dir in $PATH
  5148. +do
  5149. + IFS=$as_save_IFS
  5150. + test -z "$as_dir" && as_dir=.
  5151. + for ac_exec_ext in '' $ac_executable_extensions; do
  5152. + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  5153. + ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
  5154. + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  5155. + break 2
  5156. + fi
  5157. +done
  5158. + done
  5159. +IFS=$as_save_IFS
  5160. +
  5161. +fi
  5162. +fi
  5163. +CC=$ac_cv_prog_CC
  5164. +if test -n "$CC"; then
  5165. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
  5166. +$as_echo "$CC" >&6; }
  5167. +else
  5168. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  5169. +$as_echo "no" >&6; }
  5170. +fi
  5171. +
  5172. +
  5173. + test -n "$CC" && break
  5174. + done
  5175. +fi
  5176. +if test -z "$CC"; then
  5177. + ac_ct_CC=$CC
  5178. + for ac_prog in cl.exe
  5179. +do
  5180. + # Extract the first word of "$ac_prog", so it can be a program name with args.
  5181. +set dummy $ac_prog; ac_word=$2
  5182. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  5183. +$as_echo_n "checking for $ac_word... " >&6; }
  5184. +if ${ac_cv_prog_ac_ct_CC+:} false; then :
  5185. + $as_echo_n "(cached) " >&6
  5186. +else
  5187. + if test -n "$ac_ct_CC"; then
  5188. + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
  5189. +else
  5190. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  5191. +for as_dir in $PATH
  5192. +do
  5193. + IFS=$as_save_IFS
  5194. + test -z "$as_dir" && as_dir=.
  5195. + for ac_exec_ext in '' $ac_executable_extensions; do
  5196. + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  5197. + ac_cv_prog_ac_ct_CC="$ac_prog"
  5198. + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  5199. + break 2
  5200. + fi
  5201. +done
  5202. + done
  5203. +IFS=$as_save_IFS
  5204. +
  5205. +fi
  5206. +fi
  5207. +ac_ct_CC=$ac_cv_prog_ac_ct_CC
  5208. +if test -n "$ac_ct_CC"; then
  5209. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
  5210. +$as_echo "$ac_ct_CC" >&6; }
  5211. +else
  5212. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  5213. +$as_echo "no" >&6; }
  5214. +fi
  5215. +
  5216. +
  5217. + test -n "$ac_ct_CC" && break
  5218. +done
  5219. +
  5220. + if test "x$ac_ct_CC" = x; then
  5221. + CC=""
  5222. + else
  5223. + case $cross_compiling:$ac_tool_warned in
  5224. +yes:)
  5225. +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  5226. +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  5227. +ac_tool_warned=yes ;;
  5228. +esac
  5229. + CC=$ac_ct_CC
  5230. + fi
  5231. +fi
  5232. +
  5233. +fi
  5234. +
  5235. +
  5236. +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  5237. +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  5238. +as_fn_error $? "no acceptable C compiler found in \$PATH
  5239. +See \`config.log' for more details" "$LINENO" 5; }
  5240. +
  5241. +# Provide some information about the compiler.
  5242. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
  5243. +set X $ac_compile
  5244. +ac_compiler=$2
  5245. +for ac_option in --version -v -V -qversion; do
  5246. + { { ac_try="$ac_compiler $ac_option >&5"
  5247. +case "(($ac_try" in
  5248. + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  5249. + *) ac_try_echo=$ac_try;;
  5250. +esac
  5251. +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
  5252. +$as_echo "$ac_try_echo"; } >&5
  5253. + (eval "$ac_compiler $ac_option >&5") 2>conftest.err
  5254. + ac_status=$?
  5255. + if test -s conftest.err; then
  5256. + sed '10a\
  5257. +... rest of stderr output deleted ...
  5258. + 10q' conftest.err >conftest.er1
  5259. + cat conftest.er1 >&5
  5260. + fi
  5261. + rm -f conftest.er1 conftest.err
  5262. + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  5263. + test $ac_status = 0; }
  5264. +done
  5265. +
  5266. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5267. +/* end confdefs.h. */
  5268. +
  5269. +int
  5270. +main ()
  5271. +{
  5272. +
  5273. + ;
  5274. + return 0;
  5275. +}
  5276. +_ACEOF
  5277. +ac_clean_files_save=$ac_clean_files
  5278. +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
  5279. +# Try to create an executable without -o first, disregard a.out.
  5280. +# It will help us diagnose broken compilers, and finding out an intuition
  5281. +# of exeext.
  5282. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
  5283. +$as_echo_n "checking whether the C compiler works... " >&6; }
  5284. +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
  5285. +
  5286. +# The possible output files:
  5287. +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
  5288. +
  5289. +ac_rmfiles=
  5290. +for ac_file in $ac_files
  5291. +do
  5292. + case $ac_file in
  5293. + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
  5294. + * ) ac_rmfiles="$ac_rmfiles $ac_file";;
  5295. + esac
  5296. +done
  5297. +rm -f $ac_rmfiles
  5298. +
  5299. +if { { ac_try="$ac_link_default"
  5300. +case "(($ac_try" in
  5301. + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  5302. + *) ac_try_echo=$ac_try;;
  5303. +esac
  5304. +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
  5305. +$as_echo "$ac_try_echo"; } >&5
  5306. + (eval "$ac_link_default") 2>&5
  5307. + ac_status=$?
  5308. + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  5309. + test $ac_status = 0; }; then :
  5310. + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
  5311. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
  5312. +# in a Makefile. We should not override ac_cv_exeext if it was cached,
  5313. +# so that the user can short-circuit this test for compilers unknown to
  5314. +# Autoconf.
  5315. +for ac_file in $ac_files ''
  5316. +do
  5317. + test -f "$ac_file" || continue
  5318. + case $ac_file in
  5319. + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
  5320. + ;;
  5321. + [ab].out )
  5322. + # We found the default executable, but exeext='' is most
  5323. + # certainly right.
  5324. + break;;
  5325. + *.* )
  5326. + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
  5327. + then :; else
  5328. + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
  5329. + fi
  5330. + # We set ac_cv_exeext here because the later test for it is not
  5331. + # safe: cross compilers may not add the suffix if given an `-o'
  5332. + # argument, so we may need to know it at that point already.
  5333. + # Even if this section looks crufty: it has the advantage of
  5334. + # actually working.
  5335. + break;;
  5336. + * )
  5337. + break;;
  5338. + esac
  5339. +done
  5340. +test "$ac_cv_exeext" = no && ac_cv_exeext=
  5341. +
  5342. +else
  5343. + ac_file=''
  5344. +fi
  5345. +if test -z "$ac_file"; then :
  5346. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  5347. +$as_echo "no" >&6; }
  5348. +$as_echo "$as_me: failed program was:" >&5
  5349. +sed 's/^/| /' conftest.$ac_ext >&5
  5350. +
  5351. +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  5352. +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  5353. +as_fn_error 77 "C compiler cannot create executables
  5354. +See \`config.log' for more details" "$LINENO" 5; }
  5355. +else
  5356. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  5357. +$as_echo "yes" >&6; }
  5358. +fi
  5359. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
  5360. +$as_echo_n "checking for C compiler default output file name... " >&6; }
  5361. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
  5362. +$as_echo "$ac_file" >&6; }
  5363. +ac_exeext=$ac_cv_exeext
  5364. +
  5365. +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
  5366. +ac_clean_files=$ac_clean_files_save
  5367. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
  5368. +$as_echo_n "checking for suffix of executables... " >&6; }
  5369. +if { { ac_try="$ac_link"
  5370. +case "(($ac_try" in
  5371. + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  5372. + *) ac_try_echo=$ac_try;;
  5373. +esac
  5374. +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
  5375. +$as_echo "$ac_try_echo"; } >&5
  5376. + (eval "$ac_link") 2>&5
  5377. + ac_status=$?
  5378. + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  5379. + test $ac_status = 0; }; then :
  5380. + # If both `conftest.exe' and `conftest' are `present' (well, observable)
  5381. +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
  5382. +# work properly (i.e., refer to `conftest.exe'), while it won't with
  5383. +# `rm'.
  5384. +for ac_file in conftest.exe conftest conftest.*; do
  5385. + test -f "$ac_file" || continue
  5386. + case $ac_file in
  5387. + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
  5388. + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
  5389. + break;;
  5390. + * ) break;;
  5391. + esac
  5392. +done
  5393. +else
  5394. + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  5395. +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  5396. +as_fn_error $? "cannot compute suffix of executables: cannot compile and link
  5397. +See \`config.log' for more details" "$LINENO" 5; }
  5398. +fi
  5399. +rm -f conftest conftest$ac_cv_exeext
  5400. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
  5401. +$as_echo "$ac_cv_exeext" >&6; }
  5402. +
  5403. +rm -f conftest.$ac_ext
  5404. +EXEEXT=$ac_cv_exeext
  5405. +ac_exeext=$EXEEXT
  5406. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5407. +/* end confdefs.h. */
  5408. +#include <stdio.h>
  5409. +int
  5410. +main ()
  5411. +{
  5412. +FILE *f = fopen ("conftest.out", "w");
  5413. + return ferror (f) || fclose (f) != 0;
  5414. +
  5415. + ;
  5416. + return 0;
  5417. +}
  5418. +_ACEOF
  5419. +ac_clean_files="$ac_clean_files conftest.out"
  5420. +# Check that the compiler produces executables we can run. If not, either
  5421. +# the compiler is broken, or we cross compile.
  5422. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
  5423. +$as_echo_n "checking whether we are cross compiling... " >&6; }
  5424. +if test "$cross_compiling" != yes; then
  5425. + { { ac_try="$ac_link"
  5426. +case "(($ac_try" in
  5427. + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  5428. + *) ac_try_echo=$ac_try;;
  5429. +esac
  5430. +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
  5431. +$as_echo "$ac_try_echo"; } >&5
  5432. + (eval "$ac_link") 2>&5
  5433. + ac_status=$?
  5434. + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  5435. + test $ac_status = 0; }
  5436. + if { ac_try='./conftest$ac_cv_exeext'
  5437. + { { case "(($ac_try" in
  5438. + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  5439. + *) ac_try_echo=$ac_try;;
  5440. +esac
  5441. +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
  5442. +$as_echo "$ac_try_echo"; } >&5
  5443. + (eval "$ac_try") 2>&5
  5444. + ac_status=$?
  5445. + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  5446. + test $ac_status = 0; }; }; then
  5447. + cross_compiling=no
  5448. + else
  5449. + if test "$cross_compiling" = maybe; then
  5450. + cross_compiling=yes
  5451. + else
  5452. + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  5453. +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  5454. +as_fn_error $? "cannot run C compiled programs.
  5455. +If you meant to cross compile, use \`--host'.
  5456. +See \`config.log' for more details" "$LINENO" 5; }
  5457. + fi
  5458. + fi
  5459. +fi
  5460. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
  5461. +$as_echo "$cross_compiling" >&6; }
  5462. +
  5463. +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
  5464. +ac_clean_files=$ac_clean_files_save
  5465. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
  5466. +$as_echo_n "checking for suffix of object files... " >&6; }
  5467. +if ${ac_cv_objext+:} false; then :
  5468. + $as_echo_n "(cached) " >&6
  5469. +else
  5470. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5471. +/* end confdefs.h. */
  5472. +
  5473. +int
  5474. +main ()
  5475. +{
  5476. +
  5477. + ;
  5478. + return 0;
  5479. +}
  5480. +_ACEOF
  5481. +rm -f conftest.o conftest.obj
  5482. +if { { ac_try="$ac_compile"
  5483. +case "(($ac_try" in
  5484. + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  5485. + *) ac_try_echo=$ac_try;;
  5486. +esac
  5487. +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
  5488. +$as_echo "$ac_try_echo"; } >&5
  5489. + (eval "$ac_compile") 2>&5
  5490. + ac_status=$?
  5491. + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  5492. + test $ac_status = 0; }; then :
  5493. + for ac_file in conftest.o conftest.obj conftest.*; do
  5494. + test -f "$ac_file" || continue;
  5495. + case $ac_file in
  5496. + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
  5497. + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
  5498. + break;;
  5499. + esac
  5500. +done
  5501. +else
  5502. + $as_echo "$as_me: failed program was:" >&5
  5503. +sed 's/^/| /' conftest.$ac_ext >&5
  5504. +
  5505. +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  5506. +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  5507. +as_fn_error $? "cannot compute suffix of object files: cannot compile
  5508. +See \`config.log' for more details" "$LINENO" 5; }
  5509. +fi
  5510. +rm -f conftest.$ac_cv_objext conftest.$ac_ext
  5511. +fi
  5512. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
  5513. +$as_echo "$ac_cv_objext" >&6; }
  5514. +OBJEXT=$ac_cv_objext
  5515. +ac_objext=$OBJEXT
  5516. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
  5517. +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
  5518. +if ${ac_cv_c_compiler_gnu+:} false; then :
  5519. + $as_echo_n "(cached) " >&6
  5520. +else
  5521. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5522. +/* end confdefs.h. */
  5523. +
  5524. +int
  5525. +main ()
  5526. +{
  5527. +#ifndef __GNUC__
  5528. + choke me
  5529. +#endif
  5530. +
  5531. + ;
  5532. + return 0;
  5533. +}
  5534. +_ACEOF
  5535. +if ac_fn_c_try_compile "$LINENO"; then :
  5536. + ac_compiler_gnu=yes
  5537. +else
  5538. + ac_compiler_gnu=no
  5539. +fi
  5540. +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  5541. +ac_cv_c_compiler_gnu=$ac_compiler_gnu
  5542. +
  5543. +fi
  5544. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
  5545. +$as_echo "$ac_cv_c_compiler_gnu" >&6; }
  5546. +if test $ac_compiler_gnu = yes; then
  5547. + GCC=yes
  5548. +else
  5549. + GCC=
  5550. +fi
  5551. +ac_test_CFLAGS=${CFLAGS+set}
  5552. +ac_save_CFLAGS=$CFLAGS
  5553. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
  5554. +$as_echo_n "checking whether $CC accepts -g... " >&6; }
  5555. +if ${ac_cv_prog_cc_g+:} false; then :
  5556. + $as_echo_n "(cached) " >&6
  5557. +else
  5558. + ac_save_c_werror_flag=$ac_c_werror_flag
  5559. + ac_c_werror_flag=yes
  5560. + ac_cv_prog_cc_g=no
  5561. + CFLAGS="-g"
  5562. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5563. +/* end confdefs.h. */
  5564. +
  5565. +int
  5566. +main ()
  5567. +{
  5568. +
  5569. + ;
  5570. + return 0;
  5571. +}
  5572. +_ACEOF
  5573. +if ac_fn_c_try_compile "$LINENO"; then :
  5574. + ac_cv_prog_cc_g=yes
  5575. +else
  5576. + CFLAGS=""
  5577. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5578. +/* end confdefs.h. */
  5579. +
  5580. +int
  5581. +main ()
  5582. +{
  5583. +
  5584. + ;
  5585. + return 0;
  5586. +}
  5587. +_ACEOF
  5588. +if ac_fn_c_try_compile "$LINENO"; then :
  5589. +
  5590. +else
  5591. + ac_c_werror_flag=$ac_save_c_werror_flag
  5592. + CFLAGS="-g"
  5593. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5594. +/* end confdefs.h. */
  5595. +
  5596. +int
  5597. +main ()
  5598. +{
  5599. +
  5600. + ;
  5601. + return 0;
  5602. +}
  5603. +_ACEOF
  5604. +if ac_fn_c_try_compile "$LINENO"; then :
  5605. + ac_cv_prog_cc_g=yes
  5606. +fi
  5607. +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  5608. +fi
  5609. +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  5610. +fi
  5611. +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  5612. + ac_c_werror_flag=$ac_save_c_werror_flag
  5613. +fi
  5614. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
  5615. +$as_echo "$ac_cv_prog_cc_g" >&6; }
  5616. +if test "$ac_test_CFLAGS" = set; then
  5617. + CFLAGS=$ac_save_CFLAGS
  5618. +elif test $ac_cv_prog_cc_g = yes; then
  5619. + if test "$GCC" = yes; then
  5620. + CFLAGS="-g -O2"
  5621. + else
  5622. + CFLAGS="-g"
  5623. + fi
  5624. +else
  5625. + if test "$GCC" = yes; then
  5626. + CFLAGS="-O2"
  5627. + else
  5628. + CFLAGS=
  5629. + fi
  5630. +fi
  5631. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
  5632. +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
  5633. +if ${ac_cv_prog_cc_c89+:} false; then :
  5634. + $as_echo_n "(cached) " >&6
  5635. +else
  5636. + ac_cv_prog_cc_c89=no
  5637. +ac_save_CC=$CC
  5638. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5639. +/* end confdefs.h. */
  5640. +#include <stdarg.h>
  5641. +#include <stdio.h>
  5642. +struct stat;
  5643. +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
  5644. +struct buf { int x; };
  5645. +FILE * (*rcsopen) (struct buf *, struct stat *, int);
  5646. +static char *e (p, i)
  5647. + char **p;
  5648. + int i;
  5649. +{
  5650. + return p[i];
  5651. +}
  5652. +static char *f (char * (*g) (char **, int), char **p, ...)
  5653. +{
  5654. + char *s;
  5655. + va_list v;
  5656. + va_start (v,p);
  5657. + s = g (p, va_arg (v,int));
  5658. + va_end (v);
  5659. + return s;
  5660. +}
  5661. +
  5662. +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
  5663. + function prototypes and stuff, but not '\xHH' hex character constants.
  5664. + These don't provoke an error unfortunately, instead are silently treated
  5665. + as 'x'. The following induces an error, until -std is added to get
  5666. + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
  5667. + array size at least. It's necessary to write '\x00'==0 to get something
  5668. + that's true only with -std. */
  5669. +int osf4_cc_array ['\x00' == 0 ? 1 : -1];
  5670. +
  5671. +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
  5672. + inside strings and character constants. */
  5673. +#define FOO(x) 'x'
  5674. +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
  5675. +
  5676. +int test (int i, double x);
  5677. +struct s1 {int (*f) (int a);};
  5678. +struct s2 {int (*f) (double a);};
  5679. +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
  5680. +int argc;
  5681. +char **argv;
  5682. +int
  5683. +main ()
  5684. +{
  5685. +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
  5686. + ;
  5687. + return 0;
  5688. +}
  5689. +_ACEOF
  5690. +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
  5691. + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
  5692. +do
  5693. + CC="$ac_save_CC $ac_arg"
  5694. + if ac_fn_c_try_compile "$LINENO"; then :
  5695. + ac_cv_prog_cc_c89=$ac_arg
  5696. +fi
  5697. +rm -f core conftest.err conftest.$ac_objext
  5698. + test "x$ac_cv_prog_cc_c89" != "xno" && break
  5699. +done
  5700. +rm -f conftest.$ac_ext
  5701. +CC=$ac_save_CC
  5702. +
  5703. +fi
  5704. +# AC_CACHE_VAL
  5705. +case "x$ac_cv_prog_cc_c89" in
  5706. + x)
  5707. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
  5708. +$as_echo "none needed" >&6; } ;;
  5709. + xno)
  5710. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
  5711. +$as_echo "unsupported" >&6; } ;;
  5712. + *)
  5713. + CC="$CC $ac_cv_prog_cc_c89"
  5714. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
  5715. +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
  5716. +esac
  5717. +if test "x$ac_cv_prog_cc_c89" != xno; then :
  5718. +
  5719. +fi
  5720. +
  5721. +ac_ext=c
  5722. +ac_cpp='$CPP $CPPFLAGS'
  5723. +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  5724. +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  5725. +ac_compiler_gnu=$ac_cv_c_compiler_gnu
  5726. +
  5727. +ac_aux_dir=
  5728. +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
  5729. + if test -f "$ac_dir/install-sh"; then
  5730. + ac_aux_dir=$ac_dir
  5731. + ac_install_sh="$ac_aux_dir/install-sh -c"
  5732. + break
  5733. + elif test -f "$ac_dir/install.sh"; then
  5734. + ac_aux_dir=$ac_dir
  5735. + ac_install_sh="$ac_aux_dir/install.sh -c"
  5736. + break
  5737. + elif test -f "$ac_dir/shtool"; then
  5738. + ac_aux_dir=$ac_dir
  5739. + ac_install_sh="$ac_aux_dir/shtool install -c"
  5740. + break
  5741. + fi
  5742. +done
  5743. +if test -z "$ac_aux_dir"; then
  5744. + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
  5745. +fi
  5746. +
  5747. +# These three variables are undocumented and unsupported,
  5748. +# and are intended to be withdrawn in a future Autoconf release.
  5749. +# They can cause serious problems if a builder's source tree is in a directory
  5750. +# whose full name contains unusual characters.
  5751. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
  5752. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
  5753. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
  5754. +
  5755. +
  5756. +# Make sure we can run config.sub.
  5757. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
  5758. + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
  5759. +
  5760. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
  5761. +$as_echo_n "checking build system type... " >&6; }
  5762. +if ${ac_cv_build+:} false; then :
  5763. + $as_echo_n "(cached) " >&6
  5764. +else
  5765. + ac_build_alias=$build_alias
  5766. +test "x$ac_build_alias" = x &&
  5767. + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
  5768. +test "x$ac_build_alias" = x &&
  5769. + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
  5770. +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
  5771. + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
  5772. +
  5773. +fi
  5774. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
  5775. +$as_echo "$ac_cv_build" >&6; }
  5776. +case $ac_cv_build in
  5777. +*-*-*) ;;
  5778. +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
  5779. +esac
  5780. +build=$ac_cv_build
  5781. +ac_save_IFS=$IFS; IFS='-'
  5782. +set x $ac_cv_build
  5783. +shift
  5784. +build_cpu=$1
  5785. +build_vendor=$2
  5786. +shift; shift
  5787. +# Remember, the first character of IFS is used to create $*,
  5788. +# except with old shells:
  5789. +build_os=$*
  5790. +IFS=$ac_save_IFS
  5791. +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
  5792. +
  5793. +
  5794. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
  5795. +$as_echo_n "checking host system type... " >&6; }
  5796. +if ${ac_cv_host+:} false; then :
  5797. + $as_echo_n "(cached) " >&6
  5798. +else
  5799. + if test "x$host_alias" = x; then
  5800. + ac_cv_host=$ac_cv_build
  5801. +else
  5802. + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
  5803. + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
  5804. +fi
  5805. +
  5806. +fi
  5807. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
  5808. +$as_echo "$ac_cv_host" >&6; }
  5809. +case $ac_cv_host in
  5810. +*-*-*) ;;
  5811. +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
  5812. +esac
  5813. +host=$ac_cv_host
  5814. +ac_save_IFS=$IFS; IFS='-'
  5815. +set x $ac_cv_host
  5816. +shift
  5817. +host_cpu=$1
  5818. +host_vendor=$2
  5819. +shift; shift
  5820. +# Remember, the first character of IFS is used to create $*,
  5821. +# except with old shells:
  5822. +host_os=$*
  5823. +IFS=$ac_save_IFS
  5824. +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
  5825. +
  5826. +
  5827. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
  5828. +$as_echo_n "checking target system type... " >&6; }
  5829. +if ${ac_cv_target+:} false; then :
  5830. + $as_echo_n "(cached) " >&6
  5831. +else
  5832. + if test "x$target_alias" = x; then
  5833. + ac_cv_target=$ac_cv_host
  5834. +else
  5835. + ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
  5836. + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
  5837. +fi
  5838. +
  5839. +fi
  5840. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
  5841. +$as_echo "$ac_cv_target" >&6; }
  5842. +case $ac_cv_target in
  5843. +*-*-*) ;;
  5844. +*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
  5845. +esac
  5846. +target=$ac_cv_target
  5847. +ac_save_IFS=$IFS; IFS='-'
  5848. +set x $ac_cv_target
  5849. +shift
  5850. +target_cpu=$1
  5851. +target_vendor=$2
  5852. +shift; shift
  5853. +# Remember, the first character of IFS is used to create $*,
  5854. +# except with old shells:
  5855. +target_os=$*
  5856. +IFS=$ac_save_IFS
  5857. +case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
  5858. +
  5859. +
  5860. +# The aliases save the names the user supplied, while $host etc.
  5861. +# will get canonicalized.
  5862. +test -n "$target_alias" &&
  5863. + test "$program_prefix$program_suffix$program_transform_name" = \
  5864. + NONENONEs,x,x, &&
  5865. + program_prefix=${target_alias}-
  5866. +
  5867. +ac_ext=c
  5868. +ac_cpp='$CPP $CPPFLAGS'
  5869. +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  5870. +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  5871. +ac_compiler_gnu=$ac_cv_c_compiler_gnu
  5872. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
  5873. +$as_echo_n "checking how to run the C preprocessor... " >&6; }
  5874. +# On Suns, sometimes $CPP names a directory.
  5875. +if test -n "$CPP" && test -d "$CPP"; then
  5876. + CPP=
  5877. +fi
  5878. +if test -z "$CPP"; then
  5879. + if ${ac_cv_prog_CPP+:} false; then :
  5880. + $as_echo_n "(cached) " >&6
  5881. +else
  5882. + # Double quotes because CPP needs to be expanded
  5883. + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
  5884. + do
  5885. + ac_preproc_ok=false
  5886. +for ac_c_preproc_warn_flag in '' yes
  5887. +do
  5888. + # Use a header file that comes with gcc, so configuring glibc
  5889. + # with a fresh cross-compiler works.
  5890. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  5891. + # <limits.h> exists even on freestanding compilers.
  5892. + # On the NeXT, cc -E runs the code through the compiler's parser,
  5893. + # not just through cpp. "Syntax error" is here to catch this case.
  5894. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5895. +/* end confdefs.h. */
  5896. +#ifdef __STDC__
  5897. +# include <limits.h>
  5898. +#else
  5899. +# include <assert.h>
  5900. +#endif
  5901. + Syntax error
  5902. +_ACEOF
  5903. +if ac_fn_c_try_cpp "$LINENO"; then :
  5904. +
  5905. +else
  5906. + # Broken: fails on valid input.
  5907. +continue
  5908. +fi
  5909. +rm -f conftest.err conftest.i conftest.$ac_ext
  5910. +
  5911. + # OK, works on sane cases. Now check whether nonexistent headers
  5912. + # can be detected and how.
  5913. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5914. +/* end confdefs.h. */
  5915. +#include <ac_nonexistent.h>
  5916. +_ACEOF
  5917. +if ac_fn_c_try_cpp "$LINENO"; then :
  5918. + # Broken: success on invalid input.
  5919. +continue
  5920. +else
  5921. + # Passes both tests.
  5922. +ac_preproc_ok=:
  5923. +break
  5924. +fi
  5925. +rm -f conftest.err conftest.i conftest.$ac_ext
  5926. +
  5927. +done
  5928. +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
  5929. +rm -f conftest.i conftest.err conftest.$ac_ext
  5930. +if $ac_preproc_ok; then :
  5931. + break
  5932. +fi
  5933. +
  5934. + done
  5935. + ac_cv_prog_CPP=$CPP
  5936. +
  5937. +fi
  5938. + CPP=$ac_cv_prog_CPP
  5939. +else
  5940. + ac_cv_prog_CPP=$CPP
  5941. +fi
  5942. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
  5943. +$as_echo "$CPP" >&6; }
  5944. +ac_preproc_ok=false
  5945. +for ac_c_preproc_warn_flag in '' yes
  5946. +do
  5947. + # Use a header file that comes with gcc, so configuring glibc
  5948. + # with a fresh cross-compiler works.
  5949. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  5950. + # <limits.h> exists even on freestanding compilers.
  5951. + # On the NeXT, cc -E runs the code through the compiler's parser,
  5952. + # not just through cpp. "Syntax error" is here to catch this case.
  5953. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5954. +/* end confdefs.h. */
  5955. +#ifdef __STDC__
  5956. +# include <limits.h>
  5957. +#else
  5958. +# include <assert.h>
  5959. +#endif
  5960. + Syntax error
  5961. +_ACEOF
  5962. +if ac_fn_c_try_cpp "$LINENO"; then :
  5963. +
  5964. +else
  5965. + # Broken: fails on valid input.
  5966. +continue
  5967. +fi
  5968. +rm -f conftest.err conftest.i conftest.$ac_ext
  5969. +
  5970. + # OK, works on sane cases. Now check whether nonexistent headers
  5971. + # can be detected and how.
  5972. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5973. +/* end confdefs.h. */
  5974. +#include <ac_nonexistent.h>
  5975. +_ACEOF
  5976. +if ac_fn_c_try_cpp "$LINENO"; then :
  5977. + # Broken: success on invalid input.
  5978. +continue
  5979. +else
  5980. + # Passes both tests.
  5981. +ac_preproc_ok=:
  5982. +break
  5983. +fi
  5984. +rm -f conftest.err conftest.i conftest.$ac_ext
  5985. +
  5986. +done
  5987. +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
  5988. +rm -f conftest.i conftest.err conftest.$ac_ext
  5989. +if $ac_preproc_ok; then :
  5990. +
  5991. +else
  5992. + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  5993. +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  5994. +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
  5995. +See \`config.log' for more details" "$LINENO" 5; }
  5996. +fi
  5997. +
  5998. +ac_ext=c
  5999. +ac_cpp='$CPP $CPPFLAGS'
  6000. +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  6001. +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  6002. +ac_compiler_gnu=$ac_cv_c_compiler_gnu
  6003. +
  6004. +
  6005. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
  6006. +$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
  6007. +if ${ac_cv_path_GREP+:} false; then :
  6008. + $as_echo_n "(cached) " >&6
  6009. +else
  6010. + if test -z "$GREP"; then
  6011. + ac_path_GREP_found=false
  6012. + # Loop through the user's path and test for each of PROGNAME-LIST
  6013. + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6014. +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
  6015. +do
  6016. + IFS=$as_save_IFS
  6017. + test -z "$as_dir" && as_dir=.
  6018. + for ac_prog in grep ggrep; do
  6019. + for ac_exec_ext in '' $ac_executable_extensions; do
  6020. + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
  6021. + as_fn_executable_p "$ac_path_GREP" || continue
  6022. +# Check for GNU ac_path_GREP and select it if it is found.
  6023. + # Check for GNU $ac_path_GREP
  6024. +case `"$ac_path_GREP" --version 2>&1` in
  6025. +*GNU*)
  6026. + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
  6027. +*)
  6028. + ac_count=0
  6029. + $as_echo_n 0123456789 >"conftest.in"
  6030. + while :
  6031. + do
  6032. + cat "conftest.in" "conftest.in" >"conftest.tmp"
  6033. + mv "conftest.tmp" "conftest.in"
  6034. + cp "conftest.in" "conftest.nl"
  6035. + $as_echo 'GREP' >> "conftest.nl"
  6036. + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
  6037. + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
  6038. + as_fn_arith $ac_count + 1 && ac_count=$as_val
  6039. + if test $ac_count -gt ${ac_path_GREP_max-0}; then
  6040. + # Best one so far, save it but keep looking for a better one
  6041. + ac_cv_path_GREP="$ac_path_GREP"
  6042. + ac_path_GREP_max=$ac_count
  6043. + fi
  6044. + # 10*(2^10) chars as input seems more than enough
  6045. + test $ac_count -gt 10 && break
  6046. + done
  6047. + rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
  6048. +esac
  6049. +
  6050. + $ac_path_GREP_found && break 3
  6051. + done
  6052. + done
  6053. + done
  6054. +IFS=$as_save_IFS
  6055. + if test -z "$ac_cv_path_GREP"; then
  6056. + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
  6057. + fi
  6058. +else
  6059. + ac_cv_path_GREP=$GREP
  6060. +fi
  6061. +
  6062. +fi
  6063. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
  6064. +$as_echo "$ac_cv_path_GREP" >&6; }
  6065. + GREP="$ac_cv_path_GREP"
  6066. +
  6067. +
  6068. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
  6069. +$as_echo_n "checking for egrep... " >&6; }
  6070. +if ${ac_cv_path_EGREP+:} false; then :
  6071. + $as_echo_n "(cached) " >&6
  6072. +else
  6073. + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
  6074. + then ac_cv_path_EGREP="$GREP -E"
  6075. + else
  6076. + if test -z "$EGREP"; then
  6077. + ac_path_EGREP_found=false
  6078. + # Loop through the user's path and test for each of PROGNAME-LIST
  6079. + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6080. +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
  6081. +do
  6082. + IFS=$as_save_IFS
  6083. + test -z "$as_dir" && as_dir=.
  6084. + for ac_prog in egrep; do
  6085. + for ac_exec_ext in '' $ac_executable_extensions; do
  6086. + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
  6087. + as_fn_executable_p "$ac_path_EGREP" || continue
  6088. +# Check for GNU ac_path_EGREP and select it if it is found.
  6089. + # Check for GNU $ac_path_EGREP
  6090. +case `"$ac_path_EGREP" --version 2>&1` in
  6091. +*GNU*)
  6092. + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
  6093. +*)
  6094. + ac_count=0
  6095. + $as_echo_n 0123456789 >"conftest.in"
  6096. + while :
  6097. + do
  6098. + cat "conftest.in" "conftest.in" >"conftest.tmp"
  6099. + mv "conftest.tmp" "conftest.in"
  6100. + cp "conftest.in" "conftest.nl"
  6101. + $as_echo 'EGREP' >> "conftest.nl"
  6102. + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
  6103. + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
  6104. + as_fn_arith $ac_count + 1 && ac_count=$as_val
  6105. + if test $ac_count -gt ${ac_path_EGREP_max-0}; then
  6106. + # Best one so far, save it but keep looking for a better one
  6107. + ac_cv_path_EGREP="$ac_path_EGREP"
  6108. + ac_path_EGREP_max=$ac_count
  6109. + fi
  6110. + # 10*(2^10) chars as input seems more than enough
  6111. + test $ac_count -gt 10 && break
  6112. + done
  6113. + rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
  6114. +esac
  6115. +
  6116. + $ac_path_EGREP_found && break 3
  6117. + done
  6118. + done
  6119. + done
  6120. +IFS=$as_save_IFS
  6121. + if test -z "$ac_cv_path_EGREP"; then
  6122. + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
  6123. + fi
  6124. +else
  6125. + ac_cv_path_EGREP=$EGREP
  6126. +fi
  6127. +
  6128. + fi
  6129. +fi
  6130. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
  6131. +$as_echo "$ac_cv_path_EGREP" >&6; }
  6132. + EGREP="$ac_cv_path_EGREP"
  6133. +
  6134. +
  6135. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
  6136. +$as_echo_n "checking for ANSI C header files... " >&6; }
  6137. +if ${ac_cv_header_stdc+:} false; then :
  6138. + $as_echo_n "(cached) " >&6
  6139. +else
  6140. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  6141. +/* end confdefs.h. */
  6142. +#include <stdlib.h>
  6143. +#include <stdarg.h>
  6144. +#include <string.h>
  6145. +#include <float.h>
  6146. +
  6147. +int
  6148. +main ()
  6149. +{
  6150. +
  6151. + ;
  6152. + return 0;
  6153. +}
  6154. +_ACEOF
  6155. +if ac_fn_c_try_compile "$LINENO"; then :
  6156. + ac_cv_header_stdc=yes
  6157. +else
  6158. + ac_cv_header_stdc=no
  6159. +fi
  6160. +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  6161. +
  6162. +if test $ac_cv_header_stdc = yes; then
  6163. + # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  6164. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  6165. +/* end confdefs.h. */
  6166. +#include <string.h>
  6167. +
  6168. +_ACEOF
  6169. +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  6170. + $EGREP "memchr" >/dev/null 2>&1; then :
  6171. +
  6172. +else
  6173. + ac_cv_header_stdc=no
  6174. +fi
  6175. +rm -f conftest*
  6176. +
  6177. +fi
  6178. +
  6179. +if test $ac_cv_header_stdc = yes; then
  6180. + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  6181. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  6182. +/* end confdefs.h. */
  6183. +#include <stdlib.h>
  6184. +
  6185. +_ACEOF
  6186. +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  6187. + $EGREP "free" >/dev/null 2>&1; then :
  6188. +
  6189. +else
  6190. + ac_cv_header_stdc=no
  6191. +fi
  6192. +rm -f conftest*
  6193. +
  6194. +fi
  6195. +
  6196. +if test $ac_cv_header_stdc = yes; then
  6197. + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  6198. + if test "$cross_compiling" = yes; then :
  6199. + :
  6200. +else
  6201. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  6202. +/* end confdefs.h. */
  6203. +#include <ctype.h>
  6204. +#include <stdlib.h>
  6205. +#if ((' ' & 0x0FF) == 0x020)
  6206. +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  6207. +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  6208. +#else
  6209. +# define ISLOWER(c) \
  6210. + (('a' <= (c) && (c) <= 'i') \
  6211. + || ('j' <= (c) && (c) <= 'r') \
  6212. + || ('s' <= (c) && (c) <= 'z'))
  6213. +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
  6214. +#endif
  6215. +
  6216. +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  6217. +int
  6218. +main ()
  6219. +{
  6220. + int i;
  6221. + for (i = 0; i < 256; i++)
  6222. + if (XOR (islower (i), ISLOWER (i))
  6223. + || toupper (i) != TOUPPER (i))
  6224. + return 2;
  6225. + return 0;
  6226. +}
  6227. +_ACEOF
  6228. +if ac_fn_c_try_run "$LINENO"; then :
  6229. +
  6230. +else
  6231. + ac_cv_header_stdc=no
  6232. +fi
  6233. +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  6234. + conftest.$ac_objext conftest.beam conftest.$ac_ext
  6235. +fi
  6236. +
  6237. +fi
  6238. +fi
  6239. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
  6240. +$as_echo "$ac_cv_header_stdc" >&6; }
  6241. +if test $ac_cv_header_stdc = yes; then
  6242. +
  6243. +$as_echo "#define STDC_HEADERS 1" >>confdefs.h
  6244. +
  6245. +fi
  6246. +
  6247. +# On IRIX 5.3, sys/types and inttypes.h are conflicting.
  6248. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
  6249. + inttypes.h stdint.h unistd.h
  6250. +do :
  6251. + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
  6252. +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
  6253. +"
  6254. +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  6255. + cat >>confdefs.h <<_ACEOF
  6256. +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  6257. +_ACEOF
  6258. +
  6259. +fi
  6260. +
  6261. +done
  6262. +
  6263. +
  6264. +
  6265. + ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
  6266. +if test "x$ac_cv_header_minix_config_h" = xyes; then :
  6267. + MINIX=yes
  6268. +else
  6269. + MINIX=
  6270. +fi
  6271. +
  6272. +
  6273. + if test "$MINIX" = yes; then
  6274. +
  6275. +$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
  6276. +
  6277. +
  6278. +$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
  6279. +
  6280. +
  6281. +$as_echo "#define _MINIX 1" >>confdefs.h
  6282. +
  6283. + fi
  6284. +
  6285. +
  6286. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
  6287. +$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
  6288. +if ${ac_cv_safe_to_define___extensions__+:} false; then :
  6289. + $as_echo_n "(cached) " >&6
  6290. +else
  6291. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  6292. +/* end confdefs.h. */
  6293. +
  6294. +# define __EXTENSIONS__ 1
  6295. + $ac_includes_default
  6296. +int
  6297. +main ()
  6298. +{
  6299. +
  6300. + ;
  6301. + return 0;
  6302. +}
  6303. +_ACEOF
  6304. +if ac_fn_c_try_compile "$LINENO"; then :
  6305. + ac_cv_safe_to_define___extensions__=yes
  6306. +else
  6307. + ac_cv_safe_to_define___extensions__=no
  6308. +fi
  6309. +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  6310. +fi
  6311. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
  6312. +$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
  6313. + test $ac_cv_safe_to_define___extensions__ = yes &&
  6314. + $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
  6315. +
  6316. + $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
  6317. +
  6318. + $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
  6319. +
  6320. + $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
  6321. +
  6322. + $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
  6323. +
  6324. +
  6325. +test "$program_prefix" != NONE &&
  6326. + program_transform_name="s&^&$program_prefix&;$program_transform_name"
  6327. +# Use a double $ so make ignores it.
  6328. +test "$program_suffix" != NONE &&
  6329. + program_transform_name="s&\$&$program_suffix&;$program_transform_name"
  6330. +# Double any \ or $.
  6331. +# By default was `s,x,x', remove it if useless.
  6332. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
  6333. +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
  6334. +
  6335. +# Find a good install program. We prefer a C program (faster),
  6336. +# so one script is as good as another. But avoid the broken or
  6337. +# incompatible versions:
  6338. +# SysV /etc/install, /usr/sbin/install
  6339. +# SunOS /usr/etc/install
  6340. +# IRIX /sbin/install
  6341. +# AIX /bin/install
  6342. +# AmigaOS /C/install, which installs bootblocks on floppy discs
  6343. +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
  6344. +# AFS /usr/afsws/bin/install, which mishandles nonexistent args
  6345. +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  6346. +# OS/2's system install, which has a completely different semantic
  6347. +# ./install, which can be erroneously created by make from ./install.sh.
  6348. +# Reject install programs that cannot install multiple files.
  6349. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
  6350. +$as_echo_n "checking for a BSD-compatible install... " >&6; }
  6351. +if test -z "$INSTALL"; then
  6352. +if ${ac_cv_path_install+:} false; then :
  6353. + $as_echo_n "(cached) " >&6
  6354. +else
  6355. + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6356. +for as_dir in $PATH
  6357. +do
  6358. + IFS=$as_save_IFS
  6359. + test -z "$as_dir" && as_dir=.
  6360. + # Account for people who put trailing slashes in PATH elements.
  6361. +case $as_dir/ in #((
  6362. + ./ | .// | /[cC]/* | \
  6363. + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
  6364. + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
  6365. + /usr/ucb/* ) ;;
  6366. + *)
  6367. + # OSF1 and SCO ODT 3.0 have their own names for install.
  6368. + # Don't use installbsd from OSF since it installs stuff as root
  6369. + # by default.
  6370. + for ac_prog in ginstall scoinst install; do
  6371. + for ac_exec_ext in '' $ac_executable_extensions; do
  6372. + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
  6373. + if test $ac_prog = install &&
  6374. + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
  6375. + # AIX install. It has an incompatible calling convention.
  6376. + :
  6377. + elif test $ac_prog = install &&
  6378. + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
  6379. + # program-specific install script used by HP pwplus--don't use.
  6380. + :
  6381. + else
  6382. + rm -rf conftest.one conftest.two conftest.dir
  6383. + echo one > conftest.one
  6384. + echo two > conftest.two
  6385. + mkdir conftest.dir
  6386. + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
  6387. + test -s conftest.one && test -s conftest.two &&
  6388. + test -s conftest.dir/conftest.one &&
  6389. + test -s conftest.dir/conftest.two
  6390. + then
  6391. + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
  6392. + break 3
  6393. + fi
  6394. + fi
  6395. + fi
  6396. + done
  6397. + done
  6398. + ;;
  6399. +esac
  6400. +
  6401. + done
  6402. +IFS=$as_save_IFS
  6403. +
  6404. +rm -rf conftest.one conftest.two conftest.dir
  6405. +
  6406. +fi
  6407. + if test "${ac_cv_path_install+set}" = set; then
  6408. + INSTALL=$ac_cv_path_install
  6409. + else
  6410. + # As a last resort, use the slow shell script. Don't cache a
  6411. + # value for INSTALL within a source directory, because that will
  6412. + # break other packages using the cache if that directory is
  6413. + # removed, or if the value is a relative name.
  6414. + INSTALL=$ac_install_sh
  6415. + fi
  6416. +fi
  6417. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
  6418. +$as_echo "$INSTALL" >&6; }
  6419. +
  6420. +# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  6421. +# It thinks the first close brace ends the variable substitution.
  6422. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  6423. +
  6424. +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
  6425. +
  6426. +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  6427. +
  6428. +rm -rf .tst 2>/dev/null
  6429. +mkdir .tst 2>/dev/null
  6430. +if test -d .tst; then
  6431. + am__leading_dot=.
  6432. +else
  6433. + am__leading_dot=_
  6434. +fi
  6435. +rmdir .tst 2>/dev/null
  6436. +
  6437. +DEPDIR="${am__leading_dot}deps"
  6438. +
  6439. +case `pwd` in
  6440. + *\ * | *\ *)
  6441. + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
  6442. +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
  6443. +esac
  6444. +
  6445. +
  6446. +
  6447. +macro_version='2.2.7a'
  6448. +macro_revision='1.3134'
  6449. +
  6450. +
  6451. +
  6452. +
  6453. +
  6454. +
  6455. +
  6456. +
  6457. +
  6458. +
  6459. +
  6460. +
  6461. +
  6462. +ltmain="$ac_aux_dir/ltmain.sh"
  6463. +
  6464. +# Backslashify metacharacters that are still active within
  6465. +# double-quoted strings.
  6466. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
  6467. +
  6468. +# Same as above, but do not quote variable references.
  6469. +double_quote_subst='s/\(["`\\]\)/\\\1/g'
  6470. +
  6471. +# Sed substitution to delay expansion of an escaped shell variable in a
  6472. +# double_quote_subst'ed string.
  6473. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
  6474. +
  6475. +# Sed substitution to delay expansion of an escaped single quote.
  6476. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
  6477. +
  6478. +# Sed substitution to avoid accidental globbing in evaled expressions
  6479. +no_glob_subst='s/\*/\\\*/g'
  6480. +
  6481. +ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  6482. +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  6483. +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  6484. +
  6485. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
  6486. +$as_echo_n "checking how to print strings... " >&6; }
  6487. +# Test print first, because it will be a builtin if present.
  6488. +if test "X`print -r -- -n 2>/dev/null`" = X-n && \
  6489. + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
  6490. + ECHO='print -r --'
  6491. +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
  6492. + ECHO='printf %s\n'
  6493. +else
  6494. + # Use this function as a fallback that always works.
  6495. + func_fallback_echo ()
  6496. + {
  6497. + eval 'cat <<_LTECHO_EOF
  6498. +$1
  6499. +_LTECHO_EOF'
  6500. + }
  6501. + ECHO='func_fallback_echo'
  6502. +fi
  6503. +
  6504. +# func_echo_all arg...
  6505. +# Invoke $ECHO with all args, space-separated.
  6506. +func_echo_all ()
  6507. +{
  6508. + $ECHO ""
  6509. +}
  6510. +
  6511. +case "$ECHO" in
  6512. + printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
  6513. +$as_echo "printf" >&6; } ;;
  6514. + print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
  6515. +$as_echo "print -r" >&6; } ;;
  6516. + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
  6517. +$as_echo "cat" >&6; } ;;
  6518. +esac
  6519. +
  6520. +
  6521. +
  6522. +
  6523. +
  6524. +
  6525. +
  6526. +
  6527. +
  6528. +
  6529. +
  6530. +
  6531. +
  6532. +
  6533. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
  6534. +$as_echo_n "checking for a sed that does not truncate output... " >&6; }
  6535. +if ${ac_cv_path_SED+:} false; then :
  6536. + $as_echo_n "(cached) " >&6
  6537. +else
  6538. + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
  6539. + for ac_i in 1 2 3 4 5 6 7; do
  6540. + ac_script="$ac_script$as_nl$ac_script"
  6541. + done
  6542. + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
  6543. + { ac_script=; unset ac_script;}
  6544. + if test -z "$SED"; then
  6545. + ac_path_SED_found=false
  6546. + # Loop through the user's path and test for each of PROGNAME-LIST
  6547. + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6548. +for as_dir in $PATH
  6549. +do
  6550. + IFS=$as_save_IFS
  6551. + test -z "$as_dir" && as_dir=.
  6552. + for ac_prog in sed gsed; do
  6553. + for ac_exec_ext in '' $ac_executable_extensions; do
  6554. + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
  6555. + as_fn_executable_p "$ac_path_SED" || continue
  6556. +# Check for GNU ac_path_SED and select it if it is found.
  6557. + # Check for GNU $ac_path_SED
  6558. +case `"$ac_path_SED" --version 2>&1` in
  6559. +*GNU*)
  6560. + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
  6561. +*)
  6562. + ac_count=0
  6563. + $as_echo_n 0123456789 >"conftest.in"
  6564. + while :
  6565. + do
  6566. + cat "conftest.in" "conftest.in" >"conftest.tmp"
  6567. + mv "conftest.tmp" "conftest.in"
  6568. + cp "conftest.in" "conftest.nl"
  6569. + $as_echo '' >> "conftest.nl"
  6570. + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
  6571. + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
  6572. + as_fn_arith $ac_count + 1 && ac_count=$as_val
  6573. + if test $ac_count -gt ${ac_path_SED_max-0}; then
  6574. + # Best one so far, save it but keep looking for a better one
  6575. + ac_cv_path_SED="$ac_path_SED"
  6576. + ac_path_SED_max=$ac_count
  6577. + fi
  6578. + # 10*(2^10) chars as input seems more than enough
  6579. + test $ac_count -gt 10 && break
  6580. + done
  6581. + rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
  6582. +esac
  6583. +
  6584. + $ac_path_SED_found && break 3
  6585. + done
  6586. + done
  6587. + done
  6588. +IFS=$as_save_IFS
  6589. + if test -z "$ac_cv_path_SED"; then
  6590. + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
  6591. + fi
  6592. +else
  6593. + ac_cv_path_SED=$SED
  6594. +fi
  6595. +
  6596. +fi
  6597. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
  6598. +$as_echo "$ac_cv_path_SED" >&6; }
  6599. + SED="$ac_cv_path_SED"
  6600. + rm -f conftest.sed
  6601. +
  6602. +test -z "$SED" && SED=sed
  6603. +Xsed="$SED -e 1s/^X//"
  6604. +
  6605. +
  6606. +
  6607. +
  6608. +
  6609. +
  6610. +
  6611. +
  6612. +
  6613. +
  6614. +
  6615. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
  6616. +$as_echo_n "checking for fgrep... " >&6; }
  6617. +if ${ac_cv_path_FGREP+:} false; then :
  6618. + $as_echo_n "(cached) " >&6
  6619. +else
  6620. + if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
  6621. + then ac_cv_path_FGREP="$GREP -F"
  6622. + else
  6623. + if test -z "$FGREP"; then
  6624. + ac_path_FGREP_found=false
  6625. + # Loop through the user's path and test for each of PROGNAME-LIST
  6626. + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6627. +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
  6628. +do
  6629. + IFS=$as_save_IFS
  6630. + test -z "$as_dir" && as_dir=.
  6631. + for ac_prog in fgrep; do
  6632. + for ac_exec_ext in '' $ac_executable_extensions; do
  6633. + ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
  6634. + as_fn_executable_p "$ac_path_FGREP" || continue
  6635. +# Check for GNU ac_path_FGREP and select it if it is found.
  6636. + # Check for GNU $ac_path_FGREP
  6637. +case `"$ac_path_FGREP" --version 2>&1` in
  6638. +*GNU*)
  6639. + ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
  6640. +*)
  6641. + ac_count=0
  6642. + $as_echo_n 0123456789 >"conftest.in"
  6643. + while :
  6644. + do
  6645. + cat "conftest.in" "conftest.in" >"conftest.tmp"
  6646. + mv "conftest.tmp" "conftest.in"
  6647. + cp "conftest.in" "conftest.nl"
  6648. + $as_echo 'FGREP' >> "conftest.nl"
  6649. + "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
  6650. + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
  6651. + as_fn_arith $ac_count + 1 && ac_count=$as_val
  6652. + if test $ac_count -gt ${ac_path_FGREP_max-0}; then
  6653. + # Best one so far, save it but keep looking for a better one
  6654. + ac_cv_path_FGREP="$ac_path_FGREP"
  6655. + ac_path_FGREP_max=$ac_count
  6656. + fi
  6657. + # 10*(2^10) chars as input seems more than enough
  6658. + test $ac_count -gt 10 && break
  6659. + done
  6660. + rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
  6661. +esac
  6662. +
  6663. + $ac_path_FGREP_found && break 3
  6664. + done
  6665. + done
  6666. + done
  6667. +IFS=$as_save_IFS
  6668. + if test -z "$ac_cv_path_FGREP"; then
  6669. + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
  6670. + fi
  6671. +else
  6672. + ac_cv_path_FGREP=$FGREP
  6673. +fi
  6674. +
  6675. + fi
  6676. +fi
  6677. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
  6678. +$as_echo "$ac_cv_path_FGREP" >&6; }
  6679. + FGREP="$ac_cv_path_FGREP"
  6680. +
  6681. +
  6682. +test -z "$GREP" && GREP=grep
  6683. +
  6684. +
  6685. +
  6686. +
  6687. +
  6688. +
  6689. +
  6690. +
  6691. +
  6692. +
  6693. +
  6694. +
  6695. +
  6696. +
  6697. +
  6698. +
  6699. +
  6700. +
  6701. +
  6702. +# Check whether --with-gnu-ld was given.
  6703. +if test "${with_gnu_ld+set}" = set; then :
  6704. + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
  6705. +else
  6706. + with_gnu_ld=no
  6707. +fi
  6708. +
  6709. +ac_prog=ld
  6710. +if test "$GCC" = yes; then
  6711. + # Check if gcc -print-prog-name=ld gives a path.
  6712. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
  6713. +$as_echo_n "checking for ld used by $CC... " >&6; }
  6714. + case $host in
  6715. + *-*-mingw*)
  6716. + # gcc leaves a trailing carriage return which upsets mingw
  6717. + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  6718. + *)
  6719. + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  6720. + esac
  6721. + case $ac_prog in
  6722. + # Accept absolute paths.
  6723. + [\\/]* | ?:[\\/]*)
  6724. + re_direlt='/[^/][^/]*/\.\./'
  6725. + # Canonicalize the pathname of ld
  6726. + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
  6727. + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
  6728. + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
  6729. + done
  6730. + test -z "$LD" && LD="$ac_prog"
  6731. + ;;
  6732. + "")
  6733. + # If it fails, then pretend we aren't using GCC.
  6734. + ac_prog=ld
  6735. + ;;
  6736. + *)
  6737. + # If it is relative, then search for the first ld in PATH.
  6738. + with_gnu_ld=unknown
  6739. + ;;
  6740. + esac
  6741. +elif test "$with_gnu_ld" = yes; then
  6742. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
  6743. +$as_echo_n "checking for GNU ld... " >&6; }
  6744. +else
  6745. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
  6746. +$as_echo_n "checking for non-GNU ld... " >&6; }
  6747. +fi
  6748. +if ${lt_cv_path_LD+:} false; then :
  6749. + $as_echo_n "(cached) " >&6
  6750. +else
  6751. + if test -z "$LD"; then
  6752. + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  6753. + for ac_dir in $PATH; do
  6754. + IFS="$lt_save_ifs"
  6755. + test -z "$ac_dir" && ac_dir=.
  6756. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  6757. + lt_cv_path_LD="$ac_dir/$ac_prog"
  6758. + # Check to see if the program is GNU ld. I'd rather use --version,
  6759. + # but apparently some variants of GNU ld only accept -v.
  6760. + # Break only if it was the GNU/non-GNU ld that we prefer.
  6761. + case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
  6762. + *GNU* | *'with BFD'*)
  6763. + test "$with_gnu_ld" != no && break
  6764. + ;;
  6765. + *)
  6766. + test "$with_gnu_ld" != yes && break
  6767. + ;;
  6768. + esac
  6769. + fi
  6770. + done
  6771. + IFS="$lt_save_ifs"
  6772. +else
  6773. + lt_cv_path_LD="$LD" # Let the user override the test with a path.
  6774. +fi
  6775. +fi
  6776. +
  6777. +LD="$lt_cv_path_LD"
  6778. +if test -n "$LD"; then
  6779. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
  6780. +$as_echo "$LD" >&6; }
  6781. +else
  6782. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  6783. +$as_echo "no" >&6; }
  6784. +fi
  6785. +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
  6786. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
  6787. +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
  6788. +if ${lt_cv_prog_gnu_ld+:} false; then :
  6789. + $as_echo_n "(cached) " >&6
  6790. +else
  6791. + # I'd rather use --version here, but apparently some GNU lds only accept -v.
  6792. +case `$LD -v 2>&1 </dev/null` in
  6793. +*GNU* | *'with BFD'*)
  6794. + lt_cv_prog_gnu_ld=yes
  6795. + ;;
  6796. +*)
  6797. + lt_cv_prog_gnu_ld=no
  6798. + ;;
  6799. +esac
  6800. +fi
  6801. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
  6802. +$as_echo "$lt_cv_prog_gnu_ld" >&6; }
  6803. +with_gnu_ld=$lt_cv_prog_gnu_ld
  6804. +
  6805. +
  6806. +
  6807. +
  6808. +
  6809. +
  6810. +
  6811. +
  6812. +
  6813. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
  6814. +$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
  6815. +if ${lt_cv_path_NM+:} false; then :
  6816. + $as_echo_n "(cached) " >&6
  6817. +else
  6818. + if test -n "$NM"; then
  6819. + # Let the user override the test.
  6820. + lt_cv_path_NM="$NM"
  6821. +else
  6822. + lt_nm_to_check="${ac_tool_prefix}nm"
  6823. + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
  6824. + lt_nm_to_check="$lt_nm_to_check nm"
  6825. + fi
  6826. + for lt_tmp_nm in $lt_nm_to_check; do
  6827. + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  6828. + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
  6829. + IFS="$lt_save_ifs"
  6830. + test -z "$ac_dir" && ac_dir=.
  6831. + tmp_nm="$ac_dir/$lt_tmp_nm"
  6832. + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
  6833. + # Check to see if the nm accepts a BSD-compat flag.
  6834. + # Adding the `sed 1q' prevents false positives on HP-UX, which says:
  6835. + # nm: unknown option "B" ignored
  6836. + # Tru64's nm complains that /dev/null is an invalid object file
  6837. + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
  6838. + */dev/null* | *'Invalid file or object type'*)
  6839. + lt_cv_path_NM="$tmp_nm -B"
  6840. + break
  6841. + ;;
  6842. + *)
  6843. + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
  6844. + */dev/null*)
  6845. + lt_cv_path_NM="$tmp_nm -p"
  6846. + break
  6847. + ;;
  6848. + *)
  6849. + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
  6850. + continue # so that we can try to find one that supports BSD flags
  6851. + ;;
  6852. + esac
  6853. + ;;
  6854. + esac
  6855. + fi
  6856. + done
  6857. + IFS="$lt_save_ifs"
  6858. + done
  6859. + : ${lt_cv_path_NM=no}
  6860. +fi
  6861. +fi
  6862. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
  6863. +$as_echo "$lt_cv_path_NM" >&6; }
  6864. +if test "$lt_cv_path_NM" != "no"; then
  6865. + NM="$lt_cv_path_NM"
  6866. +else
  6867. + # Didn't find any BSD compatible name lister, look for dumpbin.
  6868. + if test -n "$DUMPBIN"; then :
  6869. + # Let the user override the test.
  6870. + else
  6871. + if test -n "$ac_tool_prefix"; then
  6872. + for ac_prog in dumpbin "link -dump"
  6873. + do
  6874. + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
  6875. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2
  6876. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  6877. +$as_echo_n "checking for $ac_word... " >&6; }
  6878. +if ${ac_cv_prog_DUMPBIN+:} false; then :
  6879. + $as_echo_n "(cached) " >&6
  6880. +else
  6881. + if test -n "$DUMPBIN"; then
  6882. + ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
  6883. +else
  6884. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6885. +for as_dir in $PATH
  6886. +do
  6887. + IFS=$as_save_IFS
  6888. + test -z "$as_dir" && as_dir=.
  6889. + for ac_exec_ext in '' $ac_executable_extensions; do
  6890. + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  6891. + ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
  6892. + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  6893. + break 2
  6894. + fi
  6895. +done
  6896. + done
  6897. +IFS=$as_save_IFS
  6898. +
  6899. +fi
  6900. +fi
  6901. +DUMPBIN=$ac_cv_prog_DUMPBIN
  6902. +if test -n "$DUMPBIN"; then
  6903. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
  6904. +$as_echo "$DUMPBIN" >&6; }
  6905. +else
  6906. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  6907. +$as_echo "no" >&6; }
  6908. +fi
  6909. +
  6910. +
  6911. + test -n "$DUMPBIN" && break
  6912. + done
  6913. +fi
  6914. +if test -z "$DUMPBIN"; then
  6915. + ac_ct_DUMPBIN=$DUMPBIN
  6916. + for ac_prog in dumpbin "link -dump"
  6917. +do
  6918. + # Extract the first word of "$ac_prog", so it can be a program name with args.
  6919. +set dummy $ac_prog; ac_word=$2
  6920. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  6921. +$as_echo_n "checking for $ac_word... " >&6; }
  6922. +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
  6923. + $as_echo_n "(cached) " >&6
  6924. +else
  6925. + if test -n "$ac_ct_DUMPBIN"; then
  6926. + ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
  6927. +else
  6928. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6929. +for as_dir in $PATH
  6930. +do
  6931. + IFS=$as_save_IFS
  6932. + test -z "$as_dir" && as_dir=.
  6933. + for ac_exec_ext in '' $ac_executable_extensions; do
  6934. + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  6935. + ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
  6936. + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  6937. + break 2
  6938. + fi
  6939. +done
  6940. + done
  6941. +IFS=$as_save_IFS
  6942. +
  6943. +fi
  6944. +fi
  6945. +ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
  6946. +if test -n "$ac_ct_DUMPBIN"; then
  6947. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
  6948. +$as_echo "$ac_ct_DUMPBIN" >&6; }
  6949. +else
  6950. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  6951. +$as_echo "no" >&6; }
  6952. +fi
  6953. +
  6954. +
  6955. + test -n "$ac_ct_DUMPBIN" && break
  6956. +done
  6957. +
  6958. + if test "x$ac_ct_DUMPBIN" = x; then
  6959. + DUMPBIN=":"
  6960. + else
  6961. + case $cross_compiling:$ac_tool_warned in
  6962. +yes:)
  6963. +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  6964. +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  6965. +ac_tool_warned=yes ;;
  6966. +esac
  6967. + DUMPBIN=$ac_ct_DUMPBIN
  6968. + fi
  6969. +fi
  6970. +
  6971. + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
  6972. + *COFF*)
  6973. + DUMPBIN="$DUMPBIN -symbols"
  6974. + ;;
  6975. + *)
  6976. + DUMPBIN=:
  6977. + ;;
  6978. + esac
  6979. + fi
  6980. +
  6981. + if test "$DUMPBIN" != ":"; then
  6982. + NM="$DUMPBIN"
  6983. + fi
  6984. +fi
  6985. +test -z "$NM" && NM=nm
  6986. +
  6987. +
  6988. +
  6989. +
  6990. +
  6991. +
  6992. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
  6993. +$as_echo_n "checking the name lister ($NM) interface... " >&6; }
  6994. +if ${lt_cv_nm_interface+:} false; then :
  6995. + $as_echo_n "(cached) " >&6
  6996. +else
  6997. + lt_cv_nm_interface="BSD nm"
  6998. + echo "int some_variable = 0;" > conftest.$ac_ext
  6999. + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
  7000. + (eval "$ac_compile" 2>conftest.err)
  7001. + cat conftest.err >&5
  7002. + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
  7003. + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
  7004. + cat conftest.err >&5
  7005. + (eval echo "\"\$as_me:$LINENO: output\"" >&5)
  7006. + cat conftest.out >&5
  7007. + if $GREP 'External.*some_variable' conftest.out > /dev/null; then
  7008. + lt_cv_nm_interface="MS dumpbin"
  7009. + fi
  7010. + rm -f conftest*
  7011. +fi
  7012. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
  7013. +$as_echo "$lt_cv_nm_interface" >&6; }
  7014. +
  7015. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
  7016. +$as_echo_n "checking whether ln -s works... " >&6; }
  7017. +LN_S=$as_ln_s
  7018. +if test "$LN_S" = "ln -s"; then
  7019. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  7020. +$as_echo "yes" >&6; }
  7021. +else
  7022. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
  7023. +$as_echo "no, using $LN_S" >&6; }
  7024. +fi
  7025. +
  7026. +# find the maximum length of command line arguments
  7027. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
  7028. +$as_echo_n "checking the maximum length of command line arguments... " >&6; }
  7029. +if ${lt_cv_sys_max_cmd_len+:} false; then :
  7030. + $as_echo_n "(cached) " >&6
  7031. +else
  7032. + i=0
  7033. + teststring="ABCD"
  7034. +
  7035. + case $build_os in
  7036. + msdosdjgpp*)
  7037. + # On DJGPP, this test can blow up pretty badly due to problems in libc
  7038. + # (any single argument exceeding 2000 bytes causes a buffer overrun
  7039. + # during glob expansion). Even if it were fixed, the result of this
  7040. + # check would be larger than it should be.
  7041. + lt_cv_sys_max_cmd_len=12288; # 12K is about right
  7042. + ;;
  7043. +
  7044. + gnu*)
  7045. + # Under GNU Hurd, this test is not required because there is
  7046. + # no limit to the length of command line arguments.
  7047. + # Libtool will interpret -1 as no limit whatsoever
  7048. + lt_cv_sys_max_cmd_len=-1;
  7049. + ;;
  7050. +
  7051. + cygwin* | mingw* | cegcc*)
  7052. + # On Win9x/ME, this test blows up -- it succeeds, but takes
  7053. + # about 5 minutes as the teststring grows exponentially.
  7054. + # Worse, since 9x/ME are not pre-emptively multitasking,
  7055. + # you end up with a "frozen" computer, even though with patience
  7056. + # the test eventually succeeds (with a max line length of 256k).
  7057. + # Instead, let's just punt: use the minimum linelength reported by
  7058. + # all of the supported platforms: 8192 (on NT/2K/XP).
  7059. + lt_cv_sys_max_cmd_len=8192;
  7060. + ;;
  7061. +
  7062. + mint*)
  7063. + # On MiNT this can take a long time and run out of memory.
  7064. + lt_cv_sys_max_cmd_len=8192;
  7065. + ;;
  7066. +
  7067. + amigaos*)
  7068. + # On AmigaOS with pdksh, this test takes hours, literally.
  7069. + # So we just punt and use a minimum line length of 8192.
  7070. + lt_cv_sys_max_cmd_len=8192;
  7071. + ;;
  7072. +
  7073. + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
  7074. + # This has been around since 386BSD, at least. Likely further.
  7075. + if test -x /sbin/sysctl; then
  7076. + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
  7077. + elif test -x /usr/sbin/sysctl; then
  7078. + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
  7079. + else
  7080. + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
  7081. + fi
  7082. + # And add a safety zone
  7083. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  7084. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  7085. + ;;
  7086. +
  7087. + interix*)
  7088. + # We know the value 262144 and hardcode it with a safety zone (like BSD)
  7089. + lt_cv_sys_max_cmd_len=196608
  7090. + ;;
  7091. +
  7092. + osf*)
  7093. + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
  7094. + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
  7095. + # nice to cause kernel panics so lets avoid the loop below.
  7096. + # First set a reasonable default.
  7097. + lt_cv_sys_max_cmd_len=16384
  7098. + #
  7099. + if test -x /sbin/sysconfig; then
  7100. + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
  7101. + *1*) lt_cv_sys_max_cmd_len=-1 ;;
  7102. + esac
  7103. + fi
  7104. + ;;
  7105. + sco3.2v5*)
  7106. + lt_cv_sys_max_cmd_len=102400
  7107. + ;;
  7108. + sysv5* | sco5v6* | sysv4.2uw2*)
  7109. + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
  7110. + if test -n "$kargmax"; then
  7111. + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
  7112. + else
  7113. + lt_cv_sys_max_cmd_len=32768
  7114. + fi
  7115. + ;;
  7116. + *)
  7117. + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
  7118. + if test -n "$lt_cv_sys_max_cmd_len"; then
  7119. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  7120. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  7121. + else
  7122. + # Make teststring a little bigger before we do anything with it.
  7123. + # a 1K string should be a reasonable start.
  7124. + for i in 1 2 3 4 5 6 7 8 ; do
  7125. + teststring=$teststring$teststring
  7126. + done
  7127. + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
  7128. + # If test is not a shell built-in, we'll probably end up computing a
  7129. + # maximum length that is only half of the actual maximum length, but
  7130. + # we can't tell.
  7131. + while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
  7132. + = "X$teststring$teststring"; } >/dev/null 2>&1 &&
  7133. + test $i != 17 # 1/2 MB should be enough
  7134. + do
  7135. + i=`expr $i + 1`
  7136. + teststring=$teststring$teststring
  7137. + done
  7138. + # Only check the string length outside the loop.
  7139. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
  7140. + teststring=
  7141. + # Add a significant safety factor because C++ compilers can tack on
  7142. + # massive amounts of additional arguments before passing them to the
  7143. + # linker. It appears as though 1/2 is a usable value.
  7144. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
  7145. + fi
  7146. + ;;
  7147. + esac
  7148. +
  7149. +fi
  7150. +
  7151. +if test -n $lt_cv_sys_max_cmd_len ; then
  7152. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
  7153. +$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
  7154. +else
  7155. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
  7156. +$as_echo "none" >&6; }
  7157. +fi
  7158. +max_cmd_len=$lt_cv_sys_max_cmd_len
  7159. +
  7160. +
  7161. +
  7162. +
  7163. +
  7164. +
  7165. +: ${CP="cp -f"}
  7166. +: ${MV="mv -f"}
  7167. +: ${RM="rm -f"}
  7168. +
  7169. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
  7170. +$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
  7171. +# Try some XSI features
  7172. +xsi_shell=no
  7173. +( _lt_dummy="a/b/c"
  7174. + test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
  7175. + = c,a/b,, \
  7176. + && eval 'test $(( 1 + 1 )) -eq 2 \
  7177. + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
  7178. + && xsi_shell=yes
  7179. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
  7180. +$as_echo "$xsi_shell" >&6; }
  7181. +
  7182. +
  7183. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
  7184. +$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
  7185. +lt_shell_append=no
  7186. +( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
  7187. + >/dev/null 2>&1 \
  7188. + && lt_shell_append=yes
  7189. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
  7190. +$as_echo "$lt_shell_append" >&6; }
  7191. +
  7192. +
  7193. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
  7194. + lt_unset=unset
  7195. +else
  7196. + lt_unset=false
  7197. +fi
  7198. +
  7199. +
  7200. +
  7201. +
  7202. +
  7203. +# test EBCDIC or ASCII
  7204. +case `echo X|tr X '\101'` in
  7205. + A) # ASCII based system
  7206. + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
  7207. + lt_SP2NL='tr \040 \012'
  7208. + lt_NL2SP='tr \015\012 \040\040'
  7209. + ;;
  7210. + *) # EBCDIC based system
  7211. + lt_SP2NL='tr \100 \n'
  7212. + lt_NL2SP='tr \r\n \100\100'
  7213. + ;;
  7214. +esac
  7215. +
  7216. +
  7217. +
  7218. +
  7219. +
  7220. +
  7221. +
  7222. +
  7223. +
  7224. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
  7225. +$as_echo_n "checking for $LD option to reload object files... " >&6; }
  7226. +if ${lt_cv_ld_reload_flag+:} false; then :
  7227. + $as_echo_n "(cached) " >&6
  7228. +else
  7229. + lt_cv_ld_reload_flag='-r'
  7230. +fi
  7231. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
  7232. +$as_echo "$lt_cv_ld_reload_flag" >&6; }
  7233. +reload_flag=$lt_cv_ld_reload_flag
  7234. +case $reload_flag in
  7235. +"" | " "*) ;;
  7236. +*) reload_flag=" $reload_flag" ;;
  7237. +esac
  7238. +reload_cmds='$LD$reload_flag -o $output$reload_objs'
  7239. +case $host_os in
  7240. + darwin*)
  7241. + if test "$GCC" = yes; then
  7242. + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
  7243. + else
  7244. + reload_cmds='$LD$reload_flag -o $output$reload_objs'
  7245. + fi
  7246. + ;;
  7247. +esac
  7248. +
  7249. +
  7250. +
  7251. +
  7252. +
  7253. +
  7254. +
  7255. +
  7256. +
  7257. +if test -n "$ac_tool_prefix"; then
  7258. + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
  7259. +set dummy ${ac_tool_prefix}objdump; ac_word=$2
  7260. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  7261. +$as_echo_n "checking for $ac_word... " >&6; }
  7262. +if ${ac_cv_prog_OBJDUMP+:} false; then :
  7263. + $as_echo_n "(cached) " >&6
  7264. +else
  7265. + if test -n "$OBJDUMP"; then
  7266. + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
  7267. +else
  7268. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  7269. +for as_dir in $PATH
  7270. +do
  7271. + IFS=$as_save_IFS
  7272. + test -z "$as_dir" && as_dir=.
  7273. + for ac_exec_ext in '' $ac_executable_extensions; do
  7274. + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  7275. + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
  7276. + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  7277. + break 2
  7278. + fi
  7279. +done
  7280. + done
  7281. +IFS=$as_save_IFS
  7282. +
  7283. +fi
  7284. +fi
  7285. +OBJDUMP=$ac_cv_prog_OBJDUMP
  7286. +if test -n "$OBJDUMP"; then
  7287. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
  7288. +$as_echo "$OBJDUMP" >&6; }
  7289. +else
  7290. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  7291. +$as_echo "no" >&6; }
  7292. +fi
  7293. +
  7294. +
  7295. +fi
  7296. +if test -z "$ac_cv_prog_OBJDUMP"; then
  7297. + ac_ct_OBJDUMP=$OBJDUMP
  7298. + # Extract the first word of "objdump", so it can be a program name with args.
  7299. +set dummy objdump; ac_word=$2
  7300. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  7301. +$as_echo_n "checking for $ac_word... " >&6; }
  7302. +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
  7303. + $as_echo_n "(cached) " >&6
  7304. +else
  7305. + if test -n "$ac_ct_OBJDUMP"; then
  7306. + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
  7307. +else
  7308. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  7309. +for as_dir in $PATH
  7310. +do
  7311. + IFS=$as_save_IFS
  7312. + test -z "$as_dir" && as_dir=.
  7313. + for ac_exec_ext in '' $ac_executable_extensions; do
  7314. + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  7315. + ac_cv_prog_ac_ct_OBJDUMP="objdump"
  7316. + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  7317. + break 2
  7318. + fi
  7319. +done
  7320. + done
  7321. +IFS=$as_save_IFS
  7322. +
  7323. +fi
  7324. +fi
  7325. +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
  7326. +if test -n "$ac_ct_OBJDUMP"; then
  7327. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
  7328. +$as_echo "$ac_ct_OBJDUMP" >&6; }
  7329. +else
  7330. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  7331. +$as_echo "no" >&6; }
  7332. +fi
  7333. +
  7334. + if test "x$ac_ct_OBJDUMP" = x; then
  7335. + OBJDUMP="false"
  7336. + else
  7337. + case $cross_compiling:$ac_tool_warned in
  7338. +yes:)
  7339. +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  7340. +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  7341. +ac_tool_warned=yes ;;
  7342. +esac
  7343. + OBJDUMP=$ac_ct_OBJDUMP
  7344. + fi
  7345. +else
  7346. + OBJDUMP="$ac_cv_prog_OBJDUMP"
  7347. +fi
  7348. +
  7349. +test -z "$OBJDUMP" && OBJDUMP=objdump
  7350. +
  7351. +
  7352. +
  7353. +
  7354. +
  7355. +
  7356. +
  7357. +
  7358. +
  7359. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
  7360. +$as_echo_n "checking how to recognize dependent libraries... " >&6; }
  7361. +if ${lt_cv_deplibs_check_method+:} false; then :
  7362. + $as_echo_n "(cached) " >&6
  7363. +else
  7364. + lt_cv_file_magic_cmd='$MAGIC_CMD'
  7365. +lt_cv_file_magic_test_file=
  7366. +lt_cv_deplibs_check_method='unknown'
  7367. +# Need to set the preceding variable on all platforms that support
  7368. +# interlibrary dependencies.
  7369. +# 'none' -- dependencies not supported.
  7370. +# `unknown' -- same as none, but documents that we really don't know.
  7371. +# 'pass_all' -- all dependencies passed with no checks.
  7372. +# 'test_compile' -- check by making test program.
  7373. +# 'file_magic [[regex]]' -- check by looking for files in library path
  7374. +# which responds to the $file_magic_cmd with a given extended regex.
  7375. +# If you have `file' or equivalent on your system and you're not sure
  7376. +# whether `pass_all' will *always* work, you probably want this one.
  7377. +
  7378. +case $host_os in
  7379. +aix[4-9]*)
  7380. + lt_cv_deplibs_check_method=pass_all
  7381. + ;;
  7382. +
  7383. +beos*)
  7384. + lt_cv_deplibs_check_method=pass_all
  7385. + ;;
  7386. +
  7387. +bsdi[45]*)
  7388. + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
  7389. + lt_cv_file_magic_cmd='/usr/bin/file -L'
  7390. + lt_cv_file_magic_test_file=/shlib/libc.so
  7391. + ;;
  7392. +
  7393. +cygwin*)
  7394. + # func_win32_libid is a shell function defined in ltmain.sh
  7395. + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  7396. + lt_cv_file_magic_cmd='func_win32_libid'
  7397. + ;;
  7398. +
  7399. +mingw* | pw32*)
  7400. + # Base MSYS/MinGW do not provide the 'file' command needed by
  7401. + # func_win32_libid shell function, so use a weaker test based on 'objdump',
  7402. + # unless we find 'file', for example because we are cross-compiling.
  7403. + # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
  7404. + if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
  7405. + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  7406. + lt_cv_file_magic_cmd='func_win32_libid'
  7407. + else
  7408. + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
  7409. + lt_cv_file_magic_cmd='$OBJDUMP -f'
  7410. + fi
  7411. + ;;
  7412. +
  7413. +cegcc*)
  7414. + # use the weaker test based on 'objdump'. See mingw*.
  7415. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
  7416. + lt_cv_file_magic_cmd='$OBJDUMP -f'
  7417. + ;;
  7418. +
  7419. +darwin* | rhapsody*)
  7420. + lt_cv_deplibs_check_method=pass_all
  7421. + ;;
  7422. +
  7423. +freebsd* | dragonfly*)
  7424. + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  7425. + case $host_cpu in
  7426. + i*86 )
  7427. + # Not sure whether the presence of OpenBSD here was a mistake.
  7428. + # Let's accept both of them until this is cleared up.
  7429. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
  7430. + lt_cv_file_magic_cmd=/usr/bin/file
  7431. + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  7432. + ;;
  7433. + esac
  7434. + else
  7435. + lt_cv_deplibs_check_method=pass_all
  7436. + fi
  7437. + ;;
  7438. +
  7439. +gnu*)
  7440. + lt_cv_deplibs_check_method=pass_all
  7441. + ;;
  7442. +
  7443. +haiku*)
  7444. + lt_cv_deplibs_check_method=pass_all
  7445. + ;;
  7446. +
  7447. +hpux10.20* | hpux11*)
  7448. + lt_cv_file_magic_cmd=/usr/bin/file
  7449. + case $host_cpu in
  7450. + ia64*)
  7451. + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
  7452. + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
  7453. + ;;
  7454. + hppa*64*)
  7455. + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'
  7456. + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
  7457. + ;;
  7458. + *)
  7459. + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
  7460. + lt_cv_file_magic_test_file=/usr/lib/libc.sl
  7461. + ;;
  7462. + esac
  7463. + ;;
  7464. +
  7465. +interix[3-9]*)
  7466. + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
  7467. + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
  7468. + ;;
  7469. +
  7470. +irix5* | irix6* | nonstopux*)
  7471. + case $LD in
  7472. + *-32|*"-32 ") libmagic=32-bit;;
  7473. + *-n32|*"-n32 ") libmagic=N32;;
  7474. + *-64|*"-64 ") libmagic=64-bit;;
  7475. + *) libmagic=never-match;;
  7476. + esac
  7477. + lt_cv_deplibs_check_method=pass_all
  7478. + ;;
  7479. +
  7480. +# This must be Linux ELF.
  7481. +linux* | k*bsd*-gnu | kopensolaris*-gnu)
  7482. + lt_cv_deplibs_check_method=pass_all
  7483. + ;;
  7484. +
  7485. +netbsd*)
  7486. + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  7487. + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
  7488. + else
  7489. + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
  7490. + fi
  7491. + ;;
  7492. +
  7493. +newos6*)
  7494. + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
  7495. + lt_cv_file_magic_cmd=/usr/bin/file
  7496. + lt_cv_file_magic_test_file=/usr/lib/libnls.so
  7497. + ;;
  7498. +
  7499. +*nto* | *qnx*)
  7500. + lt_cv_deplibs_check_method=pass_all
  7501. + ;;
  7502. +
  7503. +openbsd*)
  7504. + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  7505. + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
  7506. + else
  7507. + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
  7508. + fi
  7509. + ;;
  7510. +
  7511. +osf3* | osf4* | osf5*)
  7512. + lt_cv_deplibs_check_method=pass_all
  7513. + ;;
  7514. +
  7515. +rdos*)
  7516. + lt_cv_deplibs_check_method=pass_all
  7517. + ;;
  7518. +
  7519. +solaris*)
  7520. + lt_cv_deplibs_check_method=pass_all
  7521. + ;;
  7522. +
  7523. +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  7524. + lt_cv_deplibs_check_method=pass_all
  7525. + ;;
  7526. +
  7527. +sysv4 | sysv4.3*)
  7528. + case $host_vendor in
  7529. + motorola)
  7530. + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
  7531. + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  7532. + ;;
  7533. + ncr)
  7534. + lt_cv_deplibs_check_method=pass_all
  7535. + ;;
  7536. + sequent)
  7537. + lt_cv_file_magic_cmd='/bin/file'
  7538. + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
  7539. + ;;
  7540. + sni)
  7541. + lt_cv_file_magic_cmd='/bin/file'
  7542. + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
  7543. + lt_cv_file_magic_test_file=/lib/libc.so
  7544. + ;;
  7545. + siemens)
  7546. + lt_cv_deplibs_check_method=pass_all
  7547. + ;;
  7548. + pc)
  7549. + lt_cv_deplibs_check_method=pass_all
  7550. + ;;
  7551. + esac
  7552. + ;;
  7553. +
  7554. +tpf*)
  7555. + lt_cv_deplibs_check_method=pass_all
  7556. + ;;
  7557. +esac
  7558. +
  7559. +fi
  7560. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
  7561. +$as_echo "$lt_cv_deplibs_check_method" >&6; }
  7562. +file_magic_cmd=$lt_cv_file_magic_cmd
  7563. +deplibs_check_method=$lt_cv_deplibs_check_method
  7564. +test -z "$deplibs_check_method" && deplibs_check_method=unknown
  7565. +
  7566. +
  7567. +
  7568. +
  7569. +
  7570. +
  7571. +
  7572. +
  7573. +
  7574. +
  7575. +
  7576. +
  7577. +if test -n "$ac_tool_prefix"; then
  7578. + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
  7579. +set dummy ${ac_tool_prefix}ar; ac_word=$2
  7580. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  7581. +$as_echo_n "checking for $ac_word... " >&6; }
  7582. +if ${ac_cv_prog_AR+:} false; then :
  7583. + $as_echo_n "(cached) " >&6
  7584. +else
  7585. + if test -n "$AR"; then
  7586. + ac_cv_prog_AR="$AR" # Let the user override the test.
  7587. +else
  7588. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  7589. +for as_dir in $PATH
  7590. +do
  7591. + IFS=$as_save_IFS
  7592. + test -z "$as_dir" && as_dir=.
  7593. + for ac_exec_ext in '' $ac_executable_extensions; do
  7594. + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  7595. + ac_cv_prog_AR="${ac_tool_prefix}ar"
  7596. + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  7597. + break 2
  7598. + fi
  7599. +done
  7600. + done
  7601. +IFS=$as_save_IFS
  7602. +
  7603. +fi
  7604. +fi
  7605. +AR=$ac_cv_prog_AR
  7606. +if test -n "$AR"; then
  7607. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
  7608. +$as_echo "$AR" >&6; }
  7609. +else
  7610. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  7611. +$as_echo "no" >&6; }
  7612. +fi
  7613. +
  7614. +
  7615. +fi
  7616. +if test -z "$ac_cv_prog_AR"; then
  7617. + ac_ct_AR=$AR
  7618. + # Extract the first word of "ar", so it can be a program name with args.
  7619. +set dummy ar; ac_word=$2
  7620. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  7621. +$as_echo_n "checking for $ac_word... " >&6; }
  7622. +if ${ac_cv_prog_ac_ct_AR+:} false; then :
  7623. + $as_echo_n "(cached) " >&6
  7624. +else
  7625. + if test -n "$ac_ct_AR"; then
  7626. + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
  7627. +else
  7628. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  7629. +for as_dir in $PATH
  7630. +do
  7631. + IFS=$as_save_IFS
  7632. + test -z "$as_dir" && as_dir=.
  7633. + for ac_exec_ext in '' $ac_executable_extensions; do
  7634. + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  7635. + ac_cv_prog_ac_ct_AR="ar"
  7636. + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  7637. + break 2
  7638. + fi
  7639. +done
  7640. + done
  7641. +IFS=$as_save_IFS
  7642. +
  7643. +fi
  7644. +fi
  7645. +ac_ct_AR=$ac_cv_prog_ac_ct_AR
  7646. +if test -n "$ac_ct_AR"; then
  7647. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
  7648. +$as_echo "$ac_ct_AR" >&6; }
  7649. +else
  7650. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  7651. +$as_echo "no" >&6; }
  7652. +fi
  7653. +
  7654. + if test "x$ac_ct_AR" = x; then
  7655. + AR="false"
  7656. + else
  7657. + case $cross_compiling:$ac_tool_warned in
  7658. +yes:)
  7659. +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  7660. +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  7661. +ac_tool_warned=yes ;;
  7662. +esac
  7663. + AR=$ac_ct_AR
  7664. + fi
  7665. +else
  7666. + AR="$ac_cv_prog_AR"
  7667. +fi
  7668. +
  7669. +test -z "$AR" && AR=ar
  7670. +test -z "$AR_FLAGS" && AR_FLAGS=cru
  7671. +
  7672. +
  7673. +
  7674. +
  7675. +
  7676. +
  7677. +
  7678. +
  7679. +
  7680. +
  7681. +
  7682. +if test -n "$ac_tool_prefix"; then
  7683. + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
  7684. +set dummy ${ac_tool_prefix}strip; ac_word=$2
  7685. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  7686. +$as_echo_n "checking for $ac_word... " >&6; }
  7687. +if ${ac_cv_prog_STRIP+:} false; then :
  7688. + $as_echo_n "(cached) " >&6
  7689. +else
  7690. + if test -n "$STRIP"; then
  7691. + ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
  7692. +else
  7693. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  7694. +for as_dir in $PATH
  7695. +do
  7696. + IFS=$as_save_IFS
  7697. + test -z "$as_dir" && as_dir=.
  7698. + for ac_exec_ext in '' $ac_executable_extensions; do
  7699. + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  7700. + ac_cv_prog_STRIP="${ac_tool_prefix}strip"
  7701. + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  7702. + break 2
  7703. + fi
  7704. +done
  7705. + done
  7706. +IFS=$as_save_IFS
  7707. +
  7708. +fi
  7709. +fi
  7710. +STRIP=$ac_cv_prog_STRIP
  7711. +if test -n "$STRIP"; then
  7712. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
  7713. +$as_echo "$STRIP" >&6; }
  7714. +else
  7715. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  7716. +$as_echo "no" >&6; }
  7717. +fi
  7718. +
  7719. +
  7720. +fi
  7721. +if test -z "$ac_cv_prog_STRIP"; then
  7722. + ac_ct_STRIP=$STRIP
  7723. + # Extract the first word of "strip", so it can be a program name with args.
  7724. +set dummy strip; ac_word=$2
  7725. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  7726. +$as_echo_n "checking for $ac_word... " >&6; }
  7727. +if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
  7728. + $as_echo_n "(cached) " >&6
  7729. +else
  7730. + if test -n "$ac_ct_STRIP"; then
  7731. + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
  7732. +else
  7733. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  7734. +for as_dir in $PATH
  7735. +do
  7736. + IFS=$as_save_IFS
  7737. + test -z "$as_dir" && as_dir=.
  7738. + for ac_exec_ext in '' $ac_executable_extensions; do
  7739. + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  7740. + ac_cv_prog_ac_ct_STRIP="strip"
  7741. + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  7742. + break 2
  7743. + fi
  7744. +done
  7745. + done
  7746. +IFS=$as_save_IFS
  7747. +
  7748. +fi
  7749. +fi
  7750. +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
  7751. +if test -n "$ac_ct_STRIP"; then
  7752. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
  7753. +$as_echo "$ac_ct_STRIP" >&6; }
  7754. +else
  7755. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  7756. +$as_echo "no" >&6; }
  7757. +fi
  7758. +
  7759. + if test "x$ac_ct_STRIP" = x; then
  7760. + STRIP=":"
  7761. + else
  7762. + case $cross_compiling:$ac_tool_warned in
  7763. +yes:)
  7764. +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  7765. +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  7766. +ac_tool_warned=yes ;;
  7767. +esac
  7768. + STRIP=$ac_ct_STRIP
  7769. + fi
  7770. +else
  7771. + STRIP="$ac_cv_prog_STRIP"
  7772. +fi
  7773. +
  7774. +test -z "$STRIP" && STRIP=:
  7775. +
  7776. +
  7777. +
  7778. +
  7779. +
  7780. +
  7781. +if test -n "$ac_tool_prefix"; then
  7782. + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
  7783. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2
  7784. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  7785. +$as_echo_n "checking for $ac_word... " >&6; }
  7786. +if ${ac_cv_prog_RANLIB+:} false; then :
  7787. + $as_echo_n "(cached) " >&6
  7788. +else
  7789. + if test -n "$RANLIB"; then
  7790. + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  7791. +else
  7792. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  7793. +for as_dir in $PATH
  7794. +do
  7795. + IFS=$as_save_IFS
  7796. + test -z "$as_dir" && as_dir=.
  7797. + for ac_exec_ext in '' $ac_executable_extensions; do
  7798. + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  7799. + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
  7800. + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  7801. + break 2
  7802. + fi
  7803. +done
  7804. + done
  7805. +IFS=$as_save_IFS
  7806. +
  7807. +fi
  7808. +fi
  7809. +RANLIB=$ac_cv_prog_RANLIB
  7810. +if test -n "$RANLIB"; then
  7811. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
  7812. +$as_echo "$RANLIB" >&6; }
  7813. +else
  7814. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  7815. +$as_echo "no" >&6; }
  7816. +fi
  7817. +
  7818. +
  7819. +fi
  7820. +if test -z "$ac_cv_prog_RANLIB"; then
  7821. + ac_ct_RANLIB=$RANLIB
  7822. + # Extract the first word of "ranlib", so it can be a program name with args.
  7823. +set dummy ranlib; ac_word=$2
  7824. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  7825. +$as_echo_n "checking for $ac_word... " >&6; }
  7826. +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
  7827. + $as_echo_n "(cached) " >&6
  7828. +else
  7829. + if test -n "$ac_ct_RANLIB"; then
  7830. + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
  7831. +else
  7832. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  7833. +for as_dir in $PATH
  7834. +do
  7835. + IFS=$as_save_IFS
  7836. + test -z "$as_dir" && as_dir=.
  7837. + for ac_exec_ext in '' $ac_executable_extensions; do
  7838. + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  7839. + ac_cv_prog_ac_ct_RANLIB="ranlib"
  7840. + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  7841. + break 2
  7842. + fi
  7843. +done
  7844. + done
  7845. +IFS=$as_save_IFS
  7846. +
  7847. +fi
  7848. +fi
  7849. +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
  7850. +if test -n "$ac_ct_RANLIB"; then
  7851. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
  7852. +$as_echo "$ac_ct_RANLIB" >&6; }
  7853. +else
  7854. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  7855. +$as_echo "no" >&6; }
  7856. +fi
  7857. +
  7858. + if test "x$ac_ct_RANLIB" = x; then
  7859. + RANLIB=":"
  7860. + else
  7861. + case $cross_compiling:$ac_tool_warned in
  7862. +yes:)
  7863. +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  7864. +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  7865. +ac_tool_warned=yes ;;
  7866. +esac
  7867. + RANLIB=$ac_ct_RANLIB
  7868. + fi
  7869. +else
  7870. + RANLIB="$ac_cv_prog_RANLIB"
  7871. +fi
  7872. +
  7873. +test -z "$RANLIB" && RANLIB=:
  7874. +
  7875. +
  7876. +
  7877. +
  7878. +
  7879. +
  7880. +# Determine commands to create old-style static archives.
  7881. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
  7882. +old_postinstall_cmds='chmod 644 $oldlib'
  7883. +old_postuninstall_cmds=
  7884. +
  7885. +if test -n "$RANLIB"; then
  7886. + case $host_os in
  7887. + openbsd*)
  7888. + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
  7889. + ;;
  7890. + *)
  7891. + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
  7892. + ;;
  7893. + esac
  7894. + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
  7895. +fi
  7896. +
  7897. +case $host_os in
  7898. + darwin*)
  7899. + lock_old_archive_extraction=yes ;;
  7900. + *)
  7901. + lock_old_archive_extraction=no ;;
  7902. +esac
  7903. +
  7904. +
  7905. +
  7906. +
  7907. +
  7908. +
  7909. +
  7910. +
  7911. +
  7912. +
  7913. +
  7914. +
  7915. +
  7916. +
  7917. +
  7918. +
  7919. +
  7920. +
  7921. +
  7922. +
  7923. +
  7924. +for ac_prog in gawk mawk nawk awk
  7925. +do
  7926. + # Extract the first word of "$ac_prog", so it can be a program name with args.
  7927. +set dummy $ac_prog; ac_word=$2
  7928. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  7929. +$as_echo_n "checking for $ac_word... " >&6; }
  7930. +if ${ac_cv_prog_AWK+:} false; then :
  7931. + $as_echo_n "(cached) " >&6
  7932. +else
  7933. + if test -n "$AWK"; then
  7934. + ac_cv_prog_AWK="$AWK" # Let the user override the test.
  7935. +else
  7936. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  7937. +for as_dir in $PATH
  7938. +do
  7939. + IFS=$as_save_IFS
  7940. + test -z "$as_dir" && as_dir=.
  7941. + for ac_exec_ext in '' $ac_executable_extensions; do
  7942. + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  7943. + ac_cv_prog_AWK="$ac_prog"
  7944. + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  7945. + break 2
  7946. + fi
  7947. +done
  7948. + done
  7949. +IFS=$as_save_IFS
  7950. +
  7951. +fi
  7952. +fi
  7953. +AWK=$ac_cv_prog_AWK
  7954. +if test -n "$AWK"; then
  7955. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
  7956. +$as_echo "$AWK" >&6; }
  7957. +else
  7958. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  7959. +$as_echo "no" >&6; }
  7960. +fi
  7961. +
  7962. +
  7963. + test -n "$AWK" && break
  7964. +done
  7965. +
  7966. +
  7967. +
  7968. +
  7969. +
  7970. +
  7971. +
  7972. +
  7973. +
  7974. +
  7975. +
  7976. +
  7977. +
  7978. +
  7979. +
  7980. +
  7981. +
  7982. +
  7983. +
  7984. +# If no C compiler was specified, use CC.
  7985. +LTCC=${LTCC-"$CC"}
  7986. +
  7987. +# If no C compiler flags were specified, use CFLAGS.
  7988. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
  7989. +
  7990. +# Allow CC to be a program name with arguments.
  7991. +compiler=$CC
  7992. +
  7993. +
  7994. +# Check for command to grab the raw symbol name followed by C symbol from nm.
  7995. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
  7996. +$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
  7997. +if ${lt_cv_sys_global_symbol_pipe+:} false; then :
  7998. + $as_echo_n "(cached) " >&6
  7999. +else
  8000. +
  8001. +# These are sane defaults that work on at least a few old systems.
  8002. +# [They come from Ultrix. What could be older than Ultrix?!! ;)]
  8003. +
  8004. +# Character class describing NM global symbol codes.
  8005. +symcode='[BCDEGRST]'
  8006. +
  8007. +# Regexp to match symbols that can be accessed directly from C.
  8008. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
  8009. +
  8010. +# Define system-specific variables.
  8011. +case $host_os in
  8012. +aix*)
  8013. + symcode='[BCDT]'
  8014. + ;;
  8015. +cygwin* | mingw* | pw32* | cegcc*)
  8016. + symcode='[ABCDGISTW]'
  8017. + ;;
  8018. +hpux*)
  8019. + if test "$host_cpu" = ia64; then
  8020. + symcode='[ABCDEGRST]'
  8021. + fi
  8022. + ;;
  8023. +irix* | nonstopux*)
  8024. + symcode='[BCDEGRST]'
  8025. + ;;
  8026. +osf*)
  8027. + symcode='[BCDEGQRST]'
  8028. + ;;
  8029. +solaris*)
  8030. + symcode='[BDRT]'
  8031. + ;;
  8032. +sco3.2v5*)
  8033. + symcode='[DT]'
  8034. + ;;
  8035. +sysv4.2uw2*)
  8036. + symcode='[DT]'
  8037. + ;;
  8038. +sysv5* | sco5v6* | unixware* | OpenUNIX*)
  8039. + symcode='[ABDT]'
  8040. + ;;
  8041. +sysv4)
  8042. + symcode='[DFNSTU]'
  8043. + ;;
  8044. +esac
  8045. +
  8046. +# If we're using GNU nm, then use its standard symbol codes.
  8047. +case `$NM -V 2>&1` in
  8048. +*GNU* | *'with BFD'*)
  8049. + symcode='[ABCDGIRSTW]' ;;
  8050. +esac
  8051. +
  8052. +# Transform an extracted symbol line into a proper C declaration.
  8053. +# Some systems (esp. on ia64) link data and code symbols differently,
  8054. +# so use this general approach.
  8055. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  8056. +
  8057. +# Transform an extracted symbol line into symbol name and symbol address
  8058. +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
  8059. +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
  8060. +
  8061. +# Handle CRLF in mingw tool chain
  8062. +opt_cr=
  8063. +case $build_os in
  8064. +mingw*)
  8065. + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  8066. + ;;
  8067. +esac
  8068. +
  8069. +# Try without a prefix underscore, then with it.
  8070. +for ac_symprfx in "" "_"; do
  8071. +
  8072. + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
  8073. + symxfrm="\\1 $ac_symprfx\\2 \\2"
  8074. +
  8075. + # Write the raw and C identifiers.
  8076. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  8077. + # Fake it for dumpbin and say T for any non-static function
  8078. + # and D for any global variable.
  8079. + # Also find C++ and __fastcall symbols from MSVC++,
  8080. + # which start with @ or ?.
  8081. + lt_cv_sys_global_symbol_pipe="$AWK '"\
  8082. +" {last_section=section; section=\$ 3};"\
  8083. +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
  8084. +" \$ 0!~/External *\|/{next};"\
  8085. +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
  8086. +" {if(hide[section]) next};"\
  8087. +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
  8088. +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
  8089. +" s[1]~/^[@?]/{print s[1], s[1]; next};"\
  8090. +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
  8091. +" ' prfx=^$ac_symprfx"
  8092. + else
  8093. + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
  8094. + fi
  8095. +
  8096. + # Check to see that the pipe works correctly.
  8097. + pipe_works=no
  8098. +
  8099. + rm -f conftest*
  8100. + cat > conftest.$ac_ext <<_LT_EOF
  8101. +#ifdef __cplusplus
  8102. +extern "C" {
  8103. +#endif
  8104. +char nm_test_var;
  8105. +void nm_test_func(void);
  8106. +void nm_test_func(void){}
  8107. +#ifdef __cplusplus
  8108. +}
  8109. +#endif
  8110. +int main(){nm_test_var='a';nm_test_func();return(0);}
  8111. +_LT_EOF
  8112. +
  8113. + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
  8114. + (eval $ac_compile) 2>&5
  8115. + ac_status=$?
  8116. + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  8117. + test $ac_status = 0; }; then
  8118. + # Now try to grab the symbols.
  8119. + nlist=conftest.nm
  8120. + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
  8121. + (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
  8122. + ac_status=$?
  8123. + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  8124. + test $ac_status = 0; } && test -s "$nlist"; then
  8125. + # Try sorting and uniquifying the output.
  8126. + if sort "$nlist" | uniq > "$nlist"T; then
  8127. + mv -f "$nlist"T "$nlist"
  8128. + else
  8129. + rm -f "$nlist"T
  8130. + fi
  8131. +
  8132. + # Make sure that we snagged all the symbols we need.
  8133. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
  8134. + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
  8135. + cat <<_LT_EOF > conftest.$ac_ext
  8136. +#ifdef __cplusplus
  8137. +extern "C" {
  8138. +#endif
  8139. +
  8140. +_LT_EOF
  8141. + # Now generate the symbol file.
  8142. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
  8143. +
  8144. + cat <<_LT_EOF >> conftest.$ac_ext
  8145. +
  8146. +/* The mapping between symbol names and symbols. */
  8147. +const struct {
  8148. + const char *name;
  8149. + void *address;
  8150. +}
  8151. +lt__PROGRAM__LTX_preloaded_symbols[] =
  8152. +{
  8153. + { "@PROGRAM@", (void *) 0 },
  8154. +_LT_EOF
  8155. + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
  8156. + cat <<\_LT_EOF >> conftest.$ac_ext
  8157. + {0, (void *) 0}
  8158. +};
  8159. +
  8160. +/* This works around a problem in FreeBSD linker */
  8161. +#ifdef FREEBSD_WORKAROUND
  8162. +static const void *lt_preloaded_setup() {
  8163. + return lt__PROGRAM__LTX_preloaded_symbols;
  8164. +}
  8165. +#endif
  8166. +
  8167. +#ifdef __cplusplus
  8168. +}
  8169. +#endif
  8170. +_LT_EOF
  8171. + # Now try linking the two files.
  8172. + mv conftest.$ac_objext conftstm.$ac_objext
  8173. + lt_save_LIBS="$LIBS"
  8174. + lt_save_CFLAGS="$CFLAGS"
  8175. + LIBS="conftstm.$ac_objext"
  8176. + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
  8177. + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
  8178. + (eval $ac_link) 2>&5
  8179. + ac_status=$?
  8180. + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  8181. + test $ac_status = 0; } && test -s conftest${ac_exeext}; then
  8182. + pipe_works=yes
  8183. + fi
  8184. + LIBS="$lt_save_LIBS"
  8185. + CFLAGS="$lt_save_CFLAGS"
  8186. + else
  8187. + echo "cannot find nm_test_func in $nlist" >&5
  8188. + fi
  8189. + else
  8190. + echo "cannot find nm_test_var in $nlist" >&5
  8191. + fi
  8192. + else
  8193. + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
  8194. + fi
  8195. + else
  8196. + echo "$progname: failed program was:" >&5
  8197. + cat conftest.$ac_ext >&5
  8198. + fi
  8199. + rm -rf conftest* conftst*
  8200. +
  8201. + # Do not use the global_symbol_pipe unless it works.
  8202. + if test "$pipe_works" = yes; then
  8203. + break
  8204. + else
  8205. + lt_cv_sys_global_symbol_pipe=
  8206. + fi
  8207. +done
  8208. +
  8209. +fi
  8210. +
  8211. +if test -z "$lt_cv_sys_global_symbol_pipe"; then
  8212. + lt_cv_sys_global_symbol_to_cdecl=
  8213. +fi
  8214. +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
  8215. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
  8216. +$as_echo "failed" >&6; }
  8217. +else
  8218. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
  8219. +$as_echo "ok" >&6; }
  8220. +fi
  8221. +
  8222. +
  8223. +
  8224. +
  8225. +
  8226. +
  8227. +
  8228. +
  8229. +
  8230. +
  8231. +
  8232. +
  8233. +
  8234. +
  8235. +
  8236. +
  8237. +
  8238. +
  8239. +
  8240. +
  8241. +
  8242. +
  8243. +# Check whether --enable-libtool-lock was given.
  8244. +if test "${enable_libtool_lock+set}" = set; then :
  8245. + enableval=$enable_libtool_lock;
  8246. +fi
  8247. +
  8248. +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  8249. +
  8250. +# Some flags need to be propagated to the compiler or linker for good
  8251. +# libtool support.
  8252. +case $host in
  8253. +ia64-*-hpux*)
  8254. + # Find out which ABI we are using.
  8255. + echo 'int i;' > conftest.$ac_ext
  8256. + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
  8257. + (eval $ac_compile) 2>&5
  8258. + ac_status=$?
  8259. + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  8260. + test $ac_status = 0; }; then
  8261. + case `/usr/bin/file conftest.$ac_objext` in
  8262. + *ELF-32*)
  8263. + HPUX_IA64_MODE="32"
  8264. + ;;
  8265. + *ELF-64*)
  8266. + HPUX_IA64_MODE="64"
  8267. + ;;
  8268. + esac
  8269. + fi
  8270. + rm -rf conftest*
  8271. + ;;
  8272. +*-*-irix6*)
  8273. + # Find out which ABI we are using.
  8274. + echo '#line '$LINENO' "configure"' > conftest.$ac_ext
  8275. + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
  8276. + (eval $ac_compile) 2>&5
  8277. + ac_status=$?
  8278. + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  8279. + test $ac_status = 0; }; then
  8280. + if test "$lt_cv_prog_gnu_ld" = yes; then
  8281. + case `/usr/bin/file conftest.$ac_objext` in
  8282. + *32-bit*)
  8283. + LD="${LD-ld} -melf32bsmip"
  8284. + ;;
  8285. + *N32*)
  8286. + LD="${LD-ld} -melf32bmipn32"
  8287. + ;;
  8288. + *64-bit*)
  8289. + LD="${LD-ld} -melf64bmip"
  8290. + ;;
  8291. + esac
  8292. + else
  8293. + case `/usr/bin/file conftest.$ac_objext` in
  8294. + *32-bit*)
  8295. + LD="${LD-ld} -32"
  8296. + ;;
  8297. + *N32*)
  8298. + LD="${LD-ld} -n32"
  8299. + ;;
  8300. + *64-bit*)
  8301. + LD="${LD-ld} -64"
  8302. + ;;
  8303. + esac
  8304. + fi
  8305. + fi
  8306. + rm -rf conftest*
  8307. + ;;
  8308. +
  8309. +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
  8310. +s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
  8311. + # Find out which ABI we are using.
  8312. + echo 'int i;' > conftest.$ac_ext
  8313. + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
  8314. + (eval $ac_compile) 2>&5
  8315. + ac_status=$?
  8316. + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  8317. + test $ac_status = 0; }; then
  8318. + case `/usr/bin/file conftest.o` in
  8319. + *32-bit*)
  8320. + case $host in
  8321. + x86_64-*kfreebsd*-gnu)
  8322. + LD="${LD-ld} -m elf_i386_fbsd"
  8323. + ;;
  8324. + x86_64-*linux*)
  8325. + case `/usr/bin/file conftest.o` in
  8326. + *x86-64*)
  8327. + LD="${LD-ld} -m elf32_x86_64"
  8328. + ;;
  8329. + *)
  8330. + LD="${LD-ld} -m elf_i386"
  8331. + ;;
  8332. + esac
  8333. + ;;
  8334. + powerpc64le-*linux*)
  8335. + LD="${LD-ld} -m elf32lppclinux"
  8336. + ;;
  8337. + powerpc64-*linux*)
  8338. + LD="${LD-ld} -m elf32ppclinux"
  8339. + ;;
  8340. + s390x-*linux*)
  8341. + LD="${LD-ld} -m elf_s390"
  8342. + ;;
  8343. + sparc64-*linux*)
  8344. + LD="${LD-ld} -m elf32_sparc"
  8345. + ;;
  8346. + esac
  8347. + ;;
  8348. + *64-bit*)
  8349. + case $host in
  8350. + x86_64-*kfreebsd*-gnu)
  8351. + LD="${LD-ld} -m elf_x86_64_fbsd"
  8352. + ;;
  8353. + x86_64-*linux*)
  8354. + LD="${LD-ld} -m elf_x86_64"
  8355. + ;;
  8356. + powerpcle-*linux*)
  8357. + LD="${LD-ld} -m elf64lppc"
  8358. + ;;
  8359. + powerpc-*linux*)
  8360. + LD="${LD-ld} -m elf64ppc"
  8361. + ;;
  8362. + s390*-*linux*|s390*-*tpf*)
  8363. + LD="${LD-ld} -m elf64_s390"
  8364. + ;;
  8365. + sparc*-*linux*)
  8366. + LD="${LD-ld} -m elf64_sparc"
  8367. + ;;
  8368. + esac
  8369. + ;;
  8370. + esac
  8371. + fi
  8372. + rm -rf conftest*
  8373. + ;;
  8374. +
  8375. +*-*-sco3.2v5*)
  8376. + # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  8377. + SAVE_CFLAGS="$CFLAGS"
  8378. + CFLAGS="$CFLAGS -belf"
  8379. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
  8380. +$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
  8381. +if ${lt_cv_cc_needs_belf+:} false; then :
  8382. + $as_echo_n "(cached) " >&6
  8383. +else
  8384. + ac_ext=c
  8385. +ac_cpp='$CPP $CPPFLAGS'
  8386. +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  8387. +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  8388. +ac_compiler_gnu=$ac_cv_c_compiler_gnu
  8389. +
  8390. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  8391. +/* end confdefs.h. */
  8392. +
  8393. +int
  8394. +main ()
  8395. +{
  8396. +
  8397. + ;
  8398. + return 0;
  8399. +}
  8400. +_ACEOF
  8401. +if ac_fn_c_try_link "$LINENO"; then :
  8402. + lt_cv_cc_needs_belf=yes
  8403. +else
  8404. + lt_cv_cc_needs_belf=no
  8405. +fi
  8406. +rm -f core conftest.err conftest.$ac_objext \
  8407. + conftest$ac_exeext conftest.$ac_ext
  8408. + ac_ext=c
  8409. +ac_cpp='$CPP $CPPFLAGS'
  8410. +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  8411. +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  8412. +ac_compiler_gnu=$ac_cv_c_compiler_gnu
  8413. +
  8414. +fi
  8415. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
  8416. +$as_echo "$lt_cv_cc_needs_belf" >&6; }
  8417. + if test x"$lt_cv_cc_needs_belf" != x"yes"; then
  8418. + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  8419. + CFLAGS="$SAVE_CFLAGS"
  8420. + fi
  8421. + ;;
  8422. +sparc*-*solaris*)
  8423. + # Find out which ABI we are using.
  8424. + echo 'int i;' > conftest.$ac_ext
  8425. + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
  8426. + (eval $ac_compile) 2>&5
  8427. + ac_status=$?
  8428. + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  8429. + test $ac_status = 0; }; then
  8430. + case `/usr/bin/file conftest.o` in
  8431. + *64-bit*)
  8432. + case $lt_cv_prog_gnu_ld in
  8433. + yes*) LD="${LD-ld} -m elf64_sparc" ;;
  8434. + *)
  8435. + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
  8436. + LD="${LD-ld} -64"
  8437. + fi
  8438. + ;;
  8439. + esac
  8440. + ;;
  8441. + esac
  8442. + fi
  8443. + rm -rf conftest*
  8444. + ;;
  8445. +esac
  8446. +
  8447. +need_locks="$enable_libtool_lock"
  8448. +
  8449. +
  8450. + case $host_os in
  8451. + rhapsody* | darwin*)
  8452. + if test -n "$ac_tool_prefix"; then
  8453. + # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
  8454. +set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
  8455. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  8456. +$as_echo_n "checking for $ac_word... " >&6; }
  8457. +if ${ac_cv_prog_DSYMUTIL+:} false; then :
  8458. + $as_echo_n "(cached) " >&6
  8459. +else
  8460. + if test -n "$DSYMUTIL"; then
  8461. + ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
  8462. +else
  8463. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  8464. +for as_dir in $PATH
  8465. +do
  8466. + IFS=$as_save_IFS
  8467. + test -z "$as_dir" && as_dir=.
  8468. + for ac_exec_ext in '' $ac_executable_extensions; do
  8469. + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  8470. + ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
  8471. + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  8472. + break 2
  8473. + fi
  8474. +done
  8475. + done
  8476. +IFS=$as_save_IFS
  8477. +
  8478. +fi
  8479. +fi
  8480. +DSYMUTIL=$ac_cv_prog_DSYMUTIL
  8481. +if test -n "$DSYMUTIL"; then
  8482. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
  8483. +$as_echo "$DSYMUTIL" >&6; }
  8484. +else
  8485. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  8486. +$as_echo "no" >&6; }
  8487. +fi
  8488. +
  8489. +
  8490. +fi
  8491. +if test -z "$ac_cv_prog_DSYMUTIL"; then
  8492. + ac_ct_DSYMUTIL=$DSYMUTIL
  8493. + # Extract the first word of "dsymutil", so it can be a program name with args.
  8494. +set dummy dsymutil; ac_word=$2
  8495. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  8496. +$as_echo_n "checking for $ac_word... " >&6; }
  8497. +if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
  8498. + $as_echo_n "(cached) " >&6
  8499. +else
  8500. + if test -n "$ac_ct_DSYMUTIL"; then
  8501. + ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
  8502. +else
  8503. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  8504. +for as_dir in $PATH
  8505. +do
  8506. + IFS=$as_save_IFS
  8507. + test -z "$as_dir" && as_dir=.
  8508. + for ac_exec_ext in '' $ac_executable_extensions; do
  8509. + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  8510. + ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
  8511. + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  8512. + break 2
  8513. + fi
  8514. +done
  8515. + done
  8516. +IFS=$as_save_IFS
  8517. +
  8518. +fi
  8519. +fi
  8520. +ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
  8521. +if test -n "$ac_ct_DSYMUTIL"; then
  8522. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
  8523. +$as_echo "$ac_ct_DSYMUTIL" >&6; }
  8524. +else
  8525. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  8526. +$as_echo "no" >&6; }
  8527. +fi
  8528. +
  8529. + if test "x$ac_ct_DSYMUTIL" = x; then
  8530. + DSYMUTIL=":"
  8531. + else
  8532. + case $cross_compiling:$ac_tool_warned in
  8533. +yes:)
  8534. +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  8535. +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  8536. +ac_tool_warned=yes ;;
  8537. +esac
  8538. + DSYMUTIL=$ac_ct_DSYMUTIL
  8539. + fi
  8540. +else
  8541. + DSYMUTIL="$ac_cv_prog_DSYMUTIL"
  8542. +fi
  8543. +
  8544. + if test -n "$ac_tool_prefix"; then
  8545. + # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
  8546. +set dummy ${ac_tool_prefix}nmedit; ac_word=$2
  8547. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  8548. +$as_echo_n "checking for $ac_word... " >&6; }
  8549. +if ${ac_cv_prog_NMEDIT+:} false; then :
  8550. + $as_echo_n "(cached) " >&6
  8551. +else
  8552. + if test -n "$NMEDIT"; then
  8553. + ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
  8554. +else
  8555. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  8556. +for as_dir in $PATH
  8557. +do
  8558. + IFS=$as_save_IFS
  8559. + test -z "$as_dir" && as_dir=.
  8560. + for ac_exec_ext in '' $ac_executable_extensions; do
  8561. + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  8562. + ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
  8563. + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  8564. + break 2
  8565. + fi
  8566. +done
  8567. + done
  8568. +IFS=$as_save_IFS
  8569. +
  8570. +fi
  8571. +fi
  8572. +NMEDIT=$ac_cv_prog_NMEDIT
  8573. +if test -n "$NMEDIT"; then
  8574. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
  8575. +$as_echo "$NMEDIT" >&6; }
  8576. +else
  8577. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  8578. +$as_echo "no" >&6; }
  8579. +fi
  8580. +
  8581. +
  8582. +fi
  8583. +if test -z "$ac_cv_prog_NMEDIT"; then
  8584. + ac_ct_NMEDIT=$NMEDIT
  8585. + # Extract the first word of "nmedit", so it can be a program name with args.
  8586. +set dummy nmedit; ac_word=$2
  8587. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  8588. +$as_echo_n "checking for $ac_word... " >&6; }
  8589. +if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
  8590. + $as_echo_n "(cached) " >&6
  8591. +else
  8592. + if test -n "$ac_ct_NMEDIT"; then
  8593. + ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
  8594. +else
  8595. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  8596. +for as_dir in $PATH
  8597. +do
  8598. + IFS=$as_save_IFS
  8599. + test -z "$as_dir" && as_dir=.
  8600. + for ac_exec_ext in '' $ac_executable_extensions; do
  8601. + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  8602. + ac_cv_prog_ac_ct_NMEDIT="nmedit"
  8603. + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  8604. + break 2
  8605. + fi
  8606. +done
  8607. + done
  8608. +IFS=$as_save_IFS
  8609. +
  8610. +fi
  8611. +fi
  8612. +ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
  8613. +if test -n "$ac_ct_NMEDIT"; then
  8614. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
  8615. +$as_echo "$ac_ct_NMEDIT" >&6; }
  8616. +else
  8617. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  8618. +$as_echo "no" >&6; }
  8619. +fi
  8620. +
  8621. + if test "x$ac_ct_NMEDIT" = x; then
  8622. + NMEDIT=":"
  8623. + else
  8624. + case $cross_compiling:$ac_tool_warned in
  8625. +yes:)
  8626. +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  8627. +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  8628. +ac_tool_warned=yes ;;
  8629. +esac
  8630. + NMEDIT=$ac_ct_NMEDIT
  8631. + fi
  8632. +else
  8633. + NMEDIT="$ac_cv_prog_NMEDIT"
  8634. +fi
  8635. +
  8636. + if test -n "$ac_tool_prefix"; then
  8637. + # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
  8638. +set dummy ${ac_tool_prefix}lipo; ac_word=$2
  8639. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  8640. +$as_echo_n "checking for $ac_word... " >&6; }
  8641. +if ${ac_cv_prog_LIPO+:} false; then :
  8642. + $as_echo_n "(cached) " >&6
  8643. +else
  8644. + if test -n "$LIPO"; then
  8645. + ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
  8646. +else
  8647. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  8648. +for as_dir in $PATH
  8649. +do
  8650. + IFS=$as_save_IFS
  8651. + test -z "$as_dir" && as_dir=.
  8652. + for ac_exec_ext in '' $ac_executable_extensions; do
  8653. + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  8654. + ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
  8655. + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  8656. + break 2
  8657. + fi
  8658. +done
  8659. + done
  8660. +IFS=$as_save_IFS
  8661. +
  8662. +fi
  8663. +fi
  8664. +LIPO=$ac_cv_prog_LIPO
  8665. +if test -n "$LIPO"; then
  8666. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
  8667. +$as_echo "$LIPO" >&6; }
  8668. +else
  8669. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  8670. +$as_echo "no" >&6; }
  8671. +fi
  8672. +
  8673. +
  8674. +fi
  8675. +if test -z "$ac_cv_prog_LIPO"; then
  8676. + ac_ct_LIPO=$LIPO
  8677. + # Extract the first word of "lipo", so it can be a program name with args.
  8678. +set dummy lipo; ac_word=$2
  8679. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  8680. +$as_echo_n "checking for $ac_word... " >&6; }
  8681. +if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
  8682. + $as_echo_n "(cached) " >&6
  8683. +else
  8684. + if test -n "$ac_ct_LIPO"; then
  8685. + ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
  8686. +else
  8687. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  8688. +for as_dir in $PATH
  8689. +do
  8690. + IFS=$as_save_IFS
  8691. + test -z "$as_dir" && as_dir=.
  8692. + for ac_exec_ext in '' $ac_executable_extensions; do
  8693. + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  8694. + ac_cv_prog_ac_ct_LIPO="lipo"
  8695. + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  8696. + break 2
  8697. + fi
  8698. +done
  8699. + done
  8700. +IFS=$as_save_IFS
  8701. +
  8702. +fi
  8703. +fi
  8704. +ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
  8705. +if test -n "$ac_ct_LIPO"; then
  8706. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
  8707. +$as_echo "$ac_ct_LIPO" >&6; }
  8708. +else
  8709. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  8710. +$as_echo "no" >&6; }
  8711. +fi
  8712. +
  8713. + if test "x$ac_ct_LIPO" = x; then
  8714. + LIPO=":"
  8715. + else
  8716. + case $cross_compiling:$ac_tool_warned in
  8717. +yes:)
  8718. +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  8719. +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  8720. +ac_tool_warned=yes ;;
  8721. +esac
  8722. + LIPO=$ac_ct_LIPO
  8723. + fi
  8724. +else
  8725. + LIPO="$ac_cv_prog_LIPO"
  8726. +fi
  8727. +
  8728. + if test -n "$ac_tool_prefix"; then
  8729. + # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
  8730. +set dummy ${ac_tool_prefix}otool; ac_word=$2
  8731. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  8732. +$as_echo_n "checking for $ac_word... " >&6; }
  8733. +if ${ac_cv_prog_OTOOL+:} false; then :
  8734. + $as_echo_n "(cached) " >&6
  8735. +else
  8736. + if test -n "$OTOOL"; then
  8737. + ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
  8738. +else
  8739. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  8740. +for as_dir in $PATH
  8741. +do
  8742. + IFS=$as_save_IFS
  8743. + test -z "$as_dir" && as_dir=.
  8744. + for ac_exec_ext in '' $ac_executable_extensions; do
  8745. + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  8746. + ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
  8747. + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  8748. + break 2
  8749. + fi
  8750. +done
  8751. + done
  8752. +IFS=$as_save_IFS
  8753. +
  8754. +fi
  8755. +fi
  8756. +OTOOL=$ac_cv_prog_OTOOL
  8757. +if test -n "$OTOOL"; then
  8758. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
  8759. +$as_echo "$OTOOL" >&6; }
  8760. +else
  8761. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  8762. +$as_echo "no" >&6; }
  8763. +fi
  8764. +
  8765. +
  8766. +fi
  8767. +if test -z "$ac_cv_prog_OTOOL"; then
  8768. + ac_ct_OTOOL=$OTOOL
  8769. + # Extract the first word of "otool", so it can be a program name with args.
  8770. +set dummy otool; ac_word=$2
  8771. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  8772. +$as_echo_n "checking for $ac_word... " >&6; }
  8773. +if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
  8774. + $as_echo_n "(cached) " >&6
  8775. +else
  8776. + if test -n "$ac_ct_OTOOL"; then
  8777. + ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
  8778. +else
  8779. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  8780. +for as_dir in $PATH
  8781. +do
  8782. + IFS=$as_save_IFS
  8783. + test -z "$as_dir" && as_dir=.
  8784. + for ac_exec_ext in '' $ac_executable_extensions; do
  8785. + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  8786. + ac_cv_prog_ac_ct_OTOOL="otool"
  8787. + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  8788. + break 2
  8789. + fi
  8790. +done
  8791. + done
  8792. +IFS=$as_save_IFS
  8793. +
  8794. +fi
  8795. +fi
  8796. +ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
  8797. +if test -n "$ac_ct_OTOOL"; then
  8798. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
  8799. +$as_echo "$ac_ct_OTOOL" >&6; }
  8800. +else
  8801. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  8802. +$as_echo "no" >&6; }
  8803. +fi
  8804. +
  8805. + if test "x$ac_ct_OTOOL" = x; then
  8806. + OTOOL=":"
  8807. + else
  8808. + case $cross_compiling:$ac_tool_warned in
  8809. +yes:)
  8810. +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  8811. +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  8812. +ac_tool_warned=yes ;;
  8813. +esac
  8814. + OTOOL=$ac_ct_OTOOL
  8815. + fi
  8816. +else
  8817. + OTOOL="$ac_cv_prog_OTOOL"
  8818. +fi
  8819. +
  8820. + if test -n "$ac_tool_prefix"; then
  8821. + # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
  8822. +set dummy ${ac_tool_prefix}otool64; ac_word=$2
  8823. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  8824. +$as_echo_n "checking for $ac_word... " >&6; }
  8825. +if ${ac_cv_prog_OTOOL64+:} false; then :
  8826. + $as_echo_n "(cached) " >&6
  8827. +else
  8828. + if test -n "$OTOOL64"; then
  8829. + ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
  8830. +else
  8831. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  8832. +for as_dir in $PATH
  8833. +do
  8834. + IFS=$as_save_IFS
  8835. + test -z "$as_dir" && as_dir=.
  8836. + for ac_exec_ext in '' $ac_executable_extensions; do
  8837. + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  8838. + ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
  8839. + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  8840. + break 2
  8841. + fi
  8842. +done
  8843. + done
  8844. +IFS=$as_save_IFS
  8845. +
  8846. +fi
  8847. +fi
  8848. +OTOOL64=$ac_cv_prog_OTOOL64
  8849. +if test -n "$OTOOL64"; then
  8850. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
  8851. +$as_echo "$OTOOL64" >&6; }
  8852. +else
  8853. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  8854. +$as_echo "no" >&6; }
  8855. +fi
  8856. +
  8857. +
  8858. +fi
  8859. +if test -z "$ac_cv_prog_OTOOL64"; then
  8860. + ac_ct_OTOOL64=$OTOOL64
  8861. + # Extract the first word of "otool64", so it can be a program name with args.
  8862. +set dummy otool64; ac_word=$2
  8863. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  8864. +$as_echo_n "checking for $ac_word... " >&6; }
  8865. +if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
  8866. + $as_echo_n "(cached) " >&6
  8867. +else
  8868. + if test -n "$ac_ct_OTOOL64"; then
  8869. + ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
  8870. +else
  8871. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  8872. +for as_dir in $PATH
  8873. +do
  8874. + IFS=$as_save_IFS
  8875. + test -z "$as_dir" && as_dir=.
  8876. + for ac_exec_ext in '' $ac_executable_extensions; do
  8877. + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  8878. + ac_cv_prog_ac_ct_OTOOL64="otool64"
  8879. + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  8880. + break 2
  8881. + fi
  8882. +done
  8883. + done
  8884. +IFS=$as_save_IFS
  8885. +
  8886. +fi
  8887. +fi
  8888. +ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
  8889. +if test -n "$ac_ct_OTOOL64"; then
  8890. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
  8891. +$as_echo "$ac_ct_OTOOL64" >&6; }
  8892. +else
  8893. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  8894. +$as_echo "no" >&6; }
  8895. +fi
  8896. +
  8897. + if test "x$ac_ct_OTOOL64" = x; then
  8898. + OTOOL64=":"
  8899. + else
  8900. + case $cross_compiling:$ac_tool_warned in
  8901. +yes:)
  8902. +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  8903. +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  8904. +ac_tool_warned=yes ;;
  8905. +esac
  8906. + OTOOL64=$ac_ct_OTOOL64
  8907. + fi
  8908. +else
  8909. + OTOOL64="$ac_cv_prog_OTOOL64"
  8910. +fi
  8911. +
  8912. +
  8913. +
  8914. +
  8915. +
  8916. +
  8917. +
  8918. +
  8919. +
  8920. +
  8921. +
  8922. +
  8923. +
  8924. +
  8925. +
  8926. +
  8927. +
  8928. +
  8929. +
  8930. +
  8931. +
  8932. +
  8933. +
  8934. +
  8935. +
  8936. +
  8937. +
  8938. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
  8939. +$as_echo_n "checking for -single_module linker flag... " >&6; }
  8940. +if ${lt_cv_apple_cc_single_mod+:} false; then :
  8941. + $as_echo_n "(cached) " >&6
  8942. +else
  8943. + lt_cv_apple_cc_single_mod=no
  8944. + if test -z "${LT_MULTI_MODULE}"; then
  8945. + # By default we will add the -single_module flag. You can override
  8946. + # by either setting the environment variable LT_MULTI_MODULE
  8947. + # non-empty at configure time, or by adding -multi_module to the
  8948. + # link flags.
  8949. + rm -rf libconftest.dylib*
  8950. + echo "int foo(void){return 1;}" > conftest.c
  8951. + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  8952. +-dynamiclib -Wl,-single_module conftest.c" >&5
  8953. + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  8954. + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
  8955. + _lt_result=$?
  8956. + if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
  8957. + lt_cv_apple_cc_single_mod=yes
  8958. + else
  8959. + cat conftest.err >&5
  8960. + fi
  8961. + rm -rf libconftest.dylib*
  8962. + rm -f conftest.*
  8963. + fi
  8964. +fi
  8965. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
  8966. +$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
  8967. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
  8968. +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
  8969. +if ${lt_cv_ld_exported_symbols_list+:} false; then :
  8970. + $as_echo_n "(cached) " >&6
  8971. +else
  8972. + lt_cv_ld_exported_symbols_list=no
  8973. + save_LDFLAGS=$LDFLAGS
  8974. + echo "_main" > conftest.sym
  8975. + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
  8976. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  8977. +/* end confdefs.h. */
  8978. +
  8979. +int
  8980. +main ()
  8981. +{
  8982. +
  8983. + ;
  8984. + return 0;
  8985. +}
  8986. +_ACEOF
  8987. +if ac_fn_c_try_link "$LINENO"; then :
  8988. + lt_cv_ld_exported_symbols_list=yes
  8989. +else
  8990. + lt_cv_ld_exported_symbols_list=no
  8991. +fi
  8992. +rm -f core conftest.err conftest.$ac_objext \
  8993. + conftest$ac_exeext conftest.$ac_ext
  8994. + LDFLAGS="$save_LDFLAGS"
  8995. +
  8996. +fi
  8997. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
  8998. +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
  8999. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
  9000. +$as_echo_n "checking for -force_load linker flag... " >&6; }
  9001. +if ${lt_cv_ld_force_load+:} false; then :
  9002. + $as_echo_n "(cached) " >&6
  9003. +else
  9004. + lt_cv_ld_force_load=no
  9005. + cat > conftest.c << _LT_EOF
  9006. +int forced_loaded() { return 2;}
  9007. +_LT_EOF
  9008. + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
  9009. + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
  9010. + echo "$AR cru libconftest.a conftest.o" >&5
  9011. + $AR cru libconftest.a conftest.o 2>&5
  9012. + cat > conftest.c << _LT_EOF
  9013. +int main() { return 0;}
  9014. +_LT_EOF
  9015. + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
  9016. + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
  9017. + _lt_result=$?
  9018. + if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
  9019. + lt_cv_ld_force_load=yes
  9020. + else
  9021. + cat conftest.err >&5
  9022. + fi
  9023. + rm -f conftest.err libconftest.a conftest conftest.c
  9024. + rm -rf conftest.dSYM
  9025. +
  9026. +fi
  9027. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
  9028. +$as_echo "$lt_cv_ld_force_load" >&6; }
  9029. + case $host_os in
  9030. + rhapsody* | darwin1.[012])
  9031. + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
  9032. + darwin1.*)
  9033. + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
  9034. + darwin*) # darwin 5.x on
  9035. + # if running on 10.5 or later, the deployment target defaults
  9036. + # to the OS version, if on x86, and 10.4, the deployment
  9037. + # target defaults to 10.4. Don't you love it?
  9038. + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
  9039. + 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
  9040. + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
  9041. + 10.[012][,.]*)
  9042. + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
  9043. + 10.*)
  9044. + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
  9045. + esac
  9046. + ;;
  9047. + esac
  9048. + if test "$lt_cv_apple_cc_single_mod" = "yes"; then
  9049. + _lt_dar_single_mod='$single_module'
  9050. + fi
  9051. + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
  9052. + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
  9053. + else
  9054. + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
  9055. + fi
  9056. + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
  9057. + _lt_dsymutil='~$DSYMUTIL $lib || :'
  9058. + else
  9059. + _lt_dsymutil=
  9060. + fi
  9061. + ;;
  9062. + esac
  9063. +
  9064. +for ac_header in dlfcn.h
  9065. +do :
  9066. + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
  9067. +"
  9068. +if test "x$ac_cv_header_dlfcn_h" = xyes; then :
  9069. + cat >>confdefs.h <<_ACEOF
  9070. +#define HAVE_DLFCN_H 1
  9071. +_ACEOF
  9072. +
  9073. +fi
  9074. +
  9075. +done
  9076. +
  9077. +
  9078. +
  9079. +# autoconf.info says this should be called right after AC_INIT.
  9080. +ac_config_headers="$ac_config_headers config.h:config.in"
  9081. +
  9082. +
  9083. +
  9084. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
  9085. +$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
  9086. +if ${ac_cv_c_bigendian+:} false; then :
  9087. + $as_echo_n "(cached) " >&6
  9088. +else
  9089. + ac_cv_c_bigendian=unknown
  9090. + # See if we're dealing with a universal compiler.
  9091. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  9092. +/* end confdefs.h. */
  9093. +#ifndef __APPLE_CC__
  9094. + not a universal capable compiler
  9095. + #endif
  9096. + typedef int dummy;
  9097. +
  9098. +_ACEOF
  9099. +if ac_fn_c_try_compile "$LINENO"; then :
  9100. +
  9101. + # Check for potential -arch flags. It is not universal unless
  9102. + # there are at least two -arch flags with different values.
  9103. + ac_arch=
  9104. + ac_prev=
  9105. + for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
  9106. + if test -n "$ac_prev"; then
  9107. + case $ac_word in
  9108. + i?86 | x86_64 | ppc | ppc64)
  9109. + if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
  9110. + ac_arch=$ac_word
  9111. + else
  9112. + ac_cv_c_bigendian=universal
  9113. + break
  9114. + fi
  9115. + ;;
  9116. + esac
  9117. + ac_prev=
  9118. + elif test "x$ac_word" = "x-arch"; then
  9119. + ac_prev=arch
  9120. + fi
  9121. + done
  9122. +fi
  9123. +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  9124. + if test $ac_cv_c_bigendian = unknown; then
  9125. + # See if sys/param.h defines the BYTE_ORDER macro.
  9126. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  9127. +/* end confdefs.h. */
  9128. +#include <sys/types.h>
  9129. + #include <sys/param.h>
  9130. +
  9131. +int
  9132. +main ()
  9133. +{
  9134. +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
  9135. + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
  9136. + && LITTLE_ENDIAN)
  9137. + bogus endian macros
  9138. + #endif
  9139. +
  9140. + ;
  9141. + return 0;
  9142. +}
  9143. +_ACEOF
  9144. +if ac_fn_c_try_compile "$LINENO"; then :
  9145. + # It does; now see whether it defined to BIG_ENDIAN or not.
  9146. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  9147. +/* end confdefs.h. */
  9148. +#include <sys/types.h>
  9149. + #include <sys/param.h>
  9150. +
  9151. +int
  9152. +main ()
  9153. +{
  9154. +#if BYTE_ORDER != BIG_ENDIAN
  9155. + not big endian
  9156. + #endif
  9157. +
  9158. + ;
  9159. + return 0;
  9160. +}
  9161. +_ACEOF
  9162. +if ac_fn_c_try_compile "$LINENO"; then :
  9163. + ac_cv_c_bigendian=yes
  9164. +else
  9165. + ac_cv_c_bigendian=no
  9166. +fi
  9167. +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  9168. +fi
  9169. +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  9170. + fi
  9171. + if test $ac_cv_c_bigendian = unknown; then
  9172. + # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
  9173. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  9174. +/* end confdefs.h. */
  9175. +#include <limits.h>
  9176. +
  9177. +int
  9178. +main ()
  9179. +{
  9180. +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
  9181. + bogus endian macros
  9182. + #endif
  9183. +
  9184. + ;
  9185. + return 0;
  9186. +}
  9187. +_ACEOF
  9188. +if ac_fn_c_try_compile "$LINENO"; then :
  9189. + # It does; now see whether it defined to _BIG_ENDIAN or not.
  9190. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  9191. +/* end confdefs.h. */
  9192. +#include <limits.h>
  9193. +
  9194. +int
  9195. +main ()
  9196. +{
  9197. +#ifndef _BIG_ENDIAN
  9198. + not big endian
  9199. + #endif
  9200. +
  9201. + ;
  9202. + return 0;
  9203. +}
  9204. +_ACEOF
  9205. +if ac_fn_c_try_compile "$LINENO"; then :
  9206. + ac_cv_c_bigendian=yes
  9207. +else
  9208. + ac_cv_c_bigendian=no
  9209. +fi
  9210. +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  9211. +fi
  9212. +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  9213. + fi
  9214. + if test $ac_cv_c_bigendian = unknown; then
  9215. + # Compile a test program.
  9216. + if test "$cross_compiling" = yes; then :
  9217. + # Try to guess by grepping values from an object file.
  9218. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  9219. +/* end confdefs.h. */
  9220. +short int ascii_mm[] =
  9221. + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
  9222. + short int ascii_ii[] =
  9223. + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
  9224. + int use_ascii (int i) {
  9225. + return ascii_mm[i] + ascii_ii[i];
  9226. + }
  9227. + short int ebcdic_ii[] =
  9228. + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
  9229. + short int ebcdic_mm[] =
  9230. + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
  9231. + int use_ebcdic (int i) {
  9232. + return ebcdic_mm[i] + ebcdic_ii[i];
  9233. + }
  9234. + extern int foo;
  9235. +
  9236. +int
  9237. +main ()
  9238. +{
  9239. +return use_ascii (foo) == use_ebcdic (foo);
  9240. + ;
  9241. + return 0;
  9242. +}
  9243. +_ACEOF
  9244. +if ac_fn_c_try_compile "$LINENO"; then :
  9245. + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
  9246. + ac_cv_c_bigendian=yes
  9247. + fi
  9248. + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
  9249. + if test "$ac_cv_c_bigendian" = unknown; then
  9250. + ac_cv_c_bigendian=no
  9251. + else
  9252. + # finding both strings is unlikely to happen, but who knows?
  9253. + ac_cv_c_bigendian=unknown
  9254. + fi
  9255. + fi
  9256. +fi
  9257. +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  9258. +else
  9259. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  9260. +/* end confdefs.h. */
  9261. +$ac_includes_default
  9262. +int
  9263. +main ()
  9264. +{
  9265. +
  9266. + /* Are we little or big endian? From Harbison&Steele. */
  9267. + union
  9268. + {
  9269. + long int l;
  9270. + char c[sizeof (long int)];
  9271. + } u;
  9272. + u.l = 1;
  9273. + return u.c[sizeof (long int) - 1] == 1;
  9274. +
  9275. + ;
  9276. + return 0;
  9277. +}
  9278. +_ACEOF
  9279. +if ac_fn_c_try_run "$LINENO"; then :
  9280. + ac_cv_c_bigendian=no
  9281. +else
  9282. + ac_cv_c_bigendian=yes
  9283. +fi
  9284. +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  9285. + conftest.$ac_objext conftest.beam conftest.$ac_ext
  9286. +fi
  9287. +
  9288. + fi
  9289. +fi
  9290. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
  9291. +$as_echo "$ac_cv_c_bigendian" >&6; }
  9292. + case $ac_cv_c_bigendian in #(
  9293. + yes)
  9294. + $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
  9295. +;; #(
  9296. + no)
  9297. + ;; #(
  9298. + universal)
  9299. +
  9300. +$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
  9301. +
  9302. + ;; #(
  9303. + *)
  9304. + as_fn_error $? "unknown endianness
  9305. + presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
  9306. + esac
  9307. +
  9308. +
  9309. +
  9310. +
  9311. +# Put a plausible default for CC_FOR_BUILD in Makefile.
  9312. +if test -z "$CC_FOR_BUILD"; then
  9313. + if test "x$cross_compiling" = "xno"; then
  9314. + CC_FOR_BUILD='$(CC)'
  9315. + else
  9316. + CC_FOR_BUILD=gcc
  9317. + fi
  9318. +fi
  9319. +
  9320. +
  9321. +
  9322. +
  9323. +AR=${AR-ar}
  9324. +
  9325. +if test -n "$ac_tool_prefix"; then
  9326. + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
  9327. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2
  9328. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  9329. +$as_echo_n "checking for $ac_word... " >&6; }
  9330. +if ${ac_cv_prog_RANLIB+:} false; then :
  9331. + $as_echo_n "(cached) " >&6
  9332. +else
  9333. + if test -n "$RANLIB"; then
  9334. + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  9335. +else
  9336. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  9337. +for as_dir in $PATH
  9338. +do
  9339. + IFS=$as_save_IFS
  9340. + test -z "$as_dir" && as_dir=.
  9341. + for ac_exec_ext in '' $ac_executable_extensions; do
  9342. + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  9343. + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
  9344. + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  9345. + break 2
  9346. + fi
  9347. +done
  9348. + done
  9349. +IFS=$as_save_IFS
  9350. +
  9351. +fi
  9352. +fi
  9353. +RANLIB=$ac_cv_prog_RANLIB
  9354. +if test -n "$RANLIB"; then
  9355. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
  9356. +$as_echo "$RANLIB" >&6; }
  9357. +else
  9358. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  9359. +$as_echo "no" >&6; }
  9360. +fi
  9361. +
  9362. +
  9363. +fi
  9364. +if test -z "$ac_cv_prog_RANLIB"; then
  9365. + ac_ct_RANLIB=$RANLIB
  9366. + # Extract the first word of "ranlib", so it can be a program name with args.
  9367. +set dummy ranlib; ac_word=$2
  9368. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  9369. +$as_echo_n "checking for $ac_word... " >&6; }
  9370. +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
  9371. + $as_echo_n "(cached) " >&6
  9372. +else
  9373. + if test -n "$ac_ct_RANLIB"; then
  9374. + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
  9375. +else
  9376. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  9377. +for as_dir in $PATH
  9378. +do
  9379. + IFS=$as_save_IFS
  9380. + test -z "$as_dir" && as_dir=.
  9381. + for ac_exec_ext in '' $ac_executable_extensions; do
  9382. + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  9383. + ac_cv_prog_ac_ct_RANLIB="ranlib"
  9384. + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  9385. + break 2
  9386. + fi
  9387. +done
  9388. + done
  9389. +IFS=$as_save_IFS
  9390. +
  9391. +fi
  9392. +fi
  9393. +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
  9394. +if test -n "$ac_ct_RANLIB"; then
  9395. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
  9396. +$as_echo "$ac_ct_RANLIB" >&6; }
  9397. +else
  9398. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  9399. +$as_echo "no" >&6; }
  9400. +fi
  9401. +
  9402. + if test "x$ac_ct_RANLIB" = x; then
  9403. + RANLIB=":"
  9404. + else
  9405. + case $cross_compiling:$ac_tool_warned in
  9406. +yes:)
  9407. +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  9408. +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  9409. +ac_tool_warned=yes ;;
  9410. +esac
  9411. + RANLIB=$ac_ct_RANLIB
  9412. + fi
  9413. +else
  9414. + RANLIB="$ac_cv_prog_RANLIB"
  9415. +fi
  9416. +
  9417. +
  9418. +# Some of the common include files depend on bfd.h, and bfd.h checks
  9419. +# that config.h is included first by testing that the PACKAGE macro
  9420. +# is defined.
  9421. +PACKAGE=sim
  9422. +
  9423. +cat >>confdefs.h <<_ACEOF
  9424. +#define PACKAGE "$PACKAGE"
  9425. +_ACEOF
  9426. +
  9427. +
  9428. +
  9429. +# Dependency checking.
  9430. +ac_config_commands="$ac_config_commands depdir"
  9431. +
  9432. +
  9433. +depcc="$CC" am_compiler_list=
  9434. +
  9435. +am_depcomp=$ac_aux_dir/depcomp
  9436. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
  9437. +$as_echo_n "checking dependency style of $depcc... " >&6; }
  9438. +if ${am_cv_CC_dependencies_compiler_type+:} false; then :
  9439. + $as_echo_n "(cached) " >&6
  9440. +else
  9441. + if test -f "$am_depcomp"; then
  9442. + # We make a subdir and do the tests there. Otherwise we can end up
  9443. + # making bogus files that we don't know about and never remove. For
  9444. + # instance it was reported that on HP-UX the gcc test will end up
  9445. + # making a dummy file named `D' -- because `-MD' means `put the output
  9446. + # in D'.
  9447. + mkdir conftest.dir
  9448. + # Copy depcomp to subdir because otherwise we won't find it if we're
  9449. + # using a relative directory.
  9450. + cp "$am_depcomp" conftest.dir
  9451. + cd conftest.dir
  9452. + # We will build objects and dependencies in a subdirectory because
  9453. + # it helps to detect inapplicable dependency modes. For instance
  9454. + # both Tru64's cc and ICC support -MD to output dependencies as a
  9455. + # side effect of compilation, but ICC will put the dependencies in
  9456. + # the current directory while Tru64 will put them in the object
  9457. + # directory.
  9458. + mkdir sub
  9459. +
  9460. + am_cv_CC_dependencies_compiler_type=none
  9461. + if test "$am_compiler_list" = ""; then
  9462. + am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
  9463. + fi
  9464. + for depmode in $am_compiler_list; do
  9465. + if test $depmode = none; then break; fi
  9466. +
  9467. + $as_echo "$as_me:$LINENO: trying $depmode" >&5
  9468. + # Setup a source with many dependencies, because some compilers
  9469. + # like to wrap large dependency lists on column 80 (with \), and
  9470. + # we should not choose a depcomp mode which is confused by this.
  9471. + #
  9472. + # We need to recreate these files for each test, as the compiler may
  9473. + # overwrite some of them when testing with obscure command lines.
  9474. + # This happens at least with the AIX C compiler.
  9475. + : > sub/conftest.c
  9476. + for i in 1 2 3 4 5 6; do
  9477. + echo '#include "conftst'$i'.h"' >> sub/conftest.c
  9478. + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
  9479. + # Solaris 8's {/usr,}/bin/sh.
  9480. + touch sub/conftst$i.h
  9481. + done
  9482. + echo "include sub/conftest.Po" > confmf
  9483. +
  9484. + # We check with `-c' and `-o' for the sake of the "dashmstdout"
  9485. + # mode. It turns out that the SunPro C++ compiler does not properly
  9486. + # handle `-M -o', and we need to detect this.
  9487. + depcmd="depmode=$depmode \
  9488. + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
  9489. + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
  9490. + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
  9491. + echo "| $depcmd" | sed -e 's/ */ /g' >&5
  9492. + if env $depcmd > conftest.err 2>&1 &&
  9493. + grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
  9494. + grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
  9495. + ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
  9496. + # icc doesn't choke on unknown options, it will just issue warnings
  9497. + # or remarks (even with -Werror). So we grep stderr for any message
  9498. + # that says an option was ignored or not supported.
  9499. + # When given -MP, icc 7.0 and 7.1 complain thusly:
  9500. + # icc: Command line warning: ignoring option '-M'; no argument required
  9501. + # The diagnosis changed in icc 8.0:
  9502. + # icc: Command line remark: option '-MP' not supported
  9503. + if (grep 'ignoring option' conftest.err ||
  9504. + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
  9505. + am_cv_CC_dependencies_compiler_type=$depmode
  9506. + $as_echo "$as_me:$LINENO: success" >&5
  9507. + break
  9508. + fi
  9509. + fi
  9510. + $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
  9511. + sed -e 's/^/| /' < conftest.err >&5
  9512. + done
  9513. +
  9514. + cd ..
  9515. + rm -rf conftest.dir
  9516. +else
  9517. + am_cv_CC_dependencies_compiler_type=none
  9518. +fi
  9519. +
  9520. +fi
  9521. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
  9522. +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
  9523. +if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
  9524. +then as_fn_error $? "no usable dependency style found" "$LINENO" 5
  9525. +else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
  9526. +
  9527. +fi
  9528. +
  9529. +
  9530. +# Check for the 'make' the user wants to use.
  9531. +for ac_prog in make
  9532. +do
  9533. + # Extract the first word of "$ac_prog", so it can be a program name with args.
  9534. +set dummy $ac_prog; ac_word=$2
  9535. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  9536. +$as_echo_n "checking for $ac_word... " >&6; }
  9537. +if ${ac_cv_prog_MAKE+:} false; then :
  9538. + $as_echo_n "(cached) " >&6
  9539. +else
  9540. + if test -n "$MAKE"; then
  9541. + ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
  9542. +else
  9543. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  9544. +for as_dir in $PATH
  9545. +do
  9546. + IFS=$as_save_IFS
  9547. + test -z "$as_dir" && as_dir=.
  9548. + for ac_exec_ext in '' $ac_executable_extensions; do
  9549. + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  9550. + ac_cv_prog_MAKE="$ac_prog"
  9551. + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  9552. + break 2
  9553. + fi
  9554. +done
  9555. + done
  9556. +IFS=$as_save_IFS
  9557. +
  9558. +fi
  9559. +fi
  9560. +MAKE=$ac_cv_prog_MAKE
  9561. +if test -n "$MAKE"; then
  9562. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
  9563. +$as_echo "$MAKE" >&6; }
  9564. +else
  9565. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  9566. +$as_echo "no" >&6; }
  9567. +fi
  9568. +
  9569. +
  9570. + test -n "$MAKE" && break
  9571. +done
  9572. +
  9573. +MAKE_IS_GNU=
  9574. +case "`$MAKE --version 2>&1 | sed 1q`" in
  9575. + *GNU*)
  9576. + MAKE_IS_GNU=yes
  9577. + ;;
  9578. +esac
  9579. + if test "$MAKE_IS_GNU" = yes; then
  9580. + GMAKE_TRUE=
  9581. + GMAKE_FALSE='#'
  9582. +else
  9583. + GMAKE_TRUE='#'
  9584. + GMAKE_FALSE=
  9585. +fi
  9586. +
  9587. +
  9588. +ALL_LINGUAS=
  9589. +# If we haven't got the data from the intl directory,
  9590. +# assume NLS is disabled.
  9591. +USE_NLS=no
  9592. +LIBINTL=
  9593. +LIBINTL_DEP=
  9594. +INCINTL=
  9595. +XGETTEXT=
  9596. +GMSGFMT=
  9597. +POSUB=
  9598. +
  9599. +if test -f ../../intl/config.intl; then
  9600. + . ../../intl/config.intl
  9601. +fi
  9602. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
  9603. +$as_echo_n "checking whether NLS is requested... " >&6; }
  9604. +if test x"$USE_NLS" != xyes; then
  9605. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  9606. +$as_echo "no" >&6; }
  9607. +else
  9608. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  9609. +$as_echo "yes" >&6; }
  9610. +
  9611. +$as_echo "#define ENABLE_NLS 1" >>confdefs.h
  9612. +
  9613. +
  9614. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
  9615. +$as_echo_n "checking for catalogs to be installed... " >&6; }
  9616. + # Look for .po and .gmo files in the source directory.
  9617. + CATALOGS=
  9618. + XLINGUAS=
  9619. + for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
  9620. + # If there aren't any .gmo files the shell will give us the
  9621. + # literal string "../path/to/srcdir/po/*.gmo" which has to be
  9622. + # weeded out.
  9623. + case "$cat" in *\**)
  9624. + continue;;
  9625. + esac
  9626. + # The quadruple backslash is collapsed to a double backslash
  9627. + # by the backticks, then collapsed again by the double quotes,
  9628. + # leaving us with one backslash in the sed expression (right
  9629. + # before the dot that mustn't act as a wildcard).
  9630. + cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
  9631. + lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
  9632. + # The user is allowed to set LINGUAS to a list of languages to
  9633. + # install catalogs for. If it's empty that means "all of them."
  9634. + if test "x$LINGUAS" = x; then
  9635. + CATALOGS="$CATALOGS $cat"
  9636. + XLINGUAS="$XLINGUAS $lang"
  9637. + else
  9638. + case "$LINGUAS" in *$lang*)
  9639. + CATALOGS="$CATALOGS $cat"
  9640. + XLINGUAS="$XLINGUAS $lang"
  9641. + ;;
  9642. + esac
  9643. + fi
  9644. + done
  9645. + LINGUAS="$XLINGUAS"
  9646. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
  9647. +$as_echo "$LINGUAS" >&6; }
  9648. +
  9649. +
  9650. + DATADIRNAME=share
  9651. +
  9652. + INSTOBJEXT=.mo
  9653. +
  9654. + GENCAT=gencat
  9655. +
  9656. + CATOBJEXT=.gmo
  9657. +
  9658. +fi
  9659. +
  9660. +# Check for common headers.
  9661. +# FIXME: Seems to me this can cause problems for i386-windows hosts.
  9662. +# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
  9663. +for ac_header in stdlib.h string.h strings.h unistd.h time.h
  9664. +do :
  9665. + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
  9666. +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
  9667. +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  9668. + cat >>confdefs.h <<_ACEOF
  9669. +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  9670. +_ACEOF
  9671. +
  9672. +fi
  9673. +
  9674. +done
  9675. +
  9676. +for ac_header in sys/time.h sys/times.h sys/resource.h sys/mman.h
  9677. +do :
  9678. + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
  9679. +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
  9680. +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  9681. + cat >>confdefs.h <<_ACEOF
  9682. +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  9683. +_ACEOF
  9684. +
  9685. +fi
  9686. +
  9687. +done
  9688. +
  9689. +for ac_header in fcntl.h fpu_control.h
  9690. +do :
  9691. + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
  9692. +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
  9693. +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  9694. + cat >>confdefs.h <<_ACEOF
  9695. +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  9696. +_ACEOF
  9697. +
  9698. +fi
  9699. +
  9700. +done
  9701. +
  9702. +for ac_header in dlfcn.h errno.h sys/stat.h
  9703. +do :
  9704. + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
  9705. +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
  9706. +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  9707. + cat >>confdefs.h <<_ACEOF
  9708. +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  9709. +_ACEOF
  9710. +
  9711. +fi
  9712. +
  9713. +done
  9714. +
  9715. +for ac_func in getrusage time sigaction __setfpucw
  9716. +do :
  9717. + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
  9718. +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
  9719. +if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
  9720. + cat >>confdefs.h <<_ACEOF
  9721. +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  9722. +_ACEOF
  9723. +
  9724. +fi
  9725. +done
  9726. +
  9727. +for ac_func in mmap munmap lstat truncate ftruncate posix_fallocate
  9728. +do :
  9729. + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
  9730. +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
  9731. +if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
  9732. + cat >>confdefs.h <<_ACEOF
  9733. +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  9734. +_ACEOF
  9735. +
  9736. +fi
  9737. +done
  9738. +
  9739. +ac_fn_c_check_member "$LINENO" "struct stat" "st_dev" "ac_cv_member_struct_stat_st_dev" "#ifdef HAVE_SYS_TYPES_H
  9740. +#include <sys/types.h>
  9741. +#endif
  9742. +#ifdef HAVE_SYS_STAT_H
  9743. +#include <sys/stat.h>
  9744. +#endif
  9745. +"
  9746. +if test "x$ac_cv_member_struct_stat_st_dev" = xyes; then :
  9747. +
  9748. +cat >>confdefs.h <<_ACEOF
  9749. +#define HAVE_STRUCT_STAT_ST_DEV 1
  9750. +_ACEOF
  9751. +
  9752. +
  9753. +fi
  9754. +ac_fn_c_check_member "$LINENO" "struct stat" "st_ino" "ac_cv_member_struct_stat_st_ino" "#ifdef HAVE_SYS_TYPES_H
  9755. +#include <sys/types.h>
  9756. +#endif
  9757. +#ifdef HAVE_SYS_STAT_H
  9758. +#include <sys/stat.h>
  9759. +#endif
  9760. +"
  9761. +if test "x$ac_cv_member_struct_stat_st_ino" = xyes; then :
  9762. +
  9763. +cat >>confdefs.h <<_ACEOF
  9764. +#define HAVE_STRUCT_STAT_ST_INO 1
  9765. +_ACEOF
  9766. +
  9767. +
  9768. +fi
  9769. +ac_fn_c_check_member "$LINENO" "struct stat" "st_mode" "ac_cv_member_struct_stat_st_mode" "#ifdef HAVE_SYS_TYPES_H
  9770. +#include <sys/types.h>
  9771. +#endif
  9772. +#ifdef HAVE_SYS_STAT_H
  9773. +#include <sys/stat.h>
  9774. +#endif
  9775. +"
  9776. +if test "x$ac_cv_member_struct_stat_st_mode" = xyes; then :
  9777. +
  9778. +cat >>confdefs.h <<_ACEOF
  9779. +#define HAVE_STRUCT_STAT_ST_MODE 1
  9780. +_ACEOF
  9781. +
  9782. +
  9783. +fi
  9784. +ac_fn_c_check_member "$LINENO" "struct stat" "st_nlink" "ac_cv_member_struct_stat_st_nlink" "#ifdef HAVE_SYS_TYPES_H
  9785. +#include <sys/types.h>
  9786. +#endif
  9787. +#ifdef HAVE_SYS_STAT_H
  9788. +#include <sys/stat.h>
  9789. +#endif
  9790. +"
  9791. +if test "x$ac_cv_member_struct_stat_st_nlink" = xyes; then :
  9792. +
  9793. +cat >>confdefs.h <<_ACEOF
  9794. +#define HAVE_STRUCT_STAT_ST_NLINK 1
  9795. +_ACEOF
  9796. +
  9797. +
  9798. +fi
  9799. +ac_fn_c_check_member "$LINENO" "struct stat" "st_uid" "ac_cv_member_struct_stat_st_uid" "#ifdef HAVE_SYS_TYPES_H
  9800. +#include <sys/types.h>
  9801. +#endif
  9802. +#ifdef HAVE_SYS_STAT_H
  9803. +#include <sys/stat.h>
  9804. +#endif
  9805. +"
  9806. +if test "x$ac_cv_member_struct_stat_st_uid" = xyes; then :
  9807. +
  9808. +cat >>confdefs.h <<_ACEOF
  9809. +#define HAVE_STRUCT_STAT_ST_UID 1
  9810. +_ACEOF
  9811. +
  9812. +
  9813. +fi
  9814. +ac_fn_c_check_member "$LINENO" "struct stat" "st_gid" "ac_cv_member_struct_stat_st_gid" "#ifdef HAVE_SYS_TYPES_H
  9815. +#include <sys/types.h>
  9816. +#endif
  9817. +#ifdef HAVE_SYS_STAT_H
  9818. +#include <sys/stat.h>
  9819. +#endif
  9820. +"
  9821. +if test "x$ac_cv_member_struct_stat_st_gid" = xyes; then :
  9822. +
  9823. +cat >>confdefs.h <<_ACEOF
  9824. +#define HAVE_STRUCT_STAT_ST_GID 1
  9825. +_ACEOF
  9826. +
  9827. +
  9828. +fi
  9829. +ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "#ifdef HAVE_SYS_TYPES_H
  9830. +#include <sys/types.h>
  9831. +#endif
  9832. +#ifdef HAVE_SYS_STAT_H
  9833. +#include <sys/stat.h>
  9834. +#endif
  9835. +"
  9836. +if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
  9837. +
  9838. +cat >>confdefs.h <<_ACEOF
  9839. +#define HAVE_STRUCT_STAT_ST_RDEV 1
  9840. +_ACEOF
  9841. +
  9842. +
  9843. +fi
  9844. +ac_fn_c_check_member "$LINENO" "struct stat" "st_size" "ac_cv_member_struct_stat_st_size" "#ifdef HAVE_SYS_TYPES_H
  9845. +#include <sys/types.h>
  9846. +#endif
  9847. +#ifdef HAVE_SYS_STAT_H
  9848. +#include <sys/stat.h>
  9849. +#endif
  9850. +"
  9851. +if test "x$ac_cv_member_struct_stat_st_size" = xyes; then :
  9852. +
  9853. +cat >>confdefs.h <<_ACEOF
  9854. +#define HAVE_STRUCT_STAT_ST_SIZE 1
  9855. +_ACEOF
  9856. +
  9857. +
  9858. +fi
  9859. +ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "#ifdef HAVE_SYS_TYPES_H
  9860. +#include <sys/types.h>
  9861. +#endif
  9862. +#ifdef HAVE_SYS_STAT_H
  9863. +#include <sys/stat.h>
  9864. +#endif
  9865. +"
  9866. +if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
  9867. +
  9868. +cat >>confdefs.h <<_ACEOF
  9869. +#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
  9870. +_ACEOF
  9871. +
  9872. +
  9873. +fi
  9874. +ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "#ifdef HAVE_SYS_TYPES_H
  9875. +#include <sys/types.h>
  9876. +#endif
  9877. +#ifdef HAVE_SYS_STAT_H
  9878. +#include <sys/stat.h>
  9879. +#endif
  9880. +"
  9881. +if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
  9882. +
  9883. +cat >>confdefs.h <<_ACEOF
  9884. +#define HAVE_STRUCT_STAT_ST_BLOCKS 1
  9885. +_ACEOF
  9886. +
  9887. +
  9888. +fi
  9889. +ac_fn_c_check_member "$LINENO" "struct stat" "st_atime" "ac_cv_member_struct_stat_st_atime" "#ifdef HAVE_SYS_TYPES_H
  9890. +#include <sys/types.h>
  9891. +#endif
  9892. +#ifdef HAVE_SYS_STAT_H
  9893. +#include <sys/stat.h>
  9894. +#endif
  9895. +"
  9896. +if test "x$ac_cv_member_struct_stat_st_atime" = xyes; then :
  9897. +
  9898. +cat >>confdefs.h <<_ACEOF
  9899. +#define HAVE_STRUCT_STAT_ST_ATIME 1
  9900. +_ACEOF
  9901. +
  9902. +
  9903. +fi
  9904. +ac_fn_c_check_member "$LINENO" "struct stat" "st_mtime" "ac_cv_member_struct_stat_st_mtime" "#ifdef HAVE_SYS_TYPES_H
  9905. +#include <sys/types.h>
  9906. +#endif
  9907. +#ifdef HAVE_SYS_STAT_H
  9908. +#include <sys/stat.h>
  9909. +#endif
  9910. +"
  9911. +if test "x$ac_cv_member_struct_stat_st_mtime" = xyes; then :
  9912. +
  9913. +cat >>confdefs.h <<_ACEOF
  9914. +#define HAVE_STRUCT_STAT_ST_MTIME 1
  9915. +_ACEOF
  9916. +
  9917. +
  9918. +fi
  9919. +ac_fn_c_check_member "$LINENO" "struct stat" "st_ctime" "ac_cv_member_struct_stat_st_ctime" "#ifdef HAVE_SYS_TYPES_H
  9920. +#include <sys/types.h>
  9921. +#endif
  9922. +#ifdef HAVE_SYS_STAT_H
  9923. +#include <sys/stat.h>
  9924. +#endif
  9925. +"
  9926. +if test "x$ac_cv_member_struct_stat_st_ctime" = xyes; then :
  9927. +
  9928. +cat >>confdefs.h <<_ACEOF
  9929. +#define HAVE_STRUCT_STAT_ST_CTIME 1
  9930. +_ACEOF
  9931. +
  9932. +
  9933. +fi
  9934. +
  9935. +ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
  9936. +#include <sys/socket.h>
  9937. +
  9938. +"
  9939. +if test "x$ac_cv_type_socklen_t" = xyes; then :
  9940. +
  9941. +cat >>confdefs.h <<_ACEOF
  9942. +#define HAVE_SOCKLEN_T 1
  9943. +_ACEOF
  9944. +
  9945. +
  9946. +fi
  9947. +
  9948. +
  9949. +# Check for socket libraries
  9950. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bind in -lsocket" >&5
  9951. +$as_echo_n "checking for bind in -lsocket... " >&6; }
  9952. +if ${ac_cv_lib_socket_bind+:} false; then :
  9953. + $as_echo_n "(cached) " >&6
  9954. +else
  9955. + ac_check_lib_save_LIBS=$LIBS
  9956. +LIBS="-lsocket $LIBS"
  9957. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  9958. +/* end confdefs.h. */
  9959. +
  9960. +/* Override any GCC internal prototype to avoid an error.
  9961. + Use char because int might match the return type of a GCC
  9962. + builtin and then its argument prototype would still apply. */
  9963. +#ifdef __cplusplus
  9964. +extern "C"
  9965. +#endif
  9966. +char bind ();
  9967. +int
  9968. +main ()
  9969. +{
  9970. +return bind ();
  9971. + ;
  9972. + return 0;
  9973. +}
  9974. +_ACEOF
  9975. +if ac_fn_c_try_link "$LINENO"; then :
  9976. + ac_cv_lib_socket_bind=yes
  9977. +else
  9978. + ac_cv_lib_socket_bind=no
  9979. +fi
  9980. +rm -f core conftest.err conftest.$ac_objext \
  9981. + conftest$ac_exeext conftest.$ac_ext
  9982. +LIBS=$ac_check_lib_save_LIBS
  9983. +fi
  9984. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_bind" >&5
  9985. +$as_echo "$ac_cv_lib_socket_bind" >&6; }
  9986. +if test "x$ac_cv_lib_socket_bind" = xyes; then :
  9987. + cat >>confdefs.h <<_ACEOF
  9988. +#define HAVE_LIBSOCKET 1
  9989. +_ACEOF
  9990. +
  9991. + LIBS="-lsocket $LIBS"
  9992. +
  9993. +fi
  9994. +
  9995. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
  9996. +$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
  9997. +if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
  9998. + $as_echo_n "(cached) " >&6
  9999. +else
  10000. + ac_check_lib_save_LIBS=$LIBS
  10001. +LIBS="-lnsl $LIBS"
  10002. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  10003. +/* end confdefs.h. */
  10004. +
  10005. +/* Override any GCC internal prototype to avoid an error.
  10006. + Use char because int might match the return type of a GCC
  10007. + builtin and then its argument prototype would still apply. */
  10008. +#ifdef __cplusplus
  10009. +extern "C"
  10010. +#endif
  10011. +char gethostbyname ();
  10012. +int
  10013. +main ()
  10014. +{
  10015. +return gethostbyname ();
  10016. + ;
  10017. + return 0;
  10018. +}
  10019. +_ACEOF
  10020. +if ac_fn_c_try_link "$LINENO"; then :
  10021. + ac_cv_lib_nsl_gethostbyname=yes
  10022. +else
  10023. + ac_cv_lib_nsl_gethostbyname=no
  10024. +fi
  10025. +rm -f core conftest.err conftest.$ac_objext \
  10026. + conftest$ac_exeext conftest.$ac_ext
  10027. +LIBS=$ac_check_lib_save_LIBS
  10028. +fi
  10029. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
  10030. +$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
  10031. +if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
  10032. + cat >>confdefs.h <<_ACEOF
  10033. +#define HAVE_LIBNSL 1
  10034. +_ACEOF
  10035. +
  10036. + LIBS="-lnsl $LIBS"
  10037. +
  10038. +fi
  10039. +
  10040. +
  10041. +# BFD conditionally uses zlib, so we must link it in if libbfd does, by
  10042. +# using the same condition.
  10043. +
  10044. + # Use the system's zlib library.
  10045. + zlibdir="-L\$(top_builddir)/../zlib"
  10046. + zlibinc="-I\$(top_srcdir)/../zlib"
  10047. +
  10048. +# Check whether --with-system-zlib was given.
  10049. +if test "${with_system_zlib+set}" = set; then :
  10050. + withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
  10051. + zlibdir=
  10052. + zlibinc=
  10053. + fi
  10054. +
  10055. +fi
  10056. +
  10057. +
  10058. +
  10059. +
  10060. +
  10061. +# BFD uses libdl when when plugins enabled.
  10062. +
  10063. + maybe_plugins=no
  10064. + for ac_header in dlfcn.h
  10065. +do :
  10066. + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
  10067. +"
  10068. +if test "x$ac_cv_header_dlfcn_h" = xyes; then :
  10069. + cat >>confdefs.h <<_ACEOF
  10070. +#define HAVE_DLFCN_H 1
  10071. +_ACEOF
  10072. + maybe_plugins=yes
  10073. +fi
  10074. +
  10075. +done
  10076. +
  10077. + for ac_header in windows.h
  10078. +do :
  10079. + ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
  10080. +"
  10081. +if test "x$ac_cv_header_windows_h" = xyes; then :
  10082. + cat >>confdefs.h <<_ACEOF
  10083. +#define HAVE_WINDOWS_H 1
  10084. +_ACEOF
  10085. + maybe_plugins=yes
  10086. +fi
  10087. +
  10088. +done
  10089. +
  10090. +
  10091. + # Check whether --enable-plugins was given.
  10092. +if test "${enable_plugins+set}" = set; then :
  10093. + enableval=$enable_plugins; case "${enableval}" in
  10094. + no) plugins=no ;;
  10095. + *) plugins=yes
  10096. + if test "$maybe_plugins" != "yes" ; then
  10097. + as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
  10098. + fi ;;
  10099. + esac
  10100. +else
  10101. + plugins=$maybe_plugins
  10102. +
  10103. +fi
  10104. +
  10105. + if test "$plugins" = "yes"; then
  10106. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
  10107. +$as_echo_n "checking for library containing dlsym... " >&6; }
  10108. +if ${ac_cv_search_dlsym+:} false; then :
  10109. + $as_echo_n "(cached) " >&6
  10110. +else
  10111. + ac_func_search_save_LIBS=$LIBS
  10112. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  10113. +/* end confdefs.h. */
  10114. +
  10115. +/* Override any GCC internal prototype to avoid an error.
  10116. + Use char because int might match the return type of a GCC
  10117. + builtin and then its argument prototype would still apply. */
  10118. +#ifdef __cplusplus
  10119. +extern "C"
  10120. +#endif
  10121. +char dlsym ();
  10122. +int
  10123. +main ()
  10124. +{
  10125. +return dlsym ();
  10126. + ;
  10127. + return 0;
  10128. +}
  10129. +_ACEOF
  10130. +for ac_lib in '' dl; do
  10131. + if test -z "$ac_lib"; then
  10132. + ac_res="none required"
  10133. + else
  10134. + ac_res=-l$ac_lib
  10135. + LIBS="-l$ac_lib $ac_func_search_save_LIBS"
  10136. + fi
  10137. + if ac_fn_c_try_link "$LINENO"; then :
  10138. + ac_cv_search_dlsym=$ac_res
  10139. +fi
  10140. +rm -f core conftest.err conftest.$ac_objext \
  10141. + conftest$ac_exeext
  10142. + if ${ac_cv_search_dlsym+:} false; then :
  10143. + break
  10144. +fi
  10145. +done
  10146. +if ${ac_cv_search_dlsym+:} false; then :
  10147. +
  10148. +else
  10149. + ac_cv_search_dlsym=no
  10150. +fi
  10151. +rm conftest.$ac_ext
  10152. +LIBS=$ac_func_search_save_LIBS
  10153. +fi
  10154. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
  10155. +$as_echo "$ac_cv_search_dlsym" >&6; }
  10156. +ac_res=$ac_cv_search_dlsym
  10157. +if test "$ac_res" != no; then :
  10158. + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  10159. +
  10160. +fi
  10161. +
  10162. + fi
  10163. +
  10164. + if test "$plugins" = yes; then
  10165. + PLUGINS_TRUE=
  10166. + PLUGINS_FALSE='#'
  10167. +else
  10168. + PLUGINS_TRUE='#'
  10169. + PLUGINS_FALSE=
  10170. +fi
  10171. +
  10172. +
  10173. +
  10174. +
  10175. +
  10176. +# Set options
  10177. +enable_dlopen=yes
  10178. +
  10179. +
  10180. +
  10181. +
  10182. + enable_win32_dll=no
  10183. +
  10184. +
  10185. + # Check whether --enable-shared was given.
  10186. +if test "${enable_shared+set}" = set; then :
  10187. + enableval=$enable_shared; p=${PACKAGE-default}
  10188. + case $enableval in
  10189. + yes) enable_shared=yes ;;
  10190. + no) enable_shared=no ;;
  10191. + *)
  10192. + enable_shared=no
  10193. + # Look at the argument we got. We use all the common list separators.
  10194. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  10195. + for pkg in $enableval; do
  10196. + IFS="$lt_save_ifs"
  10197. + if test "X$pkg" = "X$p"; then
  10198. + enable_shared=yes
  10199. + fi
  10200. + done
  10201. + IFS="$lt_save_ifs"
  10202. + ;;
  10203. + esac
  10204. +else
  10205. + enable_shared=yes
  10206. +fi
  10207. +
  10208. +
  10209. +
  10210. +
  10211. +
  10212. +
  10213. +
  10214. +
  10215. +
  10216. + # Check whether --enable-static was given.
  10217. +if test "${enable_static+set}" = set; then :
  10218. + enableval=$enable_static; p=${PACKAGE-default}
  10219. + case $enableval in
  10220. + yes) enable_static=yes ;;
  10221. + no) enable_static=no ;;
  10222. + *)
  10223. + enable_static=no
  10224. + # Look at the argument we got. We use all the common list separators.
  10225. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  10226. + for pkg in $enableval; do
  10227. + IFS="$lt_save_ifs"
  10228. + if test "X$pkg" = "X$p"; then
  10229. + enable_static=yes
  10230. + fi
  10231. + done
  10232. + IFS="$lt_save_ifs"
  10233. + ;;
  10234. + esac
  10235. +else
  10236. + enable_static=yes
  10237. +fi
  10238. +
  10239. +
  10240. +
  10241. +
  10242. +
  10243. +
  10244. +
  10245. +
  10246. +
  10247. +
  10248. +# Check whether --with-pic was given.
  10249. +if test "${with_pic+set}" = set; then :
  10250. + withval=$with_pic; pic_mode="$withval"
  10251. +else
  10252. + pic_mode=default
  10253. +fi
  10254. +
  10255. +
  10256. +test -z "$pic_mode" && pic_mode=default
  10257. +
  10258. +
  10259. +
  10260. +
  10261. +
  10262. +
  10263. +
  10264. + # Check whether --enable-fast-install was given.
  10265. +if test "${enable_fast_install+set}" = set; then :
  10266. + enableval=$enable_fast_install; p=${PACKAGE-default}
  10267. + case $enableval in
  10268. + yes) enable_fast_install=yes ;;
  10269. + no) enable_fast_install=no ;;
  10270. + *)
  10271. + enable_fast_install=no
  10272. + # Look at the argument we got. We use all the common list separators.
  10273. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  10274. + for pkg in $enableval; do
  10275. + IFS="$lt_save_ifs"
  10276. + if test "X$pkg" = "X$p"; then
  10277. + enable_fast_install=yes
  10278. + fi
  10279. + done
  10280. + IFS="$lt_save_ifs"
  10281. + ;;
  10282. + esac
  10283. +else
  10284. + enable_fast_install=yes
  10285. +fi
  10286. +
  10287. +
  10288. +
  10289. +
  10290. +
  10291. +
  10292. +
  10293. +
  10294. +
  10295. +
  10296. +
  10297. +# This can be used to rebuild libtool when needed
  10298. +LIBTOOL_DEPS="$ltmain"
  10299. +
  10300. +# Always use our own libtool.
  10301. +LIBTOOL='$(SHELL) $(top_builddir)/libtool'
  10302. +
  10303. +
  10304. +
  10305. +
  10306. +
  10307. +
  10308. +
  10309. +
  10310. +
  10311. +
  10312. +
  10313. +
  10314. +
  10315. +
  10316. +
  10317. +
  10318. +
  10319. +
  10320. +
  10321. +
  10322. +
  10323. +
  10324. +
  10325. +
  10326. +
  10327. +
  10328. +test -z "$LN_S" && LN_S="ln -s"
  10329. +
  10330. +
  10331. +
  10332. +
  10333. +
  10334. +
  10335. +
  10336. +
  10337. +
  10338. +
  10339. +
  10340. +
  10341. +
  10342. +
  10343. +if test -n "${ZSH_VERSION+set}" ; then
  10344. + setopt NO_GLOB_SUBST
  10345. +fi
  10346. +
  10347. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
  10348. +$as_echo_n "checking for objdir... " >&6; }
  10349. +if ${lt_cv_objdir+:} false; then :
  10350. + $as_echo_n "(cached) " >&6
  10351. +else
  10352. + rm -f .libs 2>/dev/null
  10353. +mkdir .libs 2>/dev/null
  10354. +if test -d .libs; then
  10355. + lt_cv_objdir=.libs
  10356. +else
  10357. + # MS-DOS does not allow filenames that begin with a dot.
  10358. + lt_cv_objdir=_libs
  10359. +fi
  10360. +rmdir .libs 2>/dev/null
  10361. +fi
  10362. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
  10363. +$as_echo "$lt_cv_objdir" >&6; }
  10364. +objdir=$lt_cv_objdir
  10365. +
  10366. +
  10367. +
  10368. +
  10369. +
  10370. +cat >>confdefs.h <<_ACEOF
  10371. +#define LT_OBJDIR "$lt_cv_objdir/"
  10372. +_ACEOF
  10373. +
  10374. +
  10375. +
  10376. +
  10377. +case $host_os in
  10378. +aix3*)
  10379. + # AIX sometimes has problems with the GCC collect2 program. For some
  10380. + # reason, if we set the COLLECT_NAMES environment variable, the problems
  10381. + # vanish in a puff of smoke.
  10382. + if test "X${COLLECT_NAMES+set}" != Xset; then
  10383. + COLLECT_NAMES=
  10384. + export COLLECT_NAMES
  10385. + fi
  10386. + ;;
  10387. +esac
  10388. +
  10389. +# Global variables:
  10390. +ofile=libtool
  10391. +can_build_shared=yes
  10392. +
  10393. +# All known linkers require a `.a' archive for static linking (except MSVC,
  10394. +# which needs '.lib').
  10395. +libext=a
  10396. +
  10397. +with_gnu_ld="$lt_cv_prog_gnu_ld"
  10398. +
  10399. +old_CC="$CC"
  10400. +old_CFLAGS="$CFLAGS"
  10401. +
  10402. +# Set sane defaults for various variables
  10403. +test -z "$CC" && CC=cc
  10404. +test -z "$LTCC" && LTCC=$CC
  10405. +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
  10406. +test -z "$LD" && LD=ld
  10407. +test -z "$ac_objext" && ac_objext=o
  10408. +
  10409. +for cc_temp in $compiler""; do
  10410. + case $cc_temp in
  10411. + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
  10412. + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
  10413. + \-*) ;;
  10414. + *) break;;
  10415. + esac
  10416. +done
  10417. +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
  10418. +
  10419. +
  10420. +# Only perform the check for file, if the check method requires it
  10421. +test -z "$MAGIC_CMD" && MAGIC_CMD=file
  10422. +case $deplibs_check_method in
  10423. +file_magic*)
  10424. + if test "$file_magic_cmd" = '$MAGIC_CMD'; then
  10425. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
  10426. +$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
  10427. +if ${lt_cv_path_MAGIC_CMD+:} false; then :
  10428. + $as_echo_n "(cached) " >&6
  10429. +else
  10430. + case $MAGIC_CMD in
  10431. +[\\/*] | ?:[\\/]*)
  10432. + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
  10433. + ;;
  10434. +*)
  10435. + lt_save_MAGIC_CMD="$MAGIC_CMD"
  10436. + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  10437. + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
  10438. + for ac_dir in $ac_dummy; do
  10439. + IFS="$lt_save_ifs"
  10440. + test -z "$ac_dir" && ac_dir=.
  10441. + if test -f $ac_dir/${ac_tool_prefix}file; then
  10442. + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
  10443. + if test -n "$file_magic_test_file"; then
  10444. + case $deplibs_check_method in
  10445. + "file_magic "*)
  10446. + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
  10447. + MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  10448. + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  10449. + $EGREP "$file_magic_regex" > /dev/null; then
  10450. + :
  10451. + else
  10452. + cat <<_LT_EOF 1>&2
  10453. +
  10454. +*** Warning: the command libtool uses to detect shared libraries,
  10455. +*** $file_magic_cmd, produces output that libtool cannot recognize.
  10456. +*** The result is that libtool may fail to recognize shared libraries
  10457. +*** as such. This will affect the creation of libtool libraries that
  10458. +*** depend on shared libraries, but programs linked with such libtool
  10459. +*** libraries will work regardless of this problem. Nevertheless, you
  10460. +*** may want to report the problem to your system manager and/or to
  10461. +*** bug-libtool@gnu.org
  10462. +
  10463. +_LT_EOF
  10464. + fi ;;
  10465. + esac
  10466. + fi
  10467. + break
  10468. + fi
  10469. + done
  10470. + IFS="$lt_save_ifs"
  10471. + MAGIC_CMD="$lt_save_MAGIC_CMD"
  10472. + ;;
  10473. +esac
  10474. +fi
  10475. +
  10476. +MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  10477. +if test -n "$MAGIC_CMD"; then
  10478. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
  10479. +$as_echo "$MAGIC_CMD" >&6; }
  10480. +else
  10481. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  10482. +$as_echo "no" >&6; }
  10483. +fi
  10484. +
  10485. +
  10486. +
  10487. +
  10488. +
  10489. +if test -z "$lt_cv_path_MAGIC_CMD"; then
  10490. + if test -n "$ac_tool_prefix"; then
  10491. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
  10492. +$as_echo_n "checking for file... " >&6; }
  10493. +if ${lt_cv_path_MAGIC_CMD+:} false; then :
  10494. + $as_echo_n "(cached) " >&6
  10495. +else
  10496. + case $MAGIC_CMD in
  10497. +[\\/*] | ?:[\\/]*)
  10498. + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
  10499. + ;;
  10500. +*)
  10501. + lt_save_MAGIC_CMD="$MAGIC_CMD"
  10502. + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  10503. + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
  10504. + for ac_dir in $ac_dummy; do
  10505. + IFS="$lt_save_ifs"
  10506. + test -z "$ac_dir" && ac_dir=.
  10507. + if test -f $ac_dir/file; then
  10508. + lt_cv_path_MAGIC_CMD="$ac_dir/file"
  10509. + if test -n "$file_magic_test_file"; then
  10510. + case $deplibs_check_method in
  10511. + "file_magic "*)
  10512. + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
  10513. + MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  10514. + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  10515. + $EGREP "$file_magic_regex" > /dev/null; then
  10516. + :
  10517. + else
  10518. + cat <<_LT_EOF 1>&2
  10519. +
  10520. +*** Warning: the command libtool uses to detect shared libraries,
  10521. +*** $file_magic_cmd, produces output that libtool cannot recognize.
  10522. +*** The result is that libtool may fail to recognize shared libraries
  10523. +*** as such. This will affect the creation of libtool libraries that
  10524. +*** depend on shared libraries, but programs linked with such libtool
  10525. +*** libraries will work regardless of this problem. Nevertheless, you
  10526. +*** may want to report the problem to your system manager and/or to
  10527. +*** bug-libtool@gnu.org
  10528. +
  10529. +_LT_EOF
  10530. + fi ;;
  10531. + esac
  10532. + fi
  10533. + break
  10534. + fi
  10535. + done
  10536. + IFS="$lt_save_ifs"
  10537. + MAGIC_CMD="$lt_save_MAGIC_CMD"
  10538. + ;;
  10539. +esac
  10540. +fi
  10541. +
  10542. +MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  10543. +if test -n "$MAGIC_CMD"; then
  10544. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
  10545. +$as_echo "$MAGIC_CMD" >&6; }
  10546. +else
  10547. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  10548. +$as_echo "no" >&6; }
  10549. +fi
  10550. +
  10551. +
  10552. + else
  10553. + MAGIC_CMD=:
  10554. + fi
  10555. +fi
  10556. +
  10557. + fi
  10558. + ;;
  10559. +esac
  10560. +
  10561. +# Use C for the default configuration in the libtool script
  10562. +
  10563. +lt_save_CC="$CC"
  10564. +ac_ext=c
  10565. +ac_cpp='$CPP $CPPFLAGS'
  10566. +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  10567. +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  10568. +ac_compiler_gnu=$ac_cv_c_compiler_gnu
  10569. +
  10570. +
  10571. +# Source file extension for C test sources.
  10572. +ac_ext=c
  10573. +
  10574. +# Object file extension for compiled C test sources.
  10575. +objext=o
  10576. +objext=$objext
  10577. +
  10578. +# Code to be used in simple compile tests
  10579. +lt_simple_compile_test_code="int some_variable = 0;"
  10580. +
  10581. +# Code to be used in simple link tests
  10582. +lt_simple_link_test_code='int main(){return(0);}'
  10583. +
  10584. +
  10585. +
  10586. +
  10587. +
  10588. +
  10589. +
  10590. +# If no C compiler was specified, use CC.
  10591. +LTCC=${LTCC-"$CC"}
  10592. +
  10593. +# If no C compiler flags were specified, use CFLAGS.
  10594. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
  10595. +
  10596. +# Allow CC to be a program name with arguments.
  10597. +compiler=$CC
  10598. +
  10599. +# Save the default compiler, since it gets overwritten when the other
  10600. +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
  10601. +compiler_DEFAULT=$CC
  10602. +
  10603. +# save warnings/boilerplate of simple test code
  10604. +ac_outfile=conftest.$ac_objext
  10605. +echo "$lt_simple_compile_test_code" >conftest.$ac_ext
  10606. +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  10607. +_lt_compiler_boilerplate=`cat conftest.err`
  10608. +$RM conftest*
  10609. +
  10610. +ac_outfile=conftest.$ac_objext
  10611. +echo "$lt_simple_link_test_code" >conftest.$ac_ext
  10612. +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  10613. +_lt_linker_boilerplate=`cat conftest.err`
  10614. +$RM -r conftest*
  10615. +
  10616. +
  10617. +## CAVEAT EMPTOR:
  10618. +## There is no encapsulation within the following macros, do not change
  10619. +## the running order or otherwise move them around unless you know exactly
  10620. +## what you are doing...
  10621. +if test -n "$compiler"; then
  10622. +
  10623. +lt_prog_compiler_no_builtin_flag=
  10624. +
  10625. +if test "$GCC" = yes; then
  10626. + case $cc_basename in
  10627. + nvcc*)
  10628. + lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
  10629. + *)
  10630. + lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
  10631. + esac
  10632. +
  10633. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
  10634. +$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
  10635. +if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
  10636. + $as_echo_n "(cached) " >&6
  10637. +else
  10638. + lt_cv_prog_compiler_rtti_exceptions=no
  10639. + ac_outfile=conftest.$ac_objext
  10640. + echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  10641. + lt_compiler_flag="-fno-rtti -fno-exceptions"
  10642. + # Insert the option either (1) after the last *FLAGS variable, or
  10643. + # (2) before a word containing "conftest.", or (3) at the end.
  10644. + # Note that $ac_compile itself does not contain backslashes and begins
  10645. + # with a dollar sign (not a hyphen), so the echo should work correctly.
  10646. + # The option is referenced via a variable to avoid confusing sed.
  10647. + lt_compile=`echo "$ac_compile" | $SED \
  10648. + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  10649. + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
  10650. + -e 's:$: $lt_compiler_flag:'`
  10651. + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
  10652. + (eval "$lt_compile" 2>conftest.err)
  10653. + ac_status=$?
  10654. + cat conftest.err >&5
  10655. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  10656. + if (exit $ac_status) && test -s "$ac_outfile"; then
  10657. + # The compiler can only warn and ignore the option if not recognized
  10658. + # So say no if there are warnings other than the usual output.
  10659. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
  10660. + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  10661. + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
  10662. + lt_cv_prog_compiler_rtti_exceptions=yes
  10663. + fi
  10664. + fi
  10665. + $RM conftest*
  10666. +
  10667. +fi
  10668. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
  10669. +$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
  10670. +
  10671. +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
  10672. + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
  10673. +else
  10674. + :
  10675. +fi
  10676. +
  10677. +fi
  10678. +
  10679. +
  10680. +
  10681. +
  10682. +
  10683. +
  10684. + lt_prog_compiler_wl=
  10685. +lt_prog_compiler_pic=
  10686. +lt_prog_compiler_static=
  10687. +
  10688. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
  10689. +$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
  10690. +
  10691. + if test "$GCC" = yes; then
  10692. + lt_prog_compiler_wl='-Wl,'
  10693. + lt_prog_compiler_static='-static'
  10694. +
  10695. + case $host_os in
  10696. + aix*)
  10697. + # All AIX code is PIC.
  10698. + if test "$host_cpu" = ia64; then
  10699. + # AIX 5 now supports IA64 processor
  10700. + lt_prog_compiler_static='-Bstatic'
  10701. + fi
  10702. + lt_prog_compiler_pic='-fPIC'
  10703. + ;;
  10704. +
  10705. + amigaos*)
  10706. + case $host_cpu in
  10707. + powerpc)
  10708. + # see comment about AmigaOS4 .so support
  10709. + lt_prog_compiler_pic='-fPIC'
  10710. + ;;
  10711. + m68k)
  10712. + # FIXME: we need at least 68020 code to build shared libraries, but
  10713. + # adding the `-m68020' flag to GCC prevents building anything better,
  10714. + # like `-m68040'.
  10715. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
  10716. + ;;
  10717. + esac
  10718. + ;;
  10719. +
  10720. + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  10721. + # PIC is the default for these OSes.
  10722. + ;;
  10723. +
  10724. + mingw* | cygwin* | pw32* | os2* | cegcc*)
  10725. + # This hack is so that the source file can tell whether it is being
  10726. + # built for inclusion in a dll (and should export symbols for example).
  10727. + # Although the cygwin gcc ignores -fPIC, still need this for old-style
  10728. + # (--disable-auto-import) libraries
  10729. + lt_prog_compiler_pic='-DDLL_EXPORT'
  10730. + ;;
  10731. +
  10732. + darwin* | rhapsody*)
  10733. + # PIC is the default on this platform
  10734. + # Common symbols not allowed in MH_DYLIB files
  10735. + lt_prog_compiler_pic='-fno-common'
  10736. + ;;
  10737. +
  10738. + haiku*)
  10739. + # PIC is the default for Haiku.
  10740. + # The "-static" flag exists, but is broken.
  10741. + lt_prog_compiler_static=
  10742. + ;;
  10743. +
  10744. + hpux*)
  10745. + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  10746. + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  10747. + # sets the default TLS model and affects inlining.
  10748. + case $host_cpu in
  10749. + hppa*64*)
  10750. + # +Z the default
  10751. + ;;
  10752. + *)
  10753. + lt_prog_compiler_pic='-fPIC'
  10754. + ;;
  10755. + esac
  10756. + ;;
  10757. +
  10758. + interix[3-9]*)
  10759. + # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  10760. + # Instead, we relocate shared libraries at runtime.
  10761. + ;;
  10762. +
  10763. + msdosdjgpp*)
  10764. + # Just because we use GCC doesn't mean we suddenly get shared libraries
  10765. + # on systems that don't support them.
  10766. + lt_prog_compiler_can_build_shared=no
  10767. + enable_shared=no
  10768. + ;;
  10769. +
  10770. + *nto* | *qnx*)
  10771. + # QNX uses GNU C++, but need to define -shared option too, otherwise
  10772. + # it will coredump.
  10773. + lt_prog_compiler_pic='-fPIC -shared'
  10774. + ;;
  10775. +
  10776. + sysv4*MP*)
  10777. + if test -d /usr/nec; then
  10778. + lt_prog_compiler_pic=-Kconform_pic
  10779. + fi
  10780. + ;;
  10781. +
  10782. + *)
  10783. + lt_prog_compiler_pic='-fPIC'
  10784. + ;;
  10785. + esac
  10786. +
  10787. + case $cc_basename in
  10788. + nvcc*) # Cuda Compiler Driver 2.2
  10789. + lt_prog_compiler_wl='-Xlinker '
  10790. + lt_prog_compiler_pic='-Xcompiler -fPIC'
  10791. + ;;
  10792. + esac
  10793. + else
  10794. + # PORTME Check for flag to pass linker flags through the system compiler.
  10795. + case $host_os in
  10796. + aix*)
  10797. + lt_prog_compiler_wl='-Wl,'
  10798. + if test "$host_cpu" = ia64; then
  10799. + # AIX 5 now supports IA64 processor
  10800. + lt_prog_compiler_static='-Bstatic'
  10801. + else
  10802. + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
  10803. + fi
  10804. + ;;
  10805. +
  10806. + mingw* | cygwin* | pw32* | os2* | cegcc*)
  10807. + # This hack is so that the source file can tell whether it is being
  10808. + # built for inclusion in a dll (and should export symbols for example).
  10809. + lt_prog_compiler_pic='-DDLL_EXPORT'
  10810. + ;;
  10811. +
  10812. + hpux9* | hpux10* | hpux11*)
  10813. + lt_prog_compiler_wl='-Wl,'
  10814. + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  10815. + # not for PA HP-UX.
  10816. + case $host_cpu in
  10817. + hppa*64*|ia64*)
  10818. + # +Z the default
  10819. + ;;
  10820. + *)
  10821. + lt_prog_compiler_pic='+Z'
  10822. + ;;
  10823. + esac
  10824. + # Is there a better lt_prog_compiler_static that works with the bundled CC?
  10825. + lt_prog_compiler_static='${wl}-a ${wl}archive'
  10826. + ;;
  10827. +
  10828. + irix5* | irix6* | nonstopux*)
  10829. + lt_prog_compiler_wl='-Wl,'
  10830. + # PIC (with -KPIC) is the default.
  10831. + lt_prog_compiler_static='-non_shared'
  10832. + ;;
  10833. +
  10834. + linux* | k*bsd*-gnu | kopensolaris*-gnu)
  10835. + case $cc_basename in
  10836. + # old Intel for x86_64 which still supported -KPIC.
  10837. + ecc*)
  10838. + lt_prog_compiler_wl='-Wl,'
  10839. + lt_prog_compiler_pic='-KPIC'
  10840. + lt_prog_compiler_static='-static'
  10841. + ;;
  10842. + # icc used to be incompatible with GCC.
  10843. + # ICC 10 doesn't accept -KPIC any more.
  10844. + icc* | ifort*)
  10845. + lt_prog_compiler_wl='-Wl,'
  10846. + lt_prog_compiler_pic='-fPIC'
  10847. + lt_prog_compiler_static='-static'
  10848. + ;;
  10849. + # Lahey Fortran 8.1.
  10850. + lf95*)
  10851. + lt_prog_compiler_wl='-Wl,'
  10852. + lt_prog_compiler_pic='--shared'
  10853. + lt_prog_compiler_static='--static'
  10854. + ;;
  10855. + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
  10856. + # Portland Group compilers (*not* the Pentium gcc compiler,
  10857. + # which looks to be a dead project)
  10858. + lt_prog_compiler_wl='-Wl,'
  10859. + lt_prog_compiler_pic='-fpic'
  10860. + lt_prog_compiler_static='-Bstatic'
  10861. + ;;
  10862. + ccc*)
  10863. + lt_prog_compiler_wl='-Wl,'
  10864. + # All Alpha code is PIC.
  10865. + lt_prog_compiler_static='-non_shared'
  10866. + ;;
  10867. + xl* | bgxl* | bgf* | mpixl*)
  10868. + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
  10869. + lt_prog_compiler_wl='-Wl,'
  10870. + lt_prog_compiler_pic='-qpic'
  10871. + lt_prog_compiler_static='-qstaticlink'
  10872. + ;;
  10873. + *)
  10874. + case `$CC -V 2>&1 | sed 5q` in
  10875. + *Sun\ F* | *Sun*Fortran*)
  10876. + # Sun Fortran 8.3 passes all unrecognized flags to the linker
  10877. + lt_prog_compiler_pic='-KPIC'
  10878. + lt_prog_compiler_static='-Bstatic'
  10879. + lt_prog_compiler_wl=''
  10880. + ;;
  10881. + *Sun\ C*)
  10882. + # Sun C 5.9
  10883. + lt_prog_compiler_pic='-KPIC'
  10884. + lt_prog_compiler_static='-Bstatic'
  10885. + lt_prog_compiler_wl='-Wl,'
  10886. + ;;
  10887. + esac
  10888. + ;;
  10889. + esac
  10890. + ;;
  10891. +
  10892. + newsos6)
  10893. + lt_prog_compiler_pic='-KPIC'
  10894. + lt_prog_compiler_static='-Bstatic'
  10895. + ;;
  10896. +
  10897. + *nto* | *qnx*)
  10898. + # QNX uses GNU C++, but need to define -shared option too, otherwise
  10899. + # it will coredump.
  10900. + lt_prog_compiler_pic='-fPIC -shared'
  10901. + ;;
  10902. +
  10903. + osf3* | osf4* | osf5*)
  10904. + lt_prog_compiler_wl='-Wl,'
  10905. + # All OSF/1 code is PIC.
  10906. + lt_prog_compiler_static='-non_shared'
  10907. + ;;
  10908. +
  10909. + rdos*)
  10910. + lt_prog_compiler_static='-non_shared'
  10911. + ;;
  10912. +
  10913. + solaris*)
  10914. + lt_prog_compiler_pic='-KPIC'
  10915. + lt_prog_compiler_static='-Bstatic'
  10916. + case $cc_basename in
  10917. + f77* | f90* | f95*)
  10918. + lt_prog_compiler_wl='-Qoption ld ';;
  10919. + *)
  10920. + lt_prog_compiler_wl='-Wl,';;
  10921. + esac
  10922. + ;;
  10923. +
  10924. + sunos4*)
  10925. + lt_prog_compiler_wl='-Qoption ld '
  10926. + lt_prog_compiler_pic='-PIC'
  10927. + lt_prog_compiler_static='-Bstatic'
  10928. + ;;
  10929. +
  10930. + sysv4 | sysv4.2uw2* | sysv4.3*)
  10931. + lt_prog_compiler_wl='-Wl,'
  10932. + lt_prog_compiler_pic='-KPIC'
  10933. + lt_prog_compiler_static='-Bstatic'
  10934. + ;;
  10935. +
  10936. + sysv4*MP*)
  10937. + if test -d /usr/nec ;then
  10938. + lt_prog_compiler_pic='-Kconform_pic'
  10939. + lt_prog_compiler_static='-Bstatic'
  10940. + fi
  10941. + ;;
  10942. +
  10943. + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  10944. + lt_prog_compiler_wl='-Wl,'
  10945. + lt_prog_compiler_pic='-KPIC'
  10946. + lt_prog_compiler_static='-Bstatic'
  10947. + ;;
  10948. +
  10949. + unicos*)
  10950. + lt_prog_compiler_wl='-Wl,'
  10951. + lt_prog_compiler_can_build_shared=no
  10952. + ;;
  10953. +
  10954. + uts4*)
  10955. + lt_prog_compiler_pic='-pic'
  10956. + lt_prog_compiler_static='-Bstatic'
  10957. + ;;
  10958. +
  10959. + *)
  10960. + lt_prog_compiler_can_build_shared=no
  10961. + ;;
  10962. + esac
  10963. + fi
  10964. +
  10965. +case $host_os in
  10966. + # For platforms which do not support PIC, -DPIC is meaningless:
  10967. + *djgpp*)
  10968. + lt_prog_compiler_pic=
  10969. + ;;
  10970. + *)
  10971. + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
  10972. + ;;
  10973. +esac
  10974. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
  10975. +$as_echo "$lt_prog_compiler_pic" >&6; }
  10976. +
  10977. +
  10978. +
  10979. +
  10980. +
  10981. +
  10982. +#
  10983. +# Check to make sure the PIC flag actually works.
  10984. +#
  10985. +if test -n "$lt_prog_compiler_pic"; then
  10986. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
  10987. +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
  10988. +if ${lt_cv_prog_compiler_pic_works+:} false; then :
  10989. + $as_echo_n "(cached) " >&6
  10990. +else
  10991. + lt_cv_prog_compiler_pic_works=no
  10992. + ac_outfile=conftest.$ac_objext
  10993. + echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  10994. + lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
  10995. + # Insert the option either (1) after the last *FLAGS variable, or
  10996. + # (2) before a word containing "conftest.", or (3) at the end.
  10997. + # Note that $ac_compile itself does not contain backslashes and begins
  10998. + # with a dollar sign (not a hyphen), so the echo should work correctly.
  10999. + # The option is referenced via a variable to avoid confusing sed.
  11000. + lt_compile=`echo "$ac_compile" | $SED \
  11001. + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  11002. + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
  11003. + -e 's:$: $lt_compiler_flag:'`
  11004. + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
  11005. + (eval "$lt_compile" 2>conftest.err)
  11006. + ac_status=$?
  11007. + cat conftest.err >&5
  11008. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  11009. + if (exit $ac_status) && test -s "$ac_outfile"; then
  11010. + # The compiler can only warn and ignore the option if not recognized
  11011. + # So say no if there are warnings other than the usual output.
  11012. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
  11013. + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  11014. + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
  11015. + lt_cv_prog_compiler_pic_works=yes
  11016. + fi
  11017. + fi
  11018. + $RM conftest*
  11019. +
  11020. +fi
  11021. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
  11022. +$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
  11023. +
  11024. +if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
  11025. + case $lt_prog_compiler_pic in
  11026. + "" | " "*) ;;
  11027. + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
  11028. + esac
  11029. +else
  11030. + lt_prog_compiler_pic=
  11031. + lt_prog_compiler_can_build_shared=no
  11032. +fi
  11033. +
  11034. +fi
  11035. +
  11036. +
  11037. +
  11038. +
  11039. +
  11040. +
  11041. +#
  11042. +# Check to make sure the static flag actually works.
  11043. +#
  11044. +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
  11045. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
  11046. +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
  11047. +if ${lt_cv_prog_compiler_static_works+:} false; then :
  11048. + $as_echo_n "(cached) " >&6
  11049. +else
  11050. + lt_cv_prog_compiler_static_works=no
  11051. + save_LDFLAGS="$LDFLAGS"
  11052. + LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
  11053. + echo "$lt_simple_link_test_code" > conftest.$ac_ext
  11054. + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
  11055. + # The linker can only warn and ignore the option if not recognized
  11056. + # So say no if there are warnings
  11057. + if test -s conftest.err; then
  11058. + # Append any errors to the config.log.
  11059. + cat conftest.err 1>&5
  11060. + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
  11061. + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  11062. + if diff conftest.exp conftest.er2 >/dev/null; then
  11063. + lt_cv_prog_compiler_static_works=yes
  11064. + fi
  11065. + else
  11066. + lt_cv_prog_compiler_static_works=yes
  11067. + fi
  11068. + fi
  11069. + $RM -r conftest*
  11070. + LDFLAGS="$save_LDFLAGS"
  11071. +
  11072. +fi
  11073. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
  11074. +$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
  11075. +
  11076. +if test x"$lt_cv_prog_compiler_static_works" = xyes; then
  11077. + :
  11078. +else
  11079. + lt_prog_compiler_static=
  11080. +fi
  11081. +
  11082. +
  11083. +
  11084. +
  11085. +
  11086. +
  11087. +
  11088. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
  11089. +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
  11090. +if ${lt_cv_prog_compiler_c_o+:} false; then :
  11091. + $as_echo_n "(cached) " >&6
  11092. +else
  11093. + lt_cv_prog_compiler_c_o=no
  11094. + $RM -r conftest 2>/dev/null
  11095. + mkdir conftest
  11096. + cd conftest
  11097. + mkdir out
  11098. + echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  11099. +
  11100. + lt_compiler_flag="-o out/conftest2.$ac_objext"
  11101. + # Insert the option either (1) after the last *FLAGS variable, or
  11102. + # (2) before a word containing "conftest.", or (3) at the end.
  11103. + # Note that $ac_compile itself does not contain backslashes and begins
  11104. + # with a dollar sign (not a hyphen), so the echo should work correctly.
  11105. + lt_compile=`echo "$ac_compile" | $SED \
  11106. + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  11107. + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
  11108. + -e 's:$: $lt_compiler_flag:'`
  11109. + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
  11110. + (eval "$lt_compile" 2>out/conftest.err)
  11111. + ac_status=$?
  11112. + cat out/conftest.err >&5
  11113. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  11114. + if (exit $ac_status) && test -s out/conftest2.$ac_objext
  11115. + then
  11116. + # The compiler can only warn and ignore the option if not recognized
  11117. + # So say no if there are warnings
  11118. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
  11119. + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
  11120. + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
  11121. + lt_cv_prog_compiler_c_o=yes
  11122. + fi
  11123. + fi
  11124. + chmod u+w . 2>&5
  11125. + $RM conftest*
  11126. + # SGI C++ compiler will create directory out/ii_files/ for
  11127. + # template instantiation
  11128. + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
  11129. + $RM out/* && rmdir out
  11130. + cd ..
  11131. + $RM -r conftest
  11132. + $RM conftest*
  11133. +
  11134. +fi
  11135. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
  11136. +$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
  11137. +
  11138. +
  11139. +
  11140. +
  11141. +
  11142. +
  11143. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
  11144. +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
  11145. +if ${lt_cv_prog_compiler_c_o+:} false; then :
  11146. + $as_echo_n "(cached) " >&6
  11147. +else
  11148. + lt_cv_prog_compiler_c_o=no
  11149. + $RM -r conftest 2>/dev/null
  11150. + mkdir conftest
  11151. + cd conftest
  11152. + mkdir out
  11153. + echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  11154. +
  11155. + lt_compiler_flag="-o out/conftest2.$ac_objext"
  11156. + # Insert the option either (1) after the last *FLAGS variable, or
  11157. + # (2) before a word containing "conftest.", or (3) at the end.
  11158. + # Note that $ac_compile itself does not contain backslashes and begins
  11159. + # with a dollar sign (not a hyphen), so the echo should work correctly.
  11160. + lt_compile=`echo "$ac_compile" | $SED \
  11161. + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  11162. + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
  11163. + -e 's:$: $lt_compiler_flag:'`
  11164. + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
  11165. + (eval "$lt_compile" 2>out/conftest.err)
  11166. + ac_status=$?
  11167. + cat out/conftest.err >&5
  11168. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  11169. + if (exit $ac_status) && test -s out/conftest2.$ac_objext
  11170. + then
  11171. + # The compiler can only warn and ignore the option if not recognized
  11172. + # So say no if there are warnings
  11173. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
  11174. + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
  11175. + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
  11176. + lt_cv_prog_compiler_c_o=yes
  11177. + fi
  11178. + fi
  11179. + chmod u+w . 2>&5
  11180. + $RM conftest*
  11181. + # SGI C++ compiler will create directory out/ii_files/ for
  11182. + # template instantiation
  11183. + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
  11184. + $RM out/* && rmdir out
  11185. + cd ..
  11186. + $RM -r conftest
  11187. + $RM conftest*
  11188. +
  11189. +fi
  11190. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
  11191. +$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
  11192. +
  11193. +
  11194. +
  11195. +
  11196. +hard_links="nottested"
  11197. +if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
  11198. + # do not overwrite the value of need_locks provided by the user
  11199. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
  11200. +$as_echo_n "checking if we can lock with hard links... " >&6; }
  11201. + hard_links=yes
  11202. + $RM conftest*
  11203. + ln conftest.a conftest.b 2>/dev/null && hard_links=no
  11204. + touch conftest.a
  11205. + ln conftest.a conftest.b 2>&5 || hard_links=no
  11206. + ln conftest.a conftest.b 2>/dev/null && hard_links=no
  11207. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
  11208. +$as_echo "$hard_links" >&6; }
  11209. + if test "$hard_links" = no; then
  11210. + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
  11211. +$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
  11212. + need_locks=warn
  11213. + fi
  11214. +else
  11215. + need_locks=no
  11216. +fi
  11217. +
  11218. +
  11219. +
  11220. +
  11221. +
  11222. +
  11223. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
  11224. +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
  11225. +
  11226. + runpath_var=
  11227. + allow_undefined_flag=
  11228. + always_export_symbols=no
  11229. + archive_cmds=
  11230. + archive_expsym_cmds=
  11231. + compiler_needs_object=no
  11232. + enable_shared_with_static_runtimes=no
  11233. + export_dynamic_flag_spec=
  11234. + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  11235. + hardcode_automatic=no
  11236. + hardcode_direct=no
  11237. + hardcode_direct_absolute=no
  11238. + hardcode_libdir_flag_spec=
  11239. + hardcode_libdir_flag_spec_ld=
  11240. + hardcode_libdir_separator=
  11241. + hardcode_minus_L=no
  11242. + hardcode_shlibpath_var=unsupported
  11243. + inherit_rpath=no
  11244. + link_all_deplibs=unknown
  11245. + module_cmds=
  11246. + module_expsym_cmds=
  11247. + old_archive_from_new_cmds=
  11248. + old_archive_from_expsyms_cmds=
  11249. + thread_safe_flag_spec=
  11250. + whole_archive_flag_spec=
  11251. + # include_expsyms should be a list of space-separated symbols to be *always*
  11252. + # included in the symbol list
  11253. + include_expsyms=
  11254. + # exclude_expsyms can be an extended regexp of symbols to exclude
  11255. + # it will be wrapped by ` (' and `)$', so one must not match beginning or
  11256. + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
  11257. + # as well as any symbol that contains `d'.
  11258. + exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
  11259. + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  11260. + # platforms (ab)use it in PIC code, but their linkers get confused if
  11261. + # the symbol is explicitly referenced. Since portable code cannot
  11262. + # rely on this symbol name, it's probably fine to never include it in
  11263. + # preloaded symbol tables.
  11264. + # Exclude shared library initialization/finalization symbols.
  11265. + extract_expsyms_cmds=
  11266. +
  11267. + case $host_os in
  11268. + cygwin* | mingw* | pw32* | cegcc*)
  11269. + # FIXME: the MSVC++ port hasn't been tested in a loooong time
  11270. + # When not using gcc, we currently assume that we are using
  11271. + # Microsoft Visual C++.
  11272. + if test "$GCC" != yes; then
  11273. + with_gnu_ld=no
  11274. + fi
  11275. + ;;
  11276. + interix*)
  11277. + # we just hope/assume this is gcc and not c89 (= MSVC++)
  11278. + with_gnu_ld=yes
  11279. + ;;
  11280. + openbsd*)
  11281. + with_gnu_ld=no
  11282. + ;;
  11283. + esac
  11284. +
  11285. + ld_shlibs=yes
  11286. +
  11287. + # On some targets, GNU ld is compatible enough with the native linker
  11288. + # that we're better off using the native interface for both.
  11289. + lt_use_gnu_ld_interface=no
  11290. + if test "$with_gnu_ld" = yes; then
  11291. + case $host_os in
  11292. + aix*)
  11293. + # The AIX port of GNU ld has always aspired to compatibility
  11294. + # with the native linker. However, as the warning in the GNU ld
  11295. + # block says, versions before 2.19.5* couldn't really create working
  11296. + # shared libraries, regardless of the interface used.
  11297. + case `$LD -v 2>&1` in
  11298. + *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
  11299. + *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
  11300. + *\ \(GNU\ Binutils\)\ [3-9]*) ;;
  11301. + *)
  11302. + lt_use_gnu_ld_interface=yes
  11303. + ;;
  11304. + esac
  11305. + ;;
  11306. + *)
  11307. + lt_use_gnu_ld_interface=yes
  11308. + ;;
  11309. + esac
  11310. + fi
  11311. +
  11312. + if test "$lt_use_gnu_ld_interface" = yes; then
  11313. + # If archive_cmds runs LD, not CC, wlarc should be empty
  11314. + wlarc='${wl}'
  11315. +
  11316. + # Set some defaults for GNU ld with shared library support. These
  11317. + # are reset later if shared libraries are not supported. Putting them
  11318. + # here allows them to be overridden if necessary.
  11319. + runpath_var=LD_RUN_PATH
  11320. + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
  11321. + export_dynamic_flag_spec='${wl}--export-dynamic'
  11322. + # ancient GNU ld didn't support --whole-archive et. al.
  11323. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
  11324. + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  11325. + else
  11326. + whole_archive_flag_spec=
  11327. + fi
  11328. + supports_anon_versioning=no
  11329. + case `$LD -v 2>&1` in
  11330. + *GNU\ gold*) supports_anon_versioning=yes ;;
  11331. + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
  11332. + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
  11333. + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
  11334. + *\ 2.11.*) ;; # other 2.11 versions
  11335. + *) supports_anon_versioning=yes ;;
  11336. + esac
  11337. +
  11338. + # See if GNU ld supports shared libraries.
  11339. + case $host_os in
  11340. + aix[3-9]*)
  11341. + # On AIX/PPC, the GNU linker is very broken
  11342. + if test "$host_cpu" != ia64; then
  11343. + ld_shlibs=no
  11344. + cat <<_LT_EOF 1>&2
  11345. +
  11346. +*** Warning: the GNU linker, at least up to release 2.19, is reported
  11347. +*** to be unable to reliably create shared libraries on AIX.
  11348. +*** Therefore, libtool is disabling shared libraries support. If you
  11349. +*** really care for shared libraries, you may want to install binutils
  11350. +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
  11351. +*** You will then need to restart the configuration process.
  11352. +
  11353. +_LT_EOF
  11354. + fi
  11355. + ;;
  11356. +
  11357. + amigaos*)
  11358. + case $host_cpu in
  11359. + powerpc)
  11360. + # see comment about AmigaOS4 .so support
  11361. + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  11362. + archive_expsym_cmds=''
  11363. + ;;
  11364. + m68k)
  11365. + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
  11366. + hardcode_libdir_flag_spec='-L$libdir'
  11367. + hardcode_minus_L=yes
  11368. + ;;
  11369. + esac
  11370. + ;;
  11371. +
  11372. + beos*)
  11373. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  11374. + allow_undefined_flag=unsupported
  11375. + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  11376. + # support --undefined. This deserves some investigation. FIXME
  11377. + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  11378. + else
  11379. + ld_shlibs=no
  11380. + fi
  11381. + ;;
  11382. +
  11383. + cygwin* | mingw* | pw32* | cegcc*)
  11384. + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
  11385. + # as there is no search path for DLLs.
  11386. + hardcode_libdir_flag_spec='-L$libdir'
  11387. + export_dynamic_flag_spec='${wl}--export-all-symbols'
  11388. + allow_undefined_flag=unsupported
  11389. + always_export_symbols=no
  11390. + enable_shared_with_static_runtimes=yes
  11391. + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
  11392. +
  11393. + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  11394. + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  11395. + # If the export-symbols file already is a .def file (1st line
  11396. + # is EXPORTS), use it as is; otherwise, prepend...
  11397. + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  11398. + cp $export_symbols $output_objdir/$soname.def;
  11399. + else
  11400. + echo EXPORTS > $output_objdir/$soname.def;
  11401. + cat $export_symbols >> $output_objdir/$soname.def;
  11402. + fi~
  11403. + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  11404. + else
  11405. + ld_shlibs=no
  11406. + fi
  11407. + ;;
  11408. +
  11409. + haiku*)
  11410. + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  11411. + link_all_deplibs=yes
  11412. + ;;
  11413. +
  11414. + interix[3-9]*)
  11415. + hardcode_direct=no
  11416. + hardcode_shlibpath_var=no
  11417. + hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
  11418. + export_dynamic_flag_spec='${wl}-E'
  11419. + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  11420. + # Instead, shared libraries are loaded at an image base (0x10000000 by
  11421. + # default) and relocated if they conflict, which is a slow very memory
  11422. + # consuming and fragmenting process. To avoid this, we pick a random,
  11423. + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  11424. + # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  11425. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
  11426. + archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
  11427. + ;;
  11428. +
  11429. + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
  11430. + tmp_diet=no
  11431. + if test "$host_os" = linux-dietlibc; then
  11432. + case $cc_basename in
  11433. + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
  11434. + esac
  11435. + fi
  11436. + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
  11437. + && test "$tmp_diet" = no
  11438. + then
  11439. + tmp_addflag=' $pic_flag'
  11440. + tmp_sharedflag='-shared'
  11441. + case $cc_basename,$host_cpu in
  11442. + pgcc*) # Portland Group C compiler
  11443. + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
  11444. + tmp_addflag=' $pic_flag'
  11445. + ;;
  11446. + pgf77* | pgf90* | pgf95* | pgfortran*)
  11447. + # Portland Group f77 and f90 compilers
  11448. + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
  11449. + tmp_addflag=' $pic_flag -Mnomain' ;;
  11450. + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
  11451. + tmp_addflag=' -i_dynamic' ;;
  11452. + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
  11453. + tmp_addflag=' -i_dynamic -nofor_main' ;;
  11454. + ifc* | ifort*) # Intel Fortran compiler
  11455. + tmp_addflag=' -nofor_main' ;;
  11456. + lf95*) # Lahey Fortran 8.1
  11457. + whole_archive_flag_spec=
  11458. + tmp_sharedflag='--shared' ;;
  11459. + xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
  11460. + tmp_sharedflag='-qmkshrobj'
  11461. + tmp_addflag= ;;
  11462. + nvcc*) # Cuda Compiler Driver 2.2
  11463. + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
  11464. + compiler_needs_object=yes
  11465. + ;;
  11466. + esac
  11467. + case `$CC -V 2>&1 | sed 5q` in
  11468. + *Sun\ C*) # Sun C 5.9
  11469. + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
  11470. + compiler_needs_object=yes
  11471. + tmp_sharedflag='-G' ;;
  11472. + *Sun\ F*) # Sun Fortran 8.3
  11473. + tmp_sharedflag='-G' ;;
  11474. + esac
  11475. + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  11476. +
  11477. + if test "x$supports_anon_versioning" = xyes; then
  11478. + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
  11479. + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  11480. + echo "local: *; };" >> $output_objdir/$libname.ver~
  11481. + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  11482. + fi
  11483. +
  11484. + case $cc_basename in
  11485. + xlf* | bgf* | bgxlf* | mpixlf*)
  11486. + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
  11487. + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
  11488. + hardcode_libdir_flag_spec=
  11489. + hardcode_libdir_flag_spec_ld='-rpath $libdir'
  11490. + archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
  11491. + if test "x$supports_anon_versioning" = xyes; then
  11492. + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
  11493. + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  11494. + echo "local: *; };" >> $output_objdir/$libname.ver~
  11495. + $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
  11496. + fi
  11497. + ;;
  11498. + esac
  11499. + else
  11500. + ld_shlibs=no
  11501. + fi
  11502. + ;;
  11503. +
  11504. + netbsd*)
  11505. + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  11506. + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  11507. + wlarc=
  11508. + else
  11509. + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  11510. + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  11511. + fi
  11512. + ;;
  11513. +
  11514. + solaris*)
  11515. + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
  11516. + ld_shlibs=no
  11517. + cat <<_LT_EOF 1>&2
  11518. +
  11519. +*** Warning: The releases 2.8.* of the GNU linker cannot reliably
  11520. +*** create shared libraries on Solaris systems. Therefore, libtool
  11521. +*** is disabling shared libraries support. We urge you to upgrade GNU
  11522. +*** binutils to release 2.9.1 or newer. Another option is to modify
  11523. +*** your PATH or compiler configuration so that the native linker is
  11524. +*** used, and then restart.
  11525. +
  11526. +_LT_EOF
  11527. + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  11528. + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  11529. + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  11530. + else
  11531. + ld_shlibs=no
  11532. + fi
  11533. + ;;
  11534. +
  11535. + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
  11536. + case `$LD -v 2>&1` in
  11537. + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
  11538. + ld_shlibs=no
  11539. + cat <<_LT_EOF 1>&2
  11540. +
  11541. +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
  11542. +*** reliably create shared libraries on SCO systems. Therefore, libtool
  11543. +*** is disabling shared libraries support. We urge you to upgrade GNU
  11544. +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
  11545. +*** your PATH or compiler configuration so that the native linker is
  11546. +*** used, and then restart.
  11547. +
  11548. +_LT_EOF
  11549. + ;;
  11550. + *)
  11551. + # For security reasons, it is highly recommended that you always
  11552. + # use absolute paths for naming shared libraries, and exclude the
  11553. + # DT_RUNPATH tag from executables and libraries. But doing so
  11554. + # requires that you compile everything twice, which is a pain.
  11555. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  11556. + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
  11557. + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  11558. + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  11559. + else
  11560. + ld_shlibs=no
  11561. + fi
  11562. + ;;
  11563. + esac
  11564. + ;;
  11565. +
  11566. + sunos4*)
  11567. + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  11568. + wlarc=
  11569. + hardcode_direct=yes
  11570. + hardcode_shlibpath_var=no
  11571. + ;;
  11572. +
  11573. + *)
  11574. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  11575. + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  11576. + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  11577. + else
  11578. + ld_shlibs=no
  11579. + fi
  11580. + ;;
  11581. + esac
  11582. +
  11583. + if test "$ld_shlibs" = no; then
  11584. + runpath_var=
  11585. + hardcode_libdir_flag_spec=
  11586. + export_dynamic_flag_spec=
  11587. + whole_archive_flag_spec=
  11588. + fi
  11589. + else
  11590. + # PORTME fill in a description of your system's linker (not GNU ld)
  11591. + case $host_os in
  11592. + aix3*)
  11593. + allow_undefined_flag=unsupported
  11594. + always_export_symbols=yes
  11595. + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
  11596. + # Note: this linker hardcodes the directories in LIBPATH if there
  11597. + # are no directories specified by -L.
  11598. + hardcode_minus_L=yes
  11599. + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
  11600. + # Neither direct hardcoding nor static linking is supported with a
  11601. + # broken collect2.
  11602. + hardcode_direct=unsupported
  11603. + fi
  11604. + ;;
  11605. +
  11606. + aix[4-9]*)
  11607. + if test "$host_cpu" = ia64; then
  11608. + # On IA64, the linker does run time linking by default, so we don't
  11609. + # have to do anything special.
  11610. + aix_use_runtimelinking=no
  11611. + exp_sym_flag='-Bexport'
  11612. + no_entry_flag=""
  11613. + else
  11614. + # If we're using GNU nm, then we don't want the "-C" option.
  11615. + # -C means demangle to AIX nm, but means don't demangle with GNU nm
  11616. + # Also, AIX nm treats weak defined symbols like other global
  11617. + # defined symbols, whereas GNU nm marks them as "W".
  11618. + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  11619. + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  11620. + else
  11621. + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  11622. + fi
  11623. + aix_use_runtimelinking=no
  11624. +
  11625. + # Test if we are trying to use run time linking or normal
  11626. + # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  11627. + # need to do runtime linking.
  11628. + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
  11629. + for ld_flag in $LDFLAGS; do
  11630. + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
  11631. + aix_use_runtimelinking=yes
  11632. + break
  11633. + fi
  11634. + done
  11635. + ;;
  11636. + esac
  11637. +
  11638. + exp_sym_flag='-bexport'
  11639. + no_entry_flag='-bnoentry'
  11640. + fi
  11641. +
  11642. + # When large executables or shared objects are built, AIX ld can
  11643. + # have problems creating the table of contents. If linking a library
  11644. + # or program results in "error TOC overflow" add -mminimal-toc to
  11645. + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  11646. + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  11647. +
  11648. + archive_cmds=''
  11649. + hardcode_direct=yes
  11650. + hardcode_direct_absolute=yes
  11651. + hardcode_libdir_separator=':'
  11652. + link_all_deplibs=yes
  11653. + file_list_spec='${wl}-f,'
  11654. +
  11655. + if test "$GCC" = yes; then
  11656. + case $host_os in aix4.[012]|aix4.[012].*)
  11657. + # We only want to do this on AIX 4.2 and lower, the check
  11658. + # below for broken collect2 doesn't work under 4.3+
  11659. + collect2name=`${CC} -print-prog-name=collect2`
  11660. + if test -f "$collect2name" &&
  11661. + strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  11662. + then
  11663. + # We have reworked collect2
  11664. + :
  11665. + else
  11666. + # We have old collect2
  11667. + hardcode_direct=unsupported
  11668. + # It fails to find uninstalled libraries when the uninstalled
  11669. + # path is not listed in the libpath. Setting hardcode_minus_L
  11670. + # to unsupported forces relinking
  11671. + hardcode_minus_L=yes
  11672. + hardcode_libdir_flag_spec='-L$libdir'
  11673. + hardcode_libdir_separator=
  11674. + fi
  11675. + ;;
  11676. + esac
  11677. + shared_flag='-shared'
  11678. + if test "$aix_use_runtimelinking" = yes; then
  11679. + shared_flag="$shared_flag "'${wl}-G'
  11680. + fi
  11681. + else
  11682. + # not using gcc
  11683. + if test "$host_cpu" = ia64; then
  11684. + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  11685. + # chokes on -Wl,-G. The following line is correct:
  11686. + shared_flag='-G'
  11687. + else
  11688. + if test "$aix_use_runtimelinking" = yes; then
  11689. + shared_flag='${wl}-G'
  11690. + else
  11691. + shared_flag='${wl}-bM:SRE'
  11692. + fi
  11693. + fi
  11694. + fi
  11695. +
  11696. + export_dynamic_flag_spec='${wl}-bexpall'
  11697. + # It seems that -bexpall does not export symbols beginning with
  11698. + # underscore (_), so it is better to generate a list of symbols to export.
  11699. + always_export_symbols=yes
  11700. + if test "$aix_use_runtimelinking" = yes; then
  11701. + # Warning - without using the other runtime loading flags (-brtl),
  11702. + # -berok will link without error, but may produce a broken library.
  11703. + allow_undefined_flag='-berok'
  11704. + # Determine the default libpath from the value encoded in an
  11705. + # empty executable.
  11706. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  11707. +/* end confdefs.h. */
  11708. +
  11709. +int
  11710. +main ()
  11711. +{
  11712. +
  11713. + ;
  11714. + return 0;
  11715. +}
  11716. +_ACEOF
  11717. +if ac_fn_c_try_link "$LINENO"; then :
  11718. +
  11719. +lt_aix_libpath_sed='
  11720. + /Import File Strings/,/^$/ {
  11721. + /^0/ {
  11722. + s/^0 *\(.*\)$/\1/
  11723. + p
  11724. + }
  11725. + }'
  11726. +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  11727. +# Check for a 64-bit object if we didn't find anything.
  11728. +if test -z "$aix_libpath"; then
  11729. + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  11730. +fi
  11731. +fi
  11732. +rm -f core conftest.err conftest.$ac_objext \
  11733. + conftest$ac_exeext conftest.$ac_ext
  11734. +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  11735. +
  11736. + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
  11737. + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
  11738. + else
  11739. + if test "$host_cpu" = ia64; then
  11740. + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
  11741. + allow_undefined_flag="-z nodefs"
  11742. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
  11743. + else
  11744. + # Determine the default libpath from the value encoded in an
  11745. + # empty executable.
  11746. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  11747. +/* end confdefs.h. */
  11748. +
  11749. +int
  11750. +main ()
  11751. +{
  11752. +
  11753. + ;
  11754. + return 0;
  11755. +}
  11756. +_ACEOF
  11757. +if ac_fn_c_try_link "$LINENO"; then :
  11758. +
  11759. +lt_aix_libpath_sed='
  11760. + /Import File Strings/,/^$/ {
  11761. + /^0/ {
  11762. + s/^0 *\(.*\)$/\1/
  11763. + p
  11764. + }
  11765. + }'
  11766. +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  11767. +# Check for a 64-bit object if we didn't find anything.
  11768. +if test -z "$aix_libpath"; then
  11769. + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  11770. +fi
  11771. +fi
  11772. +rm -f core conftest.err conftest.$ac_objext \
  11773. + conftest$ac_exeext conftest.$ac_ext
  11774. +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  11775. +
  11776. + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
  11777. + # Warning - without using the other run time loading flags,
  11778. + # -berok will link without error, but may produce a broken library.
  11779. + no_undefined_flag=' ${wl}-bernotok'
  11780. + allow_undefined_flag=' ${wl}-berok'
  11781. + if test "$with_gnu_ld" = yes; then
  11782. + # We only use this code for GNU lds that support --whole-archive.
  11783. + whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  11784. + else
  11785. + # Exported symbols can be pulled into shared objects from archives
  11786. + whole_archive_flag_spec='$convenience'
  11787. + fi
  11788. + archive_cmds_need_lc=yes
  11789. + # This is similar to how AIX traditionally builds its shared libraries.
  11790. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
  11791. + fi
  11792. + fi
  11793. + ;;
  11794. +
  11795. + amigaos*)
  11796. + case $host_cpu in
  11797. + powerpc)
  11798. + # see comment about AmigaOS4 .so support
  11799. + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  11800. + archive_expsym_cmds=''
  11801. + ;;
  11802. + m68k)
  11803. + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
  11804. + hardcode_libdir_flag_spec='-L$libdir'
  11805. + hardcode_minus_L=yes
  11806. + ;;
  11807. + esac
  11808. + ;;
  11809. +
  11810. + bsdi[45]*)
  11811. + export_dynamic_flag_spec=-rdynamic
  11812. + ;;
  11813. +
  11814. + cygwin* | mingw* | pw32* | cegcc*)
  11815. + # When not using gcc, we currently assume that we are using
  11816. + # Microsoft Visual C++.
  11817. + # hardcode_libdir_flag_spec is actually meaningless, as there is
  11818. + # no search path for DLLs.
  11819. + hardcode_libdir_flag_spec=' '
  11820. + allow_undefined_flag=unsupported
  11821. + # Tell ltmain to make .lib files, not .a files.
  11822. + libext=lib
  11823. + # Tell ltmain to make .dll files, not .so files.
  11824. + shrext_cmds=".dll"
  11825. + # FIXME: Setting linknames here is a bad hack.
  11826. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
  11827. + # The linker will automatically build a .lib file if we build a DLL.
  11828. + old_archive_from_new_cmds='true'
  11829. + # FIXME: Should let the user specify the lib program.
  11830. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
  11831. + fix_srcfile_path='`cygpath -w "$srcfile"`'
  11832. + enable_shared_with_static_runtimes=yes
  11833. + ;;
  11834. +
  11835. + darwin* | rhapsody*)
  11836. +
  11837. +
  11838. + archive_cmds_need_lc=no
  11839. + hardcode_direct=no
  11840. + hardcode_automatic=yes
  11841. + hardcode_shlibpath_var=unsupported
  11842. + if test "$lt_cv_ld_force_load" = "yes"; then
  11843. + whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
  11844. + else
  11845. + whole_archive_flag_spec=''
  11846. + fi
  11847. + link_all_deplibs=yes
  11848. + allow_undefined_flag="$_lt_dar_allow_undefined"
  11849. + case $cc_basename in
  11850. + ifort*) _lt_dar_can_shared=yes ;;
  11851. + *) _lt_dar_can_shared=$GCC ;;
  11852. + esac
  11853. + if test "$_lt_dar_can_shared" = "yes"; then
  11854. + output_verbose_link_cmd=func_echo_all
  11855. + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
  11856. + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
  11857. + archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
  11858. + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
  11859. +
  11860. + else
  11861. + ld_shlibs=no
  11862. + fi
  11863. +
  11864. + ;;
  11865. +
  11866. + dgux*)
  11867. + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  11868. + hardcode_libdir_flag_spec='-L$libdir'
  11869. + hardcode_shlibpath_var=no
  11870. + ;;
  11871. +
  11872. + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  11873. + # support. Future versions do this automatically, but an explicit c++rt0.o
  11874. + # does not break anything, and helps significantly (at the cost of a little
  11875. + # extra space).
  11876. + freebsd2.2*)
  11877. + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
  11878. + hardcode_libdir_flag_spec='-R$libdir'
  11879. + hardcode_direct=yes
  11880. + hardcode_shlibpath_var=no
  11881. + ;;
  11882. +
  11883. + # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  11884. + freebsd2.*)
  11885. + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  11886. + hardcode_direct=yes
  11887. + hardcode_minus_L=yes
  11888. + hardcode_shlibpath_var=no
  11889. + ;;
  11890. +
  11891. + # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  11892. + freebsd* | dragonfly*)
  11893. + archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
  11894. + hardcode_libdir_flag_spec='-R$libdir'
  11895. + hardcode_direct=yes
  11896. + hardcode_shlibpath_var=no
  11897. + ;;
  11898. +
  11899. + hpux9*)
  11900. + if test "$GCC" = yes; then
  11901. + archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  11902. + else
  11903. + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  11904. + fi
  11905. + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
  11906. + hardcode_libdir_separator=:
  11907. + hardcode_direct=yes
  11908. +
  11909. + # hardcode_minus_L: Not really in the search PATH,
  11910. + # but as the default location of the library.
  11911. + hardcode_minus_L=yes
  11912. + export_dynamic_flag_spec='${wl}-E'
  11913. + ;;
  11914. +
  11915. + hpux10*)
  11916. + if test "$GCC" = yes && test "$with_gnu_ld" = no; then
  11917. + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  11918. + else
  11919. + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
  11920. + fi
  11921. + if test "$with_gnu_ld" = no; then
  11922. + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
  11923. + hardcode_libdir_flag_spec_ld='+b $libdir'
  11924. + hardcode_libdir_separator=:
  11925. + hardcode_direct=yes
  11926. + hardcode_direct_absolute=yes
  11927. + export_dynamic_flag_spec='${wl}-E'
  11928. + # hardcode_minus_L: Not really in the search PATH,
  11929. + # but as the default location of the library.
  11930. + hardcode_minus_L=yes
  11931. + fi
  11932. + ;;
  11933. +
  11934. + hpux11*)
  11935. + if test "$GCC" = yes && test "$with_gnu_ld" = no; then
  11936. + case $host_cpu in
  11937. + hppa*64*)
  11938. + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  11939. + ;;
  11940. + ia64*)
  11941. + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  11942. + ;;
  11943. + *)
  11944. + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  11945. + ;;
  11946. + esac
  11947. + else
  11948. + case $host_cpu in
  11949. + hppa*64*)
  11950. + archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  11951. + ;;
  11952. + ia64*)
  11953. + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  11954. + ;;
  11955. + *)
  11956. +
  11957. + # Older versions of the 11.00 compiler do not understand -b yet
  11958. + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
  11959. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
  11960. +$as_echo_n "checking if $CC understands -b... " >&6; }
  11961. +if ${lt_cv_prog_compiler__b+:} false; then :
  11962. + $as_echo_n "(cached) " >&6
  11963. +else
  11964. + lt_cv_prog_compiler__b=no
  11965. + save_LDFLAGS="$LDFLAGS"
  11966. + LDFLAGS="$LDFLAGS -b"
  11967. + echo "$lt_simple_link_test_code" > conftest.$ac_ext
  11968. + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
  11969. + # The linker can only warn and ignore the option if not recognized
  11970. + # So say no if there are warnings
  11971. + if test -s conftest.err; then
  11972. + # Append any errors to the config.log.
  11973. + cat conftest.err 1>&5
  11974. + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
  11975. + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  11976. + if diff conftest.exp conftest.er2 >/dev/null; then
  11977. + lt_cv_prog_compiler__b=yes
  11978. + fi
  11979. + else
  11980. + lt_cv_prog_compiler__b=yes
  11981. + fi
  11982. + fi
  11983. + $RM -r conftest*
  11984. + LDFLAGS="$save_LDFLAGS"
  11985. +
  11986. +fi
  11987. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
  11988. +$as_echo "$lt_cv_prog_compiler__b" >&6; }
  11989. +
  11990. +if test x"$lt_cv_prog_compiler__b" = xyes; then
  11991. + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  11992. +else
  11993. + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
  11994. +fi
  11995. +
  11996. + ;;
  11997. + esac
  11998. + fi
  11999. + if test "$with_gnu_ld" = no; then
  12000. + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
  12001. + hardcode_libdir_separator=:
  12002. +
  12003. + case $host_cpu in
  12004. + hppa*64*|ia64*)
  12005. + hardcode_direct=no
  12006. + hardcode_shlibpath_var=no
  12007. + ;;
  12008. + *)
  12009. + hardcode_direct=yes
  12010. + hardcode_direct_absolute=yes
  12011. + export_dynamic_flag_spec='${wl}-E'
  12012. +
  12013. + # hardcode_minus_L: Not really in the search PATH,
  12014. + # but as the default location of the library.
  12015. + hardcode_minus_L=yes
  12016. + ;;
  12017. + esac
  12018. + fi
  12019. + ;;
  12020. +
  12021. + irix5* | irix6* | nonstopux*)
  12022. + if test "$GCC" = yes; then
  12023. + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  12024. + # Try to use the -exported_symbol ld option, if it does not
  12025. + # work, assume that -exports_file does not work either and
  12026. + # implicitly export all symbols.
  12027. + save_LDFLAGS="$LDFLAGS"
  12028. + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
  12029. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12030. +/* end confdefs.h. */
  12031. +int foo(void) {}
  12032. +_ACEOF
  12033. +if ac_fn_c_try_link "$LINENO"; then :
  12034. + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
  12035. +
  12036. +fi
  12037. +rm -f core conftest.err conftest.$ac_objext \
  12038. + conftest$ac_exeext conftest.$ac_ext
  12039. + LDFLAGS="$save_LDFLAGS"
  12040. + else
  12041. + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
  12042. + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
  12043. + fi
  12044. + archive_cmds_need_lc='no'
  12045. + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
  12046. + hardcode_libdir_separator=:
  12047. + inherit_rpath=yes
  12048. + link_all_deplibs=yes
  12049. + ;;
  12050. +
  12051. + netbsd*)
  12052. + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  12053. + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
  12054. + else
  12055. + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
  12056. + fi
  12057. + hardcode_libdir_flag_spec='-R$libdir'
  12058. + hardcode_direct=yes
  12059. + hardcode_shlibpath_var=no
  12060. + ;;
  12061. +
  12062. + newsos6)
  12063. + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  12064. + hardcode_direct=yes
  12065. + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
  12066. + hardcode_libdir_separator=:
  12067. + hardcode_shlibpath_var=no
  12068. + ;;
  12069. +
  12070. + *nto* | *qnx*)
  12071. + ;;
  12072. +
  12073. + openbsd*)
  12074. + if test -f /usr/libexec/ld.so; then
  12075. + hardcode_direct=yes
  12076. + hardcode_shlibpath_var=no
  12077. + hardcode_direct_absolute=yes
  12078. + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  12079. + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  12080. + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
  12081. + hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
  12082. + export_dynamic_flag_spec='${wl}-E'
  12083. + else
  12084. + case $host_os in
  12085. + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
  12086. + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  12087. + hardcode_libdir_flag_spec='-R$libdir'
  12088. + ;;
  12089. + *)
  12090. + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  12091. + hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
  12092. + ;;
  12093. + esac
  12094. + fi
  12095. + else
  12096. + ld_shlibs=no
  12097. + fi
  12098. + ;;
  12099. +
  12100. + os2*)
  12101. + hardcode_libdir_flag_spec='-L$libdir'
  12102. + hardcode_minus_L=yes
  12103. + allow_undefined_flag=unsupported
  12104. + archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
  12105. + old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
  12106. + ;;
  12107. +
  12108. + osf3*)
  12109. + if test "$GCC" = yes; then
  12110. + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
  12111. + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  12112. + else
  12113. + allow_undefined_flag=' -expect_unresolved \*'
  12114. + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
  12115. + fi
  12116. + archive_cmds_need_lc='no'
  12117. + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
  12118. + hardcode_libdir_separator=:
  12119. + ;;
  12120. +
  12121. + osf4* | osf5*) # as osf3* with the addition of -msym flag
  12122. + if test "$GCC" = yes; then
  12123. + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
  12124. + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  12125. + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
  12126. + else
  12127. + allow_undefined_flag=' -expect_unresolved \*'
  12128. + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
  12129. + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
  12130. + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
  12131. +
  12132. + # Both c and cxx compiler support -rpath directly
  12133. + hardcode_libdir_flag_spec='-rpath $libdir'
  12134. + fi
  12135. + archive_cmds_need_lc='no'
  12136. + hardcode_libdir_separator=:
  12137. + ;;
  12138. +
  12139. + solaris*)
  12140. + no_undefined_flag=' -z defs'
  12141. + if test "$GCC" = yes; then
  12142. + wlarc='${wl}'
  12143. + archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  12144. + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  12145. + $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
  12146. + else
  12147. + case `$CC -V 2>&1` in
  12148. + *"Compilers 5.0"*)
  12149. + wlarc=''
  12150. + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
  12151. + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  12152. + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
  12153. + ;;
  12154. + *)
  12155. + wlarc='${wl}'
  12156. + archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
  12157. + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  12158. + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
  12159. + ;;
  12160. + esac
  12161. + fi
  12162. + hardcode_libdir_flag_spec='-R$libdir'
  12163. + hardcode_shlibpath_var=no
  12164. + case $host_os in
  12165. + solaris2.[0-5] | solaris2.[0-5].*) ;;
  12166. + *)
  12167. + # The compiler driver will combine and reorder linker options,
  12168. + # but understands `-z linker_flag'. GCC discards it without `$wl',
  12169. + # but is careful enough not to reorder.
  12170. + # Supported since Solaris 2.6 (maybe 2.5.1?)
  12171. + if test "$GCC" = yes; then
  12172. + whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
  12173. + else
  12174. + whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
  12175. + fi
  12176. + ;;
  12177. + esac
  12178. + link_all_deplibs=yes
  12179. + ;;
  12180. +
  12181. + sunos4*)
  12182. + if test "x$host_vendor" = xsequent; then
  12183. + # Use $CC to link under sequent, because it throws in some extra .o
  12184. + # files that make .init and .fini sections work.
  12185. + archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
  12186. + else
  12187. + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
  12188. + fi
  12189. + hardcode_libdir_flag_spec='-L$libdir'
  12190. + hardcode_direct=yes
  12191. + hardcode_minus_L=yes
  12192. + hardcode_shlibpath_var=no
  12193. + ;;
  12194. +
  12195. + sysv4)
  12196. + case $host_vendor in
  12197. + sni)
  12198. + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  12199. + hardcode_direct=yes # is this really true???
  12200. + ;;
  12201. + siemens)
  12202. + ## LD is ld it makes a PLAMLIB
  12203. + ## CC just makes a GrossModule.
  12204. + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  12205. + reload_cmds='$CC -r -o $output$reload_objs'
  12206. + hardcode_direct=no
  12207. + ;;
  12208. + motorola)
  12209. + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  12210. + hardcode_direct=no #Motorola manual says yes, but my tests say they lie
  12211. + ;;
  12212. + esac
  12213. + runpath_var='LD_RUN_PATH'
  12214. + hardcode_shlibpath_var=no
  12215. + ;;
  12216. +
  12217. + sysv4.3*)
  12218. + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  12219. + hardcode_shlibpath_var=no
  12220. + export_dynamic_flag_spec='-Bexport'
  12221. + ;;
  12222. +
  12223. + sysv4*MP*)
  12224. + if test -d /usr/nec; then
  12225. + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  12226. + hardcode_shlibpath_var=no
  12227. + runpath_var=LD_RUN_PATH
  12228. + hardcode_runpath_var=yes
  12229. + ld_shlibs=yes
  12230. + fi
  12231. + ;;
  12232. +
  12233. + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
  12234. + no_undefined_flag='${wl}-z,text'
  12235. + archive_cmds_need_lc=no
  12236. + hardcode_shlibpath_var=no
  12237. + runpath_var='LD_RUN_PATH'
  12238. +
  12239. + if test "$GCC" = yes; then
  12240. + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  12241. + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  12242. + else
  12243. + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  12244. + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  12245. + fi
  12246. + ;;
  12247. +
  12248. + sysv5* | sco3.2v5* | sco5v6*)
  12249. + # Note: We can NOT use -z defs as we might desire, because we do not
  12250. + # link with -lc, and that would cause any symbols used from libc to
  12251. + # always be unresolved, which means just about no library would
  12252. + # ever link correctly. If we're not using GNU ld we use -z text
  12253. + # though, which does catch some bad symbols but isn't as heavy-handed
  12254. + # as -z defs.
  12255. + no_undefined_flag='${wl}-z,text'
  12256. + allow_undefined_flag='${wl}-z,nodefs'
  12257. + archive_cmds_need_lc=no
  12258. + hardcode_shlibpath_var=no
  12259. + hardcode_libdir_flag_spec='${wl}-R,$libdir'
  12260. + hardcode_libdir_separator=':'
  12261. + link_all_deplibs=yes
  12262. + export_dynamic_flag_spec='${wl}-Bexport'
  12263. + runpath_var='LD_RUN_PATH'
  12264. +
  12265. + if test "$GCC" = yes; then
  12266. + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  12267. + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  12268. + else
  12269. + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  12270. + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  12271. + fi
  12272. + ;;
  12273. +
  12274. + uts4*)
  12275. + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  12276. + hardcode_libdir_flag_spec='-L$libdir'
  12277. + hardcode_shlibpath_var=no
  12278. + ;;
  12279. +
  12280. + *)
  12281. + ld_shlibs=no
  12282. + ;;
  12283. + esac
  12284. +
  12285. + if test x$host_vendor = xsni; then
  12286. + case $host in
  12287. + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  12288. + export_dynamic_flag_spec='${wl}-Blargedynsym'
  12289. + ;;
  12290. + esac
  12291. + fi
  12292. + fi
  12293. +
  12294. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
  12295. +$as_echo "$ld_shlibs" >&6; }
  12296. +test "$ld_shlibs" = no && can_build_shared=no
  12297. +
  12298. +with_gnu_ld=$with_gnu_ld
  12299. +
  12300. +
  12301. +
  12302. +
  12303. +
  12304. +
  12305. +
  12306. +
  12307. +
  12308. +
  12309. +
  12310. +
  12311. +
  12312. +
  12313. +
  12314. +#
  12315. +# Do we need to explicitly link libc?
  12316. +#
  12317. +case "x$archive_cmds_need_lc" in
  12318. +x|xyes)
  12319. + # Assume -lc should be added
  12320. + archive_cmds_need_lc=yes
  12321. +
  12322. + if test "$enable_shared" = yes && test "$GCC" = yes; then
  12323. + case $archive_cmds in
  12324. + *'~'*)
  12325. + # FIXME: we may have to deal with multi-command sequences.
  12326. + ;;
  12327. + '$CC '*)
  12328. + # Test whether the compiler implicitly links with -lc since on some
  12329. + # systems, -lgcc has to come before -lc. If gcc already passes -lc
  12330. + # to ld, don't add -lc before -lgcc.
  12331. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
  12332. +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
  12333. +if ${lt_cv_archive_cmds_need_lc+:} false; then :
  12334. + $as_echo_n "(cached) " >&6
  12335. +else
  12336. + $RM conftest*
  12337. + echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  12338. +
  12339. + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
  12340. + (eval $ac_compile) 2>&5
  12341. + ac_status=$?
  12342. + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  12343. + test $ac_status = 0; } 2>conftest.err; then
  12344. + soname=conftest
  12345. + lib=conftest
  12346. + libobjs=conftest.$ac_objext
  12347. + deplibs=
  12348. + wl=$lt_prog_compiler_wl
  12349. + pic_flag=$lt_prog_compiler_pic
  12350. + compiler_flags=-v
  12351. + linker_flags=-v
  12352. + verstring=
  12353. + output_objdir=.
  12354. + libname=conftest
  12355. + lt_save_allow_undefined_flag=$allow_undefined_flag
  12356. + allow_undefined_flag=
  12357. + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
  12358. + (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
  12359. + ac_status=$?
  12360. + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  12361. + test $ac_status = 0; }
  12362. + then
  12363. + lt_cv_archive_cmds_need_lc=no
  12364. + else
  12365. + lt_cv_archive_cmds_need_lc=yes
  12366. + fi
  12367. + allow_undefined_flag=$lt_save_allow_undefined_flag
  12368. + else
  12369. + cat conftest.err 1>&5
  12370. + fi
  12371. + $RM conftest*
  12372. +
  12373. +fi
  12374. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
  12375. +$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
  12376. + archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
  12377. + ;;
  12378. + esac
  12379. + fi
  12380. + ;;
  12381. +esac
  12382. +
  12383. +
  12384. +
  12385. +
  12386. +
  12387. +
  12388. +
  12389. +
  12390. +
  12391. +
  12392. +
  12393. +
  12394. +
  12395. +
  12396. +
  12397. +
  12398. +
  12399. +
  12400. +
  12401. +
  12402. +
  12403. +
  12404. +
  12405. +
  12406. +
  12407. +
  12408. +
  12409. +
  12410. +
  12411. +
  12412. +
  12413. +
  12414. +
  12415. +
  12416. +
  12417. +
  12418. +
  12419. +
  12420. +
  12421. +
  12422. +
  12423. +
  12424. +
  12425. +
  12426. +
  12427. +
  12428. +
  12429. +
  12430. +
  12431. +
  12432. +
  12433. +
  12434. +
  12435. +
  12436. +
  12437. +
  12438. +
  12439. +
  12440. +
  12441. +
  12442. +
  12443. +
  12444. +
  12445. +
  12446. +
  12447. +
  12448. +
  12449. +
  12450. +
  12451. +
  12452. +
  12453. +
  12454. +
  12455. +
  12456. +
  12457. +
  12458. +
  12459. +
  12460. +
  12461. +
  12462. +
  12463. +
  12464. +
  12465. +
  12466. +
  12467. +
  12468. +
  12469. +
  12470. +
  12471. +
  12472. +
  12473. +
  12474. +
  12475. +
  12476. +
  12477. +
  12478. +
  12479. +
  12480. +
  12481. +
  12482. +
  12483. +
  12484. +
  12485. +
  12486. +
  12487. +
  12488. +
  12489. +
  12490. +
  12491. +
  12492. +
  12493. +
  12494. +
  12495. +
  12496. +
  12497. +
  12498. +
  12499. +
  12500. +
  12501. +
  12502. +
  12503. +
  12504. +
  12505. +
  12506. +
  12507. +
  12508. +
  12509. +
  12510. +
  12511. +
  12512. +
  12513. +
  12514. +
  12515. +
  12516. +
  12517. +
  12518. +
  12519. +
  12520. +
  12521. +
  12522. +
  12523. +
  12524. +
  12525. +
  12526. +
  12527. +
  12528. +
  12529. +
  12530. +
  12531. +
  12532. +
  12533. +
  12534. +
  12535. +
  12536. +
  12537. +
  12538. +
  12539. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
  12540. +$as_echo_n "checking dynamic linker characteristics... " >&6; }
  12541. +
  12542. +if test "$GCC" = yes; then
  12543. + case $host_os in
  12544. + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
  12545. + *) lt_awk_arg="/^libraries:/" ;;
  12546. + esac
  12547. + case $host_os in
  12548. + mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
  12549. + *) lt_sed_strip_eq="s,=/,/,g" ;;
  12550. + esac
  12551. + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
  12552. + case $lt_search_path_spec in
  12553. + *\;*)
  12554. + # if the path contains ";" then we assume it to be the separator
  12555. + # otherwise default to the standard path separator (i.e. ":") - it is
  12556. + # assumed that no part of a normal pathname contains ";" but that should
  12557. + # okay in the real world where ";" in dirpaths is itself problematic.
  12558. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
  12559. + ;;
  12560. + *)
  12561. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
  12562. + ;;
  12563. + esac
  12564. + # Ok, now we have the path, separated by spaces, we can step through it
  12565. + # and add multilib dir if necessary.
  12566. + lt_tmp_lt_search_path_spec=
  12567. + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
  12568. + for lt_sys_path in $lt_search_path_spec; do
  12569. + if test -d "$lt_sys_path/$lt_multi_os_dir"; then
  12570. + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
  12571. + else
  12572. + test -d "$lt_sys_path" && \
  12573. + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
  12574. + fi
  12575. + done
  12576. + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
  12577. +BEGIN {RS=" "; FS="/|\n";} {
  12578. + lt_foo="";
  12579. + lt_count=0;
  12580. + for (lt_i = NF; lt_i > 0; lt_i--) {
  12581. + if ($lt_i != "" && $lt_i != ".") {
  12582. + if ($lt_i == "..") {
  12583. + lt_count++;
  12584. + } else {
  12585. + if (lt_count == 0) {
  12586. + lt_foo="/" $lt_i lt_foo;
  12587. + } else {
  12588. + lt_count--;
  12589. + }
  12590. + }
  12591. + }
  12592. + }
  12593. + if (lt_foo != "") { lt_freq[lt_foo]++; }
  12594. + if (lt_freq[lt_foo] == 1) { print lt_foo; }
  12595. +}'`
  12596. + # AWK program above erroneously prepends '/' to C:/dos/paths
  12597. + # for these hosts.
  12598. + case $host_os in
  12599. + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
  12600. + $SED 's,/\([A-Za-z]:\),\1,g'` ;;
  12601. + esac
  12602. + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
  12603. +else
  12604. + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  12605. +fi
  12606. +library_names_spec=
  12607. +libname_spec='lib$name'
  12608. +soname_spec=
  12609. +shrext_cmds=".so"
  12610. +postinstall_cmds=
  12611. +postuninstall_cmds=
  12612. +finish_cmds=
  12613. +finish_eval=
  12614. +shlibpath_var=
  12615. +shlibpath_overrides_runpath=unknown
  12616. +version_type=none
  12617. +dynamic_linker="$host_os ld.so"
  12618. +sys_lib_dlsearch_path_spec="/lib /usr/lib"
  12619. +need_lib_prefix=unknown
  12620. +hardcode_into_libs=no
  12621. +
  12622. +# when you set need_version to no, make sure it does not cause -set_version
  12623. +# flags to be left without arguments
  12624. +need_version=unknown
  12625. +
  12626. +case $host_os in
  12627. +aix3*)
  12628. + version_type=linux
  12629. + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
  12630. + shlibpath_var=LIBPATH
  12631. +
  12632. + # AIX 3 has no versioning support, so we append a major version to the name.
  12633. + soname_spec='${libname}${release}${shared_ext}$major'
  12634. + ;;
  12635. +
  12636. +aix[4-9]*)
  12637. + version_type=linux
  12638. + need_lib_prefix=no
  12639. + need_version=no
  12640. + hardcode_into_libs=yes
  12641. + if test "$host_cpu" = ia64; then
  12642. + # AIX 5 supports IA64
  12643. + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
  12644. + shlibpath_var=LD_LIBRARY_PATH
  12645. + else
  12646. + # With GCC up to 2.95.x, collect2 would create an import file
  12647. + # for dependence libraries. The import file would start with
  12648. + # the line `#! .'. This would cause the generated library to
  12649. + # depend on `.', always an invalid library. This was fixed in
  12650. + # development snapshots of GCC prior to 3.0.
  12651. + case $host_os in
  12652. + aix4 | aix4.[01] | aix4.[01].*)
  12653. + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
  12654. + echo ' yes '
  12655. + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
  12656. + :
  12657. + else
  12658. + can_build_shared=no
  12659. + fi
  12660. + ;;
  12661. + esac
  12662. + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
  12663. + # soname into executable. Probably we can add versioning support to
  12664. + # collect2, so additional links can be useful in future.
  12665. + if test "$aix_use_runtimelinking" = yes; then
  12666. + # If using run time linking (on AIX 4.2 or later) use lib<name>.so
  12667. + # instead of lib<name>.a to let people know that these are not
  12668. + # typical AIX shared libraries.
  12669. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  12670. + else
  12671. + # We preserve .a as extension for shared libraries through AIX4.2
  12672. + # and later when we are not doing run time linking.
  12673. + library_names_spec='${libname}${release}.a $libname.a'
  12674. + soname_spec='${libname}${release}${shared_ext}$major'
  12675. + fi
  12676. + shlibpath_var=LIBPATH
  12677. + fi
  12678. + ;;
  12679. +
  12680. +amigaos*)
  12681. + case $host_cpu in
  12682. + powerpc)
  12683. + # Since July 2007 AmigaOS4 officially supports .so libraries.
  12684. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
  12685. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  12686. + ;;
  12687. + m68k)
  12688. + library_names_spec='$libname.ixlibrary $libname.a'
  12689. + # Create ${libname}_ixlibrary.a entries in /sys/libs.
  12690. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
  12691. + ;;
  12692. + esac
  12693. + ;;
  12694. +
  12695. +beos*)
  12696. + library_names_spec='${libname}${shared_ext}'
  12697. + dynamic_linker="$host_os ld.so"
  12698. + shlibpath_var=LIBRARY_PATH
  12699. + ;;
  12700. +
  12701. +bsdi[45]*)
  12702. + version_type=linux
  12703. + need_version=no
  12704. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  12705. + soname_spec='${libname}${release}${shared_ext}$major'
  12706. + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  12707. + shlibpath_var=LD_LIBRARY_PATH
  12708. + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  12709. + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  12710. + # the default ld.so.conf also contains /usr/contrib/lib and
  12711. + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  12712. + # libtool to hard-code these into programs
  12713. + ;;
  12714. +
  12715. +cygwin* | mingw* | pw32* | cegcc*)
  12716. + version_type=windows
  12717. + shrext_cmds=".dll"
  12718. + need_version=no
  12719. + need_lib_prefix=no
  12720. +
  12721. + case $GCC,$host_os in
  12722. + yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
  12723. + library_names_spec='$libname.dll.a'
  12724. + # DLL is installed to $(libdir)/../bin by postinstall_cmds
  12725. + postinstall_cmds='base_file=`basename \${file}`~
  12726. + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
  12727. + dldir=$destdir/`dirname \$dlpath`~
  12728. + test -d \$dldir || mkdir -p \$dldir~
  12729. + $install_prog $dir/$dlname \$dldir/$dlname~
  12730. + chmod a+x \$dldir/$dlname~
  12731. + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
  12732. + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
  12733. + fi'
  12734. + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  12735. + dlpath=$dir/\$dldll~
  12736. + $RM \$dlpath'
  12737. + shlibpath_overrides_runpath=yes
  12738. +
  12739. + case $host_os in
  12740. + cygwin*)
  12741. + # Cygwin DLLs use 'cyg' prefix rather than 'lib'
  12742. + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
  12743. +
  12744. + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
  12745. + ;;
  12746. + mingw* | cegcc*)
  12747. + # MinGW DLLs use traditional 'lib' prefix
  12748. + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
  12749. + ;;
  12750. + pw32*)
  12751. + # pw32 DLLs use 'pw' prefix rather than 'lib'
  12752. + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
  12753. + ;;
  12754. + esac
  12755. + ;;
  12756. +
  12757. + *)
  12758. + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
  12759. + ;;
  12760. + esac
  12761. + dynamic_linker='Win32 ld.exe'
  12762. + # FIXME: first we should search . and the directory the executable is in
  12763. + shlibpath_var=PATH
  12764. + ;;
  12765. +
  12766. +darwin* | rhapsody*)
  12767. + dynamic_linker="$host_os dyld"
  12768. + version_type=darwin
  12769. + need_lib_prefix=no
  12770. + need_version=no
  12771. + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
  12772. + soname_spec='${libname}${release}${major}$shared_ext'
  12773. + shlibpath_overrides_runpath=yes
  12774. + shlibpath_var=DYLD_LIBRARY_PATH
  12775. + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
  12776. +
  12777. + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
  12778. + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
  12779. + ;;
  12780. +
  12781. +dgux*)
  12782. + version_type=linux
  12783. + need_lib_prefix=no
  12784. + need_version=no
  12785. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
  12786. + soname_spec='${libname}${release}${shared_ext}$major'
  12787. + shlibpath_var=LD_LIBRARY_PATH
  12788. + ;;
  12789. +
  12790. +freebsd* | dragonfly*)
  12791. + # DragonFly does not have aout. When/if they implement a new
  12792. + # versioning mechanism, adjust this.
  12793. + if test -x /usr/bin/objformat; then
  12794. + objformat=`/usr/bin/objformat`
  12795. + else
  12796. + case $host_os in
  12797. + freebsd[23].*) objformat=aout ;;
  12798. + *) objformat=elf ;;
  12799. + esac
  12800. + fi
  12801. + version_type=freebsd-$objformat
  12802. + case $version_type in
  12803. + freebsd-elf*)
  12804. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  12805. + need_version=no
  12806. + need_lib_prefix=no
  12807. + ;;
  12808. + freebsd-*)
  12809. + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
  12810. + need_version=yes
  12811. + ;;
  12812. + esac
  12813. + shlibpath_var=LD_LIBRARY_PATH
  12814. + case $host_os in
  12815. + freebsd2.*)
  12816. + shlibpath_overrides_runpath=yes
  12817. + ;;
  12818. + freebsd3.[01]* | freebsdelf3.[01]*)
  12819. + shlibpath_overrides_runpath=yes
  12820. + hardcode_into_libs=yes
  12821. + ;;
  12822. + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
  12823. + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
  12824. + shlibpath_overrides_runpath=no
  12825. + hardcode_into_libs=yes
  12826. + ;;
  12827. + *) # from 4.6 on, and DragonFly
  12828. + shlibpath_overrides_runpath=yes
  12829. + hardcode_into_libs=yes
  12830. + ;;
  12831. + esac
  12832. + ;;
  12833. +
  12834. +gnu*)
  12835. + version_type=linux
  12836. + need_lib_prefix=no
  12837. + need_version=no
  12838. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  12839. + soname_spec='${libname}${release}${shared_ext}$major'
  12840. + shlibpath_var=LD_LIBRARY_PATH
  12841. + hardcode_into_libs=yes
  12842. + ;;
  12843. +
  12844. +haiku*)
  12845. + version_type=linux
  12846. + need_lib_prefix=no
  12847. + need_version=no
  12848. + dynamic_linker="$host_os runtime_loader"
  12849. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  12850. + soname_spec='${libname}${release}${shared_ext}$major'
  12851. + shlibpath_var=LIBRARY_PATH
  12852. + shlibpath_overrides_runpath=yes
  12853. + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib'
  12854. + hardcode_into_libs=yes
  12855. + ;;
  12856. +
  12857. +hpux9* | hpux10* | hpux11*)
  12858. + # Give a soname corresponding to the major version so that dld.sl refuses to
  12859. + # link against other versions.
  12860. + version_type=sunos
  12861. + need_lib_prefix=no
  12862. + need_version=no
  12863. + case $host_cpu in
  12864. + ia64*)
  12865. + shrext_cmds='.so'
  12866. + hardcode_into_libs=yes
  12867. + dynamic_linker="$host_os dld.so"
  12868. + shlibpath_var=LD_LIBRARY_PATH
  12869. + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  12870. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  12871. + soname_spec='${libname}${release}${shared_ext}$major'
  12872. + if test "X$HPUX_IA64_MODE" = X32; then
  12873. + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
  12874. + else
  12875. + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
  12876. + fi
  12877. + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  12878. + ;;
  12879. + hppa*64*)
  12880. + shrext_cmds='.sl'
  12881. + hardcode_into_libs=yes
  12882. + dynamic_linker="$host_os dld.sl"
  12883. + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
  12884. + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  12885. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  12886. + soname_spec='${libname}${release}${shared_ext}$major'
  12887. + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
  12888. + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  12889. + ;;
  12890. + *)
  12891. + shrext_cmds='.sl'
  12892. + dynamic_linker="$host_os dld.sl"
  12893. + shlibpath_var=SHLIB_PATH
  12894. + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  12895. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  12896. + soname_spec='${libname}${release}${shared_ext}$major'
  12897. + ;;
  12898. + esac
  12899. + # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
  12900. + postinstall_cmds='chmod 555 $lib'
  12901. + # or fails outright, so override atomically:
  12902. + install_override_mode=555
  12903. + ;;
  12904. +
  12905. +interix[3-9]*)
  12906. + version_type=linux
  12907. + need_lib_prefix=no
  12908. + need_version=no
  12909. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  12910. + soname_spec='${libname}${release}${shared_ext}$major'
  12911. + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
  12912. + shlibpath_var=LD_LIBRARY_PATH
  12913. + shlibpath_overrides_runpath=no
  12914. + hardcode_into_libs=yes
  12915. + ;;
  12916. +
  12917. +irix5* | irix6* | nonstopux*)
  12918. + case $host_os in
  12919. + nonstopux*) version_type=nonstopux ;;
  12920. + *)
  12921. + if test "$lt_cv_prog_gnu_ld" = yes; then
  12922. + version_type=linux
  12923. + else
  12924. + version_type=irix
  12925. + fi ;;
  12926. + esac
  12927. + need_lib_prefix=no
  12928. + need_version=no
  12929. + soname_spec='${libname}${release}${shared_ext}$major'
  12930. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
  12931. + case $host_os in
  12932. + irix5* | nonstopux*)
  12933. + libsuff= shlibsuff=
  12934. + ;;
  12935. + *)
  12936. + case $LD in # libtool.m4 will add one of these switches to LD
  12937. + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
  12938. + libsuff= shlibsuff= libmagic=32-bit;;
  12939. + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
  12940. + libsuff=32 shlibsuff=N32 libmagic=N32;;
  12941. + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
  12942. + libsuff=64 shlibsuff=64 libmagic=64-bit;;
  12943. + *) libsuff= shlibsuff= libmagic=never-match;;
  12944. + esac
  12945. + ;;
  12946. + esac
  12947. + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  12948. + shlibpath_overrides_runpath=no
  12949. + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
  12950. + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
  12951. + hardcode_into_libs=yes
  12952. + ;;
  12953. +
  12954. +# No shared lib support for Linux oldld, aout, or coff.
  12955. +linux*oldld* | linux*aout* | linux*coff*)
  12956. + dynamic_linker=no
  12957. + ;;
  12958. +
  12959. +# This must be Linux ELF.
  12960. +linux* | k*bsd*-gnu | kopensolaris*-gnu)
  12961. + version_type=linux
  12962. + need_lib_prefix=no
  12963. + need_version=no
  12964. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  12965. + soname_spec='${libname}${release}${shared_ext}$major'
  12966. + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  12967. + shlibpath_var=LD_LIBRARY_PATH
  12968. + shlibpath_overrides_runpath=no
  12969. +
  12970. + # Some binutils ld are patched to set DT_RUNPATH
  12971. + if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
  12972. + $as_echo_n "(cached) " >&6
  12973. +else
  12974. + lt_cv_shlibpath_overrides_runpath=no
  12975. + save_LDFLAGS=$LDFLAGS
  12976. + save_libdir=$libdir
  12977. + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
  12978. + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
  12979. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12980. +/* end confdefs.h. */
  12981. +
  12982. +int
  12983. +main ()
  12984. +{
  12985. +
  12986. + ;
  12987. + return 0;
  12988. +}
  12989. +_ACEOF
  12990. +if ac_fn_c_try_link "$LINENO"; then :
  12991. + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
  12992. + lt_cv_shlibpath_overrides_runpath=yes
  12993. +fi
  12994. +fi
  12995. +rm -f core conftest.err conftest.$ac_objext \
  12996. + conftest$ac_exeext conftest.$ac_ext
  12997. + LDFLAGS=$save_LDFLAGS
  12998. + libdir=$save_libdir
  12999. +
  13000. +fi
  13001. +
  13002. + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
  13003. +
  13004. + # This implies no fast_install, which is unacceptable.
  13005. + # Some rework will be needed to allow for fast_install
  13006. + # before this can be enabled.
  13007. + hardcode_into_libs=yes
  13008. +
  13009. + # Append ld.so.conf contents to the search path
  13010. + if test -f /etc/ld.so.conf; then
  13011. + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
  13012. + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
  13013. + fi
  13014. +
  13015. + # We used to test for /lib/ld.so.1 and disable shared libraries on
  13016. + # powerpc, because MkLinux only supported shared libraries with the
  13017. + # GNU dynamic linker. Since this was broken with cross compilers,
  13018. + # most powerpc-linux boxes support dynamic linking these days and
  13019. + # people can always --disable-shared, the test was removed, and we
  13020. + # assume the GNU/Linux dynamic linker is in use.
  13021. + dynamic_linker='GNU/Linux ld.so'
  13022. + ;;
  13023. +
  13024. +netbsd*)
  13025. + version_type=sunos
  13026. + need_lib_prefix=no
  13027. + need_version=no
  13028. + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  13029. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  13030. + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  13031. + dynamic_linker='NetBSD (a.out) ld.so'
  13032. + else
  13033. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  13034. + soname_spec='${libname}${release}${shared_ext}$major'
  13035. + dynamic_linker='NetBSD ld.elf_so'
  13036. + fi
  13037. + shlibpath_var=LD_LIBRARY_PATH
  13038. + shlibpath_overrides_runpath=yes
  13039. + hardcode_into_libs=yes
  13040. + ;;
  13041. +
  13042. +newsos6)
  13043. + version_type=linux
  13044. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  13045. + shlibpath_var=LD_LIBRARY_PATH
  13046. + shlibpath_overrides_runpath=yes
  13047. + ;;
  13048. +
  13049. +*nto* | *qnx*)
  13050. + version_type=qnx
  13051. + need_lib_prefix=no
  13052. + need_version=no
  13053. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  13054. + soname_spec='${libname}${release}${shared_ext}$major'
  13055. + shlibpath_var=LD_LIBRARY_PATH
  13056. + shlibpath_overrides_runpath=no
  13057. + hardcode_into_libs=yes
  13058. + dynamic_linker='ldqnx.so'
  13059. + ;;
  13060. +
  13061. +openbsd*)
  13062. + version_type=sunos
  13063. + sys_lib_dlsearch_path_spec="/usr/lib"
  13064. + need_lib_prefix=no
  13065. + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
  13066. + case $host_os in
  13067. + openbsd3.3 | openbsd3.3.*) need_version=yes ;;
  13068. + *) need_version=no ;;
  13069. + esac
  13070. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  13071. + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  13072. + shlibpath_var=LD_LIBRARY_PATH
  13073. + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  13074. + case $host_os in
  13075. + openbsd2.[89] | openbsd2.[89].*)
  13076. + shlibpath_overrides_runpath=no
  13077. + ;;
  13078. + *)
  13079. + shlibpath_overrides_runpath=yes
  13080. + ;;
  13081. + esac
  13082. + else
  13083. + shlibpath_overrides_runpath=yes
  13084. + fi
  13085. + ;;
  13086. +
  13087. +os2*)
  13088. + libname_spec='$name'
  13089. + shrext_cmds=".dll"
  13090. + need_lib_prefix=no
  13091. + library_names_spec='$libname${shared_ext} $libname.a'
  13092. + dynamic_linker='OS/2 ld.exe'
  13093. + shlibpath_var=LIBPATH
  13094. + ;;
  13095. +
  13096. +osf3* | osf4* | osf5*)
  13097. + version_type=osf
  13098. + need_lib_prefix=no
  13099. + need_version=no
  13100. + soname_spec='${libname}${release}${shared_ext}$major'
  13101. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  13102. + shlibpath_var=LD_LIBRARY_PATH
  13103. + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  13104. + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  13105. + ;;
  13106. +
  13107. +rdos*)
  13108. + dynamic_linker=no
  13109. + ;;
  13110. +
  13111. +solaris*)
  13112. + version_type=linux
  13113. + need_lib_prefix=no
  13114. + need_version=no
  13115. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  13116. + soname_spec='${libname}${release}${shared_ext}$major'
  13117. + shlibpath_var=LD_LIBRARY_PATH
  13118. + shlibpath_overrides_runpath=yes
  13119. + hardcode_into_libs=yes
  13120. + # ldd complains unless libraries are executable
  13121. + postinstall_cmds='chmod +x $lib'
  13122. + ;;
  13123. +
  13124. +sunos4*)
  13125. + version_type=sunos
  13126. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  13127. + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  13128. + shlibpath_var=LD_LIBRARY_PATH
  13129. + shlibpath_overrides_runpath=yes
  13130. + if test "$with_gnu_ld" = yes; then
  13131. + need_lib_prefix=no
  13132. + fi
  13133. + need_version=yes
  13134. + ;;
  13135. +
  13136. +sysv4 | sysv4.3*)
  13137. + version_type=linux
  13138. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  13139. + soname_spec='${libname}${release}${shared_ext}$major'
  13140. + shlibpath_var=LD_LIBRARY_PATH
  13141. + case $host_vendor in
  13142. + sni)
  13143. + shlibpath_overrides_runpath=no
  13144. + need_lib_prefix=no
  13145. + runpath_var=LD_RUN_PATH
  13146. + ;;
  13147. + siemens)
  13148. + need_lib_prefix=no
  13149. + ;;
  13150. + motorola)
  13151. + need_lib_prefix=no
  13152. + need_version=no
  13153. + shlibpath_overrides_runpath=no
  13154. + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  13155. + ;;
  13156. + esac
  13157. + ;;
  13158. +
  13159. +sysv4*MP*)
  13160. + if test -d /usr/nec ;then
  13161. + version_type=linux
  13162. + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
  13163. + soname_spec='$libname${shared_ext}.$major'
  13164. + shlibpath_var=LD_LIBRARY_PATH
  13165. + fi
  13166. + ;;
  13167. +
  13168. +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  13169. + version_type=freebsd-elf
  13170. + need_lib_prefix=no
  13171. + need_version=no
  13172. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  13173. + soname_spec='${libname}${release}${shared_ext}$major'
  13174. + shlibpath_var=LD_LIBRARY_PATH
  13175. + shlibpath_overrides_runpath=yes
  13176. + hardcode_into_libs=yes
  13177. + if test "$with_gnu_ld" = yes; then
  13178. + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
  13179. + else
  13180. + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
  13181. + case $host_os in
  13182. + sco3.2v5*)
  13183. + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
  13184. + ;;
  13185. + esac
  13186. + fi
  13187. + sys_lib_dlsearch_path_spec='/usr/lib'
  13188. + ;;
  13189. +
  13190. +tpf*)
  13191. + # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
  13192. + version_type=linux
  13193. + need_lib_prefix=no
  13194. + need_version=no
  13195. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  13196. + shlibpath_var=LD_LIBRARY_PATH
  13197. + shlibpath_overrides_runpath=no
  13198. + hardcode_into_libs=yes
  13199. + ;;
  13200. +
  13201. +uts4*)
  13202. + version_type=linux
  13203. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  13204. + soname_spec='${libname}${release}${shared_ext}$major'
  13205. + shlibpath_var=LD_LIBRARY_PATH
  13206. + ;;
  13207. +
  13208. +*)
  13209. + dynamic_linker=no
  13210. + ;;
  13211. +esac
  13212. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
  13213. +$as_echo "$dynamic_linker" >&6; }
  13214. +test "$dynamic_linker" = no && can_build_shared=no
  13215. +
  13216. +variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  13217. +if test "$GCC" = yes; then
  13218. + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  13219. +fi
  13220. +
  13221. +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
  13222. + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
  13223. +fi
  13224. +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
  13225. + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
  13226. +fi
  13227. +
  13228. +
  13229. +
  13230. +
  13231. +
  13232. +
  13233. +
  13234. +
  13235. +
  13236. +
  13237. +
  13238. +
  13239. +
  13240. +
  13241. +
  13242. +
  13243. +
  13244. +
  13245. +
  13246. +
  13247. +
  13248. +
  13249. +
  13250. +
  13251. +
  13252. +
  13253. +
  13254. +
  13255. +
  13256. +
  13257. +
  13258. +
  13259. +
  13260. +
  13261. +
  13262. +
  13263. +
  13264. +
  13265. +
  13266. +
  13267. +
  13268. +
  13269. +
  13270. +
  13271. +
  13272. +
  13273. +
  13274. +
  13275. +
  13276. +
  13277. +
  13278. +
  13279. +
  13280. +
  13281. +
  13282. +
  13283. +
  13284. +
  13285. +
  13286. +
  13287. +
  13288. +
  13289. +
  13290. +
  13291. +
  13292. +
  13293. +
  13294. +
  13295. +
  13296. +
  13297. +
  13298. +
  13299. +
  13300. +
  13301. +
  13302. +
  13303. +
  13304. +
  13305. +
  13306. +
  13307. +
  13308. +
  13309. +
  13310. +
  13311. +
  13312. +
  13313. +
  13314. +
  13315. +
  13316. +
  13317. +
  13318. +
  13319. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
  13320. +$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
  13321. +hardcode_action=
  13322. +if test -n "$hardcode_libdir_flag_spec" ||
  13323. + test -n "$runpath_var" ||
  13324. + test "X$hardcode_automatic" = "Xyes" ; then
  13325. +
  13326. + # We can hardcode non-existent directories.
  13327. + if test "$hardcode_direct" != no &&
  13328. + # If the only mechanism to avoid hardcoding is shlibpath_var, we
  13329. + # have to relink, otherwise we might link with an installed library
  13330. + # when we should be linking with a yet-to-be-installed one
  13331. + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
  13332. + test "$hardcode_minus_L" != no; then
  13333. + # Linking always hardcodes the temporary library directory.
  13334. + hardcode_action=relink
  13335. + else
  13336. + # We can link without hardcoding, and we can hardcode nonexisting dirs.
  13337. + hardcode_action=immediate
  13338. + fi
  13339. +else
  13340. + # We cannot hardcode anything, or else we can only hardcode existing
  13341. + # directories.
  13342. + hardcode_action=unsupported
  13343. +fi
  13344. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
  13345. +$as_echo "$hardcode_action" >&6; }
  13346. +
  13347. +if test "$hardcode_action" = relink ||
  13348. + test "$inherit_rpath" = yes; then
  13349. + # Fast installation is not supported
  13350. + enable_fast_install=no
  13351. +elif test "$shlibpath_overrides_runpath" = yes ||
  13352. + test "$enable_shared" = no; then
  13353. + # Fast installation is not necessary
  13354. + enable_fast_install=needless
  13355. +fi
  13356. +
  13357. +
  13358. +
  13359. +
  13360. +
  13361. +
  13362. + if test "x$enable_dlopen" != xyes; then
  13363. + enable_dlopen=unknown
  13364. + enable_dlopen_self=unknown
  13365. + enable_dlopen_self_static=unknown
  13366. +else
  13367. + lt_cv_dlopen=no
  13368. + lt_cv_dlopen_libs=
  13369. +
  13370. + case $host_os in
  13371. + beos*)
  13372. + lt_cv_dlopen="load_add_on"
  13373. + lt_cv_dlopen_libs=
  13374. + lt_cv_dlopen_self=yes
  13375. + ;;
  13376. +
  13377. + mingw* | pw32* | cegcc*)
  13378. + lt_cv_dlopen="LoadLibrary"
  13379. + lt_cv_dlopen_libs=
  13380. + ;;
  13381. +
  13382. + cygwin*)
  13383. + lt_cv_dlopen="dlopen"
  13384. + lt_cv_dlopen_libs=
  13385. + ;;
  13386. +
  13387. + darwin*)
  13388. + # if libdl is installed we need to link against it
  13389. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
  13390. +$as_echo_n "checking for dlopen in -ldl... " >&6; }
  13391. +if ${ac_cv_lib_dl_dlopen+:} false; then :
  13392. + $as_echo_n "(cached) " >&6
  13393. +else
  13394. + ac_check_lib_save_LIBS=$LIBS
  13395. +LIBS="-ldl $LIBS"
  13396. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13397. +/* end confdefs.h. */
  13398. +
  13399. +/* Override any GCC internal prototype to avoid an error.
  13400. + Use char because int might match the return type of a GCC
  13401. + builtin and then its argument prototype would still apply. */
  13402. +#ifdef __cplusplus
  13403. +extern "C"
  13404. +#endif
  13405. +char dlopen ();
  13406. +int
  13407. +main ()
  13408. +{
  13409. +return dlopen ();
  13410. + ;
  13411. + return 0;
  13412. +}
  13413. +_ACEOF
  13414. +if ac_fn_c_try_link "$LINENO"; then :
  13415. + ac_cv_lib_dl_dlopen=yes
  13416. +else
  13417. + ac_cv_lib_dl_dlopen=no
  13418. +fi
  13419. +rm -f core conftest.err conftest.$ac_objext \
  13420. + conftest$ac_exeext conftest.$ac_ext
  13421. +LIBS=$ac_check_lib_save_LIBS
  13422. +fi
  13423. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
  13424. +$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
  13425. +if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
  13426. + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
  13427. +else
  13428. +
  13429. + lt_cv_dlopen="dyld"
  13430. + lt_cv_dlopen_libs=
  13431. + lt_cv_dlopen_self=yes
  13432. +
  13433. +fi
  13434. +
  13435. + ;;
  13436. +
  13437. + *)
  13438. + ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
  13439. +if test "x$ac_cv_func_shl_load" = xyes; then :
  13440. + lt_cv_dlopen="shl_load"
  13441. +else
  13442. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
  13443. +$as_echo_n "checking for shl_load in -ldld... " >&6; }
  13444. +if ${ac_cv_lib_dld_shl_load+:} false; then :
  13445. + $as_echo_n "(cached) " >&6
  13446. +else
  13447. + ac_check_lib_save_LIBS=$LIBS
  13448. +LIBS="-ldld $LIBS"
  13449. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13450. +/* end confdefs.h. */
  13451. +
  13452. +/* Override any GCC internal prototype to avoid an error.
  13453. + Use char because int might match the return type of a GCC
  13454. + builtin and then its argument prototype would still apply. */
  13455. +#ifdef __cplusplus
  13456. +extern "C"
  13457. +#endif
  13458. +char shl_load ();
  13459. +int
  13460. +main ()
  13461. +{
  13462. +return shl_load ();
  13463. + ;
  13464. + return 0;
  13465. +}
  13466. +_ACEOF
  13467. +if ac_fn_c_try_link "$LINENO"; then :
  13468. + ac_cv_lib_dld_shl_load=yes
  13469. +else
  13470. + ac_cv_lib_dld_shl_load=no
  13471. +fi
  13472. +rm -f core conftest.err conftest.$ac_objext \
  13473. + conftest$ac_exeext conftest.$ac_ext
  13474. +LIBS=$ac_check_lib_save_LIBS
  13475. +fi
  13476. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
  13477. +$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
  13478. +if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
  13479. + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
  13480. +else
  13481. + ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
  13482. +if test "x$ac_cv_func_dlopen" = xyes; then :
  13483. + lt_cv_dlopen="dlopen"
  13484. +else
  13485. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
  13486. +$as_echo_n "checking for dlopen in -ldl... " >&6; }
  13487. +if ${ac_cv_lib_dl_dlopen+:} false; then :
  13488. + $as_echo_n "(cached) " >&6
  13489. +else
  13490. + ac_check_lib_save_LIBS=$LIBS
  13491. +LIBS="-ldl $LIBS"
  13492. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13493. +/* end confdefs.h. */
  13494. +
  13495. +/* Override any GCC internal prototype to avoid an error.
  13496. + Use char because int might match the return type of a GCC
  13497. + builtin and then its argument prototype would still apply. */
  13498. +#ifdef __cplusplus
  13499. +extern "C"
  13500. +#endif
  13501. +char dlopen ();
  13502. +int
  13503. +main ()
  13504. +{
  13505. +return dlopen ();
  13506. + ;
  13507. + return 0;
  13508. +}
  13509. +_ACEOF
  13510. +if ac_fn_c_try_link "$LINENO"; then :
  13511. + ac_cv_lib_dl_dlopen=yes
  13512. +else
  13513. + ac_cv_lib_dl_dlopen=no
  13514. +fi
  13515. +rm -f core conftest.err conftest.$ac_objext \
  13516. + conftest$ac_exeext conftest.$ac_ext
  13517. +LIBS=$ac_check_lib_save_LIBS
  13518. +fi
  13519. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
  13520. +$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
  13521. +if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
  13522. + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
  13523. +else
  13524. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
  13525. +$as_echo_n "checking for dlopen in -lsvld... " >&6; }
  13526. +if ${ac_cv_lib_svld_dlopen+:} false; then :
  13527. + $as_echo_n "(cached) " >&6
  13528. +else
  13529. + ac_check_lib_save_LIBS=$LIBS
  13530. +LIBS="-lsvld $LIBS"
  13531. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13532. +/* end confdefs.h. */
  13533. +
  13534. +/* Override any GCC internal prototype to avoid an error.
  13535. + Use char because int might match the return type of a GCC
  13536. + builtin and then its argument prototype would still apply. */
  13537. +#ifdef __cplusplus
  13538. +extern "C"
  13539. +#endif
  13540. +char dlopen ();
  13541. +int
  13542. +main ()
  13543. +{
  13544. +return dlopen ();
  13545. + ;
  13546. + return 0;
  13547. +}
  13548. +_ACEOF
  13549. +if ac_fn_c_try_link "$LINENO"; then :
  13550. + ac_cv_lib_svld_dlopen=yes
  13551. +else
  13552. + ac_cv_lib_svld_dlopen=no
  13553. +fi
  13554. +rm -f core conftest.err conftest.$ac_objext \
  13555. + conftest$ac_exeext conftest.$ac_ext
  13556. +LIBS=$ac_check_lib_save_LIBS
  13557. +fi
  13558. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
  13559. +$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
  13560. +if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
  13561. + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
  13562. +else
  13563. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
  13564. +$as_echo_n "checking for dld_link in -ldld... " >&6; }
  13565. +if ${ac_cv_lib_dld_dld_link+:} false; then :
  13566. + $as_echo_n "(cached) " >&6
  13567. +else
  13568. + ac_check_lib_save_LIBS=$LIBS
  13569. +LIBS="-ldld $LIBS"
  13570. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13571. +/* end confdefs.h. */
  13572. +
  13573. +/* Override any GCC internal prototype to avoid an error.
  13574. + Use char because int might match the return type of a GCC
  13575. + builtin and then its argument prototype would still apply. */
  13576. +#ifdef __cplusplus
  13577. +extern "C"
  13578. +#endif
  13579. +char dld_link ();
  13580. +int
  13581. +main ()
  13582. +{
  13583. +return dld_link ();
  13584. + ;
  13585. + return 0;
  13586. +}
  13587. +_ACEOF
  13588. +if ac_fn_c_try_link "$LINENO"; then :
  13589. + ac_cv_lib_dld_dld_link=yes
  13590. +else
  13591. + ac_cv_lib_dld_dld_link=no
  13592. +fi
  13593. +rm -f core conftest.err conftest.$ac_objext \
  13594. + conftest$ac_exeext conftest.$ac_ext
  13595. +LIBS=$ac_check_lib_save_LIBS
  13596. +fi
  13597. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
  13598. +$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
  13599. +if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
  13600. + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
  13601. +fi
  13602. +
  13603. +
  13604. +fi
  13605. +
  13606. +
  13607. +fi
  13608. +
  13609. +
  13610. +fi
  13611. +
  13612. +
  13613. +fi
  13614. +
  13615. +
  13616. +fi
  13617. +
  13618. + ;;
  13619. + esac
  13620. +
  13621. + if test "x$lt_cv_dlopen" != xno; then
  13622. + enable_dlopen=yes
  13623. + else
  13624. + enable_dlopen=no
  13625. + fi
  13626. +
  13627. + case $lt_cv_dlopen in
  13628. + dlopen)
  13629. + save_CPPFLAGS="$CPPFLAGS"
  13630. + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  13631. +
  13632. + save_LDFLAGS="$LDFLAGS"
  13633. + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  13634. +
  13635. + save_LIBS="$LIBS"
  13636. + LIBS="$lt_cv_dlopen_libs $LIBS"
  13637. +
  13638. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
  13639. +$as_echo_n "checking whether a program can dlopen itself... " >&6; }
  13640. +if ${lt_cv_dlopen_self+:} false; then :
  13641. + $as_echo_n "(cached) " >&6
  13642. +else
  13643. + if test "$cross_compiling" = yes; then :
  13644. + lt_cv_dlopen_self=cross
  13645. +else
  13646. + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  13647. + lt_status=$lt_dlunknown
  13648. + cat > conftest.$ac_ext <<_LT_EOF
  13649. +#line 12899 "configure"
  13650. +#include "confdefs.h"
  13651. +
  13652. +#if HAVE_DLFCN_H
  13653. +#include <dlfcn.h>
  13654. +#endif
  13655. +
  13656. +#include <stdio.h>
  13657. +
  13658. +#ifdef RTLD_GLOBAL
  13659. +# define LT_DLGLOBAL RTLD_GLOBAL
  13660. +#else
  13661. +# ifdef DL_GLOBAL
  13662. +# define LT_DLGLOBAL DL_GLOBAL
  13663. +# else
  13664. +# define LT_DLGLOBAL 0
  13665. +# endif
  13666. +#endif
  13667. +
  13668. +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
  13669. + find out it does not work in some platform. */
  13670. +#ifndef LT_DLLAZY_OR_NOW
  13671. +# ifdef RTLD_LAZY
  13672. +# define LT_DLLAZY_OR_NOW RTLD_LAZY
  13673. +# else
  13674. +# ifdef DL_LAZY
  13675. +# define LT_DLLAZY_OR_NOW DL_LAZY
  13676. +# else
  13677. +# ifdef RTLD_NOW
  13678. +# define LT_DLLAZY_OR_NOW RTLD_NOW
  13679. +# else
  13680. +# ifdef DL_NOW
  13681. +# define LT_DLLAZY_OR_NOW DL_NOW
  13682. +# else
  13683. +# define LT_DLLAZY_OR_NOW 0
  13684. +# endif
  13685. +# endif
  13686. +# endif
  13687. +# endif
  13688. +#endif
  13689. +
  13690. +/* When -fvisbility=hidden is used, assume the code has been annotated
  13691. + correspondingly for the symbols needed. */
  13692. +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
  13693. +void fnord () __attribute__((visibility("default")));
  13694. +#endif
  13695. +
  13696. +void fnord () { int i=42; }
  13697. +int main ()
  13698. +{
  13699. + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  13700. + int status = $lt_dlunknown;
  13701. +
  13702. + if (self)
  13703. + {
  13704. + if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
  13705. + else
  13706. + {
  13707. + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
  13708. + else puts (dlerror ());
  13709. + }
  13710. + /* dlclose (self); */
  13711. + }
  13712. + else
  13713. + puts (dlerror ());
  13714. +
  13715. + return status;
  13716. +}
  13717. +_LT_EOF
  13718. + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
  13719. + (eval $ac_link) 2>&5
  13720. + ac_status=$?
  13721. + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  13722. + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
  13723. + (./conftest; exit; ) >&5 2>/dev/null
  13724. + lt_status=$?
  13725. + case x$lt_status in
  13726. + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
  13727. + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
  13728. + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
  13729. + esac
  13730. + else :
  13731. + # compilation failed
  13732. + lt_cv_dlopen_self=no
  13733. + fi
  13734. +fi
  13735. +rm -fr conftest*
  13736. +
  13737. +
  13738. +fi
  13739. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
  13740. +$as_echo "$lt_cv_dlopen_self" >&6; }
  13741. +
  13742. + if test "x$lt_cv_dlopen_self" = xyes; then
  13743. + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
  13744. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
  13745. +$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
  13746. +if ${lt_cv_dlopen_self_static+:} false; then :
  13747. + $as_echo_n "(cached) " >&6
  13748. +else
  13749. + if test "$cross_compiling" = yes; then :
  13750. + lt_cv_dlopen_self_static=cross
  13751. +else
  13752. + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  13753. + lt_status=$lt_dlunknown
  13754. + cat > conftest.$ac_ext <<_LT_EOF
  13755. +#line 13005 "configure"
  13756. +#include "confdefs.h"
  13757. +
  13758. +#if HAVE_DLFCN_H
  13759. +#include <dlfcn.h>
  13760. +#endif
  13761. +
  13762. +#include <stdio.h>
  13763. +
  13764. +#ifdef RTLD_GLOBAL
  13765. +# define LT_DLGLOBAL RTLD_GLOBAL
  13766. +#else
  13767. +# ifdef DL_GLOBAL
  13768. +# define LT_DLGLOBAL DL_GLOBAL
  13769. +# else
  13770. +# define LT_DLGLOBAL 0
  13771. +# endif
  13772. +#endif
  13773. +
  13774. +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
  13775. + find out it does not work in some platform. */
  13776. +#ifndef LT_DLLAZY_OR_NOW
  13777. +# ifdef RTLD_LAZY
  13778. +# define LT_DLLAZY_OR_NOW RTLD_LAZY
  13779. +# else
  13780. +# ifdef DL_LAZY
  13781. +# define LT_DLLAZY_OR_NOW DL_LAZY
  13782. +# else
  13783. +# ifdef RTLD_NOW
  13784. +# define LT_DLLAZY_OR_NOW RTLD_NOW
  13785. +# else
  13786. +# ifdef DL_NOW
  13787. +# define LT_DLLAZY_OR_NOW DL_NOW
  13788. +# else
  13789. +# define LT_DLLAZY_OR_NOW 0
  13790. +# endif
  13791. +# endif
  13792. +# endif
  13793. +# endif
  13794. +#endif
  13795. +
  13796. +/* When -fvisbility=hidden is used, assume the code has been annotated
  13797. + correspondingly for the symbols needed. */
  13798. +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
  13799. +void fnord () __attribute__((visibility("default")));
  13800. +#endif
  13801. +
  13802. +void fnord () { int i=42; }
  13803. +int main ()
  13804. +{
  13805. + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  13806. + int status = $lt_dlunknown;
  13807. +
  13808. + if (self)
  13809. + {
  13810. + if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
  13811. + else
  13812. + {
  13813. + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
  13814. + else puts (dlerror ());
  13815. + }
  13816. + /* dlclose (self); */
  13817. + }
  13818. + else
  13819. + puts (dlerror ());
  13820. +
  13821. + return status;
  13822. +}
  13823. +_LT_EOF
  13824. + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
  13825. + (eval $ac_link) 2>&5
  13826. + ac_status=$?
  13827. + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  13828. + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
  13829. + (./conftest; exit; ) >&5 2>/dev/null
  13830. + lt_status=$?
  13831. + case x$lt_status in
  13832. + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
  13833. + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
  13834. + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
  13835. + esac
  13836. + else :
  13837. + # compilation failed
  13838. + lt_cv_dlopen_self_static=no
  13839. + fi
  13840. +fi
  13841. +rm -fr conftest*
  13842. +
  13843. +
  13844. +fi
  13845. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
  13846. +$as_echo "$lt_cv_dlopen_self_static" >&6; }
  13847. + fi
  13848. +
  13849. + CPPFLAGS="$save_CPPFLAGS"
  13850. + LDFLAGS="$save_LDFLAGS"
  13851. + LIBS="$save_LIBS"
  13852. + ;;
  13853. + esac
  13854. +
  13855. + case $lt_cv_dlopen_self in
  13856. + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  13857. + *) enable_dlopen_self=unknown ;;
  13858. + esac
  13859. +
  13860. + case $lt_cv_dlopen_self_static in
  13861. + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  13862. + *) enable_dlopen_self_static=unknown ;;
  13863. + esac
  13864. +fi
  13865. +
  13866. +
  13867. +
  13868. +
  13869. +
  13870. +
  13871. +
  13872. +
  13873. +
  13874. +
  13875. +
  13876. +
  13877. +
  13878. +
  13879. +
  13880. +
  13881. +
  13882. +striplib=
  13883. +old_striplib=
  13884. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
  13885. +$as_echo_n "checking whether stripping libraries is possible... " >&6; }
  13886. +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
  13887. + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
  13888. + test -z "$striplib" && striplib="$STRIP --strip-unneeded"
  13889. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  13890. +$as_echo "yes" >&6; }
  13891. +else
  13892. +# FIXME - insert some real tests, host_os isn't really good enough
  13893. + case $host_os in
  13894. + darwin*)
  13895. + if test -n "$STRIP" ; then
  13896. + striplib="$STRIP -x"
  13897. + old_striplib="$STRIP -S"
  13898. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  13899. +$as_echo "yes" >&6; }
  13900. + else
  13901. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  13902. +$as_echo "no" >&6; }
  13903. + fi
  13904. + ;;
  13905. + *)
  13906. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  13907. +$as_echo "no" >&6; }
  13908. + ;;
  13909. + esac
  13910. +fi
  13911. +
  13912. +
  13913. +
  13914. +
  13915. +
  13916. +
  13917. +
  13918. +
  13919. +
  13920. +
  13921. +
  13922. +
  13923. + # Report which library types will actually be built
  13924. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
  13925. +$as_echo_n "checking if libtool supports shared libraries... " >&6; }
  13926. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
  13927. +$as_echo "$can_build_shared" >&6; }
  13928. +
  13929. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
  13930. +$as_echo_n "checking whether to build shared libraries... " >&6; }
  13931. + test "$can_build_shared" = "no" && enable_shared=no
  13932. +
  13933. + # On AIX, shared libraries and static libraries use the same namespace, and
  13934. + # are all built from PIC.
  13935. + case $host_os in
  13936. + aix3*)
  13937. + test "$enable_shared" = yes && enable_static=no
  13938. + if test -n "$RANLIB"; then
  13939. + archive_cmds="$archive_cmds~\$RANLIB \$lib"
  13940. + postinstall_cmds='$RANLIB $lib'
  13941. + fi
  13942. + ;;
  13943. +
  13944. + aix[4-9]*)
  13945. + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  13946. + test "$enable_shared" = yes && enable_static=no
  13947. + fi
  13948. + ;;
  13949. + esac
  13950. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
  13951. +$as_echo "$enable_shared" >&6; }
  13952. +
  13953. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
  13954. +$as_echo_n "checking whether to build static libraries... " >&6; }
  13955. + # Make sure either enable_shared or enable_static is yes.
  13956. + test "$enable_shared" = yes || enable_static=yes
  13957. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
  13958. +$as_echo "$enable_static" >&6; }
  13959. +
  13960. +
  13961. +
  13962. +
  13963. +fi
  13964. +ac_ext=c
  13965. +ac_cpp='$CPP $CPPFLAGS'
  13966. +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  13967. +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  13968. +ac_compiler_gnu=$ac_cv_c_compiler_gnu
  13969. +
  13970. +CC="$lt_save_CC"
  13971. +
  13972. +
  13973. +
  13974. +
  13975. +
  13976. +
  13977. +
  13978. +
  13979. +
  13980. +
  13981. +
  13982. +
  13983. +
  13984. + ac_config_commands="$ac_config_commands libtool"
  13985. +
  13986. +
  13987. +
  13988. +
  13989. +# Only expand once:
  13990. +
  13991. +
  13992. +
  13993. +
  13994. +. ${srcdir}/../../bfd/configure.host
  13995. +
  13996. +
  13997. +
  13998. +
  13999. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
  14000. +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
  14001. + # Check whether --enable-maintainer-mode was given.
  14002. +if test "${enable_maintainer_mode+set}" = set; then :
  14003. + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
  14004. +else
  14005. + USE_MAINTAINER_MODE=no
  14006. +fi
  14007. +
  14008. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
  14009. +$as_echo "$USE_MAINTAINER_MODE" >&6; }
  14010. + if test $USE_MAINTAINER_MODE = yes; then
  14011. + MAINTAINER_MODE_TRUE=
  14012. + MAINTAINER_MODE_FALSE='#'
  14013. +else
  14014. + MAINTAINER_MODE_TRUE='#'
  14015. + MAINTAINER_MODE_FALSE=
  14016. +fi
  14017. +
  14018. + MAINT=$MAINTAINER_MODE_TRUE
  14019. +
  14020. +
  14021. +
  14022. +
  14023. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim debug setting" >&5
  14024. +$as_echo_n "checking for sim debug setting... " >&6; }
  14025. +sim_debug="0"
  14026. +# Check whether --enable-sim-debug was given.
  14027. +if test "${enable_sim_debug+set}" = set; then :
  14028. + enableval=$enable_sim_debug; case "${enableval}" in
  14029. + yes) sim_debug="7";;
  14030. + no) sim_debug="0";;
  14031. + *) sim_debug="($enableval)";;
  14032. +esac
  14033. +fi
  14034. +if test "$sim_debug" != "0"; then
  14035. +
  14036. +cat >>confdefs.h <<_ACEOF
  14037. +#define DEBUG $sim_debug
  14038. +_ACEOF
  14039. +
  14040. +fi
  14041. +
  14042. +cat >>confdefs.h <<_ACEOF
  14043. +#define WITH_DEBUG $sim_debug
  14044. +_ACEOF
  14045. +
  14046. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_debug" >&5
  14047. +$as_echo "$sim_debug" >&6; }
  14048. +
  14049. +
  14050. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim stdio debug behavior" >&5
  14051. +$as_echo_n "checking for sim stdio debug behavior... " >&6; }
  14052. +sim_stdio="0"
  14053. +# Check whether --enable-sim-stdio was given.
  14054. +if test "${enable_sim_stdio+set}" = set; then :
  14055. + enableval=$enable_sim_stdio; case "${enableval}" in
  14056. + yes) sim_stdio="DO_USE_STDIO";;
  14057. + no) sim_stdio="DONT_USE_STDIO";;
  14058. + *) as_fn_error $? "Unknown value $enableval passed to --enable-sim-stdio" "$LINENO" 5;;
  14059. +esac
  14060. +fi
  14061. +
  14062. +cat >>confdefs.h <<_ACEOF
  14063. +#define WITH_STDIO $sim_stdio
  14064. +_ACEOF
  14065. +
  14066. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_stdio" >&5
  14067. +$as_echo "$sim_stdio" >&6; }
  14068. +
  14069. +
  14070. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim trace settings" >&5
  14071. +$as_echo_n "checking for sim trace settings... " >&6; }
  14072. +sim_trace="~TRACE_debug"
  14073. +# Check whether --enable-sim-trace was given.
  14074. +if test "${enable_sim_trace+set}" = set; then :
  14075. + enableval=$enable_sim_trace; case "${enableval}" in
  14076. + yes) sim_trace="-1";;
  14077. + no) sim_trace="0";;
  14078. + [-0-9]*)
  14079. + sim_trace="'(${enableval})'";;
  14080. + [[:lower:]]*)
  14081. + sim_trace=""
  14082. + for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
  14083. + if test x"$sim_trace" = x; then
  14084. + sim_trace="(TRACE_$x"
  14085. + else
  14086. + sim_trace="${sim_trace}|TRACE_$x"
  14087. + fi
  14088. + done
  14089. + sim_trace="$sim_trace)" ;;
  14090. +esac
  14091. +fi
  14092. +
  14093. +cat >>confdefs.h <<_ACEOF
  14094. +#define WITH_TRACE $sim_trace
  14095. +_ACEOF
  14096. +
  14097. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_trace" >&5
  14098. +$as_echo "$sim_trace" >&6; }
  14099. +
  14100. +
  14101. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim profile settings" >&5
  14102. +$as_echo_n "checking for sim profile settings... " >&6; }
  14103. +profile="1"
  14104. +sim_profile="-1"
  14105. +# Check whether --enable-sim-profile was given.
  14106. +if test "${enable_sim_profile+set}" = set; then :
  14107. + enableval=$enable_sim_profile; case "${enableval}" in
  14108. + yes) profile="1" sim_profile="-1";;
  14109. + no) profile="0" sim_profile="0";;
  14110. + [-0-9]*)
  14111. + profile="(${enableval})" sim_profile="(${enableval})";;
  14112. + [a-z]*)
  14113. + profile="1"
  14114. + sim_profile=""
  14115. + for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
  14116. + if test x"$sim_profile" = x; then
  14117. + sim_profile="(PROFILE_$x"
  14118. + else
  14119. + sim_profile="${sim_profile}|PROFILE_$x"
  14120. + fi
  14121. + done
  14122. + sim_profile="$sim_profile)" ;;
  14123. +esac
  14124. +fi
  14125. +
  14126. +cat >>confdefs.h <<_ACEOF
  14127. +#define PROFILE $profile
  14128. +_ACEOF
  14129. +
  14130. +
  14131. +cat >>confdefs.h <<_ACEOF
  14132. +#define WITH_PROFILE $sim_profile
  14133. +_ACEOF
  14134. +
  14135. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_profile" >&5
  14136. +$as_echo "$sim_profile" >&6; }
  14137. +
  14138. +
  14139. +
  14140. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable sim asserts" >&5
  14141. +$as_echo_n "checking whether to enable sim asserts... " >&6; }
  14142. +sim_assert="1"
  14143. +# Check whether --enable-sim-assert was given.
  14144. +if test "${enable_sim_assert+set}" = set; then :
  14145. + enableval=$enable_sim_assert; case "${enableval}" in
  14146. + yes) sim_assert="1";;
  14147. + no) sim_assert="0";;
  14148. + *) as_fn_error $? "--enable-sim-assert does not take a value" "$LINENO" 5;;
  14149. +esac
  14150. +fi
  14151. +
  14152. +cat >>confdefs.h <<_ACEOF
  14153. +#define WITH_ASSERT $sim_assert
  14154. +_ACEOF
  14155. +
  14156. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_assert" >&5
  14157. +$as_echo "$sim_assert" >&6; }
  14158. +
  14159. +
  14160. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking default sim environment setting" >&5
  14161. +$as_echo_n "checking default sim environment setting... " >&6; }
  14162. +sim_environment="ALL_ENVIRONMENT"
  14163. +# Check whether --enable-sim-environment was given.
  14164. +if test "${enable_sim_environment+set}" = set; then :
  14165. + enableval=$enable_sim_environment; case "${enableval}" in
  14166. + all | ALL) sim_environment="ALL_ENVIRONMENT";;
  14167. + user | USER) sim_environment="USER_ENVIRONMENT";;
  14168. + virtual | VIRTUAL) sim_environment="VIRTUAL_ENVIRONMENT";;
  14169. + operating | OPERATING) sim_environment="OPERATING_ENVIRONMENT";;
  14170. + *) as_fn_error $? "Unknown value $enableval passed to --enable-sim-environment" "$LINENO" 5;;
  14171. +esac
  14172. +fi
  14173. +
  14174. +cat >>confdefs.h <<_ACEOF
  14175. +#define WITH_ENVIRONMENT $sim_environment
  14176. +_ACEOF
  14177. +
  14178. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_environment" >&5
  14179. +$as_echo "$sim_environment" >&6; }
  14180. +
  14181. +
  14182. +sim_inline="-DDEFAULT_INLINE=0"
  14183. +# Check whether --enable-sim-inline was given.
  14184. +if test "${enable_sim_inline+set}" = set; then :
  14185. + enableval=$enable_sim_inline; sim_inline=""
  14186. +case "$enableval" in
  14187. + no) sim_inline="-DDEFAULT_INLINE=0";;
  14188. + 0) sim_inline="-DDEFAULT_INLINE=0";;
  14189. + yes | 2) sim_inline="-DDEFAULT_INLINE=ALL_C_INLINE";;
  14190. + 1) sim_inline="-DDEFAULT_INLINE=INLINE_LOCALS";;
  14191. + *) for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
  14192. + new_flag=""
  14193. + case "$x" in
  14194. + *_INLINE=*) new_flag="-D$x";;
  14195. + *=*) new_flag=`echo "$x" | sed -e "s/=/_INLINE=/" -e "s/^/-D/"`;;
  14196. + *_INLINE) new_flag="-D$x=ALL_C_INLINE";;
  14197. + *) new_flag="-D$x""_INLINE=ALL_C_INLINE";;
  14198. + esac
  14199. + if test x"$sim_inline" = x""; then
  14200. + sim_inline="$new_flag"
  14201. + else
  14202. + sim_inline="$sim_inline $new_flag"
  14203. + fi
  14204. + done;;
  14205. +esac
  14206. +if test x"$silent" != x"yes" && test x"$sim_inline" != x""; then
  14207. + echo "Setting inline flags = $sim_inline" 6>&1
  14208. +fi
  14209. +fi
  14210. +
  14211. +
  14212. +
  14213. +
  14214. +# Check whether --with-pkgversion was given.
  14215. +if test "${with_pkgversion+set}" = set; then :
  14216. + withval=$with_pkgversion; case "$withval" in
  14217. + yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
  14218. + no) PKGVERSION= ;;
  14219. + *) PKGVERSION="($withval) " ;;
  14220. + esac
  14221. +else
  14222. + PKGVERSION="(SIM) "
  14223. +
  14224. +fi
  14225. +
  14226. +
  14227. +
  14228. +
  14229. +
  14230. +# Check whether --with-bugurl was given.
  14231. +if test "${with_bugurl+set}" = set; then :
  14232. + withval=$with_bugurl; case "$withval" in
  14233. + yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
  14234. + no) BUGURL=
  14235. + ;;
  14236. + *) BUGURL="$withval"
  14237. + ;;
  14238. + esac
  14239. +else
  14240. + BUGURL="http://www.gnu.org/software/gdb/bugs/"
  14241. +
  14242. +fi
  14243. +
  14244. + case ${BUGURL} in
  14245. + "")
  14246. + REPORT_BUGS_TO=
  14247. + REPORT_BUGS_TEXI=
  14248. + ;;
  14249. + *)
  14250. + REPORT_BUGS_TO="<$BUGURL>"
  14251. + REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
  14252. + ;;
  14253. + esac;
  14254. +
  14255. +
  14256. +
  14257. +
  14258. +cat >>confdefs.h <<_ACEOF
  14259. +#define PKGVERSION "$PKGVERSION"
  14260. +_ACEOF
  14261. +
  14262. +
  14263. +cat >>confdefs.h <<_ACEOF
  14264. +#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
  14265. +_ACEOF
  14266. +
  14267. +
  14268. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
  14269. +$as_echo_n "checking return type of signal handlers... " >&6; }
  14270. +if ${ac_cv_type_signal+:} false; then :
  14271. + $as_echo_n "(cached) " >&6
  14272. +else
  14273. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14274. +/* end confdefs.h. */
  14275. +#include <sys/types.h>
  14276. +#include <signal.h>
  14277. +
  14278. +int
  14279. +main ()
  14280. +{
  14281. +return *(signal (0, 0)) (0) == 1;
  14282. + ;
  14283. + return 0;
  14284. +}
  14285. +_ACEOF
  14286. +if ac_fn_c_try_compile "$LINENO"; then :
  14287. + ac_cv_type_signal=int
  14288. +else
  14289. + ac_cv_type_signal=void
  14290. +fi
  14291. +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  14292. +fi
  14293. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
  14294. +$as_echo "$ac_cv_type_signal" >&6; }
  14295. +
  14296. +cat >>confdefs.h <<_ACEOF
  14297. +#define RETSIGTYPE $ac_cv_type_signal
  14298. +_ACEOF
  14299. +
  14300. +
  14301. +
  14302. +
  14303. +
  14304. +
  14305. +
  14306. +
  14307. +wire_endian="LITTLE"
  14308. +default_endian=""
  14309. +# Check whether --enable-sim-endian was given.
  14310. +if test "${enable_sim_endian+set}" = set; then :
  14311. + enableval=$enable_sim_endian; case "${enableval}" in
  14312. + b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";;
  14313. + l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";;
  14314. + yes) if test x"$wire_endian" != x; then
  14315. + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}"
  14316. + else
  14317. + if test x"$default_endian" != x; then
  14318. + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}"
  14319. + else
  14320. + echo "No hard-wired endian for target $target" 1>&6
  14321. + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN"
  14322. + fi
  14323. + fi;;
  14324. + no) if test x"$default_endian" != x; then
  14325. + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}"
  14326. + else
  14327. + if test x"$wire_endian" != x; then
  14328. + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}"
  14329. + else
  14330. + echo "No default endian for target $target" 1>&6
  14331. + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN"
  14332. + fi
  14333. + fi;;
  14334. + *) as_fn_error $? "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";;
  14335. +esac
  14336. +if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then
  14337. + echo "Setting endian flags = $sim_endian" 6>&1
  14338. +fi
  14339. +else
  14340. + if test x"$default_endian" != x; then
  14341. + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}"
  14342. +else
  14343. + if test x"$wire_endian" != x; then
  14344. + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}"
  14345. + else
  14346. + sim_endian=
  14347. + fi
  14348. +fi
  14349. +fi
  14350. +
  14351. +wire_alignment="NONSTRICT_ALIGNMENT"
  14352. +default_alignment=""
  14353. +
  14354. +# Check whether --enable-sim-alignment was given.
  14355. +if test "${enable_sim_alignment+set}" = set; then :
  14356. + enableval=$enable_sim_alignment; case "${enableval}" in
  14357. + strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";;
  14358. + nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";;
  14359. + forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";;
  14360. + yes) if test x"$wire_alignment" != x; then
  14361. + sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}"
  14362. + else
  14363. + if test x"$default_alignment" != x; then
  14364. + sim_alignment="-DWITH_ALIGNMENT=${default_alignment}"
  14365. + else
  14366. + echo "No hard-wired alignment for target $target" 1>&6
  14367. + sim_alignment="-DWITH_ALIGNMENT=0"
  14368. + fi
  14369. + fi;;
  14370. + no) if test x"$default_alignment" != x; then
  14371. + sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}"
  14372. + else
  14373. + if test x"$wire_alignment" != x; then
  14374. + sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}"
  14375. + else
  14376. + echo "No default alignment for target $target" 1>&6
  14377. + sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0"
  14378. + fi
  14379. + fi;;
  14380. + *) as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-alignment\"" "$LINENO" 5; sim_alignment="";;
  14381. +esac
  14382. +if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then
  14383. + echo "Setting alignment flags = $sim_alignment" 6>&1
  14384. +fi
  14385. +else
  14386. + if test x"$default_alignment" != x; then
  14387. + sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}"
  14388. +else
  14389. + if test x"$wire_alignment" != x; then
  14390. + sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}"
  14391. + else
  14392. + sim_alignment=
  14393. + fi
  14394. +fi
  14395. +fi
  14396. +
  14397. +
  14398. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking default sim environment setting" >&5
  14399. +$as_echo_n "checking default sim environment setting... " >&6; }
  14400. +sim_environment="ALL_ENVIRONMENT"
  14401. +# Check whether --enable-sim-environment was given.
  14402. +if test "${enable_sim_environment+set}" = set; then :
  14403. + enableval=$enable_sim_environment; case "${enableval}" in
  14404. + all | ALL) sim_environment="ALL_ENVIRONMENT";;
  14405. + user | USER) sim_environment="USER_ENVIRONMENT";;
  14406. + virtual | VIRTUAL) sim_environment="VIRTUAL_ENVIRONMENT";;
  14407. + operating | OPERATING) sim_environment="OPERATING_ENVIRONMENT";;
  14408. + *) as_fn_error $? "Unknown value $enableval passed to --enable-sim-environment" "$LINENO" 5;;
  14409. +esac
  14410. +fi
  14411. +
  14412. +cat >>confdefs.h <<_ACEOF
  14413. +#define WITH_ENVIRONMENT $sim_environment
  14414. +_ACEOF
  14415. +
  14416. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_environment" >&5
  14417. +$as_echo "$sim_environment" >&6; }
  14418. +
  14419. +
  14420. +sim_inline="-DDEFAULT_INLINE=0"
  14421. +# Check whether --enable-sim-inline was given.
  14422. +if test "${enable_sim_inline+set}" = set; then :
  14423. + enableval=$enable_sim_inline; sim_inline=""
  14424. +case "$enableval" in
  14425. + no) sim_inline="-DDEFAULT_INLINE=0";;
  14426. + 0) sim_inline="-DDEFAULT_INLINE=0";;
  14427. + yes | 2) sim_inline="-DDEFAULT_INLINE=ALL_C_INLINE";;
  14428. + 1) sim_inline="-DDEFAULT_INLINE=INLINE_LOCALS";;
  14429. + *) for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
  14430. + new_flag=""
  14431. + case "$x" in
  14432. + *_INLINE=*) new_flag="-D$x";;
  14433. + *=*) new_flag=`echo "$x" | sed -e "s/=/_INLINE=/" -e "s/^/-D/"`;;
  14434. + *_INLINE) new_flag="-D$x=ALL_C_INLINE";;
  14435. + *) new_flag="-D$x""_INLINE=ALL_C_INLINE";;
  14436. + esac
  14437. + if test x"$sim_inline" = x""; then
  14438. + sim_inline="$new_flag"
  14439. + else
  14440. + sim_inline="$sim_inline $new_flag"
  14441. + fi
  14442. + done;;
  14443. +esac
  14444. +if test x"$silent" != x"yes" && test x"$sim_inline" != x""; then
  14445. + echo "Setting inline flags = $sim_inline" 6>&1
  14446. +fi
  14447. +fi
  14448. +
  14449. +
  14450. +# Check whether --enable-werror was given.
  14451. +if test "${enable_werror+set}" = set; then :
  14452. + enableval=$enable_werror; case "${enableval}" in
  14453. + yes | y) ERROR_ON_WARNING="yes" ;;
  14454. + no | n) ERROR_ON_WARNING="no" ;;
  14455. + *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
  14456. + esac
  14457. +fi
  14458. +
  14459. +
  14460. +# Enable -Werror by default when using gcc
  14461. +if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
  14462. + ERROR_ON_WARNING=yes
  14463. +fi
  14464. +
  14465. +WERROR_CFLAGS=""
  14466. +if test "${ERROR_ON_WARNING}" = yes ; then
  14467. +# NOTE: Disabled in the sim dir due to most sims generating warnings.
  14468. +# WERROR_CFLAGS="-Werror"
  14469. + true
  14470. +fi
  14471. +
  14472. +build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
  14473. +-Wpointer-sign \
  14474. +-Wno-unused -Wunused-value -Wunused-function \
  14475. +-Wno-switch -Wno-char-subscripts -Wmissing-prototypes
  14476. +-Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \
  14477. +-Wold-style-declaration -Wold-style-definition"
  14478. +
  14479. +# Enable -Wno-format by default when using gcc on mingw since many
  14480. +# GCC versions complain about %I64.
  14481. +case "${host}" in
  14482. + *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
  14483. + *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
  14484. +esac
  14485. +
  14486. +# Check whether --enable-build-warnings was given.
  14487. +if test "${enable_build_warnings+set}" = set; then :
  14488. + enableval=$enable_build_warnings; case "${enableval}" in
  14489. + yes) ;;
  14490. + no) build_warnings="-w";;
  14491. + ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
  14492. + build_warnings="${build_warnings} ${t}";;
  14493. + *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
  14494. + build_warnings="${t} ${build_warnings}";;
  14495. + *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
  14496. +esac
  14497. +if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
  14498. + echo "Setting compiler warning flags = $build_warnings" 6>&1
  14499. +fi
  14500. +fi
  14501. +# Check whether --enable-sim-build-warnings was given.
  14502. +if test "${enable_sim_build_warnings+set}" = set; then :
  14503. + enableval=$enable_sim_build_warnings; case "${enableval}" in
  14504. + yes) ;;
  14505. + no) build_warnings="-w";;
  14506. + ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
  14507. + build_warnings="${build_warnings} ${t}";;
  14508. + *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
  14509. + build_warnings="${t} ${build_warnings}";;
  14510. + *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
  14511. +esac
  14512. +if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
  14513. + echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
  14514. +fi
  14515. +fi
  14516. +WARN_CFLAGS=""
  14517. +if test "x${build_warnings}" != x -a "x$GCC" = xyes
  14518. +then
  14519. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
  14520. +$as_echo_n "checking compiler warning flags... " >&6; }
  14521. + # Separate out the -Werror flag as some files just cannot be
  14522. + # compiled with it enabled.
  14523. + for w in ${build_warnings}; do
  14524. + case $w in
  14525. + -Werr*) WERROR_CFLAGS=-Werror ;;
  14526. + *) # Check that GCC accepts it
  14527. + saved_CFLAGS="$CFLAGS"
  14528. + CFLAGS="$CFLAGS $w"
  14529. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14530. +/* end confdefs.h. */
  14531. +
  14532. +int
  14533. +main ()
  14534. +{
  14535. +
  14536. + ;
  14537. + return 0;
  14538. +}
  14539. +_ACEOF
  14540. +if ac_fn_c_try_compile "$LINENO"; then :
  14541. + WARN_CFLAGS="${WARN_CFLAGS} $w"
  14542. +fi
  14543. +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  14544. + CFLAGS="$saved_CFLAGS"
  14545. + esac
  14546. + done
  14547. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
  14548. +$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
  14549. +fi
  14550. +
  14551. +
  14552. +# Select the default model for the target.
  14553. +riscv_model=
  14554. +case "${target}" in
  14555. +riscv32*) riscv_model="RV32G" ;;
  14556. +riscv*) riscv_model="RV64G" ;;
  14557. +esac
  14558. +
  14559. +default_sim_default_model="${riscv_model}"
  14560. +# Check whether --enable-sim-default-model was given.
  14561. +if test "${enable_sim_default_model+set}" = set; then :
  14562. + enableval=$enable_sim_default_model; case "${enableval}" in
  14563. + yes|no) as_fn_error $? "\"Missing argument to --enable-sim-default-model\"" "$LINENO" 5;;
  14564. + *) sim_default_model="-DWITH_DEFAULT_MODEL='\"${enableval}\"'";;
  14565. +esac
  14566. +if test x"$silent" != x"yes" && test x"$sim_default_model" != x""; then
  14567. + echo "Setting default model = $sim_default_model" 6>&1
  14568. +fi
  14569. +else
  14570. + sim_default_model="-DWITH_DEFAULT_MODEL='\"${default_sim_default_model}\"'"
  14571. +fi
  14572. +
  14573. +
  14574. +
  14575. +# Select the bitsize of the target.
  14576. +riscv_addr_bitsize=
  14577. +case "${target}" in
  14578. +riscv32*) riscv_addr_bitsize=32 ;;
  14579. +riscv*) riscv_addr_bitsize=64 ;;
  14580. +esac
  14581. +wire_word_bitsize="$riscv_addr_bitsize"
  14582. +wire_word_msb=""
  14583. +wire_address_bitsize=""
  14584. +wire_cell_bitsize=""
  14585. +# Check whether --enable-sim-bitsize was given.
  14586. +if test "${enable_sim_bitsize+set}" = set; then :
  14587. + enableval=$enable_sim_bitsize; sim_bitsize=
  14588. +case "${enableval}" in
  14589. + 64,63 | 64,63,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=64 -DWITH_TARGET_WORD_MSB=63";;
  14590. + 32,31 | 32,31,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=31";;
  14591. + 64,0 | 64,0,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=0";;
  14592. + 32,0 | 64,0,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=0";;
  14593. + 32) if test x"$wire_word_msb" != x -a x"$wire_word_msb" != x0; then
  14594. + sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=31"
  14595. + else
  14596. + sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=0"
  14597. + fi ;;
  14598. + 64) if test x"$wire_word_msb" != x -a x"$wire_word_msb" != x0; then
  14599. + sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=64 -DWITH_TARGET_WORD_MSB=63"
  14600. + else
  14601. + sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=64 -DWITH_TARGET_WORD_MSB=0"
  14602. + fi ;;
  14603. + *) as_fn_error $? "\"--enable-sim-bitsize was given $enableval. Expected 32 or 64\"" "$LINENO" 5 ;;
  14604. +esac
  14605. +# address bitsize
  14606. +tmp=`echo "${enableval}" | sed -e "s/^[0-9]*,*[0-9]*,*//"`
  14607. +case x"${tmp}" in
  14608. + x ) ;;
  14609. + x32 | x32,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_ADDRESS_BITSIZE=32" ;;
  14610. + x64 | x64,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_ADDRESS_BITSIZE=64" ;;
  14611. + * ) as_fn_error $? "\"--enable-sim-bitsize was given address size $enableval. Expected 32 or 64\"" "$LINENO" 5 ;;
  14612. +esac
  14613. +# cell bitsize
  14614. +tmp=`echo "${enableval}" | sed -e "s/^[0-9]*,*[0-9*]*,*[0-9]*,*//"`
  14615. +case x"${tmp}" in
  14616. + x ) ;;
  14617. + x32 | x32,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_CELL_BITSIZE=32" ;;
  14618. + x64 | x64,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_CELL_BITSIZE=64" ;;
  14619. + * ) as_fn_error $? "\"--enable-sim-bitsize was given cell size $enableval. Expected 32 or 64\"" "$LINENO" 5 ;;
  14620. +esac
  14621. +if test x"$silent" != x"yes" && test x"$sim_bitsize" != x""; then
  14622. + echo "Setting bitsize flags = $sim_bitsize" 6>&1
  14623. +fi
  14624. +else
  14625. + sim_bitsize=""
  14626. +if test x"$wire_word_bitsize" != x; then
  14627. + sim_bitsize="$sim_bitsize -DWITH_TARGET_WORD_BITSIZE=$wire_word_bitsize"
  14628. +fi
  14629. +if test x"$wire_word_msb" != x; then
  14630. + sim_bitsize="$sim_bitsize -DWITH_TARGET_WORD_MSB=$wire_word_msb"
  14631. +fi
  14632. +if test x"$wire_address_bitsize" != x; then
  14633. + sim_bitsize="$sim_bitsize -DWITH_TARGET_ADDRESS_BITSIZE=$wire_address_bitsize"
  14634. +fi
  14635. +if test x"$wire_cell_bitsize" != x; then
  14636. + sim_bitsize="$sim_bitsize -DWITH_TARGET_CELL_BITSIZE=$wire_cell_bitsize"
  14637. +fi
  14638. +fi
  14639. +
  14640. +
  14641. +
  14642. +cgen_breaks=""
  14643. +if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
  14644. +cgen_breaks="break cgen_rtx_error";
  14645. +fi
  14646. +
  14647. +ac_config_files="$ac_config_files Makefile.sim:Makefile.in"
  14648. +
  14649. +ac_config_files="$ac_config_files Make-common.sim:../common/Make-common.in"
  14650. +
  14651. +ac_config_files="$ac_config_files .gdbinit:../common/gdbinit.in"
  14652. +
  14653. +ac_config_commands="$ac_config_commands Makefile"
  14654. +
  14655. +ac_config_commands="$ac_config_commands stamp-h"
  14656. +
  14657. +cat >confcache <<\_ACEOF
  14658. +# This file is a shell script that caches the results of configure
  14659. +# tests run on this system so they can be shared between configure
  14660. +# scripts and configure runs, see configure's option --config-cache.
  14661. +# It is not useful on other systems. If it contains results you don't
  14662. +# want to keep, you may remove or edit it.
  14663. +#
  14664. +# config.status only pays attention to the cache file if you give it
  14665. +# the --recheck option to rerun configure.
  14666. +#
  14667. +# `ac_cv_env_foo' variables (set or unset) will be overridden when
  14668. +# loading this file, other *unset* `ac_cv_foo' will be assigned the
  14669. +# following values.
  14670. +
  14671. +_ACEOF
  14672. +
  14673. +# The following way of writing the cache mishandles newlines in values,
  14674. +# but we know of no workaround that is simple, portable, and efficient.
  14675. +# So, we kill variables containing newlines.
  14676. +# Ultrix sh set writes to stderr and can't be redirected directly,
  14677. +# and sets the high bit in the cache file unless we assign to the vars.
  14678. +(
  14679. + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
  14680. + eval ac_val=\$$ac_var
  14681. + case $ac_val in #(
  14682. + *${as_nl}*)
  14683. + case $ac_var in #(
  14684. + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
  14685. +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
  14686. + esac
  14687. + case $ac_var in #(
  14688. + _ | IFS | as_nl) ;; #(
  14689. + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
  14690. + *) { eval $ac_var=; unset $ac_var;} ;;
  14691. + esac ;;
  14692. + esac
  14693. + done
  14694. +
  14695. + (set) 2>&1 |
  14696. + case $as_nl`(ac_space=' '; set) 2>&1` in #(
  14697. + *${as_nl}ac_space=\ *)
  14698. + # `set' does not quote correctly, so add quotes: double-quote
  14699. + # substitution turns \\\\ into \\, and sed turns \\ into \.
  14700. + sed -n \
  14701. + "s/'/'\\\\''/g;
  14702. + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
  14703. + ;; #(
  14704. + *)
  14705. + # `set' quotes correctly as required by POSIX, so do not add quotes.
  14706. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
  14707. + ;;
  14708. + esac |
  14709. + sort
  14710. +) |
  14711. + sed '
  14712. + /^ac_cv_env_/b end
  14713. + t clear
  14714. + :clear
  14715. + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
  14716. + t end
  14717. + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
  14718. + :end' >>confcache
  14719. +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
  14720. + if test -w "$cache_file"; then
  14721. + if test "x$cache_file" != "x/dev/null"; then
  14722. + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
  14723. +$as_echo "$as_me: updating cache $cache_file" >&6;}
  14724. + if test ! -f "$cache_file" || test -h "$cache_file"; then
  14725. + cat confcache >"$cache_file"
  14726. + else
  14727. + case $cache_file in #(
  14728. + */* | ?:*)
  14729. + mv -f confcache "$cache_file"$$ &&
  14730. + mv -f "$cache_file"$$ "$cache_file" ;; #(
  14731. + *)
  14732. + mv -f confcache "$cache_file" ;;
  14733. + esac
  14734. + fi
  14735. + fi
  14736. + else
  14737. + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
  14738. +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
  14739. + fi
  14740. +fi
  14741. +rm -f confcache
  14742. +
  14743. +test "x$prefix" = xNONE && prefix=$ac_default_prefix
  14744. +# Let make expand exec_prefix.
  14745. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  14746. +
  14747. +DEFS=-DHAVE_CONFIG_H
  14748. +
  14749. +ac_libobjs=
  14750. +ac_ltlibobjs=
  14751. +U=
  14752. +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
  14753. + # 1. Remove the extension, and $U if already installed.
  14754. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
  14755. + ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
  14756. + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
  14757. + # will be set to the directory where LIBOBJS objects are built.
  14758. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
  14759. + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
  14760. +done
  14761. +LIBOBJS=$ac_libobjs
  14762. +
  14763. +LTLIBOBJS=$ac_ltlibobjs
  14764. +
  14765. +
  14766. +
  14767. +if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
  14768. + as_fn_error $? "conditional \"GMAKE\" was never defined.
  14769. +Usually this means the macro was only invoked conditionally." "$LINENO" 5
  14770. +fi
  14771. +if test -z "${PLUGINS_TRUE}" && test -z "${PLUGINS_FALSE}"; then
  14772. + as_fn_error $? "conditional \"PLUGINS\" was never defined.
  14773. +Usually this means the macro was only invoked conditionally." "$LINENO" 5
  14774. +fi
  14775. +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
  14776. + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
  14777. +Usually this means the macro was only invoked conditionally." "$LINENO" 5
  14778. +fi
  14779. +
  14780. +: "${CONFIG_STATUS=./config.status}"
  14781. +ac_write_fail=0
  14782. +ac_clean_files_save=$ac_clean_files
  14783. +ac_clean_files="$ac_clean_files $CONFIG_STATUS"
  14784. +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
  14785. +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
  14786. +as_write_fail=0
  14787. +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
  14788. +#! $SHELL
  14789. +# Generated by $as_me.
  14790. +# Run this file to recreate the current configuration.
  14791. +# Compiler output produced by configure, useful for debugging
  14792. +# configure, is in config.log if it exists.
  14793. +
  14794. +debug=false
  14795. +ac_cs_recheck=false
  14796. +ac_cs_silent=false
  14797. +
  14798. +SHELL=\${CONFIG_SHELL-$SHELL}
  14799. +export SHELL
  14800. +_ASEOF
  14801. +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
  14802. +## -------------------- ##
  14803. +## M4sh Initialization. ##
  14804. +## -------------------- ##
  14805. +
  14806. +# Be more Bourne compatible
  14807. +DUALCASE=1; export DUALCASE # for MKS sh
  14808. +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
  14809. + emulate sh
  14810. + NULLCMD=:
  14811. + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  14812. + # is contrary to our usage. Disable this feature.
  14813. + alias -g '${1+"$@"}'='"$@"'
  14814. + setopt NO_GLOB_SUBST
  14815. +else
  14816. + case `(set -o) 2>/dev/null` in #(
  14817. + *posix*) :
  14818. + set -o posix ;; #(
  14819. + *) :
  14820. + ;;
  14821. +esac
  14822. +fi
  14823. +
  14824. +
  14825. +as_nl='
  14826. +'
  14827. +export as_nl
  14828. +# Printing a long string crashes Solaris 7 /usr/bin/printf.
  14829. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  14830. +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
  14831. +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
  14832. +# Prefer a ksh shell builtin over an external printf program on Solaris,
  14833. +# but without wasting forks for bash or zsh.
  14834. +if test -z "$BASH_VERSION$ZSH_VERSION" \
  14835. + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
  14836. + as_echo='print -r --'
  14837. + as_echo_n='print -rn --'
  14838. +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  14839. + as_echo='printf %s\n'
  14840. + as_echo_n='printf %s'
  14841. +else
  14842. + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
  14843. + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
  14844. + as_echo_n='/usr/ucb/echo -n'
  14845. + else
  14846. + as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
  14847. + as_echo_n_body='eval
  14848. + arg=$1;
  14849. + case $arg in #(
  14850. + *"$as_nl"*)
  14851. + expr "X$arg" : "X\\(.*\\)$as_nl";
  14852. + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
  14853. + esac;
  14854. + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
  14855. + '
  14856. + export as_echo_n_body
  14857. + as_echo_n='sh -c $as_echo_n_body as_echo'
  14858. + fi
  14859. + export as_echo_body
  14860. + as_echo='sh -c $as_echo_body as_echo'
  14861. +fi
  14862. +
  14863. +# The user is always right.
  14864. +if test "${PATH_SEPARATOR+set}" != set; then
  14865. + PATH_SEPARATOR=:
  14866. + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
  14867. + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
  14868. + PATH_SEPARATOR=';'
  14869. + }
  14870. +fi
  14871. +
  14872. +
  14873. +# IFS
  14874. +# We need space, tab and new line, in precisely that order. Quoting is
  14875. +# there to prevent editors from complaining about space-tab.
  14876. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word
  14877. +# splitting by setting IFS to empty value.)
  14878. +IFS=" "" $as_nl"
  14879. +
  14880. +# Find who we are. Look in the path if we contain no directory separator.
  14881. +as_myself=
  14882. +case $0 in #((
  14883. + *[\\/]* ) as_myself=$0 ;;
  14884. + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  14885. +for as_dir in $PATH
  14886. +do
  14887. + IFS=$as_save_IFS
  14888. + test -z "$as_dir" && as_dir=.
  14889. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
  14890. + done
  14891. +IFS=$as_save_IFS
  14892. +
  14893. + ;;
  14894. +esac
  14895. +# We did not find ourselves, most probably we were run as `sh COMMAND'
  14896. +# in which case we are not to be found in the path.
  14897. +if test "x$as_myself" = x; then
  14898. + as_myself=$0
  14899. +fi
  14900. +if test ! -f "$as_myself"; then
  14901. + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
  14902. + exit 1
  14903. +fi
  14904. +
  14905. +# Unset variables that we do not need and which cause bugs (e.g. in
  14906. +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
  14907. +# suppresses any "Segmentation fault" message there. '((' could
  14908. +# trigger a bug in pdksh 5.2.14.
  14909. +for as_var in BASH_ENV ENV MAIL MAILPATH
  14910. +do eval test x\${$as_var+set} = xset \
  14911. + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
  14912. +done
  14913. +PS1='$ '
  14914. +PS2='> '
  14915. +PS4='+ '
  14916. +
  14917. +# NLS nuisances.
  14918. +LC_ALL=C
  14919. +export LC_ALL
  14920. +LANGUAGE=C
  14921. +export LANGUAGE
  14922. +
  14923. +# CDPATH.
  14924. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  14925. +
  14926. +
  14927. +# as_fn_error STATUS ERROR [LINENO LOG_FD]
  14928. +# ----------------------------------------
  14929. +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
  14930. +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
  14931. +# script with STATUS, using 1 if that was 0.
  14932. +as_fn_error ()
  14933. +{
  14934. + as_status=$1; test $as_status -eq 0 && as_status=1
  14935. + if test "$4"; then
  14936. + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  14937. + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
  14938. + fi
  14939. + $as_echo "$as_me: error: $2" >&2
  14940. + as_fn_exit $as_status
  14941. +} # as_fn_error
  14942. +
  14943. +
  14944. +# as_fn_set_status STATUS
  14945. +# -----------------------
  14946. +# Set $? to STATUS, without forking.
  14947. +as_fn_set_status ()
  14948. +{
  14949. + return $1
  14950. +} # as_fn_set_status
  14951. +
  14952. +# as_fn_exit STATUS
  14953. +# -----------------
  14954. +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
  14955. +as_fn_exit ()
  14956. +{
  14957. + set +e
  14958. + as_fn_set_status $1
  14959. + exit $1
  14960. +} # as_fn_exit
  14961. +
  14962. +# as_fn_unset VAR
  14963. +# ---------------
  14964. +# Portably unset VAR.
  14965. +as_fn_unset ()
  14966. +{
  14967. + { eval $1=; unset $1;}
  14968. +}
  14969. +as_unset=as_fn_unset
  14970. +# as_fn_append VAR VALUE
  14971. +# ----------------------
  14972. +# Append the text in VALUE to the end of the definition contained in VAR. Take
  14973. +# advantage of any shell optimizations that allow amortized linear growth over
  14974. +# repeated appends, instead of the typical quadratic growth present in naive
  14975. +# implementations.
  14976. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
  14977. + eval 'as_fn_append ()
  14978. + {
  14979. + eval $1+=\$2
  14980. + }'
  14981. +else
  14982. + as_fn_append ()
  14983. + {
  14984. + eval $1=\$$1\$2
  14985. + }
  14986. +fi # as_fn_append
  14987. +
  14988. +# as_fn_arith ARG...
  14989. +# ------------------
  14990. +# Perform arithmetic evaluation on the ARGs, and store the result in the
  14991. +# global $as_val. Take advantage of shells that can avoid forks. The arguments
  14992. +# must be portable across $(()) and expr.
  14993. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
  14994. + eval 'as_fn_arith ()
  14995. + {
  14996. + as_val=$(( $* ))
  14997. + }'
  14998. +else
  14999. + as_fn_arith ()
  15000. + {
  15001. + as_val=`expr "$@" || test $? -eq 1`
  15002. + }
  15003. +fi # as_fn_arith
  15004. +
  15005. +
  15006. +if expr a : '\(a\)' >/dev/null 2>&1 &&
  15007. + test "X`expr 00001 : '.*\(...\)'`" = X001; then
  15008. + as_expr=expr
  15009. +else
  15010. + as_expr=false
  15011. +fi
  15012. +
  15013. +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
  15014. + as_basename=basename
  15015. +else
  15016. + as_basename=false
  15017. +fi
  15018. +
  15019. +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
  15020. + as_dirname=dirname
  15021. +else
  15022. + as_dirname=false
  15023. +fi
  15024. +
  15025. +as_me=`$as_basename -- "$0" ||
  15026. +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
  15027. + X"$0" : 'X\(//\)$' \| \
  15028. + X"$0" : 'X\(/\)' \| . 2>/dev/null ||
  15029. +$as_echo X/"$0" |
  15030. + sed '/^.*\/\([^/][^/]*\)\/*$/{
  15031. + s//\1/
  15032. + q
  15033. + }
  15034. + /^X\/\(\/\/\)$/{
  15035. + s//\1/
  15036. + q
  15037. + }
  15038. + /^X\/\(\/\).*/{
  15039. + s//\1/
  15040. + q
  15041. + }
  15042. + s/.*/./; q'`
  15043. +
  15044. +# Avoid depending upon Character Ranges.
  15045. +as_cr_letters='abcdefghijklmnopqrstuvwxyz'
  15046. +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
  15047. +as_cr_Letters=$as_cr_letters$as_cr_LETTERS
  15048. +as_cr_digits='0123456789'
  15049. +as_cr_alnum=$as_cr_Letters$as_cr_digits
  15050. +
  15051. +ECHO_C= ECHO_N= ECHO_T=
  15052. +case `echo -n x` in #(((((
  15053. +-n*)
  15054. + case `echo 'xy\c'` in
  15055. + *c*) ECHO_T=' ';; # ECHO_T is single tab character.
  15056. + xy) ECHO_C='\c';;
  15057. + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
  15058. + ECHO_T=' ';;
  15059. + esac;;
  15060. +*)
  15061. + ECHO_N='-n';;
  15062. +esac
  15063. +
  15064. +rm -f conf$$ conf$$.exe conf$$.file
  15065. +if test -d conf$$.dir; then
  15066. + rm -f conf$$.dir/conf$$.file
  15067. +else
  15068. + rm -f conf$$.dir
  15069. + mkdir conf$$.dir 2>/dev/null
  15070. +fi
  15071. +if (echo >conf$$.file) 2>/dev/null; then
  15072. + if ln -s conf$$.file conf$$ 2>/dev/null; then
  15073. + as_ln_s='ln -s'
  15074. + # ... but there are two gotchas:
  15075. + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
  15076. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
  15077. + # In both cases, we have to default to `cp -pR'.
  15078. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
  15079. + as_ln_s='cp -pR'
  15080. + elif ln conf$$.file conf$$ 2>/dev/null; then
  15081. + as_ln_s=ln
  15082. + else
  15083. + as_ln_s='cp -pR'
  15084. + fi
  15085. +else
  15086. + as_ln_s='cp -pR'
  15087. +fi
  15088. +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
  15089. +rmdir conf$$.dir 2>/dev/null
  15090. +
  15091. +
  15092. +# as_fn_mkdir_p
  15093. +# -------------
  15094. +# Create "$as_dir" as a directory, including parents if necessary.
  15095. +as_fn_mkdir_p ()
  15096. +{
  15097. +
  15098. + case $as_dir in #(
  15099. + -*) as_dir=./$as_dir;;
  15100. + esac
  15101. + test -d "$as_dir" || eval $as_mkdir_p || {
  15102. + as_dirs=
  15103. + while :; do
  15104. + case $as_dir in #(
  15105. + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
  15106. + *) as_qdir=$as_dir;;
  15107. + esac
  15108. + as_dirs="'$as_qdir' $as_dirs"
  15109. + as_dir=`$as_dirname -- "$as_dir" ||
  15110. +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
  15111. + X"$as_dir" : 'X\(//\)[^/]' \| \
  15112. + X"$as_dir" : 'X\(//\)$' \| \
  15113. + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
  15114. +$as_echo X"$as_dir" |
  15115. + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
  15116. + s//\1/
  15117. + q
  15118. + }
  15119. + /^X\(\/\/\)[^/].*/{
  15120. + s//\1/
  15121. + q
  15122. + }
  15123. + /^X\(\/\/\)$/{
  15124. + s//\1/
  15125. + q
  15126. + }
  15127. + /^X\(\/\).*/{
  15128. + s//\1/
  15129. + q
  15130. + }
  15131. + s/.*/./; q'`
  15132. + test -d "$as_dir" && break
  15133. + done
  15134. + test -z "$as_dirs" || eval "mkdir $as_dirs"
  15135. + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
  15136. +
  15137. +
  15138. +} # as_fn_mkdir_p
  15139. +if mkdir -p . 2>/dev/null; then
  15140. + as_mkdir_p='mkdir -p "$as_dir"'
  15141. +else
  15142. + test -d ./-p && rmdir ./-p
  15143. + as_mkdir_p=false
  15144. +fi
  15145. +
  15146. +
  15147. +# as_fn_executable_p FILE
  15148. +# -----------------------
  15149. +# Test if FILE is an executable regular file.
  15150. +as_fn_executable_p ()
  15151. +{
  15152. + test -f "$1" && test -x "$1"
  15153. +} # as_fn_executable_p
  15154. +as_test_x='test -x'
  15155. +as_executable_p=as_fn_executable_p
  15156. +
  15157. +# Sed expression to map a string onto a valid CPP name.
  15158. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
  15159. +
  15160. +# Sed expression to map a string onto a valid variable name.
  15161. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
  15162. +
  15163. +
  15164. +exec 6>&1
  15165. +## ----------------------------------- ##
  15166. +## Main body of $CONFIG_STATUS script. ##
  15167. +## ----------------------------------- ##
  15168. +_ASEOF
  15169. +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
  15170. +
  15171. +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  15172. +# Save the log message, to keep $0 and so on meaningful, and to
  15173. +# report actual input values of CONFIG_FILES etc. instead of their
  15174. +# values after options handling.
  15175. +ac_log="
  15176. +This file was extended by $as_me, which was
  15177. +generated by GNU Autoconf 2.69. Invocation command line was
  15178. +
  15179. + CONFIG_FILES = $CONFIG_FILES
  15180. + CONFIG_HEADERS = $CONFIG_HEADERS
  15181. + CONFIG_LINKS = $CONFIG_LINKS
  15182. + CONFIG_COMMANDS = $CONFIG_COMMANDS
  15183. + $ $0 $@
  15184. +
  15185. +on `(hostname || uname -n) 2>/dev/null | sed 1q`
  15186. +"
  15187. +
  15188. +_ACEOF
  15189. +
  15190. +case $ac_config_files in *"
  15191. +"*) set x $ac_config_files; shift; ac_config_files=$*;;
  15192. +esac
  15193. +
  15194. +case $ac_config_headers in *"
  15195. +"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
  15196. +esac
  15197. +
  15198. +
  15199. +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  15200. +# Files that config.status was made for.
  15201. +config_files="$ac_config_files"
  15202. +config_headers="$ac_config_headers"
  15203. +config_commands="$ac_config_commands"
  15204. +
  15205. +_ACEOF
  15206. +
  15207. +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  15208. +ac_cs_usage="\
  15209. +\`$as_me' instantiates files and other configuration actions
  15210. +from templates according to the current configuration. Unless the files
  15211. +and actions are specified as TAGs, all are instantiated by default.
  15212. +
  15213. +Usage: $0 [OPTION]... [TAG]...
  15214. +
  15215. + -h, --help print this help, then exit
  15216. + -V, --version print version number and configuration settings, then exit
  15217. + --config print configuration, then exit
  15218. + -q, --quiet, --silent
  15219. + do not print progress messages
  15220. + -d, --debug don't remove temporary files
  15221. + --recheck update $as_me by reconfiguring in the same conditions
  15222. + --file=FILE[:TEMPLATE]
  15223. + instantiate the configuration file FILE
  15224. + --header=FILE[:TEMPLATE]
  15225. + instantiate the configuration header FILE
  15226. +
  15227. +Configuration files:
  15228. +$config_files
  15229. +
  15230. +Configuration headers:
  15231. +$config_headers
  15232. +
  15233. +Configuration commands:
  15234. +$config_commands
  15235. +
  15236. +Report bugs to the package provider."
  15237. +
  15238. +_ACEOF
  15239. +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  15240. +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
  15241. +ac_cs_version="\\
  15242. +config.status
  15243. +configured by $0, generated by GNU Autoconf 2.69,
  15244. + with options \\"\$ac_cs_config\\"
  15245. +
  15246. +Copyright (C) 2012 Free Software Foundation, Inc.
  15247. +This config.status script is free software; the Free Software Foundation
  15248. +gives unlimited permission to copy, distribute and modify it."
  15249. +
  15250. +ac_pwd='$ac_pwd'
  15251. +srcdir='$srcdir'
  15252. +INSTALL='$INSTALL'
  15253. +AWK='$AWK'
  15254. +test -n "\$AWK" || AWK=awk
  15255. +_ACEOF
  15256. +
  15257. +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  15258. +# The default lists apply if the user does not specify any file.
  15259. +ac_need_defaults=:
  15260. +while test $# != 0
  15261. +do
  15262. + case $1 in
  15263. + --*=?*)
  15264. + ac_option=`expr "X$1" : 'X\([^=]*\)='`
  15265. + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
  15266. + ac_shift=:
  15267. + ;;
  15268. + --*=)
  15269. + ac_option=`expr "X$1" : 'X\([^=]*\)='`
  15270. + ac_optarg=
  15271. + ac_shift=:
  15272. + ;;
  15273. + *)
  15274. + ac_option=$1
  15275. + ac_optarg=$2
  15276. + ac_shift=shift
  15277. + ;;
  15278. + esac
  15279. +
  15280. + case $ac_option in
  15281. + # Handling of the options.
  15282. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  15283. + ac_cs_recheck=: ;;
  15284. + --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
  15285. + $as_echo "$ac_cs_version"; exit ;;
  15286. + --config | --confi | --conf | --con | --co | --c )
  15287. + $as_echo "$ac_cs_config"; exit ;;
  15288. + --debug | --debu | --deb | --de | --d | -d )
  15289. + debug=: ;;
  15290. + --file | --fil | --fi | --f )
  15291. + $ac_shift
  15292. + case $ac_optarg in
  15293. + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
  15294. + '') as_fn_error $? "missing file argument" ;;
  15295. + esac
  15296. + as_fn_append CONFIG_FILES " '$ac_optarg'"
  15297. + ac_need_defaults=false;;
  15298. + --header | --heade | --head | --hea )
  15299. + $ac_shift
  15300. + case $ac_optarg in
  15301. + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
  15302. + esac
  15303. + as_fn_append CONFIG_HEADERS " '$ac_optarg'"
  15304. + ac_need_defaults=false;;
  15305. + --he | --h)
  15306. + # Conflict between --help and --header
  15307. + as_fn_error $? "ambiguous option: \`$1'
  15308. +Try \`$0 --help' for more information.";;
  15309. + --help | --hel | -h )
  15310. + $as_echo "$ac_cs_usage"; exit ;;
  15311. + -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  15312. + | -silent | --silent | --silen | --sile | --sil | --si | --s)
  15313. + ac_cs_silent=: ;;
  15314. +
  15315. + # This is an error.
  15316. + -*) as_fn_error $? "unrecognized option: \`$1'
  15317. +Try \`$0 --help' for more information." ;;
  15318. +
  15319. + *) as_fn_append ac_config_targets " $1"
  15320. + ac_need_defaults=false ;;
  15321. +
  15322. + esac
  15323. + shift
  15324. +done
  15325. +
  15326. +ac_configure_extra_args=
  15327. +
  15328. +if $ac_cs_silent; then
  15329. + exec 6>/dev/null
  15330. + ac_configure_extra_args="$ac_configure_extra_args --silent"
  15331. +fi
  15332. +
  15333. +_ACEOF
  15334. +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  15335. +if \$ac_cs_recheck; then
  15336. + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
  15337. + shift
  15338. + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
  15339. + CONFIG_SHELL='$SHELL'
  15340. + export CONFIG_SHELL
  15341. + exec "\$@"
  15342. +fi
  15343. +
  15344. +_ACEOF
  15345. +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  15346. +exec 5>>config.log
  15347. +{
  15348. + echo
  15349. + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
  15350. +## Running $as_me. ##
  15351. +_ASBOX
  15352. + $as_echo "$ac_log"
  15353. +} >&5
  15354. +
  15355. +_ACEOF
  15356. +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  15357. +#
  15358. +# INIT-COMMANDS
  15359. +#
  15360. +ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
  15361. +
  15362. +
  15363. +# The HP-UX ksh and POSIX shell print the target directory to stdout
  15364. +# if CDPATH is set.
  15365. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  15366. +
  15367. +sed_quote_subst='$sed_quote_subst'
  15368. +double_quote_subst='$double_quote_subst'
  15369. +delay_variable_subst='$delay_variable_subst'
  15370. +macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
  15371. +macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
  15372. +enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
  15373. +enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
  15374. +pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
  15375. +enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
  15376. +SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
  15377. +ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
  15378. +host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
  15379. +host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
  15380. +host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
  15381. +build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
  15382. +build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
  15383. +build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
  15384. +SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
  15385. +Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
  15386. +GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
  15387. +EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
  15388. +FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
  15389. +LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
  15390. +NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
  15391. +LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
  15392. +max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
  15393. +ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
  15394. +exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
  15395. +lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
  15396. +lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
  15397. +lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
  15398. +reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
  15399. +reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
  15400. +OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
  15401. +deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
  15402. +file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
  15403. +AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
  15404. +AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
  15405. +STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
  15406. +RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
  15407. +old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
  15408. +old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
  15409. +old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
  15410. +lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
  15411. +CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
  15412. +CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
  15413. +compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
  15414. +GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
  15415. +lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
  15416. +lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
  15417. +lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
  15418. +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
  15419. +objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
  15420. +MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
  15421. +lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
  15422. +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
  15423. +lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
  15424. +lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
  15425. +lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
  15426. +need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
  15427. +DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
  15428. +NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
  15429. +LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
  15430. +OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
  15431. +OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
  15432. +libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
  15433. +shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
  15434. +extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
  15435. +archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
  15436. +enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
  15437. +export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
  15438. +whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
  15439. +compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
  15440. +old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
  15441. +old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
  15442. +archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
  15443. +archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
  15444. +module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
  15445. +module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
  15446. +with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
  15447. +allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
  15448. +no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
  15449. +hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
  15450. +hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`'
  15451. +hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
  15452. +hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
  15453. +hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
  15454. +hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
  15455. +hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
  15456. +hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
  15457. +inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
  15458. +link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
  15459. +fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`'
  15460. +always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
  15461. +export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
  15462. +exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
  15463. +include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
  15464. +prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
  15465. +file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
  15466. +variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
  15467. +need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
  15468. +need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
  15469. +version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
  15470. +runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
  15471. +shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
  15472. +shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
  15473. +libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
  15474. +library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
  15475. +soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
  15476. +install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
  15477. +postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
  15478. +postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
  15479. +finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
  15480. +finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
  15481. +hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
  15482. +sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
  15483. +sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
  15484. +hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
  15485. +enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
  15486. +enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
  15487. +enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
  15488. +old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
  15489. +striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
  15490. +
  15491. +LTCC='$LTCC'
  15492. +LTCFLAGS='$LTCFLAGS'
  15493. +compiler='$compiler_DEFAULT'
  15494. +
  15495. +# A function that is used when there is no print builtin or printf.
  15496. +func_fallback_echo ()
  15497. +{
  15498. + eval 'cat <<_LTECHO_EOF
  15499. +\$1
  15500. +_LTECHO_EOF'
  15501. +}
  15502. +
  15503. +# Quote evaled strings.
  15504. +for var in SHELL \
  15505. +ECHO \
  15506. +SED \
  15507. +GREP \
  15508. +EGREP \
  15509. +FGREP \
  15510. +LD \
  15511. +NM \
  15512. +LN_S \
  15513. +lt_SP2NL \
  15514. +lt_NL2SP \
  15515. +reload_flag \
  15516. +OBJDUMP \
  15517. +deplibs_check_method \
  15518. +file_magic_cmd \
  15519. +AR \
  15520. +AR_FLAGS \
  15521. +STRIP \
  15522. +RANLIB \
  15523. +CC \
  15524. +CFLAGS \
  15525. +compiler \
  15526. +lt_cv_sys_global_symbol_pipe \
  15527. +lt_cv_sys_global_symbol_to_cdecl \
  15528. +lt_cv_sys_global_symbol_to_c_name_address \
  15529. +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
  15530. +lt_prog_compiler_no_builtin_flag \
  15531. +lt_prog_compiler_wl \
  15532. +lt_prog_compiler_pic \
  15533. +lt_prog_compiler_static \
  15534. +lt_cv_prog_compiler_c_o \
  15535. +need_locks \
  15536. +DSYMUTIL \
  15537. +NMEDIT \
  15538. +LIPO \
  15539. +OTOOL \
  15540. +OTOOL64 \
  15541. +shrext_cmds \
  15542. +export_dynamic_flag_spec \
  15543. +whole_archive_flag_spec \
  15544. +compiler_needs_object \
  15545. +with_gnu_ld \
  15546. +allow_undefined_flag \
  15547. +no_undefined_flag \
  15548. +hardcode_libdir_flag_spec \
  15549. +hardcode_libdir_flag_spec_ld \
  15550. +hardcode_libdir_separator \
  15551. +fix_srcfile_path \
  15552. +exclude_expsyms \
  15553. +include_expsyms \
  15554. +file_list_spec \
  15555. +variables_saved_for_relink \
  15556. +libname_spec \
  15557. +library_names_spec \
  15558. +soname_spec \
  15559. +install_override_mode \
  15560. +finish_eval \
  15561. +old_striplib \
  15562. +striplib; do
  15563. + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  15564. + *[\\\\\\\`\\"\\\$]*)
  15565. + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
  15566. + ;;
  15567. + *)
  15568. + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  15569. + ;;
  15570. + esac
  15571. +done
  15572. +
  15573. +# Double-quote double-evaled strings.
  15574. +for var in reload_cmds \
  15575. +old_postinstall_cmds \
  15576. +old_postuninstall_cmds \
  15577. +old_archive_cmds \
  15578. +extract_expsyms_cmds \
  15579. +old_archive_from_new_cmds \
  15580. +old_archive_from_expsyms_cmds \
  15581. +archive_cmds \
  15582. +archive_expsym_cmds \
  15583. +module_cmds \
  15584. +module_expsym_cmds \
  15585. +export_symbols_cmds \
  15586. +prelink_cmds \
  15587. +postinstall_cmds \
  15588. +postuninstall_cmds \
  15589. +finish_cmds \
  15590. +sys_lib_search_path_spec \
  15591. +sys_lib_dlsearch_path_spec; do
  15592. + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  15593. + *[\\\\\\\`\\"\\\$]*)
  15594. + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
  15595. + ;;
  15596. + *)
  15597. + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  15598. + ;;
  15599. + esac
  15600. +done
  15601. +
  15602. +ac_aux_dir='$ac_aux_dir'
  15603. +xsi_shell='$xsi_shell'
  15604. +lt_shell_append='$lt_shell_append'
  15605. +
  15606. +# See if we are running on zsh, and set the options which allow our
  15607. +# commands through without removal of \ escapes INIT.
  15608. +if test -n "\${ZSH_VERSION+set}" ; then
  15609. + setopt NO_GLOB_SUBST
  15610. +fi
  15611. +
  15612. +
  15613. + PACKAGE='$PACKAGE'
  15614. + VERSION='$VERSION'
  15615. + TIMESTAMP='$TIMESTAMP'
  15616. + RM='$RM'
  15617. + ofile='$ofile'
  15618. +
  15619. +
  15620. +
  15621. +
  15622. +_ACEOF
  15623. +
  15624. +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  15625. +
  15626. +# Handling of arguments.
  15627. +for ac_config_target in $ac_config_targets
  15628. +do
  15629. + case $ac_config_target in
  15630. + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
  15631. + "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
  15632. + "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
  15633. + "Makefile.sim") CONFIG_FILES="$CONFIG_FILES Makefile.sim:Makefile.in" ;;
  15634. + "Make-common.sim") CONFIG_FILES="$CONFIG_FILES Make-common.sim:../common/Make-common.in" ;;
  15635. + ".gdbinit") CONFIG_FILES="$CONFIG_FILES .gdbinit:../common/gdbinit.in" ;;
  15636. + "Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS Makefile" ;;
  15637. + "stamp-h") CONFIG_COMMANDS="$CONFIG_COMMANDS stamp-h" ;;
  15638. +
  15639. + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
  15640. + esac
  15641. +done
  15642. +
  15643. +
  15644. +# If the user did not use the arguments to specify the items to instantiate,
  15645. +# then the envvar interface is used. Set only those that are not.
  15646. +# We use the long form for the default assignment because of an extremely
  15647. +# bizarre bug on SunOS 4.1.3.
  15648. +if $ac_need_defaults; then
  15649. + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
  15650. + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
  15651. + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
  15652. +fi
  15653. +
  15654. +# Have a temporary directory for convenience. Make it in the build tree
  15655. +# simply because there is no reason against having it here, and in addition,
  15656. +# creating and moving files from /tmp can sometimes cause problems.
  15657. +# Hook for its removal unless debugging.
  15658. +# Note that there is a small window in which the directory will not be cleaned:
  15659. +# after its creation but before its name has been assigned to `$tmp'.
  15660. +$debug ||
  15661. +{
  15662. + tmp= ac_tmp=
  15663. + trap 'exit_status=$?
  15664. + : "${ac_tmp:=$tmp}"
  15665. + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
  15666. +' 0
  15667. + trap 'as_fn_exit 1' 1 2 13 15
  15668. +}
  15669. +# Create a (secure) tmp directory for tmp files.
  15670. +
  15671. +{
  15672. + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
  15673. + test -d "$tmp"
  15674. +} ||
  15675. +{
  15676. + tmp=./conf$$-$RANDOM
  15677. + (umask 077 && mkdir "$tmp")
  15678. +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
  15679. +ac_tmp=$tmp
  15680. +
  15681. +# Set up the scripts for CONFIG_FILES section.
  15682. +# No need to generate them if there are no CONFIG_FILES.
  15683. +# This happens for instance with `./config.status config.h'.
  15684. +if test -n "$CONFIG_FILES"; then
  15685. +
  15686. +
  15687. +ac_cr=`echo X | tr X '\015'`
  15688. +# On cygwin, bash can eat \r inside `` if the user requested igncr.
  15689. +# But we know of no other shell where ac_cr would be empty at this
  15690. +# point, so we can use a bashism as a fallback.
  15691. +if test "x$ac_cr" = x; then
  15692. + eval ac_cr=\$\'\\r\'
  15693. +fi
  15694. +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
  15695. +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
  15696. + ac_cs_awk_cr='\\r'
  15697. +else
  15698. + ac_cs_awk_cr=$ac_cr
  15699. +fi
  15700. +
  15701. +echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
  15702. +_ACEOF
  15703. +
  15704. +
  15705. +{
  15706. + echo "cat >conf$$subs.awk <<_ACEOF" &&
  15707. + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
  15708. + echo "_ACEOF"
  15709. +} >conf$$subs.sh ||
  15710. + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
  15711. +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
  15712. +ac_delim='%!_!# '
  15713. +for ac_last_try in false false false false false :; do
  15714. + . ./conf$$subs.sh ||
  15715. + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
  15716. +
  15717. + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
  15718. + if test $ac_delim_n = $ac_delim_num; then
  15719. + break
  15720. + elif $ac_last_try; then
  15721. + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
  15722. + else
  15723. + ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
  15724. + fi
  15725. +done
  15726. +rm -f conf$$subs.sh
  15727. +
  15728. +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  15729. +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
  15730. +_ACEOF
  15731. +sed -n '
  15732. +h
  15733. +s/^/S["/; s/!.*/"]=/
  15734. +p
  15735. +g
  15736. +s/^[^!]*!//
  15737. +:repl
  15738. +t repl
  15739. +s/'"$ac_delim"'$//
  15740. +t delim
  15741. +:nl
  15742. +h
  15743. +s/\(.\{148\}\)..*/\1/
  15744. +t more1
  15745. +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
  15746. +p
  15747. +n
  15748. +b repl
  15749. +:more1
  15750. +s/["\\]/\\&/g; s/^/"/; s/$/"\\/
  15751. +p
  15752. +g
  15753. +s/.\{148\}//
  15754. +t nl
  15755. +:delim
  15756. +h
  15757. +s/\(.\{148\}\)..*/\1/
  15758. +t more2
  15759. +s/["\\]/\\&/g; s/^/"/; s/$/"/
  15760. +p
  15761. +b
  15762. +:more2
  15763. +s/["\\]/\\&/g; s/^/"/; s/$/"\\/
  15764. +p
  15765. +g
  15766. +s/.\{148\}//
  15767. +t delim
  15768. +' <conf$$subs.awk | sed '
  15769. +/^[^""]/{
  15770. + N
  15771. + s/\n//
  15772. +}
  15773. +' >>$CONFIG_STATUS || ac_write_fail=1
  15774. +rm -f conf$$subs.awk
  15775. +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  15776. +_ACAWK
  15777. +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
  15778. + for (key in S) S_is_set[key] = 1
  15779. + FS = ""
  15780. +
  15781. +}
  15782. +{
  15783. + line = $ 0
  15784. + nfields = split(line, field, "@")
  15785. + substed = 0
  15786. + len = length(field[1])
  15787. + for (i = 2; i < nfields; i++) {
  15788. + key = field[i]
  15789. + keylen = length(key)
  15790. + if (S_is_set[key]) {
  15791. + value = S[key]
  15792. + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
  15793. + len += length(value) + length(field[++i])
  15794. + substed = 1
  15795. + } else
  15796. + len += 1 + keylen
  15797. + }
  15798. +
  15799. + print line
  15800. +}
  15801. +
  15802. +_ACAWK
  15803. +_ACEOF
  15804. +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  15805. +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
  15806. + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
  15807. +else
  15808. + cat
  15809. +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
  15810. + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
  15811. +_ACEOF
  15812. +
  15813. +# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
  15814. +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
  15815. +# trailing colons and then remove the whole line if VPATH becomes empty
  15816. +# (actually we leave an empty line to preserve line numbers).
  15817. +if test "x$srcdir" = x.; then
  15818. + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
  15819. +h
  15820. +s///
  15821. +s/^/:/
  15822. +s/[ ]*$/:/
  15823. +s/:\$(srcdir):/:/g
  15824. +s/:\${srcdir}:/:/g
  15825. +s/:@srcdir@:/:/g
  15826. +s/^:*//
  15827. +s/:*$//
  15828. +x
  15829. +s/\(=[ ]*\).*/\1/
  15830. +G
  15831. +s/\n//
  15832. +s/^[^=]*=[ ]*$//
  15833. +}'
  15834. +fi
  15835. +
  15836. +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  15837. +fi # test -n "$CONFIG_FILES"
  15838. +
  15839. +# Set up the scripts for CONFIG_HEADERS section.
  15840. +# No need to generate them if there are no CONFIG_HEADERS.
  15841. +# This happens for instance with `./config.status Makefile'.
  15842. +if test -n "$CONFIG_HEADERS"; then
  15843. +cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
  15844. +BEGIN {
  15845. +_ACEOF
  15846. +
  15847. +# Transform confdefs.h into an awk script `defines.awk', embedded as
  15848. +# here-document in config.status, that substitutes the proper values into
  15849. +# config.h.in to produce config.h.
  15850. +
  15851. +# Create a delimiter string that does not exist in confdefs.h, to ease
  15852. +# handling of long lines.
  15853. +ac_delim='%!_!# '
  15854. +for ac_last_try in false false :; do
  15855. + ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
  15856. + if test -z "$ac_tt"; then
  15857. + break
  15858. + elif $ac_last_try; then
  15859. + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
  15860. + else
  15861. + ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
  15862. + fi
  15863. +done
  15864. +
  15865. +# For the awk script, D is an array of macro values keyed by name,
  15866. +# likewise P contains macro parameters if any. Preserve backslash
  15867. +# newline sequences.
  15868. +
  15869. +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
  15870. +sed -n '
  15871. +s/.\{148\}/&'"$ac_delim"'/g
  15872. +t rset
  15873. +:rset
  15874. +s/^[ ]*#[ ]*define[ ][ ]*/ /
  15875. +t def
  15876. +d
  15877. +:def
  15878. +s/\\$//
  15879. +t bsnl
  15880. +s/["\\]/\\&/g
  15881. +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
  15882. +D["\1"]=" \3"/p
  15883. +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
  15884. +d
  15885. +:bsnl
  15886. +s/["\\]/\\&/g
  15887. +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
  15888. +D["\1"]=" \3\\\\\\n"\\/p
  15889. +t cont
  15890. +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
  15891. +t cont
  15892. +d
  15893. +:cont
  15894. +n
  15895. +s/.\{148\}/&'"$ac_delim"'/g
  15896. +t clear
  15897. +:clear
  15898. +s/\\$//
  15899. +t bsnlc
  15900. +s/["\\]/\\&/g; s/^/"/; s/$/"/p
  15901. +d
  15902. +:bsnlc
  15903. +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
  15904. +b cont
  15905. +' <confdefs.h | sed '
  15906. +s/'"$ac_delim"'/"\\\
  15907. +"/g' >>$CONFIG_STATUS || ac_write_fail=1
  15908. +
  15909. +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  15910. + for (key in D) D_is_set[key] = 1
  15911. + FS = ""
  15912. +}
  15913. +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
  15914. + line = \$ 0
  15915. + split(line, arg, " ")
  15916. + if (arg[1] == "#") {
  15917. + defundef = arg[2]
  15918. + mac1 = arg[3]
  15919. + } else {
  15920. + defundef = substr(arg[1], 2)
  15921. + mac1 = arg[2]
  15922. + }
  15923. + split(mac1, mac2, "(") #)
  15924. + macro = mac2[1]
  15925. + prefix = substr(line, 1, index(line, defundef) - 1)
  15926. + if (D_is_set[macro]) {
  15927. + # Preserve the white space surrounding the "#".
  15928. + print prefix "define", macro P[macro] D[macro]
  15929. + next
  15930. + } else {
  15931. + # Replace #undef with comments. This is necessary, for example,
  15932. + # in the case of _POSIX_SOURCE, which is predefined and required
  15933. + # on some systems where configure will not decide to define it.
  15934. + if (defundef == "undef") {
  15935. + print "/*", prefix defundef, macro, "*/"
  15936. + next
  15937. + }
  15938. + }
  15939. +}
  15940. +{ print }
  15941. +_ACAWK
  15942. +_ACEOF
  15943. +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  15944. + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
  15945. +fi # test -n "$CONFIG_HEADERS"
  15946. +
  15947. +
  15948. +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
  15949. +shift
  15950. +for ac_tag
  15951. +do
  15952. + case $ac_tag in
  15953. + :[FHLC]) ac_mode=$ac_tag; continue;;
  15954. + esac
  15955. + case $ac_mode$ac_tag in
  15956. + :[FHL]*:*);;
  15957. + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
  15958. + :[FH]-) ac_tag=-:-;;
  15959. + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
  15960. + esac
  15961. + ac_save_IFS=$IFS
  15962. + IFS=:
  15963. + set x $ac_tag
  15964. + IFS=$ac_save_IFS
  15965. + shift
  15966. + ac_file=$1
  15967. + shift
  15968. +
  15969. + case $ac_mode in
  15970. + :L) ac_source=$1;;
  15971. + :[FH])
  15972. + ac_file_inputs=
  15973. + for ac_f
  15974. + do
  15975. + case $ac_f in
  15976. + -) ac_f="$ac_tmp/stdin";;
  15977. + *) # Look for the file first in the build tree, then in the source tree
  15978. + # (if the path is not absolute). The absolute path cannot be DOS-style,
  15979. + # because $ac_f cannot contain `:'.
  15980. + test -f "$ac_f" ||
  15981. + case $ac_f in
  15982. + [\\/$]*) false;;
  15983. + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
  15984. + esac ||
  15985. + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
  15986. + esac
  15987. + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
  15988. + as_fn_append ac_file_inputs " '$ac_f'"
  15989. + done
  15990. +
  15991. + # Let's still pretend it is `configure' which instantiates (i.e., don't
  15992. + # use $as_me), people would be surprised to read:
  15993. + # /* config.h. Generated by config.status. */
  15994. + configure_input='Generated from '`
  15995. + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
  15996. + `' by configure.'
  15997. + if test x"$ac_file" != x-; then
  15998. + configure_input="$ac_file. $configure_input"
  15999. + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
  16000. +$as_echo "$as_me: creating $ac_file" >&6;}
  16001. + fi
  16002. + # Neutralize special characters interpreted by sed in replacement strings.
  16003. + case $configure_input in #(
  16004. + *\&* | *\|* | *\\* )
  16005. + ac_sed_conf_input=`$as_echo "$configure_input" |
  16006. + sed 's/[\\\\&|]/\\\\&/g'`;; #(
  16007. + *) ac_sed_conf_input=$configure_input;;
  16008. + esac
  16009. +
  16010. + case $ac_tag in
  16011. + *:-:* | *:-) cat >"$ac_tmp/stdin" \
  16012. + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
  16013. + esac
  16014. + ;;
  16015. + esac
  16016. +
  16017. + ac_dir=`$as_dirname -- "$ac_file" ||
  16018. +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
  16019. + X"$ac_file" : 'X\(//\)[^/]' \| \
  16020. + X"$ac_file" : 'X\(//\)$' \| \
  16021. + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
  16022. +$as_echo X"$ac_file" |
  16023. + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
  16024. + s//\1/
  16025. + q
  16026. + }
  16027. + /^X\(\/\/\)[^/].*/{
  16028. + s//\1/
  16029. + q
  16030. + }
  16031. + /^X\(\/\/\)$/{
  16032. + s//\1/
  16033. + q
  16034. + }
  16035. + /^X\(\/\).*/{
  16036. + s//\1/
  16037. + q
  16038. + }
  16039. + s/.*/./; q'`
  16040. + as_dir="$ac_dir"; as_fn_mkdir_p
  16041. + ac_builddir=.
  16042. +
  16043. +case "$ac_dir" in
  16044. +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
  16045. +*)
  16046. + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
  16047. + # A ".." for each directory in $ac_dir_suffix.
  16048. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
  16049. + case $ac_top_builddir_sub in
  16050. + "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
  16051. + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
  16052. + esac ;;
  16053. +esac
  16054. +ac_abs_top_builddir=$ac_pwd
  16055. +ac_abs_builddir=$ac_pwd$ac_dir_suffix
  16056. +# for backward compatibility:
  16057. +ac_top_builddir=$ac_top_build_prefix
  16058. +
  16059. +case $srcdir in
  16060. + .) # We are building in place.
  16061. + ac_srcdir=.
  16062. + ac_top_srcdir=$ac_top_builddir_sub
  16063. + ac_abs_top_srcdir=$ac_pwd ;;
  16064. + [\\/]* | ?:[\\/]* ) # Absolute name.
  16065. + ac_srcdir=$srcdir$ac_dir_suffix;
  16066. + ac_top_srcdir=$srcdir
  16067. + ac_abs_top_srcdir=$srcdir ;;
  16068. + *) # Relative name.
  16069. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
  16070. + ac_top_srcdir=$ac_top_build_prefix$srcdir
  16071. + ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
  16072. +esac
  16073. +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
  16074. +
  16075. +
  16076. + case $ac_mode in
  16077. + :F)
  16078. + #
  16079. + # CONFIG_FILE
  16080. + #
  16081. +
  16082. + case $INSTALL in
  16083. + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
  16084. + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
  16085. + esac
  16086. +_ACEOF
  16087. +
  16088. +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  16089. +# If the template does not know about datarootdir, expand it.
  16090. +# FIXME: This hack should be removed a few years after 2.60.
  16091. +ac_datarootdir_hack=; ac_datarootdir_seen=
  16092. +ac_sed_dataroot='
  16093. +/datarootdir/ {
  16094. + p
  16095. + q
  16096. +}
  16097. +/@datadir@/p
  16098. +/@docdir@/p
  16099. +/@infodir@/p
  16100. +/@localedir@/p
  16101. +/@mandir@/p'
  16102. +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
  16103. +*datarootdir*) ac_datarootdir_seen=yes;;
  16104. +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
  16105. + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
  16106. +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
  16107. +_ACEOF
  16108. +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  16109. + ac_datarootdir_hack='
  16110. + s&@datadir@&$datadir&g
  16111. + s&@docdir@&$docdir&g
  16112. + s&@infodir@&$infodir&g
  16113. + s&@localedir@&$localedir&g
  16114. + s&@mandir@&$mandir&g
  16115. + s&\\\${datarootdir}&$datarootdir&g' ;;
  16116. +esac
  16117. +_ACEOF
  16118. +
  16119. +# Neutralize VPATH when `$srcdir' = `.'.
  16120. +# Shell code in configure.ac might set extrasub.
  16121. +# FIXME: do we really want to maintain this feature?
  16122. +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  16123. +ac_sed_extra="$ac_vpsub
  16124. +$extrasub
  16125. +_ACEOF
  16126. +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  16127. +:t
  16128. +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
  16129. +s|@configure_input@|$ac_sed_conf_input|;t t
  16130. +s&@top_builddir@&$ac_top_builddir_sub&;t t
  16131. +s&@top_build_prefix@&$ac_top_build_prefix&;t t
  16132. +s&@srcdir@&$ac_srcdir&;t t
  16133. +s&@abs_srcdir@&$ac_abs_srcdir&;t t
  16134. +s&@top_srcdir@&$ac_top_srcdir&;t t
  16135. +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
  16136. +s&@builddir@&$ac_builddir&;t t
  16137. +s&@abs_builddir@&$ac_abs_builddir&;t t
  16138. +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
  16139. +s&@INSTALL@&$ac_INSTALL&;t t
  16140. +$ac_datarootdir_hack
  16141. +"
  16142. +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
  16143. + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
  16144. +
  16145. +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
  16146. + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
  16147. + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
  16148. + "$ac_tmp/out"`; test -z "$ac_out"; } &&
  16149. + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
  16150. +which seems to be undefined. Please make sure it is defined" >&5
  16151. +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
  16152. +which seems to be undefined. Please make sure it is defined" >&2;}
  16153. +
  16154. + rm -f "$ac_tmp/stdin"
  16155. + case $ac_file in
  16156. + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
  16157. + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
  16158. + esac \
  16159. + || as_fn_error $? "could not create $ac_file" "$LINENO" 5
  16160. + ;;
  16161. + :H)
  16162. + #
  16163. + # CONFIG_HEADER
  16164. + #
  16165. + if test x"$ac_file" != x-; then
  16166. + {
  16167. + $as_echo "/* $configure_input */" \
  16168. + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
  16169. + } >"$ac_tmp/config.h" \
  16170. + || as_fn_error $? "could not create $ac_file" "$LINENO" 5
  16171. + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
  16172. + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
  16173. +$as_echo "$as_me: $ac_file is unchanged" >&6;}
  16174. + else
  16175. + rm -f "$ac_file"
  16176. + mv "$ac_tmp/config.h" "$ac_file" \
  16177. + || as_fn_error $? "could not create $ac_file" "$LINENO" 5
  16178. + fi
  16179. + else
  16180. + $as_echo "/* $configure_input */" \
  16181. + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
  16182. + || as_fn_error $? "could not create -" "$LINENO" 5
  16183. + fi
  16184. + ;;
  16185. +
  16186. + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
  16187. +$as_echo "$as_me: executing $ac_file commands" >&6;}
  16188. + ;;
  16189. + esac
  16190. +
  16191. +
  16192. + case $ac_file$ac_mode in
  16193. + "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
  16194. + "libtool":C)
  16195. +
  16196. + # See if we are running on zsh, and set the options which allow our
  16197. + # commands through without removal of \ escapes.
  16198. + if test -n "${ZSH_VERSION+set}" ; then
  16199. + setopt NO_GLOB_SUBST
  16200. + fi
  16201. +
  16202. + cfgfile="${ofile}T"
  16203. + trap "$RM \"$cfgfile\"; exit 1" 1 2 15
  16204. + $RM "$cfgfile"
  16205. +
  16206. + cat <<_LT_EOF >> "$cfgfile"
  16207. +#! $SHELL
  16208. +
  16209. +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
  16210. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
  16211. +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  16212. +# NOTE: Changes made to this file will be lost: look at ltmain.sh.
  16213. +#
  16214. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
  16215. +# 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
  16216. +# Written by Gordon Matzigkeit, 1996
  16217. +#
  16218. +# This file is part of GNU Libtool.
  16219. +#
  16220. +# GNU Libtool is free software; you can redistribute it and/or
  16221. +# modify it under the terms of the GNU General Public License as
  16222. +# published by the Free Software Foundation; either version 2 of
  16223. +# the License, or (at your option) any later version.
  16224. +#
  16225. +# As a special exception to the GNU General Public License,
  16226. +# if you distribute this file as part of a program or library that
  16227. +# is built using GNU Libtool, you may include this file under the
  16228. +# same distribution terms that you use for the rest of that program.
  16229. +#
  16230. +# GNU Libtool is distributed in the hope that it will be useful,
  16231. +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  16232. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16233. +# GNU General Public License for more details.
  16234. +#
  16235. +# You should have received a copy of the GNU General Public License
  16236. +# along with GNU Libtool; see the file COPYING. If not, a copy
  16237. +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
  16238. +# obtained by writing to the Free Software Foundation, Inc.,
  16239. +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  16240. +
  16241. +
  16242. +# The names of the tagged configurations supported by this script.
  16243. +available_tags=""
  16244. +
  16245. +# ### BEGIN LIBTOOL CONFIG
  16246. +
  16247. +# Which release of libtool.m4 was used?
  16248. +macro_version=$macro_version
  16249. +macro_revision=$macro_revision
  16250. +
  16251. +# Whether or not to build shared libraries.
  16252. +build_libtool_libs=$enable_shared
  16253. +
  16254. +# Whether or not to build static libraries.
  16255. +build_old_libs=$enable_static
  16256. +
  16257. +# What type of objects to build.
  16258. +pic_mode=$pic_mode
  16259. +
  16260. +# Whether or not to optimize for fast installation.
  16261. +fast_install=$enable_fast_install
  16262. +
  16263. +# Shell to use when invoking shell scripts.
  16264. +SHELL=$lt_SHELL
  16265. +
  16266. +# An echo program that protects backslashes.
  16267. +ECHO=$lt_ECHO
  16268. +
  16269. +# The host system.
  16270. +host_alias=$host_alias
  16271. +host=$host
  16272. +host_os=$host_os
  16273. +
  16274. +# The build system.
  16275. +build_alias=$build_alias
  16276. +build=$build
  16277. +build_os=$build_os
  16278. +
  16279. +# A sed program that does not truncate output.
  16280. +SED=$lt_SED
  16281. +
  16282. +# Sed that helps us avoid accidentally triggering echo(1) options like -n.
  16283. +Xsed="\$SED -e 1s/^X//"
  16284. +
  16285. +# A grep program that handles long lines.
  16286. +GREP=$lt_GREP
  16287. +
  16288. +# An ERE matcher.
  16289. +EGREP=$lt_EGREP
  16290. +
  16291. +# A literal string matcher.
  16292. +FGREP=$lt_FGREP
  16293. +
  16294. +# A BSD- or MS-compatible name lister.
  16295. +NM=$lt_NM
  16296. +
  16297. +# Whether we need soft or hard links.
  16298. +LN_S=$lt_LN_S
  16299. +
  16300. +# What is the maximum length of a command?
  16301. +max_cmd_len=$max_cmd_len
  16302. +
  16303. +# Object file suffix (normally "o").
  16304. +objext=$ac_objext
  16305. +
  16306. +# Executable file suffix (normally "").
  16307. +exeext=$exeext
  16308. +
  16309. +# whether the shell understands "unset".
  16310. +lt_unset=$lt_unset
  16311. +
  16312. +# turn spaces into newlines.
  16313. +SP2NL=$lt_lt_SP2NL
  16314. +
  16315. +# turn newlines into spaces.
  16316. +NL2SP=$lt_lt_NL2SP
  16317. +
  16318. +# An object symbol dumper.
  16319. +OBJDUMP=$lt_OBJDUMP
  16320. +
  16321. +# Method to check whether dependent libraries are shared objects.
  16322. +deplibs_check_method=$lt_deplibs_check_method
  16323. +
  16324. +# Command to use when deplibs_check_method == "file_magic".
  16325. +file_magic_cmd=$lt_file_magic_cmd
  16326. +
  16327. +# The archiver.
  16328. +AR=$lt_AR
  16329. +AR_FLAGS=$lt_AR_FLAGS
  16330. +
  16331. +# A symbol stripping program.
  16332. +STRIP=$lt_STRIP
  16333. +
  16334. +# Commands used to install an old-style archive.
  16335. +RANLIB=$lt_RANLIB
  16336. +old_postinstall_cmds=$lt_old_postinstall_cmds
  16337. +old_postuninstall_cmds=$lt_old_postuninstall_cmds
  16338. +
  16339. +# Whether to use a lock for old archive extraction.
  16340. +lock_old_archive_extraction=$lock_old_archive_extraction
  16341. +
  16342. +# A C compiler.
  16343. +LTCC=$lt_CC
  16344. +
  16345. +# LTCC compiler flags.
  16346. +LTCFLAGS=$lt_CFLAGS
  16347. +
  16348. +# Take the output of nm and produce a listing of raw symbols and C names.
  16349. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
  16350. +
  16351. +# Transform the output of nm in a proper C declaration.
  16352. +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
  16353. +
  16354. +# Transform the output of nm in a C name address pair.
  16355. +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
  16356. +
  16357. +# Transform the output of nm in a C name address pair when lib prefix is needed.
  16358. +global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
  16359. +
  16360. +# The name of the directory that contains temporary libtool files.
  16361. +objdir=$objdir
  16362. +
  16363. +# Used to examine libraries when file_magic_cmd begins with "file".
  16364. +MAGIC_CMD=$MAGIC_CMD
  16365. +
  16366. +# Must we lock files when doing compilation?
  16367. +need_locks=$lt_need_locks
  16368. +
  16369. +# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
  16370. +DSYMUTIL=$lt_DSYMUTIL
  16371. +
  16372. +# Tool to change global to local symbols on Mac OS X.
  16373. +NMEDIT=$lt_NMEDIT
  16374. +
  16375. +# Tool to manipulate fat objects and archives on Mac OS X.
  16376. +LIPO=$lt_LIPO
  16377. +
  16378. +# ldd/readelf like tool for Mach-O binaries on Mac OS X.
  16379. +OTOOL=$lt_OTOOL
  16380. +
  16381. +# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
  16382. +OTOOL64=$lt_OTOOL64
  16383. +
  16384. +# Old archive suffix (normally "a").
  16385. +libext=$libext
  16386. +
  16387. +# Shared library suffix (normally ".so").
  16388. +shrext_cmds=$lt_shrext_cmds
  16389. +
  16390. +# The commands to extract the exported symbol list from a shared archive.
  16391. +extract_expsyms_cmds=$lt_extract_expsyms_cmds
  16392. +
  16393. +# Variables whose values should be saved in libtool wrapper scripts and
  16394. +# restored at link time.
  16395. +variables_saved_for_relink=$lt_variables_saved_for_relink
  16396. +
  16397. +# Do we need the "lib" prefix for modules?
  16398. +need_lib_prefix=$need_lib_prefix
  16399. +
  16400. +# Do we need a version for libraries?
  16401. +need_version=$need_version
  16402. +
  16403. +# Library versioning type.
  16404. +version_type=$version_type
  16405. +
  16406. +# Shared library runtime path variable.
  16407. +runpath_var=$runpath_var
  16408. +
  16409. +# Shared library path variable.
  16410. +shlibpath_var=$shlibpath_var
  16411. +
  16412. +# Is shlibpath searched before the hard-coded library search path?
  16413. +shlibpath_overrides_runpath=$shlibpath_overrides_runpath
  16414. +
  16415. +# Format of library name prefix.
  16416. +libname_spec=$lt_libname_spec
  16417. +
  16418. +# List of archive names. First name is the real one, the rest are links.
  16419. +# The last name is the one that the linker finds with -lNAME
  16420. +library_names_spec=$lt_library_names_spec
  16421. +
  16422. +# The coded name of the library, if different from the real name.
  16423. +soname_spec=$lt_soname_spec
  16424. +
  16425. +# Permission mode override for installation of shared libraries.
  16426. +install_override_mode=$lt_install_override_mode
  16427. +
  16428. +# Command to use after installation of a shared archive.
  16429. +postinstall_cmds=$lt_postinstall_cmds
  16430. +
  16431. +# Command to use after uninstallation of a shared archive.
  16432. +postuninstall_cmds=$lt_postuninstall_cmds
  16433. +
  16434. +# Commands used to finish a libtool library installation in a directory.
  16435. +finish_cmds=$lt_finish_cmds
  16436. +
  16437. +# As "finish_cmds", except a single script fragment to be evaled but
  16438. +# not shown.
  16439. +finish_eval=$lt_finish_eval
  16440. +
  16441. +# Whether we should hardcode library paths into libraries.
  16442. +hardcode_into_libs=$hardcode_into_libs
  16443. +
  16444. +# Compile-time system search path for libraries.
  16445. +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
  16446. +
  16447. +# Run-time system search path for libraries.
  16448. +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
  16449. +
  16450. +# Whether dlopen is supported.
  16451. +dlopen_support=$enable_dlopen
  16452. +
  16453. +# Whether dlopen of programs is supported.
  16454. +dlopen_self=$enable_dlopen_self
  16455. +
  16456. +# Whether dlopen of statically linked programs is supported.
  16457. +dlopen_self_static=$enable_dlopen_self_static
  16458. +
  16459. +# Commands to strip libraries.
  16460. +old_striplib=$lt_old_striplib
  16461. +striplib=$lt_striplib
  16462. +
  16463. +
  16464. +# The linker used to build libraries.
  16465. +LD=$lt_LD
  16466. +
  16467. +# How to create reloadable object files.
  16468. +reload_flag=$lt_reload_flag
  16469. +reload_cmds=$lt_reload_cmds
  16470. +
  16471. +# Commands used to build an old-style archive.
  16472. +old_archive_cmds=$lt_old_archive_cmds
  16473. +
  16474. +# A language specific compiler.
  16475. +CC=$lt_compiler
  16476. +
  16477. +# Is the compiler the GNU compiler?
  16478. +with_gcc=$GCC
  16479. +
  16480. +# Compiler flag to turn off builtin functions.
  16481. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
  16482. +
  16483. +# How to pass a linker flag through the compiler.
  16484. +wl=$lt_lt_prog_compiler_wl
  16485. +
  16486. +# Additional compiler flags for building library objects.
  16487. +pic_flag=$lt_lt_prog_compiler_pic
  16488. +
  16489. +# Compiler flag to prevent dynamic linking.
  16490. +link_static_flag=$lt_lt_prog_compiler_static
  16491. +
  16492. +# Does compiler simultaneously support -c and -o options?
  16493. +compiler_c_o=$lt_lt_cv_prog_compiler_c_o
  16494. +
  16495. +# Whether or not to add -lc for building shared libraries.
  16496. +build_libtool_need_lc=$archive_cmds_need_lc
  16497. +
  16498. +# Whether or not to disallow shared libs when runtime libs are static.
  16499. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
  16500. +
  16501. +# Compiler flag to allow reflexive dlopens.
  16502. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
  16503. +
  16504. +# Compiler flag to generate shared objects directly from archives.
  16505. +whole_archive_flag_spec=$lt_whole_archive_flag_spec
  16506. +
  16507. +# Whether the compiler copes with passing no objects directly.
  16508. +compiler_needs_object=$lt_compiler_needs_object
  16509. +
  16510. +# Create an old-style archive from a shared archive.
  16511. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
  16512. +
  16513. +# Create a temporary old-style archive to link instead of a shared archive.
  16514. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
  16515. +
  16516. +# Commands used to build a shared archive.
  16517. +archive_cmds=$lt_archive_cmds
  16518. +archive_expsym_cmds=$lt_archive_expsym_cmds
  16519. +
  16520. +# Commands used to build a loadable module if different from building
  16521. +# a shared archive.
  16522. +module_cmds=$lt_module_cmds
  16523. +module_expsym_cmds=$lt_module_expsym_cmds
  16524. +
  16525. +# Whether we are building with GNU ld or not.
  16526. +with_gnu_ld=$lt_with_gnu_ld
  16527. +
  16528. +# Flag that allows shared libraries with undefined symbols to be built.
  16529. +allow_undefined_flag=$lt_allow_undefined_flag
  16530. +
  16531. +# Flag that enforces no undefined symbols.
  16532. +no_undefined_flag=$lt_no_undefined_flag
  16533. +
  16534. +# Flag to hardcode \$libdir into a binary during linking.
  16535. +# This must work even if \$libdir does not exist
  16536. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
  16537. +
  16538. +# If ld is used when linking, flag to hardcode \$libdir into a binary
  16539. +# during linking. This must work even if \$libdir does not exist.
  16540. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
  16541. +
  16542. +# Whether we need a single "-rpath" flag with a separated argument.
  16543. +hardcode_libdir_separator=$lt_hardcode_libdir_separator
  16544. +
  16545. +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
  16546. +# DIR into the resulting binary.
  16547. +hardcode_direct=$hardcode_direct
  16548. +
  16549. +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
  16550. +# DIR into the resulting binary and the resulting library dependency is
  16551. +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
  16552. +# library is relocated.
  16553. +hardcode_direct_absolute=$hardcode_direct_absolute
  16554. +
  16555. +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
  16556. +# into the resulting binary.
  16557. +hardcode_minus_L=$hardcode_minus_L
  16558. +
  16559. +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
  16560. +# into the resulting binary.
  16561. +hardcode_shlibpath_var=$hardcode_shlibpath_var
  16562. +
  16563. +# Set to "yes" if building a shared library automatically hardcodes DIR
  16564. +# into the library and all subsequent libraries and executables linked
  16565. +# against it.
  16566. +hardcode_automatic=$hardcode_automatic
  16567. +
  16568. +# Set to yes if linker adds runtime paths of dependent libraries
  16569. +# to runtime path list.
  16570. +inherit_rpath=$inherit_rpath
  16571. +
  16572. +# Whether libtool must link a program against all its dependency libraries.
  16573. +link_all_deplibs=$link_all_deplibs
  16574. +
  16575. +# Fix the shell variable \$srcfile for the compiler.
  16576. +fix_srcfile_path=$lt_fix_srcfile_path
  16577. +
  16578. +# Set to "yes" if exported symbols are required.
  16579. +always_export_symbols=$always_export_symbols
  16580. +
  16581. +# The commands to list exported symbols.
  16582. +export_symbols_cmds=$lt_export_symbols_cmds
  16583. +
  16584. +# Symbols that should not be listed in the preloaded symbols.
  16585. +exclude_expsyms=$lt_exclude_expsyms
  16586. +
  16587. +# Symbols that must always be exported.
  16588. +include_expsyms=$lt_include_expsyms
  16589. +
  16590. +# Commands necessary for linking programs (against libraries) with templates.
  16591. +prelink_cmds=$lt_prelink_cmds
  16592. +
  16593. +# Specify filename containing input files.
  16594. +file_list_spec=$lt_file_list_spec
  16595. +
  16596. +# How to hardcode a shared library path into an executable.
  16597. +hardcode_action=$hardcode_action
  16598. +
  16599. +# ### END LIBTOOL CONFIG
  16600. +
  16601. +_LT_EOF
  16602. +
  16603. + case $host_os in
  16604. + aix3*)
  16605. + cat <<\_LT_EOF >> "$cfgfile"
  16606. +# AIX sometimes has problems with the GCC collect2 program. For some
  16607. +# reason, if we set the COLLECT_NAMES environment variable, the problems
  16608. +# vanish in a puff of smoke.
  16609. +if test "X${COLLECT_NAMES+set}" != Xset; then
  16610. + COLLECT_NAMES=
  16611. + export COLLECT_NAMES
  16612. +fi
  16613. +_LT_EOF
  16614. + ;;
  16615. + esac
  16616. +
  16617. +
  16618. +ltmain="$ac_aux_dir/ltmain.sh"
  16619. +
  16620. +
  16621. + # We use sed instead of cat because bash on DJGPP gets confused if
  16622. + # if finds mixed CR/LF and LF-only lines. Since sed operates in
  16623. + # text mode, it properly converts lines to CR/LF. This bash problem
  16624. + # is reportedly fixed, but why not run on old versions too?
  16625. + sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
  16626. + || (rm -f "$cfgfile"; exit 1)
  16627. +
  16628. + case $xsi_shell in
  16629. + yes)
  16630. + cat << \_LT_EOF >> "$cfgfile"
  16631. +
  16632. +# func_dirname file append nondir_replacement
  16633. +# Compute the dirname of FILE. If nonempty, add APPEND to the result,
  16634. +# otherwise set result to NONDIR_REPLACEMENT.
  16635. +func_dirname ()
  16636. +{
  16637. + case ${1} in
  16638. + */*) func_dirname_result="${1%/*}${2}" ;;
  16639. + * ) func_dirname_result="${3}" ;;
  16640. + esac
  16641. +}
  16642. +
  16643. +# func_basename file
  16644. +func_basename ()
  16645. +{
  16646. + func_basename_result="${1##*/}"
  16647. +}
  16648. +
  16649. +# func_dirname_and_basename file append nondir_replacement
  16650. +# perform func_basename and func_dirname in a single function
  16651. +# call:
  16652. +# dirname: Compute the dirname of FILE. If nonempty,
  16653. +# add APPEND to the result, otherwise set result
  16654. +# to NONDIR_REPLACEMENT.
  16655. +# value returned in "$func_dirname_result"
  16656. +# basename: Compute filename of FILE.
  16657. +# value retuned in "$func_basename_result"
  16658. +# Implementation must be kept synchronized with func_dirname
  16659. +# and func_basename. For efficiency, we do not delegate to
  16660. +# those functions but instead duplicate the functionality here.
  16661. +func_dirname_and_basename ()
  16662. +{
  16663. + case ${1} in
  16664. + */*) func_dirname_result="${1%/*}${2}" ;;
  16665. + * ) func_dirname_result="${3}" ;;
  16666. + esac
  16667. + func_basename_result="${1##*/}"
  16668. +}
  16669. +
  16670. +# func_stripname prefix suffix name
  16671. +# strip PREFIX and SUFFIX off of NAME.
  16672. +# PREFIX and SUFFIX must not contain globbing or regex special
  16673. +# characters, hashes, percent signs, but SUFFIX may contain a leading
  16674. +# dot (in which case that matches only a dot).
  16675. +func_stripname ()
  16676. +{
  16677. + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
  16678. + # positional parameters, so assign one to ordinary parameter first.
  16679. + func_stripname_result=${3}
  16680. + func_stripname_result=${func_stripname_result#"${1}"}
  16681. + func_stripname_result=${func_stripname_result%"${2}"}
  16682. +}
  16683. +
  16684. +# func_opt_split
  16685. +func_opt_split ()
  16686. +{
  16687. + func_opt_split_opt=${1%%=*}
  16688. + func_opt_split_arg=${1#*=}
  16689. +}
  16690. +
  16691. +# func_lo2o object
  16692. +func_lo2o ()
  16693. +{
  16694. + case ${1} in
  16695. + *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
  16696. + *) func_lo2o_result=${1} ;;
  16697. + esac
  16698. +}
  16699. +
  16700. +# func_xform libobj-or-source
  16701. +func_xform ()
  16702. +{
  16703. + func_xform_result=${1%.*}.lo
  16704. +}
  16705. +
  16706. +# func_arith arithmetic-term...
  16707. +func_arith ()
  16708. +{
  16709. + func_arith_result=$(( $* ))
  16710. +}
  16711. +
  16712. +# func_len string
  16713. +# STRING may not start with a hyphen.
  16714. +func_len ()
  16715. +{
  16716. + func_len_result=${#1}
  16717. +}
  16718. +
  16719. +_LT_EOF
  16720. + ;;
  16721. + *) # Bourne compatible functions.
  16722. + cat << \_LT_EOF >> "$cfgfile"
  16723. +
  16724. +# func_dirname file append nondir_replacement
  16725. +# Compute the dirname of FILE. If nonempty, add APPEND to the result,
  16726. +# otherwise set result to NONDIR_REPLACEMENT.
  16727. +func_dirname ()
  16728. +{
  16729. + # Extract subdirectory from the argument.
  16730. + func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
  16731. + if test "X$func_dirname_result" = "X${1}"; then
  16732. + func_dirname_result="${3}"
  16733. + else
  16734. + func_dirname_result="$func_dirname_result${2}"
  16735. + fi
  16736. +}
  16737. +
  16738. +# func_basename file
  16739. +func_basename ()
  16740. +{
  16741. + func_basename_result=`$ECHO "${1}" | $SED "$basename"`
  16742. +}
  16743. +
  16744. +
  16745. +# func_stripname prefix suffix name
  16746. +# strip PREFIX and SUFFIX off of NAME.
  16747. +# PREFIX and SUFFIX must not contain globbing or regex special
  16748. +# characters, hashes, percent signs, but SUFFIX may contain a leading
  16749. +# dot (in which case that matches only a dot).
  16750. +# func_strip_suffix prefix name
  16751. +func_stripname ()
  16752. +{
  16753. + case ${2} in
  16754. + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
  16755. + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
  16756. + esac
  16757. +}
  16758. +
  16759. +# sed scripts:
  16760. +my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
  16761. +my_sed_long_arg='1s/^-[^=]*=//'
  16762. +
  16763. +# func_opt_split
  16764. +func_opt_split ()
  16765. +{
  16766. + func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"`
  16767. + func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"`
  16768. +}
  16769. +
  16770. +# func_lo2o object
  16771. +func_lo2o ()
  16772. +{
  16773. + func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
  16774. +}
  16775. +
  16776. +# func_xform libobj-or-source
  16777. +func_xform ()
  16778. +{
  16779. + func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
  16780. +}
  16781. +
  16782. +# func_arith arithmetic-term...
  16783. +func_arith ()
  16784. +{
  16785. + func_arith_result=`expr "$@"`
  16786. +}
  16787. +
  16788. +# func_len string
  16789. +# STRING may not start with a hyphen.
  16790. +func_len ()
  16791. +{
  16792. + func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
  16793. +}
  16794. +
  16795. +_LT_EOF
  16796. +esac
  16797. +
  16798. +case $lt_shell_append in
  16799. + yes)
  16800. + cat << \_LT_EOF >> "$cfgfile"
  16801. +
  16802. +# func_append var value
  16803. +# Append VALUE to the end of shell variable VAR.
  16804. +func_append ()
  16805. +{
  16806. + eval "$1+=\$2"
  16807. +}
  16808. +_LT_EOF
  16809. + ;;
  16810. + *)
  16811. + cat << \_LT_EOF >> "$cfgfile"
  16812. +
  16813. +# func_append var value
  16814. +# Append VALUE to the end of shell variable VAR.
  16815. +func_append ()
  16816. +{
  16817. + eval "$1=\$$1\$2"
  16818. +}
  16819. +
  16820. +_LT_EOF
  16821. + ;;
  16822. + esac
  16823. +
  16824. +
  16825. + sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
  16826. + || (rm -f "$cfgfile"; exit 1)
  16827. +
  16828. + mv -f "$cfgfile" "$ofile" ||
  16829. + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
  16830. + chmod +x "$ofile"
  16831. +
  16832. + ;;
  16833. + "Makefile":C) echo "Merging Makefile.sim+Make-common.sim into Makefile ..."
  16834. + rm -f Makesim1.tmp Makesim2.tmp Makefile
  16835. + sed -n -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ p' <Make-common.sim >Makesim1.tmp
  16836. + sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >Makesim2.tmp
  16837. + sed -e '/^## COMMON_PRE_/ r Makesim1.tmp' \
  16838. + -e '/^## COMMON_POST_/ r Makesim2.tmp' \
  16839. + <Makefile.sim >Makefile
  16840. + rm -f Makefile.sim Make-common.sim Makesim1.tmp Makesim2.tmp
  16841. + ;;
  16842. + "stamp-h":C) echo > stamp-h ;;
  16843. +
  16844. + esac
  16845. +done # for ac_tag
  16846. +
  16847. +
  16848. +as_fn_exit 0
  16849. +_ACEOF
  16850. +ac_clean_files=$ac_clean_files_save
  16851. +
  16852. +test $ac_write_fail = 0 ||
  16853. + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
  16854. +
  16855. +
  16856. +# configure is writing to config.log, and then calls config.status.
  16857. +# config.status does its own redirection, appending to config.log.
  16858. +# Unfortunately, on DOS this fails, as config.log is still kept open
  16859. +# by configure, so config.status won't be able to write to it; its
  16860. +# output is simply discarded. So we exec the FD to /dev/null,
  16861. +# effectively closing config.log, so it can be properly (re)opened and
  16862. +# appended to by config.status. When coming back to configure, we
  16863. +# need to make the FD available again.
  16864. +if test "$no_create" != yes; then
  16865. + ac_cs_success=:
  16866. + ac_config_status_args=
  16867. + test "$silent" = yes &&
  16868. + ac_config_status_args="$ac_config_status_args --quiet"
  16869. + exec 5>/dev/null
  16870. + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
  16871. + exec 5>>config.log
  16872. + # Use ||, not &&, to avoid exiting from the if with $? = 1, which
  16873. + # would make configure fail if this is the last instruction.
  16874. + $ac_cs_success || as_fn_exit 1
  16875. +fi
  16876. +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
  16877. + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
  16878. +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
  16879. +fi
  16880. +
  16881. +
  16882. diff --git a/sim/riscv/configure.ac b/sim/riscv/configure.ac
  16883. new file mode 100644
  16884. index 0000000000..a53e54c19f
  16885. --- /dev/null
  16886. +++ b/sim/riscv/configure.ac
  16887. @@ -0,0 +1,30 @@
  16888. +dnl Process this file with autoconf to produce a configure script.
  16889. +AC_PREREQ(2.64)dnl
  16890. +AC_INIT(Makefile.in)
  16891. +sinclude(../common/acinclude.m4)
  16892. +
  16893. +SIM_AC_COMMON
  16894. +
  16895. +SIM_AC_OPTION_ENDIAN(LITTLE)
  16896. +SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT)
  16897. +SIM_AC_OPTION_ENVIRONMENT
  16898. +SIM_AC_OPTION_INLINE
  16899. +SIM_AC_OPTION_WARNINGS
  16900. +
  16901. +# Select the default model for the target.
  16902. +riscv_model=
  16903. +case "${target}" in
  16904. +riscv32*) riscv_model="RV32G" ;;
  16905. +riscv*) riscv_model="RV64G" ;;
  16906. +esac
  16907. +SIM_AC_OPTION_DEFAULT_MODEL(${riscv_model})
  16908. +
  16909. +# Select the bitsize of the target.
  16910. +riscv_addr_bitsize=
  16911. +case "${target}" in
  16912. +riscv32*) riscv_addr_bitsize=32 ;;
  16913. +riscv*) riscv_addr_bitsize=64 ;;
  16914. +esac
  16915. +SIM_AC_OPTION_BITSIZE($riscv_addr_bitsize)
  16916. +
  16917. +SIM_AC_OUTPUT
  16918. diff --git a/sim/riscv/interp.c b/sim/riscv/interp.c
  16919. new file mode 100644
  16920. index 0000000000..f28c841cfc
  16921. --- /dev/null
  16922. +++ b/sim/riscv/interp.c
  16923. @@ -0,0 +1,220 @@
  16924. +/* RISC-V simulator.
  16925. +
  16926. + Copyright (C) 2005-2015 Free Software Foundation, Inc.
  16927. + Contributed by Mike Frysinger.
  16928. +
  16929. + This file is part of simulators.
  16930. +
  16931. + This program is free software; you can redistribute it and/or modify
  16932. + it under the terms of the GNU General Public License as published by
  16933. + the Free Software Foundation; either version 3 of the License, or
  16934. + (at your option) any later version.
  16935. +
  16936. + This program is distributed in the hope that it will be useful,
  16937. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  16938. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16939. + GNU General Public License for more details.
  16940. +
  16941. + You should have received a copy of the GNU General Public License
  16942. + along with this program. If not, see <http://www.gnu.org/licenses/>. */
  16943. +
  16944. +/* This file contains the main glue logic between the sim core and the target
  16945. + specific simulator. Normally this file will be kept small and the target
  16946. + details will live in other files.
  16947. +
  16948. + For more specific details on these functions, see the gdb/remote-sim.h
  16949. + header file. */
  16950. +
  16951. +#include "config.h"
  16952. +
  16953. +#include "libiberty.h"
  16954. +#include "bfd.h"
  16955. +#include "elf-bfd.h"
  16956. +
  16957. +#include "sim-main.h"
  16958. +#include "sim-options.h"
  16959. +
  16960. +/* This function is the main loop. It should process ticks and decode+execute
  16961. + a single instruction.
  16962. +
  16963. + Usually you do not need to change things here. */
  16964. +
  16965. +void
  16966. +sim_engine_run (SIM_DESC sd,
  16967. + int next_cpu_nr, /* ignore */
  16968. + int nr_cpus, /* ignore */
  16969. + int siggnal) /* ignore */
  16970. +{
  16971. + SIM_CPU *cpu;
  16972. +
  16973. + SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER);
  16974. +
  16975. + cpu = STATE_CPU (sd, 0);
  16976. +
  16977. + while (1)
  16978. + {
  16979. + step_once (cpu);
  16980. + if (sim_events_tick (sd))
  16981. + sim_events_process (sd);
  16982. + }
  16983. +}
  16984. +
  16985. +/* Initialize the simulator from scratch. This is called once per lifetime of
  16986. + the simulation. Think of it as a processor reset.
  16987. +
  16988. + Usually all cpu-specific setup is handled in the initialize_cpu callback.
  16989. + If you want to do cpu-independent stuff, then it should go at the end (see
  16990. + where memory is initialized). */
  16991. +
  16992. +static void
  16993. +free_state (SIM_DESC sd)
  16994. +{
  16995. + if (STATE_MODULES (sd) != NULL)
  16996. + sim_module_uninstall (sd);
  16997. + sim_cpu_free_all (sd);
  16998. + sim_state_free (sd);
  16999. +}
  17000. +
  17001. +SIM_DESC
  17002. +sim_open (SIM_OPEN_KIND kind, host_callback *callback,
  17003. + struct bfd *abfd, char * const *argv)
  17004. +{
  17005. + char c;
  17006. + int i;
  17007. + SIM_DESC sd = sim_state_alloc (kind, callback);
  17008. +
  17009. + /* The cpu data is kept in a separately allocated chunk of memory. */
  17010. + if (sim_cpu_alloc_all (sd, 1, /*cgen_cpu_max_extra_bytes ()*/0) != SIM_RC_OK)
  17011. + {
  17012. + free_state (sd);
  17013. + return 0;
  17014. + }
  17015. +
  17016. + if (sim_pre_argv_init (sd, argv[0]) != SIM_RC_OK)
  17017. + {
  17018. + free_state (sd);
  17019. + return 0;
  17020. + }
  17021. +
  17022. + /* XXX: Default to the Virtual environment. */
  17023. + if (STATE_ENVIRONMENT (sd) == ALL_ENVIRONMENT)
  17024. + STATE_ENVIRONMENT (sd) = VIRTUAL_ENVIRONMENT;
  17025. +
  17026. + /* getopt will print the error message so we just have to exit if this fails.
  17027. + FIXME: Hmmm... in the case of gdb we need getopt to call
  17028. + print_filtered. */
  17029. + if (sim_parse_args (sd, argv) != SIM_RC_OK)
  17030. + {
  17031. + free_state (sd);
  17032. + return 0;
  17033. + }
  17034. +
  17035. + /* Check for/establish the a reference program image. */
  17036. + if (sim_analyze_program (sd,
  17037. + (STATE_PROG_ARGV (sd) != NULL
  17038. + ? *STATE_PROG_ARGV (sd)
  17039. + : NULL), abfd) != SIM_RC_OK)
  17040. + {
  17041. + free_state (sd);
  17042. + return 0;
  17043. + }
  17044. +
  17045. + /* Establish any remaining configuration options. */
  17046. + if (sim_config (sd) != SIM_RC_OK)
  17047. + {
  17048. + free_state (sd);
  17049. + return 0;
  17050. + }
  17051. +
  17052. + if (sim_post_argv_init (sd) != SIM_RC_OK)
  17053. + {
  17054. + free_state (sd);
  17055. + return 0;
  17056. + }
  17057. +
  17058. + /* CPU specific initialization. */
  17059. + for (i = 0; i < MAX_NR_PROCESSORS; ++i)
  17060. + {
  17061. + SIM_CPU *cpu = STATE_CPU (sd, i);
  17062. +
  17063. + initialize_cpu (sd, cpu, i);
  17064. + }
  17065. +
  17066. + /* Allocate external memory if none specified by user.
  17067. + Use address 4 here in case the user wanted address 0 unmapped. */
  17068. + if (sim_core_read_buffer (sd, NULL, read_map, &c, 4, 1) == 0)
  17069. + sim_do_commandf (sd, "memory-size %#x", DEFAULT_MEM_SIZE);
  17070. +
  17071. + return sd;
  17072. +}
  17073. +
  17074. +static bfd_vma
  17075. +riscv_get_symbol (SIM_DESC sd, const char *sym)
  17076. +{
  17077. + long symcount = STATE_PROG_SYMS_COUNT (sd);
  17078. + asymbol **symtab = STATE_PROG_SYMS (sd);
  17079. + int i;
  17080. +
  17081. + for (i = 0;i < symcount; ++i)
  17082. + {
  17083. + if (strcmp (sym, bfd_asymbol_name (symtab[i])) == 0)
  17084. + {
  17085. + bfd_vma sa;
  17086. + sa = bfd_asymbol_value (symtab[i]);
  17087. + return sa;
  17088. + }
  17089. + }
  17090. +
  17091. + /* Symbol not found. */
  17092. + return 0;
  17093. +}
  17094. +
  17095. +/* Prepare to run a program that has already been loaded into memory.
  17096. +
  17097. + Usually you do not need to change things here. */
  17098. +
  17099. +SIM_RC
  17100. +sim_create_inferior (SIM_DESC sd, struct bfd *abfd,
  17101. + char * const *argv, char * const *env)
  17102. +{
  17103. + SIM_CPU *cpu = STATE_CPU (sd, 0);
  17104. + sim_cia addr;
  17105. + Elf_Internal_Phdr *phdr;
  17106. + int i, phnum;
  17107. +
  17108. + /* Set the PC. */
  17109. + if (abfd != NULL)
  17110. + addr = bfd_get_start_address (abfd);
  17111. + else
  17112. + addr = 0;
  17113. + sim_pc_set (cpu, addr);
  17114. + phdr = elf_tdata (abfd)->phdr;
  17115. + phnum = elf_elfheader (abfd)->e_phnum;
  17116. +
  17117. + /* Try to find _end symbol, and set it to the end of brk. */
  17118. + trace_load_symbols (sd);
  17119. + cpu->endbrk = riscv_get_symbol (sd, "_end");
  17120. +
  17121. + /* If not found, set end of brk to end of all section. */
  17122. + if (cpu->endbrk == 0)
  17123. + {
  17124. + for (i = 0; i < phnum; i++)
  17125. + {
  17126. + if (phdr[i].p_paddr + phdr[i].p_memsz > cpu->endbrk)
  17127. + cpu->endbrk = phdr[i].p_paddr + phdr[i].p_memsz;
  17128. + }
  17129. + }
  17130. +
  17131. + /* Standalone mode (i.e. `run`) will take care of the argv for us in
  17132. + sim_open() -> sim_parse_args(). But in debug mode (i.e. 'target sim'
  17133. + with `gdb`), we need to handle it. */
  17134. + if (STATE_OPEN_KIND (sd) == SIM_OPEN_DEBUG)
  17135. + {
  17136. + freeargv (STATE_PROG_ARGV (sd));
  17137. + STATE_PROG_ARGV (sd) = dupargv (argv);
  17138. + }
  17139. +
  17140. + initialize_env (sd, (void *)argv, (void *)env);
  17141. +
  17142. + return SIM_RC_OK;
  17143. +}
  17144. diff --git a/sim/riscv/machs.c b/sim/riscv/machs.c
  17145. new file mode 100644
  17146. index 0000000000..78ed28d1f0
  17147. --- /dev/null
  17148. +++ b/sim/riscv/machs.c
  17149. @@ -0,0 +1,125 @@
  17150. +/* RISC-V simulator.
  17151. +
  17152. + Copyright (C) 2005-2015 Free Software Foundation, Inc.
  17153. + Contributed by Mike Frysinger.
  17154. +
  17155. + This file is part of simulators.
  17156. +
  17157. + This program is free software; you can redistribute it and/or modify
  17158. + it under the terms of the GNU General Public License as published by
  17159. + the Free Software Foundation; either version 3 of the License, or
  17160. + (at your option) any later version.
  17161. +
  17162. + This program is distributed in the hope that it will be useful,
  17163. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  17164. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17165. + GNU General Public License for more details.
  17166. +
  17167. + You should have received a copy of the GNU General Public License
  17168. + along with this program. If not, see <http://www.gnu.org/licenses/>. */
  17169. +
  17170. +#include "config.h"
  17171. +
  17172. +#include "sim-main.h"
  17173. +
  17174. +static void
  17175. +riscv_model_init (SIM_CPU *cpu)
  17176. +{
  17177. +}
  17178. +
  17179. +static void
  17180. +riscv_init_cpu (SIM_CPU *cpu)
  17181. +{
  17182. +}
  17183. +
  17184. +static void
  17185. +riscv_prepare_run (SIM_CPU *cpu)
  17186. +{
  17187. +}
  17188. +
  17189. +static const SIM_MACH_IMP_PROPERTIES riscv_imp_properties =
  17190. +{
  17191. + sizeof (SIM_CPU),
  17192. + 0,
  17193. +};
  17194. +
  17195. +#if WITH_TARGET_WORD_BITSIZE >= 32
  17196. +
  17197. +static const SIM_MACH rv32i_mach;
  17198. +
  17199. +static const SIM_MODEL rv32_models[] =
  17200. +{
  17201. +#define M(ext) { "RV32"#ext, &rv32i_mach, MODEL_RV32##ext, NULL, riscv_model_init },
  17202. +#include "model_list.def"
  17203. +#undef M
  17204. + { 0, NULL, 0, NULL, NULL, }
  17205. +};
  17206. +
  17207. +static const SIM_MACH rv32i_mach =
  17208. +{
  17209. + "rv32i", "riscv:rv32", MACH_RV32I,
  17210. + 32, 32, &rv32_models[0], &riscv_imp_properties,
  17211. + riscv_init_cpu,
  17212. + riscv_prepare_run
  17213. +};
  17214. +
  17215. +#endif
  17216. +
  17217. +#if WITH_TARGET_WORD_BITSIZE >= 64
  17218. +
  17219. +static const SIM_MACH rv64i_mach;
  17220. +
  17221. +static const SIM_MODEL rv64_models[] =
  17222. +{
  17223. +#define M(ext) { "RV64"#ext, &rv64i_mach, MODEL_RV64##ext, NULL, riscv_model_init },
  17224. +#include "model_list.def"
  17225. +#undef M
  17226. + { 0, NULL, 0, NULL, NULL, }
  17227. +};
  17228. +
  17229. +static const SIM_MACH rv64i_mach =
  17230. +{
  17231. + "rv64i", "riscv:rv64", MACH_RV64I,
  17232. + 64, 64, &rv64_models[0], &riscv_imp_properties,
  17233. + riscv_init_cpu,
  17234. + riscv_prepare_run
  17235. +};
  17236. +
  17237. +#endif
  17238. +
  17239. +#if WITH_TARGET_WORD_BITSIZE >= 128
  17240. +
  17241. +static const SIM_MACH rv128i_mach;
  17242. +
  17243. +static const SIM_MODEL rv128_models[] =
  17244. +{
  17245. +#define M(ext) { "RV128"#ext, &rv128i_mach, MODEL_RV128##ext, NULL, riscv_model_init },
  17246. +#include "model_list.def"
  17247. +#undef M
  17248. + { 0, NULL, 0, NULL, NULL, }
  17249. +};
  17250. +
  17251. +static const SIM_MACH rv128i_mach =
  17252. +{
  17253. + "rv128i", "riscv:rv128", MACH_RV128I,
  17254. + 128, 128, &rv128_models[0], &riscv_imp_properties,
  17255. + riscv_init_cpu,
  17256. + riscv_prepare_run
  17257. +};
  17258. +
  17259. +#endif
  17260. +
  17261. +/* Order matters here. */
  17262. +const SIM_MACH *sim_machs[] =
  17263. +{
  17264. +#if WITH_TARGET_WORD_BITSIZE >= 128
  17265. + &rv128i_mach,
  17266. +#endif
  17267. +#if WITH_TARGET_WORD_BITSIZE >= 64
  17268. + &rv64i_mach,
  17269. +#endif
  17270. +#if WITH_TARGET_WORD_BITSIZE >= 32
  17271. + &rv32i_mach,
  17272. +#endif
  17273. + NULL
  17274. +};
  17275. diff --git a/sim/riscv/machs.h b/sim/riscv/machs.h
  17276. new file mode 100644
  17277. index 0000000000..6c8cd43e93
  17278. --- /dev/null
  17279. +++ b/sim/riscv/machs.h
  17280. @@ -0,0 +1,45 @@
  17281. +/* RISC-V simulator.
  17282. +
  17283. + Copyright (C) 2005-2014 Free Software Foundation, Inc.
  17284. + Contributed by Mike Frysinger.
  17285. +
  17286. + This file is part of simulators.
  17287. +
  17288. + This program is free software; you can redistribute it and/or modify
  17289. + it under the terms of the GNU General Public License as published by
  17290. + the Free Software Foundation; either version 3 of the License, or
  17291. + (at your option) any later version.
  17292. +
  17293. + This program is distributed in the hope that it will be useful,
  17294. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  17295. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17296. + GNU General Public License for more details.
  17297. +
  17298. + You should have received a copy of the GNU General Public License
  17299. + along with this program. If not, see <http://www.gnu.org/licenses/>. */
  17300. +
  17301. +#ifndef RISCV_SIM_MACHS_H
  17302. +#define RISCV_SIM_MACHS_H
  17303. +
  17304. +typedef enum model_type {
  17305. +#define M(ext) MODEL_RV32##ext,
  17306. +#include "model_list.def"
  17307. +#undef M
  17308. +#define M(ext) MODEL_RV64##ext,
  17309. +#include "model_list.def"
  17310. +#undef M
  17311. +#define M(ext) MODEL_RV128##ext,
  17312. +#include "model_list.def"
  17313. +#undef M
  17314. + MODEL_MAX
  17315. +} MODEL_TYPE;
  17316. +
  17317. +typedef enum mach_attr {
  17318. + MACH_BASE,
  17319. + MACH_RV32I,
  17320. + MACH_RV64I,
  17321. + MACH_RV128I,
  17322. + MACH_MAX
  17323. +} MACH_ATTR;
  17324. +
  17325. +#endif
  17326. diff --git a/sim/riscv/model_list.def b/sim/riscv/model_list.def
  17327. new file mode 100644
  17328. index 0000000000..5efd85ab28
  17329. --- /dev/null
  17330. +++ b/sim/riscv/model_list.def
  17331. @@ -0,0 +1,9 @@
  17332. +M(G)
  17333. +M(I)
  17334. +M(IM)
  17335. +M(IMA)
  17336. +M(IA)
  17337. +M(E)
  17338. +M(EM)
  17339. +M(EMA)
  17340. +M(EA)
  17341. diff --git a/sim/riscv/sim-main.c b/sim/riscv/sim-main.c
  17342. new file mode 100644
  17343. index 0000000000..d773a35cb5
  17344. --- /dev/null
  17345. +++ b/sim/riscv/sim-main.c
  17346. @@ -0,0 +1,2468 @@
  17347. +/* RISC-V simulator.
  17348. +
  17349. + Copyright (C) 2005-2014 Free Software Foundation, Inc.
  17350. + Contributed by Mike Frysinger.
  17351. +
  17352. + This file is part of simulators.
  17353. +
  17354. + This program is free software; you can redistribute it and/or modify
  17355. + it under the terms of the GNU General Public License as published by
  17356. + the Free Software Foundation; either version 3 of the License, or
  17357. + (at your option) any later version.
  17358. +
  17359. + This program is distributed in the hope that it will be useful,
  17360. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  17361. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17362. + GNU General Public License for more details.
  17363. +
  17364. + You should have received a copy of the GNU General Public License
  17365. + along with this program. If not, see <http://www.gnu.org/licenses/>. */
  17366. +
  17367. +/* This file contains the main simulator decoding logic. i.e. everything that
  17368. + is architecture specific. */
  17369. +
  17370. +#include "config.h"
  17371. +
  17372. +#include <inttypes.h>
  17373. +#include <time.h>
  17374. +#include <ctype.h>
  17375. +#include <unistd.h>
  17376. +#include <sys/time.h>
  17377. +
  17378. +#include "sim-main.h"
  17379. +#include "sim-fpu.h"
  17380. +#include "sim-syscall.h"
  17381. +
  17382. +#include "opcode/riscv.h"
  17383. +
  17384. +#include "gdb/sim-riscv.h"
  17385. +
  17386. +#include "targ-vals.h"
  17387. +
  17388. +
  17389. +#define TRACE_REG(cpu, reg) TRACE_REGISTER (cpu, "wrote %s = %#" PRIxTW, riscv_gpr_names_abi[reg], cpu->regs[reg])
  17390. +
  17391. +static const struct riscv_opcode *riscv_hash[OP_MASK_OP + 1];
  17392. +#define OP_HASH_IDX(i) ((i) & (riscv_insn_length (i) == 2 ? 0x3 : 0x7f))
  17393. +
  17394. +#define RISCV_ASSERT_RV32(cpu, fmt, args...) \
  17395. + do { \
  17396. + if (RISCV_XLEN (cpu) != 32) \
  17397. + { \
  17398. + SIM_DESC sd = CPU_STATE (cpu); \
  17399. + TRACE_INSN (cpu, "RV32I-only " fmt, ## args); \
  17400. + sim_engine_halt (sd, cpu, NULL, cpu->pc, sim_signalled, SIM_SIGILL); \
  17401. + } \
  17402. + } while (0)
  17403. +
  17404. +#define RISCV_ASSERT_RV64(cpu, fmt, args...) \
  17405. + do { \
  17406. + if (RISCV_XLEN (cpu) != 64) \
  17407. + { \
  17408. + SIM_DESC sd = CPU_STATE (cpu); \
  17409. + TRACE_INSN (cpu, "RV64I-only " fmt, ## args); \
  17410. + sim_engine_halt (sd, cpu, NULL, cpu->pc, sim_signalled, SIM_SIGILL); \
  17411. + } \
  17412. + } while (0)
  17413. +
  17414. +static INLINE void
  17415. +store_rd (SIM_CPU *cpu, int rd, unsigned_word val)
  17416. +{
  17417. + if (rd)
  17418. + {
  17419. + cpu->regs[rd] = val;
  17420. + TRACE_REG (cpu, rd);
  17421. + }
  17422. +}
  17423. +
  17424. +static INLINE void
  17425. +store_frd (SIM_CPU *cpu, int rd, unsigned_word val)
  17426. +{
  17427. + cpu->fpregs[rd].w[0] = val;
  17428. +}
  17429. +
  17430. +static inline void
  17431. +store_frd64 (SIM_CPU *cpu, int rd, uint64_t val)
  17432. +{
  17433. + cpu->fpregs[rd].v[0] = val;
  17434. +}
  17435. +
  17436. +static INLINE unsigned_word
  17437. +fetch_csr (SIM_CPU *cpu, const char *name, int csr, unsigned_word *reg)
  17438. +{
  17439. + /* Handle pseudo registers. */
  17440. + switch (csr)
  17441. + {
  17442. + /* Allow certain registers only in respective modes. */
  17443. + case CSR_CYCLEH:
  17444. + case CSR_INSTRETH:
  17445. + case CSR_TIMEH:
  17446. + RISCV_ASSERT_RV32 (cpu, "CSR: %s", name);
  17447. + break;
  17448. + }
  17449. +
  17450. + return *reg;
  17451. +}
  17452. +
  17453. +static INLINE void
  17454. +store_csr (SIM_CPU *cpu, const char *name, int csr, unsigned_word *reg,
  17455. + unsigned_word val)
  17456. +{
  17457. + switch (csr)
  17458. + {
  17459. + /* These are pseudo registers that modify sub-fields of fcsr. */
  17460. + case CSR_FRM:
  17461. + val &= 0x7;
  17462. + *reg = val;
  17463. + cpu->csr.fcsr = (cpu->csr.fcsr & ~0xe0) | (val << 5);
  17464. + break;
  17465. + case CSR_FFLAGS:
  17466. + val &= 0x1f;
  17467. + *reg = val;
  17468. + cpu->csr.fcsr = (cpu->csr.fcsr & ~0x1f) | val;
  17469. + break;
  17470. + /* Keep the sub-fields in sync. */
  17471. + case CSR_FCSR:
  17472. + *reg = val;
  17473. + cpu->csr.frm = (val >> 5) & 0x7;
  17474. + cpu->csr.fflags = val & 0x1f;
  17475. + break;
  17476. +
  17477. + /* Allow certain registers only in respective modes. */
  17478. + case CSR_CYCLEH:
  17479. + case CSR_INSTRETH:
  17480. + case CSR_TIMEH:
  17481. + RISCV_ASSERT_RV32 (cpu, "CSR: %s", name);
  17482. +
  17483. + /* All the rest are immutable. */
  17484. + default:
  17485. + val = *reg;
  17486. + break;
  17487. + }
  17488. +
  17489. + TRACE_REGISTER (cpu, "wrote CSR %s = %#" PRIxTW, name, val);
  17490. +}
  17491. +
  17492. +static inline unsigned_word
  17493. +ashiftrt (unsigned_word val, unsigned_word shift)
  17494. +{
  17495. + unsigned32 sign = (val & 0x80000000) ? ~(0xfffffffful >> shift) : 0;
  17496. + return (val >> shift) | sign;
  17497. +}
  17498. +
  17499. +static inline unsigned_word
  17500. +ashiftrt64 (unsigned_word val, unsigned_word shift)
  17501. +{
  17502. + unsigned64 sign = (val & 0x8000000000000000ull) ? ~(0xffffffffffffffffull >> shift) : 0;
  17503. + return (val >> shift) | sign;
  17504. +}
  17505. +
  17506. +static sim_cia
  17507. +execute_d (SIM_CPU *cpu, unsigned_word iw, const struct riscv_opcode *op)
  17508. +{
  17509. + SIM_DESC sd = CPU_STATE (cpu);
  17510. + unsigned int mask_arithmetic = MASK_FADD_D;
  17511. + unsigned int mask_mul_add = MASK_FMADD_S;
  17512. + unsigned int mask_convert = MASK_FCVT_S_W;
  17513. +
  17514. + static const int round_modes[] =
  17515. + {
  17516. + sim_fpu_round_near, sim_fpu_round_zero,
  17517. + sim_fpu_round_down, sim_fpu_round_up,
  17518. + sim_fpu_round_default, sim_fpu_round_default,
  17519. + sim_fpu_round_default
  17520. + };
  17521. +
  17522. + int rd = (iw >> OP_SH_RD) & OP_MASK_RD;
  17523. + int rs1 = (iw >> OP_SH_RS1) & OP_MASK_RS1;
  17524. + int rs2 = (iw >> OP_SH_RS2) & OP_MASK_RS2;
  17525. + int rs3 = (iw >> OP_SH_RS3) & OP_MASK_RS3;
  17526. + const char *frd_name = riscv_fpr_names_abi[rd];
  17527. + const char *frs1_name = riscv_fpr_names_abi[rs1];
  17528. + const char *frs2_name = riscv_fpr_names_abi[rs2];
  17529. + const char *frs3_name = riscv_fpr_names_abi[rs3];
  17530. + const char *rd_name = riscv_gpr_names_abi[rd];
  17531. + const char *rs1_name = riscv_gpr_names_abi[rs1];
  17532. + unsigned_word i_imm = EXTRACT_ITYPE_IMM (iw);
  17533. + unsigned_word s_imm = EXTRACT_STYPE_IMM (iw);
  17534. + uint32_t u32;
  17535. + int32_t i32;
  17536. + uint64_t u64;
  17537. + int64_t i64;
  17538. + sim_cia pc = cpu->pc + 4;
  17539. +
  17540. + /* Rounding mode. */
  17541. + int rm = (iw >> OP_SH_RM) & OP_MASK_RM;
  17542. + int rounding = round_modes[rm];
  17543. +
  17544. + sim_fpu sft, sft2;
  17545. + sim_fpu sfa, sfb, sfc;
  17546. + sim_fpu_64to (&sfa, cpu->fpregs[rs1].v[0]);
  17547. + sim_fpu_64to (&sfb, cpu->fpregs[rs2].v[0]);
  17548. +
  17549. + switch (op->match & mask_mul_add)
  17550. + {
  17551. + case MATCH_FMADD_D:
  17552. + TRACE_INSN (cpu, "fmadd.d %s, %s, %s, %s",
  17553. + frd_name, frs1_name, frs2_name, frs3_name);
  17554. + sim_fpu_64to (&sfc, cpu->fpregs[rs3].v[0]);
  17555. + sim_fpu_mul (&sft2, &sfa, &sfb);
  17556. + sim_fpu_add (&sft, &sfc, &sft2);
  17557. + sim_fpu_round_64 (&sft, rounding, sim_fpu_denorm_default);
  17558. + sim_fpu_to64 (&cpu->fpregs[rd].v[0], &sft);
  17559. + goto done;
  17560. + case MATCH_FMSUB_D:
  17561. + TRACE_INSN (cpu, "fmsub.d %s, %s, %s, %s",
  17562. + frd_name, frs1_name, frs2_name, frs3_name);
  17563. + sim_fpu_64to (&sfc, cpu->fpregs[rs3].v[0]);
  17564. + sim_fpu_mul (&sft2, &sfa, &sfb);
  17565. + sim_fpu_sub (&sft, &sft2, &sfc);
  17566. + sim_fpu_round_64 (&sft, rounding, sim_fpu_denorm_default);
  17567. + sim_fpu_to64 (&cpu->fpregs[rd].v[0], &sft);
  17568. + goto done;
  17569. + case MATCH_FNMADD_D:
  17570. + TRACE_INSN (cpu, "fnmadd.d %s, %s, %s, %s",
  17571. + frd_name, frs1_name, frs2_name, frs3_name);
  17572. + sim_fpu_64to (&sfc, cpu->fpregs[rs3].v[0]);
  17573. + sim_fpu_mul (&sft2, &sfa, &sfb);
  17574. + sim_fpu_add (&sft, &sfc, &sft2);
  17575. + sim_fpu_neg (&sft, &sft);
  17576. + sim_fpu_round_64 (&sft, rounding, sim_fpu_denorm_default);
  17577. + sim_fpu_to64 (&cpu->fpregs[rd].v[0], &sft);
  17578. + goto done;
  17579. + case MATCH_FNMSUB_D:
  17580. + TRACE_INSN (cpu, "fnmsub.d %s, %s, %s, %s",
  17581. + frd_name, frs1_name, frs2_name, frs3_name);
  17582. + sim_fpu_64to (&sfc, cpu->fpregs[rs3].v[0]);
  17583. + sim_fpu_mul (&sft2, &sfa, &sfb);
  17584. + sim_fpu_sub (&sft, &sft2, &sfc);
  17585. + sim_fpu_neg (&sft, &sft);
  17586. + sim_fpu_round_64 (&sft, rounding, sim_fpu_denorm_default);
  17587. + sim_fpu_to64 (&cpu->fpregs[rd].v[0], &sft);
  17588. + goto done;
  17589. + }
  17590. +
  17591. + switch (op->match & mask_arithmetic)
  17592. + {
  17593. + case MATCH_FADD_D:
  17594. + TRACE_INSN (cpu, "fadd.d %s, %s, %s",
  17595. + frd_name, frs1_name, frs2_name);
  17596. + sim_fpu_add (&sft, &sfa, &sfb);
  17597. + sim_fpu_round_64 (&sft, rounding, sim_fpu_denorm_default);
  17598. + sim_fpu_to64 (&cpu->fpregs[rd].v[0], &sft);
  17599. + goto done;
  17600. + case MATCH_FSUB_D:
  17601. + TRACE_INSN (cpu, "fsub.d %s, %s, %s",
  17602. + frd_name, frs1_name, frs2_name);
  17603. + sim_fpu_sub (&sft, &sfa, &sfb);
  17604. + sim_fpu_round_64 (&sft, rounding, sim_fpu_denorm_default);
  17605. + sim_fpu_to64 (&cpu->fpregs[rd].v[0], &sft);
  17606. + goto done;
  17607. + case MATCH_FMUL_D:
  17608. + TRACE_INSN (cpu, "fmul.d %s, %s, %s",
  17609. + frd_name, frs1_name, frs2_name);
  17610. + sim_fpu_mul (&sft, &sfa, &sfb);
  17611. + sim_fpu_round_64 (&sft, rounding, sim_fpu_denorm_default);
  17612. + sim_fpu_to64 (&cpu->fpregs[rd].v[0], &sft);
  17613. + goto done;
  17614. + case MATCH_FDIV_D:
  17615. + TRACE_INSN (cpu, "fdiv.d %s, %s, %s",
  17616. + frd_name, frs1_name, frs2_name);
  17617. + sim_fpu_div (&sft, &sfa, &sfb);
  17618. + sim_fpu_round_64 (&sft, rounding, sim_fpu_denorm_default);
  17619. + sim_fpu_to64 (&cpu->fpregs[rd].v[0], &sft);
  17620. + goto done;
  17621. + case MATCH_FSQRT_D:
  17622. + TRACE_INSN (cpu, "fsqrt.d %s, %s",
  17623. + frd_name, frs1_name);
  17624. + sim_fpu_sqrt (&sft, &sfa);
  17625. + sim_fpu_round_64 (&sft, rounding, sim_fpu_denorm_default);
  17626. + sim_fpu_to64 (&cpu->fpregs[rd].v[0], &sft);
  17627. + goto done;
  17628. + }
  17629. +
  17630. + switch (op->match & mask_convert)
  17631. + {
  17632. + case MATCH_FCVT_W_D:
  17633. + TRACE_INSN (cpu, "fcvt.w.d %s, %s",
  17634. + rd_name, frs1_name);
  17635. + sim_fpu_to32i (&i32, &sfa, rounding);
  17636. + cpu->regs[rd] = i32;
  17637. + goto done;
  17638. + case MATCH_FCVT_WU_D:
  17639. + TRACE_INSN (cpu, "fcvt.wu.d %s, %s",
  17640. + rd_name, frs1_name);
  17641. + sim_fpu_to32u (&u32, &sfa, rounding);
  17642. + i32 = u32;
  17643. + cpu->regs[rd] = i32;
  17644. + goto done;
  17645. + case MATCH_FCVT_D_W:
  17646. + TRACE_INSN (cpu, "fcvt.d.w %s, %s",
  17647. + frd_name, rs1_name);
  17648. + sim_fpu_i32to (&sft, cpu->regs[rs1], rounding);
  17649. + sim_fpu_to64 ((unsigned64 *) (cpu->fpregs + rd), &sft);
  17650. + goto done;
  17651. + case MATCH_FCVT_D_WU:
  17652. + TRACE_INSN (cpu, "fcvt.d.wu %s, %s",
  17653. + frd_name, rs1_name);
  17654. + sim_fpu_u32to (&sft, cpu->regs[rs1], rounding);
  17655. + sim_fpu_to64 ((unsigned64 *) (cpu->fpregs + rd), &sft);
  17656. + goto done;
  17657. + case MATCH_FCVT_S_D:
  17658. + TRACE_INSN (cpu, "fcvt.s.d %s, %s",
  17659. + frd_name, frs1_name);
  17660. + sft = sfa;
  17661. + sim_fpu_round_32 (&sft, sim_fpu_round_near, sim_fpu_denorm_default);
  17662. + sim_fpu_to32 ((unsigned32 *) (cpu -> fpregs + rd), &sft);
  17663. + goto done;
  17664. + case MATCH_FCVT_D_S:
  17665. + TRACE_INSN (cpu, "fcvt.d.s %s, %s",
  17666. + frd_name, frs1_name);
  17667. + sim_fpu_32to (&sft, cpu->fpregs[rs1].w[0]);
  17668. + sim_fpu_to64 (&cpu->fpregs[rd].v[0], &sft);
  17669. + goto done;
  17670. + case MATCH_FCVT_L_D:
  17671. + TRACE_INSN (cpu, "fcvt.l.d %s, %s",
  17672. + rd_name, frs1_name);
  17673. + cpu->regs[rd] = (int64_t) cpu->fpregs[rs1].D[0];
  17674. + goto done;
  17675. + case MATCH_FCVT_LU_D:
  17676. + TRACE_INSN (cpu, "fcvt.lu.d %s, %s",
  17677. + rd_name, frs1_name);
  17678. + cpu->regs[rd] = (uint64_t) cpu->fpregs[rs1].D[0];
  17679. + goto done;
  17680. + case MATCH_FCVT_D_L:
  17681. + TRACE_INSN (cpu, "fcvt.d.l %s, %s",
  17682. + frd_name, rs1_name);
  17683. + cpu->fpregs[rd].D[0] = (double) ((int64_t) cpu->regs[rs1]);
  17684. + goto done;
  17685. + case MATCH_FCVT_D_LU:
  17686. + TRACE_INSN (cpu, "fcvt.d.lu %s, %s",
  17687. + frd_name, rs1_name);
  17688. + cpu->fpregs[rd].D[0] = (double) cpu->regs[rs1];
  17689. + goto done;
  17690. + }
  17691. +
  17692. + switch (op->match)
  17693. + {
  17694. + case MATCH_FLD:
  17695. + TRACE_INSN (cpu, "fld %s, %" PRIiTW "(%s)",
  17696. + frd_name, i_imm, rs1_name);
  17697. + store_frd64 (cpu, rd,
  17698. + sim_core_read_unaligned_8 (cpu, cpu->pc, read_map,
  17699. + cpu->regs[rs1] + i_imm));
  17700. + break;
  17701. + case MATCH_FSD:
  17702. + TRACE_INSN (cpu, "fsd %s, %" PRIiTW "(%s)",
  17703. + frs2_name, s_imm, rs1_name);
  17704. + sim_core_write_unaligned_8 (cpu, cpu->pc, write_map,
  17705. + cpu->regs[rs1] + s_imm,
  17706. + cpu->fpregs[rs2].v[0]);
  17707. + break;
  17708. + case MATCH_FSGNJ_D:
  17709. + TRACE_INSN (cpu, "fsgnj.d %s, %s, %s",
  17710. + frd_name, frs1_name, frs2_name);
  17711. + u32 = cpu->fpregs[rs1].w[1] & 0x7fffffff;
  17712. + u32 |= cpu->fpregs[rs2].w[1] & 0x80000000;
  17713. + cpu->fpregs[rd].w[1] = u32;
  17714. + cpu->fpregs[rd].w[0] = cpu->fpregs[rs1].w[0];
  17715. + break;
  17716. + case MATCH_FSGNJN_D:
  17717. + TRACE_INSN (cpu, "fsgnjn.d %s, %s, %s",
  17718. + frd_name, frs1_name, frs2_name);
  17719. + u32 = cpu->fpregs[rs1].w[1] & 0x7fffffff;
  17720. + u32 |= (cpu->fpregs[rs2].w[1] & 0x80000000) ^ 0x80000000;
  17721. + cpu->fpregs[rd].w[1] = u32;
  17722. + cpu->fpregs[rd].w[0] = cpu->fpregs[rs1].w[0];
  17723. + break;
  17724. + case MATCH_FSGNJX_D:
  17725. + TRACE_INSN (cpu, "fsgnjx.d %s, %s, %s",
  17726. + frd_name, frs1_name, frs2_name);
  17727. + u32 = cpu->fpregs[rs1].w[1] & 0x7fffffff;
  17728. + u32 |= (cpu->fpregs[rs1].w[1] & 0x80000000) ^ (cpu->fpregs[rs2].w[1] & 0x80000000);
  17729. + cpu->fpregs[rd].w[1] = u32;
  17730. + cpu->fpregs[rd].w[0] = cpu->fpregs[rs1].w[0];
  17731. + break;
  17732. + case MATCH_FMIN_D:
  17733. + TRACE_INSN (cpu, "fmin.d %s, %s, %s",
  17734. + frd_name, frs1_name, frs2_name);
  17735. + if (cpu->fpregs[rs1].D[0] < cpu->fpregs[rs2].D[0])
  17736. + cpu->fpregs[rd].D[0] = cpu->fpregs[rs1].D[0];
  17737. + else
  17738. + cpu->fpregs[rd].D[0] = cpu->fpregs[rs2].D[0];
  17739. + break;
  17740. + case MATCH_FMAX_D:
  17741. + TRACE_INSN (cpu, "fmax.d %s, %s, %s",
  17742. + frd_name, frs1_name, frs2_name);
  17743. + if (cpu->fpregs[rs1].D[0] > cpu->fpregs[rs2].D[0])
  17744. + cpu->fpregs[rd].D[0] = cpu->fpregs[rs1].D[0];
  17745. + else
  17746. + cpu->fpregs[rd].D[0] = cpu->fpregs[rs2].D[0];
  17747. + break;
  17748. + case MATCH_FMV_X_D:
  17749. + TRACE_INSN (cpu, "fmv.x.d %s, %s",
  17750. + rd_name, frs1_name);
  17751. + cpu->regs[rd] = cpu->fpregs[rs1].v[0];
  17752. + break;
  17753. + case MATCH_FMV_D_X:
  17754. + TRACE_INSN (cpu, "fmv.d.x %s, %s",
  17755. + frd_name, frs1_name);
  17756. + cpu->fpregs[rd].v[0] = cpu->regs[rs1];
  17757. + break;
  17758. + case MATCH_FEQ_D:
  17759. + TRACE_INSN (cpu, "feq.d %s, %s, %s",
  17760. + rd_name, frs1_name, frs2_name);
  17761. + cpu->regs[rd] = sim_fpu_is_eq (&sfa, &sfb);
  17762. + break;
  17763. + case MATCH_FLE_D:
  17764. + TRACE_INSN (cpu, "fle.d %s, %s, %s",
  17765. + rd_name, frs1_name, frs2_name);
  17766. + cpu->regs[rd] = sim_fpu_is_le (&sfa, &sfb);
  17767. + break;
  17768. + case MATCH_FLT_D:
  17769. + TRACE_INSN (cpu, "flt.d %s, %s, %s",
  17770. + rd_name, frs1_name, frs2_name);
  17771. + cpu->regs[rd] = sim_fpu_is_lt (&sfa, &sfb);
  17772. + break;
  17773. + case MATCH_FCLASS_D:
  17774. + TRACE_INSN (cpu, "fclass.d %s, %s",
  17775. + rd_name, frs1_name);
  17776. + switch (sim_fpu_is (&sfa))
  17777. + {
  17778. + case SIM_FPU_IS_NINF:
  17779. + cpu->regs[rd] = 1;
  17780. + break;
  17781. + case SIM_FPU_IS_NNUMBER:
  17782. + cpu->regs[rd] = 1 << 1;
  17783. + break;
  17784. + case SIM_FPU_IS_NDENORM:
  17785. + cpu->regs[rd] = 1 << 2;
  17786. + break;
  17787. + case SIM_FPU_IS_NZERO:
  17788. + cpu->regs[rd] = 1 << 3;
  17789. + break;
  17790. + case SIM_FPU_IS_PZERO:
  17791. + cpu->regs[rd] = 1 << 4;
  17792. + break;
  17793. + case SIM_FPU_IS_PDENORM:
  17794. + cpu->regs[rd] = 1 << 5;
  17795. + break;
  17796. + case SIM_FPU_IS_PNUMBER:
  17797. + cpu->regs[rd] = 1 << 6;
  17798. + break;
  17799. + case SIM_FPU_IS_PINF:
  17800. + cpu->regs[rd] = 1 << 7;
  17801. + break;
  17802. + case SIM_FPU_IS_SNAN:
  17803. + cpu->regs[rd] = 1 << 8;
  17804. + break;
  17805. + case SIM_FPU_IS_QNAN:
  17806. + cpu->regs[rd] = 1 << 9;
  17807. + break;
  17808. + }
  17809. + break;
  17810. + default:
  17811. + TRACE_INSN (cpu, "UNHANDLED INSN: %s", op->name);
  17812. + sim_engine_halt (sd, cpu, NULL, cpu->pc, sim_signalled, SIM_SIGILL);
  17813. + }
  17814. +
  17815. + done:
  17816. + return pc;
  17817. +
  17818. +}
  17819. +
  17820. +static sim_cia
  17821. +execute_f (SIM_CPU *cpu, unsigned_word iw, const struct riscv_opcode *op)
  17822. +{
  17823. + SIM_DESC sd = CPU_STATE (cpu);
  17824. + unsigned int mask_arithmetic = MASK_FADD_S;
  17825. + unsigned int mask_mul_add = MASK_FMADD_S;
  17826. + unsigned int mask_convert = MASK_FCVT_S_W;
  17827. +
  17828. + static const int round_modes[] =
  17829. + {
  17830. + sim_fpu_round_near, sim_fpu_round_zero,
  17831. + sim_fpu_round_down, sim_fpu_round_up,
  17832. + sim_fpu_round_default, sim_fpu_round_default,
  17833. + sim_fpu_round_default
  17834. + };
  17835. +
  17836. + int rd = (iw >> OP_SH_RD) & OP_MASK_RD;
  17837. + int rs1 = (iw >> OP_SH_RS1) & OP_MASK_RS1;
  17838. + int rs2 = (iw >> OP_SH_RS2) & OP_MASK_RS2;
  17839. + int rs3 = (iw >> OP_SH_RS3) & OP_MASK_RS3;
  17840. + const char *frd_name = riscv_fpr_names_abi[rd];
  17841. + const char *frs1_name = riscv_fpr_names_abi[rs1];
  17842. + const char *frs2_name = riscv_fpr_names_abi[rs2];
  17843. + const char *frs3_name = riscv_fpr_names_abi[rs3];
  17844. + const char *rd_name = riscv_gpr_names_abi[rd];
  17845. + const char *rs1_name = riscv_gpr_names_abi[rs1];
  17846. + unsigned_word i_imm = EXTRACT_ITYPE_IMM (iw);
  17847. + unsigned_word s_imm = EXTRACT_STYPE_IMM (iw);
  17848. + uint32_t u32;
  17849. + int32_t i32;
  17850. + int64_t i64;
  17851. + uint64_t u64;
  17852. + sim_cia pc = cpu->pc + 4;
  17853. +
  17854. + /* Rounding mode. */
  17855. + int rm = (iw >> OP_SH_RM) & OP_MASK_RM;
  17856. + int rounding = round_modes[rm];
  17857. +
  17858. + sim_fpu sft, sft2;
  17859. + sim_fpu sfa, sfb, sfc;
  17860. + sim_fpu_32to (&sfa, cpu->fpregs[rs1].w[0]);
  17861. + sim_fpu_32to (&sfb, cpu->fpregs[rs2].w[0]);
  17862. +
  17863. + switch (op->match & mask_mul_add)
  17864. + {
  17865. + case MATCH_FMADD_S:
  17866. + TRACE_INSN (cpu, "fmadd.s %s, %s, %s, %s",
  17867. + frd_name, frs1_name, frs2_name, frs3_name);
  17868. + sim_fpu_32to (&sfc, cpu->fpregs[rs3].w[0]);
  17869. + sim_fpu_mul (&sft2, &sfa, &sfb);
  17870. + sim_fpu_add (&sft, &sfc, &sft2);
  17871. + sim_fpu_round_32 (&sft, rounding, sim_fpu_denorm_default);
  17872. + sim_fpu_to32 (&cpu->fpregs[rd].w[0], &sft);
  17873. + goto done;
  17874. + case MATCH_FMSUB_S:
  17875. + TRACE_INSN (cpu, "fmsub.s %s, %s, %s, %s",
  17876. + frd_name, frs1_name, frs2_name, frs3_name);
  17877. + sim_fpu_32to (&sfc, cpu->fpregs[rs3].w[0]);
  17878. + sim_fpu_mul (&sft2, &sfa, &sfb);
  17879. + sim_fpu_sub (&sft, &sft2, &sfc);
  17880. + sim_fpu_round_32 (&sft, rounding, sim_fpu_denorm_default);
  17881. + sim_fpu_to32 (&cpu->fpregs[rd].w[0], &sft);
  17882. + goto done;
  17883. + case MATCH_FNMADD_S:
  17884. + TRACE_INSN (cpu, "fnmadd.s %s, %s, %s, %s",
  17885. + frd_name, frs1_name, frs2_name, frs3_name);
  17886. + sim_fpu_32to (&sfc, cpu->fpregs[rs3].w[0]);
  17887. + sim_fpu_mul (&sft2, &sfa, &sfb);
  17888. + sim_fpu_add (&sft, &sfc, &sft2);
  17889. + sim_fpu_neg (&sft, &sft);
  17890. + sim_fpu_round_32 (&sft, rounding, sim_fpu_denorm_default);
  17891. + sim_fpu_to32 (&cpu->fpregs[rd].w[0], &sft);
  17892. + goto done;
  17893. + case MATCH_FNMSUB_S:
  17894. + TRACE_INSN (cpu, "fnmsub.s %s, %s, %s, %s",
  17895. + frd_name, frs1_name, frs2_name, frs3_name);
  17896. + sim_fpu_32to (&sfc, cpu->fpregs[rs3].w[0]);
  17897. + sim_fpu_mul (&sft2, &sfa, &sfb);
  17898. + sim_fpu_sub (&sft, &sft2, &sfc);
  17899. + sim_fpu_neg (&sft, &sft);
  17900. + sim_fpu_round_32 (&sft, rounding, sim_fpu_denorm_default);
  17901. + sim_fpu_to32 (&cpu->fpregs[rd].w[0], &sft);
  17902. + goto done;
  17903. + }
  17904. +
  17905. + switch (op->match & mask_arithmetic)
  17906. + {
  17907. + case MATCH_FADD_S:
  17908. + TRACE_INSN (cpu, "fadd.s %s, %s, %s",
  17909. + frd_name, frs1_name, frs2_name);
  17910. + sim_fpu_add (&sft, &sfa, &sfb);
  17911. + sim_fpu_round_32 (&sft, rounding, sim_fpu_denorm_default);
  17912. + sim_fpu_to32 (&cpu->fpregs[rd].w[0], &sft);
  17913. + goto done;
  17914. + case MATCH_FSUB_S:
  17915. + TRACE_INSN (cpu, "fsub.s %s, %s, %s",
  17916. + frd_name, frs1_name, frs2_name);
  17917. + sim_fpu_sub (&sft, &sfa, &sfb);
  17918. + sim_fpu_round_32 (&sft, rounding, sim_fpu_denorm_default);
  17919. + sim_fpu_to32 (&cpu->fpregs[rd].w[0], &sft);
  17920. + goto done;
  17921. + case MATCH_FMUL_S:
  17922. + TRACE_INSN (cpu, "fmul.s %s, %s, %s",
  17923. + frd_name, frs1_name, frs2_name);
  17924. + sim_fpu_mul (&sft, &sfa, &sfb);
  17925. + sim_fpu_round_64 (&sft, rounding, sim_fpu_denorm_default);
  17926. + sim_fpu_round_32 (&sft, rounding, sim_fpu_denorm_default);
  17927. + sim_fpu_to32 (&cpu->fpregs[rd].w[0], &sft);
  17928. + goto done;
  17929. + case MATCH_FDIV_S:
  17930. + TRACE_INSN (cpu, "fdiv.s %s, %s, %s",
  17931. + frd_name, frs1_name, frs2_name);
  17932. + sim_fpu_div (&sft, &sfa, &sfb);
  17933. + sim_fpu_round_32 (&sft, rounding, sim_fpu_denorm_default);
  17934. + sim_fpu_to32 (&cpu->fpregs[rd].w[0], &sft);
  17935. + goto done;
  17936. + case MATCH_FSQRT_S:
  17937. + TRACE_INSN (cpu, "fsqrt.s %s, %s, %s",
  17938. + frd_name, frs1_name, frs2_name);
  17939. + sim_fpu_sqrt (&sft, &sfa);
  17940. + sim_fpu_to32 (&cpu->fpregs[rd].w[0], &sft);
  17941. + goto done;
  17942. + }
  17943. +
  17944. + switch (op->match & mask_convert)
  17945. + {
  17946. + case MATCH_FCVT_W_S:
  17947. + TRACE_INSN (cpu, "fcvt.w.s %s, %s",
  17948. + rd_name, frs1_name);
  17949. + sim_fpu_to32i (&i32, &sfa, rounding);
  17950. + cpu->regs[rd] = i32;
  17951. + goto done;
  17952. + case MATCH_FCVT_WU_S:
  17953. + TRACE_INSN (cpu, "fcvt.wu.s %s, %s",
  17954. + rd_name, frs1_name);
  17955. + sim_fpu_to32u (&u32, &sfa, rounding);
  17956. + i32 = u32;
  17957. + cpu->regs[rd] = i32;
  17958. + goto done;
  17959. + case MATCH_FCVT_S_W:
  17960. + TRACE_INSN (cpu, "fcvt.s.w %s, %s",
  17961. + frd_name, rs1_name);
  17962. + sim_fpu_i32to (&sft, cpu->regs[rs1], rounding);
  17963. + sim_fpu_round_32 (&sft, rounding, sim_fpu_denorm_default);
  17964. + sim_fpu_to32 ((unsigned32 *) (cpu->fpregs + rd), &sft);
  17965. + goto done;
  17966. + case MATCH_FCVT_S_WU:
  17967. + TRACE_INSN (cpu, "fcvt.s.wu %s, %s",
  17968. + frd_name, rs1_name);
  17969. + sim_fpu_u32to (&sft, cpu->regs[rs1], rounding);
  17970. + sim_fpu_round_32 (&sft, rounding, sim_fpu_denorm_default);
  17971. + sim_fpu_to32 ((unsigned32 *) (cpu->fpregs + rd), &sft);
  17972. + goto done;
  17973. + case MATCH_FCVT_L_S:
  17974. + TRACE_INSN (cpu, "fcvt.l.s %s, %s",
  17975. + rd_name, frs1_name);
  17976. + cpu->regs[rd] = (int64_t) cpu->fpregs[rs1].S[0];
  17977. + goto done;
  17978. + case MATCH_FCVT_LU_S:
  17979. + TRACE_INSN (cpu, "fcvt.lu.s %s, %s",
  17980. + rd_name, frs1_name);
  17981. + cpu->regs[rd] = (uint64_t) cpu->fpregs[rs1].S[0];
  17982. + goto done;
  17983. + case MATCH_FCVT_S_L:
  17984. + TRACE_INSN (cpu, "fcvt.s.l %s, %s",
  17985. + frd_name, rs1_name);
  17986. + cpu->fpregs[rd].S[0] = (float) ((int64_t) cpu->regs[rs1]);
  17987. + goto done;
  17988. + case MATCH_FCVT_S_LU:
  17989. + TRACE_INSN (cpu, "fcvt.s.lu %s, %s",
  17990. + frd_name, rs1_name);
  17991. + cpu->fpregs[rd].S[0] = (float) cpu->regs[rs1];
  17992. + goto done;
  17993. + }
  17994. +
  17995. + switch (op->match)
  17996. + {
  17997. + case MATCH_FLW:
  17998. + TRACE_INSN (cpu, "flw %s, %" PRIiTW "(%s)",
  17999. + frd_name, i_imm, rs1_name);
  18000. + store_frd (cpu, rd, EXTEND32 (
  18001. + sim_core_read_unaligned_4 (cpu, cpu->pc, read_map,
  18002. + cpu->regs[rs1] + i_imm)));
  18003. + break;
  18004. + case MATCH_FSW:
  18005. + TRACE_INSN (cpu, "fsw %s, %" PRIiTW "(%s)",
  18006. + frs2_name, s_imm, rs1_name);
  18007. + sim_core_write_unaligned_4 (cpu, cpu->pc, write_map,
  18008. + cpu->regs[rs1] + s_imm, cpu->fpregs[rs2].w[0]);
  18009. + break;
  18010. + case MATCH_FSGNJ_S:
  18011. + TRACE_INSN (cpu, "fsgnj.s %s, %s, %s",
  18012. + frd_name, frs1_name, frs2_name);
  18013. + u32 = cpu->fpregs[rs1].w[0] & 0x7fffffff;
  18014. + u32 |= cpu->fpregs[rs2].w[0] & 0x80000000;
  18015. + cpu->fpregs[rd].w[0] = u32;
  18016. + break;
  18017. + case MATCH_FSGNJN_S:
  18018. + TRACE_INSN (cpu, "fsgnjn.s %s, %s, %s",
  18019. + frd_name, frs1_name, frs2_name);
  18020. + u32 = cpu->fpregs[rs1].w[0] & 0x7fffffff;
  18021. + u32 |= (cpu->fpregs[rs2].w[0] & 0x80000000) ^ 0x80000000;
  18022. + cpu->fpregs[rd].w[0] = u32;
  18023. + break;
  18024. + case MATCH_FSGNJX_S:
  18025. + TRACE_INSN (cpu, "fsgnx.s %s, %s, %s",
  18026. + frd_name, frs1_name, frs2_name);
  18027. + u32 = cpu->fpregs[rs1].w[0] & 0x7fffffff;
  18028. + u32 |= (cpu->fpregs[rs1].w[0] & 0x80000000) ^ (cpu->fpregs[rs2].w[0] & 0x80000000);
  18029. + cpu->fpregs[rd].w[0] = u32;
  18030. + break;
  18031. + case MATCH_FMIN_S:
  18032. + TRACE_INSN (cpu, "fmin.s %s, %s, %s",
  18033. + frd_name, frs1_name, frs2_name);
  18034. + if (cpu->fpregs[rs1].S[0] < cpu->fpregs[rs2].S[0])
  18035. + cpu->fpregs[rd].S[0] = cpu->fpregs[rs1].S[0];
  18036. + else
  18037. + cpu->fpregs[rd].S[0] = cpu->fpregs[rs2].S[0];
  18038. + break;
  18039. + case MATCH_FMAX_S:
  18040. + TRACE_INSN (cpu, "fmax.s %s, %s, %s",
  18041. + frd_name, frs1_name, frs2_name);
  18042. + if (cpu->fpregs[rs1].S[0] > cpu->fpregs[rs2].S[0])
  18043. + cpu->fpregs[rd].S[0] = cpu->fpregs[rs1].S[0];
  18044. + else
  18045. + cpu->fpregs[rd].S[0] = cpu->fpregs[rs2].S[0];
  18046. + break;
  18047. + case MATCH_FMV_X_S:
  18048. + TRACE_INSN (cpu, "fmv.x.s %s, %s",
  18049. + rd_name, frs1_name);
  18050. + cpu->regs[rd] = cpu->fpregs[rs1].W[0];
  18051. + break;
  18052. + case MATCH_FMV_S_X:
  18053. + TRACE_INSN (cpu, "fmv.s.x %s, %s",
  18054. + frd_name, rs1_name);
  18055. + cpu->fpregs[rd].w[0] = cpu->regs[rs1];
  18056. + break;
  18057. + case MATCH_FEQ_S:
  18058. + TRACE_INSN (cpu, "feq.s %s, %s, %s",
  18059. + rd_name, frs1_name, frs2_name);
  18060. + cpu->regs[rd] = sim_fpu_is_eq (&sfa, &sfb);
  18061. + break;
  18062. + case MATCH_FLE_S:
  18063. + TRACE_INSN (cpu, "fle.s %s, %s, %s",
  18064. + rd_name, frs1_name, frs2_name);
  18065. + cpu->regs[rd] = sim_fpu_is_le (&sfa, &sfb);
  18066. + break;
  18067. + case MATCH_FLT_S:
  18068. + TRACE_INSN (cpu, "flt.s %s, %s, %s",
  18069. + rd_name, frs1_name, frs2_name);
  18070. + cpu->regs[rd] = sim_fpu_is_lt (&sfa, &sfb);
  18071. + break;
  18072. + case MATCH_FCLASS_S:
  18073. + TRACE_INSN (cpu, "fclass.s %s, %s",
  18074. + rd_name, frs1_name);
  18075. + switch (sim_fpu_is (&sfa))
  18076. + {
  18077. + case SIM_FPU_IS_NINF:
  18078. + cpu->regs[rd] = 1;
  18079. + break;
  18080. + case SIM_FPU_IS_NNUMBER:
  18081. + cpu->regs[rd] = 1 << 1;
  18082. + break;
  18083. + case SIM_FPU_IS_NDENORM:
  18084. + cpu->regs[rd] = 1 << 2;
  18085. + break;
  18086. + case SIM_FPU_IS_NZERO:
  18087. + cpu->regs[rd] = 1 << 3;
  18088. + break;
  18089. + case SIM_FPU_IS_PZERO:
  18090. + cpu->regs[rd] = 1 << 4;
  18091. + break;
  18092. + case SIM_FPU_IS_PDENORM:
  18093. + cpu->regs[rd] = 1 << 5;
  18094. + break;
  18095. + case SIM_FPU_IS_PNUMBER:
  18096. + cpu->regs[rd] = 1 << 6;
  18097. + break;
  18098. + case SIM_FPU_IS_PINF:
  18099. + cpu->regs[rd] = 1 << 7;
  18100. + break;
  18101. + case SIM_FPU_IS_SNAN:
  18102. + cpu->regs[rd] = 1 << 8;
  18103. + break;
  18104. + case SIM_FPU_IS_QNAN:
  18105. + cpu->regs[rd] = 1 << 9;
  18106. + break;
  18107. + }
  18108. + break;
  18109. + case MATCH_FRCSR:
  18110. + TRACE_INSN (cpu, "frcsr %s",
  18111. + rd_name);
  18112. + store_rd (cpu, rd, fetch_csr (cpu, "fcsr", CSR_FCSR, &cpu->csr.fcsr));
  18113. + break;
  18114. + case MATCH_FSCSR:
  18115. + TRACE_INSN (cpu, "fscsr %s, %sf",
  18116. + rd_name, rs1_name);
  18117. + store_rd (cpu, rd, fetch_csr (cpu, "fcsr", CSR_FCSR, &cpu->csr.fcsr));
  18118. + store_csr (cpu, "fcsr", CSR_FCSR, &cpu->csr.fcsr, cpu->regs[rs1]);
  18119. + break;
  18120. + case MATCH_FRRM:
  18121. + TRACE_INSN (cpu, "frrm %s",
  18122. + rd_name);
  18123. + store_rd (cpu, rd, fetch_csr (cpu, "frm", CSR_FRM, &cpu->csr.frm));
  18124. + break;
  18125. + case MATCH_FSRM:
  18126. + TRACE_INSN (cpu, "fsrm %s, %s",
  18127. + rd_name, rs1_name);
  18128. + store_rd (cpu, rd, fetch_csr (cpu, "frm", CSR_FCSR, &cpu->csr.frm));
  18129. + store_csr (cpu, "frm", CSR_FCSR, &cpu->csr.frm, cpu->regs[rs1]);
  18130. + break;
  18131. + case MATCH_FRFLAGS:
  18132. + TRACE_INSN (cpu, "frflags %s",
  18133. + rd_name);
  18134. + store_rd (cpu, rd, fetch_csr (cpu, "fflags", CSR_FFLAGS, &cpu->csr.fflags));
  18135. + break;
  18136. + case MATCH_FSFLAGS:
  18137. + TRACE_INSN (cpu, "fsflags %s, %s",
  18138. + rd_name, frs1_name);
  18139. + store_rd (cpu, rd, fetch_csr (cpu, "fflags", CSR_FFLAGS, &cpu->csr.fflags));
  18140. + store_csr (cpu, "fflags", CSR_FFLAGS, &cpu->csr.fflags, cpu->regs[rs1]);
  18141. + break;
  18142. + default:
  18143. + TRACE_INSN (cpu, "UNHANDLED INSN: %s", op->name);
  18144. + sim_engine_halt (sd, cpu, NULL, cpu->pc, sim_signalled, SIM_SIGILL);
  18145. + }
  18146. +
  18147. + done:
  18148. + return pc;
  18149. +}
  18150. +
  18151. +static sim_cia
  18152. +execute_c (SIM_CPU *cpu, unsigned_word iw, const struct riscv_opcode *op)
  18153. +{
  18154. + SIM_DESC sd = CPU_STATE (cpu);
  18155. + const int mask_group_op = 0x3;
  18156. + const int mask_mv_jr = 0xf003;
  18157. + const int match_mv_jr = 0x8002;
  18158. + const int mask_ebk_jalr_add = 0xf003;
  18159. + const int match_ebk_jalr_add = 0x9002;
  18160. +
  18161. + int rd = (iw >> OP_SH_RD) & OP_MASK_RD;
  18162. + int crs2 = (iw >> OP_SH_CRS2) & OP_MASK_CRS2;
  18163. + int crs1s = ((iw >> OP_SH_CRS1S) & OP_MASK_CRS1S) | 0x8;
  18164. + int crs2s = ((iw >> OP_SH_CRS2S) & OP_MASK_CRS2S) | 0x8;
  18165. + int ciw_rd = crs2s;
  18166. + unsigned_word rvc_imm = EXTRACT_RVC_IMM (iw);
  18167. + unsigned_word tmp;
  18168. + sim_cia pc = cpu->pc + 2;
  18169. +
  18170. + const char *rd_name = riscv_gpr_names_abi[rd];
  18171. + const char *crs2_name = riscv_gpr_names_abi[crs2];
  18172. + const char *crs1s_name = riscv_gpr_names_abi[crs1s];
  18173. + const char *crs2s_name = riscv_gpr_names_abi[crs2s];
  18174. + const char *ciw_rd_name = crs2s_name;
  18175. +
  18176. + const char *frd_name = riscv_fpr_names_abi[rd];
  18177. + const char *fcrs2_name = riscv_fpr_names_abi[crs2];
  18178. + const char *fcrs1s_name = riscv_fpr_names_abi[crs1s];
  18179. + const char *fcrs2s_name = riscv_fpr_names_abi[crs2s];
  18180. + const char *fciw_rd_name = fcrs2s_name;
  18181. +
  18182. + /* Deal with c.mv, c.jr instructons. */
  18183. + if ((op->match & mask_mv_jr) == match_mv_jr)
  18184. + {
  18185. + if (crs2 != 0)
  18186. + {
  18187. + /* c.mv */
  18188. + TRACE_INSN (cpu, "c.mv %s, %s // %s = %s",
  18189. + rd_name, crs2_name, rd_name, crs2_name);
  18190. + cpu->regs[rd] = cpu->regs[crs2];
  18191. + }
  18192. + else
  18193. + {
  18194. + /* c.jr */
  18195. + TRACE_INSN (cpu, "c.jr %s", rd_name);
  18196. + pc = cpu->regs[rd];
  18197. + }
  18198. + return pc;
  18199. + }
  18200. +
  18201. + /* Deal with c.ebreak, c.jalr, c.add instructions. */
  18202. + if ((op->match & mask_ebk_jalr_add) == match_ebk_jalr_add)
  18203. + {
  18204. + if (iw == MATCH_C_EBREAK)
  18205. + {
  18206. + /* c.ebreak */
  18207. + TRACE_INSN (cpu, "c.break");
  18208. + sim_engine_halt (sd, cpu, NULL, cpu->pc, sim_stopped, SIM_SIGTRAP);
  18209. + }
  18210. + else if (crs2 == 0)
  18211. + {
  18212. + /* c.jalr */
  18213. + TRACE_INSN (cpu, "c.jalr %s", rd_name);
  18214. + pc = cpu->regs[rd];
  18215. + store_rd (cpu, X_RA, cpu->pc + 2);
  18216. + }
  18217. + else
  18218. + {
  18219. + /* c.add */
  18220. + TRACE_INSN (cpu, "c.add %s, %s // %s += %s",
  18221. + rd_name, crs2_name, rd_name, crs2_name);
  18222. + store_rd (cpu, rd, cpu->regs[rd] + cpu->regs[crs2]);
  18223. + }
  18224. + return pc;
  18225. + }
  18226. +
  18227. + switch (op->match & mask_group_op)
  18228. + {
  18229. + case 0:
  18230. + switch (op->match)
  18231. + {
  18232. + case MATCH_C_LW:
  18233. + TRACE_INSN (cpu, "c.lw %s, %" PRIiTW "(%s);"
  18234. + " // %s = *(%s + %" PRIiTW ")",
  18235. + crs2s_name, EXTRACT_RVC_LW_IMM (iw), crs1s_name,
  18236. + crs2s_name, crs1s_name, EXTRACT_RVC_LW_IMM (iw));
  18237. + store_rd (cpu, crs2s, EXTEND32 (
  18238. + sim_core_read_unaligned_4 (cpu, cpu->pc, read_map,
  18239. + cpu->regs[crs1s]
  18240. + + EXTRACT_RVC_LW_IMM (iw))));
  18241. + return pc;
  18242. + case MATCH_C_SW:
  18243. + TRACE_INSN (cpu, "c.sw %s, %" PRIiTW "(%s);"
  18244. + " // *(%s + %" PRIiTW ") = %s",
  18245. + crs2s_name, EXTRACT_RVC_LW_IMM (iw), crs1s_name,
  18246. + crs1s_name, EXTRACT_RVC_LW_IMM (iw), crs2s_name);
  18247. + sim_core_write_unaligned_4 (cpu, cpu->pc, write_map,
  18248. + (cpu->regs[crs1s]
  18249. + + EXTRACT_RVC_LW_IMM (iw)),
  18250. + cpu->regs[crs2s]);
  18251. + return pc;
  18252. + case MATCH_C_ADDI4SPN:
  18253. + TRACE_INSN (cpu, "c.addi4spn %s, %" PRIiTW
  18254. + " // %s = sp + %" PRIiTW,
  18255. + ciw_rd_name, EXTRACT_RVC_ADDI4SPN_IMM (iw),
  18256. + ciw_rd_name, EXTRACT_RVC_ADDI4SPN_IMM (iw));
  18257. + store_rd (cpu, ciw_rd, cpu->sp + EXTRACT_RVC_ADDI4SPN_IMM (iw));
  18258. + return pc;
  18259. + case MATCH_C_FLD:
  18260. + if (RISCV_XLEN (cpu) <= 64)
  18261. + {
  18262. + TRACE_INSN (cpu, "c.fld %s, %" PRIiTW "(%s);"
  18263. + " // %s = *(%s + %" PRIiTW ")",
  18264. + fcrs2s_name, EXTRACT_RVC_LD_IMM (iw), fcrs1s_name,
  18265. + fcrs2s_name, fcrs1s_name, EXTRACT_RVC_LD_IMM (iw));
  18266. + /* rv32/64, c.fld instruction. */
  18267. + store_frd64 (cpu, crs2s,
  18268. + sim_core_read_unaligned_8 (cpu, cpu->pc, read_map,
  18269. + cpu->regs[crs1s]
  18270. + + EXTRACT_RVC_LD_IMM (iw)));
  18271. + return pc;
  18272. + }
  18273. + else
  18274. + {
  18275. + /* rv128, c.lq instruction. */
  18276. + TRACE_INSN (cpu, "UNHANDLED RV128 INSN: %s", op->name);
  18277. + sim_engine_halt (sd, cpu, NULL, cpu->pc,
  18278. + sim_signalled, SIM_SIGILL);
  18279. + }
  18280. + case MATCH_C_FLW:
  18281. + /* rv32: c.flw, rv64: c.ld. */
  18282. + if (RISCV_XLEN (cpu) == 32)
  18283. + {
  18284. + TRACE_INSN (cpu, "c.flw %s, %" PRIiTW "(%s);"
  18285. + " // *(%s + %" PRIiTW ") = %s",
  18286. + fcrs2s_name, EXTRACT_RVC_LW_IMM (iw), crs1s_name,
  18287. + crs1s_name, EXTRACT_RVC_LW_IMM (iw), fcrs2s_name);
  18288. + store_frd (cpu, crs2s, EXTEND32 (
  18289. + sim_core_read_unaligned_4 (cpu, cpu->pc, read_map,
  18290. + cpu->regs[crs1s]
  18291. + + EXTRACT_RVC_LW_IMM (iw))));
  18292. + }
  18293. + else
  18294. + {
  18295. + TRACE_INSN (cpu, "c.ld %s, %" PRIiTW "(%s);"
  18296. + " // *(%s + %" PRIiTW ") = %s",
  18297. + crs2s_name, EXTRACT_RVC_LD_IMM (iw), crs1s_name,
  18298. + crs1s_name, EXTRACT_RVC_LD_IMM (iw), crs2s_name);
  18299. + store_rd (cpu, crs2s,
  18300. + sim_core_read_unaligned_8 (cpu, cpu->pc, read_map,
  18301. + cpu->regs[crs1s]
  18302. + + EXTRACT_RVC_LD_IMM (iw)));
  18303. + }
  18304. + return pc;
  18305. + case MATCH_C_FSD:
  18306. + if (RISCV_XLEN (cpu) <= 64)
  18307. + {
  18308. + /* rv32/64, c.fsd instruction. */
  18309. + TRACE_INSN (cpu, "c.fsd %s, %" PRIiTW "(%s);"
  18310. + " // *(%s + %" PRIiTW ") = %s",
  18311. + fcrs2s_name, EXTRACT_RVC_LD_IMM (iw), crs1s_name,
  18312. + crs1s_name, EXTRACT_RVC_LD_IMM (iw), fcrs2s_name);
  18313. + sim_core_write_unaligned_8 (cpu, cpu->pc, write_map,
  18314. + cpu->regs[crs1s]
  18315. + + EXTRACT_RVC_LD_IMM (iw),
  18316. + cpu->fpregs[crs2s].v[0]);
  18317. + return pc;
  18318. + }
  18319. + else
  18320. + {
  18321. + /* rv128, c.sq instruction. */
  18322. + TRACE_INSN (cpu, "UNHANDLED RV128 INSN: %s", op->name);
  18323. + sim_engine_halt (sd, cpu, NULL, cpu->pc,
  18324. + sim_signalled, SIM_SIGILL);
  18325. + }
  18326. + case MATCH_C_FSW:
  18327. + /* rv32: c.fsw, rv64: c.sd. */
  18328. + if (RISCV_XLEN (cpu) == 32)
  18329. + {
  18330. + TRACE_INSN (cpu, "c.fsw %s, %" PRIiTW "(%s);"
  18331. + " // *(%s + %" PRIiTW ") = %s",
  18332. + fcrs2s_name, EXTRACT_RVC_LW_IMM (iw), crs1s_name,
  18333. + crs1s_name, EXTRACT_RVC_LW_IMM (iw), fcrs2s_name);
  18334. + sim_core_write_unaligned_4 (cpu, cpu->pc, write_map,
  18335. + cpu->regs[crs1s]
  18336. + + EXTRACT_RVC_LW_IMM (iw),
  18337. + cpu->fpregs[crs2s].w[0]);
  18338. + }
  18339. + else
  18340. + {
  18341. + TRACE_INSN (cpu, "c.sd %s, %" PRIiTW "(%s);"
  18342. + " // *(%s + %" PRIiTW ") = %s",
  18343. + crs2s_name, EXTRACT_RVC_LD_IMM (iw), crs1s_name,
  18344. + crs1s_name, EXTRACT_RVC_LD_IMM (iw), crs2s_name);
  18345. + sim_core_write_unaligned_8 (cpu, cpu->pc, write_map,
  18346. + cpu->regs[crs1s]
  18347. + + EXTRACT_RVC_LD_IMM (iw),
  18348. + cpu->regs[crs2s]);
  18349. + }
  18350. + return pc;
  18351. + default:
  18352. + TRACE_INSN (cpu, "UNHANDLED INSN: %s", op->name);
  18353. + sim_engine_halt (sd, cpu, NULL, cpu->pc, sim_signalled, SIM_SIGILL);
  18354. + }
  18355. + case 1:
  18356. + switch (op->match)
  18357. + {
  18358. + case MATCH_C_ADDI:
  18359. + if (rd != 0)
  18360. + {
  18361. + /* c.addi */
  18362. + TRACE_INSN (cpu, "c.addi %s, %" PRIiTW " // %s += %" PRIiTW,
  18363. + rd_name, rvc_imm, rd_name, rvc_imm);
  18364. + store_rd (cpu, rd, cpu->regs[rd] + rvc_imm);
  18365. + return pc;
  18366. + }
  18367. + else
  18368. + {
  18369. + /* c.nop */
  18370. + TRACE_INSN (cpu, "c.nop");
  18371. + return pc;
  18372. + }
  18373. + case MATCH_C_JAL:
  18374. + /* In rv32 is c.jal, rv64 c.addiw. */
  18375. + if (RISCV_XLEN (cpu) == 32)
  18376. + {
  18377. + TRACE_INSN (cpu, "c.jal %" PRIiTW, EXTRACT_RVC_J_IMM (iw));
  18378. + store_rd (cpu, X_RA, cpu->pc + 2);
  18379. + pc = cpu->pc + EXTRACT_RVC_J_IMM (iw);
  18380. + }
  18381. + else
  18382. + {
  18383. + TRACE_INSN (cpu, "c.addiw %s, %" PRIiTW " // %s += %" PRIiTW,
  18384. + rd_name, rvc_imm, rd_name, rvc_imm);
  18385. + store_rd (cpu, rd, EXTEND32 (cpu->regs[rd] + rvc_imm));
  18386. + }
  18387. + return pc;
  18388. + case MATCH_C_LI:
  18389. + TRACE_INSN (cpu, "c.li %s, %" PRIiTW " // %s = %" PRIiTW,
  18390. + rd_name, rvc_imm, rd_name, rvc_imm);
  18391. + store_rd (cpu, rd, rvc_imm);
  18392. + return pc;
  18393. + case MATCH_C_ADDI16SP:
  18394. + TRACE_INSN (cpu, "c.addi16sp %s, %" PRIiTW,
  18395. + rd_name, rvc_imm);
  18396. + store_rd (cpu, rd, cpu->sp + EXTRACT_RVC_ADDI16SP_IMM (iw));
  18397. + return pc;
  18398. + case MATCH_C_SRLI:
  18399. + /* rv32: c.srli, rv128: c.srli64. */
  18400. + TRACE_INSN (cpu, "c.srli %s, %" PRIiTW,
  18401. + crs1s_name, EXTRACT_RVC_IMM (iw));
  18402. + if (RISCV_XLEN (cpu) == 32 && EXTRACT_RVC_IMM (iw) > 0x1f)
  18403. + sim_engine_halt (sd, cpu, NULL, cpu->pc, sim_signalled, SIM_SIGILL);
  18404. + store_rd (cpu, crs1s, cpu->regs[crs1s] >> EXTRACT_RVC_IMM (iw));
  18405. + return pc;
  18406. + case MATCH_C_SRAI:
  18407. + /* rv32: c.srli, rv128: c.srli64. */
  18408. + TRACE_INSN (cpu, "c.srai %s, %" PRIiTW,
  18409. + crs1s_name, EXTRACT_RVC_IMM (iw));
  18410. + if (RISCV_XLEN (cpu) == 32)
  18411. + {
  18412. + if (EXTRACT_RVC_IMM (iw) > 0x1f)
  18413. + sim_engine_halt (sd, cpu, NULL, cpu->pc,
  18414. + sim_signalled, SIM_SIGILL);
  18415. + tmp = ashiftrt (cpu->regs[crs1s], EXTRACT_RVC_IMM (iw));
  18416. + }
  18417. + else
  18418. + tmp = ashiftrt64 (cpu->regs[crs1s], EXTRACT_RVC_IMM (iw));
  18419. + store_rd (cpu, crs1s, tmp);
  18420. + return pc;
  18421. + case MATCH_C_ANDI:
  18422. + TRACE_INSN (cpu, "c.andi %s, %" PRIiTW,
  18423. + crs1s_name, EXTRACT_RVC_IMM (iw));
  18424. + store_rd (cpu, crs1s, cpu->regs[crs1s] & EXTRACT_RVC_IMM (iw));
  18425. + return pc;
  18426. + case MATCH_C_SUB:
  18427. + TRACE_INSN (cpu, "c.sub %s, %s",
  18428. + crs1s_name, crs2s_name);
  18429. + store_rd (cpu, crs1s, cpu->regs[crs1s] - cpu->regs[crs2s]);
  18430. + return pc;
  18431. + case MATCH_C_XOR:
  18432. + TRACE_INSN (cpu, "c.xor %s, %s",
  18433. + crs1s_name, crs2s_name);
  18434. + store_rd (cpu, crs1s, cpu->regs[crs1s] ^ cpu->regs[crs2s]);
  18435. + return pc;
  18436. + case MATCH_C_OR:
  18437. + TRACE_INSN (cpu, "c.or %s, %s",
  18438. + crs1s_name, crs2s_name);
  18439. + store_rd (cpu, crs1s, cpu->regs[crs1s] | cpu->regs[crs2s]);
  18440. + return pc;
  18441. + case MATCH_C_AND:
  18442. + TRACE_INSN (cpu, "c.and %s, %s",
  18443. + crs1s_name, crs2s_name);
  18444. + store_rd (cpu, crs1s, cpu->regs[crs1s] & cpu->regs[crs2s]);
  18445. + return pc;
  18446. + case MATCH_C_SUBW:
  18447. + TRACE_INSN (cpu, "c.subw %s, %s",
  18448. + crs1s_name, crs2s_name);
  18449. + RISCV_ASSERT_RV64 (cpu, "insn: %s", op->name);
  18450. + store_rd (cpu, crs1s, EXTEND32 (cpu->regs[crs1s] - cpu->regs[crs2s]));
  18451. + return pc;
  18452. + case MATCH_C_ADDW:
  18453. + TRACE_INSN (cpu, "c.addw %s, %s",
  18454. + crs1s_name, crs2s_name);
  18455. + RISCV_ASSERT_RV64 (cpu, "insn: %s", op->name);
  18456. + store_rd (cpu, crs1s, EXTEND32 (cpu->regs[crs1s] + cpu->regs[crs2s]));
  18457. + return pc;
  18458. + case MATCH_C_BEQZ:
  18459. + TRACE_INSN (cpu, "c.beqz %s, %" PRIiTW,
  18460. + crs1s_name, cpu->pc + EXTRACT_RVC_B_IMM (iw));
  18461. + if (cpu->regs[crs1s] == 0)
  18462. + pc = cpu->pc + EXTRACT_RVC_B_IMM (iw);
  18463. + return pc;
  18464. + case MATCH_C_BNEZ:
  18465. + TRACE_INSN (cpu, "c.bnez %s, %" PRIiTW,
  18466. + crs1s_name, cpu->pc + EXTRACT_RVC_B_IMM (iw));
  18467. + if (cpu->regs[crs1s] != 0)
  18468. + pc = cpu->pc + EXTRACT_RVC_B_IMM (iw);
  18469. + return pc;
  18470. + case MATCH_C_LUI:
  18471. + TRACE_INSN (cpu, "c.lui %s, %" PRIiTW,
  18472. + rd_name, EXTRACT_RVC_LUI_IMM (iw));
  18473. + store_rd (cpu, rd, EXTRACT_RVC_LUI_IMM (iw));
  18474. + return pc;
  18475. + case MATCH_C_J:
  18476. + TRACE_INSN (cpu, "c.j %" PRIiTW,
  18477. + cpu->pc + EXTRACT_RVC_B_IMM (iw));
  18478. + pc = cpu->pc + EXTRACT_RVC_J_IMM (iw);
  18479. + return pc;
  18480. + default:
  18481. + TRACE_INSN (cpu, "UNHANDLED INSN: %s", op->name);
  18482. + sim_engine_halt (sd, cpu, NULL, cpu->pc, sim_signalled, SIM_SIGILL);
  18483. + }
  18484. + case 2:
  18485. + switch (op->match)
  18486. + {
  18487. + case MATCH_C_SLLI:
  18488. + TRACE_INSN (cpu, "c.slli %s, %" PRIiTW,
  18489. + rd_name, rvc_imm);
  18490. + /* rv32: c.slli, rv128: c.slli64. */
  18491. + if (RISCV_XLEN (cpu) == 32 && rvc_imm > 0x1f)
  18492. + sim_engine_halt (sd, cpu, NULL, cpu->pc, sim_signalled, SIM_SIGILL);
  18493. + store_rd (cpu, rd, cpu->regs[rd] << rvc_imm);
  18494. + return pc;
  18495. + case MATCH_C_LWSP:
  18496. + TRACE_INSN (cpu, "c.lwsp %s, %" PRIiTW "(sp);"
  18497. + " // %s = *(sp + %" PRIiTW ")",
  18498. + rd_name, EXTRACT_RVC_LWSP_IMM (iw),
  18499. + rd_name, EXTRACT_RVC_LWSP_IMM (iw));
  18500. + store_rd (cpu, rd, EXTEND32 (
  18501. + sim_core_read_unaligned_4 (cpu, cpu->pc, read_map,
  18502. + cpu->sp
  18503. + + EXTRACT_RVC_LWSP_IMM (iw))));
  18504. + return pc;
  18505. + case MATCH_C_SWSP:
  18506. + TRACE_INSN (cpu, "c.swsp %s, %" PRIiTW "(sp);"
  18507. + " // *(sp + %" PRIiTW ") = %s",
  18508. + rd_name, EXTRACT_RVC_SWSP_IMM (iw),
  18509. + EXTRACT_RVC_SWSP_IMM (iw), rd_name);
  18510. + sim_core_write_unaligned_4 (cpu, cpu->pc, write_map,
  18511. + (cpu->sp + EXTRACT_RVC_SWSP_IMM (iw)),
  18512. + cpu->regs[crs2]);
  18513. + return pc;
  18514. + case MATCH_C_ADD:
  18515. + TRACE_INSN (cpu, "c.add %s, %s // %s += %s",
  18516. + rd_name, crs2_name,
  18517. + rd_name, crs2_name);
  18518. + store_rd (cpu, rd, cpu->regs[rd] + cpu->regs[crs2]);
  18519. + return pc;
  18520. + case MATCH_C_FLDSP:
  18521. + /* rv32/64: c.fldsp, rv128: c.flqsp. */
  18522. + if (RISCV_XLEN (cpu) <= 64)
  18523. + {
  18524. + TRACE_INSN (cpu, "c.fldsp %s, %" PRIiTW "(sp);"
  18525. + " // %s = *(sp + %" PRIiTW ")",
  18526. + frd_name, EXTRACT_RVC_LDSP_IMM (iw),
  18527. + frd_name, EXTRACT_RVC_LDSP_IMM (iw));
  18528. + store_frd64 (cpu, rd,
  18529. + sim_core_read_unaligned_8 (cpu, cpu->pc, read_map,
  18530. + cpu->sp
  18531. + + EXTRACT_RVC_LDSP_IMM (iw)));
  18532. + return pc;
  18533. + }
  18534. + else
  18535. + {
  18536. + TRACE_INSN (cpu, "UNHANDLED RV128 INSN: %s", op->name);
  18537. + sim_engine_halt (sd, cpu, NULL, cpu->pc,
  18538. + sim_signalled, SIM_SIGILL);
  18539. + }
  18540. + case MATCH_C_FLWSP:
  18541. + /* rv32: c.flwsp, rv64: c.ldsp. */
  18542. + if (RISCV_XLEN (cpu) == 32)
  18543. + {
  18544. + TRACE_INSN (cpu, "c.flwsp %s, %" PRIiTW "(sp);"
  18545. + " // %s = *(sp + %" PRIiTW ")",
  18546. + frd_name, EXTRACT_RVC_LWSP_IMM (iw),
  18547. + frd_name, EXTRACT_RVC_LWSP_IMM (iw));
  18548. + store_frd (cpu, rd, EXTEND32 (
  18549. + sim_core_read_unaligned_4 (cpu, cpu->pc, read_map,
  18550. + cpu->sp
  18551. + + EXTRACT_RVC_LWSP_IMM (iw))));
  18552. + }
  18553. + else
  18554. + {
  18555. + TRACE_INSN (cpu, "c.ldsp %s, %" PRIiTW "(sp);"
  18556. + " // %s = *(sp + %" PRIiTW ")",
  18557. + rd_name, EXTRACT_RVC_LDSP_IMM (iw),
  18558. + rd_name, EXTRACT_RVC_LDSP_IMM (iw));
  18559. + store_rd (cpu, rd,
  18560. + sim_core_read_unaligned_8 (cpu, cpu->pc, read_map,
  18561. + cpu->sp
  18562. + + EXTRACT_RVC_LDSP_IMM (iw)));
  18563. + }
  18564. + return pc;
  18565. + case MATCH_C_FSDSP:
  18566. + /* rv32/64: c.fsdsp, rv128: c.fsqsp. */
  18567. + if (RISCV_XLEN (cpu) <= 64)
  18568. + {
  18569. + TRACE_INSN (cpu, "c.fsdsp %s, %" PRIiTW "(sp);"
  18570. + " // *(sp + %" PRIiTW ") = %s",
  18571. + fcrs2_name, EXTRACT_RVC_LDSP_IMM (iw),
  18572. + EXTRACT_RVC_LDSP_IMM (iw), fcrs2_name);
  18573. + sim_core_write_unaligned_8 (cpu, cpu->pc, write_map,
  18574. + cpu->sp + EXTRACT_RVC_SDSP_IMM (iw),
  18575. + cpu->fpregs[crs2].v[0]);
  18576. + return pc;
  18577. + }
  18578. + else
  18579. + {
  18580. + TRACE_INSN (cpu, "UNHANDLED RV128 INSN: %s", op->name);
  18581. + sim_engine_halt (sd, cpu, NULL, cpu->pc,
  18582. + sim_signalled, SIM_SIGILL);
  18583. + }
  18584. + case MATCH_C_FSWSP:
  18585. + /* rv32: c.fswsp, rv64: c.sdsp. */
  18586. + if (RISCV_XLEN (cpu) == 32)
  18587. + {
  18588. + TRACE_INSN (cpu, "c.fswsp %s, %" PRIiTW "(sp);"
  18589. + " // *(sp + %" PRIiTW ") = %s",
  18590. + fcrs2_name, EXTRACT_RVC_SWSP_IMM (iw),
  18591. + EXTRACT_RVC_SWSP_IMM (iw), fcrs2_name);
  18592. + sim_core_write_unaligned_4 (cpu, cpu->pc, write_map,
  18593. + cpu->sp
  18594. + + EXTRACT_RVC_SWSP_IMM (iw),
  18595. + cpu->fpregs[crs2].w[0]);
  18596. + }
  18597. + else
  18598. + {
  18599. + TRACE_INSN (cpu, "c.sdsp %s, %" PRIiTW "(sp);"
  18600. + " // *(sp + %" PRIiTW ") = %s",
  18601. + crs2_name, EXTRACT_RVC_SDSP_IMM (iw),
  18602. + EXTRACT_RVC_SDSP_IMM (iw), crs2_name);
  18603. + sim_core_write_unaligned_8 (cpu, cpu->pc, write_map,
  18604. + cpu->sp + EXTRACT_RVC_SDSP_IMM (iw),
  18605. + cpu->regs[crs2]);
  18606. + }
  18607. + return pc;
  18608. + default:
  18609. + TRACE_INSN (cpu, "UNHANDLED INSN: %s", op->name);
  18610. + sim_engine_halt (sd, cpu, NULL, cpu->pc, sim_signalled, SIM_SIGILL);
  18611. + }
  18612. + default:
  18613. + TRACE_INSN (cpu, "UNHANDLED INSN: %s", op->name);
  18614. + sim_engine_halt (sd, cpu, NULL, cpu->pc, sim_signalled, SIM_SIGILL);
  18615. + }
  18616. +
  18617. + return pc;
  18618. +}
  18619. +
  18620. +static sim_cia
  18621. +execute_i (SIM_CPU *cpu, unsigned_word iw, const struct riscv_opcode *op)
  18622. +{
  18623. + SIM_DESC sd = CPU_STATE (cpu);
  18624. + int rd = (iw >> OP_SH_RD) & OP_MASK_RD;
  18625. + int rs1 = (iw >> OP_SH_RS1) & OP_MASK_RS1;
  18626. + int rs2 = (iw >> OP_SH_RS2) & OP_MASK_RS2;
  18627. + const char *rd_name = riscv_gpr_names_abi[rd];
  18628. + const char *rs1_name = riscv_gpr_names_abi[rs1];
  18629. + const char *rs2_name = riscv_gpr_names_abi[rs2];
  18630. + unsigned int csr = (iw >> OP_SH_CSR) & OP_MASK_CSR;
  18631. + unsigned_word i_imm = EXTRACT_ITYPE_IMM (iw);
  18632. + unsigned_word u_imm = EXTRACT_UTYPE_IMM ((unsigned64) iw);
  18633. + unsigned_word s_imm = EXTRACT_STYPE_IMM (iw);
  18634. + unsigned_word sb_imm = EXTRACT_SBTYPE_IMM (iw);
  18635. + unsigned_word shamt_imm = ((iw >> OP_SH_SHAMT) & OP_MASK_SHAMT);
  18636. + unsigned_word tmp;
  18637. + sim_cia pc = cpu->pc + 4;
  18638. +
  18639. + TRACE_EXTRACT (cpu, "rd:%-2i:%-4s rs1:%-2i:%-4s %0*"PRIxTW" rs2:%-2i:%-4s %0*"PRIxTW" match:%#x mask:%#x",
  18640. + rd, rd_name,
  18641. + rs1, rs1_name, (int)sizeof (unsigned_word) * 2, cpu->regs[rs1],
  18642. + rs2, rs2_name, (int)sizeof (unsigned_word) * 2, cpu->regs[rs2],
  18643. + (unsigned) op->match, (unsigned) op->mask);
  18644. +
  18645. + switch (op->match)
  18646. + {
  18647. + case MATCH_ADD:
  18648. + TRACE_INSN (cpu, "add %s, %s, %s; // %s = %s + %s",
  18649. + rd_name, rs1_name, rs2_name, rd_name, rs1_name, rs2_name);
  18650. + store_rd (cpu, rd, cpu->regs[rs1] + cpu->regs[rs2]);
  18651. + break;
  18652. + case MATCH_ADDW:
  18653. + TRACE_INSN (cpu, "addw %s, %s, %s; // %s = %s + %s",
  18654. + rd_name, rs1_name, rs2_name, rd_name, rs1_name, rs2_name);
  18655. + RISCV_ASSERT_RV64 (cpu, "insn: %s", op->name);
  18656. + store_rd (cpu, rd, EXTEND32 (cpu->regs[rs1] + cpu->regs[rs2]));
  18657. + break;
  18658. + case MATCH_ADDI:
  18659. + TRACE_INSN (cpu, "addi %s, %s, %#"PRIxTW"; // %s = %s + %#" PRIxTW,
  18660. + rd_name, rs1_name, i_imm, rd_name, rs1_name, i_imm);
  18661. + store_rd (cpu, rd, cpu->regs[rs1] + i_imm);
  18662. + break;
  18663. + case MATCH_ADDIW:
  18664. + TRACE_INSN (cpu, "addiw %s, %s, %#" PRIxTW "; // %s = %s + %#" PRIxTW,
  18665. + rd_name, rs1_name, i_imm, rd_name, rs1_name, i_imm);
  18666. + RISCV_ASSERT_RV64 (cpu, "insn: %s", op->name);
  18667. + store_rd (cpu, rd, EXTEND32 (cpu->regs[rs1] + i_imm));
  18668. + break;
  18669. + case MATCH_AND:
  18670. + TRACE_INSN (cpu, "and %s, %s, %s; // %s = %s & %s",
  18671. + rd_name, rs1_name, rs2_name, rd_name, rs1_name, rs2_name);
  18672. + store_rd (cpu, rd, cpu->regs[rs1] & cpu->regs[rs2]);
  18673. + break;
  18674. + case MATCH_ANDI:
  18675. + TRACE_INSN (cpu, "andi %s, %s, %" PRIiTW "; // %s = %s & %#" PRIxTW,
  18676. + rd_name, rs1_name, i_imm, rd_name, rs1_name, i_imm);
  18677. + store_rd (cpu, rd, cpu->regs[rs1] & i_imm);
  18678. + break;
  18679. + case MATCH_OR:
  18680. + TRACE_INSN (cpu, "or %s, %s, %s; // %s = %s | %s",
  18681. + rd_name, rs1_name, rs2_name, rd_name, rs1_name, rs2_name);
  18682. + store_rd (cpu, rd, cpu->regs[rs1] | cpu->regs[rs2]);
  18683. + break;
  18684. + case MATCH_ORI:
  18685. + TRACE_INSN (cpu, "ori %s, %s, %" PRIiTW "; // %s = %s | %#" PRIxTW,
  18686. + rd_name, rs1_name, i_imm, rd_name, rs1_name, i_imm);
  18687. + store_rd (cpu, rd, cpu->regs[rs1] | i_imm);
  18688. + break;
  18689. + case MATCH_XOR:
  18690. + TRACE_INSN (cpu, "xor %s, %s, %s; // %s = %s ^ %s",
  18691. + rd_name, rs1_name, rs2_name, rd_name, rs1_name, rs2_name);
  18692. + store_rd (cpu, rd, cpu->regs[rs1] ^ cpu->regs[rs2]);
  18693. + break;
  18694. + case MATCH_XORI:
  18695. + TRACE_INSN (cpu, "xori %s, %s, %" PRIiTW "; // %s = %s ^ %#" PRIxTW,
  18696. + rd_name, rs1_name, i_imm, rd_name, rs1_name, i_imm);
  18697. + store_rd (cpu, rd, cpu->regs[rs1] ^ i_imm);
  18698. + break;
  18699. + case MATCH_SUB:
  18700. + TRACE_INSN (cpu, "sub %s, %s, %s; // %s = %s - %s",
  18701. + rd_name, rs1_name, rs2_name, rd_name, rs1_name, rs2_name);
  18702. + store_rd (cpu, rd, cpu->regs[rs1] - cpu->regs[rs2]);
  18703. + break;
  18704. + case MATCH_SUBW:
  18705. + TRACE_INSN (cpu, "subw %s, %s, %s; // %s = %s - %s",
  18706. + rd_name, rs1_name, rs2_name, rd_name, rs1_name, rs2_name);
  18707. + RISCV_ASSERT_RV64 (cpu, "insn: %s", op->name);
  18708. + store_rd (cpu, rd, EXTEND32 (cpu->regs[rs1] - cpu->regs[rs2]));
  18709. + break;
  18710. + case MATCH_LUI:
  18711. + TRACE_INSN (cpu, "lui %s, %#"PRIxTW";", rd_name, u_imm);
  18712. + store_rd (cpu, rd, u_imm);
  18713. + break;
  18714. + case MATCH_SLL:
  18715. + TRACE_INSN (cpu, "sll %s, %s, %s; // %s = %s << %s",
  18716. + rd_name, rs1_name, rs2_name, rd_name, rs1_name, rs2_name);
  18717. + u_imm = RISCV_XLEN (cpu) == 32 ? 0x1f : 0x3f;
  18718. + store_rd (cpu, rd, cpu->regs[rs1] << (cpu->regs[rs2] & u_imm));
  18719. + break;
  18720. + case MATCH_SLLW:
  18721. + TRACE_INSN (cpu, "sllw %s, %s, %s; // %s = %s << %s",
  18722. + rd_name, rs1_name, rs2_name, rd_name, rs1_name, rs2_name);
  18723. + RISCV_ASSERT_RV64 (cpu, "insn: %s", op->name);
  18724. + store_rd (cpu, rd, EXTEND32 ((unsigned32)cpu->regs[rs1] << (cpu->regs[rs2] & 0x1f)));
  18725. + break;
  18726. + case MATCH_SLLI:
  18727. + TRACE_INSN (cpu, "slli %s, %s, %" PRIiTW "; // %s = %s << %#" PRIxTW,
  18728. + rd_name, rs1_name, shamt_imm, rd_name, rs1_name, shamt_imm);
  18729. + if (RISCV_XLEN (cpu) == 32 && shamt_imm > 0x1f)
  18730. + sim_engine_halt (sd, cpu, NULL, cpu->pc, sim_signalled, SIM_SIGILL);
  18731. + store_rd (cpu, rd, cpu->regs[rs1] << shamt_imm);
  18732. + break;
  18733. + case MATCH_SLLIW:
  18734. + TRACE_INSN (cpu, "slliw %s, %s, %" PRIiTW "; // %s = %s << %#" PRIxTW,
  18735. + rd_name, rs1_name, shamt_imm, rd_name, rs1_name, shamt_imm);
  18736. + RISCV_ASSERT_RV64 (cpu, "insn: %s", op->name);
  18737. + store_rd (cpu, rd, EXTEND32 ((unsigned32)cpu->regs[rs1] << shamt_imm));
  18738. + break;
  18739. + case MATCH_SRL:
  18740. + TRACE_INSN (cpu, "srl %s, %s, %s; // %s = %s >> %s",
  18741. + rd_name, rs1_name, rs2_name, rd_name, rs1_name, rs2_name);
  18742. + u_imm = RISCV_XLEN (cpu) == 32 ? 0x1f : 0x3f;
  18743. + store_rd (cpu, rd, cpu->regs[rs1] >> (cpu->regs[rs2] & u_imm));
  18744. + break;
  18745. + case MATCH_SRLW:
  18746. + TRACE_INSN (cpu, "srlw %s, %s, %s; // %s = %s >> %s",
  18747. + rd_name, rs1_name, rs2_name, rd_name, rs1_name, rs2_name);
  18748. + RISCV_ASSERT_RV64 (cpu, "insn: %s", op->name);
  18749. + store_rd (cpu, rd, EXTEND32 ((unsigned32)cpu->regs[rs1] >> (cpu->regs[rs2] & 0x1f)));
  18750. + break;
  18751. + case MATCH_SRLI:
  18752. + TRACE_INSN (cpu, "srli %s, %s, %" PRIiTW "; // %s = %s >> %#" PRIxTW,
  18753. + rd_name, rs1_name, shamt_imm, rd_name, rs1_name, shamt_imm);
  18754. + if (RISCV_XLEN (cpu) == 32 && shamt_imm > 0x1f)
  18755. + sim_engine_halt (sd, cpu, NULL, cpu->pc, sim_signalled, SIM_SIGILL);
  18756. + store_rd (cpu, rd, cpu->regs[rs1] >> shamt_imm);
  18757. + break;
  18758. + case MATCH_SRLIW:
  18759. + TRACE_INSN (cpu, "srliw %s, %s, %" PRIiTW "; // %s = %s >> %#" PRIxTW,
  18760. + rd_name, rs1_name, shamt_imm, rd_name, rs1_name, shamt_imm);
  18761. + RISCV_ASSERT_RV64 (cpu, "insn: %s", op->name);
  18762. + store_rd (cpu, rd, EXTEND32 ((unsigned32)cpu->regs[rs1] >> shamt_imm));
  18763. + break;
  18764. + case MATCH_SRA:
  18765. + TRACE_INSN (cpu, "sra %s, %s, %s; // %s = %s >>> %s",
  18766. + rd_name, rs1_name, rs2_name, rd_name, rs1_name, rs2_name);
  18767. + if (RISCV_XLEN (cpu) == 32)
  18768. + tmp = ashiftrt (cpu->regs[rs1], cpu->regs[rs2] & 0x1f);
  18769. + else
  18770. + tmp = ashiftrt64 (cpu->regs[rs1], cpu->regs[rs2] & 0x3f);
  18771. + store_rd (cpu, rd, tmp);
  18772. + break;
  18773. + case MATCH_SRAW:
  18774. + TRACE_INSN (cpu, "sraw %s, %s, %s; // %s = %s >>> %s",
  18775. + rd_name, rs1_name, rs2_name, rd_name, rs1_name, rs2_name);
  18776. + RISCV_ASSERT_RV64 (cpu, "insn: %s", op->name);
  18777. + store_rd (cpu, rd, EXTEND32 (ashiftrt ((signed32)cpu->regs[rs1], cpu->regs[rs2] & 0x1f)));
  18778. + break;
  18779. + case MATCH_SRAI:
  18780. + TRACE_INSN (cpu, "srai %s, %s, %" PRIiTW "; // %s = %s >>> %#" PRIxTW,
  18781. + rd_name, rs1_name, shamt_imm, rd_name, rs1_name, shamt_imm);
  18782. + if (RISCV_XLEN (cpu) == 32)
  18783. + {
  18784. + if (shamt_imm > 0x1f)
  18785. + sim_engine_halt (sd, cpu, NULL, cpu->pc, sim_signalled, SIM_SIGILL);
  18786. + tmp = ashiftrt (cpu->regs[rs1], shamt_imm);
  18787. + }
  18788. + else
  18789. + tmp = ashiftrt64 (cpu->regs[rs1], shamt_imm);
  18790. + store_rd (cpu, rd, tmp);
  18791. + break;
  18792. + case MATCH_SRAIW:
  18793. + TRACE_INSN (cpu, "sraiw %s, %s, %" PRIiTW "; // %s = %s >>> %#" PRIxTW,
  18794. + rd_name, rs1_name, shamt_imm, rd_name, rs1_name, shamt_imm);
  18795. + RISCV_ASSERT_RV64 (cpu, "insn: %s", op->name);
  18796. + store_rd (cpu, rd,
  18797. + EXTEND32 (ashiftrt ((signed32)cpu->regs[rs1], shamt_imm)));
  18798. + break;
  18799. + case MATCH_SLT:
  18800. + TRACE_INSN (cpu, "slt %s, %s, %s", rd_name, rs1_name, rs2_name);
  18801. + store_rd (cpu, rd,
  18802. + !!((signed_word)cpu->regs[rs1] < (signed_word)cpu->regs[rs2]));
  18803. + break;
  18804. + case MATCH_SLTU:
  18805. + TRACE_INSN (cpu, "sltu %s, %s, %s", rd_name, rs1_name, rs2_name);
  18806. + store_rd (cpu, rd,
  18807. + !!((unsigned_word)cpu->regs[rs1]
  18808. + < (unsigned_word)cpu->regs[rs2]));
  18809. + break;
  18810. + case MATCH_SLTI:
  18811. + TRACE_INSN (cpu, "slti %s, %s, %" PRIiTW,
  18812. + rd_name, rs1_name, i_imm);
  18813. + store_rd (cpu, rd, !!((signed_word)cpu->regs[rs1] < (signed_word)i_imm));
  18814. + break;
  18815. + case MATCH_SLTIU:
  18816. + TRACE_INSN (cpu, "sltiu %s, %s, %" PRIiTW,
  18817. + rd_name, rs1_name, i_imm);
  18818. + store_rd (cpu, rd,
  18819. + !!((unsigned_word)cpu->regs[rs1] < (unsigned_word)i_imm));
  18820. + break;
  18821. + case MATCH_AUIPC:
  18822. + TRACE_INSN (cpu, "auipc %s, %" PRIiTW "; // %s = pc + %" PRIiTW,
  18823. + rd_name, u_imm, rd_name, u_imm);
  18824. + store_rd (cpu, rd, cpu->pc + u_imm);
  18825. + break;
  18826. + case MATCH_BEQ:
  18827. + TRACE_INSN (cpu, "beq %s, %s, %#" PRIxTW "; // if (%s == %s) goto %#" PRIxTW,
  18828. + rs1_name, rs2_name, sb_imm, rs1_name, rs2_name, cpu->pc + sb_imm);
  18829. + if (cpu->regs[rs1] == cpu->regs[rs2])
  18830. + {
  18831. + pc = cpu->pc + sb_imm;
  18832. + TRACE_BRANCH (cpu, "to %#" PRIxTW, pc);
  18833. + }
  18834. + break;
  18835. + case MATCH_BLT:
  18836. + TRACE_INSN (cpu, "blt %s, %s, %#" PRIxTW "; // if (%s < %s) goto %#" PRIxTW,
  18837. + rs1_name, rs2_name, sb_imm, rs1_name, rs2_name, cpu->pc + sb_imm);
  18838. + if ((signed_word)cpu->regs[rs1] < (signed_word)cpu->regs[rs2])
  18839. + {
  18840. + pc = cpu->pc + sb_imm;
  18841. + TRACE_BRANCH (cpu, "to %#" PRIxTW, pc);
  18842. + }
  18843. + break;
  18844. + case MATCH_BLTU:
  18845. + TRACE_INSN (cpu, "bltu %s, %s, %#" PRIxTW "; // if (%s < %s) goto %#" PRIxTW,
  18846. + rs1_name, rs2_name, sb_imm, rs1_name, rs2_name, cpu->pc + sb_imm);
  18847. + if ((unsigned_word)cpu->regs[rs1] < (unsigned_word)cpu->regs[rs2])
  18848. + {
  18849. + pc = cpu->pc + sb_imm;
  18850. + TRACE_BRANCH (cpu, "to %#" PRIxTW, pc);
  18851. + }
  18852. + break;
  18853. + case MATCH_BGE:
  18854. + TRACE_INSN (cpu, "bge %s, %s, %#" PRIxTW "; // if (%s >= %s) goto %#" PRIxTW,
  18855. + rs1_name, rs2_name, sb_imm, rs1_name, rs2_name, cpu->pc + sb_imm);
  18856. + if ((signed_word)cpu->regs[rs1] >= (signed_word)cpu->regs[rs2])
  18857. + {
  18858. + pc = cpu->pc + sb_imm;
  18859. + TRACE_BRANCH (cpu, "to %#" PRIxTW, pc);
  18860. + }
  18861. + break;
  18862. + case MATCH_BGEU:
  18863. + TRACE_INSN (cpu, "bgeu %s, %s, %#" PRIxTW "; // if (%s >= %s) goto %#" PRIxTW,
  18864. + rs1_name, rs2_name, sb_imm, rs1_name, rs2_name, cpu->pc + sb_imm);
  18865. + if ((unsigned_word)cpu->regs[rs1] >= (unsigned_word)cpu->regs[rs2])
  18866. + {
  18867. + pc = cpu->pc + sb_imm;
  18868. + TRACE_BRANCH (cpu, "to %#" PRIxTW, pc);
  18869. + }
  18870. + break;
  18871. + case MATCH_BNE:
  18872. + TRACE_INSN (cpu, "bne %s, %s, %#" PRIxTW "; // if (%s != %s) goto %#" PRIxTW,
  18873. + rs1_name, rs2_name, sb_imm, rs1_name, rs2_name, cpu->pc + sb_imm);
  18874. + if (cpu->regs[rs1] != cpu->regs[rs2])
  18875. + {
  18876. + pc = cpu->pc + sb_imm;
  18877. + TRACE_BRANCH (cpu, "to %#" PRIxTW, pc);
  18878. + }
  18879. + break;
  18880. + case MATCH_JAL:
  18881. + TRACE_INSN (cpu, "jal %s, %" PRIiTW ";", rd_name, EXTRACT_UJTYPE_IMM (iw));
  18882. + pc = cpu->pc + EXTRACT_UJTYPE_IMM (iw);
  18883. + store_rd (cpu, rd, cpu->pc + 4);
  18884. + TRACE_BRANCH (cpu, "to %#" PRIxTW, pc);
  18885. + break;
  18886. + case MATCH_JALR:
  18887. + TRACE_INSN (cpu, "jalr %s, %s, %" PRIiTW ";", rd_name, rs1_name, i_imm);
  18888. + pc = cpu->regs[rs1] + i_imm;
  18889. + store_rd (cpu, rd, cpu->pc + 4);
  18890. + TRACE_BRANCH (cpu, "to %#" PRIxTW, pc);
  18891. + break;
  18892. +
  18893. + case MATCH_LD:
  18894. + TRACE_INSN (cpu, "ld %s, %" PRIiTW "(%s); // ",
  18895. + rd_name, i_imm, rs1_name);
  18896. + RISCV_ASSERT_RV64 (cpu, "insn: %s", op->name);
  18897. + store_rd (cpu, rd,
  18898. + sim_core_read_unaligned_8 (cpu, cpu->pc, read_map,
  18899. + cpu->regs[rs1] + i_imm));
  18900. + break;
  18901. + case MATCH_LW:
  18902. + TRACE_INSN (cpu, "lw %s, %" PRIiTW "(%s); // ",
  18903. + rd_name, i_imm, rs1_name);
  18904. + store_rd (cpu, rd, EXTEND32 (
  18905. + sim_core_read_unaligned_4 (cpu, cpu->pc, read_map,
  18906. + cpu->regs[rs1] + i_imm)));
  18907. + break;
  18908. + case MATCH_LWU:
  18909. + TRACE_INSN (cpu, "lwu %s, %" PRIiTW "(%s); // ",
  18910. + rd_name, i_imm, rs1_name);
  18911. + store_rd (cpu, rd,
  18912. + sim_core_read_unaligned_4 (cpu, cpu->pc, read_map,
  18913. + cpu->regs[rs1] + i_imm));
  18914. + break;
  18915. + case MATCH_LH:
  18916. + TRACE_INSN (cpu, "lh %s, %" PRIiTW "(%s); // ",
  18917. + rd_name, i_imm, rs1_name);
  18918. + store_rd (cpu, rd, EXTEND16 (
  18919. + sim_core_read_unaligned_2 (cpu, cpu->pc, read_map,
  18920. + cpu->regs[rs1] + i_imm)));
  18921. + break;
  18922. + case MATCH_LHU:
  18923. + TRACE_INSN (cpu, "lhu %s, %" PRIiTW "(%s); // ",
  18924. + rd_name, i_imm, rs1_name);
  18925. + store_rd (cpu, rd,
  18926. + sim_core_read_unaligned_2 (cpu, cpu->pc, read_map,
  18927. + cpu->regs[rs1] + i_imm));
  18928. + break;
  18929. + case MATCH_LB:
  18930. + TRACE_INSN (cpu, "lb %s, %" PRIiTW "(%s); // ",
  18931. + rd_name, i_imm, rs1_name);
  18932. + store_rd (cpu, rd, EXTEND8 (
  18933. + sim_core_read_unaligned_1 (cpu, cpu->pc, read_map,
  18934. + cpu->regs[rs1] + i_imm)));
  18935. + break;
  18936. + case MATCH_LBU:
  18937. + TRACE_INSN (cpu, "lbu %s, %" PRIiTW "(%s); // ",
  18938. + rd_name, i_imm, rs1_name);
  18939. + store_rd (cpu, rd,
  18940. + sim_core_read_unaligned_1 (cpu, cpu->pc, read_map,
  18941. + cpu->regs[rs1] + i_imm));
  18942. + break;
  18943. + case MATCH_SD:
  18944. + TRACE_INSN (cpu, "sd %s, %" PRIiTW "(%s); // ",
  18945. + rs2_name, s_imm, rs1_name);
  18946. + RISCV_ASSERT_RV64 (cpu, "insn: %s", op->name);
  18947. + sim_core_write_unaligned_8 (cpu, cpu->pc, write_map,
  18948. + cpu->regs[rs1] + s_imm, cpu->regs[rs2]);
  18949. + break;
  18950. + case MATCH_SW:
  18951. + TRACE_INSN (cpu, "sw %s, %" PRIiTW "(%s); // ",
  18952. + rs2_name, s_imm, rs1_name);
  18953. + sim_core_write_unaligned_4 (cpu, cpu->pc, write_map,
  18954. + cpu->regs[rs1] + s_imm, cpu->regs[rs2]);
  18955. + break;
  18956. + case MATCH_SH:
  18957. + TRACE_INSN (cpu, "sh %s, %" PRIiTW "(%s); // ",
  18958. + rs2_name, s_imm, rs1_name);
  18959. + sim_core_write_unaligned_2 (cpu, cpu->pc, write_map,
  18960. + cpu->regs[rs1] + s_imm, cpu->regs[rs2]);
  18961. + break;
  18962. + case MATCH_SB:
  18963. + TRACE_INSN (cpu, "sb %s, %" PRIiTW "(%s); // ",
  18964. + rs2_name, s_imm, rs1_name);
  18965. + sim_core_write_unaligned_1 (cpu, cpu->pc, write_map,
  18966. + cpu->regs[rs1] + s_imm, cpu->regs[rs2]);
  18967. + break;
  18968. +
  18969. + case MATCH_CSRRC:
  18970. + TRACE_INSN (cpu, "csrrc");
  18971. + switch (csr)
  18972. + {
  18973. +#define DECLARE_CSR(name, num, class, def_ver, abort_ver) \
  18974. + case num: \
  18975. + store_rd (cpu, rd, fetch_csr (cpu, #name, num, &cpu->csr.name)); \
  18976. + store_csr (cpu, #name, num, &cpu->csr.name, \
  18977. + cpu->csr.name & !cpu->regs[rs1]); \
  18978. + break;
  18979. +#include "opcode/riscv-opc.h"
  18980. +#undef DECLARE_CSR
  18981. + }
  18982. + break;
  18983. + case MATCH_CSRRCI:
  18984. + TRACE_INSN (cpu, "csrrci");
  18985. + switch (csr)
  18986. + {
  18987. +#define DECLARE_CSR(name, num, class, def_ver, abort_ver) \
  18988. + case num: \
  18989. + store_rd (cpu, rd, fetch_csr (cpu, #name, num, &cpu->csr.name)); \
  18990. + store_csr (cpu, #name, num, &cpu->csr.name, \
  18991. + cpu->csr.name & !rs1); \
  18992. + break;
  18993. +#include "opcode/riscv-opc.h"
  18994. +#undef DECLARE_CSR
  18995. + }
  18996. + break;
  18997. + case MATCH_CSRRS:
  18998. + TRACE_INSN (cpu, "csrrs");
  18999. + switch (csr)
  19000. + {
  19001. +#define DECLARE_CSR(name, num, class, def_ver, abort_ver) \
  19002. + case num: \
  19003. + store_rd (cpu, rd, fetch_csr (cpu, #name, num, &cpu->csr.name)); \
  19004. + store_csr (cpu, #name, num, &cpu->csr.name, \
  19005. + cpu->csr.name | cpu->regs[rs1]); \
  19006. + break;
  19007. +#include "opcode/riscv-opc.h"
  19008. +#undef DECLARE_CSR
  19009. + }
  19010. + break;
  19011. + case MATCH_CSRRSI:
  19012. + TRACE_INSN (cpu, "csrrsi");
  19013. + switch (csr)
  19014. + {
  19015. +#define DECLARE_CSR(name, num, class, def_ver, abort_ver) \
  19016. + case num: \
  19017. + store_rd (cpu, rd, fetch_csr (cpu, #name, num, &cpu->csr.name)); \
  19018. + store_csr (cpu, #name, num, &cpu->csr.name, \
  19019. + cpu->csr.name | rs1); \
  19020. + break;
  19021. +#include "opcode/riscv-opc.h"
  19022. +#undef DECLARE_CSR
  19023. + }
  19024. + break;
  19025. + case MATCH_CSRRW:
  19026. + TRACE_INSN (cpu, "csrrw");
  19027. + switch (csr)
  19028. + {
  19029. +#define DECLARE_CSR(name, num, class, def_ver, abort_ver) \
  19030. + case num: \
  19031. + store_rd (cpu, rd, fetch_csr (cpu, #name, num, &cpu->csr.name)); \
  19032. + store_csr (cpu, #name, num, &cpu->csr.name, cpu->regs[rs1]); \
  19033. + break;
  19034. +#include "opcode/riscv-opc.h"
  19035. +#undef DECLARE_CSR
  19036. + }
  19037. + break;
  19038. + case MATCH_CSRRWI:
  19039. + TRACE_INSN (cpu, "csrrwi");
  19040. + switch (csr)
  19041. + {
  19042. +#define DECLARE_CSR(name, num, class, def_ver, abort_ver) \
  19043. + case num: \
  19044. + store_rd (cpu, rd, fetch_csr (cpu, #name, num, &cpu->csr.name)); \
  19045. + store_csr (cpu, #name, num, &cpu->csr.name, rs1); \
  19046. + break;
  19047. +#include "opcode/riscv-opc.h"
  19048. +#undef DECLARE_CSR
  19049. + }
  19050. + break;
  19051. +
  19052. + case MATCH_RDCYCLE:
  19053. + TRACE_INSN (cpu, "rdcycle %s;", rd_name);
  19054. + store_rd (cpu, rd, fetch_csr (cpu, "cycle", CSR_CYCLE, &cpu->csr.cycle));
  19055. + break;
  19056. + case MATCH_RDCYCLEH:
  19057. + TRACE_INSN (cpu, "rdcycleh %s;", rd_name);
  19058. + RISCV_ASSERT_RV32 (cpu, "insn: %s", op->name);
  19059. + store_rd (cpu, rd, fetch_csr (cpu, "cycleh", CSR_CYCLEH, &cpu->csr.cycleh));
  19060. + break;
  19061. + case MATCH_RDINSTRET:
  19062. + TRACE_INSN (cpu, "rdinstret %s;", rd_name);
  19063. + store_rd (cpu, rd, fetch_csr (cpu, "instret", CSR_INSTRET, &cpu->csr.instret));
  19064. + break;
  19065. + case MATCH_RDINSTRETH:
  19066. + TRACE_INSN (cpu, "rdinstreth %s;", rd_name);
  19067. + RISCV_ASSERT_RV32 (cpu, "insn: %s", op->name);
  19068. + store_rd (cpu, rd, fetch_csr (cpu, "instreth", CSR_INSTRETH, &cpu->csr.instreth));
  19069. + break;
  19070. + case MATCH_RDTIME:
  19071. + TRACE_INSN (cpu, "rdtime %s;", rd_name);
  19072. + store_rd (cpu, rd, fetch_csr (cpu, "time", CSR_TIME, &cpu->csr.cycle));
  19073. + break;
  19074. + case MATCH_RDTIMEH:
  19075. + TRACE_INSN (cpu, "rdtimeh %s;", rd_name);
  19076. + RISCV_ASSERT_RV32 (cpu, "insn: %s", op->name);
  19077. + store_rd (cpu, rd, fetch_csr (cpu, "timeh", CSR_TIMEH, &cpu->csr.cycleh));
  19078. + break;
  19079. +
  19080. + case MATCH_FENCE:
  19081. + TRACE_INSN (cpu, "fence;");
  19082. + break;
  19083. + case MATCH_FENCE_I:
  19084. + TRACE_INSN (cpu, "fence.i;");
  19085. + break;
  19086. + case MATCH_SBREAK:
  19087. + TRACE_INSN (cpu, "sbreak;");
  19088. + /* GDB expects us to step over SBREAK. */
  19089. + sim_engine_halt (sd, cpu, NULL, cpu->pc, sim_stopped, SIM_SIGTRAP);
  19090. + break;
  19091. + case MATCH_ECALL:
  19092. + TRACE_INSN (cpu, "ecall;");
  19093. + if (cb_target_to_host_syscall (STATE_CALLBACK (sd), cpu->a7) == -1)
  19094. + {
  19095. + host_callback *cb = STATE_CALLBACK (sd);
  19096. + CB_SYSCALL sc;
  19097. +
  19098. + CB_SYSCALL_INIT (&sc);
  19099. +
  19100. + sc.arg1 = cpu->a0;
  19101. + sc.arg2 = cpu->a1;
  19102. + sc.arg3 = cpu->a2;
  19103. + sc.arg4 = cpu->a3;
  19104. + sc.func = cpu->a7;
  19105. +
  19106. + sc.p1 = (PTR) sd;
  19107. + sc.p2 = (PTR) cpu;
  19108. + sc.read_mem = sim_syscall_read_mem;
  19109. + sc.write_mem = sim_syscall_write_mem;
  19110. +
  19111. + switch (cpu->a7)
  19112. + {
  19113. +#ifndef __MINGW32__
  19114. + case TARGET_SYS_link:
  19115. + {
  19116. + char oldpath[1024], newpath[1024];
  19117. + cb_get_string (cb, &sc, oldpath, sizeof (oldpath), sc.arg1);
  19118. + cb_get_string (cb, &sc, newpath, sizeof (newpath), sc.arg2);
  19119. + cpu->a0 = link (oldpath, newpath);
  19120. + break;
  19121. + }
  19122. +#endif
  19123. + case TARGET_SYS_brk:
  19124. + {
  19125. + /* FIXME: Check the invalid access. */
  19126. + if (cpu->a0 == 0)
  19127. + cpu->a0 = cpu->endbrk;
  19128. + else
  19129. + {
  19130. + if (cpu->a0 >= DEFAULT_MEM_SIZE)
  19131. + cpu->a0 = -1;
  19132. + else
  19133. + cpu->endbrk = cpu->a0;
  19134. + }
  19135. + break;
  19136. + }
  19137. + case TARGET_SYS_gettimeofday:
  19138. + {
  19139. + int rv;
  19140. + struct timeval tv;
  19141. +
  19142. + rv = gettimeofday (&tv, 0);
  19143. + if (RISCV_XLEN (cpu) == 32)
  19144. + {
  19145. + sim_core_write_unaligned_4 (cpu, cpu->pc, write_map,
  19146. + cpu->a0, tv.tv_sec);
  19147. + sim_core_write_unaligned_4 (cpu, cpu->pc, write_map,
  19148. + cpu->a0 + 4,
  19149. + tv.tv_usec);
  19150. + }
  19151. + else
  19152. + {
  19153. + sim_core_write_unaligned_8 (cpu, cpu->pc, write_map,
  19154. + cpu->a0, tv.tv_sec);
  19155. + sim_core_write_unaligned_8 (cpu, cpu->pc, write_map,
  19156. + cpu->a0 + 8,
  19157. + tv.tv_usec);
  19158. + }
  19159. +
  19160. + cpu->a0 = rv;
  19161. + break;
  19162. + }
  19163. + default:
  19164. + cpu->a0 = sim_syscall (cpu, cpu->a7, cpu->a0,
  19165. + cpu->a1, cpu->a2, cpu->a3);
  19166. + break;
  19167. + }
  19168. + }
  19169. + else
  19170. + cpu->a0 = sim_syscall (cpu, cpu->a7, cpu->a0, cpu->a1, cpu->a2, cpu->a3);
  19171. + break;
  19172. + default:
  19173. + TRACE_INSN (cpu, "UNHANDLED INSN: %s", op->name);
  19174. + sim_engine_halt (sd, cpu, NULL, cpu->pc, sim_signalled, SIM_SIGILL);
  19175. + }
  19176. +
  19177. + return pc;
  19178. +}
  19179. +
  19180. +static unsigned64
  19181. +mulhu (unsigned64 a, unsigned64 b)
  19182. +{
  19183. + uint64_t t;
  19184. + uint32_t y1, y2, y3;
  19185. + uint64_t a0 = (uint32_t)a, a1 = a >> 32;
  19186. + uint64_t b0 = (uint32_t)b, b1 = b >> 32;
  19187. +
  19188. + t = a1*b0 + ((a0*b0) >> 32);
  19189. + y1 = t;
  19190. + y2 = t >> 32;
  19191. +
  19192. + t = a0*b1 + y1;
  19193. + y1 = t;
  19194. +
  19195. + t = a1*b1 + y2 + (t >> 32);
  19196. + y2 = t;
  19197. + y3 = t >> 32;
  19198. +
  19199. + return ((uint64_t)y3 << 32) | y2;
  19200. +}
  19201. +
  19202. +static unsigned64
  19203. +mulh (signed64 a, signed64 b)
  19204. +{
  19205. + int negate = (a < 0) != (b < 0);
  19206. + uint64_t res = mulhu (a < 0 ? -a : a, b < 0 ? -b : b);
  19207. + return negate ? ~res + (a * b == 0) : res;
  19208. +}
  19209. +
  19210. +static unsigned64
  19211. +mulhsu (signed64 a, unsigned64 b)
  19212. +{
  19213. + int negate = a < 0;
  19214. + uint64_t res = mulhu (a < 0 ? -a : a, b);
  19215. + return negate ? ~res + (a * b == 0) : res;
  19216. +}
  19217. +
  19218. +static sim_cia
  19219. +execute_m (SIM_CPU *cpu, unsigned_word iw, const struct riscv_opcode *op)
  19220. +{
  19221. + SIM_DESC sd = CPU_STATE (cpu);
  19222. + int rd = (iw >> OP_SH_RD) & OP_MASK_RD;
  19223. + int rs1 = (iw >> OP_SH_RS1) & OP_MASK_RS1;
  19224. + int rs2 = (iw >> OP_SH_RS2) & OP_MASK_RS2;
  19225. + const char *rd_name = riscv_gpr_names_abi[rd];
  19226. + const char *rs1_name = riscv_gpr_names_abi[rs1];
  19227. + const char *rs2_name = riscv_gpr_names_abi[rs2];
  19228. + unsigned_word tmp, dividend_max;
  19229. + signed_word dividend32_max;
  19230. + sim_cia pc = cpu->pc + 4;
  19231. +
  19232. + dividend_max = -((unsigned_word)1 << (WITH_TARGET_WORD_BITSIZE - 1));
  19233. + dividend32_max = INT32_MIN;
  19234. +
  19235. + switch (op->match)
  19236. + {
  19237. + case MATCH_DIV:
  19238. + TRACE_INSN (cpu, "div %s, %s, %s; // %s = %s / %s",
  19239. + rd_name, rs1_name, rs2_name, rd_name, rs1_name, rs2_name);
  19240. + if (cpu->regs[rs1] == dividend_max && cpu->regs[rs2] == -1)
  19241. + tmp = dividend_max;
  19242. + else if (cpu->regs[rs2])
  19243. + tmp = (signed_word)cpu->regs[rs1] / (signed_word)cpu->regs[rs2];
  19244. + else
  19245. + tmp = -1;
  19246. + store_rd (cpu, rd, tmp);
  19247. + break;
  19248. + case MATCH_DIVW:
  19249. + TRACE_INSN (cpu, "divw %s, %s, %s; // %s = %s / %s",
  19250. + rd_name, rs1_name, rs2_name, rd_name, rs1_name, rs2_name);
  19251. + RISCV_ASSERT_RV64 (cpu, "insn: %s", op->name);
  19252. + if (EXTEND32 (cpu->regs[rs1]) == dividend32_max
  19253. + && EXTEND32 (cpu->regs[rs2]) == -1)
  19254. + tmp = 1 << 31;
  19255. + else if (EXTEND32 (cpu->regs[rs2]))
  19256. + tmp = EXTEND32 (cpu->regs[rs1]) / EXTEND32 (cpu->regs[rs2]);
  19257. + else
  19258. + tmp = -1;
  19259. + store_rd (cpu, rd, EXTEND32 (tmp));
  19260. + break;
  19261. + case MATCH_DIVU:
  19262. + TRACE_INSN (cpu, "divu %s, %s, %s; // %s = %s / %s",
  19263. + rd_name, rs1_name, rs2_name, rd_name, rs1_name, rs2_name);
  19264. + if (cpu->regs[rs2])
  19265. + store_rd (cpu, rd, (unsigned_word)cpu->regs[rs1]
  19266. + / (unsigned_word)cpu->regs[rs2]);
  19267. + else
  19268. + store_rd (cpu, rd, -1);
  19269. + break;
  19270. + case MATCH_DIVUW:
  19271. + TRACE_INSN (cpu, "divuw %s, %s, %s; // %s = %s / %s",
  19272. + rd_name, rs1_name, rs2_name, rd_name, rs1_name, rs2_name);
  19273. + RISCV_ASSERT_RV64 (cpu, "insn: %s", op->name);
  19274. + if ((unsigned32)cpu->regs[rs2])
  19275. + tmp = (unsigned32)cpu->regs[rs1] / (unsigned32)cpu->regs[rs2];
  19276. + else
  19277. + tmp = -1;
  19278. + store_rd (cpu, rd, EXTEND32 (tmp));
  19279. + break;
  19280. + case MATCH_MUL:
  19281. + TRACE_INSN (cpu, "mul %s, %s, %s; // %s = %s * %s",
  19282. + rd_name, rs1_name, rs2_name, rd_name, rs1_name, rs2_name);
  19283. + store_rd (cpu, rd, cpu->regs[rs1] * cpu->regs[rs2]);
  19284. + break;
  19285. + case MATCH_MULW:
  19286. + TRACE_INSN (cpu, "mulw %s, %s, %s; // %s = %s * %s",
  19287. + rd_name, rs1_name, rs2_name, rd_name, rs1_name, rs2_name);
  19288. + RISCV_ASSERT_RV64 (cpu, "insn: %s", op->name);
  19289. + store_rd (cpu, rd, EXTEND32 ((signed32)cpu->regs[rs1]
  19290. + * (signed32)cpu->regs[rs2]));
  19291. + break;
  19292. + case MATCH_MULH:
  19293. + TRACE_INSN (cpu, "mulh %s, %s, %s; // %s = %s * %s",
  19294. + rd_name, rs1_name, rs2_name, rd_name, rs1_name, rs2_name);
  19295. + if (RISCV_XLEN (cpu) == 32)
  19296. + store_rd (cpu, rd, ((signed64)(signed_word)cpu->regs[rs1]
  19297. + * (signed64)(signed_word)cpu->regs[rs2]) >> 32);
  19298. + else
  19299. + store_rd (cpu, rd, mulh (cpu->regs[rs1], cpu->regs[rs2]));
  19300. + break;
  19301. + case MATCH_MULHU:
  19302. + TRACE_INSN (cpu, "mulhu %s, %s, %s; // %s = %s * %s",
  19303. + rd_name, rs1_name, rs2_name, rd_name, rs1_name, rs2_name);
  19304. + if (RISCV_XLEN (cpu) == 32)
  19305. + store_rd (cpu, rd, ((unsigned64)cpu->regs[rs1]
  19306. + * (unsigned64)cpu->regs[rs2]) >> 32);
  19307. + else
  19308. + store_rd (cpu, rd, mulhu (cpu->regs[rs1], cpu->regs[rs2]));
  19309. + break;
  19310. + case MATCH_MULHSU:
  19311. + TRACE_INSN (cpu, "mulhsu %s, %s, %s; // %s = %s * %s",
  19312. + rd_name, rs1_name, rs2_name, rd_name, rs1_name, rs2_name);
  19313. + if (RISCV_XLEN (cpu) == 32)
  19314. + store_rd (cpu, rd, ((signed64)(signed_word)cpu->regs[rs1]
  19315. + * (unsigned64)cpu->regs[rs2]) >> 32);
  19316. + else
  19317. + store_rd (cpu, rd, mulhsu (cpu->regs[rs1], cpu->regs[rs2]));
  19318. + break;
  19319. + case MATCH_REM:
  19320. + TRACE_INSN (cpu, "rem %s, %s, %s; // %s = %s %% %s",
  19321. + rd_name, rs1_name, rs2_name, rd_name, rs1_name, rs2_name);
  19322. + if (cpu->regs[rs1] == dividend_max && cpu->regs[rs2] == -1)
  19323. + tmp = 0;
  19324. + else if (cpu->regs[rs2])
  19325. + tmp = (signed_word)cpu->regs[rs1] % (signed_word)cpu->regs[rs2];
  19326. + else
  19327. + tmp = cpu->regs[rs1];
  19328. + store_rd (cpu, rd, tmp);
  19329. + break;
  19330. + case MATCH_REMW:
  19331. + TRACE_INSN (cpu, "remw %s, %s, %s; // %s = %s %% %s",
  19332. + rd_name, rs1_name, rs2_name, rd_name, rs1_name, rs2_name);
  19333. + RISCV_ASSERT_RV64 (cpu, "insn: %s", op->name);
  19334. + if (EXTEND32 (cpu->regs[rs1]) == dividend32_max
  19335. + && EXTEND32 (cpu->regs[rs2]) == -1)
  19336. + tmp = 0;
  19337. + else if (EXTEND32 (cpu->regs[rs2]))
  19338. + tmp = EXTEND32 (cpu->regs[rs1]) % EXTEND32 (cpu->regs[rs2]);
  19339. + else
  19340. + tmp = cpu->regs[rs1];
  19341. + store_rd (cpu, rd, EXTEND32 (tmp));
  19342. + break;
  19343. + case MATCH_REMU:
  19344. + TRACE_INSN (cpu, "remu %s, %s, %s; // %s = %s %% %s",
  19345. + rd_name, rs1_name, rs2_name, rd_name, rs1_name, rs2_name);
  19346. + if (cpu->regs[rs2])
  19347. + store_rd (cpu, rd, cpu->regs[rs1] % cpu->regs[rs2]);
  19348. + else
  19349. + store_rd (cpu, rd, cpu->regs[rs1]);
  19350. + break;
  19351. + case MATCH_REMUW:
  19352. + TRACE_INSN (cpu, "remuw %s, %s, %s; // %s = %s %% %s",
  19353. + rd_name, rs1_name, rs2_name, rd_name, rs1_name, rs2_name);
  19354. + RISCV_ASSERT_RV64 (cpu, "insn: %s", op->name);
  19355. + if ((unsigned32)cpu->regs[rs2])
  19356. + tmp = (unsigned32)cpu->regs[rs1] % (unsigned32)cpu->regs[rs2];
  19357. + else
  19358. + tmp = cpu->regs[rs1];
  19359. + store_rd (cpu, rd, EXTEND32 (tmp));
  19360. + break;
  19361. + default:
  19362. + TRACE_INSN (cpu, "UNHANDLED INSN: %s", op->name);
  19363. + sim_engine_halt (sd, cpu, NULL, cpu->pc, sim_signalled, SIM_SIGILL);
  19364. + }
  19365. +
  19366. + return pc;
  19367. +}
  19368. +
  19369. +#define MAX(a, b) ((a) > (b) ? (a) : (b))
  19370. +#define MIN(a, b) ((a) < (b) ? (a) : (b))
  19371. +
  19372. +static sim_cia
  19373. +execute_a (SIM_CPU *cpu, unsigned_word iw, const struct riscv_opcode *op)
  19374. +{
  19375. + SIM_DESC sd = CPU_STATE (cpu);
  19376. + int rd = (iw >> OP_SH_RD) & OP_MASK_RD;
  19377. + int rs1 = (iw >> OP_SH_RS1) & OP_MASK_RS1;
  19378. + int rs2 = (iw >> OP_SH_RS2) & OP_MASK_RS2;
  19379. + const char *rd_name = riscv_gpr_names_abi[rd];
  19380. + const char *rs1_name = riscv_gpr_names_abi[rs1];
  19381. + const char *rs2_name = riscv_gpr_names_abi[rs2];
  19382. + struct atomic_mem_reserved_list *amo_prev, *amo_curr;
  19383. + insn_t aqrl_mask = (OP_MASK_AQ << OP_SH_AQ) | (OP_MASK_RL << OP_SH_RL);
  19384. + unsigned_word tmp;
  19385. + unsigned_word rs2_val = cpu->regs[rs2];
  19386. + sim_cia pc = cpu->pc + 4;
  19387. +
  19388. + /* Handle these two load/store operations specifically. */
  19389. + switch (op->match & ~aqrl_mask)
  19390. + {
  19391. + case MATCH_LR_W:
  19392. + TRACE_INSN (cpu, "%s %s, (%s);", op->name, rd_name, rs1_name);
  19393. + store_rd (cpu, rd,
  19394. + sim_core_read_unaligned_4 (cpu, cpu->pc, read_map, cpu->regs[rs1]));
  19395. +
  19396. + /* Walk the reservation list to find an existing match. */
  19397. + amo_curr = sd->amo_reserved_list;
  19398. + while (amo_curr)
  19399. + {
  19400. + if (amo_curr->addr == cpu->regs[rs1])
  19401. + goto done;
  19402. + amo_curr = amo_curr->next;
  19403. + }
  19404. +
  19405. + /* No reservation exists, so add one. */
  19406. + amo_curr = xmalloc (sizeof (*amo_curr));
  19407. + amo_curr->addr = cpu->regs[rs1];
  19408. + amo_curr->next = sd->amo_reserved_list;
  19409. + sd->amo_reserved_list = amo_curr;
  19410. + goto done;
  19411. + case MATCH_SC_W:
  19412. + TRACE_INSN (cpu, "%s %s, %s, (%s);", op->name, rd_name, rs2_name, rs1_name);
  19413. +
  19414. + /* Walk the reservation list to find a match. */
  19415. + amo_curr = amo_prev = sd->amo_reserved_list;
  19416. + while (amo_curr)
  19417. + {
  19418. + if (amo_curr->addr == cpu->regs[rs1])
  19419. + {
  19420. + /* We found a reservation, so operate it. */
  19421. + sim_core_write_unaligned_4 (cpu, cpu->pc, write_map,
  19422. + cpu->regs[rs1], cpu->regs[rs2]);
  19423. + store_rd (cpu, rd, 0);
  19424. + if (amo_curr == sd->amo_reserved_list)
  19425. + sd->amo_reserved_list = amo_curr->next;
  19426. + else
  19427. + amo_prev->next = amo_curr->next;
  19428. + free (amo_curr);
  19429. + goto done;
  19430. + }
  19431. + amo_prev = amo_curr;
  19432. + amo_curr = amo_curr->next;
  19433. + }
  19434. +
  19435. + /* If we're still here, then no reservation exists, so mark as failed. */
  19436. + store_rd (cpu, rd, 1);
  19437. + goto done;
  19438. + }
  19439. +
  19440. + /* Handle the rest of the atomic insns with common code paths. */
  19441. + TRACE_INSN (cpu, "%s %s, %s, (%s);",
  19442. + op->name, rd_name, rs2_name, rs1_name);
  19443. + if (op->xlen_requirement == 64)
  19444. + tmp = sim_core_read_unaligned_8 (cpu, cpu->pc, read_map, cpu->regs[rs1]);
  19445. + else
  19446. + tmp = EXTEND32 (sim_core_read_unaligned_4 (cpu, cpu->pc,
  19447. + read_map, cpu->regs[rs1]));
  19448. +
  19449. + store_rd (cpu, rd, tmp);
  19450. +
  19451. + switch (op->match & ~aqrl_mask)
  19452. + {
  19453. + case MATCH_AMOADD_D:
  19454. + case MATCH_AMOADD_W:
  19455. + tmp = tmp + cpu->regs[rs2];
  19456. + break;
  19457. + case MATCH_AMOAND_D:
  19458. + case MATCH_AMOAND_W:
  19459. + tmp = tmp & cpu->regs[rs2];
  19460. + break;
  19461. + case MATCH_AMOMAX_D:
  19462. + case MATCH_AMOMAX_W:
  19463. + tmp = MAX ((signed_word)tmp, (signed_word)cpu->regs[rs2]);
  19464. + break;
  19465. + case MATCH_AMOMAXU_D:
  19466. + case MATCH_AMOMAXU_W:
  19467. + tmp = MAX ((unsigned_word)tmp, (unsigned_word)cpu->regs[rs2]);
  19468. + break;
  19469. + case MATCH_AMOMIN_D:
  19470. + case MATCH_AMOMIN_W:
  19471. + tmp = MIN ((signed_word)tmp, (signed_word)cpu->regs[rs2]);
  19472. + break;
  19473. + case MATCH_AMOMINU_D:
  19474. + case MATCH_AMOMINU_W:
  19475. + tmp = MIN ((unsigned_word)tmp, (unsigned_word)cpu->regs[rs2]);
  19476. + break;
  19477. + case MATCH_AMOOR_D:
  19478. + case MATCH_AMOOR_W:
  19479. + tmp = tmp | cpu->regs[rs2];
  19480. + break;
  19481. + case MATCH_AMOSWAP_D:
  19482. + case MATCH_AMOSWAP_W:
  19483. + tmp = rs2_val;
  19484. + break;
  19485. + case MATCH_AMOXOR_D:
  19486. + case MATCH_AMOXOR_W:
  19487. + tmp = tmp ^ cpu->regs[rs2];
  19488. + break;
  19489. + default:
  19490. + TRACE_INSN (cpu, "UNHANDLED INSN: %s", op->name);
  19491. + sim_engine_halt (sd, cpu, NULL, cpu->pc, sim_signalled, SIM_SIGILL);
  19492. + }
  19493. +
  19494. + if (op->xlen_requirement == 64)
  19495. + sim_core_write_unaligned_8 (cpu, cpu->pc, write_map, cpu->regs[rs1], tmp);
  19496. + else
  19497. + sim_core_write_unaligned_4 (cpu, cpu->pc, write_map, cpu->regs[rs1], tmp);
  19498. +
  19499. + done:
  19500. + return pc;
  19501. +}
  19502. +
  19503. +static sim_cia
  19504. +execute_one (SIM_CPU *cpu, unsigned_word iw, const struct riscv_opcode *op)
  19505. +{
  19506. + SIM_DESC sd = CPU_STATE (cpu);
  19507. + int index;
  19508. +
  19509. + if (op->xlen_requirement == 32)
  19510. + RISCV_ASSERT_RV32 (cpu, "insn: %s", op->name);
  19511. + else if (op->xlen_requirement == 64)
  19512. + RISCV_ASSERT_RV64 (cpu, "insn: %s", op->name);
  19513. +
  19514. + switch (op->insn_class)
  19515. + {
  19516. + case INSN_CLASS_A:
  19517. + return execute_a (cpu, iw, op);
  19518. + case INSN_CLASS_C:
  19519. + case INSN_CLASS_F_AND_C:
  19520. + case INSN_CLASS_D_AND_C:
  19521. + return execute_c (cpu, iw, op);
  19522. + case INSN_CLASS_D:
  19523. + return execute_d (cpu, iw, op);
  19524. + case INSN_CLASS_F:
  19525. + return execute_f (cpu, iw, op);
  19526. + case INSN_CLASS_I:
  19527. + return execute_i (cpu, iw, op);
  19528. + case INSN_CLASS_M:
  19529. + return execute_m (cpu, iw, op);
  19530. + case_default:
  19531. + default:
  19532. + TRACE_INSN (cpu, "UNHANDLED EXTENSION: %d", op->insn_class);
  19533. + sim_engine_halt (sd, cpu, NULL, cpu->pc, sim_signalled, SIM_SIGILL);
  19534. + }
  19535. +
  19536. + return cpu->pc + riscv_insn_length (iw);
  19537. +}
  19538. +
  19539. +/* Decode & execute a single instruction. */
  19540. +void step_once (SIM_CPU *cpu)
  19541. +{
  19542. + SIM_DESC sd = CPU_STATE (cpu);
  19543. + unsigned_word iw;
  19544. + unsigned int len;
  19545. + sim_cia pc = cpu->pc;
  19546. + const struct riscv_opcode *op;
  19547. + int xlen = RISCV_XLEN (cpu);
  19548. +
  19549. + if (TRACE_ANY_P (cpu))
  19550. + trace_prefix (sd, cpu, NULL_CIA, pc, TRACE_LINENUM_P (cpu),
  19551. + NULL, 0, " "); /* Use a space for gcc warnings. */
  19552. +
  19553. + iw = sim_core_read_aligned_2 (cpu, pc, exec_map, pc);
  19554. +
  19555. + len = riscv_insn_length (iw);
  19556. +
  19557. + if (len == 4)
  19558. + iw |= ((unsigned_word)sim_core_read_aligned_2 (cpu, pc, exec_map, pc + 2) << 16);
  19559. +
  19560. + TRACE_CORE (cpu, "0x%08" PRIxTW, iw);
  19561. +
  19562. + op = riscv_hash[OP_HASH_IDX (iw)];
  19563. + if (!op)
  19564. + sim_engine_halt (sd, cpu, NULL, pc, sim_signalled, SIM_SIGILL);
  19565. +
  19566. + for (; op->name; op++)
  19567. + {
  19568. + /* Does the opcode match? */
  19569. + if (!(op->match_func) (op, iw))
  19570. + continue;
  19571. + /* Is this a pseudo-instruction? */
  19572. + if ((op->pinfo & INSN_ALIAS))
  19573. + continue;
  19574. + /* Is this instruction restricted to a certain value of XLEN? */
  19575. + if (op->xlen_requirement != 0 && op->xlen_requirement != xlen)
  19576. + continue;
  19577. + /* It's a match. */
  19578. + pc = execute_one (cpu, iw, op);
  19579. + break;
  19580. + }
  19581. +
  19582. + /* TODO: Try to use a common counter and only update on demand (reads). */
  19583. + if (RISCV_XLEN (cpu) == 32)
  19584. + {
  19585. + unsigned_word old_cycle = cpu->csr.cycle++;
  19586. +
  19587. + /* Increase cycleh if cycle is overflowed. */
  19588. + if (old_cycle > cpu->csr.cycle)
  19589. + cpu->csr.cycleh++;
  19590. + }
  19591. + else
  19592. + ++cpu->csr.cycle;
  19593. +
  19594. + cpu->csr.instret = cpu->csr.cycle;
  19595. + cpu->csr.instreth = cpu->csr.cycleh;
  19596. +
  19597. + cpu->pc = pc;
  19598. +}
  19599. +
  19600. +/* Return the program counter for this cpu. */
  19601. +static sim_cia
  19602. +pc_get (sim_cpu *cpu)
  19603. +{
  19604. + return cpu->pc;
  19605. +}
  19606. +
  19607. +/* Set the program counter for this cpu to the new pc value. */
  19608. +static void
  19609. +pc_set (sim_cpu *cpu, sim_cia pc)
  19610. +{
  19611. + cpu->pc = pc;
  19612. +}
  19613. +
  19614. +static int
  19615. +reg_fetch (sim_cpu *cpu, int rn, unsigned char *buf, int len)
  19616. +{
  19617. + if (len <= 0 || len > sizeof (unsigned_word))
  19618. + return -1;
  19619. +
  19620. + switch (rn)
  19621. + {
  19622. + case SIM_RISCV_RA_REGNUM ... SIM_RISCV_T6_REGNUM:
  19623. + memcpy (buf, &cpu->regs[rn], len);
  19624. + return len;
  19625. + case SIM_RISCV_FIRST_FP_REGNUM ... SIM_RISCV_LAST_FP_REGNUM:
  19626. + rn -= SIM_RISCV_FIRST_FP_REGNUM;
  19627. + memcpy (buf, &cpu->fpregs[rn], len);
  19628. + return len;
  19629. + case SIM_RISCV_PC_REGNUM:
  19630. + memcpy (buf, &cpu->pc, len);
  19631. + return len;
  19632. +
  19633. +#define DECLARE_CSR(name, num, class, def_ver, abort_ver) \
  19634. + case SIM_RISCV_ ## num ## _REGNUM: \
  19635. + memcpy (buf, &cpu->csr.name, len); \
  19636. + return len;
  19637. +#include "opcode/riscv-opc.h"
  19638. +#undef DECLARE_CSR
  19639. +
  19640. + default:
  19641. + return -1;
  19642. + }
  19643. +}
  19644. +
  19645. +static int
  19646. +reg_store (sim_cpu *cpu, int rn, unsigned char *buf, int len)
  19647. +{
  19648. + if (len <= 0 || len > sizeof (unsigned_word))
  19649. + return -1;
  19650. +
  19651. + switch (rn)
  19652. + {
  19653. + case SIM_RISCV_ZERO_REGNUM:
  19654. + /* Always return len to avoid warning/error in gdbsim_store_register. */
  19655. + return len;
  19656. + case SIM_RISCV_RA_REGNUM ... SIM_RISCV_T6_REGNUM:
  19657. + memcpy (&cpu->regs[rn], buf, len);
  19658. + return len;
  19659. + case SIM_RISCV_FIRST_FP_REGNUM ... SIM_RISCV_LAST_FP_REGNUM:
  19660. + rn -= SIM_RISCV_FIRST_FP_REGNUM;
  19661. + memcpy (&cpu->fpregs[rn], buf, len);
  19662. + return len;
  19663. + case SIM_RISCV_PC_REGNUM:
  19664. + memcpy (&cpu->pc, buf, len);
  19665. + return len;
  19666. +
  19667. +#define DECLARE_CSR(name, num, class, def_ver, abort_ver) \
  19668. + case SIM_RISCV_ ## num ## _REGNUM: \
  19669. + memcpy (&cpu->csr.name, buf, len); \
  19670. + return len;
  19671. +#include "opcode/riscv-opc.h"
  19672. +#undef DECLARE_CSR
  19673. +
  19674. + default:
  19675. + return -1;
  19676. + }
  19677. +}
  19678. +
  19679. +/* Initialize the state for a single cpu. Usuaully this involves clearing all
  19680. + registers back to their reset state. Should also hook up the fetch/store
  19681. + helper functions too. */
  19682. +void initialize_cpu (SIM_DESC sd, SIM_CPU *cpu, int mhartid)
  19683. +{
  19684. + const char *extensions;
  19685. + int i;
  19686. +
  19687. + memset (cpu->regs, 0, sizeof (cpu->regs));
  19688. +
  19689. + CPU_PC_FETCH (cpu) = pc_get;
  19690. + CPU_PC_STORE (cpu) = pc_set;
  19691. + CPU_REG_FETCH (cpu) = reg_fetch;
  19692. + CPU_REG_STORE (cpu) = reg_store;
  19693. +
  19694. + if (!riscv_hash[0])
  19695. + {
  19696. + const struct riscv_opcode *op;
  19697. +
  19698. + for (op = riscv_opcodes; op->name; op++)
  19699. + if (!riscv_hash[OP_HASH_IDX (op->match)])
  19700. + riscv_hash[OP_HASH_IDX (op->match)] = op;
  19701. + }
  19702. +
  19703. + cpu->csr.misa = 0;
  19704. + /* RV32 sets this field to 0, and we don't really support RV128 yet. */
  19705. + if (RISCV_XLEN (cpu) == 64)
  19706. + cpu->csr.misa |= (unsigned64)2 << 62;
  19707. +
  19708. + /* Skip the leading "rv" prefix and the two numbers. */
  19709. + extensions = MODEL_NAME (CPU_MODEL (cpu)) + 4;
  19710. + for (i = 0; i < 26; ++i)
  19711. + {
  19712. + char ext = 'A' + i;
  19713. +
  19714. + if (ext == 'X')
  19715. + continue;
  19716. + else if (strchr (extensions, ext) != NULL)
  19717. + {
  19718. + if (ext == 'G')
  19719. + cpu->csr.misa |= 0x1129; /* G = IMAFD. */
  19720. + else
  19721. + cpu->csr.misa |= (1 << i);
  19722. + }
  19723. + }
  19724. +
  19725. + cpu->csr.mimpid = 0x8000;
  19726. + cpu->csr.mhartid = mhartid;
  19727. + cpu->csr.cycle = 0;
  19728. + cpu->csr.cycleh = 0;
  19729. + cpu->csr.instret = 0;
  19730. + cpu->csr.instreth = 0;
  19731. +}
  19732. +
  19733. +/* Some utils don't like having a NULL environ. */
  19734. +static const char * const simple_env[] = { "HOME=/", "PATH=/bin", NULL };
  19735. +
  19736. +/* Count the number of arguments in an argv. */
  19737. +static int
  19738. +count_argv (const char * const *argv)
  19739. +{
  19740. + int i;
  19741. +
  19742. + if (!argv)
  19743. + return -1;
  19744. +
  19745. + for (i = 0; argv[i] != NULL; ++i)
  19746. + continue;
  19747. + return i;
  19748. +}
  19749. +
  19750. +void initialize_env (SIM_DESC sd, const char * const *argv,
  19751. + const char * const *env)
  19752. +{
  19753. + SIM_CPU *cpu = STATE_CPU (sd, 0);
  19754. + int i;
  19755. + int argc, argv_flat;
  19756. + int envc, env_flat;
  19757. + address_word sp, sp_flat;
  19758. + unsigned char null[8] = { 0, 0, 0, 0, 0, 0, 0, 0, };
  19759. +
  19760. + /* Figure out how many bytes the argv strings take up. */
  19761. + argc = count_argv (argv);
  19762. + if (argc == -1)
  19763. + argc = 0;
  19764. + argv_flat = argc; /* NUL bytes. */
  19765. + for (i = 0; i < argc; ++i)
  19766. + argv_flat += strlen (argv[i]);
  19767. +
  19768. + /* Figure out how many bytes the environ strings take up. */
  19769. + if (!env)
  19770. + env = simple_env;
  19771. + envc = count_argv (env);
  19772. + env_flat = envc; /* NUL bytes. */
  19773. + for (i = 0; i < envc; ++i)
  19774. + env_flat += strlen (env[i]);
  19775. +
  19776. + /* Make space for the strings themselves. */
  19777. + sp_flat = (DEFAULT_MEM_SIZE - argv_flat - env_flat) & -sizeof (address_word);
  19778. + /* Then the pointers to the strings. */
  19779. + sp = sp_flat - ((argc + 1 + envc + 1) * sizeof (address_word));
  19780. + /* Then the argc. */
  19781. + sp -= sizeof (unsigned_word);
  19782. + /* Synchronize sp alignment with GCC's STACK_BOUNDARY. */
  19783. + sp = ALIGN_16 (sp - 15);
  19784. +
  19785. + /* Set up the regs the libgloss crt0 expects. */
  19786. + cpu->a0 = argc;
  19787. + cpu->sp = sp;
  19788. +
  19789. + /* First push the argc value. */
  19790. + sim_write (sd, sp, (void *)&argc, sizeof (unsigned_word));
  19791. + sp += sizeof (unsigned_word);
  19792. +
  19793. + /* Then the actual argv strings so we know where to point argv[]. */
  19794. + for (i = 0; i < argc; ++i)
  19795. + {
  19796. + unsigned len = strlen (argv[i]) + 1;
  19797. + sim_write (sd, sp_flat, (void *)argv[i], len);
  19798. + sim_write (sd, sp, (void *)&sp_flat, sizeof (address_word));
  19799. + sp_flat += len;
  19800. + sp += sizeof (address_word);
  19801. + }
  19802. + sim_write (sd, sp, null, sizeof (address_word));
  19803. + sp += sizeof (address_word);
  19804. +
  19805. + /* Then the actual env strings so we know where to point env[]. */
  19806. + for (i = 0; i < envc; ++i)
  19807. + {
  19808. + unsigned len = strlen (env[i]) + 1;
  19809. + sim_write (sd, sp_flat, (void *)env[i], len);
  19810. + sim_write (sd, sp, (void *)&sp_flat, sizeof (address_word));
  19811. + sp_flat += len;
  19812. + sp += sizeof (address_word);
  19813. + }
  19814. +}
  19815. diff --git a/sim/riscv/sim-main.h b/sim/riscv/sim-main.h
  19816. new file mode 100644
  19817. index 0000000000..94b3b08047
  19818. --- /dev/null
  19819. +++ b/sim/riscv/sim-main.h
  19820. @@ -0,0 +1,100 @@
  19821. +/* RISC-V simulator.
  19822. +
  19823. + Copyright (C) 2005-2014 Free Software Foundation, Inc.
  19824. + Contributed by Mike Frysinger.
  19825. +
  19826. + This file is part of simulators.
  19827. +
  19828. + This program is free software; you can redistribute it and/or modify
  19829. + it under the terms of the GNU General Public License as published by
  19830. + the Free Software Foundation; either version 3 of the License, or
  19831. + (at your option) any later version.
  19832. +
  19833. + This program is distributed in the hope that it will be useful,
  19834. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  19835. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19836. + GNU General Public License for more details.
  19837. +
  19838. + You should have received a copy of the GNU General Public License
  19839. + along with this program. If not, see <http://www.gnu.org/licenses/>. */
  19840. +
  19841. +#ifndef SIM_MAIN_H
  19842. +#define SIM_MAIN_H
  19843. +
  19844. +#include "sim-basics.h"
  19845. +#include "machs.h"
  19846. +#include "sim-base.h"
  19847. +
  19848. +typedef union FRegisterValue
  19849. +{
  19850. + uint64_t v[2];
  19851. + uint32_t w[4];
  19852. +
  19853. + int64_t V[2];
  19854. + int32_t W[4];
  19855. +
  19856. + float S[4];
  19857. + double D[2];
  19858. +
  19859. +} FRegister;
  19860. +
  19861. +struct _sim_cpu {
  19862. + union {
  19863. + unsigned_word regs[32];
  19864. + struct {
  19865. + /* These are the ABI names. */
  19866. + unsigned_word zero, ra, sp, gp, tp;
  19867. + unsigned_word t0, t1, t2;
  19868. + unsigned_word s0, s1;
  19869. + unsigned_word a0, a1, a2, a3, a4, a5, a6, a7;
  19870. + unsigned_word s2, s3, s4, s5, s6, s7, s8, s9, s10, s11;
  19871. + unsigned_word t3, t4, t5, t6;
  19872. + };
  19873. + };
  19874. + union {
  19875. + FRegister fpregs[32];
  19876. + struct {
  19877. + /* These are the ABI names. */
  19878. + unsigned_word ft0, ft1, ft2, ft3, ft4, ft5, ft6, ft7;
  19879. + unsigned_word fs0, fs1;
  19880. + unsigned_word fa0, fa1, fa2, fa3, fa4, fa5, fa6, fa7;
  19881. + unsigned_word fs2, fs3, fs4, fs5, fs6, fs7, fs8, fs9, fs10, fs11;
  19882. + unsigned_word ft8, ft9, ft10, ft11;
  19883. + };
  19884. + };
  19885. + sim_cia pc;
  19886. + sim_cia endbrk;
  19887. +
  19888. + struct {
  19889. +#define DECLARE_CSR(name, num, class, def_ver, abort_ver) unsigned_word name;
  19890. +#include "opcode/riscv-opc.h"
  19891. +#undef DECLARE_CSR
  19892. + } csr;
  19893. +
  19894. + sim_cpu_base base;
  19895. +};
  19896. +
  19897. +struct atomic_mem_reserved_list;
  19898. +struct atomic_mem_reserved_list {
  19899. + struct atomic_mem_reserved_list *next;
  19900. + address_word addr;
  19901. +};
  19902. +
  19903. +struct sim_state {
  19904. + sim_cpu *cpu[MAX_NR_PROCESSORS];
  19905. + struct atomic_mem_reserved_list *amo_reserved_list;
  19906. +
  19907. + /* ... simulator specific members ... */
  19908. + sim_state_base base;
  19909. +};
  19910. +
  19911. +extern void step_once (SIM_CPU *);
  19912. +extern void initialize_cpu (SIM_DESC, SIM_CPU *, int);
  19913. +extern void initialize_env (SIM_DESC, const char * const *argv,
  19914. + const char * const *env);
  19915. +
  19916. +#define DEFAULT_MEM_SIZE (64 * 1024 * 1024)
  19917. +
  19918. +#define RISCV_XLEN(cpu) MACH_WORD_BITSIZE (CPU_MACH (cpu))
  19919. +
  19920. +#endif
  19921. diff --git a/sim/testsuite/configure b/sim/testsuite/configure
  19922. index c3674c2fa0..a52f7c2663 100755
  19923. --- a/sim/testsuite/configure
  19924. +++ b/sim/testsuite/configure
  19925. @@ -619,6 +619,7 @@ infodir
  19926. docdir
  19927. oldincludedir
  19928. includedir
  19929. +runstatedir
  19930. localstatedir
  19931. sharedstatedir
  19932. sysconfdir
  19933. @@ -686,6 +687,7 @@ datadir='${datarootdir}'
  19934. sysconfdir='${prefix}/etc'
  19935. sharedstatedir='${prefix}/com'
  19936. localstatedir='${prefix}/var'
  19937. +runstatedir='${localstatedir}/run'
  19938. includedir='${prefix}/include'
  19939. oldincludedir='/usr/include'
  19940. docdir='${datarootdir}/doc/${PACKAGE}'
  19941. @@ -938,6 +940,15 @@ do
  19942. | -silent | --silent | --silen | --sile | --sil)
  19943. silent=yes ;;
  19944. + -runstatedir | --runstatedir | --runstatedi | --runstated \
  19945. + | --runstate | --runstat | --runsta | --runst | --runs \
  19946. + | --run | --ru | --r)
  19947. + ac_prev=runstatedir ;;
  19948. + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
  19949. + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
  19950. + | --run=* | --ru=* | --r=*)
  19951. + runstatedir=$ac_optarg ;;
  19952. +
  19953. -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  19954. ac_prev=sbindir ;;
  19955. -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  19956. @@ -1075,7 +1086,7 @@ fi
  19957. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
  19958. datadir sysconfdir sharedstatedir localstatedir includedir \
  19959. oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
  19960. - libdir localedir mandir
  19961. + libdir localedir mandir runstatedir
  19962. do
  19963. eval ac_val=\$$ac_var
  19964. # Remove trailing slashes.
  19965. @@ -1228,6 +1239,7 @@ Fine tuning of the installation directories:
  19966. --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
  19967. --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
  19968. --localstatedir=DIR modifiable single-machine data [PREFIX/var]
  19969. + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
  19970. --libdir=DIR object code libraries [EPREFIX/lib]
  19971. --includedir=DIR C header files [PREFIX/include]
  19972. --oldincludedir=DIR C header files for non-gcc [/usr/include]
  19973. @@ -1934,6 +1946,9 @@ case "${target}" in
  19974. pru*-*-*)
  19975. sim_arch=pru
  19976. ;;
  19977. + riscv*-*-*)
  19978. + sim_arch=riscv
  19979. + ;;
  19980. rl78-*-*)
  19981. sim_arch=rl78
  19982. ;;
  19983. diff --git a/sim/testsuite/sim/riscv/ChangeLog b/sim/testsuite/sim/riscv/ChangeLog
  19984. new file mode 100644
  19985. index 0000000000..72dd0c36da
  19986. --- /dev/null
  19987. +++ b/sim/testsuite/sim/riscv/ChangeLog
  19988. @@ -0,0 +1,3 @@
  19989. +2015-03-29 Mike Frysinger <vapier@gentoo.org>
  19990. +
  19991. + * allinsn.exp, exit-0.s, exit-7.s, isa.inc, testutils.inc: New files.
  19992. diff --git a/sim/testsuite/sim/riscv/allinsn.exp b/sim/testsuite/sim/riscv/allinsn.exp
  19993. new file mode 100644
  19994. index 0000000000..4ed7cff5d2
  19995. --- /dev/null
  19996. +++ b/sim/testsuite/sim/riscv/allinsn.exp
  19997. @@ -0,0 +1,15 @@
  19998. +# mcore simulator testsuite
  19999. +
  20000. +if [istarget riscv-*] {
  20001. + # all machines
  20002. + set all_machs "riscv"
  20003. +
  20004. + foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.s]] {
  20005. + # If we're only testing specific files and this isn't one of them,
  20006. + # skip it.
  20007. + if ![runtest_file_p $runtests $src] {
  20008. + continue
  20009. + }
  20010. + run_sim_test $src $all_machs
  20011. + }
  20012. +}
  20013. diff --git a/sim/testsuite/sim/riscv/pass.s b/sim/testsuite/sim/riscv/pass.s
  20014. new file mode 100644
  20015. index 0000000000..bd428ca167
  20016. --- /dev/null
  20017. +++ b/sim/testsuite/sim/riscv/pass.s
  20018. @@ -0,0 +1,7 @@
  20019. +# check that the sim doesn't die immediately.
  20020. +# mach: riscv
  20021. +
  20022. +.include "testutils.inc"
  20023. +
  20024. + start
  20025. + pass
  20026. diff --git a/sim/testsuite/sim/riscv/testutils.inc b/sim/testsuite/sim/riscv/testutils.inc
  20027. new file mode 100644
  20028. index 0000000000..bb92ac0f4d
  20029. --- /dev/null
  20030. +++ b/sim/testsuite/sim/riscv/testutils.inc
  20031. @@ -0,0 +1,50 @@
  20032. +# MACRO: exit
  20033. + .macro exit nr
  20034. + li a0, \nr
  20035. + # The exit utility function.
  20036. + li a7, 93;
  20037. + .endm
  20038. +
  20039. +# MACRO: pass
  20040. +# Write 'pass' to stdout and quit
  20041. + .macro pass
  20042. + # syscall write().
  20043. + li a7, 64;
  20044. + # Use stdout.
  20045. + li a0, 1;
  20046. + # Point to the string.
  20047. + lla a1, 1f;
  20048. + # Number of bytes to write.
  20049. + li a2, 5;
  20050. + # Trigger OS trap.
  20051. + ecall;
  20052. + exit 0;
  20053. + .data
  20054. + 1: .asciz "pass\n"
  20055. + .endm
  20056. +
  20057. +# MACRO: fail
  20058. +# Write 'fail' to stdout and quit
  20059. + .macro fail
  20060. + # syscall write();
  20061. + li a7, 64;
  20062. + # Use stdout.
  20063. + li a0, 1;
  20064. + # Point to the string.
  20065. + lla a1, 1f;
  20066. + # Number of bytes to write.
  20067. + li a2, 5;
  20068. + # Trigger OS trap.
  20069. + ecall;
  20070. + exit 0;
  20071. + .data
  20072. + 1: .asciz "fail\n"
  20073. + .endm
  20074. +
  20075. +# MACRO: start
  20076. +# All assembler tests should start with a call to "start"
  20077. + .macro start
  20078. + .text
  20079. +.global _start
  20080. +_start:
  20081. + .endm
  20082. --
  20083. 2.33.0