libtool.m4 299 KB

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