acinclude.m4 227 KB

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