libtool.m4 301 KB

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