libtool.m4 259 KB

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