libtool.m4 280 KB

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