libtool.m4 301 KB

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