aclocal.m4 275 KB

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