aclocal.m4 340 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711
  1. # generated automatically by aclocal 1.11.3 -*- Autoconf -*-
  2. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
  3. # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
  4. # Inc.
  5. # This file is free software; the Free Software Foundation
  6. # gives unlimited permission to copy and/or distribute it,
  7. # with or without modifications, as long as this notice is preserved.
  8. # This program is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  10. # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  11. # PARTICULAR PURPOSE.
  12. m4_ifndef([AC_AUTOCONF_VERSION],
  13. [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
  14. m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
  15. [m4_warning([this file was generated for autoconf 2.68.
  16. You have another version of autoconf. It may work, but is not guaranteed to.
  17. If you have problems, you may need to regenerate the build system entirely.
  18. To do so, use the procedure documented by the package, typically `autoreconf'.])])
  19. dnl AM_PATH_CHECK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
  20. dnl Test for check, and define CHECK_CFLAGS and CHECK_LIBS
  21. dnl
  22. AC_DEFUN([AM_PATH_CHECK],
  23. [
  24. AC_MSG_WARN([A@&t@M_PATH_CHECK() is deprecated])
  25. AC_MSG_WARN([[use P@&t@KG_CHECK_MODULES([CHECK], [check >= 0.9.4]) instead]])
  26. AC_ARG_WITH([check],
  27. [ --with-check=PATH prefix where check is installed [default=auto]])
  28. min_check_version=ifelse([$1], ,0.8.2,$1)
  29. AC_MSG_CHECKING(for check - version >= $min_check_version)
  30. if test x$with_check = xno; then
  31. AC_MSG_RESULT(disabled)
  32. ifelse([$3], , AC_MSG_ERROR([disabling check is not supported]), [$3])
  33. else
  34. if test "x$with_check" != x; then
  35. CHECK_CFLAGS="-I$with_check/include"
  36. CHECK_LIBS="-L$with_check/lib -lcheck"
  37. else
  38. CHECK_CFLAGS=""
  39. CHECK_LIBS="-lcheck"
  40. fi
  41. ac_save_CFLAGS="$CFLAGS"
  42. ac_save_LIBS="$LIBS"
  43. CFLAGS="$CFLAGS $CHECK_CFLAGS"
  44. LIBS="$CHECK_LIBS $LIBS"
  45. rm -f conf.check-test
  46. AC_COMPILE_IFELSE([AC_LANG_SOURCE([AC_INCLUDES_DEFAULT([])
  47. #include <check.h>
  48. int main ()
  49. {
  50. int major, minor, micro;
  51. char *tmp_version;
  52. system ("touch conf.check-test");
  53. /* HP/UX 9 (%@#!) writes to sscanf strings */
  54. tmp_version = strdup("$min_check_version");
  55. if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
  56. printf("%s, bad version string\n", "$min_check_version");
  57. return 1;
  58. }
  59. if ((CHECK_MAJOR_VERSION != check_major_version) ||
  60. (CHECK_MINOR_VERSION != check_minor_version) ||
  61. (CHECK_MICRO_VERSION != check_micro_version))
  62. {
  63. printf("\n*** The check header file (version %d.%d.%d) does not match\n",
  64. CHECK_MAJOR_VERSION, CHECK_MINOR_VERSION, CHECK_MICRO_VERSION);
  65. printf("*** the check library (version %d.%d.%d).\n",
  66. check_major_version, check_minor_version, check_micro_version);
  67. return 1;
  68. }
  69. if ((check_major_version > major) ||
  70. ((check_major_version == major) && (check_minor_version > minor)) ||
  71. ((check_major_version == major) && (check_minor_version == minor) && (check_micro_version >= micro)))
  72. {
  73. return 0;
  74. }
  75. else
  76. {
  77. printf("\n*** An old version of check (%d.%d.%d) was found.\n",
  78. check_major_version, check_minor_version, check_micro_version);
  79. printf("*** You need a version of check being at least %d.%d.%d.\n", major, minor, micro);
  80. printf("***\n");
  81. printf("*** If you have already installed a sufficiently new version, this error\n");
  82. printf("*** probably means that the wrong copy of the check library and header\n");
  83. printf("*** file is being found. Rerun configure with the --with-check=PATH option\n");
  84. printf("*** to specify the prefix where the correct version was installed.\n");
  85. }
  86. return 1;
  87. }
  88. ])],, no_check=yes, [echo $ac_n "cross compiling; assumed OK... $ac_c"])
  89. CFLAGS="$ac_save_CFLAGS"
  90. LIBS="$ac_save_LIBS"
  91. if test "x$no_check" = x ; then
  92. AC_MSG_RESULT(yes)
  93. ifelse([$2], , :, [$2])
  94. else
  95. AC_MSG_RESULT(no)
  96. if test -f conf.check-test ; then
  97. :
  98. else
  99. echo "*** Could not run check test program, checking why..."
  100. CFLAGS="$CFLAGS $CHECK_CFLAGS"
  101. LIBS="$CHECK_LIBS $LIBS"
  102. AC_TRY_LINK([
  103. #include <stdio.h>
  104. #include <stdlib.h>
  105. #include <check.h>
  106. ], , [ echo "*** The test program compiled, but did not run. This usually means"
  107. echo "*** that the run-time linker is not finding check. You'll need to set your"
  108. echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
  109. echo "*** to the installed location Also, make sure you have run ldconfig if that"
  110. echo "*** is required on your system"
  111. echo "***"
  112. echo "*** If you have an old version installed, it is best to remove it, although"
  113. echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
  114. [ echo "*** The test program failed to compile or link. See the file config.log for"
  115. echo "*** the exact error that occured." ])
  116. CFLAGS="$ac_save_CFLAGS"
  117. LIBS="$ac_save_LIBS"
  118. fi
  119. CHECK_CFLAGS=""
  120. CHECK_LIBS=""
  121. rm -f conf.check-test
  122. ifelse([$3], , AC_MSG_ERROR([check not found]), [$3])
  123. fi
  124. AC_SUBST(CHECK_CFLAGS)
  125. AC_SUBST(CHECK_LIBS)
  126. rm -f conf.check-test
  127. fi
  128. ])
  129. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
  130. #
  131. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
  132. # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
  133. # Foundation, Inc.
  134. # Written by Gordon Matzigkeit, 1996
  135. #
  136. # This file is free software; the Free Software Foundation gives
  137. # unlimited permission to copy and/or distribute it, with or without
  138. # modifications, as long as this notice is preserved.
  139. m4_define([_LT_COPYING], [dnl
  140. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
  141. # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
  142. # Foundation, Inc.
  143. # Written by Gordon Matzigkeit, 1996
  144. #
  145. # This file is part of GNU Libtool.
  146. #
  147. # GNU Libtool is free software; you can redistribute it and/or
  148. # modify it under the terms of the GNU General Public License as
  149. # published by the Free Software Foundation; either version 2 of
  150. # the License, or (at your option) any later version.
  151. #
  152. # As a special exception to the GNU General Public License,
  153. # if you distribute this file as part of a program or library that
  154. # is built using GNU Libtool, you may include this file under the
  155. # same distribution terms that you use for the rest of that program.
  156. #
  157. # GNU Libtool is distributed in the hope that it will be useful,
  158. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  159. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  160. # GNU General Public License for more details.
  161. #
  162. # You should have received a copy of the GNU General Public License
  163. # along with GNU Libtool; see the file COPYING. If not, a copy
  164. # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
  165. # obtained by writing to the Free Software Foundation, Inc.,
  166. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  167. ])
  168. # serial 57 LT_INIT
  169. # LT_PREREQ(VERSION)
  170. # ------------------
  171. # Complain and exit if this libtool version is less that VERSION.
  172. m4_defun([LT_PREREQ],
  173. [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
  174. [m4_default([$3],
  175. [m4_fatal([Libtool version $1 or higher is required],
  176. 63)])],
  177. [$2])])
  178. # _LT_CHECK_BUILDDIR
  179. # ------------------
  180. # Complain if the absolute build directory name contains unusual characters
  181. m4_defun([_LT_CHECK_BUILDDIR],
  182. [case `pwd` in
  183. *\ * | *\ *)
  184. AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
  185. esac
  186. ])
  187. # LT_INIT([OPTIONS])
  188. # ------------------
  189. AC_DEFUN([LT_INIT],
  190. [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
  191. AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  192. AC_BEFORE([$0], [LT_LANG])dnl
  193. AC_BEFORE([$0], [LT_OUTPUT])dnl
  194. AC_BEFORE([$0], [LTDL_INIT])dnl
  195. m4_require([_LT_CHECK_BUILDDIR])dnl
  196. dnl Autoconf doesn't catch unexpanded LT_ macros by default:
  197. m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
  198. m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
  199. dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
  200. dnl unless we require an AC_DEFUNed macro:
  201. AC_REQUIRE([LTOPTIONS_VERSION])dnl
  202. AC_REQUIRE([LTSUGAR_VERSION])dnl
  203. AC_REQUIRE([LTVERSION_VERSION])dnl
  204. AC_REQUIRE([LTOBSOLETE_VERSION])dnl
  205. m4_require([_LT_PROG_LTMAIN])dnl
  206. _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
  207. dnl Parse OPTIONS
  208. _LT_SET_OPTIONS([$0], [$1])
  209. # This can be used to rebuild libtool when needed
  210. LIBTOOL_DEPS="$ltmain"
  211. # Always use our own libtool.
  212. LIBTOOL='$(SHELL) $(top_builddir)/libtool'
  213. AC_SUBST(LIBTOOL)dnl
  214. _LT_SETUP
  215. # Only expand once:
  216. m4_define([LT_INIT])
  217. ])# LT_INIT
  218. # Old names:
  219. AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
  220. AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
  221. dnl aclocal-1.4 backwards compatibility:
  222. dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
  223. dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
  224. # _LT_CC_BASENAME(CC)
  225. # -------------------
  226. # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
  227. m4_defun([_LT_CC_BASENAME],
  228. [for cc_temp in $1""; do
  229. case $cc_temp in
  230. compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
  231. distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
  232. \-*) ;;
  233. *) break;;
  234. esac
  235. done
  236. cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
  237. ])
  238. # _LT_FILEUTILS_DEFAULTS
  239. # ----------------------
  240. # It is okay to use these file commands and assume they have been set
  241. # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
  242. m4_defun([_LT_FILEUTILS_DEFAULTS],
  243. [: ${CP="cp -f"}
  244. : ${MV="mv -f"}
  245. : ${RM="rm -f"}
  246. ])# _LT_FILEUTILS_DEFAULTS
  247. # _LT_SETUP
  248. # ---------
  249. m4_defun([_LT_SETUP],
  250. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  251. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  252. AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
  253. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
  254. _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
  255. dnl
  256. _LT_DECL([], [host_alias], [0], [The host system])dnl
  257. _LT_DECL([], [host], [0])dnl
  258. _LT_DECL([], [host_os], [0])dnl
  259. dnl
  260. _LT_DECL([], [build_alias], [0], [The build system])dnl
  261. _LT_DECL([], [build], [0])dnl
  262. _LT_DECL([], [build_os], [0])dnl
  263. dnl
  264. AC_REQUIRE([AC_PROG_CC])dnl
  265. AC_REQUIRE([LT_PATH_LD])dnl
  266. AC_REQUIRE([LT_PATH_NM])dnl
  267. dnl
  268. AC_REQUIRE([AC_PROG_LN_S])dnl
  269. test -z "$LN_S" && LN_S="ln -s"
  270. _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
  271. dnl
  272. AC_REQUIRE([LT_CMD_MAX_LEN])dnl
  273. _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
  274. _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
  275. dnl
  276. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  277. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  278. m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
  279. m4_require([_LT_CMD_RELOAD])dnl
  280. m4_require([_LT_CHECK_MAGIC_METHOD])dnl
  281. m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
  282. m4_require([_LT_CMD_OLD_ARCHIVE])dnl
  283. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  284. m4_require([_LT_WITH_SYSROOT])dnl
  285. _LT_CONFIG_LIBTOOL_INIT([
  286. # See if we are running on zsh, and set the options which allow our
  287. # commands through without removal of \ escapes INIT.
  288. if test -n "\${ZSH_VERSION+set}" ; then
  289. setopt NO_GLOB_SUBST
  290. fi
  291. ])
  292. if test -n "${ZSH_VERSION+set}" ; then
  293. setopt NO_GLOB_SUBST
  294. fi
  295. _LT_CHECK_OBJDIR
  296. m4_require([_LT_TAG_COMPILER])dnl
  297. case $host_os in
  298. aix3*)
  299. # AIX sometimes has problems with the GCC collect2 program. For some
  300. # reason, if we set the COLLECT_NAMES environment variable, the problems
  301. # vanish in a puff of smoke.
  302. if test "X${COLLECT_NAMES+set}" != Xset; then
  303. COLLECT_NAMES=
  304. export COLLECT_NAMES
  305. fi
  306. ;;
  307. esac
  308. # Global variables:
  309. ofile=libtool
  310. can_build_shared=yes
  311. # All known linkers require a `.a' archive for static linking (except MSVC,
  312. # which needs '.lib').
  313. libext=a
  314. with_gnu_ld="$lt_cv_prog_gnu_ld"
  315. old_CC="$CC"
  316. old_CFLAGS="$CFLAGS"
  317. # Set sane defaults for various variables
  318. test -z "$CC" && CC=cc
  319. test -z "$LTCC" && LTCC=$CC
  320. test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
  321. test -z "$LD" && LD=ld
  322. test -z "$ac_objext" && ac_objext=o
  323. _LT_CC_BASENAME([$compiler])
  324. # Only perform the check for file, if the check method requires it
  325. test -z "$MAGIC_CMD" && MAGIC_CMD=file
  326. case $deplibs_check_method in
  327. file_magic*)
  328. if test "$file_magic_cmd" = '$MAGIC_CMD'; then
  329. _LT_PATH_MAGIC
  330. fi
  331. ;;
  332. esac
  333. # Use C for the default configuration in the libtool script
  334. LT_SUPPORTED_TAG([CC])
  335. _LT_LANG_C_CONFIG
  336. _LT_LANG_DEFAULT_CONFIG
  337. _LT_CONFIG_COMMANDS
  338. ])# _LT_SETUP
  339. # _LT_PREPARE_SED_QUOTE_VARS
  340. # --------------------------
  341. # Define a few sed substitution that help us do robust quoting.
  342. m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
  343. [# Backslashify metacharacters that are still active within
  344. # double-quoted strings.
  345. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
  346. # Same as above, but do not quote variable references.
  347. double_quote_subst='s/\([["`\\]]\)/\\\1/g'
  348. # Sed substitution to delay expansion of an escaped shell variable in a
  349. # double_quote_subst'ed string.
  350. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
  351. # Sed substitution to delay expansion of an escaped single quote.
  352. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
  353. # Sed substitution to avoid accidental globbing in evaled expressions
  354. no_glob_subst='s/\*/\\\*/g'
  355. ])
  356. # _LT_PROG_LTMAIN
  357. # ---------------
  358. # Note that this code is called both from `configure', and `config.status'
  359. # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
  360. # `config.status' has no value for ac_aux_dir unless we are using Automake,
  361. # so we pass a copy along to make sure it has a sensible value anyway.
  362. m4_defun([_LT_PROG_LTMAIN],
  363. [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
  364. _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
  365. ltmain="$ac_aux_dir/ltmain.sh"
  366. ])# _LT_PROG_LTMAIN
  367. # So that we can recreate a full libtool script including additional
  368. # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
  369. # in macros and then make a single call at the end using the `libtool'
  370. # label.
  371. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
  372. # ----------------------------------------
  373. # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  374. m4_define([_LT_CONFIG_LIBTOOL_INIT],
  375. [m4_ifval([$1],
  376. [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
  377. [$1
  378. ])])])
  379. # Initialize.
  380. m4_define([_LT_OUTPUT_LIBTOOL_INIT])
  381. # _LT_CONFIG_LIBTOOL([COMMANDS])
  382. # ------------------------------
  383. # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  384. m4_define([_LT_CONFIG_LIBTOOL],
  385. [m4_ifval([$1],
  386. [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
  387. [$1
  388. ])])])
  389. # Initialize.
  390. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
  391. # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
  392. # -----------------------------------------------------
  393. m4_defun([_LT_CONFIG_SAVE_COMMANDS],
  394. [_LT_CONFIG_LIBTOOL([$1])
  395. _LT_CONFIG_LIBTOOL_INIT([$2])
  396. ])
  397. # _LT_FORMAT_COMMENT([COMMENT])
  398. # -----------------------------
  399. # Add leading comment marks to the start of each line, and a trailing
  400. # full-stop to the whole comment if one is not present already.
  401. m4_define([_LT_FORMAT_COMMENT],
  402. [m4_ifval([$1], [
  403. m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
  404. [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
  405. )])
  406. # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
  407. # -------------------------------------------------------------------
  408. # CONFIGNAME is the name given to the value in the libtool script.
  409. # VARNAME is the (base) name used in the configure script.
  410. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
  411. # VARNAME. Any other value will be used directly.
  412. m4_define([_LT_DECL],
  413. [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
  414. [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
  415. [m4_ifval([$1], [$1], [$2])])
  416. lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
  417. m4_ifval([$4],
  418. [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
  419. lt_dict_add_subkey([lt_decl_dict], [$2],
  420. [tagged?], [m4_ifval([$5], [yes], [no])])])
  421. ])
  422. # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
  423. # --------------------------------------------------------
  424. m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
  425. # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
  426. # ------------------------------------------------
  427. m4_define([lt_decl_tag_varnames],
  428. [_lt_decl_filter([tagged?], [yes], $@)])
  429. # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
  430. # ---------------------------------------------------------
  431. m4_define([_lt_decl_filter],
  432. [m4_case([$#],
  433. [0], [m4_fatal([$0: too few arguments: $#])],
  434. [1], [m4_fatal([$0: too few arguments: $#: $1])],
  435. [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
  436. [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
  437. [lt_dict_filter([lt_decl_dict], $@)])[]dnl
  438. ])
  439. # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
  440. # --------------------------------------------------
  441. m4_define([lt_decl_quote_varnames],
  442. [_lt_decl_filter([value], [1], $@)])
  443. # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
  444. # ---------------------------------------------------
  445. m4_define([lt_decl_dquote_varnames],
  446. [_lt_decl_filter([value], [2], $@)])
  447. # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
  448. # ---------------------------------------------------
  449. m4_define([lt_decl_varnames_tagged],
  450. [m4_assert([$# <= 2])dnl
  451. _$0(m4_quote(m4_default([$1], [[, ]])),
  452. m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
  453. m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
  454. m4_define([_lt_decl_varnames_tagged],
  455. [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
  456. # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
  457. # ------------------------------------------------
  458. m4_define([lt_decl_all_varnames],
  459. [_$0(m4_quote(m4_default([$1], [[, ]])),
  460. m4_if([$2], [],
  461. m4_quote(lt_decl_varnames),
  462. m4_quote(m4_shift($@))))[]dnl
  463. ])
  464. m4_define([_lt_decl_all_varnames],
  465. [lt_join($@, lt_decl_varnames_tagged([$1],
  466. lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
  467. ])
  468. # _LT_CONFIG_STATUS_DECLARE([VARNAME])
  469. # ------------------------------------
  470. # Quote a variable value, and forward it to `config.status' so that its
  471. # declaration there will have the same value as in `configure'. VARNAME
  472. # must have a single quote delimited value for this to work.
  473. m4_define([_LT_CONFIG_STATUS_DECLARE],
  474. [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
  475. # _LT_CONFIG_STATUS_DECLARATIONS
  476. # ------------------------------
  477. # We delimit libtool config variables with single quotes, so when
  478. # we write them to config.status, we have to be sure to quote all
  479. # embedded single quotes properly. In configure, this macro expands
  480. # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
  481. #
  482. # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
  483. m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
  484. [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
  485. [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
  486. # _LT_LIBTOOL_TAGS
  487. # ----------------
  488. # Output comment and list of tags supported by the script
  489. m4_defun([_LT_LIBTOOL_TAGS],
  490. [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
  491. available_tags="_LT_TAGS"dnl
  492. ])
  493. # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
  494. # -----------------------------------
  495. # Extract the dictionary values for VARNAME (optionally with TAG) and
  496. # expand to a commented shell variable setting:
  497. #
  498. # # Some comment about what VAR is for.
  499. # visible_name=$lt_internal_name
  500. m4_define([_LT_LIBTOOL_DECLARE],
  501. [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
  502. [description])))[]dnl
  503. m4_pushdef([_libtool_name],
  504. m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
  505. m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
  506. [0], [_libtool_name=[$]$1],
  507. [1], [_libtool_name=$lt_[]$1],
  508. [2], [_libtool_name=$lt_[]$1],
  509. [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
  510. m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
  511. ])
  512. # _LT_LIBTOOL_CONFIG_VARS
  513. # -----------------------
  514. # Produce commented declarations of non-tagged libtool config variables
  515. # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
  516. # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
  517. # section) are produced by _LT_LIBTOOL_TAG_VARS.
  518. m4_defun([_LT_LIBTOOL_CONFIG_VARS],
  519. [m4_foreach([_lt_var],
  520. m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
  521. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
  522. # _LT_LIBTOOL_TAG_VARS(TAG)
  523. # -------------------------
  524. m4_define([_LT_LIBTOOL_TAG_VARS],
  525. [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
  526. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
  527. # _LT_TAGVAR(VARNAME, [TAGNAME])
  528. # ------------------------------
  529. m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
  530. # _LT_CONFIG_COMMANDS
  531. # -------------------
  532. # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
  533. # variables for single and double quote escaping we saved from calls
  534. # to _LT_DECL, we can put quote escaped variables declarations
  535. # into `config.status', and then the shell code to quote escape them in
  536. # for loops in `config.status'. Finally, any additional code accumulated
  537. # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
  538. m4_defun([_LT_CONFIG_COMMANDS],
  539. [AC_PROVIDE_IFELSE([LT_OUTPUT],
  540. dnl If the libtool generation code has been placed in $CONFIG_LT,
  541. dnl instead of duplicating it all over again into config.status,
  542. dnl then we will have config.status run $CONFIG_LT later, so it
  543. dnl needs to know what name is stored there:
  544. [AC_CONFIG_COMMANDS([libtool],
  545. [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
  546. dnl If the libtool generation code is destined for config.status,
  547. dnl expand the accumulated commands and init code now:
  548. [AC_CONFIG_COMMANDS([libtool],
  549. [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
  550. ])#_LT_CONFIG_COMMANDS
  551. # Initialize.
  552. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
  553. [
  554. # The HP-UX ksh and POSIX shell print the target directory to stdout
  555. # if CDPATH is set.
  556. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  557. sed_quote_subst='$sed_quote_subst'
  558. double_quote_subst='$double_quote_subst'
  559. delay_variable_subst='$delay_variable_subst'
  560. _LT_CONFIG_STATUS_DECLARATIONS
  561. LTCC='$LTCC'
  562. LTCFLAGS='$LTCFLAGS'
  563. compiler='$compiler_DEFAULT'
  564. # A function that is used when there is no print builtin or printf.
  565. func_fallback_echo ()
  566. {
  567. eval 'cat <<_LTECHO_EOF
  568. \$[]1
  569. _LTECHO_EOF'
  570. }
  571. # Quote evaled strings.
  572. for var in lt_decl_all_varnames([[ \
  573. ]], lt_decl_quote_varnames); do
  574. case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  575. *[[\\\\\\\`\\"\\\$]]*)
  576. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
  577. ;;
  578. *)
  579. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  580. ;;
  581. esac
  582. done
  583. # Double-quote double-evaled strings.
  584. for var in lt_decl_all_varnames([[ \
  585. ]], lt_decl_dquote_varnames); do
  586. case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  587. *[[\\\\\\\`\\"\\\$]]*)
  588. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
  589. ;;
  590. *)
  591. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  592. ;;
  593. esac
  594. done
  595. _LT_OUTPUT_LIBTOOL_INIT
  596. ])
  597. # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
  598. # ------------------------------------
  599. # Generate a child script FILE with all initialization necessary to
  600. # reuse the environment learned by the parent script, and make the
  601. # file executable. If COMMENT is supplied, it is inserted after the
  602. # `#!' sequence but before initialization text begins. After this
  603. # macro, additional text can be appended to FILE to form the body of
  604. # the child script. The macro ends with non-zero status if the
  605. # file could not be fully written (such as if the disk is full).
  606. m4_ifdef([AS_INIT_GENERATED],
  607. [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
  608. [m4_defun([_LT_GENERATED_FILE_INIT],
  609. [m4_require([AS_PREPARE])]dnl
  610. [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
  611. [lt_write_fail=0
  612. cat >$1 <<_ASEOF || lt_write_fail=1
  613. #! $SHELL
  614. # Generated by $as_me.
  615. $2
  616. SHELL=\${CONFIG_SHELL-$SHELL}
  617. export SHELL
  618. _ASEOF
  619. cat >>$1 <<\_ASEOF || lt_write_fail=1
  620. AS_SHELL_SANITIZE
  621. _AS_PREPARE
  622. exec AS_MESSAGE_FD>&1
  623. _ASEOF
  624. test $lt_write_fail = 0 && chmod +x $1[]dnl
  625. m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
  626. # LT_OUTPUT
  627. # ---------
  628. # This macro allows early generation of the libtool script (before
  629. # AC_OUTPUT is called), incase it is used in configure for compilation
  630. # tests.
  631. AC_DEFUN([LT_OUTPUT],
  632. [: ${CONFIG_LT=./config.lt}
  633. AC_MSG_NOTICE([creating $CONFIG_LT])
  634. _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
  635. [# Run this file to recreate a libtool stub with the current configuration.])
  636. cat >>"$CONFIG_LT" <<\_LTEOF
  637. lt_cl_silent=false
  638. exec AS_MESSAGE_LOG_FD>>config.log
  639. {
  640. echo
  641. AS_BOX([Running $as_me.])
  642. } >&AS_MESSAGE_LOG_FD
  643. lt_cl_help="\
  644. \`$as_me' creates a local libtool stub from the current configuration,
  645. for use in further configure time tests before the real libtool is
  646. generated.
  647. Usage: $[0] [[OPTIONS]]
  648. -h, --help print this help, then exit
  649. -V, --version print version number, then exit
  650. -q, --quiet do not print progress messages
  651. -d, --debug don't remove temporary files
  652. Report bugs to <bug-libtool@gnu.org>."
  653. lt_cl_version="\
  654. m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
  655. m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
  656. configured by $[0], generated by m4_PACKAGE_STRING.
  657. Copyright (C) 2011 Free Software Foundation, Inc.
  658. This config.lt script is free software; the Free Software Foundation
  659. gives unlimited permision to copy, distribute and modify it."
  660. while test $[#] != 0
  661. do
  662. case $[1] in
  663. --version | --v* | -V )
  664. echo "$lt_cl_version"; exit 0 ;;
  665. --help | --h* | -h )
  666. echo "$lt_cl_help"; exit 0 ;;
  667. --debug | --d* | -d )
  668. debug=: ;;
  669. --quiet | --q* | --silent | --s* | -q )
  670. lt_cl_silent=: ;;
  671. -*) AC_MSG_ERROR([unrecognized option: $[1]
  672. Try \`$[0] --help' for more information.]) ;;
  673. *) AC_MSG_ERROR([unrecognized argument: $[1]
  674. Try \`$[0] --help' for more information.]) ;;
  675. esac
  676. shift
  677. done
  678. if $lt_cl_silent; then
  679. exec AS_MESSAGE_FD>/dev/null
  680. fi
  681. _LTEOF
  682. cat >>"$CONFIG_LT" <<_LTEOF
  683. _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
  684. _LTEOF
  685. cat >>"$CONFIG_LT" <<\_LTEOF
  686. AC_MSG_NOTICE([creating $ofile])
  687. _LT_OUTPUT_LIBTOOL_COMMANDS
  688. AS_EXIT(0)
  689. _LTEOF
  690. chmod +x "$CONFIG_LT"
  691. # configure is writing to config.log, but config.lt does its own redirection,
  692. # appending to config.log, which fails on DOS, as config.log is still kept
  693. # open by configure. Here we exec the FD to /dev/null, effectively closing
  694. # config.log, so it can be properly (re)opened and appended to by config.lt.
  695. lt_cl_success=:
  696. test "$silent" = yes &&
  697. lt_config_lt_args="$lt_config_lt_args --quiet"
  698. exec AS_MESSAGE_LOG_FD>/dev/null
  699. $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
  700. exec AS_MESSAGE_LOG_FD>>config.log
  701. $lt_cl_success || AS_EXIT(1)
  702. ])# LT_OUTPUT
  703. # _LT_CONFIG(TAG)
  704. # ---------------
  705. # If TAG is the built-in tag, create an initial libtool script with a
  706. # default configuration from the untagged config vars. Otherwise add code
  707. # to config.status for appending the configuration named by TAG from the
  708. # matching tagged config vars.
  709. m4_defun([_LT_CONFIG],
  710. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  711. _LT_CONFIG_SAVE_COMMANDS([
  712. m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
  713. m4_if(_LT_TAG, [C], [
  714. # See if we are running on zsh, and set the options which allow our
  715. # commands through without removal of \ escapes.
  716. if test -n "${ZSH_VERSION+set}" ; then
  717. setopt NO_GLOB_SUBST
  718. fi
  719. cfgfile="${ofile}T"
  720. trap "$RM \"$cfgfile\"; exit 1" 1 2 15
  721. $RM "$cfgfile"
  722. cat <<_LT_EOF >> "$cfgfile"
  723. #! $SHELL
  724. # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
  725. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
  726. # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  727. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  728. #
  729. _LT_COPYING
  730. _LT_LIBTOOL_TAGS
  731. # ### BEGIN LIBTOOL CONFIG
  732. _LT_LIBTOOL_CONFIG_VARS
  733. _LT_LIBTOOL_TAG_VARS
  734. # ### END LIBTOOL CONFIG
  735. _LT_EOF
  736. case $host_os in
  737. aix3*)
  738. cat <<\_LT_EOF >> "$cfgfile"
  739. # AIX sometimes has problems with the GCC collect2 program. For some
  740. # reason, if we set the COLLECT_NAMES environment variable, the problems
  741. # vanish in a puff of smoke.
  742. if test "X${COLLECT_NAMES+set}" != Xset; then
  743. COLLECT_NAMES=
  744. export COLLECT_NAMES
  745. fi
  746. _LT_EOF
  747. ;;
  748. esac
  749. _LT_PROG_LTMAIN
  750. # We use sed instead of cat because bash on DJGPP gets confused if
  751. # if finds mixed CR/LF and LF-only lines. Since sed operates in
  752. # text mode, it properly converts lines to CR/LF. This bash problem
  753. # is reportedly fixed, but why not run on old versions too?
  754. sed '$q' "$ltmain" >> "$cfgfile" \
  755. || (rm -f "$cfgfile"; exit 1)
  756. _LT_PROG_REPLACE_SHELLFNS
  757. mv -f "$cfgfile" "$ofile" ||
  758. (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
  759. chmod +x "$ofile"
  760. ],
  761. [cat <<_LT_EOF >> "$ofile"
  762. dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
  763. dnl in a comment (ie after a #).
  764. # ### BEGIN LIBTOOL TAG CONFIG: $1
  765. _LT_LIBTOOL_TAG_VARS(_LT_TAG)
  766. # ### END LIBTOOL TAG CONFIG: $1
  767. _LT_EOF
  768. ])dnl /m4_if
  769. ],
  770. [m4_if([$1], [], [
  771. PACKAGE='$PACKAGE'
  772. VERSION='$VERSION'
  773. TIMESTAMP='$TIMESTAMP'
  774. RM='$RM'
  775. ofile='$ofile'], [])
  776. ])dnl /_LT_CONFIG_SAVE_COMMANDS
  777. ])# _LT_CONFIG
  778. # LT_SUPPORTED_TAG(TAG)
  779. # ---------------------
  780. # Trace this macro to discover what tags are supported by the libtool
  781. # --tag option, using:
  782. # autoconf --trace 'LT_SUPPORTED_TAG:$1'
  783. AC_DEFUN([LT_SUPPORTED_TAG], [])
  784. # C support is built-in for now
  785. m4_define([_LT_LANG_C_enabled], [])
  786. m4_define([_LT_TAGS], [])
  787. # LT_LANG(LANG)
  788. # -------------
  789. # Enable libtool support for the given language if not already enabled.
  790. AC_DEFUN([LT_LANG],
  791. [AC_BEFORE([$0], [LT_OUTPUT])dnl
  792. m4_case([$1],
  793. [C], [_LT_LANG(C)],
  794. [C++], [_LT_LANG(CXX)],
  795. [Go], [_LT_LANG(GO)],
  796. [Java], [_LT_LANG(GCJ)],
  797. [Fortran 77], [_LT_LANG(F77)],
  798. [Fortran], [_LT_LANG(FC)],
  799. [Windows Resource], [_LT_LANG(RC)],
  800. [m4_ifdef([_LT_LANG_]$1[_CONFIG],
  801. [_LT_LANG($1)],
  802. [m4_fatal([$0: unsupported language: "$1"])])])dnl
  803. ])# LT_LANG
  804. # _LT_LANG(LANGNAME)
  805. # ------------------
  806. m4_defun([_LT_LANG],
  807. [m4_ifdef([_LT_LANG_]$1[_enabled], [],
  808. [LT_SUPPORTED_TAG([$1])dnl
  809. m4_append([_LT_TAGS], [$1 ])dnl
  810. m4_define([_LT_LANG_]$1[_enabled], [])dnl
  811. _LT_LANG_$1_CONFIG($1)])dnl
  812. ])# _LT_LANG
  813. m4_ifndef([AC_PROG_GO], [
  814. # NOTE: This macro has been submitted for inclusion into #
  815. # GNU Autoconf as AC_PROG_GO. When it is available in #
  816. # a released version of Autoconf we should remove this #
  817. # macro and use it instead. #
  818. m4_defun([AC_PROG_GO],
  819. [AC_LANG_PUSH(Go)dnl
  820. AC_ARG_VAR([GOC], [Go compiler command])dnl
  821. AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
  822. _AC_ARG_VAR_LDFLAGS()dnl
  823. AC_CHECK_TOOL(GOC, gccgo)
  824. if test -z "$GOC"; then
  825. if test -n "$ac_tool_prefix"; then
  826. AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
  827. fi
  828. fi
  829. if test -z "$GOC"; then
  830. AC_CHECK_PROG(GOC, gccgo, gccgo, false)
  831. fi
  832. ])#m4_defun
  833. ])#m4_ifndef
  834. # _LT_LANG_DEFAULT_CONFIG
  835. # -----------------------
  836. m4_defun([_LT_LANG_DEFAULT_CONFIG],
  837. [AC_PROVIDE_IFELSE([AC_PROG_CXX],
  838. [LT_LANG(CXX)],
  839. [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
  840. AC_PROVIDE_IFELSE([AC_PROG_F77],
  841. [LT_LANG(F77)],
  842. [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
  843. AC_PROVIDE_IFELSE([AC_PROG_FC],
  844. [LT_LANG(FC)],
  845. [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
  846. dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
  847. dnl pulling things in needlessly.
  848. AC_PROVIDE_IFELSE([AC_PROG_GCJ],
  849. [LT_LANG(GCJ)],
  850. [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
  851. [LT_LANG(GCJ)],
  852. [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
  853. [LT_LANG(GCJ)],
  854. [m4_ifdef([AC_PROG_GCJ],
  855. [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
  856. m4_ifdef([A][M_PROG_GCJ],
  857. [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
  858. m4_ifdef([LT_PROG_GCJ],
  859. [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
  860. AC_PROVIDE_IFELSE([AC_PROG_GO],
  861. [LT_LANG(GO)],
  862. [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
  863. AC_PROVIDE_IFELSE([LT_PROG_RC],
  864. [LT_LANG(RC)],
  865. [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
  866. ])# _LT_LANG_DEFAULT_CONFIG
  867. # Obsolete macros:
  868. AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
  869. AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
  870. AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
  871. AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
  872. AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
  873. dnl aclocal-1.4 backwards compatibility:
  874. dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
  875. dnl AC_DEFUN([AC_LIBTOOL_F77], [])
  876. dnl AC_DEFUN([AC_LIBTOOL_FC], [])
  877. dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
  878. dnl AC_DEFUN([AC_LIBTOOL_RC], [])
  879. # _LT_TAG_COMPILER
  880. # ----------------
  881. m4_defun([_LT_TAG_COMPILER],
  882. [AC_REQUIRE([AC_PROG_CC])dnl
  883. _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
  884. _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
  885. _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
  886. _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
  887. # If no C compiler was specified, use CC.
  888. LTCC=${LTCC-"$CC"}
  889. # If no C compiler flags were specified, use CFLAGS.
  890. LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
  891. # Allow CC to be a program name with arguments.
  892. compiler=$CC
  893. ])# _LT_TAG_COMPILER
  894. # _LT_COMPILER_BOILERPLATE
  895. # ------------------------
  896. # Check for compiler boilerplate output or warnings with
  897. # the simple compiler test code.
  898. m4_defun([_LT_COMPILER_BOILERPLATE],
  899. [m4_require([_LT_DECL_SED])dnl
  900. ac_outfile=conftest.$ac_objext
  901. echo "$lt_simple_compile_test_code" >conftest.$ac_ext
  902. eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  903. _lt_compiler_boilerplate=`cat conftest.err`
  904. $RM conftest*
  905. ])# _LT_COMPILER_BOILERPLATE
  906. # _LT_LINKER_BOILERPLATE
  907. # ----------------------
  908. # Check for linker boilerplate output or warnings with
  909. # the simple link test code.
  910. m4_defun([_LT_LINKER_BOILERPLATE],
  911. [m4_require([_LT_DECL_SED])dnl
  912. ac_outfile=conftest.$ac_objext
  913. echo "$lt_simple_link_test_code" >conftest.$ac_ext
  914. eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  915. _lt_linker_boilerplate=`cat conftest.err`
  916. $RM -r conftest*
  917. ])# _LT_LINKER_BOILERPLATE
  918. # _LT_REQUIRED_DARWIN_CHECKS
  919. # -------------------------
  920. m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
  921. case $host_os in
  922. rhapsody* | darwin*)
  923. AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
  924. AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
  925. AC_CHECK_TOOL([LIPO], [lipo], [:])
  926. AC_CHECK_TOOL([OTOOL], [otool], [:])
  927. AC_CHECK_TOOL([OTOOL64], [otool64], [:])
  928. _LT_DECL([], [DSYMUTIL], [1],
  929. [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
  930. _LT_DECL([], [NMEDIT], [1],
  931. [Tool to change global to local symbols on Mac OS X])
  932. _LT_DECL([], [LIPO], [1],
  933. [Tool to manipulate fat objects and archives on Mac OS X])
  934. _LT_DECL([], [OTOOL], [1],
  935. [ldd/readelf like tool for Mach-O binaries on Mac OS X])
  936. _LT_DECL([], [OTOOL64], [1],
  937. [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
  938. AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
  939. [lt_cv_apple_cc_single_mod=no
  940. if test -z "${LT_MULTI_MODULE}"; then
  941. # By default we will add the -single_module flag. You can override
  942. # by either setting the environment variable LT_MULTI_MODULE
  943. # non-empty at configure time, or by adding -multi_module to the
  944. # link flags.
  945. rm -rf libconftest.dylib*
  946. echo "int foo(void){return 1;}" > conftest.c
  947. echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  948. -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
  949. $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  950. -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
  951. _lt_result=$?
  952. # If there is a non-empty error log, and "single_module"
  953. # appears in it, assume the flag caused a linker warning
  954. if test -s conftest.err && $GREP single_module conftest.err; then
  955. cat conftest.err >&AS_MESSAGE_LOG_FD
  956. # Otherwise, if the output was created with a 0 exit code from
  957. # the compiler, it worked.
  958. elif test -f libconftest.dylib && test $_lt_result -eq 0; then
  959. lt_cv_apple_cc_single_mod=yes
  960. else
  961. cat conftest.err >&AS_MESSAGE_LOG_FD
  962. fi
  963. rm -rf libconftest.dylib*
  964. rm -f conftest.*
  965. fi])
  966. AC_CACHE_CHECK([for -exported_symbols_list linker flag],
  967. [lt_cv_ld_exported_symbols_list],
  968. [lt_cv_ld_exported_symbols_list=no
  969. save_LDFLAGS=$LDFLAGS
  970. echo "_main" > conftest.sym
  971. LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
  972. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  973. [lt_cv_ld_exported_symbols_list=yes],
  974. [lt_cv_ld_exported_symbols_list=no])
  975. LDFLAGS="$save_LDFLAGS"
  976. ])
  977. AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
  978. [lt_cv_ld_force_load=no
  979. cat > conftest.c << _LT_EOF
  980. int forced_loaded() { return 2;}
  981. _LT_EOF
  982. echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
  983. $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
  984. echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
  985. $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
  986. echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
  987. $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
  988. cat > conftest.c << _LT_EOF
  989. int main() { return 0;}
  990. _LT_EOF
  991. echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
  992. $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
  993. _lt_result=$?
  994. if test -s conftest.err && $GREP force_load conftest.err; then
  995. cat conftest.err >&AS_MESSAGE_LOG_FD
  996. elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
  997. lt_cv_ld_force_load=yes
  998. else
  999. cat conftest.err >&AS_MESSAGE_LOG_FD
  1000. fi
  1001. rm -f conftest.err libconftest.a conftest conftest.c
  1002. rm -rf conftest.dSYM
  1003. ])
  1004. case $host_os in
  1005. rhapsody* | darwin1.[[012]])
  1006. _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
  1007. darwin1.*)
  1008. _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
  1009. darwin*) # darwin 5.x on
  1010. # if running on 10.5 or later, the deployment target defaults
  1011. # to the OS version, if on x86, and 10.4, the deployment
  1012. # target defaults to 10.4. Don't you love it?
  1013. case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
  1014. 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
  1015. _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
  1016. 10.[[012]]*)
  1017. _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
  1018. 10.*)
  1019. _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
  1020. esac
  1021. ;;
  1022. esac
  1023. if test "$lt_cv_apple_cc_single_mod" = "yes"; then
  1024. _lt_dar_single_mod='$single_module'
  1025. fi
  1026. if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
  1027. _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
  1028. else
  1029. _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
  1030. fi
  1031. if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
  1032. _lt_dsymutil='~$DSYMUTIL $lib || :'
  1033. else
  1034. _lt_dsymutil=
  1035. fi
  1036. ;;
  1037. esac
  1038. ])
  1039. # _LT_DARWIN_LINKER_FEATURES([TAG])
  1040. # ---------------------------------
  1041. # Checks for linker and compiler features on darwin
  1042. m4_defun([_LT_DARWIN_LINKER_FEATURES],
  1043. [
  1044. m4_require([_LT_REQUIRED_DARWIN_CHECKS])
  1045. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  1046. _LT_TAGVAR(hardcode_direct, $1)=no
  1047. _LT_TAGVAR(hardcode_automatic, $1)=yes
  1048. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  1049. if test "$lt_cv_ld_force_load" = "yes"; then
  1050. _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\"`'
  1051. m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
  1052. [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
  1053. else
  1054. _LT_TAGVAR(whole_archive_flag_spec, $1)=''
  1055. fi
  1056. _LT_TAGVAR(link_all_deplibs, $1)=yes
  1057. _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
  1058. case $cc_basename in
  1059. ifort*) _lt_dar_can_shared=yes ;;
  1060. *) _lt_dar_can_shared=$GCC ;;
  1061. esac
  1062. if test "$_lt_dar_can_shared" = "yes"; then
  1063. output_verbose_link_cmd=func_echo_all
  1064. _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}"
  1065. _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
  1066. _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}"
  1067. _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}"
  1068. m4_if([$1], [CXX],
  1069. [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
  1070. _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}"
  1071. _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}"
  1072. fi
  1073. ],[])
  1074. else
  1075. _LT_TAGVAR(ld_shlibs, $1)=no
  1076. fi
  1077. ])
  1078. # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
  1079. # ----------------------------------
  1080. # Links a minimal program and checks the executable
  1081. # for the system default hardcoded library path. In most cases,
  1082. # this is /usr/lib:/lib, but when the MPI compilers are used
  1083. # the location of the communication and MPI libs are included too.
  1084. # If we don't find anything, use the default library path according
  1085. # to the aix ld manual.
  1086. # Store the results from the different compilers for each TAGNAME.
  1087. # Allow to override them for all tags through lt_cv_aix_libpath.
  1088. m4_defun([_LT_SYS_MODULE_PATH_AIX],
  1089. [m4_require([_LT_DECL_SED])dnl
  1090. if test "${lt_cv_aix_libpath+set}" = set; then
  1091. aix_libpath=$lt_cv_aix_libpath
  1092. else
  1093. AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
  1094. [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
  1095. lt_aix_libpath_sed='[
  1096. /Import File Strings/,/^$/ {
  1097. /^0/ {
  1098. s/^0 *\([^ ]*\) *$/\1/
  1099. p
  1100. }
  1101. }]'
  1102. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  1103. # Check for a 64-bit object if we didn't find anything.
  1104. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
  1105. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  1106. fi],[])
  1107. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
  1108. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
  1109. fi
  1110. ])
  1111. aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
  1112. fi
  1113. ])# _LT_SYS_MODULE_PATH_AIX
  1114. # _LT_SHELL_INIT(ARG)
  1115. # -------------------
  1116. m4_define([_LT_SHELL_INIT],
  1117. [m4_divert_text([M4SH-INIT], [$1
  1118. ])])# _LT_SHELL_INIT
  1119. # _LT_PROG_ECHO_BACKSLASH
  1120. # -----------------------
  1121. # Find how we can fake an echo command that does not interpret backslash.
  1122. # In particular, with Autoconf 2.60 or later we add some code to the start
  1123. # of the generated configure script which will find a shell with a builtin
  1124. # printf (which we can use as an echo command).
  1125. m4_defun([_LT_PROG_ECHO_BACKSLASH],
  1126. [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  1127. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  1128. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  1129. AC_MSG_CHECKING([how to print strings])
  1130. # Test print first, because it will be a builtin if present.
  1131. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
  1132. test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
  1133. ECHO='print -r --'
  1134. elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
  1135. ECHO='printf %s\n'
  1136. else
  1137. # Use this function as a fallback that always works.
  1138. func_fallback_echo ()
  1139. {
  1140. eval 'cat <<_LTECHO_EOF
  1141. $[]1
  1142. _LTECHO_EOF'
  1143. }
  1144. ECHO='func_fallback_echo'
  1145. fi
  1146. # func_echo_all arg...
  1147. # Invoke $ECHO with all args, space-separated.
  1148. func_echo_all ()
  1149. {
  1150. $ECHO "$*"
  1151. }
  1152. case "$ECHO" in
  1153. printf*) AC_MSG_RESULT([printf]) ;;
  1154. print*) AC_MSG_RESULT([print -r]) ;;
  1155. *) AC_MSG_RESULT([cat]) ;;
  1156. esac
  1157. m4_ifdef([_AS_DETECT_SUGGESTED],
  1158. [_AS_DETECT_SUGGESTED([
  1159. test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
  1160. ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  1161. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  1162. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  1163. PATH=/empty FPATH=/empty; export PATH FPATH
  1164. test "X`printf %s $ECHO`" = "X$ECHO" \
  1165. || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
  1166. _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
  1167. _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
  1168. ])# _LT_PROG_ECHO_BACKSLASH
  1169. # _LT_WITH_SYSROOT
  1170. # ----------------
  1171. AC_DEFUN([_LT_WITH_SYSROOT],
  1172. [AC_MSG_CHECKING([for sysroot])
  1173. AC_ARG_WITH([sysroot],
  1174. [ --with-sysroot[=DIR] Search for dependent libraries within DIR
  1175. (or the compiler's sysroot if not specified).],
  1176. [], [with_sysroot=no])
  1177. dnl lt_sysroot will always be passed unquoted. We quote it here
  1178. dnl in case the user passed a directory name.
  1179. lt_sysroot=
  1180. case ${with_sysroot} in #(
  1181. yes)
  1182. if test "$GCC" = yes; then
  1183. lt_sysroot=`$CC --print-sysroot 2>/dev/null`
  1184. fi
  1185. ;; #(
  1186. /*)
  1187. lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
  1188. ;; #(
  1189. no|'')
  1190. ;; #(
  1191. *)
  1192. AC_MSG_RESULT([${with_sysroot}])
  1193. AC_MSG_ERROR([The sysroot must be an absolute path.])
  1194. ;;
  1195. esac
  1196. AC_MSG_RESULT([${lt_sysroot:-no}])
  1197. _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
  1198. [dependent libraries, and in which our libraries should be installed.])])
  1199. # _LT_ENABLE_LOCK
  1200. # ---------------
  1201. m4_defun([_LT_ENABLE_LOCK],
  1202. [AC_ARG_ENABLE([libtool-lock],
  1203. [AS_HELP_STRING([--disable-libtool-lock],
  1204. [avoid locking (might break parallel builds)])])
  1205. test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  1206. # Some flags need to be propagated to the compiler or linker for good
  1207. # libtool support.
  1208. case $host in
  1209. ia64-*-hpux*)
  1210. # Find out which ABI we are using.
  1211. echo 'int i;' > conftest.$ac_ext
  1212. if AC_TRY_EVAL(ac_compile); then
  1213. case `/usr/bin/file conftest.$ac_objext` in
  1214. *ELF-32*)
  1215. HPUX_IA64_MODE="32"
  1216. ;;
  1217. *ELF-64*)
  1218. HPUX_IA64_MODE="64"
  1219. ;;
  1220. esac
  1221. fi
  1222. rm -rf conftest*
  1223. ;;
  1224. *-*-irix6*)
  1225. # Find out which ABI we are using.
  1226. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
  1227. if AC_TRY_EVAL(ac_compile); then
  1228. if test "$lt_cv_prog_gnu_ld" = yes; then
  1229. case `/usr/bin/file conftest.$ac_objext` in
  1230. *32-bit*)
  1231. LD="${LD-ld} -melf32bsmip"
  1232. ;;
  1233. *N32*)
  1234. LD="${LD-ld} -melf32bmipn32"
  1235. ;;
  1236. *64-bit*)
  1237. LD="${LD-ld} -melf64bmip"
  1238. ;;
  1239. esac
  1240. else
  1241. case `/usr/bin/file conftest.$ac_objext` in
  1242. *32-bit*)
  1243. LD="${LD-ld} -32"
  1244. ;;
  1245. *N32*)
  1246. LD="${LD-ld} -n32"
  1247. ;;
  1248. *64-bit*)
  1249. LD="${LD-ld} -64"
  1250. ;;
  1251. esac
  1252. fi
  1253. fi
  1254. rm -rf conftest*
  1255. ;;
  1256. x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
  1257. s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
  1258. # Find out which ABI we are using.
  1259. echo 'int i;' > conftest.$ac_ext
  1260. if AC_TRY_EVAL(ac_compile); then
  1261. case `/usr/bin/file conftest.o` in
  1262. *32-bit*)
  1263. case $host in
  1264. x86_64-*kfreebsd*-gnu)
  1265. LD="${LD-ld} -m elf_i386_fbsd"
  1266. ;;
  1267. x86_64-*linux*)
  1268. LD="${LD-ld} -m elf_i386"
  1269. ;;
  1270. ppc64-*linux*|powerpc64-*linux*)
  1271. LD="${LD-ld} -m elf32ppclinux"
  1272. ;;
  1273. s390x-*linux*)
  1274. LD="${LD-ld} -m elf_s390"
  1275. ;;
  1276. sparc64-*linux*)
  1277. LD="${LD-ld} -m elf32_sparc"
  1278. ;;
  1279. esac
  1280. ;;
  1281. *64-bit*)
  1282. case $host in
  1283. x86_64-*kfreebsd*-gnu)
  1284. LD="${LD-ld} -m elf_x86_64_fbsd"
  1285. ;;
  1286. x86_64-*linux*)
  1287. LD="${LD-ld} -m elf_x86_64"
  1288. ;;
  1289. ppc*-*linux*|powerpc*-*linux*)
  1290. LD="${LD-ld} -m elf64ppc"
  1291. ;;
  1292. s390*-*linux*|s390*-*tpf*)
  1293. LD="${LD-ld} -m elf64_s390"
  1294. ;;
  1295. sparc*-*linux*)
  1296. LD="${LD-ld} -m elf64_sparc"
  1297. ;;
  1298. esac
  1299. ;;
  1300. esac
  1301. fi
  1302. rm -rf conftest*
  1303. ;;
  1304. *-*-sco3.2v5*)
  1305. # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  1306. SAVE_CFLAGS="$CFLAGS"
  1307. CFLAGS="$CFLAGS -belf"
  1308. AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
  1309. [AC_LANG_PUSH(C)
  1310. AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
  1311. AC_LANG_POP])
  1312. if test x"$lt_cv_cc_needs_belf" != x"yes"; then
  1313. # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  1314. CFLAGS="$SAVE_CFLAGS"
  1315. fi
  1316. ;;
  1317. *-*solaris*)
  1318. # Find out which ABI we are using.
  1319. echo 'int i;' > conftest.$ac_ext
  1320. if AC_TRY_EVAL(ac_compile); then
  1321. case `/usr/bin/file conftest.o` in
  1322. *64-bit*)
  1323. case $lt_cv_prog_gnu_ld in
  1324. yes*)
  1325. case $host in
  1326. i?86-*-solaris*)
  1327. LD="${LD-ld} -m elf_x86_64"
  1328. ;;
  1329. sparc*-*-solaris*)
  1330. LD="${LD-ld} -m elf64_sparc"
  1331. ;;
  1332. esac
  1333. # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
  1334. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
  1335. LD="${LD-ld}_sol2"
  1336. fi
  1337. ;;
  1338. *)
  1339. if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
  1340. LD="${LD-ld} -64"
  1341. fi
  1342. ;;
  1343. esac
  1344. ;;
  1345. esac
  1346. fi
  1347. rm -rf conftest*
  1348. ;;
  1349. esac
  1350. need_locks="$enable_libtool_lock"
  1351. ])# _LT_ENABLE_LOCK
  1352. # _LT_PROG_AR
  1353. # -----------
  1354. m4_defun([_LT_PROG_AR],
  1355. [AC_CHECK_TOOLS(AR, [ar], false)
  1356. : ${AR=ar}
  1357. : ${AR_FLAGS=cru}
  1358. _LT_DECL([], [AR], [1], [The archiver])
  1359. _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
  1360. AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
  1361. [lt_cv_ar_at_file=no
  1362. AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
  1363. [echo conftest.$ac_objext > conftest.lst
  1364. lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
  1365. AC_TRY_EVAL([lt_ar_try])
  1366. if test "$ac_status" -eq 0; then
  1367. # Ensure the archiver fails upon bogus file names.
  1368. rm -f conftest.$ac_objext libconftest.a
  1369. AC_TRY_EVAL([lt_ar_try])
  1370. if test "$ac_status" -ne 0; then
  1371. lt_cv_ar_at_file=@
  1372. fi
  1373. fi
  1374. rm -f conftest.* libconftest.a
  1375. ])
  1376. ])
  1377. if test "x$lt_cv_ar_at_file" = xno; then
  1378. archiver_list_spec=
  1379. else
  1380. archiver_list_spec=$lt_cv_ar_at_file
  1381. fi
  1382. _LT_DECL([], [archiver_list_spec], [1],
  1383. [How to feed a file listing to the archiver])
  1384. ])# _LT_PROG_AR
  1385. # _LT_CMD_OLD_ARCHIVE
  1386. # -------------------
  1387. m4_defun([_LT_CMD_OLD_ARCHIVE],
  1388. [_LT_PROG_AR
  1389. AC_CHECK_TOOL(STRIP, strip, :)
  1390. test -z "$STRIP" && STRIP=:
  1391. _LT_DECL([], [STRIP], [1], [A symbol stripping program])
  1392. AC_CHECK_TOOL(RANLIB, ranlib, :)
  1393. test -z "$RANLIB" && RANLIB=:
  1394. _LT_DECL([], [RANLIB], [1],
  1395. [Commands used to install an old-style archive])
  1396. # Determine commands to create old-style static archives.
  1397. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
  1398. old_postinstall_cmds='chmod 644 $oldlib'
  1399. old_postuninstall_cmds=
  1400. if test -n "$RANLIB"; then
  1401. case $host_os in
  1402. openbsd*)
  1403. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
  1404. ;;
  1405. *)
  1406. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
  1407. ;;
  1408. esac
  1409. old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
  1410. fi
  1411. case $host_os in
  1412. darwin*)
  1413. lock_old_archive_extraction=yes ;;
  1414. *)
  1415. lock_old_archive_extraction=no ;;
  1416. esac
  1417. _LT_DECL([], [old_postinstall_cmds], [2])
  1418. _LT_DECL([], [old_postuninstall_cmds], [2])
  1419. _LT_TAGDECL([], [old_archive_cmds], [2],
  1420. [Commands used to build an old-style archive])
  1421. _LT_DECL([], [lock_old_archive_extraction], [0],
  1422. [Whether to use a lock for old archive extraction])
  1423. ])# _LT_CMD_OLD_ARCHIVE
  1424. # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  1425. # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
  1426. # ----------------------------------------------------------------
  1427. # Check whether the given compiler option works
  1428. AC_DEFUN([_LT_COMPILER_OPTION],
  1429. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1430. m4_require([_LT_DECL_SED])dnl
  1431. AC_CACHE_CHECK([$1], [$2],
  1432. [$2=no
  1433. m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
  1434. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  1435. lt_compiler_flag="$3"
  1436. # Insert the option either (1) after the last *FLAGS variable, or
  1437. # (2) before a word containing "conftest.", or (3) at the end.
  1438. # Note that $ac_compile itself does not contain backslashes and begins
  1439. # with a dollar sign (not a hyphen), so the echo should work correctly.
  1440. # The option is referenced via a variable to avoid confusing sed.
  1441. lt_compile=`echo "$ac_compile" | $SED \
  1442. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  1443. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  1444. -e 's:$: $lt_compiler_flag:'`
  1445. (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  1446. (eval "$lt_compile" 2>conftest.err)
  1447. ac_status=$?
  1448. cat conftest.err >&AS_MESSAGE_LOG_FD
  1449. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  1450. if (exit $ac_status) && test -s "$ac_outfile"; then
  1451. # The compiler can only warn and ignore the option if not recognized
  1452. # So say no if there are warnings other than the usual output.
  1453. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
  1454. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  1455. if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
  1456. $2=yes
  1457. fi
  1458. fi
  1459. $RM conftest*
  1460. ])
  1461. if test x"[$]$2" = xyes; then
  1462. m4_if([$5], , :, [$5])
  1463. else
  1464. m4_if([$6], , :, [$6])
  1465. fi
  1466. ])# _LT_COMPILER_OPTION
  1467. # Old name:
  1468. AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
  1469. dnl aclocal-1.4 backwards compatibility:
  1470. dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
  1471. # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  1472. # [ACTION-SUCCESS], [ACTION-FAILURE])
  1473. # ----------------------------------------------------
  1474. # Check whether the given linker option works
  1475. AC_DEFUN([_LT_LINKER_OPTION],
  1476. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1477. m4_require([_LT_DECL_SED])dnl
  1478. AC_CACHE_CHECK([$1], [$2],
  1479. [$2=no
  1480. save_LDFLAGS="$LDFLAGS"
  1481. LDFLAGS="$LDFLAGS $3"
  1482. echo "$lt_simple_link_test_code" > conftest.$ac_ext
  1483. if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
  1484. # The linker can only warn and ignore the option if not recognized
  1485. # So say no if there are warnings
  1486. if test -s conftest.err; then
  1487. # Append any errors to the config.log.
  1488. cat conftest.err 1>&AS_MESSAGE_LOG_FD
  1489. $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
  1490. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  1491. if diff conftest.exp conftest.er2 >/dev/null; then
  1492. $2=yes
  1493. fi
  1494. else
  1495. $2=yes
  1496. fi
  1497. fi
  1498. $RM -r conftest*
  1499. LDFLAGS="$save_LDFLAGS"
  1500. ])
  1501. if test x"[$]$2" = xyes; then
  1502. m4_if([$4], , :, [$4])
  1503. else
  1504. m4_if([$5], , :, [$5])
  1505. fi
  1506. ])# _LT_LINKER_OPTION
  1507. # Old name:
  1508. AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
  1509. dnl aclocal-1.4 backwards compatibility:
  1510. dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
  1511. # LT_CMD_MAX_LEN
  1512. #---------------
  1513. AC_DEFUN([LT_CMD_MAX_LEN],
  1514. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  1515. # find the maximum length of command line arguments
  1516. AC_MSG_CHECKING([the maximum length of command line arguments])
  1517. AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
  1518. i=0
  1519. teststring="ABCD"
  1520. case $build_os in
  1521. msdosdjgpp*)
  1522. # On DJGPP, this test can blow up pretty badly due to problems in libc
  1523. # (any single argument exceeding 2000 bytes causes a buffer overrun
  1524. # during glob expansion). Even if it were fixed, the result of this
  1525. # check would be larger than it should be.
  1526. lt_cv_sys_max_cmd_len=12288; # 12K is about right
  1527. ;;
  1528. gnu*)
  1529. # Under GNU Hurd, this test is not required because there is
  1530. # no limit to the length of command line arguments.
  1531. # Libtool will interpret -1 as no limit whatsoever
  1532. lt_cv_sys_max_cmd_len=-1;
  1533. ;;
  1534. cygwin* | mingw* | cegcc*)
  1535. # On Win9x/ME, this test blows up -- it succeeds, but takes
  1536. # about 5 minutes as the teststring grows exponentially.
  1537. # Worse, since 9x/ME are not pre-emptively multitasking,
  1538. # you end up with a "frozen" computer, even though with patience
  1539. # the test eventually succeeds (with a max line length of 256k).
  1540. # Instead, let's just punt: use the minimum linelength reported by
  1541. # all of the supported platforms: 8192 (on NT/2K/XP).
  1542. lt_cv_sys_max_cmd_len=8192;
  1543. ;;
  1544. mint*)
  1545. # On MiNT this can take a long time and run out of memory.
  1546. lt_cv_sys_max_cmd_len=8192;
  1547. ;;
  1548. amigaos*)
  1549. # On AmigaOS with pdksh, this test takes hours, literally.
  1550. # So we just punt and use a minimum line length of 8192.
  1551. lt_cv_sys_max_cmd_len=8192;
  1552. ;;
  1553. netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
  1554. # This has been around since 386BSD, at least. Likely further.
  1555. if test -x /sbin/sysctl; then
  1556. lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
  1557. elif test -x /usr/sbin/sysctl; then
  1558. lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
  1559. else
  1560. lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
  1561. fi
  1562. # And add a safety zone
  1563. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  1564. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  1565. ;;
  1566. interix*)
  1567. # We know the value 262144 and hardcode it with a safety zone (like BSD)
  1568. lt_cv_sys_max_cmd_len=196608
  1569. ;;
  1570. os2*)
  1571. # The test takes a long time on OS/2.
  1572. lt_cv_sys_max_cmd_len=8192
  1573. ;;
  1574. osf*)
  1575. # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
  1576. # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
  1577. # nice to cause kernel panics so lets avoid the loop below.
  1578. # First set a reasonable default.
  1579. lt_cv_sys_max_cmd_len=16384
  1580. #
  1581. if test -x /sbin/sysconfig; then
  1582. case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
  1583. *1*) lt_cv_sys_max_cmd_len=-1 ;;
  1584. esac
  1585. fi
  1586. ;;
  1587. sco3.2v5*)
  1588. lt_cv_sys_max_cmd_len=102400
  1589. ;;
  1590. sysv5* | sco5v6* | sysv4.2uw2*)
  1591. kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
  1592. if test -n "$kargmax"; then
  1593. lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
  1594. else
  1595. lt_cv_sys_max_cmd_len=32768
  1596. fi
  1597. ;;
  1598. *)
  1599. lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
  1600. if test -n "$lt_cv_sys_max_cmd_len"; then
  1601. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  1602. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  1603. else
  1604. # Make teststring a little bigger before we do anything with it.
  1605. # a 1K string should be a reasonable start.
  1606. for i in 1 2 3 4 5 6 7 8 ; do
  1607. teststring=$teststring$teststring
  1608. done
  1609. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
  1610. # If test is not a shell built-in, we'll probably end up computing a
  1611. # maximum length that is only half of the actual maximum length, but
  1612. # we can't tell.
  1613. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
  1614. = "X$teststring$teststring"; } >/dev/null 2>&1 &&
  1615. test $i != 17 # 1/2 MB should be enough
  1616. do
  1617. i=`expr $i + 1`
  1618. teststring=$teststring$teststring
  1619. done
  1620. # Only check the string length outside the loop.
  1621. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
  1622. teststring=
  1623. # Add a significant safety factor because C++ compilers can tack on
  1624. # massive amounts of additional arguments before passing them to the
  1625. # linker. It appears as though 1/2 is a usable value.
  1626. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
  1627. fi
  1628. ;;
  1629. esac
  1630. ])
  1631. if test -n $lt_cv_sys_max_cmd_len ; then
  1632. AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
  1633. else
  1634. AC_MSG_RESULT(none)
  1635. fi
  1636. max_cmd_len=$lt_cv_sys_max_cmd_len
  1637. _LT_DECL([], [max_cmd_len], [0],
  1638. [What is the maximum length of a command?])
  1639. ])# LT_CMD_MAX_LEN
  1640. # Old name:
  1641. AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
  1642. dnl aclocal-1.4 backwards compatibility:
  1643. dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
  1644. # _LT_HEADER_DLFCN
  1645. # ----------------
  1646. m4_defun([_LT_HEADER_DLFCN],
  1647. [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
  1648. ])# _LT_HEADER_DLFCN
  1649. # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
  1650. # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
  1651. # ----------------------------------------------------------------
  1652. m4_defun([_LT_TRY_DLOPEN_SELF],
  1653. [m4_require([_LT_HEADER_DLFCN])dnl
  1654. if test "$cross_compiling" = yes; then :
  1655. [$4]
  1656. else
  1657. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  1658. lt_status=$lt_dlunknown
  1659. cat > conftest.$ac_ext <<_LT_EOF
  1660. [#line $LINENO "configure"
  1661. #include "confdefs.h"
  1662. #if HAVE_DLFCN_H
  1663. #include <dlfcn.h>
  1664. #endif
  1665. #include <stdio.h>
  1666. #ifdef RTLD_GLOBAL
  1667. # define LT_DLGLOBAL RTLD_GLOBAL
  1668. #else
  1669. # ifdef DL_GLOBAL
  1670. # define LT_DLGLOBAL DL_GLOBAL
  1671. # else
  1672. # define LT_DLGLOBAL 0
  1673. # endif
  1674. #endif
  1675. /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
  1676. find out it does not work in some platform. */
  1677. #ifndef LT_DLLAZY_OR_NOW
  1678. # ifdef RTLD_LAZY
  1679. # define LT_DLLAZY_OR_NOW RTLD_LAZY
  1680. # else
  1681. # ifdef DL_LAZY
  1682. # define LT_DLLAZY_OR_NOW DL_LAZY
  1683. # else
  1684. # ifdef RTLD_NOW
  1685. # define LT_DLLAZY_OR_NOW RTLD_NOW
  1686. # else
  1687. # ifdef DL_NOW
  1688. # define LT_DLLAZY_OR_NOW DL_NOW
  1689. # else
  1690. # define LT_DLLAZY_OR_NOW 0
  1691. # endif
  1692. # endif
  1693. # endif
  1694. # endif
  1695. #endif
  1696. /* When -fvisbility=hidden is used, assume the code has been annotated
  1697. correspondingly for the symbols needed. */
  1698. #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
  1699. int fnord () __attribute__((visibility("default")));
  1700. #endif
  1701. int fnord () { return 42; }
  1702. int main ()
  1703. {
  1704. void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  1705. int status = $lt_dlunknown;
  1706. if (self)
  1707. {
  1708. if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
  1709. else
  1710. {
  1711. if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
  1712. else puts (dlerror ());
  1713. }
  1714. /* dlclose (self); */
  1715. }
  1716. else
  1717. puts (dlerror ());
  1718. return status;
  1719. }]
  1720. _LT_EOF
  1721. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
  1722. (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
  1723. lt_status=$?
  1724. case x$lt_status in
  1725. x$lt_dlno_uscore) $1 ;;
  1726. x$lt_dlneed_uscore) $2 ;;
  1727. x$lt_dlunknown|x*) $3 ;;
  1728. esac
  1729. else :
  1730. # compilation failed
  1731. $3
  1732. fi
  1733. fi
  1734. rm -fr conftest*
  1735. ])# _LT_TRY_DLOPEN_SELF
  1736. # LT_SYS_DLOPEN_SELF
  1737. # ------------------
  1738. AC_DEFUN([LT_SYS_DLOPEN_SELF],
  1739. [m4_require([_LT_HEADER_DLFCN])dnl
  1740. if test "x$enable_dlopen" != xyes; then
  1741. enable_dlopen=unknown
  1742. enable_dlopen_self=unknown
  1743. enable_dlopen_self_static=unknown
  1744. else
  1745. lt_cv_dlopen=no
  1746. lt_cv_dlopen_libs=
  1747. case $host_os in
  1748. beos*)
  1749. lt_cv_dlopen="load_add_on"
  1750. lt_cv_dlopen_libs=
  1751. lt_cv_dlopen_self=yes
  1752. ;;
  1753. mingw* | pw32* | cegcc*)
  1754. lt_cv_dlopen="LoadLibrary"
  1755. lt_cv_dlopen_libs=
  1756. ;;
  1757. cygwin*)
  1758. lt_cv_dlopen="dlopen"
  1759. lt_cv_dlopen_libs=
  1760. ;;
  1761. darwin*)
  1762. # if libdl is installed we need to link against it
  1763. AC_CHECK_LIB([dl], [dlopen],
  1764. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
  1765. lt_cv_dlopen="dyld"
  1766. lt_cv_dlopen_libs=
  1767. lt_cv_dlopen_self=yes
  1768. ])
  1769. ;;
  1770. *)
  1771. AC_CHECK_FUNC([shl_load],
  1772. [lt_cv_dlopen="shl_load"],
  1773. [AC_CHECK_LIB([dld], [shl_load],
  1774. [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
  1775. [AC_CHECK_FUNC([dlopen],
  1776. [lt_cv_dlopen="dlopen"],
  1777. [AC_CHECK_LIB([dl], [dlopen],
  1778. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
  1779. [AC_CHECK_LIB([svld], [dlopen],
  1780. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
  1781. [AC_CHECK_LIB([dld], [dld_link],
  1782. [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
  1783. ])
  1784. ])
  1785. ])
  1786. ])
  1787. ])
  1788. ;;
  1789. esac
  1790. if test "x$lt_cv_dlopen" != xno; then
  1791. enable_dlopen=yes
  1792. else
  1793. enable_dlopen=no
  1794. fi
  1795. case $lt_cv_dlopen in
  1796. dlopen)
  1797. save_CPPFLAGS="$CPPFLAGS"
  1798. test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  1799. save_LDFLAGS="$LDFLAGS"
  1800. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  1801. save_LIBS="$LIBS"
  1802. LIBS="$lt_cv_dlopen_libs $LIBS"
  1803. AC_CACHE_CHECK([whether a program can dlopen itself],
  1804. lt_cv_dlopen_self, [dnl
  1805. _LT_TRY_DLOPEN_SELF(
  1806. lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
  1807. lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
  1808. ])
  1809. if test "x$lt_cv_dlopen_self" = xyes; then
  1810. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
  1811. AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
  1812. lt_cv_dlopen_self_static, [dnl
  1813. _LT_TRY_DLOPEN_SELF(
  1814. lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
  1815. lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
  1816. ])
  1817. fi
  1818. CPPFLAGS="$save_CPPFLAGS"
  1819. LDFLAGS="$save_LDFLAGS"
  1820. LIBS="$save_LIBS"
  1821. ;;
  1822. esac
  1823. case $lt_cv_dlopen_self in
  1824. yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  1825. *) enable_dlopen_self=unknown ;;
  1826. esac
  1827. case $lt_cv_dlopen_self_static in
  1828. yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  1829. *) enable_dlopen_self_static=unknown ;;
  1830. esac
  1831. fi
  1832. _LT_DECL([dlopen_support], [enable_dlopen], [0],
  1833. [Whether dlopen is supported])
  1834. _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
  1835. [Whether dlopen of programs is supported])
  1836. _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
  1837. [Whether dlopen of statically linked programs is supported])
  1838. ])# LT_SYS_DLOPEN_SELF
  1839. # Old name:
  1840. AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
  1841. dnl aclocal-1.4 backwards compatibility:
  1842. dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
  1843. # _LT_COMPILER_C_O([TAGNAME])
  1844. # ---------------------------
  1845. # Check to see if options -c and -o are simultaneously supported by compiler.
  1846. # This macro does not hard code the compiler like AC_PROG_CC_C_O.
  1847. m4_defun([_LT_COMPILER_C_O],
  1848. [m4_require([_LT_DECL_SED])dnl
  1849. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1850. m4_require([_LT_TAG_COMPILER])dnl
  1851. AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
  1852. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
  1853. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
  1854. $RM -r conftest 2>/dev/null
  1855. mkdir conftest
  1856. cd conftest
  1857. mkdir out
  1858. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  1859. lt_compiler_flag="-o out/conftest2.$ac_objext"
  1860. # Insert the option either (1) after the last *FLAGS variable, or
  1861. # (2) before a word containing "conftest.", or (3) at the end.
  1862. # Note that $ac_compile itself does not contain backslashes and begins
  1863. # with a dollar sign (not a hyphen), so the echo should work correctly.
  1864. lt_compile=`echo "$ac_compile" | $SED \
  1865. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  1866. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  1867. -e 's:$: $lt_compiler_flag:'`
  1868. (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  1869. (eval "$lt_compile" 2>out/conftest.err)
  1870. ac_status=$?
  1871. cat out/conftest.err >&AS_MESSAGE_LOG_FD
  1872. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  1873. if (exit $ac_status) && test -s out/conftest2.$ac_objext
  1874. then
  1875. # The compiler can only warn and ignore the option if not recognized
  1876. # So say no if there are warnings
  1877. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
  1878. $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
  1879. if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
  1880. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  1881. fi
  1882. fi
  1883. chmod u+w . 2>&AS_MESSAGE_LOG_FD
  1884. $RM conftest*
  1885. # SGI C++ compiler will create directory out/ii_files/ for
  1886. # template instantiation
  1887. test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
  1888. $RM out/* && rmdir out
  1889. cd ..
  1890. $RM -r conftest
  1891. $RM conftest*
  1892. ])
  1893. _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
  1894. [Does compiler simultaneously support -c and -o options?])
  1895. ])# _LT_COMPILER_C_O
  1896. # _LT_COMPILER_FILE_LOCKS([TAGNAME])
  1897. # ----------------------------------
  1898. # Check to see if we can do hard links to lock some files if needed
  1899. m4_defun([_LT_COMPILER_FILE_LOCKS],
  1900. [m4_require([_LT_ENABLE_LOCK])dnl
  1901. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1902. _LT_COMPILER_C_O([$1])
  1903. hard_links="nottested"
  1904. if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
  1905. # do not overwrite the value of need_locks provided by the user
  1906. AC_MSG_CHECKING([if we can lock with hard links])
  1907. hard_links=yes
  1908. $RM conftest*
  1909. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1910. touch conftest.a
  1911. ln conftest.a conftest.b 2>&5 || hard_links=no
  1912. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1913. AC_MSG_RESULT([$hard_links])
  1914. if test "$hard_links" = no; then
  1915. AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
  1916. need_locks=warn
  1917. fi
  1918. else
  1919. need_locks=no
  1920. fi
  1921. _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
  1922. ])# _LT_COMPILER_FILE_LOCKS
  1923. # _LT_CHECK_OBJDIR
  1924. # ----------------
  1925. m4_defun([_LT_CHECK_OBJDIR],
  1926. [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
  1927. [rm -f .libs 2>/dev/null
  1928. mkdir .libs 2>/dev/null
  1929. if test -d .libs; then
  1930. lt_cv_objdir=.libs
  1931. else
  1932. # MS-DOS does not allow filenames that begin with a dot.
  1933. lt_cv_objdir=_libs
  1934. fi
  1935. rmdir .libs 2>/dev/null])
  1936. objdir=$lt_cv_objdir
  1937. _LT_DECL([], [objdir], [0],
  1938. [The name of the directory that contains temporary libtool files])dnl
  1939. m4_pattern_allow([LT_OBJDIR])dnl
  1940. AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
  1941. [Define to the sub-directory in which libtool stores uninstalled libraries.])
  1942. ])# _LT_CHECK_OBJDIR
  1943. # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
  1944. # --------------------------------------
  1945. # Check hardcoding attributes.
  1946. m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
  1947. [AC_MSG_CHECKING([how to hardcode library paths into programs])
  1948. _LT_TAGVAR(hardcode_action, $1)=
  1949. if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
  1950. test -n "$_LT_TAGVAR(runpath_var, $1)" ||
  1951. test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
  1952. # We can hardcode non-existent directories.
  1953. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
  1954. # If the only mechanism to avoid hardcoding is shlibpath_var, we
  1955. # have to relink, otherwise we might link with an installed library
  1956. # when we should be linking with a yet-to-be-installed one
  1957. ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
  1958. test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
  1959. # Linking always hardcodes the temporary library directory.
  1960. _LT_TAGVAR(hardcode_action, $1)=relink
  1961. else
  1962. # We can link without hardcoding, and we can hardcode nonexisting dirs.
  1963. _LT_TAGVAR(hardcode_action, $1)=immediate
  1964. fi
  1965. else
  1966. # We cannot hardcode anything, or else we can only hardcode existing
  1967. # directories.
  1968. _LT_TAGVAR(hardcode_action, $1)=unsupported
  1969. fi
  1970. AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
  1971. if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
  1972. test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
  1973. # Fast installation is not supported
  1974. enable_fast_install=no
  1975. elif test "$shlibpath_overrides_runpath" = yes ||
  1976. test "$enable_shared" = no; then
  1977. # Fast installation is not necessary
  1978. enable_fast_install=needless
  1979. fi
  1980. _LT_TAGDECL([], [hardcode_action], [0],
  1981. [How to hardcode a shared library path into an executable])
  1982. ])# _LT_LINKER_HARDCODE_LIBPATH
  1983. # _LT_CMD_STRIPLIB
  1984. # ----------------
  1985. m4_defun([_LT_CMD_STRIPLIB],
  1986. [m4_require([_LT_DECL_EGREP])
  1987. striplib=
  1988. old_striplib=
  1989. AC_MSG_CHECKING([whether stripping libraries is possible])
  1990. if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
  1991. test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
  1992. test -z "$striplib" && striplib="$STRIP --strip-unneeded"
  1993. AC_MSG_RESULT([yes])
  1994. else
  1995. # FIXME - insert some real tests, host_os isn't really good enough
  1996. case $host_os in
  1997. darwin*)
  1998. if test -n "$STRIP" ; then
  1999. striplib="$STRIP -x"
  2000. old_striplib="$STRIP -S"
  2001. AC_MSG_RESULT([yes])
  2002. else
  2003. AC_MSG_RESULT([no])
  2004. fi
  2005. ;;
  2006. *)
  2007. AC_MSG_RESULT([no])
  2008. ;;
  2009. esac
  2010. fi
  2011. _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
  2012. _LT_DECL([], [striplib], [1])
  2013. ])# _LT_CMD_STRIPLIB
  2014. # _LT_SYS_DYNAMIC_LINKER([TAG])
  2015. # -----------------------------
  2016. # PORTME Fill in your ld.so characteristics
  2017. m4_defun([_LT_SYS_DYNAMIC_LINKER],
  2018. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2019. m4_require([_LT_DECL_EGREP])dnl
  2020. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  2021. m4_require([_LT_DECL_OBJDUMP])dnl
  2022. m4_require([_LT_DECL_SED])dnl
  2023. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  2024. AC_MSG_CHECKING([dynamic linker characteristics])
  2025. m4_if([$1],
  2026. [], [
  2027. if test "$GCC" = yes; then
  2028. case $host_os in
  2029. darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
  2030. *) lt_awk_arg="/^libraries:/" ;;
  2031. esac
  2032. case $host_os in
  2033. mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
  2034. *) lt_sed_strip_eq="s,=/,/,g" ;;
  2035. esac
  2036. lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
  2037. case $lt_search_path_spec in
  2038. *\;*)
  2039. # if the path contains ";" then we assume it to be the separator
  2040. # otherwise default to the standard path separator (i.e. ":") - it is
  2041. # assumed that no part of a normal pathname contains ";" but that should
  2042. # okay in the real world where ";" in dirpaths is itself problematic.
  2043. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
  2044. ;;
  2045. *)
  2046. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
  2047. ;;
  2048. esac
  2049. # Ok, now we have the path, separated by spaces, we can step through it
  2050. # and add multilib dir if necessary.
  2051. lt_tmp_lt_search_path_spec=
  2052. lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
  2053. for lt_sys_path in $lt_search_path_spec; do
  2054. if test -d "$lt_sys_path/$lt_multi_os_dir"; then
  2055. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
  2056. else
  2057. test -d "$lt_sys_path" && \
  2058. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
  2059. fi
  2060. done
  2061. lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
  2062. BEGIN {RS=" "; FS="/|\n";} {
  2063. lt_foo="";
  2064. lt_count=0;
  2065. for (lt_i = NF; lt_i > 0; lt_i--) {
  2066. if ($lt_i != "" && $lt_i != ".") {
  2067. if ($lt_i == "..") {
  2068. lt_count++;
  2069. } else {
  2070. if (lt_count == 0) {
  2071. lt_foo="/" $lt_i lt_foo;
  2072. } else {
  2073. lt_count--;
  2074. }
  2075. }
  2076. }
  2077. }
  2078. if (lt_foo != "") { lt_freq[[lt_foo]]++; }
  2079. if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
  2080. }'`
  2081. # AWK program above erroneously prepends '/' to C:/dos/paths
  2082. # for these hosts.
  2083. case $host_os in
  2084. mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
  2085. $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
  2086. esac
  2087. sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
  2088. else
  2089. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  2090. fi])
  2091. library_names_spec=
  2092. libname_spec='lib$name'
  2093. soname_spec=
  2094. shrext_cmds=".so"
  2095. postinstall_cmds=
  2096. postuninstall_cmds=
  2097. finish_cmds=
  2098. finish_eval=
  2099. shlibpath_var=
  2100. shlibpath_overrides_runpath=unknown
  2101. version_type=none
  2102. dynamic_linker="$host_os ld.so"
  2103. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  2104. need_lib_prefix=unknown
  2105. hardcode_into_libs=no
  2106. # when you set need_version to no, make sure it does not cause -set_version
  2107. # flags to be left without arguments
  2108. need_version=unknown
  2109. case $host_os in
  2110. aix3*)
  2111. version_type=linux # correct to gnu/linux during the next big refactor
  2112. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
  2113. shlibpath_var=LIBPATH
  2114. # AIX 3 has no versioning support, so we append a major version to the name.
  2115. soname_spec='${libname}${release}${shared_ext}$major'
  2116. ;;
  2117. aix[[4-9]]*)
  2118. version_type=linux # correct to gnu/linux during the next big refactor
  2119. need_lib_prefix=no
  2120. need_version=no
  2121. hardcode_into_libs=yes
  2122. if test "$host_cpu" = ia64; then
  2123. # AIX 5 supports IA64
  2124. library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
  2125. shlibpath_var=LD_LIBRARY_PATH
  2126. else
  2127. # With GCC up to 2.95.x, collect2 would create an import file
  2128. # for dependence libraries. The import file would start with
  2129. # the line `#! .'. This would cause the generated library to
  2130. # depend on `.', always an invalid library. This was fixed in
  2131. # development snapshots of GCC prior to 3.0.
  2132. case $host_os in
  2133. aix4 | aix4.[[01]] | aix4.[[01]].*)
  2134. if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
  2135. echo ' yes '
  2136. echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
  2137. :
  2138. else
  2139. can_build_shared=no
  2140. fi
  2141. ;;
  2142. esac
  2143. # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
  2144. # soname into executable. Probably we can add versioning support to
  2145. # collect2, so additional links can be useful in future.
  2146. if test "$aix_use_runtimelinking" = yes; then
  2147. # If using run time linking (on AIX 4.2 or later) use lib<name>.so
  2148. # instead of lib<name>.a to let people know that these are not
  2149. # typical AIX shared libraries.
  2150. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2151. else
  2152. # We preserve .a as extension for shared libraries through AIX4.2
  2153. # and later when we are not doing run time linking.
  2154. library_names_spec='${libname}${release}.a $libname.a'
  2155. soname_spec='${libname}${release}${shared_ext}$major'
  2156. fi
  2157. shlibpath_var=LIBPATH
  2158. fi
  2159. ;;
  2160. amigaos*)
  2161. case $host_cpu in
  2162. powerpc)
  2163. # Since July 2007 AmigaOS4 officially supports .so libraries.
  2164. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
  2165. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2166. ;;
  2167. m68k)
  2168. library_names_spec='$libname.ixlibrary $libname.a'
  2169. # Create ${libname}_ixlibrary.a entries in /sys/libs.
  2170. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
  2171. ;;
  2172. esac
  2173. ;;
  2174. beos*)
  2175. library_names_spec='${libname}${shared_ext}'
  2176. dynamic_linker="$host_os ld.so"
  2177. shlibpath_var=LIBRARY_PATH
  2178. ;;
  2179. bsdi[[45]]*)
  2180. version_type=linux # correct to gnu/linux during the next big refactor
  2181. need_version=no
  2182. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2183. soname_spec='${libname}${release}${shared_ext}$major'
  2184. finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  2185. shlibpath_var=LD_LIBRARY_PATH
  2186. sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  2187. sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  2188. # the default ld.so.conf also contains /usr/contrib/lib and
  2189. # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  2190. # libtool to hard-code these into programs
  2191. ;;
  2192. cygwin* | mingw* | pw32* | cegcc*)
  2193. version_type=windows
  2194. shrext_cmds=".dll"
  2195. need_version=no
  2196. need_lib_prefix=no
  2197. case $GCC,$cc_basename in
  2198. yes,*)
  2199. # gcc
  2200. library_names_spec='$libname.dll.a'
  2201. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  2202. postinstall_cmds='base_file=`basename \${file}`~
  2203. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
  2204. dldir=$destdir/`dirname \$dlpath`~
  2205. test -d \$dldir || mkdir -p \$dldir~
  2206. $install_prog $dir/$dlname \$dldir/$dlname~
  2207. chmod a+x \$dldir/$dlname~
  2208. if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
  2209. eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
  2210. fi'
  2211. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  2212. dlpath=$dir/\$dldll~
  2213. $RM \$dlpath'
  2214. shlibpath_overrides_runpath=yes
  2215. case $host_os in
  2216. cygwin*)
  2217. # Cygwin DLLs use 'cyg' prefix rather than 'lib'
  2218. soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  2219. m4_if([$1], [],[
  2220. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
  2221. ;;
  2222. mingw* | cegcc*)
  2223. # MinGW DLLs use traditional 'lib' prefix
  2224. soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  2225. ;;
  2226. pw32*)
  2227. # pw32 DLLs use 'pw' prefix rather than 'lib'
  2228. library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  2229. ;;
  2230. esac
  2231. dynamic_linker='Win32 ld.exe'
  2232. ;;
  2233. *,cl*)
  2234. # Native MSVC
  2235. libname_spec='$name'
  2236. soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  2237. library_names_spec='${libname}.dll.lib'
  2238. case $build_os in
  2239. mingw*)
  2240. sys_lib_search_path_spec=
  2241. lt_save_ifs=$IFS
  2242. IFS=';'
  2243. for lt_path in $LIB
  2244. do
  2245. IFS=$lt_save_ifs
  2246. # Let DOS variable expansion print the short 8.3 style file name.
  2247. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
  2248. sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
  2249. done
  2250. IFS=$lt_save_ifs
  2251. # Convert to MSYS style.
  2252. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
  2253. ;;
  2254. cygwin*)
  2255. # Convert to unix form, then to dos form, then back to unix form
  2256. # but this time dos style (no spaces!) so that the unix form looks
  2257. # like /cygdrive/c/PROGRA~1:/cygdr...
  2258. sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
  2259. sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
  2260. sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  2261. ;;
  2262. *)
  2263. sys_lib_search_path_spec="$LIB"
  2264. if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
  2265. # It is most probably a Windows format PATH.
  2266. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  2267. else
  2268. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  2269. fi
  2270. # FIXME: find the short name or the path components, as spaces are
  2271. # common. (e.g. "Program Files" -> "PROGRA~1")
  2272. ;;
  2273. esac
  2274. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  2275. postinstall_cmds='base_file=`basename \${file}`~
  2276. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
  2277. dldir=$destdir/`dirname \$dlpath`~
  2278. test -d \$dldir || mkdir -p \$dldir~
  2279. $install_prog $dir/$dlname \$dldir/$dlname'
  2280. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  2281. dlpath=$dir/\$dldll~
  2282. $RM \$dlpath'
  2283. shlibpath_overrides_runpath=yes
  2284. dynamic_linker='Win32 link.exe'
  2285. ;;
  2286. *)
  2287. # Assume MSVC wrapper
  2288. library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
  2289. dynamic_linker='Win32 ld.exe'
  2290. ;;
  2291. esac
  2292. # FIXME: first we should search . and the directory the executable is in
  2293. shlibpath_var=PATH
  2294. ;;
  2295. darwin* | rhapsody*)
  2296. dynamic_linker="$host_os dyld"
  2297. version_type=darwin
  2298. need_lib_prefix=no
  2299. need_version=no
  2300. library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
  2301. soname_spec='${libname}${release}${major}$shared_ext'
  2302. shlibpath_overrides_runpath=yes
  2303. shlibpath_var=DYLD_LIBRARY_PATH
  2304. shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
  2305. m4_if([$1], [],[
  2306. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
  2307. sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
  2308. ;;
  2309. dgux*)
  2310. version_type=linux # correct to gnu/linux during the next big refactor
  2311. need_lib_prefix=no
  2312. need_version=no
  2313. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
  2314. soname_spec='${libname}${release}${shared_ext}$major'
  2315. shlibpath_var=LD_LIBRARY_PATH
  2316. ;;
  2317. freebsd* | dragonfly*)
  2318. # DragonFly does not have aout. When/if they implement a new
  2319. # versioning mechanism, adjust this.
  2320. if test -x /usr/bin/objformat; then
  2321. objformat=`/usr/bin/objformat`
  2322. else
  2323. case $host_os in
  2324. freebsd[[23]].*) objformat=aout ;;
  2325. *) objformat=elf ;;
  2326. esac
  2327. fi
  2328. version_type=freebsd-$objformat
  2329. case $version_type in
  2330. freebsd-elf*)
  2331. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  2332. need_version=no
  2333. need_lib_prefix=no
  2334. ;;
  2335. freebsd-*)
  2336. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
  2337. need_version=yes
  2338. ;;
  2339. esac
  2340. shlibpath_var=LD_LIBRARY_PATH
  2341. case $host_os in
  2342. freebsd2.*)
  2343. shlibpath_overrides_runpath=yes
  2344. ;;
  2345. freebsd3.[[01]]* | freebsdelf3.[[01]]*)
  2346. shlibpath_overrides_runpath=yes
  2347. hardcode_into_libs=yes
  2348. ;;
  2349. freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
  2350. freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
  2351. shlibpath_overrides_runpath=no
  2352. hardcode_into_libs=yes
  2353. ;;
  2354. *) # from 4.6 on, and DragonFly
  2355. shlibpath_overrides_runpath=yes
  2356. hardcode_into_libs=yes
  2357. ;;
  2358. esac
  2359. ;;
  2360. gnu*)
  2361. version_type=linux # correct to gnu/linux during the next big refactor
  2362. need_lib_prefix=no
  2363. need_version=no
  2364. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  2365. soname_spec='${libname}${release}${shared_ext}$major'
  2366. shlibpath_var=LD_LIBRARY_PATH
  2367. shlibpath_overrides_runpath=no
  2368. hardcode_into_libs=yes
  2369. ;;
  2370. haiku*)
  2371. version_type=linux # correct to gnu/linux during the next big refactor
  2372. need_lib_prefix=no
  2373. need_version=no
  2374. dynamic_linker="$host_os runtime_loader"
  2375. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  2376. soname_spec='${libname}${release}${shared_ext}$major'
  2377. shlibpath_var=LIBRARY_PATH
  2378. shlibpath_overrides_runpath=yes
  2379. sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
  2380. hardcode_into_libs=yes
  2381. ;;
  2382. hpux9* | hpux10* | hpux11*)
  2383. # Give a soname corresponding to the major version so that dld.sl refuses to
  2384. # link against other versions.
  2385. version_type=sunos
  2386. need_lib_prefix=no
  2387. need_version=no
  2388. case $host_cpu in
  2389. ia64*)
  2390. shrext_cmds='.so'
  2391. hardcode_into_libs=yes
  2392. dynamic_linker="$host_os dld.so"
  2393. shlibpath_var=LD_LIBRARY_PATH
  2394. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  2395. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2396. soname_spec='${libname}${release}${shared_ext}$major'
  2397. if test "X$HPUX_IA64_MODE" = X32; then
  2398. sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
  2399. else
  2400. sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
  2401. fi
  2402. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2403. ;;
  2404. hppa*64*)
  2405. shrext_cmds='.sl'
  2406. hardcode_into_libs=yes
  2407. dynamic_linker="$host_os dld.sl"
  2408. shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
  2409. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  2410. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2411. soname_spec='${libname}${release}${shared_ext}$major'
  2412. sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
  2413. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2414. ;;
  2415. *)
  2416. shrext_cmds='.sl'
  2417. dynamic_linker="$host_os dld.sl"
  2418. shlibpath_var=SHLIB_PATH
  2419. shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  2420. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2421. soname_spec='${libname}${release}${shared_ext}$major'
  2422. ;;
  2423. esac
  2424. # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
  2425. postinstall_cmds='chmod 555 $lib'
  2426. # or fails outright, so override atomically:
  2427. install_override_mode=555
  2428. ;;
  2429. interix[[3-9]]*)
  2430. version_type=linux # correct to gnu/linux during the next big refactor
  2431. need_lib_prefix=no
  2432. need_version=no
  2433. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  2434. soname_spec='${libname}${release}${shared_ext}$major'
  2435. dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
  2436. shlibpath_var=LD_LIBRARY_PATH
  2437. shlibpath_overrides_runpath=no
  2438. hardcode_into_libs=yes
  2439. ;;
  2440. irix5* | irix6* | nonstopux*)
  2441. case $host_os in
  2442. nonstopux*) version_type=nonstopux ;;
  2443. *)
  2444. if test "$lt_cv_prog_gnu_ld" = yes; then
  2445. version_type=linux # correct to gnu/linux during the next big refactor
  2446. else
  2447. version_type=irix
  2448. fi ;;
  2449. esac
  2450. need_lib_prefix=no
  2451. need_version=no
  2452. soname_spec='${libname}${release}${shared_ext}$major'
  2453. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
  2454. case $host_os in
  2455. irix5* | nonstopux*)
  2456. libsuff= shlibsuff=
  2457. ;;
  2458. *)
  2459. case $LD in # libtool.m4 will add one of these switches to LD
  2460. *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
  2461. libsuff= shlibsuff= libmagic=32-bit;;
  2462. *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
  2463. libsuff=32 shlibsuff=N32 libmagic=N32;;
  2464. *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
  2465. libsuff=64 shlibsuff=64 libmagic=64-bit;;
  2466. *) libsuff= shlibsuff= libmagic=never-match;;
  2467. esac
  2468. ;;
  2469. esac
  2470. shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  2471. shlibpath_overrides_runpath=no
  2472. sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
  2473. sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
  2474. hardcode_into_libs=yes
  2475. ;;
  2476. # No shared lib support for Linux oldld, aout, or coff.
  2477. linux*oldld* | linux*aout* | linux*coff*)
  2478. dynamic_linker=no
  2479. ;;
  2480. # This must be glibc/ELF.
  2481. linux* | k*bsd*-gnu | kopensolaris*-gnu)
  2482. version_type=linux # correct to gnu/linux during the next big refactor
  2483. need_lib_prefix=no
  2484. need_version=no
  2485. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2486. soname_spec='${libname}${release}${shared_ext}$major'
  2487. finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  2488. shlibpath_var=LD_LIBRARY_PATH
  2489. shlibpath_overrides_runpath=no
  2490. # Some binutils ld are patched to set DT_RUNPATH
  2491. AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
  2492. [lt_cv_shlibpath_overrides_runpath=no
  2493. save_LDFLAGS=$LDFLAGS
  2494. save_libdir=$libdir
  2495. eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
  2496. LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
  2497. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  2498. [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
  2499. [lt_cv_shlibpath_overrides_runpath=yes])])
  2500. LDFLAGS=$save_LDFLAGS
  2501. libdir=$save_libdir
  2502. ])
  2503. shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
  2504. # This implies no fast_install, which is unacceptable.
  2505. # Some rework will be needed to allow for fast_install
  2506. # before this can be enabled.
  2507. hardcode_into_libs=yes
  2508. # Append ld.so.conf contents to the search path
  2509. if test -f /etc/ld.so.conf; then
  2510. 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' ' '`
  2511. sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
  2512. fi
  2513. # We used to test for /lib/ld.so.1 and disable shared libraries on
  2514. # powerpc, because MkLinux only supported shared libraries with the
  2515. # GNU dynamic linker. Since this was broken with cross compilers,
  2516. # most powerpc-linux boxes support dynamic linking these days and
  2517. # people can always --disable-shared, the test was removed, and we
  2518. # assume the GNU/Linux dynamic linker is in use.
  2519. dynamic_linker='GNU/Linux ld.so'
  2520. ;;
  2521. netbsdelf*-gnu)
  2522. version_type=linux
  2523. need_lib_prefix=no
  2524. need_version=no
  2525. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  2526. soname_spec='${libname}${release}${shared_ext}$major'
  2527. shlibpath_var=LD_LIBRARY_PATH
  2528. shlibpath_overrides_runpath=no
  2529. hardcode_into_libs=yes
  2530. dynamic_linker='NetBSD ld.elf_so'
  2531. ;;
  2532. netbsd*)
  2533. version_type=sunos
  2534. need_lib_prefix=no
  2535. need_version=no
  2536. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  2537. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  2538. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2539. dynamic_linker='NetBSD (a.out) ld.so'
  2540. else
  2541. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  2542. soname_spec='${libname}${release}${shared_ext}$major'
  2543. dynamic_linker='NetBSD ld.elf_so'
  2544. fi
  2545. shlibpath_var=LD_LIBRARY_PATH
  2546. shlibpath_overrides_runpath=yes
  2547. hardcode_into_libs=yes
  2548. ;;
  2549. newsos6)
  2550. version_type=linux # correct to gnu/linux during the next big refactor
  2551. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2552. shlibpath_var=LD_LIBRARY_PATH
  2553. shlibpath_overrides_runpath=yes
  2554. ;;
  2555. *nto* | *qnx*)
  2556. version_type=qnx
  2557. need_lib_prefix=no
  2558. need_version=no
  2559. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2560. soname_spec='${libname}${release}${shared_ext}$major'
  2561. shlibpath_var=LD_LIBRARY_PATH
  2562. shlibpath_overrides_runpath=no
  2563. hardcode_into_libs=yes
  2564. dynamic_linker='ldqnx.so'
  2565. ;;
  2566. openbsd*)
  2567. version_type=sunos
  2568. sys_lib_dlsearch_path_spec="/usr/lib"
  2569. need_lib_prefix=no
  2570. # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
  2571. case $host_os in
  2572. openbsd3.3 | openbsd3.3.*) need_version=yes ;;
  2573. *) need_version=no ;;
  2574. esac
  2575. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  2576. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2577. shlibpath_var=LD_LIBRARY_PATH
  2578. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  2579. case $host_os in
  2580. openbsd2.[[89]] | openbsd2.[[89]].*)
  2581. shlibpath_overrides_runpath=no
  2582. ;;
  2583. *)
  2584. shlibpath_overrides_runpath=yes
  2585. ;;
  2586. esac
  2587. else
  2588. shlibpath_overrides_runpath=yes
  2589. fi
  2590. ;;
  2591. os2*)
  2592. libname_spec='$name'
  2593. shrext_cmds=".dll"
  2594. need_lib_prefix=no
  2595. library_names_spec='$libname${shared_ext} $libname.a'
  2596. dynamic_linker='OS/2 ld.exe'
  2597. shlibpath_var=LIBPATH
  2598. ;;
  2599. osf3* | osf4* | osf5*)
  2600. version_type=osf
  2601. need_lib_prefix=no
  2602. need_version=no
  2603. soname_spec='${libname}${release}${shared_ext}$major'
  2604. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2605. shlibpath_var=LD_LIBRARY_PATH
  2606. sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  2607. sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  2608. ;;
  2609. rdos*)
  2610. dynamic_linker=no
  2611. ;;
  2612. solaris*)
  2613. version_type=linux # correct to gnu/linux during the next big refactor
  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=yes
  2620. hardcode_into_libs=yes
  2621. # ldd complains unless libraries are executable
  2622. postinstall_cmds='chmod +x $lib'
  2623. ;;
  2624. sunos4*)
  2625. version_type=sunos
  2626. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  2627. finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  2628. shlibpath_var=LD_LIBRARY_PATH
  2629. shlibpath_overrides_runpath=yes
  2630. if test "$with_gnu_ld" = yes; then
  2631. need_lib_prefix=no
  2632. fi
  2633. need_version=yes
  2634. ;;
  2635. sysv4 | sysv4.3*)
  2636. version_type=linux # correct to gnu/linux during the next big refactor
  2637. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2638. soname_spec='${libname}${release}${shared_ext}$major'
  2639. shlibpath_var=LD_LIBRARY_PATH
  2640. case $host_vendor in
  2641. sni)
  2642. shlibpath_overrides_runpath=no
  2643. need_lib_prefix=no
  2644. runpath_var=LD_RUN_PATH
  2645. ;;
  2646. siemens)
  2647. need_lib_prefix=no
  2648. ;;
  2649. motorola)
  2650. need_lib_prefix=no
  2651. need_version=no
  2652. shlibpath_overrides_runpath=no
  2653. sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  2654. ;;
  2655. esac
  2656. ;;
  2657. sysv4*MP*)
  2658. if test -d /usr/nec ;then
  2659. version_type=linux # correct to gnu/linux during the next big refactor
  2660. library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
  2661. soname_spec='$libname${shared_ext}.$major'
  2662. shlibpath_var=LD_LIBRARY_PATH
  2663. fi
  2664. ;;
  2665. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  2666. version_type=freebsd-elf
  2667. need_lib_prefix=no
  2668. need_version=no
  2669. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  2670. soname_spec='${libname}${release}${shared_ext}$major'
  2671. shlibpath_var=LD_LIBRARY_PATH
  2672. shlibpath_overrides_runpath=yes
  2673. hardcode_into_libs=yes
  2674. if test "$with_gnu_ld" = yes; then
  2675. sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
  2676. else
  2677. sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
  2678. case $host_os in
  2679. sco3.2v5*)
  2680. sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
  2681. ;;
  2682. esac
  2683. fi
  2684. sys_lib_dlsearch_path_spec='/usr/lib'
  2685. ;;
  2686. tpf*)
  2687. # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
  2688. version_type=linux # correct to gnu/linux during the next big refactor
  2689. need_lib_prefix=no
  2690. need_version=no
  2691. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2692. shlibpath_var=LD_LIBRARY_PATH
  2693. shlibpath_overrides_runpath=no
  2694. hardcode_into_libs=yes
  2695. ;;
  2696. uts4*)
  2697. version_type=linux # correct to gnu/linux during the next big refactor
  2698. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2699. soname_spec='${libname}${release}${shared_ext}$major'
  2700. shlibpath_var=LD_LIBRARY_PATH
  2701. ;;
  2702. *)
  2703. dynamic_linker=no
  2704. ;;
  2705. esac
  2706. AC_MSG_RESULT([$dynamic_linker])
  2707. test "$dynamic_linker" = no && can_build_shared=no
  2708. variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  2709. if test "$GCC" = yes; then
  2710. variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  2711. fi
  2712. if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
  2713. sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
  2714. fi
  2715. if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
  2716. sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
  2717. fi
  2718. _LT_DECL([], [variables_saved_for_relink], [1],
  2719. [Variables whose values should be saved in libtool wrapper scripts and
  2720. restored at link time])
  2721. _LT_DECL([], [need_lib_prefix], [0],
  2722. [Do we need the "lib" prefix for modules?])
  2723. _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
  2724. _LT_DECL([], [version_type], [0], [Library versioning type])
  2725. _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
  2726. _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
  2727. _LT_DECL([], [shlibpath_overrides_runpath], [0],
  2728. [Is shlibpath searched before the hard-coded library search path?])
  2729. _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
  2730. _LT_DECL([], [library_names_spec], [1],
  2731. [[List of archive names. First name is the real one, the rest are links.
  2732. The last name is the one that the linker finds with -lNAME]])
  2733. _LT_DECL([], [soname_spec], [1],
  2734. [[The coded name of the library, if different from the real name]])
  2735. _LT_DECL([], [install_override_mode], [1],
  2736. [Permission mode override for installation of shared libraries])
  2737. _LT_DECL([], [postinstall_cmds], [2],
  2738. [Command to use after installation of a shared archive])
  2739. _LT_DECL([], [postuninstall_cmds], [2],
  2740. [Command to use after uninstallation of a shared archive])
  2741. _LT_DECL([], [finish_cmds], [2],
  2742. [Commands used to finish a libtool library installation in a directory])
  2743. _LT_DECL([], [finish_eval], [1],
  2744. [[As "finish_cmds", except a single script fragment to be evaled but
  2745. not shown]])
  2746. _LT_DECL([], [hardcode_into_libs], [0],
  2747. [Whether we should hardcode library paths into libraries])
  2748. _LT_DECL([], [sys_lib_search_path_spec], [2],
  2749. [Compile-time system search path for libraries])
  2750. _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
  2751. [Run-time system search path for libraries])
  2752. ])# _LT_SYS_DYNAMIC_LINKER
  2753. # _LT_PATH_TOOL_PREFIX(TOOL)
  2754. # --------------------------
  2755. # find a file program which can recognize shared library
  2756. AC_DEFUN([_LT_PATH_TOOL_PREFIX],
  2757. [m4_require([_LT_DECL_EGREP])dnl
  2758. AC_MSG_CHECKING([for $1])
  2759. AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
  2760. [case $MAGIC_CMD in
  2761. [[\\/*] | ?:[\\/]*])
  2762. lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
  2763. ;;
  2764. *)
  2765. lt_save_MAGIC_CMD="$MAGIC_CMD"
  2766. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  2767. dnl $ac_dummy forces splitting on constant user-supplied paths.
  2768. dnl POSIX.2 word splitting is done only on the output of word expansions,
  2769. dnl not every word. This closes a longstanding sh security hole.
  2770. ac_dummy="m4_if([$2], , $PATH, [$2])"
  2771. for ac_dir in $ac_dummy; do
  2772. IFS="$lt_save_ifs"
  2773. test -z "$ac_dir" && ac_dir=.
  2774. if test -f $ac_dir/$1; then
  2775. lt_cv_path_MAGIC_CMD="$ac_dir/$1"
  2776. if test -n "$file_magic_test_file"; then
  2777. case $deplibs_check_method in
  2778. "file_magic "*)
  2779. file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
  2780. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  2781. if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  2782. $EGREP "$file_magic_regex" > /dev/null; then
  2783. :
  2784. else
  2785. cat <<_LT_EOF 1>&2
  2786. *** Warning: the command libtool uses to detect shared libraries,
  2787. *** $file_magic_cmd, produces output that libtool cannot recognize.
  2788. *** The result is that libtool may fail to recognize shared libraries
  2789. *** as such. This will affect the creation of libtool libraries that
  2790. *** depend on shared libraries, but programs linked with such libtool
  2791. *** libraries will work regardless of this problem. Nevertheless, you
  2792. *** may want to report the problem to your system manager and/or to
  2793. *** bug-libtool@gnu.org
  2794. _LT_EOF
  2795. fi ;;
  2796. esac
  2797. fi
  2798. break
  2799. fi
  2800. done
  2801. IFS="$lt_save_ifs"
  2802. MAGIC_CMD="$lt_save_MAGIC_CMD"
  2803. ;;
  2804. esac])
  2805. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  2806. if test -n "$MAGIC_CMD"; then
  2807. AC_MSG_RESULT($MAGIC_CMD)
  2808. else
  2809. AC_MSG_RESULT(no)
  2810. fi
  2811. _LT_DECL([], [MAGIC_CMD], [0],
  2812. [Used to examine libraries when file_magic_cmd begins with "file"])dnl
  2813. ])# _LT_PATH_TOOL_PREFIX
  2814. # Old name:
  2815. AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
  2816. dnl aclocal-1.4 backwards compatibility:
  2817. dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
  2818. # _LT_PATH_MAGIC
  2819. # --------------
  2820. # find a file program which can recognize a shared library
  2821. m4_defun([_LT_PATH_MAGIC],
  2822. [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
  2823. if test -z "$lt_cv_path_MAGIC_CMD"; then
  2824. if test -n "$ac_tool_prefix"; then
  2825. _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
  2826. else
  2827. MAGIC_CMD=:
  2828. fi
  2829. fi
  2830. ])# _LT_PATH_MAGIC
  2831. # LT_PATH_LD
  2832. # ----------
  2833. # find the pathname to the GNU or non-GNU linker
  2834. AC_DEFUN([LT_PATH_LD],
  2835. [AC_REQUIRE([AC_PROG_CC])dnl
  2836. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2837. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  2838. m4_require([_LT_DECL_SED])dnl
  2839. m4_require([_LT_DECL_EGREP])dnl
  2840. m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
  2841. AC_ARG_WITH([gnu-ld],
  2842. [AS_HELP_STRING([--with-gnu-ld],
  2843. [assume the C compiler uses GNU ld @<:@default=no@:>@])],
  2844. [test "$withval" = no || with_gnu_ld=yes],
  2845. [with_gnu_ld=no])dnl
  2846. ac_prog=ld
  2847. if test "$GCC" = yes; then
  2848. # Check if gcc -print-prog-name=ld gives a path.
  2849. AC_MSG_CHECKING([for ld used by $CC])
  2850. case $host in
  2851. *-*-mingw*)
  2852. # gcc leaves a trailing carriage return which upsets mingw
  2853. ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  2854. *)
  2855. ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  2856. esac
  2857. case $ac_prog in
  2858. # Accept absolute paths.
  2859. [[\\/]]* | ?:[[\\/]]*)
  2860. re_direlt='/[[^/]][[^/]]*/\.\./'
  2861. # Canonicalize the pathname of ld
  2862. ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
  2863. while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
  2864. ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
  2865. done
  2866. test -z "$LD" && LD="$ac_prog"
  2867. ;;
  2868. "")
  2869. # If it fails, then pretend we aren't using GCC.
  2870. ac_prog=ld
  2871. ;;
  2872. *)
  2873. # If it is relative, then search for the first ld in PATH.
  2874. with_gnu_ld=unknown
  2875. ;;
  2876. esac
  2877. elif test "$with_gnu_ld" = yes; then
  2878. AC_MSG_CHECKING([for GNU ld])
  2879. else
  2880. AC_MSG_CHECKING([for non-GNU ld])
  2881. fi
  2882. AC_CACHE_VAL(lt_cv_path_LD,
  2883. [if test -z "$LD"; then
  2884. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  2885. for ac_dir in $PATH; do
  2886. IFS="$lt_save_ifs"
  2887. test -z "$ac_dir" && ac_dir=.
  2888. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  2889. lt_cv_path_LD="$ac_dir/$ac_prog"
  2890. # Check to see if the program is GNU ld. I'd rather use --version,
  2891. # but apparently some variants of GNU ld only accept -v.
  2892. # Break only if it was the GNU/non-GNU ld that we prefer.
  2893. case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
  2894. *GNU* | *'with BFD'*)
  2895. test "$with_gnu_ld" != no && break
  2896. ;;
  2897. *)
  2898. test "$with_gnu_ld" != yes && break
  2899. ;;
  2900. esac
  2901. fi
  2902. done
  2903. IFS="$lt_save_ifs"
  2904. else
  2905. lt_cv_path_LD="$LD" # Let the user override the test with a path.
  2906. fi])
  2907. LD="$lt_cv_path_LD"
  2908. if test -n "$LD"; then
  2909. AC_MSG_RESULT($LD)
  2910. else
  2911. AC_MSG_RESULT(no)
  2912. fi
  2913. test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  2914. _LT_PATH_LD_GNU
  2915. AC_SUBST([LD])
  2916. _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
  2917. ])# LT_PATH_LD
  2918. # Old names:
  2919. AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
  2920. AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
  2921. dnl aclocal-1.4 backwards compatibility:
  2922. dnl AC_DEFUN([AM_PROG_LD], [])
  2923. dnl AC_DEFUN([AC_PROG_LD], [])
  2924. # _LT_PATH_LD_GNU
  2925. #- --------------
  2926. m4_defun([_LT_PATH_LD_GNU],
  2927. [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
  2928. [# I'd rather use --version here, but apparently some GNU lds only accept -v.
  2929. case `$LD -v 2>&1 </dev/null` in
  2930. *GNU* | *'with BFD'*)
  2931. lt_cv_prog_gnu_ld=yes
  2932. ;;
  2933. *)
  2934. lt_cv_prog_gnu_ld=no
  2935. ;;
  2936. esac])
  2937. with_gnu_ld=$lt_cv_prog_gnu_ld
  2938. ])# _LT_PATH_LD_GNU
  2939. # _LT_CMD_RELOAD
  2940. # --------------
  2941. # find reload flag for linker
  2942. # -- PORTME Some linkers may need a different reload flag.
  2943. m4_defun([_LT_CMD_RELOAD],
  2944. [AC_CACHE_CHECK([for $LD option to reload object files],
  2945. lt_cv_ld_reload_flag,
  2946. [lt_cv_ld_reload_flag='-r'])
  2947. reload_flag=$lt_cv_ld_reload_flag
  2948. case $reload_flag in
  2949. "" | " "*) ;;
  2950. *) reload_flag=" $reload_flag" ;;
  2951. esac
  2952. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  2953. case $host_os in
  2954. cygwin* | mingw* | pw32* | cegcc*)
  2955. if test "$GCC" != yes; then
  2956. reload_cmds=false
  2957. fi
  2958. ;;
  2959. darwin*)
  2960. if test "$GCC" = yes; then
  2961. reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
  2962. else
  2963. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  2964. fi
  2965. ;;
  2966. esac
  2967. _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
  2968. _LT_TAGDECL([], [reload_cmds], [2])dnl
  2969. ])# _LT_CMD_RELOAD
  2970. # _LT_CHECK_MAGIC_METHOD
  2971. # ----------------------
  2972. # how to check for library dependencies
  2973. # -- PORTME fill in with the dynamic library characteristics
  2974. m4_defun([_LT_CHECK_MAGIC_METHOD],
  2975. [m4_require([_LT_DECL_EGREP])
  2976. m4_require([_LT_DECL_OBJDUMP])
  2977. AC_CACHE_CHECK([how to recognize dependent libraries],
  2978. lt_cv_deplibs_check_method,
  2979. [lt_cv_file_magic_cmd='$MAGIC_CMD'
  2980. lt_cv_file_magic_test_file=
  2981. lt_cv_deplibs_check_method='unknown'
  2982. # Need to set the preceding variable on all platforms that support
  2983. # interlibrary dependencies.
  2984. # 'none' -- dependencies not supported.
  2985. # `unknown' -- same as none, but documents that we really don't know.
  2986. # 'pass_all' -- all dependencies passed with no checks.
  2987. # 'test_compile' -- check by making test program.
  2988. # 'file_magic [[regex]]' -- check by looking for files in library path
  2989. # which responds to the $file_magic_cmd with a given extended regex.
  2990. # If you have `file' or equivalent on your system and you're not sure
  2991. # whether `pass_all' will *always* work, you probably want this one.
  2992. case $host_os in
  2993. aix[[4-9]]*)
  2994. lt_cv_deplibs_check_method=pass_all
  2995. ;;
  2996. beos*)
  2997. lt_cv_deplibs_check_method=pass_all
  2998. ;;
  2999. bsdi[[45]]*)
  3000. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
  3001. lt_cv_file_magic_cmd='/usr/bin/file -L'
  3002. lt_cv_file_magic_test_file=/shlib/libc.so
  3003. ;;
  3004. cygwin*)
  3005. # func_win32_libid is a shell function defined in ltmain.sh
  3006. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  3007. lt_cv_file_magic_cmd='func_win32_libid'
  3008. ;;
  3009. mingw* | pw32*)
  3010. # Base MSYS/MinGW do not provide the 'file' command needed by
  3011. # func_win32_libid shell function, so use a weaker test based on 'objdump',
  3012. # unless we find 'file', for example because we are cross-compiling.
  3013. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
  3014. if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
  3015. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  3016. lt_cv_file_magic_cmd='func_win32_libid'
  3017. else
  3018. # Keep this pattern in sync with the one in func_win32_libid.
  3019. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
  3020. lt_cv_file_magic_cmd='$OBJDUMP -f'
  3021. fi
  3022. ;;
  3023. cegcc*)
  3024. # use the weaker test based on 'objdump'. See mingw*.
  3025. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
  3026. lt_cv_file_magic_cmd='$OBJDUMP -f'
  3027. ;;
  3028. darwin* | rhapsody*)
  3029. lt_cv_deplibs_check_method=pass_all
  3030. ;;
  3031. freebsd* | dragonfly*)
  3032. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  3033. case $host_cpu in
  3034. i*86 )
  3035. # Not sure whether the presence of OpenBSD here was a mistake.
  3036. # Let's accept both of them until this is cleared up.
  3037. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
  3038. lt_cv_file_magic_cmd=/usr/bin/file
  3039. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  3040. ;;
  3041. esac
  3042. else
  3043. lt_cv_deplibs_check_method=pass_all
  3044. fi
  3045. ;;
  3046. gnu*)
  3047. lt_cv_deplibs_check_method=pass_all
  3048. ;;
  3049. haiku*)
  3050. lt_cv_deplibs_check_method=pass_all
  3051. ;;
  3052. hpux10.20* | hpux11*)
  3053. lt_cv_file_magic_cmd=/usr/bin/file
  3054. case $host_cpu in
  3055. ia64*)
  3056. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
  3057. lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
  3058. ;;
  3059. hppa*64*)
  3060. [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]']
  3061. lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
  3062. ;;
  3063. *)
  3064. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
  3065. lt_cv_file_magic_test_file=/usr/lib/libc.sl
  3066. ;;
  3067. esac
  3068. ;;
  3069. interix[[3-9]]*)
  3070. # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
  3071. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
  3072. ;;
  3073. irix5* | irix6* | nonstopux*)
  3074. case $LD in
  3075. *-32|*"-32 ") libmagic=32-bit;;
  3076. *-n32|*"-n32 ") libmagic=N32;;
  3077. *-64|*"-64 ") libmagic=64-bit;;
  3078. *) libmagic=never-match;;
  3079. esac
  3080. lt_cv_deplibs_check_method=pass_all
  3081. ;;
  3082. # This must be glibc/ELF.
  3083. linux* | k*bsd*-gnu | kopensolaris*-gnu)
  3084. lt_cv_deplibs_check_method=pass_all
  3085. ;;
  3086. netbsd* | netbsdelf*-gnu)
  3087. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  3088. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  3089. else
  3090. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
  3091. fi
  3092. ;;
  3093. newos6*)
  3094. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
  3095. lt_cv_file_magic_cmd=/usr/bin/file
  3096. lt_cv_file_magic_test_file=/usr/lib/libnls.so
  3097. ;;
  3098. *nto* | *qnx*)
  3099. lt_cv_deplibs_check_method=pass_all
  3100. ;;
  3101. openbsd*)
  3102. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  3103. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
  3104. else
  3105. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  3106. fi
  3107. ;;
  3108. osf3* | osf4* | osf5*)
  3109. lt_cv_deplibs_check_method=pass_all
  3110. ;;
  3111. rdos*)
  3112. lt_cv_deplibs_check_method=pass_all
  3113. ;;
  3114. solaris*)
  3115. lt_cv_deplibs_check_method=pass_all
  3116. ;;
  3117. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  3118. lt_cv_deplibs_check_method=pass_all
  3119. ;;
  3120. sysv4 | sysv4.3*)
  3121. case $host_vendor in
  3122. motorola)
  3123. 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]]'
  3124. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  3125. ;;
  3126. ncr)
  3127. lt_cv_deplibs_check_method=pass_all
  3128. ;;
  3129. sequent)
  3130. lt_cv_file_magic_cmd='/bin/file'
  3131. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
  3132. ;;
  3133. sni)
  3134. lt_cv_file_magic_cmd='/bin/file'
  3135. lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
  3136. lt_cv_file_magic_test_file=/lib/libc.so
  3137. ;;
  3138. siemens)
  3139. lt_cv_deplibs_check_method=pass_all
  3140. ;;
  3141. pc)
  3142. lt_cv_deplibs_check_method=pass_all
  3143. ;;
  3144. esac
  3145. ;;
  3146. tpf*)
  3147. lt_cv_deplibs_check_method=pass_all
  3148. ;;
  3149. esac
  3150. ])
  3151. file_magic_glob=
  3152. want_nocaseglob=no
  3153. if test "$build" = "$host"; then
  3154. case $host_os in
  3155. mingw* | pw32*)
  3156. if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
  3157. want_nocaseglob=yes
  3158. else
  3159. file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
  3160. fi
  3161. ;;
  3162. esac
  3163. fi
  3164. file_magic_cmd=$lt_cv_file_magic_cmd
  3165. deplibs_check_method=$lt_cv_deplibs_check_method
  3166. test -z "$deplibs_check_method" && deplibs_check_method=unknown
  3167. _LT_DECL([], [deplibs_check_method], [1],
  3168. [Method to check whether dependent libraries are shared objects])
  3169. _LT_DECL([], [file_magic_cmd], [1],
  3170. [Command to use when deplibs_check_method = "file_magic"])
  3171. _LT_DECL([], [file_magic_glob], [1],
  3172. [How to find potential files when deplibs_check_method = "file_magic"])
  3173. _LT_DECL([], [want_nocaseglob], [1],
  3174. [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
  3175. ])# _LT_CHECK_MAGIC_METHOD
  3176. # LT_PATH_NM
  3177. # ----------
  3178. # find the pathname to a BSD- or MS-compatible name lister
  3179. AC_DEFUN([LT_PATH_NM],
  3180. [AC_REQUIRE([AC_PROG_CC])dnl
  3181. AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
  3182. [if test -n "$NM"; then
  3183. # Let the user override the test.
  3184. lt_cv_path_NM="$NM"
  3185. else
  3186. lt_nm_to_check="${ac_tool_prefix}nm"
  3187. if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
  3188. lt_nm_to_check="$lt_nm_to_check nm"
  3189. fi
  3190. for lt_tmp_nm in $lt_nm_to_check; do
  3191. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  3192. for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
  3193. IFS="$lt_save_ifs"
  3194. test -z "$ac_dir" && ac_dir=.
  3195. tmp_nm="$ac_dir/$lt_tmp_nm"
  3196. if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
  3197. # Check to see if the nm accepts a BSD-compat flag.
  3198. # Adding the `sed 1q' prevents false positives on HP-UX, which says:
  3199. # nm: unknown option "B" ignored
  3200. # Tru64's nm complains that /dev/null is an invalid object file
  3201. case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
  3202. */dev/null* | *'Invalid file or object type'*)
  3203. lt_cv_path_NM="$tmp_nm -B"
  3204. break
  3205. ;;
  3206. *)
  3207. case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
  3208. */dev/null*)
  3209. lt_cv_path_NM="$tmp_nm -p"
  3210. break
  3211. ;;
  3212. *)
  3213. lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
  3214. continue # so that we can try to find one that supports BSD flags
  3215. ;;
  3216. esac
  3217. ;;
  3218. esac
  3219. fi
  3220. done
  3221. IFS="$lt_save_ifs"
  3222. done
  3223. : ${lt_cv_path_NM=no}
  3224. fi])
  3225. if test "$lt_cv_path_NM" != "no"; then
  3226. NM="$lt_cv_path_NM"
  3227. else
  3228. # Didn't find any BSD compatible name lister, look for dumpbin.
  3229. if test -n "$DUMPBIN"; then :
  3230. # Let the user override the test.
  3231. else
  3232. AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
  3233. case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
  3234. *COFF*)
  3235. DUMPBIN="$DUMPBIN -symbols"
  3236. ;;
  3237. *)
  3238. DUMPBIN=:
  3239. ;;
  3240. esac
  3241. fi
  3242. AC_SUBST([DUMPBIN])
  3243. if test "$DUMPBIN" != ":"; then
  3244. NM="$DUMPBIN"
  3245. fi
  3246. fi
  3247. test -z "$NM" && NM=nm
  3248. AC_SUBST([NM])
  3249. _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
  3250. AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
  3251. [lt_cv_nm_interface="BSD nm"
  3252. echo "int some_variable = 0;" > conftest.$ac_ext
  3253. (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
  3254. (eval "$ac_compile" 2>conftest.err)
  3255. cat conftest.err >&AS_MESSAGE_LOG_FD
  3256. (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
  3257. (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
  3258. cat conftest.err >&AS_MESSAGE_LOG_FD
  3259. (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
  3260. cat conftest.out >&AS_MESSAGE_LOG_FD
  3261. if $GREP 'External.*some_variable' conftest.out > /dev/null; then
  3262. lt_cv_nm_interface="MS dumpbin"
  3263. fi
  3264. rm -f conftest*])
  3265. ])# LT_PATH_NM
  3266. # Old names:
  3267. AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
  3268. AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
  3269. dnl aclocal-1.4 backwards compatibility:
  3270. dnl AC_DEFUN([AM_PROG_NM], [])
  3271. dnl AC_DEFUN([AC_PROG_NM], [])
  3272. # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  3273. # --------------------------------
  3274. # how to determine the name of the shared library
  3275. # associated with a specific link library.
  3276. # -- PORTME fill in with the dynamic library characteristics
  3277. m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
  3278. [m4_require([_LT_DECL_EGREP])
  3279. m4_require([_LT_DECL_OBJDUMP])
  3280. m4_require([_LT_DECL_DLLTOOL])
  3281. AC_CACHE_CHECK([how to associate runtime and link libraries],
  3282. lt_cv_sharedlib_from_linklib_cmd,
  3283. [lt_cv_sharedlib_from_linklib_cmd='unknown'
  3284. case $host_os in
  3285. cygwin* | mingw* | pw32* | cegcc*)
  3286. # two different shell functions defined in ltmain.sh
  3287. # decide which to use based on capabilities of $DLLTOOL
  3288. case `$DLLTOOL --help 2>&1` in
  3289. *--identify-strict*)
  3290. lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
  3291. ;;
  3292. *)
  3293. lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
  3294. ;;
  3295. esac
  3296. ;;
  3297. *)
  3298. # fallback: assume linklib IS sharedlib
  3299. lt_cv_sharedlib_from_linklib_cmd="$ECHO"
  3300. ;;
  3301. esac
  3302. ])
  3303. sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
  3304. test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
  3305. _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
  3306. [Command to associate shared and link libraries])
  3307. ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  3308. # _LT_PATH_MANIFEST_TOOL
  3309. # ----------------------
  3310. # locate the manifest tool
  3311. m4_defun([_LT_PATH_MANIFEST_TOOL],
  3312. [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
  3313. test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
  3314. AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
  3315. [lt_cv_path_mainfest_tool=no
  3316. echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
  3317. $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
  3318. cat conftest.err >&AS_MESSAGE_LOG_FD
  3319. if $GREP 'Manifest Tool' conftest.out > /dev/null; then
  3320. lt_cv_path_mainfest_tool=yes
  3321. fi
  3322. rm -f conftest*])
  3323. if test "x$lt_cv_path_mainfest_tool" != xyes; then
  3324. MANIFEST_TOOL=:
  3325. fi
  3326. _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
  3327. ])# _LT_PATH_MANIFEST_TOOL
  3328. # LT_LIB_M
  3329. # --------
  3330. # check for math library
  3331. AC_DEFUN([LT_LIB_M],
  3332. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3333. LIBM=
  3334. case $host in
  3335. *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
  3336. # These system don't have libm, or don't need it
  3337. ;;
  3338. *-ncr-sysv4.3*)
  3339. AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
  3340. AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
  3341. ;;
  3342. *)
  3343. AC_CHECK_LIB(m, cos, LIBM="-lm")
  3344. ;;
  3345. esac
  3346. AC_SUBST([LIBM])
  3347. ])# LT_LIB_M
  3348. # Old name:
  3349. AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
  3350. dnl aclocal-1.4 backwards compatibility:
  3351. dnl AC_DEFUN([AC_CHECK_LIBM], [])
  3352. # _LT_COMPILER_NO_RTTI([TAGNAME])
  3353. # -------------------------------
  3354. m4_defun([_LT_COMPILER_NO_RTTI],
  3355. [m4_require([_LT_TAG_COMPILER])dnl
  3356. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  3357. if test "$GCC" = yes; then
  3358. case $cc_basename in
  3359. nvcc*)
  3360. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
  3361. *)
  3362. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
  3363. esac
  3364. _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
  3365. lt_cv_prog_compiler_rtti_exceptions,
  3366. [-fno-rtti -fno-exceptions], [],
  3367. [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
  3368. fi
  3369. _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
  3370. [Compiler flag to turn off builtin functions])
  3371. ])# _LT_COMPILER_NO_RTTI
  3372. # _LT_CMD_GLOBAL_SYMBOLS
  3373. # ----------------------
  3374. m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
  3375. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3376. AC_REQUIRE([AC_PROG_CC])dnl
  3377. AC_REQUIRE([AC_PROG_AWK])dnl
  3378. AC_REQUIRE([LT_PATH_NM])dnl
  3379. AC_REQUIRE([LT_PATH_LD])dnl
  3380. m4_require([_LT_DECL_SED])dnl
  3381. m4_require([_LT_DECL_EGREP])dnl
  3382. m4_require([_LT_TAG_COMPILER])dnl
  3383. # Check for command to grab the raw symbol name followed by C symbol from nm.
  3384. AC_MSG_CHECKING([command to parse $NM output from $compiler object])
  3385. AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
  3386. [
  3387. # These are sane defaults that work on at least a few old systems.
  3388. # [They come from Ultrix. What could be older than Ultrix?!! ;)]
  3389. # Character class describing NM global symbol codes.
  3390. symcode='[[BCDEGRST]]'
  3391. # Regexp to match symbols that can be accessed directly from C.
  3392. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
  3393. # Define system-specific variables.
  3394. case $host_os in
  3395. aix*)
  3396. symcode='[[BCDT]]'
  3397. ;;
  3398. cygwin* | mingw* | pw32* | cegcc*)
  3399. symcode='[[ABCDGISTW]]'
  3400. ;;
  3401. hpux*)
  3402. if test "$host_cpu" = ia64; then
  3403. symcode='[[ABCDEGRST]]'
  3404. fi
  3405. ;;
  3406. irix* | nonstopux*)
  3407. symcode='[[BCDEGRST]]'
  3408. ;;
  3409. osf*)
  3410. symcode='[[BCDEGQRST]]'
  3411. ;;
  3412. solaris*)
  3413. symcode='[[BDRT]]'
  3414. ;;
  3415. sco3.2v5*)
  3416. symcode='[[DT]]'
  3417. ;;
  3418. sysv4.2uw2*)
  3419. symcode='[[DT]]'
  3420. ;;
  3421. sysv5* | sco5v6* | unixware* | OpenUNIX*)
  3422. symcode='[[ABDT]]'
  3423. ;;
  3424. sysv4)
  3425. symcode='[[DFNSTU]]'
  3426. ;;
  3427. esac
  3428. # If we're using GNU nm, then use its standard symbol codes.
  3429. case `$NM -V 2>&1` in
  3430. *GNU* | *'with BFD'*)
  3431. symcode='[[ABCDGIRSTW]]' ;;
  3432. esac
  3433. # Transform an extracted symbol line into a proper C declaration.
  3434. # Some systems (esp. on ia64) link data and code symbols differently,
  3435. # so use this general approach.
  3436. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  3437. # Transform an extracted symbol line into symbol name and symbol address
  3438. lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
  3439. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
  3440. # Handle CRLF in mingw tool chain
  3441. opt_cr=
  3442. case $build_os in
  3443. mingw*)
  3444. opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  3445. ;;
  3446. esac
  3447. # Try without a prefix underscore, then with it.
  3448. for ac_symprfx in "" "_"; do
  3449. # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
  3450. symxfrm="\\1 $ac_symprfx\\2 \\2"
  3451. # Write the raw and C identifiers.
  3452. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3453. # Fake it for dumpbin and say T for any non-static function
  3454. # and D for any global variable.
  3455. # Also find C++ and __fastcall symbols from MSVC++,
  3456. # which start with @ or ?.
  3457. lt_cv_sys_global_symbol_pipe="$AWK ['"\
  3458. " {last_section=section; section=\$ 3};"\
  3459. " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
  3460. " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
  3461. " \$ 0!~/External *\|/{next};"\
  3462. " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
  3463. " {if(hide[section]) next};"\
  3464. " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
  3465. " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
  3466. " s[1]~/^[@?]/{print s[1], s[1]; next};"\
  3467. " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
  3468. " ' prfx=^$ac_symprfx]"
  3469. else
  3470. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
  3471. fi
  3472. lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
  3473. # Check to see that the pipe works correctly.
  3474. pipe_works=no
  3475. rm -f conftest*
  3476. cat > conftest.$ac_ext <<_LT_EOF
  3477. #ifdef __cplusplus
  3478. extern "C" {
  3479. #endif
  3480. char nm_test_var;
  3481. void nm_test_func(void);
  3482. void nm_test_func(void){}
  3483. #ifdef __cplusplus
  3484. }
  3485. #endif
  3486. int main(){nm_test_var='a';nm_test_func();return(0);}
  3487. _LT_EOF
  3488. if AC_TRY_EVAL(ac_compile); then
  3489. # Now try to grab the symbols.
  3490. nlist=conftest.nm
  3491. if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
  3492. # Try sorting and uniquifying the output.
  3493. if sort "$nlist" | uniq > "$nlist"T; then
  3494. mv -f "$nlist"T "$nlist"
  3495. else
  3496. rm -f "$nlist"T
  3497. fi
  3498. # Make sure that we snagged all the symbols we need.
  3499. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
  3500. if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
  3501. cat <<_LT_EOF > conftest.$ac_ext
  3502. /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
  3503. #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
  3504. /* DATA imports from DLLs on WIN32 con't be const, because runtime
  3505. relocations are performed -- see ld's documentation on pseudo-relocs. */
  3506. # define LT@&t@_DLSYM_CONST
  3507. #elif defined(__osf__)
  3508. /* This system does not cope well with relocations in const data. */
  3509. # define LT@&t@_DLSYM_CONST
  3510. #else
  3511. # define LT@&t@_DLSYM_CONST const
  3512. #endif
  3513. #ifdef __cplusplus
  3514. extern "C" {
  3515. #endif
  3516. _LT_EOF
  3517. # Now generate the symbol file.
  3518. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
  3519. cat <<_LT_EOF >> conftest.$ac_ext
  3520. /* The mapping between symbol names and symbols. */
  3521. LT@&t@_DLSYM_CONST struct {
  3522. const char *name;
  3523. void *address;
  3524. }
  3525. lt__PROGRAM__LTX_preloaded_symbols[[]] =
  3526. {
  3527. { "@PROGRAM@", (void *) 0 },
  3528. _LT_EOF
  3529. $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
  3530. cat <<\_LT_EOF >> conftest.$ac_ext
  3531. {0, (void *) 0}
  3532. };
  3533. /* This works around a problem in FreeBSD linker */
  3534. #ifdef FREEBSD_WORKAROUND
  3535. static const void *lt_preloaded_setup() {
  3536. return lt__PROGRAM__LTX_preloaded_symbols;
  3537. }
  3538. #endif
  3539. #ifdef __cplusplus
  3540. }
  3541. #endif
  3542. _LT_EOF
  3543. # Now try linking the two files.
  3544. mv conftest.$ac_objext conftstm.$ac_objext
  3545. lt_globsym_save_LIBS=$LIBS
  3546. lt_globsym_save_CFLAGS=$CFLAGS
  3547. LIBS="conftstm.$ac_objext"
  3548. CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
  3549. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
  3550. pipe_works=yes
  3551. fi
  3552. LIBS=$lt_globsym_save_LIBS
  3553. CFLAGS=$lt_globsym_save_CFLAGS
  3554. else
  3555. echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
  3556. fi
  3557. else
  3558. echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
  3559. fi
  3560. else
  3561. echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
  3562. fi
  3563. else
  3564. echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
  3565. cat conftest.$ac_ext >&5
  3566. fi
  3567. rm -rf conftest* conftst*
  3568. # Do not use the global_symbol_pipe unless it works.
  3569. if test "$pipe_works" = yes; then
  3570. break
  3571. else
  3572. lt_cv_sys_global_symbol_pipe=
  3573. fi
  3574. done
  3575. ])
  3576. if test -z "$lt_cv_sys_global_symbol_pipe"; then
  3577. lt_cv_sys_global_symbol_to_cdecl=
  3578. fi
  3579. if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
  3580. AC_MSG_RESULT(failed)
  3581. else
  3582. AC_MSG_RESULT(ok)
  3583. fi
  3584. # Response file support.
  3585. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3586. nm_file_list_spec='@'
  3587. elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
  3588. nm_file_list_spec='@'
  3589. fi
  3590. _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
  3591. [Take the output of nm and produce a listing of raw symbols and C names])
  3592. _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
  3593. [Transform the output of nm in a proper C declaration])
  3594. _LT_DECL([global_symbol_to_c_name_address],
  3595. [lt_cv_sys_global_symbol_to_c_name_address], [1],
  3596. [Transform the output of nm in a C name address pair])
  3597. _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
  3598. [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
  3599. [Transform the output of nm in a C name address pair when lib prefix is needed])
  3600. _LT_DECL([], [nm_file_list_spec], [1],
  3601. [Specify filename containing input files for $NM])
  3602. ]) # _LT_CMD_GLOBAL_SYMBOLS
  3603. # _LT_COMPILER_PIC([TAGNAME])
  3604. # ---------------------------
  3605. m4_defun([_LT_COMPILER_PIC],
  3606. [m4_require([_LT_TAG_COMPILER])dnl
  3607. _LT_TAGVAR(lt_prog_compiler_wl, $1)=
  3608. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3609. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3610. m4_if([$1], [CXX], [
  3611. # C++ specific cases for pic, static, wl, etc.
  3612. if test "$GXX" = yes; then
  3613. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3614. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3615. case $host_os in
  3616. aix*)
  3617. # All AIX code is PIC.
  3618. if test "$host_cpu" = ia64; then
  3619. # AIX 5 now supports IA64 processor
  3620. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3621. fi
  3622. ;;
  3623. amigaos*)
  3624. case $host_cpu in
  3625. powerpc)
  3626. # see comment about AmigaOS4 .so support
  3627. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3628. ;;
  3629. m68k)
  3630. # FIXME: we need at least 68020 code to build shared libraries, but
  3631. # adding the `-m68020' flag to GCC prevents building anything better,
  3632. # like `-m68040'.
  3633. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  3634. ;;
  3635. esac
  3636. ;;
  3637. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  3638. # PIC is the default for these OSes.
  3639. ;;
  3640. mingw* | cygwin* | os2* | pw32* | cegcc*)
  3641. # This hack is so that the source file can tell whether it is being
  3642. # built for inclusion in a dll (and should export symbols for example).
  3643. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  3644. # (--disable-auto-import) libraries
  3645. m4_if([$1], [GCJ], [],
  3646. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3647. ;;
  3648. darwin* | rhapsody*)
  3649. # PIC is the default on this platform
  3650. # Common symbols not allowed in MH_DYLIB files
  3651. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  3652. ;;
  3653. *djgpp*)
  3654. # DJGPP does not support shared libraries at all
  3655. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3656. ;;
  3657. haiku*)
  3658. # PIC is the default for Haiku.
  3659. # The "-static" flag exists, but is broken.
  3660. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3661. ;;
  3662. interix[[3-9]]*)
  3663. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  3664. # Instead, we relocate shared libraries at runtime.
  3665. ;;
  3666. sysv4*MP*)
  3667. if test -d /usr/nec; then
  3668. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  3669. fi
  3670. ;;
  3671. hpux*)
  3672. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  3673. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  3674. # sets the default TLS model and affects inlining.
  3675. case $host_cpu in
  3676. hppa*64*)
  3677. ;;
  3678. *)
  3679. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3680. ;;
  3681. esac
  3682. ;;
  3683. *qnx* | *nto*)
  3684. # QNX uses GNU C++, but need to define -shared option too, otherwise
  3685. # it will coredump.
  3686. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  3687. ;;
  3688. *)
  3689. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3690. ;;
  3691. esac
  3692. else
  3693. case $host_os in
  3694. aix[[4-9]]*)
  3695. # All AIX code is PIC.
  3696. if test "$host_cpu" = ia64; then
  3697. # AIX 5 now supports IA64 processor
  3698. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3699. else
  3700. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  3701. fi
  3702. ;;
  3703. chorus*)
  3704. case $cc_basename in
  3705. cxch68*)
  3706. # Green Hills C++ Compiler
  3707. # _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"
  3708. ;;
  3709. esac
  3710. ;;
  3711. mingw* | cygwin* | os2* | pw32* | cegcc*)
  3712. # This hack is so that the source file can tell whether it is being
  3713. # built for inclusion in a dll (and should export symbols for example).
  3714. m4_if([$1], [GCJ], [],
  3715. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3716. ;;
  3717. dgux*)
  3718. case $cc_basename in
  3719. ec++*)
  3720. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3721. ;;
  3722. ghcx*)
  3723. # Green Hills C++ Compiler
  3724. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3725. ;;
  3726. *)
  3727. ;;
  3728. esac
  3729. ;;
  3730. freebsd* | dragonfly*)
  3731. # FreeBSD uses GNU C++
  3732. ;;
  3733. hpux9* | hpux10* | hpux11*)
  3734. case $cc_basename in
  3735. CC*)
  3736. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3737. _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  3738. if test "$host_cpu" != ia64; then
  3739. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  3740. fi
  3741. ;;
  3742. aCC*)
  3743. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3744. _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  3745. case $host_cpu in
  3746. hppa*64*|ia64*)
  3747. # +Z the default
  3748. ;;
  3749. *)
  3750. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  3751. ;;
  3752. esac
  3753. ;;
  3754. *)
  3755. ;;
  3756. esac
  3757. ;;
  3758. interix*)
  3759. # This is c89, which is MS Visual C++ (no shared libs)
  3760. # Anyone wants to do a port?
  3761. ;;
  3762. irix5* | irix6* | nonstopux*)
  3763. case $cc_basename in
  3764. CC*)
  3765. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3766. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3767. # CC pic flag -KPIC is the default.
  3768. ;;
  3769. *)
  3770. ;;
  3771. esac
  3772. ;;
  3773. linux* | k*bsd*-gnu | kopensolaris*-gnu)
  3774. case $cc_basename in
  3775. KCC*)
  3776. # KAI C++ Compiler
  3777. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  3778. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3779. ;;
  3780. ecpc* )
  3781. # old Intel C++ for x86_64 which still supported -KPIC.
  3782. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3783. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3784. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3785. ;;
  3786. icpc* )
  3787. # Intel C++, used to be incompatible with GCC.
  3788. # ICC 10 doesn't accept -KPIC any more.
  3789. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3790. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3791. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3792. ;;
  3793. pgCC* | pgcpp*)
  3794. # Portland Group C++ compiler
  3795. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3796. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  3797. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3798. ;;
  3799. cxx*)
  3800. # Compaq C++
  3801. # Make sure the PIC flag is empty. It appears that all Alpha
  3802. # Linux and Compaq Tru64 Unix objects are PIC.
  3803. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3804. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3805. ;;
  3806. xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
  3807. # IBM XL 8.0, 9.0 on PPC and BlueGene
  3808. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3809. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  3810. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  3811. ;;
  3812. *)
  3813. case `$CC -V 2>&1 | sed 5q` in
  3814. *Sun\ C*)
  3815. # Sun C++ 5.9
  3816. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3817. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3818. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  3819. ;;
  3820. esac
  3821. ;;
  3822. esac
  3823. ;;
  3824. lynxos*)
  3825. ;;
  3826. m88k*)
  3827. ;;
  3828. mvs*)
  3829. case $cc_basename in
  3830. cxx*)
  3831. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
  3832. ;;
  3833. *)
  3834. ;;
  3835. esac
  3836. ;;
  3837. netbsd* | netbsdelf*-gnu)
  3838. ;;
  3839. *qnx* | *nto*)
  3840. # QNX uses GNU C++, but need to define -shared option too, otherwise
  3841. # it will coredump.
  3842. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  3843. ;;
  3844. osf3* | osf4* | osf5*)
  3845. case $cc_basename in
  3846. KCC*)
  3847. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  3848. ;;
  3849. RCC*)
  3850. # Rational C++ 2.4.1
  3851. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3852. ;;
  3853. cxx*)
  3854. # Digital/Compaq C++
  3855. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3856. # Make sure the PIC flag is empty. It appears that all Alpha
  3857. # Linux and Compaq Tru64 Unix objects are PIC.
  3858. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3859. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3860. ;;
  3861. *)
  3862. ;;
  3863. esac
  3864. ;;
  3865. psos*)
  3866. ;;
  3867. solaris*)
  3868. case $cc_basename in
  3869. CC* | sunCC*)
  3870. # Sun C++ 4.2, 5.x and Centerline C++
  3871. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3872. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3873. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  3874. ;;
  3875. gcx*)
  3876. # Green Hills C++ Compiler
  3877. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  3878. ;;
  3879. *)
  3880. ;;
  3881. esac
  3882. ;;
  3883. sunos4*)
  3884. case $cc_basename in
  3885. CC*)
  3886. # Sun C++ 4.x
  3887. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3888. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3889. ;;
  3890. lcc*)
  3891. # Lucid
  3892. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3893. ;;
  3894. *)
  3895. ;;
  3896. esac
  3897. ;;
  3898. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  3899. case $cc_basename in
  3900. CC*)
  3901. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3902. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3903. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3904. ;;
  3905. esac
  3906. ;;
  3907. tandem*)
  3908. case $cc_basename in
  3909. NCC*)
  3910. # NonStop-UX NCC 3.20
  3911. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3912. ;;
  3913. *)
  3914. ;;
  3915. esac
  3916. ;;
  3917. vxworks*)
  3918. ;;
  3919. *)
  3920. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  3921. ;;
  3922. esac
  3923. fi
  3924. ],
  3925. [
  3926. if test "$GCC" = yes; then
  3927. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3928. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3929. case $host_os in
  3930. aix*)
  3931. # All AIX code is PIC.
  3932. if test "$host_cpu" = ia64; then
  3933. # AIX 5 now supports IA64 processor
  3934. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3935. fi
  3936. ;;
  3937. amigaos*)
  3938. case $host_cpu in
  3939. powerpc)
  3940. # see comment about AmigaOS4 .so support
  3941. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3942. ;;
  3943. m68k)
  3944. # FIXME: we need at least 68020 code to build shared libraries, but
  3945. # adding the `-m68020' flag to GCC prevents building anything better,
  3946. # like `-m68040'.
  3947. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  3948. ;;
  3949. esac
  3950. ;;
  3951. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  3952. # PIC is the default for these OSes.
  3953. ;;
  3954. mingw* | cygwin* | pw32* | os2* | cegcc*)
  3955. # This hack is so that the source file can tell whether it is being
  3956. # built for inclusion in a dll (and should export symbols for example).
  3957. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  3958. # (--disable-auto-import) libraries
  3959. m4_if([$1], [GCJ], [],
  3960. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3961. ;;
  3962. darwin* | rhapsody*)
  3963. # PIC is the default on this platform
  3964. # Common symbols not allowed in MH_DYLIB files
  3965. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  3966. ;;
  3967. haiku*)
  3968. # PIC is the default for Haiku.
  3969. # The "-static" flag exists, but is broken.
  3970. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3971. ;;
  3972. hpux*)
  3973. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  3974. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  3975. # sets the default TLS model and affects inlining.
  3976. case $host_cpu in
  3977. hppa*64*)
  3978. # +Z the default
  3979. ;;
  3980. *)
  3981. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3982. ;;
  3983. esac
  3984. ;;
  3985. interix[[3-9]]*)
  3986. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  3987. # Instead, we relocate shared libraries at runtime.
  3988. ;;
  3989. msdosdjgpp*)
  3990. # Just because we use GCC doesn't mean we suddenly get shared libraries
  3991. # on systems that don't support them.
  3992. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  3993. enable_shared=no
  3994. ;;
  3995. *nto* | *qnx*)
  3996. # QNX uses GNU C++, but need to define -shared option too, otherwise
  3997. # it will coredump.
  3998. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  3999. ;;
  4000. sysv4*MP*)
  4001. if test -d /usr/nec; then
  4002. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  4003. fi
  4004. ;;
  4005. *)
  4006. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4007. ;;
  4008. esac
  4009. case $cc_basename in
  4010. nvcc*) # Cuda Compiler Driver 2.2
  4011. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
  4012. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  4013. _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
  4014. fi
  4015. ;;
  4016. esac
  4017. else
  4018. # PORTME Check for flag to pass linker flags through the system compiler.
  4019. case $host_os in
  4020. aix*)
  4021. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4022. if test "$host_cpu" = ia64; then
  4023. # AIX 5 now supports IA64 processor
  4024. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4025. else
  4026. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  4027. fi
  4028. ;;
  4029. mingw* | cygwin* | pw32* | os2* | cegcc*)
  4030. # This hack is so that the source file can tell whether it is being
  4031. # built for inclusion in a dll (and should export symbols for example).
  4032. m4_if([$1], [GCJ], [],
  4033. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  4034. ;;
  4035. hpux9* | hpux10* | hpux11*)
  4036. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4037. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  4038. # not for PA HP-UX.
  4039. case $host_cpu in
  4040. hppa*64*|ia64*)
  4041. # +Z the default
  4042. ;;
  4043. *)
  4044. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4045. ;;
  4046. esac
  4047. # Is there a better lt_prog_compiler_static that works with the bundled CC?
  4048. _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  4049. ;;
  4050. irix5* | irix6* | nonstopux*)
  4051. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4052. # PIC (with -KPIC) is the default.
  4053. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4054. ;;
  4055. linux* | k*bsd*-gnu | kopensolaris*-gnu)
  4056. case $cc_basename in
  4057. # old Intel for x86_64 which still supported -KPIC.
  4058. ecc*)
  4059. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4060. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4061. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4062. ;;
  4063. # icc used to be incompatible with GCC.
  4064. # ICC 10 doesn't accept -KPIC any more.
  4065. icc* | ifort*)
  4066. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4067. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4068. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4069. ;;
  4070. # Lahey Fortran 8.1.
  4071. lf95*)
  4072. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4073. _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
  4074. _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
  4075. ;;
  4076. nagfor*)
  4077. # NAG Fortran compiler
  4078. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
  4079. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4080. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4081. ;;
  4082. pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
  4083. # Portland Group compilers (*not* the Pentium gcc compiler,
  4084. # which looks to be a dead project)
  4085. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4086. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4087. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4088. ;;
  4089. ccc*)
  4090. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4091. # All Alpha code is PIC.
  4092. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4093. ;;
  4094. xl* | bgxl* | bgf* | mpixl*)
  4095. # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
  4096. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4097. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  4098. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  4099. ;;
  4100. *)
  4101. case `$CC -V 2>&1 | sed 5q` in
  4102. *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
  4103. # Sun Fortran 8.3 passes all unrecognized flags to the linker
  4104. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4105. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4106. _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
  4107. ;;
  4108. *Sun\ F* | *Sun*Fortran*)
  4109. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4110. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4111. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4112. ;;
  4113. *Sun\ C*)
  4114. # Sun C 5.9
  4115. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4116. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4117. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4118. ;;
  4119. *Intel*\ [[CF]]*Compiler*)
  4120. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4121. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4122. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4123. ;;
  4124. *Portland\ Group*)
  4125. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4126. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4127. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4128. ;;
  4129. esac
  4130. ;;
  4131. esac
  4132. ;;
  4133. newsos6)
  4134. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4135. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4136. ;;
  4137. *nto* | *qnx*)
  4138. # QNX uses GNU C++, but need to define -shared option too, otherwise
  4139. # it will coredump.
  4140. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4141. ;;
  4142. osf3* | osf4* | osf5*)
  4143. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4144. # All OSF/1 code is PIC.
  4145. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4146. ;;
  4147. rdos*)
  4148. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4149. ;;
  4150. solaris*)
  4151. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4152. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4153. case $cc_basename in
  4154. f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
  4155. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
  4156. *)
  4157. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
  4158. esac
  4159. ;;
  4160. sunos4*)
  4161. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4162. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4163. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4164. ;;
  4165. sysv4 | sysv4.2uw2* | sysv4.3*)
  4166. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4167. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4168. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4169. ;;
  4170. sysv4*MP*)
  4171. if test -d /usr/nec ;then
  4172. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
  4173. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4174. fi
  4175. ;;
  4176. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  4177. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4178. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4179. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4180. ;;
  4181. unicos*)
  4182. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4183. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4184. ;;
  4185. uts4*)
  4186. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4187. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4188. ;;
  4189. *)
  4190. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4191. ;;
  4192. esac
  4193. fi
  4194. ])
  4195. case $host_os in
  4196. # For platforms which do not support PIC, -DPIC is meaningless:
  4197. *djgpp*)
  4198. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4199. ;;
  4200. *)
  4201. _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
  4202. ;;
  4203. esac
  4204. AC_CACHE_CHECK([for $compiler option to produce PIC],
  4205. [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
  4206. [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
  4207. _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
  4208. #
  4209. # Check to make sure the PIC flag actually works.
  4210. #
  4211. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  4212. _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
  4213. [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
  4214. [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
  4215. [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
  4216. "" | " "*) ;;
  4217. *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
  4218. esac],
  4219. [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4220. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
  4221. fi
  4222. _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
  4223. [Additional compiler flags for building library objects])
  4224. _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
  4225. [How to pass a linker flag through the compiler])
  4226. #
  4227. # Check to make sure the static flag actually works.
  4228. #
  4229. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
  4230. _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
  4231. _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
  4232. $lt_tmp_static_flag,
  4233. [],
  4234. [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
  4235. _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
  4236. [Compiler flag to prevent dynamic linking])
  4237. ])# _LT_COMPILER_PIC
  4238. # _LT_LINKER_SHLIBS([TAGNAME])
  4239. # ----------------------------
  4240. # See if the linker supports building shared libraries.
  4241. m4_defun([_LT_LINKER_SHLIBS],
  4242. [AC_REQUIRE([LT_PATH_LD])dnl
  4243. AC_REQUIRE([LT_PATH_NM])dnl
  4244. m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  4245. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  4246. m4_require([_LT_DECL_EGREP])dnl
  4247. m4_require([_LT_DECL_SED])dnl
  4248. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  4249. m4_require([_LT_TAG_COMPILER])dnl
  4250. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  4251. m4_if([$1], [CXX], [
  4252. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4253. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  4254. case $host_os in
  4255. aix[[4-9]]*)
  4256. # If we're using GNU nm, then we don't want the "-C" option.
  4257. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  4258. # Also, AIX nm treats weak defined symbols like other global defined
  4259. # symbols, whereas GNU nm marks them as "W".
  4260. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  4261. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  4262. else
  4263. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  4264. fi
  4265. ;;
  4266. pw32*)
  4267. _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
  4268. ;;
  4269. cygwin* | mingw* | cegcc*)
  4270. case $cc_basename in
  4271. cl*)
  4272. _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  4273. ;;
  4274. *)
  4275. _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'
  4276. _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  4277. ;;
  4278. esac
  4279. ;;
  4280. linux* | k*bsd*-gnu | gnu*)
  4281. _LT_TAGVAR(link_all_deplibs, $1)=no
  4282. ;;
  4283. *)
  4284. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4285. ;;
  4286. esac
  4287. ], [
  4288. runpath_var=
  4289. _LT_TAGVAR(allow_undefined_flag, $1)=
  4290. _LT_TAGVAR(always_export_symbols, $1)=no
  4291. _LT_TAGVAR(archive_cmds, $1)=
  4292. _LT_TAGVAR(archive_expsym_cmds, $1)=
  4293. _LT_TAGVAR(compiler_needs_object, $1)=no
  4294. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  4295. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  4296. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4297. _LT_TAGVAR(hardcode_automatic, $1)=no
  4298. _LT_TAGVAR(hardcode_direct, $1)=no
  4299. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  4300. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4301. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  4302. _LT_TAGVAR(hardcode_minus_L, $1)=no
  4303. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  4304. _LT_TAGVAR(inherit_rpath, $1)=no
  4305. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  4306. _LT_TAGVAR(module_cmds, $1)=
  4307. _LT_TAGVAR(module_expsym_cmds, $1)=
  4308. _LT_TAGVAR(old_archive_from_new_cmds, $1)=
  4309. _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
  4310. _LT_TAGVAR(thread_safe_flag_spec, $1)=
  4311. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4312. # include_expsyms should be a list of space-separated symbols to be *always*
  4313. # included in the symbol list
  4314. _LT_TAGVAR(include_expsyms, $1)=
  4315. # exclude_expsyms can be an extended regexp of symbols to exclude
  4316. # it will be wrapped by ` (' and `)$', so one must not match beginning or
  4317. # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
  4318. # as well as any symbol that contains `d'.
  4319. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  4320. # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  4321. # platforms (ab)use it in PIC code, but their linkers get confused if
  4322. # the symbol is explicitly referenced. Since portable code cannot
  4323. # rely on this symbol name, it's probably fine to never include it in
  4324. # preloaded symbol tables.
  4325. # Exclude shared library initialization/finalization symbols.
  4326. dnl Note also adjust exclude_expsyms for C++ above.
  4327. extract_expsyms_cmds=
  4328. case $host_os in
  4329. cygwin* | mingw* | pw32* | cegcc*)
  4330. # FIXME: the MSVC++ port hasn't been tested in a loooong time
  4331. # When not using gcc, we currently assume that we are using
  4332. # Microsoft Visual C++.
  4333. if test "$GCC" != yes; then
  4334. with_gnu_ld=no
  4335. fi
  4336. ;;
  4337. interix*)
  4338. # we just hope/assume this is gcc and not c89 (= MSVC++)
  4339. with_gnu_ld=yes
  4340. ;;
  4341. openbsd*)
  4342. with_gnu_ld=no
  4343. ;;
  4344. linux* | k*bsd*-gnu | gnu*)
  4345. _LT_TAGVAR(link_all_deplibs, $1)=no
  4346. ;;
  4347. esac
  4348. _LT_TAGVAR(ld_shlibs, $1)=yes
  4349. # On some targets, GNU ld is compatible enough with the native linker
  4350. # that we're better off using the native interface for both.
  4351. lt_use_gnu_ld_interface=no
  4352. if test "$with_gnu_ld" = yes; then
  4353. case $host_os in
  4354. aix*)
  4355. # The AIX port of GNU ld has always aspired to compatibility
  4356. # with the native linker. However, as the warning in the GNU ld
  4357. # block says, versions before 2.19.5* couldn't really create working
  4358. # shared libraries, regardless of the interface used.
  4359. case `$LD -v 2>&1` in
  4360. *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
  4361. *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
  4362. *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
  4363. *)
  4364. lt_use_gnu_ld_interface=yes
  4365. ;;
  4366. esac
  4367. ;;
  4368. *)
  4369. lt_use_gnu_ld_interface=yes
  4370. ;;
  4371. esac
  4372. fi
  4373. if test "$lt_use_gnu_ld_interface" = yes; then
  4374. # If archive_cmds runs LD, not CC, wlarc should be empty
  4375. wlarc='${wl}'
  4376. # Set some defaults for GNU ld with shared library support. These
  4377. # are reset later if shared libraries are not supported. Putting them
  4378. # here allows them to be overridden if necessary.
  4379. runpath_var=LD_RUN_PATH
  4380. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4381. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  4382. # ancient GNU ld didn't support --whole-archive et. al.
  4383. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
  4384. _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  4385. else
  4386. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4387. fi
  4388. supports_anon_versioning=no
  4389. case `$LD -v 2>&1` in
  4390. *GNU\ gold*) supports_anon_versioning=yes ;;
  4391. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
  4392. *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
  4393. *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
  4394. *\ 2.11.*) ;; # other 2.11 versions
  4395. *) supports_anon_versioning=yes ;;
  4396. esac
  4397. # See if GNU ld supports shared libraries.
  4398. case $host_os in
  4399. aix[[3-9]]*)
  4400. # On AIX/PPC, the GNU linker is very broken
  4401. if test "$host_cpu" != ia64; then
  4402. _LT_TAGVAR(ld_shlibs, $1)=no
  4403. cat <<_LT_EOF 1>&2
  4404. *** Warning: the GNU linker, at least up to release 2.19, is reported
  4405. *** to be unable to reliably create shared libraries on AIX.
  4406. *** Therefore, libtool is disabling shared libraries support. If you
  4407. *** really care for shared libraries, you may want to install binutils
  4408. *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
  4409. *** You will then need to restart the configuration process.
  4410. _LT_EOF
  4411. fi
  4412. ;;
  4413. amigaos*)
  4414. case $host_cpu in
  4415. powerpc)
  4416. # see comment about AmigaOS4 .so support
  4417. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4418. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  4419. ;;
  4420. m68k)
  4421. _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)'
  4422. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4423. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4424. ;;
  4425. esac
  4426. ;;
  4427. beos*)
  4428. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4429. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4430. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  4431. # support --undefined. This deserves some investigation. FIXME
  4432. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4433. else
  4434. _LT_TAGVAR(ld_shlibs, $1)=no
  4435. fi
  4436. ;;
  4437. cygwin* | mingw* | pw32* | cegcc*)
  4438. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  4439. # as there is no search path for DLLs.
  4440. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4441. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
  4442. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4443. _LT_TAGVAR(always_export_symbols, $1)=no
  4444. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4445. _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'
  4446. _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  4447. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  4448. _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'
  4449. # If the export-symbols file already is a .def file (1st line
  4450. # is EXPORTS), use it as is; otherwise, prepend...
  4451. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  4452. cp $export_symbols $output_objdir/$soname.def;
  4453. else
  4454. echo EXPORTS > $output_objdir/$soname.def;
  4455. cat $export_symbols >> $output_objdir/$soname.def;
  4456. fi~
  4457. $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  4458. else
  4459. _LT_TAGVAR(ld_shlibs, $1)=no
  4460. fi
  4461. ;;
  4462. haiku*)
  4463. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4464. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4465. ;;
  4466. interix[[3-9]]*)
  4467. _LT_TAGVAR(hardcode_direct, $1)=no
  4468. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4469. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  4470. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4471. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  4472. # Instead, shared libraries are loaded at an image base (0x10000000 by
  4473. # default) and relocated if they conflict, which is a slow very memory
  4474. # consuming and fragmenting process. To avoid this, we pick a random,
  4475. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  4476. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  4477. _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'
  4478. _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'
  4479. ;;
  4480. gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
  4481. tmp_diet=no
  4482. if test "$host_os" = linux-dietlibc; then
  4483. case $cc_basename in
  4484. diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
  4485. esac
  4486. fi
  4487. if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
  4488. && test "$tmp_diet" = no
  4489. then
  4490. tmp_addflag=' $pic_flag'
  4491. tmp_sharedflag='-shared'
  4492. case $cc_basename,$host_cpu in
  4493. pgcc*) # Portland Group C compiler
  4494. _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'
  4495. tmp_addflag=' $pic_flag'
  4496. ;;
  4497. pgf77* | pgf90* | pgf95* | pgfortran*)
  4498. # Portland Group f77 and f90 compilers
  4499. _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'
  4500. tmp_addflag=' $pic_flag -Mnomain' ;;
  4501. ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
  4502. tmp_addflag=' -i_dynamic' ;;
  4503. efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
  4504. tmp_addflag=' -i_dynamic -nofor_main' ;;
  4505. ifc* | ifort*) # Intel Fortran compiler
  4506. tmp_addflag=' -nofor_main' ;;
  4507. lf95*) # Lahey Fortran 8.1
  4508. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4509. tmp_sharedflag='--shared' ;;
  4510. xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
  4511. tmp_sharedflag='-qmkshrobj'
  4512. tmp_addflag= ;;
  4513. nvcc*) # Cuda Compiler Driver 2.2
  4514. _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'
  4515. _LT_TAGVAR(compiler_needs_object, $1)=yes
  4516. ;;
  4517. esac
  4518. case `$CC -V 2>&1 | sed 5q` in
  4519. *Sun\ C*) # Sun C 5.9
  4520. _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'
  4521. _LT_TAGVAR(compiler_needs_object, $1)=yes
  4522. tmp_sharedflag='-G' ;;
  4523. *Sun\ F*) # Sun Fortran 8.3
  4524. tmp_sharedflag='-G' ;;
  4525. esac
  4526. _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4527. if test "x$supports_anon_versioning" = xyes; then
  4528. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  4529. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4530. echo "local: *; };" >> $output_objdir/$libname.ver~
  4531. $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  4532. fi
  4533. case $cc_basename in
  4534. xlf* | bgf* | bgxlf* | mpixlf*)
  4535. # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
  4536. _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
  4537. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4538. _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
  4539. if test "x$supports_anon_versioning" = xyes; then
  4540. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  4541. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4542. echo "local: *; };" >> $output_objdir/$libname.ver~
  4543. $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
  4544. fi
  4545. ;;
  4546. esac
  4547. else
  4548. _LT_TAGVAR(ld_shlibs, $1)=no
  4549. fi
  4550. ;;
  4551. netbsd* | netbsdelf*-gnu)
  4552. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  4553. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  4554. wlarc=
  4555. else
  4556. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4557. _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'
  4558. fi
  4559. ;;
  4560. solaris*)
  4561. if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
  4562. _LT_TAGVAR(ld_shlibs, $1)=no
  4563. cat <<_LT_EOF 1>&2
  4564. *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  4565. *** create shared libraries on Solaris systems. Therefore, libtool
  4566. *** is disabling shared libraries support. We urge you to upgrade GNU
  4567. *** binutils to release 2.9.1 or newer. Another option is to modify
  4568. *** your PATH or compiler configuration so that the native linker is
  4569. *** used, and then restart.
  4570. _LT_EOF
  4571. elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4572. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4573. _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'
  4574. else
  4575. _LT_TAGVAR(ld_shlibs, $1)=no
  4576. fi
  4577. ;;
  4578. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
  4579. case `$LD -v 2>&1` in
  4580. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
  4581. _LT_TAGVAR(ld_shlibs, $1)=no
  4582. cat <<_LT_EOF 1>&2
  4583. *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
  4584. *** reliably create shared libraries on SCO systems. Therefore, libtool
  4585. *** is disabling shared libraries support. We urge you to upgrade GNU
  4586. *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
  4587. *** your PATH or compiler configuration so that the native linker is
  4588. *** used, and then restart.
  4589. _LT_EOF
  4590. ;;
  4591. *)
  4592. # For security reasons, it is highly recommended that you always
  4593. # use absolute paths for naming shared libraries, and exclude the
  4594. # DT_RUNPATH tag from executables and libraries. But doing so
  4595. # requires that you compile everything twice, which is a pain.
  4596. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4597. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4598. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4599. _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'
  4600. else
  4601. _LT_TAGVAR(ld_shlibs, $1)=no
  4602. fi
  4603. ;;
  4604. esac
  4605. ;;
  4606. sunos4*)
  4607. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4608. wlarc=
  4609. _LT_TAGVAR(hardcode_direct, $1)=yes
  4610. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4611. ;;
  4612. *)
  4613. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4614. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4615. _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'
  4616. else
  4617. _LT_TAGVAR(ld_shlibs, $1)=no
  4618. fi
  4619. ;;
  4620. esac
  4621. if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
  4622. runpath_var=
  4623. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4624. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  4625. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4626. fi
  4627. else
  4628. # PORTME fill in a description of your system's linker (not GNU ld)
  4629. case $host_os in
  4630. aix3*)
  4631. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4632. _LT_TAGVAR(always_export_symbols, $1)=yes
  4633. _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'
  4634. # Note: this linker hardcodes the directories in LIBPATH if there
  4635. # are no directories specified by -L.
  4636. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4637. if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
  4638. # Neither direct hardcoding nor static linking is supported with a
  4639. # broken collect2.
  4640. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  4641. fi
  4642. ;;
  4643. aix[[4-9]]*)
  4644. if test "$host_cpu" = ia64; then
  4645. # On IA64, the linker does run time linking by default, so we don't
  4646. # have to do anything special.
  4647. aix_use_runtimelinking=no
  4648. exp_sym_flag='-Bexport'
  4649. no_entry_flag=""
  4650. else
  4651. # If we're using GNU nm, then we don't want the "-C" option.
  4652. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  4653. # Also, AIX nm treats weak defined symbols like other global
  4654. # defined symbols, whereas GNU nm marks them as "W".
  4655. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  4656. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  4657. else
  4658. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  4659. fi
  4660. aix_use_runtimelinking=no
  4661. # Test if we are trying to use run time linking or normal
  4662. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  4663. # need to do runtime linking.
  4664. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  4665. for ld_flag in $LDFLAGS; do
  4666. if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
  4667. aix_use_runtimelinking=yes
  4668. break
  4669. fi
  4670. done
  4671. ;;
  4672. esac
  4673. exp_sym_flag='-bexport'
  4674. no_entry_flag='-bnoentry'
  4675. fi
  4676. # When large executables or shared objects are built, AIX ld can
  4677. # have problems creating the table of contents. If linking a library
  4678. # or program results in "error TOC overflow" add -mminimal-toc to
  4679. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  4680. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  4681. _LT_TAGVAR(archive_cmds, $1)=''
  4682. _LT_TAGVAR(hardcode_direct, $1)=yes
  4683. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4684. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  4685. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4686. _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
  4687. if test "$GCC" = yes; then
  4688. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  4689. # We only want to do this on AIX 4.2 and lower, the check
  4690. # below for broken collect2 doesn't work under 4.3+
  4691. collect2name=`${CC} -print-prog-name=collect2`
  4692. if test -f "$collect2name" &&
  4693. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  4694. then
  4695. # We have reworked collect2
  4696. :
  4697. else
  4698. # We have old collect2
  4699. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  4700. # It fails to find uninstalled libraries when the uninstalled
  4701. # path is not listed in the libpath. Setting hardcode_minus_L
  4702. # to unsupported forces relinking
  4703. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4704. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4705. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  4706. fi
  4707. ;;
  4708. esac
  4709. shared_flag='-shared'
  4710. if test "$aix_use_runtimelinking" = yes; then
  4711. shared_flag="$shared_flag "'${wl}-G'
  4712. fi
  4713. _LT_TAGVAR(link_all_deplibs, $1)=no
  4714. else
  4715. # not using gcc
  4716. if test "$host_cpu" = ia64; then
  4717. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  4718. # chokes on -Wl,-G. The following line is correct:
  4719. shared_flag='-G'
  4720. else
  4721. if test "$aix_use_runtimelinking" = yes; then
  4722. shared_flag='${wl}-G'
  4723. else
  4724. shared_flag='${wl}-bM:SRE'
  4725. fi
  4726. fi
  4727. fi
  4728. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
  4729. # It seems that -bexpall does not export symbols beginning with
  4730. # underscore (_), so it is better to generate a list of symbols to export.
  4731. _LT_TAGVAR(always_export_symbols, $1)=yes
  4732. if test "$aix_use_runtimelinking" = yes; then
  4733. # Warning - without using the other runtime loading flags (-brtl),
  4734. # -berok will link without error, but may produce a broken library.
  4735. _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
  4736. # Determine the default libpath from the value encoded in an
  4737. # empty executable.
  4738. _LT_SYS_MODULE_PATH_AIX([$1])
  4739. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  4740. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
  4741. else
  4742. if test "$host_cpu" = ia64; then
  4743. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  4744. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  4745. _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"
  4746. else
  4747. # Determine the default libpath from the value encoded in an
  4748. # empty executable.
  4749. _LT_SYS_MODULE_PATH_AIX([$1])
  4750. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  4751. # Warning - without using the other run time loading flags,
  4752. # -berok will link without error, but may produce a broken library.
  4753. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  4754. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  4755. if test "$with_gnu_ld" = yes; then
  4756. # We only use this code for GNU lds that support --whole-archive.
  4757. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  4758. else
  4759. # Exported symbols can be pulled into shared objects from archives
  4760. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  4761. fi
  4762. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  4763. # This is similar to how AIX traditionally builds its shared libraries.
  4764. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
  4765. fi
  4766. fi
  4767. ;;
  4768. amigaos*)
  4769. case $host_cpu in
  4770. powerpc)
  4771. # see comment about AmigaOS4 .so support
  4772. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4773. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  4774. ;;
  4775. m68k)
  4776. _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)'
  4777. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4778. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4779. ;;
  4780. esac
  4781. ;;
  4782. bsdi[[45]]*)
  4783. _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
  4784. ;;
  4785. cygwin* | mingw* | pw32* | cegcc*)
  4786. # When not using gcc, we currently assume that we are using
  4787. # Microsoft Visual C++.
  4788. # hardcode_libdir_flag_spec is actually meaningless, as there is
  4789. # no search path for DLLs.
  4790. case $cc_basename in
  4791. cl*)
  4792. # Native MSVC
  4793. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  4794. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4795. _LT_TAGVAR(always_export_symbols, $1)=yes
  4796. _LT_TAGVAR(file_list_spec, $1)='@'
  4797. # Tell ltmain to make .lib files, not .a files.
  4798. libext=lib
  4799. # Tell ltmain to make .dll files, not .so files.
  4800. shrext_cmds=".dll"
  4801. # FIXME: Setting linknames here is a bad hack.
  4802. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
  4803. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  4804. sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
  4805. else
  4806. sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
  4807. fi~
  4808. $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  4809. linknames='
  4810. # The linker will not automatically build a static lib if we build a DLL.
  4811. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  4812. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4813. _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  4814. _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'
  4815. # Don't use ranlib
  4816. _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  4817. _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  4818. lt_tool_outputfile="@TOOL_OUTPUT@"~
  4819. case $lt_outputfile in
  4820. *.exe|*.EXE) ;;
  4821. *)
  4822. lt_outputfile="$lt_outputfile.exe"
  4823. lt_tool_outputfile="$lt_tool_outputfile.exe"
  4824. ;;
  4825. esac~
  4826. if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
  4827. $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  4828. $RM "$lt_outputfile.manifest";
  4829. fi'
  4830. ;;
  4831. *)
  4832. # Assume MSVC wrapper
  4833. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  4834. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4835. # Tell ltmain to make .lib files, not .a files.
  4836. libext=lib
  4837. # Tell ltmain to make .dll files, not .so files.
  4838. shrext_cmds=".dll"
  4839. # FIXME: Setting linknames here is a bad hack.
  4840. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
  4841. # The linker will automatically build a .lib file if we build a DLL.
  4842. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  4843. # FIXME: Should let the user specify the lib program.
  4844. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
  4845. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4846. ;;
  4847. esac
  4848. ;;
  4849. darwin* | rhapsody*)
  4850. _LT_DARWIN_LINKER_FEATURES($1)
  4851. ;;
  4852. dgux*)
  4853. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  4854. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4855. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4856. ;;
  4857. # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  4858. # support. Future versions do this automatically, but an explicit c++rt0.o
  4859. # does not break anything, and helps significantly (at the cost of a little
  4860. # extra space).
  4861. freebsd2.2*)
  4862. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
  4863. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4864. _LT_TAGVAR(hardcode_direct, $1)=yes
  4865. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4866. ;;
  4867. # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  4868. freebsd2.*)
  4869. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4870. _LT_TAGVAR(hardcode_direct, $1)=yes
  4871. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4872. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4873. ;;
  4874. # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  4875. freebsd* | dragonfly*)
  4876. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  4877. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4878. _LT_TAGVAR(hardcode_direct, $1)=yes
  4879. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4880. ;;
  4881. hpux9*)
  4882. if test "$GCC" = yes; then
  4883. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  4884. else
  4885. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  4886. fi
  4887. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  4888. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4889. _LT_TAGVAR(hardcode_direct, $1)=yes
  4890. # hardcode_minus_L: Not really in the search PATH,
  4891. # but as the default location of the library.
  4892. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4893. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4894. ;;
  4895. hpux10*)
  4896. if test "$GCC" = yes && test "$with_gnu_ld" = no; then
  4897. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  4898. else
  4899. _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
  4900. fi
  4901. if test "$with_gnu_ld" = no; then
  4902. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  4903. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4904. _LT_TAGVAR(hardcode_direct, $1)=yes
  4905. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4906. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4907. # hardcode_minus_L: Not really in the search PATH,
  4908. # but as the default location of the library.
  4909. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4910. fi
  4911. ;;
  4912. hpux11*)
  4913. if test "$GCC" = yes && test "$with_gnu_ld" = no; then
  4914. case $host_cpu in
  4915. hppa*64*)
  4916. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  4917. ;;
  4918. ia64*)
  4919. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  4920. ;;
  4921. *)
  4922. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  4923. ;;
  4924. esac
  4925. else
  4926. case $host_cpu in
  4927. hppa*64*)
  4928. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  4929. ;;
  4930. ia64*)
  4931. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  4932. ;;
  4933. *)
  4934. m4_if($1, [], [
  4935. # Older versions of the 11.00 compiler do not understand -b yet
  4936. # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
  4937. _LT_LINKER_OPTION([if $CC understands -b],
  4938. _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
  4939. [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
  4940. [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
  4941. [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
  4942. ;;
  4943. esac
  4944. fi
  4945. if test "$with_gnu_ld" = no; then
  4946. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  4947. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4948. case $host_cpu in
  4949. hppa*64*|ia64*)
  4950. _LT_TAGVAR(hardcode_direct, $1)=no
  4951. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4952. ;;
  4953. *)
  4954. _LT_TAGVAR(hardcode_direct, $1)=yes
  4955. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4956. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4957. # hardcode_minus_L: Not really in the search PATH,
  4958. # but as the default location of the library.
  4959. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4960. ;;
  4961. esac
  4962. fi
  4963. ;;
  4964. irix5* | irix6* | nonstopux*)
  4965. if test "$GCC" = yes; then
  4966. _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'
  4967. # Try to use the -exported_symbol ld option, if it does not
  4968. # work, assume that -exports_file does not work either and
  4969. # implicitly export all symbols.
  4970. # This should be the same for all languages, so no per-tag cache variable.
  4971. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
  4972. [lt_cv_irix_exported_symbol],
  4973. [save_LDFLAGS="$LDFLAGS"
  4974. LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
  4975. AC_LINK_IFELSE(
  4976. [AC_LANG_SOURCE(
  4977. [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
  4978. [C++], [[int foo (void) { return 0; }]],
  4979. [Fortran 77], [[
  4980. subroutine foo
  4981. end]],
  4982. [Fortran], [[
  4983. subroutine foo
  4984. end]])])],
  4985. [lt_cv_irix_exported_symbol=yes],
  4986. [lt_cv_irix_exported_symbol=no])
  4987. LDFLAGS="$save_LDFLAGS"])
  4988. if test "$lt_cv_irix_exported_symbol" = yes; then
  4989. _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'
  4990. fi
  4991. else
  4992. _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'
  4993. _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'
  4994. fi
  4995. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  4996. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4997. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4998. _LT_TAGVAR(inherit_rpath, $1)=yes
  4999. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5000. ;;
  5001. netbsd* | netbsdelf*-gnu)
  5002. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  5003. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
  5004. else
  5005. _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
  5006. fi
  5007. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5008. _LT_TAGVAR(hardcode_direct, $1)=yes
  5009. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5010. ;;
  5011. newsos6)
  5012. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5013. _LT_TAGVAR(hardcode_direct, $1)=yes
  5014. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5015. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5016. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5017. ;;
  5018. *nto* | *qnx*)
  5019. ;;
  5020. openbsd*)
  5021. if test -f /usr/libexec/ld.so; then
  5022. _LT_TAGVAR(hardcode_direct, $1)=yes
  5023. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5024. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5025. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  5026. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5027. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
  5028. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5029. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5030. else
  5031. case $host_os in
  5032. openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
  5033. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  5034. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5035. ;;
  5036. *)
  5037. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5038. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5039. ;;
  5040. esac
  5041. fi
  5042. else
  5043. _LT_TAGVAR(ld_shlibs, $1)=no
  5044. fi
  5045. ;;
  5046. os2*)
  5047. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5048. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5049. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5050. _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
  5051. _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
  5052. ;;
  5053. osf3*)
  5054. if test "$GCC" = yes; then
  5055. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  5056. _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'
  5057. else
  5058. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  5059. _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'
  5060. fi
  5061. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  5062. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5063. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5064. ;;
  5065. osf4* | osf5*) # as osf3* with the addition of -msym flag
  5066. if test "$GCC" = yes; then
  5067. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  5068. _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'
  5069. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5070. else
  5071. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  5072. _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'
  5073. _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~
  5074. $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'
  5075. # Both c and cxx compiler support -rpath directly
  5076. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  5077. fi
  5078. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  5079. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5080. ;;
  5081. solaris*)
  5082. _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
  5083. if test "$GCC" = yes; then
  5084. wlarc='${wl}'
  5085. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  5086. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5087. $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'
  5088. else
  5089. case `$CC -V 2>&1` in
  5090. *"Compilers 5.0"*)
  5091. wlarc=''
  5092. _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5093. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5094. $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
  5095. ;;
  5096. *)
  5097. wlarc='${wl}'
  5098. _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
  5099. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5100. $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
  5101. ;;
  5102. esac
  5103. fi
  5104. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5105. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5106. case $host_os in
  5107. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  5108. *)
  5109. # The compiler driver will combine and reorder linker options,
  5110. # but understands `-z linker_flag'. GCC discards it without `$wl',
  5111. # but is careful enough not to reorder.
  5112. # Supported since Solaris 2.6 (maybe 2.5.1?)
  5113. if test "$GCC" = yes; then
  5114. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
  5115. else
  5116. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  5117. fi
  5118. ;;
  5119. esac
  5120. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5121. ;;
  5122. sunos4*)
  5123. if test "x$host_vendor" = xsequent; then
  5124. # Use $CC to link under sequent, because it throws in some extra .o
  5125. # files that make .init and .fini sections work.
  5126. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
  5127. else
  5128. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
  5129. fi
  5130. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5131. _LT_TAGVAR(hardcode_direct, $1)=yes
  5132. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5133. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5134. ;;
  5135. sysv4)
  5136. case $host_vendor in
  5137. sni)
  5138. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5139. _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
  5140. ;;
  5141. siemens)
  5142. ## LD is ld it makes a PLAMLIB
  5143. ## CC just makes a GrossModule.
  5144. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  5145. _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
  5146. _LT_TAGVAR(hardcode_direct, $1)=no
  5147. ;;
  5148. motorola)
  5149. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5150. _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
  5151. ;;
  5152. esac
  5153. runpath_var='LD_RUN_PATH'
  5154. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5155. ;;
  5156. sysv4.3*)
  5157. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5158. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5159. _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
  5160. ;;
  5161. sysv4*MP*)
  5162. if test -d /usr/nec; then
  5163. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5164. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5165. runpath_var=LD_RUN_PATH
  5166. hardcode_runpath_var=yes
  5167. _LT_TAGVAR(ld_shlibs, $1)=yes
  5168. fi
  5169. ;;
  5170. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  5171. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  5172. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5173. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5174. runpath_var='LD_RUN_PATH'
  5175. if test "$GCC" = yes; then
  5176. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5177. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5178. else
  5179. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5180. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5181. fi
  5182. ;;
  5183. sysv5* | sco3.2v5* | sco5v6*)
  5184. # Note: We can NOT use -z defs as we might desire, because we do not
  5185. # link with -lc, and that would cause any symbols used from libc to
  5186. # always be unresolved, which means just about no library would
  5187. # ever link correctly. If we're not using GNU ld we use -z text
  5188. # though, which does catch some bad symbols but isn't as heavy-handed
  5189. # as -z defs.
  5190. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  5191. _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
  5192. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5193. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5194. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
  5195. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5196. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5197. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  5198. runpath_var='LD_RUN_PATH'
  5199. if test "$GCC" = yes; then
  5200. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5201. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5202. else
  5203. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5204. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5205. fi
  5206. ;;
  5207. uts4*)
  5208. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5209. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5210. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5211. ;;
  5212. *)
  5213. _LT_TAGVAR(ld_shlibs, $1)=no
  5214. ;;
  5215. esac
  5216. if test x$host_vendor = xsni; then
  5217. case $host in
  5218. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  5219. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
  5220. ;;
  5221. esac
  5222. fi
  5223. fi
  5224. ])
  5225. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  5226. test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  5227. _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
  5228. _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
  5229. _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
  5230. _LT_DECL([], [extract_expsyms_cmds], [2],
  5231. [The commands to extract the exported symbol list from a shared archive])
  5232. #
  5233. # Do we need to explicitly link libc?
  5234. #
  5235. case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
  5236. x|xyes)
  5237. # Assume -lc should be added
  5238. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5239. if test "$enable_shared" = yes && test "$GCC" = yes; then
  5240. case $_LT_TAGVAR(archive_cmds, $1) in
  5241. *'~'*)
  5242. # FIXME: we may have to deal with multi-command sequences.
  5243. ;;
  5244. '$CC '*)
  5245. # Test whether the compiler implicitly links with -lc since on some
  5246. # systems, -lgcc has to come before -lc. If gcc already passes -lc
  5247. # to ld, don't add -lc before -lgcc.
  5248. AC_CACHE_CHECK([whether -lc should be explicitly linked in],
  5249. [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
  5250. [$RM conftest*
  5251. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  5252. if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
  5253. soname=conftest
  5254. lib=conftest
  5255. libobjs=conftest.$ac_objext
  5256. deplibs=
  5257. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
  5258. pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
  5259. compiler_flags=-v
  5260. linker_flags=-v
  5261. verstring=
  5262. output_objdir=.
  5263. libname=conftest
  5264. lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
  5265. _LT_TAGVAR(allow_undefined_flag, $1)=
  5266. if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
  5267. then
  5268. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5269. else
  5270. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5271. fi
  5272. _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
  5273. else
  5274. cat conftest.err 1>&5
  5275. fi
  5276. $RM conftest*
  5277. ])
  5278. _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
  5279. ;;
  5280. esac
  5281. fi
  5282. ;;
  5283. esac
  5284. _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
  5285. [Whether or not to add -lc for building shared libraries])
  5286. _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
  5287. [enable_shared_with_static_runtimes], [0],
  5288. [Whether or not to disallow shared libs when runtime libs are static])
  5289. _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
  5290. [Compiler flag to allow reflexive dlopens])
  5291. _LT_TAGDECL([], [whole_archive_flag_spec], [1],
  5292. [Compiler flag to generate shared objects directly from archives])
  5293. _LT_TAGDECL([], [compiler_needs_object], [1],
  5294. [Whether the compiler copes with passing no objects directly])
  5295. _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
  5296. [Create an old-style archive from a shared archive])
  5297. _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
  5298. [Create a temporary old-style archive to link instead of a shared archive])
  5299. _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
  5300. _LT_TAGDECL([], [archive_expsym_cmds], [2])
  5301. _LT_TAGDECL([], [module_cmds], [2],
  5302. [Commands used to build a loadable module if different from building
  5303. a shared archive.])
  5304. _LT_TAGDECL([], [module_expsym_cmds], [2])
  5305. _LT_TAGDECL([], [with_gnu_ld], [1],
  5306. [Whether we are building with GNU ld or not])
  5307. _LT_TAGDECL([], [allow_undefined_flag], [1],
  5308. [Flag that allows shared libraries with undefined symbols to be built])
  5309. _LT_TAGDECL([], [no_undefined_flag], [1],
  5310. [Flag that enforces no undefined symbols])
  5311. _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
  5312. [Flag to hardcode $libdir into a binary during linking.
  5313. This must work even if $libdir does not exist])
  5314. _LT_TAGDECL([], [hardcode_libdir_separator], [1],
  5315. [Whether we need a single "-rpath" flag with a separated argument])
  5316. _LT_TAGDECL([], [hardcode_direct], [0],
  5317. [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
  5318. DIR into the resulting binary])
  5319. _LT_TAGDECL([], [hardcode_direct_absolute], [0],
  5320. [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
  5321. DIR into the resulting binary and the resulting library dependency is
  5322. "absolute", i.e impossible to change by setting ${shlibpath_var} if the
  5323. library is relocated])
  5324. _LT_TAGDECL([], [hardcode_minus_L], [0],
  5325. [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
  5326. into the resulting binary])
  5327. _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
  5328. [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
  5329. into the resulting binary])
  5330. _LT_TAGDECL([], [hardcode_automatic], [0],
  5331. [Set to "yes" if building a shared library automatically hardcodes DIR
  5332. into the library and all subsequent libraries and executables linked
  5333. against it])
  5334. _LT_TAGDECL([], [inherit_rpath], [0],
  5335. [Set to yes if linker adds runtime paths of dependent libraries
  5336. to runtime path list])
  5337. _LT_TAGDECL([], [link_all_deplibs], [0],
  5338. [Whether libtool must link a program against all its dependency libraries])
  5339. _LT_TAGDECL([], [always_export_symbols], [0],
  5340. [Set to "yes" if exported symbols are required])
  5341. _LT_TAGDECL([], [export_symbols_cmds], [2],
  5342. [The commands to list exported symbols])
  5343. _LT_TAGDECL([], [exclude_expsyms], [1],
  5344. [Symbols that should not be listed in the preloaded symbols])
  5345. _LT_TAGDECL([], [include_expsyms], [1],
  5346. [Symbols that must always be exported])
  5347. _LT_TAGDECL([], [prelink_cmds], [2],
  5348. [Commands necessary for linking programs (against libraries) with templates])
  5349. _LT_TAGDECL([], [postlink_cmds], [2],
  5350. [Commands necessary for finishing linking programs])
  5351. _LT_TAGDECL([], [file_list_spec], [1],
  5352. [Specify filename containing input files])
  5353. dnl FIXME: Not yet implemented
  5354. dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
  5355. dnl [Compiler flag to generate thread safe objects])
  5356. ])# _LT_LINKER_SHLIBS
  5357. # _LT_LANG_C_CONFIG([TAG])
  5358. # ------------------------
  5359. # Ensure that the configuration variables for a C compiler are suitably
  5360. # defined. These variables are subsequently used by _LT_CONFIG to write
  5361. # the compiler configuration to `libtool'.
  5362. m4_defun([_LT_LANG_C_CONFIG],
  5363. [m4_require([_LT_DECL_EGREP])dnl
  5364. lt_save_CC="$CC"
  5365. AC_LANG_PUSH(C)
  5366. # Source file extension for C test sources.
  5367. ac_ext=c
  5368. # Object file extension for compiled C test sources.
  5369. objext=o
  5370. _LT_TAGVAR(objext, $1)=$objext
  5371. # Code to be used in simple compile tests
  5372. lt_simple_compile_test_code="int some_variable = 0;"
  5373. # Code to be used in simple link tests
  5374. lt_simple_link_test_code='int main(){return(0);}'
  5375. _LT_TAG_COMPILER
  5376. # Save the default compiler, since it gets overwritten when the other
  5377. # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
  5378. compiler_DEFAULT=$CC
  5379. # save warnings/boilerplate of simple test code
  5380. _LT_COMPILER_BOILERPLATE
  5381. _LT_LINKER_BOILERPLATE
  5382. if test -n "$compiler"; then
  5383. _LT_COMPILER_NO_RTTI($1)
  5384. _LT_COMPILER_PIC($1)
  5385. _LT_COMPILER_C_O($1)
  5386. _LT_COMPILER_FILE_LOCKS($1)
  5387. _LT_LINKER_SHLIBS($1)
  5388. _LT_SYS_DYNAMIC_LINKER($1)
  5389. _LT_LINKER_HARDCODE_LIBPATH($1)
  5390. LT_SYS_DLOPEN_SELF
  5391. _LT_CMD_STRIPLIB
  5392. # Report which library types will actually be built
  5393. AC_MSG_CHECKING([if libtool supports shared libraries])
  5394. AC_MSG_RESULT([$can_build_shared])
  5395. AC_MSG_CHECKING([whether to build shared libraries])
  5396. test "$can_build_shared" = "no" && enable_shared=no
  5397. # On AIX, shared libraries and static libraries use the same namespace, and
  5398. # are all built from PIC.
  5399. case $host_os in
  5400. aix3*)
  5401. test "$enable_shared" = yes && enable_static=no
  5402. if test -n "$RANLIB"; then
  5403. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  5404. postinstall_cmds='$RANLIB $lib'
  5405. fi
  5406. ;;
  5407. aix[[4-9]]*)
  5408. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  5409. test "$enable_shared" = yes && enable_static=no
  5410. fi
  5411. ;;
  5412. esac
  5413. AC_MSG_RESULT([$enable_shared])
  5414. AC_MSG_CHECKING([whether to build static libraries])
  5415. # Make sure either enable_shared or enable_static is yes.
  5416. test "$enable_shared" = yes || enable_static=yes
  5417. AC_MSG_RESULT([$enable_static])
  5418. _LT_CONFIG($1)
  5419. fi
  5420. AC_LANG_POP
  5421. CC="$lt_save_CC"
  5422. ])# _LT_LANG_C_CONFIG
  5423. # _LT_LANG_CXX_CONFIG([TAG])
  5424. # --------------------------
  5425. # Ensure that the configuration variables for a C++ compiler are suitably
  5426. # defined. These variables are subsequently used by _LT_CONFIG to write
  5427. # the compiler configuration to `libtool'.
  5428. m4_defun([_LT_LANG_CXX_CONFIG],
  5429. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  5430. m4_require([_LT_DECL_EGREP])dnl
  5431. m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  5432. if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
  5433. ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
  5434. (test "X$CXX" != "Xg++"))) ; then
  5435. AC_PROG_CXXCPP
  5436. else
  5437. _lt_caught_CXX_error=yes
  5438. fi
  5439. AC_LANG_PUSH(C++)
  5440. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5441. _LT_TAGVAR(allow_undefined_flag, $1)=
  5442. _LT_TAGVAR(always_export_symbols, $1)=no
  5443. _LT_TAGVAR(archive_expsym_cmds, $1)=
  5444. _LT_TAGVAR(compiler_needs_object, $1)=no
  5445. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  5446. _LT_TAGVAR(hardcode_direct, $1)=no
  5447. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  5448. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  5449. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5450. _LT_TAGVAR(hardcode_minus_L, $1)=no
  5451. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  5452. _LT_TAGVAR(hardcode_automatic, $1)=no
  5453. _LT_TAGVAR(inherit_rpath, $1)=no
  5454. _LT_TAGVAR(module_cmds, $1)=
  5455. _LT_TAGVAR(module_expsym_cmds, $1)=
  5456. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  5457. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  5458. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  5459. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  5460. _LT_TAGVAR(no_undefined_flag, $1)=
  5461. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5462. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  5463. # Source file extension for C++ test sources.
  5464. ac_ext=cpp
  5465. # Object file extension for compiled C++ test sources.
  5466. objext=o
  5467. _LT_TAGVAR(objext, $1)=$objext
  5468. # No sense in running all these tests if we already determined that
  5469. # the CXX compiler isn't working. Some variables (like enable_shared)
  5470. # are currently assumed to apply to all compilers on this platform,
  5471. # and will be corrupted by setting them based on a non-working compiler.
  5472. if test "$_lt_caught_CXX_error" != yes; then
  5473. # Code to be used in simple compile tests
  5474. lt_simple_compile_test_code="int some_variable = 0;"
  5475. # Code to be used in simple link tests
  5476. lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
  5477. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  5478. _LT_TAG_COMPILER
  5479. # save warnings/boilerplate of simple test code
  5480. _LT_COMPILER_BOILERPLATE
  5481. _LT_LINKER_BOILERPLATE
  5482. # Allow CC to be a program name with arguments.
  5483. lt_save_CC=$CC
  5484. lt_save_CFLAGS=$CFLAGS
  5485. lt_save_LD=$LD
  5486. lt_save_GCC=$GCC
  5487. GCC=$GXX
  5488. lt_save_with_gnu_ld=$with_gnu_ld
  5489. lt_save_path_LD=$lt_cv_path_LD
  5490. if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
  5491. lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
  5492. else
  5493. $as_unset lt_cv_prog_gnu_ld
  5494. fi
  5495. if test -n "${lt_cv_path_LDCXX+set}"; then
  5496. lt_cv_path_LD=$lt_cv_path_LDCXX
  5497. else
  5498. $as_unset lt_cv_path_LD
  5499. fi
  5500. test -z "${LDCXX+set}" || LD=$LDCXX
  5501. CC=${CXX-"c++"}
  5502. CFLAGS=$CXXFLAGS
  5503. compiler=$CC
  5504. _LT_TAGVAR(compiler, $1)=$CC
  5505. _LT_CC_BASENAME([$compiler])
  5506. if test -n "$compiler"; then
  5507. # We don't want -fno-exception when compiling C++ code, so set the
  5508. # no_builtin_flag separately
  5509. if test "$GXX" = yes; then
  5510. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  5511. else
  5512. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  5513. fi
  5514. if test "$GXX" = yes; then
  5515. # Set up default GNU C++ configuration
  5516. LT_PATH_LD
  5517. # Check if GNU C++ uses GNU ld as the underlying linker, since the
  5518. # archiving commands below assume that GNU ld is being used.
  5519. if test "$with_gnu_ld" = yes; then
  5520. _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5521. _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'
  5522. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5523. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5524. # If archive_cmds runs LD, not CC, wlarc should be empty
  5525. # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
  5526. # investigate it a little bit more. (MM)
  5527. wlarc='${wl}'
  5528. # ancient GNU ld didn't support --whole-archive et. al.
  5529. if eval "`$CC -print-prog-name=ld` --help 2>&1" |
  5530. $GREP 'no-whole-archive' > /dev/null; then
  5531. _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  5532. else
  5533. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5534. fi
  5535. else
  5536. with_gnu_ld=no
  5537. wlarc=
  5538. # A generic and very simple default shared library creation
  5539. # command for GNU C++ for the case where it uses the native
  5540. # linker, instead of GNU ld. If possible, this setting should
  5541. # overridden to take advantage of the native linker features on
  5542. # the platform it is being used on.
  5543. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  5544. fi
  5545. # Commands to make compiler produce verbose output that lists
  5546. # what "hidden" libraries, object files and flags are used when
  5547. # linking a shared library.
  5548. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  5549. else
  5550. GXX=no
  5551. with_gnu_ld=no
  5552. wlarc=
  5553. fi
  5554. # PORTME: fill in a description of your system's C++ link characteristics
  5555. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  5556. _LT_TAGVAR(ld_shlibs, $1)=yes
  5557. case $host_os in
  5558. aix3*)
  5559. # FIXME: insert proper C++ library support
  5560. _LT_TAGVAR(ld_shlibs, $1)=no
  5561. ;;
  5562. aix[[4-9]]*)
  5563. if test "$host_cpu" = ia64; then
  5564. # On IA64, the linker does run time linking by default, so we don't
  5565. # have to do anything special.
  5566. aix_use_runtimelinking=no
  5567. exp_sym_flag='-Bexport'
  5568. no_entry_flag=""
  5569. else
  5570. aix_use_runtimelinking=no
  5571. # Test if we are trying to use run time linking or normal
  5572. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  5573. # need to do runtime linking.
  5574. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  5575. for ld_flag in $LDFLAGS; do
  5576. case $ld_flag in
  5577. *-brtl*)
  5578. aix_use_runtimelinking=yes
  5579. break
  5580. ;;
  5581. esac
  5582. done
  5583. ;;
  5584. esac
  5585. exp_sym_flag='-bexport'
  5586. no_entry_flag='-bnoentry'
  5587. fi
  5588. # When large executables or shared objects are built, AIX ld can
  5589. # have problems creating the table of contents. If linking a library
  5590. # or program results in "error TOC overflow" add -mminimal-toc to
  5591. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  5592. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  5593. _LT_TAGVAR(archive_cmds, $1)=''
  5594. _LT_TAGVAR(hardcode_direct, $1)=yes
  5595. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5596. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5597. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5598. _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
  5599. if test "$GXX" = yes; then
  5600. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  5601. # We only want to do this on AIX 4.2 and lower, the check
  5602. # below for broken collect2 doesn't work under 4.3+
  5603. collect2name=`${CC} -print-prog-name=collect2`
  5604. if test -f "$collect2name" &&
  5605. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  5606. then
  5607. # We have reworked collect2
  5608. :
  5609. else
  5610. # We have old collect2
  5611. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  5612. # It fails to find uninstalled libraries when the uninstalled
  5613. # path is not listed in the libpath. Setting hardcode_minus_L
  5614. # to unsupported forces relinking
  5615. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5616. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5617. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5618. fi
  5619. esac
  5620. shared_flag='-shared'
  5621. if test "$aix_use_runtimelinking" = yes; then
  5622. shared_flag="$shared_flag "'${wl}-G'
  5623. fi
  5624. else
  5625. # not using gcc
  5626. if test "$host_cpu" = ia64; then
  5627. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  5628. # chokes on -Wl,-G. The following line is correct:
  5629. shared_flag='-G'
  5630. else
  5631. if test "$aix_use_runtimelinking" = yes; then
  5632. shared_flag='${wl}-G'
  5633. else
  5634. shared_flag='${wl}-bM:SRE'
  5635. fi
  5636. fi
  5637. fi
  5638. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
  5639. # It seems that -bexpall does not export symbols beginning with
  5640. # underscore (_), so it is better to generate a list of symbols to
  5641. # export.
  5642. _LT_TAGVAR(always_export_symbols, $1)=yes
  5643. if test "$aix_use_runtimelinking" = yes; then
  5644. # Warning - without using the other runtime loading flags (-brtl),
  5645. # -berok will link without error, but may produce a broken library.
  5646. _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
  5647. # Determine the default libpath from the value encoded in an empty
  5648. # executable.
  5649. _LT_SYS_MODULE_PATH_AIX([$1])
  5650. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  5651. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
  5652. else
  5653. if test "$host_cpu" = ia64; then
  5654. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  5655. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  5656. _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"
  5657. else
  5658. # Determine the default libpath from the value encoded in an
  5659. # empty executable.
  5660. _LT_SYS_MODULE_PATH_AIX([$1])
  5661. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  5662. # Warning - without using the other run time loading flags,
  5663. # -berok will link without error, but may produce a broken library.
  5664. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  5665. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  5666. if test "$with_gnu_ld" = yes; then
  5667. # We only use this code for GNU lds that support --whole-archive.
  5668. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  5669. else
  5670. # Exported symbols can be pulled into shared objects from archives
  5671. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  5672. fi
  5673. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5674. # This is similar to how AIX traditionally builds its shared
  5675. # libraries.
  5676. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
  5677. fi
  5678. fi
  5679. ;;
  5680. beos*)
  5681. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  5682. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5683. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  5684. # support --undefined. This deserves some investigation. FIXME
  5685. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5686. else
  5687. _LT_TAGVAR(ld_shlibs, $1)=no
  5688. fi
  5689. ;;
  5690. chorus*)
  5691. case $cc_basename in
  5692. *)
  5693. # FIXME: insert proper C++ library support
  5694. _LT_TAGVAR(ld_shlibs, $1)=no
  5695. ;;
  5696. esac
  5697. ;;
  5698. cygwin* | mingw* | pw32* | cegcc*)
  5699. case $GXX,$cc_basename in
  5700. ,cl* | no,cl*)
  5701. # Native MSVC
  5702. # hardcode_libdir_flag_spec is actually meaningless, as there is
  5703. # no search path for DLLs.
  5704. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  5705. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5706. _LT_TAGVAR(always_export_symbols, $1)=yes
  5707. _LT_TAGVAR(file_list_spec, $1)='@'
  5708. # Tell ltmain to make .lib files, not .a files.
  5709. libext=lib
  5710. # Tell ltmain to make .dll files, not .so files.
  5711. shrext_cmds=".dll"
  5712. # FIXME: Setting linknames here is a bad hack.
  5713. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
  5714. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  5715. $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
  5716. else
  5717. $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
  5718. fi~
  5719. $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  5720. linknames='
  5721. # The linker will not automatically build a static lib if we build a DLL.
  5722. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  5723. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5724. # Don't use ranlib
  5725. _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  5726. _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  5727. lt_tool_outputfile="@TOOL_OUTPUT@"~
  5728. case $lt_outputfile in
  5729. *.exe|*.EXE) ;;
  5730. *)
  5731. lt_outputfile="$lt_outputfile.exe"
  5732. lt_tool_outputfile="$lt_tool_outputfile.exe"
  5733. ;;
  5734. esac~
  5735. func_to_tool_file "$lt_outputfile"~
  5736. if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
  5737. $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  5738. $RM "$lt_outputfile.manifest";
  5739. fi'
  5740. ;;
  5741. *)
  5742. # g++
  5743. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  5744. # as there is no search path for DLLs.
  5745. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5746. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
  5747. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5748. _LT_TAGVAR(always_export_symbols, $1)=no
  5749. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5750. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  5751. _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'
  5752. # If the export-symbols file already is a .def file (1st line
  5753. # is EXPORTS), use it as is; otherwise, prepend...
  5754. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  5755. cp $export_symbols $output_objdir/$soname.def;
  5756. else
  5757. echo EXPORTS > $output_objdir/$soname.def;
  5758. cat $export_symbols >> $output_objdir/$soname.def;
  5759. fi~
  5760. $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'
  5761. else
  5762. _LT_TAGVAR(ld_shlibs, $1)=no
  5763. fi
  5764. ;;
  5765. esac
  5766. ;;
  5767. darwin* | rhapsody*)
  5768. _LT_DARWIN_LINKER_FEATURES($1)
  5769. ;;
  5770. dgux*)
  5771. case $cc_basename in
  5772. ec++*)
  5773. # FIXME: insert proper C++ library support
  5774. _LT_TAGVAR(ld_shlibs, $1)=no
  5775. ;;
  5776. ghcx*)
  5777. # Green Hills C++ Compiler
  5778. # FIXME: insert proper C++ library support
  5779. _LT_TAGVAR(ld_shlibs, $1)=no
  5780. ;;
  5781. *)
  5782. # FIXME: insert proper C++ library support
  5783. _LT_TAGVAR(ld_shlibs, $1)=no
  5784. ;;
  5785. esac
  5786. ;;
  5787. freebsd2.*)
  5788. # C++ shared libraries reported to be fairly broken before
  5789. # switch to ELF
  5790. _LT_TAGVAR(ld_shlibs, $1)=no
  5791. ;;
  5792. freebsd-elf*)
  5793. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5794. ;;
  5795. freebsd* | dragonfly*)
  5796. # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
  5797. # conventions
  5798. _LT_TAGVAR(ld_shlibs, $1)=yes
  5799. ;;
  5800. gnu*)
  5801. ;;
  5802. haiku*)
  5803. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5804. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5805. ;;
  5806. hpux9*)
  5807. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5808. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5809. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5810. _LT_TAGVAR(hardcode_direct, $1)=yes
  5811. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  5812. # but as the default
  5813. # location of the library.
  5814. case $cc_basename in
  5815. CC*)
  5816. # FIXME: insert proper C++ library support
  5817. _LT_TAGVAR(ld_shlibs, $1)=no
  5818. ;;
  5819. aCC*)
  5820. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  5821. # Commands to make compiler produce verbose output that lists
  5822. # what "hidden" libraries, object files and flags are used when
  5823. # linking a shared library.
  5824. #
  5825. # There doesn't appear to be a way to prevent this compiler from
  5826. # explicitly linking system object files so we need to strip them
  5827. # from the output so that they don't get included in the library
  5828. # dependencies.
  5829. 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"'
  5830. ;;
  5831. *)
  5832. if test "$GXX" = yes; then
  5833. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  5834. else
  5835. # FIXME: insert proper C++ library support
  5836. _LT_TAGVAR(ld_shlibs, $1)=no
  5837. fi
  5838. ;;
  5839. esac
  5840. ;;
  5841. hpux10*|hpux11*)
  5842. if test $with_gnu_ld = no; then
  5843. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5844. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5845. case $host_cpu in
  5846. hppa*64*|ia64*)
  5847. ;;
  5848. *)
  5849. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5850. ;;
  5851. esac
  5852. fi
  5853. case $host_cpu in
  5854. hppa*64*|ia64*)
  5855. _LT_TAGVAR(hardcode_direct, $1)=no
  5856. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5857. ;;
  5858. *)
  5859. _LT_TAGVAR(hardcode_direct, $1)=yes
  5860. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5861. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  5862. # but as the default
  5863. # location of the library.
  5864. ;;
  5865. esac
  5866. case $cc_basename in
  5867. CC*)
  5868. # FIXME: insert proper C++ library support
  5869. _LT_TAGVAR(ld_shlibs, $1)=no
  5870. ;;
  5871. aCC*)
  5872. case $host_cpu in
  5873. hppa*64*)
  5874. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5875. ;;
  5876. ia64*)
  5877. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5878. ;;
  5879. *)
  5880. _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'
  5881. ;;
  5882. esac
  5883. # Commands to make compiler produce verbose output that lists
  5884. # what "hidden" libraries, object files and flags are used when
  5885. # linking a shared library.
  5886. #
  5887. # There doesn't appear to be a way to prevent this compiler from
  5888. # explicitly linking system object files so we need to strip them
  5889. # from the output so that they don't get included in the library
  5890. # dependencies.
  5891. 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"'
  5892. ;;
  5893. *)
  5894. if test "$GXX" = yes; then
  5895. if test $with_gnu_ld = no; then
  5896. case $host_cpu in
  5897. hppa*64*)
  5898. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5899. ;;
  5900. ia64*)
  5901. _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'
  5902. ;;
  5903. *)
  5904. _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'
  5905. ;;
  5906. esac
  5907. fi
  5908. else
  5909. # FIXME: insert proper C++ library support
  5910. _LT_TAGVAR(ld_shlibs, $1)=no
  5911. fi
  5912. ;;
  5913. esac
  5914. ;;
  5915. interix[[3-9]]*)
  5916. _LT_TAGVAR(hardcode_direct, $1)=no
  5917. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5918. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5919. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5920. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  5921. # Instead, shared libraries are loaded at an image base (0x10000000 by
  5922. # default) and relocated if they conflict, which is a slow very memory
  5923. # consuming and fragmenting process. To avoid this, we pick a random,
  5924. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  5925. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  5926. _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'
  5927. _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'
  5928. ;;
  5929. irix5* | irix6*)
  5930. case $cc_basename in
  5931. CC*)
  5932. # SGI C++
  5933. _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'
  5934. # Archives containing C++ object files must be created using
  5935. # "CC -ar", where "CC" is the IRIX C++ compiler. This is
  5936. # necessary to make sure instantiated templates are included
  5937. # in the archive.
  5938. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
  5939. ;;
  5940. *)
  5941. if test "$GXX" = yes; then
  5942. if test "$with_gnu_ld" = no; then
  5943. _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'
  5944. else
  5945. _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'
  5946. fi
  5947. fi
  5948. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5949. ;;
  5950. esac
  5951. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5952. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5953. _LT_TAGVAR(inherit_rpath, $1)=yes
  5954. ;;
  5955. linux* | k*bsd*-gnu | kopensolaris*-gnu)
  5956. case $cc_basename in
  5957. KCC*)
  5958. # Kuck and Associates, Inc. (KAI) C++ Compiler
  5959. # KCC will only create a shared library if the output file
  5960. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  5961. # to its proper name (with version) after linking.
  5962. _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'
  5963. _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'
  5964. # Commands to make compiler produce verbose output that lists
  5965. # what "hidden" libraries, object files and flags are used when
  5966. # linking a shared library.
  5967. #
  5968. # There doesn't appear to be a way to prevent this compiler from
  5969. # explicitly linking system object files so we need to strip them
  5970. # from the output so that they don't get included in the library
  5971. # dependencies.
  5972. 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"'
  5973. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5974. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5975. # Archives containing C++ object files must be created using
  5976. # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  5977. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  5978. ;;
  5979. icpc* | ecpc* )
  5980. # Intel C++
  5981. with_gnu_ld=yes
  5982. # version 8.0 and above of icpc choke on multiply defined symbols
  5983. # if we add $predep_objects and $postdep_objects, however 7.1 and
  5984. # earlier do not add the objects themselves.
  5985. case `$CC -V 2>&1` in
  5986. *"Version 7."*)
  5987. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5988. _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'
  5989. ;;
  5990. *) # Version 8.0 or newer
  5991. tmp_idyn=
  5992. case $host_cpu in
  5993. ia64*) tmp_idyn=' -i_dynamic';;
  5994. esac
  5995. _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5996. _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'
  5997. ;;
  5998. esac
  5999. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6000. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  6001. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  6002. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  6003. ;;
  6004. pgCC* | pgcpp*)
  6005. # Portland Group C++ compiler
  6006. case `$CC -V` in
  6007. *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
  6008. _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
  6009. rm -rf $tpldir~
  6010. $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
  6011. compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
  6012. _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
  6013. rm -rf $tpldir~
  6014. $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
  6015. $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
  6016. $RANLIB $oldlib'
  6017. _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
  6018. rm -rf $tpldir~
  6019. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  6020. $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
  6021. _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
  6022. rm -rf $tpldir~
  6023. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  6024. $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'
  6025. ;;
  6026. *) # Version 6 and above use weak symbols
  6027. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
  6028. _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'
  6029. ;;
  6030. esac
  6031. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
  6032. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  6033. _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'
  6034. ;;
  6035. cxx*)
  6036. # Compaq C++
  6037. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  6038. _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'
  6039. runpath_var=LD_RUN_PATH
  6040. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  6041. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6042. # Commands to make compiler produce verbose output that lists
  6043. # what "hidden" libraries, object files and flags are used when
  6044. # linking a shared library.
  6045. #
  6046. # There doesn't appear to be a way to prevent this compiler from
  6047. # explicitly linking system object files so we need to strip them
  6048. # from the output so that they don't get included in the library
  6049. # dependencies.
  6050. 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'
  6051. ;;
  6052. xl* | mpixl* | bgxl*)
  6053. # IBM XL 8.0 on PPC, with GNU ld
  6054. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6055. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  6056. _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  6057. if test "x$supports_anon_versioning" = xyes; then
  6058. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  6059. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  6060. echo "local: *; };" >> $output_objdir/$libname.ver~
  6061. $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  6062. fi
  6063. ;;
  6064. *)
  6065. case `$CC -V 2>&1 | sed 5q` in
  6066. *Sun\ C*)
  6067. # Sun C++ 5.9
  6068. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  6069. _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6070. _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'
  6071. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6072. _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'
  6073. _LT_TAGVAR(compiler_needs_object, $1)=yes
  6074. # Not sure whether something based on
  6075. # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
  6076. # would be better.
  6077. output_verbose_link_cmd='func_echo_all'
  6078. # Archives containing C++ object files must be created using
  6079. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  6080. # necessary to make sure instantiated templates are included
  6081. # in the archive.
  6082. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  6083. ;;
  6084. esac
  6085. ;;
  6086. esac
  6087. ;;
  6088. lynxos*)
  6089. # FIXME: insert proper C++ library support
  6090. _LT_TAGVAR(ld_shlibs, $1)=no
  6091. ;;
  6092. m88k*)
  6093. # FIXME: insert proper C++ library support
  6094. _LT_TAGVAR(ld_shlibs, $1)=no
  6095. ;;
  6096. mvs*)
  6097. case $cc_basename in
  6098. cxx*)
  6099. # FIXME: insert proper C++ library support
  6100. _LT_TAGVAR(ld_shlibs, $1)=no
  6101. ;;
  6102. *)
  6103. # FIXME: insert proper C++ library support
  6104. _LT_TAGVAR(ld_shlibs, $1)=no
  6105. ;;
  6106. esac
  6107. ;;
  6108. netbsd*)
  6109. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  6110. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
  6111. wlarc=
  6112. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6113. _LT_TAGVAR(hardcode_direct, $1)=yes
  6114. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6115. fi
  6116. # Workaround some broken pre-1.5 toolchains
  6117. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
  6118. ;;
  6119. *nto* | *qnx*)
  6120. _LT_TAGVAR(ld_shlibs, $1)=yes
  6121. ;;
  6122. openbsd2*)
  6123. # C++ shared libraries are fairly broken
  6124. _LT_TAGVAR(ld_shlibs, $1)=no
  6125. ;;
  6126. openbsd*)
  6127. if test -f /usr/libexec/ld.so; then
  6128. _LT_TAGVAR(hardcode_direct, $1)=yes
  6129. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6130. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6131. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  6132. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  6133. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  6134. _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'
  6135. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  6136. _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  6137. fi
  6138. output_verbose_link_cmd=func_echo_all
  6139. else
  6140. _LT_TAGVAR(ld_shlibs, $1)=no
  6141. fi
  6142. ;;
  6143. osf3* | osf4* | osf5*)
  6144. case $cc_basename in
  6145. KCC*)
  6146. # Kuck and Associates, Inc. (KAI) C++ Compiler
  6147. # KCC will only create a shared library if the output file
  6148. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  6149. # to its proper name (with version) after linking.
  6150. _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'
  6151. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  6152. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6153. # Archives containing C++ object files must be created using
  6154. # the KAI C++ compiler.
  6155. case $host in
  6156. osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
  6157. *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
  6158. esac
  6159. ;;
  6160. RCC*)
  6161. # Rational C++ 2.4.1
  6162. # FIXME: insert proper C++ library support
  6163. _LT_TAGVAR(ld_shlibs, $1)=no
  6164. ;;
  6165. cxx*)
  6166. case $host in
  6167. osf3*)
  6168. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  6169. _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'
  6170. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6171. ;;
  6172. *)
  6173. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  6174. _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'
  6175. _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
  6176. echo "-hidden">> $lib.exp~
  6177. $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~
  6178. $RM $lib.exp'
  6179. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  6180. ;;
  6181. esac
  6182. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6183. # Commands to make compiler produce verbose output that lists
  6184. # what "hidden" libraries, object files and flags are used when
  6185. # linking a shared library.
  6186. #
  6187. # There doesn't appear to be a way to prevent this compiler from
  6188. # explicitly linking system object files so we need to strip them
  6189. # from the output so that they don't get included in the library
  6190. # dependencies.
  6191. 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"'
  6192. ;;
  6193. *)
  6194. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  6195. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  6196. case $host in
  6197. osf3*)
  6198. _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'
  6199. ;;
  6200. *)
  6201. _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'
  6202. ;;
  6203. esac
  6204. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6205. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6206. # Commands to make compiler produce verbose output that lists
  6207. # what "hidden" libraries, object files and flags are used when
  6208. # linking a shared library.
  6209. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  6210. else
  6211. # FIXME: insert proper C++ library support
  6212. _LT_TAGVAR(ld_shlibs, $1)=no
  6213. fi
  6214. ;;
  6215. esac
  6216. ;;
  6217. psos*)
  6218. # FIXME: insert proper C++ library support
  6219. _LT_TAGVAR(ld_shlibs, $1)=no
  6220. ;;
  6221. sunos4*)
  6222. case $cc_basename in
  6223. CC*)
  6224. # Sun C++ 4.x
  6225. # FIXME: insert proper C++ library support
  6226. _LT_TAGVAR(ld_shlibs, $1)=no
  6227. ;;
  6228. lcc*)
  6229. # Lucid
  6230. # FIXME: insert proper C++ library support
  6231. _LT_TAGVAR(ld_shlibs, $1)=no
  6232. ;;
  6233. *)
  6234. # FIXME: insert proper C++ library support
  6235. _LT_TAGVAR(ld_shlibs, $1)=no
  6236. ;;
  6237. esac
  6238. ;;
  6239. solaris*)
  6240. case $cc_basename in
  6241. CC* | sunCC*)
  6242. # Sun C++ 4.2, 5.x and Centerline C++
  6243. _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
  6244. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  6245. _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6246. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6247. $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'
  6248. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6249. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6250. case $host_os in
  6251. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6252. *)
  6253. # The compiler driver will combine and reorder linker options,
  6254. # but understands `-z linker_flag'.
  6255. # Supported since Solaris 2.6 (maybe 2.5.1?)
  6256. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  6257. ;;
  6258. esac
  6259. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6260. output_verbose_link_cmd='func_echo_all'
  6261. # Archives containing C++ object files must be created using
  6262. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  6263. # necessary to make sure instantiated templates are included
  6264. # in the archive.
  6265. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  6266. ;;
  6267. gcx*)
  6268. # Green Hills C++ Compiler
  6269. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  6270. # The C++ compiler must be used to create the archive.
  6271. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
  6272. ;;
  6273. *)
  6274. # GNU C++ compiler with Solaris linker
  6275. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  6276. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
  6277. if $CC --version | $GREP -v '^2\.7' > /dev/null; then
  6278. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  6279. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6280. $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  6281. # Commands to make compiler produce verbose output that lists
  6282. # what "hidden" libraries, object files and flags are used when
  6283. # linking a shared library.
  6284. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  6285. else
  6286. # g++ 2.7 appears to require `-G' NOT `-shared' on this
  6287. # platform.
  6288. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  6289. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6290. $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  6291. # Commands to make compiler produce verbose output that lists
  6292. # what "hidden" libraries, object files and flags are used when
  6293. # linking a shared library.
  6294. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  6295. fi
  6296. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
  6297. case $host_os in
  6298. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6299. *)
  6300. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
  6301. ;;
  6302. esac
  6303. fi
  6304. ;;
  6305. esac
  6306. ;;
  6307. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  6308. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  6309. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6310. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6311. runpath_var='LD_RUN_PATH'
  6312. case $cc_basename in
  6313. CC*)
  6314. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6315. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6316. ;;
  6317. *)
  6318. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6319. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6320. ;;
  6321. esac
  6322. ;;
  6323. sysv5* | sco3.2v5* | sco5v6*)
  6324. # Note: We can NOT use -z defs as we might desire, because we do not
  6325. # link with -lc, and that would cause any symbols used from libc to
  6326. # always be unresolved, which means just about no library would
  6327. # ever link correctly. If we're not using GNU ld we use -z text
  6328. # though, which does catch some bad symbols but isn't as heavy-handed
  6329. # as -z defs.
  6330. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  6331. _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
  6332. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6333. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6334. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
  6335. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  6336. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6337. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  6338. runpath_var='LD_RUN_PATH'
  6339. case $cc_basename in
  6340. CC*)
  6341. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6342. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6343. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
  6344. '"$_LT_TAGVAR(old_archive_cmds, $1)"
  6345. _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
  6346. '"$_LT_TAGVAR(reload_cmds, $1)"
  6347. ;;
  6348. *)
  6349. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6350. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6351. ;;
  6352. esac
  6353. ;;
  6354. tandem*)
  6355. case $cc_basename in
  6356. NCC*)
  6357. # NonStop-UX NCC 3.20
  6358. # FIXME: insert proper C++ library support
  6359. _LT_TAGVAR(ld_shlibs, $1)=no
  6360. ;;
  6361. *)
  6362. # FIXME: insert proper C++ library support
  6363. _LT_TAGVAR(ld_shlibs, $1)=no
  6364. ;;
  6365. esac
  6366. ;;
  6367. vxworks*)
  6368. # FIXME: insert proper C++ library support
  6369. _LT_TAGVAR(ld_shlibs, $1)=no
  6370. ;;
  6371. *)
  6372. # FIXME: insert proper C++ library support
  6373. _LT_TAGVAR(ld_shlibs, $1)=no
  6374. ;;
  6375. esac
  6376. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  6377. test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  6378. _LT_TAGVAR(GCC, $1)="$GXX"
  6379. _LT_TAGVAR(LD, $1)="$LD"
  6380. ## CAVEAT EMPTOR:
  6381. ## There is no encapsulation within the following macros, do not change
  6382. ## the running order or otherwise move them around unless you know exactly
  6383. ## what you are doing...
  6384. _LT_SYS_HIDDEN_LIBDEPS($1)
  6385. _LT_COMPILER_PIC($1)
  6386. _LT_COMPILER_C_O($1)
  6387. _LT_COMPILER_FILE_LOCKS($1)
  6388. _LT_LINKER_SHLIBS($1)
  6389. _LT_SYS_DYNAMIC_LINKER($1)
  6390. _LT_LINKER_HARDCODE_LIBPATH($1)
  6391. _LT_CONFIG($1)
  6392. fi # test -n "$compiler"
  6393. CC=$lt_save_CC
  6394. CFLAGS=$lt_save_CFLAGS
  6395. LDCXX=$LD
  6396. LD=$lt_save_LD
  6397. GCC=$lt_save_GCC
  6398. with_gnu_ld=$lt_save_with_gnu_ld
  6399. lt_cv_path_LDCXX=$lt_cv_path_LD
  6400. lt_cv_path_LD=$lt_save_path_LD
  6401. lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
  6402. lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
  6403. fi # test "$_lt_caught_CXX_error" != yes
  6404. AC_LANG_POP
  6405. ])# _LT_LANG_CXX_CONFIG
  6406. # _LT_FUNC_STRIPNAME_CNF
  6407. # ----------------------
  6408. # func_stripname_cnf prefix suffix name
  6409. # strip PREFIX and SUFFIX off of NAME.
  6410. # PREFIX and SUFFIX must not contain globbing or regex special
  6411. # characters, hashes, percent signs, but SUFFIX may contain a leading
  6412. # dot (in which case that matches only a dot).
  6413. #
  6414. # This function is identical to the (non-XSI) version of func_stripname,
  6415. # except this one can be used by m4 code that may be executed by configure,
  6416. # rather than the libtool script.
  6417. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
  6418. AC_REQUIRE([_LT_DECL_SED])
  6419. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
  6420. func_stripname_cnf ()
  6421. {
  6422. case ${2} in
  6423. .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
  6424. *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
  6425. esac
  6426. } # func_stripname_cnf
  6427. ])# _LT_FUNC_STRIPNAME_CNF
  6428. # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
  6429. # ---------------------------------
  6430. # Figure out "hidden" library dependencies from verbose
  6431. # compiler output when linking a shared library.
  6432. # Parse the compiler output and extract the necessary
  6433. # objects, libraries and library flags.
  6434. m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
  6435. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  6436. AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
  6437. # Dependencies to place before and after the object being linked:
  6438. _LT_TAGVAR(predep_objects, $1)=
  6439. _LT_TAGVAR(postdep_objects, $1)=
  6440. _LT_TAGVAR(predeps, $1)=
  6441. _LT_TAGVAR(postdeps, $1)=
  6442. _LT_TAGVAR(compiler_lib_search_path, $1)=
  6443. dnl we can't use the lt_simple_compile_test_code here,
  6444. dnl because it contains code intended for an executable,
  6445. dnl not a library. It's possible we should let each
  6446. dnl tag define a new lt_????_link_test_code variable,
  6447. dnl but it's only used here...
  6448. m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
  6449. int a;
  6450. void foo (void) { a = 0; }
  6451. _LT_EOF
  6452. ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
  6453. class Foo
  6454. {
  6455. public:
  6456. Foo (void) { a = 0; }
  6457. private:
  6458. int a;
  6459. };
  6460. _LT_EOF
  6461. ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
  6462. subroutine foo
  6463. implicit none
  6464. integer*4 a
  6465. a=0
  6466. return
  6467. end
  6468. _LT_EOF
  6469. ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
  6470. subroutine foo
  6471. implicit none
  6472. integer a
  6473. a=0
  6474. return
  6475. end
  6476. _LT_EOF
  6477. ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
  6478. public class foo {
  6479. private int a;
  6480. public void bar (void) {
  6481. a = 0;
  6482. }
  6483. };
  6484. _LT_EOF
  6485. ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
  6486. package foo
  6487. func foo() {
  6488. }
  6489. _LT_EOF
  6490. ])
  6491. _lt_libdeps_save_CFLAGS=$CFLAGS
  6492. case "$CC $CFLAGS " in #(
  6493. *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
  6494. *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
  6495. *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
  6496. esac
  6497. dnl Parse the compiler output and extract the necessary
  6498. dnl objects, libraries and library flags.
  6499. if AC_TRY_EVAL(ac_compile); then
  6500. # Parse the compiler output and extract the necessary
  6501. # objects, libraries and library flags.
  6502. # Sentinel used to keep track of whether or not we are before
  6503. # the conftest object file.
  6504. pre_test_object_deps_done=no
  6505. for p in `eval "$output_verbose_link_cmd"`; do
  6506. case ${prev}${p} in
  6507. -L* | -R* | -l*)
  6508. # Some compilers place space between "-{L,R}" and the path.
  6509. # Remove the space.
  6510. if test $p = "-L" ||
  6511. test $p = "-R"; then
  6512. prev=$p
  6513. continue
  6514. fi
  6515. # Expand the sysroot to ease extracting the directories later.
  6516. if test -z "$prev"; then
  6517. case $p in
  6518. -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
  6519. -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
  6520. -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
  6521. esac
  6522. fi
  6523. case $p in
  6524. =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
  6525. esac
  6526. if test "$pre_test_object_deps_done" = no; then
  6527. case ${prev} in
  6528. -L | -R)
  6529. # Internal compiler library paths should come after those
  6530. # provided the user. The postdeps already come after the
  6531. # user supplied libs so there is no need to process them.
  6532. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
  6533. _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
  6534. else
  6535. _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
  6536. fi
  6537. ;;
  6538. # The "-l" case would never come before the object being
  6539. # linked, so don't bother handling this case.
  6540. esac
  6541. else
  6542. if test -z "$_LT_TAGVAR(postdeps, $1)"; then
  6543. _LT_TAGVAR(postdeps, $1)="${prev}${p}"
  6544. else
  6545. _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
  6546. fi
  6547. fi
  6548. prev=
  6549. ;;
  6550. *.lto.$objext) ;; # Ignore GCC LTO objects
  6551. *.$objext)
  6552. # This assumes that the test object file only shows up
  6553. # once in the compiler output.
  6554. if test "$p" = "conftest.$objext"; then
  6555. pre_test_object_deps_done=yes
  6556. continue
  6557. fi
  6558. if test "$pre_test_object_deps_done" = no; then
  6559. if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
  6560. _LT_TAGVAR(predep_objects, $1)="$p"
  6561. else
  6562. _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
  6563. fi
  6564. else
  6565. if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
  6566. _LT_TAGVAR(postdep_objects, $1)="$p"
  6567. else
  6568. _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
  6569. fi
  6570. fi
  6571. ;;
  6572. *) ;; # Ignore the rest.
  6573. esac
  6574. done
  6575. # Clean up.
  6576. rm -f a.out a.exe
  6577. else
  6578. echo "libtool.m4: error: problem compiling $1 test program"
  6579. fi
  6580. $RM -f confest.$objext
  6581. CFLAGS=$_lt_libdeps_save_CFLAGS
  6582. # PORTME: override above test on systems where it is broken
  6583. m4_if([$1], [CXX],
  6584. [case $host_os in
  6585. interix[[3-9]]*)
  6586. # Interix 3.5 installs completely hosed .la files for C++, so rather than
  6587. # hack all around it, let's just trust "g++" to DTRT.
  6588. _LT_TAGVAR(predep_objects,$1)=
  6589. _LT_TAGVAR(postdep_objects,$1)=
  6590. _LT_TAGVAR(postdeps,$1)=
  6591. ;;
  6592. linux*)
  6593. case `$CC -V 2>&1 | sed 5q` in
  6594. *Sun\ C*)
  6595. # Sun C++ 5.9
  6596. # The more standards-conforming stlport4 library is
  6597. # incompatible with the Cstd library. Avoid specifying
  6598. # it if it's in CXXFLAGS. Ignore libCrun as
  6599. # -library=stlport4 depends on it.
  6600. case " $CXX $CXXFLAGS " in
  6601. *" -library=stlport4 "*)
  6602. solaris_use_stlport4=yes
  6603. ;;
  6604. esac
  6605. if test "$solaris_use_stlport4" != yes; then
  6606. _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
  6607. fi
  6608. ;;
  6609. esac
  6610. ;;
  6611. solaris*)
  6612. case $cc_basename in
  6613. CC* | sunCC*)
  6614. # The more standards-conforming stlport4 library is
  6615. # incompatible with the Cstd library. Avoid specifying
  6616. # it if it's in CXXFLAGS. Ignore libCrun as
  6617. # -library=stlport4 depends on it.
  6618. case " $CXX $CXXFLAGS " in
  6619. *" -library=stlport4 "*)
  6620. solaris_use_stlport4=yes
  6621. ;;
  6622. esac
  6623. # Adding this requires a known-good setup of shared libraries for
  6624. # Sun compiler versions before 5.6, else PIC objects from an old
  6625. # archive will be linked into the output, leading to subtle bugs.
  6626. if test "$solaris_use_stlport4" != yes; then
  6627. _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
  6628. fi
  6629. ;;
  6630. esac
  6631. ;;
  6632. esac
  6633. ])
  6634. case " $_LT_TAGVAR(postdeps, $1) " in
  6635. *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
  6636. esac
  6637. _LT_TAGVAR(compiler_lib_search_dirs, $1)=
  6638. if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
  6639. _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
  6640. fi
  6641. _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
  6642. [The directories searched by this compiler when creating a shared library])
  6643. _LT_TAGDECL([], [predep_objects], [1],
  6644. [Dependencies to place before and after the objects being linked to
  6645. create a shared library])
  6646. _LT_TAGDECL([], [postdep_objects], [1])
  6647. _LT_TAGDECL([], [predeps], [1])
  6648. _LT_TAGDECL([], [postdeps], [1])
  6649. _LT_TAGDECL([], [compiler_lib_search_path], [1],
  6650. [The library search path used internally by the compiler when linking
  6651. a shared library])
  6652. ])# _LT_SYS_HIDDEN_LIBDEPS
  6653. # _LT_LANG_F77_CONFIG([TAG])
  6654. # --------------------------
  6655. # Ensure that the configuration variables for a Fortran 77 compiler are
  6656. # suitably defined. These variables are subsequently used by _LT_CONFIG
  6657. # to write the compiler configuration to `libtool'.
  6658. m4_defun([_LT_LANG_F77_CONFIG],
  6659. [AC_LANG_PUSH(Fortran 77)
  6660. if test -z "$F77" || test "X$F77" = "Xno"; then
  6661. _lt_disable_F77=yes
  6662. fi
  6663. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6664. _LT_TAGVAR(allow_undefined_flag, $1)=
  6665. _LT_TAGVAR(always_export_symbols, $1)=no
  6666. _LT_TAGVAR(archive_expsym_cmds, $1)=
  6667. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  6668. _LT_TAGVAR(hardcode_direct, $1)=no
  6669. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  6670. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  6671. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  6672. _LT_TAGVAR(hardcode_minus_L, $1)=no
  6673. _LT_TAGVAR(hardcode_automatic, $1)=no
  6674. _LT_TAGVAR(inherit_rpath, $1)=no
  6675. _LT_TAGVAR(module_cmds, $1)=
  6676. _LT_TAGVAR(module_expsym_cmds, $1)=
  6677. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  6678. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  6679. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  6680. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  6681. _LT_TAGVAR(no_undefined_flag, $1)=
  6682. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  6683. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  6684. # Source file extension for f77 test sources.
  6685. ac_ext=f
  6686. # Object file extension for compiled f77 test sources.
  6687. objext=o
  6688. _LT_TAGVAR(objext, $1)=$objext
  6689. # No sense in running all these tests if we already determined that
  6690. # the F77 compiler isn't working. Some variables (like enable_shared)
  6691. # are currently assumed to apply to all compilers on this platform,
  6692. # and will be corrupted by setting them based on a non-working compiler.
  6693. if test "$_lt_disable_F77" != yes; then
  6694. # Code to be used in simple compile tests
  6695. lt_simple_compile_test_code="\
  6696. subroutine t
  6697. return
  6698. end
  6699. "
  6700. # Code to be used in simple link tests
  6701. lt_simple_link_test_code="\
  6702. program t
  6703. end
  6704. "
  6705. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6706. _LT_TAG_COMPILER
  6707. # save warnings/boilerplate of simple test code
  6708. _LT_COMPILER_BOILERPLATE
  6709. _LT_LINKER_BOILERPLATE
  6710. # Allow CC to be a program name with arguments.
  6711. lt_save_CC="$CC"
  6712. lt_save_GCC=$GCC
  6713. lt_save_CFLAGS=$CFLAGS
  6714. CC=${F77-"f77"}
  6715. CFLAGS=$FFLAGS
  6716. compiler=$CC
  6717. _LT_TAGVAR(compiler, $1)=$CC
  6718. _LT_CC_BASENAME([$compiler])
  6719. GCC=$G77
  6720. if test -n "$compiler"; then
  6721. AC_MSG_CHECKING([if libtool supports shared libraries])
  6722. AC_MSG_RESULT([$can_build_shared])
  6723. AC_MSG_CHECKING([whether to build shared libraries])
  6724. test "$can_build_shared" = "no" && enable_shared=no
  6725. # On AIX, shared libraries and static libraries use the same namespace, and
  6726. # are all built from PIC.
  6727. case $host_os in
  6728. aix3*)
  6729. test "$enable_shared" = yes && enable_static=no
  6730. if test -n "$RANLIB"; then
  6731. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  6732. postinstall_cmds='$RANLIB $lib'
  6733. fi
  6734. ;;
  6735. aix[[4-9]]*)
  6736. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  6737. test "$enable_shared" = yes && enable_static=no
  6738. fi
  6739. ;;
  6740. esac
  6741. AC_MSG_RESULT([$enable_shared])
  6742. AC_MSG_CHECKING([whether to build static libraries])
  6743. # Make sure either enable_shared or enable_static is yes.
  6744. test "$enable_shared" = yes || enable_static=yes
  6745. AC_MSG_RESULT([$enable_static])
  6746. _LT_TAGVAR(GCC, $1)="$G77"
  6747. _LT_TAGVAR(LD, $1)="$LD"
  6748. ## CAVEAT EMPTOR:
  6749. ## There is no encapsulation within the following macros, do not change
  6750. ## the running order or otherwise move them around unless you know exactly
  6751. ## what you are doing...
  6752. _LT_COMPILER_PIC($1)
  6753. _LT_COMPILER_C_O($1)
  6754. _LT_COMPILER_FILE_LOCKS($1)
  6755. _LT_LINKER_SHLIBS($1)
  6756. _LT_SYS_DYNAMIC_LINKER($1)
  6757. _LT_LINKER_HARDCODE_LIBPATH($1)
  6758. _LT_CONFIG($1)
  6759. fi # test -n "$compiler"
  6760. GCC=$lt_save_GCC
  6761. CC="$lt_save_CC"
  6762. CFLAGS="$lt_save_CFLAGS"
  6763. fi # test "$_lt_disable_F77" != yes
  6764. AC_LANG_POP
  6765. ])# _LT_LANG_F77_CONFIG
  6766. # _LT_LANG_FC_CONFIG([TAG])
  6767. # -------------------------
  6768. # Ensure that the configuration variables for a Fortran compiler are
  6769. # suitably defined. These variables are subsequently used by _LT_CONFIG
  6770. # to write the compiler configuration to `libtool'.
  6771. m4_defun([_LT_LANG_FC_CONFIG],
  6772. [AC_LANG_PUSH(Fortran)
  6773. if test -z "$FC" || test "X$FC" = "Xno"; then
  6774. _lt_disable_FC=yes
  6775. fi
  6776. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6777. _LT_TAGVAR(allow_undefined_flag, $1)=
  6778. _LT_TAGVAR(always_export_symbols, $1)=no
  6779. _LT_TAGVAR(archive_expsym_cmds, $1)=
  6780. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  6781. _LT_TAGVAR(hardcode_direct, $1)=no
  6782. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  6783. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  6784. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  6785. _LT_TAGVAR(hardcode_minus_L, $1)=no
  6786. _LT_TAGVAR(hardcode_automatic, $1)=no
  6787. _LT_TAGVAR(inherit_rpath, $1)=no
  6788. _LT_TAGVAR(module_cmds, $1)=
  6789. _LT_TAGVAR(module_expsym_cmds, $1)=
  6790. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  6791. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  6792. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  6793. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  6794. _LT_TAGVAR(no_undefined_flag, $1)=
  6795. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  6796. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  6797. # Source file extension for fc test sources.
  6798. ac_ext=${ac_fc_srcext-f}
  6799. # Object file extension for compiled fc test sources.
  6800. objext=o
  6801. _LT_TAGVAR(objext, $1)=$objext
  6802. # No sense in running all these tests if we already determined that
  6803. # the FC compiler isn't working. Some variables (like enable_shared)
  6804. # are currently assumed to apply to all compilers on this platform,
  6805. # and will be corrupted by setting them based on a non-working compiler.
  6806. if test "$_lt_disable_FC" != yes; then
  6807. # Code to be used in simple compile tests
  6808. lt_simple_compile_test_code="\
  6809. subroutine t
  6810. return
  6811. end
  6812. "
  6813. # Code to be used in simple link tests
  6814. lt_simple_link_test_code="\
  6815. program t
  6816. end
  6817. "
  6818. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6819. _LT_TAG_COMPILER
  6820. # save warnings/boilerplate of simple test code
  6821. _LT_COMPILER_BOILERPLATE
  6822. _LT_LINKER_BOILERPLATE
  6823. # Allow CC to be a program name with arguments.
  6824. lt_save_CC="$CC"
  6825. lt_save_GCC=$GCC
  6826. lt_save_CFLAGS=$CFLAGS
  6827. CC=${FC-"f95"}
  6828. CFLAGS=$FCFLAGS
  6829. compiler=$CC
  6830. GCC=$ac_cv_fc_compiler_gnu
  6831. _LT_TAGVAR(compiler, $1)=$CC
  6832. _LT_CC_BASENAME([$compiler])
  6833. if test -n "$compiler"; then
  6834. AC_MSG_CHECKING([if libtool supports shared libraries])
  6835. AC_MSG_RESULT([$can_build_shared])
  6836. AC_MSG_CHECKING([whether to build shared libraries])
  6837. test "$can_build_shared" = "no" && enable_shared=no
  6838. # On AIX, shared libraries and static libraries use the same namespace, and
  6839. # are all built from PIC.
  6840. case $host_os in
  6841. aix3*)
  6842. test "$enable_shared" = yes && enable_static=no
  6843. if test -n "$RANLIB"; then
  6844. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  6845. postinstall_cmds='$RANLIB $lib'
  6846. fi
  6847. ;;
  6848. aix[[4-9]]*)
  6849. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  6850. test "$enable_shared" = yes && enable_static=no
  6851. fi
  6852. ;;
  6853. esac
  6854. AC_MSG_RESULT([$enable_shared])
  6855. AC_MSG_CHECKING([whether to build static libraries])
  6856. # Make sure either enable_shared or enable_static is yes.
  6857. test "$enable_shared" = yes || enable_static=yes
  6858. AC_MSG_RESULT([$enable_static])
  6859. _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
  6860. _LT_TAGVAR(LD, $1)="$LD"
  6861. ## CAVEAT EMPTOR:
  6862. ## There is no encapsulation within the following macros, do not change
  6863. ## the running order or otherwise move them around unless you know exactly
  6864. ## what you are doing...
  6865. _LT_SYS_HIDDEN_LIBDEPS($1)
  6866. _LT_COMPILER_PIC($1)
  6867. _LT_COMPILER_C_O($1)
  6868. _LT_COMPILER_FILE_LOCKS($1)
  6869. _LT_LINKER_SHLIBS($1)
  6870. _LT_SYS_DYNAMIC_LINKER($1)
  6871. _LT_LINKER_HARDCODE_LIBPATH($1)
  6872. _LT_CONFIG($1)
  6873. fi # test -n "$compiler"
  6874. GCC=$lt_save_GCC
  6875. CC=$lt_save_CC
  6876. CFLAGS=$lt_save_CFLAGS
  6877. fi # test "$_lt_disable_FC" != yes
  6878. AC_LANG_POP
  6879. ])# _LT_LANG_FC_CONFIG
  6880. # _LT_LANG_GCJ_CONFIG([TAG])
  6881. # --------------------------
  6882. # Ensure that the configuration variables for the GNU Java Compiler compiler
  6883. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  6884. # to write the compiler configuration to `libtool'.
  6885. m4_defun([_LT_LANG_GCJ_CONFIG],
  6886. [AC_REQUIRE([LT_PROG_GCJ])dnl
  6887. AC_LANG_SAVE
  6888. # Source file extension for Java test sources.
  6889. ac_ext=java
  6890. # Object file extension for compiled Java test sources.
  6891. objext=o
  6892. _LT_TAGVAR(objext, $1)=$objext
  6893. # Code to be used in simple compile tests
  6894. lt_simple_compile_test_code="class foo {}"
  6895. # Code to be used in simple link tests
  6896. lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
  6897. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6898. _LT_TAG_COMPILER
  6899. # save warnings/boilerplate of simple test code
  6900. _LT_COMPILER_BOILERPLATE
  6901. _LT_LINKER_BOILERPLATE
  6902. # Allow CC to be a program name with arguments.
  6903. lt_save_CC=$CC
  6904. lt_save_CFLAGS=$CFLAGS
  6905. lt_save_GCC=$GCC
  6906. GCC=yes
  6907. CC=${GCJ-"gcj"}
  6908. CFLAGS=$GCJFLAGS
  6909. compiler=$CC
  6910. _LT_TAGVAR(compiler, $1)=$CC
  6911. _LT_TAGVAR(LD, $1)="$LD"
  6912. _LT_CC_BASENAME([$compiler])
  6913. # GCJ did not exist at the time GCC didn't implicitly link libc in.
  6914. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6915. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  6916. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  6917. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  6918. if test -n "$compiler"; then
  6919. _LT_COMPILER_NO_RTTI($1)
  6920. _LT_COMPILER_PIC($1)
  6921. _LT_COMPILER_C_O($1)
  6922. _LT_COMPILER_FILE_LOCKS($1)
  6923. _LT_LINKER_SHLIBS($1)
  6924. _LT_LINKER_HARDCODE_LIBPATH($1)
  6925. _LT_CONFIG($1)
  6926. fi
  6927. AC_LANG_RESTORE
  6928. GCC=$lt_save_GCC
  6929. CC=$lt_save_CC
  6930. CFLAGS=$lt_save_CFLAGS
  6931. ])# _LT_LANG_GCJ_CONFIG
  6932. # _LT_LANG_GO_CONFIG([TAG])
  6933. # --------------------------
  6934. # Ensure that the configuration variables for the GNU Go compiler
  6935. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  6936. # to write the compiler configuration to `libtool'.
  6937. m4_defun([_LT_LANG_GO_CONFIG],
  6938. [AC_REQUIRE([LT_PROG_GO])dnl
  6939. AC_LANG_SAVE
  6940. # Source file extension for Go test sources.
  6941. ac_ext=go
  6942. # Object file extension for compiled Go test sources.
  6943. objext=o
  6944. _LT_TAGVAR(objext, $1)=$objext
  6945. # Code to be used in simple compile tests
  6946. lt_simple_compile_test_code="package main; func main() { }"
  6947. # Code to be used in simple link tests
  6948. lt_simple_link_test_code='package main; func main() { }'
  6949. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6950. _LT_TAG_COMPILER
  6951. # save warnings/boilerplate of simple test code
  6952. _LT_COMPILER_BOILERPLATE
  6953. _LT_LINKER_BOILERPLATE
  6954. # Allow CC to be a program name with arguments.
  6955. lt_save_CC=$CC
  6956. lt_save_CFLAGS=$CFLAGS
  6957. lt_save_GCC=$GCC
  6958. GCC=yes
  6959. CC=${GOC-"gccgo"}
  6960. CFLAGS=$GOFLAGS
  6961. compiler=$CC
  6962. _LT_TAGVAR(compiler, $1)=$CC
  6963. _LT_TAGVAR(LD, $1)="$LD"
  6964. _LT_CC_BASENAME([$compiler])
  6965. # Go did not exist at the time GCC didn't implicitly link libc in.
  6966. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6967. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  6968. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  6969. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  6970. if test -n "$compiler"; then
  6971. _LT_COMPILER_NO_RTTI($1)
  6972. _LT_COMPILER_PIC($1)
  6973. _LT_COMPILER_C_O($1)
  6974. _LT_COMPILER_FILE_LOCKS($1)
  6975. _LT_LINKER_SHLIBS($1)
  6976. _LT_LINKER_HARDCODE_LIBPATH($1)
  6977. _LT_CONFIG($1)
  6978. fi
  6979. AC_LANG_RESTORE
  6980. GCC=$lt_save_GCC
  6981. CC=$lt_save_CC
  6982. CFLAGS=$lt_save_CFLAGS
  6983. ])# _LT_LANG_GO_CONFIG
  6984. # _LT_LANG_RC_CONFIG([TAG])
  6985. # -------------------------
  6986. # Ensure that the configuration variables for the Windows resource compiler
  6987. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  6988. # to write the compiler configuration to `libtool'.
  6989. m4_defun([_LT_LANG_RC_CONFIG],
  6990. [AC_REQUIRE([LT_PROG_RC])dnl
  6991. AC_LANG_SAVE
  6992. # Source file extension for RC test sources.
  6993. ac_ext=rc
  6994. # Object file extension for compiled RC test sources.
  6995. objext=o
  6996. _LT_TAGVAR(objext, $1)=$objext
  6997. # Code to be used in simple compile tests
  6998. lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
  6999. # Code to be used in simple link tests
  7000. lt_simple_link_test_code="$lt_simple_compile_test_code"
  7001. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7002. _LT_TAG_COMPILER
  7003. # save warnings/boilerplate of simple test code
  7004. _LT_COMPILER_BOILERPLATE
  7005. _LT_LINKER_BOILERPLATE
  7006. # Allow CC to be a program name with arguments.
  7007. lt_save_CC="$CC"
  7008. lt_save_CFLAGS=$CFLAGS
  7009. lt_save_GCC=$GCC
  7010. GCC=
  7011. CC=${RC-"windres"}
  7012. CFLAGS=
  7013. compiler=$CC
  7014. _LT_TAGVAR(compiler, $1)=$CC
  7015. _LT_CC_BASENAME([$compiler])
  7016. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  7017. if test -n "$compiler"; then
  7018. :
  7019. _LT_CONFIG($1)
  7020. fi
  7021. GCC=$lt_save_GCC
  7022. AC_LANG_RESTORE
  7023. CC=$lt_save_CC
  7024. CFLAGS=$lt_save_CFLAGS
  7025. ])# _LT_LANG_RC_CONFIG
  7026. # LT_PROG_GCJ
  7027. # -----------
  7028. AC_DEFUN([LT_PROG_GCJ],
  7029. [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
  7030. [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
  7031. [AC_CHECK_TOOL(GCJ, gcj,)
  7032. test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
  7033. AC_SUBST(GCJFLAGS)])])[]dnl
  7034. ])
  7035. # Old name:
  7036. AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
  7037. dnl aclocal-1.4 backwards compatibility:
  7038. dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
  7039. # LT_PROG_GO
  7040. # ----------
  7041. AC_DEFUN([LT_PROG_GO],
  7042. [AC_CHECK_TOOL(GOC, gccgo,)
  7043. ])
  7044. # LT_PROG_RC
  7045. # ----------
  7046. AC_DEFUN([LT_PROG_RC],
  7047. [AC_CHECK_TOOL(RC, windres,)
  7048. ])
  7049. # Old name:
  7050. AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
  7051. dnl aclocal-1.4 backwards compatibility:
  7052. dnl AC_DEFUN([LT_AC_PROG_RC], [])
  7053. # _LT_DECL_EGREP
  7054. # --------------
  7055. # If we don't have a new enough Autoconf to choose the best grep
  7056. # available, choose the one first in the user's PATH.
  7057. m4_defun([_LT_DECL_EGREP],
  7058. [AC_REQUIRE([AC_PROG_EGREP])dnl
  7059. AC_REQUIRE([AC_PROG_FGREP])dnl
  7060. test -z "$GREP" && GREP=grep
  7061. _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
  7062. _LT_DECL([], [EGREP], [1], [An ERE matcher])
  7063. _LT_DECL([], [FGREP], [1], [A literal string matcher])
  7064. dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
  7065. AC_SUBST([GREP])
  7066. ])
  7067. # _LT_DECL_OBJDUMP
  7068. # --------------
  7069. # If we don't have a new enough Autoconf to choose the best objdump
  7070. # available, choose the one first in the user's PATH.
  7071. m4_defun([_LT_DECL_OBJDUMP],
  7072. [AC_CHECK_TOOL(OBJDUMP, objdump, false)
  7073. test -z "$OBJDUMP" && OBJDUMP=objdump
  7074. _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
  7075. AC_SUBST([OBJDUMP])
  7076. ])
  7077. # _LT_DECL_DLLTOOL
  7078. # ----------------
  7079. # Ensure DLLTOOL variable is set.
  7080. m4_defun([_LT_DECL_DLLTOOL],
  7081. [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  7082. test -z "$DLLTOOL" && DLLTOOL=dlltool
  7083. _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
  7084. AC_SUBST([DLLTOOL])
  7085. ])
  7086. # _LT_DECL_SED
  7087. # ------------
  7088. # Check for a fully-functional sed program, that truncates
  7089. # as few characters as possible. Prefer GNU sed if found.
  7090. m4_defun([_LT_DECL_SED],
  7091. [AC_PROG_SED
  7092. test -z "$SED" && SED=sed
  7093. Xsed="$SED -e 1s/^X//"
  7094. _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
  7095. _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
  7096. [Sed that helps us avoid accidentally triggering echo(1) options like -n])
  7097. ])# _LT_DECL_SED
  7098. m4_ifndef([AC_PROG_SED], [
  7099. # NOTE: This macro has been submitted for inclusion into #
  7100. # GNU Autoconf as AC_PROG_SED. When it is available in #
  7101. # a released version of Autoconf we should remove this #
  7102. # macro and use it instead. #
  7103. m4_defun([AC_PROG_SED],
  7104. [AC_MSG_CHECKING([for a sed that does not truncate output])
  7105. AC_CACHE_VAL(lt_cv_path_SED,
  7106. [# Loop through the user's path and test for sed and gsed.
  7107. # Then use that list of sed's as ones to test for truncation.
  7108. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  7109. for as_dir in $PATH
  7110. do
  7111. IFS=$as_save_IFS
  7112. test -z "$as_dir" && as_dir=.
  7113. for lt_ac_prog in sed gsed; do
  7114. for ac_exec_ext in '' $ac_executable_extensions; do
  7115. if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
  7116. lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
  7117. fi
  7118. done
  7119. done
  7120. done
  7121. IFS=$as_save_IFS
  7122. lt_ac_max=0
  7123. lt_ac_count=0
  7124. # Add /usr/xpg4/bin/sed as it is typically found on Solaris
  7125. # along with /bin/sed that truncates output.
  7126. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
  7127. test ! -f $lt_ac_sed && continue
  7128. cat /dev/null > conftest.in
  7129. lt_ac_count=0
  7130. echo $ECHO_N "0123456789$ECHO_C" >conftest.in
  7131. # Check for GNU sed and select it if it is found.
  7132. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
  7133. lt_cv_path_SED=$lt_ac_sed
  7134. break
  7135. fi
  7136. while true; do
  7137. cat conftest.in conftest.in >conftest.tmp
  7138. mv conftest.tmp conftest.in
  7139. cp conftest.in conftest.nl
  7140. echo >>conftest.nl
  7141. $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
  7142. cmp -s conftest.out conftest.nl || break
  7143. # 10000 chars as input seems more than enough
  7144. test $lt_ac_count -gt 10 && break
  7145. lt_ac_count=`expr $lt_ac_count + 1`
  7146. if test $lt_ac_count -gt $lt_ac_max; then
  7147. lt_ac_max=$lt_ac_count
  7148. lt_cv_path_SED=$lt_ac_sed
  7149. fi
  7150. done
  7151. done
  7152. ])
  7153. SED=$lt_cv_path_SED
  7154. AC_SUBST([SED])
  7155. AC_MSG_RESULT([$SED])
  7156. ])#AC_PROG_SED
  7157. ])#m4_ifndef
  7158. # Old name:
  7159. AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
  7160. dnl aclocal-1.4 backwards compatibility:
  7161. dnl AC_DEFUN([LT_AC_PROG_SED], [])
  7162. # _LT_CHECK_SHELL_FEATURES
  7163. # ------------------------
  7164. # Find out whether the shell is Bourne or XSI compatible,
  7165. # or has some other useful features.
  7166. m4_defun([_LT_CHECK_SHELL_FEATURES],
  7167. [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
  7168. # Try some XSI features
  7169. xsi_shell=no
  7170. ( _lt_dummy="a/b/c"
  7171. test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
  7172. = c,a/b,b/c, \
  7173. && eval 'test $(( 1 + 1 )) -eq 2 \
  7174. && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
  7175. && xsi_shell=yes
  7176. AC_MSG_RESULT([$xsi_shell])
  7177. _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
  7178. AC_MSG_CHECKING([whether the shell understands "+="])
  7179. lt_shell_append=no
  7180. ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
  7181. >/dev/null 2>&1 \
  7182. && lt_shell_append=yes
  7183. AC_MSG_RESULT([$lt_shell_append])
  7184. _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
  7185. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
  7186. lt_unset=unset
  7187. else
  7188. lt_unset=false
  7189. fi
  7190. _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
  7191. # test EBCDIC or ASCII
  7192. case `echo X|tr X '\101'` in
  7193. A) # ASCII based system
  7194. # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
  7195. lt_SP2NL='tr \040 \012'
  7196. lt_NL2SP='tr \015\012 \040\040'
  7197. ;;
  7198. *) # EBCDIC based system
  7199. lt_SP2NL='tr \100 \n'
  7200. lt_NL2SP='tr \r\n \100\100'
  7201. ;;
  7202. esac
  7203. _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
  7204. _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
  7205. ])# _LT_CHECK_SHELL_FEATURES
  7206. # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
  7207. # ------------------------------------------------------
  7208. # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
  7209. # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
  7210. m4_defun([_LT_PROG_FUNCTION_REPLACE],
  7211. [dnl {
  7212. sed -e '/^$1 ()$/,/^} # $1 /c\
  7213. $1 ()\
  7214. {\
  7215. m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
  7216. } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
  7217. && mv -f "$cfgfile.tmp" "$cfgfile" \
  7218. || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
  7219. test 0 -eq $? || _lt_function_replace_fail=:
  7220. ])
  7221. # _LT_PROG_REPLACE_SHELLFNS
  7222. # -------------------------
  7223. # Replace existing portable implementations of several shell functions with
  7224. # equivalent extended shell implementations where those features are available..
  7225. m4_defun([_LT_PROG_REPLACE_SHELLFNS],
  7226. [if test x"$xsi_shell" = xyes; then
  7227. _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
  7228. case ${1} in
  7229. */*) func_dirname_result="${1%/*}${2}" ;;
  7230. * ) func_dirname_result="${3}" ;;
  7231. esac])
  7232. _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
  7233. func_basename_result="${1##*/}"])
  7234. _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
  7235. case ${1} in
  7236. */*) func_dirname_result="${1%/*}${2}" ;;
  7237. * ) func_dirname_result="${3}" ;;
  7238. esac
  7239. func_basename_result="${1##*/}"])
  7240. _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
  7241. # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
  7242. # positional parameters, so assign one to ordinary parameter first.
  7243. func_stripname_result=${3}
  7244. func_stripname_result=${func_stripname_result#"${1}"}
  7245. func_stripname_result=${func_stripname_result%"${2}"}])
  7246. _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
  7247. func_split_long_opt_name=${1%%=*}
  7248. func_split_long_opt_arg=${1#*=}])
  7249. _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
  7250. func_split_short_opt_arg=${1#??}
  7251. func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
  7252. _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
  7253. case ${1} in
  7254. *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
  7255. *) func_lo2o_result=${1} ;;
  7256. esac])
  7257. _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
  7258. _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
  7259. _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
  7260. fi
  7261. if test x"$lt_shell_append" = xyes; then
  7262. _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
  7263. _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
  7264. func_quote_for_eval "${2}"
  7265. dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
  7266. eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
  7267. # Save a `func_append' function call where possible by direct use of '+='
  7268. sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
  7269. && mv -f "$cfgfile.tmp" "$cfgfile" \
  7270. || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
  7271. test 0 -eq $? || _lt_function_replace_fail=:
  7272. else
  7273. # Save a `func_append' function call even when '+=' is not available
  7274. sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
  7275. && mv -f "$cfgfile.tmp" "$cfgfile" \
  7276. || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
  7277. test 0 -eq $? || _lt_function_replace_fail=:
  7278. fi
  7279. if test x"$_lt_function_replace_fail" = x":"; then
  7280. AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
  7281. fi
  7282. ])
  7283. # _LT_PATH_CONVERSION_FUNCTIONS
  7284. # -----------------------------
  7285. # Determine which file name conversion functions should be used by
  7286. # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
  7287. # for certain cross-compile configurations and native mingw.
  7288. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
  7289. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  7290. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  7291. AC_MSG_CHECKING([how to convert $build file names to $host format])
  7292. AC_CACHE_VAL(lt_cv_to_host_file_cmd,
  7293. [case $host in
  7294. *-*-mingw* )
  7295. case $build in
  7296. *-*-mingw* ) # actually msys
  7297. lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
  7298. ;;
  7299. *-*-cygwin* )
  7300. lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
  7301. ;;
  7302. * ) # otherwise, assume *nix
  7303. lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
  7304. ;;
  7305. esac
  7306. ;;
  7307. *-*-cygwin* )
  7308. case $build in
  7309. *-*-mingw* ) # actually msys
  7310. lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
  7311. ;;
  7312. *-*-cygwin* )
  7313. lt_cv_to_host_file_cmd=func_convert_file_noop
  7314. ;;
  7315. * ) # otherwise, assume *nix
  7316. lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
  7317. ;;
  7318. esac
  7319. ;;
  7320. * ) # unhandled hosts (and "normal" native builds)
  7321. lt_cv_to_host_file_cmd=func_convert_file_noop
  7322. ;;
  7323. esac
  7324. ])
  7325. to_host_file_cmd=$lt_cv_to_host_file_cmd
  7326. AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
  7327. _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
  7328. [0], [convert $build file names to $host format])dnl
  7329. AC_MSG_CHECKING([how to convert $build file names to toolchain format])
  7330. AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
  7331. [#assume ordinary cross tools, or native build.
  7332. lt_cv_to_tool_file_cmd=func_convert_file_noop
  7333. case $host in
  7334. *-*-mingw* )
  7335. case $build in
  7336. *-*-mingw* ) # actually msys
  7337. lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
  7338. ;;
  7339. esac
  7340. ;;
  7341. esac
  7342. ])
  7343. to_tool_file_cmd=$lt_cv_to_tool_file_cmd
  7344. AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
  7345. _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
  7346. [0], [convert $build files to toolchain format])dnl
  7347. ])# _LT_PATH_CONVERSION_FUNCTIONS
  7348. # Helper functions for option handling. -*- Autoconf -*-
  7349. #
  7350. # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
  7351. # Inc.
  7352. # Written by Gary V. Vaughan, 2004
  7353. #
  7354. # This file is free software; the Free Software Foundation gives
  7355. # unlimited permission to copy and/or distribute it, with or without
  7356. # modifications, as long as this notice is preserved.
  7357. # serial 7 ltoptions.m4
  7358. # This is to help aclocal find these macros, as it can't see m4_define.
  7359. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
  7360. # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
  7361. # ------------------------------------------
  7362. m4_define([_LT_MANGLE_OPTION],
  7363. [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
  7364. # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
  7365. # ---------------------------------------
  7366. # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
  7367. # matching handler defined, dispatch to it. Other OPTION-NAMEs are
  7368. # saved as a flag.
  7369. m4_define([_LT_SET_OPTION],
  7370. [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
  7371. m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
  7372. _LT_MANGLE_DEFUN([$1], [$2]),
  7373. [m4_warning([Unknown $1 option `$2'])])[]dnl
  7374. ])
  7375. # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
  7376. # ------------------------------------------------------------
  7377. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  7378. m4_define([_LT_IF_OPTION],
  7379. [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
  7380. # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
  7381. # -------------------------------------------------------
  7382. # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
  7383. # are set.
  7384. m4_define([_LT_UNLESS_OPTIONS],
  7385. [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
  7386. [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
  7387. [m4_define([$0_found])])])[]dnl
  7388. m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
  7389. ])[]dnl
  7390. ])
  7391. # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
  7392. # ----------------------------------------
  7393. # OPTION-LIST is a space-separated list of Libtool options associated
  7394. # with MACRO-NAME. If any OPTION has a matching handler declared with
  7395. # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
  7396. # the unknown option and exit.
  7397. m4_defun([_LT_SET_OPTIONS],
  7398. [# Set options
  7399. m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
  7400. [_LT_SET_OPTION([$1], _LT_Option)])
  7401. m4_if([$1],[LT_INIT],[
  7402. dnl
  7403. dnl Simply set some default values (i.e off) if boolean options were not
  7404. dnl specified:
  7405. _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
  7406. ])
  7407. _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
  7408. ])
  7409. dnl
  7410. dnl If no reference was made to various pairs of opposing options, then
  7411. dnl we run the default mode handler for the pair. For example, if neither
  7412. dnl `shared' nor `disable-shared' was passed, we enable building of shared
  7413. dnl archives by default:
  7414. _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
  7415. _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
  7416. _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
  7417. _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
  7418. [_LT_ENABLE_FAST_INSTALL])
  7419. ])
  7420. ])# _LT_SET_OPTIONS
  7421. # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
  7422. # -----------------------------------------
  7423. m4_define([_LT_MANGLE_DEFUN],
  7424. [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
  7425. # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
  7426. # -----------------------------------------------
  7427. m4_define([LT_OPTION_DEFINE],
  7428. [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
  7429. ])# LT_OPTION_DEFINE
  7430. # dlopen
  7431. # ------
  7432. LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
  7433. ])
  7434. AU_DEFUN([AC_LIBTOOL_DLOPEN],
  7435. [_LT_SET_OPTION([LT_INIT], [dlopen])
  7436. AC_DIAGNOSE([obsolete],
  7437. [$0: Remove this warning and the call to _LT_SET_OPTION when you
  7438. put the `dlopen' option into LT_INIT's first parameter.])
  7439. ])
  7440. dnl aclocal-1.4 backwards compatibility:
  7441. dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
  7442. # win32-dll
  7443. # ---------
  7444. # Declare package support for building win32 dll's.
  7445. LT_OPTION_DEFINE([LT_INIT], [win32-dll],
  7446. [enable_win32_dll=yes
  7447. case $host in
  7448. *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
  7449. AC_CHECK_TOOL(AS, as, false)
  7450. AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  7451. AC_CHECK_TOOL(OBJDUMP, objdump, false)
  7452. ;;
  7453. esac
  7454. test -z "$AS" && AS=as
  7455. _LT_DECL([], [AS], [1], [Assembler program])dnl
  7456. test -z "$DLLTOOL" && DLLTOOL=dlltool
  7457. _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
  7458. test -z "$OBJDUMP" && OBJDUMP=objdump
  7459. _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
  7460. ])# win32-dll
  7461. AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
  7462. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  7463. _LT_SET_OPTION([LT_INIT], [win32-dll])
  7464. AC_DIAGNOSE([obsolete],
  7465. [$0: Remove this warning and the call to _LT_SET_OPTION when you
  7466. put the `win32-dll' option into LT_INIT's first parameter.])
  7467. ])
  7468. dnl aclocal-1.4 backwards compatibility:
  7469. dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
  7470. # _LT_ENABLE_SHARED([DEFAULT])
  7471. # ----------------------------
  7472. # implement the --enable-shared flag, and supports the `shared' and
  7473. # `disable-shared' LT_INIT options.
  7474. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  7475. m4_define([_LT_ENABLE_SHARED],
  7476. [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
  7477. AC_ARG_ENABLE([shared],
  7478. [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
  7479. [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
  7480. [p=${PACKAGE-default}
  7481. case $enableval in
  7482. yes) enable_shared=yes ;;
  7483. no) enable_shared=no ;;
  7484. *)
  7485. enable_shared=no
  7486. # Look at the argument we got. We use all the common list separators.
  7487. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  7488. for pkg in $enableval; do
  7489. IFS="$lt_save_ifs"
  7490. if test "X$pkg" = "X$p"; then
  7491. enable_shared=yes
  7492. fi
  7493. done
  7494. IFS="$lt_save_ifs"
  7495. ;;
  7496. esac],
  7497. [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
  7498. _LT_DECL([build_libtool_libs], [enable_shared], [0],
  7499. [Whether or not to build shared libraries])
  7500. ])# _LT_ENABLE_SHARED
  7501. LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
  7502. LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
  7503. # Old names:
  7504. AC_DEFUN([AC_ENABLE_SHARED],
  7505. [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
  7506. ])
  7507. AC_DEFUN([AC_DISABLE_SHARED],
  7508. [_LT_SET_OPTION([LT_INIT], [disable-shared])
  7509. ])
  7510. AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
  7511. AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
  7512. dnl aclocal-1.4 backwards compatibility:
  7513. dnl AC_DEFUN([AM_ENABLE_SHARED], [])
  7514. dnl AC_DEFUN([AM_DISABLE_SHARED], [])
  7515. # _LT_ENABLE_STATIC([DEFAULT])
  7516. # ----------------------------
  7517. # implement the --enable-static flag, and support the `static' and
  7518. # `disable-static' LT_INIT options.
  7519. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  7520. m4_define([_LT_ENABLE_STATIC],
  7521. [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
  7522. AC_ARG_ENABLE([static],
  7523. [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
  7524. [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
  7525. [p=${PACKAGE-default}
  7526. case $enableval in
  7527. yes) enable_static=yes ;;
  7528. no) enable_static=no ;;
  7529. *)
  7530. enable_static=no
  7531. # Look at the argument we got. We use all the common list separators.
  7532. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  7533. for pkg in $enableval; do
  7534. IFS="$lt_save_ifs"
  7535. if test "X$pkg" = "X$p"; then
  7536. enable_static=yes
  7537. fi
  7538. done
  7539. IFS="$lt_save_ifs"
  7540. ;;
  7541. esac],
  7542. [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
  7543. _LT_DECL([build_old_libs], [enable_static], [0],
  7544. [Whether or not to build static libraries])
  7545. ])# _LT_ENABLE_STATIC
  7546. LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
  7547. LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
  7548. # Old names:
  7549. AC_DEFUN([AC_ENABLE_STATIC],
  7550. [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
  7551. ])
  7552. AC_DEFUN([AC_DISABLE_STATIC],
  7553. [_LT_SET_OPTION([LT_INIT], [disable-static])
  7554. ])
  7555. AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
  7556. AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
  7557. dnl aclocal-1.4 backwards compatibility:
  7558. dnl AC_DEFUN([AM_ENABLE_STATIC], [])
  7559. dnl AC_DEFUN([AM_DISABLE_STATIC], [])
  7560. # _LT_ENABLE_FAST_INSTALL([DEFAULT])
  7561. # ----------------------------------
  7562. # implement the --enable-fast-install flag, and support the `fast-install'
  7563. # and `disable-fast-install' LT_INIT options.
  7564. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  7565. m4_define([_LT_ENABLE_FAST_INSTALL],
  7566. [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
  7567. AC_ARG_ENABLE([fast-install],
  7568. [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
  7569. [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
  7570. [p=${PACKAGE-default}
  7571. case $enableval in
  7572. yes) enable_fast_install=yes ;;
  7573. no) enable_fast_install=no ;;
  7574. *)
  7575. enable_fast_install=no
  7576. # Look at the argument we got. We use all the common list separators.
  7577. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  7578. for pkg in $enableval; do
  7579. IFS="$lt_save_ifs"
  7580. if test "X$pkg" = "X$p"; then
  7581. enable_fast_install=yes
  7582. fi
  7583. done
  7584. IFS="$lt_save_ifs"
  7585. ;;
  7586. esac],
  7587. [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
  7588. _LT_DECL([fast_install], [enable_fast_install], [0],
  7589. [Whether or not to optimize for fast installation])dnl
  7590. ])# _LT_ENABLE_FAST_INSTALL
  7591. LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
  7592. LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
  7593. # Old names:
  7594. AU_DEFUN([AC_ENABLE_FAST_INSTALL],
  7595. [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
  7596. AC_DIAGNOSE([obsolete],
  7597. [$0: Remove this warning and the call to _LT_SET_OPTION when you put
  7598. the `fast-install' option into LT_INIT's first parameter.])
  7599. ])
  7600. AU_DEFUN([AC_DISABLE_FAST_INSTALL],
  7601. [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
  7602. AC_DIAGNOSE([obsolete],
  7603. [$0: Remove this warning and the call to _LT_SET_OPTION when you put
  7604. the `disable-fast-install' option into LT_INIT's first parameter.])
  7605. ])
  7606. dnl aclocal-1.4 backwards compatibility:
  7607. dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
  7608. dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
  7609. # _LT_WITH_PIC([MODE])
  7610. # --------------------
  7611. # implement the --with-pic flag, and support the `pic-only' and `no-pic'
  7612. # LT_INIT options.
  7613. # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
  7614. m4_define([_LT_WITH_PIC],
  7615. [AC_ARG_WITH([pic],
  7616. [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
  7617. [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
  7618. [lt_p=${PACKAGE-default}
  7619. case $withval in
  7620. yes|no) pic_mode=$withval ;;
  7621. *)
  7622. pic_mode=default
  7623. # Look at the argument we got. We use all the common list separators.
  7624. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  7625. for lt_pkg in $withval; do
  7626. IFS="$lt_save_ifs"
  7627. if test "X$lt_pkg" = "X$lt_p"; then
  7628. pic_mode=yes
  7629. fi
  7630. done
  7631. IFS="$lt_save_ifs"
  7632. ;;
  7633. esac],
  7634. [pic_mode=default])
  7635. test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
  7636. _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
  7637. ])# _LT_WITH_PIC
  7638. LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
  7639. LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
  7640. # Old name:
  7641. AU_DEFUN([AC_LIBTOOL_PICMODE],
  7642. [_LT_SET_OPTION([LT_INIT], [pic-only])
  7643. AC_DIAGNOSE([obsolete],
  7644. [$0: Remove this warning and the call to _LT_SET_OPTION when you
  7645. put the `pic-only' option into LT_INIT's first parameter.])
  7646. ])
  7647. dnl aclocal-1.4 backwards compatibility:
  7648. dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
  7649. m4_define([_LTDL_MODE], [])
  7650. LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
  7651. [m4_define([_LTDL_MODE], [nonrecursive])])
  7652. LT_OPTION_DEFINE([LTDL_INIT], [recursive],
  7653. [m4_define([_LTDL_MODE], [recursive])])
  7654. LT_OPTION_DEFINE([LTDL_INIT], [subproject],
  7655. [m4_define([_LTDL_MODE], [subproject])])
  7656. m4_define([_LTDL_TYPE], [])
  7657. LT_OPTION_DEFINE([LTDL_INIT], [installable],
  7658. [m4_define([_LTDL_TYPE], [installable])])
  7659. LT_OPTION_DEFINE([LTDL_INIT], [convenience],
  7660. [m4_define([_LTDL_TYPE], [convenience])])
  7661. # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
  7662. #
  7663. # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
  7664. # Written by Gary V. Vaughan, 2004
  7665. #
  7666. # This file is free software; the Free Software Foundation gives
  7667. # unlimited permission to copy and/or distribute it, with or without
  7668. # modifications, as long as this notice is preserved.
  7669. # serial 6 ltsugar.m4
  7670. # This is to help aclocal find these macros, as it can't see m4_define.
  7671. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
  7672. # lt_join(SEP, ARG1, [ARG2...])
  7673. # -----------------------------
  7674. # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
  7675. # associated separator.
  7676. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
  7677. # versions in m4sugar had bugs.
  7678. m4_define([lt_join],
  7679. [m4_if([$#], [1], [],
  7680. [$#], [2], [[$2]],
  7681. [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
  7682. m4_define([_lt_join],
  7683. [m4_if([$#$2], [2], [],
  7684. [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
  7685. # lt_car(LIST)
  7686. # lt_cdr(LIST)
  7687. # ------------
  7688. # Manipulate m4 lists.
  7689. # These macros are necessary as long as will still need to support
  7690. # Autoconf-2.59 which quotes differently.
  7691. m4_define([lt_car], [[$1]])
  7692. m4_define([lt_cdr],
  7693. [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
  7694. [$#], 1, [],
  7695. [m4_dquote(m4_shift($@))])])
  7696. m4_define([lt_unquote], $1)
  7697. # lt_append(MACRO-NAME, STRING, [SEPARATOR])
  7698. # ------------------------------------------
  7699. # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
  7700. # Note that neither SEPARATOR nor STRING are expanded; they are appended
  7701. # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
  7702. # No SEPARATOR is output if MACRO-NAME was previously undefined (different
  7703. # than defined and empty).
  7704. #
  7705. # This macro is needed until we can rely on Autoconf 2.62, since earlier
  7706. # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
  7707. m4_define([lt_append],
  7708. [m4_define([$1],
  7709. m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
  7710. # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
  7711. # ----------------------------------------------------------
  7712. # Produce a SEP delimited list of all paired combinations of elements of
  7713. # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
  7714. # has the form PREFIXmINFIXSUFFIXn.
  7715. # Needed until we can rely on m4_combine added in Autoconf 2.62.
  7716. m4_define([lt_combine],
  7717. [m4_if(m4_eval([$# > 3]), [1],
  7718. [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
  7719. [[m4_foreach([_Lt_prefix], [$2],
  7720. [m4_foreach([_Lt_suffix],
  7721. ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
  7722. [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
  7723. # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
  7724. # -----------------------------------------------------------------------
  7725. # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
  7726. # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
  7727. m4_define([lt_if_append_uniq],
  7728. [m4_ifdef([$1],
  7729. [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
  7730. [lt_append([$1], [$2], [$3])$4],
  7731. [$5])],
  7732. [lt_append([$1], [$2], [$3])$4])])
  7733. # lt_dict_add(DICT, KEY, VALUE)
  7734. # -----------------------------
  7735. m4_define([lt_dict_add],
  7736. [m4_define([$1($2)], [$3])])
  7737. # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
  7738. # --------------------------------------------
  7739. m4_define([lt_dict_add_subkey],
  7740. [m4_define([$1($2:$3)], [$4])])
  7741. # lt_dict_fetch(DICT, KEY, [SUBKEY])
  7742. # ----------------------------------
  7743. m4_define([lt_dict_fetch],
  7744. [m4_ifval([$3],
  7745. m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
  7746. m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
  7747. # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
  7748. # -----------------------------------------------------------------
  7749. m4_define([lt_if_dict_fetch],
  7750. [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
  7751. [$5],
  7752. [$6])])
  7753. # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
  7754. # --------------------------------------------------------------
  7755. m4_define([lt_dict_filter],
  7756. [m4_if([$5], [], [],
  7757. [lt_join(m4_quote(m4_default([$4], [[, ]])),
  7758. lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
  7759. [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
  7760. ])
  7761. # ltversion.m4 -- version numbers -*- Autoconf -*-
  7762. #
  7763. # Copyright (C) 2004 Free Software Foundation, Inc.
  7764. # Written by Scott James Remnant, 2004
  7765. #
  7766. # This file is free software; the Free Software Foundation gives
  7767. # unlimited permission to copy and/or distribute it, with or without
  7768. # modifications, as long as this notice is preserved.
  7769. # @configure_input@
  7770. # serial 3337 ltversion.m4
  7771. # This file is part of GNU Libtool
  7772. m4_define([LT_PACKAGE_VERSION], [2.4.2])
  7773. m4_define([LT_PACKAGE_REVISION], [1.3337])
  7774. AC_DEFUN([LTVERSION_VERSION],
  7775. [macro_version='2.4.2'
  7776. macro_revision='1.3337'
  7777. _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
  7778. _LT_DECL(, macro_revision, 0)
  7779. ])
  7780. # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
  7781. #
  7782. # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
  7783. # Written by Scott James Remnant, 2004.
  7784. #
  7785. # This file is free software; the Free Software Foundation gives
  7786. # unlimited permission to copy and/or distribute it, with or without
  7787. # modifications, as long as this notice is preserved.
  7788. # serial 5 lt~obsolete.m4
  7789. # These exist entirely to fool aclocal when bootstrapping libtool.
  7790. #
  7791. # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
  7792. # which have later been changed to m4_define as they aren't part of the
  7793. # exported API, or moved to Autoconf or Automake where they belong.
  7794. #
  7795. # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
  7796. # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
  7797. # using a macro with the same name in our local m4/libtool.m4 it'll
  7798. # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
  7799. # and doesn't know about Autoconf macros at all.)
  7800. #
  7801. # So we provide this file, which has a silly filename so it's always
  7802. # included after everything else. This provides aclocal with the
  7803. # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
  7804. # because those macros already exist, or will be overwritten later.
  7805. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
  7806. #
  7807. # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
  7808. # Yes, that means every name once taken will need to remain here until
  7809. # we give up compatibility with versions before 1.7, at which point
  7810. # we need to keep only those names which we still refer to.
  7811. # This is to help aclocal find these macros, as it can't see m4_define.
  7812. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
  7813. m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
  7814. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
  7815. m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
  7816. m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
  7817. m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
  7818. m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
  7819. m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
  7820. m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
  7821. m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
  7822. m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
  7823. m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
  7824. m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
  7825. m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
  7826. m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
  7827. m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
  7828. m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
  7829. m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
  7830. m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
  7831. m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
  7832. m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
  7833. m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
  7834. m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
  7835. m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
  7836. m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
  7837. m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
  7838. m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
  7839. m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
  7840. m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
  7841. m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
  7842. m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
  7843. m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
  7844. m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
  7845. m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
  7846. m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
  7847. m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
  7848. m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
  7849. m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
  7850. m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
  7851. m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
  7852. m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
  7853. m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
  7854. m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
  7855. m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
  7856. m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
  7857. m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
  7858. m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
  7859. m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
  7860. m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
  7861. m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
  7862. m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
  7863. m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
  7864. m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
  7865. m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
  7866. m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
  7867. m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
  7868. m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
  7869. m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
  7870. m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
  7871. m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
  7872. m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
  7873. m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
  7874. # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
  7875. # Foundation, Inc.
  7876. #
  7877. # This file is free software; the Free Software Foundation
  7878. # gives unlimited permission to copy and/or distribute it,
  7879. # with or without modifications, as long as this notice is preserved.
  7880. # serial 1
  7881. # AM_AUTOMAKE_VERSION(VERSION)
  7882. # ----------------------------
  7883. # Automake X.Y traces this macro to ensure aclocal.m4 has been
  7884. # generated from the m4 files accompanying Automake X.Y.
  7885. # (This private macro should not be called outside this file.)
  7886. AC_DEFUN([AM_AUTOMAKE_VERSION],
  7887. [am__api_version='1.11'
  7888. dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
  7889. dnl require some minimum version. Point them to the right macro.
  7890. m4_if([$1], [1.11.3], [],
  7891. [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
  7892. ])
  7893. # _AM_AUTOCONF_VERSION(VERSION)
  7894. # -----------------------------
  7895. # aclocal traces this macro to find the Autoconf version.
  7896. # This is a private macro too. Using m4_define simplifies
  7897. # the logic in aclocal, which can simply ignore this definition.
  7898. m4_define([_AM_AUTOCONF_VERSION], [])
  7899. # AM_SET_CURRENT_AUTOMAKE_VERSION
  7900. # -------------------------------
  7901. # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
  7902. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
  7903. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
  7904. [AM_AUTOMAKE_VERSION([1.11.3])dnl
  7905. m4_ifndef([AC_AUTOCONF_VERSION],
  7906. [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
  7907. _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
  7908. # AM_AUX_DIR_EXPAND -*- Autoconf -*-
  7909. # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
  7910. #
  7911. # This file is free software; the Free Software Foundation
  7912. # gives unlimited permission to copy and/or distribute it,
  7913. # with or without modifications, as long as this notice is preserved.
  7914. # serial 1
  7915. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
  7916. # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
  7917. # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
  7918. #
  7919. # Of course, Automake must honor this variable whenever it calls a
  7920. # tool from the auxiliary directory. The problem is that $srcdir (and
  7921. # therefore $ac_aux_dir as well) can be either absolute or relative,
  7922. # depending on how configure is run. This is pretty annoying, since
  7923. # it makes $ac_aux_dir quite unusable in subdirectories: in the top
  7924. # source directory, any form will work fine, but in subdirectories a
  7925. # relative path needs to be adjusted first.
  7926. #
  7927. # $ac_aux_dir/missing
  7928. # fails when called from a subdirectory if $ac_aux_dir is relative
  7929. # $top_srcdir/$ac_aux_dir/missing
  7930. # fails if $ac_aux_dir is absolute,
  7931. # fails when called from a subdirectory in a VPATH build with
  7932. # a relative $ac_aux_dir
  7933. #
  7934. # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
  7935. # are both prefixed by $srcdir. In an in-source build this is usually
  7936. # harmless because $srcdir is `.', but things will broke when you
  7937. # start a VPATH build or use an absolute $srcdir.
  7938. #
  7939. # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
  7940. # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
  7941. # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
  7942. # and then we would define $MISSING as
  7943. # MISSING="\${SHELL} $am_aux_dir/missing"
  7944. # This will work as long as MISSING is not called from configure, because
  7945. # unfortunately $(top_srcdir) has no meaning in configure.
  7946. # However there are other variables, like CC, which are often used in
  7947. # configure, and could therefore not use this "fixed" $ac_aux_dir.
  7948. #
  7949. # Another solution, used here, is to always expand $ac_aux_dir to an
  7950. # absolute PATH. The drawback is that using absolute paths prevent a
  7951. # configured tree to be moved without reconfiguration.
  7952. AC_DEFUN([AM_AUX_DIR_EXPAND],
  7953. [dnl Rely on autoconf to set up CDPATH properly.
  7954. AC_PREREQ([2.50])dnl
  7955. # expand $ac_aux_dir to an absolute path
  7956. am_aux_dir=`cd $ac_aux_dir && pwd`
  7957. ])
  7958. # AM_CONDITIONAL -*- Autoconf -*-
  7959. # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
  7960. # Free Software Foundation, Inc.
  7961. #
  7962. # This file is free software; the Free Software Foundation
  7963. # gives unlimited permission to copy and/or distribute it,
  7964. # with or without modifications, as long as this notice is preserved.
  7965. # serial 9
  7966. # AM_CONDITIONAL(NAME, SHELL-CONDITION)
  7967. # -------------------------------------
  7968. # Define a conditional.
  7969. AC_DEFUN([AM_CONDITIONAL],
  7970. [AC_PREREQ(2.52)dnl
  7971. ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
  7972. [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
  7973. AC_SUBST([$1_TRUE])dnl
  7974. AC_SUBST([$1_FALSE])dnl
  7975. _AM_SUBST_NOTMAKE([$1_TRUE])dnl
  7976. _AM_SUBST_NOTMAKE([$1_FALSE])dnl
  7977. m4_define([_AM_COND_VALUE_$1], [$2])dnl
  7978. if $2; then
  7979. $1_TRUE=
  7980. $1_FALSE='#'
  7981. else
  7982. $1_TRUE='#'
  7983. $1_FALSE=
  7984. fi
  7985. AC_CONFIG_COMMANDS_PRE(
  7986. [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
  7987. AC_MSG_ERROR([[conditional "$1" was never defined.
  7988. Usually this means the macro was only invoked conditionally.]])
  7989. fi])])
  7990. # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
  7991. # 2010, 2011 Free Software Foundation, Inc.
  7992. #
  7993. # This file is free software; the Free Software Foundation
  7994. # gives unlimited permission to copy and/or distribute it,
  7995. # with or without modifications, as long as this notice is preserved.
  7996. # serial 12
  7997. # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
  7998. # written in clear, in which case automake, when reading aclocal.m4,
  7999. # will think it sees a *use*, and therefore will trigger all it's
  8000. # C support machinery. Also note that it means that autoscan, seeing
  8001. # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
  8002. # _AM_DEPENDENCIES(NAME)
  8003. # ----------------------
  8004. # See how the compiler implements dependency checking.
  8005. # NAME is "CC", "CXX", "GCJ", or "OBJC".
  8006. # We try a few techniques and use that to set a single cache variable.
  8007. #
  8008. # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
  8009. # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
  8010. # dependency, and given that the user is not expected to run this macro,
  8011. # just rely on AC_PROG_CC.
  8012. AC_DEFUN([_AM_DEPENDENCIES],
  8013. [AC_REQUIRE([AM_SET_DEPDIR])dnl
  8014. AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
  8015. AC_REQUIRE([AM_MAKE_INCLUDE])dnl
  8016. AC_REQUIRE([AM_DEP_TRACK])dnl
  8017. ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
  8018. [$1], CXX, [depcc="$CXX" am_compiler_list=],
  8019. [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
  8020. [$1], UPC, [depcc="$UPC" am_compiler_list=],
  8021. [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
  8022. [depcc="$$1" am_compiler_list=])
  8023. AC_CACHE_CHECK([dependency style of $depcc],
  8024. [am_cv_$1_dependencies_compiler_type],
  8025. [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  8026. # We make a subdir and do the tests there. Otherwise we can end up
  8027. # making bogus files that we don't know about and never remove. For
  8028. # instance it was reported that on HP-UX the gcc test will end up
  8029. # making a dummy file named `D' -- because `-MD' means `put the output
  8030. # in D'.
  8031. rm -rf conftest.dir
  8032. mkdir conftest.dir
  8033. # Copy depcomp to subdir because otherwise we won't find it if we're
  8034. # using a relative directory.
  8035. cp "$am_depcomp" conftest.dir
  8036. cd conftest.dir
  8037. # We will build objects and dependencies in a subdirectory because
  8038. # it helps to detect inapplicable dependency modes. For instance
  8039. # both Tru64's cc and ICC support -MD to output dependencies as a
  8040. # side effect of compilation, but ICC will put the dependencies in
  8041. # the current directory while Tru64 will put them in the object
  8042. # directory.
  8043. mkdir sub
  8044. am_cv_$1_dependencies_compiler_type=none
  8045. if test "$am_compiler_list" = ""; then
  8046. am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
  8047. fi
  8048. am__universal=false
  8049. m4_case([$1], [CC],
  8050. [case " $depcc " in #(
  8051. *\ -arch\ *\ -arch\ *) am__universal=true ;;
  8052. esac],
  8053. [CXX],
  8054. [case " $depcc " in #(
  8055. *\ -arch\ *\ -arch\ *) am__universal=true ;;
  8056. esac])
  8057. for depmode in $am_compiler_list; do
  8058. # Setup a source with many dependencies, because some compilers
  8059. # like to wrap large dependency lists on column 80 (with \), and
  8060. # we should not choose a depcomp mode which is confused by this.
  8061. #
  8062. # We need to recreate these files for each test, as the compiler may
  8063. # overwrite some of them when testing with obscure command lines.
  8064. # This happens at least with the AIX C compiler.
  8065. : > sub/conftest.c
  8066. for i in 1 2 3 4 5 6; do
  8067. echo '#include "conftst'$i'.h"' >> sub/conftest.c
  8068. # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
  8069. # Solaris 8's {/usr,}/bin/sh.
  8070. touch sub/conftst$i.h
  8071. done
  8072. echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
  8073. # We check with `-c' and `-o' for the sake of the "dashmstdout"
  8074. # mode. It turns out that the SunPro C++ compiler does not properly
  8075. # handle `-M -o', and we need to detect this. Also, some Intel
  8076. # versions had trouble with output in subdirs
  8077. am__obj=sub/conftest.${OBJEXT-o}
  8078. am__minus_obj="-o $am__obj"
  8079. case $depmode in
  8080. gcc)
  8081. # This depmode causes a compiler race in universal mode.
  8082. test "$am__universal" = false || continue
  8083. ;;
  8084. nosideeffect)
  8085. # after this tag, mechanisms are not by side-effect, so they'll
  8086. # only be used when explicitly requested
  8087. if test "x$enable_dependency_tracking" = xyes; then
  8088. continue
  8089. else
  8090. break
  8091. fi
  8092. ;;
  8093. msvc7 | msvc7msys | msvisualcpp | msvcmsys)
  8094. # This compiler won't grok `-c -o', but also, the minuso test has
  8095. # not run yet. These depmodes are late enough in the game, and
  8096. # so weak that their functioning should not be impacted.
  8097. am__obj=conftest.${OBJEXT-o}
  8098. am__minus_obj=
  8099. ;;
  8100. none) break ;;
  8101. esac
  8102. if depmode=$depmode \
  8103. source=sub/conftest.c object=$am__obj \
  8104. depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
  8105. $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
  8106. >/dev/null 2>conftest.err &&
  8107. grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
  8108. grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
  8109. grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
  8110. ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
  8111. # icc doesn't choke on unknown options, it will just issue warnings
  8112. # or remarks (even with -Werror). So we grep stderr for any message
  8113. # that says an option was ignored or not supported.
  8114. # When given -MP, icc 7.0 and 7.1 complain thusly:
  8115. # icc: Command line warning: ignoring option '-M'; no argument required
  8116. # The diagnosis changed in icc 8.0:
  8117. # icc: Command line remark: option '-MP' not supported
  8118. if (grep 'ignoring option' conftest.err ||
  8119. grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
  8120. am_cv_$1_dependencies_compiler_type=$depmode
  8121. break
  8122. fi
  8123. fi
  8124. done
  8125. cd ..
  8126. rm -rf conftest.dir
  8127. else
  8128. am_cv_$1_dependencies_compiler_type=none
  8129. fi
  8130. ])
  8131. AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
  8132. AM_CONDITIONAL([am__fastdep$1], [
  8133. test "x$enable_dependency_tracking" != xno \
  8134. && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
  8135. ])
  8136. # AM_SET_DEPDIR
  8137. # -------------
  8138. # Choose a directory name for dependency files.
  8139. # This macro is AC_REQUIREd in _AM_DEPENDENCIES
  8140. AC_DEFUN([AM_SET_DEPDIR],
  8141. [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  8142. AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
  8143. ])
  8144. # AM_DEP_TRACK
  8145. # ------------
  8146. AC_DEFUN([AM_DEP_TRACK],
  8147. [AC_ARG_ENABLE(dependency-tracking,
  8148. [ --disable-dependency-tracking speeds up one-time build
  8149. --enable-dependency-tracking do not reject slow dependency extractors])
  8150. if test "x$enable_dependency_tracking" != xno; then
  8151. am_depcomp="$ac_aux_dir/depcomp"
  8152. AMDEPBACKSLASH='\'
  8153. am__nodep='_no'
  8154. fi
  8155. AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
  8156. AC_SUBST([AMDEPBACKSLASH])dnl
  8157. _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
  8158. AC_SUBST([am__nodep])dnl
  8159. _AM_SUBST_NOTMAKE([am__nodep])dnl
  8160. ])
  8161. # Generate code to set up dependency tracking. -*- Autoconf -*-
  8162. # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
  8163. # Free Software Foundation, Inc.
  8164. #
  8165. # This file is free software; the Free Software Foundation
  8166. # gives unlimited permission to copy and/or distribute it,
  8167. # with or without modifications, as long as this notice is preserved.
  8168. #serial 5
  8169. # _AM_OUTPUT_DEPENDENCY_COMMANDS
  8170. # ------------------------------
  8171. AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
  8172. [{
  8173. # Autoconf 2.62 quotes --file arguments for eval, but not when files
  8174. # are listed without --file. Let's play safe and only enable the eval
  8175. # if we detect the quoting.
  8176. case $CONFIG_FILES in
  8177. *\'*) eval set x "$CONFIG_FILES" ;;
  8178. *) set x $CONFIG_FILES ;;
  8179. esac
  8180. shift
  8181. for mf
  8182. do
  8183. # Strip MF so we end up with the name of the file.
  8184. mf=`echo "$mf" | sed -e 's/:.*$//'`
  8185. # Check whether this is an Automake generated Makefile or not.
  8186. # We used to match only the files named `Makefile.in', but
  8187. # some people rename them; so instead we look at the file content.
  8188. # Grep'ing the first line is not enough: some people post-process
  8189. # each Makefile.in and add a new line on top of each file to say so.
  8190. # Grep'ing the whole file is not good either: AIX grep has a line
  8191. # limit of 2048, but all sed's we know have understand at least 4000.
  8192. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
  8193. dirpart=`AS_DIRNAME("$mf")`
  8194. else
  8195. continue
  8196. fi
  8197. # Extract the definition of DEPDIR, am__include, and am__quote
  8198. # from the Makefile without running `make'.
  8199. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
  8200. test -z "$DEPDIR" && continue
  8201. am__include=`sed -n 's/^am__include = //p' < "$mf"`
  8202. test -z "am__include" && continue
  8203. am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
  8204. # When using ansi2knr, U may be empty or an underscore; expand it
  8205. U=`sed -n 's/^U = //p' < "$mf"`
  8206. # Find all dependency output files, they are included files with
  8207. # $(DEPDIR) in their names. We invoke sed twice because it is the
  8208. # simplest approach to changing $(DEPDIR) to its actual value in the
  8209. # expansion.
  8210. for file in `sed -n "
  8211. s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
  8212. sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
  8213. # Make sure the directory exists.
  8214. test -f "$dirpart/$file" && continue
  8215. fdir=`AS_DIRNAME(["$file"])`
  8216. AS_MKDIR_P([$dirpart/$fdir])
  8217. # echo "creating $dirpart/$file"
  8218. echo '# dummy' > "$dirpart/$file"
  8219. done
  8220. done
  8221. }
  8222. ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
  8223. # AM_OUTPUT_DEPENDENCY_COMMANDS
  8224. # -----------------------------
  8225. # This macro should only be invoked once -- use via AC_REQUIRE.
  8226. #
  8227. # This code is only required when automatic dependency tracking
  8228. # is enabled. FIXME. This creates each `.P' file that we will
  8229. # need in order to bootstrap the dependency handling code.
  8230. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
  8231. [AC_CONFIG_COMMANDS([depfiles],
  8232. [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
  8233. [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
  8234. ])
  8235. # Do all the work for Automake. -*- Autoconf -*-
  8236. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
  8237. # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
  8238. #
  8239. # This file is free software; the Free Software Foundation
  8240. # gives unlimited permission to copy and/or distribute it,
  8241. # with or without modifications, as long as this notice is preserved.
  8242. # serial 16
  8243. # This macro actually does too much. Some checks are only needed if
  8244. # your package does certain things. But this isn't really a big deal.
  8245. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
  8246. # AM_INIT_AUTOMAKE([OPTIONS])
  8247. # -----------------------------------------------
  8248. # The call with PACKAGE and VERSION arguments is the old style
  8249. # call (pre autoconf-2.50), which is being phased out. PACKAGE
  8250. # and VERSION should now be passed to AC_INIT and removed from
  8251. # the call to AM_INIT_AUTOMAKE.
  8252. # We support both call styles for the transition. After
  8253. # the next Automake release, Autoconf can make the AC_INIT
  8254. # arguments mandatory, and then we can depend on a new Autoconf
  8255. # release and drop the old call support.
  8256. AC_DEFUN([AM_INIT_AUTOMAKE],
  8257. [AC_PREREQ([2.62])dnl
  8258. dnl Autoconf wants to disallow AM_ names. We explicitly allow
  8259. dnl the ones we care about.
  8260. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
  8261. AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
  8262. AC_REQUIRE([AC_PROG_INSTALL])dnl
  8263. if test "`cd $srcdir && pwd`" != "`pwd`"; then
  8264. # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
  8265. # is not polluted with repeated "-I."
  8266. AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
  8267. # test to see if srcdir already configured
  8268. if test -f $srcdir/config.status; then
  8269. AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  8270. fi
  8271. fi
  8272. # test whether we have cygpath
  8273. if test -z "$CYGPATH_W"; then
  8274. if (cygpath --version) >/dev/null 2>/dev/null; then
  8275. CYGPATH_W='cygpath -w'
  8276. else
  8277. CYGPATH_W=echo
  8278. fi
  8279. fi
  8280. AC_SUBST([CYGPATH_W])
  8281. # Define the identity of the package.
  8282. dnl Distinguish between old-style and new-style calls.
  8283. m4_ifval([$2],
  8284. [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  8285. AC_SUBST([PACKAGE], [$1])dnl
  8286. AC_SUBST([VERSION], [$2])],
  8287. [_AM_SET_OPTIONS([$1])dnl
  8288. dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
  8289. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
  8290. [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
  8291. AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  8292. AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
  8293. _AM_IF_OPTION([no-define],,
  8294. [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
  8295. AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
  8296. # Some tools Automake needs.
  8297. AC_REQUIRE([AM_SANITY_CHECK])dnl
  8298. AC_REQUIRE([AC_ARG_PROGRAM])dnl
  8299. AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
  8300. AM_MISSING_PROG(AUTOCONF, autoconf)
  8301. AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
  8302. AM_MISSING_PROG(AUTOHEADER, autoheader)
  8303. AM_MISSING_PROG(MAKEINFO, makeinfo)
  8304. AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  8305. AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
  8306. AC_REQUIRE([AM_PROG_MKDIR_P])dnl
  8307. # We need awk for the "check" target. The system "awk" is bad on
  8308. # some platforms.
  8309. AC_REQUIRE([AC_PROG_AWK])dnl
  8310. AC_REQUIRE([AC_PROG_MAKE_SET])dnl
  8311. AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  8312. _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
  8313. [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
  8314. [_AM_PROG_TAR([v7])])])
  8315. _AM_IF_OPTION([no-dependencies],,
  8316. [AC_PROVIDE_IFELSE([AC_PROG_CC],
  8317. [_AM_DEPENDENCIES(CC)],
  8318. [define([AC_PROG_CC],
  8319. defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
  8320. AC_PROVIDE_IFELSE([AC_PROG_CXX],
  8321. [_AM_DEPENDENCIES(CXX)],
  8322. [define([AC_PROG_CXX],
  8323. defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
  8324. AC_PROVIDE_IFELSE([AC_PROG_OBJC],
  8325. [_AM_DEPENDENCIES(OBJC)],
  8326. [define([AC_PROG_OBJC],
  8327. defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
  8328. ])
  8329. _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
  8330. dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
  8331. dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
  8332. dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
  8333. AC_CONFIG_COMMANDS_PRE(dnl
  8334. [m4_provide_if([_AM_COMPILER_EXEEXT],
  8335. [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
  8336. ])
  8337. dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
  8338. dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
  8339. dnl mangled by Autoconf and run in a shell conditional statement.
  8340. m4_define([_AC_COMPILER_EXEEXT],
  8341. m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
  8342. # When config.status generates a header, we must update the stamp-h file.
  8343. # This file resides in the same directory as the config header
  8344. # that is generated. The stamp files are numbered to have different names.
  8345. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
  8346. # loop where config.status creates the headers, so we can generate
  8347. # our stamp files there.
  8348. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
  8349. [# Compute $1's index in $config_headers.
  8350. _am_arg=$1
  8351. _am_stamp_count=1
  8352. for _am_header in $config_headers :; do
  8353. case $_am_header in
  8354. $_am_arg | $_am_arg:* )
  8355. break ;;
  8356. * )
  8357. _am_stamp_count=`expr $_am_stamp_count + 1` ;;
  8358. esac
  8359. done
  8360. echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
  8361. # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
  8362. # Inc.
  8363. #
  8364. # This file is free software; the Free Software Foundation
  8365. # gives unlimited permission to copy and/or distribute it,
  8366. # with or without modifications, as long as this notice is preserved.
  8367. # serial 1
  8368. # AM_PROG_INSTALL_SH
  8369. # ------------------
  8370. # Define $install_sh.
  8371. AC_DEFUN([AM_PROG_INSTALL_SH],
  8372. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  8373. if test x"${install_sh}" != xset; then
  8374. case $am_aux_dir in
  8375. *\ * | *\ *)
  8376. install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
  8377. *)
  8378. install_sh="\${SHELL} $am_aux_dir/install-sh"
  8379. esac
  8380. fi
  8381. AC_SUBST(install_sh)])
  8382. # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
  8383. #
  8384. # This file is free software; the Free Software Foundation
  8385. # gives unlimited permission to copy and/or distribute it,
  8386. # with or without modifications, as long as this notice is preserved.
  8387. # serial 2
  8388. # Check whether the underlying file-system supports filenames
  8389. # with a leading dot. For instance MS-DOS doesn't.
  8390. AC_DEFUN([AM_SET_LEADING_DOT],
  8391. [rm -rf .tst 2>/dev/null
  8392. mkdir .tst 2>/dev/null
  8393. if test -d .tst; then
  8394. am__leading_dot=.
  8395. else
  8396. am__leading_dot=_
  8397. fi
  8398. rmdir .tst 2>/dev/null
  8399. AC_SUBST([am__leading_dot])])
  8400. # Check to see how 'make' treats includes. -*- Autoconf -*-
  8401. # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
  8402. #
  8403. # This file is free software; the Free Software Foundation
  8404. # gives unlimited permission to copy and/or distribute it,
  8405. # with or without modifications, as long as this notice is preserved.
  8406. # serial 4
  8407. # AM_MAKE_INCLUDE()
  8408. # -----------------
  8409. # Check to see how make treats includes.
  8410. AC_DEFUN([AM_MAKE_INCLUDE],
  8411. [am_make=${MAKE-make}
  8412. cat > confinc << 'END'
  8413. am__doit:
  8414. @echo this is the am__doit target
  8415. .PHONY: am__doit
  8416. END
  8417. # If we don't find an include directive, just comment out the code.
  8418. AC_MSG_CHECKING([for style of include used by $am_make])
  8419. am__include="#"
  8420. am__quote=
  8421. _am_result=none
  8422. # First try GNU make style include.
  8423. echo "include confinc" > confmf
  8424. # Ignore all kinds of additional output from `make'.
  8425. case `$am_make -s -f confmf 2> /dev/null` in #(
  8426. *the\ am__doit\ target*)
  8427. am__include=include
  8428. am__quote=
  8429. _am_result=GNU
  8430. ;;
  8431. esac
  8432. # Now try BSD make style include.
  8433. if test "$am__include" = "#"; then
  8434. echo '.include "confinc"' > confmf
  8435. case `$am_make -s -f confmf 2> /dev/null` in #(
  8436. *the\ am__doit\ target*)
  8437. am__include=.include
  8438. am__quote="\""
  8439. _am_result=BSD
  8440. ;;
  8441. esac
  8442. fi
  8443. AC_SUBST([am__include])
  8444. AC_SUBST([am__quote])
  8445. AC_MSG_RESULT([$_am_result])
  8446. rm -f confinc confmf
  8447. ])
  8448. # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
  8449. # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
  8450. # Free Software Foundation, Inc.
  8451. #
  8452. # This file is free software; the Free Software Foundation
  8453. # gives unlimited permission to copy and/or distribute it,
  8454. # with or without modifications, as long as this notice is preserved.
  8455. # serial 6
  8456. # AM_MISSING_PROG(NAME, PROGRAM)
  8457. # ------------------------------
  8458. AC_DEFUN([AM_MISSING_PROG],
  8459. [AC_REQUIRE([AM_MISSING_HAS_RUN])
  8460. $1=${$1-"${am_missing_run}$2"}
  8461. AC_SUBST($1)])
  8462. # AM_MISSING_HAS_RUN
  8463. # ------------------
  8464. # Define MISSING if not defined so far and test if it supports --run.
  8465. # If it does, set am_missing_run to use it, otherwise, to nothing.
  8466. AC_DEFUN([AM_MISSING_HAS_RUN],
  8467. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  8468. AC_REQUIRE_AUX_FILE([missing])dnl
  8469. if test x"${MISSING+set}" != xset; then
  8470. case $am_aux_dir in
  8471. *\ * | *\ *)
  8472. MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
  8473. *)
  8474. MISSING="\${SHELL} $am_aux_dir/missing" ;;
  8475. esac
  8476. fi
  8477. # Use eval to expand $SHELL
  8478. if eval "$MISSING --run true"; then
  8479. am_missing_run="$MISSING --run "
  8480. else
  8481. am_missing_run=
  8482. AC_MSG_WARN([`missing' script is too old or missing])
  8483. fi
  8484. ])
  8485. # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
  8486. # Inc.
  8487. #
  8488. # This file is free software; the Free Software Foundation
  8489. # gives unlimited permission to copy and/or distribute it,
  8490. # with or without modifications, as long as this notice is preserved.
  8491. # serial 1
  8492. # AM_PROG_MKDIR_P
  8493. # ---------------
  8494. # Check for `mkdir -p'.
  8495. AC_DEFUN([AM_PROG_MKDIR_P],
  8496. [AC_PREREQ([2.60])dnl
  8497. AC_REQUIRE([AC_PROG_MKDIR_P])dnl
  8498. dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
  8499. dnl while keeping a definition of mkdir_p for backward compatibility.
  8500. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
  8501. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
  8502. dnl Makefile.ins that do not define MKDIR_P, so we do our own
  8503. dnl adjustment using top_builddir (which is defined more often than
  8504. dnl MKDIR_P).
  8505. AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
  8506. case $mkdir_p in
  8507. [[\\/$]]* | ?:[[\\/]]*) ;;
  8508. */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
  8509. esac
  8510. ])
  8511. # Helper functions for option handling. -*- Autoconf -*-
  8512. # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
  8513. # Foundation, Inc.
  8514. #
  8515. # This file is free software; the Free Software Foundation
  8516. # gives unlimited permission to copy and/or distribute it,
  8517. # with or without modifications, as long as this notice is preserved.
  8518. # serial 5
  8519. # _AM_MANGLE_OPTION(NAME)
  8520. # -----------------------
  8521. AC_DEFUN([_AM_MANGLE_OPTION],
  8522. [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
  8523. # _AM_SET_OPTION(NAME)
  8524. # --------------------
  8525. # Set option NAME. Presently that only means defining a flag for this option.
  8526. AC_DEFUN([_AM_SET_OPTION],
  8527. [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
  8528. # _AM_SET_OPTIONS(OPTIONS)
  8529. # ------------------------
  8530. # OPTIONS is a space-separated list of Automake options.
  8531. AC_DEFUN([_AM_SET_OPTIONS],
  8532. [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
  8533. # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
  8534. # -------------------------------------------
  8535. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  8536. AC_DEFUN([_AM_IF_OPTION],
  8537. [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
  8538. # Check to make sure that the build environment is sane. -*- Autoconf -*-
  8539. # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
  8540. # Free Software Foundation, Inc.
  8541. #
  8542. # This file is free software; the Free Software Foundation
  8543. # gives unlimited permission to copy and/or distribute it,
  8544. # with or without modifications, as long as this notice is preserved.
  8545. # serial 5
  8546. # AM_SANITY_CHECK
  8547. # ---------------
  8548. AC_DEFUN([AM_SANITY_CHECK],
  8549. [AC_MSG_CHECKING([whether build environment is sane])
  8550. # Just in case
  8551. sleep 1
  8552. echo timestamp > conftest.file
  8553. # Reject unsafe characters in $srcdir or the absolute working directory
  8554. # name. Accept space and tab only in the latter.
  8555. am_lf='
  8556. '
  8557. case `pwd` in
  8558. *[[\\\"\#\$\&\'\`$am_lf]]*)
  8559. AC_MSG_ERROR([unsafe absolute working directory name]);;
  8560. esac
  8561. case $srcdir in
  8562. *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
  8563. AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
  8564. esac
  8565. # Do `set' in a subshell so we don't clobber the current shell's
  8566. # arguments. Must try -L first in case configure is actually a
  8567. # symlink; some systems play weird games with the mod time of symlinks
  8568. # (eg FreeBSD returns the mod time of the symlink's containing
  8569. # directory).
  8570. if (
  8571. set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
  8572. if test "$[*]" = "X"; then
  8573. # -L didn't work.
  8574. set X `ls -t "$srcdir/configure" conftest.file`
  8575. fi
  8576. rm -f conftest.file
  8577. if test "$[*]" != "X $srcdir/configure conftest.file" \
  8578. && test "$[*]" != "X conftest.file $srcdir/configure"; then
  8579. # If neither matched, then we have a broken ls. This can happen
  8580. # if, for instance, CONFIG_SHELL is bash and it inherits a
  8581. # broken ls alias from the environment. This has actually
  8582. # happened. Such a system could not be considered "sane".
  8583. AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
  8584. alias in your environment])
  8585. fi
  8586. test "$[2]" = conftest.file
  8587. )
  8588. then
  8589. # Ok.
  8590. :
  8591. else
  8592. AC_MSG_ERROR([newly created file is older than distributed files!
  8593. Check your system clock])
  8594. fi
  8595. AC_MSG_RESULT(yes)])
  8596. # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
  8597. #
  8598. # This file is free software; the Free Software Foundation
  8599. # gives unlimited permission to copy and/or distribute it,
  8600. # with or without modifications, as long as this notice is preserved.
  8601. # serial 1
  8602. # AM_PROG_INSTALL_STRIP
  8603. # ---------------------
  8604. # One issue with vendor `install' (even GNU) is that you can't
  8605. # specify the program used to strip binaries. This is especially
  8606. # annoying in cross-compiling environments, where the build's strip
  8607. # is unlikely to handle the host's binaries.
  8608. # Fortunately install-sh will honor a STRIPPROG variable, so we
  8609. # always use install-sh in `make install-strip', and initialize
  8610. # STRIPPROG with the value of the STRIP variable (set by the user).
  8611. AC_DEFUN([AM_PROG_INSTALL_STRIP],
  8612. [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  8613. # Installed binaries are usually stripped using `strip' when the user
  8614. # run `make install-strip'. However `strip' might not be the right
  8615. # tool to use in cross-compilation environments, therefore Automake
  8616. # will honor the `STRIP' environment variable to overrule this program.
  8617. dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
  8618. if test "$cross_compiling" != no; then
  8619. AC_CHECK_TOOL([STRIP], [strip], :)
  8620. fi
  8621. INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
  8622. AC_SUBST([INSTALL_STRIP_PROGRAM])])
  8623. # Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
  8624. #
  8625. # This file is free software; the Free Software Foundation
  8626. # gives unlimited permission to copy and/or distribute it,
  8627. # with or without modifications, as long as this notice is preserved.
  8628. # serial 3
  8629. # _AM_SUBST_NOTMAKE(VARIABLE)
  8630. # ---------------------------
  8631. # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
  8632. # This macro is traced by Automake.
  8633. AC_DEFUN([_AM_SUBST_NOTMAKE])
  8634. # AM_SUBST_NOTMAKE(VARIABLE)
  8635. # --------------------------
  8636. # Public sister of _AM_SUBST_NOTMAKE.
  8637. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
  8638. # Check how to create a tarball. -*- Autoconf -*-
  8639. # Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
  8640. #
  8641. # This file is free software; the Free Software Foundation
  8642. # gives unlimited permission to copy and/or distribute it,
  8643. # with or without modifications, as long as this notice is preserved.
  8644. # serial 2
  8645. # _AM_PROG_TAR(FORMAT)
  8646. # --------------------
  8647. # Check how to create a tarball in format FORMAT.
  8648. # FORMAT should be one of `v7', `ustar', or `pax'.
  8649. #
  8650. # Substitute a variable $(am__tar) that is a command
  8651. # writing to stdout a FORMAT-tarball containing the directory
  8652. # $tardir.
  8653. # tardir=directory && $(am__tar) > result.tar
  8654. #
  8655. # Substitute a variable $(am__untar) that extract such
  8656. # a tarball read from stdin.
  8657. # $(am__untar) < result.tar
  8658. AC_DEFUN([_AM_PROG_TAR],
  8659. [# Always define AMTAR for backward compatibility. Yes, it's still used
  8660. # in the wild :-( We should find a proper way to deprecate it ...
  8661. AC_SUBST([AMTAR], ['$${TAR-tar}'])
  8662. m4_if([$1], [v7],
  8663. [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
  8664. [m4_case([$1], [ustar],, [pax],,
  8665. [m4_fatal([Unknown tar format])])
  8666. AC_MSG_CHECKING([how to create a $1 tar archive])
  8667. # Loop over all known methods to create a tar archive until one works.
  8668. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
  8669. _am_tools=${am_cv_prog_tar_$1-$_am_tools}
  8670. # Do not fold the above two line into one, because Tru64 sh and
  8671. # Solaris sh will not grok spaces in the rhs of `-'.
  8672. for _am_tool in $_am_tools
  8673. do
  8674. case $_am_tool in
  8675. gnutar)
  8676. for _am_tar in tar gnutar gtar;
  8677. do
  8678. AM_RUN_LOG([$_am_tar --version]) && break
  8679. done
  8680. am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
  8681. am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
  8682. am__untar="$_am_tar -xf -"
  8683. ;;
  8684. plaintar)
  8685. # Must skip GNU tar: if it does not support --format= it doesn't create
  8686. # ustar tarball either.
  8687. (tar --version) >/dev/null 2>&1 && continue
  8688. am__tar='tar chf - "$$tardir"'
  8689. am__tar_='tar chf - "$tardir"'
  8690. am__untar='tar xf -'
  8691. ;;
  8692. pax)
  8693. am__tar='pax -L -x $1 -w "$$tardir"'
  8694. am__tar_='pax -L -x $1 -w "$tardir"'
  8695. am__untar='pax -r'
  8696. ;;
  8697. cpio)
  8698. am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
  8699. am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
  8700. am__untar='cpio -i -H $1 -d'
  8701. ;;
  8702. none)
  8703. am__tar=false
  8704. am__tar_=false
  8705. am__untar=false
  8706. ;;
  8707. esac
  8708. # If the value was cached, stop now. We just wanted to have am__tar
  8709. # and am__untar set.
  8710. test -n "${am_cv_prog_tar_$1}" && break
  8711. # tar/untar a dummy directory, and stop if the command works
  8712. rm -rf conftest.dir
  8713. mkdir conftest.dir
  8714. echo GrepMe > conftest.dir/file
  8715. AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
  8716. rm -rf conftest.dir
  8717. if test -s conftest.tar; then
  8718. AM_RUN_LOG([$am__untar <conftest.tar])
  8719. grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
  8720. fi
  8721. done
  8722. rm -rf conftest.dir
  8723. AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
  8724. AC_MSG_RESULT([$am_cv_prog_tar_$1])])
  8725. AC_SUBST([am__tar])
  8726. AC_SUBST([am__untar])
  8727. ]) # _AM_PROG_TAR