libtool.m4 225 KB

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