libtool.m4 280 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986
  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. # Add ABI-specific directories to the system library path.
  2389. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
  2390. # Append ld.so.conf contents to the search path
  2391. if test -f /etc/ld.so.conf; then
  2392. 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' ' '`
  2393. sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
  2394. fi
  2395. # We used to test for /lib/ld.so.1 and disable shared libraries on
  2396. # powerpc, because MkLinux only supported shared libraries with the
  2397. # GNU dynamic linker. Since this was broken with cross compilers,
  2398. # most powerpc-linux boxes support dynamic linking these days and
  2399. # people can always --disable-shared, the test was removed, and we
  2400. # assume the GNU/Linux dynamic linker is in use.
  2401. dynamic_linker='GNU/Linux ld.so'
  2402. ;;
  2403. netbsd*)
  2404. version_type=sunos
  2405. need_lib_prefix=no
  2406. need_version=no
  2407. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  2408. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  2409. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2410. dynamic_linker='NetBSD (a.out) ld.so'
  2411. else
  2412. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  2413. soname_spec='${libname}${release}${shared_ext}$major'
  2414. dynamic_linker='NetBSD ld.elf_so'
  2415. fi
  2416. shlibpath_var=LD_LIBRARY_PATH
  2417. shlibpath_overrides_runpath=yes
  2418. hardcode_into_libs=yes
  2419. ;;
  2420. newsos6)
  2421. version_type=linux # correct to gnu/linux during the next big refactor
  2422. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2423. shlibpath_var=LD_LIBRARY_PATH
  2424. shlibpath_overrides_runpath=yes
  2425. ;;
  2426. *nto* | *qnx*)
  2427. version_type=qnx
  2428. need_lib_prefix=no
  2429. need_version=no
  2430. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2431. soname_spec='${libname}${release}${shared_ext}$major'
  2432. shlibpath_var=LD_LIBRARY_PATH
  2433. shlibpath_overrides_runpath=no
  2434. hardcode_into_libs=yes
  2435. dynamic_linker='ldqnx.so'
  2436. ;;
  2437. openbsd*)
  2438. version_type=sunos
  2439. sys_lib_dlsearch_path_spec="/usr/lib"
  2440. need_lib_prefix=no
  2441. # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
  2442. case $host_os in
  2443. openbsd3.3 | openbsd3.3.*) need_version=yes ;;
  2444. *) need_version=no ;;
  2445. esac
  2446. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  2447. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2448. shlibpath_var=LD_LIBRARY_PATH
  2449. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  2450. case $host_os in
  2451. openbsd2.[[89]] | openbsd2.[[89]].*)
  2452. shlibpath_overrides_runpath=no
  2453. ;;
  2454. *)
  2455. shlibpath_overrides_runpath=yes
  2456. ;;
  2457. esac
  2458. else
  2459. shlibpath_overrides_runpath=yes
  2460. fi
  2461. ;;
  2462. os2*)
  2463. libname_spec='$name'
  2464. shrext_cmds=".dll"
  2465. need_lib_prefix=no
  2466. library_names_spec='$libname${shared_ext} $libname.a'
  2467. dynamic_linker='OS/2 ld.exe'
  2468. shlibpath_var=LIBPATH
  2469. ;;
  2470. osf3* | osf4* | osf5*)
  2471. version_type=osf
  2472. need_lib_prefix=no
  2473. need_version=no
  2474. soname_spec='${libname}${release}${shared_ext}$major'
  2475. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2476. shlibpath_var=LD_LIBRARY_PATH
  2477. sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  2478. sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  2479. ;;
  2480. rdos*)
  2481. dynamic_linker=no
  2482. ;;
  2483. solaris*)
  2484. version_type=linux # correct to gnu/linux during the next big refactor
  2485. need_lib_prefix=no
  2486. need_version=no
  2487. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2488. soname_spec='${libname}${release}${shared_ext}$major'
  2489. shlibpath_var=LD_LIBRARY_PATH
  2490. shlibpath_overrides_runpath=yes
  2491. hardcode_into_libs=yes
  2492. # ldd complains unless libraries are executable
  2493. postinstall_cmds='chmod +x $lib'
  2494. ;;
  2495. sunos4*)
  2496. version_type=sunos
  2497. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  2498. finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  2499. shlibpath_var=LD_LIBRARY_PATH
  2500. shlibpath_overrides_runpath=yes
  2501. if test "$with_gnu_ld" = yes; then
  2502. need_lib_prefix=no
  2503. fi
  2504. need_version=yes
  2505. ;;
  2506. sysv4 | sysv4.3*)
  2507. version_type=linux # correct to gnu/linux during the next big refactor
  2508. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2509. soname_spec='${libname}${release}${shared_ext}$major'
  2510. shlibpath_var=LD_LIBRARY_PATH
  2511. case $host_vendor in
  2512. sni)
  2513. shlibpath_overrides_runpath=no
  2514. need_lib_prefix=no
  2515. runpath_var=LD_RUN_PATH
  2516. ;;
  2517. siemens)
  2518. need_lib_prefix=no
  2519. ;;
  2520. motorola)
  2521. need_lib_prefix=no
  2522. need_version=no
  2523. shlibpath_overrides_runpath=no
  2524. sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  2525. ;;
  2526. esac
  2527. ;;
  2528. sysv4*MP*)
  2529. if test -d /usr/nec ;then
  2530. version_type=linux # correct to gnu/linux during the next big refactor
  2531. library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
  2532. soname_spec='$libname${shared_ext}.$major'
  2533. shlibpath_var=LD_LIBRARY_PATH
  2534. fi
  2535. ;;
  2536. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  2537. version_type=freebsd-elf
  2538. need_lib_prefix=no
  2539. need_version=no
  2540. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  2541. soname_spec='${libname}${release}${shared_ext}$major'
  2542. shlibpath_var=LD_LIBRARY_PATH
  2543. shlibpath_overrides_runpath=yes
  2544. hardcode_into_libs=yes
  2545. if test "$with_gnu_ld" = yes; then
  2546. sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
  2547. else
  2548. sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
  2549. case $host_os in
  2550. sco3.2v5*)
  2551. sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
  2552. ;;
  2553. esac
  2554. fi
  2555. sys_lib_dlsearch_path_spec='/usr/lib'
  2556. ;;
  2557. tpf*)
  2558. # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
  2559. version_type=linux # correct to gnu/linux during the next big refactor
  2560. need_lib_prefix=no
  2561. need_version=no
  2562. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2563. shlibpath_var=LD_LIBRARY_PATH
  2564. shlibpath_overrides_runpath=no
  2565. hardcode_into_libs=yes
  2566. ;;
  2567. uts4*)
  2568. version_type=linux # correct to gnu/linux during the next big refactor
  2569. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2570. soname_spec='${libname}${release}${shared_ext}$major'
  2571. shlibpath_var=LD_LIBRARY_PATH
  2572. ;;
  2573. *)
  2574. dynamic_linker=no
  2575. ;;
  2576. esac
  2577. AC_MSG_RESULT([$dynamic_linker])
  2578. test "$dynamic_linker" = no && can_build_shared=no
  2579. variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  2580. if test "$GCC" = yes; then
  2581. variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  2582. fi
  2583. if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
  2584. sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
  2585. fi
  2586. if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
  2587. sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
  2588. fi
  2589. _LT_DECL([], [variables_saved_for_relink], [1],
  2590. [Variables whose values should be saved in libtool wrapper scripts and
  2591. restored at link time])
  2592. _LT_DECL([], [need_lib_prefix], [0],
  2593. [Do we need the "lib" prefix for modules?])
  2594. _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
  2595. _LT_DECL([], [version_type], [0], [Library versioning type])
  2596. _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
  2597. _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
  2598. _LT_DECL([], [shlibpath_overrides_runpath], [0],
  2599. [Is shlibpath searched before the hard-coded library search path?])
  2600. _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
  2601. _LT_DECL([], [library_names_spec], [1],
  2602. [[List of archive names. First name is the real one, the rest are links.
  2603. The last name is the one that the linker finds with -lNAME]])
  2604. _LT_DECL([], [soname_spec], [1],
  2605. [[The coded name of the library, if different from the real name]])
  2606. _LT_DECL([], [install_override_mode], [1],
  2607. [Permission mode override for installation of shared libraries])
  2608. _LT_DECL([], [postinstall_cmds], [2],
  2609. [Command to use after installation of a shared archive])
  2610. _LT_DECL([], [postuninstall_cmds], [2],
  2611. [Command to use after uninstallation of a shared archive])
  2612. _LT_DECL([], [finish_cmds], [2],
  2613. [Commands used to finish a libtool library installation in a directory])
  2614. _LT_DECL([], [finish_eval], [1],
  2615. [[As "finish_cmds", except a single script fragment to be evaled but
  2616. not shown]])
  2617. _LT_DECL([], [hardcode_into_libs], [0],
  2618. [Whether we should hardcode library paths into libraries])
  2619. _LT_DECL([], [sys_lib_search_path_spec], [2],
  2620. [Compile-time system search path for libraries])
  2621. _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
  2622. [Run-time system search path for libraries])
  2623. ])# _LT_SYS_DYNAMIC_LINKER
  2624. # _LT_PATH_TOOL_PREFIX(TOOL)
  2625. # --------------------------
  2626. # find a file program which can recognize shared library
  2627. AC_DEFUN([_LT_PATH_TOOL_PREFIX],
  2628. [m4_require([_LT_DECL_EGREP])dnl
  2629. AC_MSG_CHECKING([for $1])
  2630. AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
  2631. [case $MAGIC_CMD in
  2632. [[\\/*] | ?:[\\/]*])
  2633. lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
  2634. ;;
  2635. *)
  2636. lt_save_MAGIC_CMD="$MAGIC_CMD"
  2637. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  2638. dnl $ac_dummy forces splitting on constant user-supplied paths.
  2639. dnl POSIX.2 word splitting is done only on the output of word expansions,
  2640. dnl not every word. This closes a longstanding sh security hole.
  2641. ac_dummy="m4_if([$2], , $PATH, [$2])"
  2642. for ac_dir in $ac_dummy; do
  2643. IFS="$lt_save_ifs"
  2644. test -z "$ac_dir" && ac_dir=.
  2645. if test -f $ac_dir/$1; then
  2646. lt_cv_path_MAGIC_CMD="$ac_dir/$1"
  2647. if test -n "$file_magic_test_file"; then
  2648. case $deplibs_check_method in
  2649. "file_magic "*)
  2650. file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
  2651. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  2652. if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  2653. $EGREP "$file_magic_regex" > /dev/null; then
  2654. :
  2655. else
  2656. cat <<_LT_EOF 1>&2
  2657. *** Warning: the command libtool uses to detect shared libraries,
  2658. *** $file_magic_cmd, produces output that libtool cannot recognize.
  2659. *** The result is that libtool may fail to recognize shared libraries
  2660. *** as such. This will affect the creation of libtool libraries that
  2661. *** depend on shared libraries, but programs linked with such libtool
  2662. *** libraries will work regardless of this problem. Nevertheless, you
  2663. *** may want to report the problem to your system manager and/or to
  2664. *** bug-libtool@gnu.org
  2665. _LT_EOF
  2666. fi ;;
  2667. esac
  2668. fi
  2669. break
  2670. fi
  2671. done
  2672. IFS="$lt_save_ifs"
  2673. MAGIC_CMD="$lt_save_MAGIC_CMD"
  2674. ;;
  2675. esac])
  2676. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  2677. if test -n "$MAGIC_CMD"; then
  2678. AC_MSG_RESULT($MAGIC_CMD)
  2679. else
  2680. AC_MSG_RESULT(no)
  2681. fi
  2682. _LT_DECL([], [MAGIC_CMD], [0],
  2683. [Used to examine libraries when file_magic_cmd begins with "file"])dnl
  2684. ])# _LT_PATH_TOOL_PREFIX
  2685. # Old name:
  2686. AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
  2687. dnl aclocal-1.4 backwards compatibility:
  2688. dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
  2689. # _LT_PATH_MAGIC
  2690. # --------------
  2691. # find a file program which can recognize a shared library
  2692. m4_defun([_LT_PATH_MAGIC],
  2693. [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
  2694. if test -z "$lt_cv_path_MAGIC_CMD"; then
  2695. if test -n "$ac_tool_prefix"; then
  2696. _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
  2697. else
  2698. MAGIC_CMD=:
  2699. fi
  2700. fi
  2701. ])# _LT_PATH_MAGIC
  2702. # LT_PATH_LD
  2703. # ----------
  2704. # find the pathname to the GNU or non-GNU linker
  2705. AC_DEFUN([LT_PATH_LD],
  2706. [AC_REQUIRE([AC_PROG_CC])dnl
  2707. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2708. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  2709. m4_require([_LT_DECL_SED])dnl
  2710. m4_require([_LT_DECL_EGREP])dnl
  2711. m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
  2712. AC_ARG_WITH([gnu-ld],
  2713. [AS_HELP_STRING([--with-gnu-ld],
  2714. [assume the C compiler uses GNU ld @<:@default=no@:>@])],
  2715. [test "$withval" = no || with_gnu_ld=yes],
  2716. [with_gnu_ld=no])dnl
  2717. ac_prog=ld
  2718. if test "$GCC" = yes; then
  2719. # Check if gcc -print-prog-name=ld gives a path.
  2720. AC_MSG_CHECKING([for ld used by $CC])
  2721. case $host in
  2722. *-*-mingw*)
  2723. # gcc leaves a trailing carriage return which upsets mingw
  2724. ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  2725. *)
  2726. ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  2727. esac
  2728. case $ac_prog in
  2729. # Accept absolute paths.
  2730. [[\\/]]* | ?:[[\\/]]*)
  2731. re_direlt='/[[^/]][[^/]]*/\.\./'
  2732. # Canonicalize the pathname of ld
  2733. ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
  2734. while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
  2735. ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
  2736. done
  2737. test -z "$LD" && LD="$ac_prog"
  2738. ;;
  2739. "")
  2740. # If it fails, then pretend we aren't using GCC.
  2741. ac_prog=ld
  2742. ;;
  2743. *)
  2744. # If it is relative, then search for the first ld in PATH.
  2745. with_gnu_ld=unknown
  2746. ;;
  2747. esac
  2748. elif test "$with_gnu_ld" = yes; then
  2749. AC_MSG_CHECKING([for GNU ld])
  2750. else
  2751. AC_MSG_CHECKING([for non-GNU ld])
  2752. fi
  2753. AC_CACHE_VAL(lt_cv_path_LD,
  2754. [if test -z "$LD"; then
  2755. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  2756. for ac_dir in $PATH; do
  2757. IFS="$lt_save_ifs"
  2758. test -z "$ac_dir" && ac_dir=.
  2759. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  2760. lt_cv_path_LD="$ac_dir/$ac_prog"
  2761. # Check to see if the program is GNU ld. I'd rather use --version,
  2762. # but apparently some variants of GNU ld only accept -v.
  2763. # Break only if it was the GNU/non-GNU ld that we prefer.
  2764. case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
  2765. *GNU* | *'with BFD'*)
  2766. test "$with_gnu_ld" != no && break
  2767. ;;
  2768. *)
  2769. test "$with_gnu_ld" != yes && break
  2770. ;;
  2771. esac
  2772. fi
  2773. done
  2774. IFS="$lt_save_ifs"
  2775. else
  2776. lt_cv_path_LD="$LD" # Let the user override the test with a path.
  2777. fi])
  2778. LD="$lt_cv_path_LD"
  2779. if test -n "$LD"; then
  2780. AC_MSG_RESULT($LD)
  2781. else
  2782. AC_MSG_RESULT(no)
  2783. fi
  2784. test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  2785. _LT_PATH_LD_GNU
  2786. AC_SUBST([LD])
  2787. _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
  2788. ])# LT_PATH_LD
  2789. # Old names:
  2790. AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
  2791. AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
  2792. dnl aclocal-1.4 backwards compatibility:
  2793. dnl AC_DEFUN([AM_PROG_LD], [])
  2794. dnl AC_DEFUN([AC_PROG_LD], [])
  2795. # _LT_PATH_LD_GNU
  2796. #- --------------
  2797. m4_defun([_LT_PATH_LD_GNU],
  2798. [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
  2799. [# I'd rather use --version here, but apparently some GNU lds only accept -v.
  2800. case `$LD -v 2>&1 </dev/null` in
  2801. *GNU* | *'with BFD'*)
  2802. lt_cv_prog_gnu_ld=yes
  2803. ;;
  2804. *)
  2805. lt_cv_prog_gnu_ld=no
  2806. ;;
  2807. esac])
  2808. with_gnu_ld=$lt_cv_prog_gnu_ld
  2809. ])# _LT_PATH_LD_GNU
  2810. # _LT_CMD_RELOAD
  2811. # --------------
  2812. # find reload flag for linker
  2813. # -- PORTME Some linkers may need a different reload flag.
  2814. m4_defun([_LT_CMD_RELOAD],
  2815. [AC_CACHE_CHECK([for $LD option to reload object files],
  2816. lt_cv_ld_reload_flag,
  2817. [lt_cv_ld_reload_flag='-r'])
  2818. reload_flag=$lt_cv_ld_reload_flag
  2819. case $reload_flag in
  2820. "" | " "*) ;;
  2821. *) reload_flag=" $reload_flag" ;;
  2822. esac
  2823. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  2824. case $host_os in
  2825. cygwin* | mingw* | pw32* | cegcc*)
  2826. if test "$GCC" != yes; then
  2827. reload_cmds=false
  2828. fi
  2829. ;;
  2830. darwin*)
  2831. if test "$GCC" = yes; then
  2832. reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
  2833. else
  2834. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  2835. fi
  2836. ;;
  2837. esac
  2838. _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
  2839. _LT_TAGDECL([], [reload_cmds], [2])dnl
  2840. ])# _LT_CMD_RELOAD
  2841. # _LT_CHECK_MAGIC_METHOD
  2842. # ----------------------
  2843. # how to check for library dependencies
  2844. # -- PORTME fill in with the dynamic library characteristics
  2845. m4_defun([_LT_CHECK_MAGIC_METHOD],
  2846. [m4_require([_LT_DECL_EGREP])
  2847. m4_require([_LT_DECL_OBJDUMP])
  2848. AC_CACHE_CHECK([how to recognize dependent libraries],
  2849. lt_cv_deplibs_check_method,
  2850. [lt_cv_file_magic_cmd='$MAGIC_CMD'
  2851. lt_cv_file_magic_test_file=
  2852. lt_cv_deplibs_check_method='unknown'
  2853. # Need to set the preceding variable on all platforms that support
  2854. # interlibrary dependencies.
  2855. # 'none' -- dependencies not supported.
  2856. # `unknown' -- same as none, but documents that we really don't know.
  2857. # 'pass_all' -- all dependencies passed with no checks.
  2858. # 'test_compile' -- check by making test program.
  2859. # 'file_magic [[regex]]' -- check by looking for files in library path
  2860. # which responds to the $file_magic_cmd with a given extended regex.
  2861. # If you have `file' or equivalent on your system and you're not sure
  2862. # whether `pass_all' will *always* work, you probably want this one.
  2863. case $host_os in
  2864. aix[[4-9]]*)
  2865. lt_cv_deplibs_check_method=pass_all
  2866. ;;
  2867. beos*)
  2868. lt_cv_deplibs_check_method=pass_all
  2869. ;;
  2870. bsdi[[45]]*)
  2871. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
  2872. lt_cv_file_magic_cmd='/usr/bin/file -L'
  2873. lt_cv_file_magic_test_file=/shlib/libc.so
  2874. ;;
  2875. cygwin*)
  2876. # func_win32_libid is a shell function defined in ltmain.sh
  2877. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  2878. lt_cv_file_magic_cmd='func_win32_libid'
  2879. ;;
  2880. mingw* | pw32*)
  2881. # Base MSYS/MinGW do not provide the 'file' command needed by
  2882. # func_win32_libid shell function, so use a weaker test based on 'objdump',
  2883. # unless we find 'file', for example because we are cross-compiling.
  2884. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
  2885. if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
  2886. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  2887. lt_cv_file_magic_cmd='func_win32_libid'
  2888. else
  2889. # Keep this pattern in sync with the one in func_win32_libid.
  2890. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
  2891. lt_cv_file_magic_cmd='$OBJDUMP -f'
  2892. fi
  2893. ;;
  2894. cegcc*)
  2895. # use the weaker test based on 'objdump'. See mingw*.
  2896. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
  2897. lt_cv_file_magic_cmd='$OBJDUMP -f'
  2898. ;;
  2899. darwin* | rhapsody*)
  2900. lt_cv_deplibs_check_method=pass_all
  2901. ;;
  2902. freebsd* | dragonfly*)
  2903. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  2904. case $host_cpu in
  2905. i*86 )
  2906. # Not sure whether the presence of OpenBSD here was a mistake.
  2907. # Let's accept both of them until this is cleared up.
  2908. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
  2909. lt_cv_file_magic_cmd=/usr/bin/file
  2910. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  2911. ;;
  2912. esac
  2913. else
  2914. lt_cv_deplibs_check_method=pass_all
  2915. fi
  2916. ;;
  2917. gnu*)
  2918. lt_cv_deplibs_check_method=pass_all
  2919. ;;
  2920. haiku*)
  2921. lt_cv_deplibs_check_method=pass_all
  2922. ;;
  2923. hpux10.20* | hpux11*)
  2924. lt_cv_file_magic_cmd=/usr/bin/file
  2925. case $host_cpu in
  2926. ia64*)
  2927. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
  2928. lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
  2929. ;;
  2930. hppa*64*)
  2931. [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]']
  2932. lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
  2933. ;;
  2934. *)
  2935. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
  2936. lt_cv_file_magic_test_file=/usr/lib/libc.sl
  2937. ;;
  2938. esac
  2939. ;;
  2940. interix[[3-9]]*)
  2941. # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
  2942. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
  2943. ;;
  2944. irix5* | irix6* | nonstopux*)
  2945. case $LD in
  2946. *-32|*"-32 ") libmagic=32-bit;;
  2947. *-n32|*"-n32 ") libmagic=N32;;
  2948. *-64|*"-64 ") libmagic=64-bit;;
  2949. *) libmagic=never-match;;
  2950. esac
  2951. lt_cv_deplibs_check_method=pass_all
  2952. ;;
  2953. # This must be glibc/ELF.
  2954. linux* | k*bsd*-gnu | kopensolaris*-gnu)
  2955. lt_cv_deplibs_check_method=pass_all
  2956. ;;
  2957. netbsd*)
  2958. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  2959. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  2960. else
  2961. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
  2962. fi
  2963. ;;
  2964. newos6*)
  2965. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
  2966. lt_cv_file_magic_cmd=/usr/bin/file
  2967. lt_cv_file_magic_test_file=/usr/lib/libnls.so
  2968. ;;
  2969. *nto* | *qnx*)
  2970. lt_cv_deplibs_check_method=pass_all
  2971. ;;
  2972. openbsd*)
  2973. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  2974. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
  2975. else
  2976. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  2977. fi
  2978. ;;
  2979. osf3* | osf4* | osf5*)
  2980. lt_cv_deplibs_check_method=pass_all
  2981. ;;
  2982. rdos*)
  2983. lt_cv_deplibs_check_method=pass_all
  2984. ;;
  2985. solaris*)
  2986. lt_cv_deplibs_check_method=pass_all
  2987. ;;
  2988. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  2989. lt_cv_deplibs_check_method=pass_all
  2990. ;;
  2991. sysv4 | sysv4.3*)
  2992. case $host_vendor in
  2993. motorola)
  2994. 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]]'
  2995. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  2996. ;;
  2997. ncr)
  2998. lt_cv_deplibs_check_method=pass_all
  2999. ;;
  3000. sequent)
  3001. lt_cv_file_magic_cmd='/bin/file'
  3002. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
  3003. ;;
  3004. sni)
  3005. lt_cv_file_magic_cmd='/bin/file'
  3006. lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
  3007. lt_cv_file_magic_test_file=/lib/libc.so
  3008. ;;
  3009. siemens)
  3010. lt_cv_deplibs_check_method=pass_all
  3011. ;;
  3012. pc)
  3013. lt_cv_deplibs_check_method=pass_all
  3014. ;;
  3015. esac
  3016. ;;
  3017. tpf*)
  3018. lt_cv_deplibs_check_method=pass_all
  3019. ;;
  3020. esac
  3021. ])
  3022. file_magic_glob=
  3023. want_nocaseglob=no
  3024. if test "$build" = "$host"; then
  3025. case $host_os in
  3026. mingw* | pw32*)
  3027. if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
  3028. want_nocaseglob=yes
  3029. else
  3030. file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
  3031. fi
  3032. ;;
  3033. esac
  3034. fi
  3035. file_magic_cmd=$lt_cv_file_magic_cmd
  3036. deplibs_check_method=$lt_cv_deplibs_check_method
  3037. test -z "$deplibs_check_method" && deplibs_check_method=unknown
  3038. _LT_DECL([], [deplibs_check_method], [1],
  3039. [Method to check whether dependent libraries are shared objects])
  3040. _LT_DECL([], [file_magic_cmd], [1],
  3041. [Command to use when deplibs_check_method = "file_magic"])
  3042. _LT_DECL([], [file_magic_glob], [1],
  3043. [How to find potential files when deplibs_check_method = "file_magic"])
  3044. _LT_DECL([], [want_nocaseglob], [1],
  3045. [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
  3046. ])# _LT_CHECK_MAGIC_METHOD
  3047. # LT_PATH_NM
  3048. # ----------
  3049. # find the pathname to a BSD- or MS-compatible name lister
  3050. AC_DEFUN([LT_PATH_NM],
  3051. [AC_REQUIRE([AC_PROG_CC])dnl
  3052. AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
  3053. [if test -n "$NM"; then
  3054. # Let the user override the test.
  3055. lt_cv_path_NM="$NM"
  3056. else
  3057. lt_nm_to_check="${ac_tool_prefix}nm"
  3058. if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
  3059. lt_nm_to_check="$lt_nm_to_check nm"
  3060. fi
  3061. for lt_tmp_nm in $lt_nm_to_check; do
  3062. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  3063. for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
  3064. IFS="$lt_save_ifs"
  3065. test -z "$ac_dir" && ac_dir=.
  3066. tmp_nm="$ac_dir/$lt_tmp_nm"
  3067. if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
  3068. # Check to see if the nm accepts a BSD-compat flag.
  3069. # Adding the `sed 1q' prevents false positives on HP-UX, which says:
  3070. # nm: unknown option "B" ignored
  3071. # Tru64's nm complains that /dev/null is an invalid object file
  3072. case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
  3073. */dev/null* | *'Invalid file or object type'*)
  3074. lt_cv_path_NM="$tmp_nm -B"
  3075. break
  3076. ;;
  3077. *)
  3078. case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
  3079. */dev/null*)
  3080. lt_cv_path_NM="$tmp_nm -p"
  3081. break
  3082. ;;
  3083. *)
  3084. lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
  3085. continue # so that we can try to find one that supports BSD flags
  3086. ;;
  3087. esac
  3088. ;;
  3089. esac
  3090. fi
  3091. done
  3092. IFS="$lt_save_ifs"
  3093. done
  3094. : ${lt_cv_path_NM=no}
  3095. fi])
  3096. if test "$lt_cv_path_NM" != "no"; then
  3097. NM="$lt_cv_path_NM"
  3098. else
  3099. # Didn't find any BSD compatible name lister, look for dumpbin.
  3100. if test -n "$DUMPBIN"; then :
  3101. # Let the user override the test.
  3102. else
  3103. AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
  3104. case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
  3105. *COFF*)
  3106. DUMPBIN="$DUMPBIN -symbols"
  3107. ;;
  3108. *)
  3109. DUMPBIN=:
  3110. ;;
  3111. esac
  3112. fi
  3113. AC_SUBST([DUMPBIN])
  3114. if test "$DUMPBIN" != ":"; then
  3115. NM="$DUMPBIN"
  3116. fi
  3117. fi
  3118. test -z "$NM" && NM=nm
  3119. AC_SUBST([NM])
  3120. _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
  3121. AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
  3122. [lt_cv_nm_interface="BSD nm"
  3123. echo "int some_variable = 0;" > conftest.$ac_ext
  3124. (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
  3125. (eval "$ac_compile" 2>conftest.err)
  3126. cat conftest.err >&AS_MESSAGE_LOG_FD
  3127. (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
  3128. (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
  3129. cat conftest.err >&AS_MESSAGE_LOG_FD
  3130. (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
  3131. cat conftest.out >&AS_MESSAGE_LOG_FD
  3132. if $GREP 'External.*some_variable' conftest.out > /dev/null; then
  3133. lt_cv_nm_interface="MS dumpbin"
  3134. fi
  3135. rm -f conftest*])
  3136. ])# LT_PATH_NM
  3137. # Old names:
  3138. AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
  3139. AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
  3140. dnl aclocal-1.4 backwards compatibility:
  3141. dnl AC_DEFUN([AM_PROG_NM], [])
  3142. dnl AC_DEFUN([AC_PROG_NM], [])
  3143. # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  3144. # --------------------------------
  3145. # how to determine the name of the shared library
  3146. # associated with a specific link library.
  3147. # -- PORTME fill in with the dynamic library characteristics
  3148. m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
  3149. [m4_require([_LT_DECL_EGREP])
  3150. m4_require([_LT_DECL_OBJDUMP])
  3151. m4_require([_LT_DECL_DLLTOOL])
  3152. AC_CACHE_CHECK([how to associate runtime and link libraries],
  3153. lt_cv_sharedlib_from_linklib_cmd,
  3154. [lt_cv_sharedlib_from_linklib_cmd='unknown'
  3155. case $host_os in
  3156. cygwin* | mingw* | pw32* | cegcc*)
  3157. # two different shell functions defined in ltmain.sh
  3158. # decide which to use based on capabilities of $DLLTOOL
  3159. case `$DLLTOOL --help 2>&1` in
  3160. *--identify-strict*)
  3161. lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
  3162. ;;
  3163. *)
  3164. lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
  3165. ;;
  3166. esac
  3167. ;;
  3168. *)
  3169. # fallback: assume linklib IS sharedlib
  3170. lt_cv_sharedlib_from_linklib_cmd="$ECHO"
  3171. ;;
  3172. esac
  3173. ])
  3174. sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
  3175. test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
  3176. _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
  3177. [Command to associate shared and link libraries])
  3178. ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  3179. # _LT_PATH_MANIFEST_TOOL
  3180. # ----------------------
  3181. # locate the manifest tool
  3182. m4_defun([_LT_PATH_MANIFEST_TOOL],
  3183. [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
  3184. test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
  3185. AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
  3186. [lt_cv_path_mainfest_tool=no
  3187. echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
  3188. $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
  3189. cat conftest.err >&AS_MESSAGE_LOG_FD
  3190. if $GREP 'Manifest Tool' conftest.out > /dev/null; then
  3191. lt_cv_path_mainfest_tool=yes
  3192. fi
  3193. rm -f conftest*])
  3194. if test "x$lt_cv_path_mainfest_tool" != xyes; then
  3195. MANIFEST_TOOL=:
  3196. fi
  3197. _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
  3198. ])# _LT_PATH_MANIFEST_TOOL
  3199. # LT_LIB_M
  3200. # --------
  3201. # check for math library
  3202. AC_DEFUN([LT_LIB_M],
  3203. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3204. LIBM=
  3205. case $host in
  3206. *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
  3207. # These system don't have libm, or don't need it
  3208. ;;
  3209. *-ncr-sysv4.3*)
  3210. AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
  3211. AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
  3212. ;;
  3213. *)
  3214. AC_CHECK_LIB(m, cos, LIBM="-lm")
  3215. ;;
  3216. esac
  3217. AC_SUBST([LIBM])
  3218. ])# LT_LIB_M
  3219. # Old name:
  3220. AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
  3221. dnl aclocal-1.4 backwards compatibility:
  3222. dnl AC_DEFUN([AC_CHECK_LIBM], [])
  3223. # _LT_COMPILER_NO_RTTI([TAGNAME])
  3224. # -------------------------------
  3225. m4_defun([_LT_COMPILER_NO_RTTI],
  3226. [m4_require([_LT_TAG_COMPILER])dnl
  3227. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  3228. if test "$GCC" = yes; then
  3229. case $cc_basename in
  3230. nvcc*)
  3231. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
  3232. *)
  3233. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
  3234. esac
  3235. _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
  3236. lt_cv_prog_compiler_rtti_exceptions,
  3237. [-fno-rtti -fno-exceptions], [],
  3238. [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
  3239. fi
  3240. _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
  3241. [Compiler flag to turn off builtin functions])
  3242. ])# _LT_COMPILER_NO_RTTI
  3243. # _LT_CMD_GLOBAL_SYMBOLS
  3244. # ----------------------
  3245. m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
  3246. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3247. AC_REQUIRE([AC_PROG_CC])dnl
  3248. AC_REQUIRE([AC_PROG_AWK])dnl
  3249. AC_REQUIRE([LT_PATH_NM])dnl
  3250. AC_REQUIRE([LT_PATH_LD])dnl
  3251. m4_require([_LT_DECL_SED])dnl
  3252. m4_require([_LT_DECL_EGREP])dnl
  3253. m4_require([_LT_TAG_COMPILER])dnl
  3254. # Check for command to grab the raw symbol name followed by C symbol from nm.
  3255. AC_MSG_CHECKING([command to parse $NM output from $compiler object])
  3256. AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
  3257. [
  3258. # These are sane defaults that work on at least a few old systems.
  3259. # [They come from Ultrix. What could be older than Ultrix?!! ;)]
  3260. # Character class describing NM global symbol codes.
  3261. symcode='[[BCDEGRST]]'
  3262. # Regexp to match symbols that can be accessed directly from C.
  3263. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
  3264. # Define system-specific variables.
  3265. case $host_os in
  3266. aix*)
  3267. symcode='[[BCDT]]'
  3268. ;;
  3269. cygwin* | mingw* | pw32* | cegcc*)
  3270. symcode='[[ABCDGISTW]]'
  3271. ;;
  3272. hpux*)
  3273. if test "$host_cpu" = ia64; then
  3274. symcode='[[ABCDEGRST]]'
  3275. fi
  3276. ;;
  3277. irix* | nonstopux*)
  3278. symcode='[[BCDEGRST]]'
  3279. ;;
  3280. osf*)
  3281. symcode='[[BCDEGQRST]]'
  3282. ;;
  3283. solaris*)
  3284. symcode='[[BDRT]]'
  3285. ;;
  3286. sco3.2v5*)
  3287. symcode='[[DT]]'
  3288. ;;
  3289. sysv4.2uw2*)
  3290. symcode='[[DT]]'
  3291. ;;
  3292. sysv5* | sco5v6* | unixware* | OpenUNIX*)
  3293. symcode='[[ABDT]]'
  3294. ;;
  3295. sysv4)
  3296. symcode='[[DFNSTU]]'
  3297. ;;
  3298. esac
  3299. # If we're using GNU nm, then use its standard symbol codes.
  3300. case `$NM -V 2>&1` in
  3301. *GNU* | *'with BFD'*)
  3302. symcode='[[ABCDGIRSTW]]' ;;
  3303. esac
  3304. # Transform an extracted symbol line into a proper C declaration.
  3305. # Some systems (esp. on ia64) link data and code symbols differently,
  3306. # so use this general approach.
  3307. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  3308. # Transform an extracted symbol line into symbol name and symbol address
  3309. lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
  3310. 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'"
  3311. # Handle CRLF in mingw tool chain
  3312. opt_cr=
  3313. case $build_os in
  3314. mingw*)
  3315. opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  3316. ;;
  3317. esac
  3318. # Try without a prefix underscore, then with it.
  3319. for ac_symprfx in "" "_"; do
  3320. # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
  3321. symxfrm="\\1 $ac_symprfx\\2 \\2"
  3322. # Write the raw and C identifiers.
  3323. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3324. # Fake it for dumpbin and say T for any non-static function
  3325. # and D for any global variable.
  3326. # Also find C++ and __fastcall symbols from MSVC++,
  3327. # which start with @ or ?.
  3328. lt_cv_sys_global_symbol_pipe="$AWK ['"\
  3329. " {last_section=section; section=\$ 3};"\
  3330. " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
  3331. " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
  3332. " \$ 0!~/External *\|/{next};"\
  3333. " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
  3334. " {if(hide[section]) next};"\
  3335. " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
  3336. " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
  3337. " s[1]~/^[@?]/{print s[1], s[1]; next};"\
  3338. " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
  3339. " ' prfx=^$ac_symprfx]"
  3340. else
  3341. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
  3342. fi
  3343. lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
  3344. # Check to see that the pipe works correctly.
  3345. pipe_works=no
  3346. rm -f conftest*
  3347. cat > conftest.$ac_ext <<_LT_EOF
  3348. #ifdef __cplusplus
  3349. extern "C" {
  3350. #endif
  3351. char nm_test_var;
  3352. void nm_test_func(void);
  3353. void nm_test_func(void){}
  3354. #ifdef __cplusplus
  3355. }
  3356. #endif
  3357. int main(){nm_test_var='a';nm_test_func();return(0);}
  3358. _LT_EOF
  3359. if AC_TRY_EVAL(ac_compile); then
  3360. # Now try to grab the symbols.
  3361. nlist=conftest.nm
  3362. if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
  3363. # Try sorting and uniquifying the output.
  3364. if sort "$nlist" | uniq > "$nlist"T; then
  3365. mv -f "$nlist"T "$nlist"
  3366. else
  3367. rm -f "$nlist"T
  3368. fi
  3369. # Make sure that we snagged all the symbols we need.
  3370. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
  3371. if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
  3372. cat <<_LT_EOF > conftest.$ac_ext
  3373. /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
  3374. #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
  3375. /* DATA imports from DLLs on WIN32 con't be const, because runtime
  3376. relocations are performed -- see ld's documentation on pseudo-relocs. */
  3377. # define LT@&t@_DLSYM_CONST
  3378. #elif defined(__osf__)
  3379. /* This system does not cope well with relocations in const data. */
  3380. # define LT@&t@_DLSYM_CONST
  3381. #else
  3382. # define LT@&t@_DLSYM_CONST const
  3383. #endif
  3384. #ifdef __cplusplus
  3385. extern "C" {
  3386. #endif
  3387. _LT_EOF
  3388. # Now generate the symbol file.
  3389. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
  3390. cat <<_LT_EOF >> conftest.$ac_ext
  3391. /* The mapping between symbol names and symbols. */
  3392. LT@&t@_DLSYM_CONST struct {
  3393. const char *name;
  3394. void *address;
  3395. }
  3396. lt__PROGRAM__LTX_preloaded_symbols[[]] =
  3397. {
  3398. { "@PROGRAM@", (void *) 0 },
  3399. _LT_EOF
  3400. $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
  3401. cat <<\_LT_EOF >> conftest.$ac_ext
  3402. {0, (void *) 0}
  3403. };
  3404. /* This works around a problem in FreeBSD linker */
  3405. #ifdef FREEBSD_WORKAROUND
  3406. static const void *lt_preloaded_setup() {
  3407. return lt__PROGRAM__LTX_preloaded_symbols;
  3408. }
  3409. #endif
  3410. #ifdef __cplusplus
  3411. }
  3412. #endif
  3413. _LT_EOF
  3414. # Now try linking the two files.
  3415. mv conftest.$ac_objext conftstm.$ac_objext
  3416. lt_globsym_save_LIBS=$LIBS
  3417. lt_globsym_save_CFLAGS=$CFLAGS
  3418. LIBS="conftstm.$ac_objext"
  3419. CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
  3420. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
  3421. pipe_works=yes
  3422. fi
  3423. LIBS=$lt_globsym_save_LIBS
  3424. CFLAGS=$lt_globsym_save_CFLAGS
  3425. else
  3426. echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
  3427. fi
  3428. else
  3429. echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
  3430. fi
  3431. else
  3432. echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
  3433. fi
  3434. else
  3435. echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
  3436. cat conftest.$ac_ext >&5
  3437. fi
  3438. rm -rf conftest* conftst*
  3439. # Do not use the global_symbol_pipe unless it works.
  3440. if test "$pipe_works" = yes; then
  3441. break
  3442. else
  3443. lt_cv_sys_global_symbol_pipe=
  3444. fi
  3445. done
  3446. ])
  3447. if test -z "$lt_cv_sys_global_symbol_pipe"; then
  3448. lt_cv_sys_global_symbol_to_cdecl=
  3449. fi
  3450. if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
  3451. AC_MSG_RESULT(failed)
  3452. else
  3453. AC_MSG_RESULT(ok)
  3454. fi
  3455. # Response file support.
  3456. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3457. nm_file_list_spec='@'
  3458. elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
  3459. nm_file_list_spec='@'
  3460. fi
  3461. _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
  3462. [Take the output of nm and produce a listing of raw symbols and C names])
  3463. _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
  3464. [Transform the output of nm in a proper C declaration])
  3465. _LT_DECL([global_symbol_to_c_name_address],
  3466. [lt_cv_sys_global_symbol_to_c_name_address], [1],
  3467. [Transform the output of nm in a C name address pair])
  3468. _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
  3469. [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
  3470. [Transform the output of nm in a C name address pair when lib prefix is needed])
  3471. _LT_DECL([], [nm_file_list_spec], [1],
  3472. [Specify filename containing input files for $NM])
  3473. ]) # _LT_CMD_GLOBAL_SYMBOLS
  3474. # _LT_COMPILER_PIC([TAGNAME])
  3475. # ---------------------------
  3476. m4_defun([_LT_COMPILER_PIC],
  3477. [m4_require([_LT_TAG_COMPILER])dnl
  3478. _LT_TAGVAR(lt_prog_compiler_wl, $1)=
  3479. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3480. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3481. m4_if([$1], [CXX], [
  3482. # C++ specific cases for pic, static, wl, etc.
  3483. if test "$GXX" = yes; then
  3484. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3485. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3486. case $host_os in
  3487. aix*)
  3488. # All AIX code is PIC.
  3489. if test "$host_cpu" = ia64; then
  3490. # AIX 5 now supports IA64 processor
  3491. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3492. fi
  3493. ;;
  3494. amigaos*)
  3495. case $host_cpu in
  3496. powerpc)
  3497. # see comment about AmigaOS4 .so support
  3498. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3499. ;;
  3500. m68k)
  3501. # FIXME: we need at least 68020 code to build shared libraries, but
  3502. # adding the `-m68020' flag to GCC prevents building anything better,
  3503. # like `-m68040'.
  3504. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  3505. ;;
  3506. esac
  3507. ;;
  3508. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  3509. # PIC is the default for these OSes.
  3510. ;;
  3511. mingw* | cygwin* | os2* | pw32* | cegcc*)
  3512. # This hack is so that the source file can tell whether it is being
  3513. # built for inclusion in a dll (and should export symbols for example).
  3514. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  3515. # (--disable-auto-import) libraries
  3516. m4_if([$1], [GCJ], [],
  3517. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3518. ;;
  3519. darwin* | rhapsody*)
  3520. # PIC is the default on this platform
  3521. # Common symbols not allowed in MH_DYLIB files
  3522. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  3523. ;;
  3524. *djgpp*)
  3525. # DJGPP does not support shared libraries at all
  3526. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3527. ;;
  3528. haiku*)
  3529. # PIC is the default for Haiku.
  3530. # The "-static" flag exists, but is broken.
  3531. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3532. ;;
  3533. interix[[3-9]]*)
  3534. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  3535. # Instead, we relocate shared libraries at runtime.
  3536. ;;
  3537. sysv4*MP*)
  3538. if test -d /usr/nec; then
  3539. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  3540. fi
  3541. ;;
  3542. hpux*)
  3543. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  3544. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  3545. # sets the default TLS model and affects inlining.
  3546. case $host_cpu in
  3547. hppa*64*)
  3548. ;;
  3549. *)
  3550. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3551. ;;
  3552. esac
  3553. ;;
  3554. *qnx* | *nto*)
  3555. # QNX uses GNU C++, but need to define -shared option too, otherwise
  3556. # it will coredump.
  3557. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  3558. ;;
  3559. *)
  3560. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3561. ;;
  3562. esac
  3563. else
  3564. case $host_os in
  3565. aix[[4-9]]*)
  3566. # All AIX code is PIC.
  3567. if test "$host_cpu" = ia64; then
  3568. # AIX 5 now supports IA64 processor
  3569. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3570. else
  3571. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  3572. fi
  3573. ;;
  3574. chorus*)
  3575. case $cc_basename in
  3576. cxch68*)
  3577. # Green Hills C++ Compiler
  3578. # _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"
  3579. ;;
  3580. esac
  3581. ;;
  3582. mingw* | cygwin* | os2* | pw32* | cegcc*)
  3583. # This hack is so that the source file can tell whether it is being
  3584. # built for inclusion in a dll (and should export symbols for example).
  3585. m4_if([$1], [GCJ], [],
  3586. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3587. ;;
  3588. dgux*)
  3589. case $cc_basename in
  3590. ec++*)
  3591. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3592. ;;
  3593. ghcx*)
  3594. # Green Hills C++ Compiler
  3595. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3596. ;;
  3597. *)
  3598. ;;
  3599. esac
  3600. ;;
  3601. freebsd* | dragonfly*)
  3602. # FreeBSD uses GNU C++
  3603. ;;
  3604. hpux9* | hpux10* | hpux11*)
  3605. case $cc_basename in
  3606. CC*)
  3607. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3608. _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  3609. if test "$host_cpu" != ia64; then
  3610. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  3611. fi
  3612. ;;
  3613. aCC*)
  3614. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3615. _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  3616. case $host_cpu in
  3617. hppa*64*|ia64*)
  3618. # +Z the default
  3619. ;;
  3620. *)
  3621. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  3622. ;;
  3623. esac
  3624. ;;
  3625. *)
  3626. ;;
  3627. esac
  3628. ;;
  3629. interix*)
  3630. # This is c89, which is MS Visual C++ (no shared libs)
  3631. # Anyone wants to do a port?
  3632. ;;
  3633. irix5* | irix6* | nonstopux*)
  3634. case $cc_basename in
  3635. CC*)
  3636. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3637. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3638. # CC pic flag -KPIC is the default.
  3639. ;;
  3640. *)
  3641. ;;
  3642. esac
  3643. ;;
  3644. linux* | k*bsd*-gnu | kopensolaris*-gnu)
  3645. case $cc_basename in
  3646. KCC*)
  3647. # KAI C++ Compiler
  3648. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  3649. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3650. ;;
  3651. ecpc* )
  3652. # old Intel C++ for x86_64 which still supported -KPIC.
  3653. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3654. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3655. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3656. ;;
  3657. icpc* )
  3658. # Intel C++, used to be incompatible with GCC.
  3659. # ICC 10 doesn't accept -KPIC any more.
  3660. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3661. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3662. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3663. ;;
  3664. pgCC* | pgcpp*)
  3665. # Portland Group C++ compiler
  3666. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3667. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  3668. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3669. ;;
  3670. cxx*)
  3671. # Compaq C++
  3672. # Make sure the PIC flag is empty. It appears that all Alpha
  3673. # Linux and Compaq Tru64 Unix objects are PIC.
  3674. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3675. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3676. ;;
  3677. xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
  3678. # IBM XL 8.0, 9.0 on PPC and BlueGene
  3679. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3680. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  3681. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  3682. ;;
  3683. *)
  3684. case `$CC -V 2>&1 | sed 5q` in
  3685. *Sun\ C*)
  3686. # Sun C++ 5.9
  3687. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3688. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3689. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  3690. ;;
  3691. esac
  3692. ;;
  3693. esac
  3694. ;;
  3695. lynxos*)
  3696. ;;
  3697. m88k*)
  3698. ;;
  3699. mvs*)
  3700. case $cc_basename in
  3701. cxx*)
  3702. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
  3703. ;;
  3704. *)
  3705. ;;
  3706. esac
  3707. ;;
  3708. netbsd*)
  3709. ;;
  3710. *qnx* | *nto*)
  3711. # QNX uses GNU C++, but need to define -shared option too, otherwise
  3712. # it will coredump.
  3713. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  3714. ;;
  3715. osf3* | osf4* | osf5*)
  3716. case $cc_basename in
  3717. KCC*)
  3718. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  3719. ;;
  3720. RCC*)
  3721. # Rational C++ 2.4.1
  3722. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3723. ;;
  3724. cxx*)
  3725. # Digital/Compaq C++
  3726. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3727. # Make sure the PIC flag is empty. It appears that all Alpha
  3728. # Linux and Compaq Tru64 Unix objects are PIC.
  3729. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3730. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3731. ;;
  3732. *)
  3733. ;;
  3734. esac
  3735. ;;
  3736. psos*)
  3737. ;;
  3738. solaris*)
  3739. case $cc_basename in
  3740. CC* | sunCC*)
  3741. # Sun C++ 4.2, 5.x and Centerline C++
  3742. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3743. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3744. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  3745. ;;
  3746. gcx*)
  3747. # Green Hills C++ Compiler
  3748. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  3749. ;;
  3750. *)
  3751. ;;
  3752. esac
  3753. ;;
  3754. sunos4*)
  3755. case $cc_basename in
  3756. CC*)
  3757. # Sun C++ 4.x
  3758. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3759. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3760. ;;
  3761. lcc*)
  3762. # Lucid
  3763. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3764. ;;
  3765. *)
  3766. ;;
  3767. esac
  3768. ;;
  3769. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  3770. case $cc_basename in
  3771. CC*)
  3772. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3773. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3774. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3775. ;;
  3776. esac
  3777. ;;
  3778. tandem*)
  3779. case $cc_basename in
  3780. NCC*)
  3781. # NonStop-UX NCC 3.20
  3782. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3783. ;;
  3784. *)
  3785. ;;
  3786. esac
  3787. ;;
  3788. vxworks*)
  3789. ;;
  3790. *)
  3791. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  3792. ;;
  3793. esac
  3794. fi
  3795. ],
  3796. [
  3797. if test "$GCC" = yes; then
  3798. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3799. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3800. case $host_os in
  3801. aix*)
  3802. # All AIX code is PIC.
  3803. if test "$host_cpu" = ia64; then
  3804. # AIX 5 now supports IA64 processor
  3805. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3806. fi
  3807. ;;
  3808. amigaos*)
  3809. case $host_cpu in
  3810. powerpc)
  3811. # see comment about AmigaOS4 .so support
  3812. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3813. ;;
  3814. m68k)
  3815. # FIXME: we need at least 68020 code to build shared libraries, but
  3816. # adding the `-m68020' flag to GCC prevents building anything better,
  3817. # like `-m68040'.
  3818. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  3819. ;;
  3820. esac
  3821. ;;
  3822. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  3823. # PIC is the default for these OSes.
  3824. ;;
  3825. mingw* | cygwin* | pw32* | os2* | cegcc*)
  3826. # This hack is so that the source file can tell whether it is being
  3827. # built for inclusion in a dll (and should export symbols for example).
  3828. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  3829. # (--disable-auto-import) libraries
  3830. m4_if([$1], [GCJ], [],
  3831. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3832. ;;
  3833. darwin* | rhapsody*)
  3834. # PIC is the default on this platform
  3835. # Common symbols not allowed in MH_DYLIB files
  3836. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  3837. ;;
  3838. haiku*)
  3839. # PIC is the default for Haiku.
  3840. # The "-static" flag exists, but is broken.
  3841. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3842. ;;
  3843. hpux*)
  3844. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  3845. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  3846. # sets the default TLS model and affects inlining.
  3847. case $host_cpu in
  3848. hppa*64*)
  3849. # +Z the default
  3850. ;;
  3851. *)
  3852. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3853. ;;
  3854. esac
  3855. ;;
  3856. interix[[3-9]]*)
  3857. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  3858. # Instead, we relocate shared libraries at runtime.
  3859. ;;
  3860. msdosdjgpp*)
  3861. # Just because we use GCC doesn't mean we suddenly get shared libraries
  3862. # on systems that don't support them.
  3863. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  3864. enable_shared=no
  3865. ;;
  3866. *nto* | *qnx*)
  3867. # QNX uses GNU C++, but need to define -shared option too, otherwise
  3868. # it will coredump.
  3869. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  3870. ;;
  3871. sysv4*MP*)
  3872. if test -d /usr/nec; then
  3873. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  3874. fi
  3875. ;;
  3876. *)
  3877. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3878. ;;
  3879. esac
  3880. case $cc_basename in
  3881. nvcc*) # Cuda Compiler Driver 2.2
  3882. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
  3883. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  3884. _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
  3885. fi
  3886. ;;
  3887. esac
  3888. else
  3889. # PORTME Check for flag to pass linker flags through the system compiler.
  3890. case $host_os in
  3891. aix*)
  3892. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3893. if test "$host_cpu" = ia64; then
  3894. # AIX 5 now supports IA64 processor
  3895. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3896. else
  3897. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  3898. fi
  3899. ;;
  3900. mingw* | cygwin* | pw32* | os2* | cegcc*)
  3901. # This hack is so that the source file can tell whether it is being
  3902. # built for inclusion in a dll (and should export symbols for example).
  3903. m4_if([$1], [GCJ], [],
  3904. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3905. ;;
  3906. hpux9* | hpux10* | hpux11*)
  3907. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3908. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  3909. # not for PA HP-UX.
  3910. case $host_cpu in
  3911. hppa*64*|ia64*)
  3912. # +Z the default
  3913. ;;
  3914. *)
  3915. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  3916. ;;
  3917. esac
  3918. # Is there a better lt_prog_compiler_static that works with the bundled CC?
  3919. _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  3920. ;;
  3921. irix5* | irix6* | nonstopux*)
  3922. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3923. # PIC (with -KPIC) is the default.
  3924. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3925. ;;
  3926. linux* | k*bsd*-gnu | kopensolaris*-gnu)
  3927. case $cc_basename in
  3928. # old Intel for x86_64 which still supported -KPIC.
  3929. ecc*)
  3930. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3931. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3932. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3933. ;;
  3934. # icc used to be incompatible with GCC.
  3935. # ICC 10 doesn't accept -KPIC any more.
  3936. icc* | ifort*)
  3937. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3938. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3939. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3940. ;;
  3941. # Lahey Fortran 8.1.
  3942. lf95*)
  3943. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3944. _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
  3945. _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
  3946. ;;
  3947. nagfor*)
  3948. # NAG Fortran compiler
  3949. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
  3950. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  3951. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3952. ;;
  3953. pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
  3954. # Portland Group compilers (*not* the Pentium gcc compiler,
  3955. # which looks to be a dead project)
  3956. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3957. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  3958. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3959. ;;
  3960. ccc*)
  3961. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3962. # All Alpha code is PIC.
  3963. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3964. ;;
  3965. xl* | bgxl* | bgf* | mpixl*)
  3966. # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
  3967. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3968. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  3969. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  3970. ;;
  3971. *)
  3972. case `$CC -V 2>&1 | sed 5q` in
  3973. *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
  3974. # Sun Fortran 8.3 passes all unrecognized flags to the linker
  3975. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3976. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3977. _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
  3978. ;;
  3979. *Sun\ F* | *Sun*Fortran*)
  3980. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3981. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3982. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  3983. ;;
  3984. *Sun\ C*)
  3985. # Sun C 5.9
  3986. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3987. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3988. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3989. ;;
  3990. *Intel*\ [[CF]]*Compiler*)
  3991. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3992. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3993. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3994. ;;
  3995. *Portland\ Group*)
  3996. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3997. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  3998. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3999. ;;
  4000. esac
  4001. ;;
  4002. esac
  4003. ;;
  4004. newsos6)
  4005. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4006. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4007. ;;
  4008. *nto* | *qnx*)
  4009. # QNX uses GNU C++, but need to define -shared option too, otherwise
  4010. # it will coredump.
  4011. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4012. ;;
  4013. osf3* | osf4* | osf5*)
  4014. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4015. # All OSF/1 code is PIC.
  4016. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4017. ;;
  4018. rdos*)
  4019. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4020. ;;
  4021. solaris*)
  4022. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4023. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4024. case $cc_basename in
  4025. f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
  4026. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
  4027. *)
  4028. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
  4029. esac
  4030. ;;
  4031. sunos4*)
  4032. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4033. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4034. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4035. ;;
  4036. sysv4 | sysv4.2uw2* | sysv4.3*)
  4037. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4038. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4039. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4040. ;;
  4041. sysv4*MP*)
  4042. if test -d /usr/nec ;then
  4043. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
  4044. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4045. fi
  4046. ;;
  4047. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  4048. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4049. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4050. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4051. ;;
  4052. unicos*)
  4053. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4054. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4055. ;;
  4056. uts4*)
  4057. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4058. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4059. ;;
  4060. *)
  4061. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4062. ;;
  4063. esac
  4064. fi
  4065. ])
  4066. case $host_os in
  4067. # For platforms which do not support PIC, -DPIC is meaningless:
  4068. *djgpp*)
  4069. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4070. ;;
  4071. *)
  4072. _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
  4073. ;;
  4074. esac
  4075. AC_CACHE_CHECK([for $compiler option to produce PIC],
  4076. [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
  4077. [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
  4078. _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
  4079. #
  4080. # Check to make sure the PIC flag actually works.
  4081. #
  4082. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  4083. _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
  4084. [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
  4085. [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
  4086. [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
  4087. "" | " "*) ;;
  4088. *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
  4089. esac],
  4090. [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4091. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
  4092. fi
  4093. _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
  4094. [Additional compiler flags for building library objects])
  4095. _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
  4096. [How to pass a linker flag through the compiler])
  4097. #
  4098. # Check to make sure the static flag actually works.
  4099. #
  4100. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
  4101. _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
  4102. _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
  4103. $lt_tmp_static_flag,
  4104. [],
  4105. [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
  4106. _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
  4107. [Compiler flag to prevent dynamic linking])
  4108. ])# _LT_COMPILER_PIC
  4109. # _LT_LINKER_SHLIBS([TAGNAME])
  4110. # ----------------------------
  4111. # See if the linker supports building shared libraries.
  4112. m4_defun([_LT_LINKER_SHLIBS],
  4113. [AC_REQUIRE([LT_PATH_LD])dnl
  4114. AC_REQUIRE([LT_PATH_NM])dnl
  4115. m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  4116. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  4117. m4_require([_LT_DECL_EGREP])dnl
  4118. m4_require([_LT_DECL_SED])dnl
  4119. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  4120. m4_require([_LT_TAG_COMPILER])dnl
  4121. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  4122. m4_if([$1], [CXX], [
  4123. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4124. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  4125. case $host_os in
  4126. aix[[4-9]]*)
  4127. # If we're using GNU nm, then we don't want the "-C" option.
  4128. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  4129. # Also, AIX nm treats weak defined symbols like other global defined
  4130. # symbols, whereas GNU nm marks them as "W".
  4131. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  4132. _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'
  4133. else
  4134. _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'
  4135. fi
  4136. ;;
  4137. pw32*)
  4138. _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
  4139. ;;
  4140. cygwin* | mingw* | cegcc*)
  4141. case $cc_basename in
  4142. cl*)
  4143. _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  4144. ;;
  4145. *)
  4146. _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'
  4147. _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  4148. ;;
  4149. esac
  4150. ;;
  4151. *)
  4152. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4153. ;;
  4154. esac
  4155. ], [
  4156. runpath_var=
  4157. _LT_TAGVAR(allow_undefined_flag, $1)=
  4158. _LT_TAGVAR(always_export_symbols, $1)=no
  4159. _LT_TAGVAR(archive_cmds, $1)=
  4160. _LT_TAGVAR(archive_expsym_cmds, $1)=
  4161. _LT_TAGVAR(compiler_needs_object, $1)=no
  4162. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  4163. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  4164. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4165. _LT_TAGVAR(hardcode_automatic, $1)=no
  4166. _LT_TAGVAR(hardcode_direct, $1)=no
  4167. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  4168. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4169. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  4170. _LT_TAGVAR(hardcode_minus_L, $1)=no
  4171. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  4172. _LT_TAGVAR(inherit_rpath, $1)=no
  4173. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  4174. _LT_TAGVAR(module_cmds, $1)=
  4175. _LT_TAGVAR(module_expsym_cmds, $1)=
  4176. _LT_TAGVAR(old_archive_from_new_cmds, $1)=
  4177. _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
  4178. _LT_TAGVAR(thread_safe_flag_spec, $1)=
  4179. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4180. # include_expsyms should be a list of space-separated symbols to be *always*
  4181. # included in the symbol list
  4182. _LT_TAGVAR(include_expsyms, $1)=
  4183. # exclude_expsyms can be an extended regexp of symbols to exclude
  4184. # it will be wrapped by ` (' and `)$', so one must not match beginning or
  4185. # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
  4186. # as well as any symbol that contains `d'.
  4187. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  4188. # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  4189. # platforms (ab)use it in PIC code, but their linkers get confused if
  4190. # the symbol is explicitly referenced. Since portable code cannot
  4191. # rely on this symbol name, it's probably fine to never include it in
  4192. # preloaded symbol tables.
  4193. # Exclude shared library initialization/finalization symbols.
  4194. dnl Note also adjust exclude_expsyms for C++ above.
  4195. extract_expsyms_cmds=
  4196. case $host_os in
  4197. cygwin* | mingw* | pw32* | cegcc*)
  4198. # FIXME: the MSVC++ port hasn't been tested in a loooong time
  4199. # When not using gcc, we currently assume that we are using
  4200. # Microsoft Visual C++.
  4201. if test "$GCC" != yes; then
  4202. with_gnu_ld=no
  4203. fi
  4204. ;;
  4205. interix*)
  4206. # we just hope/assume this is gcc and not c89 (= MSVC++)
  4207. with_gnu_ld=yes
  4208. ;;
  4209. openbsd*)
  4210. with_gnu_ld=no
  4211. ;;
  4212. esac
  4213. _LT_TAGVAR(ld_shlibs, $1)=yes
  4214. # On some targets, GNU ld is compatible enough with the native linker
  4215. # that we're better off using the native interface for both.
  4216. lt_use_gnu_ld_interface=no
  4217. if test "$with_gnu_ld" = yes; then
  4218. case $host_os in
  4219. aix*)
  4220. # The AIX port of GNU ld has always aspired to compatibility
  4221. # with the native linker. However, as the warning in the GNU ld
  4222. # block says, versions before 2.19.5* couldn't really create working
  4223. # shared libraries, regardless of the interface used.
  4224. case `$LD -v 2>&1` in
  4225. *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
  4226. *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
  4227. *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
  4228. *)
  4229. lt_use_gnu_ld_interface=yes
  4230. ;;
  4231. esac
  4232. ;;
  4233. *)
  4234. lt_use_gnu_ld_interface=yes
  4235. ;;
  4236. esac
  4237. fi
  4238. if test "$lt_use_gnu_ld_interface" = yes; then
  4239. # If archive_cmds runs LD, not CC, wlarc should be empty
  4240. wlarc='${wl}'
  4241. # Set some defaults for GNU ld with shared library support. These
  4242. # are reset later if shared libraries are not supported. Putting them
  4243. # here allows them to be overridden if necessary.
  4244. runpath_var=LD_RUN_PATH
  4245. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4246. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  4247. # ancient GNU ld didn't support --whole-archive et. al.
  4248. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
  4249. _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  4250. else
  4251. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4252. fi
  4253. supports_anon_versioning=no
  4254. case `$LD -v 2>&1` in
  4255. *GNU\ gold*) supports_anon_versioning=yes ;;
  4256. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
  4257. *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
  4258. *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
  4259. *\ 2.11.*) ;; # other 2.11 versions
  4260. *) supports_anon_versioning=yes ;;
  4261. esac
  4262. # See if GNU ld supports shared libraries.
  4263. case $host_os in
  4264. aix[[3-9]]*)
  4265. # On AIX/PPC, the GNU linker is very broken
  4266. if test "$host_cpu" != ia64; then
  4267. _LT_TAGVAR(ld_shlibs, $1)=no
  4268. cat <<_LT_EOF 1>&2
  4269. *** Warning: the GNU linker, at least up to release 2.19, is reported
  4270. *** to be unable to reliably create shared libraries on AIX.
  4271. *** Therefore, libtool is disabling shared libraries support. If you
  4272. *** really care for shared libraries, you may want to install binutils
  4273. *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
  4274. *** You will then need to restart the configuration process.
  4275. _LT_EOF
  4276. fi
  4277. ;;
  4278. amigaos*)
  4279. case $host_cpu in
  4280. powerpc)
  4281. # see comment about AmigaOS4 .so support
  4282. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4283. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  4284. ;;
  4285. m68k)
  4286. _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)'
  4287. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4288. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4289. ;;
  4290. esac
  4291. ;;
  4292. beos*)
  4293. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4294. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4295. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  4296. # support --undefined. This deserves some investigation. FIXME
  4297. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4298. else
  4299. _LT_TAGVAR(ld_shlibs, $1)=no
  4300. fi
  4301. ;;
  4302. cygwin* | mingw* | pw32* | cegcc*)
  4303. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  4304. # as there is no search path for DLLs.
  4305. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4306. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
  4307. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4308. _LT_TAGVAR(always_export_symbols, $1)=no
  4309. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4310. _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'
  4311. _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  4312. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  4313. _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'
  4314. # If the export-symbols file already is a .def file (1st line
  4315. # is EXPORTS), use it as is; otherwise, prepend...
  4316. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  4317. cp $export_symbols $output_objdir/$soname.def;
  4318. else
  4319. echo EXPORTS > $output_objdir/$soname.def;
  4320. cat $export_symbols >> $output_objdir/$soname.def;
  4321. fi~
  4322. $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  4323. else
  4324. _LT_TAGVAR(ld_shlibs, $1)=no
  4325. fi
  4326. ;;
  4327. haiku*)
  4328. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4329. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4330. ;;
  4331. interix[[3-9]]*)
  4332. _LT_TAGVAR(hardcode_direct, $1)=no
  4333. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4334. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  4335. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4336. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  4337. # Instead, shared libraries are loaded at an image base (0x10000000 by
  4338. # default) and relocated if they conflict, which is a slow very memory
  4339. # consuming and fragmenting process. To avoid this, we pick a random,
  4340. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  4341. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  4342. _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'
  4343. _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'
  4344. ;;
  4345. gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
  4346. tmp_diet=no
  4347. if test "$host_os" = linux-dietlibc; then
  4348. case $cc_basename in
  4349. diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
  4350. esac
  4351. fi
  4352. if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
  4353. && test "$tmp_diet" = no
  4354. then
  4355. tmp_addflag=' $pic_flag'
  4356. tmp_sharedflag='-shared'
  4357. case $cc_basename,$host_cpu in
  4358. pgcc*) # Portland Group C compiler
  4359. _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'
  4360. tmp_addflag=' $pic_flag'
  4361. ;;
  4362. pgf77* | pgf90* | pgf95* | pgfortran*)
  4363. # Portland Group f77 and f90 compilers
  4364. _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'
  4365. tmp_addflag=' $pic_flag -Mnomain' ;;
  4366. ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
  4367. tmp_addflag=' -i_dynamic' ;;
  4368. efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
  4369. tmp_addflag=' -i_dynamic -nofor_main' ;;
  4370. ifc* | ifort*) # Intel Fortran compiler
  4371. tmp_addflag=' -nofor_main' ;;
  4372. lf95*) # Lahey Fortran 8.1
  4373. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4374. tmp_sharedflag='--shared' ;;
  4375. xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
  4376. tmp_sharedflag='-qmkshrobj'
  4377. tmp_addflag= ;;
  4378. nvcc*) # Cuda Compiler Driver 2.2
  4379. _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'
  4380. _LT_TAGVAR(compiler_needs_object, $1)=yes
  4381. ;;
  4382. esac
  4383. case `$CC -V 2>&1 | sed 5q` in
  4384. *Sun\ C*) # Sun C 5.9
  4385. _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'
  4386. _LT_TAGVAR(compiler_needs_object, $1)=yes
  4387. tmp_sharedflag='-G' ;;
  4388. *Sun\ F*) # Sun Fortran 8.3
  4389. tmp_sharedflag='-G' ;;
  4390. esac
  4391. _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4392. if test "x$supports_anon_versioning" = xyes; then
  4393. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  4394. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4395. echo "local: *; };" >> $output_objdir/$libname.ver~
  4396. $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  4397. fi
  4398. case $cc_basename in
  4399. xlf* | bgf* | bgxlf* | mpixlf*)
  4400. # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
  4401. _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
  4402. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4403. _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
  4404. if test "x$supports_anon_versioning" = xyes; then
  4405. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  4406. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4407. echo "local: *; };" >> $output_objdir/$libname.ver~
  4408. $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
  4409. fi
  4410. ;;
  4411. esac
  4412. else
  4413. _LT_TAGVAR(ld_shlibs, $1)=no
  4414. fi
  4415. ;;
  4416. netbsd*)
  4417. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  4418. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  4419. wlarc=
  4420. else
  4421. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4422. _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'
  4423. fi
  4424. ;;
  4425. solaris*)
  4426. if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
  4427. _LT_TAGVAR(ld_shlibs, $1)=no
  4428. cat <<_LT_EOF 1>&2
  4429. *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  4430. *** create shared libraries on Solaris systems. Therefore, libtool
  4431. *** is disabling shared libraries support. We urge you to upgrade GNU
  4432. *** binutils to release 2.9.1 or newer. Another option is to modify
  4433. *** your PATH or compiler configuration so that the native linker is
  4434. *** used, and then restart.
  4435. _LT_EOF
  4436. elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4437. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4438. _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'
  4439. else
  4440. _LT_TAGVAR(ld_shlibs, $1)=no
  4441. fi
  4442. ;;
  4443. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
  4444. case `$LD -v 2>&1` in
  4445. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
  4446. _LT_TAGVAR(ld_shlibs, $1)=no
  4447. cat <<_LT_EOF 1>&2
  4448. *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
  4449. *** reliably create shared libraries on SCO systems. Therefore, libtool
  4450. *** is disabling shared libraries support. We urge you to upgrade GNU
  4451. *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
  4452. *** your PATH or compiler configuration so that the native linker is
  4453. *** used, and then restart.
  4454. _LT_EOF
  4455. ;;
  4456. *)
  4457. # For security reasons, it is highly recommended that you always
  4458. # use absolute paths for naming shared libraries, and exclude the
  4459. # DT_RUNPATH tag from executables and libraries. But doing so
  4460. # requires that you compile everything twice, which is a pain.
  4461. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4462. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4463. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4464. _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'
  4465. else
  4466. _LT_TAGVAR(ld_shlibs, $1)=no
  4467. fi
  4468. ;;
  4469. esac
  4470. ;;
  4471. sunos4*)
  4472. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4473. wlarc=
  4474. _LT_TAGVAR(hardcode_direct, $1)=yes
  4475. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4476. ;;
  4477. *)
  4478. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4479. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4480. _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'
  4481. else
  4482. _LT_TAGVAR(ld_shlibs, $1)=no
  4483. fi
  4484. ;;
  4485. esac
  4486. if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
  4487. runpath_var=
  4488. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4489. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  4490. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4491. fi
  4492. else
  4493. # PORTME fill in a description of your system's linker (not GNU ld)
  4494. case $host_os in
  4495. aix3*)
  4496. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4497. _LT_TAGVAR(always_export_symbols, $1)=yes
  4498. _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'
  4499. # Note: this linker hardcodes the directories in LIBPATH if there
  4500. # are no directories specified by -L.
  4501. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4502. if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
  4503. # Neither direct hardcoding nor static linking is supported with a
  4504. # broken collect2.
  4505. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  4506. fi
  4507. ;;
  4508. aix[[4-9]]*)
  4509. if test "$host_cpu" = ia64; then
  4510. # On IA64, the linker does run time linking by default, so we don't
  4511. # have to do anything special.
  4512. aix_use_runtimelinking=no
  4513. exp_sym_flag='-Bexport'
  4514. no_entry_flag=""
  4515. else
  4516. # If we're using GNU nm, then we don't want the "-C" option.
  4517. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  4518. # Also, AIX nm treats weak defined symbols like other global
  4519. # defined symbols, whereas GNU nm marks them as "W".
  4520. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  4521. _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'
  4522. else
  4523. _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'
  4524. fi
  4525. aix_use_runtimelinking=no
  4526. # Test if we are trying to use run time linking or normal
  4527. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  4528. # need to do runtime linking.
  4529. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  4530. for ld_flag in $LDFLAGS; do
  4531. if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
  4532. aix_use_runtimelinking=yes
  4533. break
  4534. fi
  4535. done
  4536. ;;
  4537. esac
  4538. exp_sym_flag='-bexport'
  4539. no_entry_flag='-bnoentry'
  4540. fi
  4541. # When large executables or shared objects are built, AIX ld can
  4542. # have problems creating the table of contents. If linking a library
  4543. # or program results in "error TOC overflow" add -mminimal-toc to
  4544. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  4545. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  4546. _LT_TAGVAR(archive_cmds, $1)=''
  4547. _LT_TAGVAR(hardcode_direct, $1)=yes
  4548. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4549. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  4550. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4551. _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
  4552. if test "$GCC" = yes; then
  4553. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  4554. # We only want to do this on AIX 4.2 and lower, the check
  4555. # below for broken collect2 doesn't work under 4.3+
  4556. collect2name=`${CC} -print-prog-name=collect2`
  4557. if test -f "$collect2name" &&
  4558. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  4559. then
  4560. # We have reworked collect2
  4561. :
  4562. else
  4563. # We have old collect2
  4564. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  4565. # It fails to find uninstalled libraries when the uninstalled
  4566. # path is not listed in the libpath. Setting hardcode_minus_L
  4567. # to unsupported forces relinking
  4568. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4569. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4570. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  4571. fi
  4572. ;;
  4573. esac
  4574. shared_flag='-shared'
  4575. if test "$aix_use_runtimelinking" = yes; then
  4576. shared_flag="$shared_flag "'${wl}-G'
  4577. fi
  4578. else
  4579. # not using gcc
  4580. if test "$host_cpu" = ia64; then
  4581. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  4582. # chokes on -Wl,-G. The following line is correct:
  4583. shared_flag='-G'
  4584. else
  4585. if test "$aix_use_runtimelinking" = yes; then
  4586. shared_flag='${wl}-G'
  4587. else
  4588. shared_flag='${wl}-bM:SRE'
  4589. fi
  4590. fi
  4591. fi
  4592. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
  4593. # It seems that -bexpall does not export symbols beginning with
  4594. # underscore (_), so it is better to generate a list of symbols to export.
  4595. _LT_TAGVAR(always_export_symbols, $1)=yes
  4596. if test "$aix_use_runtimelinking" = yes; then
  4597. # Warning - without using the other runtime loading flags (-brtl),
  4598. # -berok will link without error, but may produce a broken library.
  4599. _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
  4600. # Determine the default libpath from the value encoded in an
  4601. # empty executable.
  4602. _LT_SYS_MODULE_PATH_AIX([$1])
  4603. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  4604. _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"
  4605. else
  4606. if test "$host_cpu" = ia64; then
  4607. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  4608. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  4609. _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"
  4610. else
  4611. # Determine the default libpath from the value encoded in an
  4612. # empty executable.
  4613. _LT_SYS_MODULE_PATH_AIX([$1])
  4614. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  4615. # Warning - without using the other run time loading flags,
  4616. # -berok will link without error, but may produce a broken library.
  4617. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  4618. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  4619. if test "$with_gnu_ld" = yes; then
  4620. # We only use this code for GNU lds that support --whole-archive.
  4621. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  4622. else
  4623. # Exported symbols can be pulled into shared objects from archives
  4624. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  4625. fi
  4626. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  4627. # This is similar to how AIX traditionally builds its shared libraries.
  4628. _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'
  4629. fi
  4630. fi
  4631. ;;
  4632. amigaos*)
  4633. case $host_cpu in
  4634. powerpc)
  4635. # see comment about AmigaOS4 .so support
  4636. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4637. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  4638. ;;
  4639. m68k)
  4640. _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)'
  4641. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4642. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4643. ;;
  4644. esac
  4645. ;;
  4646. bsdi[[45]]*)
  4647. _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
  4648. ;;
  4649. cygwin* | mingw* | pw32* | cegcc*)
  4650. # When not using gcc, we currently assume that we are using
  4651. # Microsoft Visual C++.
  4652. # hardcode_libdir_flag_spec is actually meaningless, as there is
  4653. # no search path for DLLs.
  4654. case $cc_basename in
  4655. cl*)
  4656. # Native MSVC
  4657. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  4658. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4659. _LT_TAGVAR(always_export_symbols, $1)=yes
  4660. _LT_TAGVAR(file_list_spec, $1)='@'
  4661. # Tell ltmain to make .lib files, not .a files.
  4662. libext=lib
  4663. # Tell ltmain to make .dll files, not .so files.
  4664. shrext_cmds=".dll"
  4665. # FIXME: Setting linknames here is a bad hack.
  4666. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
  4667. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  4668. sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
  4669. else
  4670. sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
  4671. fi~
  4672. $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  4673. linknames='
  4674. # The linker will not automatically build a static lib if we build a DLL.
  4675. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  4676. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4677. _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  4678. _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'
  4679. # Don't use ranlib
  4680. _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  4681. _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  4682. lt_tool_outputfile="@TOOL_OUTPUT@"~
  4683. case $lt_outputfile in
  4684. *.exe|*.EXE) ;;
  4685. *)
  4686. lt_outputfile="$lt_outputfile.exe"
  4687. lt_tool_outputfile="$lt_tool_outputfile.exe"
  4688. ;;
  4689. esac~
  4690. if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
  4691. $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  4692. $RM "$lt_outputfile.manifest";
  4693. fi'
  4694. ;;
  4695. *)
  4696. # Assume MSVC wrapper
  4697. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  4698. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4699. # Tell ltmain to make .lib files, not .a files.
  4700. libext=lib
  4701. # Tell ltmain to make .dll files, not .so files.
  4702. shrext_cmds=".dll"
  4703. # FIXME: Setting linknames here is a bad hack.
  4704. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
  4705. # The linker will automatically build a .lib file if we build a DLL.
  4706. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  4707. # FIXME: Should let the user specify the lib program.
  4708. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
  4709. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4710. ;;
  4711. esac
  4712. ;;
  4713. darwin* | rhapsody*)
  4714. _LT_DARWIN_LINKER_FEATURES($1)
  4715. ;;
  4716. dgux*)
  4717. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  4718. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4719. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4720. ;;
  4721. # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  4722. # support. Future versions do this automatically, but an explicit c++rt0.o
  4723. # does not break anything, and helps significantly (at the cost of a little
  4724. # extra space).
  4725. freebsd2.2*)
  4726. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
  4727. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4728. _LT_TAGVAR(hardcode_direct, $1)=yes
  4729. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4730. ;;
  4731. # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  4732. freebsd2.*)
  4733. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4734. _LT_TAGVAR(hardcode_direct, $1)=yes
  4735. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4736. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4737. ;;
  4738. # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  4739. freebsd* | dragonfly*)
  4740. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  4741. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4742. _LT_TAGVAR(hardcode_direct, $1)=yes
  4743. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4744. ;;
  4745. hpux9*)
  4746. if test "$GCC" = yes; then
  4747. _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'
  4748. else
  4749. _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'
  4750. fi
  4751. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  4752. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4753. _LT_TAGVAR(hardcode_direct, $1)=yes
  4754. # hardcode_minus_L: Not really in the search PATH,
  4755. # but as the default location of the library.
  4756. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4757. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4758. ;;
  4759. hpux10*)
  4760. if test "$GCC" = yes && test "$with_gnu_ld" = no; then
  4761. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  4762. else
  4763. _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
  4764. fi
  4765. if test "$with_gnu_ld" = no; then
  4766. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  4767. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4768. _LT_TAGVAR(hardcode_direct, $1)=yes
  4769. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4770. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4771. # hardcode_minus_L: Not really in the search PATH,
  4772. # but as the default location of the library.
  4773. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4774. fi
  4775. ;;
  4776. hpux11*)
  4777. if test "$GCC" = yes && test "$with_gnu_ld" = no; then
  4778. case $host_cpu in
  4779. hppa*64*)
  4780. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  4781. ;;
  4782. ia64*)
  4783. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  4784. ;;
  4785. *)
  4786. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  4787. ;;
  4788. esac
  4789. else
  4790. case $host_cpu in
  4791. hppa*64*)
  4792. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  4793. ;;
  4794. ia64*)
  4795. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  4796. ;;
  4797. *)
  4798. m4_if($1, [], [
  4799. # Older versions of the 11.00 compiler do not understand -b yet
  4800. # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
  4801. _LT_LINKER_OPTION([if $CC understands -b],
  4802. _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
  4803. [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
  4804. [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
  4805. [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
  4806. ;;
  4807. esac
  4808. fi
  4809. if test "$with_gnu_ld" = no; then
  4810. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  4811. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4812. case $host_cpu in
  4813. hppa*64*|ia64*)
  4814. _LT_TAGVAR(hardcode_direct, $1)=no
  4815. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4816. ;;
  4817. *)
  4818. _LT_TAGVAR(hardcode_direct, $1)=yes
  4819. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4820. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4821. # hardcode_minus_L: Not really in the search PATH,
  4822. # but as the default location of the library.
  4823. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4824. ;;
  4825. esac
  4826. fi
  4827. ;;
  4828. irix5* | irix6* | nonstopux*)
  4829. if test "$GCC" = yes; then
  4830. _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'
  4831. # Try to use the -exported_symbol ld option, if it does not
  4832. # work, assume that -exports_file does not work either and
  4833. # implicitly export all symbols.
  4834. # This should be the same for all languages, so no per-tag cache variable.
  4835. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
  4836. [lt_cv_irix_exported_symbol],
  4837. [save_LDFLAGS="$LDFLAGS"
  4838. LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
  4839. AC_LINK_IFELSE(
  4840. [AC_LANG_SOURCE(
  4841. [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
  4842. [C++], [[int foo (void) { return 0; }]],
  4843. [Fortran 77], [[
  4844. subroutine foo
  4845. end]],
  4846. [Fortran], [[
  4847. subroutine foo
  4848. end]])])],
  4849. [lt_cv_irix_exported_symbol=yes],
  4850. [lt_cv_irix_exported_symbol=no])
  4851. LDFLAGS="$save_LDFLAGS"])
  4852. if test "$lt_cv_irix_exported_symbol" = yes; then
  4853. _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'
  4854. fi
  4855. else
  4856. _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'
  4857. _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'
  4858. fi
  4859. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  4860. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4861. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4862. _LT_TAGVAR(inherit_rpath, $1)=yes
  4863. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4864. ;;
  4865. netbsd*)
  4866. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  4867. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
  4868. else
  4869. _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
  4870. fi
  4871. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4872. _LT_TAGVAR(hardcode_direct, $1)=yes
  4873. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4874. ;;
  4875. newsos6)
  4876. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  4877. _LT_TAGVAR(hardcode_direct, $1)=yes
  4878. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4879. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4880. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4881. ;;
  4882. *nto* | *qnx*)
  4883. ;;
  4884. openbsd*)
  4885. if test -f /usr/libexec/ld.so; then
  4886. _LT_TAGVAR(hardcode_direct, $1)=yes
  4887. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4888. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4889. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  4890. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  4891. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
  4892. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  4893. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4894. else
  4895. case $host_os in
  4896. openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
  4897. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4898. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4899. ;;
  4900. *)
  4901. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  4902. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  4903. ;;
  4904. esac
  4905. fi
  4906. else
  4907. _LT_TAGVAR(ld_shlibs, $1)=no
  4908. fi
  4909. ;;
  4910. os2*)
  4911. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4912. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4913. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4914. _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'
  4915. _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
  4916. ;;
  4917. osf3*)
  4918. if test "$GCC" = yes; then
  4919. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  4920. _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'
  4921. else
  4922. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  4923. _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'
  4924. fi
  4925. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  4926. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4927. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4928. ;;
  4929. osf4* | osf5*) # as osf3* with the addition of -msym flag
  4930. if test "$GCC" = yes; then
  4931. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  4932. _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'
  4933. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4934. else
  4935. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  4936. _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'
  4937. _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~
  4938. $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'
  4939. # Both c and cxx compiler support -rpath directly
  4940. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  4941. fi
  4942. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  4943. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4944. ;;
  4945. solaris*)
  4946. _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
  4947. if test "$GCC" = yes; then
  4948. wlarc='${wl}'
  4949. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  4950. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  4951. $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'
  4952. else
  4953. case `$CC -V 2>&1` in
  4954. *"Compilers 5.0"*)
  4955. wlarc=''
  4956. _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
  4957. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  4958. $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
  4959. ;;
  4960. *)
  4961. wlarc='${wl}'
  4962. _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
  4963. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  4964. $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
  4965. ;;
  4966. esac
  4967. fi
  4968. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4969. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4970. case $host_os in
  4971. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  4972. *)
  4973. # The compiler driver will combine and reorder linker options,
  4974. # but understands `-z linker_flag'. GCC discards it without `$wl',
  4975. # but is careful enough not to reorder.
  4976. # Supported since Solaris 2.6 (maybe 2.5.1?)
  4977. if test "$GCC" = yes; then
  4978. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
  4979. else
  4980. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  4981. fi
  4982. ;;
  4983. esac
  4984. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4985. ;;
  4986. sunos4*)
  4987. if test "x$host_vendor" = xsequent; then
  4988. # Use $CC to link under sequent, because it throws in some extra .o
  4989. # files that make .init and .fini sections work.
  4990. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
  4991. else
  4992. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
  4993. fi
  4994. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4995. _LT_TAGVAR(hardcode_direct, $1)=yes
  4996. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4997. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4998. ;;
  4999. sysv4)
  5000. case $host_vendor in
  5001. sni)
  5002. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5003. _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
  5004. ;;
  5005. siemens)
  5006. ## LD is ld it makes a PLAMLIB
  5007. ## CC just makes a GrossModule.
  5008. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  5009. _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
  5010. _LT_TAGVAR(hardcode_direct, $1)=no
  5011. ;;
  5012. motorola)
  5013. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5014. _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
  5015. ;;
  5016. esac
  5017. runpath_var='LD_RUN_PATH'
  5018. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5019. ;;
  5020. sysv4.3*)
  5021. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5022. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5023. _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
  5024. ;;
  5025. sysv4*MP*)
  5026. if test -d /usr/nec; then
  5027. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5028. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5029. runpath_var=LD_RUN_PATH
  5030. hardcode_runpath_var=yes
  5031. _LT_TAGVAR(ld_shlibs, $1)=yes
  5032. fi
  5033. ;;
  5034. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  5035. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  5036. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5037. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5038. runpath_var='LD_RUN_PATH'
  5039. if test "$GCC" = yes; then
  5040. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5041. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5042. else
  5043. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5044. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5045. fi
  5046. ;;
  5047. sysv5* | sco3.2v5* | sco5v6*)
  5048. # Note: We can NOT use -z defs as we might desire, because we do not
  5049. # link with -lc, and that would cause any symbols used from libc to
  5050. # always be unresolved, which means just about no library would
  5051. # ever link correctly. If we're not using GNU ld we use -z text
  5052. # though, which does catch some bad symbols but isn't as heavy-handed
  5053. # as -z defs.
  5054. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  5055. _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
  5056. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5057. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5058. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
  5059. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5060. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5061. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  5062. runpath_var='LD_RUN_PATH'
  5063. if test "$GCC" = yes; then
  5064. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5065. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5066. else
  5067. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5068. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5069. fi
  5070. ;;
  5071. uts4*)
  5072. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5073. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5074. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5075. ;;
  5076. *)
  5077. _LT_TAGVAR(ld_shlibs, $1)=no
  5078. ;;
  5079. esac
  5080. if test x$host_vendor = xsni; then
  5081. case $host in
  5082. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  5083. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
  5084. ;;
  5085. esac
  5086. fi
  5087. fi
  5088. ])
  5089. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  5090. test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  5091. _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
  5092. _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
  5093. _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
  5094. _LT_DECL([], [extract_expsyms_cmds], [2],
  5095. [The commands to extract the exported symbol list from a shared archive])
  5096. #
  5097. # Do we need to explicitly link libc?
  5098. #
  5099. case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
  5100. x|xyes)
  5101. # Assume -lc should be added
  5102. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5103. if test "$enable_shared" = yes && test "$GCC" = yes; then
  5104. case $_LT_TAGVAR(archive_cmds, $1) in
  5105. *'~'*)
  5106. # FIXME: we may have to deal with multi-command sequences.
  5107. ;;
  5108. '$CC '*)
  5109. # Test whether the compiler implicitly links with -lc since on some
  5110. # systems, -lgcc has to come before -lc. If gcc already passes -lc
  5111. # to ld, don't add -lc before -lgcc.
  5112. AC_CACHE_CHECK([whether -lc should be explicitly linked in],
  5113. [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
  5114. [$RM conftest*
  5115. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  5116. if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
  5117. soname=conftest
  5118. lib=conftest
  5119. libobjs=conftest.$ac_objext
  5120. deplibs=
  5121. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
  5122. pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
  5123. compiler_flags=-v
  5124. linker_flags=-v
  5125. verstring=
  5126. output_objdir=.
  5127. libname=conftest
  5128. lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
  5129. _LT_TAGVAR(allow_undefined_flag, $1)=
  5130. if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
  5131. then
  5132. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5133. else
  5134. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5135. fi
  5136. _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
  5137. else
  5138. cat conftest.err 1>&5
  5139. fi
  5140. $RM conftest*
  5141. ])
  5142. _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
  5143. ;;
  5144. esac
  5145. fi
  5146. ;;
  5147. esac
  5148. _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
  5149. [Whether or not to add -lc for building shared libraries])
  5150. _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
  5151. [enable_shared_with_static_runtimes], [0],
  5152. [Whether or not to disallow shared libs when runtime libs are static])
  5153. _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
  5154. [Compiler flag to allow reflexive dlopens])
  5155. _LT_TAGDECL([], [whole_archive_flag_spec], [1],
  5156. [Compiler flag to generate shared objects directly from archives])
  5157. _LT_TAGDECL([], [compiler_needs_object], [1],
  5158. [Whether the compiler copes with passing no objects directly])
  5159. _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
  5160. [Create an old-style archive from a shared archive])
  5161. _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
  5162. [Create a temporary old-style archive to link instead of a shared archive])
  5163. _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
  5164. _LT_TAGDECL([], [archive_expsym_cmds], [2])
  5165. _LT_TAGDECL([], [module_cmds], [2],
  5166. [Commands used to build a loadable module if different from building
  5167. a shared archive.])
  5168. _LT_TAGDECL([], [module_expsym_cmds], [2])
  5169. _LT_TAGDECL([], [with_gnu_ld], [1],
  5170. [Whether we are building with GNU ld or not])
  5171. _LT_TAGDECL([], [allow_undefined_flag], [1],
  5172. [Flag that allows shared libraries with undefined symbols to be built])
  5173. _LT_TAGDECL([], [no_undefined_flag], [1],
  5174. [Flag that enforces no undefined symbols])
  5175. _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
  5176. [Flag to hardcode $libdir into a binary during linking.
  5177. This must work even if $libdir does not exist])
  5178. _LT_TAGDECL([], [hardcode_libdir_separator], [1],
  5179. [Whether we need a single "-rpath" flag with a separated argument])
  5180. _LT_TAGDECL([], [hardcode_direct], [0],
  5181. [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
  5182. DIR into the resulting binary])
  5183. _LT_TAGDECL([], [hardcode_direct_absolute], [0],
  5184. [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
  5185. DIR into the resulting binary and the resulting library dependency is
  5186. "absolute", i.e impossible to change by setting ${shlibpath_var} if the
  5187. library is relocated])
  5188. _LT_TAGDECL([], [hardcode_minus_L], [0],
  5189. [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
  5190. into the resulting binary])
  5191. _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
  5192. [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
  5193. into the resulting binary])
  5194. _LT_TAGDECL([], [hardcode_automatic], [0],
  5195. [Set to "yes" if building a shared library automatically hardcodes DIR
  5196. into the library and all subsequent libraries and executables linked
  5197. against it])
  5198. _LT_TAGDECL([], [inherit_rpath], [0],
  5199. [Set to yes if linker adds runtime paths of dependent libraries
  5200. to runtime path list])
  5201. _LT_TAGDECL([], [link_all_deplibs], [0],
  5202. [Whether libtool must link a program against all its dependency libraries])
  5203. _LT_TAGDECL([], [always_export_symbols], [0],
  5204. [Set to "yes" if exported symbols are required])
  5205. _LT_TAGDECL([], [export_symbols_cmds], [2],
  5206. [The commands to list exported symbols])
  5207. _LT_TAGDECL([], [exclude_expsyms], [1],
  5208. [Symbols that should not be listed in the preloaded symbols])
  5209. _LT_TAGDECL([], [include_expsyms], [1],
  5210. [Symbols that must always be exported])
  5211. _LT_TAGDECL([], [prelink_cmds], [2],
  5212. [Commands necessary for linking programs (against libraries) with templates])
  5213. _LT_TAGDECL([], [postlink_cmds], [2],
  5214. [Commands necessary for finishing linking programs])
  5215. _LT_TAGDECL([], [file_list_spec], [1],
  5216. [Specify filename containing input files])
  5217. dnl FIXME: Not yet implemented
  5218. dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
  5219. dnl [Compiler flag to generate thread safe objects])
  5220. ])# _LT_LINKER_SHLIBS
  5221. # _LT_LANG_C_CONFIG([TAG])
  5222. # ------------------------
  5223. # Ensure that the configuration variables for a C compiler are suitably
  5224. # defined. These variables are subsequently used by _LT_CONFIG to write
  5225. # the compiler configuration to `libtool'.
  5226. m4_defun([_LT_LANG_C_CONFIG],
  5227. [m4_require([_LT_DECL_EGREP])dnl
  5228. lt_save_CC="$CC"
  5229. AC_LANG_PUSH(C)
  5230. # Source file extension for C test sources.
  5231. ac_ext=c
  5232. # Object file extension for compiled C test sources.
  5233. objext=o
  5234. _LT_TAGVAR(objext, $1)=$objext
  5235. # Code to be used in simple compile tests
  5236. lt_simple_compile_test_code="int some_variable = 0;"
  5237. # Code to be used in simple link tests
  5238. lt_simple_link_test_code='int main(){return(0);}'
  5239. _LT_TAG_COMPILER
  5240. # Save the default compiler, since it gets overwritten when the other
  5241. # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
  5242. compiler_DEFAULT=$CC
  5243. # save warnings/boilerplate of simple test code
  5244. _LT_COMPILER_BOILERPLATE
  5245. _LT_LINKER_BOILERPLATE
  5246. ## CAVEAT EMPTOR:
  5247. ## There is no encapsulation within the following macros, do not change
  5248. ## the running order or otherwise move them around unless you know exactly
  5249. ## what you are doing...
  5250. if test -n "$compiler"; then
  5251. _LT_COMPILER_NO_RTTI($1)
  5252. _LT_COMPILER_PIC($1)
  5253. _LT_COMPILER_C_O($1)
  5254. _LT_COMPILER_FILE_LOCKS($1)
  5255. _LT_LINKER_SHLIBS($1)
  5256. _LT_SYS_DYNAMIC_LINKER($1)
  5257. _LT_LINKER_HARDCODE_LIBPATH($1)
  5258. LT_SYS_DLOPEN_SELF
  5259. _LT_CMD_STRIPLIB
  5260. # Report which library types will actually be built
  5261. AC_MSG_CHECKING([if libtool supports shared libraries])
  5262. AC_MSG_RESULT([$can_build_shared])
  5263. AC_MSG_CHECKING([whether to build shared libraries])
  5264. test "$can_build_shared" = "no" && enable_shared=no
  5265. # On AIX, shared libraries and static libraries use the same namespace, and
  5266. # are all built from PIC.
  5267. case $host_os in
  5268. aix3*)
  5269. test "$enable_shared" = yes && enable_static=no
  5270. if test -n "$RANLIB"; then
  5271. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  5272. postinstall_cmds='$RANLIB $lib'
  5273. fi
  5274. ;;
  5275. aix[[4-9]]*)
  5276. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  5277. test "$enable_shared" = yes && enable_static=no
  5278. fi
  5279. ;;
  5280. esac
  5281. AC_MSG_RESULT([$enable_shared])
  5282. AC_MSG_CHECKING([whether to build static libraries])
  5283. # Make sure either enable_shared or enable_static is yes.
  5284. test "$enable_shared" = yes || enable_static=yes
  5285. AC_MSG_RESULT([$enable_static])
  5286. _LT_CONFIG($1)
  5287. fi
  5288. AC_LANG_POP
  5289. CC="$lt_save_CC"
  5290. ])# _LT_LANG_C_CONFIG
  5291. # _LT_LANG_CXX_CONFIG([TAG])
  5292. # --------------------------
  5293. # Ensure that the configuration variables for a C++ compiler are suitably
  5294. # defined. These variables are subsequently used by _LT_CONFIG to write
  5295. # the compiler configuration to `libtool'.
  5296. m4_defun([_LT_LANG_CXX_CONFIG],
  5297. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  5298. m4_require([_LT_DECL_EGREP])dnl
  5299. m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  5300. if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
  5301. ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
  5302. (test "X$CXX" != "Xg++"))) ; then
  5303. AC_PROG_CXXCPP
  5304. else
  5305. _lt_caught_CXX_error=yes
  5306. fi
  5307. AC_LANG_PUSH(C++)
  5308. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5309. _LT_TAGVAR(allow_undefined_flag, $1)=
  5310. _LT_TAGVAR(always_export_symbols, $1)=no
  5311. _LT_TAGVAR(archive_expsym_cmds, $1)=
  5312. _LT_TAGVAR(compiler_needs_object, $1)=no
  5313. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  5314. _LT_TAGVAR(hardcode_direct, $1)=no
  5315. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  5316. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  5317. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5318. _LT_TAGVAR(hardcode_minus_L, $1)=no
  5319. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  5320. _LT_TAGVAR(hardcode_automatic, $1)=no
  5321. _LT_TAGVAR(inherit_rpath, $1)=no
  5322. _LT_TAGVAR(module_cmds, $1)=
  5323. _LT_TAGVAR(module_expsym_cmds, $1)=
  5324. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  5325. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  5326. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  5327. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  5328. _LT_TAGVAR(no_undefined_flag, $1)=
  5329. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5330. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  5331. # Source file extension for C++ test sources.
  5332. ac_ext=cpp
  5333. # Object file extension for compiled C++ test sources.
  5334. objext=o
  5335. _LT_TAGVAR(objext, $1)=$objext
  5336. # No sense in running all these tests if we already determined that
  5337. # the CXX compiler isn't working. Some variables (like enable_shared)
  5338. # are currently assumed to apply to all compilers on this platform,
  5339. # and will be corrupted by setting them based on a non-working compiler.
  5340. if test "$_lt_caught_CXX_error" != yes; then
  5341. # Code to be used in simple compile tests
  5342. lt_simple_compile_test_code="int some_variable = 0;"
  5343. # Code to be used in simple link tests
  5344. lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
  5345. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  5346. _LT_TAG_COMPILER
  5347. # save warnings/boilerplate of simple test code
  5348. _LT_COMPILER_BOILERPLATE
  5349. _LT_LINKER_BOILERPLATE
  5350. # Allow CC to be a program name with arguments.
  5351. lt_save_CC=$CC
  5352. lt_save_CFLAGS=$CFLAGS
  5353. lt_save_LD=$LD
  5354. lt_save_GCC=$GCC
  5355. GCC=$GXX
  5356. lt_save_with_gnu_ld=$with_gnu_ld
  5357. lt_save_path_LD=$lt_cv_path_LD
  5358. if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
  5359. lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
  5360. else
  5361. $as_unset lt_cv_prog_gnu_ld
  5362. fi
  5363. if test -n "${lt_cv_path_LDCXX+set}"; then
  5364. lt_cv_path_LD=$lt_cv_path_LDCXX
  5365. else
  5366. $as_unset lt_cv_path_LD
  5367. fi
  5368. test -z "${LDCXX+set}" || LD=$LDCXX
  5369. CC=${CXX-"c++"}
  5370. CFLAGS=$CXXFLAGS
  5371. compiler=$CC
  5372. _LT_TAGVAR(compiler, $1)=$CC
  5373. _LT_CC_BASENAME([$compiler])
  5374. if test -n "$compiler"; then
  5375. # We don't want -fno-exception when compiling C++ code, so set the
  5376. # no_builtin_flag separately
  5377. if test "$GXX" = yes; then
  5378. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  5379. else
  5380. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  5381. fi
  5382. if test "$GXX" = yes; then
  5383. # Set up default GNU C++ configuration
  5384. LT_PATH_LD
  5385. # Check if GNU C++ uses GNU ld as the underlying linker, since the
  5386. # archiving commands below assume that GNU ld is being used.
  5387. if test "$with_gnu_ld" = yes; then
  5388. _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5389. _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'
  5390. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5391. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5392. # If archive_cmds runs LD, not CC, wlarc should be empty
  5393. # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
  5394. # investigate it a little bit more. (MM)
  5395. wlarc='${wl}'
  5396. # ancient GNU ld didn't support --whole-archive et. al.
  5397. if eval "`$CC -print-prog-name=ld` --help 2>&1" |
  5398. $GREP 'no-whole-archive' > /dev/null; then
  5399. _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  5400. else
  5401. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5402. fi
  5403. else
  5404. with_gnu_ld=no
  5405. wlarc=
  5406. # A generic and very simple default shared library creation
  5407. # command for GNU C++ for the case where it uses the native
  5408. # linker, instead of GNU ld. If possible, this setting should
  5409. # overridden to take advantage of the native linker features on
  5410. # the platform it is being used on.
  5411. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  5412. fi
  5413. # Commands to make compiler produce verbose output that lists
  5414. # what "hidden" libraries, object files and flags are used when
  5415. # linking a shared library.
  5416. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  5417. else
  5418. GXX=no
  5419. with_gnu_ld=no
  5420. wlarc=
  5421. fi
  5422. # PORTME: fill in a description of your system's C++ link characteristics
  5423. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  5424. _LT_TAGVAR(ld_shlibs, $1)=yes
  5425. case $host_os in
  5426. aix3*)
  5427. # FIXME: insert proper C++ library support
  5428. _LT_TAGVAR(ld_shlibs, $1)=no
  5429. ;;
  5430. aix[[4-9]]*)
  5431. if test "$host_cpu" = ia64; then
  5432. # On IA64, the linker does run time linking by default, so we don't
  5433. # have to do anything special.
  5434. aix_use_runtimelinking=no
  5435. exp_sym_flag='-Bexport'
  5436. no_entry_flag=""
  5437. else
  5438. aix_use_runtimelinking=no
  5439. # Test if we are trying to use run time linking or normal
  5440. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  5441. # need to do runtime linking.
  5442. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  5443. for ld_flag in $LDFLAGS; do
  5444. case $ld_flag in
  5445. *-brtl*)
  5446. aix_use_runtimelinking=yes
  5447. break
  5448. ;;
  5449. esac
  5450. done
  5451. ;;
  5452. esac
  5453. exp_sym_flag='-bexport'
  5454. no_entry_flag='-bnoentry'
  5455. fi
  5456. # When large executables or shared objects are built, AIX ld can
  5457. # have problems creating the table of contents. If linking a library
  5458. # or program results in "error TOC overflow" add -mminimal-toc to
  5459. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  5460. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  5461. _LT_TAGVAR(archive_cmds, $1)=''
  5462. _LT_TAGVAR(hardcode_direct, $1)=yes
  5463. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5464. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5465. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5466. _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
  5467. if test "$GXX" = yes; then
  5468. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  5469. # We only want to do this on AIX 4.2 and lower, the check
  5470. # below for broken collect2 doesn't work under 4.3+
  5471. collect2name=`${CC} -print-prog-name=collect2`
  5472. if test -f "$collect2name" &&
  5473. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  5474. then
  5475. # We have reworked collect2
  5476. :
  5477. else
  5478. # We have old collect2
  5479. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  5480. # It fails to find uninstalled libraries when the uninstalled
  5481. # path is not listed in the libpath. Setting hardcode_minus_L
  5482. # to unsupported forces relinking
  5483. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5484. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5485. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5486. fi
  5487. esac
  5488. shared_flag='-shared'
  5489. if test "$aix_use_runtimelinking" = yes; then
  5490. shared_flag="$shared_flag "'${wl}-G'
  5491. fi
  5492. else
  5493. # not using gcc
  5494. if test "$host_cpu" = ia64; then
  5495. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  5496. # chokes on -Wl,-G. The following line is correct:
  5497. shared_flag='-G'
  5498. else
  5499. if test "$aix_use_runtimelinking" = yes; then
  5500. shared_flag='${wl}-G'
  5501. else
  5502. shared_flag='${wl}-bM:SRE'
  5503. fi
  5504. fi
  5505. fi
  5506. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
  5507. # It seems that -bexpall does not export symbols beginning with
  5508. # underscore (_), so it is better to generate a list of symbols to
  5509. # export.
  5510. _LT_TAGVAR(always_export_symbols, $1)=yes
  5511. if test "$aix_use_runtimelinking" = yes; then
  5512. # Warning - without using the other runtime loading flags (-brtl),
  5513. # -berok will link without error, but may produce a broken library.
  5514. _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
  5515. # Determine the default libpath from the value encoded in an empty
  5516. # executable.
  5517. _LT_SYS_MODULE_PATH_AIX([$1])
  5518. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  5519. _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"
  5520. else
  5521. if test "$host_cpu" = ia64; then
  5522. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  5523. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  5524. _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"
  5525. else
  5526. # Determine the default libpath from the value encoded in an
  5527. # empty executable.
  5528. _LT_SYS_MODULE_PATH_AIX([$1])
  5529. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  5530. # Warning - without using the other run time loading flags,
  5531. # -berok will link without error, but may produce a broken library.
  5532. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  5533. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  5534. if test "$with_gnu_ld" = yes; then
  5535. # We only use this code for GNU lds that support --whole-archive.
  5536. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  5537. else
  5538. # Exported symbols can be pulled into shared objects from archives
  5539. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  5540. fi
  5541. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5542. # This is similar to how AIX traditionally builds its shared
  5543. # libraries.
  5544. _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'
  5545. fi
  5546. fi
  5547. ;;
  5548. beos*)
  5549. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  5550. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5551. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  5552. # support --undefined. This deserves some investigation. FIXME
  5553. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5554. else
  5555. _LT_TAGVAR(ld_shlibs, $1)=no
  5556. fi
  5557. ;;
  5558. chorus*)
  5559. case $cc_basename in
  5560. *)
  5561. # FIXME: insert proper C++ library support
  5562. _LT_TAGVAR(ld_shlibs, $1)=no
  5563. ;;
  5564. esac
  5565. ;;
  5566. cygwin* | mingw* | pw32* | cegcc*)
  5567. case $GXX,$cc_basename in
  5568. ,cl* | no,cl*)
  5569. # Native MSVC
  5570. # hardcode_libdir_flag_spec is actually meaningless, as there is
  5571. # no search path for DLLs.
  5572. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  5573. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5574. _LT_TAGVAR(always_export_symbols, $1)=yes
  5575. _LT_TAGVAR(file_list_spec, $1)='@'
  5576. # Tell ltmain to make .lib files, not .a files.
  5577. libext=lib
  5578. # Tell ltmain to make .dll files, not .so files.
  5579. shrext_cmds=".dll"
  5580. # FIXME: Setting linknames here is a bad hack.
  5581. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
  5582. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  5583. $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
  5584. else
  5585. $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
  5586. fi~
  5587. $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  5588. linknames='
  5589. # The linker will not automatically build a static lib if we build a DLL.
  5590. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  5591. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5592. # Don't use ranlib
  5593. _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  5594. _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  5595. lt_tool_outputfile="@TOOL_OUTPUT@"~
  5596. case $lt_outputfile in
  5597. *.exe|*.EXE) ;;
  5598. *)
  5599. lt_outputfile="$lt_outputfile.exe"
  5600. lt_tool_outputfile="$lt_tool_outputfile.exe"
  5601. ;;
  5602. esac~
  5603. func_to_tool_file "$lt_outputfile"~
  5604. if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
  5605. $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  5606. $RM "$lt_outputfile.manifest";
  5607. fi'
  5608. ;;
  5609. *)
  5610. # g++
  5611. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  5612. # as there is no search path for DLLs.
  5613. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5614. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
  5615. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5616. _LT_TAGVAR(always_export_symbols, $1)=no
  5617. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5618. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  5619. _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'
  5620. # If the export-symbols file already is a .def file (1st line
  5621. # is EXPORTS), use it as is; otherwise, prepend...
  5622. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  5623. cp $export_symbols $output_objdir/$soname.def;
  5624. else
  5625. echo EXPORTS > $output_objdir/$soname.def;
  5626. cat $export_symbols >> $output_objdir/$soname.def;
  5627. fi~
  5628. $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'
  5629. else
  5630. _LT_TAGVAR(ld_shlibs, $1)=no
  5631. fi
  5632. ;;
  5633. esac
  5634. ;;
  5635. darwin* | rhapsody*)
  5636. _LT_DARWIN_LINKER_FEATURES($1)
  5637. ;;
  5638. dgux*)
  5639. case $cc_basename in
  5640. ec++*)
  5641. # FIXME: insert proper C++ library support
  5642. _LT_TAGVAR(ld_shlibs, $1)=no
  5643. ;;
  5644. ghcx*)
  5645. # Green Hills C++ Compiler
  5646. # FIXME: insert proper C++ library support
  5647. _LT_TAGVAR(ld_shlibs, $1)=no
  5648. ;;
  5649. *)
  5650. # FIXME: insert proper C++ library support
  5651. _LT_TAGVAR(ld_shlibs, $1)=no
  5652. ;;
  5653. esac
  5654. ;;
  5655. freebsd2.*)
  5656. # C++ shared libraries reported to be fairly broken before
  5657. # switch to ELF
  5658. _LT_TAGVAR(ld_shlibs, $1)=no
  5659. ;;
  5660. freebsd-elf*)
  5661. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5662. ;;
  5663. freebsd* | dragonfly*)
  5664. # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
  5665. # conventions
  5666. _LT_TAGVAR(ld_shlibs, $1)=yes
  5667. ;;
  5668. gnu*)
  5669. ;;
  5670. haiku*)
  5671. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5672. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5673. ;;
  5674. hpux9*)
  5675. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5676. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5677. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5678. _LT_TAGVAR(hardcode_direct, $1)=yes
  5679. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  5680. # but as the default
  5681. # location of the library.
  5682. case $cc_basename in
  5683. CC*)
  5684. # FIXME: insert proper C++ library support
  5685. _LT_TAGVAR(ld_shlibs, $1)=no
  5686. ;;
  5687. aCC*)
  5688. _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'
  5689. # Commands to make compiler produce verbose output that lists
  5690. # what "hidden" libraries, object files and flags are used when
  5691. # linking a shared library.
  5692. #
  5693. # There doesn't appear to be a way to prevent this compiler from
  5694. # explicitly linking system object files so we need to strip them
  5695. # from the output so that they don't get included in the library
  5696. # dependencies.
  5697. 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"'
  5698. ;;
  5699. *)
  5700. if test "$GXX" = yes; then
  5701. _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'
  5702. else
  5703. # FIXME: insert proper C++ library support
  5704. _LT_TAGVAR(ld_shlibs, $1)=no
  5705. fi
  5706. ;;
  5707. esac
  5708. ;;
  5709. hpux10*|hpux11*)
  5710. if test $with_gnu_ld = no; then
  5711. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5712. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5713. case $host_cpu in
  5714. hppa*64*|ia64*)
  5715. ;;
  5716. *)
  5717. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5718. ;;
  5719. esac
  5720. fi
  5721. case $host_cpu in
  5722. hppa*64*|ia64*)
  5723. _LT_TAGVAR(hardcode_direct, $1)=no
  5724. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5725. ;;
  5726. *)
  5727. _LT_TAGVAR(hardcode_direct, $1)=yes
  5728. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5729. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  5730. # but as the default
  5731. # location of the library.
  5732. ;;
  5733. esac
  5734. case $cc_basename in
  5735. CC*)
  5736. # FIXME: insert proper C++ library support
  5737. _LT_TAGVAR(ld_shlibs, $1)=no
  5738. ;;
  5739. aCC*)
  5740. case $host_cpu in
  5741. hppa*64*)
  5742. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5743. ;;
  5744. ia64*)
  5745. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5746. ;;
  5747. *)
  5748. _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'
  5749. ;;
  5750. esac
  5751. # Commands to make compiler produce verbose output that lists
  5752. # what "hidden" libraries, object files and flags are used when
  5753. # linking a shared library.
  5754. #
  5755. # There doesn't appear to be a way to prevent this compiler from
  5756. # explicitly linking system object files so we need to strip them
  5757. # from the output so that they don't get included in the library
  5758. # dependencies.
  5759. 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"'
  5760. ;;
  5761. *)
  5762. if test "$GXX" = yes; then
  5763. if test $with_gnu_ld = no; then
  5764. case $host_cpu in
  5765. hppa*64*)
  5766. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5767. ;;
  5768. ia64*)
  5769. _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'
  5770. ;;
  5771. *)
  5772. _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'
  5773. ;;
  5774. esac
  5775. fi
  5776. else
  5777. # FIXME: insert proper C++ library support
  5778. _LT_TAGVAR(ld_shlibs, $1)=no
  5779. fi
  5780. ;;
  5781. esac
  5782. ;;
  5783. interix[[3-9]]*)
  5784. _LT_TAGVAR(hardcode_direct, $1)=no
  5785. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5786. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5787. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5788. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  5789. # Instead, shared libraries are loaded at an image base (0x10000000 by
  5790. # default) and relocated if they conflict, which is a slow very memory
  5791. # consuming and fragmenting process. To avoid this, we pick a random,
  5792. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  5793. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  5794. _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'
  5795. _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'
  5796. ;;
  5797. irix5* | irix6*)
  5798. case $cc_basename in
  5799. CC*)
  5800. # SGI C++
  5801. _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'
  5802. # Archives containing C++ object files must be created using
  5803. # "CC -ar", where "CC" is the IRIX C++ compiler. This is
  5804. # necessary to make sure instantiated templates are included
  5805. # in the archive.
  5806. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
  5807. ;;
  5808. *)
  5809. if test "$GXX" = yes; then
  5810. if test "$with_gnu_ld" = no; then
  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"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  5812. else
  5813. _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'
  5814. fi
  5815. fi
  5816. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5817. ;;
  5818. esac
  5819. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5820. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5821. _LT_TAGVAR(inherit_rpath, $1)=yes
  5822. ;;
  5823. linux* | k*bsd*-gnu | kopensolaris*-gnu)
  5824. case $cc_basename in
  5825. KCC*)
  5826. # Kuck and Associates, Inc. (KAI) C++ Compiler
  5827. # KCC will only create a shared library if the output file
  5828. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  5829. # to its proper name (with version) after linking.
  5830. _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'
  5831. _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'
  5832. # Commands to make compiler produce verbose output that lists
  5833. # what "hidden" libraries, object files and flags are used when
  5834. # linking a shared library.
  5835. #
  5836. # There doesn't appear to be a way to prevent this compiler from
  5837. # explicitly linking system object files so we need to strip them
  5838. # from the output so that they don't get included in the library
  5839. # dependencies.
  5840. 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"'
  5841. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5842. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5843. # Archives containing C++ object files must be created using
  5844. # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  5845. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  5846. ;;
  5847. icpc* | ecpc* )
  5848. # Intel C++
  5849. with_gnu_ld=yes
  5850. # version 8.0 and above of icpc choke on multiply defined symbols
  5851. # if we add $predep_objects and $postdep_objects, however 7.1 and
  5852. # earlier do not add the objects themselves.
  5853. case `$CC -V 2>&1` in
  5854. *"Version 7."*)
  5855. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5856. _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'
  5857. ;;
  5858. *) # Version 8.0 or newer
  5859. tmp_idyn=
  5860. case $host_cpu in
  5861. ia64*) tmp_idyn=' -i_dynamic';;
  5862. esac
  5863. _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5864. _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'
  5865. ;;
  5866. esac
  5867. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5868. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5869. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5870. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  5871. ;;
  5872. pgCC* | pgcpp*)
  5873. # Portland Group C++ compiler
  5874. case `$CC -V` in
  5875. *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
  5876. _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
  5877. rm -rf $tpldir~
  5878. $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
  5879. compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
  5880. _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
  5881. rm -rf $tpldir~
  5882. $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
  5883. $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
  5884. $RANLIB $oldlib'
  5885. _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
  5886. rm -rf $tpldir~
  5887. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  5888. $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
  5889. _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
  5890. rm -rf $tpldir~
  5891. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  5892. $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'
  5893. ;;
  5894. *) # Version 6 and above use weak symbols
  5895. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
  5896. _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'
  5897. ;;
  5898. esac
  5899. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
  5900. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5901. _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'
  5902. ;;
  5903. cxx*)
  5904. # Compaq C++
  5905. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5906. _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'
  5907. runpath_var=LD_RUN_PATH
  5908. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  5909. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5910. # Commands to make compiler produce verbose output that lists
  5911. # what "hidden" libraries, object files and flags are used when
  5912. # linking a shared library.
  5913. #
  5914. # There doesn't appear to be a way to prevent this compiler from
  5915. # explicitly linking system object files so we need to strip them
  5916. # from the output so that they don't get included in the library
  5917. # dependencies.
  5918. 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'
  5919. ;;
  5920. xl* | mpixl* | bgxl*)
  5921. # IBM XL 8.0 on PPC, with GNU ld
  5922. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5923. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5924. _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5925. if test "x$supports_anon_versioning" = xyes; then
  5926. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  5927. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  5928. echo "local: *; };" >> $output_objdir/$libname.ver~
  5929. $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  5930. fi
  5931. ;;
  5932. *)
  5933. case `$CC -V 2>&1 | sed 5q` in
  5934. *Sun\ C*)
  5935. # Sun C++ 5.9
  5936. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  5937. _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5938. _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'
  5939. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5940. _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'
  5941. _LT_TAGVAR(compiler_needs_object, $1)=yes
  5942. # Not sure whether something based on
  5943. # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
  5944. # would be better.
  5945. output_verbose_link_cmd='func_echo_all'
  5946. # Archives containing C++ object files must be created using
  5947. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  5948. # necessary to make sure instantiated templates are included
  5949. # in the archive.
  5950. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  5951. ;;
  5952. esac
  5953. ;;
  5954. esac
  5955. ;;
  5956. lynxos*)
  5957. # FIXME: insert proper C++ library support
  5958. _LT_TAGVAR(ld_shlibs, $1)=no
  5959. ;;
  5960. m88k*)
  5961. # FIXME: insert proper C++ library support
  5962. _LT_TAGVAR(ld_shlibs, $1)=no
  5963. ;;
  5964. mvs*)
  5965. case $cc_basename in
  5966. cxx*)
  5967. # FIXME: insert proper C++ library support
  5968. _LT_TAGVAR(ld_shlibs, $1)=no
  5969. ;;
  5970. *)
  5971. # FIXME: insert proper C++ library support
  5972. _LT_TAGVAR(ld_shlibs, $1)=no
  5973. ;;
  5974. esac
  5975. ;;
  5976. netbsd*)
  5977. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  5978. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
  5979. wlarc=
  5980. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5981. _LT_TAGVAR(hardcode_direct, $1)=yes
  5982. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5983. fi
  5984. # Workaround some broken pre-1.5 toolchains
  5985. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
  5986. ;;
  5987. *nto* | *qnx*)
  5988. _LT_TAGVAR(ld_shlibs, $1)=yes
  5989. ;;
  5990. openbsd2*)
  5991. # C++ shared libraries are fairly broken
  5992. _LT_TAGVAR(ld_shlibs, $1)=no
  5993. ;;
  5994. openbsd*)
  5995. if test -f /usr/libexec/ld.so; then
  5996. _LT_TAGVAR(hardcode_direct, $1)=yes
  5997. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5998. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5999. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  6000. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  6001. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  6002. _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'
  6003. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  6004. _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  6005. fi
  6006. output_verbose_link_cmd=func_echo_all
  6007. else
  6008. _LT_TAGVAR(ld_shlibs, $1)=no
  6009. fi
  6010. ;;
  6011. osf3* | osf4* | osf5*)
  6012. case $cc_basename in
  6013. KCC*)
  6014. # Kuck and Associates, Inc. (KAI) C++ Compiler
  6015. # KCC will only create a shared library if the output file
  6016. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  6017. # to its proper name (with version) after linking.
  6018. _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'
  6019. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  6020. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6021. # Archives containing C++ object files must be created using
  6022. # the KAI C++ compiler.
  6023. case $host in
  6024. osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
  6025. *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
  6026. esac
  6027. ;;
  6028. RCC*)
  6029. # Rational C++ 2.4.1
  6030. # FIXME: insert proper C++ library support
  6031. _LT_TAGVAR(ld_shlibs, $1)=no
  6032. ;;
  6033. cxx*)
  6034. case $host in
  6035. osf3*)
  6036. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  6037. _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'
  6038. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6039. ;;
  6040. *)
  6041. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  6042. _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'
  6043. _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
  6044. echo "-hidden">> $lib.exp~
  6045. $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~
  6046. $RM $lib.exp'
  6047. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  6048. ;;
  6049. esac
  6050. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6051. # Commands to make compiler produce verbose output that lists
  6052. # what "hidden" libraries, object files and flags are used when
  6053. # linking a shared library.
  6054. #
  6055. # There doesn't appear to be a way to prevent this compiler from
  6056. # explicitly linking system object files so we need to strip them
  6057. # from the output so that they don't get included in the library
  6058. # dependencies.
  6059. 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"'
  6060. ;;
  6061. *)
  6062. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  6063. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  6064. case $host in
  6065. osf3*)
  6066. _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'
  6067. ;;
  6068. *)
  6069. _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'
  6070. ;;
  6071. esac
  6072. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6073. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6074. # Commands to make compiler produce verbose output that lists
  6075. # what "hidden" libraries, object files and flags are used when
  6076. # linking a shared library.
  6077. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  6078. else
  6079. # FIXME: insert proper C++ library support
  6080. _LT_TAGVAR(ld_shlibs, $1)=no
  6081. fi
  6082. ;;
  6083. esac
  6084. ;;
  6085. psos*)
  6086. # FIXME: insert proper C++ library support
  6087. _LT_TAGVAR(ld_shlibs, $1)=no
  6088. ;;
  6089. sunos4*)
  6090. case $cc_basename in
  6091. CC*)
  6092. # Sun C++ 4.x
  6093. # FIXME: insert proper C++ library support
  6094. _LT_TAGVAR(ld_shlibs, $1)=no
  6095. ;;
  6096. lcc*)
  6097. # Lucid
  6098. # FIXME: insert proper C++ library support
  6099. _LT_TAGVAR(ld_shlibs, $1)=no
  6100. ;;
  6101. *)
  6102. # FIXME: insert proper C++ library support
  6103. _LT_TAGVAR(ld_shlibs, $1)=no
  6104. ;;
  6105. esac
  6106. ;;
  6107. solaris*)
  6108. case $cc_basename in
  6109. CC* | sunCC*)
  6110. # Sun C++ 4.2, 5.x and Centerline C++
  6111. _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
  6112. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  6113. _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6114. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6115. $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'
  6116. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6117. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6118. case $host_os in
  6119. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6120. *)
  6121. # The compiler driver will combine and reorder linker options,
  6122. # but understands `-z linker_flag'.
  6123. # Supported since Solaris 2.6 (maybe 2.5.1?)
  6124. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  6125. ;;
  6126. esac
  6127. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6128. output_verbose_link_cmd='func_echo_all'
  6129. # Archives containing C++ object files must be created using
  6130. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  6131. # necessary to make sure instantiated templates are included
  6132. # in the archive.
  6133. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  6134. ;;
  6135. gcx*)
  6136. # Green Hills C++ Compiler
  6137. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  6138. # The C++ compiler must be used to create the archive.
  6139. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
  6140. ;;
  6141. *)
  6142. # GNU C++ compiler with Solaris linker
  6143. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  6144. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
  6145. if $CC --version | $GREP -v '^2\.7' > /dev/null; then
  6146. _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'
  6147. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6148. $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  6149. # Commands to make compiler produce verbose output that lists
  6150. # what "hidden" libraries, object files and flags are used when
  6151. # linking a shared library.
  6152. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  6153. else
  6154. # g++ 2.7 appears to require `-G' NOT `-shared' on this
  6155. # platform.
  6156. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  6157. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6158. $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  6159. # Commands to make compiler produce verbose output that lists
  6160. # what "hidden" libraries, object files and flags are used when
  6161. # linking a shared library.
  6162. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  6163. fi
  6164. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
  6165. case $host_os in
  6166. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6167. *)
  6168. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
  6169. ;;
  6170. esac
  6171. fi
  6172. ;;
  6173. esac
  6174. ;;
  6175. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  6176. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  6177. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6178. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6179. runpath_var='LD_RUN_PATH'
  6180. case $cc_basename in
  6181. CC*)
  6182. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6183. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6184. ;;
  6185. *)
  6186. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6187. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6188. ;;
  6189. esac
  6190. ;;
  6191. sysv5* | sco3.2v5* | sco5v6*)
  6192. # Note: We can NOT use -z defs as we might desire, because we do not
  6193. # link with -lc, and that would cause any symbols used from libc to
  6194. # always be unresolved, which means just about no library would
  6195. # ever link correctly. If we're not using GNU ld we use -z text
  6196. # though, which does catch some bad symbols but isn't as heavy-handed
  6197. # as -z defs.
  6198. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  6199. _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
  6200. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6201. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6202. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
  6203. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  6204. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6205. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  6206. runpath_var='LD_RUN_PATH'
  6207. case $cc_basename in
  6208. CC*)
  6209. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6210. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6211. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
  6212. '"$_LT_TAGVAR(old_archive_cmds, $1)"
  6213. _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
  6214. '"$_LT_TAGVAR(reload_cmds, $1)"
  6215. ;;
  6216. *)
  6217. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6218. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6219. ;;
  6220. esac
  6221. ;;
  6222. tandem*)
  6223. case $cc_basename in
  6224. NCC*)
  6225. # NonStop-UX NCC 3.20
  6226. # FIXME: insert proper C++ library support
  6227. _LT_TAGVAR(ld_shlibs, $1)=no
  6228. ;;
  6229. *)
  6230. # FIXME: insert proper C++ library support
  6231. _LT_TAGVAR(ld_shlibs, $1)=no
  6232. ;;
  6233. esac
  6234. ;;
  6235. vxworks*)
  6236. # FIXME: insert proper C++ library support
  6237. _LT_TAGVAR(ld_shlibs, $1)=no
  6238. ;;
  6239. *)
  6240. # FIXME: insert proper C++ library support
  6241. _LT_TAGVAR(ld_shlibs, $1)=no
  6242. ;;
  6243. esac
  6244. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  6245. test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  6246. _LT_TAGVAR(GCC, $1)="$GXX"
  6247. _LT_TAGVAR(LD, $1)="$LD"
  6248. ## CAVEAT EMPTOR:
  6249. ## There is no encapsulation within the following macros, do not change
  6250. ## the running order or otherwise move them around unless you know exactly
  6251. ## what you are doing...
  6252. _LT_SYS_HIDDEN_LIBDEPS($1)
  6253. _LT_COMPILER_PIC($1)
  6254. _LT_COMPILER_C_O($1)
  6255. _LT_COMPILER_FILE_LOCKS($1)
  6256. _LT_LINKER_SHLIBS($1)
  6257. _LT_SYS_DYNAMIC_LINKER($1)
  6258. _LT_LINKER_HARDCODE_LIBPATH($1)
  6259. _LT_CONFIG($1)
  6260. fi # test -n "$compiler"
  6261. CC=$lt_save_CC
  6262. CFLAGS=$lt_save_CFLAGS
  6263. LDCXX=$LD
  6264. LD=$lt_save_LD
  6265. GCC=$lt_save_GCC
  6266. with_gnu_ld=$lt_save_with_gnu_ld
  6267. lt_cv_path_LDCXX=$lt_cv_path_LD
  6268. lt_cv_path_LD=$lt_save_path_LD
  6269. lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
  6270. lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
  6271. fi # test "$_lt_caught_CXX_error" != yes
  6272. AC_LANG_POP
  6273. ])# _LT_LANG_CXX_CONFIG
  6274. # _LT_FUNC_STRIPNAME_CNF
  6275. # ----------------------
  6276. # func_stripname_cnf prefix suffix name
  6277. # strip PREFIX and SUFFIX off of NAME.
  6278. # PREFIX and SUFFIX must not contain globbing or regex special
  6279. # characters, hashes, percent signs, but SUFFIX may contain a leading
  6280. # dot (in which case that matches only a dot).
  6281. #
  6282. # This function is identical to the (non-XSI) version of func_stripname,
  6283. # except this one can be used by m4 code that may be executed by configure,
  6284. # rather than the libtool script.
  6285. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
  6286. AC_REQUIRE([_LT_DECL_SED])
  6287. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
  6288. func_stripname_cnf ()
  6289. {
  6290. case ${2} in
  6291. .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
  6292. *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
  6293. esac
  6294. } # func_stripname_cnf
  6295. ])# _LT_FUNC_STRIPNAME_CNF
  6296. # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
  6297. # ---------------------------------
  6298. # Figure out "hidden" library dependencies from verbose
  6299. # compiler output when linking a shared library.
  6300. # Parse the compiler output and extract the necessary
  6301. # objects, libraries and library flags.
  6302. m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
  6303. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  6304. AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
  6305. # Dependencies to place before and after the object being linked:
  6306. _LT_TAGVAR(predep_objects, $1)=
  6307. _LT_TAGVAR(postdep_objects, $1)=
  6308. _LT_TAGVAR(predeps, $1)=
  6309. _LT_TAGVAR(postdeps, $1)=
  6310. _LT_TAGVAR(compiler_lib_search_path, $1)=
  6311. dnl we can't use the lt_simple_compile_test_code here,
  6312. dnl because it contains code intended for an executable,
  6313. dnl not a library. It's possible we should let each
  6314. dnl tag define a new lt_????_link_test_code variable,
  6315. dnl but it's only used here...
  6316. m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
  6317. int a;
  6318. void foo (void) { a = 0; }
  6319. _LT_EOF
  6320. ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
  6321. class Foo
  6322. {
  6323. public:
  6324. Foo (void) { a = 0; }
  6325. private:
  6326. int a;
  6327. };
  6328. _LT_EOF
  6329. ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
  6330. subroutine foo
  6331. implicit none
  6332. integer*4 a
  6333. a=0
  6334. return
  6335. end
  6336. _LT_EOF
  6337. ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
  6338. subroutine foo
  6339. implicit none
  6340. integer a
  6341. a=0
  6342. return
  6343. end
  6344. _LT_EOF
  6345. ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
  6346. public class foo {
  6347. private int a;
  6348. public void bar (void) {
  6349. a = 0;
  6350. }
  6351. };
  6352. _LT_EOF
  6353. ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
  6354. package foo
  6355. func foo() {
  6356. }
  6357. _LT_EOF
  6358. ])
  6359. _lt_libdeps_save_CFLAGS=$CFLAGS
  6360. case "$CC $CFLAGS " in #(
  6361. *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
  6362. *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
  6363. *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
  6364. esac
  6365. dnl Parse the compiler output and extract the necessary
  6366. dnl objects, libraries and library flags.
  6367. if AC_TRY_EVAL(ac_compile); then
  6368. # Parse the compiler output and extract the necessary
  6369. # objects, libraries and library flags.
  6370. # Sentinel used to keep track of whether or not we are before
  6371. # the conftest object file.
  6372. pre_test_object_deps_done=no
  6373. for p in `eval "$output_verbose_link_cmd"`; do
  6374. case ${prev}${p} in
  6375. -L* | -R* | -l*)
  6376. # Some compilers place space between "-{L,R}" and the path.
  6377. # Remove the space.
  6378. if test $p = "-L" ||
  6379. test $p = "-R"; then
  6380. prev=$p
  6381. continue
  6382. fi
  6383. # Expand the sysroot to ease extracting the directories later.
  6384. if test -z "$prev"; then
  6385. case $p in
  6386. -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
  6387. -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
  6388. -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
  6389. esac
  6390. fi
  6391. case $p in
  6392. =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
  6393. esac
  6394. if test "$pre_test_object_deps_done" = no; then
  6395. case ${prev} in
  6396. -L | -R)
  6397. # Internal compiler library paths should come after those
  6398. # provided the user. The postdeps already come after the
  6399. # user supplied libs so there is no need to process them.
  6400. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
  6401. _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
  6402. else
  6403. _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
  6404. fi
  6405. ;;
  6406. # The "-l" case would never come before the object being
  6407. # linked, so don't bother handling this case.
  6408. esac
  6409. else
  6410. if test -z "$_LT_TAGVAR(postdeps, $1)"; then
  6411. _LT_TAGVAR(postdeps, $1)="${prev}${p}"
  6412. else
  6413. _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
  6414. fi
  6415. fi
  6416. prev=
  6417. ;;
  6418. *.lto.$objext) ;; # Ignore GCC LTO objects
  6419. *.$objext)
  6420. # This assumes that the test object file only shows up
  6421. # once in the compiler output.
  6422. if test "$p" = "conftest.$objext"; then
  6423. pre_test_object_deps_done=yes
  6424. continue
  6425. fi
  6426. if test "$pre_test_object_deps_done" = no; then
  6427. if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
  6428. _LT_TAGVAR(predep_objects, $1)="$p"
  6429. else
  6430. _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
  6431. fi
  6432. else
  6433. if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
  6434. _LT_TAGVAR(postdep_objects, $1)="$p"
  6435. else
  6436. _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
  6437. fi
  6438. fi
  6439. ;;
  6440. *) ;; # Ignore the rest.
  6441. esac
  6442. done
  6443. # Clean up.
  6444. rm -f a.out a.exe
  6445. else
  6446. echo "libtool.m4: error: problem compiling $1 test program"
  6447. fi
  6448. $RM -f confest.$objext
  6449. CFLAGS=$_lt_libdeps_save_CFLAGS
  6450. # PORTME: override above test on systems where it is broken
  6451. m4_if([$1], [CXX],
  6452. [case $host_os in
  6453. interix[[3-9]]*)
  6454. # Interix 3.5 installs completely hosed .la files for C++, so rather than
  6455. # hack all around it, let's just trust "g++" to DTRT.
  6456. _LT_TAGVAR(predep_objects,$1)=
  6457. _LT_TAGVAR(postdep_objects,$1)=
  6458. _LT_TAGVAR(postdeps,$1)=
  6459. ;;
  6460. linux*)
  6461. case `$CC -V 2>&1 | sed 5q` in
  6462. *Sun\ C*)
  6463. # Sun C++ 5.9
  6464. # The more standards-conforming stlport4 library is
  6465. # incompatible with the Cstd library. Avoid specifying
  6466. # it if it's in CXXFLAGS. Ignore libCrun as
  6467. # -library=stlport4 depends on it.
  6468. case " $CXX $CXXFLAGS " in
  6469. *" -library=stlport4 "*)
  6470. solaris_use_stlport4=yes
  6471. ;;
  6472. esac
  6473. if test "$solaris_use_stlport4" != yes; then
  6474. _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
  6475. fi
  6476. ;;
  6477. esac
  6478. ;;
  6479. solaris*)
  6480. case $cc_basename in
  6481. CC* | sunCC*)
  6482. # The more standards-conforming stlport4 library is
  6483. # incompatible with the Cstd library. Avoid specifying
  6484. # it if it's in CXXFLAGS. Ignore libCrun as
  6485. # -library=stlport4 depends on it.
  6486. case " $CXX $CXXFLAGS " in
  6487. *" -library=stlport4 "*)
  6488. solaris_use_stlport4=yes
  6489. ;;
  6490. esac
  6491. # Adding this requires a known-good setup of shared libraries for
  6492. # Sun compiler versions before 5.6, else PIC objects from an old
  6493. # archive will be linked into the output, leading to subtle bugs.
  6494. if test "$solaris_use_stlport4" != yes; then
  6495. _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
  6496. fi
  6497. ;;
  6498. esac
  6499. ;;
  6500. esac
  6501. ])
  6502. case " $_LT_TAGVAR(postdeps, $1) " in
  6503. *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
  6504. esac
  6505. _LT_TAGVAR(compiler_lib_search_dirs, $1)=
  6506. if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
  6507. _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
  6508. fi
  6509. _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
  6510. [The directories searched by this compiler when creating a shared library])
  6511. _LT_TAGDECL([], [predep_objects], [1],
  6512. [Dependencies to place before and after the objects being linked to
  6513. create a shared library])
  6514. _LT_TAGDECL([], [postdep_objects], [1])
  6515. _LT_TAGDECL([], [predeps], [1])
  6516. _LT_TAGDECL([], [postdeps], [1])
  6517. _LT_TAGDECL([], [compiler_lib_search_path], [1],
  6518. [The library search path used internally by the compiler when linking
  6519. a shared library])
  6520. ])# _LT_SYS_HIDDEN_LIBDEPS
  6521. # _LT_LANG_F77_CONFIG([TAG])
  6522. # --------------------------
  6523. # Ensure that the configuration variables for a Fortran 77 compiler are
  6524. # suitably defined. These variables are subsequently used by _LT_CONFIG
  6525. # to write the compiler configuration to `libtool'.
  6526. m4_defun([_LT_LANG_F77_CONFIG],
  6527. [AC_LANG_PUSH(Fortran 77)
  6528. if test -z "$F77" || test "X$F77" = "Xno"; then
  6529. _lt_disable_F77=yes
  6530. fi
  6531. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6532. _LT_TAGVAR(allow_undefined_flag, $1)=
  6533. _LT_TAGVAR(always_export_symbols, $1)=no
  6534. _LT_TAGVAR(archive_expsym_cmds, $1)=
  6535. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  6536. _LT_TAGVAR(hardcode_direct, $1)=no
  6537. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  6538. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  6539. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  6540. _LT_TAGVAR(hardcode_minus_L, $1)=no
  6541. _LT_TAGVAR(hardcode_automatic, $1)=no
  6542. _LT_TAGVAR(inherit_rpath, $1)=no
  6543. _LT_TAGVAR(module_cmds, $1)=
  6544. _LT_TAGVAR(module_expsym_cmds, $1)=
  6545. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  6546. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  6547. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  6548. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  6549. _LT_TAGVAR(no_undefined_flag, $1)=
  6550. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  6551. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  6552. # Source file extension for f77 test sources.
  6553. ac_ext=f
  6554. # Object file extension for compiled f77 test sources.
  6555. objext=o
  6556. _LT_TAGVAR(objext, $1)=$objext
  6557. # No sense in running all these tests if we already determined that
  6558. # the F77 compiler isn't working. Some variables (like enable_shared)
  6559. # are currently assumed to apply to all compilers on this platform,
  6560. # and will be corrupted by setting them based on a non-working compiler.
  6561. if test "$_lt_disable_F77" != yes; then
  6562. # Code to be used in simple compile tests
  6563. lt_simple_compile_test_code="\
  6564. subroutine t
  6565. return
  6566. end
  6567. "
  6568. # Code to be used in simple link tests
  6569. lt_simple_link_test_code="\
  6570. program t
  6571. end
  6572. "
  6573. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6574. _LT_TAG_COMPILER
  6575. # save warnings/boilerplate of simple test code
  6576. _LT_COMPILER_BOILERPLATE
  6577. _LT_LINKER_BOILERPLATE
  6578. # Allow CC to be a program name with arguments.
  6579. lt_save_CC="$CC"
  6580. lt_save_GCC=$GCC
  6581. lt_save_CFLAGS=$CFLAGS
  6582. CC=${F77-"f77"}
  6583. CFLAGS=$FFLAGS
  6584. compiler=$CC
  6585. _LT_TAGVAR(compiler, $1)=$CC
  6586. _LT_CC_BASENAME([$compiler])
  6587. GCC=$G77
  6588. if test -n "$compiler"; then
  6589. AC_MSG_CHECKING([if libtool supports shared libraries])
  6590. AC_MSG_RESULT([$can_build_shared])
  6591. AC_MSG_CHECKING([whether to build shared libraries])
  6592. test "$can_build_shared" = "no" && enable_shared=no
  6593. # On AIX, shared libraries and static libraries use the same namespace, and
  6594. # are all built from PIC.
  6595. case $host_os in
  6596. aix3*)
  6597. test "$enable_shared" = yes && enable_static=no
  6598. if test -n "$RANLIB"; then
  6599. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  6600. postinstall_cmds='$RANLIB $lib'
  6601. fi
  6602. ;;
  6603. aix[[4-9]]*)
  6604. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  6605. test "$enable_shared" = yes && enable_static=no
  6606. fi
  6607. ;;
  6608. esac
  6609. AC_MSG_RESULT([$enable_shared])
  6610. AC_MSG_CHECKING([whether to build static libraries])
  6611. # Make sure either enable_shared or enable_static is yes.
  6612. test "$enable_shared" = yes || enable_static=yes
  6613. AC_MSG_RESULT([$enable_static])
  6614. _LT_TAGVAR(GCC, $1)="$G77"
  6615. _LT_TAGVAR(LD, $1)="$LD"
  6616. ## CAVEAT EMPTOR:
  6617. ## There is no encapsulation within the following macros, do not change
  6618. ## the running order or otherwise move them around unless you know exactly
  6619. ## what you are doing...
  6620. _LT_COMPILER_PIC($1)
  6621. _LT_COMPILER_C_O($1)
  6622. _LT_COMPILER_FILE_LOCKS($1)
  6623. _LT_LINKER_SHLIBS($1)
  6624. _LT_SYS_DYNAMIC_LINKER($1)
  6625. _LT_LINKER_HARDCODE_LIBPATH($1)
  6626. _LT_CONFIG($1)
  6627. fi # test -n "$compiler"
  6628. GCC=$lt_save_GCC
  6629. CC="$lt_save_CC"
  6630. CFLAGS="$lt_save_CFLAGS"
  6631. fi # test "$_lt_disable_F77" != yes
  6632. AC_LANG_POP
  6633. ])# _LT_LANG_F77_CONFIG
  6634. # _LT_LANG_FC_CONFIG([TAG])
  6635. # -------------------------
  6636. # Ensure that the configuration variables for a Fortran compiler are
  6637. # suitably defined. These variables are subsequently used by _LT_CONFIG
  6638. # to write the compiler configuration to `libtool'.
  6639. m4_defun([_LT_LANG_FC_CONFIG],
  6640. [AC_LANG_PUSH(Fortran)
  6641. if test -z "$FC" || test "X$FC" = "Xno"; then
  6642. _lt_disable_FC=yes
  6643. fi
  6644. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6645. _LT_TAGVAR(allow_undefined_flag, $1)=
  6646. _LT_TAGVAR(always_export_symbols, $1)=no
  6647. _LT_TAGVAR(archive_expsym_cmds, $1)=
  6648. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  6649. _LT_TAGVAR(hardcode_direct, $1)=no
  6650. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  6651. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  6652. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  6653. _LT_TAGVAR(hardcode_minus_L, $1)=no
  6654. _LT_TAGVAR(hardcode_automatic, $1)=no
  6655. _LT_TAGVAR(inherit_rpath, $1)=no
  6656. _LT_TAGVAR(module_cmds, $1)=
  6657. _LT_TAGVAR(module_expsym_cmds, $1)=
  6658. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  6659. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  6660. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  6661. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  6662. _LT_TAGVAR(no_undefined_flag, $1)=
  6663. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  6664. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  6665. # Source file extension for fc test sources.
  6666. ac_ext=${ac_fc_srcext-f}
  6667. # Object file extension for compiled fc test sources.
  6668. objext=o
  6669. _LT_TAGVAR(objext, $1)=$objext
  6670. # No sense in running all these tests if we already determined that
  6671. # the FC compiler isn't working. Some variables (like enable_shared)
  6672. # are currently assumed to apply to all compilers on this platform,
  6673. # and will be corrupted by setting them based on a non-working compiler.
  6674. if test "$_lt_disable_FC" != yes; then
  6675. # Code to be used in simple compile tests
  6676. lt_simple_compile_test_code="\
  6677. subroutine t
  6678. return
  6679. end
  6680. "
  6681. # Code to be used in simple link tests
  6682. lt_simple_link_test_code="\
  6683. program t
  6684. end
  6685. "
  6686. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6687. _LT_TAG_COMPILER
  6688. # save warnings/boilerplate of simple test code
  6689. _LT_COMPILER_BOILERPLATE
  6690. _LT_LINKER_BOILERPLATE
  6691. # Allow CC to be a program name with arguments.
  6692. lt_save_CC="$CC"
  6693. lt_save_GCC=$GCC
  6694. lt_save_CFLAGS=$CFLAGS
  6695. CC=${FC-"f95"}
  6696. CFLAGS=$FCFLAGS
  6697. compiler=$CC
  6698. GCC=$ac_cv_fc_compiler_gnu
  6699. _LT_TAGVAR(compiler, $1)=$CC
  6700. _LT_CC_BASENAME([$compiler])
  6701. if test -n "$compiler"; then
  6702. AC_MSG_CHECKING([if libtool supports shared libraries])
  6703. AC_MSG_RESULT([$can_build_shared])
  6704. AC_MSG_CHECKING([whether to build shared libraries])
  6705. test "$can_build_shared" = "no" && enable_shared=no
  6706. # On AIX, shared libraries and static libraries use the same namespace, and
  6707. # are all built from PIC.
  6708. case $host_os in
  6709. aix3*)
  6710. test "$enable_shared" = yes && enable_static=no
  6711. if test -n "$RANLIB"; then
  6712. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  6713. postinstall_cmds='$RANLIB $lib'
  6714. fi
  6715. ;;
  6716. aix[[4-9]]*)
  6717. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  6718. test "$enable_shared" = yes && enable_static=no
  6719. fi
  6720. ;;
  6721. esac
  6722. AC_MSG_RESULT([$enable_shared])
  6723. AC_MSG_CHECKING([whether to build static libraries])
  6724. # Make sure either enable_shared or enable_static is yes.
  6725. test "$enable_shared" = yes || enable_static=yes
  6726. AC_MSG_RESULT([$enable_static])
  6727. _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
  6728. _LT_TAGVAR(LD, $1)="$LD"
  6729. ## CAVEAT EMPTOR:
  6730. ## There is no encapsulation within the following macros, do not change
  6731. ## the running order or otherwise move them around unless you know exactly
  6732. ## what you are doing...
  6733. _LT_SYS_HIDDEN_LIBDEPS($1)
  6734. _LT_COMPILER_PIC($1)
  6735. _LT_COMPILER_C_O($1)
  6736. _LT_COMPILER_FILE_LOCKS($1)
  6737. _LT_LINKER_SHLIBS($1)
  6738. _LT_SYS_DYNAMIC_LINKER($1)
  6739. _LT_LINKER_HARDCODE_LIBPATH($1)
  6740. _LT_CONFIG($1)
  6741. fi # test -n "$compiler"
  6742. GCC=$lt_save_GCC
  6743. CC=$lt_save_CC
  6744. CFLAGS=$lt_save_CFLAGS
  6745. fi # test "$_lt_disable_FC" != yes
  6746. AC_LANG_POP
  6747. ])# _LT_LANG_FC_CONFIG
  6748. # _LT_LANG_GCJ_CONFIG([TAG])
  6749. # --------------------------
  6750. # Ensure that the configuration variables for the GNU Java Compiler compiler
  6751. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  6752. # to write the compiler configuration to `libtool'.
  6753. m4_defun([_LT_LANG_GCJ_CONFIG],
  6754. [AC_REQUIRE([LT_PROG_GCJ])dnl
  6755. AC_LANG_SAVE
  6756. # Source file extension for Java test sources.
  6757. ac_ext=java
  6758. # Object file extension for compiled Java test sources.
  6759. objext=o
  6760. _LT_TAGVAR(objext, $1)=$objext
  6761. # Code to be used in simple compile tests
  6762. lt_simple_compile_test_code="class foo {}"
  6763. # Code to be used in simple link tests
  6764. lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
  6765. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6766. _LT_TAG_COMPILER
  6767. # save warnings/boilerplate of simple test code
  6768. _LT_COMPILER_BOILERPLATE
  6769. _LT_LINKER_BOILERPLATE
  6770. # Allow CC to be a program name with arguments.
  6771. lt_save_CC=$CC
  6772. lt_save_CFLAGS=$CFLAGS
  6773. lt_save_GCC=$GCC
  6774. GCC=yes
  6775. CC=${GCJ-"gcj"}
  6776. CFLAGS=$GCJFLAGS
  6777. compiler=$CC
  6778. _LT_TAGVAR(compiler, $1)=$CC
  6779. _LT_TAGVAR(LD, $1)="$LD"
  6780. _LT_CC_BASENAME([$compiler])
  6781. # GCJ did not exist at the time GCC didn't implicitly link libc in.
  6782. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6783. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  6784. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  6785. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  6786. ## CAVEAT EMPTOR:
  6787. ## There is no encapsulation within the following macros, do not change
  6788. ## the running order or otherwise move them around unless you know exactly
  6789. ## what you are doing...
  6790. if test -n "$compiler"; then
  6791. _LT_COMPILER_NO_RTTI($1)
  6792. _LT_COMPILER_PIC($1)
  6793. _LT_COMPILER_C_O($1)
  6794. _LT_COMPILER_FILE_LOCKS($1)
  6795. _LT_LINKER_SHLIBS($1)
  6796. _LT_LINKER_HARDCODE_LIBPATH($1)
  6797. _LT_CONFIG($1)
  6798. fi
  6799. AC_LANG_RESTORE
  6800. GCC=$lt_save_GCC
  6801. CC=$lt_save_CC
  6802. CFLAGS=$lt_save_CFLAGS
  6803. ])# _LT_LANG_GCJ_CONFIG
  6804. # _LT_LANG_GO_CONFIG([TAG])
  6805. # --------------------------
  6806. # Ensure that the configuration variables for the GNU Go compiler
  6807. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  6808. # to write the compiler configuration to `libtool'.
  6809. m4_defun([_LT_LANG_GO_CONFIG],
  6810. [AC_REQUIRE([LT_PROG_GO])dnl
  6811. AC_LANG_SAVE
  6812. # Source file extension for Go test sources.
  6813. ac_ext=go
  6814. # Object file extension for compiled Go test sources.
  6815. objext=o
  6816. _LT_TAGVAR(objext, $1)=$objext
  6817. # Code to be used in simple compile tests
  6818. lt_simple_compile_test_code="package main; func main() { }"
  6819. # Code to be used in simple link tests
  6820. lt_simple_link_test_code='package main; func main() { }'
  6821. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6822. _LT_TAG_COMPILER
  6823. # save warnings/boilerplate of simple test code
  6824. _LT_COMPILER_BOILERPLATE
  6825. _LT_LINKER_BOILERPLATE
  6826. # Allow CC to be a program name with arguments.
  6827. lt_save_CC=$CC
  6828. lt_save_CFLAGS=$CFLAGS
  6829. lt_save_GCC=$GCC
  6830. GCC=yes
  6831. CC=${GOC-"gccgo"}
  6832. CFLAGS=$GOFLAGS
  6833. compiler=$CC
  6834. _LT_TAGVAR(compiler, $1)=$CC
  6835. _LT_TAGVAR(LD, $1)="$LD"
  6836. _LT_CC_BASENAME([$compiler])
  6837. # Go did not exist at the time GCC didn't implicitly link libc in.
  6838. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6839. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  6840. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  6841. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  6842. ## CAVEAT EMPTOR:
  6843. ## There is no encapsulation within the following macros, do not change
  6844. ## the running order or otherwise move them around unless you know exactly
  6845. ## what you are doing...
  6846. if test -n "$compiler"; then
  6847. _LT_COMPILER_NO_RTTI($1)
  6848. _LT_COMPILER_PIC($1)
  6849. _LT_COMPILER_C_O($1)
  6850. _LT_COMPILER_FILE_LOCKS($1)
  6851. _LT_LINKER_SHLIBS($1)
  6852. _LT_LINKER_HARDCODE_LIBPATH($1)
  6853. _LT_CONFIG($1)
  6854. fi
  6855. AC_LANG_RESTORE
  6856. GCC=$lt_save_GCC
  6857. CC=$lt_save_CC
  6858. CFLAGS=$lt_save_CFLAGS
  6859. ])# _LT_LANG_GO_CONFIG
  6860. # _LT_LANG_RC_CONFIG([TAG])
  6861. # -------------------------
  6862. # Ensure that the configuration variables for the Windows resource compiler
  6863. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  6864. # to write the compiler configuration to `libtool'.
  6865. m4_defun([_LT_LANG_RC_CONFIG],
  6866. [AC_REQUIRE([LT_PROG_RC])dnl
  6867. AC_LANG_SAVE
  6868. # Source file extension for RC test sources.
  6869. ac_ext=rc
  6870. # Object file extension for compiled RC test sources.
  6871. objext=o
  6872. _LT_TAGVAR(objext, $1)=$objext
  6873. # Code to be used in simple compile tests
  6874. lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
  6875. # Code to be used in simple link tests
  6876. lt_simple_link_test_code="$lt_simple_compile_test_code"
  6877. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6878. _LT_TAG_COMPILER
  6879. # save warnings/boilerplate of simple test code
  6880. _LT_COMPILER_BOILERPLATE
  6881. _LT_LINKER_BOILERPLATE
  6882. # Allow CC to be a program name with arguments.
  6883. lt_save_CC="$CC"
  6884. lt_save_CFLAGS=$CFLAGS
  6885. lt_save_GCC=$GCC
  6886. GCC=
  6887. CC=${RC-"windres"}
  6888. CFLAGS=
  6889. compiler=$CC
  6890. _LT_TAGVAR(compiler, $1)=$CC
  6891. _LT_CC_BASENAME([$compiler])
  6892. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  6893. if test -n "$compiler"; then
  6894. :
  6895. _LT_CONFIG($1)
  6896. fi
  6897. GCC=$lt_save_GCC
  6898. AC_LANG_RESTORE
  6899. CC=$lt_save_CC
  6900. CFLAGS=$lt_save_CFLAGS
  6901. ])# _LT_LANG_RC_CONFIG
  6902. # LT_PROG_GCJ
  6903. # -----------
  6904. AC_DEFUN([LT_PROG_GCJ],
  6905. [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
  6906. [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
  6907. [AC_CHECK_TOOL(GCJ, gcj,)
  6908. test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
  6909. AC_SUBST(GCJFLAGS)])])[]dnl
  6910. ])
  6911. # Old name:
  6912. AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
  6913. dnl aclocal-1.4 backwards compatibility:
  6914. dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
  6915. # LT_PROG_GO
  6916. # ----------
  6917. AC_DEFUN([LT_PROG_GO],
  6918. [AC_CHECK_TOOL(GOC, gccgo,)
  6919. ])
  6920. # LT_PROG_RC
  6921. # ----------
  6922. AC_DEFUN([LT_PROG_RC],
  6923. [AC_CHECK_TOOL(RC, windres,)
  6924. ])
  6925. # Old name:
  6926. AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
  6927. dnl aclocal-1.4 backwards compatibility:
  6928. dnl AC_DEFUN([LT_AC_PROG_RC], [])
  6929. # _LT_DECL_EGREP
  6930. # --------------
  6931. # If we don't have a new enough Autoconf to choose the best grep
  6932. # available, choose the one first in the user's PATH.
  6933. m4_defun([_LT_DECL_EGREP],
  6934. [AC_REQUIRE([AC_PROG_EGREP])dnl
  6935. AC_REQUIRE([AC_PROG_FGREP])dnl
  6936. test -z "$GREP" && GREP=grep
  6937. _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
  6938. _LT_DECL([], [EGREP], [1], [An ERE matcher])
  6939. _LT_DECL([], [FGREP], [1], [A literal string matcher])
  6940. dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
  6941. AC_SUBST([GREP])
  6942. ])
  6943. # _LT_DECL_OBJDUMP
  6944. # --------------
  6945. # If we don't have a new enough Autoconf to choose the best objdump
  6946. # available, choose the one first in the user's PATH.
  6947. m4_defun([_LT_DECL_OBJDUMP],
  6948. [AC_CHECK_TOOL(OBJDUMP, objdump, false)
  6949. test -z "$OBJDUMP" && OBJDUMP=objdump
  6950. _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
  6951. AC_SUBST([OBJDUMP])
  6952. ])
  6953. # _LT_DECL_DLLTOOL
  6954. # ----------------
  6955. # Ensure DLLTOOL variable is set.
  6956. m4_defun([_LT_DECL_DLLTOOL],
  6957. [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  6958. test -z "$DLLTOOL" && DLLTOOL=dlltool
  6959. _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
  6960. AC_SUBST([DLLTOOL])
  6961. ])
  6962. # _LT_DECL_SED
  6963. # ------------
  6964. # Check for a fully-functional sed program, that truncates
  6965. # as few characters as possible. Prefer GNU sed if found.
  6966. m4_defun([_LT_DECL_SED],
  6967. [AC_PROG_SED
  6968. test -z "$SED" && SED=sed
  6969. Xsed="$SED -e 1s/^X//"
  6970. _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
  6971. _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
  6972. [Sed that helps us avoid accidentally triggering echo(1) options like -n])
  6973. ])# _LT_DECL_SED
  6974. m4_ifndef([AC_PROG_SED], [
  6975. ############################################################
  6976. # NOTE: This macro has been submitted for inclusion into #
  6977. # GNU Autoconf as AC_PROG_SED. When it is available in #
  6978. # a released version of Autoconf we should remove this #
  6979. # macro and use it instead. #
  6980. ############################################################
  6981. m4_defun([AC_PROG_SED],
  6982. [AC_MSG_CHECKING([for a sed that does not truncate output])
  6983. AC_CACHE_VAL(lt_cv_path_SED,
  6984. [# Loop through the user's path and test for sed and gsed.
  6985. # Then use that list of sed's as ones to test for truncation.
  6986. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6987. for as_dir in $PATH
  6988. do
  6989. IFS=$as_save_IFS
  6990. test -z "$as_dir" && as_dir=.
  6991. for lt_ac_prog in sed gsed; do
  6992. for ac_exec_ext in '' $ac_executable_extensions; do
  6993. if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
  6994. lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
  6995. fi
  6996. done
  6997. done
  6998. done
  6999. IFS=$as_save_IFS
  7000. lt_ac_max=0
  7001. lt_ac_count=0
  7002. # Add /usr/xpg4/bin/sed as it is typically found on Solaris
  7003. # along with /bin/sed that truncates output.
  7004. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
  7005. test ! -f $lt_ac_sed && continue
  7006. cat /dev/null > conftest.in
  7007. lt_ac_count=0
  7008. echo $ECHO_N "0123456789$ECHO_C" >conftest.in
  7009. # Check for GNU sed and select it if it is found.
  7010. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
  7011. lt_cv_path_SED=$lt_ac_sed
  7012. break
  7013. fi
  7014. while true; do
  7015. cat conftest.in conftest.in >conftest.tmp
  7016. mv conftest.tmp conftest.in
  7017. cp conftest.in conftest.nl
  7018. echo >>conftest.nl
  7019. $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
  7020. cmp -s conftest.out conftest.nl || break
  7021. # 10000 chars as input seems more than enough
  7022. test $lt_ac_count -gt 10 && break
  7023. lt_ac_count=`expr $lt_ac_count + 1`
  7024. if test $lt_ac_count -gt $lt_ac_max; then
  7025. lt_ac_max=$lt_ac_count
  7026. lt_cv_path_SED=$lt_ac_sed
  7027. fi
  7028. done
  7029. done
  7030. ])
  7031. SED=$lt_cv_path_SED
  7032. AC_SUBST([SED])
  7033. AC_MSG_RESULT([$SED])
  7034. ])#AC_PROG_SED
  7035. ])#m4_ifndef
  7036. # Old name:
  7037. AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
  7038. dnl aclocal-1.4 backwards compatibility:
  7039. dnl AC_DEFUN([LT_AC_PROG_SED], [])
  7040. # _LT_CHECK_SHELL_FEATURES
  7041. # ------------------------
  7042. # Find out whether the shell is Bourne or XSI compatible,
  7043. # or has some other useful features.
  7044. m4_defun([_LT_CHECK_SHELL_FEATURES],
  7045. [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
  7046. # Try some XSI features
  7047. xsi_shell=no
  7048. ( _lt_dummy="a/b/c"
  7049. test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
  7050. = c,a/b,b/c, \
  7051. && eval 'test $(( 1 + 1 )) -eq 2 \
  7052. && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
  7053. && xsi_shell=yes
  7054. AC_MSG_RESULT([$xsi_shell])
  7055. _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
  7056. AC_MSG_CHECKING([whether the shell understands "+="])
  7057. lt_shell_append=no
  7058. ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
  7059. >/dev/null 2>&1 \
  7060. && lt_shell_append=yes
  7061. AC_MSG_RESULT([$lt_shell_append])
  7062. _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
  7063. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
  7064. lt_unset=unset
  7065. else
  7066. lt_unset=false
  7067. fi
  7068. _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
  7069. # test EBCDIC or ASCII
  7070. case `echo X|tr X '\101'` in
  7071. A) # ASCII based system
  7072. # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
  7073. lt_SP2NL='tr \040 \012'
  7074. lt_NL2SP='tr \015\012 \040\040'
  7075. ;;
  7076. *) # EBCDIC based system
  7077. lt_SP2NL='tr \100 \n'
  7078. lt_NL2SP='tr \r\n \100\100'
  7079. ;;
  7080. esac
  7081. _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
  7082. _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
  7083. ])# _LT_CHECK_SHELL_FEATURES
  7084. # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
  7085. # ------------------------------------------------------
  7086. # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
  7087. # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
  7088. m4_defun([_LT_PROG_FUNCTION_REPLACE],
  7089. [dnl {
  7090. sed -e '/^$1 ()$/,/^} # $1 /c\
  7091. $1 ()\
  7092. {\
  7093. m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
  7094. } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
  7095. && mv -f "$cfgfile.tmp" "$cfgfile" \
  7096. || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
  7097. test 0 -eq $? || _lt_function_replace_fail=:
  7098. ])
  7099. # _LT_PROG_REPLACE_SHELLFNS
  7100. # -------------------------
  7101. # Replace existing portable implementations of several shell functions with
  7102. # equivalent extended shell implementations where those features are available..
  7103. m4_defun([_LT_PROG_REPLACE_SHELLFNS],
  7104. [if test x"$xsi_shell" = xyes; then
  7105. _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
  7106. case ${1} in
  7107. */*) func_dirname_result="${1%/*}${2}" ;;
  7108. * ) func_dirname_result="${3}" ;;
  7109. esac])
  7110. _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
  7111. func_basename_result="${1##*/}"])
  7112. _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
  7113. case ${1} in
  7114. */*) func_dirname_result="${1%/*}${2}" ;;
  7115. * ) func_dirname_result="${3}" ;;
  7116. esac
  7117. func_basename_result="${1##*/}"])
  7118. _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
  7119. # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
  7120. # positional parameters, so assign one to ordinary parameter first.
  7121. func_stripname_result=${3}
  7122. func_stripname_result=${func_stripname_result#"${1}"}
  7123. func_stripname_result=${func_stripname_result%"${2}"}])
  7124. _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
  7125. func_split_long_opt_name=${1%%=*}
  7126. func_split_long_opt_arg=${1#*=}])
  7127. _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
  7128. func_split_short_opt_arg=${1#??}
  7129. func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
  7130. _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
  7131. case ${1} in
  7132. *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
  7133. *) func_lo2o_result=${1} ;;
  7134. esac])
  7135. _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
  7136. _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
  7137. _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
  7138. fi
  7139. if test x"$lt_shell_append" = xyes; then
  7140. _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
  7141. _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
  7142. func_quote_for_eval "${2}"
  7143. dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
  7144. eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
  7145. # Save a `func_append' function call where possible by direct use of '+='
  7146. sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
  7147. && mv -f "$cfgfile.tmp" "$cfgfile" \
  7148. || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
  7149. test 0 -eq $? || _lt_function_replace_fail=:
  7150. else
  7151. # Save a `func_append' function call even when '+=' is not available
  7152. sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
  7153. && mv -f "$cfgfile.tmp" "$cfgfile" \
  7154. || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
  7155. test 0 -eq $? || _lt_function_replace_fail=:
  7156. fi
  7157. if test x"$_lt_function_replace_fail" = x":"; then
  7158. AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
  7159. fi
  7160. ])
  7161. # _LT_PATH_CONVERSION_FUNCTIONS
  7162. # -----------------------------
  7163. # Determine which file name conversion functions should be used by
  7164. # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
  7165. # for certain cross-compile configurations and native mingw.
  7166. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
  7167. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  7168. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  7169. AC_MSG_CHECKING([how to convert $build file names to $host format])
  7170. AC_CACHE_VAL(lt_cv_to_host_file_cmd,
  7171. [case $host in
  7172. *-*-mingw* )
  7173. case $build in
  7174. *-*-mingw* ) # actually msys
  7175. lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
  7176. ;;
  7177. *-*-cygwin* )
  7178. lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
  7179. ;;
  7180. * ) # otherwise, assume *nix
  7181. lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
  7182. ;;
  7183. esac
  7184. ;;
  7185. *-*-cygwin* )
  7186. case $build in
  7187. *-*-mingw* ) # actually msys
  7188. lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
  7189. ;;
  7190. *-*-cygwin* )
  7191. lt_cv_to_host_file_cmd=func_convert_file_noop
  7192. ;;
  7193. * ) # otherwise, assume *nix
  7194. lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
  7195. ;;
  7196. esac
  7197. ;;
  7198. * ) # unhandled hosts (and "normal" native builds)
  7199. lt_cv_to_host_file_cmd=func_convert_file_noop
  7200. ;;
  7201. esac
  7202. ])
  7203. to_host_file_cmd=$lt_cv_to_host_file_cmd
  7204. AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
  7205. _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
  7206. [0], [convert $build file names to $host format])dnl
  7207. AC_MSG_CHECKING([how to convert $build file names to toolchain format])
  7208. AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
  7209. [#assume ordinary cross tools, or native build.
  7210. lt_cv_to_tool_file_cmd=func_convert_file_noop
  7211. case $host in
  7212. *-*-mingw* )
  7213. case $build in
  7214. *-*-mingw* ) # actually msys
  7215. lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
  7216. ;;
  7217. esac
  7218. ;;
  7219. esac
  7220. ])
  7221. to_tool_file_cmd=$lt_cv_to_tool_file_cmd
  7222. AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
  7223. _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
  7224. [0], [convert $build files to toolchain format])dnl
  7225. ])# _LT_PATH_CONVERSION_FUNCTIONS