aclocal.m4 381 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629
  1. # generated automatically by aclocal 1.16.5 -*- Autoconf -*-
  2. # Copyright (C) 1996-2021 Free Software Foundation, Inc.
  3. # This file is free software; the Free Software Foundation
  4. # gives unlimited permission to copy and/or distribute it,
  5. # with or without modifications, as long as this notice is preserved.
  6. # This program is distributed in the hope that it will be useful,
  7. # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  8. # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  9. # PARTICULAR PURPOSE.
  10. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
  11. m4_ifndef([AC_AUTOCONF_VERSION],
  12. [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
  13. m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
  14. [m4_warning([this file was generated for autoconf 2.71.
  15. You have another version of autoconf. It may work, but is not guaranteed to.
  16. If you have problems, you may need to regenerate the build system entirely.
  17. To do so, use the procedure documented by the package, typically 'autoreconf'.])])
  18. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
  19. #
  20. # Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software
  21. # Foundation, Inc.
  22. # Written by Gordon Matzigkeit, 1996
  23. #
  24. # This file is free software; the Free Software Foundation gives
  25. # unlimited permission to copy and/or distribute it, with or without
  26. # modifications, as long as this notice is preserved.
  27. m4_define([_LT_COPYING], [dnl
  28. # Copyright (C) 2014 Free Software Foundation, Inc.
  29. # This is free software; see the source for copying conditions. There is NO
  30. # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  31. # GNU Libtool is free software; you can redistribute it and/or modify
  32. # it under the terms of the GNU General Public License as published by
  33. # the Free Software Foundation; either version 2 of of the License, or
  34. # (at your option) any later version.
  35. #
  36. # As a special exception to the GNU General Public License, if you
  37. # distribute this file as part of a program or library that is built
  38. # using GNU Libtool, you may include this file under the same
  39. # distribution terms that you use for the rest of that program.
  40. #
  41. # GNU Libtool is distributed in the hope that it will be useful, but
  42. # WITHOUT ANY WARRANTY; without even the implied warranty of
  43. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  44. # GNU General Public License for more details.
  45. #
  46. # You should have received a copy of the GNU General Public License
  47. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  48. ])
  49. # serial 59 LT_INIT
  50. # LT_PREREQ(VERSION)
  51. # ------------------
  52. # Complain and exit if this libtool version is less that VERSION.
  53. m4_defun([LT_PREREQ],
  54. [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
  55. [m4_default([$3],
  56. [m4_fatal([Libtool version $1 or higher is required],
  57. 63)])],
  58. [$2])])
  59. # _LT_CHECK_BUILDDIR
  60. # ------------------
  61. # Complain if the absolute build directory name contains unusual characters
  62. m4_defun([_LT_CHECK_BUILDDIR],
  63. [case `pwd` in
  64. *\ * | *\ *)
  65. AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
  66. esac
  67. ])
  68. # LT_INIT([OPTIONS])
  69. # ------------------
  70. AC_DEFUN([LT_INIT],
  71. [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
  72. AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  73. AC_BEFORE([$0], [LT_LANG])dnl
  74. AC_BEFORE([$0], [LT_OUTPUT])dnl
  75. AC_BEFORE([$0], [LTDL_INIT])dnl
  76. m4_require([_LT_CHECK_BUILDDIR])dnl
  77. dnl Autoconf doesn't catch unexpanded LT_ macros by default:
  78. m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
  79. m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
  80. dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
  81. dnl unless we require an AC_DEFUNed macro:
  82. AC_REQUIRE([LTOPTIONS_VERSION])dnl
  83. AC_REQUIRE([LTSUGAR_VERSION])dnl
  84. AC_REQUIRE([LTVERSION_VERSION])dnl
  85. AC_REQUIRE([LTOBSOLETE_VERSION])dnl
  86. m4_require([_LT_PROG_LTMAIN])dnl
  87. _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
  88. dnl Parse OPTIONS
  89. _LT_SET_OPTIONS([$0], [$1])
  90. # This can be used to rebuild libtool when needed
  91. LIBTOOL_DEPS=$ltmain
  92. # Always use our own libtool.
  93. LIBTOOL='$(SHELL) $(top_builddir)/libtool'
  94. AC_SUBST(LIBTOOL)dnl
  95. _LT_SETUP
  96. # Only expand once:
  97. m4_define([LT_INIT])
  98. ])# LT_INIT
  99. # Old names:
  100. AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
  101. AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
  102. dnl aclocal-1.4 backwards compatibility:
  103. dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
  104. dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
  105. # _LT_PREPARE_CC_BASENAME
  106. # -----------------------
  107. m4_defun([_LT_PREPARE_CC_BASENAME], [
  108. # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
  109. func_cc_basename ()
  110. {
  111. for cc_temp in @S|@*""; do
  112. case $cc_temp in
  113. compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
  114. distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
  115. \-*) ;;
  116. *) break;;
  117. esac
  118. done
  119. func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
  120. }
  121. ])# _LT_PREPARE_CC_BASENAME
  122. # _LT_CC_BASENAME(CC)
  123. # -------------------
  124. # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
  125. # but that macro is also expanded into generated libtool script, which
  126. # arranges for $SED and $ECHO to be set by different means.
  127. m4_defun([_LT_CC_BASENAME],
  128. [m4_require([_LT_PREPARE_CC_BASENAME])dnl
  129. AC_REQUIRE([_LT_DECL_SED])dnl
  130. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
  131. func_cc_basename $1
  132. cc_basename=$func_cc_basename_result
  133. ])
  134. # _LT_FILEUTILS_DEFAULTS
  135. # ----------------------
  136. # It is okay to use these file commands and assume they have been set
  137. # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
  138. m4_defun([_LT_FILEUTILS_DEFAULTS],
  139. [: ${CP="cp -f"}
  140. : ${MV="mv -f"}
  141. : ${RM="rm -f"}
  142. ])# _LT_FILEUTILS_DEFAULTS
  143. # _LT_SETUP
  144. # ---------
  145. m4_defun([_LT_SETUP],
  146. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  147. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  148. AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
  149. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
  150. _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
  151. dnl
  152. _LT_DECL([], [host_alias], [0], [The host system])dnl
  153. _LT_DECL([], [host], [0])dnl
  154. _LT_DECL([], [host_os], [0])dnl
  155. dnl
  156. _LT_DECL([], [build_alias], [0], [The build system])dnl
  157. _LT_DECL([], [build], [0])dnl
  158. _LT_DECL([], [build_os], [0])dnl
  159. dnl
  160. AC_REQUIRE([AC_PROG_CC])dnl
  161. AC_REQUIRE([LT_PATH_LD])dnl
  162. AC_REQUIRE([LT_PATH_NM])dnl
  163. dnl
  164. AC_REQUIRE([AC_PROG_LN_S])dnl
  165. test -z "$LN_S" && LN_S="ln -s"
  166. _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
  167. dnl
  168. AC_REQUIRE([LT_CMD_MAX_LEN])dnl
  169. _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
  170. _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
  171. dnl
  172. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  173. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  174. m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
  175. m4_require([_LT_CMD_RELOAD])dnl
  176. m4_require([_LT_DECL_FILECMD])dnl
  177. m4_require([_LT_CHECK_MAGIC_METHOD])dnl
  178. m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
  179. m4_require([_LT_CMD_OLD_ARCHIVE])dnl
  180. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  181. m4_require([_LT_WITH_SYSROOT])dnl
  182. m4_require([_LT_CMD_TRUNCATE])dnl
  183. _LT_CONFIG_LIBTOOL_INIT([
  184. # See if we are running on zsh, and set the options that allow our
  185. # commands through without removal of \ escapes INIT.
  186. if test -n "\${ZSH_VERSION+set}"; then
  187. setopt NO_GLOB_SUBST
  188. fi
  189. ])
  190. if test -n "${ZSH_VERSION+set}"; then
  191. setopt NO_GLOB_SUBST
  192. fi
  193. _LT_CHECK_OBJDIR
  194. m4_require([_LT_TAG_COMPILER])dnl
  195. case $host_os in
  196. aix3*)
  197. # AIX sometimes has problems with the GCC collect2 program. For some
  198. # reason, if we set the COLLECT_NAMES environment variable, the problems
  199. # vanish in a puff of smoke.
  200. if test set != "${COLLECT_NAMES+set}"; then
  201. COLLECT_NAMES=
  202. export COLLECT_NAMES
  203. fi
  204. ;;
  205. esac
  206. # Global variables:
  207. ofile=libtool
  208. can_build_shared=yes
  209. # All known linkers require a '.a' archive for static linking (except MSVC and
  210. # ICC, which need '.lib').
  211. libext=a
  212. with_gnu_ld=$lt_cv_prog_gnu_ld
  213. old_CC=$CC
  214. old_CFLAGS=$CFLAGS
  215. # Set sane defaults for various variables
  216. test -z "$CC" && CC=cc
  217. test -z "$LTCC" && LTCC=$CC
  218. test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
  219. test -z "$LD" && LD=ld
  220. test -z "$ac_objext" && ac_objext=o
  221. _LT_CC_BASENAME([$compiler])
  222. # Only perform the check for file, if the check method requires it
  223. test -z "$MAGIC_CMD" && MAGIC_CMD=file
  224. case $deplibs_check_method in
  225. file_magic*)
  226. if test "$file_magic_cmd" = '$MAGIC_CMD'; then
  227. _LT_PATH_MAGIC
  228. fi
  229. ;;
  230. esac
  231. # Use C for the default configuration in the libtool script
  232. LT_SUPPORTED_TAG([CC])
  233. _LT_LANG_C_CONFIG
  234. _LT_LANG_DEFAULT_CONFIG
  235. _LT_CONFIG_COMMANDS
  236. ])# _LT_SETUP
  237. # _LT_PREPARE_SED_QUOTE_VARS
  238. # --------------------------
  239. # Define a few sed substitution that help us do robust quoting.
  240. m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
  241. [# Backslashify metacharacters that are still active within
  242. # double-quoted strings.
  243. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
  244. # Same as above, but do not quote variable references.
  245. double_quote_subst='s/\([["`\\]]\)/\\\1/g'
  246. # Sed substitution to delay expansion of an escaped shell variable in a
  247. # double_quote_subst'ed string.
  248. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
  249. # Sed substitution to delay expansion of an escaped single quote.
  250. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
  251. # Sed substitution to avoid accidental globbing in evaled expressions
  252. no_glob_subst='s/\*/\\\*/g'
  253. ])
  254. # _LT_PROG_LTMAIN
  255. # ---------------
  256. # Note that this code is called both from 'configure', and 'config.status'
  257. # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
  258. # 'config.status' has no value for ac_aux_dir unless we are using Automake,
  259. # so we pass a copy along to make sure it has a sensible value anyway.
  260. m4_defun([_LT_PROG_LTMAIN],
  261. [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
  262. _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
  263. ltmain=$ac_aux_dir/ltmain.sh
  264. ])# _LT_PROG_LTMAIN
  265. # So that we can recreate a full libtool script including additional
  266. # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
  267. # in macros and then make a single call at the end using the 'libtool'
  268. # label.
  269. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
  270. # ----------------------------------------
  271. # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  272. m4_define([_LT_CONFIG_LIBTOOL_INIT],
  273. [m4_ifval([$1],
  274. [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
  275. [$1
  276. ])])])
  277. # Initialize.
  278. m4_define([_LT_OUTPUT_LIBTOOL_INIT])
  279. # _LT_CONFIG_LIBTOOL([COMMANDS])
  280. # ------------------------------
  281. # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  282. m4_define([_LT_CONFIG_LIBTOOL],
  283. [m4_ifval([$1],
  284. [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
  285. [$1
  286. ])])])
  287. # Initialize.
  288. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
  289. # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
  290. # -----------------------------------------------------
  291. m4_defun([_LT_CONFIG_SAVE_COMMANDS],
  292. [_LT_CONFIG_LIBTOOL([$1])
  293. _LT_CONFIG_LIBTOOL_INIT([$2])
  294. ])
  295. # _LT_FORMAT_COMMENT([COMMENT])
  296. # -----------------------------
  297. # Add leading comment marks to the start of each line, and a trailing
  298. # full-stop to the whole comment if one is not present already.
  299. m4_define([_LT_FORMAT_COMMENT],
  300. [m4_ifval([$1], [
  301. m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
  302. [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
  303. )])
  304. # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
  305. # -------------------------------------------------------------------
  306. # CONFIGNAME is the name given to the value in the libtool script.
  307. # VARNAME is the (base) name used in the configure script.
  308. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
  309. # VARNAME. Any other value will be used directly.
  310. m4_define([_LT_DECL],
  311. [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
  312. [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
  313. [m4_ifval([$1], [$1], [$2])])
  314. lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
  315. m4_ifval([$4],
  316. [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
  317. lt_dict_add_subkey([lt_decl_dict], [$2],
  318. [tagged?], [m4_ifval([$5], [yes], [no])])])
  319. ])
  320. # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
  321. # --------------------------------------------------------
  322. m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
  323. # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
  324. # ------------------------------------------------
  325. m4_define([lt_decl_tag_varnames],
  326. [_lt_decl_filter([tagged?], [yes], $@)])
  327. # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
  328. # ---------------------------------------------------------
  329. m4_define([_lt_decl_filter],
  330. [m4_case([$#],
  331. [0], [m4_fatal([$0: too few arguments: $#])],
  332. [1], [m4_fatal([$0: too few arguments: $#: $1])],
  333. [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
  334. [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
  335. [lt_dict_filter([lt_decl_dict], $@)])[]dnl
  336. ])
  337. # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
  338. # --------------------------------------------------
  339. m4_define([lt_decl_quote_varnames],
  340. [_lt_decl_filter([value], [1], $@)])
  341. # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
  342. # ---------------------------------------------------
  343. m4_define([lt_decl_dquote_varnames],
  344. [_lt_decl_filter([value], [2], $@)])
  345. # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
  346. # ---------------------------------------------------
  347. m4_define([lt_decl_varnames_tagged],
  348. [m4_assert([$# <= 2])dnl
  349. _$0(m4_quote(m4_default([$1], [[, ]])),
  350. m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
  351. m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
  352. m4_define([_lt_decl_varnames_tagged],
  353. [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
  354. # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
  355. # ------------------------------------------------
  356. m4_define([lt_decl_all_varnames],
  357. [_$0(m4_quote(m4_default([$1], [[, ]])),
  358. m4_if([$2], [],
  359. m4_quote(lt_decl_varnames),
  360. m4_quote(m4_shift($@))))[]dnl
  361. ])
  362. m4_define([_lt_decl_all_varnames],
  363. [lt_join($@, lt_decl_varnames_tagged([$1],
  364. lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
  365. ])
  366. # _LT_CONFIG_STATUS_DECLARE([VARNAME])
  367. # ------------------------------------
  368. # Quote a variable value, and forward it to 'config.status' so that its
  369. # declaration there will have the same value as in 'configure'. VARNAME
  370. # must have a single quote delimited value for this to work.
  371. m4_define([_LT_CONFIG_STATUS_DECLARE],
  372. [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
  373. # _LT_CONFIG_STATUS_DECLARATIONS
  374. # ------------------------------
  375. # We delimit libtool config variables with single quotes, so when
  376. # we write them to config.status, we have to be sure to quote all
  377. # embedded single quotes properly. In configure, this macro expands
  378. # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
  379. #
  380. # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
  381. m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
  382. [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
  383. [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
  384. # _LT_LIBTOOL_TAGS
  385. # ----------------
  386. # Output comment and list of tags supported by the script
  387. m4_defun([_LT_LIBTOOL_TAGS],
  388. [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
  389. available_tags='_LT_TAGS'dnl
  390. ])
  391. # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
  392. # -----------------------------------
  393. # Extract the dictionary values for VARNAME (optionally with TAG) and
  394. # expand to a commented shell variable setting:
  395. #
  396. # # Some comment about what VAR is for.
  397. # visible_name=$lt_internal_name
  398. m4_define([_LT_LIBTOOL_DECLARE],
  399. [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
  400. [description])))[]dnl
  401. m4_pushdef([_libtool_name],
  402. m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
  403. m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
  404. [0], [_libtool_name=[$]$1],
  405. [1], [_libtool_name=$lt_[]$1],
  406. [2], [_libtool_name=$lt_[]$1],
  407. [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
  408. m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
  409. ])
  410. # _LT_LIBTOOL_CONFIG_VARS
  411. # -----------------------
  412. # Produce commented declarations of non-tagged libtool config variables
  413. # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
  414. # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
  415. # section) are produced by _LT_LIBTOOL_TAG_VARS.
  416. m4_defun([_LT_LIBTOOL_CONFIG_VARS],
  417. [m4_foreach([_lt_var],
  418. m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
  419. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
  420. # _LT_LIBTOOL_TAG_VARS(TAG)
  421. # -------------------------
  422. m4_define([_LT_LIBTOOL_TAG_VARS],
  423. [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
  424. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
  425. # _LT_TAGVAR(VARNAME, [TAGNAME])
  426. # ------------------------------
  427. m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
  428. # _LT_CONFIG_COMMANDS
  429. # -------------------
  430. # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
  431. # variables for single and double quote escaping we saved from calls
  432. # to _LT_DECL, we can put quote escaped variables declarations
  433. # into 'config.status', and then the shell code to quote escape them in
  434. # for loops in 'config.status'. Finally, any additional code accumulated
  435. # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
  436. m4_defun([_LT_CONFIG_COMMANDS],
  437. [AC_PROVIDE_IFELSE([LT_OUTPUT],
  438. dnl If the libtool generation code has been placed in $CONFIG_LT,
  439. dnl instead of duplicating it all over again into config.status,
  440. dnl then we will have config.status run $CONFIG_LT later, so it
  441. dnl needs to know what name is stored there:
  442. [AC_CONFIG_COMMANDS([libtool],
  443. [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
  444. dnl If the libtool generation code is destined for config.status,
  445. dnl expand the accumulated commands and init code now:
  446. [AC_CONFIG_COMMANDS([libtool],
  447. [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
  448. ])#_LT_CONFIG_COMMANDS
  449. # Initialize.
  450. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
  451. [
  452. # The HP-UX ksh and POSIX shell print the target directory to stdout
  453. # if CDPATH is set.
  454. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  455. sed_quote_subst='$sed_quote_subst'
  456. double_quote_subst='$double_quote_subst'
  457. delay_variable_subst='$delay_variable_subst'
  458. _LT_CONFIG_STATUS_DECLARATIONS
  459. LTCC='$LTCC'
  460. LTCFLAGS='$LTCFLAGS'
  461. compiler='$compiler_DEFAULT'
  462. # A function that is used when there is no print builtin or printf.
  463. func_fallback_echo ()
  464. {
  465. eval 'cat <<_LTECHO_EOF
  466. \$[]1
  467. _LTECHO_EOF'
  468. }
  469. # Quote evaled strings.
  470. for var in lt_decl_all_varnames([[ \
  471. ]], lt_decl_quote_varnames); do
  472. case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  473. *[[\\\\\\\`\\"\\\$]]*)
  474. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
  475. ;;
  476. *)
  477. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  478. ;;
  479. esac
  480. done
  481. # Double-quote double-evaled strings.
  482. for var in lt_decl_all_varnames([[ \
  483. ]], lt_decl_dquote_varnames); do
  484. case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  485. *[[\\\\\\\`\\"\\\$]]*)
  486. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
  487. ;;
  488. *)
  489. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  490. ;;
  491. esac
  492. done
  493. _LT_OUTPUT_LIBTOOL_INIT
  494. ])
  495. # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
  496. # ------------------------------------
  497. # Generate a child script FILE with all initialization necessary to
  498. # reuse the environment learned by the parent script, and make the
  499. # file executable. If COMMENT is supplied, it is inserted after the
  500. # '#!' sequence but before initialization text begins. After this
  501. # macro, additional text can be appended to FILE to form the body of
  502. # the child script. The macro ends with non-zero status if the
  503. # file could not be fully written (such as if the disk is full).
  504. m4_ifdef([AS_INIT_GENERATED],
  505. [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
  506. [m4_defun([_LT_GENERATED_FILE_INIT],
  507. [m4_require([AS_PREPARE])]dnl
  508. [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
  509. [lt_write_fail=0
  510. cat >$1 <<_ASEOF || lt_write_fail=1
  511. #! $SHELL
  512. # Generated by $as_me.
  513. $2
  514. SHELL=\${CONFIG_SHELL-$SHELL}
  515. export SHELL
  516. _ASEOF
  517. cat >>$1 <<\_ASEOF || lt_write_fail=1
  518. AS_SHELL_SANITIZE
  519. _AS_PREPARE
  520. exec AS_MESSAGE_FD>&1
  521. _ASEOF
  522. test 0 = "$lt_write_fail" && chmod +x $1[]dnl
  523. m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
  524. # LT_OUTPUT
  525. # ---------
  526. # This macro allows early generation of the libtool script (before
  527. # AC_OUTPUT is called), incase it is used in configure for compilation
  528. # tests.
  529. AC_DEFUN([LT_OUTPUT],
  530. [: ${CONFIG_LT=./config.lt}
  531. AC_MSG_NOTICE([creating $CONFIG_LT])
  532. _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
  533. [# Run this file to recreate a libtool stub with the current configuration.])
  534. cat >>"$CONFIG_LT" <<\_LTEOF
  535. lt_cl_silent=false
  536. exec AS_MESSAGE_LOG_FD>>config.log
  537. {
  538. echo
  539. AS_BOX([Running $as_me.])
  540. } >&AS_MESSAGE_LOG_FD
  541. lt_cl_help="\
  542. '$as_me' creates a local libtool stub from the current configuration,
  543. for use in further configure time tests before the real libtool is
  544. generated.
  545. Usage: $[0] [[OPTIONS]]
  546. -h, --help print this help, then exit
  547. -V, --version print version number, then exit
  548. -q, --quiet do not print progress messages
  549. -d, --debug don't remove temporary files
  550. Report bugs to <[email protected]>."
  551. lt_cl_version="\
  552. m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
  553. m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
  554. configured by $[0], generated by m4_PACKAGE_STRING.
  555. Copyright (C) 2011 Free Software Foundation, Inc.
  556. This config.lt script is free software; the Free Software Foundation
  557. gives unlimited permision to copy, distribute and modify it."
  558. while test 0 != $[#]
  559. do
  560. case $[1] in
  561. --version | --v* | -V )
  562. echo "$lt_cl_version"; exit 0 ;;
  563. --help | --h* | -h )
  564. echo "$lt_cl_help"; exit 0 ;;
  565. --debug | --d* | -d )
  566. debug=: ;;
  567. --quiet | --q* | --silent | --s* | -q )
  568. lt_cl_silent=: ;;
  569. -*) AC_MSG_ERROR([unrecognized option: $[1]
  570. Try '$[0] --help' for more information.]) ;;
  571. *) AC_MSG_ERROR([unrecognized argument: $[1]
  572. Try '$[0] --help' for more information.]) ;;
  573. esac
  574. shift
  575. done
  576. if $lt_cl_silent; then
  577. exec AS_MESSAGE_FD>/dev/null
  578. fi
  579. _LTEOF
  580. cat >>"$CONFIG_LT" <<_LTEOF
  581. _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
  582. _LTEOF
  583. cat >>"$CONFIG_LT" <<\_LTEOF
  584. AC_MSG_NOTICE([creating $ofile])
  585. _LT_OUTPUT_LIBTOOL_COMMANDS
  586. AS_EXIT(0)
  587. _LTEOF
  588. chmod +x "$CONFIG_LT"
  589. # configure is writing to config.log, but config.lt does its own redirection,
  590. # appending to config.log, which fails on DOS, as config.log is still kept
  591. # open by configure. Here we exec the FD to /dev/null, effectively closing
  592. # config.log, so it can be properly (re)opened and appended to by config.lt.
  593. lt_cl_success=:
  594. test yes = "$silent" &&
  595. lt_config_lt_args="$lt_config_lt_args --quiet"
  596. exec AS_MESSAGE_LOG_FD>/dev/null
  597. $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
  598. exec AS_MESSAGE_LOG_FD>>config.log
  599. $lt_cl_success || AS_EXIT(1)
  600. ])# LT_OUTPUT
  601. # _LT_CONFIG(TAG)
  602. # ---------------
  603. # If TAG is the built-in tag, create an initial libtool script with a
  604. # default configuration from the untagged config vars. Otherwise add code
  605. # to config.status for appending the configuration named by TAG from the
  606. # matching tagged config vars.
  607. m4_defun([_LT_CONFIG],
  608. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  609. _LT_CONFIG_SAVE_COMMANDS([
  610. m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
  611. m4_if(_LT_TAG, [C], [
  612. # See if we are running on zsh, and set the options that allow our
  613. # commands through without removal of \ escapes.
  614. if test -n "${ZSH_VERSION+set}"; then
  615. setopt NO_GLOB_SUBST
  616. fi
  617. cfgfile=${ofile}T
  618. trap "$RM \"$cfgfile\"; exit 1" 1 2 15
  619. $RM "$cfgfile"
  620. cat <<_LT_EOF >> "$cfgfile"
  621. #! $SHELL
  622. # Generated automatically by $as_me ($PACKAGE) $VERSION
  623. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  624. # Provide generalized library-building support services.
  625. # Written by Gordon Matzigkeit, 1996
  626. _LT_COPYING
  627. _LT_LIBTOOL_TAGS
  628. # Configured defaults for sys_lib_dlsearch_path munging.
  629. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
  630. # ### BEGIN LIBTOOL CONFIG
  631. _LT_LIBTOOL_CONFIG_VARS
  632. _LT_LIBTOOL_TAG_VARS
  633. # ### END LIBTOOL CONFIG
  634. _LT_EOF
  635. cat <<'_LT_EOF' >> "$cfgfile"
  636. # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
  637. _LT_PREPARE_MUNGE_PATH_LIST
  638. _LT_PREPARE_CC_BASENAME
  639. # ### END FUNCTIONS SHARED WITH CONFIGURE
  640. _LT_EOF
  641. case $host_os in
  642. aix3*)
  643. cat <<\_LT_EOF >> "$cfgfile"
  644. # AIX sometimes has problems with the GCC collect2 program. For some
  645. # reason, if we set the COLLECT_NAMES environment variable, the problems
  646. # vanish in a puff of smoke.
  647. if test set != "${COLLECT_NAMES+set}"; then
  648. COLLECT_NAMES=
  649. export COLLECT_NAMES
  650. fi
  651. _LT_EOF
  652. ;;
  653. esac
  654. _LT_PROG_LTMAIN
  655. # We use sed instead of cat because bash on DJGPP gets confused if
  656. # if finds mixed CR/LF and LF-only lines. Since sed operates in
  657. # text mode, it properly converts lines to CR/LF. This bash problem
  658. # is reportedly fixed, but why not run on old versions too?
  659. $SED '$q' "$ltmain" >> "$cfgfile" \
  660. || (rm -f "$cfgfile"; exit 1)
  661. mv -f "$cfgfile" "$ofile" ||
  662. (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
  663. chmod +x "$ofile"
  664. ],
  665. [cat <<_LT_EOF >> "$ofile"
  666. dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
  667. dnl in a comment (ie after a #).
  668. # ### BEGIN LIBTOOL TAG CONFIG: $1
  669. _LT_LIBTOOL_TAG_VARS(_LT_TAG)
  670. # ### END LIBTOOL TAG CONFIG: $1
  671. _LT_EOF
  672. ])dnl /m4_if
  673. ],
  674. [m4_if([$1], [], [
  675. PACKAGE='$PACKAGE'
  676. VERSION='$VERSION'
  677. RM='$RM'
  678. ofile='$ofile'], [])
  679. ])dnl /_LT_CONFIG_SAVE_COMMANDS
  680. ])# _LT_CONFIG
  681. # LT_SUPPORTED_TAG(TAG)
  682. # ---------------------
  683. # Trace this macro to discover what tags are supported by the libtool
  684. # --tag option, using:
  685. # autoconf --trace 'LT_SUPPORTED_TAG:$1'
  686. AC_DEFUN([LT_SUPPORTED_TAG], [])
  687. # C support is built-in for now
  688. m4_define([_LT_LANG_C_enabled], [])
  689. m4_define([_LT_TAGS], [])
  690. # LT_LANG(LANG)
  691. # -------------
  692. # Enable libtool support for the given language if not already enabled.
  693. AC_DEFUN([LT_LANG],
  694. [AC_BEFORE([$0], [LT_OUTPUT])dnl
  695. m4_case([$1],
  696. [C], [_LT_LANG(C)],
  697. [C++], [_LT_LANG(CXX)],
  698. [Go], [_LT_LANG(GO)],
  699. [Java], [_LT_LANG(GCJ)],
  700. [Fortran 77], [_LT_LANG(F77)],
  701. [Fortran], [_LT_LANG(FC)],
  702. [Windows Resource], [_LT_LANG(RC)],
  703. [m4_ifdef([_LT_LANG_]$1[_CONFIG],
  704. [_LT_LANG($1)],
  705. [m4_fatal([$0: unsupported language: "$1"])])])dnl
  706. ])# LT_LANG
  707. # _LT_LANG(LANGNAME)
  708. # ------------------
  709. m4_defun([_LT_LANG],
  710. [m4_ifdef([_LT_LANG_]$1[_enabled], [],
  711. [LT_SUPPORTED_TAG([$1])dnl
  712. m4_append([_LT_TAGS], [$1 ])dnl
  713. m4_define([_LT_LANG_]$1[_enabled], [])dnl
  714. _LT_LANG_$1_CONFIG($1)])dnl
  715. ])# _LT_LANG
  716. m4_ifndef([AC_PROG_GO], [
  717. # NOTE: This macro has been submitted for inclusion into #
  718. # GNU Autoconf as AC_PROG_GO. When it is available in #
  719. # a released version of Autoconf we should remove this #
  720. # macro and use it instead. #
  721. m4_defun([AC_PROG_GO],
  722. [AC_LANG_PUSH(Go)dnl
  723. AC_ARG_VAR([GOC], [Go compiler command])dnl
  724. AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
  725. _AC_ARG_VAR_LDFLAGS()dnl
  726. AC_CHECK_TOOL(GOC, gccgo)
  727. if test -z "$GOC"; then
  728. if test -n "$ac_tool_prefix"; then
  729. AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
  730. fi
  731. fi
  732. if test -z "$GOC"; then
  733. AC_CHECK_PROG(GOC, gccgo, gccgo, false)
  734. fi
  735. ])#m4_defun
  736. ])#m4_ifndef
  737. # _LT_LANG_DEFAULT_CONFIG
  738. # -----------------------
  739. m4_defun([_LT_LANG_DEFAULT_CONFIG],
  740. [AC_PROVIDE_IFELSE([AC_PROG_CXX],
  741. [LT_LANG(CXX)],
  742. [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
  743. AC_PROVIDE_IFELSE([AC_PROG_F77],
  744. [LT_LANG(F77)],
  745. [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
  746. AC_PROVIDE_IFELSE([AC_PROG_FC],
  747. [LT_LANG(FC)],
  748. [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
  749. dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
  750. dnl pulling things in needlessly.
  751. AC_PROVIDE_IFELSE([AC_PROG_GCJ],
  752. [LT_LANG(GCJ)],
  753. [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
  754. [LT_LANG(GCJ)],
  755. [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
  756. [LT_LANG(GCJ)],
  757. [m4_ifdef([AC_PROG_GCJ],
  758. [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
  759. m4_ifdef([A][M_PROG_GCJ],
  760. [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
  761. m4_ifdef([LT_PROG_GCJ],
  762. [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
  763. AC_PROVIDE_IFELSE([AC_PROG_GO],
  764. [LT_LANG(GO)],
  765. [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
  766. AC_PROVIDE_IFELSE([LT_PROG_RC],
  767. [LT_LANG(RC)],
  768. [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
  769. ])# _LT_LANG_DEFAULT_CONFIG
  770. # Obsolete macros:
  771. AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
  772. AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
  773. AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
  774. AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
  775. AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
  776. dnl aclocal-1.4 backwards compatibility:
  777. dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
  778. dnl AC_DEFUN([AC_LIBTOOL_F77], [])
  779. dnl AC_DEFUN([AC_LIBTOOL_FC], [])
  780. dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
  781. dnl AC_DEFUN([AC_LIBTOOL_RC], [])
  782. # _LT_TAG_COMPILER
  783. # ----------------
  784. m4_defun([_LT_TAG_COMPILER],
  785. [AC_REQUIRE([AC_PROG_CC])dnl
  786. _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
  787. _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
  788. _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
  789. _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
  790. # If no C compiler was specified, use CC.
  791. LTCC=${LTCC-"$CC"}
  792. # If no C compiler flags were specified, use CFLAGS.
  793. LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
  794. # Allow CC to be a program name with arguments.
  795. compiler=$CC
  796. ])# _LT_TAG_COMPILER
  797. # _LT_COMPILER_BOILERPLATE
  798. # ------------------------
  799. # Check for compiler boilerplate output or warnings with
  800. # the simple compiler test code.
  801. m4_defun([_LT_COMPILER_BOILERPLATE],
  802. [m4_require([_LT_DECL_SED])dnl
  803. ac_outfile=conftest.$ac_objext
  804. echo "$lt_simple_compile_test_code" >conftest.$ac_ext
  805. eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  806. _lt_compiler_boilerplate=`cat conftest.err`
  807. $RM conftest*
  808. ])# _LT_COMPILER_BOILERPLATE
  809. # _LT_LINKER_BOILERPLATE
  810. # ----------------------
  811. # Check for linker boilerplate output or warnings with
  812. # the simple link test code.
  813. m4_defun([_LT_LINKER_BOILERPLATE],
  814. [m4_require([_LT_DECL_SED])dnl
  815. ac_outfile=conftest.$ac_objext
  816. echo "$lt_simple_link_test_code" >conftest.$ac_ext
  817. eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  818. _lt_linker_boilerplate=`cat conftest.err`
  819. $RM -r conftest*
  820. ])# _LT_LINKER_BOILERPLATE
  821. # _LT_REQUIRED_DARWIN_CHECKS
  822. # -------------------------
  823. m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
  824. case $host_os in
  825. rhapsody* | darwin*)
  826. AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
  827. AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
  828. AC_CHECK_TOOL([LIPO], [lipo], [:])
  829. AC_CHECK_TOOL([OTOOL], [otool], [:])
  830. AC_CHECK_TOOL([OTOOL64], [otool64], [:])
  831. _LT_DECL([], [DSYMUTIL], [1],
  832. [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
  833. _LT_DECL([], [NMEDIT], [1],
  834. [Tool to change global to local symbols on Mac OS X])
  835. _LT_DECL([], [LIPO], [1],
  836. [Tool to manipulate fat objects and archives on Mac OS X])
  837. _LT_DECL([], [OTOOL], [1],
  838. [ldd/readelf like tool for Mach-O binaries on Mac OS X])
  839. _LT_DECL([], [OTOOL64], [1],
  840. [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
  841. AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
  842. [lt_cv_apple_cc_single_mod=no
  843. if test -z "$LT_MULTI_MODULE"; then
  844. # By default we will add the -single_module flag. You can override
  845. # by either setting the environment variable LT_MULTI_MODULE
  846. # non-empty at configure time, or by adding -multi_module to the
  847. # link flags.
  848. rm -rf libconftest.dylib*
  849. echo "int foo(void){return 1;}" > conftest.c
  850. echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  851. -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
  852. $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  853. -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
  854. _lt_result=$?
  855. # If there is a non-empty error log, and "single_module"
  856. # appears in it, assume the flag caused a linker warning
  857. if test -s conftest.err && $GREP single_module conftest.err; then
  858. cat conftest.err >&AS_MESSAGE_LOG_FD
  859. # Otherwise, if the output was created with a 0 exit code from
  860. # the compiler, it worked.
  861. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
  862. lt_cv_apple_cc_single_mod=yes
  863. else
  864. cat conftest.err >&AS_MESSAGE_LOG_FD
  865. fi
  866. rm -rf libconftest.dylib*
  867. rm -f conftest.*
  868. fi])
  869. AC_CACHE_CHECK([for -exported_symbols_list linker flag],
  870. [lt_cv_ld_exported_symbols_list],
  871. [lt_cv_ld_exported_symbols_list=no
  872. save_LDFLAGS=$LDFLAGS
  873. echo "_main" > conftest.sym
  874. LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
  875. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  876. [lt_cv_ld_exported_symbols_list=yes],
  877. [lt_cv_ld_exported_symbols_list=no])
  878. LDFLAGS=$save_LDFLAGS
  879. ])
  880. AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
  881. [lt_cv_ld_force_load=no
  882. cat > conftest.c << _LT_EOF
  883. int forced_loaded() { return 2;}
  884. _LT_EOF
  885. echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
  886. $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
  887. echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
  888. $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
  889. echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
  890. $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
  891. cat > conftest.c << _LT_EOF
  892. int main() { return 0;}
  893. _LT_EOF
  894. echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
  895. $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
  896. _lt_result=$?
  897. if test -s conftest.err && $GREP force_load conftest.err; then
  898. cat conftest.err >&AS_MESSAGE_LOG_FD
  899. elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
  900. lt_cv_ld_force_load=yes
  901. else
  902. cat conftest.err >&AS_MESSAGE_LOG_FD
  903. fi
  904. rm -f conftest.err libconftest.a conftest conftest.c
  905. rm -rf conftest.dSYM
  906. ])
  907. case $host_os in
  908. rhapsody* | darwin1.[[012]])
  909. _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
  910. darwin1.*)
  911. _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
  912. darwin*)
  913. case $MACOSX_DEPLOYMENT_TARGET,$host in
  914. 10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
  915. _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
  916. *)
  917. _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
  918. esac
  919. ;;
  920. esac
  921. if test yes = "$lt_cv_apple_cc_single_mod"; then
  922. _lt_dar_single_mod='$single_module'
  923. fi
  924. if test yes = "$lt_cv_ld_exported_symbols_list"; then
  925. _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
  926. else
  927. _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
  928. fi
  929. if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
  930. _lt_dsymutil='~$DSYMUTIL $lib || :'
  931. else
  932. _lt_dsymutil=
  933. fi
  934. ;;
  935. esac
  936. ])
  937. # _LT_DARWIN_LINKER_FEATURES([TAG])
  938. # ---------------------------------
  939. # Checks for linker and compiler features on darwin
  940. m4_defun([_LT_DARWIN_LINKER_FEATURES],
  941. [
  942. m4_require([_LT_REQUIRED_DARWIN_CHECKS])
  943. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  944. _LT_TAGVAR(hardcode_direct, $1)=no
  945. _LT_TAGVAR(hardcode_automatic, $1)=yes
  946. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  947. if test yes = "$lt_cv_ld_force_load"; then
  948. _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\"`'
  949. m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
  950. [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
  951. else
  952. _LT_TAGVAR(whole_archive_flag_spec, $1)=''
  953. fi
  954. _LT_TAGVAR(link_all_deplibs, $1)=yes
  955. _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
  956. case $cc_basename in
  957. ifort*|nagfor*) _lt_dar_can_shared=yes ;;
  958. *) _lt_dar_can_shared=$GCC ;;
  959. esac
  960. if test yes = "$_lt_dar_can_shared"; then
  961. output_verbose_link_cmd=func_echo_all
  962. _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"
  963. _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
  964. _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"
  965. _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"
  966. m4_if([$1], [CXX],
  967. [ if test yes != "$lt_cv_apple_cc_single_mod"; then
  968. _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"
  969. _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"
  970. fi
  971. ],[])
  972. else
  973. _LT_TAGVAR(ld_shlibs, $1)=no
  974. fi
  975. ])
  976. # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
  977. # ----------------------------------
  978. # Links a minimal program and checks the executable
  979. # for the system default hardcoded library path. In most cases,
  980. # this is /usr/lib:/lib, but when the MPI compilers are used
  981. # the location of the communication and MPI libs are included too.
  982. # If we don't find anything, use the default library path according
  983. # to the aix ld manual.
  984. # Store the results from the different compilers for each TAGNAME.
  985. # Allow to override them for all tags through lt_cv_aix_libpath.
  986. m4_defun([_LT_SYS_MODULE_PATH_AIX],
  987. [m4_require([_LT_DECL_SED])dnl
  988. if test set = "${lt_cv_aix_libpath+set}"; then
  989. aix_libpath=$lt_cv_aix_libpath
  990. else
  991. AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
  992. [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
  993. lt_aix_libpath_sed='[
  994. /Import File Strings/,/^$/ {
  995. /^0/ {
  996. s/^0 *\([^ ]*\) *$/\1/
  997. p
  998. }
  999. }]'
  1000. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  1001. # Check for a 64-bit object if we didn't find anything.
  1002. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
  1003. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  1004. fi],[])
  1005. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
  1006. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
  1007. fi
  1008. ])
  1009. aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
  1010. fi
  1011. ])# _LT_SYS_MODULE_PATH_AIX
  1012. # _LT_SHELL_INIT(ARG)
  1013. # -------------------
  1014. m4_define([_LT_SHELL_INIT],
  1015. [m4_divert_text([M4SH-INIT], [$1
  1016. ])])# _LT_SHELL_INIT
  1017. # _LT_PROG_ECHO_BACKSLASH
  1018. # -----------------------
  1019. # Find how we can fake an echo command that does not interpret backslash.
  1020. # In particular, with Autoconf 2.60 or later we add some code to the start
  1021. # of the generated configure script that will find a shell with a builtin
  1022. # printf (that we can use as an echo command).
  1023. m4_defun([_LT_PROG_ECHO_BACKSLASH],
  1024. [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  1025. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  1026. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  1027. AC_MSG_CHECKING([how to print strings])
  1028. # Test print first, because it will be a builtin if present.
  1029. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
  1030. test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
  1031. ECHO='print -r --'
  1032. elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
  1033. ECHO='printf %s\n'
  1034. else
  1035. # Use this function as a fallback that always works.
  1036. func_fallback_echo ()
  1037. {
  1038. eval 'cat <<_LTECHO_EOF
  1039. $[]1
  1040. _LTECHO_EOF'
  1041. }
  1042. ECHO='func_fallback_echo'
  1043. fi
  1044. # func_echo_all arg...
  1045. # Invoke $ECHO with all args, space-separated.
  1046. func_echo_all ()
  1047. {
  1048. $ECHO "$*"
  1049. }
  1050. case $ECHO in
  1051. printf*) AC_MSG_RESULT([printf]) ;;
  1052. print*) AC_MSG_RESULT([print -r]) ;;
  1053. *) AC_MSG_RESULT([cat]) ;;
  1054. esac
  1055. m4_ifdef([_AS_DETECT_SUGGESTED],
  1056. [_AS_DETECT_SUGGESTED([
  1057. test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
  1058. ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  1059. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  1060. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  1061. PATH=/empty FPATH=/empty; export PATH FPATH
  1062. test "X`printf %s $ECHO`" = "X$ECHO" \
  1063. || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
  1064. _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
  1065. _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
  1066. ])# _LT_PROG_ECHO_BACKSLASH
  1067. # _LT_WITH_SYSROOT
  1068. # ----------------
  1069. AC_DEFUN([_LT_WITH_SYSROOT],
  1070. [m4_require([_LT_DECL_SED])dnl
  1071. AC_MSG_CHECKING([for sysroot])
  1072. AC_ARG_WITH([sysroot],
  1073. [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
  1074. [Search for dependent libraries within DIR (or the compiler's sysroot
  1075. if not specified).])],
  1076. [], [with_sysroot=no])
  1077. dnl lt_sysroot will always be passed unquoted. We quote it here
  1078. dnl in case the user passed a directory name.
  1079. lt_sysroot=
  1080. case $with_sysroot in #(
  1081. yes)
  1082. if test yes = "$GCC"; then
  1083. lt_sysroot=`$CC --print-sysroot 2>/dev/null`
  1084. fi
  1085. ;; #(
  1086. /*)
  1087. lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
  1088. ;; #(
  1089. no|'')
  1090. ;; #(
  1091. *)
  1092. AC_MSG_RESULT([$with_sysroot])
  1093. AC_MSG_ERROR([The sysroot must be an absolute path.])
  1094. ;;
  1095. esac
  1096. AC_MSG_RESULT([${lt_sysroot:-no}])
  1097. _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
  1098. [dependent libraries, and where our libraries should be installed.])])
  1099. # _LT_ENABLE_LOCK
  1100. # ---------------
  1101. m4_defun([_LT_ENABLE_LOCK],
  1102. [AC_ARG_ENABLE([libtool-lock],
  1103. [AS_HELP_STRING([--disable-libtool-lock],
  1104. [avoid locking (might break parallel builds)])])
  1105. test no = "$enable_libtool_lock" || enable_libtool_lock=yes
  1106. # Some flags need to be propagated to the compiler or linker for good
  1107. # libtool support.
  1108. case $host in
  1109. ia64-*-hpux*)
  1110. # Find out what ABI is being produced by ac_compile, and set mode
  1111. # options accordingly.
  1112. echo 'int i;' > conftest.$ac_ext
  1113. if AC_TRY_EVAL(ac_compile); then
  1114. case `$FILECMD conftest.$ac_objext` in
  1115. *ELF-32*)
  1116. HPUX_IA64_MODE=32
  1117. ;;
  1118. *ELF-64*)
  1119. HPUX_IA64_MODE=64
  1120. ;;
  1121. esac
  1122. fi
  1123. rm -rf conftest*
  1124. ;;
  1125. *-*-irix6*)
  1126. # Find out what ABI is being produced by ac_compile, and set linker
  1127. # options accordingly.
  1128. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
  1129. if AC_TRY_EVAL(ac_compile); then
  1130. if test yes = "$lt_cv_prog_gnu_ld"; then
  1131. case `$FILECMD conftest.$ac_objext` in
  1132. *32-bit*)
  1133. LD="${LD-ld} -melf32bsmip"
  1134. ;;
  1135. *N32*)
  1136. LD="${LD-ld} -melf32bmipn32"
  1137. ;;
  1138. *64-bit*)
  1139. LD="${LD-ld} -melf64bmip"
  1140. ;;
  1141. esac
  1142. else
  1143. case `$FILECMD conftest.$ac_objext` in
  1144. *32-bit*)
  1145. LD="${LD-ld} -32"
  1146. ;;
  1147. *N32*)
  1148. LD="${LD-ld} -n32"
  1149. ;;
  1150. *64-bit*)
  1151. LD="${LD-ld} -64"
  1152. ;;
  1153. esac
  1154. fi
  1155. fi
  1156. rm -rf conftest*
  1157. ;;
  1158. mips64*-*linux*)
  1159. # Find out what ABI is being produced by ac_compile, and set linker
  1160. # options accordingly.
  1161. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
  1162. if AC_TRY_EVAL(ac_compile); then
  1163. emul=elf
  1164. case `$FILECMD conftest.$ac_objext` in
  1165. *32-bit*)
  1166. emul="${emul}32"
  1167. ;;
  1168. *64-bit*)
  1169. emul="${emul}64"
  1170. ;;
  1171. esac
  1172. case `$FILECMD conftest.$ac_objext` in
  1173. *MSB*)
  1174. emul="${emul}btsmip"
  1175. ;;
  1176. *LSB*)
  1177. emul="${emul}ltsmip"
  1178. ;;
  1179. esac
  1180. case `$FILECMD conftest.$ac_objext` in
  1181. *N32*)
  1182. emul="${emul}n32"
  1183. ;;
  1184. esac
  1185. LD="${LD-ld} -m $emul"
  1186. fi
  1187. rm -rf conftest*
  1188. ;;
  1189. x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
  1190. s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
  1191. # Find out what ABI is being produced by ac_compile, and set linker
  1192. # options accordingly. Note that the listed cases only cover the
  1193. # situations where additional linker options are needed (such as when
  1194. # doing 32-bit compilation for a host where ld defaults to 64-bit, or
  1195. # vice versa); the common cases where no linker options are needed do
  1196. # not appear in the list.
  1197. echo 'int i;' > conftest.$ac_ext
  1198. if AC_TRY_EVAL(ac_compile); then
  1199. case `$FILECMD conftest.o` in
  1200. *32-bit*)
  1201. case $host in
  1202. x86_64-*kfreebsd*-gnu)
  1203. LD="${LD-ld} -m elf_i386_fbsd"
  1204. ;;
  1205. x86_64-*linux*)
  1206. case `$FILECMD conftest.o` in
  1207. *x86-64*)
  1208. LD="${LD-ld} -m elf32_x86_64"
  1209. ;;
  1210. *)
  1211. LD="${LD-ld} -m elf_i386"
  1212. ;;
  1213. esac
  1214. ;;
  1215. powerpc64le-*linux*)
  1216. LD="${LD-ld} -m elf32lppclinux"
  1217. ;;
  1218. powerpc64-*linux*)
  1219. LD="${LD-ld} -m elf32ppclinux"
  1220. ;;
  1221. s390x-*linux*)
  1222. LD="${LD-ld} -m elf_s390"
  1223. ;;
  1224. sparc64-*linux*)
  1225. LD="${LD-ld} -m elf32_sparc"
  1226. ;;
  1227. esac
  1228. ;;
  1229. *64-bit*)
  1230. case $host in
  1231. x86_64-*kfreebsd*-gnu)
  1232. LD="${LD-ld} -m elf_x86_64_fbsd"
  1233. ;;
  1234. x86_64-*linux*)
  1235. LD="${LD-ld} -m elf_x86_64"
  1236. ;;
  1237. powerpcle-*linux*)
  1238. LD="${LD-ld} -m elf64lppc"
  1239. ;;
  1240. powerpc-*linux*)
  1241. LD="${LD-ld} -m elf64ppc"
  1242. ;;
  1243. s390*-*linux*|s390*-*tpf*)
  1244. LD="${LD-ld} -m elf64_s390"
  1245. ;;
  1246. sparc*-*linux*)
  1247. LD="${LD-ld} -m elf64_sparc"
  1248. ;;
  1249. esac
  1250. ;;
  1251. esac
  1252. fi
  1253. rm -rf conftest*
  1254. ;;
  1255. *-*-sco3.2v5*)
  1256. # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  1257. SAVE_CFLAGS=$CFLAGS
  1258. CFLAGS="$CFLAGS -belf"
  1259. AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
  1260. [AC_LANG_PUSH(C)
  1261. AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
  1262. AC_LANG_POP])
  1263. if test yes != "$lt_cv_cc_needs_belf"; then
  1264. # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  1265. CFLAGS=$SAVE_CFLAGS
  1266. fi
  1267. ;;
  1268. *-*solaris*)
  1269. # Find out what ABI is being produced by ac_compile, and set linker
  1270. # options accordingly.
  1271. echo 'int i;' > conftest.$ac_ext
  1272. if AC_TRY_EVAL(ac_compile); then
  1273. case `$FILECMD conftest.o` in
  1274. *64-bit*)
  1275. case $lt_cv_prog_gnu_ld in
  1276. yes*)
  1277. case $host in
  1278. i?86-*-solaris*|x86_64-*-solaris*)
  1279. LD="${LD-ld} -m elf_x86_64"
  1280. ;;
  1281. sparc*-*-solaris*)
  1282. LD="${LD-ld} -m elf64_sparc"
  1283. ;;
  1284. esac
  1285. # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
  1286. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
  1287. LD=${LD-ld}_sol2
  1288. fi
  1289. ;;
  1290. *)
  1291. if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
  1292. LD="${LD-ld} -64"
  1293. fi
  1294. ;;
  1295. esac
  1296. ;;
  1297. esac
  1298. fi
  1299. rm -rf conftest*
  1300. ;;
  1301. esac
  1302. need_locks=$enable_libtool_lock
  1303. ])# _LT_ENABLE_LOCK
  1304. # _LT_PROG_AR
  1305. # -----------
  1306. m4_defun([_LT_PROG_AR],
  1307. [AC_CHECK_TOOLS(AR, [ar], false)
  1308. : ${AR=ar}
  1309. _LT_DECL([], [AR], [1], [The archiver])
  1310. # Use ARFLAGS variable as AR's operation code to sync the variable naming with
  1311. # Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
  1312. # higher priority because thats what people were doing historically (setting
  1313. # ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS
  1314. # variable obsoleted/removed.
  1315. test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
  1316. lt_ar_flags=$AR_FLAGS
  1317. _LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)])
  1318. # Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override
  1319. # by AR_FLAGS because that was never working and AR_FLAGS is about to die.
  1320. _LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}],
  1321. [Flags to create an archive])
  1322. AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
  1323. [lt_cv_ar_at_file=no
  1324. AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
  1325. [echo conftest.$ac_objext > conftest.lst
  1326. lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
  1327. AC_TRY_EVAL([lt_ar_try])
  1328. if test 0 -eq "$ac_status"; then
  1329. # Ensure the archiver fails upon bogus file names.
  1330. rm -f conftest.$ac_objext libconftest.a
  1331. AC_TRY_EVAL([lt_ar_try])
  1332. if test 0 -ne "$ac_status"; then
  1333. lt_cv_ar_at_file=@
  1334. fi
  1335. fi
  1336. rm -f conftest.* libconftest.a
  1337. ])
  1338. ])
  1339. if test no = "$lt_cv_ar_at_file"; then
  1340. archiver_list_spec=
  1341. else
  1342. archiver_list_spec=$lt_cv_ar_at_file
  1343. fi
  1344. _LT_DECL([], [archiver_list_spec], [1],
  1345. [How to feed a file listing to the archiver])
  1346. ])# _LT_PROG_AR
  1347. # _LT_CMD_OLD_ARCHIVE
  1348. # -------------------
  1349. m4_defun([_LT_CMD_OLD_ARCHIVE],
  1350. [_LT_PROG_AR
  1351. AC_CHECK_TOOL(STRIP, strip, :)
  1352. test -z "$STRIP" && STRIP=:
  1353. _LT_DECL([], [STRIP], [1], [A symbol stripping program])
  1354. AC_CHECK_TOOL(RANLIB, ranlib, :)
  1355. test -z "$RANLIB" && RANLIB=:
  1356. _LT_DECL([], [RANLIB], [1],
  1357. [Commands used to install an old-style archive])
  1358. # Determine commands to create old-style static archives.
  1359. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
  1360. old_postinstall_cmds='chmod 644 $oldlib'
  1361. old_postuninstall_cmds=
  1362. if test -n "$RANLIB"; then
  1363. case $host_os in
  1364. bitrig* | openbsd*)
  1365. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
  1366. ;;
  1367. *)
  1368. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
  1369. ;;
  1370. esac
  1371. old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
  1372. fi
  1373. case $host_os in
  1374. darwin*)
  1375. lock_old_archive_extraction=yes ;;
  1376. *)
  1377. lock_old_archive_extraction=no ;;
  1378. esac
  1379. _LT_DECL([], [old_postinstall_cmds], [2])
  1380. _LT_DECL([], [old_postuninstall_cmds], [2])
  1381. _LT_TAGDECL([], [old_archive_cmds], [2],
  1382. [Commands used to build an old-style archive])
  1383. _LT_DECL([], [lock_old_archive_extraction], [0],
  1384. [Whether to use a lock for old archive extraction])
  1385. ])# _LT_CMD_OLD_ARCHIVE
  1386. # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  1387. # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
  1388. # ----------------------------------------------------------------
  1389. # Check whether the given compiler option works
  1390. AC_DEFUN([_LT_COMPILER_OPTION],
  1391. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1392. m4_require([_LT_DECL_SED])dnl
  1393. AC_CACHE_CHECK([$1], [$2],
  1394. [$2=no
  1395. m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
  1396. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  1397. lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment
  1398. # Insert the option either (1) after the last *FLAGS variable, or
  1399. # (2) before a word containing "conftest.", or (3) at the end.
  1400. # Note that $ac_compile itself does not contain backslashes and begins
  1401. # with a dollar sign (not a hyphen), so the echo should work correctly.
  1402. # The option is referenced via a variable to avoid confusing sed.
  1403. lt_compile=`echo "$ac_compile" | $SED \
  1404. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  1405. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  1406. -e 's:$: $lt_compiler_flag:'`
  1407. (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  1408. (eval "$lt_compile" 2>conftest.err)
  1409. ac_status=$?
  1410. cat conftest.err >&AS_MESSAGE_LOG_FD
  1411. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  1412. if (exit $ac_status) && test -s "$ac_outfile"; then
  1413. # The compiler can only warn and ignore the option if not recognized
  1414. # So say no if there are warnings other than the usual output.
  1415. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
  1416. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  1417. if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
  1418. $2=yes
  1419. fi
  1420. fi
  1421. $RM conftest*
  1422. ])
  1423. if test yes = "[$]$2"; then
  1424. m4_if([$5], , :, [$5])
  1425. else
  1426. m4_if([$6], , :, [$6])
  1427. fi
  1428. ])# _LT_COMPILER_OPTION
  1429. # Old name:
  1430. AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
  1431. dnl aclocal-1.4 backwards compatibility:
  1432. dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
  1433. # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  1434. # [ACTION-SUCCESS], [ACTION-FAILURE])
  1435. # ----------------------------------------------------
  1436. # Check whether the given linker option works
  1437. AC_DEFUN([_LT_LINKER_OPTION],
  1438. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1439. m4_require([_LT_DECL_SED])dnl
  1440. AC_CACHE_CHECK([$1], [$2],
  1441. [$2=no
  1442. save_LDFLAGS=$LDFLAGS
  1443. LDFLAGS="$LDFLAGS $3"
  1444. echo "$lt_simple_link_test_code" > conftest.$ac_ext
  1445. if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
  1446. # The linker can only warn and ignore the option if not recognized
  1447. # So say no if there are warnings
  1448. if test -s conftest.err; then
  1449. # Append any errors to the config.log.
  1450. cat conftest.err 1>&AS_MESSAGE_LOG_FD
  1451. $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
  1452. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  1453. if diff conftest.exp conftest.er2 >/dev/null; then
  1454. $2=yes
  1455. fi
  1456. else
  1457. $2=yes
  1458. fi
  1459. fi
  1460. $RM -r conftest*
  1461. LDFLAGS=$save_LDFLAGS
  1462. ])
  1463. if test yes = "[$]$2"; then
  1464. m4_if([$4], , :, [$4])
  1465. else
  1466. m4_if([$5], , :, [$5])
  1467. fi
  1468. ])# _LT_LINKER_OPTION
  1469. # Old name:
  1470. AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
  1471. dnl aclocal-1.4 backwards compatibility:
  1472. dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
  1473. # LT_CMD_MAX_LEN
  1474. #---------------
  1475. AC_DEFUN([LT_CMD_MAX_LEN],
  1476. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  1477. # find the maximum length of command line arguments
  1478. AC_MSG_CHECKING([the maximum length of command line arguments])
  1479. AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
  1480. i=0
  1481. teststring=ABCD
  1482. case $build_os in
  1483. msdosdjgpp*)
  1484. # On DJGPP, this test can blow up pretty badly due to problems in libc
  1485. # (any single argument exceeding 2000 bytes causes a buffer overrun
  1486. # during glob expansion). Even if it were fixed, the result of this
  1487. # check would be larger than it should be.
  1488. lt_cv_sys_max_cmd_len=12288; # 12K is about right
  1489. ;;
  1490. gnu*)
  1491. # Under GNU Hurd, this test is not required because there is
  1492. # no limit to the length of command line arguments.
  1493. # Libtool will interpret -1 as no limit whatsoever
  1494. lt_cv_sys_max_cmd_len=-1;
  1495. ;;
  1496. cygwin* | mingw* | cegcc*)
  1497. # On Win9x/ME, this test blows up -- it succeeds, but takes
  1498. # about 5 minutes as the teststring grows exponentially.
  1499. # Worse, since 9x/ME are not pre-emptively multitasking,
  1500. # you end up with a "frozen" computer, even though with patience
  1501. # the test eventually succeeds (with a max line length of 256k).
  1502. # Instead, let's just punt: use the minimum linelength reported by
  1503. # all of the supported platforms: 8192 (on NT/2K/XP).
  1504. lt_cv_sys_max_cmd_len=8192;
  1505. ;;
  1506. mint*)
  1507. # On MiNT this can take a long time and run out of memory.
  1508. lt_cv_sys_max_cmd_len=8192;
  1509. ;;
  1510. amigaos*)
  1511. # On AmigaOS with pdksh, this test takes hours, literally.
  1512. # So we just punt and use a minimum line length of 8192.
  1513. lt_cv_sys_max_cmd_len=8192;
  1514. ;;
  1515. bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
  1516. # This has been around since 386BSD, at least. Likely further.
  1517. if test -x /sbin/sysctl; then
  1518. lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
  1519. elif test -x /usr/sbin/sysctl; then
  1520. lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
  1521. else
  1522. lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
  1523. fi
  1524. # And add a safety zone
  1525. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  1526. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  1527. ;;
  1528. interix*)
  1529. # We know the value 262144 and hardcode it with a safety zone (like BSD)
  1530. lt_cv_sys_max_cmd_len=196608
  1531. ;;
  1532. os2*)
  1533. # The test takes a long time on OS/2.
  1534. lt_cv_sys_max_cmd_len=8192
  1535. ;;
  1536. osf*)
  1537. # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
  1538. # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
  1539. # nice to cause kernel panics so lets avoid the loop below.
  1540. # First set a reasonable default.
  1541. lt_cv_sys_max_cmd_len=16384
  1542. #
  1543. if test -x /sbin/sysconfig; then
  1544. case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
  1545. *1*) lt_cv_sys_max_cmd_len=-1 ;;
  1546. esac
  1547. fi
  1548. ;;
  1549. sco3.2v5*)
  1550. lt_cv_sys_max_cmd_len=102400
  1551. ;;
  1552. sysv5* | sco5v6* | sysv4.2uw2*)
  1553. kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
  1554. if test -n "$kargmax"; then
  1555. lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'`
  1556. else
  1557. lt_cv_sys_max_cmd_len=32768
  1558. fi
  1559. ;;
  1560. *)
  1561. lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
  1562. if test -n "$lt_cv_sys_max_cmd_len" && \
  1563. test undefined != "$lt_cv_sys_max_cmd_len"; then
  1564. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  1565. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  1566. else
  1567. # Make teststring a little bigger before we do anything with it.
  1568. # a 1K string should be a reasonable start.
  1569. for i in 1 2 3 4 5 6 7 8; do
  1570. teststring=$teststring$teststring
  1571. done
  1572. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
  1573. # If test is not a shell built-in, we'll probably end up computing a
  1574. # maximum length that is only half of the actual maximum length, but
  1575. # we can't tell.
  1576. while { test X`env echo "$teststring$teststring" 2>/dev/null` \
  1577. = "X$teststring$teststring"; } >/dev/null 2>&1 &&
  1578. test 17 != "$i" # 1/2 MB should be enough
  1579. do
  1580. i=`expr $i + 1`
  1581. teststring=$teststring$teststring
  1582. done
  1583. # Only check the string length outside the loop.
  1584. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
  1585. teststring=
  1586. # Add a significant safety factor because C++ compilers can tack on
  1587. # massive amounts of additional arguments before passing them to the
  1588. # linker. It appears as though 1/2 is a usable value.
  1589. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
  1590. fi
  1591. ;;
  1592. esac
  1593. ])
  1594. if test -n "$lt_cv_sys_max_cmd_len"; then
  1595. AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
  1596. else
  1597. AC_MSG_RESULT(none)
  1598. fi
  1599. max_cmd_len=$lt_cv_sys_max_cmd_len
  1600. _LT_DECL([], [max_cmd_len], [0],
  1601. [What is the maximum length of a command?])
  1602. ])# LT_CMD_MAX_LEN
  1603. # Old name:
  1604. AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
  1605. dnl aclocal-1.4 backwards compatibility:
  1606. dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
  1607. # _LT_HEADER_DLFCN
  1608. # ----------------
  1609. m4_defun([_LT_HEADER_DLFCN],
  1610. [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
  1611. ])# _LT_HEADER_DLFCN
  1612. # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
  1613. # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
  1614. # ----------------------------------------------------------------
  1615. m4_defun([_LT_TRY_DLOPEN_SELF],
  1616. [m4_require([_LT_HEADER_DLFCN])dnl
  1617. if test yes = "$cross_compiling"; then :
  1618. [$4]
  1619. else
  1620. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  1621. lt_status=$lt_dlunknown
  1622. cat > conftest.$ac_ext <<_LT_EOF
  1623. [#line $LINENO "configure"
  1624. #include "confdefs.h"
  1625. #if HAVE_DLFCN_H
  1626. #include <dlfcn.h>
  1627. #endif
  1628. #include <stdio.h>
  1629. #ifdef RTLD_GLOBAL
  1630. # define LT_DLGLOBAL RTLD_GLOBAL
  1631. #else
  1632. # ifdef DL_GLOBAL
  1633. # define LT_DLGLOBAL DL_GLOBAL
  1634. # else
  1635. # define LT_DLGLOBAL 0
  1636. # endif
  1637. #endif
  1638. /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
  1639. find out it does not work in some platform. */
  1640. #ifndef LT_DLLAZY_OR_NOW
  1641. # ifdef RTLD_LAZY
  1642. # define LT_DLLAZY_OR_NOW RTLD_LAZY
  1643. # else
  1644. # ifdef DL_LAZY
  1645. # define LT_DLLAZY_OR_NOW DL_LAZY
  1646. # else
  1647. # ifdef RTLD_NOW
  1648. # define LT_DLLAZY_OR_NOW RTLD_NOW
  1649. # else
  1650. # ifdef DL_NOW
  1651. # define LT_DLLAZY_OR_NOW DL_NOW
  1652. # else
  1653. # define LT_DLLAZY_OR_NOW 0
  1654. # endif
  1655. # endif
  1656. # endif
  1657. # endif
  1658. #endif
  1659. /* When -fvisibility=hidden is used, assume the code has been annotated
  1660. correspondingly for the symbols needed. */
  1661. #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
  1662. int fnord () __attribute__((visibility("default")));
  1663. #endif
  1664. int fnord () { return 42; }
  1665. int main ()
  1666. {
  1667. void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  1668. int status = $lt_dlunknown;
  1669. if (self)
  1670. {
  1671. if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
  1672. else
  1673. {
  1674. if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
  1675. else puts (dlerror ());
  1676. }
  1677. /* dlclose (self); */
  1678. }
  1679. else
  1680. puts (dlerror ());
  1681. return status;
  1682. }]
  1683. _LT_EOF
  1684. if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
  1685. (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
  1686. lt_status=$?
  1687. case x$lt_status in
  1688. x$lt_dlno_uscore) $1 ;;
  1689. x$lt_dlneed_uscore) $2 ;;
  1690. x$lt_dlunknown|x*) $3 ;;
  1691. esac
  1692. else :
  1693. # compilation failed
  1694. $3
  1695. fi
  1696. fi
  1697. rm -fr conftest*
  1698. ])# _LT_TRY_DLOPEN_SELF
  1699. # LT_SYS_DLOPEN_SELF
  1700. # ------------------
  1701. AC_DEFUN([LT_SYS_DLOPEN_SELF],
  1702. [m4_require([_LT_HEADER_DLFCN])dnl
  1703. if test yes != "$enable_dlopen"; then
  1704. enable_dlopen=unknown
  1705. enable_dlopen_self=unknown
  1706. enable_dlopen_self_static=unknown
  1707. else
  1708. lt_cv_dlopen=no
  1709. lt_cv_dlopen_libs=
  1710. case $host_os in
  1711. beos*)
  1712. lt_cv_dlopen=load_add_on
  1713. lt_cv_dlopen_libs=
  1714. lt_cv_dlopen_self=yes
  1715. ;;
  1716. mingw* | pw32* | cegcc*)
  1717. lt_cv_dlopen=LoadLibrary
  1718. lt_cv_dlopen_libs=
  1719. ;;
  1720. cygwin*)
  1721. lt_cv_dlopen=dlopen
  1722. lt_cv_dlopen_libs=
  1723. ;;
  1724. darwin*)
  1725. # if libdl is installed we need to link against it
  1726. AC_CHECK_LIB([dl], [dlopen],
  1727. [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
  1728. lt_cv_dlopen=dyld
  1729. lt_cv_dlopen_libs=
  1730. lt_cv_dlopen_self=yes
  1731. ])
  1732. ;;
  1733. tpf*)
  1734. # Don't try to run any link tests for TPF. We know it's impossible
  1735. # because TPF is a cross-compiler, and we know how we open DSOs.
  1736. lt_cv_dlopen=dlopen
  1737. lt_cv_dlopen_libs=
  1738. lt_cv_dlopen_self=no
  1739. ;;
  1740. *)
  1741. AC_CHECK_FUNC([shl_load],
  1742. [lt_cv_dlopen=shl_load],
  1743. [AC_CHECK_LIB([dld], [shl_load],
  1744. [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
  1745. [AC_CHECK_FUNC([dlopen],
  1746. [lt_cv_dlopen=dlopen],
  1747. [AC_CHECK_LIB([dl], [dlopen],
  1748. [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
  1749. [AC_CHECK_LIB([svld], [dlopen],
  1750. [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
  1751. [AC_CHECK_LIB([dld], [dld_link],
  1752. [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
  1753. ])
  1754. ])
  1755. ])
  1756. ])
  1757. ])
  1758. ;;
  1759. esac
  1760. if test no = "$lt_cv_dlopen"; then
  1761. enable_dlopen=no
  1762. else
  1763. enable_dlopen=yes
  1764. fi
  1765. case $lt_cv_dlopen in
  1766. dlopen)
  1767. save_CPPFLAGS=$CPPFLAGS
  1768. test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  1769. save_LDFLAGS=$LDFLAGS
  1770. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  1771. save_LIBS=$LIBS
  1772. LIBS="$lt_cv_dlopen_libs $LIBS"
  1773. AC_CACHE_CHECK([whether a program can dlopen itself],
  1774. lt_cv_dlopen_self, [dnl
  1775. _LT_TRY_DLOPEN_SELF(
  1776. lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
  1777. lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
  1778. ])
  1779. if test yes = "$lt_cv_dlopen_self"; then
  1780. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
  1781. AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
  1782. lt_cv_dlopen_self_static, [dnl
  1783. _LT_TRY_DLOPEN_SELF(
  1784. lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
  1785. lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
  1786. ])
  1787. fi
  1788. CPPFLAGS=$save_CPPFLAGS
  1789. LDFLAGS=$save_LDFLAGS
  1790. LIBS=$save_LIBS
  1791. ;;
  1792. esac
  1793. case $lt_cv_dlopen_self in
  1794. yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  1795. *) enable_dlopen_self=unknown ;;
  1796. esac
  1797. case $lt_cv_dlopen_self_static in
  1798. yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  1799. *) enable_dlopen_self_static=unknown ;;
  1800. esac
  1801. fi
  1802. _LT_DECL([dlopen_support], [enable_dlopen], [0],
  1803. [Whether dlopen is supported])
  1804. _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
  1805. [Whether dlopen of programs is supported])
  1806. _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
  1807. [Whether dlopen of statically linked programs is supported])
  1808. ])# LT_SYS_DLOPEN_SELF
  1809. # Old name:
  1810. AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
  1811. dnl aclocal-1.4 backwards compatibility:
  1812. dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
  1813. # _LT_COMPILER_C_O([TAGNAME])
  1814. # ---------------------------
  1815. # Check to see if options -c and -o are simultaneously supported by compiler.
  1816. # This macro does not hard code the compiler like AC_PROG_CC_C_O.
  1817. m4_defun([_LT_COMPILER_C_O],
  1818. [m4_require([_LT_DECL_SED])dnl
  1819. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1820. m4_require([_LT_TAG_COMPILER])dnl
  1821. AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
  1822. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
  1823. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
  1824. $RM -r conftest 2>/dev/null
  1825. mkdir conftest
  1826. cd conftest
  1827. mkdir out
  1828. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  1829. lt_compiler_flag="-o out/conftest2.$ac_objext"
  1830. # Insert the option either (1) after the last *FLAGS variable, or
  1831. # (2) before a word containing "conftest.", or (3) at the end.
  1832. # Note that $ac_compile itself does not contain backslashes and begins
  1833. # with a dollar sign (not a hyphen), so the echo should work correctly.
  1834. lt_compile=`echo "$ac_compile" | $SED \
  1835. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  1836. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  1837. -e 's:$: $lt_compiler_flag:'`
  1838. (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  1839. (eval "$lt_compile" 2>out/conftest.err)
  1840. ac_status=$?
  1841. cat out/conftest.err >&AS_MESSAGE_LOG_FD
  1842. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  1843. if (exit $ac_status) && test -s out/conftest2.$ac_objext
  1844. then
  1845. # The compiler can only warn and ignore the option if not recognized
  1846. # So say no if there are warnings
  1847. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
  1848. $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
  1849. if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
  1850. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  1851. fi
  1852. fi
  1853. chmod u+w . 2>&AS_MESSAGE_LOG_FD
  1854. $RM conftest*
  1855. # SGI C++ compiler will create directory out/ii_files/ for
  1856. # template instantiation
  1857. test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
  1858. $RM out/* && rmdir out
  1859. cd ..
  1860. $RM -r conftest
  1861. $RM conftest*
  1862. ])
  1863. _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
  1864. [Does compiler simultaneously support -c and -o options?])
  1865. ])# _LT_COMPILER_C_O
  1866. # _LT_COMPILER_FILE_LOCKS([TAGNAME])
  1867. # ----------------------------------
  1868. # Check to see if we can do hard links to lock some files if needed
  1869. m4_defun([_LT_COMPILER_FILE_LOCKS],
  1870. [m4_require([_LT_ENABLE_LOCK])dnl
  1871. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1872. _LT_COMPILER_C_O([$1])
  1873. hard_links=nottested
  1874. if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
  1875. # do not overwrite the value of need_locks provided by the user
  1876. AC_MSG_CHECKING([if we can lock with hard links])
  1877. hard_links=yes
  1878. $RM conftest*
  1879. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1880. touch conftest.a
  1881. ln conftest.a conftest.b 2>&5 || hard_links=no
  1882. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1883. AC_MSG_RESULT([$hard_links])
  1884. if test no = "$hard_links"; then
  1885. AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
  1886. need_locks=warn
  1887. fi
  1888. else
  1889. need_locks=no
  1890. fi
  1891. _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
  1892. ])# _LT_COMPILER_FILE_LOCKS
  1893. # _LT_CHECK_OBJDIR
  1894. # ----------------
  1895. m4_defun([_LT_CHECK_OBJDIR],
  1896. [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
  1897. [rm -f .libs 2>/dev/null
  1898. mkdir .libs 2>/dev/null
  1899. if test -d .libs; then
  1900. lt_cv_objdir=.libs
  1901. else
  1902. # MS-DOS does not allow filenames that begin with a dot.
  1903. lt_cv_objdir=_libs
  1904. fi
  1905. rmdir .libs 2>/dev/null])
  1906. objdir=$lt_cv_objdir
  1907. _LT_DECL([], [objdir], [0],
  1908. [The name of the directory that contains temporary libtool files])dnl
  1909. m4_pattern_allow([LT_OBJDIR])dnl
  1910. AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
  1911. [Define to the sub-directory where libtool stores uninstalled libraries.])
  1912. ])# _LT_CHECK_OBJDIR
  1913. # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
  1914. # --------------------------------------
  1915. # Check hardcoding attributes.
  1916. m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
  1917. [AC_MSG_CHECKING([how to hardcode library paths into programs])
  1918. _LT_TAGVAR(hardcode_action, $1)=
  1919. if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
  1920. test -n "$_LT_TAGVAR(runpath_var, $1)" ||
  1921. test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
  1922. # We can hardcode non-existent directories.
  1923. if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
  1924. # If the only mechanism to avoid hardcoding is shlibpath_var, we
  1925. # have to relink, otherwise we might link with an installed library
  1926. # when we should be linking with a yet-to-be-installed one
  1927. ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
  1928. test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
  1929. # Linking always hardcodes the temporary library directory.
  1930. _LT_TAGVAR(hardcode_action, $1)=relink
  1931. else
  1932. # We can link without hardcoding, and we can hardcode nonexisting dirs.
  1933. _LT_TAGVAR(hardcode_action, $1)=immediate
  1934. fi
  1935. else
  1936. # We cannot hardcode anything, or else we can only hardcode existing
  1937. # directories.
  1938. _LT_TAGVAR(hardcode_action, $1)=unsupported
  1939. fi
  1940. AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
  1941. if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
  1942. test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
  1943. # Fast installation is not supported
  1944. enable_fast_install=no
  1945. elif test yes = "$shlibpath_overrides_runpath" ||
  1946. test no = "$enable_shared"; then
  1947. # Fast installation is not necessary
  1948. enable_fast_install=needless
  1949. fi
  1950. _LT_TAGDECL([], [hardcode_action], [0],
  1951. [How to hardcode a shared library path into an executable])
  1952. ])# _LT_LINKER_HARDCODE_LIBPATH
  1953. # _LT_CMD_STRIPLIB
  1954. # ----------------
  1955. m4_defun([_LT_CMD_STRIPLIB],
  1956. [m4_require([_LT_DECL_EGREP])
  1957. striplib=
  1958. old_striplib=
  1959. AC_MSG_CHECKING([whether stripping libraries is possible])
  1960. if test -z "$STRIP"; then
  1961. AC_MSG_RESULT([no])
  1962. else
  1963. if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
  1964. old_striplib="$STRIP --strip-debug"
  1965. striplib="$STRIP --strip-unneeded"
  1966. AC_MSG_RESULT([yes])
  1967. else
  1968. case $host_os in
  1969. darwin*)
  1970. # FIXME - insert some real tests, host_os isn't really good enough
  1971. striplib="$STRIP -x"
  1972. old_striplib="$STRIP -S"
  1973. AC_MSG_RESULT([yes])
  1974. ;;
  1975. freebsd*)
  1976. if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
  1977. old_striplib="$STRIP --strip-debug"
  1978. striplib="$STRIP --strip-unneeded"
  1979. AC_MSG_RESULT([yes])
  1980. else
  1981. AC_MSG_RESULT([no])
  1982. fi
  1983. ;;
  1984. *)
  1985. AC_MSG_RESULT([no])
  1986. ;;
  1987. esac
  1988. fi
  1989. fi
  1990. _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
  1991. _LT_DECL([], [striplib], [1])
  1992. ])# _LT_CMD_STRIPLIB
  1993. # _LT_PREPARE_MUNGE_PATH_LIST
  1994. # ---------------------------
  1995. # Make sure func_munge_path_list() is defined correctly.
  1996. m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
  1997. [[# func_munge_path_list VARIABLE PATH
  1998. # -----------------------------------
  1999. # VARIABLE is name of variable containing _space_ separated list of
  2000. # directories to be munged by the contents of PATH, which is string
  2001. # having a format:
  2002. # "DIR[:DIR]:"
  2003. # string "DIR[ DIR]" will be prepended to VARIABLE
  2004. # ":DIR[:DIR]"
  2005. # string "DIR[ DIR]" will be appended to VARIABLE
  2006. # "DIRP[:DIRP]::[DIRA:]DIRA"
  2007. # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
  2008. # "DIRA[ DIRA]" will be appended to VARIABLE
  2009. # "DIR[:DIR]"
  2010. # VARIABLE will be replaced by "DIR[ DIR]"
  2011. func_munge_path_list ()
  2012. {
  2013. case x@S|@2 in
  2014. x)
  2015. ;;
  2016. *:)
  2017. eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
  2018. ;;
  2019. x:*)
  2020. eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
  2021. ;;
  2022. *::*)
  2023. eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
  2024. eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
  2025. ;;
  2026. *)
  2027. eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
  2028. ;;
  2029. esac
  2030. }
  2031. ]])# _LT_PREPARE_PATH_LIST
  2032. # _LT_SYS_DYNAMIC_LINKER([TAG])
  2033. # -----------------------------
  2034. # PORTME Fill in your ld.so characteristics
  2035. m4_defun([_LT_SYS_DYNAMIC_LINKER],
  2036. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2037. m4_require([_LT_DECL_EGREP])dnl
  2038. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  2039. m4_require([_LT_DECL_OBJDUMP])dnl
  2040. m4_require([_LT_DECL_SED])dnl
  2041. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  2042. m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
  2043. AC_MSG_CHECKING([dynamic linker characteristics])
  2044. m4_if([$1],
  2045. [], [
  2046. if test yes = "$GCC"; then
  2047. case $host_os in
  2048. darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
  2049. *) lt_awk_arg='/^libraries:/' ;;
  2050. esac
  2051. case $host_os in
  2052. mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
  2053. *) lt_sed_strip_eq='s|=/|/|g' ;;
  2054. esac
  2055. lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
  2056. case $lt_search_path_spec in
  2057. *\;*)
  2058. # if the path contains ";" then we assume it to be the separator
  2059. # otherwise default to the standard path separator (i.e. ":") - it is
  2060. # assumed that no part of a normal pathname contains ";" but that should
  2061. # okay in the real world where ";" in dirpaths is itself problematic.
  2062. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
  2063. ;;
  2064. *)
  2065. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
  2066. ;;
  2067. esac
  2068. # Ok, now we have the path, separated by spaces, we can step through it
  2069. # and add multilib dir if necessary...
  2070. lt_tmp_lt_search_path_spec=
  2071. lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
  2072. # ...but if some path component already ends with the multilib dir we assume
  2073. # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
  2074. case "$lt_multi_os_dir; $lt_search_path_spec " in
  2075. "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
  2076. lt_multi_os_dir=
  2077. ;;
  2078. esac
  2079. for lt_sys_path in $lt_search_path_spec; do
  2080. if test -d "$lt_sys_path$lt_multi_os_dir"; then
  2081. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
  2082. elif test -n "$lt_multi_os_dir"; then
  2083. test -d "$lt_sys_path" && \
  2084. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
  2085. fi
  2086. done
  2087. lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
  2088. BEGIN {RS = " "; FS = "/|\n";} {
  2089. lt_foo = "";
  2090. lt_count = 0;
  2091. for (lt_i = NF; lt_i > 0; lt_i--) {
  2092. if ($lt_i != "" && $lt_i != ".") {
  2093. if ($lt_i == "..") {
  2094. lt_count++;
  2095. } else {
  2096. if (lt_count == 0) {
  2097. lt_foo = "/" $lt_i lt_foo;
  2098. } else {
  2099. lt_count--;
  2100. }
  2101. }
  2102. }
  2103. }
  2104. if (lt_foo != "") { lt_freq[[lt_foo]]++; }
  2105. if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
  2106. }'`
  2107. # AWK program above erroneously prepends '/' to C:/dos/paths
  2108. # for these hosts.
  2109. case $host_os in
  2110. mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
  2111. $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
  2112. esac
  2113. sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
  2114. else
  2115. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  2116. fi])
  2117. library_names_spec=
  2118. libname_spec='lib$name'
  2119. soname_spec=
  2120. shrext_cmds=.so
  2121. postinstall_cmds=
  2122. postuninstall_cmds=
  2123. finish_cmds=
  2124. finish_eval=
  2125. shlibpath_var=
  2126. shlibpath_overrides_runpath=unknown
  2127. version_type=none
  2128. dynamic_linker="$host_os ld.so"
  2129. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  2130. need_lib_prefix=unknown
  2131. hardcode_into_libs=no
  2132. # when you set need_version to no, make sure it does not cause -set_version
  2133. # flags to be left without arguments
  2134. need_version=unknown
  2135. AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
  2136. [User-defined run-time library search path.])
  2137. case $host_os in
  2138. aix3*)
  2139. version_type=linux # correct to gnu/linux during the next big refactor
  2140. library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
  2141. shlibpath_var=LIBPATH
  2142. # AIX 3 has no versioning support, so we append a major version to the name.
  2143. soname_spec='$libname$release$shared_ext$major'
  2144. ;;
  2145. aix[[4-9]]*)
  2146. version_type=linux # correct to gnu/linux during the next big refactor
  2147. need_lib_prefix=no
  2148. need_version=no
  2149. hardcode_into_libs=yes
  2150. if test ia64 = "$host_cpu"; then
  2151. # AIX 5 supports IA64
  2152. library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
  2153. shlibpath_var=LD_LIBRARY_PATH
  2154. else
  2155. # With GCC up to 2.95.x, collect2 would create an import file
  2156. # for dependence libraries. The import file would start with
  2157. # the line '#! .'. This would cause the generated library to
  2158. # depend on '.', always an invalid library. This was fixed in
  2159. # development snapshots of GCC prior to 3.0.
  2160. case $host_os in
  2161. aix4 | aix4.[[01]] | aix4.[[01]].*)
  2162. if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
  2163. echo ' yes '
  2164. echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
  2165. :
  2166. else
  2167. can_build_shared=no
  2168. fi
  2169. ;;
  2170. esac
  2171. # Using Import Files as archive members, it is possible to support
  2172. # filename-based versioning of shared library archives on AIX. While
  2173. # this would work for both with and without runtime linking, it will
  2174. # prevent static linking of such archives. So we do filename-based
  2175. # shared library versioning with .so extension only, which is used
  2176. # when both runtime linking and shared linking is enabled.
  2177. # Unfortunately, runtime linking may impact performance, so we do
  2178. # not want this to be the default eventually. Also, we use the
  2179. # versioned .so libs for executables only if there is the -brtl
  2180. # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
  2181. # To allow for filename-based versioning support, we need to create
  2182. # libNAME.so.V as an archive file, containing:
  2183. # *) an Import File, referring to the versioned filename of the
  2184. # archive as well as the shared archive member, telling the
  2185. # bitwidth (32 or 64) of that shared object, and providing the
  2186. # list of exported symbols of that shared object, eventually
  2187. # decorated with the 'weak' keyword
  2188. # *) the shared object with the F_LOADONLY flag set, to really avoid
  2189. # it being seen by the linker.
  2190. # At run time we better use the real file rather than another symlink,
  2191. # but for link time we create the symlink libNAME.so -> libNAME.so.V
  2192. case $with_aix_soname,$aix_use_runtimelinking in
  2193. # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
  2194. # soname into executable. Probably we can add versioning support to
  2195. # collect2, so additional links can be useful in future.
  2196. aix,yes) # traditional libtool
  2197. dynamic_linker='AIX unversionable lib.so'
  2198. # If using run time linking (on AIX 4.2 or later) use lib<name>.so
  2199. # instead of lib<name>.a to let people know that these are not
  2200. # typical AIX shared libraries.
  2201. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2202. ;;
  2203. aix,no) # traditional AIX only
  2204. dynamic_linker='AIX lib.a[(]lib.so.V[)]'
  2205. # We preserve .a as extension for shared libraries through AIX4.2
  2206. # and later when we are not doing run time linking.
  2207. library_names_spec='$libname$release.a $libname.a'
  2208. soname_spec='$libname$release$shared_ext$major'
  2209. ;;
  2210. svr4,*) # full svr4 only
  2211. dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
  2212. library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
  2213. # We do not specify a path in Import Files, so LIBPATH fires.
  2214. shlibpath_overrides_runpath=yes
  2215. ;;
  2216. *,yes) # both, prefer svr4
  2217. dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
  2218. library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
  2219. # unpreferred sharedlib libNAME.a needs extra handling
  2220. 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"'
  2221. 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"'
  2222. # We do not specify a path in Import Files, so LIBPATH fires.
  2223. shlibpath_overrides_runpath=yes
  2224. ;;
  2225. *,no) # both, prefer aix
  2226. dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
  2227. library_names_spec='$libname$release.a $libname.a'
  2228. soname_spec='$libname$release$shared_ext$major'
  2229. # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
  2230. 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)'
  2231. 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"'
  2232. ;;
  2233. esac
  2234. shlibpath_var=LIBPATH
  2235. fi
  2236. ;;
  2237. amigaos*)
  2238. case $host_cpu in
  2239. powerpc)
  2240. # Since July 2007 AmigaOS4 officially supports .so libraries.
  2241. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
  2242. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2243. ;;
  2244. m68k)
  2245. library_names_spec='$libname.ixlibrary $libname.a'
  2246. # Create ${libname}_ixlibrary.a entries in /sys/libs.
  2247. 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'
  2248. ;;
  2249. esac
  2250. ;;
  2251. beos*)
  2252. library_names_spec='$libname$shared_ext'
  2253. dynamic_linker="$host_os ld.so"
  2254. shlibpath_var=LIBRARY_PATH
  2255. ;;
  2256. bsdi[[45]]*)
  2257. version_type=linux # correct to gnu/linux during the next big refactor
  2258. need_version=no
  2259. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2260. soname_spec='$libname$release$shared_ext$major'
  2261. finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  2262. shlibpath_var=LD_LIBRARY_PATH
  2263. sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  2264. sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  2265. # the default ld.so.conf also contains /usr/contrib/lib and
  2266. # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  2267. # libtool to hard-code these into programs
  2268. ;;
  2269. cygwin* | mingw* | pw32* | cegcc*)
  2270. version_type=windows
  2271. shrext_cmds=.dll
  2272. need_version=no
  2273. need_lib_prefix=no
  2274. case $GCC,$cc_basename in
  2275. yes,*)
  2276. # gcc
  2277. library_names_spec='$libname.dll.a'
  2278. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  2279. postinstall_cmds='base_file=`basename \$file`~
  2280. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
  2281. dldir=$destdir/`dirname \$dlpath`~
  2282. test -d \$dldir || mkdir -p \$dldir~
  2283. $install_prog $dir/$dlname \$dldir/$dlname~
  2284. chmod a+x \$dldir/$dlname~
  2285. if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
  2286. eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
  2287. fi'
  2288. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  2289. dlpath=$dir/\$dldll~
  2290. $RM \$dlpath'
  2291. shlibpath_overrides_runpath=yes
  2292. case $host_os in
  2293. cygwin*)
  2294. # Cygwin DLLs use 'cyg' prefix rather than 'lib'
  2295. soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
  2296. m4_if([$1], [],[
  2297. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
  2298. ;;
  2299. mingw* | cegcc*)
  2300. # MinGW DLLs use traditional 'lib' prefix
  2301. soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
  2302. ;;
  2303. pw32*)
  2304. # pw32 DLLs use 'pw' prefix rather than 'lib'
  2305. library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
  2306. ;;
  2307. esac
  2308. dynamic_linker='Win32 ld.exe'
  2309. ;;
  2310. *,cl* | *,icl*)
  2311. # Native MSVC or ICC
  2312. libname_spec='$name'
  2313. soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
  2314. library_names_spec='$libname.dll.lib'
  2315. case $build_os in
  2316. mingw*)
  2317. sys_lib_search_path_spec=
  2318. lt_save_ifs=$IFS
  2319. IFS=';'
  2320. for lt_path in $LIB
  2321. do
  2322. IFS=$lt_save_ifs
  2323. # Let DOS variable expansion print the short 8.3 style file name.
  2324. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
  2325. sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
  2326. done
  2327. IFS=$lt_save_ifs
  2328. # Convert to MSYS style.
  2329. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
  2330. ;;
  2331. cygwin*)
  2332. # Convert to unix form, then to dos form, then back to unix form
  2333. # but this time dos style (no spaces!) so that the unix form looks
  2334. # like /cygdrive/c/PROGRA~1:/cygdr...
  2335. sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
  2336. sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
  2337. sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  2338. ;;
  2339. *)
  2340. sys_lib_search_path_spec=$LIB
  2341. if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
  2342. # It is most probably a Windows format PATH.
  2343. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  2344. else
  2345. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  2346. fi
  2347. # FIXME: find the short name or the path components, as spaces are
  2348. # common. (e.g. "Program Files" -> "PROGRA~1")
  2349. ;;
  2350. esac
  2351. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  2352. postinstall_cmds='base_file=`basename \$file`~
  2353. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
  2354. dldir=$destdir/`dirname \$dlpath`~
  2355. test -d \$dldir || mkdir -p \$dldir~
  2356. $install_prog $dir/$dlname \$dldir/$dlname'
  2357. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  2358. dlpath=$dir/\$dldll~
  2359. $RM \$dlpath'
  2360. shlibpath_overrides_runpath=yes
  2361. dynamic_linker='Win32 link.exe'
  2362. ;;
  2363. *)
  2364. # Assume MSVC and ICC wrapper
  2365. library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
  2366. dynamic_linker='Win32 ld.exe'
  2367. ;;
  2368. esac
  2369. # FIXME: first we should search . and the directory the executable is in
  2370. shlibpath_var=PATH
  2371. ;;
  2372. darwin* | rhapsody*)
  2373. dynamic_linker="$host_os dyld"
  2374. version_type=darwin
  2375. need_lib_prefix=no
  2376. need_version=no
  2377. library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
  2378. soname_spec='$libname$release$major$shared_ext'
  2379. shlibpath_overrides_runpath=yes
  2380. shlibpath_var=DYLD_LIBRARY_PATH
  2381. shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
  2382. m4_if([$1], [],[
  2383. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
  2384. sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
  2385. ;;
  2386. dgux*)
  2387. version_type=linux # correct to gnu/linux during the next big refactor
  2388. need_lib_prefix=no
  2389. need_version=no
  2390. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2391. soname_spec='$libname$release$shared_ext$major'
  2392. shlibpath_var=LD_LIBRARY_PATH
  2393. ;;
  2394. freebsd* | dragonfly* | midnightbsd*)
  2395. # DragonFly does not have aout. When/if they implement a new
  2396. # versioning mechanism, adjust this.
  2397. if test -x /usr/bin/objformat; then
  2398. objformat=`/usr/bin/objformat`
  2399. else
  2400. case $host_os in
  2401. freebsd[[23]].*) objformat=aout ;;
  2402. *) objformat=elf ;;
  2403. esac
  2404. fi
  2405. version_type=freebsd-$objformat
  2406. case $version_type in
  2407. freebsd-elf*)
  2408. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2409. soname_spec='$libname$release$shared_ext$major'
  2410. need_version=no
  2411. need_lib_prefix=no
  2412. ;;
  2413. freebsd-*)
  2414. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  2415. need_version=yes
  2416. ;;
  2417. esac
  2418. shlibpath_var=LD_LIBRARY_PATH
  2419. case $host_os in
  2420. freebsd2.*)
  2421. shlibpath_overrides_runpath=yes
  2422. ;;
  2423. freebsd3.[[01]]* | freebsdelf3.[[01]]*)
  2424. shlibpath_overrides_runpath=yes
  2425. hardcode_into_libs=yes
  2426. ;;
  2427. freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
  2428. freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
  2429. shlibpath_overrides_runpath=no
  2430. hardcode_into_libs=yes
  2431. ;;
  2432. *) # from 4.6 on, and DragonFly
  2433. shlibpath_overrides_runpath=yes
  2434. hardcode_into_libs=yes
  2435. ;;
  2436. esac
  2437. ;;
  2438. haiku*)
  2439. version_type=linux # correct to gnu/linux during the next big refactor
  2440. need_lib_prefix=no
  2441. need_version=no
  2442. dynamic_linker="$host_os runtime_loader"
  2443. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2444. soname_spec='$libname$release$shared_ext$major'
  2445. shlibpath_var=LIBRARY_PATH
  2446. shlibpath_overrides_runpath=no
  2447. sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
  2448. hardcode_into_libs=yes
  2449. ;;
  2450. hpux9* | hpux10* | hpux11*)
  2451. # Give a soname corresponding to the major version so that dld.sl refuses to
  2452. # link against other versions.
  2453. version_type=sunos
  2454. need_lib_prefix=no
  2455. need_version=no
  2456. case $host_cpu in
  2457. ia64*)
  2458. shrext_cmds='.so'
  2459. hardcode_into_libs=yes
  2460. dynamic_linker="$host_os dld.so"
  2461. shlibpath_var=LD_LIBRARY_PATH
  2462. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  2463. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2464. soname_spec='$libname$release$shared_ext$major'
  2465. if test 32 = "$HPUX_IA64_MODE"; then
  2466. sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
  2467. sys_lib_dlsearch_path_spec=/usr/lib/hpux32
  2468. else
  2469. sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
  2470. sys_lib_dlsearch_path_spec=/usr/lib/hpux64
  2471. fi
  2472. ;;
  2473. hppa*64*)
  2474. shrext_cmds='.sl'
  2475. hardcode_into_libs=yes
  2476. dynamic_linker="$host_os dld.sl"
  2477. shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
  2478. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  2479. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2480. soname_spec='$libname$release$shared_ext$major'
  2481. sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
  2482. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2483. ;;
  2484. *)
  2485. shrext_cmds='.sl'
  2486. dynamic_linker="$host_os dld.sl"
  2487. shlibpath_var=SHLIB_PATH
  2488. shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  2489. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2490. soname_spec='$libname$release$shared_ext$major'
  2491. ;;
  2492. esac
  2493. # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
  2494. postinstall_cmds='chmod 555 $lib'
  2495. # or fails outright, so override atomically:
  2496. install_override_mode=555
  2497. ;;
  2498. interix[[3-9]]*)
  2499. version_type=linux # correct to gnu/linux during the next big refactor
  2500. need_lib_prefix=no
  2501. need_version=no
  2502. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2503. soname_spec='$libname$release$shared_ext$major'
  2504. dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
  2505. shlibpath_var=LD_LIBRARY_PATH
  2506. shlibpath_overrides_runpath=no
  2507. hardcode_into_libs=yes
  2508. ;;
  2509. irix5* | irix6* | nonstopux*)
  2510. case $host_os in
  2511. nonstopux*) version_type=nonstopux ;;
  2512. *)
  2513. if test yes = "$lt_cv_prog_gnu_ld"; then
  2514. version_type=linux # correct to gnu/linux during the next big refactor
  2515. else
  2516. version_type=irix
  2517. fi ;;
  2518. esac
  2519. need_lib_prefix=no
  2520. need_version=no
  2521. soname_spec='$libname$release$shared_ext$major'
  2522. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
  2523. case $host_os in
  2524. irix5* | nonstopux*)
  2525. libsuff= shlibsuff=
  2526. ;;
  2527. *)
  2528. case $LD in # libtool.m4 will add one of these switches to LD
  2529. *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
  2530. libsuff= shlibsuff= libmagic=32-bit;;
  2531. *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
  2532. libsuff=32 shlibsuff=N32 libmagic=N32;;
  2533. *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
  2534. libsuff=64 shlibsuff=64 libmagic=64-bit;;
  2535. *) libsuff= shlibsuff= libmagic=never-match;;
  2536. esac
  2537. ;;
  2538. esac
  2539. shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  2540. shlibpath_overrides_runpath=no
  2541. sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
  2542. sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
  2543. hardcode_into_libs=yes
  2544. ;;
  2545. # No shared lib support for Linux oldld, aout, or coff.
  2546. linux*oldld* | linux*aout* | linux*coff*)
  2547. dynamic_linker=no
  2548. ;;
  2549. linux*android*)
  2550. version_type=none # Android doesn't support versioned libraries.
  2551. need_lib_prefix=no
  2552. need_version=no
  2553. library_names_spec='$libname$release$shared_ext'
  2554. soname_spec='$libname$release$shared_ext'
  2555. finish_cmds=
  2556. shlibpath_var=LD_LIBRARY_PATH
  2557. shlibpath_overrides_runpath=yes
  2558. # This implies no fast_install, which is unacceptable.
  2559. # Some rework will be needed to allow for fast_install
  2560. # before this can be enabled.
  2561. hardcode_into_libs=yes
  2562. dynamic_linker='Android linker'
  2563. # Don't embed -rpath directories since the linker doesn't support them.
  2564. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  2565. ;;
  2566. # This must be glibc/ELF.
  2567. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  2568. version_type=linux # correct to gnu/linux during the next big refactor
  2569. need_lib_prefix=no
  2570. need_version=no
  2571. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2572. soname_spec='$libname$release$shared_ext$major'
  2573. finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  2574. shlibpath_var=LD_LIBRARY_PATH
  2575. shlibpath_overrides_runpath=no
  2576. # Some binutils ld are patched to set DT_RUNPATH
  2577. AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
  2578. [lt_cv_shlibpath_overrides_runpath=no
  2579. save_LDFLAGS=$LDFLAGS
  2580. save_libdir=$libdir
  2581. eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
  2582. LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
  2583. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  2584. [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
  2585. [lt_cv_shlibpath_overrides_runpath=yes])])
  2586. LDFLAGS=$save_LDFLAGS
  2587. libdir=$save_libdir
  2588. ])
  2589. shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
  2590. # This implies no fast_install, which is unacceptable.
  2591. # Some rework will be needed to allow for fast_install
  2592. # before this can be enabled.
  2593. hardcode_into_libs=yes
  2594. # Ideally, we could use ldconfig to report *all* directores which are
  2595. # searched for libraries, however this is still not possible. Aside from not
  2596. # being certain /sbin/ldconfig is available, command
  2597. # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
  2598. # even though it is searched at run-time. Try to do the best guess by
  2599. # appending ld.so.conf contents (and includes) to the search path.
  2600. if test -f /etc/ld.so.conf; then
  2601. 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' ' '`
  2602. sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
  2603. fi
  2604. # We used to test for /lib/ld.so.1 and disable shared libraries on
  2605. # powerpc, because MkLinux only supported shared libraries with the
  2606. # GNU dynamic linker. Since this was broken with cross compilers,
  2607. # most powerpc-linux boxes support dynamic linking these days and
  2608. # people can always --disable-shared, the test was removed, and we
  2609. # assume the GNU/Linux dynamic linker is in use.
  2610. dynamic_linker='GNU/Linux ld.so'
  2611. ;;
  2612. netbsdelf*-gnu)
  2613. version_type=linux
  2614. need_lib_prefix=no
  2615. need_version=no
  2616. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  2617. soname_spec='${libname}${release}${shared_ext}$major'
  2618. shlibpath_var=LD_LIBRARY_PATH
  2619. shlibpath_overrides_runpath=no
  2620. hardcode_into_libs=yes
  2621. dynamic_linker='NetBSD ld.elf_so'
  2622. ;;
  2623. netbsd*)
  2624. version_type=sunos
  2625. need_lib_prefix=no
  2626. need_version=no
  2627. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  2628. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  2629. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2630. dynamic_linker='NetBSD (a.out) ld.so'
  2631. else
  2632. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2633. soname_spec='$libname$release$shared_ext$major'
  2634. dynamic_linker='NetBSD ld.elf_so'
  2635. fi
  2636. shlibpath_var=LD_LIBRARY_PATH
  2637. shlibpath_overrides_runpath=yes
  2638. hardcode_into_libs=yes
  2639. ;;
  2640. newsos6)
  2641. version_type=linux # correct to gnu/linux during the next big refactor
  2642. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2643. shlibpath_var=LD_LIBRARY_PATH
  2644. shlibpath_overrides_runpath=yes
  2645. ;;
  2646. *nto* | *qnx*)
  2647. version_type=qnx
  2648. need_lib_prefix=no
  2649. need_version=no
  2650. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2651. soname_spec='$libname$release$shared_ext$major'
  2652. shlibpath_var=LD_LIBRARY_PATH
  2653. shlibpath_overrides_runpath=no
  2654. hardcode_into_libs=yes
  2655. dynamic_linker='ldqnx.so'
  2656. ;;
  2657. openbsd* | bitrig*)
  2658. version_type=sunos
  2659. sys_lib_dlsearch_path_spec=/usr/lib
  2660. need_lib_prefix=no
  2661. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
  2662. need_version=no
  2663. else
  2664. need_version=yes
  2665. fi
  2666. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  2667. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2668. shlibpath_var=LD_LIBRARY_PATH
  2669. shlibpath_overrides_runpath=yes
  2670. ;;
  2671. os2*)
  2672. libname_spec='$name'
  2673. version_type=windows
  2674. shrext_cmds=.dll
  2675. need_version=no
  2676. need_lib_prefix=no
  2677. # OS/2 can only load a DLL with a base name of 8 characters or less.
  2678. soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
  2679. v=$($ECHO $release$versuffix | tr -d .-);
  2680. n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
  2681. $ECHO $n$v`$shared_ext'
  2682. library_names_spec='${libname}_dll.$libext'
  2683. dynamic_linker='OS/2 ld.exe'
  2684. shlibpath_var=BEGINLIBPATH
  2685. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  2686. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2687. postinstall_cmds='base_file=`basename \$file`~
  2688. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
  2689. dldir=$destdir/`dirname \$dlpath`~
  2690. test -d \$dldir || mkdir -p \$dldir~
  2691. $install_prog $dir/$dlname \$dldir/$dlname~
  2692. chmod a+x \$dldir/$dlname~
  2693. if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
  2694. eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
  2695. fi'
  2696. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
  2697. dlpath=$dir/\$dldll~
  2698. $RM \$dlpath'
  2699. ;;
  2700. osf3* | osf4* | osf5*)
  2701. version_type=osf
  2702. need_lib_prefix=no
  2703. need_version=no
  2704. soname_spec='$libname$release$shared_ext$major'
  2705. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2706. shlibpath_var=LD_LIBRARY_PATH
  2707. sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  2708. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2709. ;;
  2710. rdos*)
  2711. dynamic_linker=no
  2712. ;;
  2713. solaris*)
  2714. version_type=linux # correct to gnu/linux during the next big refactor
  2715. need_lib_prefix=no
  2716. need_version=no
  2717. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2718. soname_spec='$libname$release$shared_ext$major'
  2719. shlibpath_var=LD_LIBRARY_PATH
  2720. shlibpath_overrides_runpath=yes
  2721. hardcode_into_libs=yes
  2722. # ldd complains unless libraries are executable
  2723. postinstall_cmds='chmod +x $lib'
  2724. ;;
  2725. sunos4*)
  2726. version_type=sunos
  2727. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  2728. finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  2729. shlibpath_var=LD_LIBRARY_PATH
  2730. shlibpath_overrides_runpath=yes
  2731. if test yes = "$with_gnu_ld"; then
  2732. need_lib_prefix=no
  2733. fi
  2734. need_version=yes
  2735. ;;
  2736. sysv4 | sysv4.3*)
  2737. version_type=linux # correct to gnu/linux during the next big refactor
  2738. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2739. soname_spec='$libname$release$shared_ext$major'
  2740. shlibpath_var=LD_LIBRARY_PATH
  2741. case $host_vendor in
  2742. sni)
  2743. shlibpath_overrides_runpath=no
  2744. need_lib_prefix=no
  2745. runpath_var=LD_RUN_PATH
  2746. ;;
  2747. siemens)
  2748. need_lib_prefix=no
  2749. ;;
  2750. motorola)
  2751. need_lib_prefix=no
  2752. need_version=no
  2753. shlibpath_overrides_runpath=no
  2754. sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  2755. ;;
  2756. esac
  2757. ;;
  2758. sysv4*MP*)
  2759. if test -d /usr/nec; then
  2760. version_type=linux # correct to gnu/linux during the next big refactor
  2761. library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
  2762. soname_spec='$libname$shared_ext.$major'
  2763. shlibpath_var=LD_LIBRARY_PATH
  2764. fi
  2765. ;;
  2766. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  2767. version_type=sco
  2768. need_lib_prefix=no
  2769. need_version=no
  2770. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
  2771. soname_spec='$libname$release$shared_ext$major'
  2772. shlibpath_var=LD_LIBRARY_PATH
  2773. shlibpath_overrides_runpath=yes
  2774. hardcode_into_libs=yes
  2775. if test yes = "$with_gnu_ld"; then
  2776. sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
  2777. else
  2778. sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
  2779. case $host_os in
  2780. sco3.2v5*)
  2781. sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
  2782. ;;
  2783. esac
  2784. fi
  2785. sys_lib_dlsearch_path_spec='/usr/lib'
  2786. ;;
  2787. tpf*)
  2788. # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
  2789. version_type=linux # correct to gnu/linux during the next big refactor
  2790. need_lib_prefix=no
  2791. need_version=no
  2792. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2793. shlibpath_var=LD_LIBRARY_PATH
  2794. shlibpath_overrides_runpath=no
  2795. hardcode_into_libs=yes
  2796. ;;
  2797. uts4*)
  2798. version_type=linux # correct to gnu/linux during the next big refactor
  2799. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2800. soname_spec='$libname$release$shared_ext$major'
  2801. shlibpath_var=LD_LIBRARY_PATH
  2802. ;;
  2803. *)
  2804. dynamic_linker=no
  2805. ;;
  2806. esac
  2807. AC_MSG_RESULT([$dynamic_linker])
  2808. test no = "$dynamic_linker" && can_build_shared=no
  2809. variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  2810. if test yes = "$GCC"; then
  2811. variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  2812. fi
  2813. if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
  2814. sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
  2815. fi
  2816. if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
  2817. sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
  2818. fi
  2819. # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
  2820. configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
  2821. # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
  2822. func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
  2823. # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
  2824. configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
  2825. _LT_DECL([], [variables_saved_for_relink], [1],
  2826. [Variables whose values should be saved in libtool wrapper scripts and
  2827. restored at link time])
  2828. _LT_DECL([], [need_lib_prefix], [0],
  2829. [Do we need the "lib" prefix for modules?])
  2830. _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
  2831. _LT_DECL([], [version_type], [0], [Library versioning type])
  2832. _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
  2833. _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
  2834. _LT_DECL([], [shlibpath_overrides_runpath], [0],
  2835. [Is shlibpath searched before the hard-coded library search path?])
  2836. _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
  2837. _LT_DECL([], [library_names_spec], [1],
  2838. [[List of archive names. First name is the real one, the rest are links.
  2839. The last name is the one that the linker finds with -lNAME]])
  2840. _LT_DECL([], [soname_spec], [1],
  2841. [[The coded name of the library, if different from the real name]])
  2842. _LT_DECL([], [install_override_mode], [1],
  2843. [Permission mode override for installation of shared libraries])
  2844. _LT_DECL([], [postinstall_cmds], [2],
  2845. [Command to use after installation of a shared archive])
  2846. _LT_DECL([], [postuninstall_cmds], [2],
  2847. [Command to use after uninstallation of a shared archive])
  2848. _LT_DECL([], [finish_cmds], [2],
  2849. [Commands used to finish a libtool library installation in a directory])
  2850. _LT_DECL([], [finish_eval], [1],
  2851. [[As "finish_cmds", except a single script fragment to be evaled but
  2852. not shown]])
  2853. _LT_DECL([], [hardcode_into_libs], [0],
  2854. [Whether we should hardcode library paths into libraries])
  2855. _LT_DECL([], [sys_lib_search_path_spec], [2],
  2856. [Compile-time system search path for libraries])
  2857. _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
  2858. [Detected run-time system search path for libraries])
  2859. _LT_DECL([], [configure_time_lt_sys_library_path], [2],
  2860. [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
  2861. ])# _LT_SYS_DYNAMIC_LINKER
  2862. # _LT_PATH_TOOL_PREFIX(TOOL)
  2863. # --------------------------
  2864. # find a file program that can recognize shared library
  2865. AC_DEFUN([_LT_PATH_TOOL_PREFIX],
  2866. [m4_require([_LT_DECL_EGREP])dnl
  2867. AC_MSG_CHECKING([for $1])
  2868. AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
  2869. [case $MAGIC_CMD in
  2870. [[\\/*] | ?:[\\/]*])
  2871. lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
  2872. ;;
  2873. *)
  2874. lt_save_MAGIC_CMD=$MAGIC_CMD
  2875. lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
  2876. dnl $ac_dummy forces splitting on constant user-supplied paths.
  2877. dnl POSIX.2 word splitting is done only on the output of word expansions,
  2878. dnl not every word. This closes a longstanding sh security hole.
  2879. ac_dummy="m4_if([$2], , $PATH, [$2])"
  2880. for ac_dir in $ac_dummy; do
  2881. IFS=$lt_save_ifs
  2882. test -z "$ac_dir" && ac_dir=.
  2883. if test -f "$ac_dir/$1"; then
  2884. lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
  2885. if test -n "$file_magic_test_file"; then
  2886. case $deplibs_check_method in
  2887. "file_magic "*)
  2888. file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
  2889. MAGIC_CMD=$lt_cv_path_MAGIC_CMD
  2890. if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  2891. $EGREP "$file_magic_regex" > /dev/null; then
  2892. :
  2893. else
  2894. cat <<_LT_EOF 1>&2
  2895. *** Warning: the command libtool uses to detect shared libraries,
  2896. *** $file_magic_cmd, produces output that libtool cannot recognize.
  2897. *** The result is that libtool may fail to recognize shared libraries
  2898. *** as such. This will affect the creation of libtool libraries that
  2899. *** depend on shared libraries, but programs linked with such libtool
  2900. *** libraries will work regardless of this problem. Nevertheless, you
  2901. *** may want to report the problem to your system manager and/or to
  2902. *** [email protected]
  2903. _LT_EOF
  2904. fi ;;
  2905. esac
  2906. fi
  2907. break
  2908. fi
  2909. done
  2910. IFS=$lt_save_ifs
  2911. MAGIC_CMD=$lt_save_MAGIC_CMD
  2912. ;;
  2913. esac])
  2914. MAGIC_CMD=$lt_cv_path_MAGIC_CMD
  2915. if test -n "$MAGIC_CMD"; then
  2916. AC_MSG_RESULT($MAGIC_CMD)
  2917. else
  2918. AC_MSG_RESULT(no)
  2919. fi
  2920. _LT_DECL([], [MAGIC_CMD], [0],
  2921. [Used to examine libraries when file_magic_cmd begins with "file"])dnl
  2922. ])# _LT_PATH_TOOL_PREFIX
  2923. # Old name:
  2924. AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
  2925. dnl aclocal-1.4 backwards compatibility:
  2926. dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
  2927. # _LT_PATH_MAGIC
  2928. # --------------
  2929. # find a file program that can recognize a shared library
  2930. m4_defun([_LT_PATH_MAGIC],
  2931. [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
  2932. if test -z "$lt_cv_path_MAGIC_CMD"; then
  2933. if test -n "$ac_tool_prefix"; then
  2934. _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
  2935. else
  2936. MAGIC_CMD=:
  2937. fi
  2938. fi
  2939. ])# _LT_PATH_MAGIC
  2940. # LT_PATH_LD
  2941. # ----------
  2942. # find the pathname to the GNU or non-GNU linker
  2943. AC_DEFUN([LT_PATH_LD],
  2944. [AC_REQUIRE([AC_PROG_CC])dnl
  2945. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2946. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  2947. m4_require([_LT_DECL_SED])dnl
  2948. m4_require([_LT_DECL_EGREP])dnl
  2949. m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
  2950. AC_ARG_WITH([gnu-ld],
  2951. [AS_HELP_STRING([--with-gnu-ld],
  2952. [assume the C compiler uses GNU ld @<:@default=no@:>@])],
  2953. [test no = "$withval" || with_gnu_ld=yes],
  2954. [with_gnu_ld=no])dnl
  2955. ac_prog=ld
  2956. if test yes = "$GCC"; then
  2957. # Check if gcc -print-prog-name=ld gives a path.
  2958. AC_MSG_CHECKING([for ld used by $CC])
  2959. case $host in
  2960. *-*-mingw*)
  2961. # gcc leaves a trailing carriage return, which upsets mingw
  2962. ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  2963. *)
  2964. ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  2965. esac
  2966. case $ac_prog in
  2967. # Accept absolute paths.
  2968. [[\\/]]* | ?:[[\\/]]*)
  2969. re_direlt='/[[^/]][[^/]]*/\.\./'
  2970. # Canonicalize the pathname of ld
  2971. ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
  2972. while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
  2973. ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
  2974. done
  2975. test -z "$LD" && LD=$ac_prog
  2976. ;;
  2977. "")
  2978. # If it fails, then pretend we aren't using GCC.
  2979. ac_prog=ld
  2980. ;;
  2981. *)
  2982. # If it is relative, then search for the first ld in PATH.
  2983. with_gnu_ld=unknown
  2984. ;;
  2985. esac
  2986. elif test yes = "$with_gnu_ld"; then
  2987. AC_MSG_CHECKING([for GNU ld])
  2988. else
  2989. AC_MSG_CHECKING([for non-GNU ld])
  2990. fi
  2991. AC_CACHE_VAL(lt_cv_path_LD,
  2992. [if test -z "$LD"; then
  2993. lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
  2994. for ac_dir in $PATH; do
  2995. IFS=$lt_save_ifs
  2996. test -z "$ac_dir" && ac_dir=.
  2997. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  2998. lt_cv_path_LD=$ac_dir/$ac_prog
  2999. # Check to see if the program is GNU ld. I'd rather use --version,
  3000. # but apparently some variants of GNU ld only accept -v.
  3001. # Break only if it was the GNU/non-GNU ld that we prefer.
  3002. case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
  3003. *GNU* | *'with BFD'*)
  3004. test no != "$with_gnu_ld" && break
  3005. ;;
  3006. *)
  3007. test yes != "$with_gnu_ld" && break
  3008. ;;
  3009. esac
  3010. fi
  3011. done
  3012. IFS=$lt_save_ifs
  3013. else
  3014. lt_cv_path_LD=$LD # Let the user override the test with a path.
  3015. fi])
  3016. LD=$lt_cv_path_LD
  3017. if test -n "$LD"; then
  3018. AC_MSG_RESULT($LD)
  3019. else
  3020. AC_MSG_RESULT(no)
  3021. fi
  3022. test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  3023. _LT_PATH_LD_GNU
  3024. AC_SUBST([LD])
  3025. _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
  3026. ])# LT_PATH_LD
  3027. # Old names:
  3028. AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
  3029. AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
  3030. dnl aclocal-1.4 backwards compatibility:
  3031. dnl AC_DEFUN([AM_PROG_LD], [])
  3032. dnl AC_DEFUN([AC_PROG_LD], [])
  3033. # _LT_PATH_LD_GNU
  3034. #- --------------
  3035. m4_defun([_LT_PATH_LD_GNU],
  3036. [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
  3037. [# I'd rather use --version here, but apparently some GNU lds only accept -v.
  3038. case `$LD -v 2>&1 </dev/null` in
  3039. *GNU* | *'with BFD'*)
  3040. lt_cv_prog_gnu_ld=yes
  3041. ;;
  3042. *)
  3043. lt_cv_prog_gnu_ld=no
  3044. ;;
  3045. esac])
  3046. with_gnu_ld=$lt_cv_prog_gnu_ld
  3047. ])# _LT_PATH_LD_GNU
  3048. # _LT_CMD_RELOAD
  3049. # --------------
  3050. # find reload flag for linker
  3051. # -- PORTME Some linkers may need a different reload flag.
  3052. m4_defun([_LT_CMD_RELOAD],
  3053. [AC_CACHE_CHECK([for $LD option to reload object files],
  3054. lt_cv_ld_reload_flag,
  3055. [lt_cv_ld_reload_flag='-r'])
  3056. reload_flag=$lt_cv_ld_reload_flag
  3057. case $reload_flag in
  3058. "" | " "*) ;;
  3059. *) reload_flag=" $reload_flag" ;;
  3060. esac
  3061. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  3062. case $host_os in
  3063. cygwin* | mingw* | pw32* | cegcc*)
  3064. if test yes != "$GCC"; then
  3065. reload_cmds=false
  3066. fi
  3067. ;;
  3068. darwin*)
  3069. if test yes = "$GCC"; then
  3070. reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
  3071. else
  3072. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  3073. fi
  3074. ;;
  3075. esac
  3076. _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
  3077. _LT_TAGDECL([], [reload_cmds], [2])dnl
  3078. ])# _LT_CMD_RELOAD
  3079. # _LT_PATH_DD
  3080. # -----------
  3081. # find a working dd
  3082. m4_defun([_LT_PATH_DD],
  3083. [AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
  3084. [printf 0123456789abcdef0123456789abcdef >conftest.i
  3085. cat conftest.i conftest.i >conftest2.i
  3086. : ${lt_DD:=$DD}
  3087. AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
  3088. [if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
  3089. cmp -s conftest.i conftest.out \
  3090. && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
  3091. fi])
  3092. rm -f conftest.i conftest2.i conftest.out])
  3093. ])# _LT_PATH_DD
  3094. # _LT_CMD_TRUNCATE
  3095. # ----------------
  3096. # find command to truncate a binary pipe
  3097. m4_defun([_LT_CMD_TRUNCATE],
  3098. [m4_require([_LT_PATH_DD])
  3099. AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
  3100. [printf 0123456789abcdef0123456789abcdef >conftest.i
  3101. cat conftest.i conftest.i >conftest2.i
  3102. lt_cv_truncate_bin=
  3103. if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
  3104. cmp -s conftest.i conftest.out \
  3105. && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
  3106. fi
  3107. rm -f conftest.i conftest2.i conftest.out
  3108. test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
  3109. _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
  3110. [Command to truncate a binary pipe])
  3111. ])# _LT_CMD_TRUNCATE
  3112. # _LT_CHECK_MAGIC_METHOD
  3113. # ----------------------
  3114. # how to check for library dependencies
  3115. # -- PORTME fill in with the dynamic library characteristics
  3116. m4_defun([_LT_CHECK_MAGIC_METHOD],
  3117. [m4_require([_LT_DECL_EGREP])
  3118. m4_require([_LT_DECL_OBJDUMP])
  3119. AC_CACHE_CHECK([how to recognize dependent libraries],
  3120. lt_cv_deplibs_check_method,
  3121. [lt_cv_file_magic_cmd='$MAGIC_CMD'
  3122. lt_cv_file_magic_test_file=
  3123. lt_cv_deplibs_check_method='unknown'
  3124. # Need to set the preceding variable on all platforms that support
  3125. # interlibrary dependencies.
  3126. # 'none' -- dependencies not supported.
  3127. # 'unknown' -- same as none, but documents that we really don't know.
  3128. # 'pass_all' -- all dependencies passed with no checks.
  3129. # 'test_compile' -- check by making test program.
  3130. # 'file_magic [[regex]]' -- check by looking for files in library path
  3131. # that responds to the $file_magic_cmd with a given extended regex.
  3132. # If you have 'file' or equivalent on your system and you're not sure
  3133. # whether 'pass_all' will *always* work, you probably want this one.
  3134. case $host_os in
  3135. aix[[4-9]]*)
  3136. lt_cv_deplibs_check_method=pass_all
  3137. ;;
  3138. beos*)
  3139. lt_cv_deplibs_check_method=pass_all
  3140. ;;
  3141. bsdi[[45]]*)
  3142. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
  3143. lt_cv_file_magic_cmd='$FILECMD -L'
  3144. lt_cv_file_magic_test_file=/shlib/libc.so
  3145. ;;
  3146. cygwin*)
  3147. # func_win32_libid is a shell function defined in ltmain.sh
  3148. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  3149. lt_cv_file_magic_cmd='func_win32_libid'
  3150. ;;
  3151. mingw* | pw32*)
  3152. # Base MSYS/MinGW do not provide the 'file' command needed by
  3153. # func_win32_libid shell function, so use a weaker test based on 'objdump',
  3154. # unless we find 'file', for example because we are cross-compiling.
  3155. if ( file / ) >/dev/null 2>&1; then
  3156. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  3157. lt_cv_file_magic_cmd='func_win32_libid'
  3158. else
  3159. # Keep this pattern in sync with the one in func_win32_libid.
  3160. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
  3161. lt_cv_file_magic_cmd='$OBJDUMP -f'
  3162. fi
  3163. ;;
  3164. cegcc*)
  3165. # use the weaker test based on 'objdump'. See mingw*.
  3166. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
  3167. lt_cv_file_magic_cmd='$OBJDUMP -f'
  3168. ;;
  3169. darwin* | rhapsody*)
  3170. lt_cv_deplibs_check_method=pass_all
  3171. ;;
  3172. freebsd* | dragonfly* | midnightbsd*)
  3173. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  3174. case $host_cpu in
  3175. i*86 )
  3176. # Not sure whether the presence of OpenBSD here was a mistake.
  3177. # Let's accept both of them until this is cleared up.
  3178. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
  3179. lt_cv_file_magic_cmd=$FILECMD
  3180. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  3181. ;;
  3182. esac
  3183. else
  3184. lt_cv_deplibs_check_method=pass_all
  3185. fi
  3186. ;;
  3187. haiku*)
  3188. lt_cv_deplibs_check_method=pass_all
  3189. ;;
  3190. hpux10.20* | hpux11*)
  3191. lt_cv_file_magic_cmd=$FILECMD
  3192. case $host_cpu in
  3193. ia64*)
  3194. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
  3195. lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
  3196. ;;
  3197. hppa*64*)
  3198. [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]']
  3199. lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
  3200. ;;
  3201. *)
  3202. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
  3203. lt_cv_file_magic_test_file=/usr/lib/libc.sl
  3204. ;;
  3205. esac
  3206. ;;
  3207. interix[[3-9]]*)
  3208. # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
  3209. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
  3210. ;;
  3211. irix5* | irix6* | nonstopux*)
  3212. case $LD in
  3213. *-32|*"-32 ") libmagic=32-bit;;
  3214. *-n32|*"-n32 ") libmagic=N32;;
  3215. *-64|*"-64 ") libmagic=64-bit;;
  3216. *) libmagic=never-match;;
  3217. esac
  3218. lt_cv_deplibs_check_method=pass_all
  3219. ;;
  3220. # This must be glibc/ELF.
  3221. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  3222. lt_cv_deplibs_check_method=pass_all
  3223. ;;
  3224. netbsd* | netbsdelf*-gnu)
  3225. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  3226. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  3227. else
  3228. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
  3229. fi
  3230. ;;
  3231. newos6*)
  3232. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
  3233. lt_cv_file_magic_cmd=$FILECMD
  3234. lt_cv_file_magic_test_file=/usr/lib/libnls.so
  3235. ;;
  3236. *nto* | *qnx*)
  3237. lt_cv_deplibs_check_method=pass_all
  3238. ;;
  3239. openbsd* | bitrig*)
  3240. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
  3241. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
  3242. else
  3243. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  3244. fi
  3245. ;;
  3246. osf3* | osf4* | osf5*)
  3247. lt_cv_deplibs_check_method=pass_all
  3248. ;;
  3249. rdos*)
  3250. lt_cv_deplibs_check_method=pass_all
  3251. ;;
  3252. solaris*)
  3253. lt_cv_deplibs_check_method=pass_all
  3254. ;;
  3255. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  3256. lt_cv_deplibs_check_method=pass_all
  3257. ;;
  3258. sysv4 | sysv4.3*)
  3259. case $host_vendor in
  3260. motorola)
  3261. 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]]'
  3262. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  3263. ;;
  3264. ncr)
  3265. lt_cv_deplibs_check_method=pass_all
  3266. ;;
  3267. sequent)
  3268. lt_cv_file_magic_cmd='/bin/file'
  3269. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
  3270. ;;
  3271. sni)
  3272. lt_cv_file_magic_cmd='/bin/file'
  3273. lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
  3274. lt_cv_file_magic_test_file=/lib/libc.so
  3275. ;;
  3276. siemens)
  3277. lt_cv_deplibs_check_method=pass_all
  3278. ;;
  3279. pc)
  3280. lt_cv_deplibs_check_method=pass_all
  3281. ;;
  3282. esac
  3283. ;;
  3284. tpf*)
  3285. lt_cv_deplibs_check_method=pass_all
  3286. ;;
  3287. os2*)
  3288. lt_cv_deplibs_check_method=pass_all
  3289. ;;
  3290. esac
  3291. ])
  3292. file_magic_glob=
  3293. want_nocaseglob=no
  3294. if test "$build" = "$host"; then
  3295. case $host_os in
  3296. mingw* | pw32*)
  3297. if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
  3298. want_nocaseglob=yes
  3299. else
  3300. file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
  3301. fi
  3302. ;;
  3303. esac
  3304. fi
  3305. file_magic_cmd=$lt_cv_file_magic_cmd
  3306. deplibs_check_method=$lt_cv_deplibs_check_method
  3307. test -z "$deplibs_check_method" && deplibs_check_method=unknown
  3308. _LT_DECL([], [deplibs_check_method], [1],
  3309. [Method to check whether dependent libraries are shared objects])
  3310. _LT_DECL([], [file_magic_cmd], [1],
  3311. [Command to use when deplibs_check_method = "file_magic"])
  3312. _LT_DECL([], [file_magic_glob], [1],
  3313. [How to find potential files when deplibs_check_method = "file_magic"])
  3314. _LT_DECL([], [want_nocaseglob], [1],
  3315. [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
  3316. ])# _LT_CHECK_MAGIC_METHOD
  3317. # LT_PATH_NM
  3318. # ----------
  3319. # find the pathname to a BSD- or MS-compatible name lister
  3320. AC_DEFUN([LT_PATH_NM],
  3321. [AC_REQUIRE([AC_PROG_CC])dnl
  3322. AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
  3323. [if test -n "$NM"; then
  3324. # Let the user override the test.
  3325. lt_cv_path_NM=$NM
  3326. else
  3327. lt_nm_to_check=${ac_tool_prefix}nm
  3328. if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
  3329. lt_nm_to_check="$lt_nm_to_check nm"
  3330. fi
  3331. for lt_tmp_nm in $lt_nm_to_check; do
  3332. lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
  3333. for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
  3334. IFS=$lt_save_ifs
  3335. test -z "$ac_dir" && ac_dir=.
  3336. tmp_nm=$ac_dir/$lt_tmp_nm
  3337. if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
  3338. # Check to see if the nm accepts a BSD-compat flag.
  3339. # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
  3340. # nm: unknown option "B" ignored
  3341. # Tru64's nm complains that /dev/null is an invalid object file
  3342. # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
  3343. case $build_os in
  3344. mingw*) lt_bad_file=conftest.nm/nofile ;;
  3345. *) lt_bad_file=/dev/null ;;
  3346. esac
  3347. case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
  3348. *$lt_bad_file* | *'Invalid file or object type'*)
  3349. lt_cv_path_NM="$tmp_nm -B"
  3350. break 2
  3351. ;;
  3352. *)
  3353. case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
  3354. */dev/null*)
  3355. lt_cv_path_NM="$tmp_nm -p"
  3356. break 2
  3357. ;;
  3358. *)
  3359. lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
  3360. continue # so that we can try to find one that supports BSD flags
  3361. ;;
  3362. esac
  3363. ;;
  3364. esac
  3365. fi
  3366. done
  3367. IFS=$lt_save_ifs
  3368. done
  3369. : ${lt_cv_path_NM=no}
  3370. fi])
  3371. if test no != "$lt_cv_path_NM"; then
  3372. NM=$lt_cv_path_NM
  3373. else
  3374. # Didn't find any BSD compatible name lister, look for dumpbin.
  3375. if test -n "$DUMPBIN"; then :
  3376. # Let the user override the test.
  3377. else
  3378. AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
  3379. case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
  3380. *COFF*)
  3381. DUMPBIN="$DUMPBIN -symbols -headers"
  3382. ;;
  3383. *)
  3384. DUMPBIN=:
  3385. ;;
  3386. esac
  3387. fi
  3388. AC_SUBST([DUMPBIN])
  3389. if test : != "$DUMPBIN"; then
  3390. NM=$DUMPBIN
  3391. fi
  3392. fi
  3393. test -z "$NM" && NM=nm
  3394. AC_SUBST([NM])
  3395. _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
  3396. AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
  3397. [lt_cv_nm_interface="BSD nm"
  3398. echo "int some_variable = 0;" > conftest.$ac_ext
  3399. (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
  3400. (eval "$ac_compile" 2>conftest.err)
  3401. cat conftest.err >&AS_MESSAGE_LOG_FD
  3402. (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
  3403. (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
  3404. cat conftest.err >&AS_MESSAGE_LOG_FD
  3405. (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
  3406. cat conftest.out >&AS_MESSAGE_LOG_FD
  3407. if $GREP 'External.*some_variable' conftest.out > /dev/null; then
  3408. lt_cv_nm_interface="MS dumpbin"
  3409. fi
  3410. rm -f conftest*])
  3411. ])# LT_PATH_NM
  3412. # Old names:
  3413. AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
  3414. AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
  3415. dnl aclocal-1.4 backwards compatibility:
  3416. dnl AC_DEFUN([AM_PROG_NM], [])
  3417. dnl AC_DEFUN([AC_PROG_NM], [])
  3418. # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  3419. # --------------------------------
  3420. # how to determine the name of the shared library
  3421. # associated with a specific link library.
  3422. # -- PORTME fill in with the dynamic library characteristics
  3423. m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
  3424. [m4_require([_LT_DECL_EGREP])
  3425. m4_require([_LT_DECL_OBJDUMP])
  3426. m4_require([_LT_DECL_DLLTOOL])
  3427. AC_CACHE_CHECK([how to associate runtime and link libraries],
  3428. lt_cv_sharedlib_from_linklib_cmd,
  3429. [lt_cv_sharedlib_from_linklib_cmd='unknown'
  3430. case $host_os in
  3431. cygwin* | mingw* | pw32* | cegcc*)
  3432. # two different shell functions defined in ltmain.sh;
  3433. # decide which one to use based on capabilities of $DLLTOOL
  3434. case `$DLLTOOL --help 2>&1` in
  3435. *--identify-strict*)
  3436. lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
  3437. ;;
  3438. *)
  3439. lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
  3440. ;;
  3441. esac
  3442. ;;
  3443. *)
  3444. # fallback: assume linklib IS sharedlib
  3445. lt_cv_sharedlib_from_linklib_cmd=$ECHO
  3446. ;;
  3447. esac
  3448. ])
  3449. sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
  3450. test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
  3451. _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
  3452. [Command to associate shared and link libraries])
  3453. ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  3454. # _LT_PATH_MANIFEST_TOOL
  3455. # ----------------------
  3456. # locate the manifest tool
  3457. m4_defun([_LT_PATH_MANIFEST_TOOL],
  3458. [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
  3459. test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
  3460. AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
  3461. [lt_cv_path_mainfest_tool=no
  3462. echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
  3463. $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
  3464. cat conftest.err >&AS_MESSAGE_LOG_FD
  3465. if $GREP 'Manifest Tool' conftest.out > /dev/null; then
  3466. lt_cv_path_mainfest_tool=yes
  3467. fi
  3468. rm -f conftest*])
  3469. if test yes != "$lt_cv_path_mainfest_tool"; then
  3470. MANIFEST_TOOL=:
  3471. fi
  3472. _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
  3473. ])# _LT_PATH_MANIFEST_TOOL
  3474. # _LT_DLL_DEF_P([FILE])
  3475. # ---------------------
  3476. # True iff FILE is a Windows DLL '.def' file.
  3477. # Keep in sync with func_dll_def_p in the libtool script
  3478. AC_DEFUN([_LT_DLL_DEF_P],
  3479. [dnl
  3480. test DEF = "`$SED -n dnl
  3481. -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace
  3482. -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments
  3483. -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl
  3484. -e q dnl Only consider the first "real" line
  3485. $1`" dnl
  3486. ])# _LT_DLL_DEF_P
  3487. # LT_LIB_M
  3488. # --------
  3489. # check for math library
  3490. AC_DEFUN([LT_LIB_M],
  3491. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3492. LIBM=
  3493. case $host in
  3494. *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
  3495. # These system don't have libm, or don't need it
  3496. ;;
  3497. *-ncr-sysv4.3*)
  3498. AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
  3499. AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
  3500. ;;
  3501. *)
  3502. AC_CHECK_LIB(m, cos, LIBM=-lm)
  3503. ;;
  3504. esac
  3505. AC_SUBST([LIBM])
  3506. ])# LT_LIB_M
  3507. # Old name:
  3508. AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
  3509. dnl aclocal-1.4 backwards compatibility:
  3510. dnl AC_DEFUN([AC_CHECK_LIBM], [])
  3511. # _LT_COMPILER_NO_RTTI([TAGNAME])
  3512. # -------------------------------
  3513. m4_defun([_LT_COMPILER_NO_RTTI],
  3514. [m4_require([_LT_TAG_COMPILER])dnl
  3515. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  3516. if test yes = "$GCC"; then
  3517. case $cc_basename in
  3518. nvcc*)
  3519. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
  3520. *)
  3521. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
  3522. esac
  3523. _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
  3524. lt_cv_prog_compiler_rtti_exceptions,
  3525. [-fno-rtti -fno-exceptions], [],
  3526. [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
  3527. fi
  3528. _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
  3529. [Compiler flag to turn off builtin functions])
  3530. ])# _LT_COMPILER_NO_RTTI
  3531. # _LT_CMD_GLOBAL_SYMBOLS
  3532. # ----------------------
  3533. m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
  3534. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3535. AC_REQUIRE([AC_PROG_CC])dnl
  3536. AC_REQUIRE([AC_PROG_AWK])dnl
  3537. AC_REQUIRE([LT_PATH_NM])dnl
  3538. AC_REQUIRE([LT_PATH_LD])dnl
  3539. m4_require([_LT_DECL_SED])dnl
  3540. m4_require([_LT_DECL_EGREP])dnl
  3541. m4_require([_LT_TAG_COMPILER])dnl
  3542. # Check for command to grab the raw symbol name followed by C symbol from nm.
  3543. AC_MSG_CHECKING([command to parse $NM output from $compiler object])
  3544. AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
  3545. [
  3546. # These are sane defaults that work on at least a few old systems.
  3547. # [They come from Ultrix. What could be older than Ultrix?!! ;)]
  3548. # Character class describing NM global symbol codes.
  3549. symcode='[[BCDEGRST]]'
  3550. # Regexp to match symbols that can be accessed directly from C.
  3551. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
  3552. # Define system-specific variables.
  3553. case $host_os in
  3554. aix*)
  3555. symcode='[[BCDT]]'
  3556. ;;
  3557. cygwin* | mingw* | pw32* | cegcc*)
  3558. symcode='[[ABCDGISTW]]'
  3559. ;;
  3560. hpux*)
  3561. if test ia64 = "$host_cpu"; then
  3562. symcode='[[ABCDEGRST]]'
  3563. fi
  3564. ;;
  3565. irix* | nonstopux*)
  3566. symcode='[[BCDEGRST]]'
  3567. ;;
  3568. osf*)
  3569. symcode='[[BCDEGQRST]]'
  3570. ;;
  3571. solaris*)
  3572. symcode='[[BDRT]]'
  3573. ;;
  3574. sco3.2v5*)
  3575. symcode='[[DT]]'
  3576. ;;
  3577. sysv4.2uw2*)
  3578. symcode='[[DT]]'
  3579. ;;
  3580. sysv5* | sco5v6* | unixware* | OpenUNIX*)
  3581. symcode='[[ABDT]]'
  3582. ;;
  3583. sysv4)
  3584. symcode='[[DFNSTU]]'
  3585. ;;
  3586. esac
  3587. # If we're using GNU nm, then use its standard symbol codes.
  3588. case `$NM -V 2>&1` in
  3589. *GNU* | *'with BFD'*)
  3590. symcode='[[ABCDGIRSTW]]' ;;
  3591. esac
  3592. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3593. # Gets list of data symbols to import.
  3594. lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
  3595. # Adjust the below global symbol transforms to fixup imported variables.
  3596. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
  3597. lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
  3598. lt_c_name_lib_hook="\
  3599. -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
  3600. -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
  3601. else
  3602. # Disable hooks by default.
  3603. lt_cv_sys_global_symbol_to_import=
  3604. lt_cdecl_hook=
  3605. lt_c_name_hook=
  3606. lt_c_name_lib_hook=
  3607. fi
  3608. # Transform an extracted symbol line into a proper C declaration.
  3609. # Some systems (esp. on ia64) link data and code symbols differently,
  3610. # so use this general approach.
  3611. lt_cv_sys_global_symbol_to_cdecl="$SED -n"\
  3612. $lt_cdecl_hook\
  3613. " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
  3614. " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
  3615. # Transform an extracted symbol line into symbol name and symbol address
  3616. lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
  3617. $lt_c_name_hook\
  3618. " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
  3619. " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
  3620. # Transform an extracted symbol line into symbol name with lib prefix and
  3621. # symbol address.
  3622. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
  3623. $lt_c_name_lib_hook\
  3624. " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
  3625. " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
  3626. " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
  3627. # Handle CRLF in mingw tool chain
  3628. opt_cr=
  3629. case $build_os in
  3630. mingw*)
  3631. opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  3632. ;;
  3633. esac
  3634. # Try without a prefix underscore, then with it.
  3635. for ac_symprfx in "" "_"; do
  3636. # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
  3637. symxfrm="\\1 $ac_symprfx\\2 \\2"
  3638. # Write the raw and C identifiers.
  3639. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3640. # Fake it for dumpbin and say T for any non-static function,
  3641. # D for any global variable and I for any imported variable.
  3642. # Also find C++ and __fastcall symbols from MSVC++ or ICC,
  3643. # which start with @ or ?.
  3644. lt_cv_sys_global_symbol_pipe="$AWK ['"\
  3645. " {last_section=section; section=\$ 3};"\
  3646. " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
  3647. " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
  3648. " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
  3649. " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
  3650. " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
  3651. " \$ 0!~/External *\|/{next};"\
  3652. " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
  3653. " {if(hide[section]) next};"\
  3654. " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
  3655. " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
  3656. " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
  3657. " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
  3658. " ' prfx=^$ac_symprfx]"
  3659. else
  3660. lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
  3661. fi
  3662. lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
  3663. # Check to see that the pipe works correctly.
  3664. pipe_works=no
  3665. rm -f conftest*
  3666. cat > conftest.$ac_ext <<_LT_EOF
  3667. #ifdef __cplusplus
  3668. extern "C" {
  3669. #endif
  3670. char nm_test_var;
  3671. void nm_test_func(void);
  3672. void nm_test_func(void){}
  3673. #ifdef __cplusplus
  3674. }
  3675. #endif
  3676. int main(){nm_test_var='a';nm_test_func();return(0);}
  3677. _LT_EOF
  3678. if AC_TRY_EVAL(ac_compile); then
  3679. # Now try to grab the symbols.
  3680. nlist=conftest.nm
  3681. $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD
  3682. if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then
  3683. # Try sorting and uniquifying the output.
  3684. if sort "$nlist" | uniq > "$nlist"T; then
  3685. mv -f "$nlist"T "$nlist"
  3686. else
  3687. rm -f "$nlist"T
  3688. fi
  3689. # Make sure that we snagged all the symbols we need.
  3690. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
  3691. if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
  3692. cat <<_LT_EOF > conftest.$ac_ext
  3693. /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
  3694. #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
  3695. /* DATA imports from DLLs on WIN32 can't be const, because runtime
  3696. relocations are performed -- see ld's documentation on pseudo-relocs. */
  3697. # define LT@&t@_DLSYM_CONST
  3698. #elif defined __osf__
  3699. /* This system does not cope well with relocations in const data. */
  3700. # define LT@&t@_DLSYM_CONST
  3701. #else
  3702. # define LT@&t@_DLSYM_CONST const
  3703. #endif
  3704. #ifdef __cplusplus
  3705. extern "C" {
  3706. #endif
  3707. _LT_EOF
  3708. # Now generate the symbol file.
  3709. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
  3710. cat <<_LT_EOF >> conftest.$ac_ext
  3711. /* The mapping between symbol names and symbols. */
  3712. LT@&t@_DLSYM_CONST struct {
  3713. const char *name;
  3714. void *address;
  3715. }
  3716. lt__PROGRAM__LTX_preloaded_symbols[[]] =
  3717. {
  3718. { "@PROGRAM@", (void *) 0 },
  3719. _LT_EOF
  3720. $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
  3721. cat <<\_LT_EOF >> conftest.$ac_ext
  3722. {0, (void *) 0}
  3723. };
  3724. /* This works around a problem in FreeBSD linker */
  3725. #ifdef FREEBSD_WORKAROUND
  3726. static const void *lt_preloaded_setup() {
  3727. return lt__PROGRAM__LTX_preloaded_symbols;
  3728. }
  3729. #endif
  3730. #ifdef __cplusplus
  3731. }
  3732. #endif
  3733. _LT_EOF
  3734. # Now try linking the two files.
  3735. mv conftest.$ac_objext conftstm.$ac_objext
  3736. lt_globsym_save_LIBS=$LIBS
  3737. lt_globsym_save_CFLAGS=$CFLAGS
  3738. LIBS=conftstm.$ac_objext
  3739. CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
  3740. if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
  3741. pipe_works=yes
  3742. fi
  3743. LIBS=$lt_globsym_save_LIBS
  3744. CFLAGS=$lt_globsym_save_CFLAGS
  3745. else
  3746. echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
  3747. fi
  3748. else
  3749. echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
  3750. fi
  3751. else
  3752. echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
  3753. fi
  3754. else
  3755. echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
  3756. cat conftest.$ac_ext >&5
  3757. fi
  3758. rm -rf conftest* conftst*
  3759. # Do not use the global_symbol_pipe unless it works.
  3760. if test yes = "$pipe_works"; then
  3761. break
  3762. else
  3763. lt_cv_sys_global_symbol_pipe=
  3764. fi
  3765. done
  3766. ])
  3767. if test -z "$lt_cv_sys_global_symbol_pipe"; then
  3768. lt_cv_sys_global_symbol_to_cdecl=
  3769. fi
  3770. if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
  3771. AC_MSG_RESULT(failed)
  3772. else
  3773. AC_MSG_RESULT(ok)
  3774. fi
  3775. # Response file support.
  3776. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3777. nm_file_list_spec='@'
  3778. elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
  3779. nm_file_list_spec='@'
  3780. fi
  3781. _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
  3782. [Take the output of nm and produce a listing of raw symbols and C names])
  3783. _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
  3784. [Transform the output of nm in a proper C declaration])
  3785. _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
  3786. [Transform the output of nm into a list of symbols to manually relocate])
  3787. _LT_DECL([global_symbol_to_c_name_address],
  3788. [lt_cv_sys_global_symbol_to_c_name_address], [1],
  3789. [Transform the output of nm in a C name address pair])
  3790. _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
  3791. [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
  3792. [Transform the output of nm in a C name address pair when lib prefix is needed])
  3793. _LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
  3794. [The name lister interface])
  3795. _LT_DECL([], [nm_file_list_spec], [1],
  3796. [Specify filename containing input files for $NM])
  3797. ]) # _LT_CMD_GLOBAL_SYMBOLS
  3798. # _LT_COMPILER_PIC([TAGNAME])
  3799. # ---------------------------
  3800. m4_defun([_LT_COMPILER_PIC],
  3801. [m4_require([_LT_TAG_COMPILER])dnl
  3802. _LT_TAGVAR(lt_prog_compiler_wl, $1)=
  3803. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3804. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3805. m4_if([$1], [CXX], [
  3806. # C++ specific cases for pic, static, wl, etc.
  3807. if test yes = "$GXX"; then
  3808. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3809. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3810. case $host_os in
  3811. aix*)
  3812. # All AIX code is PIC.
  3813. if test ia64 = "$host_cpu"; then
  3814. # AIX 5 now supports IA64 processor
  3815. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3816. fi
  3817. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3818. ;;
  3819. amigaos*)
  3820. case $host_cpu in
  3821. powerpc)
  3822. # see comment about AmigaOS4 .so support
  3823. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3824. ;;
  3825. m68k)
  3826. # FIXME: we need at least 68020 code to build shared libraries, but
  3827. # adding the '-m68020' flag to GCC prevents building anything better,
  3828. # like '-m68040'.
  3829. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  3830. ;;
  3831. esac
  3832. ;;
  3833. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  3834. # PIC is the default for these OSes.
  3835. ;;
  3836. mingw* | cygwin* | os2* | pw32* | cegcc*)
  3837. # This hack is so that the source file can tell whether it is being
  3838. # built for inclusion in a dll (and should export symbols for example).
  3839. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  3840. # (--disable-auto-import) libraries
  3841. m4_if([$1], [GCJ], [],
  3842. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3843. case $host_os in
  3844. os2*)
  3845. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
  3846. ;;
  3847. esac
  3848. ;;
  3849. darwin* | rhapsody*)
  3850. # PIC is the default on this platform
  3851. # Common symbols not allowed in MH_DYLIB files
  3852. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  3853. ;;
  3854. *djgpp*)
  3855. # DJGPP does not support shared libraries at all
  3856. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3857. ;;
  3858. haiku*)
  3859. # PIC is the default for Haiku.
  3860. # The "-static" flag exists, but is broken.
  3861. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3862. ;;
  3863. interix[[3-9]]*)
  3864. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  3865. # Instead, we relocate shared libraries at runtime.
  3866. ;;
  3867. sysv4*MP*)
  3868. if test -d /usr/nec; then
  3869. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  3870. fi
  3871. ;;
  3872. hpux*)
  3873. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  3874. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  3875. # sets the default TLS model and affects inlining.
  3876. case $host_cpu in
  3877. hppa*64*)
  3878. ;;
  3879. *)
  3880. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3881. ;;
  3882. esac
  3883. ;;
  3884. *qnx* | *nto*)
  3885. # QNX uses GNU C++, but need to define -shared option too, otherwise
  3886. # it will coredump.
  3887. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  3888. ;;
  3889. *)
  3890. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3891. ;;
  3892. esac
  3893. else
  3894. case $host_os in
  3895. aix[[4-9]]*)
  3896. # All AIX code is PIC.
  3897. if test ia64 = "$host_cpu"; then
  3898. # AIX 5 now supports IA64 processor
  3899. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3900. else
  3901. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  3902. fi
  3903. ;;
  3904. chorus*)
  3905. case $cc_basename in
  3906. cxch68*)
  3907. # Green Hills C++ Compiler
  3908. # _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"
  3909. ;;
  3910. esac
  3911. ;;
  3912. mingw* | cygwin* | os2* | pw32* | cegcc*)
  3913. # This hack is so that the source file can tell whether it is being
  3914. # built for inclusion in a dll (and should export symbols for example).
  3915. m4_if([$1], [GCJ], [],
  3916. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3917. ;;
  3918. dgux*)
  3919. case $cc_basename in
  3920. ec++*)
  3921. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3922. ;;
  3923. ghcx*)
  3924. # Green Hills C++ Compiler
  3925. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3926. ;;
  3927. *)
  3928. ;;
  3929. esac
  3930. ;;
  3931. freebsd* | dragonfly* | midnightbsd*)
  3932. # FreeBSD uses GNU C++
  3933. ;;
  3934. hpux9* | hpux10* | hpux11*)
  3935. case $cc_basename in
  3936. CC*)
  3937. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3938. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
  3939. if test ia64 != "$host_cpu"; then
  3940. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  3941. fi
  3942. ;;
  3943. aCC*)
  3944. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3945. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
  3946. case $host_cpu in
  3947. hppa*64*|ia64*)
  3948. # +Z the default
  3949. ;;
  3950. *)
  3951. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  3952. ;;
  3953. esac
  3954. ;;
  3955. *)
  3956. ;;
  3957. esac
  3958. ;;
  3959. interix*)
  3960. # This is c89, which is MS Visual C++ (no shared libs)
  3961. # Anyone wants to do a port?
  3962. ;;
  3963. irix5* | irix6* | nonstopux*)
  3964. case $cc_basename in
  3965. CC*)
  3966. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3967. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3968. # CC pic flag -KPIC is the default.
  3969. ;;
  3970. *)
  3971. ;;
  3972. esac
  3973. ;;
  3974. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  3975. case $cc_basename in
  3976. KCC*)
  3977. # KAI C++ Compiler
  3978. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  3979. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3980. ;;
  3981. ecpc* )
  3982. # old Intel C++ for x86_64, which still supported -KPIC.
  3983. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3984. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3985. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3986. ;;
  3987. icpc* )
  3988. # Intel C++, used to be incompatible with GCC.
  3989. # ICC 10 doesn't accept -KPIC any more.
  3990. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3991. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3992. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3993. ;;
  3994. pgCC* | pgcpp*)
  3995. # Portland Group C++ compiler
  3996. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3997. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  3998. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3999. ;;
  4000. cxx*)
  4001. # Compaq C++
  4002. # Make sure the PIC flag is empty. It appears that all Alpha
  4003. # Linux and Compaq Tru64 Unix objects are PIC.
  4004. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4005. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4006. ;;
  4007. xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
  4008. # IBM XL 8.0, 9.0 on PPC and BlueGene
  4009. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4010. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  4011. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  4012. ;;
  4013. *)
  4014. case `$CC -V 2>&1 | $SED 5q` in
  4015. *Sun\ C*)
  4016. # Sun C++ 5.9
  4017. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4018. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4019. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4020. ;;
  4021. esac
  4022. ;;
  4023. esac
  4024. ;;
  4025. lynxos*)
  4026. ;;
  4027. m88k*)
  4028. ;;
  4029. mvs*)
  4030. case $cc_basename in
  4031. cxx*)
  4032. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
  4033. ;;
  4034. *)
  4035. ;;
  4036. esac
  4037. ;;
  4038. netbsd* | netbsdelf*-gnu)
  4039. ;;
  4040. *qnx* | *nto*)
  4041. # QNX uses GNU C++, but need to define -shared option too, otherwise
  4042. # it will coredump.
  4043. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4044. ;;
  4045. osf3* | osf4* | osf5*)
  4046. case $cc_basename in
  4047. KCC*)
  4048. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  4049. ;;
  4050. RCC*)
  4051. # Rational C++ 2.4.1
  4052. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4053. ;;
  4054. cxx*)
  4055. # Digital/Compaq C++
  4056. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4057. # Make sure the PIC flag is empty. It appears that all Alpha
  4058. # Linux and Compaq Tru64 Unix objects are PIC.
  4059. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4060. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4061. ;;
  4062. *)
  4063. ;;
  4064. esac
  4065. ;;
  4066. psos*)
  4067. ;;
  4068. solaris*)
  4069. case $cc_basename in
  4070. CC* | sunCC*)
  4071. # Sun C++ 4.2, 5.x and Centerline C++
  4072. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4073. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4074. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4075. ;;
  4076. gcx*)
  4077. # Green Hills C++ Compiler
  4078. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4079. ;;
  4080. *)
  4081. ;;
  4082. esac
  4083. ;;
  4084. sunos4*)
  4085. case $cc_basename in
  4086. CC*)
  4087. # Sun C++ 4.x
  4088. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4089. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4090. ;;
  4091. lcc*)
  4092. # Lucid
  4093. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4094. ;;
  4095. *)
  4096. ;;
  4097. esac
  4098. ;;
  4099. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  4100. case $cc_basename in
  4101. CC*)
  4102. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4103. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4104. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4105. ;;
  4106. esac
  4107. ;;
  4108. tandem*)
  4109. case $cc_basename in
  4110. NCC*)
  4111. # NonStop-UX NCC 3.20
  4112. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4113. ;;
  4114. *)
  4115. ;;
  4116. esac
  4117. ;;
  4118. vxworks*)
  4119. ;;
  4120. *)
  4121. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4122. ;;
  4123. esac
  4124. fi
  4125. ],
  4126. [
  4127. if test yes = "$GCC"; then
  4128. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4129. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4130. case $host_os in
  4131. aix*)
  4132. # All AIX code is PIC.
  4133. if test ia64 = "$host_cpu"; then
  4134. # AIX 5 now supports IA64 processor
  4135. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4136. fi
  4137. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4138. ;;
  4139. amigaos*)
  4140. case $host_cpu in
  4141. powerpc)
  4142. # see comment about AmigaOS4 .so support
  4143. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4144. ;;
  4145. m68k)
  4146. # FIXME: we need at least 68020 code to build shared libraries, but
  4147. # adding the '-m68020' flag to GCC prevents building anything better,
  4148. # like '-m68040'.
  4149. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  4150. ;;
  4151. esac
  4152. ;;
  4153. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  4154. # PIC is the default for these OSes.
  4155. ;;
  4156. mingw* | cygwin* | pw32* | os2* | cegcc*)
  4157. # This hack is so that the source file can tell whether it is being
  4158. # built for inclusion in a dll (and should export symbols for example).
  4159. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  4160. # (--disable-auto-import) libraries
  4161. m4_if([$1], [GCJ], [],
  4162. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  4163. case $host_os in
  4164. os2*)
  4165. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
  4166. ;;
  4167. esac
  4168. ;;
  4169. darwin* | rhapsody*)
  4170. # PIC is the default on this platform
  4171. # Common symbols not allowed in MH_DYLIB files
  4172. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  4173. ;;
  4174. haiku*)
  4175. # PIC is the default for Haiku.
  4176. # The "-static" flag exists, but is broken.
  4177. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  4178. ;;
  4179. hpux*)
  4180. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  4181. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  4182. # sets the default TLS model and affects inlining.
  4183. case $host_cpu in
  4184. hppa*64*)
  4185. # +Z the default
  4186. ;;
  4187. *)
  4188. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4189. ;;
  4190. esac
  4191. ;;
  4192. interix[[3-9]]*)
  4193. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  4194. # Instead, we relocate shared libraries at runtime.
  4195. ;;
  4196. msdosdjgpp*)
  4197. # Just because we use GCC doesn't mean we suddenly get shared libraries
  4198. # on systems that don't support them.
  4199. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4200. enable_shared=no
  4201. ;;
  4202. *nto* | *qnx*)
  4203. # QNX uses GNU C++, but need to define -shared option too, otherwise
  4204. # it will coredump.
  4205. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4206. ;;
  4207. sysv4*MP*)
  4208. if test -d /usr/nec; then
  4209. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  4210. fi
  4211. ;;
  4212. *)
  4213. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4214. ;;
  4215. esac
  4216. case $cc_basename in
  4217. nvcc*) # Cuda Compiler Driver 2.2
  4218. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
  4219. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  4220. _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
  4221. fi
  4222. ;;
  4223. esac
  4224. else
  4225. # PORTME Check for flag to pass linker flags through the system compiler.
  4226. case $host_os in
  4227. aix*)
  4228. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4229. if test ia64 = "$host_cpu"; then
  4230. # AIX 5 now supports IA64 processor
  4231. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4232. else
  4233. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  4234. fi
  4235. ;;
  4236. darwin* | rhapsody*)
  4237. # PIC is the default on this platform
  4238. # Common symbols not allowed in MH_DYLIB files
  4239. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  4240. case $cc_basename in
  4241. nagfor*)
  4242. # NAG Fortran compiler
  4243. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
  4244. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4245. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4246. ;;
  4247. esac
  4248. ;;
  4249. mingw* | cygwin* | pw32* | os2* | cegcc*)
  4250. # This hack is so that the source file can tell whether it is being
  4251. # built for inclusion in a dll (and should export symbols for example).
  4252. m4_if([$1], [GCJ], [],
  4253. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  4254. case $host_os in
  4255. os2*)
  4256. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
  4257. ;;
  4258. esac
  4259. ;;
  4260. hpux9* | hpux10* | hpux11*)
  4261. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4262. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  4263. # not for PA HP-UX.
  4264. case $host_cpu in
  4265. hppa*64*|ia64*)
  4266. # +Z the default
  4267. ;;
  4268. *)
  4269. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4270. ;;
  4271. esac
  4272. # Is there a better lt_prog_compiler_static that works with the bundled CC?
  4273. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
  4274. ;;
  4275. irix5* | irix6* | nonstopux*)
  4276. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4277. # PIC (with -KPIC) is the default.
  4278. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4279. ;;
  4280. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  4281. case $cc_basename in
  4282. # old Intel for x86_64, which still supported -KPIC.
  4283. ecc*)
  4284. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4285. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4286. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4287. ;;
  4288. # flang / f18. f95 an alias for gfortran or flang on Debian
  4289. flang* | f18* | f95*)
  4290. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4291. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4292. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4293. ;;
  4294. # icc used to be incompatible with GCC.
  4295. # ICC 10 doesn't accept -KPIC any more.
  4296. icc* | ifort*)
  4297. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4298. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4299. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4300. ;;
  4301. # Lahey Fortran 8.1.
  4302. lf95*)
  4303. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4304. _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
  4305. _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
  4306. ;;
  4307. nagfor*)
  4308. # NAG Fortran compiler
  4309. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
  4310. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4311. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4312. ;;
  4313. tcc*)
  4314. # Fabrice Bellard et al's Tiny C Compiler
  4315. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4316. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4317. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4318. ;;
  4319. pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
  4320. # Portland Group compilers (*not* the Pentium gcc compiler,
  4321. # which looks to be a dead project)
  4322. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4323. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4324. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4325. ;;
  4326. ccc*)
  4327. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4328. # All Alpha code is PIC.
  4329. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4330. ;;
  4331. xl* | bgxl* | bgf* | mpixl*)
  4332. # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
  4333. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4334. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  4335. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  4336. ;;
  4337. *)
  4338. case `$CC -V 2>&1 | $SED 5q` in
  4339. *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
  4340. # Sun Fortran 8.3 passes all unrecognized flags to the linker
  4341. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4342. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4343. _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
  4344. ;;
  4345. *Sun\ F* | *Sun*Fortran*)
  4346. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4347. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4348. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4349. ;;
  4350. *Sun\ C*)
  4351. # Sun C 5.9
  4352. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4353. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4354. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4355. ;;
  4356. *Intel*\ [[CF]]*Compiler*)
  4357. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4358. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4359. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4360. ;;
  4361. *Portland\ Group*)
  4362. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4363. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4364. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4365. ;;
  4366. esac
  4367. ;;
  4368. esac
  4369. ;;
  4370. newsos6)
  4371. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4372. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4373. ;;
  4374. *nto* | *qnx*)
  4375. # QNX uses GNU C++, but need to define -shared option too, otherwise
  4376. # it will coredump.
  4377. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4378. ;;
  4379. osf3* | osf4* | osf5*)
  4380. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4381. # All OSF/1 code is PIC.
  4382. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4383. ;;
  4384. rdos*)
  4385. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4386. ;;
  4387. solaris*)
  4388. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4389. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4390. case $cc_basename in
  4391. f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
  4392. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
  4393. *)
  4394. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
  4395. esac
  4396. ;;
  4397. sunos4*)
  4398. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4399. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4400. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4401. ;;
  4402. sysv4 | sysv4.2uw2* | sysv4.3*)
  4403. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4404. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4405. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4406. ;;
  4407. sysv4*MP*)
  4408. if test -d /usr/nec; then
  4409. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
  4410. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4411. fi
  4412. ;;
  4413. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  4414. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4415. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4416. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4417. ;;
  4418. unicos*)
  4419. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4420. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4421. ;;
  4422. uts4*)
  4423. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4424. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4425. ;;
  4426. *)
  4427. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4428. ;;
  4429. esac
  4430. fi
  4431. ])
  4432. case $host_os in
  4433. # For platforms that do not support PIC, -DPIC is meaningless:
  4434. *djgpp*)
  4435. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4436. ;;
  4437. *)
  4438. _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
  4439. ;;
  4440. esac
  4441. AC_CACHE_CHECK([for $compiler option to produce PIC],
  4442. [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
  4443. [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
  4444. _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
  4445. #
  4446. # Check to make sure the PIC flag actually works.
  4447. #
  4448. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  4449. _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
  4450. [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
  4451. [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
  4452. [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
  4453. "" | " "*) ;;
  4454. *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
  4455. esac],
  4456. [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4457. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
  4458. fi
  4459. _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
  4460. [Additional compiler flags for building library objects])
  4461. _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
  4462. [How to pass a linker flag through the compiler])
  4463. #
  4464. # Check to make sure the static flag actually works.
  4465. #
  4466. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
  4467. _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
  4468. _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
  4469. $lt_tmp_static_flag,
  4470. [],
  4471. [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
  4472. _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
  4473. [Compiler flag to prevent dynamic linking])
  4474. ])# _LT_COMPILER_PIC
  4475. # _LT_LINKER_SHLIBS([TAGNAME])
  4476. # ----------------------------
  4477. # See if the linker supports building shared libraries.
  4478. m4_defun([_LT_LINKER_SHLIBS],
  4479. [AC_REQUIRE([LT_PATH_LD])dnl
  4480. AC_REQUIRE([LT_PATH_NM])dnl
  4481. m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  4482. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  4483. m4_require([_LT_DECL_EGREP])dnl
  4484. m4_require([_LT_DECL_SED])dnl
  4485. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  4486. m4_require([_LT_TAG_COMPILER])dnl
  4487. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  4488. m4_if([$1], [CXX], [
  4489. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4490. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  4491. case $host_os in
  4492. aix[[4-9]]*)
  4493. # If we're using GNU nm, then we don't want the "-C" option.
  4494. # -C means demangle to GNU nm, but means don't demangle to AIX nm.
  4495. # Without the "-l" option, or with the "-B" option, AIX nm treats
  4496. # weak defined symbols like other global defined symbols, whereas
  4497. # GNU nm marks them as "W".
  4498. # While the 'weak' keyword is ignored in the Export File, we need
  4499. # it in the Import File for the 'aix-soname' feature, so we have
  4500. # to replace the "-B" option with "-P" for AIX nm.
  4501. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  4502. _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'
  4503. else
  4504. _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'
  4505. fi
  4506. ;;
  4507. pw32*)
  4508. _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
  4509. ;;
  4510. cygwin* | mingw* | cegcc*)
  4511. case $cc_basename in
  4512. cl* | icl*)
  4513. _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  4514. ;;
  4515. *)
  4516. _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'
  4517. _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  4518. ;;
  4519. esac
  4520. ;;
  4521. linux* | k*bsd*-gnu | gnu*)
  4522. _LT_TAGVAR(link_all_deplibs, $1)=no
  4523. ;;
  4524. *)
  4525. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4526. ;;
  4527. esac
  4528. ], [
  4529. runpath_var=
  4530. _LT_TAGVAR(allow_undefined_flag, $1)=
  4531. _LT_TAGVAR(always_export_symbols, $1)=no
  4532. _LT_TAGVAR(archive_cmds, $1)=
  4533. _LT_TAGVAR(archive_expsym_cmds, $1)=
  4534. _LT_TAGVAR(compiler_needs_object, $1)=no
  4535. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  4536. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  4537. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4538. _LT_TAGVAR(hardcode_automatic, $1)=no
  4539. _LT_TAGVAR(hardcode_direct, $1)=no
  4540. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  4541. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4542. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  4543. _LT_TAGVAR(hardcode_minus_L, $1)=no
  4544. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  4545. _LT_TAGVAR(inherit_rpath, $1)=no
  4546. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  4547. _LT_TAGVAR(module_cmds, $1)=
  4548. _LT_TAGVAR(module_expsym_cmds, $1)=
  4549. _LT_TAGVAR(old_archive_from_new_cmds, $1)=
  4550. _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
  4551. _LT_TAGVAR(thread_safe_flag_spec, $1)=
  4552. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4553. # include_expsyms should be a list of space-separated symbols to be *always*
  4554. # included in the symbol list
  4555. _LT_TAGVAR(include_expsyms, $1)=
  4556. # exclude_expsyms can be an extended regexp of symbols to exclude
  4557. # it will be wrapped by ' (' and ')$', so one must not match beginning or
  4558. # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
  4559. # as well as any symbol that contains 'd'.
  4560. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  4561. # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  4562. # platforms (ab)use it in PIC code, but their linkers get confused if
  4563. # the symbol is explicitly referenced. Since portable code cannot
  4564. # rely on this symbol name, it's probably fine to never include it in
  4565. # preloaded symbol tables.
  4566. # Exclude shared library initialization/finalization symbols.
  4567. dnl Note also adjust exclude_expsyms for C++ above.
  4568. extract_expsyms_cmds=
  4569. case $host_os in
  4570. cygwin* | mingw* | pw32* | cegcc*)
  4571. # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
  4572. # When not using gcc, we currently assume that we are using
  4573. # Microsoft Visual C++ or Intel C++ Compiler.
  4574. if test yes != "$GCC"; then
  4575. with_gnu_ld=no
  4576. fi
  4577. ;;
  4578. interix*)
  4579. # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
  4580. with_gnu_ld=yes
  4581. ;;
  4582. openbsd* | bitrig*)
  4583. with_gnu_ld=no
  4584. ;;
  4585. linux* | k*bsd*-gnu | gnu*)
  4586. _LT_TAGVAR(link_all_deplibs, $1)=no
  4587. ;;
  4588. esac
  4589. _LT_TAGVAR(ld_shlibs, $1)=yes
  4590. # On some targets, GNU ld is compatible enough with the native linker
  4591. # that we're better off using the native interface for both.
  4592. lt_use_gnu_ld_interface=no
  4593. if test yes = "$with_gnu_ld"; then
  4594. case $host_os in
  4595. aix*)
  4596. # The AIX port of GNU ld has always aspired to compatibility
  4597. # with the native linker. However, as the warning in the GNU ld
  4598. # block says, versions before 2.19.5* couldn't really create working
  4599. # shared libraries, regardless of the interface used.
  4600. case `$LD -v 2>&1` in
  4601. *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
  4602. *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
  4603. *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
  4604. *)
  4605. lt_use_gnu_ld_interface=yes
  4606. ;;
  4607. esac
  4608. ;;
  4609. *)
  4610. lt_use_gnu_ld_interface=yes
  4611. ;;
  4612. esac
  4613. fi
  4614. if test yes = "$lt_use_gnu_ld_interface"; then
  4615. # If archive_cmds runs LD, not CC, wlarc should be empty
  4616. wlarc='$wl'
  4617. # Set some defaults for GNU ld with shared library support. These
  4618. # are reset later if shared libraries are not supported. Putting them
  4619. # here allows them to be overridden if necessary.
  4620. runpath_var=LD_RUN_PATH
  4621. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  4622. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  4623. # ancient GNU ld didn't support --whole-archive et. al.
  4624. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
  4625. _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
  4626. else
  4627. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4628. fi
  4629. supports_anon_versioning=no
  4630. case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in
  4631. *GNU\ gold*) supports_anon_versioning=yes ;;
  4632. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
  4633. *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
  4634. *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
  4635. *\ 2.11.*) ;; # other 2.11 versions
  4636. *) supports_anon_versioning=yes ;;
  4637. esac
  4638. # See if GNU ld supports shared libraries.
  4639. case $host_os in
  4640. aix[[3-9]]*)
  4641. # On AIX/PPC, the GNU linker is very broken
  4642. if test ia64 != "$host_cpu"; then
  4643. _LT_TAGVAR(ld_shlibs, $1)=no
  4644. cat <<_LT_EOF 1>&2
  4645. *** Warning: the GNU linker, at least up to release 2.19, is reported
  4646. *** to be unable to reliably create shared libraries on AIX.
  4647. *** Therefore, libtool is disabling shared libraries support. If you
  4648. *** really care for shared libraries, you may want to install binutils
  4649. *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
  4650. *** You will then need to restart the configuration process.
  4651. _LT_EOF
  4652. fi
  4653. ;;
  4654. amigaos*)
  4655. case $host_cpu in
  4656. powerpc)
  4657. # see comment about AmigaOS4 .so support
  4658. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4659. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  4660. ;;
  4661. m68k)
  4662. _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)'
  4663. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4664. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4665. ;;
  4666. esac
  4667. ;;
  4668. beos*)
  4669. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4670. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4671. # Joseph Beckenbach <[email protected]> says some releases of gcc
  4672. # support --undefined. This deserves some investigation. FIXME
  4673. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4674. else
  4675. _LT_TAGVAR(ld_shlibs, $1)=no
  4676. fi
  4677. ;;
  4678. cygwin* | mingw* | pw32* | cegcc*)
  4679. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  4680. # as there is no search path for DLLs.
  4681. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4682. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
  4683. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4684. _LT_TAGVAR(always_export_symbols, $1)=no
  4685. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4686. _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'
  4687. _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  4688. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  4689. _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'
  4690. # If the export-symbols file already is a .def file, use it as
  4691. # is; otherwise, prepend EXPORTS...
  4692. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  4693. cp $export_symbols $output_objdir/$soname.def;
  4694. else
  4695. echo EXPORTS > $output_objdir/$soname.def;
  4696. cat $export_symbols >> $output_objdir/$soname.def;
  4697. fi~
  4698. $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  4699. else
  4700. _LT_TAGVAR(ld_shlibs, $1)=no
  4701. fi
  4702. ;;
  4703. haiku*)
  4704. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4705. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4706. ;;
  4707. os2*)
  4708. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4709. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4710. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4711. shrext_cmds=.dll
  4712. _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  4713. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  4714. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  4715. $ECHO EXPORTS >> $output_objdir/$libname.def~
  4716. emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
  4717. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  4718. emximp -o $lib $output_objdir/$libname.def'
  4719. _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  4720. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  4721. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  4722. $ECHO EXPORTS >> $output_objdir/$libname.def~
  4723. prefix_cmds="$SED"~
  4724. if test EXPORTS = "`$SED 1q $export_symbols`"; then
  4725. prefix_cmds="$prefix_cmds -e 1d";
  4726. fi~
  4727. prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
  4728. cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
  4729. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  4730. emximp -o $lib $output_objdir/$libname.def'
  4731. _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
  4732. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4733. _LT_TAGVAR(file_list_spec, $1)='@'
  4734. ;;
  4735. interix[[3-9]]*)
  4736. _LT_TAGVAR(hardcode_direct, $1)=no
  4737. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4738. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  4739. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  4740. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  4741. # Instead, shared libraries are loaded at an image base (0x10000000 by
  4742. # default) and relocated if they conflict, which is a slow very memory
  4743. # consuming and fragmenting process. To avoid this, we pick a random,
  4744. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  4745. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  4746. _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'
  4747. _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'
  4748. ;;
  4749. gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
  4750. tmp_diet=no
  4751. if test linux-dietlibc = "$host_os"; then
  4752. case $cc_basename in
  4753. diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
  4754. esac
  4755. fi
  4756. if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
  4757. && test no = "$tmp_diet"
  4758. then
  4759. tmp_addflag=' $pic_flag'
  4760. tmp_sharedflag='-shared'
  4761. case $cc_basename,$host_cpu in
  4762. pgcc*) # Portland Group C compiler
  4763. _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'
  4764. tmp_addflag=' $pic_flag'
  4765. ;;
  4766. pgf77* | pgf90* | pgf95* | pgfortran*)
  4767. # Portland Group f77 and f90 compilers
  4768. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
  4769. tmp_addflag=' $pic_flag -Mnomain' ;;
  4770. ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
  4771. tmp_addflag=' -i_dynamic' ;;
  4772. efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
  4773. tmp_addflag=' -i_dynamic -nofor_main' ;;
  4774. ifc* | ifort*) # Intel Fortran compiler
  4775. tmp_addflag=' -nofor_main' ;;
  4776. lf95*) # Lahey Fortran 8.1
  4777. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4778. tmp_sharedflag='--shared' ;;
  4779. nagfor*) # NAGFOR 5.3
  4780. tmp_sharedflag='-Wl,-shared' ;;
  4781. xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
  4782. tmp_sharedflag='-qmkshrobj'
  4783. tmp_addflag= ;;
  4784. nvcc*) # Cuda Compiler Driver 2.2
  4785. _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'
  4786. _LT_TAGVAR(compiler_needs_object, $1)=yes
  4787. ;;
  4788. esac
  4789. case `$CC -V 2>&1 | $SED 5q` in
  4790. *Sun\ C*) # Sun C 5.9
  4791. _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'
  4792. _LT_TAGVAR(compiler_needs_object, $1)=yes
  4793. tmp_sharedflag='-G' ;;
  4794. *Sun\ F*) # Sun Fortran 8.3
  4795. tmp_sharedflag='-G' ;;
  4796. esac
  4797. _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4798. if test yes = "$supports_anon_versioning"; then
  4799. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  4800. cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4801. echo "local: *; };" >> $output_objdir/$libname.ver~
  4802. $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
  4803. fi
  4804. case $cc_basename in
  4805. tcc*)
  4806. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  4807. _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
  4808. ;;
  4809. xlf* | bgf* | bgxlf* | mpixlf*)
  4810. # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
  4811. _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
  4812. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  4813. _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
  4814. if test yes = "$supports_anon_versioning"; then
  4815. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  4816. cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4817. echo "local: *; };" >> $output_objdir/$libname.ver~
  4818. $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
  4819. fi
  4820. ;;
  4821. esac
  4822. else
  4823. _LT_TAGVAR(ld_shlibs, $1)=no
  4824. fi
  4825. ;;
  4826. netbsd* | netbsdelf*-gnu)
  4827. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  4828. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  4829. wlarc=
  4830. else
  4831. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4832. _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'
  4833. fi
  4834. ;;
  4835. solaris*)
  4836. if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
  4837. _LT_TAGVAR(ld_shlibs, $1)=no
  4838. cat <<_LT_EOF 1>&2
  4839. *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  4840. *** create shared libraries on Solaris systems. Therefore, libtool
  4841. *** is disabling shared libraries support. We urge you to upgrade GNU
  4842. *** binutils to release 2.9.1 or newer. Another option is to modify
  4843. *** your PATH or compiler configuration so that the native linker is
  4844. *** used, and then restart.
  4845. _LT_EOF
  4846. elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4847. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4848. _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'
  4849. else
  4850. _LT_TAGVAR(ld_shlibs, $1)=no
  4851. fi
  4852. ;;
  4853. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
  4854. case `$LD -v 2>&1` in
  4855. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
  4856. _LT_TAGVAR(ld_shlibs, $1)=no
  4857. cat <<_LT_EOF 1>&2
  4858. *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
  4859. *** reliably create shared libraries on SCO systems. Therefore, libtool
  4860. *** is disabling shared libraries support. We urge you to upgrade GNU
  4861. *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
  4862. *** your PATH or compiler configuration so that the native linker is
  4863. *** used, and then restart.
  4864. _LT_EOF
  4865. ;;
  4866. *)
  4867. # For security reasons, it is highly recommended that you always
  4868. # use absolute paths for naming shared libraries, and exclude the
  4869. # DT_RUNPATH tag from executables and libraries. But doing so
  4870. # requires that you compile everything twice, which is a pain.
  4871. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4872. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  4873. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4874. _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'
  4875. else
  4876. _LT_TAGVAR(ld_shlibs, $1)=no
  4877. fi
  4878. ;;
  4879. esac
  4880. ;;
  4881. sunos4*)
  4882. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4883. wlarc=
  4884. _LT_TAGVAR(hardcode_direct, $1)=yes
  4885. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4886. ;;
  4887. *)
  4888. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4889. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4890. _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'
  4891. else
  4892. _LT_TAGVAR(ld_shlibs, $1)=no
  4893. fi
  4894. ;;
  4895. esac
  4896. if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
  4897. runpath_var=
  4898. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4899. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  4900. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4901. fi
  4902. else
  4903. # PORTME fill in a description of your system's linker (not GNU ld)
  4904. case $host_os in
  4905. aix3*)
  4906. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4907. _LT_TAGVAR(always_export_symbols, $1)=yes
  4908. _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'
  4909. # Note: this linker hardcodes the directories in LIBPATH if there
  4910. # are no directories specified by -L.
  4911. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4912. if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
  4913. # Neither direct hardcoding nor static linking is supported with a
  4914. # broken collect2.
  4915. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  4916. fi
  4917. ;;
  4918. aix[[4-9]]*)
  4919. if test ia64 = "$host_cpu"; then
  4920. # On IA64, the linker does run time linking by default, so we don't
  4921. # have to do anything special.
  4922. aix_use_runtimelinking=no
  4923. exp_sym_flag='-Bexport'
  4924. no_entry_flag=
  4925. else
  4926. # If we're using GNU nm, then we don't want the "-C" option.
  4927. # -C means demangle to GNU nm, but means don't demangle to AIX nm.
  4928. # Without the "-l" option, or with the "-B" option, AIX nm treats
  4929. # weak defined symbols like other global defined symbols, whereas
  4930. # GNU nm marks them as "W".
  4931. # While the 'weak' keyword is ignored in the Export File, we need
  4932. # it in the Import File for the 'aix-soname' feature, so we have
  4933. # to replace the "-B" option with "-P" for AIX nm.
  4934. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  4935. _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'
  4936. else
  4937. _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'
  4938. fi
  4939. aix_use_runtimelinking=no
  4940. # Test if we are trying to use run time linking or normal
  4941. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  4942. # have runtime linking enabled, and use it for executables.
  4943. # For shared libraries, we enable/disable runtime linking
  4944. # depending on the kind of the shared library created -
  4945. # when "with_aix_soname,aix_use_runtimelinking" is:
  4946. # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
  4947. # "aix,yes" lib.so shared, rtl:yes, for executables
  4948. # lib.a static archive
  4949. # "both,no" lib.so.V(shr.o) shared, rtl:yes
  4950. # lib.a(lib.so.V) shared, rtl:no, for executables
  4951. # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
  4952. # lib.a(lib.so.V) shared, rtl:no
  4953. # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
  4954. # lib.a static archive
  4955. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  4956. for ld_flag in $LDFLAGS; do
  4957. if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
  4958. aix_use_runtimelinking=yes
  4959. break
  4960. fi
  4961. done
  4962. if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
  4963. # With aix-soname=svr4, we create the lib.so.V shared archives only,
  4964. # so we don't have lib.a shared libs to link our executables.
  4965. # We have to force runtime linking in this case.
  4966. aix_use_runtimelinking=yes
  4967. LDFLAGS="$LDFLAGS -Wl,-brtl"
  4968. fi
  4969. ;;
  4970. esac
  4971. exp_sym_flag='-bexport'
  4972. no_entry_flag='-bnoentry'
  4973. fi
  4974. # When large executables or shared objects are built, AIX ld can
  4975. # have problems creating the table of contents. If linking a library
  4976. # or program results in "error TOC overflow" add -mminimal-toc to
  4977. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  4978. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  4979. _LT_TAGVAR(archive_cmds, $1)=''
  4980. _LT_TAGVAR(hardcode_direct, $1)=yes
  4981. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4982. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  4983. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4984. _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
  4985. case $with_aix_soname,$aix_use_runtimelinking in
  4986. aix,*) ;; # traditional, no import file
  4987. svr4,* | *,yes) # use import file
  4988. # The Import File defines what to hardcode.
  4989. _LT_TAGVAR(hardcode_direct, $1)=no
  4990. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  4991. ;;
  4992. esac
  4993. if test yes = "$GCC"; then
  4994. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  4995. # We only want to do this on AIX 4.2 and lower, the check
  4996. # below for broken collect2 doesn't work under 4.3+
  4997. collect2name=`$CC -print-prog-name=collect2`
  4998. if test -f "$collect2name" &&
  4999. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  5000. then
  5001. # We have reworked collect2
  5002. :
  5003. else
  5004. # We have old collect2
  5005. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  5006. # It fails to find uninstalled libraries when the uninstalled
  5007. # path is not listed in the libpath. Setting hardcode_minus_L
  5008. # to unsupported forces relinking
  5009. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5010. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5011. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5012. fi
  5013. ;;
  5014. esac
  5015. shared_flag='-shared'
  5016. if test yes = "$aix_use_runtimelinking"; then
  5017. shared_flag="$shared_flag "'$wl-G'
  5018. fi
  5019. # Need to ensure runtime linking is disabled for the traditional
  5020. # shared library, or the linker may eventually find shared libraries
  5021. # /with/ Import File - we do not want to mix them.
  5022. shared_flag_aix='-shared'
  5023. shared_flag_svr4='-shared $wl-G'
  5024. else
  5025. # not using gcc
  5026. if test ia64 = "$host_cpu"; then
  5027. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  5028. # chokes on -Wl,-G. The following line is correct:
  5029. shared_flag='-G'
  5030. else
  5031. if test yes = "$aix_use_runtimelinking"; then
  5032. shared_flag='$wl-G'
  5033. else
  5034. shared_flag='$wl-bM:SRE'
  5035. fi
  5036. shared_flag_aix='$wl-bM:SRE'
  5037. shared_flag_svr4='$wl-G'
  5038. fi
  5039. fi
  5040. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
  5041. # It seems that -bexpall does not export symbols beginning with
  5042. # underscore (_), so it is better to generate a list of symbols to export.
  5043. _LT_TAGVAR(always_export_symbols, $1)=yes
  5044. if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
  5045. # Warning - without using the other runtime loading flags (-brtl),
  5046. # -berok will link without error, but may produce a broken library.
  5047. _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
  5048. # Determine the default libpath from the value encoded in an
  5049. # empty executable.
  5050. _LT_SYS_MODULE_PATH_AIX([$1])
  5051. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
  5052. _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
  5053. else
  5054. if test ia64 = "$host_cpu"; then
  5055. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
  5056. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  5057. _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"
  5058. else
  5059. # Determine the default libpath from the value encoded in an
  5060. # empty executable.
  5061. _LT_SYS_MODULE_PATH_AIX([$1])
  5062. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
  5063. # Warning - without using the other run time loading flags,
  5064. # -berok will link without error, but may produce a broken library.
  5065. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
  5066. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
  5067. if test yes = "$with_gnu_ld"; then
  5068. # We only use this code for GNU lds that support --whole-archive.
  5069. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
  5070. else
  5071. # Exported symbols can be pulled into shared objects from archives
  5072. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  5073. fi
  5074. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5075. _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
  5076. # -brtl affects multiple linker settings, -berok does not and is overridden later
  5077. compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
  5078. if test svr4 != "$with_aix_soname"; then
  5079. # This is similar to how AIX traditionally builds its shared libraries.
  5080. _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'
  5081. fi
  5082. if test aix != "$with_aix_soname"; then
  5083. _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'
  5084. else
  5085. # used by -dlpreopen to get the symbols
  5086. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
  5087. fi
  5088. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
  5089. fi
  5090. fi
  5091. ;;
  5092. amigaos*)
  5093. case $host_cpu in
  5094. powerpc)
  5095. # see comment about AmigaOS4 .so support
  5096. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  5097. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  5098. ;;
  5099. m68k)
  5100. _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)'
  5101. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5102. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5103. ;;
  5104. esac
  5105. ;;
  5106. bsdi[[45]]*)
  5107. _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
  5108. ;;
  5109. cygwin* | mingw* | pw32* | cegcc*)
  5110. # When not using gcc, we currently assume that we are using
  5111. # Microsoft Visual C++ or Intel C++ Compiler.
  5112. # hardcode_libdir_flag_spec is actually meaningless, as there is
  5113. # no search path for DLLs.
  5114. case $cc_basename in
  5115. cl* | icl*)
  5116. # Native MSVC or ICC
  5117. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  5118. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5119. _LT_TAGVAR(always_export_symbols, $1)=yes
  5120. _LT_TAGVAR(file_list_spec, $1)='@'
  5121. # Tell ltmain to make .lib files, not .a files.
  5122. libext=lib
  5123. # Tell ltmain to make .dll files, not .so files.
  5124. shrext_cmds=.dll
  5125. # FIXME: Setting linknames here is a bad hack.
  5126. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
  5127. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  5128. cp "$export_symbols" "$output_objdir/$soname.def";
  5129. echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
  5130. else
  5131. $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
  5132. fi~
  5133. $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  5134. linknames='
  5135. # The linker will not automatically build a static lib if we build a DLL.
  5136. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  5137. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5138. _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  5139. _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'
  5140. # Don't use ranlib
  5141. _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  5142. _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  5143. lt_tool_outputfile="@TOOL_OUTPUT@"~
  5144. case $lt_outputfile in
  5145. *.exe|*.EXE) ;;
  5146. *)
  5147. lt_outputfile=$lt_outputfile.exe
  5148. lt_tool_outputfile=$lt_tool_outputfile.exe
  5149. ;;
  5150. esac~
  5151. if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
  5152. $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  5153. $RM "$lt_outputfile.manifest";
  5154. fi'
  5155. ;;
  5156. *)
  5157. # Assume MSVC and ICC wrapper
  5158. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  5159. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5160. # Tell ltmain to make .lib files, not .a files.
  5161. libext=lib
  5162. # Tell ltmain to make .dll files, not .so files.
  5163. shrext_cmds=.dll
  5164. # FIXME: Setting linknames here is a bad hack.
  5165. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
  5166. # The linker will automatically build a .lib file if we build a DLL.
  5167. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  5168. # FIXME: Should let the user specify the lib program.
  5169. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
  5170. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5171. ;;
  5172. esac
  5173. ;;
  5174. darwin* | rhapsody*)
  5175. _LT_DARWIN_LINKER_FEATURES($1)
  5176. ;;
  5177. dgux*)
  5178. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5179. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5180. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5181. ;;
  5182. # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  5183. # support. Future versions do this automatically, but an explicit c++rt0.o
  5184. # does not break anything, and helps significantly (at the cost of a little
  5185. # extra space).
  5186. freebsd2.2*)
  5187. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
  5188. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5189. _LT_TAGVAR(hardcode_direct, $1)=yes
  5190. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5191. ;;
  5192. # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  5193. freebsd2.*)
  5194. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  5195. _LT_TAGVAR(hardcode_direct, $1)=yes
  5196. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5197. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5198. ;;
  5199. # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  5200. freebsd* | dragonfly* | midnightbsd*)
  5201. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5202. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5203. _LT_TAGVAR(hardcode_direct, $1)=yes
  5204. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5205. ;;
  5206. hpux9*)
  5207. if test yes = "$GCC"; then
  5208. _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'
  5209. else
  5210. _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'
  5211. fi
  5212. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  5213. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5214. _LT_TAGVAR(hardcode_direct, $1)=yes
  5215. # hardcode_minus_L: Not really in the search PATH,
  5216. # but as the default location of the library.
  5217. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5218. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  5219. ;;
  5220. hpux10*)
  5221. if test yes,no = "$GCC,$with_gnu_ld"; then
  5222. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  5223. else
  5224. _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
  5225. fi
  5226. if test no = "$with_gnu_ld"; then
  5227. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  5228. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5229. _LT_TAGVAR(hardcode_direct, $1)=yes
  5230. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5231. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  5232. # hardcode_minus_L: Not really in the search PATH,
  5233. # but as the default location of the library.
  5234. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5235. fi
  5236. ;;
  5237. hpux11*)
  5238. if test yes,no = "$GCC,$with_gnu_ld"; then
  5239. case $host_cpu in
  5240. hppa*64*)
  5241. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
  5242. ;;
  5243. ia64*)
  5244. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  5245. ;;
  5246. *)
  5247. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  5248. ;;
  5249. esac
  5250. else
  5251. case $host_cpu in
  5252. hppa*64*)
  5253. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
  5254. ;;
  5255. ia64*)
  5256. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  5257. ;;
  5258. *)
  5259. m4_if($1, [], [
  5260. # Older versions of the 11.00 compiler do not understand -b yet
  5261. # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
  5262. _LT_LINKER_OPTION([if $CC understands -b],
  5263. _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
  5264. [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
  5265. [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
  5266. [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
  5267. ;;
  5268. esac
  5269. fi
  5270. if test no = "$with_gnu_ld"; then
  5271. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  5272. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5273. case $host_cpu in
  5274. hppa*64*|ia64*)
  5275. _LT_TAGVAR(hardcode_direct, $1)=no
  5276. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5277. ;;
  5278. *)
  5279. _LT_TAGVAR(hardcode_direct, $1)=yes
  5280. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5281. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  5282. # hardcode_minus_L: Not really in the search PATH,
  5283. # but as the default location of the library.
  5284. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5285. ;;
  5286. esac
  5287. fi
  5288. ;;
  5289. irix5* | irix6* | nonstopux*)
  5290. if test yes = "$GCC"; then
  5291. _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'
  5292. # Try to use the -exported_symbol ld option, if it does not
  5293. # work, assume that -exports_file does not work either and
  5294. # implicitly export all symbols.
  5295. # This should be the same for all languages, so no per-tag cache variable.
  5296. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
  5297. [lt_cv_irix_exported_symbol],
  5298. [save_LDFLAGS=$LDFLAGS
  5299. LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
  5300. AC_LINK_IFELSE(
  5301. [AC_LANG_SOURCE(
  5302. [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
  5303. [C++], [[int foo (void) { return 0; }]],
  5304. [Fortran 77], [[
  5305. subroutine foo
  5306. end]],
  5307. [Fortran], [[
  5308. subroutine foo
  5309. end]])])],
  5310. [lt_cv_irix_exported_symbol=yes],
  5311. [lt_cv_irix_exported_symbol=no])
  5312. LDFLAGS=$save_LDFLAGS])
  5313. if test yes = "$lt_cv_irix_exported_symbol"; then
  5314. _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'
  5315. fi
  5316. _LT_TAGVAR(link_all_deplibs, $1)=no
  5317. else
  5318. _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'
  5319. _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'
  5320. fi
  5321. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  5322. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5323. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5324. _LT_TAGVAR(inherit_rpath, $1)=yes
  5325. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5326. ;;
  5327. linux*)
  5328. case $cc_basename in
  5329. tcc*)
  5330. # Fabrice Bellard et al's Tiny C Compiler
  5331. _LT_TAGVAR(ld_shlibs, $1)=yes
  5332. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5333. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5334. ;;
  5335. esac
  5336. ;;
  5337. netbsd* | netbsdelf*-gnu)
  5338. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  5339. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
  5340. else
  5341. _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
  5342. fi
  5343. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5344. _LT_TAGVAR(hardcode_direct, $1)=yes
  5345. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5346. ;;
  5347. newsos6)
  5348. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5349. _LT_TAGVAR(hardcode_direct, $1)=yes
  5350. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5351. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5352. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5353. ;;
  5354. *nto* | *qnx*)
  5355. ;;
  5356. openbsd* | bitrig*)
  5357. if test -f /usr/libexec/ld.so; then
  5358. _LT_TAGVAR(hardcode_direct, $1)=yes
  5359. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5360. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5361. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
  5362. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5363. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
  5364. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  5365. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  5366. else
  5367. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5368. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  5369. fi
  5370. else
  5371. _LT_TAGVAR(ld_shlibs, $1)=no
  5372. fi
  5373. ;;
  5374. os2*)
  5375. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5376. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5377. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5378. shrext_cmds=.dll
  5379. _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  5380. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  5381. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  5382. $ECHO EXPORTS >> $output_objdir/$libname.def~
  5383. emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
  5384. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  5385. emximp -o $lib $output_objdir/$libname.def'
  5386. _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  5387. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  5388. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  5389. $ECHO EXPORTS >> $output_objdir/$libname.def~
  5390. prefix_cmds="$SED"~
  5391. if test EXPORTS = "`$SED 1q $export_symbols`"; then
  5392. prefix_cmds="$prefix_cmds -e 1d";
  5393. fi~
  5394. prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
  5395. cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
  5396. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  5397. emximp -o $lib $output_objdir/$libname.def'
  5398. _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
  5399. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5400. _LT_TAGVAR(file_list_spec, $1)='@'
  5401. ;;
  5402. osf3*)
  5403. if test yes = "$GCC"; then
  5404. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
  5405. _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'
  5406. else
  5407. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  5408. _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'
  5409. fi
  5410. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  5411. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5412. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5413. ;;
  5414. osf4* | osf5*) # as osf3* with the addition of -msym flag
  5415. if test yes = "$GCC"; then
  5416. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
  5417. _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'
  5418. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5419. else
  5420. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  5421. _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'
  5422. _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~
  5423. $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'
  5424. # Both c and cxx compiler support -rpath directly
  5425. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  5426. fi
  5427. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  5428. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5429. ;;
  5430. solaris*)
  5431. _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
  5432. if test yes = "$GCC"; then
  5433. wlarc='$wl'
  5434. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
  5435. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5436. $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'
  5437. else
  5438. case `$CC -V 2>&1` in
  5439. *"Compilers 5.0"*)
  5440. wlarc=''
  5441. _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5442. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5443. $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
  5444. ;;
  5445. *)
  5446. wlarc='$wl'
  5447. _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
  5448. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5449. $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
  5450. ;;
  5451. esac
  5452. fi
  5453. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5454. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5455. case $host_os in
  5456. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  5457. *)
  5458. # The compiler driver will combine and reorder linker options,
  5459. # but understands '-z linker_flag'. GCC discards it without '$wl',
  5460. # but is careful enough not to reorder.
  5461. # Supported since Solaris 2.6 (maybe 2.5.1?)
  5462. if test yes = "$GCC"; then
  5463. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
  5464. else
  5465. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  5466. fi
  5467. ;;
  5468. esac
  5469. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5470. ;;
  5471. sunos4*)
  5472. if test sequent = "$host_vendor"; then
  5473. # Use $CC to link under sequent, because it throws in some extra .o
  5474. # files that make .init and .fini sections work.
  5475. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
  5476. else
  5477. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
  5478. fi
  5479. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5480. _LT_TAGVAR(hardcode_direct, $1)=yes
  5481. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5482. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5483. ;;
  5484. sysv4)
  5485. case $host_vendor in
  5486. sni)
  5487. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5488. _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
  5489. ;;
  5490. siemens)
  5491. ## LD is ld it makes a PLAMLIB
  5492. ## CC just makes a GrossModule.
  5493. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  5494. _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
  5495. _LT_TAGVAR(hardcode_direct, $1)=no
  5496. ;;
  5497. motorola)
  5498. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5499. _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
  5500. ;;
  5501. esac
  5502. runpath_var='LD_RUN_PATH'
  5503. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5504. ;;
  5505. sysv4.3*)
  5506. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5507. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5508. _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
  5509. ;;
  5510. sysv4*MP*)
  5511. if test -d /usr/nec; then
  5512. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5513. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5514. runpath_var=LD_RUN_PATH
  5515. hardcode_runpath_var=yes
  5516. _LT_TAGVAR(ld_shlibs, $1)=yes
  5517. fi
  5518. ;;
  5519. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  5520. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  5521. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5522. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5523. runpath_var='LD_RUN_PATH'
  5524. if test yes = "$GCC"; then
  5525. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5526. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5527. else
  5528. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5529. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5530. fi
  5531. ;;
  5532. sysv5* | sco3.2v5* | sco5v6*)
  5533. # Note: We CANNOT use -z defs as we might desire, because we do not
  5534. # link with -lc, and that would cause any symbols used from libc to
  5535. # always be unresolved, which means just about no library would
  5536. # ever link correctly. If we're not using GNU ld we use -z text
  5537. # though, which does catch some bad symbols but isn't as heavy-handed
  5538. # as -z defs.
  5539. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  5540. _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
  5541. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5542. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5543. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
  5544. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5545. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5546. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
  5547. runpath_var='LD_RUN_PATH'
  5548. if test yes = "$GCC"; then
  5549. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5550. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5551. else
  5552. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5553. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5554. fi
  5555. ;;
  5556. uts4*)
  5557. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5558. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5559. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5560. ;;
  5561. *)
  5562. _LT_TAGVAR(ld_shlibs, $1)=no
  5563. ;;
  5564. esac
  5565. if test sni = "$host_vendor"; then
  5566. case $host in
  5567. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  5568. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
  5569. ;;
  5570. esac
  5571. fi
  5572. fi
  5573. ])
  5574. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  5575. test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
  5576. _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
  5577. _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
  5578. _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
  5579. _LT_DECL([], [extract_expsyms_cmds], [2],
  5580. [The commands to extract the exported symbol list from a shared archive])
  5581. #
  5582. # Do we need to explicitly link libc?
  5583. #
  5584. case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
  5585. x|xyes)
  5586. # Assume -lc should be added
  5587. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5588. if test yes,yes = "$GCC,$enable_shared"; then
  5589. case $_LT_TAGVAR(archive_cmds, $1) in
  5590. *'~'*)
  5591. # FIXME: we may have to deal with multi-command sequences.
  5592. ;;
  5593. '$CC '*)
  5594. # Test whether the compiler implicitly links with -lc since on some
  5595. # systems, -lgcc has to come before -lc. If gcc already passes -lc
  5596. # to ld, don't add -lc before -lgcc.
  5597. AC_CACHE_CHECK([whether -lc should be explicitly linked in],
  5598. [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
  5599. [$RM conftest*
  5600. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  5601. if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
  5602. soname=conftest
  5603. lib=conftest
  5604. libobjs=conftest.$ac_objext
  5605. deplibs=
  5606. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
  5607. pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
  5608. compiler_flags=-v
  5609. linker_flags=-v
  5610. verstring=
  5611. output_objdir=.
  5612. libname=conftest
  5613. lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
  5614. _LT_TAGVAR(allow_undefined_flag, $1)=
  5615. if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
  5616. then
  5617. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5618. else
  5619. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5620. fi
  5621. _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
  5622. else
  5623. cat conftest.err 1>&5
  5624. fi
  5625. $RM conftest*
  5626. ])
  5627. _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
  5628. ;;
  5629. esac
  5630. fi
  5631. ;;
  5632. esac
  5633. _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
  5634. [Whether or not to add -lc for building shared libraries])
  5635. _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
  5636. [enable_shared_with_static_runtimes], [0],
  5637. [Whether or not to disallow shared libs when runtime libs are static])
  5638. _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
  5639. [Compiler flag to allow reflexive dlopens])
  5640. _LT_TAGDECL([], [whole_archive_flag_spec], [1],
  5641. [Compiler flag to generate shared objects directly from archives])
  5642. _LT_TAGDECL([], [compiler_needs_object], [1],
  5643. [Whether the compiler copes with passing no objects directly])
  5644. _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
  5645. [Create an old-style archive from a shared archive])
  5646. _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
  5647. [Create a temporary old-style archive to link instead of a shared archive])
  5648. _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
  5649. _LT_TAGDECL([], [archive_expsym_cmds], [2])
  5650. _LT_TAGDECL([], [module_cmds], [2],
  5651. [Commands used to build a loadable module if different from building
  5652. a shared archive.])
  5653. _LT_TAGDECL([], [module_expsym_cmds], [2])
  5654. _LT_TAGDECL([], [with_gnu_ld], [1],
  5655. [Whether we are building with GNU ld or not])
  5656. _LT_TAGDECL([], [allow_undefined_flag], [1],
  5657. [Flag that allows shared libraries with undefined symbols to be built])
  5658. _LT_TAGDECL([], [no_undefined_flag], [1],
  5659. [Flag that enforces no undefined symbols])
  5660. _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
  5661. [Flag to hardcode $libdir into a binary during linking.
  5662. This must work even if $libdir does not exist])
  5663. _LT_TAGDECL([], [hardcode_libdir_separator], [1],
  5664. [Whether we need a single "-rpath" flag with a separated argument])
  5665. _LT_TAGDECL([], [hardcode_direct], [0],
  5666. [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
  5667. DIR into the resulting binary])
  5668. _LT_TAGDECL([], [hardcode_direct_absolute], [0],
  5669. [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
  5670. DIR into the resulting binary and the resulting library dependency is
  5671. "absolute", i.e impossible to change by setting $shlibpath_var if the
  5672. library is relocated])
  5673. _LT_TAGDECL([], [hardcode_minus_L], [0],
  5674. [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
  5675. into the resulting binary])
  5676. _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
  5677. [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
  5678. into the resulting binary])
  5679. _LT_TAGDECL([], [hardcode_automatic], [0],
  5680. [Set to "yes" if building a shared library automatically hardcodes DIR
  5681. into the library and all subsequent libraries and executables linked
  5682. against it])
  5683. _LT_TAGDECL([], [inherit_rpath], [0],
  5684. [Set to yes if linker adds runtime paths of dependent libraries
  5685. to runtime path list])
  5686. _LT_TAGDECL([], [link_all_deplibs], [0],
  5687. [Whether libtool must link a program against all its dependency libraries])
  5688. _LT_TAGDECL([], [always_export_symbols], [0],
  5689. [Set to "yes" if exported symbols are required])
  5690. _LT_TAGDECL([], [export_symbols_cmds], [2],
  5691. [The commands to list exported symbols])
  5692. _LT_TAGDECL([], [exclude_expsyms], [1],
  5693. [Symbols that should not be listed in the preloaded symbols])
  5694. _LT_TAGDECL([], [include_expsyms], [1],
  5695. [Symbols that must always be exported])
  5696. _LT_TAGDECL([], [prelink_cmds], [2],
  5697. [Commands necessary for linking programs (against libraries) with templates])
  5698. _LT_TAGDECL([], [postlink_cmds], [2],
  5699. [Commands necessary for finishing linking programs])
  5700. _LT_TAGDECL([], [file_list_spec], [1],
  5701. [Specify filename containing input files])
  5702. dnl FIXME: Not yet implemented
  5703. dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
  5704. dnl [Compiler flag to generate thread safe objects])
  5705. ])# _LT_LINKER_SHLIBS
  5706. # _LT_LANG_C_CONFIG([TAG])
  5707. # ------------------------
  5708. # Ensure that the configuration variables for a C compiler are suitably
  5709. # defined. These variables are subsequently used by _LT_CONFIG to write
  5710. # the compiler configuration to 'libtool'.
  5711. m4_defun([_LT_LANG_C_CONFIG],
  5712. [m4_require([_LT_DECL_EGREP])dnl
  5713. lt_save_CC=$CC
  5714. AC_LANG_PUSH(C)
  5715. # Source file extension for C test sources.
  5716. ac_ext=c
  5717. # Object file extension for compiled C test sources.
  5718. objext=o
  5719. _LT_TAGVAR(objext, $1)=$objext
  5720. # Code to be used in simple compile tests
  5721. lt_simple_compile_test_code="int some_variable = 0;"
  5722. # Code to be used in simple link tests
  5723. lt_simple_link_test_code='int main(){return(0);}'
  5724. _LT_TAG_COMPILER
  5725. # Save the default compiler, since it gets overwritten when the other
  5726. # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
  5727. compiler_DEFAULT=$CC
  5728. # save warnings/boilerplate of simple test code
  5729. _LT_COMPILER_BOILERPLATE
  5730. _LT_LINKER_BOILERPLATE
  5731. if test -n "$compiler"; then
  5732. _LT_COMPILER_NO_RTTI($1)
  5733. _LT_COMPILER_PIC($1)
  5734. _LT_COMPILER_C_O($1)
  5735. _LT_COMPILER_FILE_LOCKS($1)
  5736. _LT_LINKER_SHLIBS($1)
  5737. _LT_SYS_DYNAMIC_LINKER($1)
  5738. _LT_LINKER_HARDCODE_LIBPATH($1)
  5739. LT_SYS_DLOPEN_SELF
  5740. _LT_CMD_STRIPLIB
  5741. # Report what library types will actually be built
  5742. AC_MSG_CHECKING([if libtool supports shared libraries])
  5743. AC_MSG_RESULT([$can_build_shared])
  5744. AC_MSG_CHECKING([whether to build shared libraries])
  5745. test no = "$can_build_shared" && enable_shared=no
  5746. # On AIX, shared libraries and static libraries use the same namespace, and
  5747. # are all built from PIC.
  5748. case $host_os in
  5749. aix3*)
  5750. test yes = "$enable_shared" && enable_static=no
  5751. if test -n "$RANLIB"; then
  5752. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  5753. postinstall_cmds='$RANLIB $lib'
  5754. fi
  5755. ;;
  5756. aix[[4-9]]*)
  5757. if test ia64 != "$host_cpu"; then
  5758. case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
  5759. yes,aix,yes) ;; # shared object as lib.so file only
  5760. yes,svr4,*) ;; # shared object as lib.so archive member only
  5761. yes,*) enable_static=no ;; # shared object in lib.a archive as well
  5762. esac
  5763. fi
  5764. ;;
  5765. esac
  5766. AC_MSG_RESULT([$enable_shared])
  5767. AC_MSG_CHECKING([whether to build static libraries])
  5768. # Make sure either enable_shared or enable_static is yes.
  5769. test yes = "$enable_shared" || enable_static=yes
  5770. AC_MSG_RESULT([$enable_static])
  5771. _LT_CONFIG($1)
  5772. fi
  5773. AC_LANG_POP
  5774. CC=$lt_save_CC
  5775. ])# _LT_LANG_C_CONFIG
  5776. # _LT_LANG_CXX_CONFIG([TAG])
  5777. # --------------------------
  5778. # Ensure that the configuration variables for a C++ compiler are suitably
  5779. # defined. These variables are subsequently used by _LT_CONFIG to write
  5780. # the compiler configuration to 'libtool'.
  5781. m4_defun([_LT_LANG_CXX_CONFIG],
  5782. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  5783. m4_require([_LT_DECL_EGREP])dnl
  5784. m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  5785. if test -n "$CXX" && ( test no != "$CXX" &&
  5786. ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
  5787. (test g++ != "$CXX"))); then
  5788. AC_PROG_CXXCPP
  5789. else
  5790. _lt_caught_CXX_error=yes
  5791. fi
  5792. AC_LANG_PUSH(C++)
  5793. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5794. _LT_TAGVAR(allow_undefined_flag, $1)=
  5795. _LT_TAGVAR(always_export_symbols, $1)=no
  5796. _LT_TAGVAR(archive_expsym_cmds, $1)=
  5797. _LT_TAGVAR(compiler_needs_object, $1)=no
  5798. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  5799. _LT_TAGVAR(hardcode_direct, $1)=no
  5800. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  5801. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  5802. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5803. _LT_TAGVAR(hardcode_minus_L, $1)=no
  5804. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  5805. _LT_TAGVAR(hardcode_automatic, $1)=no
  5806. _LT_TAGVAR(inherit_rpath, $1)=no
  5807. _LT_TAGVAR(module_cmds, $1)=
  5808. _LT_TAGVAR(module_expsym_cmds, $1)=
  5809. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  5810. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  5811. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  5812. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  5813. _LT_TAGVAR(no_undefined_flag, $1)=
  5814. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5815. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  5816. # Source file extension for C++ test sources.
  5817. ac_ext=cpp
  5818. # Object file extension for compiled C++ test sources.
  5819. objext=o
  5820. _LT_TAGVAR(objext, $1)=$objext
  5821. # No sense in running all these tests if we already determined that
  5822. # the CXX compiler isn't working. Some variables (like enable_shared)
  5823. # are currently assumed to apply to all compilers on this platform,
  5824. # and will be corrupted by setting them based on a non-working compiler.
  5825. if test yes != "$_lt_caught_CXX_error"; then
  5826. # Code to be used in simple compile tests
  5827. lt_simple_compile_test_code="int some_variable = 0;"
  5828. # Code to be used in simple link tests
  5829. lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
  5830. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  5831. _LT_TAG_COMPILER
  5832. # save warnings/boilerplate of simple test code
  5833. _LT_COMPILER_BOILERPLATE
  5834. _LT_LINKER_BOILERPLATE
  5835. # Allow CC to be a program name with arguments.
  5836. lt_save_CC=$CC
  5837. lt_save_CFLAGS=$CFLAGS
  5838. lt_save_LD=$LD
  5839. lt_save_GCC=$GCC
  5840. GCC=$GXX
  5841. lt_save_with_gnu_ld=$with_gnu_ld
  5842. lt_save_path_LD=$lt_cv_path_LD
  5843. if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
  5844. lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
  5845. else
  5846. $as_unset lt_cv_prog_gnu_ld
  5847. fi
  5848. if test -n "${lt_cv_path_LDCXX+set}"; then
  5849. lt_cv_path_LD=$lt_cv_path_LDCXX
  5850. else
  5851. $as_unset lt_cv_path_LD
  5852. fi
  5853. test -z "${LDCXX+set}" || LD=$LDCXX
  5854. CC=${CXX-"c++"}
  5855. CFLAGS=$CXXFLAGS
  5856. compiler=$CC
  5857. _LT_TAGVAR(compiler, $1)=$CC
  5858. _LT_CC_BASENAME([$compiler])
  5859. if test -n "$compiler"; then
  5860. # We don't want -fno-exception when compiling C++ code, so set the
  5861. # no_builtin_flag separately
  5862. if test yes = "$GXX"; then
  5863. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  5864. else
  5865. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  5866. fi
  5867. if test yes = "$GXX"; then
  5868. # Set up default GNU C++ configuration
  5869. LT_PATH_LD
  5870. # Check if GNU C++ uses GNU ld as the underlying linker, since the
  5871. # archiving commands below assume that GNU ld is being used.
  5872. if test yes = "$with_gnu_ld"; then
  5873. _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  5874. _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'
  5875. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5876. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  5877. # If archive_cmds runs LD, not CC, wlarc should be empty
  5878. # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
  5879. # investigate it a little bit more. (MM)
  5880. wlarc='$wl'
  5881. # ancient GNU ld didn't support --whole-archive et. al.
  5882. if eval "`$CC -print-prog-name=ld` --help 2>&1" |
  5883. $GREP 'no-whole-archive' > /dev/null; then
  5884. _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
  5885. else
  5886. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5887. fi
  5888. else
  5889. with_gnu_ld=no
  5890. wlarc=
  5891. # A generic and very simple default shared library creation
  5892. # command for GNU C++ for the case where it uses the native
  5893. # linker, instead of GNU ld. If possible, this setting should
  5894. # overridden to take advantage of the native linker features on
  5895. # the platform it is being used on.
  5896. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  5897. fi
  5898. # Commands to make compiler produce verbose output that lists
  5899. # what "hidden" libraries, object files and flags are used when
  5900. # linking a shared library.
  5901. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
  5902. else
  5903. GXX=no
  5904. with_gnu_ld=no
  5905. wlarc=
  5906. fi
  5907. # PORTME: fill in a description of your system's C++ link characteristics
  5908. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  5909. _LT_TAGVAR(ld_shlibs, $1)=yes
  5910. case $host_os in
  5911. aix3*)
  5912. # FIXME: insert proper C++ library support
  5913. _LT_TAGVAR(ld_shlibs, $1)=no
  5914. ;;
  5915. aix[[4-9]]*)
  5916. if test ia64 = "$host_cpu"; then
  5917. # On IA64, the linker does run time linking by default, so we don't
  5918. # have to do anything special.
  5919. aix_use_runtimelinking=no
  5920. exp_sym_flag='-Bexport'
  5921. no_entry_flag=
  5922. else
  5923. aix_use_runtimelinking=no
  5924. # Test if we are trying to use run time linking or normal
  5925. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  5926. # have runtime linking enabled, and use it for executables.
  5927. # For shared libraries, we enable/disable runtime linking
  5928. # depending on the kind of the shared library created -
  5929. # when "with_aix_soname,aix_use_runtimelinking" is:
  5930. # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
  5931. # "aix,yes" lib.so shared, rtl:yes, for executables
  5932. # lib.a static archive
  5933. # "both,no" lib.so.V(shr.o) shared, rtl:yes
  5934. # lib.a(lib.so.V) shared, rtl:no, for executables
  5935. # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
  5936. # lib.a(lib.so.V) shared, rtl:no
  5937. # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
  5938. # lib.a static archive
  5939. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  5940. for ld_flag in $LDFLAGS; do
  5941. case $ld_flag in
  5942. *-brtl*)
  5943. aix_use_runtimelinking=yes
  5944. break
  5945. ;;
  5946. esac
  5947. done
  5948. if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
  5949. # With aix-soname=svr4, we create the lib.so.V shared archives only,
  5950. # so we don't have lib.a shared libs to link our executables.
  5951. # We have to force runtime linking in this case.
  5952. aix_use_runtimelinking=yes
  5953. LDFLAGS="$LDFLAGS -Wl,-brtl"
  5954. fi
  5955. ;;
  5956. esac
  5957. exp_sym_flag='-bexport'
  5958. no_entry_flag='-bnoentry'
  5959. fi
  5960. # When large executables or shared objects are built, AIX ld can
  5961. # have problems creating the table of contents. If linking a library
  5962. # or program results in "error TOC overflow" add -mminimal-toc to
  5963. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  5964. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  5965. _LT_TAGVAR(archive_cmds, $1)=''
  5966. _LT_TAGVAR(hardcode_direct, $1)=yes
  5967. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5968. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5969. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5970. _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
  5971. case $with_aix_soname,$aix_use_runtimelinking in
  5972. aix,*) ;; # no import file
  5973. svr4,* | *,yes) # use import file
  5974. # The Import File defines what to hardcode.
  5975. _LT_TAGVAR(hardcode_direct, $1)=no
  5976. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  5977. ;;
  5978. esac
  5979. if test yes = "$GXX"; then
  5980. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  5981. # We only want to do this on AIX 4.2 and lower, the check
  5982. # below for broken collect2 doesn't work under 4.3+
  5983. collect2name=`$CC -print-prog-name=collect2`
  5984. if test -f "$collect2name" &&
  5985. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  5986. then
  5987. # We have reworked collect2
  5988. :
  5989. else
  5990. # We have old collect2
  5991. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  5992. # It fails to find uninstalled libraries when the uninstalled
  5993. # path is not listed in the libpath. Setting hardcode_minus_L
  5994. # to unsupported forces relinking
  5995. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5996. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5997. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5998. fi
  5999. esac
  6000. shared_flag='-shared'
  6001. if test yes = "$aix_use_runtimelinking"; then
  6002. shared_flag=$shared_flag' $wl-G'
  6003. fi
  6004. # Need to ensure runtime linking is disabled for the traditional
  6005. # shared library, or the linker may eventually find shared libraries
  6006. # /with/ Import File - we do not want to mix them.
  6007. shared_flag_aix='-shared'
  6008. shared_flag_svr4='-shared $wl-G'
  6009. else
  6010. # not using gcc
  6011. if test ia64 = "$host_cpu"; then
  6012. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  6013. # chokes on -Wl,-G. The following line is correct:
  6014. shared_flag='-G'
  6015. else
  6016. if test yes = "$aix_use_runtimelinking"; then
  6017. shared_flag='$wl-G'
  6018. else
  6019. shared_flag='$wl-bM:SRE'
  6020. fi
  6021. shared_flag_aix='$wl-bM:SRE'
  6022. shared_flag_svr4='$wl-G'
  6023. fi
  6024. fi
  6025. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
  6026. # It seems that -bexpall does not export symbols beginning with
  6027. # underscore (_), so it is better to generate a list of symbols to
  6028. # export.
  6029. _LT_TAGVAR(always_export_symbols, $1)=yes
  6030. if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
  6031. # Warning - without using the other runtime loading flags (-brtl),
  6032. # -berok will link without error, but may produce a broken library.
  6033. # The "-G" linker flag allows undefined symbols.
  6034. _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
  6035. # Determine the default libpath from the value encoded in an empty
  6036. # executable.
  6037. _LT_SYS_MODULE_PATH_AIX([$1])
  6038. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
  6039. _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
  6040. else
  6041. if test ia64 = "$host_cpu"; then
  6042. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
  6043. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  6044. _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"
  6045. else
  6046. # Determine the default libpath from the value encoded in an
  6047. # empty executable.
  6048. _LT_SYS_MODULE_PATH_AIX([$1])
  6049. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
  6050. # Warning - without using the other run time loading flags,
  6051. # -berok will link without error, but may produce a broken library.
  6052. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
  6053. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
  6054. if test yes = "$with_gnu_ld"; then
  6055. # We only use this code for GNU lds that support --whole-archive.
  6056. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
  6057. else
  6058. # Exported symbols can be pulled into shared objects from archives
  6059. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  6060. fi
  6061. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  6062. _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
  6063. # -brtl affects multiple linker settings, -berok does not and is overridden later
  6064. compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
  6065. if test svr4 != "$with_aix_soname"; then
  6066. # This is similar to how AIX traditionally builds its shared
  6067. # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
  6068. _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'
  6069. fi
  6070. if test aix != "$with_aix_soname"; then
  6071. _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'
  6072. else
  6073. # used by -dlpreopen to get the symbols
  6074. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
  6075. fi
  6076. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
  6077. fi
  6078. fi
  6079. ;;
  6080. beos*)
  6081. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  6082. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6083. # Joseph Beckenbach <[email protected]> says some releases of gcc
  6084. # support --undefined. This deserves some investigation. FIXME
  6085. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  6086. else
  6087. _LT_TAGVAR(ld_shlibs, $1)=no
  6088. fi
  6089. ;;
  6090. chorus*)
  6091. case $cc_basename in
  6092. *)
  6093. # FIXME: insert proper C++ library support
  6094. _LT_TAGVAR(ld_shlibs, $1)=no
  6095. ;;
  6096. esac
  6097. ;;
  6098. cygwin* | mingw* | pw32* | cegcc*)
  6099. case $GXX,$cc_basename in
  6100. ,cl* | no,cl* | ,icl* | no,icl*)
  6101. # Native MSVC or ICC
  6102. # hardcode_libdir_flag_spec is actually meaningless, as there is
  6103. # no search path for DLLs.
  6104. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  6105. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6106. _LT_TAGVAR(always_export_symbols, $1)=yes
  6107. _LT_TAGVAR(file_list_spec, $1)='@'
  6108. # Tell ltmain to make .lib files, not .a files.
  6109. libext=lib
  6110. # Tell ltmain to make .dll files, not .so files.
  6111. shrext_cmds=.dll
  6112. # FIXME: Setting linknames here is a bad hack.
  6113. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
  6114. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  6115. cp "$export_symbols" "$output_objdir/$soname.def";
  6116. echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
  6117. else
  6118. $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
  6119. fi~
  6120. $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  6121. linknames='
  6122. # The linker will not automatically build a static lib if we build a DLL.
  6123. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  6124. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  6125. # Don't use ranlib
  6126. _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  6127. _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  6128. lt_tool_outputfile="@TOOL_OUTPUT@"~
  6129. case $lt_outputfile in
  6130. *.exe|*.EXE) ;;
  6131. *)
  6132. lt_outputfile=$lt_outputfile.exe
  6133. lt_tool_outputfile=$lt_tool_outputfile.exe
  6134. ;;
  6135. esac~
  6136. func_to_tool_file "$lt_outputfile"~
  6137. if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
  6138. $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  6139. $RM "$lt_outputfile.manifest";
  6140. fi'
  6141. ;;
  6142. *)
  6143. # g++
  6144. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  6145. # as there is no search path for DLLs.
  6146. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6147. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
  6148. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6149. _LT_TAGVAR(always_export_symbols, $1)=no
  6150. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  6151. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  6152. _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'
  6153. # If the export-symbols file already is a .def file, use it as
  6154. # is; otherwise, prepend EXPORTS...
  6155. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  6156. cp $export_symbols $output_objdir/$soname.def;
  6157. else
  6158. echo EXPORTS > $output_objdir/$soname.def;
  6159. cat $export_symbols >> $output_objdir/$soname.def;
  6160. fi~
  6161. $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'
  6162. else
  6163. _LT_TAGVAR(ld_shlibs, $1)=no
  6164. fi
  6165. ;;
  6166. esac
  6167. ;;
  6168. darwin* | rhapsody*)
  6169. _LT_DARWIN_LINKER_FEATURES($1)
  6170. ;;
  6171. os2*)
  6172. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6173. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  6174. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6175. shrext_cmds=.dll
  6176. _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  6177. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  6178. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  6179. $ECHO EXPORTS >> $output_objdir/$libname.def~
  6180. emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
  6181. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  6182. emximp -o $lib $output_objdir/$libname.def'
  6183. _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  6184. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  6185. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  6186. $ECHO EXPORTS >> $output_objdir/$libname.def~
  6187. prefix_cmds="$SED"~
  6188. if test EXPORTS = "`$SED 1q $export_symbols`"; then
  6189. prefix_cmds="$prefix_cmds -e 1d";
  6190. fi~
  6191. prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
  6192. cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
  6193. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  6194. emximp -o $lib $output_objdir/$libname.def'
  6195. _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
  6196. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  6197. _LT_TAGVAR(file_list_spec, $1)='@'
  6198. ;;
  6199. dgux*)
  6200. case $cc_basename in
  6201. ec++*)
  6202. # FIXME: insert proper C++ library support
  6203. _LT_TAGVAR(ld_shlibs, $1)=no
  6204. ;;
  6205. ghcx*)
  6206. # Green Hills C++ Compiler
  6207. # FIXME: insert proper C++ library support
  6208. _LT_TAGVAR(ld_shlibs, $1)=no
  6209. ;;
  6210. *)
  6211. # FIXME: insert proper C++ library support
  6212. _LT_TAGVAR(ld_shlibs, $1)=no
  6213. ;;
  6214. esac
  6215. ;;
  6216. freebsd2.*)
  6217. # C++ shared libraries reported to be fairly broken before
  6218. # switch to ELF
  6219. _LT_TAGVAR(ld_shlibs, $1)=no
  6220. ;;
  6221. freebsd-elf*)
  6222. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6223. ;;
  6224. freebsd* | dragonfly* | midnightbsd*)
  6225. # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
  6226. # conventions
  6227. _LT_TAGVAR(ld_shlibs, $1)=yes
  6228. ;;
  6229. haiku*)
  6230. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  6231. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6232. ;;
  6233. hpux9*)
  6234. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  6235. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6236. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  6237. _LT_TAGVAR(hardcode_direct, $1)=yes
  6238. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  6239. # but as the default
  6240. # location of the library.
  6241. case $cc_basename in
  6242. CC*)
  6243. # FIXME: insert proper C++ library support
  6244. _LT_TAGVAR(ld_shlibs, $1)=no
  6245. ;;
  6246. aCC*)
  6247. _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'
  6248. # Commands to make compiler produce verbose output that lists
  6249. # what "hidden" libraries, object files and flags are used when
  6250. # linking a shared library.
  6251. #
  6252. # There doesn't appear to be a way to prevent this compiler from
  6253. # explicitly linking system object files so we need to strip them
  6254. # from the output so that they don't get included in the library
  6255. # dependencies.
  6256. 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"'
  6257. ;;
  6258. *)
  6259. if test yes = "$GXX"; then
  6260. _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'
  6261. else
  6262. # FIXME: insert proper C++ library support
  6263. _LT_TAGVAR(ld_shlibs, $1)=no
  6264. fi
  6265. ;;
  6266. esac
  6267. ;;
  6268. hpux10*|hpux11*)
  6269. if test no = "$with_gnu_ld"; then
  6270. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  6271. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6272. case $host_cpu in
  6273. hppa*64*|ia64*)
  6274. ;;
  6275. *)
  6276. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  6277. ;;
  6278. esac
  6279. fi
  6280. case $host_cpu in
  6281. hppa*64*|ia64*)
  6282. _LT_TAGVAR(hardcode_direct, $1)=no
  6283. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6284. ;;
  6285. *)
  6286. _LT_TAGVAR(hardcode_direct, $1)=yes
  6287. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6288. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  6289. # but as the default
  6290. # location of the library.
  6291. ;;
  6292. esac
  6293. case $cc_basename in
  6294. CC*)
  6295. # FIXME: insert proper C++ library support
  6296. _LT_TAGVAR(ld_shlibs, $1)=no
  6297. ;;
  6298. aCC*)
  6299. case $host_cpu in
  6300. hppa*64*)
  6301. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6302. ;;
  6303. ia64*)
  6304. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6305. ;;
  6306. *)
  6307. _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'
  6308. ;;
  6309. esac
  6310. # Commands to make compiler produce verbose output that lists
  6311. # what "hidden" libraries, object files and flags are used when
  6312. # linking a shared library.
  6313. #
  6314. # There doesn't appear to be a way to prevent this compiler from
  6315. # explicitly linking system object files so we need to strip them
  6316. # from the output so that they don't get included in the library
  6317. # dependencies.
  6318. 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"'
  6319. ;;
  6320. *)
  6321. if test yes = "$GXX"; then
  6322. if test no = "$with_gnu_ld"; then
  6323. case $host_cpu in
  6324. hppa*64*)
  6325. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6326. ;;
  6327. ia64*)
  6328. _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'
  6329. ;;
  6330. *)
  6331. _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'
  6332. ;;
  6333. esac
  6334. fi
  6335. else
  6336. # FIXME: insert proper C++ library support
  6337. _LT_TAGVAR(ld_shlibs, $1)=no
  6338. fi
  6339. ;;
  6340. esac
  6341. ;;
  6342. interix[[3-9]]*)
  6343. _LT_TAGVAR(hardcode_direct, $1)=no
  6344. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6345. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6346. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  6347. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  6348. # Instead, shared libraries are loaded at an image base (0x10000000 by
  6349. # default) and relocated if they conflict, which is a slow very memory
  6350. # consuming and fragmenting process. To avoid this, we pick a random,
  6351. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  6352. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  6353. _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'
  6354. _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'
  6355. ;;
  6356. irix5* | irix6*)
  6357. case $cc_basename in
  6358. CC*)
  6359. # SGI C++
  6360. _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'
  6361. # Archives containing C++ object files must be created using
  6362. # "CC -ar", where "CC" is the IRIX C++ compiler. This is
  6363. # necessary to make sure instantiated templates are included
  6364. # in the archive.
  6365. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
  6366. ;;
  6367. *)
  6368. if test yes = "$GXX"; then
  6369. if test no = "$with_gnu_ld"; then
  6370. _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'
  6371. else
  6372. _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'
  6373. fi
  6374. fi
  6375. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6376. ;;
  6377. esac
  6378. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  6379. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6380. _LT_TAGVAR(inherit_rpath, $1)=yes
  6381. ;;
  6382. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  6383. case $cc_basename in
  6384. KCC*)
  6385. # Kuck and Associates, Inc. (KAI) C++ Compiler
  6386. # KCC will only create a shared library if the output file
  6387. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  6388. # to its proper name (with version) after linking.
  6389. _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'
  6390. _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'
  6391. # Commands to make compiler produce verbose output that lists
  6392. # what "hidden" libraries, object files and flags are used when
  6393. # linking a shared library.
  6394. #
  6395. # There doesn't appear to be a way to prevent this compiler from
  6396. # explicitly linking system object files so we need to strip them
  6397. # from the output so that they don't get included in the library
  6398. # dependencies.
  6399. 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"'
  6400. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6401. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  6402. # Archives containing C++ object files must be created using
  6403. # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  6404. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  6405. ;;
  6406. icpc* | ecpc* )
  6407. # Intel C++
  6408. with_gnu_ld=yes
  6409. # version 8.0 and above of icpc choke on multiply defined symbols
  6410. # if we add $predep_objects and $postdep_objects, however 7.1 and
  6411. # earlier do not add the objects themselves.
  6412. case `$CC -V 2>&1` in
  6413. *"Version 7."*)
  6414. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  6415. _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'
  6416. ;;
  6417. *) # Version 8.0 or newer
  6418. tmp_idyn=
  6419. case $host_cpu in
  6420. ia64*) tmp_idyn=' -i_dynamic';;
  6421. esac
  6422. _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  6423. _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'
  6424. ;;
  6425. esac
  6426. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6427. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6428. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  6429. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
  6430. ;;
  6431. pgCC* | pgcpp*)
  6432. # Portland Group C++ compiler
  6433. case `$CC -V` in
  6434. *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
  6435. _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
  6436. rm -rf $tpldir~
  6437. $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
  6438. compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
  6439. _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
  6440. rm -rf $tpldir~
  6441. $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
  6442. $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
  6443. $RANLIB $oldlib'
  6444. _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
  6445. rm -rf $tpldir~
  6446. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  6447. $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  6448. _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
  6449. rm -rf $tpldir~
  6450. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  6451. $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'
  6452. ;;
  6453. *) # Version 6 and above use weak symbols
  6454. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  6455. _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'
  6456. ;;
  6457. esac
  6458. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
  6459. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  6460. _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'
  6461. ;;
  6462. cxx*)
  6463. # Compaq C++
  6464. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  6465. _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'
  6466. runpath_var=LD_RUN_PATH
  6467. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  6468. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6469. # Commands to make compiler produce verbose output that lists
  6470. # what "hidden" libraries, object files and flags are used when
  6471. # linking a shared library.
  6472. #
  6473. # There doesn't appear to be a way to prevent this compiler from
  6474. # explicitly linking system object files so we need to strip them
  6475. # from the output so that they don't get included in the library
  6476. # dependencies.
  6477. 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'
  6478. ;;
  6479. xl* | mpixl* | bgxl*)
  6480. # IBM XL 8.0 on PPC, with GNU ld
  6481. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  6482. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  6483. _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  6484. if test yes = "$supports_anon_versioning"; then
  6485. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  6486. cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  6487. echo "local: *; };" >> $output_objdir/$libname.ver~
  6488. $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
  6489. fi
  6490. ;;
  6491. *)
  6492. case `$CC -V 2>&1 | $SED 5q` in
  6493. *Sun\ C*)
  6494. # Sun C++ 5.9
  6495. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  6496. _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6497. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols'
  6498. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6499. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
  6500. _LT_TAGVAR(compiler_needs_object, $1)=yes
  6501. # Not sure whether something based on
  6502. # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
  6503. # would be better.
  6504. output_verbose_link_cmd='func_echo_all'
  6505. # Archives containing C++ object files must be created using
  6506. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  6507. # necessary to make sure instantiated templates are included
  6508. # in the archive.
  6509. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  6510. ;;
  6511. esac
  6512. ;;
  6513. esac
  6514. ;;
  6515. lynxos*)
  6516. # FIXME: insert proper C++ library support
  6517. _LT_TAGVAR(ld_shlibs, $1)=no
  6518. ;;
  6519. m88k*)
  6520. # FIXME: insert proper C++ library support
  6521. _LT_TAGVAR(ld_shlibs, $1)=no
  6522. ;;
  6523. mvs*)
  6524. case $cc_basename in
  6525. cxx*)
  6526. # FIXME: insert proper C++ library support
  6527. _LT_TAGVAR(ld_shlibs, $1)=no
  6528. ;;
  6529. *)
  6530. # FIXME: insert proper C++ library support
  6531. _LT_TAGVAR(ld_shlibs, $1)=no
  6532. ;;
  6533. esac
  6534. ;;
  6535. netbsd*)
  6536. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  6537. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
  6538. wlarc=
  6539. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6540. _LT_TAGVAR(hardcode_direct, $1)=yes
  6541. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6542. fi
  6543. # Workaround some broken pre-1.5 toolchains
  6544. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
  6545. ;;
  6546. *nto* | *qnx*)
  6547. _LT_TAGVAR(ld_shlibs, $1)=yes
  6548. ;;
  6549. openbsd* | bitrig*)
  6550. if test -f /usr/libexec/ld.so; then
  6551. _LT_TAGVAR(hardcode_direct, $1)=yes
  6552. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6553. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6554. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  6555. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6556. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
  6557. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib'
  6558. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  6559. _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
  6560. fi
  6561. output_verbose_link_cmd=func_echo_all
  6562. else
  6563. _LT_TAGVAR(ld_shlibs, $1)=no
  6564. fi
  6565. ;;
  6566. osf3* | osf4* | osf5*)
  6567. case $cc_basename in
  6568. KCC*)
  6569. # Kuck and Associates, Inc. (KAI) C++ Compiler
  6570. # KCC will only create a shared library if the output file
  6571. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  6572. # to its proper name (with version) after linking.
  6573. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
  6574. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6575. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6576. # Archives containing C++ object files must be created using
  6577. # the KAI C++ compiler.
  6578. case $host in
  6579. osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
  6580. *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
  6581. esac
  6582. ;;
  6583. RCC*)
  6584. # Rational C++ 2.4.1
  6585. # FIXME: insert proper C++ library support
  6586. _LT_TAGVAR(ld_shlibs, $1)=no
  6587. ;;
  6588. cxx*)
  6589. case $host in
  6590. osf3*)
  6591. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
  6592. _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
  6593. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  6594. ;;
  6595. *)
  6596. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  6597. _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
  6598. _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
  6599. echo "-hidden">> $lib.exp~
  6600. $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
  6601. $RM $lib.exp'
  6602. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  6603. ;;
  6604. esac
  6605. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6606. # Commands to make compiler produce verbose output that lists
  6607. # what "hidden" libraries, object files and flags are used when
  6608. # linking a shared library.
  6609. #
  6610. # There doesn't appear to be a way to prevent this compiler from
  6611. # explicitly linking system object files so we need to strip them
  6612. # from the output so that they don't get included in the library
  6613. # dependencies.
  6614. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
  6615. ;;
  6616. *)
  6617. if test yes,no = "$GXX,$with_gnu_ld"; then
  6618. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
  6619. case $host in
  6620. osf3*)
  6621. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
  6622. ;;
  6623. *)
  6624. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
  6625. ;;
  6626. esac
  6627. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  6628. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6629. # Commands to make compiler produce verbose output that lists
  6630. # what "hidden" libraries, object files and flags are used when
  6631. # linking a shared library.
  6632. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
  6633. else
  6634. # FIXME: insert proper C++ library support
  6635. _LT_TAGVAR(ld_shlibs, $1)=no
  6636. fi
  6637. ;;
  6638. esac
  6639. ;;
  6640. psos*)
  6641. # FIXME: insert proper C++ library support
  6642. _LT_TAGVAR(ld_shlibs, $1)=no
  6643. ;;
  6644. sunos4*)
  6645. case $cc_basename in
  6646. CC*)
  6647. # Sun C++ 4.x
  6648. # FIXME: insert proper C++ library support
  6649. _LT_TAGVAR(ld_shlibs, $1)=no
  6650. ;;
  6651. lcc*)
  6652. # Lucid
  6653. # FIXME: insert proper C++ library support
  6654. _LT_TAGVAR(ld_shlibs, $1)=no
  6655. ;;
  6656. *)
  6657. # FIXME: insert proper C++ library support
  6658. _LT_TAGVAR(ld_shlibs, $1)=no
  6659. ;;
  6660. esac
  6661. ;;
  6662. solaris*)
  6663. case $cc_basename in
  6664. CC* | sunCC*)
  6665. # Sun C++ 4.2, 5.x and Centerline C++
  6666. _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
  6667. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  6668. _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6669. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6670. $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  6671. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6672. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6673. case $host_os in
  6674. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6675. *)
  6676. # The compiler driver will combine and reorder linker options,
  6677. # but understands '-z linker_flag'.
  6678. # Supported since Solaris 2.6 (maybe 2.5.1?)
  6679. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  6680. ;;
  6681. esac
  6682. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6683. output_verbose_link_cmd='func_echo_all'
  6684. # Archives containing C++ object files must be created using
  6685. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  6686. # necessary to make sure instantiated templates are included
  6687. # in the archive.
  6688. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  6689. ;;
  6690. gcx*)
  6691. # Green Hills C++ Compiler
  6692. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
  6693. # The C++ compiler must be used to create the archive.
  6694. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
  6695. ;;
  6696. *)
  6697. # GNU C++ compiler with Solaris linker
  6698. if test yes,no = "$GXX,$with_gnu_ld"; then
  6699. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
  6700. if $CC --version | $GREP -v '^2\.7' > /dev/null; then
  6701. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
  6702. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6703. $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  6704. # Commands to make compiler produce verbose output that lists
  6705. # what "hidden" libraries, object files and flags are used when
  6706. # linking a shared library.
  6707. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
  6708. else
  6709. # g++ 2.7 appears to require '-G' NOT '-shared' on this
  6710. # platform.
  6711. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
  6712. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6713. $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  6714. # Commands to make compiler produce verbose output that lists
  6715. # what "hidden" libraries, object files and flags are used when
  6716. # linking a shared library.
  6717. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
  6718. fi
  6719. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
  6720. case $host_os in
  6721. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6722. *)
  6723. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
  6724. ;;
  6725. esac
  6726. fi
  6727. ;;
  6728. esac
  6729. ;;
  6730. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  6731. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  6732. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6733. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6734. runpath_var='LD_RUN_PATH'
  6735. case $cc_basename in
  6736. CC*)
  6737. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6738. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6739. ;;
  6740. *)
  6741. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6742. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6743. ;;
  6744. esac
  6745. ;;
  6746. sysv5* | sco3.2v5* | sco5v6*)
  6747. # Note: We CANNOT use -z defs as we might desire, because we do not
  6748. # link with -lc, and that would cause any symbols used from libc to
  6749. # always be unresolved, which means just about no library would
  6750. # ever link correctly. If we're not using GNU ld we use -z text
  6751. # though, which does catch some bad symbols but isn't as heavy-handed
  6752. # as -z defs.
  6753. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  6754. _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
  6755. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6756. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6757. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
  6758. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  6759. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6760. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
  6761. runpath_var='LD_RUN_PATH'
  6762. case $cc_basename in
  6763. CC*)
  6764. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6765. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6766. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
  6767. '"$_LT_TAGVAR(old_archive_cmds, $1)"
  6768. _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
  6769. '"$_LT_TAGVAR(reload_cmds, $1)"
  6770. ;;
  6771. *)
  6772. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6773. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6774. ;;
  6775. esac
  6776. ;;
  6777. tandem*)
  6778. case $cc_basename in
  6779. NCC*)
  6780. # NonStop-UX NCC 3.20
  6781. # FIXME: insert proper C++ library support
  6782. _LT_TAGVAR(ld_shlibs, $1)=no
  6783. ;;
  6784. *)
  6785. # FIXME: insert proper C++ library support
  6786. _LT_TAGVAR(ld_shlibs, $1)=no
  6787. ;;
  6788. esac
  6789. ;;
  6790. vxworks*)
  6791. # FIXME: insert proper C++ library support
  6792. _LT_TAGVAR(ld_shlibs, $1)=no
  6793. ;;
  6794. *)
  6795. # FIXME: insert proper C++ library support
  6796. _LT_TAGVAR(ld_shlibs, $1)=no
  6797. ;;
  6798. esac
  6799. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  6800. test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
  6801. _LT_TAGVAR(GCC, $1)=$GXX
  6802. _LT_TAGVAR(LD, $1)=$LD
  6803. ## CAVEAT EMPTOR:
  6804. ## There is no encapsulation within the following macros, do not change
  6805. ## the running order or otherwise move them around unless you know exactly
  6806. ## what you are doing...
  6807. _LT_SYS_HIDDEN_LIBDEPS($1)
  6808. _LT_COMPILER_PIC($1)
  6809. _LT_COMPILER_C_O($1)
  6810. _LT_COMPILER_FILE_LOCKS($1)
  6811. _LT_LINKER_SHLIBS($1)
  6812. _LT_SYS_DYNAMIC_LINKER($1)
  6813. _LT_LINKER_HARDCODE_LIBPATH($1)
  6814. _LT_CONFIG($1)
  6815. fi # test -n "$compiler"
  6816. CC=$lt_save_CC
  6817. CFLAGS=$lt_save_CFLAGS
  6818. LDCXX=$LD
  6819. LD=$lt_save_LD
  6820. GCC=$lt_save_GCC
  6821. with_gnu_ld=$lt_save_with_gnu_ld
  6822. lt_cv_path_LDCXX=$lt_cv_path_LD
  6823. lt_cv_path_LD=$lt_save_path_LD
  6824. lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
  6825. lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
  6826. fi # test yes != "$_lt_caught_CXX_error"
  6827. AC_LANG_POP
  6828. ])# _LT_LANG_CXX_CONFIG
  6829. # _LT_FUNC_STRIPNAME_CNF
  6830. # ----------------------
  6831. # func_stripname_cnf prefix suffix name
  6832. # strip PREFIX and SUFFIX off of NAME.
  6833. # PREFIX and SUFFIX must not contain globbing or regex special
  6834. # characters, hashes, percent signs, but SUFFIX may contain a leading
  6835. # dot (in which case that matches only a dot).
  6836. #
  6837. # This function is identical to the (non-XSI) version of func_stripname,
  6838. # except this one can be used by m4 code that may be executed by configure,
  6839. # rather than the libtool script.
  6840. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
  6841. AC_REQUIRE([_LT_DECL_SED])
  6842. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
  6843. func_stripname_cnf ()
  6844. {
  6845. case @S|@2 in
  6846. .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
  6847. *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
  6848. esac
  6849. } # func_stripname_cnf
  6850. ])# _LT_FUNC_STRIPNAME_CNF
  6851. # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
  6852. # ---------------------------------
  6853. # Figure out "hidden" library dependencies from verbose
  6854. # compiler output when linking a shared library.
  6855. # Parse the compiler output and extract the necessary
  6856. # objects, libraries and library flags.
  6857. m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
  6858. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  6859. AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
  6860. # Dependencies to place before and after the object being linked:
  6861. _LT_TAGVAR(predep_objects, $1)=
  6862. _LT_TAGVAR(postdep_objects, $1)=
  6863. _LT_TAGVAR(predeps, $1)=
  6864. _LT_TAGVAR(postdeps, $1)=
  6865. _LT_TAGVAR(compiler_lib_search_path, $1)=
  6866. dnl we can't use the lt_simple_compile_test_code here,
  6867. dnl because it contains code intended for an executable,
  6868. dnl not a library. It's possible we should let each
  6869. dnl tag define a new lt_????_link_test_code variable,
  6870. dnl but it's only used here...
  6871. m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
  6872. int a;
  6873. void foo (void) { a = 0; }
  6874. _LT_EOF
  6875. ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
  6876. class Foo
  6877. {
  6878. public:
  6879. Foo (void) { a = 0; }
  6880. private:
  6881. int a;
  6882. };
  6883. _LT_EOF
  6884. ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
  6885. subroutine foo
  6886. implicit none
  6887. integer*4 a
  6888. a=0
  6889. return
  6890. end
  6891. _LT_EOF
  6892. ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
  6893. subroutine foo
  6894. implicit none
  6895. integer a
  6896. a=0
  6897. return
  6898. end
  6899. _LT_EOF
  6900. ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
  6901. public class foo {
  6902. private int a;
  6903. public void bar (void) {
  6904. a = 0;
  6905. }
  6906. };
  6907. _LT_EOF
  6908. ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
  6909. package foo
  6910. func foo() {
  6911. }
  6912. _LT_EOF
  6913. ])
  6914. _lt_libdeps_save_CFLAGS=$CFLAGS
  6915. case "$CC $CFLAGS " in #(
  6916. *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
  6917. *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
  6918. *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
  6919. esac
  6920. dnl Parse the compiler output and extract the necessary
  6921. dnl objects, libraries and library flags.
  6922. if AC_TRY_EVAL(ac_compile); then
  6923. # Parse the compiler output and extract the necessary
  6924. # objects, libraries and library flags.
  6925. # Sentinel used to keep track of whether or not we are before
  6926. # the conftest object file.
  6927. pre_test_object_deps_done=no
  6928. for p in `eval "$output_verbose_link_cmd"`; do
  6929. case $prev$p in
  6930. -L* | -R* | -l*)
  6931. # Some compilers place space between "-{L,R}" and the path.
  6932. # Remove the space.
  6933. if test x-L = "$p" ||
  6934. test x-R = "$p"; then
  6935. prev=$p
  6936. continue
  6937. fi
  6938. # Expand the sysroot to ease extracting the directories later.
  6939. if test -z "$prev"; then
  6940. case $p in
  6941. -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
  6942. -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
  6943. -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
  6944. esac
  6945. fi
  6946. case $p in
  6947. =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
  6948. esac
  6949. if test no = "$pre_test_object_deps_done"; then
  6950. case $prev in
  6951. -L | -R)
  6952. # Internal compiler library paths should come after those
  6953. # provided the user. The postdeps already come after the
  6954. # user supplied libs so there is no need to process them.
  6955. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
  6956. _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
  6957. else
  6958. _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
  6959. fi
  6960. ;;
  6961. # The "-l" case would never come before the object being
  6962. # linked, so don't bother handling this case.
  6963. esac
  6964. else
  6965. if test -z "$_LT_TAGVAR(postdeps, $1)"; then
  6966. _LT_TAGVAR(postdeps, $1)=$prev$p
  6967. else
  6968. _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
  6969. fi
  6970. fi
  6971. prev=
  6972. ;;
  6973. *.lto.$objext) ;; # Ignore GCC LTO objects
  6974. *.$objext)
  6975. # This assumes that the test object file only shows up
  6976. # once in the compiler output.
  6977. if test "$p" = "conftest.$objext"; then
  6978. pre_test_object_deps_done=yes
  6979. continue
  6980. fi
  6981. if test no = "$pre_test_object_deps_done"; then
  6982. if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
  6983. _LT_TAGVAR(predep_objects, $1)=$p
  6984. else
  6985. _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
  6986. fi
  6987. else
  6988. if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
  6989. _LT_TAGVAR(postdep_objects, $1)=$p
  6990. else
  6991. _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
  6992. fi
  6993. fi
  6994. ;;
  6995. *) ;; # Ignore the rest.
  6996. esac
  6997. done
  6998. # Clean up.
  6999. rm -f a.out a.exe
  7000. else
  7001. echo "libtool.m4: error: problem compiling $1 test program"
  7002. fi
  7003. $RM -f confest.$objext
  7004. CFLAGS=$_lt_libdeps_save_CFLAGS
  7005. # PORTME: override above test on systems where it is broken
  7006. m4_if([$1], [CXX],
  7007. [case $host_os in
  7008. interix[[3-9]]*)
  7009. # Interix 3.5 installs completely hosed .la files for C++, so rather than
  7010. # hack all around it, let's just trust "g++" to DTRT.
  7011. _LT_TAGVAR(predep_objects,$1)=
  7012. _LT_TAGVAR(postdep_objects,$1)=
  7013. _LT_TAGVAR(postdeps,$1)=
  7014. ;;
  7015. esac
  7016. ])
  7017. case " $_LT_TAGVAR(postdeps, $1) " in
  7018. *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
  7019. esac
  7020. _LT_TAGVAR(compiler_lib_search_dirs, $1)=
  7021. if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
  7022. _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
  7023. fi
  7024. _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
  7025. [The directories searched by this compiler when creating a shared library])
  7026. _LT_TAGDECL([], [predep_objects], [1],
  7027. [Dependencies to place before and after the objects being linked to
  7028. create a shared library])
  7029. _LT_TAGDECL([], [postdep_objects], [1])
  7030. _LT_TAGDECL([], [predeps], [1])
  7031. _LT_TAGDECL([], [postdeps], [1])
  7032. _LT_TAGDECL([], [compiler_lib_search_path], [1],
  7033. [The library search path used internally by the compiler when linking
  7034. a shared library])
  7035. ])# _LT_SYS_HIDDEN_LIBDEPS
  7036. # _LT_LANG_F77_CONFIG([TAG])
  7037. # --------------------------
  7038. # Ensure that the configuration variables for a Fortran 77 compiler are
  7039. # suitably defined. These variables are subsequently used by _LT_CONFIG
  7040. # to write the compiler configuration to 'libtool'.
  7041. m4_defun([_LT_LANG_F77_CONFIG],
  7042. [AC_LANG_PUSH(Fortran 77)
  7043. if test -z "$F77" || test no = "$F77"; then
  7044. _lt_disable_F77=yes
  7045. fi
  7046. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7047. _LT_TAGVAR(allow_undefined_flag, $1)=
  7048. _LT_TAGVAR(always_export_symbols, $1)=no
  7049. _LT_TAGVAR(archive_expsym_cmds, $1)=
  7050. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  7051. _LT_TAGVAR(hardcode_direct, $1)=no
  7052. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  7053. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  7054. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  7055. _LT_TAGVAR(hardcode_minus_L, $1)=no
  7056. _LT_TAGVAR(hardcode_automatic, $1)=no
  7057. _LT_TAGVAR(inherit_rpath, $1)=no
  7058. _LT_TAGVAR(module_cmds, $1)=
  7059. _LT_TAGVAR(module_expsym_cmds, $1)=
  7060. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  7061. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7062. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  7063. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  7064. _LT_TAGVAR(no_undefined_flag, $1)=
  7065. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  7066. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  7067. # Source file extension for f77 test sources.
  7068. ac_ext=f
  7069. # Object file extension for compiled f77 test sources.
  7070. objext=o
  7071. _LT_TAGVAR(objext, $1)=$objext
  7072. # No sense in running all these tests if we already determined that
  7073. # the F77 compiler isn't working. Some variables (like enable_shared)
  7074. # are currently assumed to apply to all compilers on this platform,
  7075. # and will be corrupted by setting them based on a non-working compiler.
  7076. if test yes != "$_lt_disable_F77"; then
  7077. # Code to be used in simple compile tests
  7078. lt_simple_compile_test_code="\
  7079. subroutine t
  7080. return
  7081. end
  7082. "
  7083. # Code to be used in simple link tests
  7084. lt_simple_link_test_code="\
  7085. program t
  7086. end
  7087. "
  7088. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7089. _LT_TAG_COMPILER
  7090. # save warnings/boilerplate of simple test code
  7091. _LT_COMPILER_BOILERPLATE
  7092. _LT_LINKER_BOILERPLATE
  7093. # Allow CC to be a program name with arguments.
  7094. lt_save_CC=$CC
  7095. lt_save_GCC=$GCC
  7096. lt_save_CFLAGS=$CFLAGS
  7097. CC=${F77-"f77"}
  7098. CFLAGS=$FFLAGS
  7099. compiler=$CC
  7100. _LT_TAGVAR(compiler, $1)=$CC
  7101. _LT_CC_BASENAME([$compiler])
  7102. GCC=$G77
  7103. if test -n "$compiler"; then
  7104. AC_MSG_CHECKING([if libtool supports shared libraries])
  7105. AC_MSG_RESULT([$can_build_shared])
  7106. AC_MSG_CHECKING([whether to build shared libraries])
  7107. test no = "$can_build_shared" && enable_shared=no
  7108. # On AIX, shared libraries and static libraries use the same namespace, and
  7109. # are all built from PIC.
  7110. case $host_os in
  7111. aix3*)
  7112. test yes = "$enable_shared" && enable_static=no
  7113. if test -n "$RANLIB"; then
  7114. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  7115. postinstall_cmds='$RANLIB $lib'
  7116. fi
  7117. ;;
  7118. aix[[4-9]]*)
  7119. if test ia64 != "$host_cpu"; then
  7120. case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
  7121. yes,aix,yes) ;; # shared object as lib.so file only
  7122. yes,svr4,*) ;; # shared object as lib.so archive member only
  7123. yes,*) enable_static=no ;; # shared object in lib.a archive as well
  7124. esac
  7125. fi
  7126. ;;
  7127. esac
  7128. AC_MSG_RESULT([$enable_shared])
  7129. AC_MSG_CHECKING([whether to build static libraries])
  7130. # Make sure either enable_shared or enable_static is yes.
  7131. test yes = "$enable_shared" || enable_static=yes
  7132. AC_MSG_RESULT([$enable_static])
  7133. _LT_TAGVAR(GCC, $1)=$G77
  7134. _LT_TAGVAR(LD, $1)=$LD
  7135. ## CAVEAT EMPTOR:
  7136. ## There is no encapsulation within the following macros, do not change
  7137. ## the running order or otherwise move them around unless you know exactly
  7138. ## what you are doing...
  7139. _LT_COMPILER_PIC($1)
  7140. _LT_COMPILER_C_O($1)
  7141. _LT_COMPILER_FILE_LOCKS($1)
  7142. _LT_LINKER_SHLIBS($1)
  7143. _LT_SYS_DYNAMIC_LINKER($1)
  7144. _LT_LINKER_HARDCODE_LIBPATH($1)
  7145. _LT_CONFIG($1)
  7146. fi # test -n "$compiler"
  7147. GCC=$lt_save_GCC
  7148. CC=$lt_save_CC
  7149. CFLAGS=$lt_save_CFLAGS
  7150. fi # test yes != "$_lt_disable_F77"
  7151. AC_LANG_POP
  7152. ])# _LT_LANG_F77_CONFIG
  7153. # _LT_LANG_FC_CONFIG([TAG])
  7154. # -------------------------
  7155. # Ensure that the configuration variables for a Fortran compiler are
  7156. # suitably defined. These variables are subsequently used by _LT_CONFIG
  7157. # to write the compiler configuration to 'libtool'.
  7158. m4_defun([_LT_LANG_FC_CONFIG],
  7159. [AC_LANG_PUSH(Fortran)
  7160. if test -z "$FC" || test no = "$FC"; then
  7161. _lt_disable_FC=yes
  7162. fi
  7163. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7164. _LT_TAGVAR(allow_undefined_flag, $1)=
  7165. _LT_TAGVAR(always_export_symbols, $1)=no
  7166. _LT_TAGVAR(archive_expsym_cmds, $1)=
  7167. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  7168. _LT_TAGVAR(hardcode_direct, $1)=no
  7169. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  7170. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  7171. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  7172. _LT_TAGVAR(hardcode_minus_L, $1)=no
  7173. _LT_TAGVAR(hardcode_automatic, $1)=no
  7174. _LT_TAGVAR(inherit_rpath, $1)=no
  7175. _LT_TAGVAR(module_cmds, $1)=
  7176. _LT_TAGVAR(module_expsym_cmds, $1)=
  7177. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  7178. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7179. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  7180. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  7181. _LT_TAGVAR(no_undefined_flag, $1)=
  7182. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  7183. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  7184. # Source file extension for fc test sources.
  7185. ac_ext=${ac_fc_srcext-f}
  7186. # Object file extension for compiled fc test sources.
  7187. objext=o
  7188. _LT_TAGVAR(objext, $1)=$objext
  7189. # No sense in running all these tests if we already determined that
  7190. # the FC compiler isn't working. Some variables (like enable_shared)
  7191. # are currently assumed to apply to all compilers on this platform,
  7192. # and will be corrupted by setting them based on a non-working compiler.
  7193. if test yes != "$_lt_disable_FC"; then
  7194. # Code to be used in simple compile tests
  7195. lt_simple_compile_test_code="\
  7196. subroutine t
  7197. return
  7198. end
  7199. "
  7200. # Code to be used in simple link tests
  7201. lt_simple_link_test_code="\
  7202. program t
  7203. end
  7204. "
  7205. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7206. _LT_TAG_COMPILER
  7207. # save warnings/boilerplate of simple test code
  7208. _LT_COMPILER_BOILERPLATE
  7209. _LT_LINKER_BOILERPLATE
  7210. # Allow CC to be a program name with arguments.
  7211. lt_save_CC=$CC
  7212. lt_save_GCC=$GCC
  7213. lt_save_CFLAGS=$CFLAGS
  7214. CC=${FC-"f95"}
  7215. CFLAGS=$FCFLAGS
  7216. compiler=$CC
  7217. GCC=$ac_cv_fc_compiler_gnu
  7218. _LT_TAGVAR(compiler, $1)=$CC
  7219. _LT_CC_BASENAME([$compiler])
  7220. if test -n "$compiler"; then
  7221. AC_MSG_CHECKING([if libtool supports shared libraries])
  7222. AC_MSG_RESULT([$can_build_shared])
  7223. AC_MSG_CHECKING([whether to build shared libraries])
  7224. test no = "$can_build_shared" && enable_shared=no
  7225. # On AIX, shared libraries and static libraries use the same namespace, and
  7226. # are all built from PIC.
  7227. case $host_os in
  7228. aix3*)
  7229. test yes = "$enable_shared" && enable_static=no
  7230. if test -n "$RANLIB"; then
  7231. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  7232. postinstall_cmds='$RANLIB $lib'
  7233. fi
  7234. ;;
  7235. aix[[4-9]]*)
  7236. if test ia64 != "$host_cpu"; then
  7237. case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
  7238. yes,aix,yes) ;; # shared object as lib.so file only
  7239. yes,svr4,*) ;; # shared object as lib.so archive member only
  7240. yes,*) enable_static=no ;; # shared object in lib.a archive as well
  7241. esac
  7242. fi
  7243. ;;
  7244. esac
  7245. AC_MSG_RESULT([$enable_shared])
  7246. AC_MSG_CHECKING([whether to build static libraries])
  7247. # Make sure either enable_shared or enable_static is yes.
  7248. test yes = "$enable_shared" || enable_static=yes
  7249. AC_MSG_RESULT([$enable_static])
  7250. _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
  7251. _LT_TAGVAR(LD, $1)=$LD
  7252. ## CAVEAT EMPTOR:
  7253. ## There is no encapsulation within the following macros, do not change
  7254. ## the running order or otherwise move them around unless you know exactly
  7255. ## what you are doing...
  7256. _LT_SYS_HIDDEN_LIBDEPS($1)
  7257. _LT_COMPILER_PIC($1)
  7258. _LT_COMPILER_C_O($1)
  7259. _LT_COMPILER_FILE_LOCKS($1)
  7260. _LT_LINKER_SHLIBS($1)
  7261. _LT_SYS_DYNAMIC_LINKER($1)
  7262. _LT_LINKER_HARDCODE_LIBPATH($1)
  7263. _LT_CONFIG($1)
  7264. fi # test -n "$compiler"
  7265. GCC=$lt_save_GCC
  7266. CC=$lt_save_CC
  7267. CFLAGS=$lt_save_CFLAGS
  7268. fi # test yes != "$_lt_disable_FC"
  7269. AC_LANG_POP
  7270. ])# _LT_LANG_FC_CONFIG
  7271. # _LT_LANG_GCJ_CONFIG([TAG])
  7272. # --------------------------
  7273. # Ensure that the configuration variables for the GNU Java Compiler compiler
  7274. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  7275. # to write the compiler configuration to 'libtool'.
  7276. m4_defun([_LT_LANG_GCJ_CONFIG],
  7277. [AC_REQUIRE([LT_PROG_GCJ])dnl
  7278. AC_LANG_SAVE
  7279. # Source file extension for Java test sources.
  7280. ac_ext=java
  7281. # Object file extension for compiled Java test sources.
  7282. objext=o
  7283. _LT_TAGVAR(objext, $1)=$objext
  7284. # Code to be used in simple compile tests
  7285. lt_simple_compile_test_code="class foo {}"
  7286. # Code to be used in simple link tests
  7287. lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
  7288. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7289. _LT_TAG_COMPILER
  7290. # save warnings/boilerplate of simple test code
  7291. _LT_COMPILER_BOILERPLATE
  7292. _LT_LINKER_BOILERPLATE
  7293. # Allow CC to be a program name with arguments.
  7294. lt_save_CC=$CC
  7295. lt_save_CFLAGS=$CFLAGS
  7296. lt_save_GCC=$GCC
  7297. GCC=yes
  7298. CC=${GCJ-"gcj"}
  7299. CFLAGS=$GCJFLAGS
  7300. compiler=$CC
  7301. _LT_TAGVAR(compiler, $1)=$CC
  7302. _LT_TAGVAR(LD, $1)=$LD
  7303. _LT_CC_BASENAME([$compiler])
  7304. # GCJ did not exist at the time GCC didn't implicitly link libc in.
  7305. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7306. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7307. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  7308. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  7309. if test -n "$compiler"; then
  7310. _LT_COMPILER_NO_RTTI($1)
  7311. _LT_COMPILER_PIC($1)
  7312. _LT_COMPILER_C_O($1)
  7313. _LT_COMPILER_FILE_LOCKS($1)
  7314. _LT_LINKER_SHLIBS($1)
  7315. _LT_LINKER_HARDCODE_LIBPATH($1)
  7316. _LT_CONFIG($1)
  7317. fi
  7318. AC_LANG_RESTORE
  7319. GCC=$lt_save_GCC
  7320. CC=$lt_save_CC
  7321. CFLAGS=$lt_save_CFLAGS
  7322. ])# _LT_LANG_GCJ_CONFIG
  7323. # _LT_LANG_GO_CONFIG([TAG])
  7324. # --------------------------
  7325. # Ensure that the configuration variables for the GNU Go compiler
  7326. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  7327. # to write the compiler configuration to 'libtool'.
  7328. m4_defun([_LT_LANG_GO_CONFIG],
  7329. [AC_REQUIRE([LT_PROG_GO])dnl
  7330. AC_LANG_SAVE
  7331. # Source file extension for Go test sources.
  7332. ac_ext=go
  7333. # Object file extension for compiled Go test sources.
  7334. objext=o
  7335. _LT_TAGVAR(objext, $1)=$objext
  7336. # Code to be used in simple compile tests
  7337. lt_simple_compile_test_code="package main; func main() { }"
  7338. # Code to be used in simple link tests
  7339. lt_simple_link_test_code='package main; func main() { }'
  7340. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7341. _LT_TAG_COMPILER
  7342. # save warnings/boilerplate of simple test code
  7343. _LT_COMPILER_BOILERPLATE
  7344. _LT_LINKER_BOILERPLATE
  7345. # Allow CC to be a program name with arguments.
  7346. lt_save_CC=$CC
  7347. lt_save_CFLAGS=$CFLAGS
  7348. lt_save_GCC=$GCC
  7349. GCC=yes
  7350. CC=${GOC-"gccgo"}
  7351. CFLAGS=$GOFLAGS
  7352. compiler=$CC
  7353. _LT_TAGVAR(compiler, $1)=$CC
  7354. _LT_TAGVAR(LD, $1)=$LD
  7355. _LT_CC_BASENAME([$compiler])
  7356. # Go did not exist at the time GCC didn't implicitly link libc in.
  7357. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7358. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7359. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  7360. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  7361. if test -n "$compiler"; then
  7362. _LT_COMPILER_NO_RTTI($1)
  7363. _LT_COMPILER_PIC($1)
  7364. _LT_COMPILER_C_O($1)
  7365. _LT_COMPILER_FILE_LOCKS($1)
  7366. _LT_LINKER_SHLIBS($1)
  7367. _LT_LINKER_HARDCODE_LIBPATH($1)
  7368. _LT_CONFIG($1)
  7369. fi
  7370. AC_LANG_RESTORE
  7371. GCC=$lt_save_GCC
  7372. CC=$lt_save_CC
  7373. CFLAGS=$lt_save_CFLAGS
  7374. ])# _LT_LANG_GO_CONFIG
  7375. # _LT_LANG_RC_CONFIG([TAG])
  7376. # -------------------------
  7377. # Ensure that the configuration variables for the Windows resource compiler
  7378. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  7379. # to write the compiler configuration to 'libtool'.
  7380. m4_defun([_LT_LANG_RC_CONFIG],
  7381. [AC_REQUIRE([LT_PROG_RC])dnl
  7382. AC_LANG_SAVE
  7383. # Source file extension for RC test sources.
  7384. ac_ext=rc
  7385. # Object file extension for compiled RC test sources.
  7386. objext=o
  7387. _LT_TAGVAR(objext, $1)=$objext
  7388. # Code to be used in simple compile tests
  7389. lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
  7390. # Code to be used in simple link tests
  7391. lt_simple_link_test_code=$lt_simple_compile_test_code
  7392. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7393. _LT_TAG_COMPILER
  7394. # save warnings/boilerplate of simple test code
  7395. _LT_COMPILER_BOILERPLATE
  7396. _LT_LINKER_BOILERPLATE
  7397. # Allow CC to be a program name with arguments.
  7398. lt_save_CC=$CC
  7399. lt_save_CFLAGS=$CFLAGS
  7400. lt_save_GCC=$GCC
  7401. GCC=
  7402. CC=${RC-"windres"}
  7403. CFLAGS=
  7404. compiler=$CC
  7405. _LT_TAGVAR(compiler, $1)=$CC
  7406. _LT_CC_BASENAME([$compiler])
  7407. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  7408. if test -n "$compiler"; then
  7409. :
  7410. _LT_CONFIG($1)
  7411. fi
  7412. GCC=$lt_save_GCC
  7413. AC_LANG_RESTORE
  7414. CC=$lt_save_CC
  7415. CFLAGS=$lt_save_CFLAGS
  7416. ])# _LT_LANG_RC_CONFIG
  7417. # LT_PROG_GCJ
  7418. # -----------
  7419. AC_DEFUN([LT_PROG_GCJ],
  7420. [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
  7421. [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
  7422. [AC_CHECK_TOOL(GCJ, gcj,)
  7423. test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
  7424. AC_SUBST(GCJFLAGS)])])[]dnl
  7425. ])
  7426. # Old name:
  7427. AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
  7428. dnl aclocal-1.4 backwards compatibility:
  7429. dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
  7430. # LT_PROG_GO
  7431. # ----------
  7432. AC_DEFUN([LT_PROG_GO],
  7433. [AC_CHECK_TOOL(GOC, gccgo,)
  7434. ])
  7435. # LT_PROG_RC
  7436. # ----------
  7437. AC_DEFUN([LT_PROG_RC],
  7438. [AC_CHECK_TOOL(RC, windres,)
  7439. ])
  7440. # Old name:
  7441. AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
  7442. dnl aclocal-1.4 backwards compatibility:
  7443. dnl AC_DEFUN([LT_AC_PROG_RC], [])
  7444. # _LT_DECL_EGREP
  7445. # --------------
  7446. # If we don't have a new enough Autoconf to choose the best grep
  7447. # available, choose the one first in the user's PATH.
  7448. m4_defun([_LT_DECL_EGREP],
  7449. [AC_REQUIRE([AC_PROG_EGREP])dnl
  7450. AC_REQUIRE([AC_PROG_FGREP])dnl
  7451. test -z "$GREP" && GREP=grep
  7452. _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
  7453. _LT_DECL([], [EGREP], [1], [An ERE matcher])
  7454. _LT_DECL([], [FGREP], [1], [A literal string matcher])
  7455. dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
  7456. AC_SUBST([GREP])
  7457. ])
  7458. # _LT_DECL_OBJDUMP
  7459. # --------------
  7460. # If we don't have a new enough Autoconf to choose the best objdump
  7461. # available, choose the one first in the user's PATH.
  7462. m4_defun([_LT_DECL_OBJDUMP],
  7463. [AC_CHECK_TOOL(OBJDUMP, objdump, false)
  7464. test -z "$OBJDUMP" && OBJDUMP=objdump
  7465. _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
  7466. AC_SUBST([OBJDUMP])
  7467. ])
  7468. # _LT_DECL_DLLTOOL
  7469. # ----------------
  7470. # Ensure DLLTOOL variable is set.
  7471. m4_defun([_LT_DECL_DLLTOOL],
  7472. [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  7473. test -z "$DLLTOOL" && DLLTOOL=dlltool
  7474. _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
  7475. AC_SUBST([DLLTOOL])
  7476. ])
  7477. # _LT_DECL_FILECMD
  7478. # ----------------
  7479. # Check for a file(cmd) program that can be used to detect file type and magic
  7480. m4_defun([_LT_DECL_FILECMD],
  7481. [AC_CHECK_TOOL([FILECMD], [file], [:])
  7482. _LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types])
  7483. ])# _LD_DECL_FILECMD
  7484. # _LT_DECL_SED
  7485. # ------------
  7486. # Check for a fully-functional sed program, that truncates
  7487. # as few characters as possible. Prefer GNU sed if found.
  7488. m4_defun([_LT_DECL_SED],
  7489. [AC_PROG_SED
  7490. test -z "$SED" && SED=sed
  7491. Xsed="$SED -e 1s/^X//"
  7492. _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
  7493. _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
  7494. [Sed that helps us avoid accidentally triggering echo(1) options like -n])
  7495. ])# _LT_DECL_SED
  7496. m4_ifndef([AC_PROG_SED], [
  7497. # NOTE: This macro has been submitted for inclusion into #
  7498. # GNU Autoconf as AC_PROG_SED. When it is available in #
  7499. # a released version of Autoconf we should remove this #
  7500. # macro and use it instead. #
  7501. m4_defun([AC_PROG_SED],
  7502. [AC_MSG_CHECKING([for a sed that does not truncate output])
  7503. AC_CACHE_VAL(lt_cv_path_SED,
  7504. [# Loop through the user's path and test for sed and gsed.
  7505. # Then use that list of sed's as ones to test for truncation.
  7506. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  7507. for as_dir in $PATH
  7508. do
  7509. IFS=$as_save_IFS
  7510. test -z "$as_dir" && as_dir=.
  7511. for lt_ac_prog in sed gsed; do
  7512. for ac_exec_ext in '' $ac_executable_extensions; do
  7513. if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
  7514. lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
  7515. fi
  7516. done
  7517. done
  7518. done
  7519. IFS=$as_save_IFS
  7520. lt_ac_max=0
  7521. lt_ac_count=0
  7522. # Add /usr/xpg4/bin/sed as it is typically found on Solaris
  7523. # along with /bin/sed that truncates output.
  7524. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
  7525. test ! -f "$lt_ac_sed" && continue
  7526. cat /dev/null > conftest.in
  7527. lt_ac_count=0
  7528. echo $ECHO_N "0123456789$ECHO_C" >conftest.in
  7529. # Check for GNU sed and select it if it is found.
  7530. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
  7531. lt_cv_path_SED=$lt_ac_sed
  7532. break
  7533. fi
  7534. while true; do
  7535. cat conftest.in conftest.in >conftest.tmp
  7536. mv conftest.tmp conftest.in
  7537. cp conftest.in conftest.nl
  7538. echo >>conftest.nl
  7539. $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
  7540. cmp -s conftest.out conftest.nl || break
  7541. # 10000 chars as input seems more than enough
  7542. test 10 -lt "$lt_ac_count" && break
  7543. lt_ac_count=`expr $lt_ac_count + 1`
  7544. if test "$lt_ac_count" -gt "$lt_ac_max"; then
  7545. lt_ac_max=$lt_ac_count
  7546. lt_cv_path_SED=$lt_ac_sed
  7547. fi
  7548. done
  7549. done
  7550. ])
  7551. SED=$lt_cv_path_SED
  7552. AC_SUBST([SED])
  7553. AC_MSG_RESULT([$SED])
  7554. ])#AC_PROG_SED
  7555. ])#m4_ifndef
  7556. # Old name:
  7557. AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
  7558. dnl aclocal-1.4 backwards compatibility:
  7559. dnl AC_DEFUN([LT_AC_PROG_SED], [])
  7560. # _LT_CHECK_SHELL_FEATURES
  7561. # ------------------------
  7562. # Find out whether the shell is Bourne or XSI compatible,
  7563. # or has some other useful features.
  7564. m4_defun([_LT_CHECK_SHELL_FEATURES],
  7565. [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
  7566. lt_unset=unset
  7567. else
  7568. lt_unset=false
  7569. fi
  7570. _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
  7571. # test EBCDIC or ASCII
  7572. case `echo X|tr X '\101'` in
  7573. A) # ASCII based system
  7574. # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
  7575. lt_SP2NL='tr \040 \012'
  7576. lt_NL2SP='tr \015\012 \040\040'
  7577. ;;
  7578. *) # EBCDIC based system
  7579. lt_SP2NL='tr \100 \n'
  7580. lt_NL2SP='tr \r\n \100\100'
  7581. ;;
  7582. esac
  7583. _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
  7584. _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
  7585. ])# _LT_CHECK_SHELL_FEATURES
  7586. # _LT_PATH_CONVERSION_FUNCTIONS
  7587. # -----------------------------
  7588. # Determine what file name conversion functions should be used by
  7589. # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
  7590. # for certain cross-compile configurations and native mingw.
  7591. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
  7592. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  7593. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  7594. AC_MSG_CHECKING([how to convert $build file names to $host format])
  7595. AC_CACHE_VAL(lt_cv_to_host_file_cmd,
  7596. [case $host in
  7597. *-*-mingw* )
  7598. case $build in
  7599. *-*-mingw* ) # actually msys
  7600. lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
  7601. ;;
  7602. *-*-cygwin* )
  7603. lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
  7604. ;;
  7605. * ) # otherwise, assume *nix
  7606. lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
  7607. ;;
  7608. esac
  7609. ;;
  7610. *-*-cygwin* )
  7611. case $build in
  7612. *-*-mingw* ) # actually msys
  7613. lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
  7614. ;;
  7615. *-*-cygwin* )
  7616. lt_cv_to_host_file_cmd=func_convert_file_noop
  7617. ;;
  7618. * ) # otherwise, assume *nix
  7619. lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
  7620. ;;
  7621. esac
  7622. ;;
  7623. * ) # unhandled hosts (and "normal" native builds)
  7624. lt_cv_to_host_file_cmd=func_convert_file_noop
  7625. ;;
  7626. esac
  7627. ])
  7628. to_host_file_cmd=$lt_cv_to_host_file_cmd
  7629. AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
  7630. _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
  7631. [0], [convert $build file names to $host format])dnl
  7632. AC_MSG_CHECKING([how to convert $build file names to toolchain format])
  7633. AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
  7634. [#assume ordinary cross tools, or native build.
  7635. lt_cv_to_tool_file_cmd=func_convert_file_noop
  7636. case $host in
  7637. *-*-mingw* )
  7638. case $build in
  7639. *-*-mingw* ) # actually msys
  7640. lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
  7641. ;;
  7642. esac
  7643. ;;
  7644. esac
  7645. ])
  7646. to_tool_file_cmd=$lt_cv_to_tool_file_cmd
  7647. AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
  7648. _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
  7649. [0], [convert $build files to toolchain format])dnl
  7650. ])# _LT_PATH_CONVERSION_FUNCTIONS
  7651. # Helper functions for option handling. -*- Autoconf -*-
  7652. #
  7653. # Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free
  7654. # Software Foundation, Inc.
  7655. # Written by Gary V. Vaughan, 2004
  7656. #
  7657. # This file is free software; the Free Software Foundation gives
  7658. # unlimited permission to copy and/or distribute it, with or without
  7659. # modifications, as long as this notice is preserved.
  7660. # serial 8 ltoptions.m4
  7661. # This is to help aclocal find these macros, as it can't see m4_define.
  7662. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
  7663. # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
  7664. # ------------------------------------------
  7665. m4_define([_LT_MANGLE_OPTION],
  7666. [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
  7667. # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
  7668. # ---------------------------------------
  7669. # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
  7670. # matching handler defined, dispatch to it. Other OPTION-NAMEs are
  7671. # saved as a flag.
  7672. m4_define([_LT_SET_OPTION],
  7673. [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
  7674. m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
  7675. _LT_MANGLE_DEFUN([$1], [$2]),
  7676. [m4_warning([Unknown $1 option '$2'])])[]dnl
  7677. ])
  7678. # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
  7679. # ------------------------------------------------------------
  7680. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  7681. m4_define([_LT_IF_OPTION],
  7682. [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
  7683. # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
  7684. # -------------------------------------------------------
  7685. # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
  7686. # are set.
  7687. m4_define([_LT_UNLESS_OPTIONS],
  7688. [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
  7689. [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
  7690. [m4_define([$0_found])])])[]dnl
  7691. m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
  7692. ])[]dnl
  7693. ])
  7694. # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
  7695. # ----------------------------------------
  7696. # OPTION-LIST is a space-separated list of Libtool options associated
  7697. # with MACRO-NAME. If any OPTION has a matching handler declared with
  7698. # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
  7699. # the unknown option and exit.
  7700. m4_defun([_LT_SET_OPTIONS],
  7701. [# Set options
  7702. m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
  7703. [_LT_SET_OPTION([$1], _LT_Option)])
  7704. m4_if([$1],[LT_INIT],[
  7705. dnl
  7706. dnl Simply set some default values (i.e off) if boolean options were not
  7707. dnl specified:
  7708. _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
  7709. ])
  7710. _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
  7711. ])
  7712. dnl
  7713. dnl If no reference was made to various pairs of opposing options, then
  7714. dnl we run the default mode handler for the pair. For example, if neither
  7715. dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
  7716. dnl archives by default:
  7717. _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
  7718. _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
  7719. _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
  7720. _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
  7721. [_LT_ENABLE_FAST_INSTALL])
  7722. _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
  7723. [_LT_WITH_AIX_SONAME([aix])])
  7724. ])
  7725. ])# _LT_SET_OPTIONS
  7726. # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
  7727. # -----------------------------------------
  7728. m4_define([_LT_MANGLE_DEFUN],
  7729. [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
  7730. # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
  7731. # -----------------------------------------------
  7732. m4_define([LT_OPTION_DEFINE],
  7733. [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
  7734. ])# LT_OPTION_DEFINE
  7735. # dlopen
  7736. # ------
  7737. LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
  7738. ])
  7739. AU_DEFUN([AC_LIBTOOL_DLOPEN],
  7740. [_LT_SET_OPTION([LT_INIT], [dlopen])
  7741. AC_DIAGNOSE([obsolete],
  7742. [$0: Remove this warning and the call to _LT_SET_OPTION when you
  7743. put the 'dlopen' option into LT_INIT's first parameter.])
  7744. ])
  7745. dnl aclocal-1.4 backwards compatibility:
  7746. dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
  7747. # win32-dll
  7748. # ---------
  7749. # Declare package support for building win32 dll's.
  7750. LT_OPTION_DEFINE([LT_INIT], [win32-dll],
  7751. [enable_win32_dll=yes
  7752. case $host in
  7753. *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
  7754. AC_CHECK_TOOL(AS, as, false)
  7755. AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  7756. AC_CHECK_TOOL(OBJDUMP, objdump, false)
  7757. ;;
  7758. esac
  7759. test -z "$AS" && AS=as
  7760. _LT_DECL([], [AS], [1], [Assembler program])dnl
  7761. test -z "$DLLTOOL" && DLLTOOL=dlltool
  7762. _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
  7763. test -z "$OBJDUMP" && OBJDUMP=objdump
  7764. _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
  7765. ])# win32-dll
  7766. AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
  7767. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  7768. _LT_SET_OPTION([LT_INIT], [win32-dll])
  7769. AC_DIAGNOSE([obsolete],
  7770. [$0: Remove this warning and the call to _LT_SET_OPTION when you
  7771. put the 'win32-dll' option into LT_INIT's first parameter.])
  7772. ])
  7773. dnl aclocal-1.4 backwards compatibility:
  7774. dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
  7775. # _LT_ENABLE_SHARED([DEFAULT])
  7776. # ----------------------------
  7777. # implement the --enable-shared flag, and supports the 'shared' and
  7778. # 'disable-shared' LT_INIT options.
  7779. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
  7780. m4_define([_LT_ENABLE_SHARED],
  7781. [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
  7782. AC_ARG_ENABLE([shared],
  7783. [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
  7784. [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
  7785. [p=${PACKAGE-default}
  7786. case $enableval in
  7787. yes) enable_shared=yes ;;
  7788. no) enable_shared=no ;;
  7789. *)
  7790. enable_shared=no
  7791. # Look at the argument we got. We use all the common list separators.
  7792. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
  7793. for pkg in $enableval; do
  7794. IFS=$lt_save_ifs
  7795. if test "X$pkg" = "X$p"; then
  7796. enable_shared=yes
  7797. fi
  7798. done
  7799. IFS=$lt_save_ifs
  7800. ;;
  7801. esac],
  7802. [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
  7803. _LT_DECL([build_libtool_libs], [enable_shared], [0],
  7804. [Whether or not to build shared libraries])
  7805. ])# _LT_ENABLE_SHARED
  7806. LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
  7807. LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
  7808. # Old names:
  7809. AC_DEFUN([AC_ENABLE_SHARED],
  7810. [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
  7811. ])
  7812. AC_DEFUN([AC_DISABLE_SHARED],
  7813. [_LT_SET_OPTION([LT_INIT], [disable-shared])
  7814. ])
  7815. AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
  7816. AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
  7817. dnl aclocal-1.4 backwards compatibility:
  7818. dnl AC_DEFUN([AM_ENABLE_SHARED], [])
  7819. dnl AC_DEFUN([AM_DISABLE_SHARED], [])
  7820. # _LT_ENABLE_STATIC([DEFAULT])
  7821. # ----------------------------
  7822. # implement the --enable-static flag, and support the 'static' and
  7823. # 'disable-static' LT_INIT options.
  7824. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
  7825. m4_define([_LT_ENABLE_STATIC],
  7826. [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
  7827. AC_ARG_ENABLE([static],
  7828. [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
  7829. [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
  7830. [p=${PACKAGE-default}
  7831. case $enableval in
  7832. yes) enable_static=yes ;;
  7833. no) enable_static=no ;;
  7834. *)
  7835. enable_static=no
  7836. # Look at the argument we got. We use all the common list separators.
  7837. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
  7838. for pkg in $enableval; do
  7839. IFS=$lt_save_ifs
  7840. if test "X$pkg" = "X$p"; then
  7841. enable_static=yes
  7842. fi
  7843. done
  7844. IFS=$lt_save_ifs
  7845. ;;
  7846. esac],
  7847. [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
  7848. _LT_DECL([build_old_libs], [enable_static], [0],
  7849. [Whether or not to build static libraries])
  7850. ])# _LT_ENABLE_STATIC
  7851. LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
  7852. LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
  7853. # Old names:
  7854. AC_DEFUN([AC_ENABLE_STATIC],
  7855. [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
  7856. ])
  7857. AC_DEFUN([AC_DISABLE_STATIC],
  7858. [_LT_SET_OPTION([LT_INIT], [disable-static])
  7859. ])
  7860. AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
  7861. AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
  7862. dnl aclocal-1.4 backwards compatibility:
  7863. dnl AC_DEFUN([AM_ENABLE_STATIC], [])
  7864. dnl AC_DEFUN([AM_DISABLE_STATIC], [])
  7865. # _LT_ENABLE_FAST_INSTALL([DEFAULT])
  7866. # ----------------------------------
  7867. # implement the --enable-fast-install flag, and support the 'fast-install'
  7868. # and 'disable-fast-install' LT_INIT options.
  7869. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
  7870. m4_define([_LT_ENABLE_FAST_INSTALL],
  7871. [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
  7872. AC_ARG_ENABLE([fast-install],
  7873. [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
  7874. [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
  7875. [p=${PACKAGE-default}
  7876. case $enableval in
  7877. yes) enable_fast_install=yes ;;
  7878. no) enable_fast_install=no ;;
  7879. *)
  7880. enable_fast_install=no
  7881. # Look at the argument we got. We use all the common list separators.
  7882. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
  7883. for pkg in $enableval; do
  7884. IFS=$lt_save_ifs
  7885. if test "X$pkg" = "X$p"; then
  7886. enable_fast_install=yes
  7887. fi
  7888. done
  7889. IFS=$lt_save_ifs
  7890. ;;
  7891. esac],
  7892. [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
  7893. _LT_DECL([fast_install], [enable_fast_install], [0],
  7894. [Whether or not to optimize for fast installation])dnl
  7895. ])# _LT_ENABLE_FAST_INSTALL
  7896. LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
  7897. LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
  7898. # Old names:
  7899. AU_DEFUN([AC_ENABLE_FAST_INSTALL],
  7900. [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
  7901. AC_DIAGNOSE([obsolete],
  7902. [$0: Remove this warning and the call to _LT_SET_OPTION when you put
  7903. the 'fast-install' option into LT_INIT's first parameter.])
  7904. ])
  7905. AU_DEFUN([AC_DISABLE_FAST_INSTALL],
  7906. [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
  7907. AC_DIAGNOSE([obsolete],
  7908. [$0: Remove this warning and the call to _LT_SET_OPTION when you put
  7909. the 'disable-fast-install' option into LT_INIT's first parameter.])
  7910. ])
  7911. dnl aclocal-1.4 backwards compatibility:
  7912. dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
  7913. dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
  7914. # _LT_WITH_AIX_SONAME([DEFAULT])
  7915. # ----------------------------------
  7916. # implement the --with-aix-soname flag, and support the `aix-soname=aix'
  7917. # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
  7918. # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
  7919. m4_define([_LT_WITH_AIX_SONAME],
  7920. [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
  7921. shared_archive_member_spec=
  7922. case $host,$enable_shared in
  7923. power*-*-aix[[5-9]]*,yes)
  7924. AC_MSG_CHECKING([which variant of shared library versioning to provide])
  7925. AC_ARG_WITH([aix-soname],
  7926. [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
  7927. [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
  7928. [case $withval in
  7929. aix|svr4|both)
  7930. ;;
  7931. *)
  7932. AC_MSG_ERROR([Unknown argument to --with-aix-soname])
  7933. ;;
  7934. esac
  7935. lt_cv_with_aix_soname=$with_aix_soname],
  7936. [AC_CACHE_VAL([lt_cv_with_aix_soname],
  7937. [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
  7938. with_aix_soname=$lt_cv_with_aix_soname])
  7939. AC_MSG_RESULT([$with_aix_soname])
  7940. if test aix != "$with_aix_soname"; then
  7941. # For the AIX way of multilib, we name the shared archive member
  7942. # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
  7943. # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
  7944. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
  7945. # the AIX toolchain works better with OBJECT_MODE set (default 32).
  7946. if test 64 = "${OBJECT_MODE-32}"; then
  7947. shared_archive_member_spec=shr_64
  7948. else
  7949. shared_archive_member_spec=shr
  7950. fi
  7951. fi
  7952. ;;
  7953. *)
  7954. with_aix_soname=aix
  7955. ;;
  7956. esac
  7957. _LT_DECL([], [shared_archive_member_spec], [0],
  7958. [Shared archive member basename, for filename based shared library versioning on AIX])dnl
  7959. ])# _LT_WITH_AIX_SONAME
  7960. LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
  7961. LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
  7962. LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
  7963. # _LT_WITH_PIC([MODE])
  7964. # --------------------
  7965. # implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
  7966. # LT_INIT options.
  7967. # MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
  7968. m4_define([_LT_WITH_PIC],
  7969. [AC_ARG_WITH([pic],
  7970. [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
  7971. [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
  7972. [lt_p=${PACKAGE-default}
  7973. case $withval in
  7974. yes|no) pic_mode=$withval ;;
  7975. *)
  7976. pic_mode=default
  7977. # Look at the argument we got. We use all the common list separators.
  7978. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
  7979. for lt_pkg in $withval; do
  7980. IFS=$lt_save_ifs
  7981. if test "X$lt_pkg" = "X$lt_p"; then
  7982. pic_mode=yes
  7983. fi
  7984. done
  7985. IFS=$lt_save_ifs
  7986. ;;
  7987. esac],
  7988. [pic_mode=m4_default([$1], [default])])
  7989. _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
  7990. ])# _LT_WITH_PIC
  7991. LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
  7992. LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
  7993. # Old name:
  7994. AU_DEFUN([AC_LIBTOOL_PICMODE],
  7995. [_LT_SET_OPTION([LT_INIT], [pic-only])
  7996. AC_DIAGNOSE([obsolete],
  7997. [$0: Remove this warning and the call to _LT_SET_OPTION when you
  7998. put the 'pic-only' option into LT_INIT's first parameter.])
  7999. ])
  8000. dnl aclocal-1.4 backwards compatibility:
  8001. dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
  8002. m4_define([_LTDL_MODE], [])
  8003. LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
  8004. [m4_define([_LTDL_MODE], [nonrecursive])])
  8005. LT_OPTION_DEFINE([LTDL_INIT], [recursive],
  8006. [m4_define([_LTDL_MODE], [recursive])])
  8007. LT_OPTION_DEFINE([LTDL_INIT], [subproject],
  8008. [m4_define([_LTDL_MODE], [subproject])])
  8009. m4_define([_LTDL_TYPE], [])
  8010. LT_OPTION_DEFINE([LTDL_INIT], [installable],
  8011. [m4_define([_LTDL_TYPE], [installable])])
  8012. LT_OPTION_DEFINE([LTDL_INIT], [convenience],
  8013. [m4_define([_LTDL_TYPE], [convenience])])
  8014. # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
  8015. #
  8016. # Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software
  8017. # Foundation, Inc.
  8018. # Written by Gary V. Vaughan, 2004
  8019. #
  8020. # This file is free software; the Free Software Foundation gives
  8021. # unlimited permission to copy and/or distribute it, with or without
  8022. # modifications, as long as this notice is preserved.
  8023. # serial 6 ltsugar.m4
  8024. # This is to help aclocal find these macros, as it can't see m4_define.
  8025. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
  8026. # lt_join(SEP, ARG1, [ARG2...])
  8027. # -----------------------------
  8028. # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
  8029. # associated separator.
  8030. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
  8031. # versions in m4sugar had bugs.
  8032. m4_define([lt_join],
  8033. [m4_if([$#], [1], [],
  8034. [$#], [2], [[$2]],
  8035. [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
  8036. m4_define([_lt_join],
  8037. [m4_if([$#$2], [2], [],
  8038. [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
  8039. # lt_car(LIST)
  8040. # lt_cdr(LIST)
  8041. # ------------
  8042. # Manipulate m4 lists.
  8043. # These macros are necessary as long as will still need to support
  8044. # Autoconf-2.59, which quotes differently.
  8045. m4_define([lt_car], [[$1]])
  8046. m4_define([lt_cdr],
  8047. [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
  8048. [$#], 1, [],
  8049. [m4_dquote(m4_shift($@))])])
  8050. m4_define([lt_unquote], $1)
  8051. # lt_append(MACRO-NAME, STRING, [SEPARATOR])
  8052. # ------------------------------------------
  8053. # Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
  8054. # Note that neither SEPARATOR nor STRING are expanded; they are appended
  8055. # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
  8056. # No SEPARATOR is output if MACRO-NAME was previously undefined (different
  8057. # than defined and empty).
  8058. #
  8059. # This macro is needed until we can rely on Autoconf 2.62, since earlier
  8060. # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
  8061. m4_define([lt_append],
  8062. [m4_define([$1],
  8063. m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
  8064. # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
  8065. # ----------------------------------------------------------
  8066. # Produce a SEP delimited list of all paired combinations of elements of
  8067. # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
  8068. # has the form PREFIXmINFIXSUFFIXn.
  8069. # Needed until we can rely on m4_combine added in Autoconf 2.62.
  8070. m4_define([lt_combine],
  8071. [m4_if(m4_eval([$# > 3]), [1],
  8072. [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
  8073. [[m4_foreach([_Lt_prefix], [$2],
  8074. [m4_foreach([_Lt_suffix],
  8075. ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
  8076. [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
  8077. # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
  8078. # -----------------------------------------------------------------------
  8079. # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
  8080. # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
  8081. m4_define([lt_if_append_uniq],
  8082. [m4_ifdef([$1],
  8083. [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
  8084. [lt_append([$1], [$2], [$3])$4],
  8085. [$5])],
  8086. [lt_append([$1], [$2], [$3])$4])])
  8087. # lt_dict_add(DICT, KEY, VALUE)
  8088. # -----------------------------
  8089. m4_define([lt_dict_add],
  8090. [m4_define([$1($2)], [$3])])
  8091. # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
  8092. # --------------------------------------------
  8093. m4_define([lt_dict_add_subkey],
  8094. [m4_define([$1($2:$3)], [$4])])
  8095. # lt_dict_fetch(DICT, KEY, [SUBKEY])
  8096. # ----------------------------------
  8097. m4_define([lt_dict_fetch],
  8098. [m4_ifval([$3],
  8099. m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
  8100. m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
  8101. # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
  8102. # -----------------------------------------------------------------
  8103. m4_define([lt_if_dict_fetch],
  8104. [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
  8105. [$5],
  8106. [$6])])
  8107. # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
  8108. # --------------------------------------------------------------
  8109. m4_define([lt_dict_filter],
  8110. [m4_if([$5], [], [],
  8111. [lt_join(m4_quote(m4_default([$4], [[, ]])),
  8112. lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
  8113. [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
  8114. ])
  8115. # ltversion.m4 -- version numbers -*- Autoconf -*-
  8116. #
  8117. # Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation,
  8118. # Inc.
  8119. # Written by Scott James Remnant, 2004
  8120. #
  8121. # This file is free software; the Free Software Foundation gives
  8122. # unlimited permission to copy and/or distribute it, with or without
  8123. # modifications, as long as this notice is preserved.
  8124. # @configure_input@
  8125. # serial 4245 ltversion.m4
  8126. # This file is part of GNU Libtool
  8127. m4_define([LT_PACKAGE_VERSION], [2.4.7])
  8128. m4_define([LT_PACKAGE_REVISION], [2.4.7])
  8129. AC_DEFUN([LTVERSION_VERSION],
  8130. [macro_version='2.4.7'
  8131. macro_revision='2.4.7'
  8132. _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
  8133. _LT_DECL(, macro_revision, 0)
  8134. ])
  8135. # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
  8136. #
  8137. # Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free
  8138. # Software Foundation, Inc.
  8139. # Written by Scott James Remnant, 2004.
  8140. #
  8141. # This file is free software; the Free Software Foundation gives
  8142. # unlimited permission to copy and/or distribute it, with or without
  8143. # modifications, as long as this notice is preserved.
  8144. # serial 5 lt~obsolete.m4
  8145. # These exist entirely to fool aclocal when bootstrapping libtool.
  8146. #
  8147. # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
  8148. # which have later been changed to m4_define as they aren't part of the
  8149. # exported API, or moved to Autoconf or Automake where they belong.
  8150. #
  8151. # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
  8152. # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
  8153. # using a macro with the same name in our local m4/libtool.m4 it'll
  8154. # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
  8155. # and doesn't know about Autoconf macros at all.)
  8156. #
  8157. # So we provide this file, which has a silly filename so it's always
  8158. # included after everything else. This provides aclocal with the
  8159. # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
  8160. # because those macros already exist, or will be overwritten later.
  8161. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
  8162. #
  8163. # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
  8164. # Yes, that means every name once taken will need to remain here until
  8165. # we give up compatibility with versions before 1.7, at which point
  8166. # we need to keep only those names which we still refer to.
  8167. # This is to help aclocal find these macros, as it can't see m4_define.
  8168. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
  8169. m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
  8170. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
  8171. m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
  8172. m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
  8173. m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
  8174. m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
  8175. m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
  8176. m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
  8177. m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
  8178. m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
  8179. m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
  8180. m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
  8181. m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
  8182. m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
  8183. m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
  8184. m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
  8185. m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
  8186. m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
  8187. m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
  8188. m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
  8189. m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
  8190. m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
  8191. m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
  8192. m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
  8193. m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
  8194. m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
  8195. m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
  8196. m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
  8197. m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
  8198. m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
  8199. m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
  8200. m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
  8201. m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
  8202. m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
  8203. m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
  8204. m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
  8205. m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
  8206. m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
  8207. m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
  8208. m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
  8209. m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
  8210. m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
  8211. m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
  8212. m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
  8213. m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
  8214. m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
  8215. m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
  8216. m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
  8217. m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
  8218. m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
  8219. m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
  8220. m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
  8221. m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
  8222. m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
  8223. m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
  8224. m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
  8225. m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
  8226. m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
  8227. m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
  8228. m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
  8229. m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
  8230. # pkg.m4 - Macros to locate and use pkg-config. -*- Autoconf -*-
  8231. # serial 12 (pkg-config-0.29.2)
  8232. dnl Copyright © 2004 Scott James Remnant <[email protected]>.
  8233. dnl Copyright © 2012-2015 Dan Nicholson <[email protected]>
  8234. dnl
  8235. dnl This program is free software; you can redistribute it and/or modify
  8236. dnl it under the terms of the GNU General Public License as published by
  8237. dnl the Free Software Foundation; either version 2 of the License, or
  8238. dnl (at your option) any later version.
  8239. dnl
  8240. dnl This program is distributed in the hope that it will be useful, but
  8241. dnl WITHOUT ANY WARRANTY; without even the implied warranty of
  8242. dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  8243. dnl General Public License for more details.
  8244. dnl
  8245. dnl You should have received a copy of the GNU General Public License
  8246. dnl along with this program; if not, write to the Free Software
  8247. dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  8248. dnl 02111-1307, USA.
  8249. dnl
  8250. dnl As a special exception to the GNU General Public License, if you
  8251. dnl distribute this file as part of a program that contains a
  8252. dnl configuration script generated by Autoconf, you may include it under
  8253. dnl the same distribution terms that you use for the rest of that
  8254. dnl program.
  8255. dnl PKG_PREREQ(MIN-VERSION)
  8256. dnl -----------------------
  8257. dnl Since: 0.29
  8258. dnl
  8259. dnl Verify that the version of the pkg-config macros are at least
  8260. dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
  8261. dnl installed version of pkg-config, this checks the developer's version
  8262. dnl of pkg.m4 when generating configure.
  8263. dnl
  8264. dnl To ensure that this macro is defined, also add:
  8265. dnl m4_ifndef([PKG_PREREQ],
  8266. dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
  8267. dnl
  8268. dnl See the "Since" comment for each macro you use to see what version
  8269. dnl of the macros you require.
  8270. m4_defun([PKG_PREREQ],
  8271. [m4_define([PKG_MACROS_VERSION], [0.29.2])
  8272. m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
  8273. [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
  8274. ])dnl PKG_PREREQ
  8275. dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
  8276. dnl ----------------------------------
  8277. dnl Since: 0.16
  8278. dnl
  8279. dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
  8280. dnl first found in the path. Checks that the version of pkg-config found
  8281. dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
  8282. dnl used since that's the first version where most current features of
  8283. dnl pkg-config existed.
  8284. AC_DEFUN([PKG_PROG_PKG_CONFIG],
  8285. [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
  8286. m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
  8287. m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
  8288. AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
  8289. AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
  8290. AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
  8291. if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
  8292. AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
  8293. fi
  8294. if test -n "$PKG_CONFIG"; then
  8295. _pkg_min_version=m4_default([$1], [0.9.0])
  8296. AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
  8297. if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
  8298. AC_MSG_RESULT([yes])
  8299. else
  8300. AC_MSG_RESULT([no])
  8301. PKG_CONFIG=""
  8302. fi
  8303. fi[]dnl
  8304. ])dnl PKG_PROG_PKG_CONFIG
  8305. dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
  8306. dnl -------------------------------------------------------------------
  8307. dnl Since: 0.18
  8308. dnl
  8309. dnl Check to see whether a particular set of modules exists. Similar to
  8310. dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
  8311. dnl
  8312. dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
  8313. dnl only at the first occurrence in configure.ac, so if the first place
  8314. dnl it's called might be skipped (such as if it is within an "if", you
  8315. dnl have to call PKG_CHECK_EXISTS manually
  8316. AC_DEFUN([PKG_CHECK_EXISTS],
  8317. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  8318. if test -n "$PKG_CONFIG" && \
  8319. AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
  8320. m4_default([$2], [:])
  8321. m4_ifvaln([$3], [else
  8322. $3])dnl
  8323. fi])
  8324. dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
  8325. dnl ---------------------------------------------
  8326. dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
  8327. dnl pkg_failed based on the result.
  8328. m4_define([_PKG_CONFIG],
  8329. [if test -n "$$1"; then
  8330. pkg_cv_[]$1="$$1"
  8331. elif test -n "$PKG_CONFIG"; then
  8332. PKG_CHECK_EXISTS([$3],
  8333. [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
  8334. test "x$?" != "x0" && pkg_failed=yes ],
  8335. [pkg_failed=yes])
  8336. else
  8337. pkg_failed=untried
  8338. fi[]dnl
  8339. ])dnl _PKG_CONFIG
  8340. dnl _PKG_SHORT_ERRORS_SUPPORTED
  8341. dnl ---------------------------
  8342. dnl Internal check to see if pkg-config supports short errors.
  8343. AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
  8344. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
  8345. if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  8346. _pkg_short_errors_supported=yes
  8347. else
  8348. _pkg_short_errors_supported=no
  8349. fi[]dnl
  8350. ])dnl _PKG_SHORT_ERRORS_SUPPORTED
  8351. dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
  8352. dnl [ACTION-IF-NOT-FOUND])
  8353. dnl --------------------------------------------------------------
  8354. dnl Since: 0.4.0
  8355. dnl
  8356. dnl Note that if there is a possibility the first call to
  8357. dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
  8358. dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
  8359. AC_DEFUN([PKG_CHECK_MODULES],
  8360. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  8361. AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
  8362. AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
  8363. pkg_failed=no
  8364. AC_MSG_CHECKING([for $2])
  8365. _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
  8366. _PKG_CONFIG([$1][_LIBS], [libs], [$2])
  8367. m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
  8368. and $1[]_LIBS to avoid the need to call pkg-config.
  8369. See the pkg-config man page for more details.])
  8370. if test $pkg_failed = yes; then
  8371. AC_MSG_RESULT([no])
  8372. _PKG_SHORT_ERRORS_SUPPORTED
  8373. if test $_pkg_short_errors_supported = yes; then
  8374. $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
  8375. else
  8376. $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
  8377. fi
  8378. # Put the nasty error message in config.log where it belongs
  8379. echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
  8380. m4_default([$4], [AC_MSG_ERROR(
  8381. [Package requirements ($2) were not met:
  8382. $$1_PKG_ERRORS
  8383. Consider adjusting the PKG_CONFIG_PATH environment variable if you
  8384. installed software in a non-standard prefix.
  8385. _PKG_TEXT])[]dnl
  8386. ])
  8387. elif test $pkg_failed = untried; then
  8388. AC_MSG_RESULT([no])
  8389. m4_default([$4], [AC_MSG_FAILURE(
  8390. [The pkg-config script could not be found or is too old. Make sure it
  8391. is in your PATH or set the PKG_CONFIG environment variable to the full
  8392. path to pkg-config.
  8393. _PKG_TEXT
  8394. To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
  8395. ])
  8396. else
  8397. $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
  8398. $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
  8399. AC_MSG_RESULT([yes])
  8400. $3
  8401. fi[]dnl
  8402. ])dnl PKG_CHECK_MODULES
  8403. dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
  8404. dnl [ACTION-IF-NOT-FOUND])
  8405. dnl ---------------------------------------------------------------------
  8406. dnl Since: 0.29
  8407. dnl
  8408. dnl Checks for existence of MODULES and gathers its build flags with
  8409. dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
  8410. dnl and VARIABLE-PREFIX_LIBS from --libs.
  8411. dnl
  8412. dnl Note that if there is a possibility the first call to
  8413. dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
  8414. dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
  8415. dnl configure.ac.
  8416. AC_DEFUN([PKG_CHECK_MODULES_STATIC],
  8417. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  8418. _save_PKG_CONFIG=$PKG_CONFIG
  8419. PKG_CONFIG="$PKG_CONFIG --static"
  8420. PKG_CHECK_MODULES($@)
  8421. PKG_CONFIG=$_save_PKG_CONFIG[]dnl
  8422. ])dnl PKG_CHECK_MODULES_STATIC
  8423. dnl PKG_INSTALLDIR([DIRECTORY])
  8424. dnl -------------------------
  8425. dnl Since: 0.27
  8426. dnl
  8427. dnl Substitutes the variable pkgconfigdir as the location where a module
  8428. dnl should install pkg-config .pc files. By default the directory is
  8429. dnl $libdir/pkgconfig, but the default can be changed by passing
  8430. dnl DIRECTORY. The user can override through the --with-pkgconfigdir
  8431. dnl parameter.
  8432. AC_DEFUN([PKG_INSTALLDIR],
  8433. [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
  8434. m4_pushdef([pkg_description],
  8435. [pkg-config installation directory @<:@]pkg_default[@:>@])
  8436. AC_ARG_WITH([pkgconfigdir],
  8437. [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
  8438. [with_pkgconfigdir=]pkg_default)
  8439. AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
  8440. m4_popdef([pkg_default])
  8441. m4_popdef([pkg_description])
  8442. ])dnl PKG_INSTALLDIR
  8443. dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
  8444. dnl --------------------------------
  8445. dnl Since: 0.27
  8446. dnl
  8447. dnl Substitutes the variable noarch_pkgconfigdir as the location where a
  8448. dnl module should install arch-independent pkg-config .pc files. By
  8449. dnl default the directory is $datadir/pkgconfig, but the default can be
  8450. dnl changed by passing DIRECTORY. The user can override through the
  8451. dnl --with-noarch-pkgconfigdir parameter.
  8452. AC_DEFUN([PKG_NOARCH_INSTALLDIR],
  8453. [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
  8454. m4_pushdef([pkg_description],
  8455. [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
  8456. AC_ARG_WITH([noarch-pkgconfigdir],
  8457. [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
  8458. [with_noarch_pkgconfigdir=]pkg_default)
  8459. AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
  8460. m4_popdef([pkg_default])
  8461. m4_popdef([pkg_description])
  8462. ])dnl PKG_NOARCH_INSTALLDIR
  8463. dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
  8464. dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
  8465. dnl -------------------------------------------
  8466. dnl Since: 0.28
  8467. dnl
  8468. dnl Retrieves the value of the pkg-config variable for the given module.
  8469. AC_DEFUN([PKG_CHECK_VAR],
  8470. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  8471. AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
  8472. _PKG_CONFIG([$1], [variable="][$3]["], [$2])
  8473. AS_VAR_COPY([$1], [pkg_cv_][$1])
  8474. AS_VAR_IF([$1], [""], [$5], [$4])dnl
  8475. ])dnl PKG_CHECK_VAR
  8476. dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES,
  8477. dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND],
  8478. dnl [DESCRIPTION], [DEFAULT])
  8479. dnl ------------------------------------------
  8480. dnl
  8481. dnl Prepare a "--with-" configure option using the lowercase
  8482. dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and
  8483. dnl PKG_CHECK_MODULES in a single macro.
  8484. AC_DEFUN([PKG_WITH_MODULES],
  8485. [
  8486. m4_pushdef([with_arg], m4_tolower([$1]))
  8487. m4_pushdef([description],
  8488. [m4_default([$5], [build with ]with_arg[ support])])
  8489. m4_pushdef([def_arg], [m4_default([$6], [auto])])
  8490. m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes])
  8491. m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no])
  8492. m4_case(def_arg,
  8493. [yes],[m4_pushdef([with_without], [--without-]with_arg)],
  8494. [m4_pushdef([with_without],[--with-]with_arg)])
  8495. AC_ARG_WITH(with_arg,
  8496. AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),,
  8497. [AS_TR_SH([with_]with_arg)=def_arg])
  8498. AS_CASE([$AS_TR_SH([with_]with_arg)],
  8499. [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)],
  8500. [auto],[PKG_CHECK_MODULES([$1],[$2],
  8501. [m4_n([def_action_if_found]) $3],
  8502. [m4_n([def_action_if_not_found]) $4])])
  8503. m4_popdef([with_arg])
  8504. m4_popdef([description])
  8505. m4_popdef([def_arg])
  8506. ])dnl PKG_WITH_MODULES
  8507. dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
  8508. dnl [DESCRIPTION], [DEFAULT])
  8509. dnl -----------------------------------------------
  8510. dnl
  8511. dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES
  8512. dnl check._[VARIABLE-PREFIX] is exported as make variable.
  8513. AC_DEFUN([PKG_HAVE_WITH_MODULES],
  8514. [
  8515. PKG_WITH_MODULES([$1],[$2],,,[$3],[$4])
  8516. AM_CONDITIONAL([HAVE_][$1],
  8517. [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"])
  8518. ])dnl PKG_HAVE_WITH_MODULES
  8519. dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
  8520. dnl [DESCRIPTION], [DEFAULT])
  8521. dnl ------------------------------------------------------
  8522. dnl
  8523. dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after
  8524. dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make
  8525. dnl and preprocessor variable.
  8526. AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES],
  8527. [
  8528. PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4])
  8529. AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"],
  8530. [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])])
  8531. ])dnl PKG_HAVE_DEFINE_WITH_MODULES
  8532. # Copyright (C) 2002-2021 Free Software Foundation, Inc.
  8533. #
  8534. # This file is free software; the Free Software Foundation
  8535. # gives unlimited permission to copy and/or distribute it,
  8536. # with or without modifications, as long as this notice is preserved.
  8537. # AM_AUTOMAKE_VERSION(VERSION)
  8538. # ----------------------------
  8539. # Automake X.Y traces this macro to ensure aclocal.m4 has been
  8540. # generated from the m4 files accompanying Automake X.Y.
  8541. # (This private macro should not be called outside this file.)
  8542. AC_DEFUN([AM_AUTOMAKE_VERSION],
  8543. [am__api_version='1.16'
  8544. dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
  8545. dnl require some minimum version. Point them to the right macro.
  8546. m4_if([$1], [1.16.5], [],
  8547. [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
  8548. ])
  8549. # _AM_AUTOCONF_VERSION(VERSION)
  8550. # -----------------------------
  8551. # aclocal traces this macro to find the Autoconf version.
  8552. # This is a private macro too. Using m4_define simplifies
  8553. # the logic in aclocal, which can simply ignore this definition.
  8554. m4_define([_AM_AUTOCONF_VERSION], [])
  8555. # AM_SET_CURRENT_AUTOMAKE_VERSION
  8556. # -------------------------------
  8557. # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
  8558. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
  8559. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
  8560. [AM_AUTOMAKE_VERSION([1.16.5])dnl
  8561. m4_ifndef([AC_AUTOCONF_VERSION],
  8562. [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
  8563. _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
  8564. # AM_AUX_DIR_EXPAND -*- Autoconf -*-
  8565. # Copyright (C) 2001-2021 Free Software Foundation, Inc.
  8566. #
  8567. # This file is free software; the Free Software Foundation
  8568. # gives unlimited permission to copy and/or distribute it,
  8569. # with or without modifications, as long as this notice is preserved.
  8570. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
  8571. # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
  8572. # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
  8573. #
  8574. # Of course, Automake must honor this variable whenever it calls a
  8575. # tool from the auxiliary directory. The problem is that $srcdir (and
  8576. # therefore $ac_aux_dir as well) can be either absolute or relative,
  8577. # depending on how configure is run. This is pretty annoying, since
  8578. # it makes $ac_aux_dir quite unusable in subdirectories: in the top
  8579. # source directory, any form will work fine, but in subdirectories a
  8580. # relative path needs to be adjusted first.
  8581. #
  8582. # $ac_aux_dir/missing
  8583. # fails when called from a subdirectory if $ac_aux_dir is relative
  8584. # $top_srcdir/$ac_aux_dir/missing
  8585. # fails if $ac_aux_dir is absolute,
  8586. # fails when called from a subdirectory in a VPATH build with
  8587. # a relative $ac_aux_dir
  8588. #
  8589. # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
  8590. # are both prefixed by $srcdir. In an in-source build this is usually
  8591. # harmless because $srcdir is '.', but things will broke when you
  8592. # start a VPATH build or use an absolute $srcdir.
  8593. #
  8594. # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
  8595. # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
  8596. # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
  8597. # and then we would define $MISSING as
  8598. # MISSING="\${SHELL} $am_aux_dir/missing"
  8599. # This will work as long as MISSING is not called from configure, because
  8600. # unfortunately $(top_srcdir) has no meaning in configure.
  8601. # However there are other variables, like CC, which are often used in
  8602. # configure, and could therefore not use this "fixed" $ac_aux_dir.
  8603. #
  8604. # Another solution, used here, is to always expand $ac_aux_dir to an
  8605. # absolute PATH. The drawback is that using absolute paths prevent a
  8606. # configured tree to be moved without reconfiguration.
  8607. AC_DEFUN([AM_AUX_DIR_EXPAND],
  8608. [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  8609. # Expand $ac_aux_dir to an absolute path.
  8610. am_aux_dir=`cd "$ac_aux_dir" && pwd`
  8611. ])
  8612. # AM_CONDITIONAL -*- Autoconf -*-
  8613. # Copyright (C) 1997-2021 Free Software Foundation, Inc.
  8614. #
  8615. # This file is free software; the Free Software Foundation
  8616. # gives unlimited permission to copy and/or distribute it,
  8617. # with or without modifications, as long as this notice is preserved.
  8618. # AM_CONDITIONAL(NAME, SHELL-CONDITION)
  8619. # -------------------------------------
  8620. # Define a conditional.
  8621. AC_DEFUN([AM_CONDITIONAL],
  8622. [AC_PREREQ([2.52])dnl
  8623. m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
  8624. [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
  8625. AC_SUBST([$1_TRUE])dnl
  8626. AC_SUBST([$1_FALSE])dnl
  8627. _AM_SUBST_NOTMAKE([$1_TRUE])dnl
  8628. _AM_SUBST_NOTMAKE([$1_FALSE])dnl
  8629. m4_define([_AM_COND_VALUE_$1], [$2])dnl
  8630. if $2; then
  8631. $1_TRUE=
  8632. $1_FALSE='#'
  8633. else
  8634. $1_TRUE='#'
  8635. $1_FALSE=
  8636. fi
  8637. AC_CONFIG_COMMANDS_PRE(
  8638. [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
  8639. AC_MSG_ERROR([[conditional "$1" was never defined.
  8640. Usually this means the macro was only invoked conditionally.]])
  8641. fi])])
  8642. # Copyright (C) 1999-2021 Free Software Foundation, Inc.
  8643. #
  8644. # This file is free software; the Free Software Foundation
  8645. # gives unlimited permission to copy and/or distribute it,
  8646. # with or without modifications, as long as this notice is preserved.
  8647. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
  8648. # written in clear, in which case automake, when reading aclocal.m4,
  8649. # will think it sees a *use*, and therefore will trigger all it's
  8650. # C support machinery. Also note that it means that autoscan, seeing
  8651. # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
  8652. # _AM_DEPENDENCIES(NAME)
  8653. # ----------------------
  8654. # See how the compiler implements dependency checking.
  8655. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
  8656. # We try a few techniques and use that to set a single cache variable.
  8657. #
  8658. # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
  8659. # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
  8660. # dependency, and given that the user is not expected to run this macro,
  8661. # just rely on AC_PROG_CC.
  8662. AC_DEFUN([_AM_DEPENDENCIES],
  8663. [AC_REQUIRE([AM_SET_DEPDIR])dnl
  8664. AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
  8665. AC_REQUIRE([AM_MAKE_INCLUDE])dnl
  8666. AC_REQUIRE([AM_DEP_TRACK])dnl
  8667. m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
  8668. [$1], [CXX], [depcc="$CXX" am_compiler_list=],
  8669. [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
  8670. [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
  8671. [$1], [UPC], [depcc="$UPC" am_compiler_list=],
  8672. [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
  8673. [depcc="$$1" am_compiler_list=])
  8674. AC_CACHE_CHECK([dependency style of $depcc],
  8675. [am_cv_$1_dependencies_compiler_type],
  8676. [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  8677. # We make a subdir and do the tests there. Otherwise we can end up
  8678. # making bogus files that we don't know about and never remove. For
  8679. # instance it was reported that on HP-UX the gcc test will end up
  8680. # making a dummy file named 'D' -- because '-MD' means "put the output
  8681. # in D".
  8682. rm -rf conftest.dir
  8683. mkdir conftest.dir
  8684. # Copy depcomp to subdir because otherwise we won't find it if we're
  8685. # using a relative directory.
  8686. cp "$am_depcomp" conftest.dir
  8687. cd conftest.dir
  8688. # We will build objects and dependencies in a subdirectory because
  8689. # it helps to detect inapplicable dependency modes. For instance
  8690. # both Tru64's cc and ICC support -MD to output dependencies as a
  8691. # side effect of compilation, but ICC will put the dependencies in
  8692. # the current directory while Tru64 will put them in the object
  8693. # directory.
  8694. mkdir sub
  8695. am_cv_$1_dependencies_compiler_type=none
  8696. if test "$am_compiler_list" = ""; then
  8697. am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
  8698. fi
  8699. am__universal=false
  8700. m4_case([$1], [CC],
  8701. [case " $depcc " in #(
  8702. *\ -arch\ *\ -arch\ *) am__universal=true ;;
  8703. esac],
  8704. [CXX],
  8705. [case " $depcc " in #(
  8706. *\ -arch\ *\ -arch\ *) am__universal=true ;;
  8707. esac])
  8708. for depmode in $am_compiler_list; do
  8709. # Setup a source with many dependencies, because some compilers
  8710. # like to wrap large dependency lists on column 80 (with \), and
  8711. # we should not choose a depcomp mode which is confused by this.
  8712. #
  8713. # We need to recreate these files for each test, as the compiler may
  8714. # overwrite some of them when testing with obscure command lines.
  8715. # This happens at least with the AIX C compiler.
  8716. : > sub/conftest.c
  8717. for i in 1 2 3 4 5 6; do
  8718. echo '#include "conftst'$i'.h"' >> sub/conftest.c
  8719. # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
  8720. # Solaris 10 /bin/sh.
  8721. echo '/* dummy */' > sub/conftst$i.h
  8722. done
  8723. echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
  8724. # We check with '-c' and '-o' for the sake of the "dashmstdout"
  8725. # mode. It turns out that the SunPro C++ compiler does not properly
  8726. # handle '-M -o', and we need to detect this. Also, some Intel
  8727. # versions had trouble with output in subdirs.
  8728. am__obj=sub/conftest.${OBJEXT-o}
  8729. am__minus_obj="-o $am__obj"
  8730. case $depmode in
  8731. gcc)
  8732. # This depmode causes a compiler race in universal mode.
  8733. test "$am__universal" = false || continue
  8734. ;;
  8735. nosideeffect)
  8736. # After this tag, mechanisms are not by side-effect, so they'll
  8737. # only be used when explicitly requested.
  8738. if test "x$enable_dependency_tracking" = xyes; then
  8739. continue
  8740. else
  8741. break
  8742. fi
  8743. ;;
  8744. msvc7 | msvc7msys | msvisualcpp | msvcmsys)
  8745. # This compiler won't grok '-c -o', but also, the minuso test has
  8746. # not run yet. These depmodes are late enough in the game, and
  8747. # so weak that their functioning should not be impacted.
  8748. am__obj=conftest.${OBJEXT-o}
  8749. am__minus_obj=
  8750. ;;
  8751. none) break ;;
  8752. esac
  8753. if depmode=$depmode \
  8754. source=sub/conftest.c object=$am__obj \
  8755. depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
  8756. $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
  8757. >/dev/null 2>conftest.err &&
  8758. grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
  8759. grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
  8760. grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
  8761. ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
  8762. # icc doesn't choke on unknown options, it will just issue warnings
  8763. # or remarks (even with -Werror). So we grep stderr for any message
  8764. # that says an option was ignored or not supported.
  8765. # When given -MP, icc 7.0 and 7.1 complain thusly:
  8766. # icc: Command line warning: ignoring option '-M'; no argument required
  8767. # The diagnosis changed in icc 8.0:
  8768. # icc: Command line remark: option '-MP' not supported
  8769. if (grep 'ignoring option' conftest.err ||
  8770. grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
  8771. am_cv_$1_dependencies_compiler_type=$depmode
  8772. break
  8773. fi
  8774. fi
  8775. done
  8776. cd ..
  8777. rm -rf conftest.dir
  8778. else
  8779. am_cv_$1_dependencies_compiler_type=none
  8780. fi
  8781. ])
  8782. AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
  8783. AM_CONDITIONAL([am__fastdep$1], [
  8784. test "x$enable_dependency_tracking" != xno \
  8785. && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
  8786. ])
  8787. # AM_SET_DEPDIR
  8788. # -------------
  8789. # Choose a directory name for dependency files.
  8790. # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
  8791. AC_DEFUN([AM_SET_DEPDIR],
  8792. [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  8793. AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
  8794. ])
  8795. # AM_DEP_TRACK
  8796. # ------------
  8797. AC_DEFUN([AM_DEP_TRACK],
  8798. [AC_ARG_ENABLE([dependency-tracking], [dnl
  8799. AS_HELP_STRING(
  8800. [--enable-dependency-tracking],
  8801. [do not reject slow dependency extractors])
  8802. AS_HELP_STRING(
  8803. [--disable-dependency-tracking],
  8804. [speeds up one-time build])])
  8805. if test "x$enable_dependency_tracking" != xno; then
  8806. am_depcomp="$ac_aux_dir/depcomp"
  8807. AMDEPBACKSLASH='\'
  8808. am__nodep='_no'
  8809. fi
  8810. AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
  8811. AC_SUBST([AMDEPBACKSLASH])dnl
  8812. _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
  8813. AC_SUBST([am__nodep])dnl
  8814. _AM_SUBST_NOTMAKE([am__nodep])dnl
  8815. ])
  8816. # Generate code to set up dependency tracking. -*- Autoconf -*-
  8817. # Copyright (C) 1999-2021 Free Software Foundation, Inc.
  8818. #
  8819. # This file is free software; the Free Software Foundation
  8820. # gives unlimited permission to copy and/or distribute it,
  8821. # with or without modifications, as long as this notice is preserved.
  8822. # _AM_OUTPUT_DEPENDENCY_COMMANDS
  8823. # ------------------------------
  8824. AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
  8825. [{
  8826. # Older Autoconf quotes --file arguments for eval, but not when files
  8827. # are listed without --file. Let's play safe and only enable the eval
  8828. # if we detect the quoting.
  8829. # TODO: see whether this extra hack can be removed once we start
  8830. # requiring Autoconf 2.70 or later.
  8831. AS_CASE([$CONFIG_FILES],
  8832. [*\'*], [eval set x "$CONFIG_FILES"],
  8833. [*], [set x $CONFIG_FILES])
  8834. shift
  8835. # Used to flag and report bootstrapping failures.
  8836. am_rc=0
  8837. for am_mf
  8838. do
  8839. # Strip MF so we end up with the name of the file.
  8840. am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
  8841. # Check whether this is an Automake generated Makefile which includes
  8842. # dependency-tracking related rules and includes.
  8843. # Grep'ing the whole file directly is not great: AIX grep has a line
  8844. # limit of 2048, but all sed's we know have understand at least 4000.
  8845. sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
  8846. || continue
  8847. am_dirpart=`AS_DIRNAME(["$am_mf"])`
  8848. am_filepart=`AS_BASENAME(["$am_mf"])`
  8849. AM_RUN_LOG([cd "$am_dirpart" \
  8850. && sed -e '/# am--include-marker/d' "$am_filepart" \
  8851. | $MAKE -f - am--depfiles]) || am_rc=$?
  8852. done
  8853. if test $am_rc -ne 0; then
  8854. AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
  8855. for automatic dependency tracking. If GNU make was not used, consider
  8856. re-running the configure script with MAKE="gmake" (or whatever is
  8857. necessary). You can also try re-running configure with the
  8858. '--disable-dependency-tracking' option to at least be able to build
  8859. the package (albeit without support for automatic dependency tracking).])
  8860. fi
  8861. AS_UNSET([am_dirpart])
  8862. AS_UNSET([am_filepart])
  8863. AS_UNSET([am_mf])
  8864. AS_UNSET([am_rc])
  8865. rm -f conftest-deps.mk
  8866. }
  8867. ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
  8868. # AM_OUTPUT_DEPENDENCY_COMMANDS
  8869. # -----------------------------
  8870. # This macro should only be invoked once -- use via AC_REQUIRE.
  8871. #
  8872. # This code is only required when automatic dependency tracking is enabled.
  8873. # This creates each '.Po' and '.Plo' makefile fragment that we'll need in
  8874. # order to bootstrap the dependency handling code.
  8875. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
  8876. [AC_CONFIG_COMMANDS([depfiles],
  8877. [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
  8878. [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
  8879. # Do all the work for Automake. -*- Autoconf -*-
  8880. # Copyright (C) 1996-2021 Free Software Foundation, Inc.
  8881. #
  8882. # This file is free software; the Free Software Foundation
  8883. # gives unlimited permission to copy and/or distribute it,
  8884. # with or without modifications, as long as this notice is preserved.
  8885. # This macro actually does too much. Some checks are only needed if
  8886. # your package does certain things. But this isn't really a big deal.
  8887. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
  8888. m4_define([AC_PROG_CC],
  8889. m4_defn([AC_PROG_CC])
  8890. [_AM_PROG_CC_C_O
  8891. ])
  8892. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
  8893. # AM_INIT_AUTOMAKE([OPTIONS])
  8894. # -----------------------------------------------
  8895. # The call with PACKAGE and VERSION arguments is the old style
  8896. # call (pre autoconf-2.50), which is being phased out. PACKAGE
  8897. # and VERSION should now be passed to AC_INIT and removed from
  8898. # the call to AM_INIT_AUTOMAKE.
  8899. # We support both call styles for the transition. After
  8900. # the next Automake release, Autoconf can make the AC_INIT
  8901. # arguments mandatory, and then we can depend on a new Autoconf
  8902. # release and drop the old call support.
  8903. AC_DEFUN([AM_INIT_AUTOMAKE],
  8904. [AC_PREREQ([2.65])dnl
  8905. m4_ifdef([_$0_ALREADY_INIT],
  8906. [m4_fatal([$0 expanded multiple times
  8907. ]m4_defn([_$0_ALREADY_INIT]))],
  8908. [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl
  8909. dnl Autoconf wants to disallow AM_ names. We explicitly allow
  8910. dnl the ones we care about.
  8911. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
  8912. AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
  8913. AC_REQUIRE([AC_PROG_INSTALL])dnl
  8914. if test "`cd $srcdir && pwd`" != "`pwd`"; then
  8915. # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
  8916. # is not polluted with repeated "-I."
  8917. AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
  8918. # test to see if srcdir already configured
  8919. if test -f $srcdir/config.status; then
  8920. AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  8921. fi
  8922. fi
  8923. # test whether we have cygpath
  8924. if test -z "$CYGPATH_W"; then
  8925. if (cygpath --version) >/dev/null 2>/dev/null; then
  8926. CYGPATH_W='cygpath -w'
  8927. else
  8928. CYGPATH_W=echo
  8929. fi
  8930. fi
  8931. AC_SUBST([CYGPATH_W])
  8932. # Define the identity of the package.
  8933. dnl Distinguish between old-style and new-style calls.
  8934. m4_ifval([$2],
  8935. [AC_DIAGNOSE([obsolete],
  8936. [$0: two- and three-arguments forms are deprecated.])
  8937. m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  8938. AC_SUBST([PACKAGE], [$1])dnl
  8939. AC_SUBST([VERSION], [$2])],
  8940. [_AM_SET_OPTIONS([$1])dnl
  8941. dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
  8942. m4_if(
  8943. m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]),
  8944. [ok:ok],,
  8945. [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
  8946. AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  8947. AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
  8948. _AM_IF_OPTION([no-define],,
  8949. [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
  8950. AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
  8951. # Some tools Automake needs.
  8952. AC_REQUIRE([AM_SANITY_CHECK])dnl
  8953. AC_REQUIRE([AC_ARG_PROGRAM])dnl
  8954. AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
  8955. AM_MISSING_PROG([AUTOCONF], [autoconf])
  8956. AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
  8957. AM_MISSING_PROG([AUTOHEADER], [autoheader])
  8958. AM_MISSING_PROG([MAKEINFO], [makeinfo])
  8959. AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  8960. AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
  8961. AC_REQUIRE([AC_PROG_MKDIR_P])dnl
  8962. # For better backward compatibility. To be removed once Automake 1.9.x
  8963. # dies out for good. For more background, see:
  8964. # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
  8965. # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
  8966. AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
  8967. # We need awk for the "check" target (and possibly the TAP driver). The
  8968. # system "awk" is bad on some platforms.
  8969. AC_REQUIRE([AC_PROG_AWK])dnl
  8970. AC_REQUIRE([AC_PROG_MAKE_SET])dnl
  8971. AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  8972. _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
  8973. [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
  8974. [_AM_PROG_TAR([v7])])])
  8975. _AM_IF_OPTION([no-dependencies],,
  8976. [AC_PROVIDE_IFELSE([AC_PROG_CC],
  8977. [_AM_DEPENDENCIES([CC])],
  8978. [m4_define([AC_PROG_CC],
  8979. m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
  8980. AC_PROVIDE_IFELSE([AC_PROG_CXX],
  8981. [_AM_DEPENDENCIES([CXX])],
  8982. [m4_define([AC_PROG_CXX],
  8983. m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
  8984. AC_PROVIDE_IFELSE([AC_PROG_OBJC],
  8985. [_AM_DEPENDENCIES([OBJC])],
  8986. [m4_define([AC_PROG_OBJC],
  8987. m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
  8988. AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
  8989. [_AM_DEPENDENCIES([OBJCXX])],
  8990. [m4_define([AC_PROG_OBJCXX],
  8991. m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
  8992. ])
  8993. # Variables for tags utilities; see am/tags.am
  8994. if test -z "$CTAGS"; then
  8995. CTAGS=ctags
  8996. fi
  8997. AC_SUBST([CTAGS])
  8998. if test -z "$ETAGS"; then
  8999. ETAGS=etags
  9000. fi
  9001. AC_SUBST([ETAGS])
  9002. if test -z "$CSCOPE"; then
  9003. CSCOPE=cscope
  9004. fi
  9005. AC_SUBST([CSCOPE])
  9006. AC_REQUIRE([AM_SILENT_RULES])dnl
  9007. dnl The testsuite driver may need to know about EXEEXT, so add the
  9008. dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
  9009. dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
  9010. AC_CONFIG_COMMANDS_PRE(dnl
  9011. [m4_provide_if([_AM_COMPILER_EXEEXT],
  9012. [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
  9013. # POSIX will say in a future version that running "rm -f" with no argument
  9014. # is OK; and we want to be able to make that assumption in our Makefile
  9015. # recipes. So use an aggressive probe to check that the usage we want is
  9016. # actually supported "in the wild" to an acceptable degree.
  9017. # See automake bug#10828.
  9018. # To make any issue more visible, cause the running configure to be aborted
  9019. # by default if the 'rm' program in use doesn't match our expectations; the
  9020. # user can still override this though.
  9021. if rm -f && rm -fr && rm -rf; then : OK; else
  9022. cat >&2 <<'END'
  9023. Oops!
  9024. Your 'rm' program seems unable to run without file operands specified
  9025. on the command line, even when the '-f' option is present. This is contrary
  9026. to the behaviour of most rm programs out there, and not conforming with
  9027. the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
  9028. Please tell [email protected] about your system, including the value
  9029. of your $PATH and any error possibly output before this message. This
  9030. can help us improve future automake versions.
  9031. END
  9032. if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
  9033. echo 'Configuration will proceed anyway, since you have set the' >&2
  9034. echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
  9035. echo >&2
  9036. else
  9037. cat >&2 <<'END'
  9038. Aborting the configuration process, to ensure you take notice of the issue.
  9039. You can download and install GNU coreutils to get an 'rm' implementation
  9040. that behaves properly: <https://www.gnu.org/software/coreutils/>.
  9041. If you want to complete the configuration process using your problematic
  9042. 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
  9043. to "yes", and re-run configure.
  9044. END
  9045. AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
  9046. fi
  9047. fi
  9048. dnl The trailing newline in this macro's definition is deliberate, for
  9049. dnl backward compatibility and to allow trailing 'dnl'-style comments
  9050. dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
  9051. ])
  9052. dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
  9053. dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
  9054. dnl mangled by Autoconf and run in a shell conditional statement.
  9055. m4_define([_AC_COMPILER_EXEEXT],
  9056. m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
  9057. # When config.status generates a header, we must update the stamp-h file.
  9058. # This file resides in the same directory as the config header
  9059. # that is generated. The stamp files are numbered to have different names.
  9060. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
  9061. # loop where config.status creates the headers, so we can generate
  9062. # our stamp files there.
  9063. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
  9064. [# Compute $1's index in $config_headers.
  9065. _am_arg=$1
  9066. _am_stamp_count=1
  9067. for _am_header in $config_headers :; do
  9068. case $_am_header in
  9069. $_am_arg | $_am_arg:* )
  9070. break ;;
  9071. * )
  9072. _am_stamp_count=`expr $_am_stamp_count + 1` ;;
  9073. esac
  9074. done
  9075. echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
  9076. # Copyright (C) 2001-2021 Free Software Foundation, Inc.
  9077. #
  9078. # This file is free software; the Free Software Foundation
  9079. # gives unlimited permission to copy and/or distribute it,
  9080. # with or without modifications, as long as this notice is preserved.
  9081. # AM_PROG_INSTALL_SH
  9082. # ------------------
  9083. # Define $install_sh.
  9084. AC_DEFUN([AM_PROG_INSTALL_SH],
  9085. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  9086. if test x"${install_sh+set}" != xset; then
  9087. case $am_aux_dir in
  9088. *\ * | *\ *)
  9089. install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
  9090. *)
  9091. install_sh="\${SHELL} $am_aux_dir/install-sh"
  9092. esac
  9093. fi
  9094. AC_SUBST([install_sh])])
  9095. # Copyright (C) 2003-2021 Free Software Foundation, Inc.
  9096. #
  9097. # This file is free software; the Free Software Foundation
  9098. # gives unlimited permission to copy and/or distribute it,
  9099. # with or without modifications, as long as this notice is preserved.
  9100. # Check whether the underlying file-system supports filenames
  9101. # with a leading dot. For instance MS-DOS doesn't.
  9102. AC_DEFUN([AM_SET_LEADING_DOT],
  9103. [rm -rf .tst 2>/dev/null
  9104. mkdir .tst 2>/dev/null
  9105. if test -d .tst; then
  9106. am__leading_dot=.
  9107. else
  9108. am__leading_dot=_
  9109. fi
  9110. rmdir .tst 2>/dev/null
  9111. AC_SUBST([am__leading_dot])])
  9112. # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
  9113. # From Jim Meyering
  9114. # Copyright (C) 1996-2021 Free Software Foundation, Inc.
  9115. #
  9116. # This file is free software; the Free Software Foundation
  9117. # gives unlimited permission to copy and/or distribute it,
  9118. # with or without modifications, as long as this notice is preserved.
  9119. # AM_MAINTAINER_MODE([DEFAULT-MODE])
  9120. # ----------------------------------
  9121. # Control maintainer-specific portions of Makefiles.
  9122. # Default is to disable them, unless 'enable' is passed literally.
  9123. # For symmetry, 'disable' may be passed as well. Anyway, the user
  9124. # can override the default with the --enable/--disable switch.
  9125. AC_DEFUN([AM_MAINTAINER_MODE],
  9126. [m4_case(m4_default([$1], [disable]),
  9127. [enable], [m4_define([am_maintainer_other], [disable])],
  9128. [disable], [m4_define([am_maintainer_other], [enable])],
  9129. [m4_define([am_maintainer_other], [enable])
  9130. m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
  9131. AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
  9132. dnl maintainer-mode's default is 'disable' unless 'enable' is passed
  9133. AC_ARG_ENABLE([maintainer-mode],
  9134. [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
  9135. am_maintainer_other[ make rules and dependencies not useful
  9136. (and sometimes confusing) to the casual installer])],
  9137. [USE_MAINTAINER_MODE=$enableval],
  9138. [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
  9139. AC_MSG_RESULT([$USE_MAINTAINER_MODE])
  9140. AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
  9141. MAINT=$MAINTAINER_MODE_TRUE
  9142. AC_SUBST([MAINT])dnl
  9143. ]
  9144. )
  9145. # Check to see how 'make' treats includes. -*- Autoconf -*-
  9146. # Copyright (C) 2001-2021 Free Software Foundation, Inc.
  9147. #
  9148. # This file is free software; the Free Software Foundation
  9149. # gives unlimited permission to copy and/or distribute it,
  9150. # with or without modifications, as long as this notice is preserved.
  9151. # AM_MAKE_INCLUDE()
  9152. # -----------------
  9153. # Check whether make has an 'include' directive that can support all
  9154. # the idioms we need for our automatic dependency tracking code.
  9155. AC_DEFUN([AM_MAKE_INCLUDE],
  9156. [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
  9157. cat > confinc.mk << 'END'
  9158. am__doit:
  9159. @echo this is the am__doit target >confinc.out
  9160. .PHONY: am__doit
  9161. END
  9162. am__include="#"
  9163. am__quote=
  9164. # BSD make does it like this.
  9165. echo '.include "confinc.mk" # ignored' > confmf.BSD
  9166. # Other make implementations (GNU, Solaris 10, AIX) do it like this.
  9167. echo 'include confinc.mk # ignored' > confmf.GNU
  9168. _am_result=no
  9169. for s in GNU BSD; do
  9170. AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
  9171. AS_CASE([$?:`cat confinc.out 2>/dev/null`],
  9172. ['0:this is the am__doit target'],
  9173. [AS_CASE([$s],
  9174. [BSD], [am__include='.include' am__quote='"'],
  9175. [am__include='include' am__quote=''])])
  9176. if test "$am__include" != "#"; then
  9177. _am_result="yes ($s style)"
  9178. break
  9179. fi
  9180. done
  9181. rm -f confinc.* confmf.*
  9182. AC_MSG_RESULT([${_am_result}])
  9183. AC_SUBST([am__include])])
  9184. AC_SUBST([am__quote])])
  9185. # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
  9186. # Copyright (C) 1997-2021 Free Software Foundation, Inc.
  9187. #
  9188. # This file is free software; the Free Software Foundation
  9189. # gives unlimited permission to copy and/or distribute it,
  9190. # with or without modifications, as long as this notice is preserved.
  9191. # AM_MISSING_PROG(NAME, PROGRAM)
  9192. # ------------------------------
  9193. AC_DEFUN([AM_MISSING_PROG],
  9194. [AC_REQUIRE([AM_MISSING_HAS_RUN])
  9195. $1=${$1-"${am_missing_run}$2"}
  9196. AC_SUBST($1)])
  9197. # AM_MISSING_HAS_RUN
  9198. # ------------------
  9199. # Define MISSING if not defined so far and test if it is modern enough.
  9200. # If it is, set am_missing_run to use it, otherwise, to nothing.
  9201. AC_DEFUN([AM_MISSING_HAS_RUN],
  9202. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  9203. AC_REQUIRE_AUX_FILE([missing])dnl
  9204. if test x"${MISSING+set}" != xset; then
  9205. MISSING="\${SHELL} '$am_aux_dir/missing'"
  9206. fi
  9207. # Use eval to expand $SHELL
  9208. if eval "$MISSING --is-lightweight"; then
  9209. am_missing_run="$MISSING "
  9210. else
  9211. am_missing_run=
  9212. AC_MSG_WARN(['missing' script is too old or missing])
  9213. fi
  9214. ])
  9215. # Helper functions for option handling. -*- Autoconf -*-
  9216. # Copyright (C) 2001-2021 Free Software Foundation, Inc.
  9217. #
  9218. # This file is free software; the Free Software Foundation
  9219. # gives unlimited permission to copy and/or distribute it,
  9220. # with or without modifications, as long as this notice is preserved.
  9221. # _AM_MANGLE_OPTION(NAME)
  9222. # -----------------------
  9223. AC_DEFUN([_AM_MANGLE_OPTION],
  9224. [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
  9225. # _AM_SET_OPTION(NAME)
  9226. # --------------------
  9227. # Set option NAME. Presently that only means defining a flag for this option.
  9228. AC_DEFUN([_AM_SET_OPTION],
  9229. [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
  9230. # _AM_SET_OPTIONS(OPTIONS)
  9231. # ------------------------
  9232. # OPTIONS is a space-separated list of Automake options.
  9233. AC_DEFUN([_AM_SET_OPTIONS],
  9234. [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
  9235. # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
  9236. # -------------------------------------------
  9237. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  9238. AC_DEFUN([_AM_IF_OPTION],
  9239. [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
  9240. # Copyright (C) 1999-2021 Free Software Foundation, Inc.
  9241. #
  9242. # This file is free software; the Free Software Foundation
  9243. # gives unlimited permission to copy and/or distribute it,
  9244. # with or without modifications, as long as this notice is preserved.
  9245. # _AM_PROG_CC_C_O
  9246. # ---------------
  9247. # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
  9248. # to automatically call this.
  9249. AC_DEFUN([_AM_PROG_CC_C_O],
  9250. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  9251. AC_REQUIRE_AUX_FILE([compile])dnl
  9252. AC_LANG_PUSH([C])dnl
  9253. AC_CACHE_CHECK(
  9254. [whether $CC understands -c and -o together],
  9255. [am_cv_prog_cc_c_o],
  9256. [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
  9257. # Make sure it works both with $CC and with simple cc.
  9258. # Following AC_PROG_CC_C_O, we do the test twice because some
  9259. # compilers refuse to overwrite an existing .o file with -o,
  9260. # though they will create one.
  9261. am_cv_prog_cc_c_o=yes
  9262. for am_i in 1 2; do
  9263. if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
  9264. && test -f conftest2.$ac_objext; then
  9265. : OK
  9266. else
  9267. am_cv_prog_cc_c_o=no
  9268. break
  9269. fi
  9270. done
  9271. rm -f core conftest*
  9272. unset am_i])
  9273. if test "$am_cv_prog_cc_c_o" != yes; then
  9274. # Losing compiler, so override with the script.
  9275. # FIXME: It is wrong to rewrite CC.
  9276. # But if we don't then we get into trouble of one sort or another.
  9277. # A longer-term fix would be to have automake use am__CC in this case,
  9278. # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
  9279. CC="$am_aux_dir/compile $CC"
  9280. fi
  9281. AC_LANG_POP([C])])
  9282. # For backward compatibility.
  9283. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
  9284. # Copyright (C) 2001-2021 Free Software Foundation, Inc.
  9285. #
  9286. # This file is free software; the Free Software Foundation
  9287. # gives unlimited permission to copy and/or distribute it,
  9288. # with or without modifications, as long as this notice is preserved.
  9289. # AM_RUN_LOG(COMMAND)
  9290. # -------------------
  9291. # Run COMMAND, save the exit status in ac_status, and log it.
  9292. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
  9293. AC_DEFUN([AM_RUN_LOG],
  9294. [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
  9295. ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
  9296. ac_status=$?
  9297. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  9298. (exit $ac_status); }])
  9299. # Check to make sure that the build environment is sane. -*- Autoconf -*-
  9300. # Copyright (C) 1996-2021 Free Software Foundation, Inc.
  9301. #
  9302. # This file is free software; the Free Software Foundation
  9303. # gives unlimited permission to copy and/or distribute it,
  9304. # with or without modifications, as long as this notice is preserved.
  9305. # AM_SANITY_CHECK
  9306. # ---------------
  9307. AC_DEFUN([AM_SANITY_CHECK],
  9308. [AC_MSG_CHECKING([whether build environment is sane])
  9309. # Reject unsafe characters in $srcdir or the absolute working directory
  9310. # name. Accept space and tab only in the latter.
  9311. am_lf='
  9312. '
  9313. case `pwd` in
  9314. *[[\\\"\#\$\&\'\`$am_lf]]*)
  9315. AC_MSG_ERROR([unsafe absolute working directory name]);;
  9316. esac
  9317. case $srcdir in
  9318. *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
  9319. AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
  9320. esac
  9321. # Do 'set' in a subshell so we don't clobber the current shell's
  9322. # arguments. Must try -L first in case configure is actually a
  9323. # symlink; some systems play weird games with the mod time of symlinks
  9324. # (eg FreeBSD returns the mod time of the symlink's containing
  9325. # directory).
  9326. if (
  9327. am_has_slept=no
  9328. for am_try in 1 2; do
  9329. echo "timestamp, slept: $am_has_slept" > conftest.file
  9330. set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
  9331. if test "$[*]" = "X"; then
  9332. # -L didn't work.
  9333. set X `ls -t "$srcdir/configure" conftest.file`
  9334. fi
  9335. if test "$[*]" != "X $srcdir/configure conftest.file" \
  9336. && test "$[*]" != "X conftest.file $srcdir/configure"; then
  9337. # If neither matched, then we have a broken ls. This can happen
  9338. # if, for instance, CONFIG_SHELL is bash and it inherits a
  9339. # broken ls alias from the environment. This has actually
  9340. # happened. Such a system could not be considered "sane".
  9341. AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
  9342. alias in your environment])
  9343. fi
  9344. if test "$[2]" = conftest.file || test $am_try -eq 2; then
  9345. break
  9346. fi
  9347. # Just in case.
  9348. sleep 1
  9349. am_has_slept=yes
  9350. done
  9351. test "$[2]" = conftest.file
  9352. )
  9353. then
  9354. # Ok.
  9355. :
  9356. else
  9357. AC_MSG_ERROR([newly created file is older than distributed files!
  9358. Check your system clock])
  9359. fi
  9360. AC_MSG_RESULT([yes])
  9361. # If we didn't sleep, we still need to ensure time stamps of config.status and
  9362. # generated files are strictly newer.
  9363. am_sleep_pid=
  9364. if grep 'slept: no' conftest.file >/dev/null 2>&1; then
  9365. ( sleep 1 ) &
  9366. am_sleep_pid=$!
  9367. fi
  9368. AC_CONFIG_COMMANDS_PRE(
  9369. [AC_MSG_CHECKING([that generated files are newer than configure])
  9370. if test -n "$am_sleep_pid"; then
  9371. # Hide warnings about reused PIDs.
  9372. wait $am_sleep_pid 2>/dev/null
  9373. fi
  9374. AC_MSG_RESULT([done])])
  9375. rm -f conftest.file
  9376. ])
  9377. # Copyright (C) 2009-2021 Free Software Foundation, Inc.
  9378. #
  9379. # This file is free software; the Free Software Foundation
  9380. # gives unlimited permission to copy and/or distribute it,
  9381. # with or without modifications, as long as this notice is preserved.
  9382. # AM_SILENT_RULES([DEFAULT])
  9383. # --------------------------
  9384. # Enable less verbose build rules; with the default set to DEFAULT
  9385. # ("yes" being less verbose, "no" or empty being verbose).
  9386. AC_DEFUN([AM_SILENT_RULES],
  9387. [AC_ARG_ENABLE([silent-rules], [dnl
  9388. AS_HELP_STRING(
  9389. [--enable-silent-rules],
  9390. [less verbose build output (undo: "make V=1")])
  9391. AS_HELP_STRING(
  9392. [--disable-silent-rules],
  9393. [verbose build output (undo: "make V=0")])dnl
  9394. ])
  9395. case $enable_silent_rules in @%:@ (((
  9396. yes) AM_DEFAULT_VERBOSITY=0;;
  9397. no) AM_DEFAULT_VERBOSITY=1;;
  9398. *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
  9399. esac
  9400. dnl
  9401. dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
  9402. dnl do not support nested variable expansions.
  9403. dnl See automake bug#9928 and bug#10237.
  9404. am_make=${MAKE-make}
  9405. AC_CACHE_CHECK([whether $am_make supports nested variables],
  9406. [am_cv_make_support_nested_variables],
  9407. [if AS_ECHO([['TRUE=$(BAR$(V))
  9408. BAR0=false
  9409. BAR1=true
  9410. V=1
  9411. am__doit:
  9412. @$(TRUE)
  9413. .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
  9414. am_cv_make_support_nested_variables=yes
  9415. else
  9416. am_cv_make_support_nested_variables=no
  9417. fi])
  9418. if test $am_cv_make_support_nested_variables = yes; then
  9419. dnl Using '$V' instead of '$(V)' breaks IRIX make.
  9420. AM_V='$(V)'
  9421. AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
  9422. else
  9423. AM_V=$AM_DEFAULT_VERBOSITY
  9424. AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
  9425. fi
  9426. AC_SUBST([AM_V])dnl
  9427. AM_SUBST_NOTMAKE([AM_V])dnl
  9428. AC_SUBST([AM_DEFAULT_V])dnl
  9429. AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
  9430. AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
  9431. AM_BACKSLASH='\'
  9432. AC_SUBST([AM_BACKSLASH])dnl
  9433. _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
  9434. ])
  9435. # Copyright (C) 2001-2021 Free Software Foundation, Inc.
  9436. #
  9437. # This file is free software; the Free Software Foundation
  9438. # gives unlimited permission to copy and/or distribute it,
  9439. # with or without modifications, as long as this notice is preserved.
  9440. # AM_PROG_INSTALL_STRIP
  9441. # ---------------------
  9442. # One issue with vendor 'install' (even GNU) is that you can't
  9443. # specify the program used to strip binaries. This is especially
  9444. # annoying in cross-compiling environments, where the build's strip
  9445. # is unlikely to handle the host's binaries.
  9446. # Fortunately install-sh will honor a STRIPPROG variable, so we
  9447. # always use install-sh in "make install-strip", and initialize
  9448. # STRIPPROG with the value of the STRIP variable (set by the user).
  9449. AC_DEFUN([AM_PROG_INSTALL_STRIP],
  9450. [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  9451. # Installed binaries are usually stripped using 'strip' when the user
  9452. # run "make install-strip". However 'strip' might not be the right
  9453. # tool to use in cross-compilation environments, therefore Automake
  9454. # will honor the 'STRIP' environment variable to overrule this program.
  9455. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
  9456. if test "$cross_compiling" != no; then
  9457. AC_CHECK_TOOL([STRIP], [strip], :)
  9458. fi
  9459. INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
  9460. AC_SUBST([INSTALL_STRIP_PROGRAM])])
  9461. # Copyright (C) 2006-2021 Free Software Foundation, Inc.
  9462. #
  9463. # This file is free software; the Free Software Foundation
  9464. # gives unlimited permission to copy and/or distribute it,
  9465. # with or without modifications, as long as this notice is preserved.
  9466. # _AM_SUBST_NOTMAKE(VARIABLE)
  9467. # ---------------------------
  9468. # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
  9469. # This macro is traced by Automake.
  9470. AC_DEFUN([_AM_SUBST_NOTMAKE])
  9471. # AM_SUBST_NOTMAKE(VARIABLE)
  9472. # --------------------------
  9473. # Public sister of _AM_SUBST_NOTMAKE.
  9474. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
  9475. # Check how to create a tarball. -*- Autoconf -*-
  9476. # Copyright (C) 2004-2021 Free Software Foundation, Inc.
  9477. #
  9478. # This file is free software; the Free Software Foundation
  9479. # gives unlimited permission to copy and/or distribute it,
  9480. # with or without modifications, as long as this notice is preserved.
  9481. # _AM_PROG_TAR(FORMAT)
  9482. # --------------------
  9483. # Check how to create a tarball in format FORMAT.
  9484. # FORMAT should be one of 'v7', 'ustar', or 'pax'.
  9485. #
  9486. # Substitute a variable $(am__tar) that is a command
  9487. # writing to stdout a FORMAT-tarball containing the directory
  9488. # $tardir.
  9489. # tardir=directory && $(am__tar) > result.tar
  9490. #
  9491. # Substitute a variable $(am__untar) that extract such
  9492. # a tarball read from stdin.
  9493. # $(am__untar) < result.tar
  9494. #
  9495. AC_DEFUN([_AM_PROG_TAR],
  9496. [# Always define AMTAR for backward compatibility. Yes, it's still used
  9497. # in the wild :-( We should find a proper way to deprecate it ...
  9498. AC_SUBST([AMTAR], ['$${TAR-tar}'])
  9499. # We'll loop over all known methods to create a tar archive until one works.
  9500. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
  9501. m4_if([$1], [v7],
  9502. [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
  9503. [m4_case([$1],
  9504. [ustar],
  9505. [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
  9506. # There is notably a 21 bits limit for the UID and the GID. In fact,
  9507. # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
  9508. # and bug#13588).
  9509. am_max_uid=2097151 # 2^21 - 1
  9510. am_max_gid=$am_max_uid
  9511. # The $UID and $GID variables are not portable, so we need to resort
  9512. # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
  9513. # below are definitely unexpected, so allow the users to see them
  9514. # (that is, avoid stderr redirection).
  9515. am_uid=`id -u || echo unknown`
  9516. am_gid=`id -g || echo unknown`
  9517. AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
  9518. if test $am_uid -le $am_max_uid; then
  9519. AC_MSG_RESULT([yes])
  9520. else
  9521. AC_MSG_RESULT([no])
  9522. _am_tools=none
  9523. fi
  9524. AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
  9525. if test $am_gid -le $am_max_gid; then
  9526. AC_MSG_RESULT([yes])
  9527. else
  9528. AC_MSG_RESULT([no])
  9529. _am_tools=none
  9530. fi],
  9531. [pax],
  9532. [],
  9533. [m4_fatal([Unknown tar format])])
  9534. AC_MSG_CHECKING([how to create a $1 tar archive])
  9535. # Go ahead even if we have the value already cached. We do so because we
  9536. # need to set the values for the 'am__tar' and 'am__untar' variables.
  9537. _am_tools=${am_cv_prog_tar_$1-$_am_tools}
  9538. for _am_tool in $_am_tools; do
  9539. case $_am_tool in
  9540. gnutar)
  9541. for _am_tar in tar gnutar gtar; do
  9542. AM_RUN_LOG([$_am_tar --version]) && break
  9543. done
  9544. am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
  9545. am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
  9546. am__untar="$_am_tar -xf -"
  9547. ;;
  9548. plaintar)
  9549. # Must skip GNU tar: if it does not support --format= it doesn't create
  9550. # ustar tarball either.
  9551. (tar --version) >/dev/null 2>&1 && continue
  9552. am__tar='tar chf - "$$tardir"'
  9553. am__tar_='tar chf - "$tardir"'
  9554. am__untar='tar xf -'
  9555. ;;
  9556. pax)
  9557. am__tar='pax -L -x $1 -w "$$tardir"'
  9558. am__tar_='pax -L -x $1 -w "$tardir"'
  9559. am__untar='pax -r'
  9560. ;;
  9561. cpio)
  9562. am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
  9563. am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
  9564. am__untar='cpio -i -H $1 -d'
  9565. ;;
  9566. none)
  9567. am__tar=false
  9568. am__tar_=false
  9569. am__untar=false
  9570. ;;
  9571. esac
  9572. # If the value was cached, stop now. We just wanted to have am__tar
  9573. # and am__untar set.
  9574. test -n "${am_cv_prog_tar_$1}" && break
  9575. # tar/untar a dummy directory, and stop if the command works.
  9576. rm -rf conftest.dir
  9577. mkdir conftest.dir
  9578. echo GrepMe > conftest.dir/file
  9579. AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
  9580. rm -rf conftest.dir
  9581. if test -s conftest.tar; then
  9582. AM_RUN_LOG([$am__untar <conftest.tar])
  9583. AM_RUN_LOG([cat conftest.dir/file])
  9584. grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
  9585. fi
  9586. done
  9587. rm -rf conftest.dir
  9588. AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
  9589. AC_MSG_RESULT([$am_cv_prog_tar_$1])])
  9590. AC_SUBST([am__tar])
  9591. AC_SUBST([am__untar])
  9592. ]) # _AM_PROG_TAR
  9593. m4_include([build/autoconf/ax_append_compile_flags.m4])
  9594. m4_include([build/autoconf/ax_append_flag.m4])
  9595. m4_include([build/autoconf/ax_check_compile_flag.m4])
  9596. m4_include([build/autoconf/ax_require_defined.m4])
  9597. m4_include([build/autoconf/check_stdcall_func.m4])
  9598. m4_include([build/autoconf/iconv.m4])
  9599. m4_include([build/autoconf/la_uid_t.m4])
  9600. m4_include([build/autoconf/lib-ld.m4])
  9601. m4_include([build/autoconf/lib-link.m4])
  9602. m4_include([build/autoconf/lib-prefix.m4])
  9603. m4_include([build/autoconf/m4_ax_compile_check_sizeof.m4])