libtool.m4 300 KB

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