aclocal.m4 245 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023
  1. # generated automatically by aclocal 1.10 -*- Autoconf -*-
  2. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
  3. # 2005, 2006 Free Software Foundation, Inc.
  4. # This file is free software; the Free Software Foundation
  5. # gives unlimited permission to copy and/or distribute it,
  6. # with or without modifications, as long as this notice is preserved.
  7. # This program is distributed in the hope that it will be useful,
  8. # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  9. # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  10. # PARTICULAR PURPOSE.
  11. m4_if(m4_PACKAGE_VERSION, [2.61],,
  12. [m4_fatal([this file was generated for autoconf 2.61.
  13. You have another version of autoconf. If you want to use that,
  14. you should regenerate the build system entirely.], [63])])
  15. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
  16. # serial 47 AC_PROG_LIBTOOL
  17. # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
  18. # -----------------------------------------------------------
  19. # If this macro is not defined by Autoconf, define it here.
  20. m4_ifdef([AC_PROVIDE_IFELSE],
  21. [],
  22. [m4_define([AC_PROVIDE_IFELSE],
  23. [m4_ifdef([AC_PROVIDE_$1],
  24. [$2], [$3])])])
  25. # AC_PROG_LIBTOOL
  26. # ---------------
  27. AC_DEFUN([AC_PROG_LIBTOOL],
  28. [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
  29. dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
  30. dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
  31. AC_PROVIDE_IFELSE([AC_PROG_CXX],
  32. [AC_LIBTOOL_CXX],
  33. [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
  34. ])])
  35. dnl And a similar setup for Fortran 77 support
  36. AC_PROVIDE_IFELSE([AC_PROG_F77],
  37. [AC_LIBTOOL_F77],
  38. [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
  39. ])])
  40. dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
  41. dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
  42. dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
  43. AC_PROVIDE_IFELSE([AC_PROG_GCJ],
  44. [AC_LIBTOOL_GCJ],
  45. [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
  46. [AC_LIBTOOL_GCJ],
  47. [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
  48. [AC_LIBTOOL_GCJ],
  49. [ifdef([AC_PROG_GCJ],
  50. [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
  51. ifdef([A][M_PROG_GCJ],
  52. [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
  53. ifdef([LT_AC_PROG_GCJ],
  54. [define([LT_AC_PROG_GCJ],
  55. defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
  56. ])])# AC_PROG_LIBTOOL
  57. # _AC_PROG_LIBTOOL
  58. # ----------------
  59. AC_DEFUN([_AC_PROG_LIBTOOL],
  60. [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
  61. AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
  62. AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
  63. AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
  64. # This can be used to rebuild libtool when needed
  65. LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
  66. # Always use our own libtool.
  67. LIBTOOL='$(SHELL) $(top_builddir)/libtool'
  68. AC_SUBST(LIBTOOL)dnl
  69. # Prevent multiple expansion
  70. define([AC_PROG_LIBTOOL], [])
  71. ])# _AC_PROG_LIBTOOL
  72. # AC_LIBTOOL_SETUP
  73. # ----------------
  74. AC_DEFUN([AC_LIBTOOL_SETUP],
  75. [AC_PREREQ(2.50)dnl
  76. AC_REQUIRE([AC_ENABLE_SHARED])dnl
  77. AC_REQUIRE([AC_ENABLE_STATIC])dnl
  78. AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
  79. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  80. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  81. AC_REQUIRE([AC_PROG_CC])dnl
  82. AC_REQUIRE([AC_PROG_LD])dnl
  83. AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
  84. AC_REQUIRE([AC_PROG_NM])dnl
  85. AC_REQUIRE([AC_PROG_LN_S])dnl
  86. AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
  87. # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
  88. AC_REQUIRE([AC_OBJEXT])dnl
  89. AC_REQUIRE([AC_EXEEXT])dnl
  90. dnl
  91. AC_LIBTOOL_SYS_MAX_CMD_LEN
  92. AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
  93. AC_LIBTOOL_OBJDIR
  94. AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
  95. _LT_AC_PROG_ECHO_BACKSLASH
  96. case $host_os in
  97. aix3*)
  98. # AIX sometimes has problems with the GCC collect2 program. For some
  99. # reason, if we set the COLLECT_NAMES environment variable, the problems
  100. # vanish in a puff of smoke.
  101. if test "X${COLLECT_NAMES+set}" != Xset; then
  102. COLLECT_NAMES=
  103. export COLLECT_NAMES
  104. fi
  105. ;;
  106. esac
  107. # Sed substitution that helps us do robust quoting. It backslashifies
  108. # metacharacters that are still active within double-quoted strings.
  109. Xsed='sed -e 1s/^X//'
  110. [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
  111. # Same as above, but do not quote variable references.
  112. [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
  113. # Sed substitution to delay expansion of an escaped shell variable in a
  114. # double_quote_subst'ed string.
  115. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
  116. # Sed substitution to avoid accidental globbing in evaled expressions
  117. no_glob_subst='s/\*/\\\*/g'
  118. # Constants:
  119. rm="rm -f"
  120. # Global variables:
  121. default_ofile=libtool
  122. can_build_shared=yes
  123. # All known linkers require a `.a' archive for static linking (except M$VC,
  124. # which needs '.lib').
  125. libext=a
  126. ltmain="$ac_aux_dir/ltmain.sh"
  127. ofile="$default_ofile"
  128. with_gnu_ld="$lt_cv_prog_gnu_ld"
  129. AC_CHECK_TOOL(AR, ar, false)
  130. AC_CHECK_TOOL(RANLIB, ranlib, :)
  131. AC_CHECK_TOOL(STRIP, strip, :)
  132. old_CC="$CC"
  133. old_CFLAGS="$CFLAGS"
  134. # Set sane defaults for various variables
  135. test -z "$AR" && AR=ar
  136. test -z "$AR_FLAGS" && AR_FLAGS=cru
  137. test -z "$AS" && AS=as
  138. test -z "$CC" && CC=cc
  139. test -z "$LTCC" && LTCC=$CC
  140. test -z "$DLLTOOL" && DLLTOOL=dlltool
  141. test -z "$LD" && LD=ld
  142. test -z "$LN_S" && LN_S="ln -s"
  143. test -z "$MAGIC_CMD" && MAGIC_CMD=file
  144. test -z "$NM" && NM=nm
  145. test -z "$SED" && SED=sed
  146. test -z "$OBJDUMP" && OBJDUMP=objdump
  147. test -z "$RANLIB" && RANLIB=:
  148. test -z "$STRIP" && STRIP=:
  149. test -z "$ac_objext" && ac_objext=o
  150. # Determine commands to create old-style static archives.
  151. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
  152. old_postinstall_cmds='chmod 644 $oldlib'
  153. old_postuninstall_cmds=
  154. if test -n "$RANLIB"; then
  155. case $host_os in
  156. openbsd*)
  157. old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
  158. ;;
  159. *)
  160. old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
  161. ;;
  162. esac
  163. old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
  164. fi
  165. _LT_CC_BASENAME([$compiler])
  166. # Only perform the check for file, if the check method requires it
  167. case $deplibs_check_method in
  168. file_magic*)
  169. if test "$file_magic_cmd" = '$MAGIC_CMD'; then
  170. AC_PATH_MAGIC
  171. fi
  172. ;;
  173. esac
  174. AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
  175. AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
  176. enable_win32_dll=yes, enable_win32_dll=no)
  177. AC_ARG_ENABLE([libtool-lock],
  178. [AC_HELP_STRING([--disable-libtool-lock],
  179. [avoid locking (might break parallel builds)])])
  180. test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  181. AC_ARG_WITH([pic],
  182. [AC_HELP_STRING([--with-pic],
  183. [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
  184. [pic_mode="$withval"],
  185. [pic_mode=default])
  186. test -z "$pic_mode" && pic_mode=default
  187. # Use C for the default configuration in the libtool script
  188. tagname=
  189. AC_LIBTOOL_LANG_C_CONFIG
  190. _LT_AC_TAGCONFIG
  191. ])# AC_LIBTOOL_SETUP
  192. # _LT_AC_SYS_COMPILER
  193. # -------------------
  194. AC_DEFUN([_LT_AC_SYS_COMPILER],
  195. [AC_REQUIRE([AC_PROG_CC])dnl
  196. # If no C compiler was specified, use CC.
  197. LTCC=${LTCC-"$CC"}
  198. # Allow CC to be a program name with arguments.
  199. compiler=$CC
  200. ])# _LT_AC_SYS_COMPILER
  201. # _LT_CC_BASENAME(CC)
  202. # -------------------
  203. # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
  204. AC_DEFUN([_LT_CC_BASENAME],
  205. [for cc_temp in $1""; do
  206. case $cc_temp in
  207. compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
  208. distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
  209. \-*) ;;
  210. *) break;;
  211. esac
  212. done
  213. cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
  214. ])
  215. # _LT_COMPILER_BOILERPLATE
  216. # ------------------------
  217. # Check for compiler boilerplate output or warnings with
  218. # the simple compiler test code.
  219. AC_DEFUN([_LT_COMPILER_BOILERPLATE],
  220. [ac_outfile=conftest.$ac_objext
  221. printf "$lt_simple_compile_test_code" >conftest.$ac_ext
  222. eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
  223. _lt_compiler_boilerplate=`cat conftest.err`
  224. $rm conftest*
  225. ])# _LT_COMPILER_BOILERPLATE
  226. # _LT_LINKER_BOILERPLATE
  227. # ----------------------
  228. # Check for linker boilerplate output or warnings with
  229. # the simple link test code.
  230. AC_DEFUN([_LT_LINKER_BOILERPLATE],
  231. [ac_outfile=conftest.$ac_objext
  232. printf "$lt_simple_link_test_code" >conftest.$ac_ext
  233. eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
  234. _lt_linker_boilerplate=`cat conftest.err`
  235. $rm conftest*
  236. ])# _LT_LINKER_BOILERPLATE
  237. # _LT_AC_SYS_LIBPATH_AIX
  238. # ----------------------
  239. # Links a minimal program and checks the executable
  240. # for the system default hardcoded library path. In most cases,
  241. # this is /usr/lib:/lib, but when the MPI compilers are used
  242. # the location of the communication and MPI libs are included too.
  243. # If we don't find anything, use the default library path according
  244. # to the aix ld manual.
  245. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
  246. [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
  247. aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
  248. }'`
  249. # Check for a 64-bit object if we didn't find anything.
  250. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
  251. }'`; fi],[])
  252. if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  253. ])# _LT_AC_SYS_LIBPATH_AIX
  254. # _LT_AC_SHELL_INIT(ARG)
  255. # ----------------------
  256. AC_DEFUN([_LT_AC_SHELL_INIT],
  257. [ifdef([AC_DIVERSION_NOTICE],
  258. [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
  259. [AC_DIVERT_PUSH(NOTICE)])
  260. $1
  261. AC_DIVERT_POP
  262. ])# _LT_AC_SHELL_INIT
  263. # _LT_AC_PROG_ECHO_BACKSLASH
  264. # --------------------------
  265. # Add some code to the start of the generated configure script which
  266. # will find an echo command which doesn't interpret backslashes.
  267. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
  268. [_LT_AC_SHELL_INIT([
  269. # Check that we are running under the correct shell.
  270. SHELL=${CONFIG_SHELL-/bin/sh}
  271. case X$ECHO in
  272. X*--fallback-echo)
  273. # Remove one level of quotation (which was required for Make).
  274. ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
  275. ;;
  276. esac
  277. echo=${ECHO-echo}
  278. if test "X[$]1" = X--no-reexec; then
  279. # Discard the --no-reexec flag, and continue.
  280. shift
  281. elif test "X[$]1" = X--fallback-echo; then
  282. # Avoid inline document here, it may be left over
  283. :
  284. elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
  285. # Yippee, $echo works!
  286. :
  287. else
  288. # Restart under the correct shell.
  289. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
  290. fi
  291. if test "X[$]1" = X--fallback-echo; then
  292. # used as fallback echo
  293. shift
  294. cat <<EOF
  295. [$]*
  296. EOF
  297. exit 0
  298. fi
  299. # The HP-UX ksh and POSIX shell print the target directory to stdout
  300. # if CDPATH is set.
  301. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  302. if test -z "$ECHO"; then
  303. if test "X${echo_test_string+set}" != Xset; then
  304. # find a string as large as possible, as long as the shell can cope with it
  305. for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
  306. # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
  307. if (echo_test_string="`eval $cmd`") 2>/dev/null &&
  308. echo_test_string="`eval $cmd`" &&
  309. (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
  310. then
  311. break
  312. fi
  313. done
  314. fi
  315. if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
  316. echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
  317. test "X$echo_testing_string" = "X$echo_test_string"; then
  318. :
  319. else
  320. # The Solaris, AIX, and Digital Unix default echo programs unquote
  321. # backslashes. This makes it impossible to quote backslashes using
  322. # echo "$something" | sed 's/\\/\\\\/g'
  323. #
  324. # So, first we look for a working echo in the user's PATH.
  325. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  326. for dir in $PATH /usr/ucb; do
  327. IFS="$lt_save_ifs"
  328. if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
  329. test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
  330. echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
  331. test "X$echo_testing_string" = "X$echo_test_string"; then
  332. echo="$dir/echo"
  333. break
  334. fi
  335. done
  336. IFS="$lt_save_ifs"
  337. if test "X$echo" = Xecho; then
  338. # We didn't find a better echo, so look for alternatives.
  339. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
  340. echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
  341. test "X$echo_testing_string" = "X$echo_test_string"; then
  342. # This shell has a builtin print -r that does the trick.
  343. echo='print -r'
  344. elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
  345. test "X$CONFIG_SHELL" != X/bin/ksh; then
  346. # If we have ksh, try running configure again with it.
  347. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
  348. export ORIGINAL_CONFIG_SHELL
  349. CONFIG_SHELL=/bin/ksh
  350. export CONFIG_SHELL
  351. exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
  352. else
  353. # Try using printf.
  354. echo='printf %s\n'
  355. if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
  356. echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
  357. test "X$echo_testing_string" = "X$echo_test_string"; then
  358. # Cool, printf works
  359. :
  360. elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
  361. test "X$echo_testing_string" = 'X\t' &&
  362. echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  363. test "X$echo_testing_string" = "X$echo_test_string"; then
  364. CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
  365. export CONFIG_SHELL
  366. SHELL="$CONFIG_SHELL"
  367. export SHELL
  368. echo="$CONFIG_SHELL [$]0 --fallback-echo"
  369. elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
  370. test "X$echo_testing_string" = 'X\t' &&
  371. echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  372. test "X$echo_testing_string" = "X$echo_test_string"; then
  373. echo="$CONFIG_SHELL [$]0 --fallback-echo"
  374. else
  375. # maybe with a smaller string...
  376. prev=:
  377. for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
  378. if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
  379. then
  380. break
  381. fi
  382. prev="$cmd"
  383. done
  384. if test "$prev" != 'sed 50q "[$]0"'; then
  385. echo_test_string=`eval $prev`
  386. export echo_test_string
  387. exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
  388. else
  389. # Oops. We lost completely, so just stick with echo.
  390. echo=echo
  391. fi
  392. fi
  393. fi
  394. fi
  395. fi
  396. fi
  397. # Copy echo and quote the copy suitably for passing to libtool from
  398. # the Makefile, instead of quoting the original, which is used later.
  399. ECHO=$echo
  400. if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
  401. ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
  402. fi
  403. AC_SUBST(ECHO)
  404. ])])# _LT_AC_PROG_ECHO_BACKSLASH
  405. # _LT_AC_LOCK
  406. # -----------
  407. AC_DEFUN([_LT_AC_LOCK],
  408. [AC_ARG_ENABLE([libtool-lock],
  409. [AC_HELP_STRING([--disable-libtool-lock],
  410. [avoid locking (might break parallel builds)])])
  411. test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  412. # Some flags need to be propagated to the compiler or linker for good
  413. # libtool support.
  414. case $host in
  415. ia64-*-hpux*)
  416. # Find out which ABI we are using.
  417. echo 'int i;' > conftest.$ac_ext
  418. if AC_TRY_EVAL(ac_compile); then
  419. case `/usr/bin/file conftest.$ac_objext` in
  420. *ELF-32*)
  421. HPUX_IA64_MODE="32"
  422. ;;
  423. *ELF-64*)
  424. HPUX_IA64_MODE="64"
  425. ;;
  426. esac
  427. fi
  428. rm -rf conftest*
  429. ;;
  430. *-*-irix6*)
  431. # Find out which ABI we are using.
  432. echo '[#]line __oline__ "configure"' > conftest.$ac_ext
  433. if AC_TRY_EVAL(ac_compile); then
  434. if test "$lt_cv_prog_gnu_ld" = yes; then
  435. case `/usr/bin/file conftest.$ac_objext` in
  436. *32-bit*)
  437. LD="${LD-ld} -melf32bsmip"
  438. ;;
  439. *N32*)
  440. LD="${LD-ld} -melf32bmipn32"
  441. ;;
  442. *64-bit*)
  443. LD="${LD-ld} -melf64bmip"
  444. ;;
  445. esac
  446. else
  447. case `/usr/bin/file conftest.$ac_objext` in
  448. *32-bit*)
  449. LD="${LD-ld} -32"
  450. ;;
  451. *N32*)
  452. LD="${LD-ld} -n32"
  453. ;;
  454. *64-bit*)
  455. LD="${LD-ld} -64"
  456. ;;
  457. esac
  458. fi
  459. fi
  460. rm -rf conftest*
  461. ;;
  462. x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
  463. # Find out which ABI we are using.
  464. echo 'int i;' > conftest.$ac_ext
  465. if AC_TRY_EVAL(ac_compile); then
  466. case "`/usr/bin/file conftest.o`" in
  467. *32-bit*)
  468. case $host in
  469. x86_64-*linux*)
  470. LD="${LD-ld} -m elf_i386"
  471. ;;
  472. ppc64-*linux*|powerpc64-*linux*)
  473. LD="${LD-ld} -m elf32ppclinux"
  474. ;;
  475. s390x-*linux*)
  476. LD="${LD-ld} -m elf_s390"
  477. ;;
  478. sparc64-*linux*)
  479. LD="${LD-ld} -m elf32_sparc"
  480. ;;
  481. esac
  482. ;;
  483. *64-bit*)
  484. case $host in
  485. x86_64-*linux*)
  486. LD="${LD-ld} -m elf_x86_64"
  487. ;;
  488. ppc*-*linux*|powerpc*-*linux*)
  489. LD="${LD-ld} -m elf64ppc"
  490. ;;
  491. s390*-*linux*)
  492. LD="${LD-ld} -m elf64_s390"
  493. ;;
  494. sparc*-*linux*)
  495. LD="${LD-ld} -m elf64_sparc"
  496. ;;
  497. esac
  498. ;;
  499. esac
  500. fi
  501. rm -rf conftest*
  502. ;;
  503. *-*-sco3.2v5*)
  504. # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  505. SAVE_CFLAGS="$CFLAGS"
  506. CFLAGS="$CFLAGS -belf"
  507. AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
  508. [AC_LANG_PUSH(C)
  509. AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
  510. AC_LANG_POP])
  511. if test x"$lt_cv_cc_needs_belf" != x"yes"; then
  512. # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  513. CFLAGS="$SAVE_CFLAGS"
  514. fi
  515. ;;
  516. AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
  517. [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
  518. AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  519. AC_CHECK_TOOL(AS, as, false)
  520. AC_CHECK_TOOL(OBJDUMP, objdump, false)
  521. ;;
  522. ])
  523. esac
  524. need_locks="$enable_libtool_lock"
  525. ])# _LT_AC_LOCK
  526. # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  527. # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
  528. # ----------------------------------------------------------------
  529. # Check whether the given compiler option works
  530. AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
  531. [AC_REQUIRE([LT_AC_PROG_SED])
  532. AC_CACHE_CHECK([$1], [$2],
  533. [$2=no
  534. ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
  535. printf "$lt_simple_compile_test_code" > conftest.$ac_ext
  536. lt_compiler_flag="$3"
  537. # Insert the option either (1) after the last *FLAGS variable, or
  538. # (2) before a word containing "conftest.", or (3) at the end.
  539. # Note that $ac_compile itself does not contain backslashes and begins
  540. # with a dollar sign (not a hyphen), so the echo should work correctly.
  541. # The option is referenced via a variable to avoid confusing sed.
  542. lt_compile=`echo "$ac_compile" | $SED \
  543. -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
  544. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  545. -e 's:$: $lt_compiler_flag:'`
  546. (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  547. (eval "$lt_compile" 2>conftest.err)
  548. ac_status=$?
  549. cat conftest.err >&AS_MESSAGE_LOG_FD
  550. echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  551. if (exit $ac_status) && test -s "$ac_outfile"; then
  552. # The compiler can only warn and ignore the option if not recognized
  553. # So say no if there are warnings other than the usual output.
  554. $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
  555. $SED '/^$/d' conftest.err >conftest.er2
  556. if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
  557. $2=yes
  558. fi
  559. fi
  560. $rm conftest*
  561. ])
  562. if test x"[$]$2" = xyes; then
  563. ifelse([$5], , :, [$5])
  564. else
  565. ifelse([$6], , :, [$6])
  566. fi
  567. ])# AC_LIBTOOL_COMPILER_OPTION
  568. # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  569. # [ACTION-SUCCESS], [ACTION-FAILURE])
  570. # ------------------------------------------------------------
  571. # Check whether the given compiler option works
  572. AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
  573. [AC_CACHE_CHECK([$1], [$2],
  574. [$2=no
  575. save_LDFLAGS="$LDFLAGS"
  576. LDFLAGS="$LDFLAGS $3"
  577. printf "$lt_simple_link_test_code" > conftest.$ac_ext
  578. if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
  579. # The compiler can only warn and ignore the option if not recognized
  580. # So say no if there are warnings
  581. if test -s conftest.err; then
  582. # Append any errors to the config.log.
  583. cat conftest.err 1>&AS_MESSAGE_LOG_FD
  584. $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
  585. $SED '/^$/d' conftest.err >conftest.er2
  586. if diff conftest.exp conftest.er2 >/dev/null; then
  587. $2=yes
  588. fi
  589. else
  590. $2=yes
  591. fi
  592. fi
  593. $rm conftest*
  594. LDFLAGS="$save_LDFLAGS"
  595. ])
  596. if test x"[$]$2" = xyes; then
  597. ifelse([$4], , :, [$4])
  598. else
  599. ifelse([$5], , :, [$5])
  600. fi
  601. ])# AC_LIBTOOL_LINKER_OPTION
  602. # AC_LIBTOOL_SYS_MAX_CMD_LEN
  603. # --------------------------
  604. AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
  605. [# find the maximum length of command line arguments
  606. AC_MSG_CHECKING([the maximum length of command line arguments])
  607. AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
  608. i=0
  609. teststring="ABCD"
  610. case $build_os in
  611. msdosdjgpp*)
  612. # On DJGPP, this test can blow up pretty badly due to problems in libc
  613. # (any single argument exceeding 2000 bytes causes a buffer overrun
  614. # during glob expansion). Even if it were fixed, the result of this
  615. # check would be larger than it should be.
  616. lt_cv_sys_max_cmd_len=12288; # 12K is about right
  617. ;;
  618. gnu*)
  619. # Under GNU Hurd, this test is not required because there is
  620. # no limit to the length of command line arguments.
  621. # Libtool will interpret -1 as no limit whatsoever
  622. lt_cv_sys_max_cmd_len=-1;
  623. ;;
  624. cygwin* | mingw*)
  625. # On Win9x/ME, this test blows up -- it succeeds, but takes
  626. # about 5 minutes as the teststring grows exponentially.
  627. # Worse, since 9x/ME are not pre-emptively multitasking,
  628. # you end up with a "frozen" computer, even though with patience
  629. # the test eventually succeeds (with a max line length of 256k).
  630. # Instead, let's just punt: use the minimum linelength reported by
  631. # all of the supported platforms: 8192 (on NT/2K/XP).
  632. lt_cv_sys_max_cmd_len=8192;
  633. ;;
  634. amigaos*)
  635. # On AmigaOS with pdksh, this test takes hours, literally.
  636. # So we just punt and use a minimum line length of 8192.
  637. lt_cv_sys_max_cmd_len=8192;
  638. ;;
  639. netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
  640. # This has been around since 386BSD, at least. Likely further.
  641. if test -x /sbin/sysctl; then
  642. lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
  643. elif test -x /usr/sbin/sysctl; then
  644. lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
  645. else
  646. lt_cv_sys_max_cmd_len=65536 # usable default for *BSD
  647. fi
  648. # And add a safety zone
  649. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  650. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  651. ;;
  652. osf*)
  653. # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
  654. # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
  655. # nice to cause kernel panics so lets avoid the loop below.
  656. # First set a reasonable default.
  657. lt_cv_sys_max_cmd_len=16384
  658. #
  659. if test -x /sbin/sysconfig; then
  660. case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
  661. *1*) lt_cv_sys_max_cmd_len=-1 ;;
  662. esac
  663. fi
  664. ;;
  665. *)
  666. # If test is not a shell built-in, we'll probably end up computing a
  667. # maximum length that is only half of the actual maximum length, but
  668. # we can't tell.
  669. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
  670. while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
  671. = "XX$teststring") >/dev/null 2>&1 &&
  672. new_result=`expr "X$teststring" : ".*" 2>&1` &&
  673. lt_cv_sys_max_cmd_len=$new_result &&
  674. test $i != 17 # 1/2 MB should be enough
  675. do
  676. i=`expr $i + 1`
  677. teststring=$teststring$teststring
  678. done
  679. teststring=
  680. # Add a significant safety factor because C++ compilers can tack on massive
  681. # amounts of additional arguments before passing them to the linker.
  682. # It appears as though 1/2 is a usable value.
  683. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
  684. ;;
  685. esac
  686. ])
  687. if test -n $lt_cv_sys_max_cmd_len ; then
  688. AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
  689. else
  690. AC_MSG_RESULT(none)
  691. fi
  692. ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
  693. # _LT_AC_CHECK_DLFCN
  694. # --------------------
  695. AC_DEFUN([_LT_AC_CHECK_DLFCN],
  696. [AC_CHECK_HEADERS(dlfcn.h)dnl
  697. ])# _LT_AC_CHECK_DLFCN
  698. # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
  699. # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
  700. # ------------------------------------------------------------------
  701. AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
  702. [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
  703. if test "$cross_compiling" = yes; then :
  704. [$4]
  705. else
  706. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  707. lt_status=$lt_dlunknown
  708. cat > conftest.$ac_ext <<EOF
  709. [#line __oline__ "configure"
  710. #include "confdefs.h"
  711. #if HAVE_DLFCN_H
  712. #include <dlfcn.h>
  713. #endif
  714. #include <stdio.h>
  715. #ifdef RTLD_GLOBAL
  716. # define LT_DLGLOBAL RTLD_GLOBAL
  717. #else
  718. # ifdef DL_GLOBAL
  719. # define LT_DLGLOBAL DL_GLOBAL
  720. # else
  721. # define LT_DLGLOBAL 0
  722. # endif
  723. #endif
  724. /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
  725. find out it does not work in some platform. */
  726. #ifndef LT_DLLAZY_OR_NOW
  727. # ifdef RTLD_LAZY
  728. # define LT_DLLAZY_OR_NOW RTLD_LAZY
  729. # else
  730. # ifdef DL_LAZY
  731. # define LT_DLLAZY_OR_NOW DL_LAZY
  732. # else
  733. # ifdef RTLD_NOW
  734. # define LT_DLLAZY_OR_NOW RTLD_NOW
  735. # else
  736. # ifdef DL_NOW
  737. # define LT_DLLAZY_OR_NOW DL_NOW
  738. # else
  739. # define LT_DLLAZY_OR_NOW 0
  740. # endif
  741. # endif
  742. # endif
  743. # endif
  744. #endif
  745. #ifdef __cplusplus
  746. extern "C" void exit (int);
  747. #endif
  748. void fnord() { int i=42;}
  749. int main ()
  750. {
  751. void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  752. int status = $lt_dlunknown;
  753. if (self)
  754. {
  755. if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
  756. else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
  757. /* dlclose (self); */
  758. }
  759. exit (status);
  760. }]
  761. EOF
  762. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
  763. (./conftest; exit; ) 2>/dev/null
  764. lt_status=$?
  765. case x$lt_status in
  766. x$lt_dlno_uscore) $1 ;;
  767. x$lt_dlneed_uscore) $2 ;;
  768. x$lt_unknown|x*) $3 ;;
  769. esac
  770. else :
  771. # compilation failed
  772. $3
  773. fi
  774. fi
  775. rm -fr conftest*
  776. ])# _LT_AC_TRY_DLOPEN_SELF
  777. # AC_LIBTOOL_DLOPEN_SELF
  778. # -------------------
  779. AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
  780. [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
  781. if test "x$enable_dlopen" != xyes; then
  782. enable_dlopen=unknown
  783. enable_dlopen_self=unknown
  784. enable_dlopen_self_static=unknown
  785. else
  786. lt_cv_dlopen=no
  787. lt_cv_dlopen_libs=
  788. case $host_os in
  789. beos*)
  790. lt_cv_dlopen="load_add_on"
  791. lt_cv_dlopen_libs=
  792. lt_cv_dlopen_self=yes
  793. ;;
  794. mingw* | pw32*)
  795. lt_cv_dlopen="LoadLibrary"
  796. lt_cv_dlopen_libs=
  797. ;;
  798. cygwin*)
  799. lt_cv_dlopen="dlopen"
  800. lt_cv_dlopen_libs=
  801. ;;
  802. darwin*)
  803. # if libdl is installed we need to link against it
  804. AC_CHECK_LIB([dl], [dlopen],
  805. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
  806. lt_cv_dlopen="dyld"
  807. lt_cv_dlopen_libs=
  808. lt_cv_dlopen_self=yes
  809. ])
  810. ;;
  811. *)
  812. AC_CHECK_FUNC([shl_load],
  813. [lt_cv_dlopen="shl_load"],
  814. [AC_CHECK_LIB([dld], [shl_load],
  815. [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
  816. [AC_CHECK_FUNC([dlopen],
  817. [lt_cv_dlopen="dlopen"],
  818. [AC_CHECK_LIB([dl], [dlopen],
  819. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
  820. [AC_CHECK_LIB([svld], [dlopen],
  821. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
  822. [AC_CHECK_LIB([dld], [dld_link],
  823. [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
  824. ])
  825. ])
  826. ])
  827. ])
  828. ])
  829. ;;
  830. esac
  831. if test "x$lt_cv_dlopen" != xno; then
  832. enable_dlopen=yes
  833. else
  834. enable_dlopen=no
  835. fi
  836. case $lt_cv_dlopen in
  837. dlopen)
  838. save_CPPFLAGS="$CPPFLAGS"
  839. test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  840. save_LDFLAGS="$LDFLAGS"
  841. eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  842. save_LIBS="$LIBS"
  843. LIBS="$lt_cv_dlopen_libs $LIBS"
  844. AC_CACHE_CHECK([whether a program can dlopen itself],
  845. lt_cv_dlopen_self, [dnl
  846. _LT_AC_TRY_DLOPEN_SELF(
  847. lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
  848. lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
  849. ])
  850. if test "x$lt_cv_dlopen_self" = xyes; then
  851. LDFLAGS="$LDFLAGS $link_static_flag"
  852. AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
  853. lt_cv_dlopen_self_static, [dnl
  854. _LT_AC_TRY_DLOPEN_SELF(
  855. lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
  856. lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
  857. ])
  858. fi
  859. CPPFLAGS="$save_CPPFLAGS"
  860. LDFLAGS="$save_LDFLAGS"
  861. LIBS="$save_LIBS"
  862. ;;
  863. esac
  864. case $lt_cv_dlopen_self in
  865. yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  866. *) enable_dlopen_self=unknown ;;
  867. esac
  868. case $lt_cv_dlopen_self_static in
  869. yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  870. *) enable_dlopen_self_static=unknown ;;
  871. esac
  872. fi
  873. ])# AC_LIBTOOL_DLOPEN_SELF
  874. # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
  875. # ---------------------------------
  876. # Check to see if options -c and -o are simultaneously supported by compiler
  877. AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
  878. [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
  879. AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
  880. [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
  881. [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
  882. $rm -r conftest 2>/dev/null
  883. mkdir conftest
  884. cd conftest
  885. mkdir out
  886. printf "$lt_simple_compile_test_code" > conftest.$ac_ext
  887. lt_compiler_flag="-o out/conftest2.$ac_objext"
  888. # Insert the option either (1) after the last *FLAGS variable, or
  889. # (2) before a word containing "conftest.", or (3) at the end.
  890. # Note that $ac_compile itself does not contain backslashes and begins
  891. # with a dollar sign (not a hyphen), so the echo should work correctly.
  892. lt_compile=`echo "$ac_compile" | $SED \
  893. -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
  894. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  895. -e 's:$: $lt_compiler_flag:'`
  896. (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  897. (eval "$lt_compile" 2>out/conftest.err)
  898. ac_status=$?
  899. cat out/conftest.err >&AS_MESSAGE_LOG_FD
  900. echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  901. if (exit $ac_status) && test -s out/conftest2.$ac_objext
  902. then
  903. # The compiler can only warn and ignore the option if not recognized
  904. # So say no if there are warnings
  905. $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
  906. $SED '/^$/d' out/conftest.err >out/conftest.er2
  907. if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
  908. _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  909. fi
  910. fi
  911. chmod u+w .
  912. $rm conftest*
  913. # SGI C++ compiler will create directory out/ii_files/ for
  914. # template instantiation
  915. test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
  916. $rm out/* && rmdir out
  917. cd ..
  918. rmdir conftest
  919. $rm conftest*
  920. ])
  921. ])# AC_LIBTOOL_PROG_CC_C_O
  922. # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
  923. # -----------------------------------------
  924. # Check to see if we can do hard links to lock some files if needed
  925. AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
  926. [AC_REQUIRE([_LT_AC_LOCK])dnl
  927. hard_links="nottested"
  928. if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
  929. # do not overwrite the value of need_locks provided by the user
  930. AC_MSG_CHECKING([if we can lock with hard links])
  931. hard_links=yes
  932. $rm conftest*
  933. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  934. touch conftest.a
  935. ln conftest.a conftest.b 2>&5 || hard_links=no
  936. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  937. AC_MSG_RESULT([$hard_links])
  938. if test "$hard_links" = no; then
  939. AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
  940. need_locks=warn
  941. fi
  942. else
  943. need_locks=no
  944. fi
  945. ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
  946. # AC_LIBTOOL_OBJDIR
  947. # -----------------
  948. AC_DEFUN([AC_LIBTOOL_OBJDIR],
  949. [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
  950. [rm -f .libs 2>/dev/null
  951. mkdir .libs 2>/dev/null
  952. if test -d .libs; then
  953. lt_cv_objdir=.libs
  954. else
  955. # MS-DOS does not allow filenames that begin with a dot.
  956. lt_cv_objdir=_libs
  957. fi
  958. rmdir .libs 2>/dev/null])
  959. objdir=$lt_cv_objdir
  960. ])# AC_LIBTOOL_OBJDIR
  961. # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
  962. # ----------------------------------------------
  963. # Check hardcoding attributes.
  964. AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
  965. [AC_MSG_CHECKING([how to hardcode library paths into programs])
  966. _LT_AC_TAGVAR(hardcode_action, $1)=
  967. if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
  968. test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
  969. test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
  970. # We can hardcode non-existant directories.
  971. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
  972. # If the only mechanism to avoid hardcoding is shlibpath_var, we
  973. # have to relink, otherwise we might link with an installed library
  974. # when we should be linking with a yet-to-be-installed one
  975. ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
  976. test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
  977. # Linking always hardcodes the temporary library directory.
  978. _LT_AC_TAGVAR(hardcode_action, $1)=relink
  979. else
  980. # We can link without hardcoding, and we can hardcode nonexisting dirs.
  981. _LT_AC_TAGVAR(hardcode_action, $1)=immediate
  982. fi
  983. else
  984. # We cannot hardcode anything, or else we can only hardcode existing
  985. # directories.
  986. _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
  987. fi
  988. AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
  989. if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
  990. # Fast installation is not supported
  991. enable_fast_install=no
  992. elif test "$shlibpath_overrides_runpath" = yes ||
  993. test "$enable_shared" = no; then
  994. # Fast installation is not necessary
  995. enable_fast_install=needless
  996. fi
  997. ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
  998. # AC_LIBTOOL_SYS_LIB_STRIP
  999. # ------------------------
  1000. AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
  1001. [striplib=
  1002. old_striplib=
  1003. AC_MSG_CHECKING([whether stripping libraries is possible])
  1004. if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
  1005. test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
  1006. test -z "$striplib" && striplib="$STRIP --strip-unneeded"
  1007. AC_MSG_RESULT([yes])
  1008. else
  1009. # FIXME - insert some real tests, host_os isn't really good enough
  1010. case $host_os in
  1011. darwin*)
  1012. if test -n "$STRIP" ; then
  1013. striplib="$STRIP -x"
  1014. AC_MSG_RESULT([yes])
  1015. else
  1016. AC_MSG_RESULT([no])
  1017. fi
  1018. ;;
  1019. *)
  1020. AC_MSG_RESULT([no])
  1021. ;;
  1022. esac
  1023. fi
  1024. ])# AC_LIBTOOL_SYS_LIB_STRIP
  1025. # AC_LIBTOOL_SYS_DYNAMIC_LINKER
  1026. # -----------------------------
  1027. # PORTME Fill in your ld.so characteristics
  1028. AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
  1029. [AC_MSG_CHECKING([dynamic linker characteristics])
  1030. library_names_spec=
  1031. libname_spec='lib$name'
  1032. soname_spec=
  1033. shrext_cmds=".so"
  1034. postinstall_cmds=
  1035. postuninstall_cmds=
  1036. finish_cmds=
  1037. finish_eval=
  1038. shlibpath_var=
  1039. shlibpath_overrides_runpath=unknown
  1040. version_type=none
  1041. dynamic_linker="$host_os ld.so"
  1042. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  1043. if test "$GCC" = yes; then
  1044. sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
  1045. if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
  1046. # if the path contains ";" then we assume it to be the separator
  1047. # otherwise default to the standard path separator (i.e. ":") - it is
  1048. # assumed that no part of a normal pathname contains ";" but that should
  1049. # okay in the real world where ";" in dirpaths is itself problematic.
  1050. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  1051. else
  1052. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  1053. fi
  1054. else
  1055. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  1056. fi
  1057. need_lib_prefix=unknown
  1058. hardcode_into_libs=no
  1059. # when you set need_version to no, make sure it does not cause -set_version
  1060. # flags to be left without arguments
  1061. need_version=unknown
  1062. case $host_os in
  1063. aix3*)
  1064. version_type=linux
  1065. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
  1066. shlibpath_var=LIBPATH
  1067. # AIX 3 has no versioning support, so we append a major version to the name.
  1068. soname_spec='${libname}${release}${shared_ext}$major'
  1069. ;;
  1070. aix4* | aix5*)
  1071. version_type=linux
  1072. need_lib_prefix=no
  1073. need_version=no
  1074. hardcode_into_libs=yes
  1075. if test "$host_cpu" = ia64; then
  1076. # AIX 5 supports IA64
  1077. library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
  1078. shlibpath_var=LD_LIBRARY_PATH
  1079. else
  1080. # With GCC up to 2.95.x, collect2 would create an import file
  1081. # for dependence libraries. The import file would start with
  1082. # the line `#! .'. This would cause the generated library to
  1083. # depend on `.', always an invalid library. This was fixed in
  1084. # development snapshots of GCC prior to 3.0.
  1085. case $host_os in
  1086. aix4 | aix4.[[01]] | aix4.[[01]].*)
  1087. if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
  1088. echo ' yes '
  1089. echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
  1090. :
  1091. else
  1092. can_build_shared=no
  1093. fi
  1094. ;;
  1095. esac
  1096. # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
  1097. # soname into executable. Probably we can add versioning support to
  1098. # collect2, so additional links can be useful in future.
  1099. if test "$aix_use_runtimelinking" = yes; then
  1100. # If using run time linking (on AIX 4.2 or later) use lib<name>.so
  1101. # instead of lib<name>.a to let people know that these are not
  1102. # typical AIX shared libraries.
  1103. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1104. else
  1105. # We preserve .a as extension for shared libraries through AIX4.2
  1106. # and later when we are not doing run time linking.
  1107. library_names_spec='${libname}${release}.a $libname.a'
  1108. soname_spec='${libname}${release}${shared_ext}$major'
  1109. fi
  1110. shlibpath_var=LIBPATH
  1111. fi
  1112. ;;
  1113. amigaos*)
  1114. library_names_spec='$libname.ixlibrary $libname.a'
  1115. # Create ${libname}_ixlibrary.a entries in /sys/libs.
  1116. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''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'
  1117. ;;
  1118. beos*)
  1119. library_names_spec='${libname}${shared_ext}'
  1120. dynamic_linker="$host_os ld.so"
  1121. shlibpath_var=LIBRARY_PATH
  1122. ;;
  1123. bsdi[[45]]*)
  1124. version_type=linux
  1125. need_version=no
  1126. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1127. soname_spec='${libname}${release}${shared_ext}$major'
  1128. finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  1129. shlibpath_var=LD_LIBRARY_PATH
  1130. sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  1131. sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  1132. # the default ld.so.conf also contains /usr/contrib/lib and
  1133. # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  1134. # libtool to hard-code these into programs
  1135. ;;
  1136. cygwin* | mingw* | pw32*)
  1137. version_type=windows
  1138. shrext_cmds=".dll"
  1139. need_version=no
  1140. need_lib_prefix=no
  1141. case $GCC,$host_os in
  1142. yes,cygwin* | yes,mingw* | yes,pw32*)
  1143. library_names_spec='$libname.dll.a'
  1144. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  1145. postinstall_cmds='base_file=`basename \${file}`~
  1146. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
  1147. dldir=$destdir/`dirname \$dlpath`~
  1148. test -d \$dldir || mkdir -p \$dldir~
  1149. $install_prog $dir/$dlname \$dldir/$dlname'
  1150. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  1151. dlpath=$dir/\$dldll~
  1152. $rm \$dlpath'
  1153. shlibpath_overrides_runpath=yes
  1154. case $host_os in
  1155. cygwin*)
  1156. # Cygwin DLLs use 'cyg' prefix rather than 'lib'
  1157. soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  1158. sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
  1159. ;;
  1160. mingw*)
  1161. # MinGW DLLs use traditional 'lib' prefix
  1162. soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  1163. sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
  1164. if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
  1165. # It is most probably a Windows format PATH printed by
  1166. # mingw gcc, but we are running on Cygwin. Gcc prints its search
  1167. # path with ; separators, and with drive letters. We can handle the
  1168. # drive letters (cygwin fileutils understands them), so leave them,
  1169. # especially as we might pass files found there to a mingw objdump,
  1170. # which wouldn't understand a cygwinified path. Ahh.
  1171. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  1172. else
  1173. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  1174. fi
  1175. ;;
  1176. pw32*)
  1177. # pw32 DLLs use 'pw' prefix rather than 'lib'
  1178. library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  1179. ;;
  1180. esac
  1181. ;;
  1182. *)
  1183. library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
  1184. ;;
  1185. esac
  1186. dynamic_linker='Win32 ld.exe'
  1187. # FIXME: first we should search . and the directory the executable is in
  1188. shlibpath_var=PATH
  1189. ;;
  1190. darwin* | rhapsody*)
  1191. dynamic_linker="$host_os dyld"
  1192. version_type=darwin
  1193. need_lib_prefix=no
  1194. need_version=no
  1195. library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
  1196. soname_spec='${libname}${release}${major}$shared_ext'
  1197. shlibpath_overrides_runpath=yes
  1198. shlibpath_var=DYLD_LIBRARY_PATH
  1199. shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
  1200. # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
  1201. if test "$GCC" = yes; then
  1202. sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
  1203. else
  1204. sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
  1205. fi
  1206. sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
  1207. ;;
  1208. dgux*)
  1209. version_type=linux
  1210. need_lib_prefix=no
  1211. need_version=no
  1212. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
  1213. soname_spec='${libname}${release}${shared_ext}$major'
  1214. shlibpath_var=LD_LIBRARY_PATH
  1215. ;;
  1216. freebsd1*)
  1217. dynamic_linker=no
  1218. ;;
  1219. kfreebsd*-gnu)
  1220. version_type=linux
  1221. need_lib_prefix=no
  1222. need_version=no
  1223. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  1224. soname_spec='${libname}${release}${shared_ext}$major'
  1225. shlibpath_var=LD_LIBRARY_PATH
  1226. shlibpath_overrides_runpath=no
  1227. hardcode_into_libs=yes
  1228. dynamic_linker='GNU ld.so'
  1229. ;;
  1230. freebsd* | dragonfly*)
  1231. # DragonFly does not have aout. When/if they implement a new
  1232. # versioning mechanism, adjust this.
  1233. objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
  1234. version_type=freebsd-$objformat
  1235. case $version_type in
  1236. freebsd-elf*)
  1237. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  1238. need_version=no
  1239. need_lib_prefix=no
  1240. ;;
  1241. freebsd-*)
  1242. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
  1243. need_version=yes
  1244. ;;
  1245. esac
  1246. shlibpath_var=LD_LIBRARY_PATH
  1247. case $host_os in
  1248. freebsd2*)
  1249. shlibpath_overrides_runpath=yes
  1250. ;;
  1251. freebsd3.[[01]]* | freebsdelf3.[[01]]*)
  1252. shlibpath_overrides_runpath=yes
  1253. hardcode_into_libs=yes
  1254. ;;
  1255. *) # from 3.2 on
  1256. shlibpath_overrides_runpath=no
  1257. hardcode_into_libs=yes
  1258. ;;
  1259. esac
  1260. ;;
  1261. gnu*)
  1262. version_type=linux
  1263. need_lib_prefix=no
  1264. need_version=no
  1265. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  1266. soname_spec='${libname}${release}${shared_ext}$major'
  1267. shlibpath_var=LD_LIBRARY_PATH
  1268. hardcode_into_libs=yes
  1269. ;;
  1270. hpux9* | hpux10* | hpux11*)
  1271. # Give a soname corresponding to the major version so that dld.sl refuses to
  1272. # link against other versions.
  1273. version_type=sunos
  1274. need_lib_prefix=no
  1275. need_version=no
  1276. case "$host_cpu" in
  1277. ia64*)
  1278. shrext_cmds='.so'
  1279. hardcode_into_libs=yes
  1280. dynamic_linker="$host_os dld.so"
  1281. shlibpath_var=LD_LIBRARY_PATH
  1282. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  1283. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1284. soname_spec='${libname}${release}${shared_ext}$major'
  1285. if test "X$HPUX_IA64_MODE" = X32; then
  1286. sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
  1287. else
  1288. sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
  1289. fi
  1290. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  1291. ;;
  1292. hppa*64*)
  1293. shrext_cmds='.sl'
  1294. hardcode_into_libs=yes
  1295. dynamic_linker="$host_os dld.sl"
  1296. shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
  1297. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  1298. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1299. soname_spec='${libname}${release}${shared_ext}$major'
  1300. sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
  1301. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  1302. ;;
  1303. *)
  1304. shrext_cmds='.sl'
  1305. dynamic_linker="$host_os dld.sl"
  1306. shlibpath_var=SHLIB_PATH
  1307. shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  1308. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1309. soname_spec='${libname}${release}${shared_ext}$major'
  1310. ;;
  1311. esac
  1312. # HP-UX runs *really* slowly unless shared libraries are mode 555.
  1313. postinstall_cmds='chmod 555 $lib'
  1314. ;;
  1315. irix5* | irix6* | nonstopux*)
  1316. case $host_os in
  1317. nonstopux*) version_type=nonstopux ;;
  1318. *)
  1319. if test "$lt_cv_prog_gnu_ld" = yes; then
  1320. version_type=linux
  1321. else
  1322. version_type=irix
  1323. fi ;;
  1324. esac
  1325. need_lib_prefix=no
  1326. need_version=no
  1327. soname_spec='${libname}${release}${shared_ext}$major'
  1328. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
  1329. case $host_os in
  1330. irix5* | nonstopux*)
  1331. libsuff= shlibsuff=
  1332. ;;
  1333. *)
  1334. case $LD in # libtool.m4 will add one of these switches to LD
  1335. *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
  1336. libsuff= shlibsuff= libmagic=32-bit;;
  1337. *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
  1338. libsuff=32 shlibsuff=N32 libmagic=N32;;
  1339. *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
  1340. libsuff=64 shlibsuff=64 libmagic=64-bit;;
  1341. *) libsuff= shlibsuff= libmagic=never-match;;
  1342. esac
  1343. ;;
  1344. esac
  1345. shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  1346. shlibpath_overrides_runpath=no
  1347. sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
  1348. sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
  1349. hardcode_into_libs=yes
  1350. ;;
  1351. # No shared lib support for Linux oldld, aout, or coff.
  1352. linux*oldld* | linux*aout* | linux*coff*)
  1353. dynamic_linker=no
  1354. ;;
  1355. # This must be Linux ELF.
  1356. linux*)
  1357. version_type=linux
  1358. need_lib_prefix=no
  1359. need_version=no
  1360. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1361. soname_spec='${libname}${release}${shared_ext}$major'
  1362. finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  1363. shlibpath_var=LD_LIBRARY_PATH
  1364. shlibpath_overrides_runpath=no
  1365. # This implies no fast_install, which is unacceptable.
  1366. # Some rework will be needed to allow for fast_install
  1367. # before this can be enabled.
  1368. hardcode_into_libs=yes
  1369. # Append ld.so.conf contents to the search path
  1370. if test -f /etc/ld.so.conf; then
  1371. lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
  1372. sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
  1373. fi
  1374. # We used to test for /lib/ld.so.1 and disable shared libraries on
  1375. # powerpc, because MkLinux only supported shared libraries with the
  1376. # GNU dynamic linker. Since this was broken with cross compilers,
  1377. # most powerpc-linux boxes support dynamic linking these days and
  1378. # people can always --disable-shared, the test was removed, and we
  1379. # assume the GNU/Linux dynamic linker is in use.
  1380. dynamic_linker='GNU/Linux ld.so'
  1381. ;;
  1382. knetbsd*-gnu)
  1383. version_type=linux
  1384. need_lib_prefix=no
  1385. need_version=no
  1386. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  1387. soname_spec='${libname}${release}${shared_ext}$major'
  1388. shlibpath_var=LD_LIBRARY_PATH
  1389. shlibpath_overrides_runpath=no
  1390. hardcode_into_libs=yes
  1391. dynamic_linker='GNU ld.so'
  1392. ;;
  1393. netbsd*)
  1394. version_type=sunos
  1395. need_lib_prefix=no
  1396. need_version=no
  1397. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  1398. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  1399. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  1400. dynamic_linker='NetBSD (a.out) ld.so'
  1401. else
  1402. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  1403. soname_spec='${libname}${release}${shared_ext}$major'
  1404. dynamic_linker='NetBSD ld.elf_so'
  1405. fi
  1406. shlibpath_var=LD_LIBRARY_PATH
  1407. shlibpath_overrides_runpath=yes
  1408. hardcode_into_libs=yes
  1409. ;;
  1410. newsos6)
  1411. version_type=linux
  1412. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1413. shlibpath_var=LD_LIBRARY_PATH
  1414. shlibpath_overrides_runpath=yes
  1415. ;;
  1416. nto-qnx*)
  1417. version_type=linux
  1418. need_lib_prefix=no
  1419. need_version=no
  1420. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1421. soname_spec='${libname}${release}${shared_ext}$major'
  1422. shlibpath_var=LD_LIBRARY_PATH
  1423. shlibpath_overrides_runpath=yes
  1424. ;;
  1425. openbsd*)
  1426. version_type=sunos
  1427. need_lib_prefix=no
  1428. # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
  1429. case $host_os in
  1430. openbsd3.3 | openbsd3.3.*) need_version=yes ;;
  1431. *) need_version=no ;;
  1432. esac
  1433. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  1434. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  1435. shlibpath_var=LD_LIBRARY_PATH
  1436. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  1437. case $host_os in
  1438. openbsd2.[[89]] | openbsd2.[[89]].*)
  1439. shlibpath_overrides_runpath=no
  1440. ;;
  1441. *)
  1442. shlibpath_overrides_runpath=yes
  1443. ;;
  1444. esac
  1445. else
  1446. shlibpath_overrides_runpath=yes
  1447. fi
  1448. ;;
  1449. os2*)
  1450. libname_spec='$name'
  1451. shrext_cmds=".dll"
  1452. need_lib_prefix=no
  1453. library_names_spec='$libname${shared_ext} $libname.a'
  1454. dynamic_linker='OS/2 ld.exe'
  1455. shlibpath_var=LIBPATH
  1456. ;;
  1457. osf3* | osf4* | osf5*)
  1458. version_type=osf
  1459. need_lib_prefix=no
  1460. need_version=no
  1461. soname_spec='${libname}${release}${shared_ext}$major'
  1462. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1463. shlibpath_var=LD_LIBRARY_PATH
  1464. sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  1465. sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  1466. ;;
  1467. sco3.2v5*)
  1468. version_type=osf
  1469. soname_spec='${libname}${release}${shared_ext}$major'
  1470. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1471. shlibpath_var=LD_LIBRARY_PATH
  1472. ;;
  1473. solaris*)
  1474. version_type=linux
  1475. need_lib_prefix=no
  1476. need_version=no
  1477. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1478. soname_spec='${libname}${release}${shared_ext}$major'
  1479. shlibpath_var=LD_LIBRARY_PATH
  1480. shlibpath_overrides_runpath=yes
  1481. hardcode_into_libs=yes
  1482. # ldd complains unless libraries are executable
  1483. postinstall_cmds='chmod +x $lib'
  1484. ;;
  1485. sunos4*)
  1486. version_type=sunos
  1487. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  1488. finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  1489. shlibpath_var=LD_LIBRARY_PATH
  1490. shlibpath_overrides_runpath=yes
  1491. if test "$with_gnu_ld" = yes; then
  1492. need_lib_prefix=no
  1493. fi
  1494. need_version=yes
  1495. ;;
  1496. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  1497. version_type=linux
  1498. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1499. soname_spec='${libname}${release}${shared_ext}$major'
  1500. shlibpath_var=LD_LIBRARY_PATH
  1501. case $host_vendor in
  1502. sni)
  1503. shlibpath_overrides_runpath=no
  1504. need_lib_prefix=no
  1505. export_dynamic_flag_spec='${wl}-Blargedynsym'
  1506. runpath_var=LD_RUN_PATH
  1507. ;;
  1508. siemens)
  1509. need_lib_prefix=no
  1510. ;;
  1511. motorola)
  1512. need_lib_prefix=no
  1513. need_version=no
  1514. shlibpath_overrides_runpath=no
  1515. sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  1516. ;;
  1517. esac
  1518. ;;
  1519. sysv4*MP*)
  1520. if test -d /usr/nec ;then
  1521. version_type=linux
  1522. library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
  1523. soname_spec='$libname${shared_ext}.$major'
  1524. shlibpath_var=LD_LIBRARY_PATH
  1525. fi
  1526. ;;
  1527. uts4*)
  1528. version_type=linux
  1529. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1530. soname_spec='${libname}${release}${shared_ext}$major'
  1531. shlibpath_var=LD_LIBRARY_PATH
  1532. ;;
  1533. *)
  1534. dynamic_linker=no
  1535. ;;
  1536. esac
  1537. AC_MSG_RESULT([$dynamic_linker])
  1538. test "$dynamic_linker" = no && can_build_shared=no
  1539. ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
  1540. # _LT_AC_TAGCONFIG
  1541. # ----------------
  1542. AC_DEFUN([_LT_AC_TAGCONFIG],
  1543. [AC_ARG_WITH([tags],
  1544. [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
  1545. [include additional configurations @<:@automatic@:>@])],
  1546. [tagnames="$withval"])
  1547. if test -f "$ltmain" && test -n "$tagnames"; then
  1548. if test ! -f "${ofile}"; then
  1549. AC_MSG_WARN([output file `$ofile' does not exist])
  1550. fi
  1551. if test -z "$LTCC"; then
  1552. eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
  1553. if test -z "$LTCC"; then
  1554. AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
  1555. else
  1556. AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
  1557. fi
  1558. fi
  1559. # Extract list of available tagged configurations in $ofile.
  1560. # Note that this assumes the entire list is on one line.
  1561. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
  1562. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  1563. for tagname in $tagnames; do
  1564. IFS="$lt_save_ifs"
  1565. # Check whether tagname contains only valid characters
  1566. case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
  1567. "") ;;
  1568. *) AC_MSG_ERROR([invalid tag name: $tagname])
  1569. ;;
  1570. esac
  1571. if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
  1572. then
  1573. AC_MSG_ERROR([tag name \"$tagname\" already exists])
  1574. fi
  1575. # Update the list of available tags.
  1576. if test -n "$tagname"; then
  1577. echo appending configuration tag \"$tagname\" to $ofile
  1578. case $tagname in
  1579. CXX)
  1580. if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
  1581. ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
  1582. (test "X$CXX" != "Xg++"))) ; then
  1583. AC_LIBTOOL_LANG_CXX_CONFIG
  1584. else
  1585. tagname=""
  1586. fi
  1587. ;;
  1588. F77)
  1589. if test -n "$F77" && test "X$F77" != "Xno"; then
  1590. AC_LIBTOOL_LANG_F77_CONFIG
  1591. else
  1592. tagname=""
  1593. fi
  1594. ;;
  1595. GCJ)
  1596. if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
  1597. AC_LIBTOOL_LANG_GCJ_CONFIG
  1598. else
  1599. tagname=""
  1600. fi
  1601. ;;
  1602. RC)
  1603. AC_LIBTOOL_LANG_RC_CONFIG
  1604. ;;
  1605. *)
  1606. AC_MSG_ERROR([Unsupported tag name: $tagname])
  1607. ;;
  1608. esac
  1609. # Append the new tag name to the list of available tags.
  1610. if test -n "$tagname" ; then
  1611. available_tags="$available_tags $tagname"
  1612. fi
  1613. fi
  1614. done
  1615. IFS="$lt_save_ifs"
  1616. # Now substitute the updated list of available tags.
  1617. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
  1618. mv "${ofile}T" "$ofile"
  1619. chmod +x "$ofile"
  1620. else
  1621. rm -f "${ofile}T"
  1622. AC_MSG_ERROR([unable to update list of available tagged configurations.])
  1623. fi
  1624. fi
  1625. ])# _LT_AC_TAGCONFIG
  1626. # AC_LIBTOOL_DLOPEN
  1627. # -----------------
  1628. # enable checks for dlopen support
  1629. AC_DEFUN([AC_LIBTOOL_DLOPEN],
  1630. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
  1631. ])# AC_LIBTOOL_DLOPEN
  1632. # AC_LIBTOOL_WIN32_DLL
  1633. # --------------------
  1634. # declare package support for building win32 dll's
  1635. AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
  1636. [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
  1637. ])# AC_LIBTOOL_WIN32_DLL
  1638. # AC_ENABLE_SHARED([DEFAULT])
  1639. # ---------------------------
  1640. # implement the --enable-shared flag
  1641. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  1642. AC_DEFUN([AC_ENABLE_SHARED],
  1643. [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
  1644. AC_ARG_ENABLE([shared],
  1645. [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
  1646. [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
  1647. [p=${PACKAGE-default}
  1648. case $enableval in
  1649. yes) enable_shared=yes ;;
  1650. no) enable_shared=no ;;
  1651. *)
  1652. enable_shared=no
  1653. # Look at the argument we got. We use all the common list separators.
  1654. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  1655. for pkg in $enableval; do
  1656. IFS="$lt_save_ifs"
  1657. if test "X$pkg" = "X$p"; then
  1658. enable_shared=yes
  1659. fi
  1660. done
  1661. IFS="$lt_save_ifs"
  1662. ;;
  1663. esac],
  1664. [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
  1665. ])# AC_ENABLE_SHARED
  1666. # AC_DISABLE_SHARED
  1667. # -----------------
  1668. #- set the default shared flag to --disable-shared
  1669. AC_DEFUN([AC_DISABLE_SHARED],
  1670. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  1671. AC_ENABLE_SHARED(no)
  1672. ])# AC_DISABLE_SHARED
  1673. # AC_ENABLE_STATIC([DEFAULT])
  1674. # ---------------------------
  1675. # implement the --enable-static flag
  1676. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  1677. AC_DEFUN([AC_ENABLE_STATIC],
  1678. [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
  1679. AC_ARG_ENABLE([static],
  1680. [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
  1681. [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
  1682. [p=${PACKAGE-default}
  1683. case $enableval in
  1684. yes) enable_static=yes ;;
  1685. no) enable_static=no ;;
  1686. *)
  1687. enable_static=no
  1688. # Look at the argument we got. We use all the common list separators.
  1689. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  1690. for pkg in $enableval; do
  1691. IFS="$lt_save_ifs"
  1692. if test "X$pkg" = "X$p"; then
  1693. enable_static=yes
  1694. fi
  1695. done
  1696. IFS="$lt_save_ifs"
  1697. ;;
  1698. esac],
  1699. [enable_static=]AC_ENABLE_STATIC_DEFAULT)
  1700. ])# AC_ENABLE_STATIC
  1701. # AC_DISABLE_STATIC
  1702. # -----------------
  1703. # set the default static flag to --disable-static
  1704. AC_DEFUN([AC_DISABLE_STATIC],
  1705. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  1706. AC_ENABLE_STATIC(no)
  1707. ])# AC_DISABLE_STATIC
  1708. # AC_ENABLE_FAST_INSTALL([DEFAULT])
  1709. # ---------------------------------
  1710. # implement the --enable-fast-install flag
  1711. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  1712. AC_DEFUN([AC_ENABLE_FAST_INSTALL],
  1713. [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
  1714. AC_ARG_ENABLE([fast-install],
  1715. [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
  1716. [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
  1717. [p=${PACKAGE-default}
  1718. case $enableval in
  1719. yes) enable_fast_install=yes ;;
  1720. no) enable_fast_install=no ;;
  1721. *)
  1722. enable_fast_install=no
  1723. # Look at the argument we got. We use all the common list separators.
  1724. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  1725. for pkg in $enableval; do
  1726. IFS="$lt_save_ifs"
  1727. if test "X$pkg" = "X$p"; then
  1728. enable_fast_install=yes
  1729. fi
  1730. done
  1731. IFS="$lt_save_ifs"
  1732. ;;
  1733. esac],
  1734. [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
  1735. ])# AC_ENABLE_FAST_INSTALL
  1736. # AC_DISABLE_FAST_INSTALL
  1737. # -----------------------
  1738. # set the default to --disable-fast-install
  1739. AC_DEFUN([AC_DISABLE_FAST_INSTALL],
  1740. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  1741. AC_ENABLE_FAST_INSTALL(no)
  1742. ])# AC_DISABLE_FAST_INSTALL
  1743. # AC_LIBTOOL_PICMODE([MODE])
  1744. # --------------------------
  1745. # implement the --with-pic flag
  1746. # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
  1747. AC_DEFUN([AC_LIBTOOL_PICMODE],
  1748. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  1749. pic_mode=ifelse($#,1,$1,default)
  1750. ])# AC_LIBTOOL_PICMODE
  1751. # AC_PROG_EGREP
  1752. # -------------
  1753. # This is predefined starting with Autoconf 2.54, so this conditional
  1754. # definition can be removed once we require Autoconf 2.54 or later.
  1755. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
  1756. [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
  1757. [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
  1758. then ac_cv_prog_egrep='grep -E'
  1759. else ac_cv_prog_egrep='egrep'
  1760. fi])
  1761. EGREP=$ac_cv_prog_egrep
  1762. AC_SUBST([EGREP])
  1763. ])])
  1764. # AC_PATH_TOOL_PREFIX
  1765. # -------------------
  1766. # find a file program which can recognise shared library
  1767. AC_DEFUN([AC_PATH_TOOL_PREFIX],
  1768. [AC_REQUIRE([AC_PROG_EGREP])dnl
  1769. AC_MSG_CHECKING([for $1])
  1770. AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
  1771. [case $MAGIC_CMD in
  1772. [[\\/*] | ?:[\\/]*])
  1773. lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
  1774. ;;
  1775. *)
  1776. lt_save_MAGIC_CMD="$MAGIC_CMD"
  1777. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  1778. dnl $ac_dummy forces splitting on constant user-supplied paths.
  1779. dnl POSIX.2 word splitting is done only on the output of word expansions,
  1780. dnl not every word. This closes a longstanding sh security hole.
  1781. ac_dummy="ifelse([$2], , $PATH, [$2])"
  1782. for ac_dir in $ac_dummy; do
  1783. IFS="$lt_save_ifs"
  1784. test -z "$ac_dir" && ac_dir=.
  1785. if test -f $ac_dir/$1; then
  1786. lt_cv_path_MAGIC_CMD="$ac_dir/$1"
  1787. if test -n "$file_magic_test_file"; then
  1788. case $deplibs_check_method in
  1789. "file_magic "*)
  1790. file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
  1791. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  1792. if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  1793. $EGREP "$file_magic_regex" > /dev/null; then
  1794. :
  1795. else
  1796. cat <<EOF 1>&2
  1797. *** Warning: the command libtool uses to detect shared libraries,
  1798. *** $file_magic_cmd, produces output that libtool cannot recognize.
  1799. *** The result is that libtool may fail to recognize shared libraries
  1800. *** as such. This will affect the creation of libtool libraries that
  1801. *** depend on shared libraries, but programs linked with such libtool
  1802. *** libraries will work regardless of this problem. Nevertheless, you
  1803. *** may want to report the problem to your system manager and/or to
  1804. *** bug-libtool@gnu.org
  1805. EOF
  1806. fi ;;
  1807. esac
  1808. fi
  1809. break
  1810. fi
  1811. done
  1812. IFS="$lt_save_ifs"
  1813. MAGIC_CMD="$lt_save_MAGIC_CMD"
  1814. ;;
  1815. esac])
  1816. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  1817. if test -n "$MAGIC_CMD"; then
  1818. AC_MSG_RESULT($MAGIC_CMD)
  1819. else
  1820. AC_MSG_RESULT(no)
  1821. fi
  1822. ])# AC_PATH_TOOL_PREFIX
  1823. # AC_PATH_MAGIC
  1824. # -------------
  1825. # find a file program which can recognise a shared library
  1826. AC_DEFUN([AC_PATH_MAGIC],
  1827. [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
  1828. if test -z "$lt_cv_path_MAGIC_CMD"; then
  1829. if test -n "$ac_tool_prefix"; then
  1830. AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
  1831. else
  1832. MAGIC_CMD=:
  1833. fi
  1834. fi
  1835. ])# AC_PATH_MAGIC
  1836. # AC_PROG_LD
  1837. # ----------
  1838. # find the pathname to the GNU or non-GNU linker
  1839. AC_DEFUN([AC_PROG_LD],
  1840. [AC_ARG_WITH([gnu-ld],
  1841. [AC_HELP_STRING([--with-gnu-ld],
  1842. [assume the C compiler uses GNU ld @<:@default=no@:>@])],
  1843. [test "$withval" = no || with_gnu_ld=yes],
  1844. [with_gnu_ld=no])
  1845. AC_REQUIRE([LT_AC_PROG_SED])dnl
  1846. AC_REQUIRE([AC_PROG_CC])dnl
  1847. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  1848. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  1849. ac_prog=ld
  1850. if test "$GCC" = yes; then
  1851. # Check if gcc -print-prog-name=ld gives a path.
  1852. AC_MSG_CHECKING([for ld used by $CC])
  1853. case $host in
  1854. *-*-mingw*)
  1855. # gcc leaves a trailing carriage return which upsets mingw
  1856. ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  1857. *)
  1858. ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  1859. esac
  1860. case $ac_prog in
  1861. # Accept absolute paths.
  1862. [[\\/]]* | ?:[[\\/]]*)
  1863. re_direlt='/[[^/]][[^/]]*/\.\./'
  1864. # Canonicalize the pathname of ld
  1865. ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
  1866. while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
  1867. ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
  1868. done
  1869. test -z "$LD" && LD="$ac_prog"
  1870. ;;
  1871. "")
  1872. # If it fails, then pretend we aren't using GCC.
  1873. ac_prog=ld
  1874. ;;
  1875. *)
  1876. # If it is relative, then search for the first ld in PATH.
  1877. with_gnu_ld=unknown
  1878. ;;
  1879. esac
  1880. elif test "$with_gnu_ld" = yes; then
  1881. AC_MSG_CHECKING([for GNU ld])
  1882. else
  1883. AC_MSG_CHECKING([for non-GNU ld])
  1884. fi
  1885. AC_CACHE_VAL(lt_cv_path_LD,
  1886. [if test -z "$LD"; then
  1887. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  1888. for ac_dir in $PATH; do
  1889. IFS="$lt_save_ifs"
  1890. test -z "$ac_dir" && ac_dir=.
  1891. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  1892. lt_cv_path_LD="$ac_dir/$ac_prog"
  1893. # Check to see if the program is GNU ld. I'd rather use --version,
  1894. # but apparently some GNU ld's only accept -v.
  1895. # Break only if it was the GNU/non-GNU ld that we prefer.
  1896. case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
  1897. *GNU* | *'with BFD'*)
  1898. test "$with_gnu_ld" != no && break
  1899. ;;
  1900. *)
  1901. test "$with_gnu_ld" != yes && break
  1902. ;;
  1903. esac
  1904. fi
  1905. done
  1906. IFS="$lt_save_ifs"
  1907. else
  1908. lt_cv_path_LD="$LD" # Let the user override the test with a path.
  1909. fi])
  1910. LD="$lt_cv_path_LD"
  1911. if test -n "$LD"; then
  1912. AC_MSG_RESULT($LD)
  1913. else
  1914. AC_MSG_RESULT(no)
  1915. fi
  1916. test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  1917. AC_PROG_LD_GNU
  1918. ])# AC_PROG_LD
  1919. # AC_PROG_LD_GNU
  1920. # --------------
  1921. AC_DEFUN([AC_PROG_LD_GNU],
  1922. [AC_REQUIRE([AC_PROG_EGREP])dnl
  1923. AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
  1924. [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
  1925. case `$LD -v 2>&1 </dev/null` in
  1926. *GNU* | *'with BFD'*)
  1927. lt_cv_prog_gnu_ld=yes
  1928. ;;
  1929. *)
  1930. lt_cv_prog_gnu_ld=no
  1931. ;;
  1932. esac])
  1933. with_gnu_ld=$lt_cv_prog_gnu_ld
  1934. ])# AC_PROG_LD_GNU
  1935. # AC_PROG_LD_RELOAD_FLAG
  1936. # ----------------------
  1937. # find reload flag for linker
  1938. # -- PORTME Some linkers may need a different reload flag.
  1939. AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
  1940. [AC_CACHE_CHECK([for $LD option to reload object files],
  1941. lt_cv_ld_reload_flag,
  1942. [lt_cv_ld_reload_flag='-r'])
  1943. reload_flag=$lt_cv_ld_reload_flag
  1944. case $reload_flag in
  1945. "" | " "*) ;;
  1946. *) reload_flag=" $reload_flag" ;;
  1947. esac
  1948. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  1949. case $host_os in
  1950. darwin*)
  1951. if test "$GCC" = yes; then
  1952. reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
  1953. else
  1954. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  1955. fi
  1956. ;;
  1957. esac
  1958. ])# AC_PROG_LD_RELOAD_FLAG
  1959. # AC_DEPLIBS_CHECK_METHOD
  1960. # -----------------------
  1961. # how to check for library dependencies
  1962. # -- PORTME fill in with the dynamic library characteristics
  1963. AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
  1964. [AC_CACHE_CHECK([how to recognise dependent libraries],
  1965. lt_cv_deplibs_check_method,
  1966. [lt_cv_file_magic_cmd='$MAGIC_CMD'
  1967. lt_cv_file_magic_test_file=
  1968. lt_cv_deplibs_check_method='unknown'
  1969. # Need to set the preceding variable on all platforms that support
  1970. # interlibrary dependencies.
  1971. # 'none' -- dependencies not supported.
  1972. # `unknown' -- same as none, but documents that we really don't know.
  1973. # 'pass_all' -- all dependencies passed with no checks.
  1974. # 'test_compile' -- check by making test program.
  1975. # 'file_magic [[regex]]' -- check by looking for files in library path
  1976. # which responds to the $file_magic_cmd with a given extended regex.
  1977. # If you have `file' or equivalent on your system and you're not sure
  1978. # whether `pass_all' will *always* work, you probably want this one.
  1979. case $host_os in
  1980. aix4* | aix5*)
  1981. lt_cv_deplibs_check_method=pass_all
  1982. ;;
  1983. beos*)
  1984. lt_cv_deplibs_check_method=pass_all
  1985. ;;
  1986. bsdi[[45]]*)
  1987. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
  1988. lt_cv_file_magic_cmd='/usr/bin/file -L'
  1989. lt_cv_file_magic_test_file=/shlib/libc.so
  1990. ;;
  1991. cygwin*)
  1992. # func_win32_libid is a shell function defined in ltmain.sh
  1993. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  1994. lt_cv_file_magic_cmd='func_win32_libid'
  1995. ;;
  1996. mingw* | pw32*)
  1997. # Base MSYS/MinGW do not provide the 'file' command needed by
  1998. # func_win32_libid shell function, so use a weaker test based on 'objdump'.
  1999. lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
  2000. lt_cv_file_magic_cmd='$OBJDUMP -f'
  2001. ;;
  2002. darwin* | rhapsody*)
  2003. lt_cv_deplibs_check_method=pass_all
  2004. ;;
  2005. freebsd* | kfreebsd*-gnu | dragonfly*)
  2006. if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  2007. case $host_cpu in
  2008. i*86 )
  2009. # Not sure whether the presence of OpenBSD here was a mistake.
  2010. # Let's accept both of them until this is cleared up.
  2011. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
  2012. lt_cv_file_magic_cmd=/usr/bin/file
  2013. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  2014. ;;
  2015. esac
  2016. else
  2017. lt_cv_deplibs_check_method=pass_all
  2018. fi
  2019. ;;
  2020. gnu*)
  2021. lt_cv_deplibs_check_method=pass_all
  2022. ;;
  2023. hpux10.20* | hpux11*)
  2024. lt_cv_file_magic_cmd=/usr/bin/file
  2025. case "$host_cpu" in
  2026. ia64*)
  2027. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
  2028. lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
  2029. ;;
  2030. hppa*64*)
  2031. [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
  2032. lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
  2033. ;;
  2034. *)
  2035. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
  2036. lt_cv_file_magic_test_file=/usr/lib/libc.sl
  2037. ;;
  2038. esac
  2039. ;;
  2040. irix5* | irix6* | nonstopux*)
  2041. case $LD in
  2042. *-32|*"-32 ") libmagic=32-bit;;
  2043. *-n32|*"-n32 ") libmagic=N32;;
  2044. *-64|*"-64 ") libmagic=64-bit;;
  2045. *) libmagic=never-match;;
  2046. esac
  2047. lt_cv_deplibs_check_method=pass_all
  2048. ;;
  2049. # This must be Linux ELF.
  2050. linux*)
  2051. lt_cv_deplibs_check_method=pass_all
  2052. ;;
  2053. netbsd*)
  2054. if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  2055. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  2056. else
  2057. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
  2058. fi
  2059. ;;
  2060. newos6*)
  2061. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
  2062. lt_cv_file_magic_cmd=/usr/bin/file
  2063. lt_cv_file_magic_test_file=/usr/lib/libnls.so
  2064. ;;
  2065. nto-qnx*)
  2066. lt_cv_deplibs_check_method=unknown
  2067. ;;
  2068. openbsd*)
  2069. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  2070. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
  2071. else
  2072. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  2073. fi
  2074. ;;
  2075. osf3* | osf4* | osf5*)
  2076. lt_cv_deplibs_check_method=pass_all
  2077. ;;
  2078. sco3.2v5*)
  2079. lt_cv_deplibs_check_method=pass_all
  2080. ;;
  2081. solaris*)
  2082. lt_cv_deplibs_check_method=pass_all
  2083. ;;
  2084. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  2085. case $host_vendor in
  2086. motorola)
  2087. 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]]'
  2088. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  2089. ;;
  2090. ncr)
  2091. lt_cv_deplibs_check_method=pass_all
  2092. ;;
  2093. sequent)
  2094. lt_cv_file_magic_cmd='/bin/file'
  2095. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
  2096. ;;
  2097. sni)
  2098. lt_cv_file_magic_cmd='/bin/file'
  2099. lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
  2100. lt_cv_file_magic_test_file=/lib/libc.so
  2101. ;;
  2102. siemens)
  2103. lt_cv_deplibs_check_method=pass_all
  2104. ;;
  2105. esac
  2106. ;;
  2107. sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
  2108. lt_cv_deplibs_check_method=pass_all
  2109. ;;
  2110. esac
  2111. ])
  2112. file_magic_cmd=$lt_cv_file_magic_cmd
  2113. deplibs_check_method=$lt_cv_deplibs_check_method
  2114. test -z "$deplibs_check_method" && deplibs_check_method=unknown
  2115. ])# AC_DEPLIBS_CHECK_METHOD
  2116. # AC_PROG_NM
  2117. # ----------
  2118. # find the pathname to a BSD-compatible name lister
  2119. AC_DEFUN([AC_PROG_NM],
  2120. [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
  2121. [if test -n "$NM"; then
  2122. # Let the user override the test.
  2123. lt_cv_path_NM="$NM"
  2124. else
  2125. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  2126. for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
  2127. IFS="$lt_save_ifs"
  2128. test -z "$ac_dir" && ac_dir=.
  2129. tmp_nm="$ac_dir/${ac_tool_prefix}nm"
  2130. if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
  2131. # Check to see if the nm accepts a BSD-compat flag.
  2132. # Adding the `sed 1q' prevents false positives on HP-UX, which says:
  2133. # nm: unknown option "B" ignored
  2134. # Tru64's nm complains that /dev/null is an invalid object file
  2135. case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
  2136. */dev/null* | *'Invalid file or object type'*)
  2137. lt_cv_path_NM="$tmp_nm -B"
  2138. break
  2139. ;;
  2140. *)
  2141. case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
  2142. */dev/null*)
  2143. lt_cv_path_NM="$tmp_nm -p"
  2144. break
  2145. ;;
  2146. *)
  2147. lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
  2148. continue # so that we can try to find one that supports BSD flags
  2149. ;;
  2150. esac
  2151. esac
  2152. fi
  2153. done
  2154. IFS="$lt_save_ifs"
  2155. test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
  2156. fi])
  2157. NM="$lt_cv_path_NM"
  2158. ])# AC_PROG_NM
  2159. # AC_CHECK_LIBM
  2160. # -------------
  2161. # check for math library
  2162. AC_DEFUN([AC_CHECK_LIBM],
  2163. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2164. LIBM=
  2165. case $host in
  2166. *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
  2167. # These system don't have libm, or don't need it
  2168. ;;
  2169. *-ncr-sysv4.3*)
  2170. AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
  2171. AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
  2172. ;;
  2173. *)
  2174. AC_CHECK_LIB(m, cos, LIBM="-lm")
  2175. ;;
  2176. esac
  2177. ])# AC_CHECK_LIBM
  2178. # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
  2179. # -----------------------------------
  2180. # sets LIBLTDL to the link flags for the libltdl convenience library and
  2181. # LTDLINCL to the include flags for the libltdl header and adds
  2182. # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
  2183. # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
  2184. # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
  2185. # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
  2186. # '${top_srcdir}/' (note the single quotes!). If your package is not
  2187. # flat and you're not using automake, define top_builddir and
  2188. # top_srcdir appropriately in the Makefiles.
  2189. AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
  2190. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  2191. case $enable_ltdl_convenience in
  2192. no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
  2193. "") enable_ltdl_convenience=yes
  2194. ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
  2195. esac
  2196. LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
  2197. LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
  2198. # For backwards non-gettext consistent compatibility...
  2199. INCLTDL="$LTDLINCL"
  2200. ])# AC_LIBLTDL_CONVENIENCE
  2201. # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
  2202. # -----------------------------------
  2203. # sets LIBLTDL to the link flags for the libltdl installable library and
  2204. # LTDLINCL to the include flags for the libltdl header and adds
  2205. # --enable-ltdl-install to the configure arguments. Note that LIBLTDL
  2206. # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
  2207. # DIRECTORY is not provided and an installed libltdl is not found, it is
  2208. # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
  2209. # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
  2210. # quotes!). If your package is not flat and you're not using automake,
  2211. # define top_builddir and top_srcdir appropriately in the Makefiles.
  2212. # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
  2213. AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
  2214. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  2215. AC_CHECK_LIB(ltdl, lt_dlinit,
  2216. [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
  2217. [if test x"$enable_ltdl_install" = xno; then
  2218. AC_MSG_WARN([libltdl not installed, but installation disabled])
  2219. else
  2220. enable_ltdl_install=yes
  2221. fi
  2222. ])
  2223. if test x"$enable_ltdl_install" = x"yes"; then
  2224. ac_configure_args="$ac_configure_args --enable-ltdl-install"
  2225. LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
  2226. LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
  2227. else
  2228. ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
  2229. LIBLTDL="-lltdl"
  2230. LTDLINCL=
  2231. fi
  2232. # For backwards non-gettext consistent compatibility...
  2233. INCLTDL="$LTDLINCL"
  2234. ])# AC_LIBLTDL_INSTALLABLE
  2235. # AC_LIBTOOL_CXX
  2236. # --------------
  2237. # enable support for C++ libraries
  2238. AC_DEFUN([AC_LIBTOOL_CXX],
  2239. [AC_REQUIRE([_LT_AC_LANG_CXX])
  2240. ])# AC_LIBTOOL_CXX
  2241. # _LT_AC_LANG_CXX
  2242. # ---------------
  2243. AC_DEFUN([_LT_AC_LANG_CXX],
  2244. [AC_REQUIRE([AC_PROG_CXX])
  2245. AC_REQUIRE([_LT_AC_PROG_CXXCPP])
  2246. _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
  2247. ])# _LT_AC_LANG_CXX
  2248. # _LT_AC_PROG_CXXCPP
  2249. # ---------------
  2250. AC_DEFUN([_LT_AC_PROG_CXXCPP],
  2251. [
  2252. AC_REQUIRE([AC_PROG_CXX])
  2253. if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
  2254. ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
  2255. (test "X$CXX" != "Xg++"))) ; then
  2256. AC_PROG_CXXCPP
  2257. fi
  2258. ])# _LT_AC_PROG_CXXCPP
  2259. # AC_LIBTOOL_F77
  2260. # --------------
  2261. # enable support for Fortran 77 libraries
  2262. AC_DEFUN([AC_LIBTOOL_F77],
  2263. [AC_REQUIRE([_LT_AC_LANG_F77])
  2264. ])# AC_LIBTOOL_F77
  2265. # _LT_AC_LANG_F77
  2266. # ---------------
  2267. AC_DEFUN([_LT_AC_LANG_F77],
  2268. [AC_REQUIRE([AC_PROG_F77])
  2269. _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
  2270. ])# _LT_AC_LANG_F77
  2271. # AC_LIBTOOL_GCJ
  2272. # --------------
  2273. # enable support for GCJ libraries
  2274. AC_DEFUN([AC_LIBTOOL_GCJ],
  2275. [AC_REQUIRE([_LT_AC_LANG_GCJ])
  2276. ])# AC_LIBTOOL_GCJ
  2277. # _LT_AC_LANG_GCJ
  2278. # ---------------
  2279. AC_DEFUN([_LT_AC_LANG_GCJ],
  2280. [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
  2281. [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
  2282. [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
  2283. [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
  2284. [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
  2285. [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
  2286. _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
  2287. ])# _LT_AC_LANG_GCJ
  2288. # AC_LIBTOOL_RC
  2289. # --------------
  2290. # enable support for Windows resource files
  2291. AC_DEFUN([AC_LIBTOOL_RC],
  2292. [AC_REQUIRE([LT_AC_PROG_RC])
  2293. _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
  2294. ])# AC_LIBTOOL_RC
  2295. # AC_LIBTOOL_LANG_C_CONFIG
  2296. # ------------------------
  2297. # Ensure that the configuration vars for the C compiler are
  2298. # suitably defined. Those variables are subsequently used by
  2299. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  2300. AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
  2301. AC_DEFUN([_LT_AC_LANG_C_CONFIG],
  2302. [lt_save_CC="$CC"
  2303. AC_LANG_PUSH(C)
  2304. # Source file extension for C test sources.
  2305. ac_ext=c
  2306. # Object file extension for compiled C test sources.
  2307. objext=o
  2308. _LT_AC_TAGVAR(objext, $1)=$objext
  2309. # Code to be used in simple compile tests
  2310. lt_simple_compile_test_code="int some_variable = 0;\n"
  2311. # Code to be used in simple link tests
  2312. lt_simple_link_test_code='int main(){return(0);}\n'
  2313. _LT_AC_SYS_COMPILER
  2314. # save warnings/boilerplate of simple test code
  2315. _LT_COMPILER_BOILERPLATE
  2316. _LT_LINKER_BOILERPLATE
  2317. #
  2318. # Check for any special shared library compilation flags.
  2319. #
  2320. _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
  2321. if test "$GCC" = no; then
  2322. case $host_os in
  2323. sco3.2v5*)
  2324. _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
  2325. ;;
  2326. esac
  2327. fi
  2328. if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
  2329. AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
  2330. if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
  2331. else
  2332. AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
  2333. _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
  2334. fi
  2335. fi
  2336. #
  2337. # Check to make sure the static flag actually works.
  2338. #
  2339. AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
  2340. _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
  2341. $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
  2342. [],
  2343. [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
  2344. AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
  2345. AC_LIBTOOL_PROG_COMPILER_PIC($1)
  2346. AC_LIBTOOL_PROG_CC_C_O($1)
  2347. AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
  2348. AC_LIBTOOL_PROG_LD_SHLIBS($1)
  2349. AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  2350. AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  2351. AC_LIBTOOL_SYS_LIB_STRIP
  2352. AC_LIBTOOL_DLOPEN_SELF($1)
  2353. # Report which librarie types wil actually be built
  2354. AC_MSG_CHECKING([if libtool supports shared libraries])
  2355. AC_MSG_RESULT([$can_build_shared])
  2356. AC_MSG_CHECKING([whether to build shared libraries])
  2357. test "$can_build_shared" = "no" && enable_shared=no
  2358. # On AIX, shared libraries and static libraries use the same namespace, and
  2359. # are all built from PIC.
  2360. case "$host_os" in
  2361. aix3*)
  2362. test "$enable_shared" = yes && enable_static=no
  2363. if test -n "$RANLIB"; then
  2364. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  2365. postinstall_cmds='$RANLIB $lib'
  2366. fi
  2367. ;;
  2368. aix4* | aix5*)
  2369. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  2370. test "$enable_shared" = yes && enable_static=no
  2371. fi
  2372. ;;
  2373. esac
  2374. AC_MSG_RESULT([$enable_shared])
  2375. AC_MSG_CHECKING([whether to build static libraries])
  2376. # Make sure either enable_shared or enable_static is yes.
  2377. test "$enable_shared" = yes || enable_static=yes
  2378. AC_MSG_RESULT([$enable_static])
  2379. AC_LIBTOOL_CONFIG($1)
  2380. AC_LANG_POP
  2381. CC="$lt_save_CC"
  2382. ])# AC_LIBTOOL_LANG_C_CONFIG
  2383. # AC_LIBTOOL_LANG_CXX_CONFIG
  2384. # --------------------------
  2385. # Ensure that the configuration vars for the C compiler are
  2386. # suitably defined. Those variables are subsequently used by
  2387. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  2388. AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
  2389. AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
  2390. [AC_LANG_PUSH(C++)
  2391. AC_REQUIRE([AC_PROG_CXX])
  2392. AC_REQUIRE([_LT_AC_PROG_CXXCPP])
  2393. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  2394. _LT_AC_TAGVAR(allow_undefined_flag, $1)=
  2395. _LT_AC_TAGVAR(always_export_symbols, $1)=no
  2396. _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
  2397. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
  2398. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  2399. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
  2400. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  2401. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  2402. _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
  2403. _LT_AC_TAGVAR(hardcode_automatic, $1)=no
  2404. _LT_AC_TAGVAR(module_cmds, $1)=
  2405. _LT_AC_TAGVAR(module_expsym_cmds, $1)=
  2406. _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
  2407. _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  2408. _LT_AC_TAGVAR(no_undefined_flag, $1)=
  2409. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  2410. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  2411. # Dependencies to place before and after the object being linked:
  2412. _LT_AC_TAGVAR(predep_objects, $1)=
  2413. _LT_AC_TAGVAR(postdep_objects, $1)=
  2414. _LT_AC_TAGVAR(predeps, $1)=
  2415. _LT_AC_TAGVAR(postdeps, $1)=
  2416. _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
  2417. # Source file extension for C++ test sources.
  2418. ac_ext=cc
  2419. # Object file extension for compiled C++ test sources.
  2420. objext=o
  2421. _LT_AC_TAGVAR(objext, $1)=$objext
  2422. # Code to be used in simple compile tests
  2423. lt_simple_compile_test_code="int some_variable = 0;\n"
  2424. # Code to be used in simple link tests
  2425. lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
  2426. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  2427. _LT_AC_SYS_COMPILER
  2428. # save warnings/boilerplate of simple test code
  2429. _LT_COMPILER_BOILERPLATE
  2430. _LT_LINKER_BOILERPLATE
  2431. # Allow CC to be a program name with arguments.
  2432. lt_save_CC=$CC
  2433. lt_save_LD=$LD
  2434. lt_save_GCC=$GCC
  2435. GCC=$GXX
  2436. lt_save_with_gnu_ld=$with_gnu_ld
  2437. lt_save_path_LD=$lt_cv_path_LD
  2438. if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
  2439. lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
  2440. else
  2441. unset lt_cv_prog_gnu_ld
  2442. fi
  2443. if test -n "${lt_cv_path_LDCXX+set}"; then
  2444. lt_cv_path_LD=$lt_cv_path_LDCXX
  2445. else
  2446. unset lt_cv_path_LD
  2447. fi
  2448. test -z "${LDCXX+set}" || LD=$LDCXX
  2449. CC=${CXX-"c++"}
  2450. compiler=$CC
  2451. _LT_AC_TAGVAR(compiler, $1)=$CC
  2452. _LT_CC_BASENAME([$compiler])
  2453. # We don't want -fno-exception wen compiling C++ code, so set the
  2454. # no_builtin_flag separately
  2455. if test "$GXX" = yes; then
  2456. _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  2457. else
  2458. _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  2459. fi
  2460. if test "$GXX" = yes; then
  2461. # Set up default GNU C++ configuration
  2462. AC_PROG_LD
  2463. # Check if GNU C++ uses GNU ld as the underlying linker, since the
  2464. # archiving commands below assume that GNU ld is being used.
  2465. if test "$with_gnu_ld" = yes; then
  2466. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  2467. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  2468. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
  2469. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  2470. # If archive_cmds runs LD, not CC, wlarc should be empty
  2471. # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
  2472. # investigate it a little bit more. (MM)
  2473. wlarc='${wl}'
  2474. # ancient GNU ld didn't support --whole-archive et. al.
  2475. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
  2476. grep 'no-whole-archive' > /dev/null; then
  2477. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  2478. else
  2479. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  2480. fi
  2481. else
  2482. with_gnu_ld=no
  2483. wlarc=
  2484. # A generic and very simple default shared library creation
  2485. # command for GNU C++ for the case where it uses the native
  2486. # linker, instead of GNU ld. If possible, this setting should
  2487. # overridden to take advantage of the native linker features on
  2488. # the platform it is being used on.
  2489. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  2490. fi
  2491. # Commands to make compiler produce verbose output that lists
  2492. # what "hidden" libraries, object files and flags are used when
  2493. # linking a shared library.
  2494. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
  2495. else
  2496. GXX=no
  2497. with_gnu_ld=no
  2498. wlarc=
  2499. fi
  2500. # PORTME: fill in a description of your system's C++ link characteristics
  2501. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  2502. _LT_AC_TAGVAR(ld_shlibs, $1)=yes
  2503. case $host_os in
  2504. aix3*)
  2505. # FIXME: insert proper C++ library support
  2506. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2507. ;;
  2508. aix4* | aix5*)
  2509. if test "$host_cpu" = ia64; then
  2510. # On IA64, the linker does run time linking by default, so we don't
  2511. # have to do anything special.
  2512. aix_use_runtimelinking=no
  2513. exp_sym_flag='-Bexport'
  2514. no_entry_flag=""
  2515. else
  2516. aix_use_runtimelinking=no
  2517. # Test if we are trying to use run time linking or normal
  2518. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  2519. # need to do runtime linking.
  2520. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
  2521. for ld_flag in $LDFLAGS; do
  2522. case $ld_flag in
  2523. *-brtl*)
  2524. aix_use_runtimelinking=yes
  2525. break
  2526. ;;
  2527. esac
  2528. done
  2529. esac
  2530. exp_sym_flag='-bexport'
  2531. no_entry_flag='-bnoentry'
  2532. fi
  2533. # When large executables or shared objects are built, AIX ld can
  2534. # have problems creating the table of contents. If linking a library
  2535. # or program results in "error TOC overflow" add -mminimal-toc to
  2536. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  2537. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  2538. _LT_AC_TAGVAR(archive_cmds, $1)=''
  2539. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  2540. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
  2541. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  2542. if test "$GXX" = yes; then
  2543. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  2544. # We only want to do this on AIX 4.2 and lower, the check
  2545. # below for broken collect2 doesn't work under 4.3+
  2546. collect2name=`${CC} -print-prog-name=collect2`
  2547. if test -f "$collect2name" && \
  2548. strings "$collect2name" | grep resolve_lib_name >/dev/null
  2549. then
  2550. # We have reworked collect2
  2551. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  2552. else
  2553. # We have old collect2
  2554. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
  2555. # It fails to find uninstalled libraries when the uninstalled
  2556. # path is not listed in the libpath. Setting hardcode_minus_L
  2557. # to unsupported forces relinking
  2558. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  2559. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  2560. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  2561. fi
  2562. esac
  2563. shared_flag='-shared'
  2564. if test "$aix_use_runtimelinking" = yes; then
  2565. shared_flag="$shared_flag "'${wl}-G'
  2566. fi
  2567. else
  2568. # not using gcc
  2569. if test "$host_cpu" = ia64; then
  2570. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  2571. # chokes on -Wl,-G. The following line is correct:
  2572. shared_flag='-G'
  2573. else
  2574. if test "$aix_use_runtimelinking" = yes; then
  2575. shared_flag='${wl}-G'
  2576. else
  2577. shared_flag='${wl}-bM:SRE'
  2578. fi
  2579. fi
  2580. fi
  2581. # It seems that -bexpall does not export symbols beginning with
  2582. # underscore (_), so it is better to generate a list of symbols to export.
  2583. _LT_AC_TAGVAR(always_export_symbols, $1)=yes
  2584. if test "$aix_use_runtimelinking" = yes; then
  2585. # Warning - without using the other runtime loading flags (-brtl),
  2586. # -berok will link without error, but may produce a broken library.
  2587. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
  2588. # Determine the default libpath from the value encoded in an empty executable.
  2589. _LT_AC_SYS_LIBPATH_AIX
  2590. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  2591. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
  2592. else
  2593. if test "$host_cpu" = ia64; then
  2594. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  2595. _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  2596. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
  2597. else
  2598. # Determine the default libpath from the value encoded in an empty executable.
  2599. _LT_AC_SYS_LIBPATH_AIX
  2600. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  2601. # Warning - without using the other run time loading flags,
  2602. # -berok will link without error, but may produce a broken library.
  2603. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  2604. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  2605. # -bexpall does not export symbols beginning with underscore (_)
  2606. _LT_AC_TAGVAR(always_export_symbols, $1)=yes
  2607. # Exported symbols can be pulled into shared objects from archives
  2608. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
  2609. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
  2610. # This is similar to how AIX traditionally builds it's shared libraries.
  2611. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
  2612. fi
  2613. fi
  2614. ;;
  2615. chorus*)
  2616. case $cc_basename in
  2617. *)
  2618. # FIXME: insert proper C++ library support
  2619. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2620. ;;
  2621. esac
  2622. ;;
  2623. cygwin* | mingw* | pw32*)
  2624. # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  2625. # as there is no search path for DLLs.
  2626. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  2627. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  2628. _LT_AC_TAGVAR(always_export_symbols, $1)=no
  2629. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  2630. if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
  2631. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
  2632. # If the export-symbols file already is a .def file (1st line
  2633. # is EXPORTS), use it as is; otherwise, prepend...
  2634. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  2635. cp $export_symbols $output_objdir/$soname.def;
  2636. else
  2637. echo EXPORTS > $output_objdir/$soname.def;
  2638. cat $export_symbols >> $output_objdir/$soname.def;
  2639. fi~
  2640. $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
  2641. else
  2642. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2643. fi
  2644. ;;
  2645. darwin* | rhapsody*)
  2646. case "$host_os" in
  2647. rhapsody* | darwin1.[[012]])
  2648. _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
  2649. ;;
  2650. *) # Darwin 1.3 on
  2651. if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
  2652. _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
  2653. else
  2654. case ${MACOSX_DEPLOYMENT_TARGET} in
  2655. 10.[[012]])
  2656. _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
  2657. ;;
  2658. 10.*)
  2659. _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
  2660. ;;
  2661. esac
  2662. fi
  2663. ;;
  2664. esac
  2665. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  2666. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  2667. _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
  2668. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  2669. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
  2670. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  2671. if test "$GXX" = yes ; then
  2672. lt_int_apple_cc_single_mod=no
  2673. output_verbose_link_cmd='echo'
  2674. if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
  2675. lt_int_apple_cc_single_mod=yes
  2676. fi
  2677. if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
  2678. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
  2679. else
  2680. _LT_AC_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'
  2681. fi
  2682. _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
  2683. # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
  2684. if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
  2685. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  2686. else
  2687. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  2688. fi
  2689. _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  2690. else
  2691. case $cc_basename in
  2692. xlc*)
  2693. output_verbose_link_cmd='echo'
  2694. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
  2695. _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
  2696. # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
  2697. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  2698. _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  2699. ;;
  2700. *)
  2701. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2702. ;;
  2703. esac
  2704. fi
  2705. ;;
  2706. dgux*)
  2707. case $cc_basename in
  2708. ec++*)
  2709. # FIXME: insert proper C++ library support
  2710. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2711. ;;
  2712. ghcx*)
  2713. # Green Hills C++ Compiler
  2714. # FIXME: insert proper C++ library support
  2715. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2716. ;;
  2717. *)
  2718. # FIXME: insert proper C++ library support
  2719. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2720. ;;
  2721. esac
  2722. ;;
  2723. freebsd[[12]]*)
  2724. # C++ shared libraries reported to be fairly broken before switch to ELF
  2725. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2726. ;;
  2727. freebsd-elf*)
  2728. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  2729. ;;
  2730. freebsd* | kfreebsd*-gnu | dragonfly*)
  2731. # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
  2732. # conventions
  2733. _LT_AC_TAGVAR(ld_shlibs, $1)=yes
  2734. ;;
  2735. gnu*)
  2736. ;;
  2737. hpux9*)
  2738. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  2739. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  2740. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  2741. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  2742. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  2743. # but as the default
  2744. # location of the library.
  2745. case $cc_basename in
  2746. CC*)
  2747. # FIXME: insert proper C++ library support
  2748. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2749. ;;
  2750. aCC*)
  2751. _LT_AC_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'
  2752. # Commands to make compiler produce verbose output that lists
  2753. # what "hidden" libraries, object files and flags are used when
  2754. # linking a shared library.
  2755. #
  2756. # There doesn't appear to be a way to prevent this compiler from
  2757. # explicitly linking system object files so we need to strip them
  2758. # from the output so that they don't get included in the library
  2759. # dependencies.
  2760. 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; echo $list'
  2761. ;;
  2762. *)
  2763. if test "$GXX" = yes; then
  2764. _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${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'
  2765. else
  2766. # FIXME: insert proper C++ library support
  2767. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2768. fi
  2769. ;;
  2770. esac
  2771. ;;
  2772. hpux10*|hpux11*)
  2773. if test $with_gnu_ld = no; then
  2774. case "$host_cpu" in
  2775. hppa*64*)
  2776. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  2777. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
  2778. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  2779. ;;
  2780. ia64*)
  2781. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  2782. ;;
  2783. *)
  2784. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  2785. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  2786. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  2787. ;;
  2788. esac
  2789. fi
  2790. case "$host_cpu" in
  2791. hppa*64*)
  2792. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  2793. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  2794. ;;
  2795. ia64*)
  2796. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  2797. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  2798. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  2799. # but as the default
  2800. # location of the library.
  2801. ;;
  2802. *)
  2803. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  2804. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  2805. # but as the default
  2806. # location of the library.
  2807. ;;
  2808. esac
  2809. case $cc_basename in
  2810. CC*)
  2811. # FIXME: insert proper C++ library support
  2812. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2813. ;;
  2814. aCC*)
  2815. case "$host_cpu" in
  2816. hppa*64*|ia64*)
  2817. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
  2818. ;;
  2819. *)
  2820. _LT_AC_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'
  2821. ;;
  2822. esac
  2823. # Commands to make compiler produce verbose output that lists
  2824. # what "hidden" libraries, object files and flags are used when
  2825. # linking a shared library.
  2826. #
  2827. # There doesn't appear to be a way to prevent this compiler from
  2828. # explicitly linking system object files so we need to strip them
  2829. # from the output so that they don't get included in the library
  2830. # dependencies.
  2831. 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; echo $list'
  2832. ;;
  2833. *)
  2834. if test "$GXX" = yes; then
  2835. if test $with_gnu_ld = no; then
  2836. case "$host_cpu" in
  2837. ia64*|hppa*64*)
  2838. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
  2839. ;;
  2840. *)
  2841. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  2842. ;;
  2843. esac
  2844. fi
  2845. else
  2846. # FIXME: insert proper C++ library support
  2847. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2848. fi
  2849. ;;
  2850. esac
  2851. ;;
  2852. irix5* | irix6*)
  2853. case $cc_basename in
  2854. CC*)
  2855. # SGI C++
  2856. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  2857. # Archives containing C++ object files must be created using
  2858. # "CC -ar", where "CC" is the IRIX C++ compiler. This is
  2859. # necessary to make sure instantiated templates are included
  2860. # in the archive.
  2861. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
  2862. ;;
  2863. *)
  2864. if test "$GXX" = yes; then
  2865. if test "$with_gnu_ld" = no; then
  2866. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  2867. else
  2868. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
  2869. fi
  2870. fi
  2871. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  2872. ;;
  2873. esac
  2874. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  2875. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  2876. ;;
  2877. linux*)
  2878. case $cc_basename in
  2879. KCC*)
  2880. # Kuck and Associates, Inc. (KAI) C++ Compiler
  2881. # KCC will only create a shared library if the output file
  2882. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  2883. # to its proper name (with version) after linking.
  2884. _LT_AC_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'
  2885. _LT_AC_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'
  2886. # Commands to make compiler produce verbose output that lists
  2887. # what "hidden" libraries, object files and flags are used when
  2888. # linking a shared library.
  2889. #
  2890. # There doesn't appear to be a way to prevent this compiler from
  2891. # explicitly linking system object files so we need to strip them
  2892. # from the output so that they don't get included in the library
  2893. # dependencies.
  2894. 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; echo $list'
  2895. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
  2896. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  2897. # Archives containing C++ object files must be created using
  2898. # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  2899. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  2900. ;;
  2901. icpc*)
  2902. # Intel C++
  2903. with_gnu_ld=yes
  2904. # version 8.0 and above of icpc choke on multiply defined symbols
  2905. # if we add $predep_objects and $postdep_objects, however 7.1 and
  2906. # earlier do not add the objects themselves.
  2907. case `$CC -V 2>&1` in
  2908. *"Version 7."*)
  2909. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  2910. _LT_AC_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'
  2911. ;;
  2912. *) # Version 8.0 or newer
  2913. tmp_idyn=
  2914. case $host_cpu in
  2915. ia64*) tmp_idyn=' -i_dynamic';;
  2916. esac
  2917. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  2918. _LT_AC_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'
  2919. ;;
  2920. esac
  2921. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  2922. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  2923. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  2924. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  2925. ;;
  2926. pgCC*)
  2927. # Portland Group C++ compiler
  2928. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
  2929. _LT_AC_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'
  2930. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
  2931. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  2932. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive,`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
  2933. ;;
  2934. cxx*)
  2935. # Compaq C++
  2936. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  2937. _LT_AC_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'
  2938. runpath_var=LD_RUN_PATH
  2939. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  2940. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  2941. # Commands to make compiler produce verbose output that lists
  2942. # what "hidden" libraries, object files and flags are used when
  2943. # linking a shared library.
  2944. #
  2945. # There doesn't appear to be a way to prevent this compiler from
  2946. # explicitly linking system object files so we need to strip them
  2947. # from the output so that they don't get included in the library
  2948. # dependencies.
  2949. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $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; echo $list'
  2950. ;;
  2951. esac
  2952. ;;
  2953. lynxos*)
  2954. # FIXME: insert proper C++ library support
  2955. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2956. ;;
  2957. m88k*)
  2958. # FIXME: insert proper C++ library support
  2959. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2960. ;;
  2961. mvs*)
  2962. case $cc_basename in
  2963. cxx*)
  2964. # FIXME: insert proper C++ library support
  2965. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2966. ;;
  2967. *)
  2968. # FIXME: insert proper C++ library support
  2969. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2970. ;;
  2971. esac
  2972. ;;
  2973. netbsd*)
  2974. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  2975. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
  2976. wlarc=
  2977. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  2978. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  2979. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  2980. fi
  2981. # Workaround some broken pre-1.5 toolchains
  2982. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
  2983. ;;
  2984. openbsd2*)
  2985. # C++ shared libraries are fairly broken
  2986. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2987. ;;
  2988. openbsd*)
  2989. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  2990. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  2991. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  2992. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  2993. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  2994. _LT_AC_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'
  2995. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  2996. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  2997. fi
  2998. output_verbose_link_cmd='echo'
  2999. ;;
  3000. osf3*)
  3001. case $cc_basename in
  3002. KCC*)
  3003. # Kuck and Associates, Inc. (KAI) C++ Compiler
  3004. # KCC will only create a shared library if the output file
  3005. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  3006. # to its proper name (with version) after linking.
  3007. _LT_AC_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'
  3008. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  3009. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3010. # Archives containing C++ object files must be created using
  3011. # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  3012. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  3013. ;;
  3014. RCC*)
  3015. # Rational C++ 2.4.1
  3016. # FIXME: insert proper C++ library support
  3017. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3018. ;;
  3019. cxx*)
  3020. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  3021. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  3022. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  3023. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3024. # Commands to make compiler produce verbose output that lists
  3025. # what "hidden" libraries, object files and flags are used when
  3026. # linking a shared library.
  3027. #
  3028. # There doesn't appear to be a way to prevent this compiler from
  3029. # explicitly linking system object files so we need to strip them
  3030. # from the output so that they don't get included in the library
  3031. # dependencies.
  3032. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list'
  3033. ;;
  3034. *)
  3035. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  3036. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  3037. _LT_AC_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" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  3038. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  3039. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3040. # Commands to make compiler produce verbose output that lists
  3041. # what "hidden" libraries, object files and flags are used when
  3042. # linking a shared library.
  3043. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
  3044. else
  3045. # FIXME: insert proper C++ library support
  3046. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3047. fi
  3048. ;;
  3049. esac
  3050. ;;
  3051. osf4* | osf5*)
  3052. case $cc_basename in
  3053. KCC*)
  3054. # Kuck and Associates, Inc. (KAI) C++ Compiler
  3055. # KCC will only create a shared library if the output file
  3056. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  3057. # to its proper name (with version) after linking.
  3058. _LT_AC_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'
  3059. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  3060. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3061. # Archives containing C++ object files must be created using
  3062. # the KAI C++ compiler.
  3063. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
  3064. ;;
  3065. RCC*)
  3066. # Rational C++ 2.4.1
  3067. # FIXME: insert proper C++ library support
  3068. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3069. ;;
  3070. cxx*)
  3071. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  3072. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  3073. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
  3074. echo "-hidden">> $lib.exp~
  3075. $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~
  3076. $rm $lib.exp'
  3077. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  3078. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3079. # Commands to make compiler produce verbose output that lists
  3080. # what "hidden" libraries, object files and flags are used when
  3081. # linking a shared library.
  3082. #
  3083. # There doesn't appear to be a way to prevent this compiler from
  3084. # explicitly linking system object files so we need to strip them
  3085. # from the output so that they don't get included in the library
  3086. # dependencies.
  3087. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list'
  3088. ;;
  3089. *)
  3090. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  3091. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  3092. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  3093. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  3094. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3095. # Commands to make compiler produce verbose output that lists
  3096. # what "hidden" libraries, object files and flags are used when
  3097. # linking a shared library.
  3098. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
  3099. else
  3100. # FIXME: insert proper C++ library support
  3101. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3102. fi
  3103. ;;
  3104. esac
  3105. ;;
  3106. psos*)
  3107. # FIXME: insert proper C++ library support
  3108. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3109. ;;
  3110. sco*)
  3111. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  3112. case $cc_basename in
  3113. CC*)
  3114. # FIXME: insert proper C++ library support
  3115. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3116. ;;
  3117. *)
  3118. # FIXME: insert proper C++ library support
  3119. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3120. ;;
  3121. esac
  3122. ;;
  3123. sunos4*)
  3124. case $cc_basename in
  3125. CC*)
  3126. # Sun C++ 4.x
  3127. # FIXME: insert proper C++ library support
  3128. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3129. ;;
  3130. lcc*)
  3131. # Lucid
  3132. # FIXME: insert proper C++ library support
  3133. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3134. ;;
  3135. *)
  3136. # FIXME: insert proper C++ library support
  3137. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3138. ;;
  3139. esac
  3140. ;;
  3141. solaris*)
  3142. case $cc_basename in
  3143. CC*)
  3144. # Sun C++ 4.2, 5.x and Centerline C++
  3145. _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  3146. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  3147. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  3148. $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
  3149. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  3150. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  3151. case $host_os in
  3152. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  3153. *)
  3154. # The C++ compiler is used as linker so we must use $wl
  3155. # flag to pass the commands to the underlying system
  3156. # linker. We must also pass each convience library through
  3157. # to the system linker between allextract/defaultextract.
  3158. # The C++ compiler will combine linker options so we
  3159. # cannot just pass the convience library names through
  3160. # without $wl.
  3161. # Supported since Solaris 2.6 (maybe 2.5.1?)
  3162. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
  3163. ;;
  3164. esac
  3165. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  3166. # Commands to make compiler produce verbose output that lists
  3167. # what "hidden" libraries, object files and flags are used when
  3168. # linking a shared library.
  3169. #
  3170. # There doesn't appear to be a way to prevent this compiler from
  3171. # explicitly linking system object files so we need to strip them
  3172. # from the output so that they don't get included in the library
  3173. # dependencies.
  3174. output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
  3175. # Archives containing C++ object files must be created using
  3176. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  3177. # necessary to make sure instantiated templates are included
  3178. # in the archive.
  3179. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  3180. ;;
  3181. gcx*)
  3182. # Green Hills C++ Compiler
  3183. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  3184. # The C++ compiler must be used to create the archive.
  3185. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
  3186. ;;
  3187. *)
  3188. # GNU C++ compiler with Solaris linker
  3189. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  3190. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
  3191. if $CC --version | grep -v '^2\.7' > /dev/null; then
  3192. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  3193. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  3194. $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
  3195. # Commands to make compiler produce verbose output that lists
  3196. # what "hidden" libraries, object files and flags are used when
  3197. # linking a shared library.
  3198. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
  3199. else
  3200. # g++ 2.7 appears to require `-G' NOT `-shared' on this
  3201. # platform.
  3202. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  3203. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  3204. $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
  3205. # Commands to make compiler produce verbose output that lists
  3206. # what "hidden" libraries, object files and flags are used when
  3207. # linking a shared library.
  3208. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
  3209. fi
  3210. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
  3211. fi
  3212. ;;
  3213. esac
  3214. ;;
  3215. sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
  3216. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  3217. ;;
  3218. tandem*)
  3219. case $cc_basename in
  3220. NCC*)
  3221. # NonStop-UX NCC 3.20
  3222. # FIXME: insert proper C++ library support
  3223. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3224. ;;
  3225. *)
  3226. # FIXME: insert proper C++ library support
  3227. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3228. ;;
  3229. esac
  3230. ;;
  3231. vxworks*)
  3232. # FIXME: insert proper C++ library support
  3233. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3234. ;;
  3235. *)
  3236. # FIXME: insert proper C++ library support
  3237. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3238. ;;
  3239. esac
  3240. AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
  3241. test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  3242. _LT_AC_TAGVAR(GCC, $1)="$GXX"
  3243. _LT_AC_TAGVAR(LD, $1)="$LD"
  3244. AC_LIBTOOL_POSTDEP_PREDEP($1)
  3245. AC_LIBTOOL_PROG_COMPILER_PIC($1)
  3246. AC_LIBTOOL_PROG_CC_C_O($1)
  3247. AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
  3248. AC_LIBTOOL_PROG_LD_SHLIBS($1)
  3249. AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  3250. AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  3251. AC_LIBTOOL_SYS_LIB_STRIP
  3252. AC_LIBTOOL_DLOPEN_SELF($1)
  3253. AC_LIBTOOL_CONFIG($1)
  3254. AC_LANG_POP
  3255. CC=$lt_save_CC
  3256. LDCXX=$LD
  3257. LD=$lt_save_LD
  3258. GCC=$lt_save_GCC
  3259. with_gnu_ldcxx=$with_gnu_ld
  3260. with_gnu_ld=$lt_save_with_gnu_ld
  3261. lt_cv_path_LDCXX=$lt_cv_path_LD
  3262. lt_cv_path_LD=$lt_save_path_LD
  3263. lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
  3264. lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
  3265. ])# AC_LIBTOOL_LANG_CXX_CONFIG
  3266. # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
  3267. # ------------------------
  3268. # Figure out "hidden" library dependencies from verbose
  3269. # compiler output when linking a shared library.
  3270. # Parse the compiler output and extract the necessary
  3271. # objects, libraries and library flags.
  3272. AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
  3273. dnl we can't use the lt_simple_compile_test_code here,
  3274. dnl because it contains code intended for an executable,
  3275. dnl not a library. It's possible we should let each
  3276. dnl tag define a new lt_????_link_test_code variable,
  3277. dnl but it's only used here...
  3278. ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
  3279. int a;
  3280. void foo (void) { a = 0; }
  3281. EOF
  3282. ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
  3283. class Foo
  3284. {
  3285. public:
  3286. Foo (void) { a = 0; }
  3287. private:
  3288. int a;
  3289. };
  3290. EOF
  3291. ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
  3292. subroutine foo
  3293. implicit none
  3294. integer*4 a
  3295. a=0
  3296. return
  3297. end
  3298. EOF
  3299. ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
  3300. public class foo {
  3301. private int a;
  3302. public void bar (void) {
  3303. a = 0;
  3304. }
  3305. };
  3306. EOF
  3307. ])
  3308. dnl Parse the compiler output and extract the necessary
  3309. dnl objects, libraries and library flags.
  3310. if AC_TRY_EVAL(ac_compile); then
  3311. # Parse the compiler output and extract the necessary
  3312. # objects, libraries and library flags.
  3313. # Sentinel used to keep track of whether or not we are before
  3314. # the conftest object file.
  3315. pre_test_object_deps_done=no
  3316. # The `*' in the case matches for architectures that use `case' in
  3317. # $output_verbose_cmd can trigger glob expansion during the loop
  3318. # eval without this substitution.
  3319. output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
  3320. for p in `eval $output_verbose_link_cmd`; do
  3321. case $p in
  3322. -L* | -R* | -l*)
  3323. # Some compilers place space between "-{L,R}" and the path.
  3324. # Remove the space.
  3325. if test $p = "-L" \
  3326. || test $p = "-R"; then
  3327. prev=$p
  3328. continue
  3329. else
  3330. prev=
  3331. fi
  3332. if test "$pre_test_object_deps_done" = no; then
  3333. case $p in
  3334. -L* | -R*)
  3335. # Internal compiler library paths should come after those
  3336. # provided the user. The postdeps already come after the
  3337. # user supplied libs so there is no need to process them.
  3338. if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
  3339. _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
  3340. else
  3341. _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
  3342. fi
  3343. ;;
  3344. # The "-l" case would never come before the object being
  3345. # linked, so don't bother handling this case.
  3346. esac
  3347. else
  3348. if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
  3349. _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
  3350. else
  3351. _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
  3352. fi
  3353. fi
  3354. ;;
  3355. *.$objext)
  3356. # This assumes that the test object file only shows up
  3357. # once in the compiler output.
  3358. if test "$p" = "conftest.$objext"; then
  3359. pre_test_object_deps_done=yes
  3360. continue
  3361. fi
  3362. if test "$pre_test_object_deps_done" = no; then
  3363. if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
  3364. _LT_AC_TAGVAR(predep_objects, $1)="$p"
  3365. else
  3366. _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
  3367. fi
  3368. else
  3369. if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
  3370. _LT_AC_TAGVAR(postdep_objects, $1)="$p"
  3371. else
  3372. _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
  3373. fi
  3374. fi
  3375. ;;
  3376. *) ;; # Ignore the rest.
  3377. esac
  3378. done
  3379. # Clean up.
  3380. rm -f a.out a.exe
  3381. else
  3382. echo "libtool.m4: error: problem compiling $1 test program"
  3383. fi
  3384. $rm -f confest.$objext
  3385. case " $_LT_AC_TAGVAR(postdeps, $1) " in
  3386. *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
  3387. esac
  3388. ])# AC_LIBTOOL_POSTDEP_PREDEP
  3389. # AC_LIBTOOL_LANG_F77_CONFIG
  3390. # ------------------------
  3391. # Ensure that the configuration vars for the C compiler are
  3392. # suitably defined. Those variables are subsequently used by
  3393. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  3394. AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
  3395. AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
  3396. [AC_REQUIRE([AC_PROG_F77])
  3397. AC_LANG_PUSH(Fortran 77)
  3398. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  3399. _LT_AC_TAGVAR(allow_undefined_flag, $1)=
  3400. _LT_AC_TAGVAR(always_export_symbols, $1)=no
  3401. _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
  3402. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
  3403. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  3404. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
  3405. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  3406. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  3407. _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
  3408. _LT_AC_TAGVAR(hardcode_automatic, $1)=no
  3409. _LT_AC_TAGVAR(module_cmds, $1)=
  3410. _LT_AC_TAGVAR(module_expsym_cmds, $1)=
  3411. _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
  3412. _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  3413. _LT_AC_TAGVAR(no_undefined_flag, $1)=
  3414. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  3415. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  3416. # Source file extension for f77 test sources.
  3417. ac_ext=f
  3418. # Object file extension for compiled f77 test sources.
  3419. objext=o
  3420. _LT_AC_TAGVAR(objext, $1)=$objext
  3421. # Code to be used in simple compile tests
  3422. lt_simple_compile_test_code=" subroutine t\n return\n end\n"
  3423. # Code to be used in simple link tests
  3424. lt_simple_link_test_code=" program t\n end\n"
  3425. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  3426. _LT_AC_SYS_COMPILER
  3427. # save warnings/boilerplate of simple test code
  3428. _LT_COMPILER_BOILERPLATE
  3429. _LT_LINKER_BOILERPLATE
  3430. # Allow CC to be a program name with arguments.
  3431. lt_save_CC="$CC"
  3432. CC=${F77-"f77"}
  3433. compiler=$CC
  3434. _LT_AC_TAGVAR(compiler, $1)=$CC
  3435. _LT_CC_BASENAME([$compiler])
  3436. AC_MSG_CHECKING([if libtool supports shared libraries])
  3437. AC_MSG_RESULT([$can_build_shared])
  3438. AC_MSG_CHECKING([whether to build shared libraries])
  3439. test "$can_build_shared" = "no" && enable_shared=no
  3440. # On AIX, shared libraries and static libraries use the same namespace, and
  3441. # are all built from PIC.
  3442. case "$host_os" in
  3443. aix3*)
  3444. test "$enable_shared" = yes && enable_static=no
  3445. if test -n "$RANLIB"; then
  3446. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  3447. postinstall_cmds='$RANLIB $lib'
  3448. fi
  3449. ;;
  3450. aix4* | aix5*)
  3451. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  3452. test "$enable_shared" = yes && enable_static=no
  3453. fi
  3454. ;;
  3455. esac
  3456. AC_MSG_RESULT([$enable_shared])
  3457. AC_MSG_CHECKING([whether to build static libraries])
  3458. # Make sure either enable_shared or enable_static is yes.
  3459. test "$enable_shared" = yes || enable_static=yes
  3460. AC_MSG_RESULT([$enable_static])
  3461. test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  3462. _LT_AC_TAGVAR(GCC, $1)="$G77"
  3463. _LT_AC_TAGVAR(LD, $1)="$LD"
  3464. AC_LIBTOOL_PROG_COMPILER_PIC($1)
  3465. AC_LIBTOOL_PROG_CC_C_O($1)
  3466. AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
  3467. AC_LIBTOOL_PROG_LD_SHLIBS($1)
  3468. AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  3469. AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  3470. AC_LIBTOOL_SYS_LIB_STRIP
  3471. AC_LIBTOOL_CONFIG($1)
  3472. AC_LANG_POP
  3473. CC="$lt_save_CC"
  3474. ])# AC_LIBTOOL_LANG_F77_CONFIG
  3475. # AC_LIBTOOL_LANG_GCJ_CONFIG
  3476. # --------------------------
  3477. # Ensure that the configuration vars for the C compiler are
  3478. # suitably defined. Those variables are subsequently used by
  3479. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  3480. AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
  3481. AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
  3482. [AC_LANG_SAVE
  3483. # Source file extension for Java test sources.
  3484. ac_ext=java
  3485. # Object file extension for compiled Java test sources.
  3486. objext=o
  3487. _LT_AC_TAGVAR(objext, $1)=$objext
  3488. # Code to be used in simple compile tests
  3489. lt_simple_compile_test_code="class foo {}\n"
  3490. # Code to be used in simple link tests
  3491. lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
  3492. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  3493. _LT_AC_SYS_COMPILER
  3494. # save warnings/boilerplate of simple test code
  3495. _LT_COMPILER_BOILERPLATE
  3496. _LT_LINKER_BOILERPLATE
  3497. # Allow CC to be a program name with arguments.
  3498. lt_save_CC="$CC"
  3499. CC=${GCJ-"gcj"}
  3500. compiler=$CC
  3501. _LT_AC_TAGVAR(compiler, $1)=$CC
  3502. _LT_CC_BASENAME([$compiler])
  3503. # GCJ did not exist at the time GCC didn't implicitly link libc in.
  3504. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  3505. _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  3506. AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
  3507. AC_LIBTOOL_PROG_COMPILER_PIC($1)
  3508. AC_LIBTOOL_PROG_CC_C_O($1)
  3509. AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
  3510. AC_LIBTOOL_PROG_LD_SHLIBS($1)
  3511. AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  3512. AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  3513. AC_LIBTOOL_SYS_LIB_STRIP
  3514. AC_LIBTOOL_DLOPEN_SELF($1)
  3515. AC_LIBTOOL_CONFIG($1)
  3516. AC_LANG_RESTORE
  3517. CC="$lt_save_CC"
  3518. ])# AC_LIBTOOL_LANG_GCJ_CONFIG
  3519. # AC_LIBTOOL_LANG_RC_CONFIG
  3520. # --------------------------
  3521. # Ensure that the configuration vars for the Windows resource compiler are
  3522. # suitably defined. Those variables are subsequently used by
  3523. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  3524. AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
  3525. AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
  3526. [AC_LANG_SAVE
  3527. # Source file extension for RC test sources.
  3528. ac_ext=rc
  3529. # Object file extension for compiled RC test sources.
  3530. objext=o
  3531. _LT_AC_TAGVAR(objext, $1)=$objext
  3532. # Code to be used in simple compile tests
  3533. lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
  3534. # Code to be used in simple link tests
  3535. lt_simple_link_test_code="$lt_simple_compile_test_code"
  3536. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  3537. _LT_AC_SYS_COMPILER
  3538. # save warnings/boilerplate of simple test code
  3539. _LT_COMPILER_BOILERPLATE
  3540. _LT_LINKER_BOILERPLATE
  3541. # Allow CC to be a program name with arguments.
  3542. lt_save_CC="$CC"
  3543. CC=${RC-"windres"}
  3544. compiler=$CC
  3545. _LT_AC_TAGVAR(compiler, $1)=$CC
  3546. _LT_CC_BASENAME([$compiler])
  3547. _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  3548. AC_LIBTOOL_CONFIG($1)
  3549. AC_LANG_RESTORE
  3550. CC="$lt_save_CC"
  3551. ])# AC_LIBTOOL_LANG_RC_CONFIG
  3552. # AC_LIBTOOL_CONFIG([TAGNAME])
  3553. # ----------------------------
  3554. # If TAGNAME is not passed, then create an initial libtool script
  3555. # with a default configuration from the untagged config vars. Otherwise
  3556. # add code to config.status for appending the configuration named by
  3557. # TAGNAME from the matching tagged config vars.
  3558. AC_DEFUN([AC_LIBTOOL_CONFIG],
  3559. [# The else clause should only fire when bootstrapping the
  3560. # libtool distribution, otherwise you forgot to ship ltmain.sh
  3561. # with your package, and you will get complaints that there are
  3562. # no rules to generate ltmain.sh.
  3563. if test -f "$ltmain"; then
  3564. # See if we are running on zsh, and set the options which allow our commands through
  3565. # without removal of \ escapes.
  3566. if test -n "${ZSH_VERSION+set}" ; then
  3567. setopt NO_GLOB_SUBST
  3568. fi
  3569. # Now quote all the things that may contain metacharacters while being
  3570. # careful not to overquote the AC_SUBSTed values. We take copies of the
  3571. # variables and quote the copies for generation of the libtool script.
  3572. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
  3573. SED SHELL STRIP \
  3574. libname_spec library_names_spec soname_spec extract_expsyms_cmds \
  3575. old_striplib striplib file_magic_cmd finish_cmds finish_eval \
  3576. deplibs_check_method reload_flag reload_cmds need_locks \
  3577. lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
  3578. lt_cv_sys_global_symbol_to_c_name_address \
  3579. sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
  3580. old_postinstall_cmds old_postuninstall_cmds \
  3581. _LT_AC_TAGVAR(compiler, $1) \
  3582. _LT_AC_TAGVAR(CC, $1) \
  3583. _LT_AC_TAGVAR(LD, $1) \
  3584. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
  3585. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
  3586. _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
  3587. _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
  3588. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
  3589. _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
  3590. _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
  3591. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
  3592. _LT_AC_TAGVAR(old_archive_cmds, $1) \
  3593. _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
  3594. _LT_AC_TAGVAR(predep_objects, $1) \
  3595. _LT_AC_TAGVAR(postdep_objects, $1) \
  3596. _LT_AC_TAGVAR(predeps, $1) \
  3597. _LT_AC_TAGVAR(postdeps, $1) \
  3598. _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
  3599. _LT_AC_TAGVAR(archive_cmds, $1) \
  3600. _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
  3601. _LT_AC_TAGVAR(postinstall_cmds, $1) \
  3602. _LT_AC_TAGVAR(postuninstall_cmds, $1) \
  3603. _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
  3604. _LT_AC_TAGVAR(allow_undefined_flag, $1) \
  3605. _LT_AC_TAGVAR(no_undefined_flag, $1) \
  3606. _LT_AC_TAGVAR(export_symbols_cmds, $1) \
  3607. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
  3608. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
  3609. _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
  3610. _LT_AC_TAGVAR(hardcode_automatic, $1) \
  3611. _LT_AC_TAGVAR(module_cmds, $1) \
  3612. _LT_AC_TAGVAR(module_expsym_cmds, $1) \
  3613. _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
  3614. _LT_AC_TAGVAR(exclude_expsyms, $1) \
  3615. _LT_AC_TAGVAR(include_expsyms, $1); do
  3616. case $var in
  3617. _LT_AC_TAGVAR(old_archive_cmds, $1) | \
  3618. _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
  3619. _LT_AC_TAGVAR(archive_cmds, $1) | \
  3620. _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
  3621. _LT_AC_TAGVAR(module_cmds, $1) | \
  3622. _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
  3623. _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
  3624. _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
  3625. extract_expsyms_cmds | reload_cmds | finish_cmds | \
  3626. postinstall_cmds | postuninstall_cmds | \
  3627. old_postinstall_cmds | old_postuninstall_cmds | \
  3628. sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
  3629. # Double-quote double-evaled strings.
  3630. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
  3631. ;;
  3632. *)
  3633. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
  3634. ;;
  3635. esac
  3636. done
  3637. case $lt_echo in
  3638. *'\[$]0 --fallback-echo"')
  3639. lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
  3640. ;;
  3641. esac
  3642. ifelse([$1], [],
  3643. [cfgfile="${ofile}T"
  3644. trap "$rm \"$cfgfile\"; exit 1" 1 2 15
  3645. $rm -f "$cfgfile"
  3646. AC_MSG_NOTICE([creating $ofile])],
  3647. [cfgfile="$ofile"])
  3648. cat <<__EOF__ >> "$cfgfile"
  3649. ifelse([$1], [],
  3650. [#! $SHELL
  3651. # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
  3652. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
  3653. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  3654. #
  3655. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
  3656. # Free Software Foundation, Inc.
  3657. #
  3658. # This file is part of GNU Libtool:
  3659. # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  3660. #
  3661. # This program is free software; you can redistribute it and/or modify
  3662. # it under the terms of the GNU General Public License as published by
  3663. # the Free Software Foundation; either version 2 of the License, or
  3664. # (at your option) any later version.
  3665. #
  3666. # This program is distributed in the hope that it will be useful, but
  3667. # WITHOUT ANY WARRANTY; without even the implied warranty of
  3668. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  3669. # General Public License for more details.
  3670. #
  3671. # You should have received a copy of the GNU General Public License
  3672. # along with this program; if not, write to the Free Software
  3673. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  3674. #
  3675. # As a special exception to the GNU General Public License, if you
  3676. # distribute this file as part of a program that contains a
  3677. # configuration script generated by Autoconf, you may include it under
  3678. # the same distribution terms that you use for the rest of that program.
  3679. # A sed program that does not truncate output.
  3680. SED=$lt_SED
  3681. # Sed that helps us avoid accidentally triggering echo(1) options like -n.
  3682. Xsed="$SED -e 1s/^X//"
  3683. # The HP-UX ksh and POSIX shell print the target directory to stdout
  3684. # if CDPATH is set.
  3685. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  3686. # The names of the tagged configurations supported by this script.
  3687. available_tags=
  3688. # ### BEGIN LIBTOOL CONFIG],
  3689. [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
  3690. # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  3691. # Shell to use when invoking shell scripts.
  3692. SHELL=$lt_SHELL
  3693. # Whether or not to build shared libraries.
  3694. build_libtool_libs=$enable_shared
  3695. # Whether or not to build static libraries.
  3696. build_old_libs=$enable_static
  3697. # Whether or not to add -lc for building shared libraries.
  3698. build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
  3699. # Whether or not to disallow shared libs when runtime libs are static
  3700. allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
  3701. # Whether or not to optimize for fast installation.
  3702. fast_install=$enable_fast_install
  3703. # The host system.
  3704. host_alias=$host_alias
  3705. host=$host
  3706. host_os=$host_os
  3707. # The build system.
  3708. build_alias=$build_alias
  3709. build=$build
  3710. build_os=$build_os
  3711. # An echo program that does not interpret backslashes.
  3712. echo=$lt_echo
  3713. # The archiver.
  3714. AR=$lt_AR
  3715. AR_FLAGS=$lt_AR_FLAGS
  3716. # A C compiler.
  3717. LTCC=$lt_LTCC
  3718. # A language-specific compiler.
  3719. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
  3720. # Is the compiler the GNU C compiler?
  3721. with_gcc=$_LT_AC_TAGVAR(GCC, $1)
  3722. # An ERE matcher.
  3723. EGREP=$lt_EGREP
  3724. # The linker used to build libraries.
  3725. LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
  3726. # Whether we need hard or soft links.
  3727. LN_S=$lt_LN_S
  3728. # A BSD-compatible nm program.
  3729. NM=$lt_NM
  3730. # A symbol stripping program
  3731. STRIP=$lt_STRIP
  3732. # Used to examine libraries when file_magic_cmd begins "file"
  3733. MAGIC_CMD=$MAGIC_CMD
  3734. # Used on cygwin: DLL creation program.
  3735. DLLTOOL="$DLLTOOL"
  3736. # Used on cygwin: object dumper.
  3737. OBJDUMP="$OBJDUMP"
  3738. # Used on cygwin: assembler.
  3739. AS="$AS"
  3740. # The name of the directory that contains temporary libtool files.
  3741. objdir=$objdir
  3742. # How to create reloadable object files.
  3743. reload_flag=$lt_reload_flag
  3744. reload_cmds=$lt_reload_cmds
  3745. # How to pass a linker flag through the compiler.
  3746. wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
  3747. # Object file suffix (normally "o").
  3748. objext="$ac_objext"
  3749. # Old archive suffix (normally "a").
  3750. libext="$libext"
  3751. # Shared library suffix (normally ".so").
  3752. shrext_cmds='$shrext_cmds'
  3753. # Executable file suffix (normally "").
  3754. exeext="$exeext"
  3755. # Additional compiler flags for building library objects.
  3756. pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
  3757. pic_mode=$pic_mode
  3758. # What is the maximum length of a command?
  3759. max_cmd_len=$lt_cv_sys_max_cmd_len
  3760. # Does compiler simultaneously support -c and -o options?
  3761. compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
  3762. # Must we lock files when doing compilation?
  3763. need_locks=$lt_need_locks
  3764. # Do we need the lib prefix for modules?
  3765. need_lib_prefix=$need_lib_prefix
  3766. # Do we need a version for libraries?
  3767. need_version=$need_version
  3768. # Whether dlopen is supported.
  3769. dlopen_support=$enable_dlopen
  3770. # Whether dlopen of programs is supported.
  3771. dlopen_self=$enable_dlopen_self
  3772. # Whether dlopen of statically linked programs is supported.
  3773. dlopen_self_static=$enable_dlopen_self_static
  3774. # Compiler flag to prevent dynamic linking.
  3775. link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
  3776. # Compiler flag to turn off builtin functions.
  3777. no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
  3778. # Compiler flag to allow reflexive dlopens.
  3779. export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
  3780. # Compiler flag to generate shared objects directly from archives.
  3781. whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
  3782. # Compiler flag to generate thread-safe objects.
  3783. thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
  3784. # Library versioning type.
  3785. version_type=$version_type
  3786. # Format of library name prefix.
  3787. libname_spec=$lt_libname_spec
  3788. # List of archive names. First name is the real one, the rest are links.
  3789. # The last name is the one that the linker finds with -lNAME.
  3790. library_names_spec=$lt_library_names_spec
  3791. # The coded name of the library, if different from the real name.
  3792. soname_spec=$lt_soname_spec
  3793. # Commands used to build and install an old-style archive.
  3794. RANLIB=$lt_RANLIB
  3795. old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
  3796. old_postinstall_cmds=$lt_old_postinstall_cmds
  3797. old_postuninstall_cmds=$lt_old_postuninstall_cmds
  3798. # Create an old-style archive from a shared archive.
  3799. old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
  3800. # Create a temporary old-style archive to link instead of a shared archive.
  3801. old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
  3802. # Commands used to build and install a shared archive.
  3803. archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
  3804. archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
  3805. postinstall_cmds=$lt_postinstall_cmds
  3806. postuninstall_cmds=$lt_postuninstall_cmds
  3807. # Commands used to build a loadable module (assumed same as above if empty)
  3808. module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
  3809. module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
  3810. # Commands to strip libraries.
  3811. old_striplib=$lt_old_striplib
  3812. striplib=$lt_striplib
  3813. # Dependencies to place before the objects being linked to create a
  3814. # shared library.
  3815. predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
  3816. # Dependencies to place after the objects being linked to create a
  3817. # shared library.
  3818. postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
  3819. # Dependencies to place before the objects being linked to create a
  3820. # shared library.
  3821. predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
  3822. # Dependencies to place after the objects being linked to create a
  3823. # shared library.
  3824. postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
  3825. # The library search path used internally by the compiler when linking
  3826. # a shared library.
  3827. compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
  3828. # Method to check whether dependent libraries are shared objects.
  3829. deplibs_check_method=$lt_deplibs_check_method
  3830. # Command to use when deplibs_check_method == file_magic.
  3831. file_magic_cmd=$lt_file_magic_cmd
  3832. # Flag that allows shared libraries with undefined symbols to be built.
  3833. allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
  3834. # Flag that forces no undefined symbols.
  3835. no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
  3836. # Commands used to finish a libtool library installation in a directory.
  3837. finish_cmds=$lt_finish_cmds
  3838. # Same as above, but a single script fragment to be evaled but not shown.
  3839. finish_eval=$lt_finish_eval
  3840. # Take the output of nm and produce a listing of raw symbols and C names.
  3841. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
  3842. # Transform the output of nm in a proper C declaration
  3843. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
  3844. # Transform the output of nm in a C name address pair
  3845. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
  3846. # This is the shared library runtime path variable.
  3847. runpath_var=$runpath_var
  3848. # This is the shared library path variable.
  3849. shlibpath_var=$shlibpath_var
  3850. # Is shlibpath searched before the hard-coded library search path?
  3851. shlibpath_overrides_runpath=$shlibpath_overrides_runpath
  3852. # How to hardcode a shared library path into an executable.
  3853. hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
  3854. # Whether we should hardcode library paths into libraries.
  3855. hardcode_into_libs=$hardcode_into_libs
  3856. # Flag to hardcode \$libdir into a binary during linking.
  3857. # This must work even if \$libdir does not exist.
  3858. hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
  3859. # If ld is used when linking, flag to hardcode \$libdir into
  3860. # a binary during linking. This must work even if \$libdir does
  3861. # not exist.
  3862. hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
  3863. # Whether we need a single -rpath flag with a separated argument.
  3864. hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
  3865. # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
  3866. # resulting binary.
  3867. hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
  3868. # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
  3869. # resulting binary.
  3870. hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
  3871. # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
  3872. # the resulting binary.
  3873. hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
  3874. # Set to yes if building a shared library automatically hardcodes DIR into the library
  3875. # and all subsequent libraries and executables linked against it.
  3876. hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
  3877. # Variables whose values should be saved in libtool wrapper scripts and
  3878. # restored at relink time.
  3879. variables_saved_for_relink="$variables_saved_for_relink"
  3880. # Whether libtool must link a program against all its dependency libraries.
  3881. link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
  3882. # Compile-time system search path for libraries
  3883. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
  3884. # Run-time system search path for libraries
  3885. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
  3886. # Fix the shell variable \$srcfile for the compiler.
  3887. fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
  3888. # Set to yes if exported symbols are required.
  3889. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
  3890. # The commands to list exported symbols.
  3891. export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
  3892. # The commands to extract the exported symbol list from a shared archive.
  3893. extract_expsyms_cmds=$lt_extract_expsyms_cmds
  3894. # Symbols that should not be listed in the preloaded symbols.
  3895. exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
  3896. # Symbols that must always be exported.
  3897. include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
  3898. ifelse([$1],[],
  3899. [# ### END LIBTOOL CONFIG],
  3900. [# ### END LIBTOOL TAG CONFIG: $tagname])
  3901. __EOF__
  3902. ifelse([$1],[], [
  3903. case $host_os in
  3904. aix3*)
  3905. cat <<\EOF >> "$cfgfile"
  3906. # AIX sometimes has problems with the GCC collect2 program. For some
  3907. # reason, if we set the COLLECT_NAMES environment variable, the problems
  3908. # vanish in a puff of smoke.
  3909. if test "X${COLLECT_NAMES+set}" != Xset; then
  3910. COLLECT_NAMES=
  3911. export COLLECT_NAMES
  3912. fi
  3913. EOF
  3914. ;;
  3915. esac
  3916. # We use sed instead of cat because bash on DJGPP gets confused if
  3917. # if finds mixed CR/LF and LF-only lines. Since sed operates in
  3918. # text mode, it properly converts lines to CR/LF. This bash problem
  3919. # is reportedly fixed, but why not run on old versions too?
  3920. sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
  3921. mv -f "$cfgfile" "$ofile" || \
  3922. (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
  3923. chmod +x "$ofile"
  3924. ])
  3925. else
  3926. # If there is no Makefile yet, we rely on a make rule to execute
  3927. # `config.status --recheck' to rerun these tests and create the
  3928. # libtool script then.
  3929. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
  3930. if test -f "$ltmain_in"; then
  3931. test -f Makefile && make "$ltmain"
  3932. fi
  3933. fi
  3934. ])# AC_LIBTOOL_CONFIG
  3935. # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
  3936. # -------------------------------------------
  3937. AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
  3938. [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
  3939. _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  3940. if test "$GCC" = yes; then
  3941. _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  3942. AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
  3943. lt_cv_prog_compiler_rtti_exceptions,
  3944. [-fno-rtti -fno-exceptions], [],
  3945. [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
  3946. fi
  3947. ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
  3948. # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
  3949. # ---------------------------------
  3950. AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
  3951. [AC_REQUIRE([AC_CANONICAL_HOST])
  3952. AC_REQUIRE([AC_PROG_NM])
  3953. AC_REQUIRE([AC_OBJEXT])
  3954. # Check for command to grab the raw symbol name followed by C symbol from nm.
  3955. AC_MSG_CHECKING([command to parse $NM output from $compiler object])
  3956. AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
  3957. [
  3958. # These are sane defaults that work on at least a few old systems.
  3959. # [They come from Ultrix. What could be older than Ultrix?!! ;)]
  3960. # Character class describing NM global symbol codes.
  3961. symcode='[[BCDEGRST]]'
  3962. # Regexp to match symbols that can be accessed directly from C.
  3963. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
  3964. # Transform an extracted symbol line into a proper C declaration
  3965. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
  3966. # Transform an extracted symbol line into symbol name and symbol address
  3967. lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
  3968. # Define system-specific variables.
  3969. case $host_os in
  3970. aix*)
  3971. symcode='[[BCDT]]'
  3972. ;;
  3973. cygwin* | mingw* | pw32*)
  3974. symcode='[[ABCDGISTW]]'
  3975. ;;
  3976. hpux*) # Its linker distinguishes data from code symbols
  3977. if test "$host_cpu" = ia64; then
  3978. symcode='[[ABCDEGRST]]'
  3979. fi
  3980. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  3981. lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
  3982. ;;
  3983. linux*)
  3984. if test "$host_cpu" = ia64; then
  3985. symcode='[[ABCDGIRSTW]]'
  3986. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  3987. lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
  3988. fi
  3989. ;;
  3990. irix* | nonstopux*)
  3991. symcode='[[BCDEGRST]]'
  3992. ;;
  3993. osf*)
  3994. symcode='[[BCDEGQRST]]'
  3995. ;;
  3996. solaris* | sysv5*)
  3997. symcode='[[BDRT]]'
  3998. ;;
  3999. sysv4)
  4000. symcode='[[DFNSTU]]'
  4001. ;;
  4002. esac
  4003. # Handle CRLF in mingw tool chain
  4004. opt_cr=
  4005. case $build_os in
  4006. mingw*)
  4007. opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  4008. ;;
  4009. esac
  4010. # If we're using GNU nm, then use its standard symbol codes.
  4011. case `$NM -V 2>&1` in
  4012. *GNU* | *'with BFD'*)
  4013. symcode='[[ABCDGIRSTW]]' ;;
  4014. esac
  4015. # Try without a prefix undercore, then with it.
  4016. for ac_symprfx in "" "_"; do
  4017. # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
  4018. symxfrm="\\1 $ac_symprfx\\2 \\2"
  4019. # Write the raw and C identifiers.
  4020. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
  4021. # Check to see that the pipe works correctly.
  4022. pipe_works=no
  4023. rm -f conftest*
  4024. cat > conftest.$ac_ext <<EOF
  4025. #ifdef __cplusplus
  4026. extern "C" {
  4027. #endif
  4028. char nm_test_var;
  4029. void nm_test_func(){}
  4030. #ifdef __cplusplus
  4031. }
  4032. #endif
  4033. int main(){nm_test_var='a';nm_test_func();return(0);}
  4034. EOF
  4035. if AC_TRY_EVAL(ac_compile); then
  4036. # Now try to grab the symbols.
  4037. nlist=conftest.nm
  4038. if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
  4039. # Try sorting and uniquifying the output.
  4040. if sort "$nlist" | uniq > "$nlist"T; then
  4041. mv -f "$nlist"T "$nlist"
  4042. else
  4043. rm -f "$nlist"T
  4044. fi
  4045. # Make sure that we snagged all the symbols we need.
  4046. if grep ' nm_test_var$' "$nlist" >/dev/null; then
  4047. if grep ' nm_test_func$' "$nlist" >/dev/null; then
  4048. cat <<EOF > conftest.$ac_ext
  4049. #ifdef __cplusplus
  4050. extern "C" {
  4051. #endif
  4052. EOF
  4053. # Now generate the symbol file.
  4054. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
  4055. cat <<EOF >> conftest.$ac_ext
  4056. #if defined (__STDC__) && __STDC__
  4057. # define lt_ptr_t void *
  4058. #else
  4059. # define lt_ptr_t char *
  4060. # define const
  4061. #endif
  4062. /* The mapping between symbol names and symbols. */
  4063. const struct {
  4064. const char *name;
  4065. lt_ptr_t address;
  4066. }
  4067. lt_preloaded_symbols[[]] =
  4068. {
  4069. EOF
  4070. $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
  4071. cat <<\EOF >> conftest.$ac_ext
  4072. {0, (lt_ptr_t) 0}
  4073. };
  4074. #ifdef __cplusplus
  4075. }
  4076. #endif
  4077. EOF
  4078. # Now try linking the two files.
  4079. mv conftest.$ac_objext conftstm.$ac_objext
  4080. lt_save_LIBS="$LIBS"
  4081. lt_save_CFLAGS="$CFLAGS"
  4082. LIBS="conftstm.$ac_objext"
  4083. CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
  4084. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
  4085. pipe_works=yes
  4086. fi
  4087. LIBS="$lt_save_LIBS"
  4088. CFLAGS="$lt_save_CFLAGS"
  4089. else
  4090. echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
  4091. fi
  4092. else
  4093. echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
  4094. fi
  4095. else
  4096. echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
  4097. fi
  4098. else
  4099. echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
  4100. cat conftest.$ac_ext >&5
  4101. fi
  4102. rm -f conftest* conftst*
  4103. # Do not use the global_symbol_pipe unless it works.
  4104. if test "$pipe_works" = yes; then
  4105. break
  4106. else
  4107. lt_cv_sys_global_symbol_pipe=
  4108. fi
  4109. done
  4110. ])
  4111. if test -z "$lt_cv_sys_global_symbol_pipe"; then
  4112. lt_cv_sys_global_symbol_to_cdecl=
  4113. fi
  4114. if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
  4115. AC_MSG_RESULT(failed)
  4116. else
  4117. AC_MSG_RESULT(ok)
  4118. fi
  4119. ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
  4120. # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
  4121. # ---------------------------------------
  4122. AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
  4123. [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
  4124. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  4125. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
  4126. AC_MSG_CHECKING([for $compiler option to produce PIC])
  4127. ifelse([$1],[CXX],[
  4128. # C++ specific cases for pic, static, wl, etc.
  4129. if test "$GXX" = yes; then
  4130. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4131. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4132. case $host_os in
  4133. aix*)
  4134. # All AIX code is PIC.
  4135. if test "$host_cpu" = ia64; then
  4136. # AIX 5 now supports IA64 processor
  4137. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4138. fi
  4139. ;;
  4140. amigaos*)
  4141. # FIXME: we need at least 68020 code to build shared libraries, but
  4142. # adding the `-m68020' flag to GCC prevents building anything better,
  4143. # like `-m68040'.
  4144. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  4145. ;;
  4146. beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  4147. # PIC is the default for these OSes.
  4148. ;;
  4149. mingw* | os2* | pw32*)
  4150. # This hack is so that the source file can tell whether it is being
  4151. # built for inclusion in a dll (and should export symbols for example).
  4152. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
  4153. ;;
  4154. darwin* | rhapsody*)
  4155. # PIC is the default on this platform
  4156. # Common symbols not allowed in MH_DYLIB files
  4157. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  4158. ;;
  4159. *djgpp*)
  4160. # DJGPP does not support shared libraries at all
  4161. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  4162. ;;
  4163. sysv4*MP*)
  4164. if test -d /usr/nec; then
  4165. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  4166. fi
  4167. ;;
  4168. hpux*)
  4169. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  4170. # not for PA HP-UX.
  4171. case "$host_cpu" in
  4172. hppa*64*|ia64*)
  4173. ;;
  4174. *)
  4175. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4176. ;;
  4177. esac
  4178. ;;
  4179. *)
  4180. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4181. ;;
  4182. esac
  4183. else
  4184. case $host_os in
  4185. aix4* | aix5*)
  4186. # All AIX code is PIC.
  4187. if test "$host_cpu" = ia64; then
  4188. # AIX 5 now supports IA64 processor
  4189. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4190. else
  4191. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  4192. fi
  4193. ;;
  4194. chorus*)
  4195. case $cc_basename in
  4196. cxch68*)
  4197. # Green Hills C++ Compiler
  4198. # _LT_AC_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"
  4199. ;;
  4200. esac
  4201. ;;
  4202. darwin*)
  4203. # PIC is the default on this platform
  4204. # Common symbols not allowed in MH_DYLIB files
  4205. case $cc_basename in
  4206. xlc*)
  4207. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
  4208. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4209. ;;
  4210. esac
  4211. ;;
  4212. dgux*)
  4213. case $cc_basename in
  4214. ec++*)
  4215. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4216. ;;
  4217. ghcx*)
  4218. # Green Hills C++ Compiler
  4219. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4220. ;;
  4221. *)
  4222. ;;
  4223. esac
  4224. ;;
  4225. freebsd* | kfreebsd*-gnu | dragonfly*)
  4226. # FreeBSD uses GNU C++
  4227. ;;
  4228. hpux9* | hpux10* | hpux11*)
  4229. case $cc_basename in
  4230. CC*)
  4231. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4232. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
  4233. if test "$host_cpu" != ia64; then
  4234. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4235. fi
  4236. ;;
  4237. aCC*)
  4238. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4239. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
  4240. case "$host_cpu" in
  4241. hppa*64*|ia64*)
  4242. # +Z the default
  4243. ;;
  4244. *)
  4245. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4246. ;;
  4247. esac
  4248. ;;
  4249. *)
  4250. ;;
  4251. esac
  4252. ;;
  4253. irix5* | irix6* | nonstopux*)
  4254. case $cc_basename in
  4255. CC*)
  4256. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4257. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4258. # CC pic flag -KPIC is the default.
  4259. ;;
  4260. *)
  4261. ;;
  4262. esac
  4263. ;;
  4264. linux*)
  4265. case $cc_basename in
  4266. KCC*)
  4267. # KAI C++ Compiler
  4268. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  4269. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4270. ;;
  4271. icpc* | ecpc*)
  4272. # Intel C++
  4273. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4274. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4275. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4276. ;;
  4277. pgCC*)
  4278. # Portland Group C++ compiler.
  4279. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4280. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4281. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4282. ;;
  4283. cxx*)
  4284. # Compaq C++
  4285. # Make sure the PIC flag is empty. It appears that all Alpha
  4286. # Linux and Compaq Tru64 Unix objects are PIC.
  4287. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  4288. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4289. ;;
  4290. *)
  4291. ;;
  4292. esac
  4293. ;;
  4294. lynxos*)
  4295. ;;
  4296. m88k*)
  4297. ;;
  4298. mvs*)
  4299. case $cc_basename in
  4300. cxx*)
  4301. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
  4302. ;;
  4303. *)
  4304. ;;
  4305. esac
  4306. ;;
  4307. netbsd*)
  4308. ;;
  4309. osf3* | osf4* | osf5*)
  4310. case $cc_basename in
  4311. KCC*)
  4312. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  4313. ;;
  4314. RCC*)
  4315. # Rational C++ 2.4.1
  4316. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4317. ;;
  4318. cxx*)
  4319. # Digital/Compaq C++
  4320. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4321. # Make sure the PIC flag is empty. It appears that all Alpha
  4322. # Linux and Compaq Tru64 Unix objects are PIC.
  4323. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  4324. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4325. ;;
  4326. *)
  4327. ;;
  4328. esac
  4329. ;;
  4330. psos*)
  4331. ;;
  4332. sco*)
  4333. case $cc_basename in
  4334. CC*)
  4335. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4336. ;;
  4337. *)
  4338. ;;
  4339. esac
  4340. ;;
  4341. solaris*)
  4342. case $cc_basename in
  4343. CC*)
  4344. # Sun C++ 4.2, 5.x and Centerline C++
  4345. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4346. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4347. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4348. ;;
  4349. gcx*)
  4350. # Green Hills C++ Compiler
  4351. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4352. ;;
  4353. *)
  4354. ;;
  4355. esac
  4356. ;;
  4357. sunos4*)
  4358. case $cc_basename in
  4359. CC*)
  4360. # Sun C++ 4.x
  4361. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4362. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4363. ;;
  4364. lcc*)
  4365. # Lucid
  4366. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4367. ;;
  4368. *)
  4369. ;;
  4370. esac
  4371. ;;
  4372. tandem*)
  4373. case $cc_basename in
  4374. NCC*)
  4375. # NonStop-UX NCC 3.20
  4376. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4377. ;;
  4378. *)
  4379. ;;
  4380. esac
  4381. ;;
  4382. unixware*)
  4383. ;;
  4384. vxworks*)
  4385. ;;
  4386. *)
  4387. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4388. ;;
  4389. esac
  4390. fi
  4391. ],
  4392. [
  4393. if test "$GCC" = yes; then
  4394. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4395. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4396. case $host_os in
  4397. aix*)
  4398. # All AIX code is PIC.
  4399. if test "$host_cpu" = ia64; then
  4400. # AIX 5 now supports IA64 processor
  4401. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4402. fi
  4403. ;;
  4404. amigaos*)
  4405. # FIXME: we need at least 68020 code to build shared libraries, but
  4406. # adding the `-m68020' flag to GCC prevents building anything better,
  4407. # like `-m68040'.
  4408. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  4409. ;;
  4410. beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  4411. # PIC is the default for these OSes.
  4412. ;;
  4413. mingw* | pw32* | os2*)
  4414. # This hack is so that the source file can tell whether it is being
  4415. # built for inclusion in a dll (and should export symbols for example).
  4416. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
  4417. ;;
  4418. darwin* | rhapsody*)
  4419. # PIC is the default on this platform
  4420. # Common symbols not allowed in MH_DYLIB files
  4421. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  4422. ;;
  4423. msdosdjgpp*)
  4424. # Just because we use GCC doesn't mean we suddenly get shared libraries
  4425. # on systems that don't support them.
  4426. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4427. enable_shared=no
  4428. ;;
  4429. sysv4*MP*)
  4430. if test -d /usr/nec; then
  4431. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  4432. fi
  4433. ;;
  4434. hpux*)
  4435. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  4436. # not for PA HP-UX.
  4437. case "$host_cpu" in
  4438. hppa*64*|ia64*)
  4439. # +Z the default
  4440. ;;
  4441. *)
  4442. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4443. ;;
  4444. esac
  4445. ;;
  4446. *)
  4447. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4448. ;;
  4449. esac
  4450. else
  4451. # PORTME Check for flag to pass linker flags through the system compiler.
  4452. case $host_os in
  4453. aix*)
  4454. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4455. if test "$host_cpu" = ia64; then
  4456. # AIX 5 now supports IA64 processor
  4457. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4458. else
  4459. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  4460. fi
  4461. ;;
  4462. darwin*)
  4463. # PIC is the default on this platform
  4464. # Common symbols not allowed in MH_DYLIB files
  4465. case $cc_basename in
  4466. xlc*)
  4467. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
  4468. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4469. ;;
  4470. esac
  4471. ;;
  4472. mingw* | pw32* | os2*)
  4473. # This hack is so that the source file can tell whether it is being
  4474. # built for inclusion in a dll (and should export symbols for example).
  4475. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
  4476. ;;
  4477. hpux9* | hpux10* | hpux11*)
  4478. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4479. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  4480. # not for PA HP-UX.
  4481. case "$host_cpu" in
  4482. hppa*64*|ia64*)
  4483. # +Z the default
  4484. ;;
  4485. *)
  4486. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4487. ;;
  4488. esac
  4489. # Is there a better lt_prog_compiler_static that works with the bundled CC?
  4490. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  4491. ;;
  4492. irix5* | irix6* | nonstopux*)
  4493. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4494. # PIC (with -KPIC) is the default.
  4495. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4496. ;;
  4497. newsos6)
  4498. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4499. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4500. ;;
  4501. linux*)
  4502. case $cc_basename in
  4503. icc* | ecc*)
  4504. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4505. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4506. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4507. ;;
  4508. pgcc* | pgf77* | pgf90*)
  4509. # Portland Group compilers (*not* the Pentium gcc compiler,
  4510. # which looks to be a dead project)
  4511. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4512. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4513. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4514. ;;
  4515. ccc*)
  4516. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4517. # All Alpha code is PIC.
  4518. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4519. ;;
  4520. esac
  4521. ;;
  4522. osf3* | osf4* | osf5*)
  4523. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4524. # All OSF/1 code is PIC.
  4525. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4526. ;;
  4527. sco3.2v5*)
  4528. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
  4529. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
  4530. ;;
  4531. solaris*)
  4532. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4533. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4534. case $cc_basename in
  4535. f77* | f90* | f95*)
  4536. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
  4537. *)
  4538. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
  4539. esac
  4540. ;;
  4541. sunos4*)
  4542. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4543. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4544. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4545. ;;
  4546. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  4547. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4548. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4549. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4550. ;;
  4551. sysv4*MP*)
  4552. if test -d /usr/nec ;then
  4553. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
  4554. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4555. fi
  4556. ;;
  4557. unicos*)
  4558. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4559. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4560. ;;
  4561. uts4*)
  4562. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4563. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4564. ;;
  4565. *)
  4566. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4567. ;;
  4568. esac
  4569. fi
  4570. ])
  4571. AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
  4572. #
  4573. # Check to make sure the PIC flag actually works.
  4574. #
  4575. if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
  4576. AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
  4577. _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
  4578. [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
  4579. [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
  4580. "" | " "*) ;;
  4581. *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
  4582. esac],
  4583. [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  4584. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
  4585. fi
  4586. case "$host_os" in
  4587. # For platforms which do not support PIC, -DPIC is meaningless:
  4588. *djgpp*)
  4589. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  4590. ;;
  4591. *)
  4592. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
  4593. ;;
  4594. esac
  4595. ])
  4596. # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
  4597. # ------------------------------------
  4598. # See if the linker supports building shared libraries.
  4599. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
  4600. [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  4601. ifelse([$1],[CXX],[
  4602. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4603. case $host_os in
  4604. aix4* | aix5*)
  4605. # If we're using GNU nm, then we don't want the "-C" option.
  4606. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  4607. if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
  4608. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
  4609. else
  4610. _LT_AC_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'
  4611. fi
  4612. ;;
  4613. pw32*)
  4614. _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
  4615. ;;
  4616. cygwin* | mingw*)
  4617. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
  4618. ;;
  4619. *)
  4620. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4621. ;;
  4622. esac
  4623. ],[
  4624. runpath_var=
  4625. _LT_AC_TAGVAR(allow_undefined_flag, $1)=
  4626. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  4627. _LT_AC_TAGVAR(archive_cmds, $1)=
  4628. _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
  4629. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
  4630. _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
  4631. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
  4632. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  4633. _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
  4634. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4635. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  4636. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  4637. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  4638. _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
  4639. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  4640. _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
  4641. _LT_AC_TAGVAR(hardcode_automatic, $1)=no
  4642. _LT_AC_TAGVAR(module_cmds, $1)=
  4643. _LT_AC_TAGVAR(module_expsym_cmds, $1)=
  4644. _LT_AC_TAGVAR(always_export_symbols, $1)=no
  4645. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4646. # include_expsyms should be a list of space-separated symbols to be *always*
  4647. # included in the symbol list
  4648. _LT_AC_TAGVAR(include_expsyms, $1)=
  4649. # exclude_expsyms can be an extended regexp of symbols to exclude
  4650. # it will be wrapped by ` (' and `)$', so one must not match beginning or
  4651. # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
  4652. # as well as any symbol that contains `d'.
  4653. _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
  4654. # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  4655. # platforms (ab)use it in PIC code, but their linkers get confused if
  4656. # the symbol is explicitly referenced. Since portable code cannot
  4657. # rely on this symbol name, it's probably fine to never include it in
  4658. # preloaded symbol tables.
  4659. extract_expsyms_cmds=
  4660. # Just being paranoid about ensuring that cc_basename is set.
  4661. _LT_CC_BASENAME([$compiler])
  4662. case $host_os in
  4663. cygwin* | mingw* | pw32*)
  4664. # FIXME: the MSVC++ port hasn't been tested in a loooong time
  4665. # When not using gcc, we currently assume that we are using
  4666. # Microsoft Visual C++.
  4667. if test "$GCC" != yes; then
  4668. with_gnu_ld=no
  4669. fi
  4670. ;;
  4671. openbsd*)
  4672. with_gnu_ld=no
  4673. ;;
  4674. esac
  4675. _LT_AC_TAGVAR(ld_shlibs, $1)=yes
  4676. if test "$with_gnu_ld" = yes; then
  4677. # If archive_cmds runs LD, not CC, wlarc should be empty
  4678. wlarc='${wl}'
  4679. # Set some defaults for GNU ld with shared library support. These
  4680. # are reset later if shared libraries are not supported. Putting them
  4681. # here allows them to be overridden if necessary.
  4682. runpath_var=LD_RUN_PATH
  4683. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
  4684. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  4685. # ancient GNU ld didn't support --whole-archive et. al.
  4686. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
  4687. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  4688. else
  4689. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  4690. fi
  4691. supports_anon_versioning=no
  4692. case `$LD -v 2>/dev/null` in
  4693. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
  4694. *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
  4695. *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
  4696. *\ 2.11.*) ;; # other 2.11 versions
  4697. *) supports_anon_versioning=yes ;;
  4698. esac
  4699. # See if GNU ld supports shared libraries.
  4700. case $host_os in
  4701. aix3* | aix4* | aix5*)
  4702. # On AIX/PPC, the GNU linker is very broken
  4703. if test "$host_cpu" != ia64; then
  4704. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4705. cat <<EOF 1>&2
  4706. *** Warning: the GNU linker, at least up to release 2.9.1, is reported
  4707. *** to be unable to reliably create shared libraries on AIX.
  4708. *** Therefore, libtool is disabling shared libraries support. If you
  4709. *** really care for shared libraries, you may want to modify your PATH
  4710. *** so that a non-GNU linker is found, and then restart.
  4711. EOF
  4712. fi
  4713. ;;
  4714. amigaos*)
  4715. _LT_AC_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)'
  4716. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4717. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  4718. # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
  4719. # that the semantics of dynamic libraries on AmigaOS, at least up
  4720. # to version 4, is to share data among multiple programs linked
  4721. # with the same dynamic library. Since this doesn't match the
  4722. # behavior of shared libraries on other platforms, we can't use
  4723. # them.
  4724. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4725. ;;
  4726. beos*)
  4727. if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  4728. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  4729. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  4730. # support --undefined. This deserves some investigation. FIXME
  4731. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4732. else
  4733. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4734. fi
  4735. ;;
  4736. cygwin* | mingw* | pw32*)
  4737. # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  4738. # as there is no search path for DLLs.
  4739. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4740. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  4741. _LT_AC_TAGVAR(always_export_symbols, $1)=no
  4742. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4743. _LT_AC_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'
  4744. if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
  4745. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
  4746. # If the export-symbols file already is a .def file (1st line
  4747. # is EXPORTS), use it as is; otherwise, prepend...
  4748. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  4749. cp $export_symbols $output_objdir/$soname.def;
  4750. else
  4751. echo EXPORTS > $output_objdir/$soname.def;
  4752. cat $export_symbols >> $output_objdir/$soname.def;
  4753. fi~
  4754. $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
  4755. else
  4756. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4757. fi
  4758. ;;
  4759. linux*)
  4760. if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  4761. tmp_addflag=
  4762. case $cc_basename,$host_cpu in
  4763. pgcc*) # Portland Group C compiler
  4764. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive,`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
  4765. tmp_addflag=' $pic_flag'
  4766. ;;
  4767. pgf77* | pgf90* ) # Portland Group f77 and f90 compilers
  4768. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive,`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
  4769. tmp_addflag=' $pic_flag -Mnomain' ;;
  4770. ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
  4771. tmp_addflag=' -i_dynamic' ;;
  4772. efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
  4773. tmp_addflag=' -i_dynamic -nofor_main' ;;
  4774. ifc* | ifort*) # Intel Fortran compiler
  4775. tmp_addflag=' -nofor_main' ;;
  4776. esac
  4777. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4778. if test $supports_anon_versioning = yes; then
  4779. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
  4780. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4781. $echo "local: *; };" >> $output_objdir/$libname.ver~
  4782. $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  4783. fi
  4784. else
  4785. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4786. fi
  4787. ;;
  4788. netbsd*)
  4789. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  4790. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  4791. wlarc=
  4792. else
  4793. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4794. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  4795. fi
  4796. ;;
  4797. solaris* | sysv5*)
  4798. if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
  4799. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4800. cat <<EOF 1>&2
  4801. *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  4802. *** create shared libraries on Solaris systems. Therefore, libtool
  4803. *** is disabling shared libraries support. We urge you to upgrade GNU
  4804. *** binutils to release 2.9.1 or newer. Another option is to modify
  4805. *** your PATH or compiler configuration so that the native linker is
  4806. *** used, and then restart.
  4807. EOF
  4808. elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  4809. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4810. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  4811. else
  4812. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4813. fi
  4814. ;;
  4815. sunos4*)
  4816. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4817. wlarc=
  4818. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  4819. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  4820. ;;
  4821. *)
  4822. if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  4823. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4824. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  4825. else
  4826. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4827. fi
  4828. ;;
  4829. esac
  4830. if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
  4831. runpath_var=
  4832. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4833. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
  4834. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  4835. fi
  4836. else
  4837. # PORTME fill in a description of your system's linker (not GNU ld)
  4838. case $host_os in
  4839. aix3*)
  4840. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  4841. _LT_AC_TAGVAR(always_export_symbols, $1)=yes
  4842. _LT_AC_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'
  4843. # Note: this linker hardcodes the directories in LIBPATH if there
  4844. # are no directories specified by -L.
  4845. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  4846. if test "$GCC" = yes && test -z "$link_static_flag"; then
  4847. # Neither direct hardcoding nor static linking is supported with a
  4848. # broken collect2.
  4849. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
  4850. fi
  4851. ;;
  4852. aix4* | aix5*)
  4853. if test "$host_cpu" = ia64; then
  4854. # On IA64, the linker does run time linking by default, so we don't
  4855. # have to do anything special.
  4856. aix_use_runtimelinking=no
  4857. exp_sym_flag='-Bexport'
  4858. no_entry_flag=""
  4859. else
  4860. # If we're using GNU nm, then we don't want the "-C" option.
  4861. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  4862. if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
  4863. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
  4864. else
  4865. _LT_AC_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'
  4866. fi
  4867. aix_use_runtimelinking=no
  4868. # Test if we are trying to use run time linking or normal
  4869. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  4870. # need to do runtime linking.
  4871. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
  4872. for ld_flag in $LDFLAGS; do
  4873. if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
  4874. aix_use_runtimelinking=yes
  4875. break
  4876. fi
  4877. done
  4878. esac
  4879. exp_sym_flag='-bexport'
  4880. no_entry_flag='-bnoentry'
  4881. fi
  4882. # When large executables or shared objects are built, AIX ld can
  4883. # have problems creating the table of contents. If linking a library
  4884. # or program results in "error TOC overflow" add -mminimal-toc to
  4885. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  4886. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  4887. _LT_AC_TAGVAR(archive_cmds, $1)=''
  4888. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  4889. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
  4890. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  4891. if test "$GCC" = yes; then
  4892. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  4893. # We only want to do this on AIX 4.2 and lower, the check
  4894. # below for broken collect2 doesn't work under 4.3+
  4895. collect2name=`${CC} -print-prog-name=collect2`
  4896. if test -f "$collect2name" && \
  4897. strings "$collect2name" | grep resolve_lib_name >/dev/null
  4898. then
  4899. # We have reworked collect2
  4900. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  4901. else
  4902. # We have old collect2
  4903. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
  4904. # It fails to find uninstalled libraries when the uninstalled
  4905. # path is not listed in the libpath. Setting hardcode_minus_L
  4906. # to unsupported forces relinking
  4907. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  4908. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4909. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  4910. fi
  4911. esac
  4912. shared_flag='-shared'
  4913. if test "$aix_use_runtimelinking" = yes; then
  4914. shared_flag="$shared_flag "'${wl}-G'
  4915. fi
  4916. else
  4917. # not using gcc
  4918. if test "$host_cpu" = ia64; then
  4919. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  4920. # chokes on -Wl,-G. The following line is correct:
  4921. shared_flag='-G'
  4922. else
  4923. if test "$aix_use_runtimelinking" = yes; then
  4924. shared_flag='${wl}-G'
  4925. else
  4926. shared_flag='${wl}-bM:SRE'
  4927. fi
  4928. fi
  4929. fi
  4930. # It seems that -bexpall does not export symbols beginning with
  4931. # underscore (_), so it is better to generate a list of symbols to export.
  4932. _LT_AC_TAGVAR(always_export_symbols, $1)=yes
  4933. if test "$aix_use_runtimelinking" = yes; then
  4934. # Warning - without using the other runtime loading flags (-brtl),
  4935. # -berok will link without error, but may produce a broken library.
  4936. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
  4937. # Determine the default libpath from the value encoded in an empty executable.
  4938. _LT_AC_SYS_LIBPATH_AIX
  4939. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  4940. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
  4941. else
  4942. if test "$host_cpu" = ia64; then
  4943. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  4944. _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  4945. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
  4946. else
  4947. # Determine the default libpath from the value encoded in an empty executable.
  4948. _LT_AC_SYS_LIBPATH_AIX
  4949. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  4950. # Warning - without using the other run time loading flags,
  4951. # -berok will link without error, but may produce a broken library.
  4952. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  4953. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  4954. # -bexpall does not export symbols beginning with underscore (_)
  4955. _LT_AC_TAGVAR(always_export_symbols, $1)=yes
  4956. # Exported symbols can be pulled into shared objects from archives
  4957. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
  4958. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
  4959. # This is similar to how AIX traditionally builds it's shared libraries.
  4960. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
  4961. fi
  4962. fi
  4963. ;;
  4964. amigaos*)
  4965. _LT_AC_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)'
  4966. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4967. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  4968. # see comment about different semantics on the GNU ld section
  4969. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4970. ;;
  4971. bsdi[[45]]*)
  4972. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
  4973. ;;
  4974. cygwin* | mingw* | pw32*)
  4975. # When not using gcc, we currently assume that we are using
  4976. # Microsoft Visual C++.
  4977. # hardcode_libdir_flag_spec is actually meaningless, as there is
  4978. # no search path for DLLs.
  4979. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  4980. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  4981. # Tell ltmain to make .lib files, not .a files.
  4982. libext=lib
  4983. # Tell ltmain to make .dll files, not .so files.
  4984. shrext_cmds=".dll"
  4985. # FIXME: Setting linknames here is a bad hack.
  4986. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
  4987. # The linker will automatically build a .lib file if we build a DLL.
  4988. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
  4989. # FIXME: Should let the user specify the lib program.
  4990. _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
  4991. _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
  4992. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4993. ;;
  4994. darwin* | rhapsody*)
  4995. case "$host_os" in
  4996. rhapsody* | darwin1.[[012]])
  4997. _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
  4998. ;;
  4999. *) # Darwin 1.3 on
  5000. if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
  5001. _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
  5002. else
  5003. case ${MACOSX_DEPLOYMENT_TARGET} in
  5004. 10.[[012]])
  5005. _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
  5006. ;;
  5007. 10.*)
  5008. _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
  5009. ;;
  5010. esac
  5011. fi
  5012. ;;
  5013. esac
  5014. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  5015. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  5016. _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
  5017. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  5018. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
  5019. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  5020. if test "$GCC" = yes ; then
  5021. output_verbose_link_cmd='echo'
  5022. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
  5023. _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
  5024. # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
  5025. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  5026. _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  5027. else
  5028. case $cc_basename in
  5029. xlc*)
  5030. output_verbose_link_cmd='echo'
  5031. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
  5032. _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
  5033. # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
  5034. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  5035. _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  5036. ;;
  5037. *)
  5038. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5039. ;;
  5040. esac
  5041. fi
  5042. ;;
  5043. dgux*)
  5044. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5045. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5046. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5047. ;;
  5048. freebsd1*)
  5049. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5050. ;;
  5051. # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  5052. # support. Future versions do this automatically, but an explicit c++rt0.o
  5053. # does not break anything, and helps significantly (at the cost of a little
  5054. # extra space).
  5055. freebsd2.2*)
  5056. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
  5057. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5058. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5059. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5060. ;;
  5061. # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  5062. freebsd2*)
  5063. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  5064. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5065. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5066. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5067. ;;
  5068. # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  5069. freebsd* | kfreebsd*-gnu | dragonfly*)
  5070. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
  5071. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5072. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5073. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5074. ;;
  5075. hpux9*)
  5076. if test "$GCC" = yes; then
  5077. _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  5078. else
  5079. _LT_AC_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'
  5080. fi
  5081. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5082. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5083. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5084. # hardcode_minus_L: Not really in the search PATH,
  5085. # but as the default location of the library.
  5086. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5087. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5088. ;;
  5089. hpux10* | hpux11*)
  5090. if test "$GCC" = yes -a "$with_gnu_ld" = no; then
  5091. case "$host_cpu" in
  5092. hppa*64*|ia64*)
  5093. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  5094. ;;
  5095. *)
  5096. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  5097. ;;
  5098. esac
  5099. else
  5100. case "$host_cpu" in
  5101. hppa*64*|ia64*)
  5102. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
  5103. ;;
  5104. *)
  5105. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
  5106. ;;
  5107. esac
  5108. fi
  5109. if test "$with_gnu_ld" = no; then
  5110. case "$host_cpu" in
  5111. hppa*64*)
  5112. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5113. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
  5114. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5115. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  5116. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5117. ;;
  5118. ia64*)
  5119. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5120. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  5121. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5122. # hardcode_minus_L: Not really in the search PATH,
  5123. # but as the default location of the library.
  5124. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5125. ;;
  5126. *)
  5127. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5128. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5129. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5130. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5131. # hardcode_minus_L: Not really in the search PATH,
  5132. # but as the default location of the library.
  5133. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5134. ;;
  5135. esac
  5136. fi
  5137. ;;
  5138. irix5* | irix6* | nonstopux*)
  5139. if test "$GCC" = yes; then
  5140. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  5141. else
  5142. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  5143. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
  5144. fi
  5145. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5146. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5147. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  5148. ;;
  5149. netbsd*)
  5150. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  5151. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
  5152. else
  5153. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
  5154. fi
  5155. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5156. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5157. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5158. ;;
  5159. newsos6)
  5160. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5161. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5162. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5163. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5164. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5165. ;;
  5166. openbsd*)
  5167. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5168. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5169. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  5170. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5171. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
  5172. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5173. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5174. else
  5175. case $host_os in
  5176. openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
  5177. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  5178. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5179. ;;
  5180. *)
  5181. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5182. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5183. ;;
  5184. esac
  5185. fi
  5186. ;;
  5187. os2*)
  5188. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5189. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5190. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  5191. _LT_AC_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'
  5192. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
  5193. ;;
  5194. osf3*)
  5195. if test "$GCC" = yes; then
  5196. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  5197. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  5198. else
  5199. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  5200. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  5201. fi
  5202. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5203. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5204. ;;
  5205. osf4* | osf5*) # as osf3* with the addition of -msym flag
  5206. if test "$GCC" = yes; then
  5207. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  5208. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  5209. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5210. else
  5211. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  5212. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  5213. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
  5214. $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
  5215. # Both c and cxx compiler support -rpath directly
  5216. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  5217. fi
  5218. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5219. ;;
  5220. sco3.2v5*)
  5221. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5222. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5223. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  5224. runpath_var=LD_RUN_PATH
  5225. hardcode_runpath_var=yes
  5226. ;;
  5227. solaris*)
  5228. _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
  5229. if test "$GCC" = yes; then
  5230. wlarc='${wl}'
  5231. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  5232. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  5233. $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
  5234. else
  5235. wlarc=''
  5236. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5237. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  5238. $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
  5239. fi
  5240. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5241. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5242. case $host_os in
  5243. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  5244. *)
  5245. # The compiler driver will combine linker options so we
  5246. # cannot just pass the convience library names through
  5247. # without $wl, iff we do not link with $LD.
  5248. # Luckily, gcc supports the same syntax we need for Sun Studio.
  5249. # Supported since Solaris 2.6 (maybe 2.5.1?)
  5250. case $wlarc in
  5251. '')
  5252. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
  5253. *)
  5254. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
  5255. esac ;;
  5256. esac
  5257. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  5258. ;;
  5259. sunos4*)
  5260. if test "x$host_vendor" = xsequent; then
  5261. # Use $CC to link under sequent, because it throws in some extra .o
  5262. # files that make .init and .fini sections work.
  5263. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
  5264. else
  5265. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
  5266. fi
  5267. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5268. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5269. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5270. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5271. ;;
  5272. sysv4)
  5273. case $host_vendor in
  5274. sni)
  5275. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5276. _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
  5277. ;;
  5278. siemens)
  5279. ## LD is ld it makes a PLAMLIB
  5280. ## CC just makes a GrossModule.
  5281. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  5282. _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
  5283. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  5284. ;;
  5285. motorola)
  5286. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5287. _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
  5288. ;;
  5289. esac
  5290. runpath_var='LD_RUN_PATH'
  5291. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5292. ;;
  5293. sysv4.3*)
  5294. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5295. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5296. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
  5297. ;;
  5298. sysv4*MP*)
  5299. if test -d /usr/nec; then
  5300. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5301. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5302. runpath_var=LD_RUN_PATH
  5303. hardcode_runpath_var=yes
  5304. _LT_AC_TAGVAR(ld_shlibs, $1)=yes
  5305. fi
  5306. ;;
  5307. sysv4.2uw2*)
  5308. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  5309. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5310. _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
  5311. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5312. hardcode_runpath_var=yes
  5313. runpath_var=LD_RUN_PATH
  5314. ;;
  5315. sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
  5316. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
  5317. if test "$GCC" = yes; then
  5318. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  5319. else
  5320. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  5321. fi
  5322. runpath_var='LD_RUN_PATH'
  5323. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5324. ;;
  5325. sysv5*)
  5326. _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
  5327. # $CC -shared without GNU ld will not create a library from C++
  5328. # object files and a static libstdc++, better avoid it by now
  5329. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5330. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  5331. $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
  5332. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
  5333. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5334. runpath_var='LD_RUN_PATH'
  5335. ;;
  5336. uts4*)
  5337. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5338. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5339. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5340. ;;
  5341. *)
  5342. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5343. ;;
  5344. esac
  5345. fi
  5346. ])
  5347. AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
  5348. test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  5349. variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  5350. if test "$GCC" = yes; then
  5351. variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  5352. fi
  5353. #
  5354. # Do we need to explicitly link libc?
  5355. #
  5356. case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
  5357. x|xyes)
  5358. # Assume -lc should be added
  5359. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
  5360. if test "$enable_shared" = yes && test "$GCC" = yes; then
  5361. case $_LT_AC_TAGVAR(archive_cmds, $1) in
  5362. *'~'*)
  5363. # FIXME: we may have to deal with multi-command sequences.
  5364. ;;
  5365. '$CC '*)
  5366. # Test whether the compiler implicitly links with -lc since on some
  5367. # systems, -lgcc has to come before -lc. If gcc already passes -lc
  5368. # to ld, don't add -lc before -lgcc.
  5369. AC_MSG_CHECKING([whether -lc should be explicitly linked in])
  5370. $rm conftest*
  5371. printf "$lt_simple_compile_test_code" > conftest.$ac_ext
  5372. if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
  5373. soname=conftest
  5374. lib=conftest
  5375. libobjs=conftest.$ac_objext
  5376. deplibs=
  5377. wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
  5378. compiler_flags=-v
  5379. linker_flags=-v
  5380. verstring=
  5381. output_objdir=.
  5382. libname=conftest
  5383. lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
  5384. _LT_AC_TAGVAR(allow_undefined_flag, $1)=
  5385. if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
  5386. then
  5387. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  5388. else
  5389. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
  5390. fi
  5391. _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
  5392. else
  5393. cat conftest.err 1>&5
  5394. fi
  5395. $rm conftest*
  5396. AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
  5397. ;;
  5398. esac
  5399. fi
  5400. ;;
  5401. esac
  5402. ])# AC_LIBTOOL_PROG_LD_SHLIBS
  5403. # _LT_AC_FILE_LTDLL_C
  5404. # -------------------
  5405. # Be careful that the start marker always follows a newline.
  5406. AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
  5407. # /* ltdll.c starts here */
  5408. # #define WIN32_LEAN_AND_MEAN
  5409. # #include <windows.h>
  5410. # #undef WIN32_LEAN_AND_MEAN
  5411. # #include <stdio.h>
  5412. #
  5413. # #ifndef __CYGWIN__
  5414. # # ifdef __CYGWIN32__
  5415. # # define __CYGWIN__ __CYGWIN32__
  5416. # # endif
  5417. # #endif
  5418. #
  5419. # #ifdef __cplusplus
  5420. # extern "C" {
  5421. # #endif
  5422. # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
  5423. # #ifdef __cplusplus
  5424. # }
  5425. # #endif
  5426. #
  5427. # #ifdef __CYGWIN__
  5428. # #include <cygwin/cygwin_dll.h>
  5429. # DECLARE_CYGWIN_DLL( DllMain );
  5430. # #endif
  5431. # HINSTANCE __hDllInstance_base;
  5432. #
  5433. # BOOL APIENTRY
  5434. # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
  5435. # {
  5436. # __hDllInstance_base = hInst;
  5437. # return TRUE;
  5438. # }
  5439. # /* ltdll.c ends here */
  5440. ])# _LT_AC_FILE_LTDLL_C
  5441. # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
  5442. # ---------------------------------
  5443. AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
  5444. # old names
  5445. AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
  5446. AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
  5447. AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
  5448. AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
  5449. AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
  5450. AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
  5451. AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
  5452. # This is just to silence aclocal about the macro not being used
  5453. ifelse([AC_DISABLE_FAST_INSTALL])
  5454. AC_DEFUN([LT_AC_PROG_GCJ],
  5455. [AC_CHECK_TOOL(GCJ, gcj, no)
  5456. test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
  5457. AC_SUBST(GCJFLAGS)
  5458. ])
  5459. AC_DEFUN([LT_AC_PROG_RC],
  5460. [AC_CHECK_TOOL(RC, windres, no)
  5461. ])
  5462. # NOTE: This macro has been submitted for inclusion into #
  5463. # GNU Autoconf as AC_PROG_SED. When it is available in #
  5464. # a released version of Autoconf we should remove this #
  5465. # macro and use it instead. #
  5466. # LT_AC_PROG_SED
  5467. # --------------
  5468. # Check for a fully-functional sed program, that truncates
  5469. # as few characters as possible. Prefer GNU sed if found.
  5470. AC_DEFUN([LT_AC_PROG_SED],
  5471. [AC_MSG_CHECKING([for a sed that does not truncate output])
  5472. AC_CACHE_VAL(lt_cv_path_SED,
  5473. [# Loop through the user's path and test for sed and gsed.
  5474. # Then use that list of sed's as ones to test for truncation.
  5475. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  5476. for as_dir in $PATH
  5477. do
  5478. IFS=$as_save_IFS
  5479. test -z "$as_dir" && as_dir=.
  5480. for lt_ac_prog in sed gsed; do
  5481. for ac_exec_ext in '' $ac_executable_extensions; do
  5482. if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
  5483. lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
  5484. fi
  5485. done
  5486. done
  5487. done
  5488. lt_ac_max=0
  5489. lt_ac_count=0
  5490. # Add /usr/xpg4/bin/sed as it is typically found on Solaris
  5491. # along with /bin/sed that truncates output.
  5492. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
  5493. test ! -f $lt_ac_sed && continue
  5494. cat /dev/null > conftest.in
  5495. lt_ac_count=0
  5496. echo $ECHO_N "0123456789$ECHO_C" >conftest.in
  5497. # Check for GNU sed and select it if it is found.
  5498. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
  5499. lt_cv_path_SED=$lt_ac_sed
  5500. break
  5501. fi
  5502. while true; do
  5503. cat conftest.in conftest.in >conftest.tmp
  5504. mv conftest.tmp conftest.in
  5505. cp conftest.in conftest.nl
  5506. echo >>conftest.nl
  5507. $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
  5508. cmp -s conftest.out conftest.nl || break
  5509. # 10000 chars as input seems more than enough
  5510. test $lt_ac_count -gt 10 && break
  5511. lt_ac_count=`expr $lt_ac_count + 1`
  5512. if test $lt_ac_count -gt $lt_ac_max; then
  5513. lt_ac_max=$lt_ac_count
  5514. lt_cv_path_SED=$lt_ac_sed
  5515. fi
  5516. done
  5517. done
  5518. ])
  5519. SED=$lt_cv_path_SED
  5520. AC_MSG_RESULT([$SED])
  5521. ])
  5522. # Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
  5523. #
  5524. # This file is free software; the Free Software Foundation
  5525. # gives unlimited permission to copy and/or distribute it,
  5526. # with or without modifications, as long as this notice is preserved.
  5527. # AM_AUTOMAKE_VERSION(VERSION)
  5528. # ----------------------------
  5529. # Automake X.Y traces this macro to ensure aclocal.m4 has been
  5530. # generated from the m4 files accompanying Automake X.Y.
  5531. # (This private macro should not be called outside this file.)
  5532. AC_DEFUN([AM_AUTOMAKE_VERSION],
  5533. [am__api_version='1.10'
  5534. dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
  5535. dnl require some minimum version. Point them to the right macro.
  5536. m4_if([$1], [1.10], [],
  5537. [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
  5538. ])
  5539. # _AM_AUTOCONF_VERSION(VERSION)
  5540. # -----------------------------
  5541. # aclocal traces this macro to find the Autoconf version.
  5542. # This is a private macro too. Using m4_define simplifies
  5543. # the logic in aclocal, which can simply ignore this definition.
  5544. m4_define([_AM_AUTOCONF_VERSION], [])
  5545. # AM_SET_CURRENT_AUTOMAKE_VERSION
  5546. # -------------------------------
  5547. # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
  5548. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
  5549. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
  5550. [AM_AUTOMAKE_VERSION([1.10])dnl
  5551. _AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
  5552. # AM_AUX_DIR_EXPAND -*- Autoconf -*-
  5553. # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
  5554. #
  5555. # This file is free software; the Free Software Foundation
  5556. # gives unlimited permission to copy and/or distribute it,
  5557. # with or without modifications, as long as this notice is preserved.
  5558. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
  5559. # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
  5560. # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
  5561. #
  5562. # Of course, Automake must honor this variable whenever it calls a
  5563. # tool from the auxiliary directory. The problem is that $srcdir (and
  5564. # therefore $ac_aux_dir as well) can be either absolute or relative,
  5565. # depending on how configure is run. This is pretty annoying, since
  5566. # it makes $ac_aux_dir quite unusable in subdirectories: in the top
  5567. # source directory, any form will work fine, but in subdirectories a
  5568. # relative path needs to be adjusted first.
  5569. #
  5570. # $ac_aux_dir/missing
  5571. # fails when called from a subdirectory if $ac_aux_dir is relative
  5572. # $top_srcdir/$ac_aux_dir/missing
  5573. # fails if $ac_aux_dir is absolute,
  5574. # fails when called from a subdirectory in a VPATH build with
  5575. # a relative $ac_aux_dir
  5576. #
  5577. # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
  5578. # are both prefixed by $srcdir. In an in-source build this is usually
  5579. # harmless because $srcdir is `.', but things will broke when you
  5580. # start a VPATH build or use an absolute $srcdir.
  5581. #
  5582. # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
  5583. # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
  5584. # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
  5585. # and then we would define $MISSING as
  5586. # MISSING="\${SHELL} $am_aux_dir/missing"
  5587. # This will work as long as MISSING is not called from configure, because
  5588. # unfortunately $(top_srcdir) has no meaning in configure.
  5589. # However there are other variables, like CC, which are often used in
  5590. # configure, and could therefore not use this "fixed" $ac_aux_dir.
  5591. #
  5592. # Another solution, used here, is to always expand $ac_aux_dir to an
  5593. # absolute PATH. The drawback is that using absolute paths prevent a
  5594. # configured tree to be moved without reconfiguration.
  5595. AC_DEFUN([AM_AUX_DIR_EXPAND],
  5596. [dnl Rely on autoconf to set up CDPATH properly.
  5597. AC_PREREQ([2.50])dnl
  5598. # expand $ac_aux_dir to an absolute path
  5599. am_aux_dir=`cd $ac_aux_dir && pwd`
  5600. ])
  5601. # AM_CONDITIONAL -*- Autoconf -*-
  5602. # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
  5603. # Free Software Foundation, Inc.
  5604. #
  5605. # This file is free software; the Free Software Foundation
  5606. # gives unlimited permission to copy and/or distribute it,
  5607. # with or without modifications, as long as this notice is preserved.
  5608. # serial 8
  5609. # AM_CONDITIONAL(NAME, SHELL-CONDITION)
  5610. # -------------------------------------
  5611. # Define a conditional.
  5612. AC_DEFUN([AM_CONDITIONAL],
  5613. [AC_PREREQ(2.52)dnl
  5614. ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
  5615. [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
  5616. AC_SUBST([$1_TRUE])dnl
  5617. AC_SUBST([$1_FALSE])dnl
  5618. _AM_SUBST_NOTMAKE([$1_TRUE])dnl
  5619. _AM_SUBST_NOTMAKE([$1_FALSE])dnl
  5620. if $2; then
  5621. $1_TRUE=
  5622. $1_FALSE='#'
  5623. else
  5624. $1_TRUE='#'
  5625. $1_FALSE=
  5626. fi
  5627. AC_CONFIG_COMMANDS_PRE(
  5628. [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
  5629. AC_MSG_ERROR([[conditional "$1" was never defined.
  5630. Usually this means the macro was only invoked conditionally.]])
  5631. fi])])
  5632. # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
  5633. # Free Software Foundation, Inc.
  5634. #
  5635. # This file is free software; the Free Software Foundation
  5636. # gives unlimited permission to copy and/or distribute it,
  5637. # with or without modifications, as long as this notice is preserved.
  5638. # serial 9
  5639. # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
  5640. # written in clear, in which case automake, when reading aclocal.m4,
  5641. # will think it sees a *use*, and therefore will trigger all it's
  5642. # C support machinery. Also note that it means that autoscan, seeing
  5643. # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
  5644. # _AM_DEPENDENCIES(NAME)
  5645. # ----------------------
  5646. # See how the compiler implements dependency checking.
  5647. # NAME is "CC", "CXX", "GCJ", or "OBJC".
  5648. # We try a few techniques and use that to set a single cache variable.
  5649. #
  5650. # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
  5651. # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
  5652. # dependency, and given that the user is not expected to run this macro,
  5653. # just rely on AC_PROG_CC.
  5654. AC_DEFUN([_AM_DEPENDENCIES],
  5655. [AC_REQUIRE([AM_SET_DEPDIR])dnl
  5656. AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
  5657. AC_REQUIRE([AM_MAKE_INCLUDE])dnl
  5658. AC_REQUIRE([AM_DEP_TRACK])dnl
  5659. ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
  5660. [$1], CXX, [depcc="$CXX" am_compiler_list=],
  5661. [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
  5662. [$1], UPC, [depcc="$UPC" am_compiler_list=],
  5663. [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
  5664. [depcc="$$1" am_compiler_list=])
  5665. AC_CACHE_CHECK([dependency style of $depcc],
  5666. [am_cv_$1_dependencies_compiler_type],
  5667. [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  5668. # We make a subdir and do the tests there. Otherwise we can end up
  5669. # making bogus files that we don't know about and never remove. For
  5670. # instance it was reported that on HP-UX the gcc test will end up
  5671. # making a dummy file named `D' -- because `-MD' means `put the output
  5672. # in D'.
  5673. mkdir conftest.dir
  5674. # Copy depcomp to subdir because otherwise we won't find it if we're
  5675. # using a relative directory.
  5676. cp "$am_depcomp" conftest.dir
  5677. cd conftest.dir
  5678. # We will build objects and dependencies in a subdirectory because
  5679. # it helps to detect inapplicable dependency modes. For instance
  5680. # both Tru64's cc and ICC support -MD to output dependencies as a
  5681. # side effect of compilation, but ICC will put the dependencies in
  5682. # the current directory while Tru64 will put them in the object
  5683. # directory.
  5684. mkdir sub
  5685. am_cv_$1_dependencies_compiler_type=none
  5686. if test "$am_compiler_list" = ""; then
  5687. am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
  5688. fi
  5689. for depmode in $am_compiler_list; do
  5690. # Setup a source with many dependencies, because some compilers
  5691. # like to wrap large dependency lists on column 80 (with \), and
  5692. # we should not choose a depcomp mode which is confused by this.
  5693. #
  5694. # We need to recreate these files for each test, as the compiler may
  5695. # overwrite some of them when testing with obscure command lines.
  5696. # This happens at least with the AIX C compiler.
  5697. : > sub/conftest.c
  5698. for i in 1 2 3 4 5 6; do
  5699. echo '#include "conftst'$i'.h"' >> sub/conftest.c
  5700. # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
  5701. # Solaris 8's {/usr,}/bin/sh.
  5702. touch sub/conftst$i.h
  5703. done
  5704. echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
  5705. case $depmode in
  5706. nosideeffect)
  5707. # after this tag, mechanisms are not by side-effect, so they'll
  5708. # only be used when explicitly requested
  5709. if test "x$enable_dependency_tracking" = xyes; then
  5710. continue
  5711. else
  5712. break
  5713. fi
  5714. ;;
  5715. none) break ;;
  5716. esac
  5717. # We check with `-c' and `-o' for the sake of the "dashmstdout"
  5718. # mode. It turns out that the SunPro C++ compiler does not properly
  5719. # handle `-M -o', and we need to detect this.
  5720. if depmode=$depmode \
  5721. source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
  5722. depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
  5723. $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
  5724. >/dev/null 2>conftest.err &&
  5725. grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
  5726. grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
  5727. grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
  5728. ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
  5729. # icc doesn't choke on unknown options, it will just issue warnings
  5730. # or remarks (even with -Werror). So we grep stderr for any message
  5731. # that says an option was ignored or not supported.
  5732. # When given -MP, icc 7.0 and 7.1 complain thusly:
  5733. # icc: Command line warning: ignoring option '-M'; no argument required
  5734. # The diagnosis changed in icc 8.0:
  5735. # icc: Command line remark: option '-MP' not supported
  5736. if (grep 'ignoring option' conftest.err ||
  5737. grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
  5738. am_cv_$1_dependencies_compiler_type=$depmode
  5739. break
  5740. fi
  5741. fi
  5742. done
  5743. cd ..
  5744. rm -rf conftest.dir
  5745. else
  5746. am_cv_$1_dependencies_compiler_type=none
  5747. fi
  5748. ])
  5749. AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
  5750. AM_CONDITIONAL([am__fastdep$1], [
  5751. test "x$enable_dependency_tracking" != xno \
  5752. && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
  5753. ])
  5754. # AM_SET_DEPDIR
  5755. # -------------
  5756. # Choose a directory name for dependency files.
  5757. # This macro is AC_REQUIREd in _AM_DEPENDENCIES
  5758. AC_DEFUN([AM_SET_DEPDIR],
  5759. [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  5760. AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
  5761. ])
  5762. # AM_DEP_TRACK
  5763. # ------------
  5764. AC_DEFUN([AM_DEP_TRACK],
  5765. [AC_ARG_ENABLE(dependency-tracking,
  5766. [ --disable-dependency-tracking speeds up one-time build
  5767. --enable-dependency-tracking do not reject slow dependency extractors])
  5768. if test "x$enable_dependency_tracking" != xno; then
  5769. am_depcomp="$ac_aux_dir/depcomp"
  5770. AMDEPBACKSLASH='\'
  5771. fi
  5772. AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
  5773. AC_SUBST([AMDEPBACKSLASH])dnl
  5774. _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
  5775. ])
  5776. # Generate code to set up dependency tracking. -*- Autoconf -*-
  5777. # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
  5778. # Free Software Foundation, Inc.
  5779. #
  5780. # This file is free software; the Free Software Foundation
  5781. # gives unlimited permission to copy and/or distribute it,
  5782. # with or without modifications, as long as this notice is preserved.
  5783. #serial 3
  5784. # _AM_OUTPUT_DEPENDENCY_COMMANDS
  5785. # ------------------------------
  5786. AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
  5787. [for mf in $CONFIG_FILES; do
  5788. # Strip MF so we end up with the name of the file.
  5789. mf=`echo "$mf" | sed -e 's/:.*$//'`
  5790. # Check whether this is an Automake generated Makefile or not.
  5791. # We used to match only the files named `Makefile.in', but
  5792. # some people rename them; so instead we look at the file content.
  5793. # Grep'ing the first line is not enough: some people post-process
  5794. # each Makefile.in and add a new line on top of each file to say so.
  5795. # Grep'ing the whole file is not good either: AIX grep has a line
  5796. # limit of 2048, but all sed's we know have understand at least 4000.
  5797. if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
  5798. dirpart=`AS_DIRNAME("$mf")`
  5799. else
  5800. continue
  5801. fi
  5802. # Extract the definition of DEPDIR, am__include, and am__quote
  5803. # from the Makefile without running `make'.
  5804. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
  5805. test -z "$DEPDIR" && continue
  5806. am__include=`sed -n 's/^am__include = //p' < "$mf"`
  5807. test -z "am__include" && continue
  5808. am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
  5809. # When using ansi2knr, U may be empty or an underscore; expand it
  5810. U=`sed -n 's/^U = //p' < "$mf"`
  5811. # Find all dependency output files, they are included files with
  5812. # $(DEPDIR) in their names. We invoke sed twice because it is the
  5813. # simplest approach to changing $(DEPDIR) to its actual value in the
  5814. # expansion.
  5815. for file in `sed -n "
  5816. s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
  5817. sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
  5818. # Make sure the directory exists.
  5819. test -f "$dirpart/$file" && continue
  5820. fdir=`AS_DIRNAME(["$file"])`
  5821. AS_MKDIR_P([$dirpart/$fdir])
  5822. # echo "creating $dirpart/$file"
  5823. echo '# dummy' > "$dirpart/$file"
  5824. done
  5825. done
  5826. ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
  5827. # AM_OUTPUT_DEPENDENCY_COMMANDS
  5828. # -----------------------------
  5829. # This macro should only be invoked once -- use via AC_REQUIRE.
  5830. #
  5831. # This code is only required when automatic dependency tracking
  5832. # is enabled. FIXME. This creates each `.P' file that we will
  5833. # need in order to bootstrap the dependency handling code.
  5834. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
  5835. [AC_CONFIG_COMMANDS([depfiles],
  5836. [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
  5837. [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
  5838. ])
  5839. # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
  5840. # Free Software Foundation, Inc.
  5841. #
  5842. # This file is free software; the Free Software Foundation
  5843. # gives unlimited permission to copy and/or distribute it,
  5844. # with or without modifications, as long as this notice is preserved.
  5845. # serial 8
  5846. # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
  5847. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
  5848. # Do all the work for Automake. -*- Autoconf -*-
  5849. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
  5850. # 2005, 2006 Free Software Foundation, Inc.
  5851. #
  5852. # This file is free software; the Free Software Foundation
  5853. # gives unlimited permission to copy and/or distribute it,
  5854. # with or without modifications, as long as this notice is preserved.
  5855. # serial 12
  5856. # This macro actually does too much. Some checks are only needed if
  5857. # your package does certain things. But this isn't really a big deal.
  5858. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
  5859. # AM_INIT_AUTOMAKE([OPTIONS])
  5860. # -----------------------------------------------
  5861. # The call with PACKAGE and VERSION arguments is the old style
  5862. # call (pre autoconf-2.50), which is being phased out. PACKAGE
  5863. # and VERSION should now be passed to AC_INIT and removed from
  5864. # the call to AM_INIT_AUTOMAKE.
  5865. # We support both call styles for the transition. After
  5866. # the next Automake release, Autoconf can make the AC_INIT
  5867. # arguments mandatory, and then we can depend on a new Autoconf
  5868. # release and drop the old call support.
  5869. AC_DEFUN([AM_INIT_AUTOMAKE],
  5870. [AC_PREREQ([2.60])dnl
  5871. dnl Autoconf wants to disallow AM_ names. We explicitly allow
  5872. dnl the ones we care about.
  5873. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
  5874. AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
  5875. AC_REQUIRE([AC_PROG_INSTALL])dnl
  5876. if test "`cd $srcdir && pwd`" != "`pwd`"; then
  5877. # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
  5878. # is not polluted with repeated "-I."
  5879. AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
  5880. # test to see if srcdir already configured
  5881. if test -f $srcdir/config.status; then
  5882. AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  5883. fi
  5884. fi
  5885. # test whether we have cygpath
  5886. if test -z "$CYGPATH_W"; then
  5887. if (cygpath --version) >/dev/null 2>/dev/null; then
  5888. CYGPATH_W='cygpath -w'
  5889. else
  5890. CYGPATH_W=echo
  5891. fi
  5892. fi
  5893. AC_SUBST([CYGPATH_W])
  5894. # Define the identity of the package.
  5895. dnl Distinguish between old-style and new-style calls.
  5896. m4_ifval([$2],
  5897. [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  5898. AC_SUBST([PACKAGE], [$1])dnl
  5899. AC_SUBST([VERSION], [$2])],
  5900. [_AM_SET_OPTIONS([$1])dnl
  5901. dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
  5902. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
  5903. [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
  5904. AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  5905. AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
  5906. _AM_IF_OPTION([no-define],,
  5907. [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
  5908. AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
  5909. # Some tools Automake needs.
  5910. AC_REQUIRE([AM_SANITY_CHECK])dnl
  5911. AC_REQUIRE([AC_ARG_PROGRAM])dnl
  5912. AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
  5913. AM_MISSING_PROG(AUTOCONF, autoconf)
  5914. AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
  5915. AM_MISSING_PROG(AUTOHEADER, autoheader)
  5916. AM_MISSING_PROG(MAKEINFO, makeinfo)
  5917. AM_PROG_INSTALL_SH
  5918. AM_PROG_INSTALL_STRIP
  5919. AC_REQUIRE([AM_PROG_MKDIR_P])dnl
  5920. # We need awk for the "check" target. The system "awk" is bad on
  5921. # some platforms.
  5922. AC_REQUIRE([AC_PROG_AWK])dnl
  5923. AC_REQUIRE([AC_PROG_MAKE_SET])dnl
  5924. AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  5925. _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
  5926. [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
  5927. [_AM_PROG_TAR([v7])])])
  5928. _AM_IF_OPTION([no-dependencies],,
  5929. [AC_PROVIDE_IFELSE([AC_PROG_CC],
  5930. [_AM_DEPENDENCIES(CC)],
  5931. [define([AC_PROG_CC],
  5932. defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
  5933. AC_PROVIDE_IFELSE([AC_PROG_CXX],
  5934. [_AM_DEPENDENCIES(CXX)],
  5935. [define([AC_PROG_CXX],
  5936. defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
  5937. AC_PROVIDE_IFELSE([AC_PROG_OBJC],
  5938. [_AM_DEPENDENCIES(OBJC)],
  5939. [define([AC_PROG_OBJC],
  5940. defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
  5941. ])
  5942. ])
  5943. # When config.status generates a header, we must update the stamp-h file.
  5944. # This file resides in the same directory as the config header
  5945. # that is generated. The stamp files are numbered to have different names.
  5946. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
  5947. # loop where config.status creates the headers, so we can generate
  5948. # our stamp files there.
  5949. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
  5950. [# Compute $1's index in $config_headers.
  5951. _am_stamp_count=1
  5952. for _am_header in $config_headers :; do
  5953. case $_am_header in
  5954. $1 | $1:* )
  5955. break ;;
  5956. * )
  5957. _am_stamp_count=`expr $_am_stamp_count + 1` ;;
  5958. esac
  5959. done
  5960. echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
  5961. # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
  5962. #
  5963. # This file is free software; the Free Software Foundation
  5964. # gives unlimited permission to copy and/or distribute it,
  5965. # with or without modifications, as long as this notice is preserved.
  5966. # AM_PROG_INSTALL_SH
  5967. # ------------------
  5968. # Define $install_sh.
  5969. AC_DEFUN([AM_PROG_INSTALL_SH],
  5970. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  5971. install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
  5972. AC_SUBST(install_sh)])
  5973. # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
  5974. #
  5975. # This file is free software; the Free Software Foundation
  5976. # gives unlimited permission to copy and/or distribute it,
  5977. # with or without modifications, as long as this notice is preserved.
  5978. # serial 2
  5979. # Check whether the underlying file-system supports filenames
  5980. # with a leading dot. For instance MS-DOS doesn't.
  5981. AC_DEFUN([AM_SET_LEADING_DOT],
  5982. [rm -rf .tst 2>/dev/null
  5983. mkdir .tst 2>/dev/null
  5984. if test -d .tst; then
  5985. am__leading_dot=.
  5986. else
  5987. am__leading_dot=_
  5988. fi
  5989. rmdir .tst 2>/dev/null
  5990. AC_SUBST([am__leading_dot])])
  5991. # Check to see how 'make' treats includes. -*- Autoconf -*-
  5992. # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
  5993. #
  5994. # This file is free software; the Free Software Foundation
  5995. # gives unlimited permission to copy and/or distribute it,
  5996. # with or without modifications, as long as this notice is preserved.
  5997. # serial 3
  5998. # AM_MAKE_INCLUDE()
  5999. # -----------------
  6000. # Check to see how make treats includes.
  6001. AC_DEFUN([AM_MAKE_INCLUDE],
  6002. [am_make=${MAKE-make}
  6003. cat > confinc << 'END'
  6004. am__doit:
  6005. @echo done
  6006. .PHONY: am__doit
  6007. END
  6008. # If we don't find an include directive, just comment out the code.
  6009. AC_MSG_CHECKING([for style of include used by $am_make])
  6010. am__include="#"
  6011. am__quote=
  6012. _am_result=none
  6013. # First try GNU make style include.
  6014. echo "include confinc" > confmf
  6015. # We grep out `Entering directory' and `Leaving directory'
  6016. # messages which can occur if `w' ends up in MAKEFLAGS.
  6017. # In particular we don't look at `^make:' because GNU make might
  6018. # be invoked under some other name (usually "gmake"), in which
  6019. # case it prints its new name instead of `make'.
  6020. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
  6021. am__include=include
  6022. am__quote=
  6023. _am_result=GNU
  6024. fi
  6025. # Now try BSD make style include.
  6026. if test "$am__include" = "#"; then
  6027. echo '.include "confinc"' > confmf
  6028. if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
  6029. am__include=.include
  6030. am__quote="\""
  6031. _am_result=BSD
  6032. fi
  6033. fi
  6034. AC_SUBST([am__include])
  6035. AC_SUBST([am__quote])
  6036. AC_MSG_RESULT([$_am_result])
  6037. rm -f confinc confmf
  6038. ])
  6039. # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
  6040. # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
  6041. # Free Software Foundation, Inc.
  6042. #
  6043. # This file is free software; the Free Software Foundation
  6044. # gives unlimited permission to copy and/or distribute it,
  6045. # with or without modifications, as long as this notice is preserved.
  6046. # serial 5
  6047. # AM_MISSING_PROG(NAME, PROGRAM)
  6048. # ------------------------------
  6049. AC_DEFUN([AM_MISSING_PROG],
  6050. [AC_REQUIRE([AM_MISSING_HAS_RUN])
  6051. $1=${$1-"${am_missing_run}$2"}
  6052. AC_SUBST($1)])
  6053. # AM_MISSING_HAS_RUN
  6054. # ------------------
  6055. # Define MISSING if not defined so far and test if it supports --run.
  6056. # If it does, set am_missing_run to use it, otherwise, to nothing.
  6057. AC_DEFUN([AM_MISSING_HAS_RUN],
  6058. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  6059. AC_REQUIRE_AUX_FILE([missing])dnl
  6060. test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
  6061. # Use eval to expand $SHELL
  6062. if eval "$MISSING --run true"; then
  6063. am_missing_run="$MISSING --run "
  6064. else
  6065. am_missing_run=
  6066. AC_MSG_WARN([`missing' script is too old or missing])
  6067. fi
  6068. ])
  6069. # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
  6070. #
  6071. # This file is free software; the Free Software Foundation
  6072. # gives unlimited permission to copy and/or distribute it,
  6073. # with or without modifications, as long as this notice is preserved.
  6074. # AM_PROG_MKDIR_P
  6075. # ---------------
  6076. # Check for `mkdir -p'.
  6077. AC_DEFUN([AM_PROG_MKDIR_P],
  6078. [AC_PREREQ([2.60])dnl
  6079. AC_REQUIRE([AC_PROG_MKDIR_P])dnl
  6080. dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
  6081. dnl while keeping a definition of mkdir_p for backward compatibility.
  6082. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
  6083. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
  6084. dnl Makefile.ins that do not define MKDIR_P, so we do our own
  6085. dnl adjustment using top_builddir (which is defined more often than
  6086. dnl MKDIR_P).
  6087. AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
  6088. case $mkdir_p in
  6089. [[\\/$]]* | ?:[[\\/]]*) ;;
  6090. */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
  6091. esac
  6092. ])
  6093. # Helper functions for option handling. -*- Autoconf -*-
  6094. # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
  6095. #
  6096. # This file is free software; the Free Software Foundation
  6097. # gives unlimited permission to copy and/or distribute it,
  6098. # with or without modifications, as long as this notice is preserved.
  6099. # serial 3
  6100. # _AM_MANGLE_OPTION(NAME)
  6101. # -----------------------
  6102. AC_DEFUN([_AM_MANGLE_OPTION],
  6103. [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
  6104. # _AM_SET_OPTION(NAME)
  6105. # ------------------------------
  6106. # Set option NAME. Presently that only means defining a flag for this option.
  6107. AC_DEFUN([_AM_SET_OPTION],
  6108. [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
  6109. # _AM_SET_OPTIONS(OPTIONS)
  6110. # ----------------------------------
  6111. # OPTIONS is a space-separated list of Automake options.
  6112. AC_DEFUN([_AM_SET_OPTIONS],
  6113. [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
  6114. # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
  6115. # -------------------------------------------
  6116. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  6117. AC_DEFUN([_AM_IF_OPTION],
  6118. [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
  6119. # Check to make sure that the build environment is sane. -*- Autoconf -*-
  6120. # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
  6121. # Free Software Foundation, Inc.
  6122. #
  6123. # This file is free software; the Free Software Foundation
  6124. # gives unlimited permission to copy and/or distribute it,
  6125. # with or without modifications, as long as this notice is preserved.
  6126. # serial 4
  6127. # AM_SANITY_CHECK
  6128. # ---------------
  6129. AC_DEFUN([AM_SANITY_CHECK],
  6130. [AC_MSG_CHECKING([whether build environment is sane])
  6131. # Just in case
  6132. sleep 1
  6133. echo timestamp > conftest.file
  6134. # Do `set' in a subshell so we don't clobber the current shell's
  6135. # arguments. Must try -L first in case configure is actually a
  6136. # symlink; some systems play weird games with the mod time of symlinks
  6137. # (eg FreeBSD returns the mod time of the symlink's containing
  6138. # directory).
  6139. if (
  6140. set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
  6141. if test "$[*]" = "X"; then
  6142. # -L didn't work.
  6143. set X `ls -t $srcdir/configure conftest.file`
  6144. fi
  6145. rm -f conftest.file
  6146. if test "$[*]" != "X $srcdir/configure conftest.file" \
  6147. && test "$[*]" != "X conftest.file $srcdir/configure"; then
  6148. # If neither matched, then we have a broken ls. This can happen
  6149. # if, for instance, CONFIG_SHELL is bash and it inherits a
  6150. # broken ls alias from the environment. This has actually
  6151. # happened. Such a system could not be considered "sane".
  6152. AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
  6153. alias in your environment])
  6154. fi
  6155. test "$[2]" = conftest.file
  6156. )
  6157. then
  6158. # Ok.
  6159. :
  6160. else
  6161. AC_MSG_ERROR([newly created file is older than distributed files!
  6162. Check your system clock])
  6163. fi
  6164. AC_MSG_RESULT(yes)])
  6165. # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
  6166. #
  6167. # This file is free software; the Free Software Foundation
  6168. # gives unlimited permission to copy and/or distribute it,
  6169. # with or without modifications, as long as this notice is preserved.
  6170. # AM_PROG_INSTALL_STRIP
  6171. # ---------------------
  6172. # One issue with vendor `install' (even GNU) is that you can't
  6173. # specify the program used to strip binaries. This is especially
  6174. # annoying in cross-compiling environments, where the build's strip
  6175. # is unlikely to handle the host's binaries.
  6176. # Fortunately install-sh will honor a STRIPPROG variable, so we
  6177. # always use install-sh in `make install-strip', and initialize
  6178. # STRIPPROG with the value of the STRIP variable (set by the user).
  6179. AC_DEFUN([AM_PROG_INSTALL_STRIP],
  6180. [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  6181. # Installed binaries are usually stripped using `strip' when the user
  6182. # run `make install-strip'. However `strip' might not be the right
  6183. # tool to use in cross-compilation environments, therefore Automake
  6184. # will honor the `STRIP' environment variable to overrule this program.
  6185. dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
  6186. if test "$cross_compiling" != no; then
  6187. AC_CHECK_TOOL([STRIP], [strip], :)
  6188. fi
  6189. INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
  6190. AC_SUBST([INSTALL_STRIP_PROGRAM])])
  6191. # Copyright (C) 2006 Free Software Foundation, Inc.
  6192. #
  6193. # This file is free software; the Free Software Foundation
  6194. # gives unlimited permission to copy and/or distribute it,
  6195. # with or without modifications, as long as this notice is preserved.
  6196. # _AM_SUBST_NOTMAKE(VARIABLE)
  6197. # ---------------------------
  6198. # Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
  6199. # This macro is traced by Automake.
  6200. AC_DEFUN([_AM_SUBST_NOTMAKE])
  6201. # Check how to create a tarball. -*- Autoconf -*-
  6202. # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
  6203. #
  6204. # This file is free software; the Free Software Foundation
  6205. # gives unlimited permission to copy and/or distribute it,
  6206. # with or without modifications, as long as this notice is preserved.
  6207. # serial 2
  6208. # _AM_PROG_TAR(FORMAT)
  6209. # --------------------
  6210. # Check how to create a tarball in format FORMAT.
  6211. # FORMAT should be one of `v7', `ustar', or `pax'.
  6212. #
  6213. # Substitute a variable $(am__tar) that is a command
  6214. # writing to stdout a FORMAT-tarball containing the directory
  6215. # $tardir.
  6216. # tardir=directory && $(am__tar) > result.tar
  6217. #
  6218. # Substitute a variable $(am__untar) that extract such
  6219. # a tarball read from stdin.
  6220. # $(am__untar) < result.tar
  6221. AC_DEFUN([_AM_PROG_TAR],
  6222. [# Always define AMTAR for backward compatibility.
  6223. AM_MISSING_PROG([AMTAR], [tar])
  6224. m4_if([$1], [v7],
  6225. [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
  6226. [m4_case([$1], [ustar],, [pax],,
  6227. [m4_fatal([Unknown tar format])])
  6228. AC_MSG_CHECKING([how to create a $1 tar archive])
  6229. # Loop over all known methods to create a tar archive until one works.
  6230. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
  6231. _am_tools=${am_cv_prog_tar_$1-$_am_tools}
  6232. # Do not fold the above two line into one, because Tru64 sh and
  6233. # Solaris sh will not grok spaces in the rhs of `-'.
  6234. for _am_tool in $_am_tools
  6235. do
  6236. case $_am_tool in
  6237. gnutar)
  6238. for _am_tar in tar gnutar gtar;
  6239. do
  6240. AM_RUN_LOG([$_am_tar --version]) && break
  6241. done
  6242. am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
  6243. am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
  6244. am__untar="$_am_tar -xf -"
  6245. ;;
  6246. plaintar)
  6247. # Must skip GNU tar: if it does not support --format= it doesn't create
  6248. # ustar tarball either.
  6249. (tar --version) >/dev/null 2>&1 && continue
  6250. am__tar='tar chf - "$$tardir"'
  6251. am__tar_='tar chf - "$tardir"'
  6252. am__untar='tar xf -'
  6253. ;;
  6254. pax)
  6255. am__tar='pax -L -x $1 -w "$$tardir"'
  6256. am__tar_='pax -L -x $1 -w "$tardir"'
  6257. am__untar='pax -r'
  6258. ;;
  6259. cpio)
  6260. am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
  6261. am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
  6262. am__untar='cpio -i -H $1 -d'
  6263. ;;
  6264. none)
  6265. am__tar=false
  6266. am__tar_=false
  6267. am__untar=false
  6268. ;;
  6269. esac
  6270. # If the value was cached, stop now. We just wanted to have am__tar
  6271. # and am__untar set.
  6272. test -n "${am_cv_prog_tar_$1}" && break
  6273. # tar/untar a dummy directory, and stop if the command works
  6274. rm -rf conftest.dir
  6275. mkdir conftest.dir
  6276. echo GrepMe > conftest.dir/file
  6277. AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
  6278. rm -rf conftest.dir
  6279. if test -s conftest.tar; then
  6280. AM_RUN_LOG([$am__untar <conftest.tar])
  6281. grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
  6282. fi
  6283. done
  6284. rm -rf conftest.dir
  6285. AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
  6286. AC_MSG_RESULT([$am_cv_prog_tar_$1])])
  6287. AC_SUBST([am__tar])
  6288. AC_SUBST([am__untar])
  6289. ]) # _AM_PROG_TAR
  6290. m4_include([acinclude.m4])