libtool.m4 275 KB

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