1
0

libtool.m4 299 KB

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