libtool.m4 280 KB

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