libtool.m4 300 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399
  1. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
  2. #
  3. # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
  4. # Written by Gordon Matzigkeit, 1996
  5. #
  6. # This file is free software; the Free Software Foundation gives
  7. # unlimited permission to copy and/or distribute it, with or without
  8. # modifications, as long as this notice is preserved.
  9. m4_define([_LT_COPYING], [dnl
  10. # Copyright (C) 2014 Free Software Foundation, Inc.
  11. # This is free software; see the source for copying conditions. There is NO
  12. # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. # GNU Libtool is free software; you can redistribute it and/or modify
  14. # it under the terms of the GNU General Public License as published by
  15. # the Free Software Foundation; either version 2 of of the License, or
  16. # (at your option) any later version.
  17. #
  18. # As a special exception to the GNU General Public License, if you
  19. # distribute this file as part of a program or library that is built
  20. # using GNU Libtool, you may include this file under the same
  21. # distribution terms that you use for the rest of that program.
  22. #
  23. # GNU Libtool is distributed in the hope that it will be useful, but
  24. # WITHOUT ANY WARRANTY; without even the implied warranty of
  25. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  26. # GNU General Public License for more details.
  27. #
  28. # You should have received a copy of the GNU General Public License
  29. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  30. ])
  31. # serial 58 LT_INIT
  32. # LT_PREREQ(VERSION)
  33. # ------------------
  34. # Complain and exit if this libtool version is less that VERSION.
  35. m4_defun([LT_PREREQ],
  36. [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
  37. [m4_default([$3],
  38. [m4_fatal([Libtool version $1 or higher is required],
  39. 63)])],
  40. [$2])])
  41. # _LT_CHECK_BUILDDIR
  42. # ------------------
  43. # Complain if the absolute build directory name contains unusual characters
  44. m4_defun([_LT_CHECK_BUILDDIR],
  45. [case `pwd` in
  46. *\ * | *\ *)
  47. AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
  48. esac
  49. ])
  50. # LT_INIT([OPTIONS])
  51. # ------------------
  52. AC_DEFUN([LT_INIT],
  53. [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
  54. AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  55. AC_BEFORE([$0], [LT_LANG])dnl
  56. AC_BEFORE([$0], [LT_OUTPUT])dnl
  57. AC_BEFORE([$0], [LTDL_INIT])dnl
  58. m4_require([_LT_CHECK_BUILDDIR])dnl
  59. dnl Autoconf doesn't catch unexpanded LT_ macros by default:
  60. m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
  61. m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
  62. dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
  63. dnl unless we require an AC_DEFUNed macro:
  64. AC_REQUIRE([LTOPTIONS_VERSION])dnl
  65. AC_REQUIRE([LTSUGAR_VERSION])dnl
  66. AC_REQUIRE([LTVERSION_VERSION])dnl
  67. AC_REQUIRE([LTOBSOLETE_VERSION])dnl
  68. m4_require([_LT_PROG_LTMAIN])dnl
  69. _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
  70. dnl Parse OPTIONS
  71. _LT_SET_OPTIONS([$0], [$1])
  72. # This can be used to rebuild libtool when needed
  73. LIBTOOL_DEPS=$ltmain
  74. # Always use our own libtool.
  75. LIBTOOL='$(SHELL) $(top_builddir)/libtool'
  76. AC_SUBST(LIBTOOL)dnl
  77. _LT_SETUP
  78. # Only expand once:
  79. m4_define([LT_INIT])
  80. ])# LT_INIT
  81. # Old names:
  82. AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
  83. AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
  84. dnl aclocal-1.4 backwards compatibility:
  85. dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
  86. dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
  87. # _LT_PREPARE_CC_BASENAME
  88. # -----------------------
  89. m4_defun([_LT_PREPARE_CC_BASENAME], [
  90. # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
  91. func_cc_basename ()
  92. {
  93. for cc_temp in @S|@*""; do
  94. case $cc_temp in
  95. compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
  96. distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
  97. \-*) ;;
  98. *) break;;
  99. esac
  100. done
  101. func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
  102. }
  103. ])# _LT_PREPARE_CC_BASENAME
  104. # _LT_CC_BASENAME(CC)
  105. # -------------------
  106. # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
  107. # but that macro is also expanded into generated libtool script, which
  108. # arranges for $SED and $ECHO to be set by different means.
  109. m4_defun([_LT_CC_BASENAME],
  110. [m4_require([_LT_PREPARE_CC_BASENAME])dnl
  111. AC_REQUIRE([_LT_DECL_SED])dnl
  112. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
  113. func_cc_basename $1
  114. cc_basename=$func_cc_basename_result
  115. ])
  116. # _LT_FILEUTILS_DEFAULTS
  117. # ----------------------
  118. # It is okay to use these file commands and assume they have been set
  119. # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
  120. m4_defun([_LT_FILEUTILS_DEFAULTS],
  121. [: ${CP="cp -f"}
  122. : ${MV="mv -f"}
  123. : ${RM="rm -f"}
  124. ])# _LT_FILEUTILS_DEFAULTS
  125. # _LT_SETUP
  126. # ---------
  127. m4_defun([_LT_SETUP],
  128. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  129. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  130. AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
  131. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
  132. _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
  133. dnl
  134. _LT_DECL([], [host_alias], [0], [The host system])dnl
  135. _LT_DECL([], [host], [0])dnl
  136. _LT_DECL([], [host_os], [0])dnl
  137. dnl
  138. _LT_DECL([], [build_alias], [0], [The build system])dnl
  139. _LT_DECL([], [build], [0])dnl
  140. _LT_DECL([], [build_os], [0])dnl
  141. dnl
  142. AC_REQUIRE([AC_PROG_CC])dnl
  143. AC_REQUIRE([LT_PATH_LD])dnl
  144. AC_REQUIRE([LT_PATH_NM])dnl
  145. dnl
  146. AC_REQUIRE([AC_PROG_LN_S])dnl
  147. test -z "$LN_S" && LN_S="ln -s"
  148. _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
  149. dnl
  150. AC_REQUIRE([LT_CMD_MAX_LEN])dnl
  151. _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
  152. _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
  153. dnl
  154. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  155. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  156. m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
  157. m4_require([_LT_CMD_RELOAD])dnl
  158. m4_require([_LT_CHECK_MAGIC_METHOD])dnl
  159. m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
  160. m4_require([_LT_CMD_OLD_ARCHIVE])dnl
  161. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  162. m4_require([_LT_WITH_SYSROOT])dnl
  163. m4_require([_LT_CMD_TRUNCATE])dnl
  164. _LT_CONFIG_LIBTOOL_INIT([
  165. # See if we are running on zsh, and set the options that allow our
  166. # commands through without removal of \ escapes INIT.
  167. if test -n "\${ZSH_VERSION+set}"; then
  168. setopt NO_GLOB_SUBST
  169. fi
  170. ])
  171. if test -n "${ZSH_VERSION+set}"; then
  172. setopt NO_GLOB_SUBST
  173. fi
  174. _LT_CHECK_OBJDIR
  175. m4_require([_LT_TAG_COMPILER])dnl
  176. case $host_os in
  177. aix3*)
  178. # AIX sometimes has problems with the GCC collect2 program. For some
  179. # reason, if we set the COLLECT_NAMES environment variable, the problems
  180. # vanish in a puff of smoke.
  181. if test set != "${COLLECT_NAMES+set}"; then
  182. COLLECT_NAMES=
  183. export COLLECT_NAMES
  184. fi
  185. ;;
  186. esac
  187. # Global variables:
  188. ofile=libtool
  189. can_build_shared=yes
  190. # All known linkers require a '.a' archive for static linking (except MSVC and
  191. # ICC, which need '.lib').
  192. libext=a
  193. with_gnu_ld=$lt_cv_prog_gnu_ld
  194. old_CC=$CC
  195. old_CFLAGS=$CFLAGS
  196. # Set sane defaults for various variables
  197. test -z "$CC" && CC=cc
  198. test -z "$LTCC" && LTCC=$CC
  199. test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
  200. test -z "$LD" && LD=ld
  201. test -z "$ac_objext" && ac_objext=o
  202. _LT_CC_BASENAME([$compiler])
  203. # Only perform the check for file, if the check method requires it
  204. test -z "$MAGIC_CMD" && MAGIC_CMD=file
  205. case $deplibs_check_method in
  206. file_magic*)
  207. if test "$file_magic_cmd" = '$MAGIC_CMD'; then
  208. _LT_PATH_MAGIC
  209. fi
  210. ;;
  211. esac
  212. # Use C for the default configuration in the libtool script
  213. LT_SUPPORTED_TAG([CC])
  214. _LT_LANG_C_CONFIG
  215. _LT_LANG_DEFAULT_CONFIG
  216. _LT_CONFIG_COMMANDS
  217. ])# _LT_SETUP
  218. # _LT_PREPARE_SED_QUOTE_VARS
  219. # --------------------------
  220. # Define a few sed substitution that help us do robust quoting.
  221. m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
  222. [# Backslashify metacharacters that are still active within
  223. # double-quoted strings.
  224. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
  225. # Same as above, but do not quote variable references.
  226. double_quote_subst='s/\([["`\\]]\)/\\\1/g'
  227. # Sed substitution to delay expansion of an escaped shell variable in a
  228. # double_quote_subst'ed string.
  229. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
  230. # Sed substitution to delay expansion of an escaped single quote.
  231. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
  232. # Sed substitution to avoid accidental globbing in evaled expressions
  233. no_glob_subst='s/\*/\\\*/g'
  234. ])
  235. # _LT_PROG_LTMAIN
  236. # ---------------
  237. # Note that this code is called both from 'configure', and 'config.status'
  238. # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
  239. # 'config.status' has no value for ac_aux_dir unless we are using Automake,
  240. # so we pass a copy along to make sure it has a sensible value anyway.
  241. m4_defun([_LT_PROG_LTMAIN],
  242. [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
  243. _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
  244. ltmain=$ac_aux_dir/ltmain.sh
  245. ])# _LT_PROG_LTMAIN
  246. ## ------------------------------------- ##
  247. ## Accumulate code for creating libtool. ##
  248. ## ------------------------------------- ##
  249. # So that we can recreate a full libtool script including additional
  250. # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
  251. # in macros and then make a single call at the end using the 'libtool'
  252. # label.
  253. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
  254. # ----------------------------------------
  255. # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  256. m4_define([_LT_CONFIG_LIBTOOL_INIT],
  257. [m4_ifval([$1],
  258. [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
  259. [$1
  260. ])])])
  261. # Initialize.
  262. m4_define([_LT_OUTPUT_LIBTOOL_INIT])
  263. # _LT_CONFIG_LIBTOOL([COMMANDS])
  264. # ------------------------------
  265. # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  266. m4_define([_LT_CONFIG_LIBTOOL],
  267. [m4_ifval([$1],
  268. [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
  269. [$1
  270. ])])])
  271. # Initialize.
  272. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
  273. # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
  274. # -----------------------------------------------------
  275. m4_defun([_LT_CONFIG_SAVE_COMMANDS],
  276. [_LT_CONFIG_LIBTOOL([$1])
  277. _LT_CONFIG_LIBTOOL_INIT([$2])
  278. ])
  279. # _LT_FORMAT_COMMENT([COMMENT])
  280. # -----------------------------
  281. # Add leading comment marks to the start of each line, and a trailing
  282. # full-stop to the whole comment if one is not present already.
  283. m4_define([_LT_FORMAT_COMMENT],
  284. [m4_ifval([$1], [
  285. m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
  286. [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
  287. )])
  288. ## ------------------------ ##
  289. ## FIXME: Eliminate VARNAME ##
  290. ## ------------------------ ##
  291. # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
  292. # -------------------------------------------------------------------
  293. # CONFIGNAME is the name given to the value in the libtool script.
  294. # VARNAME is the (base) name used in the configure script.
  295. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
  296. # VARNAME. Any other value will be used directly.
  297. m4_define([_LT_DECL],
  298. [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
  299. [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
  300. [m4_ifval([$1], [$1], [$2])])
  301. lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
  302. m4_ifval([$4],
  303. [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
  304. lt_dict_add_subkey([lt_decl_dict], [$2],
  305. [tagged?], [m4_ifval([$5], [yes], [no])])])
  306. ])
  307. # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
  308. # --------------------------------------------------------
  309. m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
  310. # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
  311. # ------------------------------------------------
  312. m4_define([lt_decl_tag_varnames],
  313. [_lt_decl_filter([tagged?], [yes], $@)])
  314. # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
  315. # ---------------------------------------------------------
  316. m4_define([_lt_decl_filter],
  317. [m4_case([$#],
  318. [0], [m4_fatal([$0: too few arguments: $#])],
  319. [1], [m4_fatal([$0: too few arguments: $#: $1])],
  320. [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
  321. [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
  322. [lt_dict_filter([lt_decl_dict], $@)])[]dnl
  323. ])
  324. # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
  325. # --------------------------------------------------
  326. m4_define([lt_decl_quote_varnames],
  327. [_lt_decl_filter([value], [1], $@)])
  328. # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
  329. # ---------------------------------------------------
  330. m4_define([lt_decl_dquote_varnames],
  331. [_lt_decl_filter([value], [2], $@)])
  332. # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
  333. # ---------------------------------------------------
  334. m4_define([lt_decl_varnames_tagged],
  335. [m4_assert([$# <= 2])dnl
  336. _$0(m4_quote(m4_default([$1], [[, ]])),
  337. m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
  338. m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
  339. m4_define([_lt_decl_varnames_tagged],
  340. [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
  341. # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
  342. # ------------------------------------------------
  343. m4_define([lt_decl_all_varnames],
  344. [_$0(m4_quote(m4_default([$1], [[, ]])),
  345. m4_if([$2], [],
  346. m4_quote(lt_decl_varnames),
  347. m4_quote(m4_shift($@))))[]dnl
  348. ])
  349. m4_define([_lt_decl_all_varnames],
  350. [lt_join($@, lt_decl_varnames_tagged([$1],
  351. lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
  352. ])
  353. # _LT_CONFIG_STATUS_DECLARE([VARNAME])
  354. # ------------------------------------
  355. # Quote a variable value, and forward it to 'config.status' so that its
  356. # declaration there will have the same value as in 'configure'. VARNAME
  357. # must have a single quote delimited value for this to work.
  358. m4_define([_LT_CONFIG_STATUS_DECLARE],
  359. [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
  360. # _LT_CONFIG_STATUS_DECLARATIONS
  361. # ------------------------------
  362. # We delimit libtool config variables with single quotes, so when
  363. # we write them to config.status, we have to be sure to quote all
  364. # embedded single quotes properly. In configure, this macro expands
  365. # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
  366. #
  367. # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
  368. m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
  369. [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
  370. [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
  371. # _LT_LIBTOOL_TAGS
  372. # ----------------
  373. # Output comment and list of tags supported by the script
  374. m4_defun([_LT_LIBTOOL_TAGS],
  375. [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
  376. available_tags='_LT_TAGS'dnl
  377. ])
  378. # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
  379. # -----------------------------------
  380. # Extract the dictionary values for VARNAME (optionally with TAG) and
  381. # expand to a commented shell variable setting:
  382. #
  383. # # Some comment about what VAR is for.
  384. # visible_name=$lt_internal_name
  385. m4_define([_LT_LIBTOOL_DECLARE],
  386. [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
  387. [description])))[]dnl
  388. m4_pushdef([_libtool_name],
  389. m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
  390. m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
  391. [0], [_libtool_name=[$]$1],
  392. [1], [_libtool_name=$lt_[]$1],
  393. [2], [_libtool_name=$lt_[]$1],
  394. [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
  395. m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
  396. ])
  397. # _LT_LIBTOOL_CONFIG_VARS
  398. # -----------------------
  399. # Produce commented declarations of non-tagged libtool config variables
  400. # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
  401. # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
  402. # section) are produced by _LT_LIBTOOL_TAG_VARS.
  403. m4_defun([_LT_LIBTOOL_CONFIG_VARS],
  404. [m4_foreach([_lt_var],
  405. m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
  406. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
  407. # _LT_LIBTOOL_TAG_VARS(TAG)
  408. # -------------------------
  409. m4_define([_LT_LIBTOOL_TAG_VARS],
  410. [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
  411. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
  412. # _LT_TAGVAR(VARNAME, [TAGNAME])
  413. # ------------------------------
  414. m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
  415. # _LT_CONFIG_COMMANDS
  416. # -------------------
  417. # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
  418. # variables for single and double quote escaping we saved from calls
  419. # to _LT_DECL, we can put quote escaped variables declarations
  420. # into 'config.status', and then the shell code to quote escape them in
  421. # for loops in 'config.status'. Finally, any additional code accumulated
  422. # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
  423. m4_defun([_LT_CONFIG_COMMANDS],
  424. [AC_PROVIDE_IFELSE([LT_OUTPUT],
  425. dnl If the libtool generation code has been placed in $CONFIG_LT,
  426. dnl instead of duplicating it all over again into config.status,
  427. dnl then we will have config.status run $CONFIG_LT later, so it
  428. dnl needs to know what name is stored there:
  429. [AC_CONFIG_COMMANDS([libtool],
  430. [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
  431. dnl If the libtool generation code is destined for config.status,
  432. dnl expand the accumulated commands and init code now:
  433. [AC_CONFIG_COMMANDS([libtool],
  434. [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
  435. ])#_LT_CONFIG_COMMANDS
  436. # Initialize.
  437. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
  438. [
  439. # The HP-UX ksh and POSIX shell print the target directory to stdout
  440. # if CDPATH is set.
  441. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  442. sed_quote_subst='$sed_quote_subst'
  443. double_quote_subst='$double_quote_subst'
  444. delay_variable_subst='$delay_variable_subst'
  445. _LT_CONFIG_STATUS_DECLARATIONS
  446. LTCC='$LTCC'
  447. LTCFLAGS='$LTCFLAGS'
  448. compiler='$compiler_DEFAULT'
  449. # A function that is used when there is no print builtin or printf.
  450. func_fallback_echo ()
  451. {
  452. eval 'cat <<_LTECHO_EOF
  453. \$[]1
  454. _LTECHO_EOF'
  455. }
  456. # Quote evaled strings.
  457. for var in lt_decl_all_varnames([[ \
  458. ]], lt_decl_quote_varnames); do
  459. case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  460. *[[\\\\\\\`\\"\\\$]]*)
  461. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
  462. ;;
  463. *)
  464. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  465. ;;
  466. esac
  467. done
  468. # Double-quote double-evaled strings.
  469. for var in lt_decl_all_varnames([[ \
  470. ]], lt_decl_dquote_varnames); do
  471. case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  472. *[[\\\\\\\`\\"\\\$]]*)
  473. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
  474. ;;
  475. *)
  476. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  477. ;;
  478. esac
  479. done
  480. _LT_OUTPUT_LIBTOOL_INIT
  481. ])
  482. # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
  483. # ------------------------------------
  484. # Generate a child script FILE with all initialization necessary to
  485. # reuse the environment learned by the parent script, and make the
  486. # file executable. If COMMENT is supplied, it is inserted after the
  487. # '#!' sequence but before initialization text begins. After this
  488. # macro, additional text can be appended to FILE to form the body of
  489. # the child script. The macro ends with non-zero status if the
  490. # file could not be fully written (such as if the disk is full).
  491. m4_ifdef([AS_INIT_GENERATED],
  492. [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
  493. [m4_defun([_LT_GENERATED_FILE_INIT],
  494. [m4_require([AS_PREPARE])]dnl
  495. [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
  496. [lt_write_fail=0
  497. cat >$1 <<_ASEOF || lt_write_fail=1
  498. #! $SHELL
  499. # Generated by $as_me.
  500. $2
  501. SHELL=\${CONFIG_SHELL-$SHELL}
  502. export SHELL
  503. _ASEOF
  504. cat >>$1 <<\_ASEOF || lt_write_fail=1
  505. AS_SHELL_SANITIZE
  506. _AS_PREPARE
  507. exec AS_MESSAGE_FD>&1
  508. _ASEOF
  509. test 0 = "$lt_write_fail" && chmod +x $1[]dnl
  510. m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
  511. # LT_OUTPUT
  512. # ---------
  513. # This macro allows early generation of the libtool script (before
  514. # AC_OUTPUT is called), incase it is used in configure for compilation
  515. # tests.
  516. AC_DEFUN([LT_OUTPUT],
  517. [: ${CONFIG_LT=./config.lt}
  518. AC_MSG_NOTICE([creating $CONFIG_LT])
  519. _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
  520. [# Run this file to recreate a libtool stub with the current configuration.])
  521. cat >>"$CONFIG_LT" <<\_LTEOF
  522. lt_cl_silent=false
  523. exec AS_MESSAGE_LOG_FD>>config.log
  524. {
  525. echo
  526. AS_BOX([Running $as_me.])
  527. } >&AS_MESSAGE_LOG_FD
  528. lt_cl_help="\
  529. '$as_me' creates a local libtool stub from the current configuration,
  530. for use in further configure time tests before the real libtool is
  531. generated.
  532. Usage: $[0] [[OPTIONS]]
  533. -h, --help print this help, then exit
  534. -V, --version print version number, then exit
  535. -q, --quiet do not print progress messages
  536. -d, --debug don't remove temporary files
  537. Report bugs to <[email protected]>."
  538. lt_cl_version="\
  539. m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
  540. m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
  541. configured by $[0], generated by m4_PACKAGE_STRING.
  542. Copyright (C) 2011 Free Software Foundation, Inc.
  543. This config.lt script is free software; the Free Software Foundation
  544. gives unlimited permision to copy, distribute and modify it."
  545. while test 0 != $[#]
  546. do
  547. case $[1] in
  548. --version | --v* | -V )
  549. echo "$lt_cl_version"; exit 0 ;;
  550. --help | --h* | -h )
  551. echo "$lt_cl_help"; exit 0 ;;
  552. --debug | --d* | -d )
  553. debug=: ;;
  554. --quiet | --q* | --silent | --s* | -q )
  555. lt_cl_silent=: ;;
  556. -*) AC_MSG_ERROR([unrecognized option: $[1]
  557. Try '$[0] --help' for more information.]) ;;
  558. *) AC_MSG_ERROR([unrecognized argument: $[1]
  559. Try '$[0] --help' for more information.]) ;;
  560. esac
  561. shift
  562. done
  563. if $lt_cl_silent; then
  564. exec AS_MESSAGE_FD>/dev/null
  565. fi
  566. _LTEOF
  567. cat >>"$CONFIG_LT" <<_LTEOF
  568. _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
  569. _LTEOF
  570. cat >>"$CONFIG_LT" <<\_LTEOF
  571. AC_MSG_NOTICE([creating $ofile])
  572. _LT_OUTPUT_LIBTOOL_COMMANDS
  573. AS_EXIT(0)
  574. _LTEOF
  575. chmod +x "$CONFIG_LT"
  576. # configure is writing to config.log, but config.lt does its own redirection,
  577. # appending to config.log, which fails on DOS, as config.log is still kept
  578. # open by configure. Here we exec the FD to /dev/null, effectively closing
  579. # config.log, so it can be properly (re)opened and appended to by config.lt.
  580. lt_cl_success=:
  581. test yes = "$silent" &&
  582. lt_config_lt_args="$lt_config_lt_args --quiet"
  583. exec AS_MESSAGE_LOG_FD>/dev/null
  584. $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
  585. exec AS_MESSAGE_LOG_FD>>config.log
  586. $lt_cl_success || AS_EXIT(1)
  587. ])# LT_OUTPUT
  588. # _LT_CONFIG(TAG)
  589. # ---------------
  590. # If TAG is the built-in tag, create an initial libtool script with a
  591. # default configuration from the untagged config vars. Otherwise add code
  592. # to config.status for appending the configuration named by TAG from the
  593. # matching tagged config vars.
  594. m4_defun([_LT_CONFIG],
  595. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  596. _LT_CONFIG_SAVE_COMMANDS([
  597. m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
  598. m4_if(_LT_TAG, [C], [
  599. # See if we are running on zsh, and set the options that allow our
  600. # commands through without removal of \ escapes.
  601. if test -n "${ZSH_VERSION+set}"; then
  602. setopt NO_GLOB_SUBST
  603. fi
  604. cfgfile=${ofile}T
  605. trap "$RM \"$cfgfile\"; exit 1" 1 2 15
  606. $RM "$cfgfile"
  607. cat <<_LT_EOF >> "$cfgfile"
  608. #! $SHELL
  609. # Generated automatically by $as_me ($PACKAGE) $VERSION
  610. # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  611. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  612. # Provide generalized library-building support services.
  613. # Written by Gordon Matzigkeit, 1996
  614. _LT_COPYING
  615. _LT_LIBTOOL_TAGS
  616. # Configured defaults for sys_lib_dlsearch_path munging.
  617. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
  618. # ### BEGIN LIBTOOL CONFIG
  619. _LT_LIBTOOL_CONFIG_VARS
  620. _LT_LIBTOOL_TAG_VARS
  621. # ### END LIBTOOL CONFIG
  622. _LT_EOF
  623. cat <<'_LT_EOF' >> "$cfgfile"
  624. # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
  625. _LT_PREPARE_MUNGE_PATH_LIST
  626. _LT_PREPARE_CC_BASENAME
  627. # ### END FUNCTIONS SHARED WITH CONFIGURE
  628. _LT_EOF
  629. case $host_os in
  630. aix3*)
  631. cat <<\_LT_EOF >> "$cfgfile"
  632. # AIX sometimes has problems with the GCC collect2 program. For some
  633. # reason, if we set the COLLECT_NAMES environment variable, the problems
  634. # vanish in a puff of smoke.
  635. if test set != "${COLLECT_NAMES+set}"; then
  636. COLLECT_NAMES=
  637. export COLLECT_NAMES
  638. fi
  639. _LT_EOF
  640. ;;
  641. esac
  642. _LT_PROG_LTMAIN
  643. # We use sed instead of cat because bash on DJGPP gets confused if
  644. # if finds mixed CR/LF and LF-only lines. Since sed operates in
  645. # text mode, it properly converts lines to CR/LF. This bash problem
  646. # is reportedly fixed, but why not run on old versions too?
  647. sed '$q' "$ltmain" >> "$cfgfile" \
  648. || (rm -f "$cfgfile"; exit 1)
  649. mv -f "$cfgfile" "$ofile" ||
  650. (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
  651. chmod +x "$ofile"
  652. ],
  653. [cat <<_LT_EOF >> "$ofile"
  654. dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
  655. dnl in a comment (ie after a #).
  656. # ### BEGIN LIBTOOL TAG CONFIG: $1
  657. _LT_LIBTOOL_TAG_VARS(_LT_TAG)
  658. # ### END LIBTOOL TAG CONFIG: $1
  659. _LT_EOF
  660. ])dnl /m4_if
  661. ],
  662. [m4_if([$1], [], [
  663. PACKAGE='$PACKAGE'
  664. VERSION='$VERSION'
  665. RM='$RM'
  666. ofile='$ofile'], [])
  667. ])dnl /_LT_CONFIG_SAVE_COMMANDS
  668. ])# _LT_CONFIG
  669. # LT_SUPPORTED_TAG(TAG)
  670. # ---------------------
  671. # Trace this macro to discover what tags are supported by the libtool
  672. # --tag option, using:
  673. # autoconf --trace 'LT_SUPPORTED_TAG:$1'
  674. AC_DEFUN([LT_SUPPORTED_TAG], [])
  675. # C support is built-in for now
  676. m4_define([_LT_LANG_C_enabled], [])
  677. m4_define([_LT_TAGS], [])
  678. # LT_LANG(LANG)
  679. # -------------
  680. # Enable libtool support for the given language if not already enabled.
  681. AC_DEFUN([LT_LANG],
  682. [AC_BEFORE([$0], [LT_OUTPUT])dnl
  683. m4_case([$1],
  684. [C], [_LT_LANG(C)],
  685. [C++], [_LT_LANG(CXX)],
  686. [Go], [_LT_LANG(GO)],
  687. [Java], [_LT_LANG(GCJ)],
  688. [Fortran 77], [_LT_LANG(F77)],
  689. [Fortran], [_LT_LANG(FC)],
  690. [Windows Resource], [_LT_LANG(RC)],
  691. [m4_ifdef([_LT_LANG_]$1[_CONFIG],
  692. [_LT_LANG($1)],
  693. [m4_fatal([$0: unsupported language: "$1"])])])dnl
  694. ])# LT_LANG
  695. # _LT_LANG(LANGNAME)
  696. # ------------------
  697. m4_defun([_LT_LANG],
  698. [m4_ifdef([_LT_LANG_]$1[_enabled], [],
  699. [LT_SUPPORTED_TAG([$1])dnl
  700. m4_append([_LT_TAGS], [$1 ])dnl
  701. m4_define([_LT_LANG_]$1[_enabled], [])dnl
  702. _LT_LANG_$1_CONFIG($1)])dnl
  703. ])# _LT_LANG
  704. m4_ifndef([AC_PROG_GO], [
  705. ############################################################
  706. # NOTE: This macro has been submitted for inclusion into #
  707. # GNU Autoconf as AC_PROG_GO. When it is available in #
  708. # a released version of Autoconf we should remove this #
  709. # macro and use it instead. #
  710. ############################################################
  711. m4_defun([AC_PROG_GO],
  712. [AC_LANG_PUSH(Go)dnl
  713. AC_ARG_VAR([GOC], [Go compiler command])dnl
  714. AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
  715. _AC_ARG_VAR_LDFLAGS()dnl
  716. AC_CHECK_TOOL(GOC, gccgo)
  717. if test -z "$GOC"; then
  718. if test -n "$ac_tool_prefix"; then
  719. AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
  720. fi
  721. fi
  722. if test -z "$GOC"; then
  723. AC_CHECK_PROG(GOC, gccgo, gccgo, false)
  724. fi
  725. ])#m4_defun
  726. ])#m4_ifndef
  727. # _LT_LANG_DEFAULT_CONFIG
  728. # -----------------------
  729. m4_defun([_LT_LANG_DEFAULT_CONFIG],
  730. [AC_PROVIDE_IFELSE([AC_PROG_CXX],
  731. [LT_LANG(CXX)],
  732. [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
  733. AC_PROVIDE_IFELSE([AC_PROG_F77],
  734. [LT_LANG(F77)],
  735. [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
  736. AC_PROVIDE_IFELSE([AC_PROG_FC],
  737. [LT_LANG(FC)],
  738. [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
  739. dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
  740. dnl pulling things in needlessly.
  741. AC_PROVIDE_IFELSE([AC_PROG_GCJ],
  742. [LT_LANG(GCJ)],
  743. [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
  744. [LT_LANG(GCJ)],
  745. [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
  746. [LT_LANG(GCJ)],
  747. [m4_ifdef([AC_PROG_GCJ],
  748. [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
  749. m4_ifdef([A][M_PROG_GCJ],
  750. [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
  751. m4_ifdef([LT_PROG_GCJ],
  752. [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
  753. AC_PROVIDE_IFELSE([AC_PROG_GO],
  754. [LT_LANG(GO)],
  755. [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
  756. AC_PROVIDE_IFELSE([LT_PROG_RC],
  757. [LT_LANG(RC)],
  758. [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
  759. ])# _LT_LANG_DEFAULT_CONFIG
  760. # Obsolete macros:
  761. AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
  762. AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
  763. AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
  764. AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
  765. AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
  766. dnl aclocal-1.4 backwards compatibility:
  767. dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
  768. dnl AC_DEFUN([AC_LIBTOOL_F77], [])
  769. dnl AC_DEFUN([AC_LIBTOOL_FC], [])
  770. dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
  771. dnl AC_DEFUN([AC_LIBTOOL_RC], [])
  772. # _LT_TAG_COMPILER
  773. # ----------------
  774. m4_defun([_LT_TAG_COMPILER],
  775. [AC_REQUIRE([AC_PROG_CC])dnl
  776. _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
  777. _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
  778. _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
  779. _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
  780. # If no C compiler was specified, use CC.
  781. LTCC=${LTCC-"$CC"}
  782. # If no C compiler flags were specified, use CFLAGS.
  783. LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
  784. # Allow CC to be a program name with arguments.
  785. compiler=$CC
  786. ])# _LT_TAG_COMPILER
  787. # _LT_COMPILER_BOILERPLATE
  788. # ------------------------
  789. # Check for compiler boilerplate output or warnings with
  790. # the simple compiler test code.
  791. m4_defun([_LT_COMPILER_BOILERPLATE],
  792. [m4_require([_LT_DECL_SED])dnl
  793. ac_outfile=conftest.$ac_objext
  794. echo "$lt_simple_compile_test_code" >conftest.$ac_ext
  795. eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  796. _lt_compiler_boilerplate=`cat conftest.err`
  797. $RM conftest*
  798. ])# _LT_COMPILER_BOILERPLATE
  799. # _LT_LINKER_BOILERPLATE
  800. # ----------------------
  801. # Check for linker boilerplate output or warnings with
  802. # the simple link test code.
  803. m4_defun([_LT_LINKER_BOILERPLATE],
  804. [m4_require([_LT_DECL_SED])dnl
  805. ac_outfile=conftest.$ac_objext
  806. echo "$lt_simple_link_test_code" >conftest.$ac_ext
  807. eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  808. _lt_linker_boilerplate=`cat conftest.err`
  809. $RM -r conftest*
  810. ])# _LT_LINKER_BOILERPLATE
  811. # _LT_REQUIRED_DARWIN_CHECKS
  812. # -------------------------
  813. m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
  814. case $host_os in
  815. rhapsody* | darwin*)
  816. AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
  817. AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
  818. AC_CHECK_TOOL([LIPO], [lipo], [:])
  819. AC_CHECK_TOOL([OTOOL], [otool], [:])
  820. AC_CHECK_TOOL([OTOOL64], [otool64], [:])
  821. _LT_DECL([], [DSYMUTIL], [1],
  822. [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
  823. _LT_DECL([], [NMEDIT], [1],
  824. [Tool to change global to local symbols on Mac OS X])
  825. _LT_DECL([], [LIPO], [1],
  826. [Tool to manipulate fat objects and archives on Mac OS X])
  827. _LT_DECL([], [OTOOL], [1],
  828. [ldd/readelf like tool for Mach-O binaries on Mac OS X])
  829. _LT_DECL([], [OTOOL64], [1],
  830. [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
  831. AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
  832. [lt_cv_apple_cc_single_mod=no
  833. if test -z "$LT_MULTI_MODULE"; then
  834. # By default we will add the -single_module flag. You can override
  835. # by either setting the environment variable LT_MULTI_MODULE
  836. # non-empty at configure time, or by adding -multi_module to the
  837. # link flags.
  838. rm -rf libconftest.dylib*
  839. echo "int foo(void){return 1;}" > conftest.c
  840. echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  841. -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
  842. $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  843. -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
  844. _lt_result=$?
  845. # If there is a non-empty error log, and "single_module"
  846. # appears in it, assume the flag caused a linker warning
  847. if test -s conftest.err && $GREP single_module conftest.err; then
  848. cat conftest.err >&AS_MESSAGE_LOG_FD
  849. # Otherwise, if the output was created with a 0 exit code from
  850. # the compiler, it worked.
  851. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
  852. lt_cv_apple_cc_single_mod=yes
  853. else
  854. cat conftest.err >&AS_MESSAGE_LOG_FD
  855. fi
  856. rm -rf libconftest.dylib*
  857. rm -f conftest.*
  858. fi])
  859. # Feature test to disable chained fixups since it is not
  860. # compatible with '-undefined dynamic_lookup'
  861. AC_CACHE_CHECK([for -no_fixup_chains linker flag],
  862. [lt_cv_support_no_fixup_chains],
  863. [ save_LDFLAGS=$LDFLAGS
  864. LDFLAGS="$LDFLAGS -Wl,-no_fixup_chains"
  865. AC_LINK_IFELSE(
  866. [AC_LANG_PROGRAM([],[])],
  867. lt_cv_support_no_fixup_chains=yes,
  868. lt_cv_support_no_fixup_chains=no
  869. )
  870. LDFLAGS=$save_LDFLAGS
  871. ]
  872. )
  873. AC_CACHE_CHECK([for -exported_symbols_list linker flag],
  874. [lt_cv_ld_exported_symbols_list],
  875. [lt_cv_ld_exported_symbols_list=no
  876. save_LDFLAGS=$LDFLAGS
  877. echo "_main" > conftest.sym
  878. LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
  879. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  880. [lt_cv_ld_exported_symbols_list=yes],
  881. [lt_cv_ld_exported_symbols_list=no])
  882. LDFLAGS=$save_LDFLAGS
  883. ])
  884. AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
  885. [lt_cv_ld_force_load=no
  886. cat > conftest.c << _LT_EOF
  887. int forced_loaded() { return 2;}
  888. _LT_EOF
  889. echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
  890. $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
  891. echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
  892. $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
  893. echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
  894. $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
  895. cat > conftest.c << _LT_EOF
  896. int main(void) { return 0;}
  897. _LT_EOF
  898. echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
  899. $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
  900. _lt_result=$?
  901. if test -s conftest.err && $GREP force_load conftest.err; then
  902. cat conftest.err >&AS_MESSAGE_LOG_FD
  903. elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
  904. lt_cv_ld_force_load=yes
  905. else
  906. cat conftest.err >&AS_MESSAGE_LOG_FD
  907. fi
  908. rm -f conftest.err libconftest.a conftest conftest.c
  909. rm -rf conftest.dSYM
  910. ])
  911. case $host_os in
  912. rhapsody* | darwin1.[[012]])
  913. _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
  914. darwin1.*)
  915. _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
  916. darwin*)
  917. case $MACOSX_DEPLOYMENT_TARGET,$host in
  918. 10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
  919. _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
  920. *)
  921. if test yes = "$lt_cv_support_no_fixup_chains"; then
  922. _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup $wl-no_fixup_chains'
  923. else
  924. _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup'
  925. fi
  926. ;;
  927. esac
  928. ;;
  929. esac
  930. if test yes = "$lt_cv_apple_cc_single_mod"; then
  931. _lt_dar_single_mod='$single_module'
  932. fi
  933. if test yes = "$lt_cv_ld_exported_symbols_list"; then
  934. _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
  935. else
  936. _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
  937. fi
  938. if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
  939. _lt_dsymutil='~$DSYMUTIL $lib || :'
  940. else
  941. _lt_dsymutil=
  942. fi
  943. ;;
  944. esac
  945. ])
  946. # _LT_DARWIN_LINKER_FEATURES([TAG])
  947. # ---------------------------------
  948. # Checks for linker and compiler features on darwin
  949. m4_defun([_LT_DARWIN_LINKER_FEATURES],
  950. [
  951. m4_require([_LT_REQUIRED_DARWIN_CHECKS])
  952. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  953. _LT_TAGVAR(hardcode_direct, $1)=no
  954. _LT_TAGVAR(hardcode_automatic, $1)=yes
  955. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  956. if test yes = "$lt_cv_ld_force_load"; then
  957. _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
  958. m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
  959. [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
  960. else
  961. _LT_TAGVAR(whole_archive_flag_spec, $1)=''
  962. fi
  963. _LT_TAGVAR(link_all_deplibs, $1)=yes
  964. _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
  965. case $cc_basename in
  966. ifort*|nagfor*) _lt_dar_can_shared=yes ;;
  967. *) _lt_dar_can_shared=$GCC ;;
  968. esac
  969. if test yes = "$_lt_dar_can_shared"; then
  970. output_verbose_link_cmd=func_echo_all
  971. _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
  972. _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
  973. _LT_TAGVAR(archive_expsym_cmds, $1)="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"
  974. _LT_TAGVAR(module_expsym_cmds, $1)="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"
  975. m4_if([$1], [CXX],
  976. [ if test yes != "$lt_cv_apple_cc_single_mod"; then
  977. _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
  978. _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
  979. fi
  980. ],[])
  981. else
  982. _LT_TAGVAR(ld_shlibs, $1)=no
  983. fi
  984. ])
  985. # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
  986. # ----------------------------------
  987. # Links a minimal program and checks the executable
  988. # for the system default hardcoded library path. In most cases,
  989. # this is /usr/lib:/lib, but when the MPI compilers are used
  990. # the location of the communication and MPI libs are included too.
  991. # If we don't find anything, use the default library path according
  992. # to the aix ld manual.
  993. # Store the results from the different compilers for each TAGNAME.
  994. # Allow to override them for all tags through lt_cv_aix_libpath.
  995. m4_defun([_LT_SYS_MODULE_PATH_AIX],
  996. [m4_require([_LT_DECL_SED])dnl
  997. if test set = "${lt_cv_aix_libpath+set}"; then
  998. aix_libpath=$lt_cv_aix_libpath
  999. else
  1000. AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
  1001. [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
  1002. lt_aix_libpath_sed='[
  1003. /Import File Strings/,/^$/ {
  1004. /^0/ {
  1005. s/^0 *\([^ ]*\) *$/\1/
  1006. p
  1007. }
  1008. }]'
  1009. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  1010. # Check for a 64-bit object if we didn't find anything.
  1011. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
  1012. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  1013. fi],[])
  1014. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
  1015. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
  1016. fi
  1017. ])
  1018. aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
  1019. fi
  1020. ])# _LT_SYS_MODULE_PATH_AIX
  1021. # _LT_SHELL_INIT(ARG)
  1022. # -------------------
  1023. m4_define([_LT_SHELL_INIT],
  1024. [m4_divert_text([M4SH-INIT], [$1
  1025. ])])# _LT_SHELL_INIT
  1026. # _LT_PROG_ECHO_BACKSLASH
  1027. # -----------------------
  1028. # Find how we can fake an echo command that does not interpret backslash.
  1029. # In particular, with Autoconf 2.60 or later we add some code to the start
  1030. # of the generated configure script that will find a shell with a builtin
  1031. # printf (that we can use as an echo command).
  1032. m4_defun([_LT_PROG_ECHO_BACKSLASH],
  1033. [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  1034. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  1035. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  1036. AC_MSG_CHECKING([how to print strings])
  1037. # Test print first, because it will be a builtin if present.
  1038. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
  1039. test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
  1040. ECHO='print -r --'
  1041. elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
  1042. ECHO='printf %s\n'
  1043. else
  1044. # Use this function as a fallback that always works.
  1045. func_fallback_echo ()
  1046. {
  1047. eval 'cat <<_LTECHO_EOF
  1048. $[]1
  1049. _LTECHO_EOF'
  1050. }
  1051. ECHO='func_fallback_echo'
  1052. fi
  1053. # func_echo_all arg...
  1054. # Invoke $ECHO with all args, space-separated.
  1055. func_echo_all ()
  1056. {
  1057. $ECHO "$*"
  1058. }
  1059. case $ECHO in
  1060. printf*) AC_MSG_RESULT([printf]) ;;
  1061. print*) AC_MSG_RESULT([print -r]) ;;
  1062. *) AC_MSG_RESULT([cat]) ;;
  1063. esac
  1064. m4_ifdef([_AS_DETECT_SUGGESTED],
  1065. [_AS_DETECT_SUGGESTED([
  1066. test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
  1067. ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  1068. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  1069. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  1070. PATH=/empty FPATH=/empty; export PATH FPATH
  1071. test "X`printf %s $ECHO`" = "X$ECHO" \
  1072. || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
  1073. _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
  1074. _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
  1075. ])# _LT_PROG_ECHO_BACKSLASH
  1076. # _LT_WITH_SYSROOT
  1077. # ----------------
  1078. AC_DEFUN([_LT_WITH_SYSROOT],
  1079. [AC_MSG_CHECKING([for sysroot])
  1080. AC_ARG_WITH([sysroot],
  1081. [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
  1082. [Search for dependent libraries within DIR (or the compiler's sysroot
  1083. if not specified).])],
  1084. [], [with_sysroot=no])
  1085. dnl lt_sysroot will always be passed unquoted. We quote it here
  1086. dnl in case the user passed a directory name.
  1087. lt_sysroot=
  1088. case $with_sysroot in #(
  1089. yes)
  1090. if test yes = "$GCC"; then
  1091. lt_sysroot=`$CC --print-sysroot 2>/dev/null`
  1092. fi
  1093. ;; #(
  1094. /*)
  1095. lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
  1096. ;; #(
  1097. no|'')
  1098. ;; #(
  1099. *)
  1100. AC_MSG_RESULT([$with_sysroot])
  1101. AC_MSG_ERROR([The sysroot must be an absolute path.])
  1102. ;;
  1103. esac
  1104. AC_MSG_RESULT([${lt_sysroot:-no}])
  1105. _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
  1106. [dependent libraries, and where our libraries should be installed.])])
  1107. # _LT_ENABLE_LOCK
  1108. # ---------------
  1109. m4_defun([_LT_ENABLE_LOCK],
  1110. [AC_ARG_ENABLE([libtool-lock],
  1111. [AS_HELP_STRING([--disable-libtool-lock],
  1112. [avoid locking (might break parallel builds)])])
  1113. test no = "$enable_libtool_lock" || enable_libtool_lock=yes
  1114. # Some flags need to be propagated to the compiler or linker for good
  1115. # libtool support.
  1116. case $host in
  1117. ia64-*-hpux*)
  1118. # Find out what ABI is being produced by ac_compile, and set mode
  1119. # options accordingly.
  1120. echo 'int i;' > conftest.$ac_ext
  1121. if AC_TRY_EVAL(ac_compile); then
  1122. case `/usr/bin/file conftest.$ac_objext` in
  1123. *ELF-32*)
  1124. HPUX_IA64_MODE=32
  1125. ;;
  1126. *ELF-64*)
  1127. HPUX_IA64_MODE=64
  1128. ;;
  1129. esac
  1130. fi
  1131. rm -rf conftest*
  1132. ;;
  1133. *-*-irix6*)
  1134. # Find out what ABI is being produced by ac_compile, and set linker
  1135. # options accordingly.
  1136. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
  1137. if AC_TRY_EVAL(ac_compile); then
  1138. if test yes = "$lt_cv_prog_gnu_ld"; then
  1139. case `/usr/bin/file conftest.$ac_objext` in
  1140. *32-bit*)
  1141. LD="${LD-ld} -melf32bsmip"
  1142. ;;
  1143. *N32*)
  1144. LD="${LD-ld} -melf32bmipn32"
  1145. ;;
  1146. *64-bit*)
  1147. LD="${LD-ld} -melf64bmip"
  1148. ;;
  1149. esac
  1150. else
  1151. case `/usr/bin/file conftest.$ac_objext` in
  1152. *32-bit*)
  1153. LD="${LD-ld} -32"
  1154. ;;
  1155. *N32*)
  1156. LD="${LD-ld} -n32"
  1157. ;;
  1158. *64-bit*)
  1159. LD="${LD-ld} -64"
  1160. ;;
  1161. esac
  1162. fi
  1163. fi
  1164. rm -rf conftest*
  1165. ;;
  1166. mips64*-*linux*)
  1167. # Find out what ABI is being produced by ac_compile, and set linker
  1168. # options accordingly.
  1169. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
  1170. if AC_TRY_EVAL(ac_compile); then
  1171. emul=elf
  1172. case `/usr/bin/file conftest.$ac_objext` in
  1173. *32-bit*)
  1174. emul="${emul}32"
  1175. ;;
  1176. *64-bit*)
  1177. emul="${emul}64"
  1178. ;;
  1179. esac
  1180. case `/usr/bin/file conftest.$ac_objext` in
  1181. *MSB*)
  1182. emul="${emul}btsmip"
  1183. ;;
  1184. *LSB*)
  1185. emul="${emul}ltsmip"
  1186. ;;
  1187. esac
  1188. case `/usr/bin/file conftest.$ac_objext` in
  1189. *N32*)
  1190. emul="${emul}n32"
  1191. ;;
  1192. esac
  1193. LD="${LD-ld} -m $emul"
  1194. fi
  1195. rm -rf conftest*
  1196. ;;
  1197. x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
  1198. s390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*)
  1199. # Find out what ABI is being produced by ac_compile, and set linker
  1200. # options accordingly. Note that the listed cases only cover the
  1201. # situations where additional linker options are needed (such as when
  1202. # doing 32-bit compilation for a host where ld defaults to 64-bit, or
  1203. # vice versa); the common cases where no linker options are needed do
  1204. # not appear in the list.
  1205. echo 'int i;' > conftest.$ac_ext
  1206. if AC_TRY_EVAL(ac_compile); then
  1207. case `/usr/bin/file conftest.o` in
  1208. *32-bit*)
  1209. case $host in
  1210. x86_64-*kfreebsd*-gnu)
  1211. LD="${LD-ld} -m elf_i386_fbsd"
  1212. ;;
  1213. x86_64-*linux*|x86_64-gnu*)
  1214. case `/usr/bin/file conftest.o` in
  1215. *x86-64*)
  1216. LD="${LD-ld} -m elf32_x86_64"
  1217. ;;
  1218. *)
  1219. LD="${LD-ld} -m elf_i386"
  1220. ;;
  1221. esac
  1222. ;;
  1223. powerpc64le-*linux*)
  1224. LD="${LD-ld} -m elf32lppclinux"
  1225. ;;
  1226. powerpc64-*linux*)
  1227. LD="${LD-ld} -m elf32ppclinux"
  1228. ;;
  1229. s390x-*linux*)
  1230. LD="${LD-ld} -m elf_s390"
  1231. ;;
  1232. sparc64-*linux*)
  1233. LD="${LD-ld} -m elf32_sparc"
  1234. ;;
  1235. esac
  1236. ;;
  1237. *64-bit*)
  1238. case $host in
  1239. x86_64-*kfreebsd*-gnu)
  1240. LD="${LD-ld} -m elf_x86_64_fbsd"
  1241. ;;
  1242. x86_64-*linux*|x86_64-gnu*)
  1243. LD="${LD-ld} -m elf_x86_64"
  1244. ;;
  1245. powerpcle-*linux*|powerpc64le-*linux*)
  1246. LD="${LD-ld} -m elf64lppc"
  1247. ;;
  1248. powerpc-*linux*|powerpc64-*linux*)
  1249. LD="${LD-ld} -m elf64ppc"
  1250. ;;
  1251. s390*-*linux*|s390*-*tpf*)
  1252. LD="${LD-ld} -m elf64_s390"
  1253. ;;
  1254. sparc*-*linux*)
  1255. LD="${LD-ld} -m elf64_sparc"
  1256. ;;
  1257. esac
  1258. ;;
  1259. esac
  1260. fi
  1261. rm -rf conftest*
  1262. ;;
  1263. *-*-sco3.2v5*)
  1264. # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  1265. SAVE_CFLAGS=$CFLAGS
  1266. CFLAGS="$CFLAGS -belf"
  1267. AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
  1268. [AC_LANG_PUSH(C)
  1269. AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
  1270. AC_LANG_POP])
  1271. if test yes != "$lt_cv_cc_needs_belf"; then
  1272. # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  1273. CFLAGS=$SAVE_CFLAGS
  1274. fi
  1275. ;;
  1276. *-*solaris*)
  1277. # Find out what ABI is being produced by ac_compile, and set linker
  1278. # options accordingly.
  1279. echo 'int i;' > conftest.$ac_ext
  1280. if AC_TRY_EVAL(ac_compile); then
  1281. case `/usr/bin/file conftest.o` in
  1282. *64-bit*)
  1283. case $lt_cv_prog_gnu_ld in
  1284. yes*)
  1285. case $host in
  1286. i?86-*-solaris*|x86_64-*-solaris*)
  1287. LD="${LD-ld} -m elf_x86_64"
  1288. ;;
  1289. sparc*-*-solaris*)
  1290. LD="${LD-ld} -m elf64_sparc"
  1291. ;;
  1292. esac
  1293. # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
  1294. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
  1295. LD=${LD-ld}_sol2
  1296. fi
  1297. ;;
  1298. *)
  1299. if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
  1300. LD="${LD-ld} -64"
  1301. fi
  1302. ;;
  1303. esac
  1304. ;;
  1305. esac
  1306. fi
  1307. rm -rf conftest*
  1308. ;;
  1309. esac
  1310. need_locks=$enable_libtool_lock
  1311. ])# _LT_ENABLE_LOCK
  1312. # _LT_PROG_AR
  1313. # -----------
  1314. m4_defun([_LT_PROG_AR],
  1315. [AC_CHECK_TOOLS(AR, [ar], false)
  1316. : ${AR=ar}
  1317. : ${AR_FLAGS=cru}
  1318. _LT_DECL([], [AR], [1], [The archiver])
  1319. _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
  1320. AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
  1321. [lt_cv_ar_at_file=no
  1322. AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
  1323. [echo conftest.$ac_objext > conftest.lst
  1324. lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
  1325. AC_TRY_EVAL([lt_ar_try])
  1326. if test 0 -eq "$ac_status"; then
  1327. # Ensure the archiver fails upon bogus file names.
  1328. rm -f conftest.$ac_objext libconftest.a
  1329. AC_TRY_EVAL([lt_ar_try])
  1330. if test 0 -ne "$ac_status"; then
  1331. lt_cv_ar_at_file=@
  1332. fi
  1333. fi
  1334. rm -f conftest.* libconftest.a
  1335. ])
  1336. ])
  1337. if test no = "$lt_cv_ar_at_file"; then
  1338. archiver_list_spec=
  1339. else
  1340. archiver_list_spec=$lt_cv_ar_at_file
  1341. fi
  1342. _LT_DECL([], [archiver_list_spec], [1],
  1343. [How to feed a file listing to the archiver])
  1344. ])# _LT_PROG_AR
  1345. # _LT_CMD_OLD_ARCHIVE
  1346. # -------------------
  1347. m4_defun([_LT_CMD_OLD_ARCHIVE],
  1348. [_LT_PROG_AR
  1349. AC_CHECK_TOOL(STRIP, strip, :)
  1350. test -z "$STRIP" && STRIP=:
  1351. _LT_DECL([], [STRIP], [1], [A symbol stripping program])
  1352. AC_CHECK_TOOL(RANLIB, ranlib, :)
  1353. test -z "$RANLIB" && RANLIB=:
  1354. _LT_DECL([], [RANLIB], [1],
  1355. [Commands used to install an old-style archive])
  1356. # Determine commands to create old-style static archives.
  1357. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
  1358. old_postinstall_cmds='chmod 644 $oldlib'
  1359. old_postuninstall_cmds=
  1360. if test -n "$RANLIB"; then
  1361. old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
  1362. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
  1363. fi
  1364. case $host_os in
  1365. darwin*)
  1366. lock_old_archive_extraction=yes ;;
  1367. *)
  1368. lock_old_archive_extraction=no ;;
  1369. esac
  1370. _LT_DECL([], [old_postinstall_cmds], [2])
  1371. _LT_DECL([], [old_postuninstall_cmds], [2])
  1372. _LT_TAGDECL([], [old_archive_cmds], [2],
  1373. [Commands used to build an old-style archive])
  1374. _LT_DECL([], [lock_old_archive_extraction], [0],
  1375. [Whether to use a lock for old archive extraction])
  1376. ])# _LT_CMD_OLD_ARCHIVE
  1377. # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  1378. # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
  1379. # ----------------------------------------------------------------
  1380. # Check whether the given compiler option works
  1381. AC_DEFUN([_LT_COMPILER_OPTION],
  1382. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1383. m4_require([_LT_DECL_SED])dnl
  1384. AC_CACHE_CHECK([$1], [$2],
  1385. [$2=no
  1386. m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
  1387. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  1388. lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment
  1389. # Insert the option either (1) after the last *FLAGS variable, or
  1390. # (2) before a word containing "conftest.", or (3) at the end.
  1391. # Note that $ac_compile itself does not contain backslashes and begins
  1392. # with a dollar sign (not a hyphen), so the echo should work correctly.
  1393. # The option is referenced via a variable to avoid confusing sed.
  1394. lt_compile=`echo "$ac_compile" | $SED \
  1395. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  1396. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  1397. -e 's:$: $lt_compiler_flag:'`
  1398. (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  1399. (eval "$lt_compile" 2>conftest.err)
  1400. ac_status=$?
  1401. cat conftest.err >&AS_MESSAGE_LOG_FD
  1402. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  1403. if (exit $ac_status) && test -s "$ac_outfile"; then
  1404. # The compiler can only warn and ignore the option if not recognized
  1405. # So say no if there are warnings other than the usual output.
  1406. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
  1407. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  1408. if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
  1409. $2=yes
  1410. fi
  1411. fi
  1412. $RM conftest*
  1413. ])
  1414. if test yes = "[$]$2"; then
  1415. m4_if([$5], , :, [$5])
  1416. else
  1417. m4_if([$6], , :, [$6])
  1418. fi
  1419. ])# _LT_COMPILER_OPTION
  1420. # Old name:
  1421. AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
  1422. dnl aclocal-1.4 backwards compatibility:
  1423. dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
  1424. # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  1425. # [ACTION-SUCCESS], [ACTION-FAILURE])
  1426. # ----------------------------------------------------
  1427. # Check whether the given linker option works
  1428. AC_DEFUN([_LT_LINKER_OPTION],
  1429. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1430. m4_require([_LT_DECL_SED])dnl
  1431. AC_CACHE_CHECK([$1], [$2],
  1432. [$2=no
  1433. save_LDFLAGS=$LDFLAGS
  1434. LDFLAGS="$LDFLAGS $3"
  1435. echo "$lt_simple_link_test_code" > conftest.$ac_ext
  1436. if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
  1437. # The linker can only warn and ignore the option if not recognized
  1438. # So say no if there are warnings
  1439. if test -s conftest.err; then
  1440. # Append any errors to the config.log.
  1441. cat conftest.err 1>&AS_MESSAGE_LOG_FD
  1442. $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
  1443. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  1444. if diff conftest.exp conftest.er2 >/dev/null; then
  1445. $2=yes
  1446. fi
  1447. else
  1448. $2=yes
  1449. fi
  1450. fi
  1451. $RM -r conftest*
  1452. LDFLAGS=$save_LDFLAGS
  1453. ])
  1454. if test yes = "[$]$2"; then
  1455. m4_if([$4], , :, [$4])
  1456. else
  1457. m4_if([$5], , :, [$5])
  1458. fi
  1459. ])# _LT_LINKER_OPTION
  1460. # Old name:
  1461. AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
  1462. dnl aclocal-1.4 backwards compatibility:
  1463. dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
  1464. # LT_CMD_MAX_LEN
  1465. #---------------
  1466. AC_DEFUN([LT_CMD_MAX_LEN],
  1467. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  1468. # find the maximum length of command line arguments
  1469. AC_MSG_CHECKING([the maximum length of command line arguments])
  1470. AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
  1471. i=0
  1472. teststring=ABCD
  1473. case $build_os in
  1474. msdosdjgpp*)
  1475. # On DJGPP, this test can blow up pretty badly due to problems in libc
  1476. # (any single argument exceeding 2000 bytes causes a buffer overrun
  1477. # during glob expansion). Even if it were fixed, the result of this
  1478. # check would be larger than it should be.
  1479. lt_cv_sys_max_cmd_len=12288; # 12K is about right
  1480. ;;
  1481. gnu*)
  1482. # Under GNU Hurd, this test is not required because there is
  1483. # no limit to the length of command line arguments.
  1484. # Libtool will interpret -1 as no limit whatsoever
  1485. lt_cv_sys_max_cmd_len=-1;
  1486. ;;
  1487. cygwin* | mingw* | windows* | cegcc*)
  1488. # On Win9x/ME, this test blows up -- it succeeds, but takes
  1489. # about 5 minutes as the teststring grows exponentially.
  1490. # Worse, since 9x/ME are not pre-emptively multitasking,
  1491. # you end up with a "frozen" computer, even though with patience
  1492. # the test eventually succeeds (with a max line length of 256k).
  1493. # Instead, let's just punt: use the minimum linelength reported by
  1494. # all of the supported platforms: 8192 (on NT/2K/XP).
  1495. lt_cv_sys_max_cmd_len=8192;
  1496. ;;
  1497. mint*)
  1498. # On MiNT this can take a long time and run out of memory.
  1499. lt_cv_sys_max_cmd_len=8192;
  1500. ;;
  1501. amigaos*)
  1502. # On AmigaOS with pdksh, this test takes hours, literally.
  1503. # So we just punt and use a minimum line length of 8192.
  1504. lt_cv_sys_max_cmd_len=8192;
  1505. ;;
  1506. bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
  1507. # This has been around since 386BSD, at least. Likely further.
  1508. if test -x /sbin/sysctl; then
  1509. lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
  1510. elif test -x /usr/sbin/sysctl; then
  1511. lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
  1512. else
  1513. lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
  1514. fi
  1515. # And add a safety zone
  1516. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  1517. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  1518. ;;
  1519. interix*)
  1520. # We know the value 262144 and hardcode it with a safety zone (like BSD)
  1521. lt_cv_sys_max_cmd_len=196608
  1522. ;;
  1523. os2*)
  1524. # The test takes a long time on OS/2.
  1525. lt_cv_sys_max_cmd_len=8192
  1526. ;;
  1527. osf*)
  1528. # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
  1529. # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
  1530. # nice to cause kernel panics so lets avoid the loop below.
  1531. # First set a reasonable default.
  1532. lt_cv_sys_max_cmd_len=16384
  1533. #
  1534. if test -x /sbin/sysconfig; then
  1535. case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
  1536. *1*) lt_cv_sys_max_cmd_len=-1 ;;
  1537. esac
  1538. fi
  1539. ;;
  1540. sco3.2v5*)
  1541. lt_cv_sys_max_cmd_len=102400
  1542. ;;
  1543. sysv5* | sco5v6* | sysv4.2uw2*)
  1544. kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
  1545. if test -n "$kargmax"; then
  1546. lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
  1547. else
  1548. lt_cv_sys_max_cmd_len=32768
  1549. fi
  1550. ;;
  1551. *)
  1552. lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
  1553. if test -n "$lt_cv_sys_max_cmd_len" && \
  1554. test undefined != "$lt_cv_sys_max_cmd_len"; then
  1555. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  1556. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  1557. else
  1558. # Make teststring a little bigger before we do anything with it.
  1559. # a 1K string should be a reasonable start.
  1560. for i in 1 2 3 4 5 6 7 8; do
  1561. teststring=$teststring$teststring
  1562. done
  1563. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
  1564. # If test is not a shell built-in, we'll probably end up computing a
  1565. # maximum length that is only half of the actual maximum length, but
  1566. # we can't tell.
  1567. while { test X`env echo "$teststring$teststring" 2>/dev/null` \
  1568. = "X$teststring$teststring"; } >/dev/null 2>&1 &&
  1569. test 17 != "$i" # 1/2 MB should be enough
  1570. do
  1571. i=`expr $i + 1`
  1572. teststring=$teststring$teststring
  1573. done
  1574. # Only check the string length outside the loop.
  1575. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
  1576. teststring=
  1577. # Add a significant safety factor because C++ compilers can tack on
  1578. # massive amounts of additional arguments before passing them to the
  1579. # linker. It appears as though 1/2 is a usable value.
  1580. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
  1581. fi
  1582. ;;
  1583. esac
  1584. ])
  1585. if test -n "$lt_cv_sys_max_cmd_len"; then
  1586. AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
  1587. else
  1588. AC_MSG_RESULT(none)
  1589. fi
  1590. max_cmd_len=$lt_cv_sys_max_cmd_len
  1591. _LT_DECL([], [max_cmd_len], [0],
  1592. [What is the maximum length of a command?])
  1593. ])# LT_CMD_MAX_LEN
  1594. # Old name:
  1595. AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
  1596. dnl aclocal-1.4 backwards compatibility:
  1597. dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
  1598. # _LT_HEADER_DLFCN
  1599. # ----------------
  1600. m4_defun([_LT_HEADER_DLFCN],
  1601. [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
  1602. ])# _LT_HEADER_DLFCN
  1603. # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
  1604. # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
  1605. # ----------------------------------------------------------------
  1606. m4_defun([_LT_TRY_DLOPEN_SELF],
  1607. [m4_require([_LT_HEADER_DLFCN])dnl
  1608. if test yes = "$cross_compiling"; then :
  1609. [$4]
  1610. else
  1611. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  1612. lt_status=$lt_dlunknown
  1613. cat > conftest.$ac_ext <<_LT_EOF
  1614. [#line $LINENO "configure"
  1615. #include "confdefs.h"
  1616. #if HAVE_DLFCN_H
  1617. #include <dlfcn.h>
  1618. #endif
  1619. #include <stdio.h>
  1620. #ifdef RTLD_GLOBAL
  1621. # define LT_DLGLOBAL RTLD_GLOBAL
  1622. #else
  1623. # ifdef DL_GLOBAL
  1624. # define LT_DLGLOBAL DL_GLOBAL
  1625. # else
  1626. # define LT_DLGLOBAL 0
  1627. # endif
  1628. #endif
  1629. /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
  1630. find out it does not work in some platform. */
  1631. #ifndef LT_DLLAZY_OR_NOW
  1632. # ifdef RTLD_LAZY
  1633. # define LT_DLLAZY_OR_NOW RTLD_LAZY
  1634. # else
  1635. # ifdef DL_LAZY
  1636. # define LT_DLLAZY_OR_NOW DL_LAZY
  1637. # else
  1638. # ifdef RTLD_NOW
  1639. # define LT_DLLAZY_OR_NOW RTLD_NOW
  1640. # else
  1641. # ifdef DL_NOW
  1642. # define LT_DLLAZY_OR_NOW DL_NOW
  1643. # else
  1644. # define LT_DLLAZY_OR_NOW 0
  1645. # endif
  1646. # endif
  1647. # endif
  1648. # endif
  1649. #endif
  1650. /* When -fvisibility=hidden is used, assume the code has been annotated
  1651. correspondingly for the symbols needed. */
  1652. #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
  1653. int fnord (void) __attribute__((visibility("default")));
  1654. #endif
  1655. int fnord (void) { return 42; }
  1656. int main (void)
  1657. {
  1658. void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  1659. int status = $lt_dlunknown;
  1660. if (self)
  1661. {
  1662. if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
  1663. else
  1664. {
  1665. if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
  1666. else puts (dlerror ());
  1667. }
  1668. /* dlclose (self); */
  1669. }
  1670. else
  1671. puts (dlerror ());
  1672. return status;
  1673. }]
  1674. _LT_EOF
  1675. if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
  1676. (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
  1677. lt_status=$?
  1678. case x$lt_status in
  1679. x$lt_dlno_uscore) $1 ;;
  1680. x$lt_dlneed_uscore) $2 ;;
  1681. x$lt_dlunknown|x*) $3 ;;
  1682. esac
  1683. else :
  1684. # compilation failed
  1685. $3
  1686. fi
  1687. fi
  1688. rm -fr conftest*
  1689. ])# _LT_TRY_DLOPEN_SELF
  1690. # LT_SYS_DLOPEN_SELF
  1691. # ------------------
  1692. AC_DEFUN([LT_SYS_DLOPEN_SELF],
  1693. [m4_require([_LT_HEADER_DLFCN])dnl
  1694. if test yes != "$enable_dlopen"; then
  1695. enable_dlopen=unknown
  1696. enable_dlopen_self=unknown
  1697. enable_dlopen_self_static=unknown
  1698. else
  1699. lt_cv_dlopen=no
  1700. lt_cv_dlopen_libs=
  1701. case $host_os in
  1702. beos*)
  1703. lt_cv_dlopen=load_add_on
  1704. lt_cv_dlopen_libs=
  1705. lt_cv_dlopen_self=yes
  1706. ;;
  1707. mingw* | windows* | pw32* | cegcc*)
  1708. lt_cv_dlopen=LoadLibrary
  1709. lt_cv_dlopen_libs=
  1710. ;;
  1711. cygwin*)
  1712. lt_cv_dlopen=dlopen
  1713. lt_cv_dlopen_libs=
  1714. ;;
  1715. darwin*)
  1716. # if libdl is installed we need to link against it
  1717. AC_CHECK_LIB([dl], [dlopen],
  1718. [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
  1719. lt_cv_dlopen=dyld
  1720. lt_cv_dlopen_libs=
  1721. lt_cv_dlopen_self=yes
  1722. ])
  1723. ;;
  1724. tpf*)
  1725. # Don't try to run any link tests for TPF. We know it's impossible
  1726. # because TPF is a cross-compiler, and we know how we open DSOs.
  1727. lt_cv_dlopen=dlopen
  1728. lt_cv_dlopen_libs=
  1729. lt_cv_dlopen_self=no
  1730. ;;
  1731. *)
  1732. AC_CHECK_FUNC([shl_load],
  1733. [lt_cv_dlopen=shl_load],
  1734. [AC_CHECK_LIB([dld], [shl_load],
  1735. [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
  1736. [AC_CHECK_FUNC([dlopen],
  1737. [lt_cv_dlopen=dlopen],
  1738. [AC_CHECK_LIB([dl], [dlopen],
  1739. [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
  1740. [AC_CHECK_LIB([svld], [dlopen],
  1741. [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
  1742. [AC_CHECK_LIB([dld], [dld_link],
  1743. [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
  1744. ])
  1745. ])
  1746. ])
  1747. ])
  1748. ])
  1749. ;;
  1750. esac
  1751. if test no = "$lt_cv_dlopen"; then
  1752. enable_dlopen=no
  1753. else
  1754. enable_dlopen=yes
  1755. fi
  1756. case $lt_cv_dlopen in
  1757. dlopen)
  1758. save_CPPFLAGS=$CPPFLAGS
  1759. test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  1760. save_LDFLAGS=$LDFLAGS
  1761. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  1762. save_LIBS=$LIBS
  1763. LIBS="$lt_cv_dlopen_libs $LIBS"
  1764. AC_CACHE_CHECK([whether a program can dlopen itself],
  1765. lt_cv_dlopen_self, [dnl
  1766. _LT_TRY_DLOPEN_SELF(
  1767. lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
  1768. lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
  1769. ])
  1770. if test yes = "$lt_cv_dlopen_self"; then
  1771. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
  1772. AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
  1773. lt_cv_dlopen_self_static, [dnl
  1774. _LT_TRY_DLOPEN_SELF(
  1775. lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
  1776. lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
  1777. ])
  1778. fi
  1779. CPPFLAGS=$save_CPPFLAGS
  1780. LDFLAGS=$save_LDFLAGS
  1781. LIBS=$save_LIBS
  1782. ;;
  1783. esac
  1784. case $lt_cv_dlopen_self in
  1785. yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  1786. *) enable_dlopen_self=unknown ;;
  1787. esac
  1788. case $lt_cv_dlopen_self_static in
  1789. yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  1790. *) enable_dlopen_self_static=unknown ;;
  1791. esac
  1792. fi
  1793. _LT_DECL([dlopen_support], [enable_dlopen], [0],
  1794. [Whether dlopen is supported])
  1795. _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
  1796. [Whether dlopen of programs is supported])
  1797. _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
  1798. [Whether dlopen of statically linked programs is supported])
  1799. ])# LT_SYS_DLOPEN_SELF
  1800. # Old name:
  1801. AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
  1802. dnl aclocal-1.4 backwards compatibility:
  1803. dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
  1804. # _LT_COMPILER_C_O([TAGNAME])
  1805. # ---------------------------
  1806. # Check to see if options -c and -o are simultaneously supported by compiler.
  1807. # This macro does not hard code the compiler like AC_PROG_CC_C_O.
  1808. m4_defun([_LT_COMPILER_C_O],
  1809. [m4_require([_LT_DECL_SED])dnl
  1810. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1811. m4_require([_LT_TAG_COMPILER])dnl
  1812. AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
  1813. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
  1814. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
  1815. $RM -r conftest 2>/dev/null
  1816. mkdir conftest
  1817. cd conftest
  1818. mkdir out
  1819. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  1820. lt_compiler_flag="-o out/conftest2.$ac_objext"
  1821. # Insert the option either (1) after the last *FLAGS variable, or
  1822. # (2) before a word containing "conftest.", or (3) at the end.
  1823. # Note that $ac_compile itself does not contain backslashes and begins
  1824. # with a dollar sign (not a hyphen), so the echo should work correctly.
  1825. lt_compile=`echo "$ac_compile" | $SED \
  1826. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  1827. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  1828. -e 's:$: $lt_compiler_flag:'`
  1829. (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  1830. (eval "$lt_compile" 2>out/conftest.err)
  1831. ac_status=$?
  1832. cat out/conftest.err >&AS_MESSAGE_LOG_FD
  1833. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  1834. if (exit $ac_status) && test -s out/conftest2.$ac_objext
  1835. then
  1836. # The compiler can only warn and ignore the option if not recognized
  1837. # So say no if there are warnings
  1838. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
  1839. $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
  1840. if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
  1841. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  1842. fi
  1843. fi
  1844. chmod u+w . 2>&AS_MESSAGE_LOG_FD
  1845. $RM conftest*
  1846. # SGI C++ compiler will create directory out/ii_files/ for
  1847. # template instantiation
  1848. test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
  1849. $RM out/* && rmdir out
  1850. cd ..
  1851. $RM -r conftest
  1852. $RM conftest*
  1853. ])
  1854. _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
  1855. [Does compiler simultaneously support -c and -o options?])
  1856. ])# _LT_COMPILER_C_O
  1857. # _LT_COMPILER_FILE_LOCKS([TAGNAME])
  1858. # ----------------------------------
  1859. # Check to see if we can do hard links to lock some files if needed
  1860. m4_defun([_LT_COMPILER_FILE_LOCKS],
  1861. [m4_require([_LT_ENABLE_LOCK])dnl
  1862. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1863. _LT_COMPILER_C_O([$1])
  1864. hard_links=nottested
  1865. if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
  1866. # do not overwrite the value of need_locks provided by the user
  1867. AC_MSG_CHECKING([if we can lock with hard links])
  1868. hard_links=yes
  1869. $RM conftest*
  1870. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1871. touch conftest.a
  1872. ln conftest.a conftest.b 2>&5 || hard_links=no
  1873. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1874. AC_MSG_RESULT([$hard_links])
  1875. if test no = "$hard_links"; then
  1876. AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
  1877. need_locks=warn
  1878. fi
  1879. else
  1880. need_locks=no
  1881. fi
  1882. _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
  1883. ])# _LT_COMPILER_FILE_LOCKS
  1884. # _LT_CHECK_OBJDIR
  1885. # ----------------
  1886. m4_defun([_LT_CHECK_OBJDIR],
  1887. [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
  1888. [rm -f .libs 2>/dev/null
  1889. mkdir .libs 2>/dev/null
  1890. if test -d .libs; then
  1891. lt_cv_objdir=.libs
  1892. else
  1893. # MS-DOS does not allow filenames that begin with a dot.
  1894. lt_cv_objdir=_libs
  1895. fi
  1896. rmdir .libs 2>/dev/null])
  1897. objdir=$lt_cv_objdir
  1898. _LT_DECL([], [objdir], [0],
  1899. [The name of the directory that contains temporary libtool files])dnl
  1900. m4_pattern_allow([LT_OBJDIR])dnl
  1901. AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
  1902. [Define to the sub-directory where libtool stores uninstalled libraries.])
  1903. ])# _LT_CHECK_OBJDIR
  1904. # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
  1905. # --------------------------------------
  1906. # Check hardcoding attributes.
  1907. m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
  1908. [AC_MSG_CHECKING([how to hardcode library paths into programs])
  1909. _LT_TAGVAR(hardcode_action, $1)=
  1910. if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
  1911. test -n "$_LT_TAGVAR(runpath_var, $1)" ||
  1912. test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
  1913. # We can hardcode non-existent directories.
  1914. if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
  1915. # If the only mechanism to avoid hardcoding is shlibpath_var, we
  1916. # have to relink, otherwise we might link with an installed library
  1917. # when we should be linking with a yet-to-be-installed one
  1918. ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
  1919. test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
  1920. # Linking always hardcodes the temporary library directory.
  1921. _LT_TAGVAR(hardcode_action, $1)=relink
  1922. else
  1923. # We can link without hardcoding, and we can hardcode nonexisting dirs.
  1924. _LT_TAGVAR(hardcode_action, $1)=immediate
  1925. fi
  1926. else
  1927. # We cannot hardcode anything, or else we can only hardcode existing
  1928. # directories.
  1929. _LT_TAGVAR(hardcode_action, $1)=unsupported
  1930. fi
  1931. AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
  1932. if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
  1933. test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
  1934. # Fast installation is not supported
  1935. enable_fast_install=no
  1936. elif test yes = "$shlibpath_overrides_runpath" ||
  1937. test no = "$enable_shared"; then
  1938. # Fast installation is not necessary
  1939. enable_fast_install=needless
  1940. fi
  1941. _LT_TAGDECL([], [hardcode_action], [0],
  1942. [How to hardcode a shared library path into an executable])
  1943. ])# _LT_LINKER_HARDCODE_LIBPATH
  1944. # _LT_CMD_STRIPLIB
  1945. # ----------------
  1946. m4_defun([_LT_CMD_STRIPLIB],
  1947. [m4_require([_LT_DECL_EGREP])
  1948. striplib=
  1949. old_striplib=
  1950. AC_MSG_CHECKING([whether stripping libraries is possible])
  1951. if test -z "$STRIP"; then
  1952. AC_MSG_RESULT([no])
  1953. else
  1954. if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
  1955. old_striplib="$STRIP --strip-debug"
  1956. striplib="$STRIP --strip-unneeded"
  1957. AC_MSG_RESULT([yes])
  1958. else
  1959. case $host_os in
  1960. darwin*)
  1961. # FIXME - insert some real tests, host_os isn't really good enough
  1962. striplib="$STRIP -x"
  1963. old_striplib="$STRIP -S"
  1964. AC_MSG_RESULT([yes])
  1965. ;;
  1966. freebsd*)
  1967. if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
  1968. old_striplib="$STRIP --strip-debug"
  1969. striplib="$STRIP --strip-unneeded"
  1970. AC_MSG_RESULT([yes])
  1971. else
  1972. AC_MSG_RESULT([no])
  1973. fi
  1974. ;;
  1975. *)
  1976. AC_MSG_RESULT([no])
  1977. ;;
  1978. esac
  1979. fi
  1980. fi
  1981. _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
  1982. _LT_DECL([], [striplib], [1])
  1983. ])# _LT_CMD_STRIPLIB
  1984. # _LT_PREPARE_MUNGE_PATH_LIST
  1985. # ---------------------------
  1986. # Make sure func_munge_path_list() is defined correctly.
  1987. m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
  1988. [[# func_munge_path_list VARIABLE PATH
  1989. # -----------------------------------
  1990. # VARIABLE is name of variable containing _space_ separated list of
  1991. # directories to be munged by the contents of PATH, which is string
  1992. # having a format:
  1993. # "DIR[:DIR]:"
  1994. # string "DIR[ DIR]" will be prepended to VARIABLE
  1995. # ":DIR[:DIR]"
  1996. # string "DIR[ DIR]" will be appended to VARIABLE
  1997. # "DIRP[:DIRP]::[DIRA:]DIRA"
  1998. # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
  1999. # "DIRA[ DIRA]" will be appended to VARIABLE
  2000. # "DIR[:DIR]"
  2001. # VARIABLE will be replaced by "DIR[ DIR]"
  2002. func_munge_path_list ()
  2003. {
  2004. case x@S|@2 in
  2005. x)
  2006. ;;
  2007. *:)
  2008. eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
  2009. ;;
  2010. x:*)
  2011. eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
  2012. ;;
  2013. *::*)
  2014. eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
  2015. eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
  2016. ;;
  2017. *)
  2018. eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
  2019. ;;
  2020. esac
  2021. }
  2022. ]])# _LT_PREPARE_PATH_LIST
  2023. # _LT_SYS_DYNAMIC_LINKER([TAG])
  2024. # -----------------------------
  2025. # PORTME Fill in your ld.so characteristics
  2026. m4_defun([_LT_SYS_DYNAMIC_LINKER],
  2027. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2028. m4_require([_LT_DECL_EGREP])dnl
  2029. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  2030. m4_require([_LT_DECL_OBJDUMP])dnl
  2031. m4_require([_LT_DECL_SED])dnl
  2032. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  2033. m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
  2034. AC_MSG_CHECKING([dynamic linker characteristics])
  2035. m4_if([$1],
  2036. [], [
  2037. if test yes = "$GCC"; then
  2038. case $host_os in
  2039. darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
  2040. *) lt_awk_arg='/^libraries:/' ;;
  2041. esac
  2042. case $host_os in
  2043. mingw* | windows* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
  2044. *) lt_sed_strip_eq='s|=/|/|g' ;;
  2045. esac
  2046. lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
  2047. case $lt_search_path_spec in
  2048. *\;*)
  2049. # if the path contains ";" then we assume it to be the separator
  2050. # otherwise default to the standard path separator (i.e. ":") - it is
  2051. # assumed that no part of a normal pathname contains ";" but that should
  2052. # okay in the real world where ";" in dirpaths is itself problematic.
  2053. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
  2054. ;;
  2055. *)
  2056. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
  2057. ;;
  2058. esac
  2059. # Ok, now we have the path, separated by spaces, we can step through it
  2060. # and add multilib dir if necessary...
  2061. lt_tmp_lt_search_path_spec=
  2062. lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
  2063. # ...but if some path component already ends with the multilib dir we assume
  2064. # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
  2065. case "$lt_multi_os_dir; $lt_search_path_spec " in
  2066. "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
  2067. lt_multi_os_dir=
  2068. ;;
  2069. esac
  2070. for lt_sys_path in $lt_search_path_spec; do
  2071. if test -d "$lt_sys_path$lt_multi_os_dir"; then
  2072. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
  2073. elif test -n "$lt_multi_os_dir"; then
  2074. test -d "$lt_sys_path" && \
  2075. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
  2076. fi
  2077. done
  2078. lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
  2079. BEGIN {RS = " "; FS = "/|\n";} {
  2080. lt_foo = "";
  2081. lt_count = 0;
  2082. for (lt_i = NF; lt_i > 0; lt_i--) {
  2083. if ($lt_i != "" && $lt_i != ".") {
  2084. if ($lt_i == "..") {
  2085. lt_count++;
  2086. } else {
  2087. if (lt_count == 0) {
  2088. lt_foo = "/" $lt_i lt_foo;
  2089. } else {
  2090. lt_count--;
  2091. }
  2092. }
  2093. }
  2094. }
  2095. if (lt_foo != "") { lt_freq[[lt_foo]]++; }
  2096. if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
  2097. }'`
  2098. # AWK program above erroneously prepends '/' to C:/dos/paths
  2099. # for these hosts.
  2100. case $host_os in
  2101. mingw* | windows* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
  2102. $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
  2103. esac
  2104. sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
  2105. else
  2106. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  2107. fi])
  2108. library_names_spec=
  2109. libname_spec='lib$name'
  2110. soname_spec=
  2111. shrext_cmds=.so
  2112. postinstall_cmds=
  2113. postuninstall_cmds=
  2114. finish_cmds=
  2115. finish_eval=
  2116. shlibpath_var=
  2117. shlibpath_overrides_runpath=unknown
  2118. version_type=none
  2119. dynamic_linker="$host_os ld.so"
  2120. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  2121. need_lib_prefix=unknown
  2122. hardcode_into_libs=no
  2123. # when you set need_version to no, make sure it does not cause -set_version
  2124. # flags to be left without arguments
  2125. need_version=unknown
  2126. AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
  2127. [User-defined run-time library search path.])
  2128. case $host_os in
  2129. aix3*)
  2130. version_type=linux # correct to gnu/linux during the next big refactor
  2131. library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
  2132. shlibpath_var=LIBPATH
  2133. # AIX 3 has no versioning support, so we append a major version to the name.
  2134. soname_spec='$libname$release$shared_ext$major'
  2135. ;;
  2136. aix[[4-9]]*)
  2137. version_type=linux # correct to gnu/linux during the next big refactor
  2138. need_lib_prefix=no
  2139. need_version=no
  2140. hardcode_into_libs=yes
  2141. if test ia64 = "$host_cpu"; then
  2142. # AIX 5 supports IA64
  2143. library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
  2144. shlibpath_var=LD_LIBRARY_PATH
  2145. else
  2146. # With GCC up to 2.95.x, collect2 would create an import file
  2147. # for dependence libraries. The import file would start with
  2148. # the line '#! .'. This would cause the generated library to
  2149. # depend on '.', always an invalid library. This was fixed in
  2150. # development snapshots of GCC prior to 3.0.
  2151. case $host_os in
  2152. aix4 | aix4.[[01]] | aix4.[[01]].*)
  2153. if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
  2154. echo ' yes '
  2155. echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
  2156. :
  2157. else
  2158. can_build_shared=no
  2159. fi
  2160. ;;
  2161. esac
  2162. # Using Import Files as archive members, it is possible to support
  2163. # filename-based versioning of shared library archives on AIX. While
  2164. # this would work for both with and without runtime linking, it will
  2165. # prevent static linking of such archives. So we do filename-based
  2166. # shared library versioning with .so extension only, which is used
  2167. # when both runtime linking and shared linking is enabled.
  2168. # Unfortunately, runtime linking may impact performance, so we do
  2169. # not want this to be the default eventually. Also, we use the
  2170. # versioned .so libs for executables only if there is the -brtl
  2171. # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
  2172. # To allow for filename-based versioning support, we need to create
  2173. # libNAME.so.V as an archive file, containing:
  2174. # *) an Import File, referring to the versioned filename of the
  2175. # archive as well as the shared archive member, telling the
  2176. # bitwidth (32 or 64) of that shared object, and providing the
  2177. # list of exported symbols of that shared object, eventually
  2178. # decorated with the 'weak' keyword
  2179. # *) the shared object with the F_LOADONLY flag set, to really avoid
  2180. # it being seen by the linker.
  2181. # At run time we better use the real file rather than another symlink,
  2182. # but for link time we create the symlink libNAME.so -> libNAME.so.V
  2183. case $with_aix_soname,$aix_use_runtimelinking in
  2184. # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
  2185. # soname into executable. Probably we can add versioning support to
  2186. # collect2, so additional links can be useful in future.
  2187. aix,yes) # traditional libtool
  2188. dynamic_linker='AIX unversionable lib.so'
  2189. # If using run time linking (on AIX 4.2 or later) use lib<name>.so
  2190. # instead of lib<name>.a to let people know that these are not
  2191. # typical AIX shared libraries.
  2192. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2193. ;;
  2194. aix,no) # traditional AIX only
  2195. dynamic_linker='AIX lib.a[(]lib.so.V[)]'
  2196. # We preserve .a as extension for shared libraries through AIX4.2
  2197. # and later when we are not doing run time linking.
  2198. library_names_spec='$libname$release.a $libname.a'
  2199. soname_spec='$libname$release$shared_ext$major'
  2200. ;;
  2201. svr4,*) # full svr4 only
  2202. dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
  2203. library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
  2204. # We do not specify a path in Import Files, so LIBPATH fires.
  2205. shlibpath_overrides_runpath=yes
  2206. ;;
  2207. *,yes) # both, prefer svr4
  2208. dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
  2209. library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
  2210. # unpreferred sharedlib libNAME.a needs extra handling
  2211. postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
  2212. postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
  2213. # We do not specify a path in Import Files, so LIBPATH fires.
  2214. shlibpath_overrides_runpath=yes
  2215. ;;
  2216. *,no) # both, prefer aix
  2217. dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
  2218. library_names_spec='$libname$release.a $libname.a'
  2219. soname_spec='$libname$release$shared_ext$major'
  2220. # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
  2221. postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
  2222. postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
  2223. ;;
  2224. esac
  2225. shlibpath_var=LIBPATH
  2226. fi
  2227. ;;
  2228. amigaos*)
  2229. case $host_cpu in
  2230. powerpc)
  2231. # Since July 2007 AmigaOS4 officially supports .so libraries.
  2232. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
  2233. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2234. ;;
  2235. m68k)
  2236. library_names_spec='$libname.ixlibrary $libname.a'
  2237. # Create ${libname}_ixlibrary.a entries in /sys/libs.
  2238. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $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'
  2239. ;;
  2240. esac
  2241. ;;
  2242. beos*)
  2243. library_names_spec='$libname$shared_ext'
  2244. dynamic_linker="$host_os ld.so"
  2245. shlibpath_var=LIBRARY_PATH
  2246. ;;
  2247. bsdi[[45]]*)
  2248. version_type=linux # correct to gnu/linux during the next big refactor
  2249. need_version=no
  2250. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2251. soname_spec='$libname$release$shared_ext$major'
  2252. finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  2253. shlibpath_var=LD_LIBRARY_PATH
  2254. sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  2255. sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  2256. # the default ld.so.conf also contains /usr/contrib/lib and
  2257. # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  2258. # libtool to hard-code these into programs
  2259. ;;
  2260. cygwin* | mingw* | windows* | pw32* | cegcc*)
  2261. version_type=windows
  2262. shrext_cmds=.dll
  2263. need_version=no
  2264. need_lib_prefix=no
  2265. case $GCC,$cc_basename in
  2266. yes,*)
  2267. # gcc
  2268. library_names_spec='$libname.dll.a'
  2269. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  2270. postinstall_cmds='base_file=`basename \$file`~
  2271. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
  2272. dldir=$destdir/`dirname \$dlpath`~
  2273. test -d \$dldir || mkdir -p \$dldir~
  2274. $install_prog $dir/$dlname \$dldir/$dlname~
  2275. chmod a+x \$dldir/$dlname~
  2276. if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
  2277. eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
  2278. fi'
  2279. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  2280. dlpath=$dir/\$dldll~
  2281. $RM \$dlpath'
  2282. shlibpath_overrides_runpath=yes
  2283. case $host_os in
  2284. cygwin*)
  2285. # Cygwin DLLs use 'cyg' prefix rather than 'lib'
  2286. #soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
  2287. soname_spec='`echo $libname | sed -e 's/^lib//'`$shared_ext' # SDL customization.
  2288. m4_if([$1], [],[
  2289. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
  2290. ;;
  2291. mingw* | windows* | cegcc*)
  2292. # MinGW DLLs use traditional 'lib' prefix
  2293. #soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
  2294. soname_spec='`echo $libname | $SED -e 's/^lib//'`$shared_ext' # SDL customization.
  2295. ;;
  2296. pw32*)
  2297. # pw32 DLLs use 'pw' prefix rather than 'lib'
  2298. library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
  2299. ;;
  2300. esac
  2301. dynamic_linker='Win32 ld.exe'
  2302. ;;
  2303. *,cl* | *,icl*)
  2304. # Native MSVC or ICC
  2305. libname_spec='$name'
  2306. soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
  2307. library_names_spec='$libname.dll.lib'
  2308. case $build_os in
  2309. mingw* | windows*)
  2310. sys_lib_search_path_spec=
  2311. lt_save_ifs=$IFS
  2312. IFS=';'
  2313. for lt_path in $LIB
  2314. do
  2315. IFS=$lt_save_ifs
  2316. # Let DOS variable expansion print the short 8.3 style file name.
  2317. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
  2318. sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
  2319. done
  2320. IFS=$lt_save_ifs
  2321. # Convert to MSYS style.
  2322. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
  2323. ;;
  2324. cygwin*)
  2325. # Convert to unix form, then to dos form, then back to unix form
  2326. # but this time dos style (no spaces!) so that the unix form looks
  2327. # like /cygdrive/c/PROGRA~1:/cygdr...
  2328. sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
  2329. sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
  2330. sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  2331. ;;
  2332. *)
  2333. sys_lib_search_path_spec=$LIB
  2334. if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
  2335. # It is most probably a Windows format PATH.
  2336. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  2337. else
  2338. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  2339. fi
  2340. # FIXME: find the short name or the path components, as spaces are
  2341. # common. (e.g. "Program Files" -> "PROGRA~1")
  2342. ;;
  2343. esac
  2344. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  2345. postinstall_cmds='base_file=`basename \$file`~
  2346. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
  2347. dldir=$destdir/`dirname \$dlpath`~
  2348. test -d \$dldir || mkdir -p \$dldir~
  2349. $install_prog $dir/$dlname \$dldir/$dlname'
  2350. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  2351. dlpath=$dir/\$dldll~
  2352. $RM \$dlpath'
  2353. shlibpath_overrides_runpath=yes
  2354. dynamic_linker='Win32 link.exe'
  2355. ;;
  2356. *)
  2357. # Assume MSVC and ICC wrapper
  2358. library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
  2359. dynamic_linker='Win32 ld.exe'
  2360. ;;
  2361. esac
  2362. # FIXME: first we should search . and the directory the executable is in
  2363. shlibpath_var=PATH
  2364. ;;
  2365. darwin* | rhapsody*)
  2366. dynamic_linker="$host_os dyld"
  2367. version_type=darwin
  2368. need_lib_prefix=no
  2369. need_version=no
  2370. library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
  2371. soname_spec='$libname$release$major$shared_ext'
  2372. shlibpath_overrides_runpath=yes
  2373. shlibpath_var=DYLD_LIBRARY_PATH
  2374. shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
  2375. m4_if([$1], [],[
  2376. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
  2377. sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
  2378. ;;
  2379. dgux*)
  2380. version_type=linux # correct to gnu/linux during the next big refactor
  2381. need_lib_prefix=no
  2382. need_version=no
  2383. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2384. soname_spec='$libname$release$shared_ext$major'
  2385. shlibpath_var=LD_LIBRARY_PATH
  2386. ;;
  2387. freebsd* | dragonfly* | midnightbsd*)
  2388. # DragonFly does not have aout. When/if they implement a new
  2389. # versioning mechanism, adjust this.
  2390. if test -x /usr/bin/objformat; then
  2391. objformat=`/usr/bin/objformat`
  2392. else
  2393. case $host_os in
  2394. freebsd[[23]].*) objformat=aout ;;
  2395. *) objformat=elf ;;
  2396. esac
  2397. fi
  2398. version_type=freebsd-$objformat
  2399. case $version_type in
  2400. freebsd-elf*)
  2401. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2402. soname_spec='$libname$release$shared_ext$major'
  2403. need_version=no
  2404. need_lib_prefix=no
  2405. ;;
  2406. freebsd-*)
  2407. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  2408. need_version=yes
  2409. ;;
  2410. esac
  2411. shlibpath_var=LD_LIBRARY_PATH
  2412. case $host_os in
  2413. freebsd2.*)
  2414. shlibpath_overrides_runpath=yes
  2415. ;;
  2416. freebsd3.[[01]]* | freebsdelf3.[[01]]*)
  2417. shlibpath_overrides_runpath=yes
  2418. hardcode_into_libs=yes
  2419. ;;
  2420. freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
  2421. freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
  2422. shlibpath_overrides_runpath=no
  2423. hardcode_into_libs=yes
  2424. ;;
  2425. *) # from 4.6 on, and DragonFly
  2426. shlibpath_overrides_runpath=yes
  2427. hardcode_into_libs=yes
  2428. ;;
  2429. esac
  2430. ;;
  2431. haiku*)
  2432. version_type=linux # correct to gnu/linux during the next big refactor
  2433. need_lib_prefix=no
  2434. need_version=no
  2435. dynamic_linker="$host_os runtime_loader"
  2436. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2437. soname_spec='$libname$release$shared_ext$major'
  2438. shlibpath_var=LIBRARY_PATH
  2439. shlibpath_overrides_runpath=no
  2440. sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
  2441. hardcode_into_libs=yes
  2442. ;;
  2443. hpux9* | hpux10* | hpux11*)
  2444. # Give a soname corresponding to the major version so that dld.sl refuses to
  2445. # link against other versions.
  2446. version_type=sunos
  2447. need_lib_prefix=no
  2448. need_version=no
  2449. case $host_cpu in
  2450. ia64*)
  2451. shrext_cmds='.so'
  2452. hardcode_into_libs=yes
  2453. dynamic_linker="$host_os dld.so"
  2454. shlibpath_var=LD_LIBRARY_PATH
  2455. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  2456. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2457. soname_spec='$libname$release$shared_ext$major'
  2458. if test 32 = "$HPUX_IA64_MODE"; then
  2459. sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
  2460. sys_lib_dlsearch_path_spec=/usr/lib/hpux32
  2461. else
  2462. sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
  2463. sys_lib_dlsearch_path_spec=/usr/lib/hpux64
  2464. fi
  2465. ;;
  2466. hppa*64*)
  2467. shrext_cmds='.sl'
  2468. hardcode_into_libs=yes
  2469. dynamic_linker="$host_os dld.sl"
  2470. shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
  2471. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  2472. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2473. soname_spec='$libname$release$shared_ext$major'
  2474. sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
  2475. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2476. ;;
  2477. *)
  2478. shrext_cmds='.sl'
  2479. dynamic_linker="$host_os dld.sl"
  2480. shlibpath_var=SHLIB_PATH
  2481. shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  2482. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2483. soname_spec='$libname$release$shared_ext$major'
  2484. ;;
  2485. esac
  2486. # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
  2487. postinstall_cmds='chmod 555 $lib'
  2488. # or fails outright, so override atomically:
  2489. install_override_mode=555
  2490. ;;
  2491. interix[[3-9]]*)
  2492. version_type=linux # correct to gnu/linux during the next big refactor
  2493. need_lib_prefix=no
  2494. need_version=no
  2495. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2496. soname_spec='$libname$release$shared_ext$major'
  2497. dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
  2498. shlibpath_var=LD_LIBRARY_PATH
  2499. shlibpath_overrides_runpath=no
  2500. hardcode_into_libs=yes
  2501. ;;
  2502. irix5* | irix6* | nonstopux*)
  2503. case $host_os in
  2504. nonstopux*) version_type=nonstopux ;;
  2505. *)
  2506. if test yes = "$lt_cv_prog_gnu_ld"; then
  2507. version_type=linux # correct to gnu/linux during the next big refactor
  2508. else
  2509. version_type=irix
  2510. fi ;;
  2511. esac
  2512. need_lib_prefix=no
  2513. need_version=no
  2514. soname_spec='$libname$release$shared_ext$major'
  2515. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
  2516. case $host_os in
  2517. irix5* | nonstopux*)
  2518. libsuff= shlibsuff=
  2519. ;;
  2520. *)
  2521. case $LD in # libtool.m4 will add one of these switches to LD
  2522. *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
  2523. libsuff= shlibsuff= libmagic=32-bit;;
  2524. *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
  2525. libsuff=32 shlibsuff=N32 libmagic=N32;;
  2526. *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
  2527. libsuff=64 shlibsuff=64 libmagic=64-bit;;
  2528. *) libsuff= shlibsuff= libmagic=never-match;;
  2529. esac
  2530. ;;
  2531. esac
  2532. shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  2533. shlibpath_overrides_runpath=no
  2534. sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
  2535. sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
  2536. hardcode_into_libs=yes
  2537. ;;
  2538. # No shared lib support for Linux oldld, aout, or coff.
  2539. linux*oldld* | linux*aout* | linux*coff*)
  2540. dynamic_linker=no
  2541. ;;
  2542. linux*android*)
  2543. version_type=none # Android doesn't support versioned libraries.
  2544. need_lib_prefix=no
  2545. need_version=no
  2546. library_names_spec='$libname$release$shared_ext'
  2547. soname_spec='$libname$release$shared_ext'
  2548. finish_cmds=
  2549. shlibpath_var=LD_LIBRARY_PATH
  2550. shlibpath_overrides_runpath=yes
  2551. # This implies no fast_install, which is unacceptable.
  2552. # Some rework will be needed to allow for fast_install
  2553. # before this can be enabled.
  2554. hardcode_into_libs=yes
  2555. dynamic_linker='Android linker'
  2556. # Don't embed -rpath directories since the linker doesn't support them.
  2557. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  2558. ;;
  2559. # This must be glibc/ELF.
  2560. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  2561. version_type=linux # correct to gnu/linux during the next big refactor
  2562. need_lib_prefix=no
  2563. need_version=no
  2564. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2565. soname_spec='$libname$release$shared_ext$major'
  2566. finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  2567. shlibpath_var=LD_LIBRARY_PATH
  2568. shlibpath_overrides_runpath=no
  2569. # Some binutils ld are patched to set DT_RUNPATH
  2570. AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
  2571. [lt_cv_shlibpath_overrides_runpath=no
  2572. save_LDFLAGS=$LDFLAGS
  2573. save_libdir=$libdir
  2574. eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
  2575. LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
  2576. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  2577. [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
  2578. [lt_cv_shlibpath_overrides_runpath=yes])])
  2579. LDFLAGS=$save_LDFLAGS
  2580. libdir=$save_libdir
  2581. ])
  2582. shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
  2583. # This implies no fast_install, which is unacceptable.
  2584. # Some rework will be needed to allow for fast_install
  2585. # before this can be enabled.
  2586. hardcode_into_libs=yes
  2587. # Add ABI-specific directories to the system library path.
  2588. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
  2589. # Ideally, we could use ldconfig to report *all* directores which are
  2590. # searched for libraries, however this is still not possible. Aside from not
  2591. # being certain /sbin/ldconfig is available, command
  2592. # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
  2593. # even though it is searched at run-time. Try to do the best guess by
  2594. # appending ld.so.conf contents (and includes) to the search path.
  2595. if test -f /etc/ld.so.conf; then
  2596. 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' ' '`
  2597. sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
  2598. fi
  2599. # We used to test for /lib/ld.so.1 and disable shared libraries on
  2600. # powerpc, because MkLinux only supported shared libraries with the
  2601. # GNU dynamic linker. Since this was broken with cross compilers,
  2602. # most powerpc-linux boxes support dynamic linking these days and
  2603. # people can always --disable-shared, the test was removed, and we
  2604. # assume the GNU/Linux dynamic linker is in use.
  2605. dynamic_linker='GNU/Linux ld.so'
  2606. ;;
  2607. netbsd*)
  2608. version_type=sunos
  2609. need_lib_prefix=no
  2610. need_version=no
  2611. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  2612. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  2613. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2614. dynamic_linker='NetBSD (a.out) ld.so'
  2615. else
  2616. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2617. soname_spec='$libname$release$shared_ext$major'
  2618. dynamic_linker='NetBSD ld.elf_so'
  2619. fi
  2620. shlibpath_var=LD_LIBRARY_PATH
  2621. shlibpath_overrides_runpath=yes
  2622. hardcode_into_libs=yes
  2623. ;;
  2624. newsos6)
  2625. version_type=linux # correct to gnu/linux during the next big refactor
  2626. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2627. shlibpath_var=LD_LIBRARY_PATH
  2628. shlibpath_overrides_runpath=yes
  2629. ;;
  2630. *nto* | *qnx*)
  2631. version_type=qnx
  2632. need_lib_prefix=no
  2633. need_version=no
  2634. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2635. soname_spec='$libname$release$shared_ext$major'
  2636. shlibpath_var=LD_LIBRARY_PATH
  2637. shlibpath_overrides_runpath=no
  2638. hardcode_into_libs=yes
  2639. dynamic_linker='ldqnx.so'
  2640. ;;
  2641. openbsd* | bitrig*)
  2642. version_type=sunos
  2643. sys_lib_dlsearch_path_spec=/usr/lib
  2644. need_lib_prefix=no
  2645. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
  2646. need_version=no
  2647. else
  2648. need_version=yes
  2649. fi
  2650. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  2651. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2652. shlibpath_var=LD_LIBRARY_PATH
  2653. shlibpath_overrides_runpath=yes
  2654. ;;
  2655. os2*)
  2656. libname_spec='$name'
  2657. shrext_cmds=.dll
  2658. need_lib_prefix=no
  2659. # OS/2 can only load a DLL with a base name of 8 characters or less.
  2660. # SDL customization: removed versioning support.
  2661. # version_type=windows
  2662. # need_version=no
  2663. # soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
  2664. # v=$($ECHO $release$versuffix | tr -d .-);
  2665. # n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
  2666. # $ECHO $n$v`$shared_ext'
  2667. soname_spec='`test -n "$os2dllname" && libname=$os2dllname; $ECHO $libname | cut -b -8 | tr . _`$shared_ext'
  2668. library_names_spec='${libname}_dll.$libext'
  2669. dynamic_linker='OS/2 ld.exe'
  2670. shlibpath_var=BEGINLIBPATH
  2671. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  2672. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2673. postinstall_cmds='base_file=`basename \$file`~
  2674. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
  2675. dldir=$destdir/`dirname \$dlpath`~
  2676. test -d \$dldir || mkdir -p \$dldir~
  2677. $install_prog $dir/$dlname \$dldir/$dlname~
  2678. chmod a+x \$dldir/$dlname~
  2679. if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
  2680. eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
  2681. fi'
  2682. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
  2683. dlpath=$dir/\$dldll~
  2684. $RM \$dlpath'
  2685. ;;
  2686. osf3* | osf4* | osf5*)
  2687. version_type=osf
  2688. need_lib_prefix=no
  2689. need_version=no
  2690. soname_spec='$libname$release$shared_ext$major'
  2691. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2692. shlibpath_var=LD_LIBRARY_PATH
  2693. sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  2694. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2695. ;;
  2696. rdos*)
  2697. dynamic_linker=no
  2698. ;;
  2699. solaris*)
  2700. version_type=linux # correct to gnu/linux during the next big refactor
  2701. need_lib_prefix=no
  2702. need_version=no
  2703. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2704. soname_spec='$libname$release$shared_ext$major'
  2705. shlibpath_var=LD_LIBRARY_PATH
  2706. shlibpath_overrides_runpath=yes
  2707. hardcode_into_libs=yes
  2708. # ldd complains unless libraries are executable
  2709. postinstall_cmds='chmod +x $lib'
  2710. ;;
  2711. sunos4*)
  2712. version_type=sunos
  2713. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  2714. finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  2715. shlibpath_var=LD_LIBRARY_PATH
  2716. shlibpath_overrides_runpath=yes
  2717. if test yes = "$with_gnu_ld"; then
  2718. need_lib_prefix=no
  2719. fi
  2720. need_version=yes
  2721. ;;
  2722. sysv4 | sysv4.3*)
  2723. version_type=linux # correct to gnu/linux during the next big refactor
  2724. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2725. soname_spec='$libname$release$shared_ext$major'
  2726. shlibpath_var=LD_LIBRARY_PATH
  2727. case $host_vendor in
  2728. sni)
  2729. shlibpath_overrides_runpath=no
  2730. need_lib_prefix=no
  2731. runpath_var=LD_RUN_PATH
  2732. ;;
  2733. siemens)
  2734. need_lib_prefix=no
  2735. ;;
  2736. motorola)
  2737. need_lib_prefix=no
  2738. need_version=no
  2739. shlibpath_overrides_runpath=no
  2740. sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  2741. ;;
  2742. esac
  2743. ;;
  2744. sysv4*MP*)
  2745. if test -d /usr/nec; then
  2746. version_type=linux # correct to gnu/linux during the next big refactor
  2747. library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
  2748. soname_spec='$libname$shared_ext.$major'
  2749. shlibpath_var=LD_LIBRARY_PATH
  2750. fi
  2751. ;;
  2752. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  2753. version_type=sco
  2754. need_lib_prefix=no
  2755. need_version=no
  2756. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
  2757. soname_spec='$libname$release$shared_ext$major'
  2758. shlibpath_var=LD_LIBRARY_PATH
  2759. shlibpath_overrides_runpath=yes
  2760. hardcode_into_libs=yes
  2761. if test yes = "$with_gnu_ld"; then
  2762. sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
  2763. else
  2764. sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
  2765. case $host_os in
  2766. sco3.2v5*)
  2767. sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
  2768. ;;
  2769. esac
  2770. fi
  2771. sys_lib_dlsearch_path_spec='/usr/lib'
  2772. ;;
  2773. tpf*)
  2774. # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
  2775. version_type=linux # correct to gnu/linux during the next big refactor
  2776. need_lib_prefix=no
  2777. need_version=no
  2778. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2779. shlibpath_var=LD_LIBRARY_PATH
  2780. shlibpath_overrides_runpath=no
  2781. hardcode_into_libs=yes
  2782. ;;
  2783. uts4*)
  2784. version_type=linux # correct to gnu/linux during the next big refactor
  2785. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2786. soname_spec='$libname$release$shared_ext$major'
  2787. shlibpath_var=LD_LIBRARY_PATH
  2788. ;;
  2789. *)
  2790. dynamic_linker=no
  2791. ;;
  2792. esac
  2793. AC_MSG_RESULT([$dynamic_linker])
  2794. test no = "$dynamic_linker" && can_build_shared=no
  2795. variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  2796. if test yes = "$GCC"; then
  2797. variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  2798. fi
  2799. if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
  2800. sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
  2801. fi
  2802. if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
  2803. sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
  2804. fi
  2805. # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
  2806. configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
  2807. # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
  2808. func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
  2809. # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
  2810. configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
  2811. _LT_DECL([], [variables_saved_for_relink], [1],
  2812. [Variables whose values should be saved in libtool wrapper scripts and
  2813. restored at link time])
  2814. _LT_DECL([], [need_lib_prefix], [0],
  2815. [Do we need the "lib" prefix for modules?])
  2816. _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
  2817. _LT_DECL([], [version_type], [0], [Library versioning type])
  2818. _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
  2819. _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
  2820. _LT_DECL([], [shlibpath_overrides_runpath], [0],
  2821. [Is shlibpath searched before the hard-coded library search path?])
  2822. _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
  2823. _LT_DECL([], [library_names_spec], [1],
  2824. [[List of archive names. First name is the real one, the rest are links.
  2825. The last name is the one that the linker finds with -lNAME]])
  2826. _LT_DECL([], [soname_spec], [1],
  2827. [[The coded name of the library, if different from the real name]])
  2828. _LT_DECL([], [install_override_mode], [1],
  2829. [Permission mode override for installation of shared libraries])
  2830. _LT_DECL([], [postinstall_cmds], [2],
  2831. [Command to use after installation of a shared archive])
  2832. _LT_DECL([], [postuninstall_cmds], [2],
  2833. [Command to use after uninstallation of a shared archive])
  2834. _LT_DECL([], [finish_cmds], [2],
  2835. [Commands used to finish a libtool library installation in a directory])
  2836. _LT_DECL([], [finish_eval], [1],
  2837. [[As "finish_cmds", except a single script fragment to be evaled but
  2838. not shown]])
  2839. _LT_DECL([], [hardcode_into_libs], [0],
  2840. [Whether we should hardcode library paths into libraries])
  2841. _LT_DECL([], [sys_lib_search_path_spec], [2],
  2842. [Compile-time system search path for libraries])
  2843. _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
  2844. [Detected run-time system search path for libraries])
  2845. _LT_DECL([], [configure_time_lt_sys_library_path], [2],
  2846. [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
  2847. ])# _LT_SYS_DYNAMIC_LINKER
  2848. # _LT_PATH_TOOL_PREFIX(TOOL)
  2849. # --------------------------
  2850. # find a file program that can recognize shared library
  2851. AC_DEFUN([_LT_PATH_TOOL_PREFIX],
  2852. [m4_require([_LT_DECL_EGREP])dnl
  2853. AC_MSG_CHECKING([for $1])
  2854. AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
  2855. [case $MAGIC_CMD in
  2856. [[\\/*] | ?:[\\/]*])
  2857. lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
  2858. ;;
  2859. *)
  2860. lt_save_MAGIC_CMD=$MAGIC_CMD
  2861. lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
  2862. dnl $ac_dummy forces splitting on constant user-supplied paths.
  2863. dnl POSIX.2 word splitting is done only on the output of word expansions,
  2864. dnl not every word. This closes a longstanding sh security hole.
  2865. ac_dummy="m4_if([$2], , $PATH, [$2])"
  2866. for ac_dir in $ac_dummy; do
  2867. IFS=$lt_save_ifs
  2868. test -z "$ac_dir" && ac_dir=.
  2869. if test -f "$ac_dir/$1"; then
  2870. lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
  2871. if test -n "$file_magic_test_file"; then
  2872. case $deplibs_check_method in
  2873. "file_magic "*)
  2874. file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
  2875. MAGIC_CMD=$lt_cv_path_MAGIC_CMD
  2876. if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  2877. $EGREP "$file_magic_regex" > /dev/null; then
  2878. :
  2879. else
  2880. cat <<_LT_EOF 1>&2
  2881. *** Warning: the command libtool uses to detect shared libraries,
  2882. *** $file_magic_cmd, produces output that libtool cannot recognize.
  2883. *** The result is that libtool may fail to recognize shared libraries
  2884. *** as such. This will affect the creation of libtool libraries that
  2885. *** depend on shared libraries, but programs linked with such libtool
  2886. *** libraries will work regardless of this problem. Nevertheless, you
  2887. *** may want to report the problem to your system manager and/or to
  2888. *** [email protected]
  2889. _LT_EOF
  2890. fi ;;
  2891. esac
  2892. fi
  2893. break
  2894. fi
  2895. done
  2896. IFS=$lt_save_ifs
  2897. MAGIC_CMD=$lt_save_MAGIC_CMD
  2898. ;;
  2899. esac])
  2900. MAGIC_CMD=$lt_cv_path_MAGIC_CMD
  2901. if test -n "$MAGIC_CMD"; then
  2902. AC_MSG_RESULT($MAGIC_CMD)
  2903. else
  2904. AC_MSG_RESULT(no)
  2905. fi
  2906. _LT_DECL([], [MAGIC_CMD], [0],
  2907. [Used to examine libraries when file_magic_cmd begins with "file"])dnl
  2908. ])# _LT_PATH_TOOL_PREFIX
  2909. # Old name:
  2910. AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
  2911. dnl aclocal-1.4 backwards compatibility:
  2912. dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
  2913. # _LT_PATH_MAGIC
  2914. # --------------
  2915. # find a file program that can recognize a shared library
  2916. m4_defun([_LT_PATH_MAGIC],
  2917. [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
  2918. if test -z "$lt_cv_path_MAGIC_CMD"; then
  2919. if test -n "$ac_tool_prefix"; then
  2920. _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
  2921. else
  2922. MAGIC_CMD=:
  2923. fi
  2924. fi
  2925. ])# _LT_PATH_MAGIC
  2926. # LT_PATH_LD
  2927. # ----------
  2928. # find the pathname to the GNU or non-GNU linker
  2929. AC_DEFUN([LT_PATH_LD],
  2930. [AC_REQUIRE([AC_PROG_CC])dnl
  2931. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2932. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  2933. m4_require([_LT_DECL_SED])dnl
  2934. m4_require([_LT_DECL_EGREP])dnl
  2935. m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
  2936. AC_ARG_WITH([gnu-ld],
  2937. [AS_HELP_STRING([--with-gnu-ld],
  2938. [assume the C compiler uses GNU ld @<:@default=no@:>@])],
  2939. [test no = "$withval" || with_gnu_ld=yes],
  2940. [with_gnu_ld=no])dnl
  2941. ac_prog=ld
  2942. if test yes = "$GCC"; then
  2943. # Check if gcc -print-prog-name=ld gives a path.
  2944. AC_MSG_CHECKING([for ld used by $CC])
  2945. case $host in
  2946. *-*-mingw* | *-*-windows*)
  2947. # gcc leaves a trailing carriage return, which upsets mingw
  2948. ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  2949. *)
  2950. ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  2951. esac
  2952. case $ac_prog in
  2953. # Accept absolute paths.
  2954. [[\\/]]* | ?:[[\\/]]*)
  2955. re_direlt='/[[^/]][[^/]]*/\.\./'
  2956. # Canonicalize the pathname of ld
  2957. ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
  2958. while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
  2959. ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
  2960. done
  2961. test -z "$LD" && LD=$ac_prog
  2962. ;;
  2963. "")
  2964. # If it fails, then pretend we aren't using GCC.
  2965. ac_prog=ld
  2966. ;;
  2967. *)
  2968. # If it is relative, then search for the first ld in PATH.
  2969. with_gnu_ld=unknown
  2970. ;;
  2971. esac
  2972. elif test yes = "$with_gnu_ld"; then
  2973. AC_MSG_CHECKING([for GNU ld])
  2974. else
  2975. AC_MSG_CHECKING([for non-GNU ld])
  2976. fi
  2977. AC_CACHE_VAL(lt_cv_path_LD,
  2978. [if test -z "$LD"; then
  2979. lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
  2980. for ac_dir in $PATH; do
  2981. IFS=$lt_save_ifs
  2982. test -z "$ac_dir" && ac_dir=.
  2983. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  2984. lt_cv_path_LD=$ac_dir/$ac_prog
  2985. # Check to see if the program is GNU ld. I'd rather use --version,
  2986. # but apparently some variants of GNU ld only accept -v.
  2987. # Break only if it was the GNU/non-GNU ld that we prefer.
  2988. case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
  2989. *GNU* | *'with BFD'*)
  2990. test no != "$with_gnu_ld" && break
  2991. ;;
  2992. *)
  2993. test yes != "$with_gnu_ld" && break
  2994. ;;
  2995. esac
  2996. fi
  2997. done
  2998. IFS=$lt_save_ifs
  2999. else
  3000. lt_cv_path_LD=$LD # Let the user override the test with a path.
  3001. fi])
  3002. LD=$lt_cv_path_LD
  3003. if test -n "$LD"; then
  3004. AC_MSG_RESULT($LD)
  3005. else
  3006. AC_MSG_RESULT(no)
  3007. fi
  3008. test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  3009. _LT_PATH_LD_GNU
  3010. AC_SUBST([LD])
  3011. _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
  3012. ])# LT_PATH_LD
  3013. # Old names:
  3014. AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
  3015. AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
  3016. dnl aclocal-1.4 backwards compatibility:
  3017. dnl AC_DEFUN([AM_PROG_LD], [])
  3018. dnl AC_DEFUN([AC_PROG_LD], [])
  3019. # _LT_PATH_LD_GNU
  3020. #- --------------
  3021. m4_defun([_LT_PATH_LD_GNU],
  3022. [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
  3023. [# I'd rather use --version here, but apparently some GNU lds only accept -v.
  3024. case `$LD -v 2>&1 </dev/null` in
  3025. *GNU* | *'with BFD'*)
  3026. lt_cv_prog_gnu_ld=yes
  3027. ;;
  3028. *)
  3029. lt_cv_prog_gnu_ld=no
  3030. ;;
  3031. esac])
  3032. with_gnu_ld=$lt_cv_prog_gnu_ld
  3033. ])# _LT_PATH_LD_GNU
  3034. # _LT_CMD_RELOAD
  3035. # --------------
  3036. # find reload flag for linker
  3037. # -- PORTME Some linkers may need a different reload flag.
  3038. m4_defun([_LT_CMD_RELOAD],
  3039. [AC_CACHE_CHECK([for $LD option to reload object files],
  3040. lt_cv_ld_reload_flag,
  3041. [lt_cv_ld_reload_flag='-r'])
  3042. reload_flag=$lt_cv_ld_reload_flag
  3043. case $reload_flag in
  3044. "" | " "*) ;;
  3045. *) reload_flag=" $reload_flag" ;;
  3046. esac
  3047. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  3048. case $host_os in
  3049. cygwin* | mingw* | windows* | pw32* | cegcc*)
  3050. if test yes != "$GCC"; then
  3051. reload_cmds=false
  3052. fi
  3053. ;;
  3054. darwin*)
  3055. if test yes = "$GCC"; then
  3056. reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
  3057. else
  3058. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  3059. fi
  3060. ;;
  3061. esac
  3062. _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
  3063. _LT_TAGDECL([], [reload_cmds], [2])dnl
  3064. ])# _LT_CMD_RELOAD
  3065. # _LT_PATH_DD
  3066. # -----------
  3067. # find a working dd
  3068. m4_defun([_LT_PATH_DD],
  3069. [AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
  3070. [printf 0123456789abcdef0123456789abcdef >conftest.i
  3071. cat conftest.i conftest.i >conftest2.i
  3072. : ${lt_DD:=$DD}
  3073. AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
  3074. [if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
  3075. cmp -s conftest.i conftest.out \
  3076. && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
  3077. fi])
  3078. rm -f conftest.i conftest2.i conftest.out])
  3079. ])# _LT_PATH_DD
  3080. # _LT_CMD_TRUNCATE
  3081. # ----------------
  3082. # find command to truncate a binary pipe
  3083. m4_defun([_LT_CMD_TRUNCATE],
  3084. [m4_require([_LT_PATH_DD])
  3085. AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
  3086. [printf 0123456789abcdef0123456789abcdef >conftest.i
  3087. cat conftest.i conftest.i >conftest2.i
  3088. lt_cv_truncate_bin=
  3089. if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
  3090. cmp -s conftest.i conftest.out \
  3091. && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
  3092. fi
  3093. rm -f conftest.i conftest2.i conftest.out
  3094. test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
  3095. _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
  3096. [Command to truncate a binary pipe])
  3097. ])# _LT_CMD_TRUNCATE
  3098. # _LT_CHECK_MAGIC_METHOD
  3099. # ----------------------
  3100. # how to check for library dependencies
  3101. # -- PORTME fill in with the dynamic library characteristics
  3102. m4_defun([_LT_CHECK_MAGIC_METHOD],
  3103. [m4_require([_LT_DECL_EGREP])
  3104. m4_require([_LT_DECL_OBJDUMP])
  3105. AC_CACHE_CHECK([how to recognize dependent libraries],
  3106. lt_cv_deplibs_check_method,
  3107. [lt_cv_file_magic_cmd='$MAGIC_CMD'
  3108. lt_cv_file_magic_test_file=
  3109. lt_cv_deplibs_check_method='unknown'
  3110. # Need to set the preceding variable on all platforms that support
  3111. # interlibrary dependencies.
  3112. # 'none' -- dependencies not supported.
  3113. # 'unknown' -- same as none, but documents that we really don't know.
  3114. # 'pass_all' -- all dependencies passed with no checks.
  3115. # 'test_compile' -- check by making test program.
  3116. # 'file_magic [[regex]]' -- check by looking for files in library path
  3117. # that responds to the $file_magic_cmd with a given extended regex.
  3118. # If you have 'file' or equivalent on your system and you're not sure
  3119. # whether 'pass_all' will *always* work, you probably want this one.
  3120. case $host_os in
  3121. aix[[4-9]]*)
  3122. lt_cv_deplibs_check_method=pass_all
  3123. ;;
  3124. beos*)
  3125. lt_cv_deplibs_check_method=pass_all
  3126. ;;
  3127. bsdi[[45]]*)
  3128. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
  3129. lt_cv_file_magic_cmd='/usr/bin/file -L'
  3130. lt_cv_file_magic_test_file=/shlib/libc.so
  3131. ;;
  3132. cygwin*)
  3133. # func_win32_libid is a shell function defined in ltmain.sh
  3134. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  3135. lt_cv_file_magic_cmd='func_win32_libid'
  3136. lt_cv_deplibs_check_method=pass_all # SDL customization.
  3137. ;;
  3138. mingw* | windows* | pw32*)
  3139. # Base MSYS/MinGW do not provide the 'file' command needed by
  3140. # func_win32_libid shell function, so use a weaker test based on 'objdump',
  3141. # unless we find 'file', for example because we are cross-compiling.
  3142. if ( file / ) >/dev/null 2>&1; then
  3143. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  3144. lt_cv_file_magic_cmd='func_win32_libid'
  3145. else
  3146. # Keep this pattern in sync with the one in func_win32_libid.
  3147. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64|pe-aarch64)'
  3148. lt_cv_file_magic_cmd='$OBJDUMP -f'
  3149. fi
  3150. lt_cv_deplibs_check_method=pass_all # SDL customization.
  3151. ;;
  3152. cegcc*)
  3153. # use the weaker test based on 'objdump'. See mingw*.
  3154. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
  3155. lt_cv_file_magic_cmd='$OBJDUMP -f'
  3156. ;;
  3157. darwin* | rhapsody*)
  3158. lt_cv_deplibs_check_method=pass_all
  3159. ;;
  3160. freebsd* | dragonfly* | midnightbsd*)
  3161. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  3162. case $host_cpu in
  3163. i*86 )
  3164. # Not sure whether the presence of OpenBSD here was a mistake.
  3165. # Let's accept both of them until this is cleared up.
  3166. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
  3167. lt_cv_file_magic_cmd=/usr/bin/file
  3168. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  3169. ;;
  3170. esac
  3171. else
  3172. lt_cv_deplibs_check_method=pass_all
  3173. fi
  3174. ;;
  3175. haiku*)
  3176. lt_cv_deplibs_check_method=pass_all
  3177. ;;
  3178. hpux10.20* | hpux11*)
  3179. lt_cv_file_magic_cmd=/usr/bin/file
  3180. case $host_cpu in
  3181. ia64*)
  3182. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
  3183. lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
  3184. ;;
  3185. hppa*64*)
  3186. [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]']
  3187. lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
  3188. ;;
  3189. *)
  3190. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
  3191. lt_cv_file_magic_test_file=/usr/lib/libc.sl
  3192. ;;
  3193. esac
  3194. ;;
  3195. interix[[3-9]]*)
  3196. # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
  3197. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
  3198. ;;
  3199. irix5* | irix6* | nonstopux*)
  3200. case $LD in
  3201. *-32|*"-32 ") libmagic=32-bit;;
  3202. *-n32|*"-n32 ") libmagic=N32;;
  3203. *-64|*"-64 ") libmagic=64-bit;;
  3204. *) libmagic=never-match;;
  3205. esac
  3206. lt_cv_deplibs_check_method=pass_all
  3207. ;;
  3208. # This must be glibc/ELF.
  3209. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  3210. lt_cv_deplibs_check_method=pass_all
  3211. ;;
  3212. netbsd*)
  3213. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  3214. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  3215. else
  3216. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
  3217. fi
  3218. ;;
  3219. newos6*)
  3220. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
  3221. lt_cv_file_magic_cmd=/usr/bin/file
  3222. lt_cv_file_magic_test_file=/usr/lib/libnls.so
  3223. ;;
  3224. *nto* | *qnx*)
  3225. lt_cv_deplibs_check_method=pass_all
  3226. ;;
  3227. openbsd* | bitrig*)
  3228. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
  3229. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
  3230. else
  3231. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  3232. fi
  3233. ;;
  3234. osf3* | osf4* | osf5*)
  3235. lt_cv_deplibs_check_method=pass_all
  3236. ;;
  3237. rdos*)
  3238. lt_cv_deplibs_check_method=pass_all
  3239. ;;
  3240. solaris*)
  3241. lt_cv_deplibs_check_method=pass_all
  3242. ;;
  3243. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  3244. lt_cv_deplibs_check_method=pass_all
  3245. ;;
  3246. sysv4 | sysv4.3*)
  3247. case $host_vendor in
  3248. motorola)
  3249. 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]]'
  3250. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  3251. ;;
  3252. ncr)
  3253. lt_cv_deplibs_check_method=pass_all
  3254. ;;
  3255. sequent)
  3256. lt_cv_file_magic_cmd='/bin/file'
  3257. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
  3258. ;;
  3259. sni)
  3260. lt_cv_file_magic_cmd='/bin/file'
  3261. lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
  3262. lt_cv_file_magic_test_file=/lib/libc.so
  3263. ;;
  3264. siemens)
  3265. lt_cv_deplibs_check_method=pass_all
  3266. ;;
  3267. pc)
  3268. lt_cv_deplibs_check_method=pass_all
  3269. ;;
  3270. esac
  3271. ;;
  3272. tpf*)
  3273. lt_cv_deplibs_check_method=pass_all
  3274. ;;
  3275. os2*)
  3276. lt_cv_deplibs_check_method=pass_all
  3277. ;;
  3278. esac
  3279. ])
  3280. file_magic_glob=
  3281. want_nocaseglob=no
  3282. if test "$build" = "$host"; then
  3283. case $host_os in
  3284. mingw* | windows* | pw32*)
  3285. if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
  3286. want_nocaseglob=yes
  3287. else
  3288. file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
  3289. fi
  3290. ;;
  3291. esac
  3292. fi
  3293. file_magic_cmd=$lt_cv_file_magic_cmd
  3294. deplibs_check_method=$lt_cv_deplibs_check_method
  3295. test -z "$deplibs_check_method" && deplibs_check_method=unknown
  3296. _LT_DECL([], [deplibs_check_method], [1],
  3297. [Method to check whether dependent libraries are shared objects])
  3298. _LT_DECL([], [file_magic_cmd], [1],
  3299. [Command to use when deplibs_check_method = "file_magic"])
  3300. _LT_DECL([], [file_magic_glob], [1],
  3301. [How to find potential files when deplibs_check_method = "file_magic"])
  3302. _LT_DECL([], [want_nocaseglob], [1],
  3303. [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
  3304. ])# _LT_CHECK_MAGIC_METHOD
  3305. # LT_PATH_NM
  3306. # ----------
  3307. # find the pathname to a BSD- or MS-compatible name lister
  3308. AC_DEFUN([LT_PATH_NM],
  3309. [AC_REQUIRE([AC_PROG_CC])dnl
  3310. AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
  3311. [if test -n "$NM"; then
  3312. # Let the user override the test.
  3313. lt_cv_path_NM=$NM
  3314. else
  3315. lt_nm_to_check=${ac_tool_prefix}nm
  3316. if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
  3317. lt_nm_to_check="$lt_nm_to_check nm"
  3318. fi
  3319. for lt_tmp_nm in $lt_nm_to_check; do
  3320. lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
  3321. for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
  3322. IFS=$lt_save_ifs
  3323. test -z "$ac_dir" && ac_dir=.
  3324. tmp_nm=$ac_dir/$lt_tmp_nm
  3325. if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
  3326. # Check to see if the nm accepts a BSD-compat flag.
  3327. # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
  3328. # nm: unknown option "B" ignored
  3329. # Tru64's nm complains that /dev/null is an invalid object file
  3330. # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
  3331. case $build_os in
  3332. mingw* | windows*) lt_bad_file=conftest.nm/nofile ;;
  3333. *) lt_bad_file=/dev/null ;;
  3334. esac
  3335. case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
  3336. *$lt_bad_file* | *'Invalid file or object type'*)
  3337. lt_cv_path_NM="$tmp_nm -B"
  3338. break 2
  3339. ;;
  3340. *)
  3341. case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
  3342. */dev/null*)
  3343. lt_cv_path_NM="$tmp_nm -p"
  3344. break 2
  3345. ;;
  3346. *)
  3347. lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
  3348. continue # so that we can try to find one that supports BSD flags
  3349. ;;
  3350. esac
  3351. ;;
  3352. esac
  3353. fi
  3354. done
  3355. IFS=$lt_save_ifs
  3356. done
  3357. : ${lt_cv_path_NM=no}
  3358. fi])
  3359. if test no != "$lt_cv_path_NM"; then
  3360. NM=$lt_cv_path_NM
  3361. else
  3362. # Didn't find any BSD compatible name lister, look for dumpbin.
  3363. if test -n "$DUMPBIN"; then :
  3364. # Let the user override the test.
  3365. else
  3366. AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
  3367. case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
  3368. *COFF*)
  3369. DUMPBIN="$DUMPBIN -symbols -headers"
  3370. ;;
  3371. *)
  3372. DUMPBIN=:
  3373. ;;
  3374. esac
  3375. fi
  3376. AC_SUBST([DUMPBIN])
  3377. if test : != "$DUMPBIN"; then
  3378. NM=$DUMPBIN
  3379. fi
  3380. fi
  3381. test -z "$NM" && NM=nm
  3382. AC_SUBST([NM])
  3383. _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
  3384. AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
  3385. [lt_cv_nm_interface="BSD nm"
  3386. echo "int some_variable = 0;" > conftest.$ac_ext
  3387. (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
  3388. (eval "$ac_compile" 2>conftest.err)
  3389. cat conftest.err >&AS_MESSAGE_LOG_FD
  3390. (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
  3391. (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
  3392. cat conftest.err >&AS_MESSAGE_LOG_FD
  3393. (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
  3394. cat conftest.out >&AS_MESSAGE_LOG_FD
  3395. if $GREP 'External.*some_variable' conftest.out > /dev/null; then
  3396. lt_cv_nm_interface="MS dumpbin"
  3397. fi
  3398. rm -f conftest*])
  3399. ])# LT_PATH_NM
  3400. # Old names:
  3401. AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
  3402. AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
  3403. dnl aclocal-1.4 backwards compatibility:
  3404. dnl AC_DEFUN([AM_PROG_NM], [])
  3405. dnl AC_DEFUN([AC_PROG_NM], [])
  3406. # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  3407. # --------------------------------
  3408. # how to determine the name of the shared library
  3409. # associated with a specific link library.
  3410. # -- PORTME fill in with the dynamic library characteristics
  3411. m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
  3412. [m4_require([_LT_DECL_EGREP])
  3413. m4_require([_LT_DECL_OBJDUMP])
  3414. m4_require([_LT_DECL_DLLTOOL])
  3415. AC_CACHE_CHECK([how to associate runtime and link libraries],
  3416. lt_cv_sharedlib_from_linklib_cmd,
  3417. [lt_cv_sharedlib_from_linklib_cmd='unknown'
  3418. case $host_os in
  3419. cygwin* | mingw* | windows* | pw32* | cegcc*)
  3420. # two different shell functions defined in ltmain.sh;
  3421. # decide which one to use based on capabilities of $DLLTOOL
  3422. case `$DLLTOOL --help 2>&1` in
  3423. *--identify-strict*)
  3424. lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
  3425. ;;
  3426. *)
  3427. lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
  3428. ;;
  3429. esac
  3430. ;;
  3431. *)
  3432. # fallback: assume linklib IS sharedlib
  3433. lt_cv_sharedlib_from_linklib_cmd=$ECHO
  3434. ;;
  3435. esac
  3436. ])
  3437. sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
  3438. test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
  3439. _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
  3440. [Command to associate shared and link libraries])
  3441. ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  3442. # _LT_PATH_MANIFEST_TOOL
  3443. # ----------------------
  3444. # locate the manifest tool
  3445. m4_defun([_LT_PATH_MANIFEST_TOOL],
  3446. [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
  3447. test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
  3448. AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
  3449. [lt_cv_path_mainfest_tool=no
  3450. echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
  3451. $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
  3452. cat conftest.err >&AS_MESSAGE_LOG_FD
  3453. if $GREP 'Manifest Tool' conftest.out > /dev/null; then
  3454. lt_cv_path_mainfest_tool=yes
  3455. fi
  3456. rm -f conftest*])
  3457. if test yes != "$lt_cv_path_mainfest_tool"; then
  3458. MANIFEST_TOOL=:
  3459. fi
  3460. _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
  3461. ])# _LT_PATH_MANIFEST_TOOL
  3462. # _LT_DLL_DEF_P([FILE])
  3463. # ---------------------
  3464. # True iff FILE is a Windows DLL '.def' file.
  3465. # Keep in sync with func_dll_def_p in the libtool script
  3466. AC_DEFUN([_LT_DLL_DEF_P],
  3467. [dnl
  3468. test DEF = "`$SED -n dnl
  3469. -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace
  3470. -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments
  3471. -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl
  3472. -e q dnl Only consider the first "real" line
  3473. $1`" dnl
  3474. ])# _LT_DLL_DEF_P
  3475. # LT_LIB_M
  3476. # --------
  3477. # check for math library
  3478. AC_DEFUN([LT_LIB_M],
  3479. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3480. LIBM=
  3481. case $host in
  3482. *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-mingw* | *-*-pw32* | *-*-darwin*)
  3483. # These system don't have libm, or don't need it
  3484. ;;
  3485. *-ncr-sysv4.3*)
  3486. AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
  3487. AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
  3488. ;;
  3489. *)
  3490. AC_CHECK_LIB(m, cos, LIBM=-lm)
  3491. ;;
  3492. esac
  3493. AC_SUBST([LIBM])
  3494. ])# LT_LIB_M
  3495. # Old name:
  3496. AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
  3497. dnl aclocal-1.4 backwards compatibility:
  3498. dnl AC_DEFUN([AC_CHECK_LIBM], [])
  3499. # _LT_COMPILER_NO_RTTI([TAGNAME])
  3500. # -------------------------------
  3501. m4_defun([_LT_COMPILER_NO_RTTI],
  3502. [m4_require([_LT_TAG_COMPILER])dnl
  3503. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  3504. if test yes = "$GCC"; then
  3505. case $cc_basename in
  3506. nvcc*)
  3507. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
  3508. *)
  3509. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
  3510. esac
  3511. _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
  3512. lt_cv_prog_compiler_rtti_exceptions,
  3513. [-fno-rtti -fno-exceptions], [],
  3514. [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
  3515. fi
  3516. _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
  3517. [Compiler flag to turn off builtin functions])
  3518. ])# _LT_COMPILER_NO_RTTI
  3519. # _LT_CMD_GLOBAL_SYMBOLS
  3520. # ----------------------
  3521. m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
  3522. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3523. AC_REQUIRE([AC_PROG_CC])dnl
  3524. AC_REQUIRE([AC_PROG_AWK])dnl
  3525. AC_REQUIRE([LT_PATH_NM])dnl
  3526. AC_REQUIRE([LT_PATH_LD])dnl
  3527. m4_require([_LT_DECL_SED])dnl
  3528. m4_require([_LT_DECL_EGREP])dnl
  3529. m4_require([_LT_TAG_COMPILER])dnl
  3530. # Check for command to grab the raw symbol name followed by C symbol from nm.
  3531. AC_MSG_CHECKING([command to parse $NM output from $compiler object])
  3532. AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
  3533. [
  3534. # These are sane defaults that work on at least a few old systems.
  3535. # [They come from Ultrix. What could be older than Ultrix?!! ;)]
  3536. # Character class describing NM global symbol codes.
  3537. symcode='[[BCDEGRST]]'
  3538. # Regexp to match symbols that can be accessed directly from C.
  3539. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
  3540. # Define system-specific variables.
  3541. case $host_os in
  3542. aix*)
  3543. symcode='[[BCDT]]'
  3544. ;;
  3545. cygwin* | mingw* | windows* | pw32* | cegcc*)
  3546. symcode='[[ABCDGISTW]]'
  3547. ;;
  3548. hpux*)
  3549. if test ia64 = "$host_cpu"; then
  3550. symcode='[[ABCDEGRST]]'
  3551. fi
  3552. ;;
  3553. irix* | nonstopux*)
  3554. symcode='[[BCDEGRST]]'
  3555. ;;
  3556. osf*)
  3557. symcode='[[BCDEGQRST]]'
  3558. ;;
  3559. solaris*)
  3560. symcode='[[BCDRT]]'
  3561. ;;
  3562. sco3.2v5*)
  3563. symcode='[[DT]]'
  3564. ;;
  3565. sysv4.2uw2*)
  3566. symcode='[[DT]]'
  3567. ;;
  3568. sysv5* | sco5v6* | unixware* | OpenUNIX*)
  3569. symcode='[[ABDT]]'
  3570. ;;
  3571. sysv4)
  3572. symcode='[[DFNSTU]]'
  3573. ;;
  3574. esac
  3575. # If we're using GNU nm, then use its standard symbol codes.
  3576. case `$NM -V 2>&1` in
  3577. *GNU* | *'with BFD'*)
  3578. symcode='[[ABCDGIRSTW]]' ;;
  3579. esac
  3580. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3581. # Gets list of data symbols to import.
  3582. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
  3583. # Adjust the below global symbol transforms to fixup imported variables.
  3584. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
  3585. lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
  3586. lt_c_name_lib_hook="\
  3587. -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
  3588. -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
  3589. else
  3590. # Disable hooks by default.
  3591. lt_cv_sys_global_symbol_to_import=
  3592. lt_cdecl_hook=
  3593. lt_c_name_hook=
  3594. lt_c_name_lib_hook=
  3595. fi
  3596. # Transform an extracted symbol line into a proper C declaration.
  3597. # Some systems (esp. on ia64) link data and code symbols differently,
  3598. # so use this general approach.
  3599. lt_cv_sys_global_symbol_to_cdecl="sed -n"\
  3600. $lt_cdecl_hook\
  3601. " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
  3602. " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
  3603. # Transform an extracted symbol line into symbol name and symbol address
  3604. lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
  3605. $lt_c_name_hook\
  3606. " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
  3607. " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
  3608. # Transform an extracted symbol line into symbol name with lib prefix and
  3609. # symbol address.
  3610. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
  3611. $lt_c_name_lib_hook\
  3612. " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
  3613. " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
  3614. " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
  3615. # Handle CRLF in mingw tool chain
  3616. opt_cr=
  3617. case $build_os in
  3618. mingw* | windows*)
  3619. opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  3620. ;;
  3621. esac
  3622. # Try without a prefix underscore, then with it.
  3623. for ac_symprfx in "" "_"; do
  3624. # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
  3625. symxfrm="\\1 $ac_symprfx\\2 \\2"
  3626. # Write the raw and C identifiers.
  3627. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3628. # Fake it for dumpbin and say T for any non-static function,
  3629. # D for any global variable and I for any imported variable.
  3630. # Also find C++ and __fastcall symbols from MSVC++ or ICC,
  3631. # which start with @ or ?.
  3632. lt_cv_sys_global_symbol_pipe="$AWK ['"\
  3633. " {last_section=section; section=\$ 3};"\
  3634. " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
  3635. " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
  3636. " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
  3637. " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
  3638. " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
  3639. " \$ 0!~/External *\|/{next};"\
  3640. " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
  3641. " {if(hide[section]) next};"\
  3642. " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
  3643. " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
  3644. " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
  3645. " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
  3646. " ' prfx=^$ac_symprfx]"
  3647. else
  3648. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
  3649. fi
  3650. lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
  3651. # Check to see that the pipe works correctly.
  3652. pipe_works=no
  3653. rm -f conftest*
  3654. cat > conftest.$ac_ext <<_LT_EOF
  3655. #ifdef __cplusplus
  3656. extern "C" {
  3657. #endif
  3658. char nm_test_var;
  3659. void nm_test_func(void);
  3660. void nm_test_func(void){}
  3661. #ifdef __cplusplus
  3662. }
  3663. #endif
  3664. int main(void){nm_test_var='a';nm_test_func();return(0);}
  3665. _LT_EOF
  3666. if AC_TRY_EVAL(ac_compile); then
  3667. # Now try to grab the symbols.
  3668. nlist=conftest.nm
  3669. if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
  3670. # Try sorting and uniquifying the output.
  3671. if sort "$nlist" | uniq > "$nlist"T; then
  3672. mv -f "$nlist"T "$nlist"
  3673. else
  3674. rm -f "$nlist"T
  3675. fi
  3676. # Make sure that we snagged all the symbols we need.
  3677. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
  3678. if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
  3679. cat <<_LT_EOF > conftest.$ac_ext
  3680. /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
  3681. #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
  3682. /* DATA imports from DLLs on WIN32 can't be const, because runtime
  3683. relocations are performed -- see ld's documentation on pseudo-relocs. */
  3684. # define LT@&t@_DLSYM_CONST
  3685. #elif defined __osf__
  3686. /* This system does not cope well with relocations in const data. */
  3687. # define LT@&t@_DLSYM_CONST
  3688. #else
  3689. # define LT@&t@_DLSYM_CONST const
  3690. #endif
  3691. #ifdef __cplusplus
  3692. extern "C" {
  3693. #endif
  3694. _LT_EOF
  3695. # Now generate the symbol file.
  3696. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
  3697. cat <<_LT_EOF >> conftest.$ac_ext
  3698. /* The mapping between symbol names and symbols. */
  3699. LT@&t@_DLSYM_CONST struct {
  3700. const char *name;
  3701. void *address;
  3702. }
  3703. lt__PROGRAM__LTX_preloaded_symbols[[]] =
  3704. {
  3705. { "@PROGRAM@", (void *) 0 },
  3706. _LT_EOF
  3707. $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
  3708. cat <<\_LT_EOF >> conftest.$ac_ext
  3709. {0, (void *) 0}
  3710. };
  3711. /* This works around a problem in FreeBSD linker */
  3712. #ifdef FREEBSD_WORKAROUND
  3713. static const void *lt_preloaded_setup() {
  3714. return lt__PROGRAM__LTX_preloaded_symbols;
  3715. }
  3716. #endif
  3717. #ifdef __cplusplus
  3718. }
  3719. #endif
  3720. _LT_EOF
  3721. # Now try linking the two files.
  3722. mv conftest.$ac_objext conftstm.$ac_objext
  3723. lt_globsym_save_LIBS=$LIBS
  3724. lt_globsym_save_CFLAGS=$CFLAGS
  3725. LIBS=conftstm.$ac_objext
  3726. CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
  3727. if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
  3728. pipe_works=yes
  3729. fi
  3730. LIBS=$lt_globsym_save_LIBS
  3731. CFLAGS=$lt_globsym_save_CFLAGS
  3732. else
  3733. echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
  3734. fi
  3735. else
  3736. echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
  3737. fi
  3738. else
  3739. echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
  3740. fi
  3741. else
  3742. echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
  3743. cat conftest.$ac_ext >&5
  3744. fi
  3745. rm -rf conftest* conftst*
  3746. # Do not use the global_symbol_pipe unless it works.
  3747. if test yes = "$pipe_works"; then
  3748. break
  3749. else
  3750. lt_cv_sys_global_symbol_pipe=
  3751. fi
  3752. done
  3753. ])
  3754. if test -z "$lt_cv_sys_global_symbol_pipe"; then
  3755. lt_cv_sys_global_symbol_to_cdecl=
  3756. fi
  3757. if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
  3758. AC_MSG_RESULT(failed)
  3759. else
  3760. AC_MSG_RESULT(ok)
  3761. fi
  3762. # Response file support.
  3763. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3764. nm_file_list_spec='@'
  3765. elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
  3766. nm_file_list_spec='@'
  3767. fi
  3768. _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
  3769. [Take the output of nm and produce a listing of raw symbols and C names])
  3770. _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
  3771. [Transform the output of nm in a proper C declaration])
  3772. _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
  3773. [Transform the output of nm into a list of symbols to manually relocate])
  3774. _LT_DECL([global_symbol_to_c_name_address],
  3775. [lt_cv_sys_global_symbol_to_c_name_address], [1],
  3776. [Transform the output of nm in a C name address pair])
  3777. _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
  3778. [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
  3779. [Transform the output of nm in a C name address pair when lib prefix is needed])
  3780. _LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
  3781. [The name lister interface])
  3782. _LT_DECL([], [nm_file_list_spec], [1],
  3783. [Specify filename containing input files for $NM])
  3784. ]) # _LT_CMD_GLOBAL_SYMBOLS
  3785. # _LT_COMPILER_PIC([TAGNAME])
  3786. # ---------------------------
  3787. m4_defun([_LT_COMPILER_PIC],
  3788. [m4_require([_LT_TAG_COMPILER])dnl
  3789. _LT_TAGVAR(lt_prog_compiler_wl, $1)=
  3790. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3791. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3792. m4_if([$1], [CXX], [
  3793. # C++ specific cases for pic, static, wl, etc.
  3794. if test yes = "$GXX"; then
  3795. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3796. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3797. case $host_os in
  3798. aix*)
  3799. # All AIX code is PIC.
  3800. if test ia64 = "$host_cpu"; then
  3801. # AIX 5 now supports IA64 processor
  3802. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3803. fi
  3804. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3805. ;;
  3806. amigaos*)
  3807. case $host_cpu in
  3808. powerpc)
  3809. # see comment about AmigaOS4 .so support
  3810. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3811. ;;
  3812. m68k)
  3813. # FIXME: we need at least 68020 code to build shared libraries, but
  3814. # adding the '-m68020' flag to GCC prevents building anything better,
  3815. # like '-m68040'.
  3816. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  3817. ;;
  3818. esac
  3819. ;;
  3820. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  3821. # PIC is the default for these OSes.
  3822. ;;
  3823. mingw* | windows* | cygwin* | os2* | pw32* | cegcc*)
  3824. # This hack is so that the source file can tell whether it is being
  3825. # built for inclusion in a dll (and should export symbols for example).
  3826. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  3827. # (--disable-auto-import) libraries
  3828. m4_if([$1], [GCJ], [],
  3829. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3830. case $host_os in
  3831. os2*)
  3832. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
  3833. ;;
  3834. esac
  3835. ;;
  3836. darwin* | rhapsody*)
  3837. # PIC is the default on this platform
  3838. # Common symbols not allowed in MH_DYLIB files
  3839. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  3840. ;;
  3841. *djgpp*)
  3842. # DJGPP does not support shared libraries at all
  3843. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3844. ;;
  3845. haiku*)
  3846. # PIC is the default for Haiku.
  3847. # The "-static" flag exists, but is broken.
  3848. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3849. ;;
  3850. interix[[3-9]]*)
  3851. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  3852. # Instead, we relocate shared libraries at runtime.
  3853. ;;
  3854. sysv4*MP*)
  3855. if test -d /usr/nec; then
  3856. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  3857. fi
  3858. ;;
  3859. hpux*)
  3860. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  3861. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  3862. # sets the default TLS model and affects inlining.
  3863. case $host_cpu in
  3864. hppa*64*)
  3865. ;;
  3866. *)
  3867. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3868. ;;
  3869. esac
  3870. ;;
  3871. *qnx* | *nto*)
  3872. # QNX uses GNU C++, but need to define -shared option too, otherwise
  3873. # it will coredump.
  3874. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  3875. ;;
  3876. *)
  3877. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3878. ;;
  3879. esac
  3880. else
  3881. case $host_os in
  3882. aix[[4-9]]*)
  3883. # All AIX code is PIC.
  3884. if test ia64 = "$host_cpu"; then
  3885. # AIX 5 now supports IA64 processor
  3886. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3887. else
  3888. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  3889. fi
  3890. ;;
  3891. chorus*)
  3892. case $cc_basename in
  3893. cxch68*)
  3894. # Green Hills C++ Compiler
  3895. # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
  3896. ;;
  3897. esac
  3898. ;;
  3899. mingw* | windows* | cygwin* | os2* | pw32* | cegcc*)
  3900. # This hack is so that the source file can tell whether it is being
  3901. # built for inclusion in a dll (and should export symbols for example).
  3902. m4_if([$1], [GCJ], [],
  3903. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3904. ;;
  3905. dgux*)
  3906. case $cc_basename in
  3907. ec++*)
  3908. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3909. ;;
  3910. ghcx*)
  3911. # Green Hills C++ Compiler
  3912. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3913. ;;
  3914. *)
  3915. ;;
  3916. esac
  3917. ;;
  3918. freebsd* | dragonfly* | midnightbsd*)
  3919. # FreeBSD uses GNU C++
  3920. ;;
  3921. hpux9* | hpux10* | hpux11*)
  3922. case $cc_basename in
  3923. CC*)
  3924. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3925. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
  3926. if test ia64 != "$host_cpu"; then
  3927. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  3928. fi
  3929. ;;
  3930. aCC*)
  3931. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3932. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
  3933. case $host_cpu in
  3934. hppa*64*|ia64*)
  3935. # +Z the default
  3936. ;;
  3937. *)
  3938. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  3939. ;;
  3940. esac
  3941. ;;
  3942. *)
  3943. ;;
  3944. esac
  3945. ;;
  3946. interix*)
  3947. # This is c89, which is MS Visual C++ (no shared libs)
  3948. # Anyone wants to do a port?
  3949. ;;
  3950. irix5* | irix6* | nonstopux*)
  3951. case $cc_basename in
  3952. CC*)
  3953. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3954. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3955. # CC pic flag -KPIC is the default.
  3956. ;;
  3957. *)
  3958. ;;
  3959. esac
  3960. ;;
  3961. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  3962. case $cc_basename in
  3963. KCC*)
  3964. # KAI C++ Compiler
  3965. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  3966. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3967. ;;
  3968. ecpc* )
  3969. # old Intel C++ for x86_64, which still supported -KPIC.
  3970. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3971. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3972. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3973. ;;
  3974. icpc* )
  3975. # Intel C++, used to be incompatible with GCC.
  3976. # ICC 10 doesn't accept -KPIC any more.
  3977. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3978. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3979. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3980. ;;
  3981. pgCC* | pgcpp*)
  3982. # Portland Group C++ compiler
  3983. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3984. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  3985. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3986. ;;
  3987. cxx*)
  3988. # Compaq C++
  3989. # Make sure the PIC flag is empty. It appears that all Alpha
  3990. # Linux and Compaq Tru64 Unix objects are PIC.
  3991. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3992. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3993. ;;
  3994. xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
  3995. # IBM XL 8.0, 9.0 on PPC and BlueGene
  3996. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3997. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  3998. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  3999. ;;
  4000. *)
  4001. case `$CC -V 2>&1 | sed 5q` in
  4002. *Sun\ C*)
  4003. # Sun C++ 5.9
  4004. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4005. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4006. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4007. ;;
  4008. esac
  4009. ;;
  4010. esac
  4011. ;;
  4012. lynxos*)
  4013. ;;
  4014. m88k*)
  4015. ;;
  4016. mvs*)
  4017. case $cc_basename in
  4018. cxx*)
  4019. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
  4020. ;;
  4021. *)
  4022. ;;
  4023. esac
  4024. ;;
  4025. netbsd*)
  4026. ;;
  4027. *qnx* | *nto*)
  4028. # QNX uses GNU C++, but need to define -shared option too, otherwise
  4029. # it will coredump.
  4030. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4031. ;;
  4032. osf3* | osf4* | osf5*)
  4033. case $cc_basename in
  4034. KCC*)
  4035. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  4036. ;;
  4037. RCC*)
  4038. # Rational C++ 2.4.1
  4039. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4040. ;;
  4041. cxx*)
  4042. # Digital/Compaq C++
  4043. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4044. # Make sure the PIC flag is empty. It appears that all Alpha
  4045. # Linux and Compaq Tru64 Unix objects are PIC.
  4046. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4047. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4048. ;;
  4049. *)
  4050. ;;
  4051. esac
  4052. ;;
  4053. psos*)
  4054. ;;
  4055. solaris*)
  4056. case $cc_basename in
  4057. CC* | sunCC*)
  4058. # Sun C++ 4.2, 5.x and Centerline C++
  4059. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4060. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4061. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4062. ;;
  4063. gcx*)
  4064. # Green Hills C++ Compiler
  4065. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4066. ;;
  4067. *)
  4068. ;;
  4069. esac
  4070. ;;
  4071. sunos4*)
  4072. case $cc_basename in
  4073. CC*)
  4074. # Sun C++ 4.x
  4075. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4076. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4077. ;;
  4078. lcc*)
  4079. # Lucid
  4080. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4081. ;;
  4082. *)
  4083. ;;
  4084. esac
  4085. ;;
  4086. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  4087. case $cc_basename in
  4088. CC*)
  4089. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4090. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4091. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4092. ;;
  4093. esac
  4094. ;;
  4095. tandem*)
  4096. case $cc_basename in
  4097. NCC*)
  4098. # NonStop-UX NCC 3.20
  4099. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4100. ;;
  4101. *)
  4102. ;;
  4103. esac
  4104. ;;
  4105. vxworks*)
  4106. ;;
  4107. *)
  4108. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4109. ;;
  4110. esac
  4111. fi
  4112. ],
  4113. [
  4114. if test yes = "$GCC"; then
  4115. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4116. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4117. case $host_os in
  4118. aix*)
  4119. # All AIX code is PIC.
  4120. if test ia64 = "$host_cpu"; then
  4121. # AIX 5 now supports IA64 processor
  4122. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4123. fi
  4124. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4125. ;;
  4126. amigaos*)
  4127. case $host_cpu in
  4128. powerpc)
  4129. # see comment about AmigaOS4 .so support
  4130. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4131. ;;
  4132. m68k)
  4133. # FIXME: we need at least 68020 code to build shared libraries, but
  4134. # adding the '-m68020' flag to GCC prevents building anything better,
  4135. # like '-m68040'.
  4136. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  4137. ;;
  4138. esac
  4139. ;;
  4140. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  4141. # PIC is the default for these OSes.
  4142. ;;
  4143. mingw* | windows* | cygwin* | pw32* | os2* | cegcc*)
  4144. # This hack is so that the source file can tell whether it is being
  4145. # built for inclusion in a dll (and should export symbols for example).
  4146. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  4147. # (--disable-auto-import) libraries
  4148. m4_if([$1], [GCJ], [],
  4149. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  4150. case $host_os in
  4151. os2*)
  4152. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
  4153. ;;
  4154. esac
  4155. ;;
  4156. darwin* | rhapsody*)
  4157. # PIC is the default on this platform
  4158. # Common symbols not allowed in MH_DYLIB files
  4159. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  4160. ;;
  4161. haiku*)
  4162. # PIC is the default for Haiku.
  4163. # The "-static" flag exists, but is broken.
  4164. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  4165. ;;
  4166. hpux*)
  4167. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  4168. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  4169. # sets the default TLS model and affects inlining.
  4170. case $host_cpu in
  4171. hppa*64*)
  4172. # +Z the default
  4173. ;;
  4174. *)
  4175. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4176. ;;
  4177. esac
  4178. ;;
  4179. interix[[3-9]]*)
  4180. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  4181. # Instead, we relocate shared libraries at runtime.
  4182. ;;
  4183. msdosdjgpp*)
  4184. # Just because we use GCC doesn't mean we suddenly get shared libraries
  4185. # on systems that don't support them.
  4186. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4187. enable_shared=no
  4188. ;;
  4189. *nto* | *qnx*)
  4190. # QNX uses GNU C++, but need to define -shared option too, otherwise
  4191. # it will coredump.
  4192. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4193. ;;
  4194. sysv4*MP*)
  4195. if test -d /usr/nec; then
  4196. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  4197. fi
  4198. ;;
  4199. *)
  4200. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4201. ;;
  4202. esac
  4203. case $cc_basename in
  4204. nvcc*) # Cuda Compiler Driver 2.2
  4205. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
  4206. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  4207. _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
  4208. fi
  4209. ;;
  4210. esac
  4211. else
  4212. # PORTME Check for flag to pass linker flags through the system compiler.
  4213. case $host_os in
  4214. aix*)
  4215. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4216. if test ia64 = "$host_cpu"; then
  4217. # AIX 5 now supports IA64 processor
  4218. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4219. else
  4220. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  4221. fi
  4222. ;;
  4223. darwin* | rhapsody*)
  4224. # PIC is the default on this platform
  4225. # Common symbols not allowed in MH_DYLIB files
  4226. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  4227. case $cc_basename in
  4228. nagfor*)
  4229. # NAG Fortran compiler
  4230. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
  4231. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4232. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4233. ;;
  4234. esac
  4235. ;;
  4236. mingw* | windows* | cygwin* | pw32* | os2* | cegcc*)
  4237. # This hack is so that the source file can tell whether it is being
  4238. # built for inclusion in a dll (and should export symbols for example).
  4239. m4_if([$1], [GCJ], [],
  4240. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  4241. case $host_os in
  4242. os2*)
  4243. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
  4244. ;;
  4245. esac
  4246. ;;
  4247. hpux9* | hpux10* | hpux11*)
  4248. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4249. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  4250. # not for PA HP-UX.
  4251. case $host_cpu in
  4252. hppa*64*|ia64*)
  4253. # +Z the default
  4254. ;;
  4255. *)
  4256. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4257. ;;
  4258. esac
  4259. # Is there a better lt_prog_compiler_static that works with the bundled CC?
  4260. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
  4261. ;;
  4262. irix5* | irix6* | nonstopux*)
  4263. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4264. # PIC (with -KPIC) is the default.
  4265. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4266. ;;
  4267. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  4268. case $cc_basename in
  4269. # old Intel for x86_64, which still supported -KPIC.
  4270. ecc*)
  4271. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4272. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4273. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4274. ;;
  4275. # icc used to be incompatible with GCC.
  4276. # ICC 10 doesn't accept -KPIC any more.
  4277. icc* | ifort*)
  4278. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4279. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4280. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4281. ;;
  4282. # Lahey Fortran 8.1.
  4283. lf95*)
  4284. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4285. _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
  4286. _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
  4287. ;;
  4288. nagfor*)
  4289. # NAG Fortran compiler
  4290. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
  4291. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4292. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4293. ;;
  4294. tcc*)
  4295. # Fabrice Bellard et al's Tiny C Compiler
  4296. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4297. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4298. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4299. ;;
  4300. pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
  4301. # Portland Group compilers (*not* the Pentium gcc compiler,
  4302. # which looks to be a dead project)
  4303. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4304. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4305. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4306. ;;
  4307. ccc*)
  4308. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4309. # All Alpha code is PIC.
  4310. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4311. ;;
  4312. xl* | bgxl* | bgf* | mpixl*)
  4313. # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
  4314. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4315. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  4316. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  4317. ;;
  4318. *)
  4319. case `$CC -V 2>&1 | sed 5q` in
  4320. *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
  4321. # Sun Fortran 8.3 passes all unrecognized flags to the linker
  4322. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4323. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4324. _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
  4325. ;;
  4326. *Sun\ F* | *Sun*Fortran*)
  4327. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4328. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4329. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4330. ;;
  4331. *Sun\ C*)
  4332. # Sun C 5.9
  4333. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4334. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4335. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4336. ;;
  4337. *Intel*\ [[CF]]*Compiler*)
  4338. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4339. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4340. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4341. ;;
  4342. *Portland\ Group*)
  4343. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4344. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4345. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4346. ;;
  4347. esac
  4348. ;;
  4349. esac
  4350. ;;
  4351. newsos6)
  4352. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4353. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4354. ;;
  4355. *nto* | *qnx*)
  4356. # QNX uses GNU C++, but need to define -shared option too, otherwise
  4357. # it will coredump.
  4358. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4359. ;;
  4360. osf3* | osf4* | osf5*)
  4361. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4362. # All OSF/1 code is PIC.
  4363. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4364. ;;
  4365. rdos*)
  4366. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4367. ;;
  4368. solaris*)
  4369. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4370. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4371. case $cc_basename in
  4372. f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
  4373. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
  4374. *)
  4375. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
  4376. esac
  4377. ;;
  4378. sunos4*)
  4379. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4380. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4381. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4382. ;;
  4383. sysv4 | sysv4.2uw2* | sysv4.3*)
  4384. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4385. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4386. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4387. ;;
  4388. sysv4*MP*)
  4389. if test -d /usr/nec; then
  4390. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
  4391. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4392. fi
  4393. ;;
  4394. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  4395. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4396. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4397. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4398. ;;
  4399. unicos*)
  4400. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4401. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4402. ;;
  4403. uts4*)
  4404. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4405. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4406. ;;
  4407. *)
  4408. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4409. ;;
  4410. esac
  4411. fi
  4412. ])
  4413. case $host_os in
  4414. # For platforms that do not support PIC, -DPIC is meaningless:
  4415. *djgpp*)
  4416. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4417. ;;
  4418. *)
  4419. _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
  4420. ;;
  4421. esac
  4422. AC_CACHE_CHECK([for $compiler option to produce PIC],
  4423. [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
  4424. [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
  4425. _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
  4426. #
  4427. # Check to make sure the PIC flag actually works.
  4428. #
  4429. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  4430. _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
  4431. [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
  4432. [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
  4433. [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
  4434. "" | " "*) ;;
  4435. *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
  4436. esac],
  4437. [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4438. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
  4439. fi
  4440. _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
  4441. [Additional compiler flags for building library objects])
  4442. _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
  4443. [How to pass a linker flag through the compiler])
  4444. #
  4445. # Check to make sure the static flag actually works.
  4446. #
  4447. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
  4448. _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
  4449. _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
  4450. $lt_tmp_static_flag,
  4451. [],
  4452. [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
  4453. _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
  4454. [Compiler flag to prevent dynamic linking])
  4455. ])# _LT_COMPILER_PIC
  4456. # _LT_LINKER_SHLIBS([TAGNAME])
  4457. # ----------------------------
  4458. # See if the linker supports building shared libraries.
  4459. m4_defun([_LT_LINKER_SHLIBS],
  4460. [AC_REQUIRE([LT_PATH_LD])dnl
  4461. AC_REQUIRE([LT_PATH_NM])dnl
  4462. m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  4463. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  4464. m4_require([_LT_DECL_EGREP])dnl
  4465. m4_require([_LT_DECL_SED])dnl
  4466. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  4467. m4_require([_LT_TAG_COMPILER])dnl
  4468. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  4469. m4_if([$1], [CXX], [
  4470. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4471. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  4472. case $host_os in
  4473. aix[[4-9]]*)
  4474. # If we're using GNU nm, then we don't want the "-C" option.
  4475. # -C means demangle to GNU nm, but means don't demangle to AIX nm.
  4476. # Without the "-l" option, or with the "-B" option, AIX nm treats
  4477. # weak defined symbols like other global defined symbols, whereas
  4478. # GNU nm marks them as "W".
  4479. # While the 'weak' keyword is ignored in the Export File, we need
  4480. # it in the Import File for the 'aix-soname' feature, so we have
  4481. # to replace the "-B" option with "-P" for AIX nm.
  4482. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  4483. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
  4484. else
  4485. _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
  4486. fi
  4487. ;;
  4488. pw32*)
  4489. _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
  4490. ;;
  4491. cygwin* | mingw* | windows* | cegcc*)
  4492. case $cc_basename in
  4493. cl* | icl*)
  4494. _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  4495. ;;
  4496. *)
  4497. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
  4498. _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  4499. ;;
  4500. esac
  4501. ;;
  4502. *)
  4503. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4504. ;;
  4505. esac
  4506. ], [
  4507. runpath_var=
  4508. _LT_TAGVAR(allow_undefined_flag, $1)=
  4509. _LT_TAGVAR(always_export_symbols, $1)=no
  4510. _LT_TAGVAR(archive_cmds, $1)=
  4511. _LT_TAGVAR(archive_expsym_cmds, $1)=
  4512. _LT_TAGVAR(compiler_needs_object, $1)=no
  4513. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  4514. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  4515. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4516. _LT_TAGVAR(hardcode_automatic, $1)=no
  4517. _LT_TAGVAR(hardcode_direct, $1)=no
  4518. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  4519. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4520. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  4521. _LT_TAGVAR(hardcode_minus_L, $1)=no
  4522. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  4523. _LT_TAGVAR(inherit_rpath, $1)=no
  4524. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  4525. _LT_TAGVAR(module_cmds, $1)=
  4526. _LT_TAGVAR(module_expsym_cmds, $1)=
  4527. _LT_TAGVAR(old_archive_from_new_cmds, $1)=
  4528. _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
  4529. _LT_TAGVAR(thread_safe_flag_spec, $1)=
  4530. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4531. # include_expsyms should be a list of space-separated symbols to be *always*
  4532. # included in the symbol list
  4533. _LT_TAGVAR(include_expsyms, $1)=
  4534. # exclude_expsyms can be an extended regexp of symbols to exclude
  4535. # it will be wrapped by ' (' and ')$', so one must not match beginning or
  4536. # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
  4537. # as well as any symbol that contains 'd'.
  4538. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  4539. # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  4540. # platforms (ab)use it in PIC code, but their linkers get confused if
  4541. # the symbol is explicitly referenced. Since portable code cannot
  4542. # rely on this symbol name, it's probably fine to never include it in
  4543. # preloaded symbol tables.
  4544. # Exclude shared library initialization/finalization symbols.
  4545. dnl Note also adjust exclude_expsyms for C++ above.
  4546. extract_expsyms_cmds=
  4547. case $host_os in
  4548. cygwin* | mingw* | windows* | pw32* | cegcc*)
  4549. # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
  4550. # When not using gcc, we currently assume that we are using
  4551. # Microsoft Visual C++ or Intel C++ Compiler.
  4552. if test yes != "$GCC"; then
  4553. with_gnu_ld=no
  4554. fi
  4555. ;;
  4556. interix*)
  4557. # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
  4558. with_gnu_ld=yes
  4559. ;;
  4560. openbsd* | bitrig*)
  4561. with_gnu_ld=no
  4562. ;;
  4563. esac
  4564. _LT_TAGVAR(ld_shlibs, $1)=yes
  4565. # On some targets, GNU ld is compatible enough with the native linker
  4566. # that we're better off using the native interface for both.
  4567. lt_use_gnu_ld_interface=no
  4568. if test yes = "$with_gnu_ld"; then
  4569. case $host_os in
  4570. aix*)
  4571. # The AIX port of GNU ld has always aspired to compatibility
  4572. # with the native linker. However, as the warning in the GNU ld
  4573. # block says, versions before 2.19.5* couldn't really create working
  4574. # shared libraries, regardless of the interface used.
  4575. case `$LD -v 2>&1` in
  4576. *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
  4577. *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
  4578. *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
  4579. *)
  4580. lt_use_gnu_ld_interface=yes
  4581. ;;
  4582. esac
  4583. ;;
  4584. *)
  4585. lt_use_gnu_ld_interface=yes
  4586. ;;
  4587. esac
  4588. fi
  4589. if test yes = "$lt_use_gnu_ld_interface"; then
  4590. # If archive_cmds runs LD, not CC, wlarc should be empty
  4591. wlarc='$wl'
  4592. # Set some defaults for GNU ld with shared library support. These
  4593. # are reset later if shared libraries are not supported. Putting them
  4594. # here allows them to be overridden if necessary.
  4595. runpath_var=LD_RUN_PATH
  4596. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  4597. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  4598. # ancient GNU ld didn't support --whole-archive et. al.
  4599. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
  4600. _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
  4601. else
  4602. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4603. fi
  4604. supports_anon_versioning=no
  4605. case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in
  4606. *GNU\ gold*) supports_anon_versioning=yes ;;
  4607. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
  4608. *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
  4609. *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
  4610. *\ 2.11.*) ;; # other 2.11 versions
  4611. *) supports_anon_versioning=yes ;;
  4612. esac
  4613. # See if GNU ld supports shared libraries.
  4614. case $host_os in
  4615. aix[[3-9]]*)
  4616. # On AIX/PPC, the GNU linker is very broken
  4617. if test ia64 != "$host_cpu"; then
  4618. _LT_TAGVAR(ld_shlibs, $1)=no
  4619. cat <<_LT_EOF 1>&2
  4620. *** Warning: the GNU linker, at least up to release 2.19, is reported
  4621. *** to be unable to reliably create shared libraries on AIX.
  4622. *** Therefore, libtool is disabling shared libraries support. If you
  4623. *** really care for shared libraries, you may want to install binutils
  4624. *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
  4625. *** You will then need to restart the configuration process.
  4626. _LT_EOF
  4627. fi
  4628. ;;
  4629. amigaos*)
  4630. case $host_cpu in
  4631. powerpc)
  4632. # see comment about AmigaOS4 .so support
  4633. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4634. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  4635. ;;
  4636. m68k)
  4637. _LT_TAGVAR(archive_cmds, $1)='$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)'
  4638. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4639. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4640. ;;
  4641. esac
  4642. ;;
  4643. beos*)
  4644. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4645. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4646. # Joseph Beckenbach <[email protected]> says some releases of gcc
  4647. # support --undefined. This deserves some investigation. FIXME
  4648. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4649. else
  4650. _LT_TAGVAR(ld_shlibs, $1)=no
  4651. fi
  4652. ;;
  4653. cygwin* | mingw* | windows* | pw32* | cegcc*)
  4654. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  4655. # as there is no search path for DLLs.
  4656. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4657. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
  4658. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4659. _LT_TAGVAR(always_export_symbols, $1)=no
  4660. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4661. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
  4662. _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  4663. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  4664. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  4665. # If the export-symbols file already is a .def file, use it as
  4666. # is; otherwise, prepend EXPORTS...
  4667. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  4668. cp $export_symbols $output_objdir/$soname.def;
  4669. else
  4670. echo EXPORTS > $output_objdir/$soname.def;
  4671. cat $export_symbols >> $output_objdir/$soname.def;
  4672. fi~
  4673. $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  4674. else
  4675. _LT_TAGVAR(ld_shlibs, $1)=no
  4676. fi
  4677. ;;
  4678. haiku*)
  4679. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4680. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4681. ;;
  4682. os2*)
  4683. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4684. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4685. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4686. shrext_cmds=.dll
  4687. _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  4688. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  4689. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  4690. $ECHO EXPORTS >> $output_objdir/$libname.def~
  4691. emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
  4692. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  4693. emximp -o $lib $output_objdir/$libname.def'
  4694. _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  4695. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  4696. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  4697. $ECHO EXPORTS >> $output_objdir/$libname.def~
  4698. prefix_cmds="$SED"~
  4699. if test EXPORTS = "`$SED 1q $export_symbols`"; then
  4700. prefix_cmds="$prefix_cmds -e 1d";
  4701. fi~
  4702. prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
  4703. cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
  4704. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  4705. emximp -o $lib $output_objdir/$libname.def'
  4706. _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
  4707. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4708. _LT_TAGVAR(file_list_spec, $1)='@'
  4709. ;;
  4710. interix[[3-9]]*)
  4711. _LT_TAGVAR(hardcode_direct, $1)=no
  4712. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4713. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  4714. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  4715. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  4716. # Instead, shared libraries are loaded at an image base (0x10000000 by
  4717. # default) and relocated if they conflict, which is a slow very memory
  4718. # consuming and fragmenting process. To avoid this, we pick a random,
  4719. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  4720. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  4721. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
  4722. _LT_TAGVAR(archive_expsym_cmds, $1)='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'
  4723. ;;
  4724. gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
  4725. tmp_diet=no
  4726. if test linux-dietlibc = "$host_os"; then
  4727. case $cc_basename in
  4728. diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
  4729. esac
  4730. fi
  4731. if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
  4732. && test no = "$tmp_diet"
  4733. then
  4734. tmp_addflag=' $pic_flag'
  4735. tmp_sharedflag='-shared'
  4736. case $cc_basename,$host_cpu in
  4737. pgcc*) # Portland Group C compiler
  4738. _LT_TAGVAR(whole_archive_flag_spec, $1)='$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'
  4739. tmp_addflag=' $pic_flag'
  4740. ;;
  4741. pgf77* | pgf90* | pgf95* | pgfortran*)
  4742. # Portland Group f77 and f90 compilers
  4743. _LT_TAGVAR(whole_archive_flag_spec, $1)='$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'
  4744. tmp_addflag=' $pic_flag -Mnomain' ;;
  4745. ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
  4746. tmp_addflag=' -i_dynamic' ;;
  4747. efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
  4748. tmp_addflag=' -i_dynamic -nofor_main' ;;
  4749. ifc* | ifort*) # Intel Fortran compiler
  4750. tmp_addflag=' -nofor_main' ;;
  4751. lf95*) # Lahey Fortran 8.1
  4752. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4753. tmp_sharedflag='--shared' ;;
  4754. nagfor*) # NAGFOR 5.3
  4755. tmp_sharedflag='-Wl,-shared' ;;
  4756. xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
  4757. tmp_sharedflag='-qmkshrobj'
  4758. tmp_addflag= ;;
  4759. nvcc*) # Cuda Compiler Driver 2.2
  4760. _LT_TAGVAR(whole_archive_flag_spec, $1)='$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'
  4761. _LT_TAGVAR(compiler_needs_object, $1)=yes
  4762. ;;
  4763. esac
  4764. case `$CC -V 2>&1 | sed 5q` in
  4765. *Sun\ C*) # Sun C 5.9
  4766. _LT_TAGVAR(whole_archive_flag_spec, $1)='$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'
  4767. _LT_TAGVAR(compiler_needs_object, $1)=yes
  4768. tmp_sharedflag='-G' ;;
  4769. *Sun\ F*) # Sun Fortran 8.3
  4770. tmp_sharedflag='-G' ;;
  4771. esac
  4772. _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4773. if test yes = "$supports_anon_versioning"; then
  4774. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  4775. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4776. echo "local: *; };" >> $output_objdir/$libname.ver~
  4777. $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
  4778. fi
  4779. case $cc_basename in
  4780. tcc*)
  4781. _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
  4782. ;;
  4783. xlf* | bgf* | bgxlf* | mpixlf*)
  4784. # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
  4785. _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
  4786. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  4787. _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
  4788. if test yes = "$supports_anon_versioning"; then
  4789. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  4790. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4791. echo "local: *; };" >> $output_objdir/$libname.ver~
  4792. $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
  4793. fi
  4794. ;;
  4795. esac
  4796. else
  4797. _LT_TAGVAR(ld_shlibs, $1)=no
  4798. fi
  4799. ;;
  4800. netbsd*)
  4801. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  4802. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  4803. wlarc=
  4804. else
  4805. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4806. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
  4807. fi
  4808. ;;
  4809. solaris*)
  4810. if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
  4811. _LT_TAGVAR(ld_shlibs, $1)=no
  4812. cat <<_LT_EOF 1>&2
  4813. *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  4814. *** create shared libraries on Solaris systems. Therefore, libtool
  4815. *** is disabling shared libraries support. We urge you to upgrade GNU
  4816. *** binutils to release 2.9.1 or newer. Another option is to modify
  4817. *** your PATH or compiler configuration so that the native linker is
  4818. *** used, and then restart.
  4819. _LT_EOF
  4820. elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4821. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4822. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
  4823. else
  4824. _LT_TAGVAR(ld_shlibs, $1)=no
  4825. fi
  4826. ;;
  4827. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
  4828. case `$LD -v 2>&1` in
  4829. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
  4830. _LT_TAGVAR(ld_shlibs, $1)=no
  4831. cat <<_LT_EOF 1>&2
  4832. *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
  4833. *** reliably create shared libraries on SCO systems. Therefore, libtool
  4834. *** is disabling shared libraries support. We urge you to upgrade GNU
  4835. *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
  4836. *** your PATH or compiler configuration so that the native linker is
  4837. *** used, and then restart.
  4838. _LT_EOF
  4839. ;;
  4840. *)
  4841. # For security reasons, it is highly recommended that you always
  4842. # use absolute paths for naming shared libraries, and exclude the
  4843. # DT_RUNPATH tag from executables and libraries. But doing so
  4844. # requires that you compile everything twice, which is a pain.
  4845. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4846. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  4847. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4848. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
  4849. else
  4850. _LT_TAGVAR(ld_shlibs, $1)=no
  4851. fi
  4852. ;;
  4853. esac
  4854. ;;
  4855. sunos4*)
  4856. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4857. wlarc=
  4858. _LT_TAGVAR(hardcode_direct, $1)=yes
  4859. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4860. ;;
  4861. *)
  4862. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4863. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4864. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
  4865. else
  4866. _LT_TAGVAR(ld_shlibs, $1)=no
  4867. fi
  4868. ;;
  4869. esac
  4870. if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
  4871. runpath_var=
  4872. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4873. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  4874. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4875. fi
  4876. else
  4877. # PORTME fill in a description of your system's linker (not GNU ld)
  4878. case $host_os in
  4879. aix3*)
  4880. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4881. _LT_TAGVAR(always_export_symbols, $1)=yes
  4882. _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
  4883. # Note: this linker hardcodes the directories in LIBPATH if there
  4884. # are no directories specified by -L.
  4885. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4886. if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
  4887. # Neither direct hardcoding nor static linking is supported with a
  4888. # broken collect2.
  4889. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  4890. fi
  4891. ;;
  4892. aix[[4-9]]*)
  4893. if test ia64 = "$host_cpu"; then
  4894. # On IA64, the linker does run time linking by default, so we don't
  4895. # have to do anything special.
  4896. aix_use_runtimelinking=no
  4897. exp_sym_flag='-Bexport'
  4898. no_entry_flag=
  4899. else
  4900. # If we're using GNU nm, then we don't want the "-C" option.
  4901. # -C means demangle to GNU nm, but means don't demangle to AIX nm.
  4902. # Without the "-l" option, or with the "-B" option, AIX nm treats
  4903. # weak defined symbols like other global defined symbols, whereas
  4904. # GNU nm marks them as "W".
  4905. # While the 'weak' keyword is ignored in the Export File, we need
  4906. # it in the Import File for the 'aix-soname' feature, so we have
  4907. # to replace the "-B" option with "-P" for AIX nm.
  4908. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  4909. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
  4910. else
  4911. _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
  4912. fi
  4913. aix_use_runtimelinking=no
  4914. # Test if we are trying to use run time linking or normal
  4915. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  4916. # have runtime linking enabled, and use it for executables.
  4917. # For shared libraries, we enable/disable runtime linking
  4918. # depending on the kind of the shared library created -
  4919. # when "with_aix_soname,aix_use_runtimelinking" is:
  4920. # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
  4921. # "aix,yes" lib.so shared, rtl:yes, for executables
  4922. # lib.a static archive
  4923. # "both,no" lib.so.V(shr.o) shared, rtl:yes
  4924. # lib.a(lib.so.V) shared, rtl:no, for executables
  4925. # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
  4926. # lib.a(lib.so.V) shared, rtl:no
  4927. # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
  4928. # lib.a static archive
  4929. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  4930. for ld_flag in $LDFLAGS; do
  4931. if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
  4932. aix_use_runtimelinking=yes
  4933. break
  4934. fi
  4935. done
  4936. if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
  4937. # With aix-soname=svr4, we create the lib.so.V shared archives only,
  4938. # so we don't have lib.a shared libs to link our executables.
  4939. # We have to force runtime linking in this case.
  4940. aix_use_runtimelinking=yes
  4941. LDFLAGS="$LDFLAGS -Wl,-brtl"
  4942. fi
  4943. ;;
  4944. esac
  4945. exp_sym_flag='-bexport'
  4946. no_entry_flag='-bnoentry'
  4947. fi
  4948. # When large executables or shared objects are built, AIX ld can
  4949. # have problems creating the table of contents. If linking a library
  4950. # or program results in "error TOC overflow" add -mminimal-toc to
  4951. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  4952. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  4953. _LT_TAGVAR(archive_cmds, $1)=''
  4954. _LT_TAGVAR(hardcode_direct, $1)=yes
  4955. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4956. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  4957. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4958. _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
  4959. case $with_aix_soname,$aix_use_runtimelinking in
  4960. aix,*) ;; # traditional, no import file
  4961. svr4,* | *,yes) # use import file
  4962. # The Import File defines what to hardcode.
  4963. _LT_TAGVAR(hardcode_direct, $1)=no
  4964. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  4965. ;;
  4966. esac
  4967. if test yes = "$GCC"; then
  4968. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  4969. # We only want to do this on AIX 4.2 and lower, the check
  4970. # below for broken collect2 doesn't work under 4.3+
  4971. collect2name=`$CC -print-prog-name=collect2`
  4972. if test -f "$collect2name" &&
  4973. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  4974. then
  4975. # We have reworked collect2
  4976. :
  4977. else
  4978. # We have old collect2
  4979. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  4980. # It fails to find uninstalled libraries when the uninstalled
  4981. # path is not listed in the libpath. Setting hardcode_minus_L
  4982. # to unsupported forces relinking
  4983. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4984. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4985. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  4986. fi
  4987. ;;
  4988. esac
  4989. shared_flag='-shared'
  4990. if test yes = "$aix_use_runtimelinking"; then
  4991. shared_flag="$shared_flag "'$wl-G'
  4992. fi
  4993. # Need to ensure runtime linking is disabled for the traditional
  4994. # shared library, or the linker may eventually find shared libraries
  4995. # /with/ Import File - we do not want to mix them.
  4996. shared_flag_aix='-shared'
  4997. shared_flag_svr4='-shared $wl-G'
  4998. else
  4999. # not using gcc
  5000. if test ia64 = "$host_cpu"; then
  5001. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  5002. # chokes on -Wl,-G. The following line is correct:
  5003. shared_flag='-G'
  5004. else
  5005. if test yes = "$aix_use_runtimelinking"; then
  5006. shared_flag='$wl-G'
  5007. else
  5008. shared_flag='$wl-bM:SRE'
  5009. fi
  5010. shared_flag_aix='$wl-bM:SRE'
  5011. shared_flag_svr4='$wl-G'
  5012. fi
  5013. fi
  5014. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
  5015. # It seems that -bexpall does not export symbols beginning with
  5016. # underscore (_), so it is better to generate a list of symbols to export.
  5017. _LT_TAGVAR(always_export_symbols, $1)=yes
  5018. if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
  5019. # Warning - without using the other runtime loading flags (-brtl),
  5020. # -berok will link without error, but may produce a broken library.
  5021. _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
  5022. # Determine the default libpath from the value encoded in an
  5023. # empty executable.
  5024. _LT_SYS_MODULE_PATH_AIX([$1])
  5025. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
  5026. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
  5027. else
  5028. if test ia64 = "$host_cpu"; then
  5029. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
  5030. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  5031. _LT_TAGVAR(archive_expsym_cmds, $1)="\$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"
  5032. else
  5033. # Determine the default libpath from the value encoded in an
  5034. # empty executable.
  5035. _LT_SYS_MODULE_PATH_AIX([$1])
  5036. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
  5037. # Warning - without using the other run time loading flags,
  5038. # -berok will link without error, but may produce a broken library.
  5039. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
  5040. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
  5041. if test yes = "$with_gnu_ld"; then
  5042. # We only use this code for GNU lds that support --whole-archive.
  5043. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
  5044. else
  5045. # Exported symbols can be pulled into shared objects from archives
  5046. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  5047. fi
  5048. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5049. _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
  5050. # -brtl affects multiple linker settings, -berok does not and is overridden later
  5051. compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
  5052. if test svr4 != "$with_aix_soname"; then
  5053. # This is similar to how AIX traditionally builds its shared libraries.
  5054. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
  5055. fi
  5056. if test aix != "$with_aix_soname"; then
  5057. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
  5058. else
  5059. # used by -dlpreopen to get the symbols
  5060. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
  5061. fi
  5062. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
  5063. fi
  5064. fi
  5065. ;;
  5066. amigaos*)
  5067. case $host_cpu in
  5068. powerpc)
  5069. # see comment about AmigaOS4 .so support
  5070. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  5071. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  5072. ;;
  5073. m68k)
  5074. _LT_TAGVAR(archive_cmds, $1)='$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)'
  5075. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5076. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5077. ;;
  5078. esac
  5079. ;;
  5080. bsdi[[45]]*)
  5081. _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
  5082. ;;
  5083. cygwin* | mingw* | windows* | pw32* | cegcc*)
  5084. # When not using gcc, we currently assume that we are using
  5085. # Microsoft Visual C++ or Intel C++ Compiler.
  5086. # hardcode_libdir_flag_spec is actually meaningless, as there is
  5087. # no search path for DLLs.
  5088. case $cc_basename in
  5089. cl* | icl*)
  5090. # Native MSVC or ICC
  5091. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  5092. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5093. _LT_TAGVAR(always_export_symbols, $1)=yes
  5094. _LT_TAGVAR(file_list_spec, $1)='@'
  5095. # Tell ltmain to make .lib files, not .a files.
  5096. libext=lib
  5097. # Tell ltmain to make .dll files, not .so files.
  5098. shrext_cmds=.dll
  5099. # FIXME: Setting linknames here is a bad hack.
  5100. _LT_TAGVAR(archive_cmds, $1)='$CC -Fe $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
  5101. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  5102. cp "$export_symbols" "$output_objdir/$soname.def";
  5103. echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
  5104. else
  5105. $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
  5106. fi~
  5107. $CC -Fe $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  5108. linknames='
  5109. # The linker will not automatically build a static lib if we build a DLL.
  5110. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  5111. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5112. _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  5113. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
  5114. # Don't use ranlib
  5115. _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  5116. _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  5117. lt_tool_outputfile="@TOOL_OUTPUT@"~
  5118. case $lt_outputfile in
  5119. *.exe|*.EXE) ;;
  5120. *)
  5121. lt_outputfile=$lt_outputfile.exe
  5122. lt_tool_outputfile=$lt_tool_outputfile.exe
  5123. ;;
  5124. esac~
  5125. if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
  5126. $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  5127. $RM "$lt_outputfile.manifest";
  5128. fi'
  5129. ;;
  5130. *)
  5131. # Assume MSVC and ICC wrapper
  5132. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  5133. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5134. # Tell ltmain to make .lib files, not .a files.
  5135. libext=lib
  5136. # Tell ltmain to make .dll files, not .so files.
  5137. shrext_cmds=.dll
  5138. # FIXME: Setting linknames here is a bad hack.
  5139. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
  5140. # The linker will automatically build a .lib file if we build a DLL.
  5141. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  5142. # FIXME: Should let the user specify the lib program.
  5143. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
  5144. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5145. ;;
  5146. esac
  5147. ;;
  5148. darwin* | rhapsody*)
  5149. _LT_DARWIN_LINKER_FEATURES($1)
  5150. ;;
  5151. dgux*)
  5152. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5153. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5154. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5155. ;;
  5156. # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  5157. # support. Future versions do this automatically, but an explicit c++rt0.o
  5158. # does not break anything, and helps significantly (at the cost of a little
  5159. # extra space).
  5160. freebsd2.2*)
  5161. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
  5162. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5163. _LT_TAGVAR(hardcode_direct, $1)=yes
  5164. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5165. ;;
  5166. # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  5167. freebsd2.*)
  5168. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  5169. _LT_TAGVAR(hardcode_direct, $1)=yes
  5170. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5171. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5172. ;;
  5173. # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  5174. freebsd* | dragonfly* | midnightbsd*)
  5175. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5176. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5177. _LT_TAGVAR(hardcode_direct, $1)=yes
  5178. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5179. ;;
  5180. hpux9*)
  5181. if test yes = "$GCC"; then
  5182. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
  5183. else
  5184. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
  5185. fi
  5186. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  5187. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5188. _LT_TAGVAR(hardcode_direct, $1)=yes
  5189. # hardcode_minus_L: Not really in the search PATH,
  5190. # but as the default location of the library.
  5191. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5192. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  5193. ;;
  5194. hpux10*)
  5195. if test yes,no = "$GCC,$with_gnu_ld"; then
  5196. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  5197. else
  5198. _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
  5199. fi
  5200. if test no = "$with_gnu_ld"; then
  5201. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  5202. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5203. _LT_TAGVAR(hardcode_direct, $1)=yes
  5204. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5205. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  5206. # hardcode_minus_L: Not really in the search PATH,
  5207. # but as the default location of the library.
  5208. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5209. fi
  5210. ;;
  5211. hpux11*)
  5212. if test yes,no = "$GCC,$with_gnu_ld"; then
  5213. case $host_cpu in
  5214. hppa*64*)
  5215. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
  5216. ;;
  5217. ia64*)
  5218. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  5219. ;;
  5220. *)
  5221. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  5222. ;;
  5223. esac
  5224. else
  5225. case $host_cpu in
  5226. hppa*64*)
  5227. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
  5228. ;;
  5229. ia64*)
  5230. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  5231. ;;
  5232. *)
  5233. m4_if($1, [], [
  5234. # Older versions of the 11.00 compiler do not understand -b yet
  5235. # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
  5236. _LT_LINKER_OPTION([if $CC understands -b],
  5237. _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
  5238. [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
  5239. [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
  5240. [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
  5241. ;;
  5242. esac
  5243. fi
  5244. if test no = "$with_gnu_ld"; then
  5245. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  5246. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5247. case $host_cpu in
  5248. hppa*64*|ia64*)
  5249. _LT_TAGVAR(hardcode_direct, $1)=no
  5250. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5251. ;;
  5252. *)
  5253. _LT_TAGVAR(hardcode_direct, $1)=yes
  5254. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5255. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  5256. # hardcode_minus_L: Not really in the search PATH,
  5257. # but as the default location of the library.
  5258. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5259. ;;
  5260. esac
  5261. fi
  5262. ;;
  5263. irix5* | irix6* | nonstopux*)
  5264. if test yes = "$GCC"; then
  5265. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_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'
  5266. # Try to use the -exported_symbol ld option, if it does not
  5267. # work, assume that -exports_file does not work either and
  5268. # implicitly export all symbols.
  5269. # This should be the same for all languages, so no per-tag cache variable.
  5270. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
  5271. [lt_cv_irix_exported_symbol],
  5272. [save_LDFLAGS=$LDFLAGS
  5273. LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
  5274. AC_LINK_IFELSE(
  5275. [AC_LANG_SOURCE(
  5276. [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
  5277. [C++], [[int foo (void) { return 0; }]],
  5278. [Fortran 77], [[
  5279. subroutine foo
  5280. end]],
  5281. [Fortran], [[
  5282. subroutine foo
  5283. end]])])],
  5284. [lt_cv_irix_exported_symbol=yes],
  5285. [lt_cv_irix_exported_symbol=no])
  5286. LDFLAGS=$save_LDFLAGS])
  5287. if test yes = "$lt_cv_irix_exported_symbol"; then
  5288. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_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 $wl-exports_file $wl$export_symbols -o $lib'
  5289. fi
  5290. else
  5291. _LT_TAGVAR(archive_cmds, $1)='$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'
  5292. _LT_TAGVAR(archive_expsym_cmds, $1)='$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'
  5293. fi
  5294. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  5295. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5296. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5297. _LT_TAGVAR(inherit_rpath, $1)=yes
  5298. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5299. ;;
  5300. linux*)
  5301. case $cc_basename in
  5302. tcc*)
  5303. # Fabrice Bellard et al's Tiny C Compiler
  5304. _LT_TAGVAR(ld_shlibs, $1)=yes
  5305. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5306. ;;
  5307. esac
  5308. ;;
  5309. netbsd*)
  5310. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  5311. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
  5312. else
  5313. _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
  5314. fi
  5315. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5316. _LT_TAGVAR(hardcode_direct, $1)=yes
  5317. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5318. ;;
  5319. newsos6)
  5320. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5321. _LT_TAGVAR(hardcode_direct, $1)=yes
  5322. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5323. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5324. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5325. ;;
  5326. *nto* | *qnx*)
  5327. ;;
  5328. openbsd* | bitrig*)
  5329. if test -f /usr/libexec/ld.so; then
  5330. _LT_TAGVAR(hardcode_direct, $1)=yes
  5331. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5332. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5333. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
  5334. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5335. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
  5336. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  5337. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  5338. else
  5339. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5340. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  5341. fi
  5342. else
  5343. _LT_TAGVAR(ld_shlibs, $1)=no
  5344. fi
  5345. ;;
  5346. os2*)
  5347. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5348. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5349. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5350. shrext_cmds=.dll
  5351. _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  5352. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  5353. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  5354. $ECHO EXPORTS >> $output_objdir/$libname.def~
  5355. emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
  5356. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  5357. emximp -o $lib $output_objdir/$libname.def'
  5358. _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  5359. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  5360. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  5361. $ECHO EXPORTS >> $output_objdir/$libname.def~
  5362. prefix_cmds="$SED"~
  5363. if test EXPORTS = "`$SED 1q $export_symbols`"; then
  5364. prefix_cmds="$prefix_cmds -e 1d";
  5365. fi~
  5366. prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
  5367. cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
  5368. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  5369. emximp -o $lib $output_objdir/$libname.def'
  5370. _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
  5371. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5372. _LT_TAGVAR(file_list_spec, $1)='@'
  5373. ;;
  5374. osf3*)
  5375. if test yes = "$GCC"; then
  5376. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
  5377. _LT_TAGVAR(archive_cmds, $1)='$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'
  5378. else
  5379. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  5380. _LT_TAGVAR(archive_cmds, $1)='$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'
  5381. fi
  5382. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  5383. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5384. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5385. ;;
  5386. osf4* | osf5*) # as osf3* with the addition of -msym flag
  5387. if test yes = "$GCC"; then
  5388. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
  5389. _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_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'
  5390. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5391. else
  5392. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  5393. _LT_TAGVAR(archive_cmds, $1)='$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'
  5394. _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
  5395. $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'
  5396. # Both c and cxx compiler support -rpath directly
  5397. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  5398. fi
  5399. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  5400. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5401. ;;
  5402. solaris*)
  5403. _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
  5404. if test yes = "$GCC"; then
  5405. wlarc='$wl'
  5406. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
  5407. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5408. $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
  5409. else
  5410. case `$CC -V 2>&1` in
  5411. *"Compilers 5.0"*)
  5412. wlarc=''
  5413. _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5414. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5415. $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
  5416. ;;
  5417. *)
  5418. wlarc='$wl'
  5419. _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
  5420. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5421. $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
  5422. ;;
  5423. esac
  5424. fi
  5425. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5426. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5427. case $host_os in
  5428. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  5429. *)
  5430. # The compiler driver will combine and reorder linker options,
  5431. # but understands '-z linker_flag'. GCC discards it without '$wl',
  5432. # but is careful enough not to reorder.
  5433. # Supported since Solaris 2.6 (maybe 2.5.1?)
  5434. if test yes = "$GCC"; then
  5435. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
  5436. else
  5437. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  5438. fi
  5439. ;;
  5440. esac
  5441. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5442. ;;
  5443. sunos4*)
  5444. if test sequent = "$host_vendor"; then
  5445. # Use $CC to link under sequent, because it throws in some extra .o
  5446. # files that make .init and .fini sections work.
  5447. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
  5448. else
  5449. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
  5450. fi
  5451. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5452. _LT_TAGVAR(hardcode_direct, $1)=yes
  5453. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5454. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5455. ;;
  5456. sysv4)
  5457. case $host_vendor in
  5458. sni)
  5459. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5460. _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
  5461. ;;
  5462. siemens)
  5463. ## LD is ld it makes a PLAMLIB
  5464. ## CC just makes a GrossModule.
  5465. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  5466. _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
  5467. _LT_TAGVAR(hardcode_direct, $1)=no
  5468. ;;
  5469. motorola)
  5470. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5471. _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
  5472. ;;
  5473. esac
  5474. runpath_var='LD_RUN_PATH'
  5475. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5476. ;;
  5477. sysv4.3*)
  5478. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5479. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5480. _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
  5481. ;;
  5482. sysv4*MP*)
  5483. if test -d /usr/nec; then
  5484. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5485. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5486. runpath_var=LD_RUN_PATH
  5487. hardcode_runpath_var=yes
  5488. _LT_TAGVAR(ld_shlibs, $1)=yes
  5489. fi
  5490. ;;
  5491. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  5492. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  5493. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5494. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5495. runpath_var='LD_RUN_PATH'
  5496. if test yes = "$GCC"; then
  5497. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5498. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5499. else
  5500. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5501. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5502. fi
  5503. ;;
  5504. sysv5* | sco3.2v5* | sco5v6*)
  5505. # Note: We CANNOT use -z defs as we might desire, because we do not
  5506. # link with -lc, and that would cause any symbols used from libc to
  5507. # always be unresolved, which means just about no library would
  5508. # ever link correctly. If we're not using GNU ld we use -z text
  5509. # though, which does catch some bad symbols but isn't as heavy-handed
  5510. # as -z defs.
  5511. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  5512. _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
  5513. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5514. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5515. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
  5516. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5517. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5518. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
  5519. runpath_var='LD_RUN_PATH'
  5520. if test yes = "$GCC"; then
  5521. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5522. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5523. else
  5524. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5525. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5526. fi
  5527. ;;
  5528. uts4*)
  5529. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5530. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5531. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5532. ;;
  5533. *)
  5534. _LT_TAGVAR(ld_shlibs, $1)=no
  5535. ;;
  5536. esac
  5537. if test sni = "$host_vendor"; then
  5538. case $host in
  5539. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  5540. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
  5541. ;;
  5542. esac
  5543. fi
  5544. fi
  5545. ])
  5546. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  5547. test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
  5548. _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
  5549. _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
  5550. _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
  5551. _LT_DECL([], [extract_expsyms_cmds], [2],
  5552. [The commands to extract the exported symbol list from a shared archive])
  5553. #
  5554. # Do we need to explicitly link libc?
  5555. #
  5556. case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
  5557. x|xyes)
  5558. # Assume -lc should be added
  5559. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5560. if test yes,yes = "$GCC,$enable_shared"; then
  5561. case $_LT_TAGVAR(archive_cmds, $1) in
  5562. *'~'*)
  5563. # FIXME: we may have to deal with multi-command sequences.
  5564. ;;
  5565. '$CC '*)
  5566. # Test whether the compiler implicitly links with -lc since on some
  5567. # systems, -lgcc has to come before -lc. If gcc already passes -lc
  5568. # to ld, don't add -lc before -lgcc.
  5569. AC_CACHE_CHECK([whether -lc should be explicitly linked in],
  5570. [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
  5571. [$RM conftest*
  5572. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  5573. if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
  5574. soname=conftest
  5575. lib=conftest
  5576. libobjs=conftest.$ac_objext
  5577. deplibs=
  5578. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
  5579. pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
  5580. compiler_flags=-v
  5581. linker_flags=-v
  5582. verstring=
  5583. output_objdir=.
  5584. libname=conftest
  5585. lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
  5586. _LT_TAGVAR(allow_undefined_flag, $1)=
  5587. if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
  5588. then
  5589. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5590. else
  5591. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5592. fi
  5593. _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
  5594. else
  5595. cat conftest.err 1>&5
  5596. fi
  5597. $RM conftest*
  5598. ])
  5599. _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
  5600. ;;
  5601. esac
  5602. fi
  5603. ;;
  5604. esac
  5605. _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
  5606. [Whether or not to add -lc for building shared libraries])
  5607. _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
  5608. [enable_shared_with_static_runtimes], [0],
  5609. [Whether or not to disallow shared libs when runtime libs are static])
  5610. _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
  5611. [Compiler flag to allow reflexive dlopens])
  5612. _LT_TAGDECL([], [whole_archive_flag_spec], [1],
  5613. [Compiler flag to generate shared objects directly from archives])
  5614. _LT_TAGDECL([], [compiler_needs_object], [1],
  5615. [Whether the compiler copes with passing no objects directly])
  5616. _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
  5617. [Create an old-style archive from a shared archive])
  5618. _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
  5619. [Create a temporary old-style archive to link instead of a shared archive])
  5620. _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
  5621. _LT_TAGDECL([], [archive_expsym_cmds], [2])
  5622. _LT_TAGDECL([], [module_cmds], [2],
  5623. [Commands used to build a loadable module if different from building
  5624. a shared archive.])
  5625. _LT_TAGDECL([], [module_expsym_cmds], [2])
  5626. _LT_TAGDECL([], [with_gnu_ld], [1],
  5627. [Whether we are building with GNU ld or not])
  5628. _LT_TAGDECL([], [allow_undefined_flag], [1],
  5629. [Flag that allows shared libraries with undefined symbols to be built])
  5630. _LT_TAGDECL([], [no_undefined_flag], [1],
  5631. [Flag that enforces no undefined symbols])
  5632. _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
  5633. [Flag to hardcode $libdir into a binary during linking.
  5634. This must work even if $libdir does not exist])
  5635. _LT_TAGDECL([], [hardcode_libdir_separator], [1],
  5636. [Whether we need a single "-rpath" flag with a separated argument])
  5637. _LT_TAGDECL([], [hardcode_direct], [0],
  5638. [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
  5639. DIR into the resulting binary])
  5640. _LT_TAGDECL([], [hardcode_direct_absolute], [0],
  5641. [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
  5642. DIR into the resulting binary and the resulting library dependency is
  5643. "absolute", i.e impossible to change by setting $shlibpath_var if the
  5644. library is relocated])
  5645. _LT_TAGDECL([], [hardcode_minus_L], [0],
  5646. [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
  5647. into the resulting binary])
  5648. _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
  5649. [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
  5650. into the resulting binary])
  5651. _LT_TAGDECL([], [hardcode_automatic], [0],
  5652. [Set to "yes" if building a shared library automatically hardcodes DIR
  5653. into the library and all subsequent libraries and executables linked
  5654. against it])
  5655. _LT_TAGDECL([], [inherit_rpath], [0],
  5656. [Set to yes if linker adds runtime paths of dependent libraries
  5657. to runtime path list])
  5658. _LT_TAGDECL([], [link_all_deplibs], [0],
  5659. [Whether libtool must link a program against all its dependency libraries])
  5660. _LT_TAGDECL([], [always_export_symbols], [0],
  5661. [Set to "yes" if exported symbols are required])
  5662. _LT_TAGDECL([], [export_symbols_cmds], [2],
  5663. [The commands to list exported symbols])
  5664. _LT_TAGDECL([], [exclude_expsyms], [1],
  5665. [Symbols that should not be listed in the preloaded symbols])
  5666. _LT_TAGDECL([], [include_expsyms], [1],
  5667. [Symbols that must always be exported])
  5668. _LT_TAGDECL([], [prelink_cmds], [2],
  5669. [Commands necessary for linking programs (against libraries) with templates])
  5670. _LT_TAGDECL([], [postlink_cmds], [2],
  5671. [Commands necessary for finishing linking programs])
  5672. _LT_TAGDECL([], [file_list_spec], [1],
  5673. [Specify filename containing input files])
  5674. dnl FIXME: Not yet implemented
  5675. dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
  5676. dnl [Compiler flag to generate thread safe objects])
  5677. ])# _LT_LINKER_SHLIBS
  5678. # _LT_LANG_C_CONFIG([TAG])
  5679. # ------------------------
  5680. # Ensure that the configuration variables for a C compiler are suitably
  5681. # defined. These variables are subsequently used by _LT_CONFIG to write
  5682. # the compiler configuration to 'libtool'.
  5683. m4_defun([_LT_LANG_C_CONFIG],
  5684. [m4_require([_LT_DECL_EGREP])dnl
  5685. lt_save_CC=$CC
  5686. AC_LANG_PUSH(C)
  5687. # Source file extension for C test sources.
  5688. ac_ext=c
  5689. # Object file extension for compiled C test sources.
  5690. objext=o
  5691. _LT_TAGVAR(objext, $1)=$objext
  5692. # Code to be used in simple compile tests
  5693. lt_simple_compile_test_code="int some_variable = 0;"
  5694. # Code to be used in simple link tests
  5695. lt_simple_link_test_code='int main(void){return(0);}'
  5696. _LT_TAG_COMPILER
  5697. # Save the default compiler, since it gets overwritten when the other
  5698. # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
  5699. compiler_DEFAULT=$CC
  5700. # save warnings/boilerplate of simple test code
  5701. _LT_COMPILER_BOILERPLATE
  5702. _LT_LINKER_BOILERPLATE
  5703. ## CAVEAT EMPTOR:
  5704. ## There is no encapsulation within the following macros, do not change
  5705. ## the running order or otherwise move them around unless you know exactly
  5706. ## what you are doing...
  5707. if test -n "$compiler"; then
  5708. _LT_COMPILER_NO_RTTI($1)
  5709. _LT_COMPILER_PIC($1)
  5710. _LT_COMPILER_C_O($1)
  5711. _LT_COMPILER_FILE_LOCKS($1)
  5712. _LT_LINKER_SHLIBS($1)
  5713. _LT_SYS_DYNAMIC_LINKER($1)
  5714. _LT_LINKER_HARDCODE_LIBPATH($1)
  5715. LT_SYS_DLOPEN_SELF
  5716. _LT_CMD_STRIPLIB
  5717. # Report what library types will actually be built
  5718. AC_MSG_CHECKING([if libtool supports shared libraries])
  5719. AC_MSG_RESULT([$can_build_shared])
  5720. AC_MSG_CHECKING([whether to build shared libraries])
  5721. test no = "$can_build_shared" && enable_shared=no
  5722. # On AIX, shared libraries and static libraries use the same namespace, and
  5723. # are all built from PIC.
  5724. case $host_os in
  5725. aix3*)
  5726. test yes = "$enable_shared" && enable_static=no
  5727. if test -n "$RANLIB"; then
  5728. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  5729. postinstall_cmds='$RANLIB $lib'
  5730. fi
  5731. ;;
  5732. aix[[4-9]]*)
  5733. if test ia64 != "$host_cpu"; then
  5734. case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
  5735. yes,aix,yes) ;; # shared object as lib.so file only
  5736. yes,svr4,*) ;; # shared object as lib.so archive member only
  5737. yes,*) enable_static=no ;; # shared object in lib.a archive as well
  5738. esac
  5739. fi
  5740. ;;
  5741. esac
  5742. AC_MSG_RESULT([$enable_shared])
  5743. AC_MSG_CHECKING([whether to build static libraries])
  5744. # Make sure either enable_shared or enable_static is yes.
  5745. test yes = "$enable_shared" || enable_static=yes
  5746. AC_MSG_RESULT([$enable_static])
  5747. _LT_CONFIG($1)
  5748. fi
  5749. AC_LANG_POP
  5750. CC=$lt_save_CC
  5751. ])# _LT_LANG_C_CONFIG
  5752. # _LT_LANG_CXX_CONFIG([TAG])
  5753. # --------------------------
  5754. # Ensure that the configuration variables for a C++ compiler are suitably
  5755. # defined. These variables are subsequently used by _LT_CONFIG to write
  5756. # the compiler configuration to 'libtool'.
  5757. m4_defun([_LT_LANG_CXX_CONFIG],
  5758. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  5759. m4_require([_LT_DECL_EGREP])dnl
  5760. m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  5761. if test -n "$CXX" && ( test no != "$CXX" &&
  5762. ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
  5763. (test g++ != "$CXX"))); then
  5764. AC_PROG_CXXCPP
  5765. else
  5766. _lt_caught_CXX_error=yes
  5767. fi
  5768. AC_LANG_PUSH(C++)
  5769. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5770. _LT_TAGVAR(allow_undefined_flag, $1)=
  5771. _LT_TAGVAR(always_export_symbols, $1)=no
  5772. _LT_TAGVAR(archive_expsym_cmds, $1)=
  5773. _LT_TAGVAR(compiler_needs_object, $1)=no
  5774. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  5775. _LT_TAGVAR(hardcode_direct, $1)=no
  5776. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  5777. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  5778. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5779. _LT_TAGVAR(hardcode_minus_L, $1)=no
  5780. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  5781. _LT_TAGVAR(hardcode_automatic, $1)=no
  5782. _LT_TAGVAR(inherit_rpath, $1)=no
  5783. _LT_TAGVAR(module_cmds, $1)=
  5784. _LT_TAGVAR(module_expsym_cmds, $1)=
  5785. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  5786. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  5787. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  5788. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  5789. _LT_TAGVAR(no_undefined_flag, $1)=
  5790. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5791. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  5792. # Source file extension for C++ test sources.
  5793. ac_ext=cpp
  5794. # Object file extension for compiled C++ test sources.
  5795. objext=o
  5796. _LT_TAGVAR(objext, $1)=$objext
  5797. # No sense in running all these tests if we already determined that
  5798. # the CXX compiler isn't working. Some variables (like enable_shared)
  5799. # are currently assumed to apply to all compilers on this platform,
  5800. # and will be corrupted by setting them based on a non-working compiler.
  5801. if test yes != "$_lt_caught_CXX_error"; then
  5802. # Code to be used in simple compile tests
  5803. lt_simple_compile_test_code="int some_variable = 0;"
  5804. # Code to be used in simple link tests
  5805. lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
  5806. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  5807. _LT_TAG_COMPILER
  5808. # save warnings/boilerplate of simple test code
  5809. _LT_COMPILER_BOILERPLATE
  5810. _LT_LINKER_BOILERPLATE
  5811. # Allow CC to be a program name with arguments.
  5812. lt_save_CC=$CC
  5813. lt_save_CFLAGS=$CFLAGS
  5814. lt_save_LD=$LD
  5815. lt_save_GCC=$GCC
  5816. GCC=$GXX
  5817. lt_save_with_gnu_ld=$with_gnu_ld
  5818. lt_save_path_LD=$lt_cv_path_LD
  5819. if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
  5820. lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
  5821. else
  5822. $as_unset lt_cv_prog_gnu_ld
  5823. fi
  5824. if test -n "${lt_cv_path_LDCXX+set}"; then
  5825. lt_cv_path_LD=$lt_cv_path_LDCXX
  5826. else
  5827. $as_unset lt_cv_path_LD
  5828. fi
  5829. test -z "${LDCXX+set}" || LD=$LDCXX
  5830. CC=${CXX-"c++"}
  5831. CFLAGS=$CXXFLAGS
  5832. compiler=$CC
  5833. _LT_TAGVAR(compiler, $1)=$CC
  5834. _LT_CC_BASENAME([$compiler])
  5835. if test -n "$compiler"; then
  5836. # We don't want -fno-exception when compiling C++ code, so set the
  5837. # no_builtin_flag separately
  5838. if test yes = "$GXX"; then
  5839. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  5840. else
  5841. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  5842. fi
  5843. if test yes = "$GXX"; then
  5844. # Set up default GNU C++ configuration
  5845. LT_PATH_LD
  5846. # Check if GNU C++ uses GNU ld as the underlying linker, since the
  5847. # archiving commands below assume that GNU ld is being used.
  5848. if test yes = "$with_gnu_ld"; then
  5849. _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  5850. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
  5851. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5852. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  5853. # If archive_cmds runs LD, not CC, wlarc should be empty
  5854. # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
  5855. # investigate it a little bit more. (MM)
  5856. wlarc='$wl'
  5857. # ancient GNU ld didn't support --whole-archive et. al.
  5858. if eval "`$CC -print-prog-name=ld` --help 2>&1" |
  5859. $GREP 'no-whole-archive' > /dev/null; then
  5860. _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
  5861. else
  5862. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5863. fi
  5864. else
  5865. with_gnu_ld=no
  5866. wlarc=
  5867. # A generic and very simple default shared library creation
  5868. # command for GNU C++ for the case where it uses the native
  5869. # linker, instead of GNU ld. If possible, this setting should
  5870. # overridden to take advantage of the native linker features on
  5871. # the platform it is being used on.
  5872. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  5873. fi
  5874. # Commands to make compiler produce verbose output that lists
  5875. # what "hidden" libraries, object files and flags are used when
  5876. # linking a shared library.
  5877. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "[[-]]L"'
  5878. else
  5879. GXX=no
  5880. with_gnu_ld=no
  5881. wlarc=
  5882. fi
  5883. # PORTME: fill in a description of your system's C++ link characteristics
  5884. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  5885. _LT_TAGVAR(ld_shlibs, $1)=yes
  5886. case $host_os in
  5887. aix3*)
  5888. # FIXME: insert proper C++ library support
  5889. _LT_TAGVAR(ld_shlibs, $1)=no
  5890. ;;
  5891. aix[[4-9]]*)
  5892. if test ia64 = "$host_cpu"; then
  5893. # On IA64, the linker does run time linking by default, so we don't
  5894. # have to do anything special.
  5895. aix_use_runtimelinking=no
  5896. exp_sym_flag='-Bexport'
  5897. no_entry_flag=
  5898. else
  5899. aix_use_runtimelinking=no
  5900. # Test if we are trying to use run time linking or normal
  5901. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  5902. # have runtime linking enabled, and use it for executables.
  5903. # For shared libraries, we enable/disable runtime linking
  5904. # depending on the kind of the shared library created -
  5905. # when "with_aix_soname,aix_use_runtimelinking" is:
  5906. # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
  5907. # "aix,yes" lib.so shared, rtl:yes, for executables
  5908. # lib.a static archive
  5909. # "both,no" lib.so.V(shr.o) shared, rtl:yes
  5910. # lib.a(lib.so.V) shared, rtl:no, for executables
  5911. # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
  5912. # lib.a(lib.so.V) shared, rtl:no
  5913. # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
  5914. # lib.a static archive
  5915. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  5916. for ld_flag in $LDFLAGS; do
  5917. case $ld_flag in
  5918. *-brtl*)
  5919. aix_use_runtimelinking=yes
  5920. break
  5921. ;;
  5922. esac
  5923. done
  5924. if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
  5925. # With aix-soname=svr4, we create the lib.so.V shared archives only,
  5926. # so we don't have lib.a shared libs to link our executables.
  5927. # We have to force runtime linking in this case.
  5928. aix_use_runtimelinking=yes
  5929. LDFLAGS="$LDFLAGS -Wl,-brtl"
  5930. fi
  5931. ;;
  5932. esac
  5933. exp_sym_flag='-bexport'
  5934. no_entry_flag='-bnoentry'
  5935. fi
  5936. # When large executables or shared objects are built, AIX ld can
  5937. # have problems creating the table of contents. If linking a library
  5938. # or program results in "error TOC overflow" add -mminimal-toc to
  5939. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  5940. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  5941. _LT_TAGVAR(archive_cmds, $1)=''
  5942. _LT_TAGVAR(hardcode_direct, $1)=yes
  5943. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5944. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5945. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5946. _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
  5947. case $with_aix_soname,$aix_use_runtimelinking in
  5948. aix,*) ;; # no import file
  5949. svr4,* | *,yes) # use import file
  5950. # The Import File defines what to hardcode.
  5951. _LT_TAGVAR(hardcode_direct, $1)=no
  5952. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  5953. ;;
  5954. esac
  5955. if test yes = "$GXX"; then
  5956. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  5957. # We only want to do this on AIX 4.2 and lower, the check
  5958. # below for broken collect2 doesn't work under 4.3+
  5959. collect2name=`$CC -print-prog-name=collect2`
  5960. if test -f "$collect2name" &&
  5961. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  5962. then
  5963. # We have reworked collect2
  5964. :
  5965. else
  5966. # We have old collect2
  5967. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  5968. # It fails to find uninstalled libraries when the uninstalled
  5969. # path is not listed in the libpath. Setting hardcode_minus_L
  5970. # to unsupported forces relinking
  5971. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5972. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5973. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5974. fi
  5975. esac
  5976. shared_flag='-shared'
  5977. if test yes = "$aix_use_runtimelinking"; then
  5978. shared_flag=$shared_flag' $wl-G'
  5979. fi
  5980. # Need to ensure runtime linking is disabled for the traditional
  5981. # shared library, or the linker may eventually find shared libraries
  5982. # /with/ Import File - we do not want to mix them.
  5983. shared_flag_aix='-shared'
  5984. shared_flag_svr4='-shared $wl-G'
  5985. else
  5986. # not using gcc
  5987. if test ia64 = "$host_cpu"; then
  5988. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  5989. # chokes on -Wl,-G. The following line is correct:
  5990. shared_flag='-G'
  5991. else
  5992. if test yes = "$aix_use_runtimelinking"; then
  5993. shared_flag='$wl-G'
  5994. else
  5995. shared_flag='$wl-bM:SRE'
  5996. fi
  5997. shared_flag_aix='$wl-bM:SRE'
  5998. shared_flag_svr4='$wl-G'
  5999. fi
  6000. fi
  6001. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
  6002. # It seems that -bexpall does not export symbols beginning with
  6003. # underscore (_), so it is better to generate a list of symbols to
  6004. # export.
  6005. _LT_TAGVAR(always_export_symbols, $1)=yes
  6006. if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
  6007. # Warning - without using the other runtime loading flags (-brtl),
  6008. # -berok will link without error, but may produce a broken library.
  6009. # The "-G" linker flag allows undefined symbols.
  6010. _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
  6011. # Determine the default libpath from the value encoded in an empty
  6012. # executable.
  6013. _LT_SYS_MODULE_PATH_AIX([$1])
  6014. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
  6015. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
  6016. else
  6017. if test ia64 = "$host_cpu"; then
  6018. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
  6019. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  6020. _LT_TAGVAR(archive_expsym_cmds, $1)="\$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"
  6021. else
  6022. # Determine the default libpath from the value encoded in an
  6023. # empty executable.
  6024. _LT_SYS_MODULE_PATH_AIX([$1])
  6025. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
  6026. # Warning - without using the other run time loading flags,
  6027. # -berok will link without error, but may produce a broken library.
  6028. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
  6029. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
  6030. if test yes = "$with_gnu_ld"; then
  6031. # We only use this code for GNU lds that support --whole-archive.
  6032. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
  6033. else
  6034. # Exported symbols can be pulled into shared objects from archives
  6035. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  6036. fi
  6037. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  6038. _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
  6039. # -brtl affects multiple linker settings, -berok does not and is overridden later
  6040. compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
  6041. if test svr4 != "$with_aix_soname"; then
  6042. # This is similar to how AIX traditionally builds its shared
  6043. # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
  6044. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
  6045. fi
  6046. if test aix != "$with_aix_soname"; then
  6047. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
  6048. else
  6049. # used by -dlpreopen to get the symbols
  6050. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
  6051. fi
  6052. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
  6053. fi
  6054. fi
  6055. ;;
  6056. beos*)
  6057. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  6058. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6059. # Joseph Beckenbach <[email protected]> says some releases of gcc
  6060. # support --undefined. This deserves some investigation. FIXME
  6061. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  6062. else
  6063. _LT_TAGVAR(ld_shlibs, $1)=no
  6064. fi
  6065. ;;
  6066. chorus*)
  6067. case $cc_basename in
  6068. *)
  6069. # FIXME: insert proper C++ library support
  6070. _LT_TAGVAR(ld_shlibs, $1)=no
  6071. ;;
  6072. esac
  6073. ;;
  6074. cygwin* | mingw* | windows* | pw32* | cegcc*)
  6075. case $GXX,$cc_basename in
  6076. ,cl* | no,cl* | ,icl* | no,icl*)
  6077. # Native MSVC or ICC
  6078. # hardcode_libdir_flag_spec is actually meaningless, as there is
  6079. # no search path for DLLs.
  6080. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  6081. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6082. _LT_TAGVAR(always_export_symbols, $1)=yes
  6083. _LT_TAGVAR(file_list_spec, $1)='@'
  6084. # Tell ltmain to make .lib files, not .a files.
  6085. libext=lib
  6086. # Tell ltmain to make .dll files, not .so files.
  6087. shrext_cmds=.dll
  6088. # FIXME: Setting linknames here is a bad hack.
  6089. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
  6090. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  6091. cp "$export_symbols" "$output_objdir/$soname.def";
  6092. echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
  6093. else
  6094. $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
  6095. fi~
  6096. $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  6097. linknames='
  6098. # The linker will not automatically build a static lib if we build a DLL.
  6099. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  6100. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  6101. # Don't use ranlib
  6102. _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  6103. _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  6104. lt_tool_outputfile="@TOOL_OUTPUT@"~
  6105. case $lt_outputfile in
  6106. *.exe|*.EXE) ;;
  6107. *)
  6108. lt_outputfile=$lt_outputfile.exe
  6109. lt_tool_outputfile=$lt_tool_outputfile.exe
  6110. ;;
  6111. esac~
  6112. func_to_tool_file "$lt_outputfile"~
  6113. if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
  6114. $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  6115. $RM "$lt_outputfile.manifest";
  6116. fi'
  6117. ;;
  6118. *)
  6119. # g++
  6120. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  6121. # as there is no search path for DLLs.
  6122. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6123. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
  6124. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6125. _LT_TAGVAR(always_export_symbols, $1)=no
  6126. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  6127. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  6128. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  6129. # If the export-symbols file already is a .def file, use it as
  6130. # is; otherwise, prepend EXPORTS...
  6131. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  6132. cp $export_symbols $output_objdir/$soname.def;
  6133. else
  6134. echo EXPORTS > $output_objdir/$soname.def;
  6135. cat $export_symbols >> $output_objdir/$soname.def;
  6136. fi~
  6137. $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  6138. else
  6139. _LT_TAGVAR(ld_shlibs, $1)=no
  6140. fi
  6141. ;;
  6142. esac
  6143. ;;
  6144. darwin* | rhapsody*)
  6145. _LT_DARWIN_LINKER_FEATURES($1)
  6146. ;;
  6147. os2*)
  6148. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6149. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  6150. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6151. shrext_cmds=.dll
  6152. _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  6153. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  6154. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  6155. $ECHO EXPORTS >> $output_objdir/$libname.def~
  6156. emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
  6157. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  6158. emximp -o $lib $output_objdir/$libname.def'
  6159. _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  6160. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  6161. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  6162. $ECHO EXPORTS >> $output_objdir/$libname.def~
  6163. prefix_cmds="$SED"~
  6164. if test EXPORTS = "`$SED 1q $export_symbols`"; then
  6165. prefix_cmds="$prefix_cmds -e 1d";
  6166. fi~
  6167. prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
  6168. cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
  6169. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  6170. emximp -o $lib $output_objdir/$libname.def'
  6171. _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
  6172. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  6173. _LT_TAGVAR(file_list_spec, $1)='@'
  6174. ;;
  6175. dgux*)
  6176. case $cc_basename in
  6177. ec++*)
  6178. # FIXME: insert proper C++ library support
  6179. _LT_TAGVAR(ld_shlibs, $1)=no
  6180. ;;
  6181. ghcx*)
  6182. # Green Hills C++ Compiler
  6183. # FIXME: insert proper C++ library support
  6184. _LT_TAGVAR(ld_shlibs, $1)=no
  6185. ;;
  6186. *)
  6187. # FIXME: insert proper C++ library support
  6188. _LT_TAGVAR(ld_shlibs, $1)=no
  6189. ;;
  6190. esac
  6191. ;;
  6192. freebsd2.*)
  6193. # C++ shared libraries reported to be fairly broken before
  6194. # switch to ELF
  6195. _LT_TAGVAR(ld_shlibs, $1)=no
  6196. ;;
  6197. freebsd-elf*)
  6198. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6199. ;;
  6200. freebsd* | dragonfly* | midnightbsd*)
  6201. # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
  6202. # conventions
  6203. _LT_TAGVAR(ld_shlibs, $1)=yes
  6204. ;;
  6205. haiku*)
  6206. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  6207. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6208. ;;
  6209. hpux9*)
  6210. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  6211. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6212. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  6213. _LT_TAGVAR(hardcode_direct, $1)=yes
  6214. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  6215. # but as the default
  6216. # location of the library.
  6217. case $cc_basename in
  6218. CC*)
  6219. # FIXME: insert proper C++ library support
  6220. _LT_TAGVAR(ld_shlibs, $1)=no
  6221. ;;
  6222. aCC*)
  6223. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
  6224. # Commands to make compiler produce verbose output that lists
  6225. # what "hidden" libraries, object files and flags are used when
  6226. # linking a shared library.
  6227. #
  6228. # There doesn't appear to be a way to prevent this compiler from
  6229. # explicitly linking system object files so we need to strip them
  6230. # from the output so that they don't get included in the library
  6231. # dependencies.
  6232. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "[[-]]L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
  6233. ;;
  6234. *)
  6235. if test yes = "$GXX"; then
  6236. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
  6237. else
  6238. # FIXME: insert proper C++ library support
  6239. _LT_TAGVAR(ld_shlibs, $1)=no
  6240. fi
  6241. ;;
  6242. esac
  6243. ;;
  6244. hpux10*|hpux11*)
  6245. if test no = "$with_gnu_ld"; then
  6246. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  6247. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6248. case $host_cpu in
  6249. hppa*64*|ia64*)
  6250. ;;
  6251. *)
  6252. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  6253. ;;
  6254. esac
  6255. fi
  6256. case $host_cpu in
  6257. hppa*64*|ia64*)
  6258. _LT_TAGVAR(hardcode_direct, $1)=no
  6259. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6260. ;;
  6261. *)
  6262. _LT_TAGVAR(hardcode_direct, $1)=yes
  6263. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6264. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  6265. # but as the default
  6266. # location of the library.
  6267. ;;
  6268. esac
  6269. case $cc_basename in
  6270. CC*)
  6271. # FIXME: insert proper C++ library support
  6272. _LT_TAGVAR(ld_shlibs, $1)=no
  6273. ;;
  6274. aCC*)
  6275. case $host_cpu in
  6276. hppa*64*)
  6277. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6278. ;;
  6279. ia64*)
  6280. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6281. ;;
  6282. *)
  6283. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6284. ;;
  6285. esac
  6286. # Commands to make compiler produce verbose output that lists
  6287. # what "hidden" libraries, object files and flags are used when
  6288. # linking a shared library.
  6289. #
  6290. # There doesn't appear to be a way to prevent this compiler from
  6291. # explicitly linking system object files so we need to strip them
  6292. # from the output so that they don't get included in the library
  6293. # dependencies.
  6294. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "[[-]]L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
  6295. ;;
  6296. *)
  6297. if test yes = "$GXX"; then
  6298. if test no = "$with_gnu_ld"; then
  6299. case $host_cpu in
  6300. hppa*64*)
  6301. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6302. ;;
  6303. ia64*)
  6304. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6305. ;;
  6306. *)
  6307. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6308. ;;
  6309. esac
  6310. fi
  6311. else
  6312. # FIXME: insert proper C++ library support
  6313. _LT_TAGVAR(ld_shlibs, $1)=no
  6314. fi
  6315. ;;
  6316. esac
  6317. ;;
  6318. interix[[3-9]]*)
  6319. _LT_TAGVAR(hardcode_direct, $1)=no
  6320. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6321. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6322. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  6323. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  6324. # Instead, shared libraries are loaded at an image base (0x10000000 by
  6325. # default) and relocated if they conflict, which is a slow very memory
  6326. # consuming and fragmenting process. To avoid this, we pick a random,
  6327. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  6328. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  6329. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
  6330. _LT_TAGVAR(archive_expsym_cmds, $1)='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'
  6331. ;;
  6332. irix5* | irix6*)
  6333. case $cc_basename in
  6334. CC*)
  6335. # SGI C++
  6336. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
  6337. # Archives containing C++ object files must be created using
  6338. # "CC -ar", where "CC" is the IRIX C++ compiler. This is
  6339. # necessary to make sure instantiated templates are included
  6340. # in the archive.
  6341. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
  6342. ;;
  6343. *)
  6344. if test yes = "$GXX"; then
  6345. if test no = "$with_gnu_ld"; then
  6346. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $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'
  6347. else
  6348. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
  6349. fi
  6350. fi
  6351. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6352. ;;
  6353. esac
  6354. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  6355. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6356. _LT_TAGVAR(inherit_rpath, $1)=yes
  6357. ;;
  6358. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  6359. case $cc_basename in
  6360. KCC*)
  6361. # Kuck and Associates, Inc. (KAI) C++ Compiler
  6362. # KCC will only create a shared library if the output file
  6363. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  6364. # to its proper name (with version) after linking.
  6365. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
  6366. _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib'
  6367. # Commands to make compiler produce verbose output that lists
  6368. # what "hidden" libraries, object files and flags are used when
  6369. # linking a shared library.
  6370. #
  6371. # There doesn't appear to be a way to prevent this compiler from
  6372. # explicitly linking system object files so we need to strip them
  6373. # from the output so that they don't get included in the library
  6374. # dependencies.
  6375. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
  6376. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6377. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  6378. # Archives containing C++ object files must be created using
  6379. # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  6380. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  6381. ;;
  6382. icpc* | ecpc* )
  6383. # Intel C++
  6384. with_gnu_ld=yes
  6385. # version 8.0 and above of icpc choke on multiply defined symbols
  6386. # if we add $predep_objects and $postdep_objects, however 7.1 and
  6387. # earlier do not add the objects themselves.
  6388. case `$CC -V 2>&1` in
  6389. *"Version 7."*)
  6390. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  6391. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
  6392. ;;
  6393. *) # Version 8.0 or newer
  6394. tmp_idyn=
  6395. case $host_cpu in
  6396. ia64*) tmp_idyn=' -i_dynamic';;
  6397. esac
  6398. _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  6399. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
  6400. ;;
  6401. esac
  6402. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6403. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6404. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  6405. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
  6406. ;;
  6407. pgCC* | pgcpp*)
  6408. # Portland Group C++ compiler
  6409. case `$CC -V` in
  6410. *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
  6411. _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
  6412. rm -rf $tpldir~
  6413. $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
  6414. compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
  6415. _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
  6416. rm -rf $tpldir~
  6417. $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
  6418. $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
  6419. $RANLIB $oldlib'
  6420. _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
  6421. rm -rf $tpldir~
  6422. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  6423. $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  6424. _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
  6425. rm -rf $tpldir~
  6426. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  6427. $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
  6428. ;;
  6429. *) # Version 6 and above use weak symbols
  6430. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  6431. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
  6432. ;;
  6433. esac
  6434. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
  6435. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  6436. _LT_TAGVAR(whole_archive_flag_spec, $1)='$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'
  6437. ;;
  6438. cxx*)
  6439. # Compaq C++
  6440. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  6441. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols'
  6442. runpath_var=LD_RUN_PATH
  6443. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  6444. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6445. # Commands to make compiler produce verbose output that lists
  6446. # what "hidden" libraries, object files and flags are used when
  6447. # linking a shared library.
  6448. #
  6449. # There doesn't appear to be a way to prevent this compiler from
  6450. # explicitly linking system object files so we need to strip them
  6451. # from the output so that they don't get included in the library
  6452. # dependencies.
  6453. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
  6454. ;;
  6455. xl* | mpixl* | bgxl*)
  6456. # IBM XL 8.0 on PPC, with GNU ld
  6457. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  6458. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  6459. _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  6460. if test yes = "$supports_anon_versioning"; then
  6461. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  6462. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  6463. echo "local: *; };" >> $output_objdir/$libname.ver~
  6464. $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
  6465. fi
  6466. ;;
  6467. *)
  6468. case `$CC -V 2>&1 | sed 5q` in
  6469. *Sun\ C*)
  6470. # Sun C++ 5.9
  6471. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  6472. _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6473. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols'
  6474. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6475. _LT_TAGVAR(whole_archive_flag_spec, $1)='$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'
  6476. _LT_TAGVAR(compiler_needs_object, $1)=yes
  6477. # Not sure whether something based on
  6478. # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
  6479. # would be better.
  6480. output_verbose_link_cmd='func_echo_all'
  6481. # Archives containing C++ object files must be created using
  6482. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  6483. # necessary to make sure instantiated templates are included
  6484. # in the archive.
  6485. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  6486. ;;
  6487. esac
  6488. ;;
  6489. esac
  6490. ;;
  6491. lynxos*)
  6492. # FIXME: insert proper C++ library support
  6493. _LT_TAGVAR(ld_shlibs, $1)=no
  6494. ;;
  6495. m88k*)
  6496. # FIXME: insert proper C++ library support
  6497. _LT_TAGVAR(ld_shlibs, $1)=no
  6498. ;;
  6499. mvs*)
  6500. case $cc_basename in
  6501. cxx*)
  6502. # FIXME: insert proper C++ library support
  6503. _LT_TAGVAR(ld_shlibs, $1)=no
  6504. ;;
  6505. *)
  6506. # FIXME: insert proper C++ library support
  6507. _LT_TAGVAR(ld_shlibs, $1)=no
  6508. ;;
  6509. esac
  6510. ;;
  6511. netbsd*)
  6512. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  6513. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
  6514. wlarc=
  6515. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6516. _LT_TAGVAR(hardcode_direct, $1)=yes
  6517. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6518. fi
  6519. # Workaround some broken pre-1.5 toolchains
  6520. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
  6521. ;;
  6522. *nto* | *qnx*)
  6523. _LT_TAGVAR(ld_shlibs, $1)=yes
  6524. ;;
  6525. openbsd* | bitrig*)
  6526. if test -f /usr/libexec/ld.so; then
  6527. _LT_TAGVAR(hardcode_direct, $1)=yes
  6528. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6529. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6530. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  6531. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6532. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
  6533. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib'
  6534. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  6535. _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
  6536. fi
  6537. output_verbose_link_cmd=func_echo_all
  6538. else
  6539. _LT_TAGVAR(ld_shlibs, $1)=no
  6540. fi
  6541. ;;
  6542. osf3* | osf4* | osf5*)
  6543. case $cc_basename in
  6544. KCC*)
  6545. # Kuck and Associates, Inc. (KAI) C++ Compiler
  6546. # KCC will only create a shared library if the output file
  6547. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  6548. # to its proper name (with version) after linking.
  6549. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
  6550. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6551. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6552. # Archives containing C++ object files must be created using
  6553. # the KAI C++ compiler.
  6554. case $host in
  6555. osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
  6556. *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
  6557. esac
  6558. ;;
  6559. RCC*)
  6560. # Rational C++ 2.4.1
  6561. # FIXME: insert proper C++ library support
  6562. _LT_TAGVAR(ld_shlibs, $1)=no
  6563. ;;
  6564. cxx*)
  6565. case $host in
  6566. osf3*)
  6567. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
  6568. _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
  6569. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  6570. ;;
  6571. *)
  6572. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  6573. _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
  6574. _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
  6575. echo "-hidden">> $lib.exp~
  6576. $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
  6577. $RM $lib.exp'
  6578. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  6579. ;;
  6580. esac
  6581. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6582. # Commands to make compiler produce verbose output that lists
  6583. # what "hidden" libraries, object files and flags are used when
  6584. # linking a shared library.
  6585. #
  6586. # There doesn't appear to be a way to prevent this compiler from
  6587. # explicitly linking system object files so we need to strip them
  6588. # from the output so that they don't get included in the library
  6589. # dependencies.
  6590. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
  6591. ;;
  6592. *)
  6593. if test yes,no = "$GXX,$with_gnu_ld"; then
  6594. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
  6595. case $host in
  6596. osf3*)
  6597. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $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'
  6598. ;;
  6599. *)
  6600. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $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'
  6601. ;;
  6602. esac
  6603. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  6604. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6605. # Commands to make compiler produce verbose output that lists
  6606. # what "hidden" libraries, object files and flags are used when
  6607. # linking a shared library.
  6608. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "[[-]]L"'
  6609. else
  6610. # FIXME: insert proper C++ library support
  6611. _LT_TAGVAR(ld_shlibs, $1)=no
  6612. fi
  6613. ;;
  6614. esac
  6615. ;;
  6616. psos*)
  6617. # FIXME: insert proper C++ library support
  6618. _LT_TAGVAR(ld_shlibs, $1)=no
  6619. ;;
  6620. sunos4*)
  6621. case $cc_basename in
  6622. CC*)
  6623. # Sun C++ 4.x
  6624. # FIXME: insert proper C++ library support
  6625. _LT_TAGVAR(ld_shlibs, $1)=no
  6626. ;;
  6627. lcc*)
  6628. # Lucid
  6629. # FIXME: insert proper C++ library support
  6630. _LT_TAGVAR(ld_shlibs, $1)=no
  6631. ;;
  6632. *)
  6633. # FIXME: insert proper C++ library support
  6634. _LT_TAGVAR(ld_shlibs, $1)=no
  6635. ;;
  6636. esac
  6637. ;;
  6638. solaris*)
  6639. case $cc_basename in
  6640. CC* | sunCC*)
  6641. # Sun C++ 4.2, 5.x and Centerline C++
  6642. _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
  6643. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  6644. _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6645. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6646. $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  6647. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6648. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6649. case $host_os in
  6650. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6651. *)
  6652. # The compiler driver will combine and reorder linker options,
  6653. # but understands '-z linker_flag'.
  6654. # Supported since Solaris 2.6 (maybe 2.5.1?)
  6655. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  6656. ;;
  6657. esac
  6658. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6659. output_verbose_link_cmd='func_echo_all'
  6660. # Archives containing C++ object files must be created using
  6661. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  6662. # necessary to make sure instantiated templates are included
  6663. # in the archive.
  6664. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  6665. ;;
  6666. gcx*)
  6667. # Green Hills C++ Compiler
  6668. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
  6669. # The C++ compiler must be used to create the archive.
  6670. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
  6671. ;;
  6672. *)
  6673. # GNU C++ compiler with Solaris linker
  6674. if test yes,no = "$GXX,$with_gnu_ld"; then
  6675. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
  6676. if $CC --version | $GREP -v '^2\.7' > /dev/null; then
  6677. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
  6678. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6679. $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  6680. # Commands to make compiler produce verbose output that lists
  6681. # what "hidden" libraries, object files and flags are used when
  6682. # linking a shared library.
  6683. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "[[-]]L"'
  6684. else
  6685. # g++ 2.7 appears to require '-G' NOT '-shared' on this
  6686. # platform.
  6687. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
  6688. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6689. $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  6690. # Commands to make compiler produce verbose output that lists
  6691. # what "hidden" libraries, object files and flags are used when
  6692. # linking a shared library.
  6693. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "[[-]]L"'
  6694. fi
  6695. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
  6696. case $host_os in
  6697. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6698. *)
  6699. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
  6700. ;;
  6701. esac
  6702. fi
  6703. ;;
  6704. esac
  6705. ;;
  6706. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  6707. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  6708. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6709. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6710. runpath_var='LD_RUN_PATH'
  6711. case $cc_basename in
  6712. CC*)
  6713. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6714. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6715. ;;
  6716. *)
  6717. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6718. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6719. ;;
  6720. esac
  6721. ;;
  6722. sysv5* | sco3.2v5* | sco5v6*)
  6723. # Note: We CANNOT use -z defs as we might desire, because we do not
  6724. # link with -lc, and that would cause any symbols used from libc to
  6725. # always be unresolved, which means just about no library would
  6726. # ever link correctly. If we're not using GNU ld we use -z text
  6727. # though, which does catch some bad symbols but isn't as heavy-handed
  6728. # as -z defs.
  6729. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  6730. _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
  6731. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6732. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6733. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
  6734. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  6735. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6736. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
  6737. runpath_var='LD_RUN_PATH'
  6738. case $cc_basename in
  6739. CC*)
  6740. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6741. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6742. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
  6743. '"$_LT_TAGVAR(old_archive_cmds, $1)"
  6744. _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
  6745. '"$_LT_TAGVAR(reload_cmds, $1)"
  6746. ;;
  6747. *)
  6748. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6749. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6750. ;;
  6751. esac
  6752. ;;
  6753. tandem*)
  6754. case $cc_basename in
  6755. NCC*)
  6756. # NonStop-UX NCC 3.20
  6757. # FIXME: insert proper C++ library support
  6758. _LT_TAGVAR(ld_shlibs, $1)=no
  6759. ;;
  6760. *)
  6761. # FIXME: insert proper C++ library support
  6762. _LT_TAGVAR(ld_shlibs, $1)=no
  6763. ;;
  6764. esac
  6765. ;;
  6766. vxworks*)
  6767. # FIXME: insert proper C++ library support
  6768. _LT_TAGVAR(ld_shlibs, $1)=no
  6769. ;;
  6770. *)
  6771. # FIXME: insert proper C++ library support
  6772. _LT_TAGVAR(ld_shlibs, $1)=no
  6773. ;;
  6774. esac
  6775. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  6776. test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
  6777. _LT_TAGVAR(GCC, $1)=$GXX
  6778. _LT_TAGVAR(LD, $1)=$LD
  6779. ## CAVEAT EMPTOR:
  6780. ## There is no encapsulation within the following macros, do not change
  6781. ## the running order or otherwise move them around unless you know exactly
  6782. ## what you are doing...
  6783. _LT_SYS_HIDDEN_LIBDEPS($1)
  6784. _LT_COMPILER_PIC($1)
  6785. _LT_COMPILER_C_O($1)
  6786. _LT_COMPILER_FILE_LOCKS($1)
  6787. _LT_LINKER_SHLIBS($1)
  6788. _LT_SYS_DYNAMIC_LINKER($1)
  6789. _LT_LINKER_HARDCODE_LIBPATH($1)
  6790. _LT_CONFIG($1)
  6791. fi # test -n "$compiler"
  6792. CC=$lt_save_CC
  6793. CFLAGS=$lt_save_CFLAGS
  6794. LDCXX=$LD
  6795. LD=$lt_save_LD
  6796. GCC=$lt_save_GCC
  6797. with_gnu_ld=$lt_save_with_gnu_ld
  6798. lt_cv_path_LDCXX=$lt_cv_path_LD
  6799. lt_cv_path_LD=$lt_save_path_LD
  6800. lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
  6801. lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
  6802. fi # test yes != "$_lt_caught_CXX_error"
  6803. AC_LANG_POP
  6804. ])# _LT_LANG_CXX_CONFIG
  6805. # _LT_FUNC_STRIPNAME_CNF
  6806. # ----------------------
  6807. # func_stripname_cnf prefix suffix name
  6808. # strip PREFIX and SUFFIX off of NAME.
  6809. # PREFIX and SUFFIX must not contain globbing or regex special
  6810. # characters, hashes, percent signs, but SUFFIX may contain a leading
  6811. # dot (in which case that matches only a dot).
  6812. #
  6813. # This function is identical to the (non-XSI) version of func_stripname,
  6814. # except this one can be used by m4 code that may be executed by configure,
  6815. # rather than the libtool script.
  6816. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
  6817. AC_REQUIRE([_LT_DECL_SED])
  6818. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
  6819. func_stripname_cnf ()
  6820. {
  6821. case @S|@2 in
  6822. .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
  6823. *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
  6824. esac
  6825. } # func_stripname_cnf
  6826. ])# _LT_FUNC_STRIPNAME_CNF
  6827. # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
  6828. # ---------------------------------
  6829. # Figure out "hidden" library dependencies from verbose
  6830. # compiler output when linking a shared library.
  6831. # Parse the compiler output and extract the necessary
  6832. # objects, libraries and library flags.
  6833. m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
  6834. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  6835. AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
  6836. # Dependencies to place before and after the object being linked:
  6837. _LT_TAGVAR(predep_objects, $1)=
  6838. _LT_TAGVAR(postdep_objects, $1)=
  6839. _LT_TAGVAR(predeps, $1)=
  6840. _LT_TAGVAR(postdeps, $1)=
  6841. _LT_TAGVAR(compiler_lib_search_path, $1)=
  6842. dnl we can't use the lt_simple_compile_test_code here,
  6843. dnl because it contains code intended for an executable,
  6844. dnl not a library. It's possible we should let each
  6845. dnl tag define a new lt_????_link_test_code variable,
  6846. dnl but it's only used here...
  6847. m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
  6848. int a;
  6849. void foo (void) { a = 0; }
  6850. _LT_EOF
  6851. ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
  6852. class Foo
  6853. {
  6854. public:
  6855. Foo (void) { a = 0; }
  6856. private:
  6857. int a;
  6858. };
  6859. _LT_EOF
  6860. ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
  6861. subroutine foo
  6862. implicit none
  6863. integer*4 a
  6864. a=0
  6865. return
  6866. end
  6867. _LT_EOF
  6868. ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
  6869. subroutine foo
  6870. implicit none
  6871. integer a
  6872. a=0
  6873. return
  6874. end
  6875. _LT_EOF
  6876. ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
  6877. public class foo {
  6878. private int a;
  6879. public void bar (void) {
  6880. a = 0;
  6881. }
  6882. };
  6883. _LT_EOF
  6884. ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
  6885. package foo
  6886. func foo() {
  6887. }
  6888. _LT_EOF
  6889. ])
  6890. _lt_libdeps_save_CFLAGS=$CFLAGS
  6891. case "$CC $CFLAGS " in #(
  6892. *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
  6893. *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
  6894. *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
  6895. esac
  6896. dnl Parse the compiler output and extract the necessary
  6897. dnl objects, libraries and library flags.
  6898. if AC_TRY_EVAL(ac_compile); then
  6899. # Parse the compiler output and extract the necessary
  6900. # objects, libraries and library flags.
  6901. # Sentinel used to keep track of whether or not we are before
  6902. # the conftest object file.
  6903. pre_test_object_deps_done=no
  6904. for p in `eval "$output_verbose_link_cmd"`; do
  6905. case $prev$p in
  6906. -L* | -R* | -l*)
  6907. # Some compilers place space between "-{L,R}" and the path.
  6908. # Remove the space.
  6909. if test x-L = "x$p" ||
  6910. test x-R = "x$p" ||
  6911. test x-l = "x$p"; then
  6912. prev=$p
  6913. continue
  6914. fi
  6915. # Expand the sysroot to ease extracting the directories later.
  6916. if test -z "$prev"; then
  6917. case $p in
  6918. -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
  6919. -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
  6920. -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
  6921. esac
  6922. fi
  6923. case $p in
  6924. =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
  6925. esac
  6926. if test no = "$pre_test_object_deps_done"; then
  6927. case $prev in
  6928. -L | -R)
  6929. # Internal compiler library paths should come after those
  6930. # provided the user. The postdeps already come after the
  6931. # user supplied libs so there is no need to process them.
  6932. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
  6933. _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
  6934. else
  6935. _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
  6936. fi
  6937. ;;
  6938. # The "-l" case would never come before the object being
  6939. # linked, so don't bother handling this case.
  6940. esac
  6941. else
  6942. if test -z "$_LT_TAGVAR(postdeps, $1)"; then
  6943. _LT_TAGVAR(postdeps, $1)=$prev$p
  6944. else
  6945. _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
  6946. fi
  6947. fi
  6948. prev=
  6949. ;;
  6950. *.lto.$objext) ;; # Ignore GCC LTO objects
  6951. *.$objext)
  6952. # This assumes that the test object file only shows up
  6953. # once in the compiler output.
  6954. if test "$p" = "conftest.$objext"; then
  6955. pre_test_object_deps_done=yes
  6956. continue
  6957. fi
  6958. if test no = "$pre_test_object_deps_done"; then
  6959. if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
  6960. _LT_TAGVAR(predep_objects, $1)=$p
  6961. else
  6962. _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
  6963. fi
  6964. else
  6965. if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
  6966. _LT_TAGVAR(postdep_objects, $1)=$p
  6967. else
  6968. _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
  6969. fi
  6970. fi
  6971. ;;
  6972. *) ;; # Ignore the rest.
  6973. esac
  6974. done
  6975. # Clean up.
  6976. rm -f a.out a.exe
  6977. else
  6978. echo "libtool.m4: error: problem compiling $1 test program"
  6979. fi
  6980. $RM -f confest.$objext
  6981. CFLAGS=$_lt_libdeps_save_CFLAGS
  6982. # PORTME: override above test on systems where it is broken
  6983. m4_if([$1], [CXX],
  6984. [case $host_os in
  6985. interix[[3-9]]*)
  6986. # Interix 3.5 installs completely hosed .la files for C++, so rather than
  6987. # hack all around it, let's just trust "g++" to DTRT.
  6988. _LT_TAGVAR(predep_objects,$1)=
  6989. _LT_TAGVAR(postdep_objects,$1)=
  6990. _LT_TAGVAR(postdeps,$1)=
  6991. ;;
  6992. esac
  6993. ])
  6994. case " $_LT_TAGVAR(postdeps, $1) " in
  6995. *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
  6996. esac
  6997. _LT_TAGVAR(compiler_lib_search_dirs, $1)=
  6998. if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
  6999. _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
  7000. fi
  7001. _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
  7002. [The directories searched by this compiler when creating a shared library])
  7003. _LT_TAGDECL([], [predep_objects], [1],
  7004. [Dependencies to place before and after the objects being linked to
  7005. create a shared library])
  7006. _LT_TAGDECL([], [postdep_objects], [1])
  7007. _LT_TAGDECL([], [predeps], [1])
  7008. _LT_TAGDECL([], [postdeps], [1])
  7009. _LT_TAGDECL([], [compiler_lib_search_path], [1],
  7010. [The library search path used internally by the compiler when linking
  7011. a shared library])
  7012. ])# _LT_SYS_HIDDEN_LIBDEPS
  7013. # _LT_LANG_F77_CONFIG([TAG])
  7014. # --------------------------
  7015. # Ensure that the configuration variables for a Fortran 77 compiler are
  7016. # suitably defined. These variables are subsequently used by _LT_CONFIG
  7017. # to write the compiler configuration to 'libtool'.
  7018. m4_defun([_LT_LANG_F77_CONFIG],
  7019. [AC_LANG_PUSH(Fortran 77)
  7020. if test -z "$F77" || test no = "$F77"; then
  7021. _lt_disable_F77=yes
  7022. fi
  7023. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7024. _LT_TAGVAR(allow_undefined_flag, $1)=
  7025. _LT_TAGVAR(always_export_symbols, $1)=no
  7026. _LT_TAGVAR(archive_expsym_cmds, $1)=
  7027. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  7028. _LT_TAGVAR(hardcode_direct, $1)=no
  7029. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  7030. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  7031. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  7032. _LT_TAGVAR(hardcode_minus_L, $1)=no
  7033. _LT_TAGVAR(hardcode_automatic, $1)=no
  7034. _LT_TAGVAR(inherit_rpath, $1)=no
  7035. _LT_TAGVAR(module_cmds, $1)=
  7036. _LT_TAGVAR(module_expsym_cmds, $1)=
  7037. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  7038. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7039. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  7040. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  7041. _LT_TAGVAR(no_undefined_flag, $1)=
  7042. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  7043. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  7044. # Source file extension for f77 test sources.
  7045. ac_ext=f
  7046. # Object file extension for compiled f77 test sources.
  7047. objext=o
  7048. _LT_TAGVAR(objext, $1)=$objext
  7049. # No sense in running all these tests if we already determined that
  7050. # the F77 compiler isn't working. Some variables (like enable_shared)
  7051. # are currently assumed to apply to all compilers on this platform,
  7052. # and will be corrupted by setting them based on a non-working compiler.
  7053. if test yes != "$_lt_disable_F77"; then
  7054. # Code to be used in simple compile tests
  7055. lt_simple_compile_test_code="\
  7056. subroutine t
  7057. return
  7058. end
  7059. "
  7060. # Code to be used in simple link tests
  7061. lt_simple_link_test_code="\
  7062. program t
  7063. end
  7064. "
  7065. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7066. _LT_TAG_COMPILER
  7067. # save warnings/boilerplate of simple test code
  7068. _LT_COMPILER_BOILERPLATE
  7069. _LT_LINKER_BOILERPLATE
  7070. # Allow CC to be a program name with arguments.
  7071. lt_save_CC=$CC
  7072. lt_save_GCC=$GCC
  7073. lt_save_CFLAGS=$CFLAGS
  7074. CC=${F77-"f77"}
  7075. CFLAGS=$FFLAGS
  7076. compiler=$CC
  7077. _LT_TAGVAR(compiler, $1)=$CC
  7078. _LT_CC_BASENAME([$compiler])
  7079. GCC=$G77
  7080. if test -n "$compiler"; then
  7081. AC_MSG_CHECKING([if libtool supports shared libraries])
  7082. AC_MSG_RESULT([$can_build_shared])
  7083. AC_MSG_CHECKING([whether to build shared libraries])
  7084. test no = "$can_build_shared" && enable_shared=no
  7085. # On AIX, shared libraries and static libraries use the same namespace, and
  7086. # are all built from PIC.
  7087. case $host_os in
  7088. aix3*)
  7089. test yes = "$enable_shared" && enable_static=no
  7090. if test -n "$RANLIB"; then
  7091. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  7092. postinstall_cmds='$RANLIB $lib'
  7093. fi
  7094. ;;
  7095. aix[[4-9]]*)
  7096. if test ia64 != "$host_cpu"; then
  7097. case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
  7098. yes,aix,yes) ;; # shared object as lib.so file only
  7099. yes,svr4,*) ;; # shared object as lib.so archive member only
  7100. yes,*) enable_static=no ;; # shared object in lib.a archive as well
  7101. esac
  7102. fi
  7103. ;;
  7104. esac
  7105. AC_MSG_RESULT([$enable_shared])
  7106. AC_MSG_CHECKING([whether to build static libraries])
  7107. # Make sure either enable_shared or enable_static is yes.
  7108. test yes = "$enable_shared" || enable_static=yes
  7109. AC_MSG_RESULT([$enable_static])
  7110. _LT_TAGVAR(GCC, $1)=$G77
  7111. _LT_TAGVAR(LD, $1)=$LD
  7112. ## CAVEAT EMPTOR:
  7113. ## There is no encapsulation within the following macros, do not change
  7114. ## the running order or otherwise move them around unless you know exactly
  7115. ## what you are doing...
  7116. _LT_COMPILER_PIC($1)
  7117. _LT_COMPILER_C_O($1)
  7118. _LT_COMPILER_FILE_LOCKS($1)
  7119. _LT_LINKER_SHLIBS($1)
  7120. _LT_SYS_DYNAMIC_LINKER($1)
  7121. _LT_LINKER_HARDCODE_LIBPATH($1)
  7122. _LT_CONFIG($1)
  7123. fi # test -n "$compiler"
  7124. GCC=$lt_save_GCC
  7125. CC=$lt_save_CC
  7126. CFLAGS=$lt_save_CFLAGS
  7127. fi # test yes != "$_lt_disable_F77"
  7128. AC_LANG_POP
  7129. ])# _LT_LANG_F77_CONFIG
  7130. # _LT_LANG_FC_CONFIG([TAG])
  7131. # -------------------------
  7132. # Ensure that the configuration variables for a Fortran compiler are
  7133. # suitably defined. These variables are subsequently used by _LT_CONFIG
  7134. # to write the compiler configuration to 'libtool'.
  7135. m4_defun([_LT_LANG_FC_CONFIG],
  7136. [AC_LANG_PUSH(Fortran)
  7137. if test -z "$FC" || test no = "$FC"; then
  7138. _lt_disable_FC=yes
  7139. fi
  7140. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7141. _LT_TAGVAR(allow_undefined_flag, $1)=
  7142. _LT_TAGVAR(always_export_symbols, $1)=no
  7143. _LT_TAGVAR(archive_expsym_cmds, $1)=
  7144. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  7145. _LT_TAGVAR(hardcode_direct, $1)=no
  7146. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  7147. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  7148. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  7149. _LT_TAGVAR(hardcode_minus_L, $1)=no
  7150. _LT_TAGVAR(hardcode_automatic, $1)=no
  7151. _LT_TAGVAR(inherit_rpath, $1)=no
  7152. _LT_TAGVAR(module_cmds, $1)=
  7153. _LT_TAGVAR(module_expsym_cmds, $1)=
  7154. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  7155. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7156. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  7157. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  7158. _LT_TAGVAR(no_undefined_flag, $1)=
  7159. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  7160. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  7161. # Source file extension for fc test sources.
  7162. ac_ext=${ac_fc_srcext-f}
  7163. # Object file extension for compiled fc test sources.
  7164. objext=o
  7165. _LT_TAGVAR(objext, $1)=$objext
  7166. # No sense in running all these tests if we already determined that
  7167. # the FC compiler isn't working. Some variables (like enable_shared)
  7168. # are currently assumed to apply to all compilers on this platform,
  7169. # and will be corrupted by setting them based on a non-working compiler.
  7170. if test yes != "$_lt_disable_FC"; then
  7171. # Code to be used in simple compile tests
  7172. lt_simple_compile_test_code="\
  7173. subroutine t
  7174. return
  7175. end
  7176. "
  7177. # Code to be used in simple link tests
  7178. lt_simple_link_test_code="\
  7179. program t
  7180. end
  7181. "
  7182. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7183. _LT_TAG_COMPILER
  7184. # save warnings/boilerplate of simple test code
  7185. _LT_COMPILER_BOILERPLATE
  7186. _LT_LINKER_BOILERPLATE
  7187. # Allow CC to be a program name with arguments.
  7188. lt_save_CC=$CC
  7189. lt_save_GCC=$GCC
  7190. lt_save_CFLAGS=$CFLAGS
  7191. CC=${FC-"f95"}
  7192. CFLAGS=$FCFLAGS
  7193. compiler=$CC
  7194. GCC=$ac_cv_fc_compiler_gnu
  7195. _LT_TAGVAR(compiler, $1)=$CC
  7196. _LT_CC_BASENAME([$compiler])
  7197. if test -n "$compiler"; then
  7198. AC_MSG_CHECKING([if libtool supports shared libraries])
  7199. AC_MSG_RESULT([$can_build_shared])
  7200. AC_MSG_CHECKING([whether to build shared libraries])
  7201. test no = "$can_build_shared" && enable_shared=no
  7202. # On AIX, shared libraries and static libraries use the same namespace, and
  7203. # are all built from PIC.
  7204. case $host_os in
  7205. aix3*)
  7206. test yes = "$enable_shared" && enable_static=no
  7207. if test -n "$RANLIB"; then
  7208. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  7209. postinstall_cmds='$RANLIB $lib'
  7210. fi
  7211. ;;
  7212. aix[[4-9]]*)
  7213. if test ia64 != "$host_cpu"; then
  7214. case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
  7215. yes,aix,yes) ;; # shared object as lib.so file only
  7216. yes,svr4,*) ;; # shared object as lib.so archive member only
  7217. yes,*) enable_static=no ;; # shared object in lib.a archive as well
  7218. esac
  7219. fi
  7220. ;;
  7221. esac
  7222. AC_MSG_RESULT([$enable_shared])
  7223. AC_MSG_CHECKING([whether to build static libraries])
  7224. # Make sure either enable_shared or enable_static is yes.
  7225. test yes = "$enable_shared" || enable_static=yes
  7226. AC_MSG_RESULT([$enable_static])
  7227. _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
  7228. _LT_TAGVAR(LD, $1)=$LD
  7229. ## CAVEAT EMPTOR:
  7230. ## There is no encapsulation within the following macros, do not change
  7231. ## the running order or otherwise move them around unless you know exactly
  7232. ## what you are doing...
  7233. _LT_SYS_HIDDEN_LIBDEPS($1)
  7234. _LT_COMPILER_PIC($1)
  7235. _LT_COMPILER_C_O($1)
  7236. _LT_COMPILER_FILE_LOCKS($1)
  7237. _LT_LINKER_SHLIBS($1)
  7238. _LT_SYS_DYNAMIC_LINKER($1)
  7239. _LT_LINKER_HARDCODE_LIBPATH($1)
  7240. _LT_CONFIG($1)
  7241. fi # test -n "$compiler"
  7242. GCC=$lt_save_GCC
  7243. CC=$lt_save_CC
  7244. CFLAGS=$lt_save_CFLAGS
  7245. fi # test yes != "$_lt_disable_FC"
  7246. AC_LANG_POP
  7247. ])# _LT_LANG_FC_CONFIG
  7248. # _LT_LANG_GCJ_CONFIG([TAG])
  7249. # --------------------------
  7250. # Ensure that the configuration variables for the GNU Java Compiler compiler
  7251. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  7252. # to write the compiler configuration to 'libtool'.
  7253. m4_defun([_LT_LANG_GCJ_CONFIG],
  7254. [AC_REQUIRE([LT_PROG_GCJ])dnl
  7255. AC_LANG_SAVE
  7256. # Source file extension for Java test sources.
  7257. ac_ext=java
  7258. # Object file extension for compiled Java test sources.
  7259. objext=o
  7260. _LT_TAGVAR(objext, $1)=$objext
  7261. # Code to be used in simple compile tests
  7262. lt_simple_compile_test_code="class foo {}"
  7263. # Code to be used in simple link tests
  7264. lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
  7265. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7266. _LT_TAG_COMPILER
  7267. # save warnings/boilerplate of simple test code
  7268. _LT_COMPILER_BOILERPLATE
  7269. _LT_LINKER_BOILERPLATE
  7270. # Allow CC to be a program name with arguments.
  7271. lt_save_CC=$CC
  7272. lt_save_CFLAGS=$CFLAGS
  7273. lt_save_GCC=$GCC
  7274. GCC=yes
  7275. CC=${GCJ-"gcj"}
  7276. CFLAGS=$GCJFLAGS
  7277. compiler=$CC
  7278. _LT_TAGVAR(compiler, $1)=$CC
  7279. _LT_TAGVAR(LD, $1)=$LD
  7280. _LT_CC_BASENAME([$compiler])
  7281. # GCJ did not exist at the time GCC didn't implicitly link libc in.
  7282. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7283. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7284. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  7285. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  7286. ## CAVEAT EMPTOR:
  7287. ## There is no encapsulation within the following macros, do not change
  7288. ## the running order or otherwise move them around unless you know exactly
  7289. ## what you are doing...
  7290. if test -n "$compiler"; then
  7291. _LT_COMPILER_NO_RTTI($1)
  7292. _LT_COMPILER_PIC($1)
  7293. _LT_COMPILER_C_O($1)
  7294. _LT_COMPILER_FILE_LOCKS($1)
  7295. _LT_LINKER_SHLIBS($1)
  7296. _LT_LINKER_HARDCODE_LIBPATH($1)
  7297. _LT_CONFIG($1)
  7298. fi
  7299. AC_LANG_RESTORE
  7300. GCC=$lt_save_GCC
  7301. CC=$lt_save_CC
  7302. CFLAGS=$lt_save_CFLAGS
  7303. ])# _LT_LANG_GCJ_CONFIG
  7304. # _LT_LANG_GO_CONFIG([TAG])
  7305. # --------------------------
  7306. # Ensure that the configuration variables for the GNU Go compiler
  7307. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  7308. # to write the compiler configuration to 'libtool'.
  7309. m4_defun([_LT_LANG_GO_CONFIG],
  7310. [AC_REQUIRE([LT_PROG_GO])dnl
  7311. AC_LANG_SAVE
  7312. # Source file extension for Go test sources.
  7313. ac_ext=go
  7314. # Object file extension for compiled Go test sources.
  7315. objext=o
  7316. _LT_TAGVAR(objext, $1)=$objext
  7317. # Code to be used in simple compile tests
  7318. lt_simple_compile_test_code="package main; func main() { }"
  7319. # Code to be used in simple link tests
  7320. lt_simple_link_test_code='package main; func main() { }'
  7321. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7322. _LT_TAG_COMPILER
  7323. # save warnings/boilerplate of simple test code
  7324. _LT_COMPILER_BOILERPLATE
  7325. _LT_LINKER_BOILERPLATE
  7326. # Allow CC to be a program name with arguments.
  7327. lt_save_CC=$CC
  7328. lt_save_CFLAGS=$CFLAGS
  7329. lt_save_GCC=$GCC
  7330. GCC=yes
  7331. CC=${GOC-"gccgo"}
  7332. CFLAGS=$GOFLAGS
  7333. compiler=$CC
  7334. _LT_TAGVAR(compiler, $1)=$CC
  7335. _LT_TAGVAR(LD, $1)=$LD
  7336. _LT_CC_BASENAME([$compiler])
  7337. # Go did not exist at the time GCC didn't implicitly link libc in.
  7338. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7339. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7340. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  7341. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  7342. ## CAVEAT EMPTOR:
  7343. ## There is no encapsulation within the following macros, do not change
  7344. ## the running order or otherwise move them around unless you know exactly
  7345. ## what you are doing...
  7346. if test -n "$compiler"; then
  7347. _LT_COMPILER_NO_RTTI($1)
  7348. _LT_COMPILER_PIC($1)
  7349. _LT_COMPILER_C_O($1)
  7350. _LT_COMPILER_FILE_LOCKS($1)
  7351. _LT_LINKER_SHLIBS($1)
  7352. _LT_LINKER_HARDCODE_LIBPATH($1)
  7353. _LT_CONFIG($1)
  7354. fi
  7355. AC_LANG_RESTORE
  7356. GCC=$lt_save_GCC
  7357. CC=$lt_save_CC
  7358. CFLAGS=$lt_save_CFLAGS
  7359. ])# _LT_LANG_GO_CONFIG
  7360. # _LT_LANG_RC_CONFIG([TAG])
  7361. # -------------------------
  7362. # Ensure that the configuration variables for the Windows resource compiler
  7363. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  7364. # to write the compiler configuration to 'libtool'.
  7365. m4_defun([_LT_LANG_RC_CONFIG],
  7366. [AC_REQUIRE([LT_PROG_RC])dnl
  7367. AC_LANG_SAVE
  7368. # Source file extension for RC test sources.
  7369. ac_ext=rc
  7370. # Object file extension for compiled RC test sources.
  7371. objext=o
  7372. _LT_TAGVAR(objext, $1)=$objext
  7373. # Code to be used in simple compile tests
  7374. lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
  7375. # Code to be used in simple link tests
  7376. lt_simple_link_test_code=$lt_simple_compile_test_code
  7377. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7378. _LT_TAG_COMPILER
  7379. # save warnings/boilerplate of simple test code
  7380. _LT_COMPILER_BOILERPLATE
  7381. _LT_LINKER_BOILERPLATE
  7382. # Allow CC to be a program name with arguments.
  7383. lt_save_CC=$CC
  7384. lt_save_CFLAGS=$CFLAGS
  7385. lt_save_GCC=$GCC
  7386. GCC=
  7387. CC=${RC-"windres"}
  7388. CFLAGS=
  7389. compiler=$CC
  7390. _LT_TAGVAR(compiler, $1)=$CC
  7391. _LT_CC_BASENAME([$compiler])
  7392. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  7393. if test -n "$compiler"; then
  7394. :
  7395. _LT_CONFIG($1)
  7396. fi
  7397. GCC=$lt_save_GCC
  7398. AC_LANG_RESTORE
  7399. CC=$lt_save_CC
  7400. CFLAGS=$lt_save_CFLAGS
  7401. ])# _LT_LANG_RC_CONFIG
  7402. # LT_PROG_GCJ
  7403. # -----------
  7404. AC_DEFUN([LT_PROG_GCJ],
  7405. [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
  7406. [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
  7407. [AC_CHECK_TOOL(GCJ, gcj,)
  7408. test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
  7409. AC_SUBST(GCJFLAGS)])])[]dnl
  7410. ])
  7411. # Old name:
  7412. AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
  7413. dnl aclocal-1.4 backwards compatibility:
  7414. dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
  7415. # LT_PROG_GO
  7416. # ----------
  7417. AC_DEFUN([LT_PROG_GO],
  7418. [AC_CHECK_TOOL(GOC, gccgo,)
  7419. ])
  7420. # LT_PROG_RC
  7421. # ----------
  7422. AC_DEFUN([LT_PROG_RC],
  7423. [AC_CHECK_TOOL(RC, windres,)
  7424. ])
  7425. # Old name:
  7426. AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
  7427. dnl aclocal-1.4 backwards compatibility:
  7428. dnl AC_DEFUN([LT_AC_PROG_RC], [])
  7429. # _LT_DECL_EGREP
  7430. # --------------
  7431. # If we don't have a new enough Autoconf to choose the best grep
  7432. # available, choose the one first in the user's PATH.
  7433. m4_defun([_LT_DECL_EGREP],
  7434. [AC_REQUIRE([AC_PROG_EGREP])dnl
  7435. AC_REQUIRE([AC_PROG_FGREP])dnl
  7436. test -z "$GREP" && GREP=grep
  7437. _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
  7438. _LT_DECL([], [EGREP], [1], [An ERE matcher])
  7439. _LT_DECL([], [FGREP], [1], [A literal string matcher])
  7440. dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
  7441. AC_SUBST([GREP])
  7442. ])
  7443. # _LT_DECL_OBJDUMP
  7444. # --------------
  7445. # If we don't have a new enough Autoconf to choose the best objdump
  7446. # available, choose the one first in the user's PATH.
  7447. m4_defun([_LT_DECL_OBJDUMP],
  7448. [AC_CHECK_TOOL(OBJDUMP, objdump, false)
  7449. test -z "$OBJDUMP" && OBJDUMP=objdump
  7450. _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
  7451. AC_SUBST([OBJDUMP])
  7452. ])
  7453. # _LT_DECL_DLLTOOL
  7454. # ----------------
  7455. # Ensure DLLTOOL variable is set.
  7456. m4_defun([_LT_DECL_DLLTOOL],
  7457. [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  7458. test -z "$DLLTOOL" && DLLTOOL=dlltool
  7459. _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
  7460. AC_SUBST([DLLTOOL])
  7461. ])
  7462. # _LT_DECL_SED
  7463. # ------------
  7464. # Check for a fully-functional sed program, that truncates
  7465. # as few characters as possible. Prefer GNU sed if found.
  7466. m4_defun([_LT_DECL_SED],
  7467. [AC_PROG_SED
  7468. test -z "$SED" && SED=sed
  7469. Xsed="$SED -e 1s/^X//"
  7470. _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
  7471. _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
  7472. [Sed that helps us avoid accidentally triggering echo(1) options like -n])
  7473. ])# _LT_DECL_SED
  7474. m4_ifndef([AC_PROG_SED], [
  7475. ############################################################
  7476. # NOTE: This macro has been submitted for inclusion into #
  7477. # GNU Autoconf as AC_PROG_SED. When it is available in #
  7478. # a released version of Autoconf we should remove this #
  7479. # macro and use it instead. #
  7480. ############################################################
  7481. m4_defun([AC_PROG_SED],
  7482. [AC_MSG_CHECKING([for a sed that does not truncate output])
  7483. AC_CACHE_VAL(lt_cv_path_SED,
  7484. [# Loop through the user's path and test for sed and gsed.
  7485. # Then use that list of sed's as ones to test for truncation.
  7486. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  7487. for as_dir in $PATH
  7488. do
  7489. IFS=$as_save_IFS
  7490. test -z "$as_dir" && as_dir=.
  7491. for lt_ac_prog in sed gsed; do
  7492. for ac_exec_ext in '' $ac_executable_extensions; do
  7493. if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
  7494. lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
  7495. fi
  7496. done
  7497. done
  7498. done
  7499. IFS=$as_save_IFS
  7500. lt_ac_max=0
  7501. lt_ac_count=0
  7502. # Add /usr/xpg4/bin/sed as it is typically found on Solaris
  7503. # along with /bin/sed that truncates output.
  7504. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
  7505. test ! -f "$lt_ac_sed" && continue
  7506. cat /dev/null > conftest.in
  7507. lt_ac_count=0
  7508. echo $ECHO_N "0123456789$ECHO_C" >conftest.in
  7509. # Check for GNU sed and select it if it is found.
  7510. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
  7511. lt_cv_path_SED=$lt_ac_sed
  7512. break
  7513. fi
  7514. while true; do
  7515. cat conftest.in conftest.in >conftest.tmp
  7516. mv conftest.tmp conftest.in
  7517. cp conftest.in conftest.nl
  7518. echo >>conftest.nl
  7519. $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
  7520. cmp -s conftest.out conftest.nl || break
  7521. # 10000 chars as input seems more than enough
  7522. test 10 -lt "$lt_ac_count" && break
  7523. lt_ac_count=`expr $lt_ac_count + 1`
  7524. if test "$lt_ac_count" -gt "$lt_ac_max"; then
  7525. lt_ac_max=$lt_ac_count
  7526. lt_cv_path_SED=$lt_ac_sed
  7527. fi
  7528. done
  7529. done
  7530. ])
  7531. SED=$lt_cv_path_SED
  7532. AC_SUBST([SED])
  7533. AC_MSG_RESULT([$SED])
  7534. ])#AC_PROG_SED
  7535. ])#m4_ifndef
  7536. # Old name:
  7537. AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
  7538. dnl aclocal-1.4 backwards compatibility:
  7539. dnl AC_DEFUN([LT_AC_PROG_SED], [])
  7540. # _LT_CHECK_SHELL_FEATURES
  7541. # ------------------------
  7542. # Find out whether the shell is Bourne or XSI compatible,
  7543. # or has some other useful features.
  7544. m4_defun([_LT_CHECK_SHELL_FEATURES],
  7545. [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
  7546. lt_unset=unset
  7547. else
  7548. lt_unset=false
  7549. fi
  7550. _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
  7551. # test EBCDIC or ASCII
  7552. case `echo X|tr X '\101'` in
  7553. A) # ASCII based system
  7554. # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
  7555. lt_SP2NL='tr \040 \012'
  7556. lt_NL2SP='tr \015\012 \040\040'
  7557. ;;
  7558. *) # EBCDIC based system
  7559. lt_SP2NL='tr \100 \n'
  7560. lt_NL2SP='tr \r\n \100\100'
  7561. ;;
  7562. esac
  7563. _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
  7564. _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
  7565. ])# _LT_CHECK_SHELL_FEATURES
  7566. # _LT_PATH_CONVERSION_FUNCTIONS
  7567. # -----------------------------
  7568. # Determine what file name conversion functions should be used by
  7569. # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
  7570. # for certain cross-compile configurations and native mingw.
  7571. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
  7572. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  7573. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  7574. AC_MSG_CHECKING([how to convert $build file names to $host format])
  7575. AC_CACHE_VAL(lt_cv_to_host_file_cmd,
  7576. [case $host in
  7577. *-*-mingw* )
  7578. case $build in
  7579. *-*-mingw* | *-*-windows* ) # actually msys
  7580. lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
  7581. ;;
  7582. *-*-cygwin* )
  7583. lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
  7584. ;;
  7585. * ) # otherwise, assume *nix
  7586. lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
  7587. ;;
  7588. esac
  7589. ;;
  7590. *-*-cygwin* )
  7591. case $build in
  7592. *-*-mingw* | *-*-windows* ) # actually msys
  7593. lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
  7594. ;;
  7595. *-*-cygwin* )
  7596. lt_cv_to_host_file_cmd=func_convert_file_noop
  7597. ;;
  7598. * ) # otherwise, assume *nix
  7599. lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
  7600. ;;
  7601. esac
  7602. ;;
  7603. * ) # unhandled hosts (and "normal" native builds)
  7604. lt_cv_to_host_file_cmd=func_convert_file_noop
  7605. ;;
  7606. esac
  7607. ])
  7608. to_host_file_cmd=$lt_cv_to_host_file_cmd
  7609. AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
  7610. _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
  7611. [0], [convert $build file names to $host format])dnl
  7612. AC_MSG_CHECKING([how to convert $build file names to toolchain format])
  7613. AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
  7614. [#assume ordinary cross tools, or native build.
  7615. lt_cv_to_tool_file_cmd=func_convert_file_noop
  7616. case $host in
  7617. *-*-mingw* | *-*-windows* )
  7618. case $build in
  7619. *-*-mingw* | *-*-windows* ) # actually msys
  7620. lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
  7621. ;;
  7622. esac
  7623. ;;
  7624. esac
  7625. ])
  7626. to_tool_file_cmd=$lt_cv_to_tool_file_cmd
  7627. AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
  7628. _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
  7629. [0], [convert $build files to toolchain format])dnl
  7630. ])# _LT_PATH_CONVERSION_FUNCTIONS