libtool.m4 280 KB

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