1
0

libtool.m4 299 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369
  1. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
  2. #
  3. # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
  4. # Written by Gordon Matzigkeit, 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. m4_define([_LT_COPYING], [dnl
  10. # Copyright (C) 2014 Free Software Foundation, Inc.
  11. # This is free software; see the source for copying conditions. There is NO
  12. # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. # GNU Libtool is free software; you can redistribute it and/or modify
  14. # it under the terms of the GNU General Public License as published by
  15. # the Free Software Foundation; either version 2 of of the License, or
  16. # (at your option) any later version.
  17. #
  18. # As a special exception to the GNU General Public License, if you
  19. # distribute this file as part of a program or library that is built
  20. # using GNU Libtool, you may include this file under the same
  21. # distribution terms that you use for the rest of that program.
  22. #
  23. # GNU Libtool is distributed in the hope that it will be useful, but
  24. # WITHOUT ANY WARRANTY; without even the implied warranty of
  25. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  26. # GNU General Public License for more details.
  27. #
  28. # You should have received a copy of the GNU General Public License
  29. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  30. ])
  31. # serial 58 LT_INIT
  32. # LT_PREREQ(VERSION)
  33. # ------------------
  34. # Complain and exit if this libtool version is less that VERSION.
  35. m4_defun([LT_PREREQ],
  36. [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
  37. [m4_default([$3],
  38. [m4_fatal([Libtool version $1 or higher is required],
  39. 63)])],
  40. [$2])])
  41. # _LT_CHECK_BUILDDIR
  42. # ------------------
  43. # Complain if the absolute build directory name contains unusual characters
  44. m4_defun([_LT_CHECK_BUILDDIR],
  45. [case `pwd` in
  46. *\ * | *\ *)
  47. AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
  48. esac
  49. ])
  50. # LT_INIT([OPTIONS])
  51. # ------------------
  52. AC_DEFUN([LT_INIT],
  53. [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
  54. AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  55. AC_BEFORE([$0], [LT_LANG])dnl
  56. AC_BEFORE([$0], [LT_OUTPUT])dnl
  57. AC_BEFORE([$0], [LTDL_INIT])dnl
  58. m4_require([_LT_CHECK_BUILDDIR])dnl
  59. dnl Autoconf doesn't catch unexpanded LT_ macros by default:
  60. m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
  61. m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
  62. dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
  63. dnl unless we require an AC_DEFUNed macro:
  64. AC_REQUIRE([LTOPTIONS_VERSION])dnl
  65. AC_REQUIRE([LTSUGAR_VERSION])dnl
  66. AC_REQUIRE([LTVERSION_VERSION])dnl
  67. AC_REQUIRE([LTOBSOLETE_VERSION])dnl
  68. m4_require([_LT_PROG_LTMAIN])dnl
  69. _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
  70. dnl Parse OPTIONS
  71. _LT_SET_OPTIONS([$0], [$1])
  72. # This can be used to rebuild libtool when needed
  73. LIBTOOL_DEPS=$ltmain
  74. # Always use our own libtool.
  75. LIBTOOL='$(SHELL) $(top_builddir)/libtool'
  76. AC_SUBST(LIBTOOL)dnl
  77. _LT_SETUP
  78. # Only expand once:
  79. m4_define([LT_INIT])
  80. ])# LT_INIT
  81. # Old names:
  82. AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
  83. AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
  84. dnl aclocal-1.4 backwards compatibility:
  85. dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
  86. dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
  87. # _LT_PREPARE_CC_BASENAME
  88. # -----------------------
  89. m4_defun([_LT_PREPARE_CC_BASENAME], [
  90. # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
  91. func_cc_basename ()
  92. {
  93. for cc_temp in @S|@*""; do
  94. case $cc_temp in
  95. compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
  96. distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
  97. \-*) ;;
  98. *) break;;
  99. esac
  100. done
  101. func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
  102. }
  103. ])# _LT_PREPARE_CC_BASENAME
  104. # _LT_CC_BASENAME(CC)
  105. # -------------------
  106. # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
  107. # but that macro is also expanded into generated libtool script, which
  108. # arranges for $SED and $ECHO to be set by different means.
  109. m4_defun([_LT_CC_BASENAME],
  110. [m4_require([_LT_PREPARE_CC_BASENAME])dnl
  111. AC_REQUIRE([_LT_DECL_SED])dnl
  112. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
  113. func_cc_basename $1
  114. cc_basename=$func_cc_basename_result
  115. ])
  116. # _LT_FILEUTILS_DEFAULTS
  117. # ----------------------
  118. # It is okay to use these file commands and assume they have been set
  119. # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
  120. m4_defun([_LT_FILEUTILS_DEFAULTS],
  121. [: ${CP="cp -f"}
  122. : ${MV="mv -f"}
  123. : ${RM="rm -f"}
  124. ])# _LT_FILEUTILS_DEFAULTS
  125. # _LT_SETUP
  126. # ---------
  127. m4_defun([_LT_SETUP],
  128. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  129. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  130. AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
  131. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
  132. _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
  133. dnl
  134. _LT_DECL([], [host_alias], [0], [The host system])dnl
  135. _LT_DECL([], [host], [0])dnl
  136. _LT_DECL([], [host_os], [0])dnl
  137. dnl
  138. _LT_DECL([], [build_alias], [0], [The build system])dnl
  139. _LT_DECL([], [build], [0])dnl
  140. _LT_DECL([], [build_os], [0])dnl
  141. dnl
  142. AC_REQUIRE([AC_PROG_CC])dnl
  143. AC_REQUIRE([LT_PATH_LD])dnl
  144. AC_REQUIRE([LT_PATH_NM])dnl
  145. dnl
  146. AC_REQUIRE([AC_PROG_LN_S])dnl
  147. test -z "$LN_S" && LN_S="ln -s"
  148. _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
  149. dnl
  150. AC_REQUIRE([LT_CMD_MAX_LEN])dnl
  151. _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
  152. _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
  153. dnl
  154. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  155. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  156. m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
  157. m4_require([_LT_CMD_RELOAD])dnl
  158. m4_require([_LT_CHECK_MAGIC_METHOD])dnl
  159. m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
  160. m4_require([_LT_CMD_OLD_ARCHIVE])dnl
  161. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  162. m4_require([_LT_WITH_SYSROOT])dnl
  163. m4_require([_LT_CMD_TRUNCATE])dnl
  164. _LT_CONFIG_LIBTOOL_INIT([
  165. # See if we are running on zsh, and set the options that allow our
  166. # commands through without removal of \ escapes INIT.
  167. if test -n "\${ZSH_VERSION+set}"; then
  168. setopt NO_GLOB_SUBST
  169. fi
  170. ])
  171. if test -n "${ZSH_VERSION+set}"; then
  172. setopt NO_GLOB_SUBST
  173. fi
  174. _LT_CHECK_OBJDIR
  175. m4_require([_LT_TAG_COMPILER])dnl
  176. case $host_os in
  177. aix3*)
  178. # AIX sometimes has problems with the GCC collect2 program. For some
  179. # reason, if we set the COLLECT_NAMES environment variable, the problems
  180. # vanish in a puff of smoke.
  181. if test set != "${COLLECT_NAMES+set}"; then
  182. COLLECT_NAMES=
  183. export COLLECT_NAMES
  184. fi
  185. ;;
  186. esac
  187. # Global variables:
  188. ofile=libtool
  189. can_build_shared=yes
  190. # All known linkers require a '.a' archive for static linking (except MSVC,
  191. # which needs '.lib').
  192. libext=a
  193. with_gnu_ld=$lt_cv_prog_gnu_ld
  194. old_CC=$CC
  195. old_CFLAGS=$CFLAGS
  196. # Set sane defaults for various variables
  197. test -z "$CC" && CC=cc
  198. test -z "$LTCC" && LTCC=$CC
  199. test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
  200. test -z "$LD" && LD=ld
  201. test -z "$ac_objext" && ac_objext=o
  202. _LT_CC_BASENAME([$compiler])
  203. # Only perform the check for file, if the check method requires it
  204. test -z "$MAGIC_CMD" && MAGIC_CMD=file
  205. case $deplibs_check_method in
  206. file_magic*)
  207. if test "$file_magic_cmd" = '$MAGIC_CMD'; then
  208. _LT_PATH_MAGIC
  209. fi
  210. ;;
  211. esac
  212. # Use C for the default configuration in the libtool script
  213. LT_SUPPORTED_TAG([CC])
  214. _LT_LANG_C_CONFIG
  215. _LT_LANG_DEFAULT_CONFIG
  216. _LT_CONFIG_COMMANDS
  217. ])# _LT_SETUP
  218. # _LT_PREPARE_SED_QUOTE_VARS
  219. # --------------------------
  220. # Define a few sed substitution that help us do robust quoting.
  221. m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
  222. [# Backslashify metacharacters that are still active within
  223. # double-quoted strings.
  224. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
  225. # Same as above, but do not quote variable references.
  226. double_quote_subst='s/\([["`\\]]\)/\\\1/g'
  227. # Sed substitution to delay expansion of an escaped shell variable in a
  228. # double_quote_subst'ed string.
  229. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
  230. # Sed substitution to delay expansion of an escaped single quote.
  231. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
  232. # Sed substitution to avoid accidental globbing in evaled expressions
  233. no_glob_subst='s/\*/\\\*/g'
  234. ])
  235. # _LT_PROG_LTMAIN
  236. # ---------------
  237. # Note that this code is called both from 'configure', and 'config.status'
  238. # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
  239. # 'config.status' has no value for ac_aux_dir unless we are using Automake,
  240. # so we pass a copy along to make sure it has a sensible value anyway.
  241. m4_defun([_LT_PROG_LTMAIN],
  242. [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
  243. _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
  244. ltmain=$ac_aux_dir/ltmain.sh
  245. ])# _LT_PROG_LTMAIN
  246. ## ------------------------------------- ##
  247. ## Accumulate code for creating libtool. ##
  248. ## ------------------------------------- ##
  249. # So that we can recreate a full libtool script including additional
  250. # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
  251. # in macros and then make a single call at the end using the 'libtool'
  252. # label.
  253. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
  254. # ----------------------------------------
  255. # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  256. m4_define([_LT_CONFIG_LIBTOOL_INIT],
  257. [m4_ifval([$1],
  258. [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
  259. [$1
  260. ])])])
  261. # Initialize.
  262. m4_define([_LT_OUTPUT_LIBTOOL_INIT])
  263. # _LT_CONFIG_LIBTOOL([COMMANDS])
  264. # ------------------------------
  265. # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  266. m4_define([_LT_CONFIG_LIBTOOL],
  267. [m4_ifval([$1],
  268. [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
  269. [$1
  270. ])])])
  271. # Initialize.
  272. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
  273. # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
  274. # -----------------------------------------------------
  275. m4_defun([_LT_CONFIG_SAVE_COMMANDS],
  276. [_LT_CONFIG_LIBTOOL([$1])
  277. _LT_CONFIG_LIBTOOL_INIT([$2])
  278. ])
  279. # _LT_FORMAT_COMMENT([COMMENT])
  280. # -----------------------------
  281. # Add leading comment marks to the start of each line, and a trailing
  282. # full-stop to the whole comment if one is not present already.
  283. m4_define([_LT_FORMAT_COMMENT],
  284. [m4_ifval([$1], [
  285. m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
  286. [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
  287. )])
  288. ## ------------------------ ##
  289. ## FIXME: Eliminate VARNAME ##
  290. ## ------------------------ ##
  291. # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
  292. # -------------------------------------------------------------------
  293. # CONFIGNAME is the name given to the value in the libtool script.
  294. # VARNAME is the (base) name used in the configure script.
  295. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
  296. # VARNAME. Any other value will be used directly.
  297. m4_define([_LT_DECL],
  298. [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
  299. [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
  300. [m4_ifval([$1], [$1], [$2])])
  301. lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
  302. m4_ifval([$4],
  303. [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
  304. lt_dict_add_subkey([lt_decl_dict], [$2],
  305. [tagged?], [m4_ifval([$5], [yes], [no])])])
  306. ])
  307. # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
  308. # --------------------------------------------------------
  309. m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
  310. # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
  311. # ------------------------------------------------
  312. m4_define([lt_decl_tag_varnames],
  313. [_lt_decl_filter([tagged?], [yes], $@)])
  314. # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
  315. # ---------------------------------------------------------
  316. m4_define([_lt_decl_filter],
  317. [m4_case([$#],
  318. [0], [m4_fatal([$0: too few arguments: $#])],
  319. [1], [m4_fatal([$0: too few arguments: $#: $1])],
  320. [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
  321. [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
  322. [lt_dict_filter([lt_decl_dict], $@)])[]dnl
  323. ])
  324. # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
  325. # --------------------------------------------------
  326. m4_define([lt_decl_quote_varnames],
  327. [_lt_decl_filter([value], [1], $@)])
  328. # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
  329. # ---------------------------------------------------
  330. m4_define([lt_decl_dquote_varnames],
  331. [_lt_decl_filter([value], [2], $@)])
  332. # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
  333. # ---------------------------------------------------
  334. m4_define([lt_decl_varnames_tagged],
  335. [m4_assert([$# <= 2])dnl
  336. _$0(m4_quote(m4_default([$1], [[, ]])),
  337. m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
  338. m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
  339. m4_define([_lt_decl_varnames_tagged],
  340. [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
  341. # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
  342. # ------------------------------------------------
  343. m4_define([lt_decl_all_varnames],
  344. [_$0(m4_quote(m4_default([$1], [[, ]])),
  345. m4_if([$2], [],
  346. m4_quote(lt_decl_varnames),
  347. m4_quote(m4_shift($@))))[]dnl
  348. ])
  349. m4_define([_lt_decl_all_varnames],
  350. [lt_join($@, lt_decl_varnames_tagged([$1],
  351. lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
  352. ])
  353. # _LT_CONFIG_STATUS_DECLARE([VARNAME])
  354. # ------------------------------------
  355. # Quote a variable value, and forward it to 'config.status' so that its
  356. # declaration there will have the same value as in 'configure'. VARNAME
  357. # must have a single quote delimited value for this to work.
  358. m4_define([_LT_CONFIG_STATUS_DECLARE],
  359. [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
  360. # _LT_CONFIG_STATUS_DECLARATIONS
  361. # ------------------------------
  362. # We delimit libtool config variables with single quotes, so when
  363. # we write them to config.status, we have to be sure to quote all
  364. # embedded single quotes properly. In configure, this macro expands
  365. # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
  366. #
  367. # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
  368. m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
  369. [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
  370. [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
  371. # _LT_LIBTOOL_TAGS
  372. # ----------------
  373. # Output comment and list of tags supported by the script
  374. m4_defun([_LT_LIBTOOL_TAGS],
  375. [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
  376. available_tags='_LT_TAGS'dnl
  377. ])
  378. # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
  379. # -----------------------------------
  380. # Extract the dictionary values for VARNAME (optionally with TAG) and
  381. # expand to a commented shell variable setting:
  382. #
  383. # # Some comment about what VAR is for.
  384. # visible_name=$lt_internal_name
  385. m4_define([_LT_LIBTOOL_DECLARE],
  386. [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
  387. [description])))[]dnl
  388. m4_pushdef([_libtool_name],
  389. m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
  390. m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
  391. [0], [_libtool_name=[$]$1],
  392. [1], [_libtool_name=$lt_[]$1],
  393. [2], [_libtool_name=$lt_[]$1],
  394. [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
  395. m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
  396. ])
  397. # _LT_LIBTOOL_CONFIG_VARS
  398. # -----------------------
  399. # Produce commented declarations of non-tagged libtool config variables
  400. # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
  401. # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
  402. # section) are produced by _LT_LIBTOOL_TAG_VARS.
  403. m4_defun([_LT_LIBTOOL_CONFIG_VARS],
  404. [m4_foreach([_lt_var],
  405. m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
  406. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
  407. # _LT_LIBTOOL_TAG_VARS(TAG)
  408. # -------------------------
  409. m4_define([_LT_LIBTOOL_TAG_VARS],
  410. [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
  411. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
  412. # _LT_TAGVAR(VARNAME, [TAGNAME])
  413. # ------------------------------
  414. m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
  415. # _LT_CONFIG_COMMANDS
  416. # -------------------
  417. # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
  418. # variables for single and double quote escaping we saved from calls
  419. # to _LT_DECL, we can put quote escaped variables declarations
  420. # into 'config.status', and then the shell code to quote escape them in
  421. # for loops in 'config.status'. Finally, any additional code accumulated
  422. # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
  423. m4_defun([_LT_CONFIG_COMMANDS],
  424. [AC_PROVIDE_IFELSE([LT_OUTPUT],
  425. dnl If the libtool generation code has been placed in $CONFIG_LT,
  426. dnl instead of duplicating it all over again into config.status,
  427. dnl then we will have config.status run $CONFIG_LT later, so it
  428. dnl needs to know what name is stored there:
  429. [AC_CONFIG_COMMANDS([libtool],
  430. [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
  431. dnl If the libtool generation code is destined for config.status,
  432. dnl expand the accumulated commands and init code now:
  433. [AC_CONFIG_COMMANDS([libtool],
  434. [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
  435. ])#_LT_CONFIG_COMMANDS
  436. # Initialize.
  437. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
  438. [
  439. # The HP-UX ksh and POSIX shell print the target directory to stdout
  440. # if CDPATH is set.
  441. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  442. sed_quote_subst='$sed_quote_subst'
  443. double_quote_subst='$double_quote_subst'
  444. delay_variable_subst='$delay_variable_subst'
  445. _LT_CONFIG_STATUS_DECLARATIONS
  446. LTCC='$LTCC'
  447. LTCFLAGS='$LTCFLAGS'
  448. compiler='$compiler_DEFAULT'
  449. # A function that is used when there is no print builtin or printf.
  450. func_fallback_echo ()
  451. {
  452. eval 'cat <<_LTECHO_EOF
  453. \$[]1
  454. _LTECHO_EOF'
  455. }
  456. # Quote evaled strings.
  457. for var in lt_decl_all_varnames([[ \
  458. ]], lt_decl_quote_varnames); do
  459. case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  460. *[[\\\\\\\`\\"\\\$]]*)
  461. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
  462. ;;
  463. *)
  464. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  465. ;;
  466. esac
  467. done
  468. # Double-quote double-evaled strings.
  469. for var in lt_decl_all_varnames([[ \
  470. ]], lt_decl_dquote_varnames); do
  471. case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  472. *[[\\\\\\\`\\"\\\$]]*)
  473. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
  474. ;;
  475. *)
  476. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  477. ;;
  478. esac
  479. done
  480. _LT_OUTPUT_LIBTOOL_INIT
  481. ])
  482. # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
  483. # ------------------------------------
  484. # Generate a child script FILE with all initialization necessary to
  485. # reuse the environment learned by the parent script, and make the
  486. # file executable. If COMMENT is supplied, it is inserted after the
  487. # '#!' sequence but before initialization text begins. After this
  488. # macro, additional text can be appended to FILE to form the body of
  489. # the child script. The macro ends with non-zero status if the
  490. # file could not be fully written (such as if the disk is full).
  491. m4_ifdef([AS_INIT_GENERATED],
  492. [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
  493. [m4_defun([_LT_GENERATED_FILE_INIT],
  494. [m4_require([AS_PREPARE])]dnl
  495. [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
  496. [lt_write_fail=0
  497. cat >$1 <<_ASEOF || lt_write_fail=1
  498. #! $SHELL
  499. # Generated by $as_me.
  500. $2
  501. SHELL=\${CONFIG_SHELL-$SHELL}
  502. export SHELL
  503. _ASEOF
  504. cat >>$1 <<\_ASEOF || lt_write_fail=1
  505. AS_SHELL_SANITIZE
  506. _AS_PREPARE
  507. exec AS_MESSAGE_FD>&1
  508. _ASEOF
  509. test 0 = "$lt_write_fail" && chmod +x $1[]dnl
  510. m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
  511. # LT_OUTPUT
  512. # ---------
  513. # This macro allows early generation of the libtool script (before
  514. # AC_OUTPUT is called), incase it is used in configure for compilation
  515. # tests.
  516. AC_DEFUN([LT_OUTPUT],
  517. [: ${CONFIG_LT=./config.lt}
  518. AC_MSG_NOTICE([creating $CONFIG_LT])
  519. _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
  520. [# Run this file to recreate a libtool stub with the current configuration.])
  521. cat >>"$CONFIG_LT" <<\_LTEOF
  522. lt_cl_silent=false
  523. exec AS_MESSAGE_LOG_FD>>config.log
  524. {
  525. echo
  526. AS_BOX([Running $as_me.])
  527. } >&AS_MESSAGE_LOG_FD
  528. lt_cl_help="\
  529. '$as_me' creates a local libtool stub from the current configuration,
  530. for use in further configure time tests before the real libtool is
  531. generated.
  532. Usage: $[0] [[OPTIONS]]
  533. -h, --help print this help, then exit
  534. -V, --version print version number, then exit
  535. -q, --quiet do not print progress messages
  536. -d, --debug don't remove temporary files
  537. Report bugs to <bug-libtool@gnu.org>."
  538. lt_cl_version="\
  539. m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
  540. m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
  541. configured by $[0], generated by m4_PACKAGE_STRING.
  542. Copyright (C) 2011 Free Software Foundation, Inc.
  543. This config.lt script is free software; the Free Software Foundation
  544. gives unlimited permision to copy, distribute and modify it."
  545. while test 0 != $[#]
  546. do
  547. case $[1] in
  548. --version | --v* | -V )
  549. echo "$lt_cl_version"; exit 0 ;;
  550. --help | --h* | -h )
  551. echo "$lt_cl_help"; exit 0 ;;
  552. --debug | --d* | -d )
  553. debug=: ;;
  554. --quiet | --q* | --silent | --s* | -q )
  555. lt_cl_silent=: ;;
  556. -*) AC_MSG_ERROR([unrecognized option: $[1]
  557. Try '$[0] --help' for more information.]) ;;
  558. *) AC_MSG_ERROR([unrecognized argument: $[1]
  559. Try '$[0] --help' for more information.]) ;;
  560. esac
  561. shift
  562. done
  563. if $lt_cl_silent; then
  564. exec AS_MESSAGE_FD>/dev/null
  565. fi
  566. _LTEOF
  567. cat >>"$CONFIG_LT" <<_LTEOF
  568. _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
  569. _LTEOF
  570. cat >>"$CONFIG_LT" <<\_LTEOF
  571. AC_MSG_NOTICE([creating $ofile])
  572. _LT_OUTPUT_LIBTOOL_COMMANDS
  573. AS_EXIT(0)
  574. _LTEOF
  575. chmod +x "$CONFIG_LT"
  576. # configure is writing to config.log, but config.lt does its own redirection,
  577. # appending to config.log, which fails on DOS, as config.log is still kept
  578. # open by configure. Here we exec the FD to /dev/null, effectively closing
  579. # config.log, so it can be properly (re)opened and appended to by config.lt.
  580. lt_cl_success=:
  581. test yes = "$silent" &&
  582. lt_config_lt_args="$lt_config_lt_args --quiet"
  583. exec AS_MESSAGE_LOG_FD>/dev/null
  584. $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
  585. exec AS_MESSAGE_LOG_FD>>config.log
  586. $lt_cl_success || AS_EXIT(1)
  587. ])# LT_OUTPUT
  588. # _LT_CONFIG(TAG)
  589. # ---------------
  590. # If TAG is the built-in tag, create an initial libtool script with a
  591. # default configuration from the untagged config vars. Otherwise add code
  592. # to config.status for appending the configuration named by TAG from the
  593. # matching tagged config vars.
  594. m4_defun([_LT_CONFIG],
  595. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  596. _LT_CONFIG_SAVE_COMMANDS([
  597. m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
  598. m4_if(_LT_TAG, [C], [
  599. # See if we are running on zsh, and set the options that allow our
  600. # commands through without removal of \ escapes.
  601. if test -n "${ZSH_VERSION+set}"; then
  602. setopt NO_GLOB_SUBST
  603. fi
  604. cfgfile=${ofile}T
  605. trap "$RM \"$cfgfile\"; exit 1" 1 2 15
  606. $RM "$cfgfile"
  607. cat <<_LT_EOF >> "$cfgfile"
  608. #! $SHELL
  609. # Generated automatically by $as_me ($PACKAGE) $VERSION
  610. # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  611. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  612. # Provide generalized library-building support services.
  613. # Written by Gordon Matzigkeit, 1996
  614. _LT_COPYING
  615. _LT_LIBTOOL_TAGS
  616. # Configured defaults for sys_lib_dlsearch_path munging.
  617. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
  618. # ### BEGIN LIBTOOL CONFIG
  619. _LT_LIBTOOL_CONFIG_VARS
  620. _LT_LIBTOOL_TAG_VARS
  621. # ### END LIBTOOL CONFIG
  622. _LT_EOF
  623. cat <<'_LT_EOF' >> "$cfgfile"
  624. # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
  625. _LT_PREPARE_MUNGE_PATH_LIST
  626. _LT_PREPARE_CC_BASENAME
  627. # ### END FUNCTIONS SHARED WITH CONFIGURE
  628. _LT_EOF
  629. case $host_os in
  630. aix3*)
  631. cat <<\_LT_EOF >> "$cfgfile"
  632. # AIX sometimes has problems with the GCC collect2 program. For some
  633. # reason, if we set the COLLECT_NAMES environment variable, the problems
  634. # vanish in a puff of smoke.
  635. if test set != "${COLLECT_NAMES+set}"; then
  636. COLLECT_NAMES=
  637. export COLLECT_NAMES
  638. fi
  639. _LT_EOF
  640. ;;
  641. esac
  642. _LT_PROG_LTMAIN
  643. # We use sed instead of cat because bash on DJGPP gets confused if
  644. # if finds mixed CR/LF and LF-only lines. Since sed operates in
  645. # text mode, it properly converts lines to CR/LF. This bash problem
  646. # is reportedly fixed, but why not run on old versions too?
  647. sed '$q' "$ltmain" >> "$cfgfile" \
  648. || (rm -f "$cfgfile"; exit 1)
  649. mv -f "$cfgfile" "$ofile" ||
  650. (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
  651. chmod +x "$ofile"
  652. ],
  653. [cat <<_LT_EOF >> "$ofile"
  654. dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
  655. dnl in a comment (ie after a #).
  656. # ### BEGIN LIBTOOL TAG CONFIG: $1
  657. _LT_LIBTOOL_TAG_VARS(_LT_TAG)
  658. # ### END LIBTOOL TAG CONFIG: $1
  659. _LT_EOF
  660. ])dnl /m4_if
  661. ],
  662. [m4_if([$1], [], [
  663. PACKAGE='$PACKAGE'
  664. VERSION='$VERSION'
  665. RM='$RM'
  666. ofile='$ofile'], [])
  667. ])dnl /_LT_CONFIG_SAVE_COMMANDS
  668. ])# _LT_CONFIG
  669. # LT_SUPPORTED_TAG(TAG)
  670. # ---------------------
  671. # Trace this macro to discover what tags are supported by the libtool
  672. # --tag option, using:
  673. # autoconf --trace 'LT_SUPPORTED_TAG:$1'
  674. AC_DEFUN([LT_SUPPORTED_TAG], [])
  675. # C support is built-in for now
  676. m4_define([_LT_LANG_C_enabled], [])
  677. m4_define([_LT_TAGS], [])
  678. # LT_LANG(LANG)
  679. # -------------
  680. # Enable libtool support for the given language if not already enabled.
  681. AC_DEFUN([LT_LANG],
  682. [AC_BEFORE([$0], [LT_OUTPUT])dnl
  683. m4_case([$1],
  684. [C], [_LT_LANG(C)],
  685. [C++], [_LT_LANG(CXX)],
  686. [Go], [_LT_LANG(GO)],
  687. [Java], [_LT_LANG(GCJ)],
  688. [Fortran 77], [_LT_LANG(F77)],
  689. [Fortran], [_LT_LANG(FC)],
  690. [Windows Resource], [_LT_LANG(RC)],
  691. [m4_ifdef([_LT_LANG_]$1[_CONFIG],
  692. [_LT_LANG($1)],
  693. [m4_fatal([$0: unsupported language: "$1"])])])dnl
  694. ])# LT_LANG
  695. # _LT_LANG(LANGNAME)
  696. # ------------------
  697. m4_defun([_LT_LANG],
  698. [m4_ifdef([_LT_LANG_]$1[_enabled], [],
  699. [LT_SUPPORTED_TAG([$1])dnl
  700. m4_append([_LT_TAGS], [$1 ])dnl
  701. m4_define([_LT_LANG_]$1[_enabled], [])dnl
  702. _LT_LANG_$1_CONFIG($1)])dnl
  703. ])# _LT_LANG
  704. m4_ifndef([AC_PROG_GO], [
  705. ############################################################
  706. # NOTE: This macro has been submitted for inclusion into #
  707. # GNU Autoconf as AC_PROG_GO. When it is available in #
  708. # a released version of Autoconf we should remove this #
  709. # macro and use it instead. #
  710. ############################################################
  711. m4_defun([AC_PROG_GO],
  712. [AC_LANG_PUSH(Go)dnl
  713. AC_ARG_VAR([GOC], [Go compiler command])dnl
  714. AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
  715. _AC_ARG_VAR_LDFLAGS()dnl
  716. AC_CHECK_TOOL(GOC, gccgo)
  717. if test -z "$GOC"; then
  718. if test -n "$ac_tool_prefix"; then
  719. AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
  720. fi
  721. fi
  722. if test -z "$GOC"; then
  723. AC_CHECK_PROG(GOC, gccgo, gccgo, false)
  724. fi
  725. ])#m4_defun
  726. ])#m4_ifndef
  727. # _LT_LANG_DEFAULT_CONFIG
  728. # -----------------------
  729. m4_defun([_LT_LANG_DEFAULT_CONFIG],
  730. [AC_PROVIDE_IFELSE([AC_PROG_CXX],
  731. [LT_LANG(CXX)],
  732. [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
  733. AC_PROVIDE_IFELSE([AC_PROG_F77],
  734. [LT_LANG(F77)],
  735. [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
  736. AC_PROVIDE_IFELSE([AC_PROG_FC],
  737. [LT_LANG(FC)],
  738. [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
  739. dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
  740. dnl pulling things in needlessly.
  741. AC_PROVIDE_IFELSE([AC_PROG_GCJ],
  742. [LT_LANG(GCJ)],
  743. [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
  744. [LT_LANG(GCJ)],
  745. [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
  746. [LT_LANG(GCJ)],
  747. [m4_ifdef([AC_PROG_GCJ],
  748. [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
  749. m4_ifdef([A][M_PROG_GCJ],
  750. [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
  751. m4_ifdef([LT_PROG_GCJ],
  752. [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
  753. AC_PROVIDE_IFELSE([AC_PROG_GO],
  754. [LT_LANG(GO)],
  755. [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
  756. AC_PROVIDE_IFELSE([LT_PROG_RC],
  757. [LT_LANG(RC)],
  758. [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
  759. ])# _LT_LANG_DEFAULT_CONFIG
  760. # Obsolete macros:
  761. AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
  762. AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
  763. AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
  764. AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
  765. AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
  766. dnl aclocal-1.4 backwards compatibility:
  767. dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
  768. dnl AC_DEFUN([AC_LIBTOOL_F77], [])
  769. dnl AC_DEFUN([AC_LIBTOOL_FC], [])
  770. dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
  771. dnl AC_DEFUN([AC_LIBTOOL_RC], [])
  772. # _LT_TAG_COMPILER
  773. # ----------------
  774. m4_defun([_LT_TAG_COMPILER],
  775. [AC_REQUIRE([AC_PROG_CC])dnl
  776. _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
  777. _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
  778. _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
  779. _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
  780. # If no C compiler was specified, use CC.
  781. LTCC=${LTCC-"$CC"}
  782. # If no C compiler flags were specified, use CFLAGS.
  783. LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
  784. # Allow CC to be a program name with arguments.
  785. compiler=$CC
  786. ])# _LT_TAG_COMPILER
  787. # _LT_COMPILER_BOILERPLATE
  788. # ------------------------
  789. # Check for compiler boilerplate output or warnings with
  790. # the simple compiler test code.
  791. m4_defun([_LT_COMPILER_BOILERPLATE],
  792. [m4_require([_LT_DECL_SED])dnl
  793. ac_outfile=conftest.$ac_objext
  794. echo "$lt_simple_compile_test_code" >conftest.$ac_ext
  795. eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  796. _lt_compiler_boilerplate=`cat conftest.err`
  797. $RM conftest*
  798. ])# _LT_COMPILER_BOILERPLATE
  799. # _LT_LINKER_BOILERPLATE
  800. # ----------------------
  801. # Check for linker boilerplate output or warnings with
  802. # the simple link test code.
  803. m4_defun([_LT_LINKER_BOILERPLATE],
  804. [m4_require([_LT_DECL_SED])dnl
  805. ac_outfile=conftest.$ac_objext
  806. echo "$lt_simple_link_test_code" >conftest.$ac_ext
  807. eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  808. _lt_linker_boilerplate=`cat conftest.err`
  809. $RM -r conftest*
  810. ])# _LT_LINKER_BOILERPLATE
  811. # _LT_REQUIRED_DARWIN_CHECKS
  812. # -------------------------
  813. m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
  814. case $host_os in
  815. rhapsody* | darwin*)
  816. AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
  817. AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
  818. AC_CHECK_TOOL([LIPO], [lipo], [:])
  819. AC_CHECK_TOOL([OTOOL], [otool], [:])
  820. AC_CHECK_TOOL([OTOOL64], [otool64], [:])
  821. _LT_DECL([], [DSYMUTIL], [1],
  822. [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
  823. _LT_DECL([], [NMEDIT], [1],
  824. [Tool to change global to local symbols on Mac OS X])
  825. _LT_DECL([], [LIPO], [1],
  826. [Tool to manipulate fat objects and archives on Mac OS X])
  827. _LT_DECL([], [OTOOL], [1],
  828. [ldd/readelf like tool for Mach-O binaries on Mac OS X])
  829. _LT_DECL([], [OTOOL64], [1],
  830. [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
  831. AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
  832. [lt_cv_apple_cc_single_mod=no
  833. if test -z "$LT_MULTI_MODULE"; then
  834. # By default we will add the -single_module flag. You can override
  835. # by either setting the environment variable LT_MULTI_MODULE
  836. # non-empty at configure time, or by adding -multi_module to the
  837. # link flags.
  838. rm -rf libconftest.dylib*
  839. echo "int foo(void){return 1;}" > conftest.c
  840. echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  841. -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
  842. $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  843. -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
  844. _lt_result=$?
  845. # If there is a non-empty error log, and "single_module"
  846. # appears in it, assume the flag caused a linker warning
  847. if test -s conftest.err && $GREP single_module conftest.err; then
  848. cat conftest.err >&AS_MESSAGE_LOG_FD
  849. # Otherwise, if the output was created with a 0 exit code from
  850. # the compiler, it worked.
  851. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
  852. lt_cv_apple_cc_single_mod=yes
  853. else
  854. cat conftest.err >&AS_MESSAGE_LOG_FD
  855. fi
  856. rm -rf libconftest.dylib*
  857. rm -f conftest.*
  858. fi])
  859. AC_CACHE_CHECK([for -exported_symbols_list linker flag],
  860. [lt_cv_ld_exported_symbols_list],
  861. [lt_cv_ld_exported_symbols_list=no
  862. save_LDFLAGS=$LDFLAGS
  863. echo "_main" > conftest.sym
  864. LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
  865. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  866. [lt_cv_ld_exported_symbols_list=yes],
  867. [lt_cv_ld_exported_symbols_list=no])
  868. LDFLAGS=$save_LDFLAGS
  869. ])
  870. AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
  871. [lt_cv_ld_force_load=no
  872. cat > conftest.c << _LT_EOF
  873. int forced_loaded() { return 2;}
  874. _LT_EOF
  875. echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
  876. $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
  877. echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
  878. $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
  879. echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
  880. $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
  881. cat > conftest.c << _LT_EOF
  882. int main() { return 0;}
  883. _LT_EOF
  884. echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
  885. $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
  886. _lt_result=$?
  887. if test -s conftest.err && $GREP force_load conftest.err; then
  888. cat conftest.err >&AS_MESSAGE_LOG_FD
  889. elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
  890. lt_cv_ld_force_load=yes
  891. else
  892. cat conftest.err >&AS_MESSAGE_LOG_FD
  893. fi
  894. rm -f conftest.err libconftest.a conftest conftest.c
  895. rm -rf conftest.dSYM
  896. ])
  897. case $host_os in
  898. rhapsody* | darwin1.[[012]])
  899. _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
  900. darwin1.*)
  901. _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
  902. darwin*) # darwin 5.x on
  903. # if running on 10.5 or later, the deployment target defaults
  904. # to the OS version, if on x86, and 10.4, the deployment
  905. # target defaults to 10.4. Don't you love it?
  906. case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
  907. 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
  908. _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
  909. 10.[[012]][[,.]]*)
  910. _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
  911. 10.*)
  912. _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
  913. esac
  914. ;;
  915. esac
  916. if test yes = "$lt_cv_apple_cc_single_mod"; then
  917. _lt_dar_single_mod='$single_module'
  918. fi
  919. if test yes = "$lt_cv_ld_exported_symbols_list"; then
  920. _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
  921. else
  922. _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
  923. fi
  924. if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
  925. _lt_dsymutil='~$DSYMUTIL $lib || :'
  926. else
  927. _lt_dsymutil=
  928. fi
  929. ;;
  930. esac
  931. ])
  932. # _LT_DARWIN_LINKER_FEATURES([TAG])
  933. # ---------------------------------
  934. # Checks for linker and compiler features on darwin
  935. m4_defun([_LT_DARWIN_LINKER_FEATURES],
  936. [
  937. m4_require([_LT_REQUIRED_DARWIN_CHECKS])
  938. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  939. _LT_TAGVAR(hardcode_direct, $1)=no
  940. _LT_TAGVAR(hardcode_automatic, $1)=yes
  941. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  942. if test yes = "$lt_cv_ld_force_load"; then
  943. _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
  944. m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
  945. [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
  946. else
  947. _LT_TAGVAR(whole_archive_flag_spec, $1)=''
  948. fi
  949. _LT_TAGVAR(link_all_deplibs, $1)=yes
  950. _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
  951. case $cc_basename in
  952. ifort*|nagfor*) _lt_dar_can_shared=yes ;;
  953. *) _lt_dar_can_shared=$GCC ;;
  954. esac
  955. if test yes = "$_lt_dar_can_shared"; then
  956. output_verbose_link_cmd=func_echo_all
  957. _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
  958. _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
  959. _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
  960. _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
  961. m4_if([$1], [CXX],
  962. [ if test yes != "$lt_cv_apple_cc_single_mod"; then
  963. _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
  964. _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
  965. fi
  966. ],[])
  967. else
  968. _LT_TAGVAR(ld_shlibs, $1)=no
  969. fi
  970. ])
  971. # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
  972. # ----------------------------------
  973. # Links a minimal program and checks the executable
  974. # for the system default hardcoded library path. In most cases,
  975. # this is /usr/lib:/lib, but when the MPI compilers are used
  976. # the location of the communication and MPI libs are included too.
  977. # If we don't find anything, use the default library path according
  978. # to the aix ld manual.
  979. # Store the results from the different compilers for each TAGNAME.
  980. # Allow to override them for all tags through lt_cv_aix_libpath.
  981. m4_defun([_LT_SYS_MODULE_PATH_AIX],
  982. [m4_require([_LT_DECL_SED])dnl
  983. if test set = "${lt_cv_aix_libpath+set}"; then
  984. aix_libpath=$lt_cv_aix_libpath
  985. else
  986. AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
  987. [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
  988. lt_aix_libpath_sed='[
  989. /Import File Strings/,/^$/ {
  990. /^0/ {
  991. s/^0 *\([^ ]*\) *$/\1/
  992. p
  993. }
  994. }]'
  995. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  996. # Check for a 64-bit object if we didn't find anything.
  997. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
  998. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  999. fi],[])
  1000. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
  1001. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
  1002. fi
  1003. ])
  1004. aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
  1005. fi
  1006. ])# _LT_SYS_MODULE_PATH_AIX
  1007. # _LT_SHELL_INIT(ARG)
  1008. # -------------------
  1009. m4_define([_LT_SHELL_INIT],
  1010. [m4_divert_text([M4SH-INIT], [$1
  1011. ])])# _LT_SHELL_INIT
  1012. # _LT_PROG_ECHO_BACKSLASH
  1013. # -----------------------
  1014. # Find how we can fake an echo command that does not interpret backslash.
  1015. # In particular, with Autoconf 2.60 or later we add some code to the start
  1016. # of the generated configure script that will find a shell with a builtin
  1017. # printf (that we can use as an echo command).
  1018. m4_defun([_LT_PROG_ECHO_BACKSLASH],
  1019. [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  1020. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  1021. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  1022. AC_MSG_CHECKING([how to print strings])
  1023. # Test print first, because it will be a builtin if present.
  1024. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
  1025. test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
  1026. ECHO='print -r --'
  1027. elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
  1028. ECHO='printf %s\n'
  1029. else
  1030. # Use this function as a fallback that always works.
  1031. func_fallback_echo ()
  1032. {
  1033. eval 'cat <<_LTECHO_EOF
  1034. $[]1
  1035. _LTECHO_EOF'
  1036. }
  1037. ECHO='func_fallback_echo'
  1038. fi
  1039. # func_echo_all arg...
  1040. # Invoke $ECHO with all args, space-separated.
  1041. func_echo_all ()
  1042. {
  1043. $ECHO "$*"
  1044. }
  1045. case $ECHO in
  1046. printf*) AC_MSG_RESULT([printf]) ;;
  1047. print*) AC_MSG_RESULT([print -r]) ;;
  1048. *) AC_MSG_RESULT([cat]) ;;
  1049. esac
  1050. m4_ifdef([_AS_DETECT_SUGGESTED],
  1051. [_AS_DETECT_SUGGESTED([
  1052. test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
  1053. ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  1054. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  1055. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  1056. PATH=/empty FPATH=/empty; export PATH FPATH
  1057. test "X`printf %s $ECHO`" = "X$ECHO" \
  1058. || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
  1059. _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
  1060. _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
  1061. ])# _LT_PROG_ECHO_BACKSLASH
  1062. # _LT_WITH_SYSROOT
  1063. # ----------------
  1064. AC_DEFUN([_LT_WITH_SYSROOT],
  1065. [AC_MSG_CHECKING([for sysroot])
  1066. AC_ARG_WITH([sysroot],
  1067. [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
  1068. [Search for dependent libraries within DIR (or the compiler's sysroot
  1069. if not specified).])],
  1070. [], [with_sysroot=no])
  1071. dnl lt_sysroot will always be passed unquoted. We quote it here
  1072. dnl in case the user passed a directory name.
  1073. lt_sysroot=
  1074. case $with_sysroot in #(
  1075. yes)
  1076. if test yes = "$GCC"; then
  1077. lt_sysroot=`$CC --print-sysroot 2>/dev/null`
  1078. fi
  1079. ;; #(
  1080. /*)
  1081. lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
  1082. ;; #(
  1083. no|'')
  1084. ;; #(
  1085. *)
  1086. AC_MSG_RESULT([$with_sysroot])
  1087. AC_MSG_ERROR([The sysroot must be an absolute path.])
  1088. ;;
  1089. esac
  1090. AC_MSG_RESULT([${lt_sysroot:-no}])
  1091. _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
  1092. [dependent libraries, and where our libraries should be installed.])])
  1093. # _LT_ENABLE_LOCK
  1094. # ---------------
  1095. m4_defun([_LT_ENABLE_LOCK],
  1096. [AC_ARG_ENABLE([libtool-lock],
  1097. [AS_HELP_STRING([--disable-libtool-lock],
  1098. [avoid locking (might break parallel builds)])])
  1099. test no = "$enable_libtool_lock" || enable_libtool_lock=yes
  1100. # Some flags need to be propagated to the compiler or linker for good
  1101. # libtool support.
  1102. case $host in
  1103. ia64-*-hpux*)
  1104. # Find out what ABI is being produced by ac_compile, and set mode
  1105. # options accordingly.
  1106. echo 'int i;' > conftest.$ac_ext
  1107. if AC_TRY_EVAL(ac_compile); then
  1108. case `/usr/bin/file conftest.$ac_objext` in
  1109. *ELF-32*)
  1110. HPUX_IA64_MODE=32
  1111. ;;
  1112. *ELF-64*)
  1113. HPUX_IA64_MODE=64
  1114. ;;
  1115. esac
  1116. fi
  1117. rm -rf conftest*
  1118. ;;
  1119. *-*-irix6*)
  1120. # Find out what ABI is being produced by ac_compile, and set linker
  1121. # options accordingly.
  1122. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
  1123. if AC_TRY_EVAL(ac_compile); then
  1124. if test yes = "$lt_cv_prog_gnu_ld"; then
  1125. case `/usr/bin/file conftest.$ac_objext` in
  1126. *32-bit*)
  1127. LD="${LD-ld} -melf32bsmip"
  1128. ;;
  1129. *N32*)
  1130. LD="${LD-ld} -melf32bmipn32"
  1131. ;;
  1132. *64-bit*)
  1133. LD="${LD-ld} -melf64bmip"
  1134. ;;
  1135. esac
  1136. else
  1137. case `/usr/bin/file conftest.$ac_objext` in
  1138. *32-bit*)
  1139. LD="${LD-ld} -32"
  1140. ;;
  1141. *N32*)
  1142. LD="${LD-ld} -n32"
  1143. ;;
  1144. *64-bit*)
  1145. LD="${LD-ld} -64"
  1146. ;;
  1147. esac
  1148. fi
  1149. fi
  1150. rm -rf conftest*
  1151. ;;
  1152. mips64*-*linux*)
  1153. # Find out what ABI is being produced by ac_compile, and set linker
  1154. # options accordingly.
  1155. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
  1156. if AC_TRY_EVAL(ac_compile); then
  1157. emul=elf
  1158. case `/usr/bin/file conftest.$ac_objext` in
  1159. *32-bit*)
  1160. emul="${emul}32"
  1161. ;;
  1162. *64-bit*)
  1163. emul="${emul}64"
  1164. ;;
  1165. esac
  1166. case `/usr/bin/file conftest.$ac_objext` in
  1167. *MSB*)
  1168. emul="${emul}btsmip"
  1169. ;;
  1170. *LSB*)
  1171. emul="${emul}ltsmip"
  1172. ;;
  1173. esac
  1174. case `/usr/bin/file conftest.$ac_objext` in
  1175. *N32*)
  1176. emul="${emul}n32"
  1177. ;;
  1178. esac
  1179. LD="${LD-ld} -m $emul"
  1180. fi
  1181. rm -rf conftest*
  1182. ;;
  1183. x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
  1184. s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
  1185. # Find out what ABI is being produced by ac_compile, and set linker
  1186. # options accordingly. Note that the listed cases only cover the
  1187. # situations where additional linker options are needed (such as when
  1188. # doing 32-bit compilation for a host where ld defaults to 64-bit, or
  1189. # vice versa); the common cases where no linker options are needed do
  1190. # not appear in the list.
  1191. echo 'int i;' > conftest.$ac_ext
  1192. if AC_TRY_EVAL(ac_compile); then
  1193. case `/usr/bin/file conftest.o` in
  1194. *32-bit*)
  1195. case $host in
  1196. x86_64-*kfreebsd*-gnu)
  1197. LD="${LD-ld} -m elf_i386_fbsd"
  1198. ;;
  1199. x86_64-*linux*)
  1200. case `/usr/bin/file conftest.o` in
  1201. *x86-64*)
  1202. LD="${LD-ld} -m elf32_x86_64"
  1203. ;;
  1204. *)
  1205. LD="${LD-ld} -m elf_i386"
  1206. ;;
  1207. esac
  1208. ;;
  1209. powerpc64le-*linux*)
  1210. LD="${LD-ld} -m elf32lppclinux"
  1211. ;;
  1212. powerpc64-*linux*)
  1213. LD="${LD-ld} -m elf32ppclinux"
  1214. ;;
  1215. s390x-*linux*)
  1216. LD="${LD-ld} -m elf_s390"
  1217. ;;
  1218. sparc64-*linux*)
  1219. LD="${LD-ld} -m elf32_sparc"
  1220. ;;
  1221. esac
  1222. ;;
  1223. *64-bit*)
  1224. case $host in
  1225. x86_64-*kfreebsd*-gnu)
  1226. LD="${LD-ld} -m elf_x86_64_fbsd"
  1227. ;;
  1228. x86_64-*linux*)
  1229. LD="${LD-ld} -m elf_x86_64"
  1230. ;;
  1231. powerpcle-*linux*)
  1232. LD="${LD-ld} -m elf64lppc"
  1233. ;;
  1234. powerpc-*linux*)
  1235. LD="${LD-ld} -m elf64ppc"
  1236. ;;
  1237. s390*-*linux*|s390*-*tpf*)
  1238. LD="${LD-ld} -m elf64_s390"
  1239. ;;
  1240. sparc*-*linux*)
  1241. LD="${LD-ld} -m elf64_sparc"
  1242. ;;
  1243. esac
  1244. ;;
  1245. esac
  1246. fi
  1247. rm -rf conftest*
  1248. ;;
  1249. *-*-sco3.2v5*)
  1250. # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  1251. SAVE_CFLAGS=$CFLAGS
  1252. CFLAGS="$CFLAGS -belf"
  1253. AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
  1254. [AC_LANG_PUSH(C)
  1255. AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
  1256. AC_LANG_POP])
  1257. if test yes != "$lt_cv_cc_needs_belf"; then
  1258. # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  1259. CFLAGS=$SAVE_CFLAGS
  1260. fi
  1261. ;;
  1262. *-*solaris*)
  1263. # Find out what ABI is being produced by ac_compile, and set linker
  1264. # options accordingly.
  1265. echo 'int i;' > conftest.$ac_ext
  1266. if AC_TRY_EVAL(ac_compile); then
  1267. case `/usr/bin/file conftest.o` in
  1268. *64-bit*)
  1269. case $lt_cv_prog_gnu_ld in
  1270. yes*)
  1271. case $host in
  1272. i?86-*-solaris*|x86_64-*-solaris*)
  1273. LD="${LD-ld} -m elf_x86_64"
  1274. ;;
  1275. sparc*-*-solaris*)
  1276. LD="${LD-ld} -m elf64_sparc"
  1277. ;;
  1278. esac
  1279. # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
  1280. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
  1281. LD=${LD-ld}_sol2
  1282. fi
  1283. ;;
  1284. *)
  1285. if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
  1286. LD="${LD-ld} -64"
  1287. fi
  1288. ;;
  1289. esac
  1290. ;;
  1291. esac
  1292. fi
  1293. rm -rf conftest*
  1294. ;;
  1295. esac
  1296. need_locks=$enable_libtool_lock
  1297. ])# _LT_ENABLE_LOCK
  1298. # _LT_PROG_AR
  1299. # -----------
  1300. m4_defun([_LT_PROG_AR],
  1301. [AC_CHECK_TOOLS(AR, [ar], false)
  1302. : ${AR=ar}
  1303. : ${AR_FLAGS=cru}
  1304. _LT_DECL([], [AR], [1], [The archiver])
  1305. _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
  1306. AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
  1307. [lt_cv_ar_at_file=no
  1308. AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
  1309. [echo conftest.$ac_objext > conftest.lst
  1310. lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
  1311. AC_TRY_EVAL([lt_ar_try])
  1312. if test 0 -eq "$ac_status"; then
  1313. # Ensure the archiver fails upon bogus file names.
  1314. rm -f conftest.$ac_objext libconftest.a
  1315. AC_TRY_EVAL([lt_ar_try])
  1316. if test 0 -ne "$ac_status"; then
  1317. lt_cv_ar_at_file=@
  1318. fi
  1319. fi
  1320. rm -f conftest.* libconftest.a
  1321. ])
  1322. ])
  1323. if test no = "$lt_cv_ar_at_file"; then
  1324. archiver_list_spec=
  1325. else
  1326. archiver_list_spec=$lt_cv_ar_at_file
  1327. fi
  1328. _LT_DECL([], [archiver_list_spec], [1],
  1329. [How to feed a file listing to the archiver])
  1330. ])# _LT_PROG_AR
  1331. # _LT_CMD_OLD_ARCHIVE
  1332. # -------------------
  1333. m4_defun([_LT_CMD_OLD_ARCHIVE],
  1334. [_LT_PROG_AR
  1335. AC_CHECK_TOOL(STRIP, strip, :)
  1336. test -z "$STRIP" && STRIP=:
  1337. _LT_DECL([], [STRIP], [1], [A symbol stripping program])
  1338. AC_CHECK_TOOL(RANLIB, ranlib, :)
  1339. test -z "$RANLIB" && RANLIB=:
  1340. _LT_DECL([], [RANLIB], [1],
  1341. [Commands used to install an old-style archive])
  1342. # Determine commands to create old-style static archives.
  1343. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
  1344. old_postinstall_cmds='chmod 644 $oldlib'
  1345. old_postuninstall_cmds=
  1346. if test -n "$RANLIB"; then
  1347. case $host_os in
  1348. bitrig* | openbsd*)
  1349. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
  1350. ;;
  1351. *)
  1352. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
  1353. ;;
  1354. esac
  1355. old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
  1356. fi
  1357. case $host_os in
  1358. darwin*)
  1359. lock_old_archive_extraction=yes ;;
  1360. *)
  1361. lock_old_archive_extraction=no ;;
  1362. esac
  1363. _LT_DECL([], [old_postinstall_cmds], [2])
  1364. _LT_DECL([], [old_postuninstall_cmds], [2])
  1365. _LT_TAGDECL([], [old_archive_cmds], [2],
  1366. [Commands used to build an old-style archive])
  1367. _LT_DECL([], [lock_old_archive_extraction], [0],
  1368. [Whether to use a lock for old archive extraction])
  1369. ])# _LT_CMD_OLD_ARCHIVE
  1370. # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  1371. # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
  1372. # ----------------------------------------------------------------
  1373. # Check whether the given compiler option works
  1374. AC_DEFUN([_LT_COMPILER_OPTION],
  1375. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1376. m4_require([_LT_DECL_SED])dnl
  1377. AC_CACHE_CHECK([$1], [$2],
  1378. [$2=no
  1379. m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
  1380. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  1381. lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment
  1382. # Insert the option either (1) after the last *FLAGS variable, or
  1383. # (2) before a word containing "conftest.", or (3) at the end.
  1384. # Note that $ac_compile itself does not contain backslashes and begins
  1385. # with a dollar sign (not a hyphen), so the echo should work correctly.
  1386. # The option is referenced via a variable to avoid confusing sed.
  1387. lt_compile=`echo "$ac_compile" | $SED \
  1388. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  1389. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  1390. -e 's:$: $lt_compiler_flag:'`
  1391. (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  1392. (eval "$lt_compile" 2>conftest.err)
  1393. ac_status=$?
  1394. cat conftest.err >&AS_MESSAGE_LOG_FD
  1395. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  1396. if (exit $ac_status) && test -s "$ac_outfile"; then
  1397. # The compiler can only warn and ignore the option if not recognized
  1398. # So say no if there are warnings other than the usual output.
  1399. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
  1400. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  1401. if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
  1402. $2=yes
  1403. fi
  1404. fi
  1405. $RM conftest*
  1406. ])
  1407. if test yes = "[$]$2"; then
  1408. m4_if([$5], , :, [$5])
  1409. else
  1410. m4_if([$6], , :, [$6])
  1411. fi
  1412. ])# _LT_COMPILER_OPTION
  1413. # Old name:
  1414. AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
  1415. dnl aclocal-1.4 backwards compatibility:
  1416. dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
  1417. # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  1418. # [ACTION-SUCCESS], [ACTION-FAILURE])
  1419. # ----------------------------------------------------
  1420. # Check whether the given linker option works
  1421. AC_DEFUN([_LT_LINKER_OPTION],
  1422. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1423. m4_require([_LT_DECL_SED])dnl
  1424. AC_CACHE_CHECK([$1], [$2],
  1425. [$2=no
  1426. save_LDFLAGS=$LDFLAGS
  1427. LDFLAGS="$LDFLAGS $3"
  1428. echo "$lt_simple_link_test_code" > conftest.$ac_ext
  1429. if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
  1430. # The linker can only warn and ignore the option if not recognized
  1431. # So say no if there are warnings
  1432. if test -s conftest.err; then
  1433. # Append any errors to the config.log.
  1434. cat conftest.err 1>&AS_MESSAGE_LOG_FD
  1435. $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
  1436. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  1437. if diff conftest.exp conftest.er2 >/dev/null; then
  1438. $2=yes
  1439. fi
  1440. else
  1441. $2=yes
  1442. fi
  1443. fi
  1444. $RM -r conftest*
  1445. LDFLAGS=$save_LDFLAGS
  1446. ])
  1447. if test yes = "[$]$2"; then
  1448. m4_if([$4], , :, [$4])
  1449. else
  1450. m4_if([$5], , :, [$5])
  1451. fi
  1452. ])# _LT_LINKER_OPTION
  1453. # Old name:
  1454. AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
  1455. dnl aclocal-1.4 backwards compatibility:
  1456. dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
  1457. # LT_CMD_MAX_LEN
  1458. #---------------
  1459. AC_DEFUN([LT_CMD_MAX_LEN],
  1460. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  1461. # find the maximum length of command line arguments
  1462. AC_MSG_CHECKING([the maximum length of command line arguments])
  1463. AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
  1464. i=0
  1465. teststring=ABCD
  1466. case $build_os in
  1467. msdosdjgpp*)
  1468. # On DJGPP, this test can blow up pretty badly due to problems in libc
  1469. # (any single argument exceeding 2000 bytes causes a buffer overrun
  1470. # during glob expansion). Even if it were fixed, the result of this
  1471. # check would be larger than it should be.
  1472. lt_cv_sys_max_cmd_len=12288; # 12K is about right
  1473. ;;
  1474. gnu*)
  1475. # Under GNU Hurd, this test is not required because there is
  1476. # no limit to the length of command line arguments.
  1477. # Libtool will interpret -1 as no limit whatsoever
  1478. lt_cv_sys_max_cmd_len=-1;
  1479. ;;
  1480. cygwin* | mingw* | cegcc*)
  1481. # On Win9x/ME, this test blows up -- it succeeds, but takes
  1482. # about 5 minutes as the teststring grows exponentially.
  1483. # Worse, since 9x/ME are not pre-emptively multitasking,
  1484. # you end up with a "frozen" computer, even though with patience
  1485. # the test eventually succeeds (with a max line length of 256k).
  1486. # Instead, let's just punt: use the minimum linelength reported by
  1487. # all of the supported platforms: 8192 (on NT/2K/XP).
  1488. lt_cv_sys_max_cmd_len=8192;
  1489. ;;
  1490. mint*)
  1491. # On MiNT this can take a long time and run out of memory.
  1492. lt_cv_sys_max_cmd_len=8192;
  1493. ;;
  1494. amigaos*)
  1495. # On AmigaOS with pdksh, this test takes hours, literally.
  1496. # So we just punt and use a minimum line length of 8192.
  1497. lt_cv_sys_max_cmd_len=8192;
  1498. ;;
  1499. bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
  1500. # This has been around since 386BSD, at least. Likely further.
  1501. if test -x /sbin/sysctl; then
  1502. lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
  1503. elif test -x /usr/sbin/sysctl; then
  1504. lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
  1505. else
  1506. lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
  1507. fi
  1508. # And add a safety zone
  1509. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  1510. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  1511. ;;
  1512. interix*)
  1513. # We know the value 262144 and hardcode it with a safety zone (like BSD)
  1514. lt_cv_sys_max_cmd_len=196608
  1515. ;;
  1516. os2*)
  1517. # The test takes a long time on OS/2.
  1518. lt_cv_sys_max_cmd_len=8192
  1519. ;;
  1520. osf*)
  1521. # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
  1522. # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
  1523. # nice to cause kernel panics so lets avoid the loop below.
  1524. # First set a reasonable default.
  1525. lt_cv_sys_max_cmd_len=16384
  1526. #
  1527. if test -x /sbin/sysconfig; then
  1528. case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
  1529. *1*) lt_cv_sys_max_cmd_len=-1 ;;
  1530. esac
  1531. fi
  1532. ;;
  1533. sco3.2v5*)
  1534. lt_cv_sys_max_cmd_len=102400
  1535. ;;
  1536. sysv5* | sco5v6* | sysv4.2uw2*)
  1537. kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
  1538. if test -n "$kargmax"; then
  1539. lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
  1540. else
  1541. lt_cv_sys_max_cmd_len=32768
  1542. fi
  1543. ;;
  1544. *)
  1545. lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
  1546. if test -n "$lt_cv_sys_max_cmd_len" && \
  1547. test undefined != "$lt_cv_sys_max_cmd_len"; then
  1548. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  1549. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  1550. else
  1551. # Make teststring a little bigger before we do anything with it.
  1552. # a 1K string should be a reasonable start.
  1553. for i in 1 2 3 4 5 6 7 8; do
  1554. teststring=$teststring$teststring
  1555. done
  1556. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
  1557. # If test is not a shell built-in, we'll probably end up computing a
  1558. # maximum length that is only half of the actual maximum length, but
  1559. # we can't tell.
  1560. while { test X`env echo "$teststring$teststring" 2>/dev/null` \
  1561. = "X$teststring$teststring"; } >/dev/null 2>&1 &&
  1562. test 17 != "$i" # 1/2 MB should be enough
  1563. do
  1564. i=`expr $i + 1`
  1565. teststring=$teststring$teststring
  1566. done
  1567. # Only check the string length outside the loop.
  1568. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
  1569. teststring=
  1570. # Add a significant safety factor because C++ compilers can tack on
  1571. # massive amounts of additional arguments before passing them to the
  1572. # linker. It appears as though 1/2 is a usable value.
  1573. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
  1574. fi
  1575. ;;
  1576. esac
  1577. ])
  1578. if test -n "$lt_cv_sys_max_cmd_len"; then
  1579. AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
  1580. else
  1581. AC_MSG_RESULT(none)
  1582. fi
  1583. max_cmd_len=$lt_cv_sys_max_cmd_len
  1584. _LT_DECL([], [max_cmd_len], [0],
  1585. [What is the maximum length of a command?])
  1586. ])# LT_CMD_MAX_LEN
  1587. # Old name:
  1588. AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
  1589. dnl aclocal-1.4 backwards compatibility:
  1590. dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
  1591. # _LT_HEADER_DLFCN
  1592. # ----------------
  1593. m4_defun([_LT_HEADER_DLFCN],
  1594. [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
  1595. ])# _LT_HEADER_DLFCN
  1596. # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
  1597. # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
  1598. # ----------------------------------------------------------------
  1599. m4_defun([_LT_TRY_DLOPEN_SELF],
  1600. [m4_require([_LT_HEADER_DLFCN])dnl
  1601. if test yes = "$cross_compiling"; then :
  1602. [$4]
  1603. else
  1604. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  1605. lt_status=$lt_dlunknown
  1606. cat > conftest.$ac_ext <<_LT_EOF
  1607. [#line $LINENO "configure"
  1608. #include "confdefs.h"
  1609. #if HAVE_DLFCN_H
  1610. #include <dlfcn.h>
  1611. #endif
  1612. #include <stdio.h>
  1613. #ifdef RTLD_GLOBAL
  1614. # define LT_DLGLOBAL RTLD_GLOBAL
  1615. #else
  1616. # ifdef DL_GLOBAL
  1617. # define LT_DLGLOBAL DL_GLOBAL
  1618. # else
  1619. # define LT_DLGLOBAL 0
  1620. # endif
  1621. #endif
  1622. /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
  1623. find out it does not work in some platform. */
  1624. #ifndef LT_DLLAZY_OR_NOW
  1625. # ifdef RTLD_LAZY
  1626. # define LT_DLLAZY_OR_NOW RTLD_LAZY
  1627. # else
  1628. # ifdef DL_LAZY
  1629. # define LT_DLLAZY_OR_NOW DL_LAZY
  1630. # else
  1631. # ifdef RTLD_NOW
  1632. # define LT_DLLAZY_OR_NOW RTLD_NOW
  1633. # else
  1634. # ifdef DL_NOW
  1635. # define LT_DLLAZY_OR_NOW DL_NOW
  1636. # else
  1637. # define LT_DLLAZY_OR_NOW 0
  1638. # endif
  1639. # endif
  1640. # endif
  1641. # endif
  1642. #endif
  1643. /* When -fvisibility=hidden is used, assume the code has been annotated
  1644. correspondingly for the symbols needed. */
  1645. #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
  1646. int fnord () __attribute__((visibility("default")));
  1647. #endif
  1648. int fnord () { return 42; }
  1649. int main ()
  1650. {
  1651. void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  1652. int status = $lt_dlunknown;
  1653. if (self)
  1654. {
  1655. if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
  1656. else
  1657. {
  1658. if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
  1659. else puts (dlerror ());
  1660. }
  1661. /* dlclose (self); */
  1662. }
  1663. else
  1664. puts (dlerror ());
  1665. return status;
  1666. }]
  1667. _LT_EOF
  1668. if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
  1669. (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
  1670. lt_status=$?
  1671. case x$lt_status in
  1672. x$lt_dlno_uscore) $1 ;;
  1673. x$lt_dlneed_uscore) $2 ;;
  1674. x$lt_dlunknown|x*) $3 ;;
  1675. esac
  1676. else :
  1677. # compilation failed
  1678. $3
  1679. fi
  1680. fi
  1681. rm -fr conftest*
  1682. ])# _LT_TRY_DLOPEN_SELF
  1683. # LT_SYS_DLOPEN_SELF
  1684. # ------------------
  1685. AC_DEFUN([LT_SYS_DLOPEN_SELF],
  1686. [m4_require([_LT_HEADER_DLFCN])dnl
  1687. if test yes != "$enable_dlopen"; then
  1688. enable_dlopen=unknown
  1689. enable_dlopen_self=unknown
  1690. enable_dlopen_self_static=unknown
  1691. else
  1692. lt_cv_dlopen=no
  1693. lt_cv_dlopen_libs=
  1694. case $host_os in
  1695. beos*)
  1696. lt_cv_dlopen=load_add_on
  1697. lt_cv_dlopen_libs=
  1698. lt_cv_dlopen_self=yes
  1699. ;;
  1700. mingw* | pw32* | cegcc*)
  1701. lt_cv_dlopen=LoadLibrary
  1702. lt_cv_dlopen_libs=
  1703. ;;
  1704. cygwin*)
  1705. lt_cv_dlopen=dlopen
  1706. lt_cv_dlopen_libs=
  1707. ;;
  1708. darwin*)
  1709. # if libdl is installed we need to link against it
  1710. AC_CHECK_LIB([dl], [dlopen],
  1711. [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
  1712. lt_cv_dlopen=dyld
  1713. lt_cv_dlopen_libs=
  1714. lt_cv_dlopen_self=yes
  1715. ])
  1716. ;;
  1717. tpf*)
  1718. # Don't try to run any link tests for TPF. We know it's impossible
  1719. # because TPF is a cross-compiler, and we know how we open DSOs.
  1720. lt_cv_dlopen=dlopen
  1721. lt_cv_dlopen_libs=
  1722. lt_cv_dlopen_self=no
  1723. ;;
  1724. *)
  1725. AC_CHECK_FUNC([shl_load],
  1726. [lt_cv_dlopen=shl_load],
  1727. [AC_CHECK_LIB([dld], [shl_load],
  1728. [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
  1729. [AC_CHECK_FUNC([dlopen],
  1730. [lt_cv_dlopen=dlopen],
  1731. [AC_CHECK_LIB([dl], [dlopen],
  1732. [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
  1733. [AC_CHECK_LIB([svld], [dlopen],
  1734. [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
  1735. [AC_CHECK_LIB([dld], [dld_link],
  1736. [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
  1737. ])
  1738. ])
  1739. ])
  1740. ])
  1741. ])
  1742. ;;
  1743. esac
  1744. if test no = "$lt_cv_dlopen"; then
  1745. enable_dlopen=no
  1746. else
  1747. enable_dlopen=yes
  1748. fi
  1749. case $lt_cv_dlopen in
  1750. dlopen)
  1751. save_CPPFLAGS=$CPPFLAGS
  1752. test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  1753. save_LDFLAGS=$LDFLAGS
  1754. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  1755. save_LIBS=$LIBS
  1756. LIBS="$lt_cv_dlopen_libs $LIBS"
  1757. AC_CACHE_CHECK([whether a program can dlopen itself],
  1758. lt_cv_dlopen_self, [dnl
  1759. _LT_TRY_DLOPEN_SELF(
  1760. lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
  1761. lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
  1762. ])
  1763. if test yes = "$lt_cv_dlopen_self"; then
  1764. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
  1765. AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
  1766. lt_cv_dlopen_self_static, [dnl
  1767. _LT_TRY_DLOPEN_SELF(
  1768. lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
  1769. lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
  1770. ])
  1771. fi
  1772. CPPFLAGS=$save_CPPFLAGS
  1773. LDFLAGS=$save_LDFLAGS
  1774. LIBS=$save_LIBS
  1775. ;;
  1776. esac
  1777. case $lt_cv_dlopen_self in
  1778. yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  1779. *) enable_dlopen_self=unknown ;;
  1780. esac
  1781. case $lt_cv_dlopen_self_static in
  1782. yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  1783. *) enable_dlopen_self_static=unknown ;;
  1784. esac
  1785. fi
  1786. _LT_DECL([dlopen_support], [enable_dlopen], [0],
  1787. [Whether dlopen is supported])
  1788. _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
  1789. [Whether dlopen of programs is supported])
  1790. _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
  1791. [Whether dlopen of statically linked programs is supported])
  1792. ])# LT_SYS_DLOPEN_SELF
  1793. # Old name:
  1794. AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
  1795. dnl aclocal-1.4 backwards compatibility:
  1796. dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
  1797. # _LT_COMPILER_C_O([TAGNAME])
  1798. # ---------------------------
  1799. # Check to see if options -c and -o are simultaneously supported by compiler.
  1800. # This macro does not hard code the compiler like AC_PROG_CC_C_O.
  1801. m4_defun([_LT_COMPILER_C_O],
  1802. [m4_require([_LT_DECL_SED])dnl
  1803. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1804. m4_require([_LT_TAG_COMPILER])dnl
  1805. AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
  1806. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
  1807. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
  1808. $RM -r conftest 2>/dev/null
  1809. mkdir conftest
  1810. cd conftest
  1811. mkdir out
  1812. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  1813. lt_compiler_flag="-o out/conftest2.$ac_objext"
  1814. # Insert the option either (1) after the last *FLAGS variable, or
  1815. # (2) before a word containing "conftest.", or (3) at the end.
  1816. # Note that $ac_compile itself does not contain backslashes and begins
  1817. # with a dollar sign (not a hyphen), so the echo should work correctly.
  1818. lt_compile=`echo "$ac_compile" | $SED \
  1819. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  1820. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  1821. -e 's:$: $lt_compiler_flag:'`
  1822. (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  1823. (eval "$lt_compile" 2>out/conftest.err)
  1824. ac_status=$?
  1825. cat out/conftest.err >&AS_MESSAGE_LOG_FD
  1826. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  1827. if (exit $ac_status) && test -s out/conftest2.$ac_objext
  1828. then
  1829. # The compiler can only warn and ignore the option if not recognized
  1830. # So say no if there are warnings
  1831. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
  1832. $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
  1833. if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
  1834. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  1835. fi
  1836. fi
  1837. chmod u+w . 2>&AS_MESSAGE_LOG_FD
  1838. $RM conftest*
  1839. # SGI C++ compiler will create directory out/ii_files/ for
  1840. # template instantiation
  1841. test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
  1842. $RM out/* && rmdir out
  1843. cd ..
  1844. $RM -r conftest
  1845. $RM conftest*
  1846. ])
  1847. _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
  1848. [Does compiler simultaneously support -c and -o options?])
  1849. ])# _LT_COMPILER_C_O
  1850. # _LT_COMPILER_FILE_LOCKS([TAGNAME])
  1851. # ----------------------------------
  1852. # Check to see if we can do hard links to lock some files if needed
  1853. m4_defun([_LT_COMPILER_FILE_LOCKS],
  1854. [m4_require([_LT_ENABLE_LOCK])dnl
  1855. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1856. _LT_COMPILER_C_O([$1])
  1857. hard_links=nottested
  1858. if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
  1859. # do not overwrite the value of need_locks provided by the user
  1860. AC_MSG_CHECKING([if we can lock with hard links])
  1861. hard_links=yes
  1862. $RM conftest*
  1863. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1864. touch conftest.a
  1865. ln conftest.a conftest.b 2>&5 || hard_links=no
  1866. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1867. AC_MSG_RESULT([$hard_links])
  1868. if test no = "$hard_links"; then
  1869. AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
  1870. need_locks=warn
  1871. fi
  1872. else
  1873. need_locks=no
  1874. fi
  1875. _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
  1876. ])# _LT_COMPILER_FILE_LOCKS
  1877. # _LT_CHECK_OBJDIR
  1878. # ----------------
  1879. m4_defun([_LT_CHECK_OBJDIR],
  1880. [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
  1881. [rm -f .libs 2>/dev/null
  1882. mkdir .libs 2>/dev/null
  1883. if test -d .libs; then
  1884. lt_cv_objdir=.libs
  1885. else
  1886. # MS-DOS does not allow filenames that begin with a dot.
  1887. lt_cv_objdir=_libs
  1888. fi
  1889. rmdir .libs 2>/dev/null])
  1890. objdir=$lt_cv_objdir
  1891. _LT_DECL([], [objdir], [0],
  1892. [The name of the directory that contains temporary libtool files])dnl
  1893. m4_pattern_allow([LT_OBJDIR])dnl
  1894. AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
  1895. [Define to the sub-directory where libtool stores uninstalled libraries.])
  1896. ])# _LT_CHECK_OBJDIR
  1897. # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
  1898. # --------------------------------------
  1899. # Check hardcoding attributes.
  1900. m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
  1901. [AC_MSG_CHECKING([how to hardcode library paths into programs])
  1902. _LT_TAGVAR(hardcode_action, $1)=
  1903. if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
  1904. test -n "$_LT_TAGVAR(runpath_var, $1)" ||
  1905. test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
  1906. # We can hardcode non-existent directories.
  1907. if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
  1908. # If the only mechanism to avoid hardcoding is shlibpath_var, we
  1909. # have to relink, otherwise we might link with an installed library
  1910. # when we should be linking with a yet-to-be-installed one
  1911. ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
  1912. test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
  1913. # Linking always hardcodes the temporary library directory.
  1914. _LT_TAGVAR(hardcode_action, $1)=relink
  1915. else
  1916. # We can link without hardcoding, and we can hardcode nonexisting dirs.
  1917. _LT_TAGVAR(hardcode_action, $1)=immediate
  1918. fi
  1919. else
  1920. # We cannot hardcode anything, or else we can only hardcode existing
  1921. # directories.
  1922. _LT_TAGVAR(hardcode_action, $1)=unsupported
  1923. fi
  1924. AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
  1925. if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
  1926. test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
  1927. # Fast installation is not supported
  1928. enable_fast_install=no
  1929. elif test yes = "$shlibpath_overrides_runpath" ||
  1930. test no = "$enable_shared"; then
  1931. # Fast installation is not necessary
  1932. enable_fast_install=needless
  1933. fi
  1934. _LT_TAGDECL([], [hardcode_action], [0],
  1935. [How to hardcode a shared library path into an executable])
  1936. ])# _LT_LINKER_HARDCODE_LIBPATH
  1937. # _LT_CMD_STRIPLIB
  1938. # ----------------
  1939. m4_defun([_LT_CMD_STRIPLIB],
  1940. [m4_require([_LT_DECL_EGREP])
  1941. striplib=
  1942. old_striplib=
  1943. AC_MSG_CHECKING([whether stripping libraries is possible])
  1944. if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
  1945. test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
  1946. test -z "$striplib" && striplib="$STRIP --strip-unneeded"
  1947. AC_MSG_RESULT([yes])
  1948. else
  1949. # FIXME - insert some real tests, host_os isn't really good enough
  1950. case $host_os in
  1951. darwin*)
  1952. if test -n "$STRIP"; then
  1953. striplib="$STRIP -x"
  1954. old_striplib="$STRIP -S"
  1955. AC_MSG_RESULT([yes])
  1956. else
  1957. AC_MSG_RESULT([no])
  1958. fi
  1959. ;;
  1960. *)
  1961. AC_MSG_RESULT([no])
  1962. ;;
  1963. esac
  1964. fi
  1965. _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
  1966. _LT_DECL([], [striplib], [1])
  1967. ])# _LT_CMD_STRIPLIB
  1968. # _LT_PREPARE_MUNGE_PATH_LIST
  1969. # ---------------------------
  1970. # Make sure func_munge_path_list() is defined correctly.
  1971. m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
  1972. [[# func_munge_path_list VARIABLE PATH
  1973. # -----------------------------------
  1974. # VARIABLE is name of variable containing _space_ separated list of
  1975. # directories to be munged by the contents of PATH, which is string
  1976. # having a format:
  1977. # "DIR[:DIR]:"
  1978. # string "DIR[ DIR]" will be prepended to VARIABLE
  1979. # ":DIR[:DIR]"
  1980. # string "DIR[ DIR]" will be appended to VARIABLE
  1981. # "DIRP[:DIRP]::[DIRA:]DIRA"
  1982. # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
  1983. # "DIRA[ DIRA]" will be appended to VARIABLE
  1984. # "DIR[:DIR]"
  1985. # VARIABLE will be replaced by "DIR[ DIR]"
  1986. func_munge_path_list ()
  1987. {
  1988. case x@S|@2 in
  1989. x)
  1990. ;;
  1991. *:)
  1992. eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
  1993. ;;
  1994. x:*)
  1995. eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
  1996. ;;
  1997. *::*)
  1998. eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
  1999. eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
  2000. ;;
  2001. *)
  2002. eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
  2003. ;;
  2004. esac
  2005. }
  2006. ]])# _LT_PREPARE_PATH_LIST
  2007. # _LT_SYS_DYNAMIC_LINKER([TAG])
  2008. # -----------------------------
  2009. # PORTME Fill in your ld.so characteristics
  2010. m4_defun([_LT_SYS_DYNAMIC_LINKER],
  2011. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2012. m4_require([_LT_DECL_EGREP])dnl
  2013. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  2014. m4_require([_LT_DECL_OBJDUMP])dnl
  2015. m4_require([_LT_DECL_SED])dnl
  2016. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  2017. m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
  2018. AC_MSG_CHECKING([dynamic linker characteristics])
  2019. m4_if([$1],
  2020. [], [
  2021. if test yes = "$GCC"; then
  2022. case $host_os in
  2023. darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
  2024. *) lt_awk_arg='/^libraries:/' ;;
  2025. esac
  2026. case $host_os in
  2027. mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
  2028. *) lt_sed_strip_eq='s|=/|/|g' ;;
  2029. esac
  2030. lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
  2031. case $lt_search_path_spec in
  2032. *\;*)
  2033. # if the path contains ";" then we assume it to be the separator
  2034. # otherwise default to the standard path separator (i.e. ":") - it is
  2035. # assumed that no part of a normal pathname contains ";" but that should
  2036. # okay in the real world where ";" in dirpaths is itself problematic.
  2037. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
  2038. ;;
  2039. *)
  2040. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
  2041. ;;
  2042. esac
  2043. # Ok, now we have the path, separated by spaces, we can step through it
  2044. # and add multilib dir if necessary...
  2045. lt_tmp_lt_search_path_spec=
  2046. lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
  2047. # ...but if some path component already ends with the multilib dir we assume
  2048. # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
  2049. case "$lt_multi_os_dir; $lt_search_path_spec " in
  2050. "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
  2051. lt_multi_os_dir=
  2052. ;;
  2053. esac
  2054. for lt_sys_path in $lt_search_path_spec; do
  2055. if test -d "$lt_sys_path$lt_multi_os_dir"; then
  2056. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
  2057. elif test -n "$lt_multi_os_dir"; then
  2058. test -d "$lt_sys_path" && \
  2059. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
  2060. fi
  2061. done
  2062. lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
  2063. BEGIN {RS = " "; FS = "/|\n";} {
  2064. lt_foo = "";
  2065. lt_count = 0;
  2066. for (lt_i = NF; lt_i > 0; lt_i--) {
  2067. if ($lt_i != "" && $lt_i != ".") {
  2068. if ($lt_i == "..") {
  2069. lt_count++;
  2070. } else {
  2071. if (lt_count == 0) {
  2072. lt_foo = "/" $lt_i lt_foo;
  2073. } else {
  2074. lt_count--;
  2075. }
  2076. }
  2077. }
  2078. }
  2079. if (lt_foo != "") { lt_freq[[lt_foo]]++; }
  2080. if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
  2081. }'`
  2082. # AWK program above erroneously prepends '/' to C:/dos/paths
  2083. # for these hosts.
  2084. case $host_os in
  2085. mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
  2086. $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
  2087. esac
  2088. sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
  2089. else
  2090. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  2091. fi])
  2092. library_names_spec=
  2093. libname_spec='lib$name'
  2094. soname_spec=
  2095. shrext_cmds=.so
  2096. postinstall_cmds=
  2097. postuninstall_cmds=
  2098. finish_cmds=
  2099. finish_eval=
  2100. shlibpath_var=
  2101. shlibpath_overrides_runpath=unknown
  2102. version_type=none
  2103. dynamic_linker="$host_os ld.so"
  2104. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  2105. need_lib_prefix=unknown
  2106. hardcode_into_libs=no
  2107. # when you set need_version to no, make sure it does not cause -set_version
  2108. # flags to be left without arguments
  2109. need_version=unknown
  2110. AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
  2111. [User-defined run-time library search path.])
  2112. case $host_os in
  2113. aix3*)
  2114. version_type=linux # correct to gnu/linux during the next big refactor
  2115. library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
  2116. shlibpath_var=LIBPATH
  2117. # AIX 3 has no versioning support, so we append a major version to the name.
  2118. soname_spec='$libname$release$shared_ext$major'
  2119. ;;
  2120. aix[[4-9]]*)
  2121. version_type=linux # correct to gnu/linux during the next big refactor
  2122. need_lib_prefix=no
  2123. need_version=no
  2124. hardcode_into_libs=yes
  2125. if test ia64 = "$host_cpu"; then
  2126. # AIX 5 supports IA64
  2127. library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
  2128. shlibpath_var=LD_LIBRARY_PATH
  2129. else
  2130. # With GCC up to 2.95.x, collect2 would create an import file
  2131. # for dependence libraries. The import file would start with
  2132. # the line '#! .'. This would cause the generated library to
  2133. # depend on '.', always an invalid library. This was fixed in
  2134. # development snapshots of GCC prior to 3.0.
  2135. case $host_os in
  2136. aix4 | aix4.[[01]] | aix4.[[01]].*)
  2137. if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
  2138. echo ' yes '
  2139. echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
  2140. :
  2141. else
  2142. can_build_shared=no
  2143. fi
  2144. ;;
  2145. esac
  2146. # Using Import Files as archive members, it is possible to support
  2147. # filename-based versioning of shared library archives on AIX. While
  2148. # this would work for both with and without runtime linking, it will
  2149. # prevent static linking of such archives. So we do filename-based
  2150. # shared library versioning with .so extension only, which is used
  2151. # when both runtime linking and shared linking is enabled.
  2152. # Unfortunately, runtime linking may impact performance, so we do
  2153. # not want this to be the default eventually. Also, we use the
  2154. # versioned .so libs for executables only if there is the -brtl
  2155. # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
  2156. # To allow for filename-based versioning support, we need to create
  2157. # libNAME.so.V as an archive file, containing:
  2158. # *) an Import File, referring to the versioned filename of the
  2159. # archive as well as the shared archive member, telling the
  2160. # bitwidth (32 or 64) of that shared object, and providing the
  2161. # list of exported symbols of that shared object, eventually
  2162. # decorated with the 'weak' keyword
  2163. # *) the shared object with the F_LOADONLY flag set, to really avoid
  2164. # it being seen by the linker.
  2165. # At run time we better use the real file rather than another symlink,
  2166. # but for link time we create the symlink libNAME.so -> libNAME.so.V
  2167. case $with_aix_soname,$aix_use_runtimelinking in
  2168. # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
  2169. # soname into executable. Probably we can add versioning support to
  2170. # collect2, so additional links can be useful in future.
  2171. aix,yes) # traditional libtool
  2172. dynamic_linker='AIX unversionable lib.so'
  2173. # If using run time linking (on AIX 4.2 or later) use lib<name>.so
  2174. # instead of lib<name>.a to let people know that these are not
  2175. # typical AIX shared libraries.
  2176. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2177. ;;
  2178. aix,no) # traditional AIX only
  2179. dynamic_linker='AIX lib.a[(]lib.so.V[)]'
  2180. # We preserve .a as extension for shared libraries through AIX4.2
  2181. # and later when we are not doing run time linking.
  2182. library_names_spec='$libname$release.a $libname.a'
  2183. soname_spec='$libname$release$shared_ext$major'
  2184. ;;
  2185. svr4,*) # full svr4 only
  2186. dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
  2187. library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
  2188. # We do not specify a path in Import Files, so LIBPATH fires.
  2189. shlibpath_overrides_runpath=yes
  2190. ;;
  2191. *,yes) # both, prefer svr4
  2192. dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
  2193. library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
  2194. # unpreferred sharedlib libNAME.a needs extra handling
  2195. postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
  2196. postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
  2197. # We do not specify a path in Import Files, so LIBPATH fires.
  2198. shlibpath_overrides_runpath=yes
  2199. ;;
  2200. *,no) # both, prefer aix
  2201. dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
  2202. library_names_spec='$libname$release.a $libname.a'
  2203. soname_spec='$libname$release$shared_ext$major'
  2204. # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
  2205. postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
  2206. postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
  2207. ;;
  2208. esac
  2209. shlibpath_var=LIBPATH
  2210. fi
  2211. ;;
  2212. amigaos*)
  2213. case $host_cpu in
  2214. powerpc)
  2215. # Since July 2007 AmigaOS4 officially supports .so libraries.
  2216. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
  2217. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2218. ;;
  2219. m68k)
  2220. library_names_spec='$libname.ixlibrary $libname.a'
  2221. # Create ${libname}_ixlibrary.a entries in /sys/libs.
  2222. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $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'
  2223. ;;
  2224. esac
  2225. ;;
  2226. beos*)
  2227. library_names_spec='$libname$shared_ext'
  2228. dynamic_linker="$host_os ld.so"
  2229. shlibpath_var=LIBRARY_PATH
  2230. ;;
  2231. bsdi[[45]]*)
  2232. version_type=linux # correct to gnu/linux during the next big refactor
  2233. need_version=no
  2234. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2235. soname_spec='$libname$release$shared_ext$major'
  2236. finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  2237. shlibpath_var=LD_LIBRARY_PATH
  2238. sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  2239. sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  2240. # the default ld.so.conf also contains /usr/contrib/lib and
  2241. # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  2242. # libtool to hard-code these into programs
  2243. ;;
  2244. cygwin* | mingw* | pw32* | cegcc*)
  2245. version_type=windows
  2246. shrext_cmds=.dll
  2247. need_version=no
  2248. need_lib_prefix=no
  2249. case $GCC,$cc_basename in
  2250. yes,*)
  2251. # gcc
  2252. library_names_spec='$libname.dll.a'
  2253. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  2254. postinstall_cmds='base_file=`basename \$file`~
  2255. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
  2256. dldir=$destdir/`dirname \$dlpath`~
  2257. test -d \$dldir || mkdir -p \$dldir~
  2258. $install_prog $dir/$dlname \$dldir/$dlname~
  2259. chmod a+x \$dldir/$dlname~
  2260. if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
  2261. eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
  2262. fi'
  2263. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  2264. dlpath=$dir/\$dldll~
  2265. $RM \$dlpath'
  2266. shlibpath_overrides_runpath=yes
  2267. case $host_os in
  2268. cygwin*)
  2269. # Cygwin DLLs use 'cyg' prefix rather than 'lib'
  2270. soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
  2271. m4_if([$1], [],[
  2272. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
  2273. ;;
  2274. mingw* | cegcc*)
  2275. # MinGW DLLs use traditional 'lib' prefix
  2276. soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
  2277. ;;
  2278. pw32*)
  2279. # pw32 DLLs use 'pw' prefix rather than 'lib'
  2280. library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
  2281. ;;
  2282. esac
  2283. dynamic_linker='Win32 ld.exe'
  2284. ;;
  2285. *,cl*)
  2286. # Native MSVC
  2287. libname_spec='$name'
  2288. soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
  2289. library_names_spec='$libname.dll.lib'
  2290. case $build_os in
  2291. mingw*)
  2292. sys_lib_search_path_spec=
  2293. lt_save_ifs=$IFS
  2294. IFS=';'
  2295. for lt_path in $LIB
  2296. do
  2297. IFS=$lt_save_ifs
  2298. # Let DOS variable expansion print the short 8.3 style file name.
  2299. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
  2300. sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
  2301. done
  2302. IFS=$lt_save_ifs
  2303. # Convert to MSYS style.
  2304. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
  2305. ;;
  2306. cygwin*)
  2307. # Convert to unix form, then to dos form, then back to unix form
  2308. # but this time dos style (no spaces!) so that the unix form looks
  2309. # like /cygdrive/c/PROGRA~1:/cygdr...
  2310. sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
  2311. sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
  2312. sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  2313. ;;
  2314. *)
  2315. sys_lib_search_path_spec=$LIB
  2316. if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
  2317. # It is most probably a Windows format PATH.
  2318. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  2319. else
  2320. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  2321. fi
  2322. # FIXME: find the short name or the path components, as spaces are
  2323. # common. (e.g. "Program Files" -> "PROGRA~1")
  2324. ;;
  2325. esac
  2326. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  2327. postinstall_cmds='base_file=`basename \$file`~
  2328. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
  2329. dldir=$destdir/`dirname \$dlpath`~
  2330. test -d \$dldir || mkdir -p \$dldir~
  2331. $install_prog $dir/$dlname \$dldir/$dlname'
  2332. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  2333. dlpath=$dir/\$dldll~
  2334. $RM \$dlpath'
  2335. shlibpath_overrides_runpath=yes
  2336. dynamic_linker='Win32 link.exe'
  2337. ;;
  2338. *)
  2339. # Assume MSVC wrapper
  2340. library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
  2341. dynamic_linker='Win32 ld.exe'
  2342. ;;
  2343. esac
  2344. # FIXME: first we should search . and the directory the executable is in
  2345. shlibpath_var=PATH
  2346. ;;
  2347. darwin* | rhapsody*)
  2348. dynamic_linker="$host_os dyld"
  2349. version_type=darwin
  2350. need_lib_prefix=no
  2351. need_version=no
  2352. library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
  2353. soname_spec='$libname$release$major$shared_ext'
  2354. shlibpath_overrides_runpath=yes
  2355. shlibpath_var=DYLD_LIBRARY_PATH
  2356. shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
  2357. m4_if([$1], [],[
  2358. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
  2359. sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
  2360. ;;
  2361. dgux*)
  2362. version_type=linux # correct to gnu/linux during the next big refactor
  2363. need_lib_prefix=no
  2364. need_version=no
  2365. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2366. soname_spec='$libname$release$shared_ext$major'
  2367. shlibpath_var=LD_LIBRARY_PATH
  2368. ;;
  2369. freebsd* | dragonfly*)
  2370. # DragonFly does not have aout. When/if they implement a new
  2371. # versioning mechanism, adjust this.
  2372. if test -x /usr/bin/objformat; then
  2373. objformat=`/usr/bin/objformat`
  2374. else
  2375. case $host_os in
  2376. freebsd[[23]].*) objformat=aout ;;
  2377. *) objformat=elf ;;
  2378. esac
  2379. fi
  2380. version_type=freebsd-$objformat
  2381. case $version_type in
  2382. freebsd-elf*)
  2383. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2384. soname_spec='$libname$release$shared_ext$major'
  2385. need_version=no
  2386. need_lib_prefix=no
  2387. ;;
  2388. freebsd-*)
  2389. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  2390. need_version=yes
  2391. ;;
  2392. esac
  2393. shlibpath_var=LD_LIBRARY_PATH
  2394. case $host_os in
  2395. freebsd2.*)
  2396. shlibpath_overrides_runpath=yes
  2397. ;;
  2398. freebsd3.[[01]]* | freebsdelf3.[[01]]*)
  2399. shlibpath_overrides_runpath=yes
  2400. hardcode_into_libs=yes
  2401. ;;
  2402. freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
  2403. freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
  2404. shlibpath_overrides_runpath=no
  2405. hardcode_into_libs=yes
  2406. ;;
  2407. *) # from 4.6 on, and DragonFly
  2408. shlibpath_overrides_runpath=yes
  2409. hardcode_into_libs=yes
  2410. ;;
  2411. esac
  2412. ;;
  2413. haiku*)
  2414. version_type=linux # correct to gnu/linux during the next big refactor
  2415. need_lib_prefix=no
  2416. need_version=no
  2417. dynamic_linker="$host_os runtime_loader"
  2418. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2419. soname_spec='$libname$release$shared_ext$major'
  2420. shlibpath_var=LIBRARY_PATH
  2421. shlibpath_overrides_runpath=no
  2422. sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
  2423. hardcode_into_libs=yes
  2424. ;;
  2425. hpux9* | hpux10* | hpux11*)
  2426. # Give a soname corresponding to the major version so that dld.sl refuses to
  2427. # link against other versions.
  2428. version_type=sunos
  2429. need_lib_prefix=no
  2430. need_version=no
  2431. case $host_cpu in
  2432. ia64*)
  2433. shrext_cmds='.so'
  2434. hardcode_into_libs=yes
  2435. dynamic_linker="$host_os dld.so"
  2436. shlibpath_var=LD_LIBRARY_PATH
  2437. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  2438. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2439. soname_spec='$libname$release$shared_ext$major'
  2440. if test 32 = "$HPUX_IA64_MODE"; then
  2441. sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
  2442. sys_lib_dlsearch_path_spec=/usr/lib/hpux32
  2443. else
  2444. sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
  2445. sys_lib_dlsearch_path_spec=/usr/lib/hpux64
  2446. fi
  2447. ;;
  2448. hppa*64*)
  2449. shrext_cmds='.sl'
  2450. hardcode_into_libs=yes
  2451. dynamic_linker="$host_os dld.sl"
  2452. shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
  2453. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  2454. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2455. soname_spec='$libname$release$shared_ext$major'
  2456. sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
  2457. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2458. ;;
  2459. *)
  2460. shrext_cmds='.sl'
  2461. dynamic_linker="$host_os dld.sl"
  2462. shlibpath_var=SHLIB_PATH
  2463. shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  2464. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2465. soname_spec='$libname$release$shared_ext$major'
  2466. ;;
  2467. esac
  2468. # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
  2469. postinstall_cmds='chmod 555 $lib'
  2470. # or fails outright, so override atomically:
  2471. install_override_mode=555
  2472. ;;
  2473. interix[[3-9]]*)
  2474. version_type=linux # correct to gnu/linux during the next big refactor
  2475. need_lib_prefix=no
  2476. need_version=no
  2477. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2478. soname_spec='$libname$release$shared_ext$major'
  2479. dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
  2480. shlibpath_var=LD_LIBRARY_PATH
  2481. shlibpath_overrides_runpath=no
  2482. hardcode_into_libs=yes
  2483. ;;
  2484. irix5* | irix6* | nonstopux*)
  2485. case $host_os in
  2486. nonstopux*) version_type=nonstopux ;;
  2487. *)
  2488. if test yes = "$lt_cv_prog_gnu_ld"; then
  2489. version_type=linux # correct to gnu/linux during the next big refactor
  2490. else
  2491. version_type=irix
  2492. fi ;;
  2493. esac
  2494. need_lib_prefix=no
  2495. need_version=no
  2496. soname_spec='$libname$release$shared_ext$major'
  2497. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
  2498. case $host_os in
  2499. irix5* | nonstopux*)
  2500. libsuff= shlibsuff=
  2501. ;;
  2502. *)
  2503. case $LD in # libtool.m4 will add one of these switches to LD
  2504. *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
  2505. libsuff= shlibsuff= libmagic=32-bit;;
  2506. *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
  2507. libsuff=32 shlibsuff=N32 libmagic=N32;;
  2508. *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
  2509. libsuff=64 shlibsuff=64 libmagic=64-bit;;
  2510. *) libsuff= shlibsuff= libmagic=never-match;;
  2511. esac
  2512. ;;
  2513. esac
  2514. shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  2515. shlibpath_overrides_runpath=no
  2516. sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
  2517. sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
  2518. hardcode_into_libs=yes
  2519. ;;
  2520. # No shared lib support for Linux oldld, aout, or coff.
  2521. linux*oldld* | linux*aout* | linux*coff*)
  2522. dynamic_linker=no
  2523. ;;
  2524. linux*android*)
  2525. version_type=none # Android doesn't support versioned libraries.
  2526. need_lib_prefix=no
  2527. need_version=no
  2528. library_names_spec='$libname$release$shared_ext'
  2529. soname_spec='$libname$release$shared_ext'
  2530. finish_cmds=
  2531. shlibpath_var=LD_LIBRARY_PATH
  2532. shlibpath_overrides_runpath=yes
  2533. # This implies no fast_install, which is unacceptable.
  2534. # Some rework will be needed to allow for fast_install
  2535. # before this can be enabled.
  2536. hardcode_into_libs=yes
  2537. dynamic_linker='Android linker'
  2538. # Don't embed -rpath directories since the linker doesn't support them.
  2539. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  2540. ;;
  2541. # This must be glibc/ELF.
  2542. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  2543. version_type=linux # correct to gnu/linux during the next big refactor
  2544. need_lib_prefix=no
  2545. need_version=no
  2546. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2547. soname_spec='$libname$release$shared_ext$major'
  2548. finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  2549. shlibpath_var=LD_LIBRARY_PATH
  2550. shlibpath_overrides_runpath=no
  2551. # Some binutils ld are patched to set DT_RUNPATH
  2552. AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
  2553. [lt_cv_shlibpath_overrides_runpath=no
  2554. save_LDFLAGS=$LDFLAGS
  2555. save_libdir=$libdir
  2556. eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
  2557. LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
  2558. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  2559. [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
  2560. [lt_cv_shlibpath_overrides_runpath=yes])])
  2561. LDFLAGS=$save_LDFLAGS
  2562. libdir=$save_libdir
  2563. ])
  2564. shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
  2565. # This implies no fast_install, which is unacceptable.
  2566. # Some rework will be needed to allow for fast_install
  2567. # before this can be enabled.
  2568. hardcode_into_libs=yes
  2569. # Ideally, we could use ldconfig to report *all* directores which are
  2570. # searched for libraries, however this is still not possible. Aside from not
  2571. # being certain /sbin/ldconfig is available, command
  2572. # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
  2573. # even though it is searched at run-time. Try to do the best guess by
  2574. # appending ld.so.conf contents (and includes) to the search path.
  2575. if test -f /etc/ld.so.conf; then
  2576. lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
  2577. sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
  2578. fi
  2579. # We used to test for /lib/ld.so.1 and disable shared libraries on
  2580. # powerpc, because MkLinux only supported shared libraries with the
  2581. # GNU dynamic linker. Since this was broken with cross compilers,
  2582. # most powerpc-linux boxes support dynamic linking these days and
  2583. # people can always --disable-shared, the test was removed, and we
  2584. # assume the GNU/Linux dynamic linker is in use.
  2585. dynamic_linker='GNU/Linux ld.so'
  2586. ;;
  2587. netbsd*)
  2588. version_type=sunos
  2589. need_lib_prefix=no
  2590. need_version=no
  2591. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  2592. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  2593. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2594. dynamic_linker='NetBSD (a.out) ld.so'
  2595. else
  2596. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2597. soname_spec='$libname$release$shared_ext$major'
  2598. dynamic_linker='NetBSD ld.elf_so'
  2599. fi
  2600. shlibpath_var=LD_LIBRARY_PATH
  2601. shlibpath_overrides_runpath=yes
  2602. hardcode_into_libs=yes
  2603. ;;
  2604. newsos6)
  2605. version_type=linux # correct to gnu/linux during the next big refactor
  2606. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2607. shlibpath_var=LD_LIBRARY_PATH
  2608. shlibpath_overrides_runpath=yes
  2609. ;;
  2610. *nto* | *qnx*)
  2611. version_type=qnx
  2612. need_lib_prefix=no
  2613. need_version=no
  2614. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2615. soname_spec='$libname$release$shared_ext$major'
  2616. shlibpath_var=LD_LIBRARY_PATH
  2617. shlibpath_overrides_runpath=no
  2618. hardcode_into_libs=yes
  2619. dynamic_linker='ldqnx.so'
  2620. ;;
  2621. openbsd* | bitrig*)
  2622. version_type=sunos
  2623. sys_lib_dlsearch_path_spec=/usr/lib
  2624. need_lib_prefix=no
  2625. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
  2626. need_version=no
  2627. else
  2628. need_version=yes
  2629. fi
  2630. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  2631. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2632. shlibpath_var=LD_LIBRARY_PATH
  2633. shlibpath_overrides_runpath=yes
  2634. ;;
  2635. os2*)
  2636. libname_spec='$name'
  2637. version_type=windows
  2638. shrext_cmds=.dll
  2639. need_version=no
  2640. need_lib_prefix=no
  2641. # OS/2 can only load a DLL with a base name of 8 characters or less.
  2642. soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
  2643. v=$($ECHO $release$versuffix | tr -d .-);
  2644. n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
  2645. $ECHO $n$v`$shared_ext'
  2646. library_names_spec='${libname}_dll.$libext'
  2647. dynamic_linker='OS/2 ld.exe'
  2648. shlibpath_var=BEGINLIBPATH
  2649. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  2650. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2651. postinstall_cmds='base_file=`basename \$file`~
  2652. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
  2653. dldir=$destdir/`dirname \$dlpath`~
  2654. test -d \$dldir || mkdir -p \$dldir~
  2655. $install_prog $dir/$dlname \$dldir/$dlname~
  2656. chmod a+x \$dldir/$dlname~
  2657. if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
  2658. eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
  2659. fi'
  2660. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
  2661. dlpath=$dir/\$dldll~
  2662. $RM \$dlpath'
  2663. ;;
  2664. osf3* | osf4* | osf5*)
  2665. version_type=osf
  2666. need_lib_prefix=no
  2667. need_version=no
  2668. soname_spec='$libname$release$shared_ext$major'
  2669. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2670. shlibpath_var=LD_LIBRARY_PATH
  2671. sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  2672. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2673. ;;
  2674. rdos*)
  2675. dynamic_linker=no
  2676. ;;
  2677. solaris*)
  2678. version_type=linux # correct to gnu/linux during the next big refactor
  2679. need_lib_prefix=no
  2680. need_version=no
  2681. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2682. soname_spec='$libname$release$shared_ext$major'
  2683. shlibpath_var=LD_LIBRARY_PATH
  2684. shlibpath_overrides_runpath=yes
  2685. hardcode_into_libs=yes
  2686. # ldd complains unless libraries are executable
  2687. postinstall_cmds='chmod +x $lib'
  2688. ;;
  2689. sunos4*)
  2690. version_type=sunos
  2691. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  2692. finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  2693. shlibpath_var=LD_LIBRARY_PATH
  2694. shlibpath_overrides_runpath=yes
  2695. if test yes = "$with_gnu_ld"; then
  2696. need_lib_prefix=no
  2697. fi
  2698. need_version=yes
  2699. ;;
  2700. sysv4 | sysv4.3*)
  2701. version_type=linux # correct to gnu/linux during the next big refactor
  2702. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2703. soname_spec='$libname$release$shared_ext$major'
  2704. shlibpath_var=LD_LIBRARY_PATH
  2705. case $host_vendor in
  2706. sni)
  2707. shlibpath_overrides_runpath=no
  2708. need_lib_prefix=no
  2709. runpath_var=LD_RUN_PATH
  2710. ;;
  2711. siemens)
  2712. need_lib_prefix=no
  2713. ;;
  2714. motorola)
  2715. need_lib_prefix=no
  2716. need_version=no
  2717. shlibpath_overrides_runpath=no
  2718. sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  2719. ;;
  2720. esac
  2721. ;;
  2722. sysv4*MP*)
  2723. if test -d /usr/nec; then
  2724. version_type=linux # correct to gnu/linux during the next big refactor
  2725. library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
  2726. soname_spec='$libname$shared_ext.$major'
  2727. shlibpath_var=LD_LIBRARY_PATH
  2728. fi
  2729. ;;
  2730. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  2731. version_type=sco
  2732. need_lib_prefix=no
  2733. need_version=no
  2734. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
  2735. soname_spec='$libname$release$shared_ext$major'
  2736. shlibpath_var=LD_LIBRARY_PATH
  2737. shlibpath_overrides_runpath=yes
  2738. hardcode_into_libs=yes
  2739. if test yes = "$with_gnu_ld"; then
  2740. sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
  2741. else
  2742. sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
  2743. case $host_os in
  2744. sco3.2v5*)
  2745. sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
  2746. ;;
  2747. esac
  2748. fi
  2749. sys_lib_dlsearch_path_spec='/usr/lib'
  2750. ;;
  2751. tpf*)
  2752. # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
  2753. version_type=linux # correct to gnu/linux during the next big refactor
  2754. need_lib_prefix=no
  2755. need_version=no
  2756. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2757. shlibpath_var=LD_LIBRARY_PATH
  2758. shlibpath_overrides_runpath=no
  2759. hardcode_into_libs=yes
  2760. ;;
  2761. uts4*)
  2762. version_type=linux # correct to gnu/linux during the next big refactor
  2763. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2764. soname_spec='$libname$release$shared_ext$major'
  2765. shlibpath_var=LD_LIBRARY_PATH
  2766. ;;
  2767. *)
  2768. dynamic_linker=no
  2769. ;;
  2770. esac
  2771. AC_MSG_RESULT([$dynamic_linker])
  2772. test no = "$dynamic_linker" && can_build_shared=no
  2773. variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  2774. if test yes = "$GCC"; then
  2775. variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  2776. fi
  2777. if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
  2778. sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
  2779. fi
  2780. if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
  2781. sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
  2782. fi
  2783. # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
  2784. configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
  2785. # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
  2786. func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
  2787. # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
  2788. configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
  2789. _LT_DECL([], [variables_saved_for_relink], [1],
  2790. [Variables whose values should be saved in libtool wrapper scripts and
  2791. restored at link time])
  2792. _LT_DECL([], [need_lib_prefix], [0],
  2793. [Do we need the "lib" prefix for modules?])
  2794. _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
  2795. _LT_DECL([], [version_type], [0], [Library versioning type])
  2796. _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
  2797. _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
  2798. _LT_DECL([], [shlibpath_overrides_runpath], [0],
  2799. [Is shlibpath searched before the hard-coded library search path?])
  2800. _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
  2801. _LT_DECL([], [library_names_spec], [1],
  2802. [[List of archive names. First name is the real one, the rest are links.
  2803. The last name is the one that the linker finds with -lNAME]])
  2804. _LT_DECL([], [soname_spec], [1],
  2805. [[The coded name of the library, if different from the real name]])
  2806. _LT_DECL([], [install_override_mode], [1],
  2807. [Permission mode override for installation of shared libraries])
  2808. _LT_DECL([], [postinstall_cmds], [2],
  2809. [Command to use after installation of a shared archive])
  2810. _LT_DECL([], [postuninstall_cmds], [2],
  2811. [Command to use after uninstallation of a shared archive])
  2812. _LT_DECL([], [finish_cmds], [2],
  2813. [Commands used to finish a libtool library installation in a directory])
  2814. _LT_DECL([], [finish_eval], [1],
  2815. [[As "finish_cmds", except a single script fragment to be evaled but
  2816. not shown]])
  2817. _LT_DECL([], [hardcode_into_libs], [0],
  2818. [Whether we should hardcode library paths into libraries])
  2819. _LT_DECL([], [sys_lib_search_path_spec], [2],
  2820. [Compile-time system search path for libraries])
  2821. _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
  2822. [Detected run-time system search path for libraries])
  2823. _LT_DECL([], [configure_time_lt_sys_library_path], [2],
  2824. [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
  2825. ])# _LT_SYS_DYNAMIC_LINKER
  2826. # _LT_PATH_TOOL_PREFIX(TOOL)
  2827. # --------------------------
  2828. # find a file program that can recognize shared library
  2829. AC_DEFUN([_LT_PATH_TOOL_PREFIX],
  2830. [m4_require([_LT_DECL_EGREP])dnl
  2831. AC_MSG_CHECKING([for $1])
  2832. AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
  2833. [case $MAGIC_CMD in
  2834. [[\\/*] | ?:[\\/]*])
  2835. lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
  2836. ;;
  2837. *)
  2838. lt_save_MAGIC_CMD=$MAGIC_CMD
  2839. lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
  2840. dnl $ac_dummy forces splitting on constant user-supplied paths.
  2841. dnl POSIX.2 word splitting is done only on the output of word expansions,
  2842. dnl not every word. This closes a longstanding sh security hole.
  2843. ac_dummy="m4_if([$2], , $PATH, [$2])"
  2844. for ac_dir in $ac_dummy; do
  2845. IFS=$lt_save_ifs
  2846. test -z "$ac_dir" && ac_dir=.
  2847. if test -f "$ac_dir/$1"; then
  2848. lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
  2849. if test -n "$file_magic_test_file"; then
  2850. case $deplibs_check_method in
  2851. "file_magic "*)
  2852. file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
  2853. MAGIC_CMD=$lt_cv_path_MAGIC_CMD
  2854. if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  2855. $EGREP "$file_magic_regex" > /dev/null; then
  2856. :
  2857. else
  2858. cat <<_LT_EOF 1>&2
  2859. *** Warning: the command libtool uses to detect shared libraries,
  2860. *** $file_magic_cmd, produces output that libtool cannot recognize.
  2861. *** The result is that libtool may fail to recognize shared libraries
  2862. *** as such. This will affect the creation of libtool libraries that
  2863. *** depend on shared libraries, but programs linked with such libtool
  2864. *** libraries will work regardless of this problem. Nevertheless, you
  2865. *** may want to report the problem to your system manager and/or to
  2866. *** bug-libtool@gnu.org
  2867. _LT_EOF
  2868. fi ;;
  2869. esac
  2870. fi
  2871. break
  2872. fi
  2873. done
  2874. IFS=$lt_save_ifs
  2875. MAGIC_CMD=$lt_save_MAGIC_CMD
  2876. ;;
  2877. esac])
  2878. MAGIC_CMD=$lt_cv_path_MAGIC_CMD
  2879. if test -n "$MAGIC_CMD"; then
  2880. AC_MSG_RESULT($MAGIC_CMD)
  2881. else
  2882. AC_MSG_RESULT(no)
  2883. fi
  2884. _LT_DECL([], [MAGIC_CMD], [0],
  2885. [Used to examine libraries when file_magic_cmd begins with "file"])dnl
  2886. ])# _LT_PATH_TOOL_PREFIX
  2887. # Old name:
  2888. AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
  2889. dnl aclocal-1.4 backwards compatibility:
  2890. dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
  2891. # _LT_PATH_MAGIC
  2892. # --------------
  2893. # find a file program that can recognize a shared library
  2894. m4_defun([_LT_PATH_MAGIC],
  2895. [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
  2896. if test -z "$lt_cv_path_MAGIC_CMD"; then
  2897. if test -n "$ac_tool_prefix"; then
  2898. _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
  2899. else
  2900. MAGIC_CMD=:
  2901. fi
  2902. fi
  2903. ])# _LT_PATH_MAGIC
  2904. # LT_PATH_LD
  2905. # ----------
  2906. # find the pathname to the GNU or non-GNU linker
  2907. AC_DEFUN([LT_PATH_LD],
  2908. [AC_REQUIRE([AC_PROG_CC])dnl
  2909. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2910. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  2911. m4_require([_LT_DECL_SED])dnl
  2912. m4_require([_LT_DECL_EGREP])dnl
  2913. m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
  2914. AC_ARG_WITH([gnu-ld],
  2915. [AS_HELP_STRING([--with-gnu-ld],
  2916. [assume the C compiler uses GNU ld @<:@default=no@:>@])],
  2917. [test no = "$withval" || with_gnu_ld=yes],
  2918. [with_gnu_ld=no])dnl
  2919. ac_prog=ld
  2920. if test yes = "$GCC"; then
  2921. # Check if gcc -print-prog-name=ld gives a path.
  2922. AC_MSG_CHECKING([for ld used by $CC])
  2923. case $host in
  2924. *-*-mingw*)
  2925. # gcc leaves a trailing carriage return, which upsets mingw
  2926. ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  2927. *)
  2928. ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  2929. esac
  2930. case $ac_prog in
  2931. # Accept absolute paths.
  2932. [[\\/]]* | ?:[[\\/]]*)
  2933. re_direlt='/[[^/]][[^/]]*/\.\./'
  2934. # Canonicalize the pathname of ld
  2935. ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
  2936. while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
  2937. ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
  2938. done
  2939. test -z "$LD" && LD=$ac_prog
  2940. ;;
  2941. "")
  2942. # If it fails, then pretend we aren't using GCC.
  2943. ac_prog=ld
  2944. ;;
  2945. *)
  2946. # If it is relative, then search for the first ld in PATH.
  2947. with_gnu_ld=unknown
  2948. ;;
  2949. esac
  2950. elif test yes = "$with_gnu_ld"; then
  2951. AC_MSG_CHECKING([for GNU ld])
  2952. else
  2953. AC_MSG_CHECKING([for non-GNU ld])
  2954. fi
  2955. AC_CACHE_VAL(lt_cv_path_LD,
  2956. [if test -z "$LD"; then
  2957. lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
  2958. for ac_dir in $PATH; do
  2959. IFS=$lt_save_ifs
  2960. test -z "$ac_dir" && ac_dir=.
  2961. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  2962. lt_cv_path_LD=$ac_dir/$ac_prog
  2963. # Check to see if the program is GNU ld. I'd rather use --version,
  2964. # but apparently some variants of GNU ld only accept -v.
  2965. # Break only if it was the GNU/non-GNU ld that we prefer.
  2966. case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
  2967. *GNU* | *'with BFD'*)
  2968. test no != "$with_gnu_ld" && break
  2969. ;;
  2970. *)
  2971. test yes != "$with_gnu_ld" && break
  2972. ;;
  2973. esac
  2974. fi
  2975. done
  2976. IFS=$lt_save_ifs
  2977. else
  2978. lt_cv_path_LD=$LD # Let the user override the test with a path.
  2979. fi])
  2980. LD=$lt_cv_path_LD
  2981. if test -n "$LD"; then
  2982. AC_MSG_RESULT($LD)
  2983. else
  2984. AC_MSG_RESULT(no)
  2985. fi
  2986. test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  2987. _LT_PATH_LD_GNU
  2988. AC_SUBST([LD])
  2989. _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
  2990. ])# LT_PATH_LD
  2991. # Old names:
  2992. AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
  2993. AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
  2994. dnl aclocal-1.4 backwards compatibility:
  2995. dnl AC_DEFUN([AM_PROG_LD], [])
  2996. dnl AC_DEFUN([AC_PROG_LD], [])
  2997. # _LT_PATH_LD_GNU
  2998. #- --------------
  2999. m4_defun([_LT_PATH_LD_GNU],
  3000. [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
  3001. [# I'd rather use --version here, but apparently some GNU lds only accept -v.
  3002. case `$LD -v 2>&1 </dev/null` in
  3003. *GNU* | *'with BFD'*)
  3004. lt_cv_prog_gnu_ld=yes
  3005. ;;
  3006. *)
  3007. lt_cv_prog_gnu_ld=no
  3008. ;;
  3009. esac])
  3010. with_gnu_ld=$lt_cv_prog_gnu_ld
  3011. ])# _LT_PATH_LD_GNU
  3012. # _LT_CMD_RELOAD
  3013. # --------------
  3014. # find reload flag for linker
  3015. # -- PORTME Some linkers may need a different reload flag.
  3016. m4_defun([_LT_CMD_RELOAD],
  3017. [AC_CACHE_CHECK([for $LD option to reload object files],
  3018. lt_cv_ld_reload_flag,
  3019. [lt_cv_ld_reload_flag='-r'])
  3020. reload_flag=$lt_cv_ld_reload_flag
  3021. case $reload_flag in
  3022. "" | " "*) ;;
  3023. *) reload_flag=" $reload_flag" ;;
  3024. esac
  3025. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  3026. case $host_os in
  3027. cygwin* | mingw* | pw32* | cegcc*)
  3028. if test yes != "$GCC"; then
  3029. reload_cmds=false
  3030. fi
  3031. ;;
  3032. darwin*)
  3033. if test yes = "$GCC"; then
  3034. reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
  3035. else
  3036. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  3037. fi
  3038. ;;
  3039. esac
  3040. _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
  3041. _LT_TAGDECL([], [reload_cmds], [2])dnl
  3042. ])# _LT_CMD_RELOAD
  3043. # _LT_PATH_DD
  3044. # -----------
  3045. # find a working dd
  3046. m4_defun([_LT_PATH_DD],
  3047. [AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
  3048. [printf 0123456789abcdef0123456789abcdef >conftest.i
  3049. cat conftest.i conftest.i >conftest2.i
  3050. : ${lt_DD:=$DD}
  3051. AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
  3052. [if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
  3053. cmp -s conftest.i conftest.out \
  3054. && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
  3055. fi])
  3056. rm -f conftest.i conftest2.i conftest.out])
  3057. ])# _LT_PATH_DD
  3058. # _LT_CMD_TRUNCATE
  3059. # ----------------
  3060. # find command to truncate a binary pipe
  3061. m4_defun([_LT_CMD_TRUNCATE],
  3062. [m4_require([_LT_PATH_DD])
  3063. AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
  3064. [printf 0123456789abcdef0123456789abcdef >conftest.i
  3065. cat conftest.i conftest.i >conftest2.i
  3066. lt_cv_truncate_bin=
  3067. if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
  3068. cmp -s conftest.i conftest.out \
  3069. && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
  3070. fi
  3071. rm -f conftest.i conftest2.i conftest.out
  3072. test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
  3073. _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
  3074. [Command to truncate a binary pipe])
  3075. ])# _LT_CMD_TRUNCATE
  3076. # _LT_CHECK_MAGIC_METHOD
  3077. # ----------------------
  3078. # how to check for library dependencies
  3079. # -- PORTME fill in with the dynamic library characteristics
  3080. m4_defun([_LT_CHECK_MAGIC_METHOD],
  3081. [m4_require([_LT_DECL_EGREP])
  3082. m4_require([_LT_DECL_OBJDUMP])
  3083. AC_CACHE_CHECK([how to recognize dependent libraries],
  3084. lt_cv_deplibs_check_method,
  3085. [lt_cv_file_magic_cmd='$MAGIC_CMD'
  3086. lt_cv_file_magic_test_file=
  3087. lt_cv_deplibs_check_method='unknown'
  3088. # Need to set the preceding variable on all platforms that support
  3089. # interlibrary dependencies.
  3090. # 'none' -- dependencies not supported.
  3091. # 'unknown' -- same as none, but documents that we really don't know.
  3092. # 'pass_all' -- all dependencies passed with no checks.
  3093. # 'test_compile' -- check by making test program.
  3094. # 'file_magic [[regex]]' -- check by looking for files in library path
  3095. # that responds to the $file_magic_cmd with a given extended regex.
  3096. # If you have 'file' or equivalent on your system and you're not sure
  3097. # whether 'pass_all' will *always* work, you probably want this one.
  3098. case $host_os in
  3099. aix[[4-9]]*)
  3100. lt_cv_deplibs_check_method=pass_all
  3101. ;;
  3102. beos*)
  3103. lt_cv_deplibs_check_method=pass_all
  3104. ;;
  3105. bsdi[[45]]*)
  3106. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
  3107. lt_cv_file_magic_cmd='/usr/bin/file -L'
  3108. lt_cv_file_magic_test_file=/shlib/libc.so
  3109. ;;
  3110. cygwin*)
  3111. # func_win32_libid is a shell function defined in ltmain.sh
  3112. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  3113. lt_cv_file_magic_cmd='func_win32_libid'
  3114. ;;
  3115. mingw* | pw32*)
  3116. # Base MSYS/MinGW do not provide the 'file' command needed by
  3117. # func_win32_libid shell function, so use a weaker test based on 'objdump',
  3118. # unless we find 'file', for example because we are cross-compiling.
  3119. if ( file / ) >/dev/null 2>&1; then
  3120. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  3121. lt_cv_file_magic_cmd='func_win32_libid'
  3122. else
  3123. # Keep this pattern in sync with the one in func_win32_libid.
  3124. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
  3125. lt_cv_file_magic_cmd='$OBJDUMP -f'
  3126. fi
  3127. ;;
  3128. cegcc*)
  3129. # use the weaker test based on 'objdump'. See mingw*.
  3130. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
  3131. lt_cv_file_magic_cmd='$OBJDUMP -f'
  3132. ;;
  3133. darwin* | rhapsody*)
  3134. lt_cv_deplibs_check_method=pass_all
  3135. ;;
  3136. freebsd* | dragonfly*)
  3137. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  3138. case $host_cpu in
  3139. i*86 )
  3140. # Not sure whether the presence of OpenBSD here was a mistake.
  3141. # Let's accept both of them until this is cleared up.
  3142. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
  3143. lt_cv_file_magic_cmd=/usr/bin/file
  3144. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  3145. ;;
  3146. esac
  3147. else
  3148. lt_cv_deplibs_check_method=pass_all
  3149. fi
  3150. ;;
  3151. haiku*)
  3152. lt_cv_deplibs_check_method=pass_all
  3153. ;;
  3154. hpux10.20* | hpux11*)
  3155. lt_cv_file_magic_cmd=/usr/bin/file
  3156. case $host_cpu in
  3157. ia64*)
  3158. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
  3159. lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
  3160. ;;
  3161. hppa*64*)
  3162. [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
  3163. lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
  3164. ;;
  3165. *)
  3166. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
  3167. lt_cv_file_magic_test_file=/usr/lib/libc.sl
  3168. ;;
  3169. esac
  3170. ;;
  3171. interix[[3-9]]*)
  3172. # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
  3173. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
  3174. ;;
  3175. irix5* | irix6* | nonstopux*)
  3176. case $LD in
  3177. *-32|*"-32 ") libmagic=32-bit;;
  3178. *-n32|*"-n32 ") libmagic=N32;;
  3179. *-64|*"-64 ") libmagic=64-bit;;
  3180. *) libmagic=never-match;;
  3181. esac
  3182. lt_cv_deplibs_check_method=pass_all
  3183. ;;
  3184. # This must be glibc/ELF.
  3185. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  3186. lt_cv_deplibs_check_method=pass_all
  3187. ;;
  3188. netbsd*)
  3189. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  3190. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  3191. else
  3192. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
  3193. fi
  3194. ;;
  3195. newos6*)
  3196. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
  3197. lt_cv_file_magic_cmd=/usr/bin/file
  3198. lt_cv_file_magic_test_file=/usr/lib/libnls.so
  3199. ;;
  3200. *nto* | *qnx*)
  3201. lt_cv_deplibs_check_method=pass_all
  3202. ;;
  3203. openbsd* | bitrig*)
  3204. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
  3205. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
  3206. else
  3207. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  3208. fi
  3209. ;;
  3210. osf3* | osf4* | osf5*)
  3211. lt_cv_deplibs_check_method=pass_all
  3212. ;;
  3213. rdos*)
  3214. lt_cv_deplibs_check_method=pass_all
  3215. ;;
  3216. solaris*)
  3217. lt_cv_deplibs_check_method=pass_all
  3218. ;;
  3219. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  3220. lt_cv_deplibs_check_method=pass_all
  3221. ;;
  3222. sysv4 | sysv4.3*)
  3223. case $host_vendor in
  3224. motorola)
  3225. 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]]'
  3226. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  3227. ;;
  3228. ncr)
  3229. lt_cv_deplibs_check_method=pass_all
  3230. ;;
  3231. sequent)
  3232. lt_cv_file_magic_cmd='/bin/file'
  3233. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
  3234. ;;
  3235. sni)
  3236. lt_cv_file_magic_cmd='/bin/file'
  3237. lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
  3238. lt_cv_file_magic_test_file=/lib/libc.so
  3239. ;;
  3240. siemens)
  3241. lt_cv_deplibs_check_method=pass_all
  3242. ;;
  3243. pc)
  3244. lt_cv_deplibs_check_method=pass_all
  3245. ;;
  3246. esac
  3247. ;;
  3248. tpf*)
  3249. lt_cv_deplibs_check_method=pass_all
  3250. ;;
  3251. os2*)
  3252. lt_cv_deplibs_check_method=pass_all
  3253. ;;
  3254. esac
  3255. ])
  3256. file_magic_glob=
  3257. want_nocaseglob=no
  3258. if test "$build" = "$host"; then
  3259. case $host_os in
  3260. mingw* | pw32*)
  3261. if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
  3262. want_nocaseglob=yes
  3263. else
  3264. file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
  3265. fi
  3266. ;;
  3267. esac
  3268. fi
  3269. file_magic_cmd=$lt_cv_file_magic_cmd
  3270. deplibs_check_method=$lt_cv_deplibs_check_method
  3271. test -z "$deplibs_check_method" && deplibs_check_method=unknown
  3272. _LT_DECL([], [deplibs_check_method], [1],
  3273. [Method to check whether dependent libraries are shared objects])
  3274. _LT_DECL([], [file_magic_cmd], [1],
  3275. [Command to use when deplibs_check_method = "file_magic"])
  3276. _LT_DECL([], [file_magic_glob], [1],
  3277. [How to find potential files when deplibs_check_method = "file_magic"])
  3278. _LT_DECL([], [want_nocaseglob], [1],
  3279. [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
  3280. ])# _LT_CHECK_MAGIC_METHOD
  3281. # LT_PATH_NM
  3282. # ----------
  3283. # find the pathname to a BSD- or MS-compatible name lister
  3284. AC_DEFUN([LT_PATH_NM],
  3285. [AC_REQUIRE([AC_PROG_CC])dnl
  3286. AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
  3287. [if test -n "$NM"; then
  3288. # Let the user override the test.
  3289. lt_cv_path_NM=$NM
  3290. else
  3291. lt_nm_to_check=${ac_tool_prefix}nm
  3292. if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
  3293. lt_nm_to_check="$lt_nm_to_check nm"
  3294. fi
  3295. for lt_tmp_nm in $lt_nm_to_check; do
  3296. lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
  3297. for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
  3298. IFS=$lt_save_ifs
  3299. test -z "$ac_dir" && ac_dir=.
  3300. tmp_nm=$ac_dir/$lt_tmp_nm
  3301. if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
  3302. # Check to see if the nm accepts a BSD-compat flag.
  3303. # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
  3304. # nm: unknown option "B" ignored
  3305. # Tru64's nm complains that /dev/null is an invalid object file
  3306. # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
  3307. case $build_os in
  3308. mingw*) lt_bad_file=conftest.nm/nofile ;;
  3309. *) lt_bad_file=/dev/null ;;
  3310. esac
  3311. case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
  3312. *$lt_bad_file* | *'Invalid file or object type'*)
  3313. lt_cv_path_NM="$tmp_nm -B"
  3314. break 2
  3315. ;;
  3316. *)
  3317. case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
  3318. */dev/null*)
  3319. lt_cv_path_NM="$tmp_nm -p"
  3320. break 2
  3321. ;;
  3322. *)
  3323. lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
  3324. continue # so that we can try to find one that supports BSD flags
  3325. ;;
  3326. esac
  3327. ;;
  3328. esac
  3329. fi
  3330. done
  3331. IFS=$lt_save_ifs
  3332. done
  3333. : ${lt_cv_path_NM=no}
  3334. fi])
  3335. if test no != "$lt_cv_path_NM"; then
  3336. NM=$lt_cv_path_NM
  3337. else
  3338. # Didn't find any BSD compatible name lister, look for dumpbin.
  3339. if test -n "$DUMPBIN"; then :
  3340. # Let the user override the test.
  3341. else
  3342. AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
  3343. case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
  3344. *COFF*)
  3345. DUMPBIN="$DUMPBIN -symbols -headers"
  3346. ;;
  3347. *)
  3348. DUMPBIN=:
  3349. ;;
  3350. esac
  3351. fi
  3352. AC_SUBST([DUMPBIN])
  3353. if test : != "$DUMPBIN"; then
  3354. NM=$DUMPBIN
  3355. fi
  3356. fi
  3357. test -z "$NM" && NM=nm
  3358. AC_SUBST([NM])
  3359. _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
  3360. AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
  3361. [lt_cv_nm_interface="BSD nm"
  3362. echo "int some_variable = 0;" > conftest.$ac_ext
  3363. (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
  3364. (eval "$ac_compile" 2>conftest.err)
  3365. cat conftest.err >&AS_MESSAGE_LOG_FD
  3366. (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
  3367. (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
  3368. cat conftest.err >&AS_MESSAGE_LOG_FD
  3369. (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
  3370. cat conftest.out >&AS_MESSAGE_LOG_FD
  3371. if $GREP 'External.*some_variable' conftest.out > /dev/null; then
  3372. lt_cv_nm_interface="MS dumpbin"
  3373. fi
  3374. rm -f conftest*])
  3375. ])# LT_PATH_NM
  3376. # Old names:
  3377. AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
  3378. AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
  3379. dnl aclocal-1.4 backwards compatibility:
  3380. dnl AC_DEFUN([AM_PROG_NM], [])
  3381. dnl AC_DEFUN([AC_PROG_NM], [])
  3382. # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  3383. # --------------------------------
  3384. # how to determine the name of the shared library
  3385. # associated with a specific link library.
  3386. # -- PORTME fill in with the dynamic library characteristics
  3387. m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
  3388. [m4_require([_LT_DECL_EGREP])
  3389. m4_require([_LT_DECL_OBJDUMP])
  3390. m4_require([_LT_DECL_DLLTOOL])
  3391. AC_CACHE_CHECK([how to associate runtime and link libraries],
  3392. lt_cv_sharedlib_from_linklib_cmd,
  3393. [lt_cv_sharedlib_from_linklib_cmd='unknown'
  3394. case $host_os in
  3395. cygwin* | mingw* | pw32* | cegcc*)
  3396. # two different shell functions defined in ltmain.sh;
  3397. # decide which one to use based on capabilities of $DLLTOOL
  3398. case `$DLLTOOL --help 2>&1` in
  3399. *--identify-strict*)
  3400. lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
  3401. ;;
  3402. *)
  3403. lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
  3404. ;;
  3405. esac
  3406. ;;
  3407. *)
  3408. # fallback: assume linklib IS sharedlib
  3409. lt_cv_sharedlib_from_linklib_cmd=$ECHO
  3410. ;;
  3411. esac
  3412. ])
  3413. sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
  3414. test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
  3415. _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
  3416. [Command to associate shared and link libraries])
  3417. ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  3418. # _LT_PATH_MANIFEST_TOOL
  3419. # ----------------------
  3420. # locate the manifest tool
  3421. m4_defun([_LT_PATH_MANIFEST_TOOL],
  3422. [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
  3423. test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
  3424. AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
  3425. [lt_cv_path_mainfest_tool=no
  3426. echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
  3427. $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
  3428. cat conftest.err >&AS_MESSAGE_LOG_FD
  3429. if $GREP 'Manifest Tool' conftest.out > /dev/null; then
  3430. lt_cv_path_mainfest_tool=yes
  3431. fi
  3432. rm -f conftest*])
  3433. if test yes != "$lt_cv_path_mainfest_tool"; then
  3434. MANIFEST_TOOL=:
  3435. fi
  3436. _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
  3437. ])# _LT_PATH_MANIFEST_TOOL
  3438. # _LT_DLL_DEF_P([FILE])
  3439. # ---------------------
  3440. # True iff FILE is a Windows DLL '.def' file.
  3441. # Keep in sync with func_dll_def_p in the libtool script
  3442. AC_DEFUN([_LT_DLL_DEF_P],
  3443. [dnl
  3444. test DEF = "`$SED -n dnl
  3445. -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace
  3446. -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments
  3447. -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl
  3448. -e q dnl Only consider the first "real" line
  3449. $1`" dnl
  3450. ])# _LT_DLL_DEF_P
  3451. # LT_LIB_M
  3452. # --------
  3453. # check for math library
  3454. AC_DEFUN([LT_LIB_M],
  3455. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3456. LIBM=
  3457. case $host in
  3458. *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
  3459. # These system don't have libm, or don't need it
  3460. ;;
  3461. *-ncr-sysv4.3*)
  3462. AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
  3463. AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
  3464. ;;
  3465. *)
  3466. AC_CHECK_LIB(m, cos, LIBM=-lm)
  3467. ;;
  3468. esac
  3469. AC_SUBST([LIBM])
  3470. ])# LT_LIB_M
  3471. # Old name:
  3472. AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
  3473. dnl aclocal-1.4 backwards compatibility:
  3474. dnl AC_DEFUN([AC_CHECK_LIBM], [])
  3475. # _LT_COMPILER_NO_RTTI([TAGNAME])
  3476. # -------------------------------
  3477. m4_defun([_LT_COMPILER_NO_RTTI],
  3478. [m4_require([_LT_TAG_COMPILER])dnl
  3479. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  3480. if test yes = "$GCC"; then
  3481. case $cc_basename in
  3482. nvcc*)
  3483. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
  3484. *)
  3485. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
  3486. esac
  3487. _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
  3488. lt_cv_prog_compiler_rtti_exceptions,
  3489. [-fno-rtti -fno-exceptions], [],
  3490. [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
  3491. fi
  3492. _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
  3493. [Compiler flag to turn off builtin functions])
  3494. ])# _LT_COMPILER_NO_RTTI
  3495. # _LT_CMD_GLOBAL_SYMBOLS
  3496. # ----------------------
  3497. m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
  3498. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3499. AC_REQUIRE([AC_PROG_CC])dnl
  3500. AC_REQUIRE([AC_PROG_AWK])dnl
  3501. AC_REQUIRE([LT_PATH_NM])dnl
  3502. AC_REQUIRE([LT_PATH_LD])dnl
  3503. m4_require([_LT_DECL_SED])dnl
  3504. m4_require([_LT_DECL_EGREP])dnl
  3505. m4_require([_LT_TAG_COMPILER])dnl
  3506. # Check for command to grab the raw symbol name followed by C symbol from nm.
  3507. AC_MSG_CHECKING([command to parse $NM output from $compiler object])
  3508. AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
  3509. [
  3510. # These are sane defaults that work on at least a few old systems.
  3511. # [They come from Ultrix. What could be older than Ultrix?!! ;)]
  3512. # Character class describing NM global symbol codes.
  3513. symcode='[[BCDEGRST]]'
  3514. # Regexp to match symbols that can be accessed directly from C.
  3515. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
  3516. # Define system-specific variables.
  3517. case $host_os in
  3518. aix*)
  3519. symcode='[[BCDT]]'
  3520. ;;
  3521. cygwin* | mingw* | pw32* | cegcc*)
  3522. symcode='[[ABCDGISTW]]'
  3523. ;;
  3524. hpux*)
  3525. if test ia64 = "$host_cpu"; then
  3526. symcode='[[ABCDEGRST]]'
  3527. fi
  3528. ;;
  3529. irix* | nonstopux*)
  3530. symcode='[[BCDEGRST]]'
  3531. ;;
  3532. osf*)
  3533. symcode='[[BCDEGQRST]]'
  3534. ;;
  3535. solaris*)
  3536. symcode='[[BDRT]]'
  3537. ;;
  3538. sco3.2v5*)
  3539. symcode='[[DT]]'
  3540. ;;
  3541. sysv4.2uw2*)
  3542. symcode='[[DT]]'
  3543. ;;
  3544. sysv5* | sco5v6* | unixware* | OpenUNIX*)
  3545. symcode='[[ABDT]]'
  3546. ;;
  3547. sysv4)
  3548. symcode='[[DFNSTU]]'
  3549. ;;
  3550. esac
  3551. # If we're using GNU nm, then use its standard symbol codes.
  3552. case `$NM -V 2>&1` in
  3553. *GNU* | *'with BFD'*)
  3554. symcode='[[ABCDGIRSTW]]' ;;
  3555. esac
  3556. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3557. # Gets list of data symbols to import.
  3558. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
  3559. # Adjust the below global symbol transforms to fixup imported variables.
  3560. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
  3561. lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
  3562. lt_c_name_lib_hook="\
  3563. -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
  3564. -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
  3565. else
  3566. # Disable hooks by default.
  3567. lt_cv_sys_global_symbol_to_import=
  3568. lt_cdecl_hook=
  3569. lt_c_name_hook=
  3570. lt_c_name_lib_hook=
  3571. fi
  3572. # Transform an extracted symbol line into a proper C declaration.
  3573. # Some systems (esp. on ia64) link data and code symbols differently,
  3574. # so use this general approach.
  3575. lt_cv_sys_global_symbol_to_cdecl="sed -n"\
  3576. $lt_cdecl_hook\
  3577. " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
  3578. " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
  3579. # Transform an extracted symbol line into symbol name and symbol address
  3580. lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
  3581. $lt_c_name_hook\
  3582. " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
  3583. " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
  3584. # Transform an extracted symbol line into symbol name with lib prefix and
  3585. # symbol address.
  3586. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
  3587. $lt_c_name_lib_hook\
  3588. " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
  3589. " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
  3590. " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
  3591. # Handle CRLF in mingw tool chain
  3592. opt_cr=
  3593. case $build_os in
  3594. mingw*)
  3595. opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  3596. ;;
  3597. esac
  3598. # Try without a prefix underscore, then with it.
  3599. for ac_symprfx in "" "_"; do
  3600. # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
  3601. symxfrm="\\1 $ac_symprfx\\2 \\2"
  3602. # Write the raw and C identifiers.
  3603. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3604. # Fake it for dumpbin and say T for any non-static function,
  3605. # D for any global variable and I for any imported variable.
  3606. # Also find C++ and __fastcall symbols from MSVC++,
  3607. # which start with @ or ?.
  3608. lt_cv_sys_global_symbol_pipe="$AWK ['"\
  3609. " {last_section=section; section=\$ 3};"\
  3610. " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
  3611. " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
  3612. " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
  3613. " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
  3614. " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
  3615. " \$ 0!~/External *\|/{next};"\
  3616. " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
  3617. " {if(hide[section]) next};"\
  3618. " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
  3619. " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
  3620. " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
  3621. " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
  3622. " ' prfx=^$ac_symprfx]"
  3623. else
  3624. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
  3625. fi
  3626. lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
  3627. # Check to see that the pipe works correctly.
  3628. pipe_works=no
  3629. rm -f conftest*
  3630. cat > conftest.$ac_ext <<_LT_EOF
  3631. #ifdef __cplusplus
  3632. extern "C" {
  3633. #endif
  3634. char nm_test_var;
  3635. void nm_test_func(void);
  3636. void nm_test_func(void){}
  3637. #ifdef __cplusplus
  3638. }
  3639. #endif
  3640. int main(){nm_test_var='a';nm_test_func();return(0);}
  3641. _LT_EOF
  3642. if AC_TRY_EVAL(ac_compile); then
  3643. # Now try to grab the symbols.
  3644. nlist=conftest.nm
  3645. if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
  3646. # Try sorting and uniquifying the output.
  3647. if sort "$nlist" | uniq > "$nlist"T; then
  3648. mv -f "$nlist"T "$nlist"
  3649. else
  3650. rm -f "$nlist"T
  3651. fi
  3652. # Make sure that we snagged all the symbols we need.
  3653. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
  3654. if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
  3655. cat <<_LT_EOF > conftest.$ac_ext
  3656. /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
  3657. #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
  3658. /* DATA imports from DLLs on WIN32 can't be const, because runtime
  3659. relocations are performed -- see ld's documentation on pseudo-relocs. */
  3660. # define LT@&t@_DLSYM_CONST
  3661. #elif defined __osf__
  3662. /* This system does not cope well with relocations in const data. */
  3663. # define LT@&t@_DLSYM_CONST
  3664. #else
  3665. # define LT@&t@_DLSYM_CONST const
  3666. #endif
  3667. #ifdef __cplusplus
  3668. extern "C" {
  3669. #endif
  3670. _LT_EOF
  3671. # Now generate the symbol file.
  3672. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
  3673. cat <<_LT_EOF >> conftest.$ac_ext
  3674. /* The mapping between symbol names and symbols. */
  3675. LT@&t@_DLSYM_CONST struct {
  3676. const char *name;
  3677. void *address;
  3678. }
  3679. lt__PROGRAM__LTX_preloaded_symbols[[]] =
  3680. {
  3681. { "@PROGRAM@", (void *) 0 },
  3682. _LT_EOF
  3683. $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
  3684. cat <<\_LT_EOF >> conftest.$ac_ext
  3685. {0, (void *) 0}
  3686. };
  3687. /* This works around a problem in FreeBSD linker */
  3688. #ifdef FREEBSD_WORKAROUND
  3689. static const void *lt_preloaded_setup() {
  3690. return lt__PROGRAM__LTX_preloaded_symbols;
  3691. }
  3692. #endif
  3693. #ifdef __cplusplus
  3694. }
  3695. #endif
  3696. _LT_EOF
  3697. # Now try linking the two files.
  3698. mv conftest.$ac_objext conftstm.$ac_objext
  3699. lt_globsym_save_LIBS=$LIBS
  3700. lt_globsym_save_CFLAGS=$CFLAGS
  3701. LIBS=conftstm.$ac_objext
  3702. CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
  3703. if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
  3704. pipe_works=yes
  3705. fi
  3706. LIBS=$lt_globsym_save_LIBS
  3707. CFLAGS=$lt_globsym_save_CFLAGS
  3708. else
  3709. echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
  3710. fi
  3711. else
  3712. echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
  3713. fi
  3714. else
  3715. echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
  3716. fi
  3717. else
  3718. echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
  3719. cat conftest.$ac_ext >&5
  3720. fi
  3721. rm -rf conftest* conftst*
  3722. # Do not use the global_symbol_pipe unless it works.
  3723. if test yes = "$pipe_works"; then
  3724. break
  3725. else
  3726. lt_cv_sys_global_symbol_pipe=
  3727. fi
  3728. done
  3729. ])
  3730. if test -z "$lt_cv_sys_global_symbol_pipe"; then
  3731. lt_cv_sys_global_symbol_to_cdecl=
  3732. fi
  3733. if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
  3734. AC_MSG_RESULT(failed)
  3735. else
  3736. AC_MSG_RESULT(ok)
  3737. fi
  3738. # Response file support.
  3739. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3740. nm_file_list_spec='@'
  3741. elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
  3742. nm_file_list_spec='@'
  3743. fi
  3744. _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
  3745. [Take the output of nm and produce a listing of raw symbols and C names])
  3746. _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
  3747. [Transform the output of nm in a proper C declaration])
  3748. _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
  3749. [Transform the output of nm into a list of symbols to manually relocate])
  3750. _LT_DECL([global_symbol_to_c_name_address],
  3751. [lt_cv_sys_global_symbol_to_c_name_address], [1],
  3752. [Transform the output of nm in a C name address pair])
  3753. _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
  3754. [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
  3755. [Transform the output of nm in a C name address pair when lib prefix is needed])
  3756. _LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
  3757. [The name lister interface])
  3758. _LT_DECL([], [nm_file_list_spec], [1],
  3759. [Specify filename containing input files for $NM])
  3760. ]) # _LT_CMD_GLOBAL_SYMBOLS
  3761. # _LT_COMPILER_PIC([TAGNAME])
  3762. # ---------------------------
  3763. m4_defun([_LT_COMPILER_PIC],
  3764. [m4_require([_LT_TAG_COMPILER])dnl
  3765. _LT_TAGVAR(lt_prog_compiler_wl, $1)=
  3766. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3767. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3768. m4_if([$1], [CXX], [
  3769. # C++ specific cases for pic, static, wl, etc.
  3770. if test yes = "$GXX"; then
  3771. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3772. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3773. case $host_os in
  3774. aix*)
  3775. # All AIX code is PIC.
  3776. if test ia64 = "$host_cpu"; then
  3777. # AIX 5 now supports IA64 processor
  3778. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3779. fi
  3780. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3781. ;;
  3782. amigaos*)
  3783. case $host_cpu in
  3784. powerpc)
  3785. # see comment about AmigaOS4 .so support
  3786. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3787. ;;
  3788. m68k)
  3789. # FIXME: we need at least 68020 code to build shared libraries, but
  3790. # adding the '-m68020' flag to GCC prevents building anything better,
  3791. # like '-m68040'.
  3792. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  3793. ;;
  3794. esac
  3795. ;;
  3796. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  3797. # PIC is the default for these OSes.
  3798. ;;
  3799. mingw* | cygwin* | os2* | pw32* | cegcc*)
  3800. # This hack is so that the source file can tell whether it is being
  3801. # built for inclusion in a dll (and should export symbols for example).
  3802. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  3803. # (--disable-auto-import) libraries
  3804. m4_if([$1], [GCJ], [],
  3805. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3806. case $host_os in
  3807. os2*)
  3808. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
  3809. ;;
  3810. esac
  3811. ;;
  3812. darwin* | rhapsody*)
  3813. # PIC is the default on this platform
  3814. # Common symbols not allowed in MH_DYLIB files
  3815. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  3816. ;;
  3817. *djgpp*)
  3818. # DJGPP does not support shared libraries at all
  3819. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3820. ;;
  3821. haiku*)
  3822. # PIC is the default for Haiku.
  3823. # The "-static" flag exists, but is broken.
  3824. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3825. ;;
  3826. interix[[3-9]]*)
  3827. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  3828. # Instead, we relocate shared libraries at runtime.
  3829. ;;
  3830. sysv4*MP*)
  3831. if test -d /usr/nec; then
  3832. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  3833. fi
  3834. ;;
  3835. hpux*)
  3836. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  3837. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  3838. # sets the default TLS model and affects inlining.
  3839. case $host_cpu in
  3840. hppa*64*)
  3841. ;;
  3842. *)
  3843. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3844. ;;
  3845. esac
  3846. ;;
  3847. *qnx* | *nto*)
  3848. # QNX uses GNU C++, but need to define -shared option too, otherwise
  3849. # it will coredump.
  3850. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  3851. ;;
  3852. *)
  3853. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3854. ;;
  3855. esac
  3856. else
  3857. case $host_os in
  3858. aix[[4-9]]*)
  3859. # All AIX code is PIC.
  3860. if test ia64 = "$host_cpu"; then
  3861. # AIX 5 now supports IA64 processor
  3862. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3863. else
  3864. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  3865. fi
  3866. ;;
  3867. chorus*)
  3868. case $cc_basename in
  3869. cxch68*)
  3870. # Green Hills C++ Compiler
  3871. # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
  3872. ;;
  3873. esac
  3874. ;;
  3875. mingw* | cygwin* | os2* | pw32* | cegcc*)
  3876. # This hack is so that the source file can tell whether it is being
  3877. # built for inclusion in a dll (and should export symbols for example).
  3878. m4_if([$1], [GCJ], [],
  3879. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3880. ;;
  3881. dgux*)
  3882. case $cc_basename in
  3883. ec++*)
  3884. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3885. ;;
  3886. ghcx*)
  3887. # Green Hills C++ Compiler
  3888. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3889. ;;
  3890. *)
  3891. ;;
  3892. esac
  3893. ;;
  3894. freebsd* | dragonfly*)
  3895. # FreeBSD uses GNU C++
  3896. ;;
  3897. hpux9* | hpux10* | hpux11*)
  3898. case $cc_basename in
  3899. CC*)
  3900. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3901. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
  3902. if test ia64 != "$host_cpu"; then
  3903. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  3904. fi
  3905. ;;
  3906. aCC*)
  3907. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3908. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
  3909. case $host_cpu in
  3910. hppa*64*|ia64*)
  3911. # +Z the default
  3912. ;;
  3913. *)
  3914. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  3915. ;;
  3916. esac
  3917. ;;
  3918. *)
  3919. ;;
  3920. esac
  3921. ;;
  3922. interix*)
  3923. # This is c89, which is MS Visual C++ (no shared libs)
  3924. # Anyone wants to do a port?
  3925. ;;
  3926. irix5* | irix6* | nonstopux*)
  3927. case $cc_basename in
  3928. CC*)
  3929. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3930. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3931. # CC pic flag -KPIC is the default.
  3932. ;;
  3933. *)
  3934. ;;
  3935. esac
  3936. ;;
  3937. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  3938. case $cc_basename in
  3939. KCC*)
  3940. # KAI C++ Compiler
  3941. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  3942. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3943. ;;
  3944. ecpc* )
  3945. # old Intel C++ for x86_64, which still supported -KPIC.
  3946. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3947. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3948. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3949. ;;
  3950. icpc* )
  3951. # Intel C++, used to be incompatible with GCC.
  3952. # ICC 10 doesn't accept -KPIC any more.
  3953. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3954. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3955. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3956. ;;
  3957. pgCC* | pgcpp*)
  3958. # Portland Group C++ compiler
  3959. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3960. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  3961. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3962. ;;
  3963. cxx*)
  3964. # Compaq C++
  3965. # Make sure the PIC flag is empty. It appears that all Alpha
  3966. # Linux and Compaq Tru64 Unix objects are PIC.
  3967. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3968. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3969. ;;
  3970. xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
  3971. # IBM XL 8.0, 9.0 on PPC and BlueGene
  3972. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3973. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  3974. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  3975. ;;
  3976. *)
  3977. case `$CC -V 2>&1 | sed 5q` in
  3978. *Sun\ C*)
  3979. # Sun C++ 5.9
  3980. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3981. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3982. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  3983. ;;
  3984. esac
  3985. ;;
  3986. esac
  3987. ;;
  3988. lynxos*)
  3989. ;;
  3990. m88k*)
  3991. ;;
  3992. mvs*)
  3993. case $cc_basename in
  3994. cxx*)
  3995. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
  3996. ;;
  3997. *)
  3998. ;;
  3999. esac
  4000. ;;
  4001. netbsd*)
  4002. ;;
  4003. *qnx* | *nto*)
  4004. # QNX uses GNU C++, but need to define -shared option too, otherwise
  4005. # it will coredump.
  4006. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4007. ;;
  4008. osf3* | osf4* | osf5*)
  4009. case $cc_basename in
  4010. KCC*)
  4011. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  4012. ;;
  4013. RCC*)
  4014. # Rational C++ 2.4.1
  4015. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4016. ;;
  4017. cxx*)
  4018. # Digital/Compaq C++
  4019. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4020. # Make sure the PIC flag is empty. It appears that all Alpha
  4021. # Linux and Compaq Tru64 Unix objects are PIC.
  4022. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4023. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4024. ;;
  4025. *)
  4026. ;;
  4027. esac
  4028. ;;
  4029. psos*)
  4030. ;;
  4031. solaris*)
  4032. case $cc_basename in
  4033. CC* | sunCC*)
  4034. # Sun C++ 4.2, 5.x and Centerline C++
  4035. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4036. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4037. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4038. ;;
  4039. gcx*)
  4040. # Green Hills C++ Compiler
  4041. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4042. ;;
  4043. *)
  4044. ;;
  4045. esac
  4046. ;;
  4047. sunos4*)
  4048. case $cc_basename in
  4049. CC*)
  4050. # Sun C++ 4.x
  4051. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4052. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4053. ;;
  4054. lcc*)
  4055. # Lucid
  4056. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4057. ;;
  4058. *)
  4059. ;;
  4060. esac
  4061. ;;
  4062. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  4063. case $cc_basename in
  4064. CC*)
  4065. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4066. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4067. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4068. ;;
  4069. esac
  4070. ;;
  4071. tandem*)
  4072. case $cc_basename in
  4073. NCC*)
  4074. # NonStop-UX NCC 3.20
  4075. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4076. ;;
  4077. *)
  4078. ;;
  4079. esac
  4080. ;;
  4081. vxworks*)
  4082. ;;
  4083. *)
  4084. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4085. ;;
  4086. esac
  4087. fi
  4088. ],
  4089. [
  4090. if test yes = "$GCC"; then
  4091. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4092. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4093. case $host_os in
  4094. aix*)
  4095. # All AIX code is PIC.
  4096. if test ia64 = "$host_cpu"; then
  4097. # AIX 5 now supports IA64 processor
  4098. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4099. fi
  4100. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4101. ;;
  4102. amigaos*)
  4103. case $host_cpu in
  4104. powerpc)
  4105. # see comment about AmigaOS4 .so support
  4106. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4107. ;;
  4108. m68k)
  4109. # FIXME: we need at least 68020 code to build shared libraries, but
  4110. # adding the '-m68020' flag to GCC prevents building anything better,
  4111. # like '-m68040'.
  4112. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  4113. ;;
  4114. esac
  4115. ;;
  4116. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  4117. # PIC is the default for these OSes.
  4118. ;;
  4119. mingw* | cygwin* | pw32* | os2* | cegcc*)
  4120. # This hack is so that the source file can tell whether it is being
  4121. # built for inclusion in a dll (and should export symbols for example).
  4122. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  4123. # (--disable-auto-import) libraries
  4124. m4_if([$1], [GCJ], [],
  4125. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  4126. case $host_os in
  4127. os2*)
  4128. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
  4129. ;;
  4130. esac
  4131. ;;
  4132. darwin* | rhapsody*)
  4133. # PIC is the default on this platform
  4134. # Common symbols not allowed in MH_DYLIB files
  4135. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  4136. ;;
  4137. haiku*)
  4138. # PIC is the default for Haiku.
  4139. # The "-static" flag exists, but is broken.
  4140. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  4141. ;;
  4142. hpux*)
  4143. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  4144. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  4145. # sets the default TLS model and affects inlining.
  4146. case $host_cpu in
  4147. hppa*64*)
  4148. # +Z the default
  4149. ;;
  4150. *)
  4151. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4152. ;;
  4153. esac
  4154. ;;
  4155. interix[[3-9]]*)
  4156. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  4157. # Instead, we relocate shared libraries at runtime.
  4158. ;;
  4159. msdosdjgpp*)
  4160. # Just because we use GCC doesn't mean we suddenly get shared libraries
  4161. # on systems that don't support them.
  4162. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4163. enable_shared=no
  4164. ;;
  4165. *nto* | *qnx*)
  4166. # QNX uses GNU C++, but need to define -shared option too, otherwise
  4167. # it will coredump.
  4168. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4169. ;;
  4170. sysv4*MP*)
  4171. if test -d /usr/nec; then
  4172. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  4173. fi
  4174. ;;
  4175. *)
  4176. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4177. ;;
  4178. esac
  4179. case $cc_basename in
  4180. nvcc*) # Cuda Compiler Driver 2.2
  4181. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
  4182. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  4183. _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
  4184. fi
  4185. ;;
  4186. esac
  4187. else
  4188. # PORTME Check for flag to pass linker flags through the system compiler.
  4189. case $host_os in
  4190. aix*)
  4191. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4192. if test ia64 = "$host_cpu"; then
  4193. # AIX 5 now supports IA64 processor
  4194. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4195. else
  4196. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  4197. fi
  4198. ;;
  4199. darwin* | rhapsody*)
  4200. # PIC is the default on this platform
  4201. # Common symbols not allowed in MH_DYLIB files
  4202. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  4203. case $cc_basename in
  4204. nagfor*)
  4205. # NAG Fortran compiler
  4206. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
  4207. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4208. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4209. ;;
  4210. esac
  4211. ;;
  4212. mingw* | cygwin* | pw32* | os2* | cegcc*)
  4213. # This hack is so that the source file can tell whether it is being
  4214. # built for inclusion in a dll (and should export symbols for example).
  4215. m4_if([$1], [GCJ], [],
  4216. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  4217. case $host_os in
  4218. os2*)
  4219. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
  4220. ;;
  4221. esac
  4222. ;;
  4223. hpux9* | hpux10* | hpux11*)
  4224. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4225. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  4226. # not for PA HP-UX.
  4227. case $host_cpu in
  4228. hppa*64*|ia64*)
  4229. # +Z the default
  4230. ;;
  4231. *)
  4232. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4233. ;;
  4234. esac
  4235. # Is there a better lt_prog_compiler_static that works with the bundled CC?
  4236. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
  4237. ;;
  4238. irix5* | irix6* | nonstopux*)
  4239. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4240. # PIC (with -KPIC) is the default.
  4241. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4242. ;;
  4243. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  4244. case $cc_basename in
  4245. # old Intel for x86_64, which still supported -KPIC.
  4246. ecc*)
  4247. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4248. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4249. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4250. ;;
  4251. # icc used to be incompatible with GCC.
  4252. # ICC 10 doesn't accept -KPIC any more.
  4253. icc* | ifort*)
  4254. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4255. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4256. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4257. ;;
  4258. # Lahey Fortran 8.1.
  4259. lf95*)
  4260. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4261. _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
  4262. _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
  4263. ;;
  4264. nagfor*)
  4265. # NAG Fortran compiler
  4266. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
  4267. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4268. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4269. ;;
  4270. tcc*)
  4271. # Fabrice Bellard et al's Tiny C Compiler
  4272. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4273. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4274. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4275. ;;
  4276. pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
  4277. # Portland Group compilers (*not* the Pentium gcc compiler,
  4278. # which looks to be a dead project)
  4279. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4280. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4281. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4282. ;;
  4283. ccc*)
  4284. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4285. # All Alpha code is PIC.
  4286. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4287. ;;
  4288. xl* | bgxl* | bgf* | mpixl*)
  4289. # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
  4290. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4291. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  4292. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  4293. ;;
  4294. *)
  4295. case `$CC -V 2>&1 | sed 5q` in
  4296. *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
  4297. # Sun Fortran 8.3 passes all unrecognized flags to the linker
  4298. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4299. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4300. _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
  4301. ;;
  4302. *Sun\ F* | *Sun*Fortran*)
  4303. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4304. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4305. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4306. ;;
  4307. *Sun\ C*)
  4308. # Sun C 5.9
  4309. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4310. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4311. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4312. ;;
  4313. *Intel*\ [[CF]]*Compiler*)
  4314. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4315. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4316. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4317. ;;
  4318. *Portland\ Group*)
  4319. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4320. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4321. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4322. ;;
  4323. esac
  4324. ;;
  4325. esac
  4326. ;;
  4327. newsos6)
  4328. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4329. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4330. ;;
  4331. *nto* | *qnx*)
  4332. # QNX uses GNU C++, but need to define -shared option too, otherwise
  4333. # it will coredump.
  4334. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4335. ;;
  4336. osf3* | osf4* | osf5*)
  4337. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4338. # All OSF/1 code is PIC.
  4339. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4340. ;;
  4341. rdos*)
  4342. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4343. ;;
  4344. solaris*)
  4345. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4346. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4347. case $cc_basename in
  4348. f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
  4349. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
  4350. *)
  4351. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
  4352. esac
  4353. ;;
  4354. sunos4*)
  4355. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4356. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4357. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4358. ;;
  4359. sysv4 | sysv4.2uw2* | sysv4.3*)
  4360. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4361. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4362. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4363. ;;
  4364. sysv4*MP*)
  4365. if test -d /usr/nec; then
  4366. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
  4367. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4368. fi
  4369. ;;
  4370. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  4371. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4372. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4373. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4374. ;;
  4375. unicos*)
  4376. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4377. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4378. ;;
  4379. uts4*)
  4380. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4381. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4382. ;;
  4383. *)
  4384. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4385. ;;
  4386. esac
  4387. fi
  4388. ])
  4389. case $host_os in
  4390. # For platforms that do not support PIC, -DPIC is meaningless:
  4391. *djgpp*)
  4392. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4393. ;;
  4394. *)
  4395. _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
  4396. ;;
  4397. esac
  4398. AC_CACHE_CHECK([for $compiler option to produce PIC],
  4399. [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
  4400. [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
  4401. _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
  4402. #
  4403. # Check to make sure the PIC flag actually works.
  4404. #
  4405. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  4406. _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
  4407. [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
  4408. [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
  4409. [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
  4410. "" | " "*) ;;
  4411. *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
  4412. esac],
  4413. [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4414. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
  4415. fi
  4416. _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
  4417. [Additional compiler flags for building library objects])
  4418. _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
  4419. [How to pass a linker flag through the compiler])
  4420. #
  4421. # Check to make sure the static flag actually works.
  4422. #
  4423. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
  4424. _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
  4425. _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
  4426. $lt_tmp_static_flag,
  4427. [],
  4428. [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
  4429. _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
  4430. [Compiler flag to prevent dynamic linking])
  4431. ])# _LT_COMPILER_PIC
  4432. # _LT_LINKER_SHLIBS([TAGNAME])
  4433. # ----------------------------
  4434. # See if the linker supports building shared libraries.
  4435. m4_defun([_LT_LINKER_SHLIBS],
  4436. [AC_REQUIRE([LT_PATH_LD])dnl
  4437. AC_REQUIRE([LT_PATH_NM])dnl
  4438. m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  4439. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  4440. m4_require([_LT_DECL_EGREP])dnl
  4441. m4_require([_LT_DECL_SED])dnl
  4442. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  4443. m4_require([_LT_TAG_COMPILER])dnl
  4444. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  4445. m4_if([$1], [CXX], [
  4446. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4447. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  4448. case $host_os in
  4449. aix[[4-9]]*)
  4450. # If we're using GNU nm, then we don't want the "-C" option.
  4451. # -C means demangle to GNU nm, but means don't demangle to AIX nm.
  4452. # Without the "-l" option, or with the "-B" option, AIX nm treats
  4453. # weak defined symbols like other global defined symbols, whereas
  4454. # GNU nm marks them as "W".
  4455. # While the 'weak' keyword is ignored in the Export File, we need
  4456. # it in the Import File for the 'aix-soname' feature, so we have
  4457. # to replace the "-B" option with "-P" for AIX nm.
  4458. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  4459. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
  4460. else
  4461. _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
  4462. fi
  4463. ;;
  4464. pw32*)
  4465. _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
  4466. ;;
  4467. cygwin* | mingw* | cegcc*)
  4468. case $cc_basename in
  4469. cl*)
  4470. _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  4471. ;;
  4472. *)
  4473. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
  4474. _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  4475. ;;
  4476. esac
  4477. ;;
  4478. *)
  4479. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4480. ;;
  4481. esac
  4482. ], [
  4483. runpath_var=
  4484. _LT_TAGVAR(allow_undefined_flag, $1)=
  4485. _LT_TAGVAR(always_export_symbols, $1)=no
  4486. _LT_TAGVAR(archive_cmds, $1)=
  4487. _LT_TAGVAR(archive_expsym_cmds, $1)=
  4488. _LT_TAGVAR(compiler_needs_object, $1)=no
  4489. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  4490. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  4491. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4492. _LT_TAGVAR(hardcode_automatic, $1)=no
  4493. _LT_TAGVAR(hardcode_direct, $1)=no
  4494. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  4495. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4496. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  4497. _LT_TAGVAR(hardcode_minus_L, $1)=no
  4498. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  4499. _LT_TAGVAR(inherit_rpath, $1)=no
  4500. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  4501. _LT_TAGVAR(module_cmds, $1)=
  4502. _LT_TAGVAR(module_expsym_cmds, $1)=
  4503. _LT_TAGVAR(old_archive_from_new_cmds, $1)=
  4504. _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
  4505. _LT_TAGVAR(thread_safe_flag_spec, $1)=
  4506. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4507. # include_expsyms should be a list of space-separated symbols to be *always*
  4508. # included in the symbol list
  4509. _LT_TAGVAR(include_expsyms, $1)=
  4510. # exclude_expsyms can be an extended regexp of symbols to exclude
  4511. # it will be wrapped by ' (' and ')$', so one must not match beginning or
  4512. # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
  4513. # as well as any symbol that contains 'd'.
  4514. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  4515. # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  4516. # platforms (ab)use it in PIC code, but their linkers get confused if
  4517. # the symbol is explicitly referenced. Since portable code cannot
  4518. # rely on this symbol name, it's probably fine to never include it in
  4519. # preloaded symbol tables.
  4520. # Exclude shared library initialization/finalization symbols.
  4521. dnl Note also adjust exclude_expsyms for C++ above.
  4522. extract_expsyms_cmds=
  4523. case $host_os in
  4524. cygwin* | mingw* | pw32* | cegcc*)
  4525. # FIXME: the MSVC++ port hasn't been tested in a loooong time
  4526. # When not using gcc, we currently assume that we are using
  4527. # Microsoft Visual C++.
  4528. if test yes != "$GCC"; then
  4529. with_gnu_ld=no
  4530. fi
  4531. ;;
  4532. interix*)
  4533. # we just hope/assume this is gcc and not c89 (= MSVC++)
  4534. with_gnu_ld=yes
  4535. ;;
  4536. openbsd* | bitrig*)
  4537. with_gnu_ld=no
  4538. ;;
  4539. esac
  4540. _LT_TAGVAR(ld_shlibs, $1)=yes
  4541. # On some targets, GNU ld is compatible enough with the native linker
  4542. # that we're better off using the native interface for both.
  4543. lt_use_gnu_ld_interface=no
  4544. if test yes = "$with_gnu_ld"; then
  4545. case $host_os in
  4546. aix*)
  4547. # The AIX port of GNU ld has always aspired to compatibility
  4548. # with the native linker. However, as the warning in the GNU ld
  4549. # block says, versions before 2.19.5* couldn't really create working
  4550. # shared libraries, regardless of the interface used.
  4551. case `$LD -v 2>&1` in
  4552. *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
  4553. *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
  4554. *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
  4555. *)
  4556. lt_use_gnu_ld_interface=yes
  4557. ;;
  4558. esac
  4559. ;;
  4560. *)
  4561. lt_use_gnu_ld_interface=yes
  4562. ;;
  4563. esac
  4564. fi
  4565. if test yes = "$lt_use_gnu_ld_interface"; then
  4566. # If archive_cmds runs LD, not CC, wlarc should be empty
  4567. wlarc='$wl'
  4568. # Set some defaults for GNU ld with shared library support. These
  4569. # are reset later if shared libraries are not supported. Putting them
  4570. # here allows them to be overridden if necessary.
  4571. runpath_var=LD_RUN_PATH
  4572. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  4573. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  4574. # ancient GNU ld didn't support --whole-archive et. al.
  4575. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
  4576. _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
  4577. else
  4578. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4579. fi
  4580. supports_anon_versioning=no
  4581. case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
  4582. *GNU\ gold*) supports_anon_versioning=yes ;;
  4583. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
  4584. *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
  4585. *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
  4586. *\ 2.11.*) ;; # other 2.11 versions
  4587. *) supports_anon_versioning=yes ;;
  4588. esac
  4589. # See if GNU ld supports shared libraries.
  4590. case $host_os in
  4591. aix[[3-9]]*)
  4592. # On AIX/PPC, the GNU linker is very broken
  4593. if test ia64 != "$host_cpu"; then
  4594. _LT_TAGVAR(ld_shlibs, $1)=no
  4595. cat <<_LT_EOF 1>&2
  4596. *** Warning: the GNU linker, at least up to release 2.19, is reported
  4597. *** to be unable to reliably create shared libraries on AIX.
  4598. *** Therefore, libtool is disabling shared libraries support. If you
  4599. *** really care for shared libraries, you may want to install binutils
  4600. *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
  4601. *** You will then need to restart the configuration process.
  4602. _LT_EOF
  4603. fi
  4604. ;;
  4605. amigaos*)
  4606. case $host_cpu in
  4607. powerpc)
  4608. # see comment about AmigaOS4 .so support
  4609. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4610. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  4611. ;;
  4612. m68k)
  4613. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
  4614. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4615. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4616. ;;
  4617. esac
  4618. ;;
  4619. beos*)
  4620. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4621. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4622. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  4623. # support --undefined. This deserves some investigation. FIXME
  4624. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4625. else
  4626. _LT_TAGVAR(ld_shlibs, $1)=no
  4627. fi
  4628. ;;
  4629. cygwin* | mingw* | pw32* | cegcc*)
  4630. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  4631. # as there is no search path for DLLs.
  4632. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4633. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
  4634. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4635. _LT_TAGVAR(always_export_symbols, $1)=no
  4636. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4637. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
  4638. _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  4639. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  4640. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  4641. # If the export-symbols file already is a .def file, use it as
  4642. # is; otherwise, prepend EXPORTS...
  4643. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  4644. cp $export_symbols $output_objdir/$soname.def;
  4645. else
  4646. echo EXPORTS > $output_objdir/$soname.def;
  4647. cat $export_symbols >> $output_objdir/$soname.def;
  4648. fi~
  4649. $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  4650. else
  4651. _LT_TAGVAR(ld_shlibs, $1)=no
  4652. fi
  4653. ;;
  4654. haiku*)
  4655. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4656. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4657. ;;
  4658. os2*)
  4659. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4660. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4661. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4662. shrext_cmds=.dll
  4663. _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  4664. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  4665. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  4666. $ECHO EXPORTS >> $output_objdir/$libname.def~
  4667. emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
  4668. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  4669. emximp -o $lib $output_objdir/$libname.def'
  4670. _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  4671. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  4672. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  4673. $ECHO EXPORTS >> $output_objdir/$libname.def~
  4674. prefix_cmds="$SED"~
  4675. if test EXPORTS = "`$SED 1q $export_symbols`"; then
  4676. prefix_cmds="$prefix_cmds -e 1d";
  4677. fi~
  4678. prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
  4679. cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
  4680. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  4681. emximp -o $lib $output_objdir/$libname.def'
  4682. _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
  4683. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4684. ;;
  4685. interix[[3-9]]*)
  4686. _LT_TAGVAR(hardcode_direct, $1)=no
  4687. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4688. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  4689. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  4690. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  4691. # Instead, shared libraries are loaded at an image base (0x10000000 by
  4692. # default) and relocated if they conflict, which is a slow very memory
  4693. # consuming and fragmenting process. To avoid this, we pick a random,
  4694. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  4695. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  4696. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
  4697. _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
  4698. ;;
  4699. gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
  4700. tmp_diet=no
  4701. if test linux-dietlibc = "$host_os"; then
  4702. case $cc_basename in
  4703. diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
  4704. esac
  4705. fi
  4706. if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
  4707. && test no = "$tmp_diet"
  4708. then
  4709. tmp_addflag=' $pic_flag'
  4710. tmp_sharedflag='-shared'
  4711. case $cc_basename,$host_cpu in
  4712. pgcc*) # Portland Group C compiler
  4713. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
  4714. tmp_addflag=' $pic_flag'
  4715. ;;
  4716. pgf77* | pgf90* | pgf95* | pgfortran*)
  4717. # Portland Group f77 and f90 compilers
  4718. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
  4719. tmp_addflag=' $pic_flag -Mnomain' ;;
  4720. ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
  4721. tmp_addflag=' -i_dynamic' ;;
  4722. efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
  4723. tmp_addflag=' -i_dynamic -nofor_main' ;;
  4724. ifc* | ifort*) # Intel Fortran compiler
  4725. tmp_addflag=' -nofor_main' ;;
  4726. lf95*) # Lahey Fortran 8.1
  4727. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4728. tmp_sharedflag='--shared' ;;
  4729. nagfor*) # NAGFOR 5.3
  4730. tmp_sharedflag='-Wl,-shared' ;;
  4731. xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
  4732. tmp_sharedflag='-qmkshrobj'
  4733. tmp_addflag= ;;
  4734. nvcc*) # Cuda Compiler Driver 2.2
  4735. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
  4736. _LT_TAGVAR(compiler_needs_object, $1)=yes
  4737. ;;
  4738. esac
  4739. case `$CC -V 2>&1 | sed 5q` in
  4740. *Sun\ C*) # Sun C 5.9
  4741. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
  4742. _LT_TAGVAR(compiler_needs_object, $1)=yes
  4743. tmp_sharedflag='-G' ;;
  4744. *Sun\ F*) # Sun Fortran 8.3
  4745. tmp_sharedflag='-G' ;;
  4746. esac
  4747. _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4748. if test yes = "$supports_anon_versioning"; then
  4749. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  4750. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4751. echo "local: *; };" >> $output_objdir/$libname.ver~
  4752. $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
  4753. fi
  4754. case $cc_basename in
  4755. tcc*)
  4756. _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
  4757. ;;
  4758. xlf* | bgf* | bgxlf* | mpixlf*)
  4759. # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
  4760. _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
  4761. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  4762. _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
  4763. if test yes = "$supports_anon_versioning"; then
  4764. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  4765. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4766. echo "local: *; };" >> $output_objdir/$libname.ver~
  4767. $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
  4768. fi
  4769. ;;
  4770. esac
  4771. else
  4772. _LT_TAGVAR(ld_shlibs, $1)=no
  4773. fi
  4774. ;;
  4775. netbsd*)
  4776. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  4777. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  4778. wlarc=
  4779. else
  4780. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4781. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
  4782. fi
  4783. ;;
  4784. solaris*)
  4785. if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
  4786. _LT_TAGVAR(ld_shlibs, $1)=no
  4787. cat <<_LT_EOF 1>&2
  4788. *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  4789. *** create shared libraries on Solaris systems. Therefore, libtool
  4790. *** is disabling shared libraries support. We urge you to upgrade GNU
  4791. *** binutils to release 2.9.1 or newer. Another option is to modify
  4792. *** your PATH or compiler configuration so that the native linker is
  4793. *** used, and then restart.
  4794. _LT_EOF
  4795. elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4796. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4797. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
  4798. else
  4799. _LT_TAGVAR(ld_shlibs, $1)=no
  4800. fi
  4801. ;;
  4802. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
  4803. case `$LD -v 2>&1` in
  4804. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
  4805. _LT_TAGVAR(ld_shlibs, $1)=no
  4806. cat <<_LT_EOF 1>&2
  4807. *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
  4808. *** reliably create shared libraries on SCO systems. Therefore, libtool
  4809. *** is disabling shared libraries support. We urge you to upgrade GNU
  4810. *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
  4811. *** your PATH or compiler configuration so that the native linker is
  4812. *** used, and then restart.
  4813. _LT_EOF
  4814. ;;
  4815. *)
  4816. # For security reasons, it is highly recommended that you always
  4817. # use absolute paths for naming shared libraries, and exclude the
  4818. # DT_RUNPATH tag from executables and libraries. But doing so
  4819. # requires that you compile everything twice, which is a pain.
  4820. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4821. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  4822. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4823. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
  4824. else
  4825. _LT_TAGVAR(ld_shlibs, $1)=no
  4826. fi
  4827. ;;
  4828. esac
  4829. ;;
  4830. sunos4*)
  4831. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4832. wlarc=
  4833. _LT_TAGVAR(hardcode_direct, $1)=yes
  4834. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4835. ;;
  4836. *)
  4837. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4838. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4839. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
  4840. else
  4841. _LT_TAGVAR(ld_shlibs, $1)=no
  4842. fi
  4843. ;;
  4844. esac
  4845. if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
  4846. runpath_var=
  4847. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4848. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  4849. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4850. fi
  4851. else
  4852. # PORTME fill in a description of your system's linker (not GNU ld)
  4853. case $host_os in
  4854. aix3*)
  4855. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4856. _LT_TAGVAR(always_export_symbols, $1)=yes
  4857. _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
  4858. # Note: this linker hardcodes the directories in LIBPATH if there
  4859. # are no directories specified by -L.
  4860. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4861. if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
  4862. # Neither direct hardcoding nor static linking is supported with a
  4863. # broken collect2.
  4864. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  4865. fi
  4866. ;;
  4867. aix[[4-9]]*)
  4868. if test ia64 = "$host_cpu"; then
  4869. # On IA64, the linker does run time linking by default, so we don't
  4870. # have to do anything special.
  4871. aix_use_runtimelinking=no
  4872. exp_sym_flag='-Bexport'
  4873. no_entry_flag=
  4874. else
  4875. # If we're using GNU nm, then we don't want the "-C" option.
  4876. # -C means demangle to GNU nm, but means don't demangle to AIX nm.
  4877. # Without the "-l" option, or with the "-B" option, AIX nm treats
  4878. # weak defined symbols like other global defined symbols, whereas
  4879. # GNU nm marks them as "W".
  4880. # While the 'weak' keyword is ignored in the Export File, we need
  4881. # it in the Import File for the 'aix-soname' feature, so we have
  4882. # to replace the "-B" option with "-P" for AIX nm.
  4883. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  4884. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
  4885. else
  4886. _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
  4887. fi
  4888. aix_use_runtimelinking=no
  4889. # Test if we are trying to use run time linking or normal
  4890. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  4891. # have runtime linking enabled, and use it for executables.
  4892. # For shared libraries, we enable/disable runtime linking
  4893. # depending on the kind of the shared library created -
  4894. # when "with_aix_soname,aix_use_runtimelinking" is:
  4895. # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
  4896. # "aix,yes" lib.so shared, rtl:yes, for executables
  4897. # lib.a static archive
  4898. # "both,no" lib.so.V(shr.o) shared, rtl:yes
  4899. # lib.a(lib.so.V) shared, rtl:no, for executables
  4900. # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
  4901. # lib.a(lib.so.V) shared, rtl:no
  4902. # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
  4903. # lib.a static archive
  4904. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  4905. for ld_flag in $LDFLAGS; do
  4906. if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
  4907. aix_use_runtimelinking=yes
  4908. break
  4909. fi
  4910. done
  4911. if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
  4912. # With aix-soname=svr4, we create the lib.so.V shared archives only,
  4913. # so we don't have lib.a shared libs to link our executables.
  4914. # We have to force runtime linking in this case.
  4915. aix_use_runtimelinking=yes
  4916. LDFLAGS="$LDFLAGS -Wl,-brtl"
  4917. fi
  4918. ;;
  4919. esac
  4920. exp_sym_flag='-bexport'
  4921. no_entry_flag='-bnoentry'
  4922. fi
  4923. # When large executables or shared objects are built, AIX ld can
  4924. # have problems creating the table of contents. If linking a library
  4925. # or program results in "error TOC overflow" add -mminimal-toc to
  4926. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  4927. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  4928. _LT_TAGVAR(archive_cmds, $1)=''
  4929. _LT_TAGVAR(hardcode_direct, $1)=yes
  4930. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4931. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  4932. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4933. _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
  4934. case $with_aix_soname,$aix_use_runtimelinking in
  4935. aix,*) ;; # traditional, no import file
  4936. svr4,* | *,yes) # use import file
  4937. # The Import File defines what to hardcode.
  4938. _LT_TAGVAR(hardcode_direct, $1)=no
  4939. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  4940. ;;
  4941. esac
  4942. if test yes = "$GCC"; then
  4943. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  4944. # We only want to do this on AIX 4.2 and lower, the check
  4945. # below for broken collect2 doesn't work under 4.3+
  4946. collect2name=`$CC -print-prog-name=collect2`
  4947. if test -f "$collect2name" &&
  4948. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  4949. then
  4950. # We have reworked collect2
  4951. :
  4952. else
  4953. # We have old collect2
  4954. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  4955. # It fails to find uninstalled libraries when the uninstalled
  4956. # path is not listed in the libpath. Setting hardcode_minus_L
  4957. # to unsupported forces relinking
  4958. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4959. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4960. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  4961. fi
  4962. ;;
  4963. esac
  4964. shared_flag='-shared'
  4965. if test yes = "$aix_use_runtimelinking"; then
  4966. shared_flag="$shared_flag "'$wl-G'
  4967. fi
  4968. # Need to ensure runtime linking is disabled for the traditional
  4969. # shared library, or the linker may eventually find shared libraries
  4970. # /with/ Import File - we do not want to mix them.
  4971. shared_flag_aix='-shared'
  4972. shared_flag_svr4='-shared $wl-G'
  4973. else
  4974. # not using gcc
  4975. if test ia64 = "$host_cpu"; then
  4976. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  4977. # chokes on -Wl,-G. The following line is correct:
  4978. shared_flag='-G'
  4979. else
  4980. if test yes = "$aix_use_runtimelinking"; then
  4981. shared_flag='$wl-G'
  4982. else
  4983. shared_flag='$wl-bM:SRE'
  4984. fi
  4985. shared_flag_aix='$wl-bM:SRE'
  4986. shared_flag_svr4='$wl-G'
  4987. fi
  4988. fi
  4989. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
  4990. # It seems that -bexpall does not export symbols beginning with
  4991. # underscore (_), so it is better to generate a list of symbols to export.
  4992. _LT_TAGVAR(always_export_symbols, $1)=yes
  4993. if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
  4994. # Warning - without using the other runtime loading flags (-brtl),
  4995. # -berok will link without error, but may produce a broken library.
  4996. _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
  4997. # Determine the default libpath from the value encoded in an
  4998. # empty executable.
  4999. _LT_SYS_MODULE_PATH_AIX([$1])
  5000. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
  5001. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
  5002. else
  5003. if test ia64 = "$host_cpu"; then
  5004. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
  5005. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  5006. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
  5007. else
  5008. # Determine the default libpath from the value encoded in an
  5009. # empty executable.
  5010. _LT_SYS_MODULE_PATH_AIX([$1])
  5011. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
  5012. # Warning - without using the other run time loading flags,
  5013. # -berok will link without error, but may produce a broken library.
  5014. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
  5015. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
  5016. if test yes = "$with_gnu_ld"; then
  5017. # We only use this code for GNU lds that support --whole-archive.
  5018. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
  5019. else
  5020. # Exported symbols can be pulled into shared objects from archives
  5021. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  5022. fi
  5023. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5024. _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
  5025. # -brtl affects multiple linker settings, -berok does not and is overridden later
  5026. compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
  5027. if test svr4 != "$with_aix_soname"; then
  5028. # This is similar to how AIX traditionally builds its shared libraries.
  5029. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
  5030. fi
  5031. if test aix != "$with_aix_soname"; then
  5032. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
  5033. else
  5034. # used by -dlpreopen to get the symbols
  5035. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
  5036. fi
  5037. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
  5038. fi
  5039. fi
  5040. ;;
  5041. amigaos*)
  5042. case $host_cpu in
  5043. powerpc)
  5044. # see comment about AmigaOS4 .so support
  5045. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  5046. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  5047. ;;
  5048. m68k)
  5049. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
  5050. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5051. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5052. ;;
  5053. esac
  5054. ;;
  5055. bsdi[[45]]*)
  5056. _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
  5057. ;;
  5058. cygwin* | mingw* | pw32* | cegcc*)
  5059. # When not using gcc, we currently assume that we are using
  5060. # Microsoft Visual C++.
  5061. # hardcode_libdir_flag_spec is actually meaningless, as there is
  5062. # no search path for DLLs.
  5063. case $cc_basename in
  5064. cl*)
  5065. # Native MSVC
  5066. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  5067. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5068. _LT_TAGVAR(always_export_symbols, $1)=yes
  5069. _LT_TAGVAR(file_list_spec, $1)='@'
  5070. # Tell ltmain to make .lib files, not .a files.
  5071. libext=lib
  5072. # Tell ltmain to make .dll files, not .so files.
  5073. shrext_cmds=.dll
  5074. # FIXME: Setting linknames here is a bad hack.
  5075. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
  5076. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  5077. cp "$export_symbols" "$output_objdir/$soname.def";
  5078. echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
  5079. else
  5080. $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
  5081. fi~
  5082. $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  5083. linknames='
  5084. # The linker will not automatically build a static lib if we build a DLL.
  5085. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  5086. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5087. _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  5088. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
  5089. # Don't use ranlib
  5090. _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  5091. _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  5092. lt_tool_outputfile="@TOOL_OUTPUT@"~
  5093. case $lt_outputfile in
  5094. *.exe|*.EXE) ;;
  5095. *)
  5096. lt_outputfile=$lt_outputfile.exe
  5097. lt_tool_outputfile=$lt_tool_outputfile.exe
  5098. ;;
  5099. esac~
  5100. if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
  5101. $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  5102. $RM "$lt_outputfile.manifest";
  5103. fi'
  5104. ;;
  5105. *)
  5106. # Assume MSVC wrapper
  5107. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  5108. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5109. # Tell ltmain to make .lib files, not .a files.
  5110. libext=lib
  5111. # Tell ltmain to make .dll files, not .so files.
  5112. shrext_cmds=.dll
  5113. # FIXME: Setting linknames here is a bad hack.
  5114. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
  5115. # The linker will automatically build a .lib file if we build a DLL.
  5116. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  5117. # FIXME: Should let the user specify the lib program.
  5118. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
  5119. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5120. ;;
  5121. esac
  5122. ;;
  5123. darwin* | rhapsody*)
  5124. _LT_DARWIN_LINKER_FEATURES($1)
  5125. ;;
  5126. dgux*)
  5127. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5128. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5129. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5130. ;;
  5131. # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  5132. # support. Future versions do this automatically, but an explicit c++rt0.o
  5133. # does not break anything, and helps significantly (at the cost of a little
  5134. # extra space).
  5135. freebsd2.2*)
  5136. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
  5137. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5138. _LT_TAGVAR(hardcode_direct, $1)=yes
  5139. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5140. ;;
  5141. # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  5142. freebsd2.*)
  5143. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  5144. _LT_TAGVAR(hardcode_direct, $1)=yes
  5145. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5146. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5147. ;;
  5148. # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  5149. freebsd* | dragonfly*)
  5150. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5151. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5152. _LT_TAGVAR(hardcode_direct, $1)=yes
  5153. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5154. ;;
  5155. hpux9*)
  5156. if test yes = "$GCC"; then
  5157. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
  5158. else
  5159. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
  5160. fi
  5161. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  5162. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5163. _LT_TAGVAR(hardcode_direct, $1)=yes
  5164. # hardcode_minus_L: Not really in the search PATH,
  5165. # but as the default location of the library.
  5166. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5167. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  5168. ;;
  5169. hpux10*)
  5170. if test yes,no = "$GCC,$with_gnu_ld"; then
  5171. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  5172. else
  5173. _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
  5174. fi
  5175. if test no = "$with_gnu_ld"; then
  5176. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  5177. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5178. _LT_TAGVAR(hardcode_direct, $1)=yes
  5179. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5180. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  5181. # hardcode_minus_L: Not really in the search PATH,
  5182. # but as the default location of the library.
  5183. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5184. fi
  5185. ;;
  5186. hpux11*)
  5187. if test yes,no = "$GCC,$with_gnu_ld"; then
  5188. case $host_cpu in
  5189. hppa*64*)
  5190. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
  5191. ;;
  5192. ia64*)
  5193. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  5194. ;;
  5195. *)
  5196. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  5197. ;;
  5198. esac
  5199. else
  5200. case $host_cpu in
  5201. hppa*64*)
  5202. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
  5203. ;;
  5204. ia64*)
  5205. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  5206. ;;
  5207. *)
  5208. m4_if($1, [], [
  5209. # Older versions of the 11.00 compiler do not understand -b yet
  5210. # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
  5211. _LT_LINKER_OPTION([if $CC understands -b],
  5212. _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
  5213. [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
  5214. [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
  5215. [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
  5216. ;;
  5217. esac
  5218. fi
  5219. if test no = "$with_gnu_ld"; then
  5220. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  5221. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5222. case $host_cpu in
  5223. hppa*64*|ia64*)
  5224. _LT_TAGVAR(hardcode_direct, $1)=no
  5225. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5226. ;;
  5227. *)
  5228. _LT_TAGVAR(hardcode_direct, $1)=yes
  5229. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5230. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  5231. # hardcode_minus_L: Not really in the search PATH,
  5232. # but as the default location of the library.
  5233. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5234. ;;
  5235. esac
  5236. fi
  5237. ;;
  5238. irix5* | irix6* | nonstopux*)
  5239. if test yes = "$GCC"; then
  5240. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
  5241. # Try to use the -exported_symbol ld option, if it does not
  5242. # work, assume that -exports_file does not work either and
  5243. # implicitly export all symbols.
  5244. # This should be the same for all languages, so no per-tag cache variable.
  5245. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
  5246. [lt_cv_irix_exported_symbol],
  5247. [save_LDFLAGS=$LDFLAGS
  5248. LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
  5249. AC_LINK_IFELSE(
  5250. [AC_LANG_SOURCE(
  5251. [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
  5252. [C++], [[int foo (void) { return 0; }]],
  5253. [Fortran 77], [[
  5254. subroutine foo
  5255. end]],
  5256. [Fortran], [[
  5257. subroutine foo
  5258. end]])])],
  5259. [lt_cv_irix_exported_symbol=yes],
  5260. [lt_cv_irix_exported_symbol=no])
  5261. LDFLAGS=$save_LDFLAGS])
  5262. if test yes = "$lt_cv_irix_exported_symbol"; then
  5263. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
  5264. fi
  5265. else
  5266. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
  5267. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
  5268. fi
  5269. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  5270. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5271. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5272. _LT_TAGVAR(inherit_rpath, $1)=yes
  5273. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5274. ;;
  5275. linux*)
  5276. case $cc_basename in
  5277. tcc*)
  5278. # Fabrice Bellard et al's Tiny C Compiler
  5279. _LT_TAGVAR(ld_shlibs, $1)=yes
  5280. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5281. ;;
  5282. esac
  5283. ;;
  5284. netbsd*)
  5285. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  5286. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
  5287. else
  5288. _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
  5289. fi
  5290. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5291. _LT_TAGVAR(hardcode_direct, $1)=yes
  5292. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5293. ;;
  5294. newsos6)
  5295. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5296. _LT_TAGVAR(hardcode_direct, $1)=yes
  5297. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5298. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5299. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5300. ;;
  5301. *nto* | *qnx*)
  5302. ;;
  5303. openbsd* | bitrig*)
  5304. if test -f /usr/libexec/ld.so; then
  5305. _LT_TAGVAR(hardcode_direct, $1)=yes
  5306. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5307. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5308. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
  5309. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5310. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
  5311. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  5312. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  5313. else
  5314. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5315. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  5316. fi
  5317. else
  5318. _LT_TAGVAR(ld_shlibs, $1)=no
  5319. fi
  5320. ;;
  5321. os2*)
  5322. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5323. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5324. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5325. shrext_cmds=.dll
  5326. _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  5327. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  5328. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  5329. $ECHO EXPORTS >> $output_objdir/$libname.def~
  5330. emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
  5331. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  5332. emximp -o $lib $output_objdir/$libname.def'
  5333. _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  5334. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  5335. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  5336. $ECHO EXPORTS >> $output_objdir/$libname.def~
  5337. prefix_cmds="$SED"~
  5338. if test EXPORTS = "`$SED 1q $export_symbols`"; then
  5339. prefix_cmds="$prefix_cmds -e 1d";
  5340. fi~
  5341. prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
  5342. cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
  5343. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  5344. emximp -o $lib $output_objdir/$libname.def'
  5345. _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
  5346. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5347. ;;
  5348. osf3*)
  5349. if test yes = "$GCC"; then
  5350. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
  5351. _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
  5352. else
  5353. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  5354. _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
  5355. fi
  5356. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  5357. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5358. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5359. ;;
  5360. osf4* | osf5*) # as osf3* with the addition of -msym flag
  5361. if test yes = "$GCC"; then
  5362. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
  5363. _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
  5364. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5365. else
  5366. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  5367. _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
  5368. _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
  5369. $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
  5370. # Both c and cxx compiler support -rpath directly
  5371. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  5372. fi
  5373. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  5374. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5375. ;;
  5376. solaris*)
  5377. _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
  5378. if test yes = "$GCC"; then
  5379. wlarc='$wl'
  5380. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
  5381. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5382. $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
  5383. else
  5384. case `$CC -V 2>&1` in
  5385. *"Compilers 5.0"*)
  5386. wlarc=''
  5387. _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5388. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5389. $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
  5390. ;;
  5391. *)
  5392. wlarc='$wl'
  5393. _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
  5394. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5395. $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
  5396. ;;
  5397. esac
  5398. fi
  5399. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5400. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5401. case $host_os in
  5402. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  5403. *)
  5404. # The compiler driver will combine and reorder linker options,
  5405. # but understands '-z linker_flag'. GCC discards it without '$wl',
  5406. # but is careful enough not to reorder.
  5407. # Supported since Solaris 2.6 (maybe 2.5.1?)
  5408. if test yes = "$GCC"; then
  5409. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
  5410. else
  5411. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  5412. fi
  5413. ;;
  5414. esac
  5415. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5416. ;;
  5417. sunos4*)
  5418. if test sequent = "$host_vendor"; then
  5419. # Use $CC to link under sequent, because it throws in some extra .o
  5420. # files that make .init and .fini sections work.
  5421. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
  5422. else
  5423. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
  5424. fi
  5425. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5426. _LT_TAGVAR(hardcode_direct, $1)=yes
  5427. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5428. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5429. ;;
  5430. sysv4)
  5431. case $host_vendor in
  5432. sni)
  5433. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5434. _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
  5435. ;;
  5436. siemens)
  5437. ## LD is ld it makes a PLAMLIB
  5438. ## CC just makes a GrossModule.
  5439. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  5440. _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
  5441. _LT_TAGVAR(hardcode_direct, $1)=no
  5442. ;;
  5443. motorola)
  5444. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5445. _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
  5446. ;;
  5447. esac
  5448. runpath_var='LD_RUN_PATH'
  5449. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5450. ;;
  5451. sysv4.3*)
  5452. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5453. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5454. _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
  5455. ;;
  5456. sysv4*MP*)
  5457. if test -d /usr/nec; then
  5458. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5459. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5460. runpath_var=LD_RUN_PATH
  5461. hardcode_runpath_var=yes
  5462. _LT_TAGVAR(ld_shlibs, $1)=yes
  5463. fi
  5464. ;;
  5465. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  5466. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  5467. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5468. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5469. runpath_var='LD_RUN_PATH'
  5470. if test yes = "$GCC"; then
  5471. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5472. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5473. else
  5474. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5475. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5476. fi
  5477. ;;
  5478. sysv5* | sco3.2v5* | sco5v6*)
  5479. # Note: We CANNOT use -z defs as we might desire, because we do not
  5480. # link with -lc, and that would cause any symbols used from libc to
  5481. # always be unresolved, which means just about no library would
  5482. # ever link correctly. If we're not using GNU ld we use -z text
  5483. # though, which does catch some bad symbols but isn't as heavy-handed
  5484. # as -z defs.
  5485. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  5486. _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
  5487. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5488. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5489. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
  5490. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5491. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5492. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
  5493. runpath_var='LD_RUN_PATH'
  5494. if test yes = "$GCC"; then
  5495. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5496. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5497. else
  5498. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5499. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5500. fi
  5501. ;;
  5502. uts4*)
  5503. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5504. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5505. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5506. ;;
  5507. *)
  5508. _LT_TAGVAR(ld_shlibs, $1)=no
  5509. ;;
  5510. esac
  5511. if test sni = "$host_vendor"; then
  5512. case $host in
  5513. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  5514. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
  5515. ;;
  5516. esac
  5517. fi
  5518. fi
  5519. ])
  5520. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  5521. test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
  5522. _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
  5523. _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
  5524. _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
  5525. _LT_DECL([], [extract_expsyms_cmds], [2],
  5526. [The commands to extract the exported symbol list from a shared archive])
  5527. #
  5528. # Do we need to explicitly link libc?
  5529. #
  5530. case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
  5531. x|xyes)
  5532. # Assume -lc should be added
  5533. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5534. if test yes,yes = "$GCC,$enable_shared"; then
  5535. case $_LT_TAGVAR(archive_cmds, $1) in
  5536. *'~'*)
  5537. # FIXME: we may have to deal with multi-command sequences.
  5538. ;;
  5539. '$CC '*)
  5540. # Test whether the compiler implicitly links with -lc since on some
  5541. # systems, -lgcc has to come before -lc. If gcc already passes -lc
  5542. # to ld, don't add -lc before -lgcc.
  5543. AC_CACHE_CHECK([whether -lc should be explicitly linked in],
  5544. [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
  5545. [$RM conftest*
  5546. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  5547. if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
  5548. soname=conftest
  5549. lib=conftest
  5550. libobjs=conftest.$ac_objext
  5551. deplibs=
  5552. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
  5553. pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
  5554. compiler_flags=-v
  5555. linker_flags=-v
  5556. verstring=
  5557. output_objdir=.
  5558. libname=conftest
  5559. lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
  5560. _LT_TAGVAR(allow_undefined_flag, $1)=
  5561. if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
  5562. then
  5563. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5564. else
  5565. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5566. fi
  5567. _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
  5568. else
  5569. cat conftest.err 1>&5
  5570. fi
  5571. $RM conftest*
  5572. ])
  5573. _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
  5574. ;;
  5575. esac
  5576. fi
  5577. ;;
  5578. esac
  5579. _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
  5580. [Whether or not to add -lc for building shared libraries])
  5581. _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
  5582. [enable_shared_with_static_runtimes], [0],
  5583. [Whether or not to disallow shared libs when runtime libs are static])
  5584. _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
  5585. [Compiler flag to allow reflexive dlopens])
  5586. _LT_TAGDECL([], [whole_archive_flag_spec], [1],
  5587. [Compiler flag to generate shared objects directly from archives])
  5588. _LT_TAGDECL([], [compiler_needs_object], [1],
  5589. [Whether the compiler copes with passing no objects directly])
  5590. _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
  5591. [Create an old-style archive from a shared archive])
  5592. _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
  5593. [Create a temporary old-style archive to link instead of a shared archive])
  5594. _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
  5595. _LT_TAGDECL([], [archive_expsym_cmds], [2])
  5596. _LT_TAGDECL([], [module_cmds], [2],
  5597. [Commands used to build a loadable module if different from building
  5598. a shared archive.])
  5599. _LT_TAGDECL([], [module_expsym_cmds], [2])
  5600. _LT_TAGDECL([], [with_gnu_ld], [1],
  5601. [Whether we are building with GNU ld or not])
  5602. _LT_TAGDECL([], [allow_undefined_flag], [1],
  5603. [Flag that allows shared libraries with undefined symbols to be built])
  5604. _LT_TAGDECL([], [no_undefined_flag], [1],
  5605. [Flag that enforces no undefined symbols])
  5606. _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
  5607. [Flag to hardcode $libdir into a binary during linking.
  5608. This must work even if $libdir does not exist])
  5609. _LT_TAGDECL([], [hardcode_libdir_separator], [1],
  5610. [Whether we need a single "-rpath" flag with a separated argument])
  5611. _LT_TAGDECL([], [hardcode_direct], [0],
  5612. [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
  5613. DIR into the resulting binary])
  5614. _LT_TAGDECL([], [hardcode_direct_absolute], [0],
  5615. [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
  5616. DIR into the resulting binary and the resulting library dependency is
  5617. "absolute", i.e impossible to change by setting $shlibpath_var if the
  5618. library is relocated])
  5619. _LT_TAGDECL([], [hardcode_minus_L], [0],
  5620. [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
  5621. into the resulting binary])
  5622. _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
  5623. [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
  5624. into the resulting binary])
  5625. _LT_TAGDECL([], [hardcode_automatic], [0],
  5626. [Set to "yes" if building a shared library automatically hardcodes DIR
  5627. into the library and all subsequent libraries and executables linked
  5628. against it])
  5629. _LT_TAGDECL([], [inherit_rpath], [0],
  5630. [Set to yes if linker adds runtime paths of dependent libraries
  5631. to runtime path list])
  5632. _LT_TAGDECL([], [link_all_deplibs], [0],
  5633. [Whether libtool must link a program against all its dependency libraries])
  5634. _LT_TAGDECL([], [always_export_symbols], [0],
  5635. [Set to "yes" if exported symbols are required])
  5636. _LT_TAGDECL([], [export_symbols_cmds], [2],
  5637. [The commands to list exported symbols])
  5638. _LT_TAGDECL([], [exclude_expsyms], [1],
  5639. [Symbols that should not be listed in the preloaded symbols])
  5640. _LT_TAGDECL([], [include_expsyms], [1],
  5641. [Symbols that must always be exported])
  5642. _LT_TAGDECL([], [prelink_cmds], [2],
  5643. [Commands necessary for linking programs (against libraries) with templates])
  5644. _LT_TAGDECL([], [postlink_cmds], [2],
  5645. [Commands necessary for finishing linking programs])
  5646. _LT_TAGDECL([], [file_list_spec], [1],
  5647. [Specify filename containing input files])
  5648. dnl FIXME: Not yet implemented
  5649. dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
  5650. dnl [Compiler flag to generate thread safe objects])
  5651. ])# _LT_LINKER_SHLIBS
  5652. # _LT_LANG_C_CONFIG([TAG])
  5653. # ------------------------
  5654. # Ensure that the configuration variables for a C compiler are suitably
  5655. # defined. These variables are subsequently used by _LT_CONFIG to write
  5656. # the compiler configuration to 'libtool'.
  5657. m4_defun([_LT_LANG_C_CONFIG],
  5658. [m4_require([_LT_DECL_EGREP])dnl
  5659. lt_save_CC=$CC
  5660. AC_LANG_PUSH(C)
  5661. # Source file extension for C test sources.
  5662. ac_ext=c
  5663. # Object file extension for compiled C test sources.
  5664. objext=o
  5665. _LT_TAGVAR(objext, $1)=$objext
  5666. # Code to be used in simple compile tests
  5667. lt_simple_compile_test_code="int some_variable = 0;"
  5668. # Code to be used in simple link tests
  5669. lt_simple_link_test_code='int main(){return(0);}'
  5670. _LT_TAG_COMPILER
  5671. # Save the default compiler, since it gets overwritten when the other
  5672. # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
  5673. compiler_DEFAULT=$CC
  5674. # save warnings/boilerplate of simple test code
  5675. _LT_COMPILER_BOILERPLATE
  5676. _LT_LINKER_BOILERPLATE
  5677. ## CAVEAT EMPTOR:
  5678. ## There is no encapsulation within the following macros, do not change
  5679. ## the running order or otherwise move them around unless you know exactly
  5680. ## what you are doing...
  5681. if test -n "$compiler"; then
  5682. _LT_COMPILER_NO_RTTI($1)
  5683. _LT_COMPILER_PIC($1)
  5684. _LT_COMPILER_C_O($1)
  5685. _LT_COMPILER_FILE_LOCKS($1)
  5686. _LT_LINKER_SHLIBS($1)
  5687. _LT_SYS_DYNAMIC_LINKER($1)
  5688. _LT_LINKER_HARDCODE_LIBPATH($1)
  5689. LT_SYS_DLOPEN_SELF
  5690. _LT_CMD_STRIPLIB
  5691. # Report what library types will actually be built
  5692. AC_MSG_CHECKING([if libtool supports shared libraries])
  5693. AC_MSG_RESULT([$can_build_shared])
  5694. AC_MSG_CHECKING([whether to build shared libraries])
  5695. test no = "$can_build_shared" && enable_shared=no
  5696. # On AIX, shared libraries and static libraries use the same namespace, and
  5697. # are all built from PIC.
  5698. case $host_os in
  5699. aix3*)
  5700. test yes = "$enable_shared" && enable_static=no
  5701. if test -n "$RANLIB"; then
  5702. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  5703. postinstall_cmds='$RANLIB $lib'
  5704. fi
  5705. ;;
  5706. aix[[4-9]]*)
  5707. if test ia64 != "$host_cpu"; then
  5708. case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
  5709. yes,aix,yes) ;; # shared object as lib.so file only
  5710. yes,svr4,*) ;; # shared object as lib.so archive member only
  5711. yes,*) enable_static=no ;; # shared object in lib.a archive as well
  5712. esac
  5713. fi
  5714. ;;
  5715. esac
  5716. AC_MSG_RESULT([$enable_shared])
  5717. AC_MSG_CHECKING([whether to build static libraries])
  5718. # Make sure either enable_shared or enable_static is yes.
  5719. test yes = "$enable_shared" || enable_static=yes
  5720. AC_MSG_RESULT([$enable_static])
  5721. _LT_CONFIG($1)
  5722. fi
  5723. AC_LANG_POP
  5724. CC=$lt_save_CC
  5725. ])# _LT_LANG_C_CONFIG
  5726. # _LT_LANG_CXX_CONFIG([TAG])
  5727. # --------------------------
  5728. # Ensure that the configuration variables for a C++ compiler are suitably
  5729. # defined. These variables are subsequently used by _LT_CONFIG to write
  5730. # the compiler configuration to 'libtool'.
  5731. m4_defun([_LT_LANG_CXX_CONFIG],
  5732. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  5733. m4_require([_LT_DECL_EGREP])dnl
  5734. m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  5735. if test -n "$CXX" && ( test no != "$CXX" &&
  5736. ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
  5737. (test g++ != "$CXX"))); then
  5738. AC_PROG_CXXCPP
  5739. else
  5740. _lt_caught_CXX_error=yes
  5741. fi
  5742. AC_LANG_PUSH(C++)
  5743. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5744. _LT_TAGVAR(allow_undefined_flag, $1)=
  5745. _LT_TAGVAR(always_export_symbols, $1)=no
  5746. _LT_TAGVAR(archive_expsym_cmds, $1)=
  5747. _LT_TAGVAR(compiler_needs_object, $1)=no
  5748. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  5749. _LT_TAGVAR(hardcode_direct, $1)=no
  5750. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  5751. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  5752. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5753. _LT_TAGVAR(hardcode_minus_L, $1)=no
  5754. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  5755. _LT_TAGVAR(hardcode_automatic, $1)=no
  5756. _LT_TAGVAR(inherit_rpath, $1)=no
  5757. _LT_TAGVAR(module_cmds, $1)=
  5758. _LT_TAGVAR(module_expsym_cmds, $1)=
  5759. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  5760. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  5761. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  5762. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  5763. _LT_TAGVAR(no_undefined_flag, $1)=
  5764. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5765. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  5766. # Source file extension for C++ test sources.
  5767. ac_ext=cpp
  5768. # Object file extension for compiled C++ test sources.
  5769. objext=o
  5770. _LT_TAGVAR(objext, $1)=$objext
  5771. # No sense in running all these tests if we already determined that
  5772. # the CXX compiler isn't working. Some variables (like enable_shared)
  5773. # are currently assumed to apply to all compilers on this platform,
  5774. # and will be corrupted by setting them based on a non-working compiler.
  5775. if test yes != "$_lt_caught_CXX_error"; then
  5776. # Code to be used in simple compile tests
  5777. lt_simple_compile_test_code="int some_variable = 0;"
  5778. # Code to be used in simple link tests
  5779. lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
  5780. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  5781. _LT_TAG_COMPILER
  5782. # save warnings/boilerplate of simple test code
  5783. _LT_COMPILER_BOILERPLATE
  5784. _LT_LINKER_BOILERPLATE
  5785. # Allow CC to be a program name with arguments.
  5786. lt_save_CC=$CC
  5787. lt_save_CFLAGS=$CFLAGS
  5788. lt_save_LD=$LD
  5789. lt_save_GCC=$GCC
  5790. GCC=$GXX
  5791. lt_save_with_gnu_ld=$with_gnu_ld
  5792. lt_save_path_LD=$lt_cv_path_LD
  5793. if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
  5794. lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
  5795. else
  5796. $as_unset lt_cv_prog_gnu_ld
  5797. fi
  5798. if test -n "${lt_cv_path_LDCXX+set}"; then
  5799. lt_cv_path_LD=$lt_cv_path_LDCXX
  5800. else
  5801. $as_unset lt_cv_path_LD
  5802. fi
  5803. test -z "${LDCXX+set}" || LD=$LDCXX
  5804. CC=${CXX-"c++"}
  5805. CFLAGS=$CXXFLAGS
  5806. compiler=$CC
  5807. _LT_TAGVAR(compiler, $1)=$CC
  5808. _LT_CC_BASENAME([$compiler])
  5809. if test -n "$compiler"; then
  5810. # We don't want -fno-exception when compiling C++ code, so set the
  5811. # no_builtin_flag separately
  5812. if test yes = "$GXX"; then
  5813. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  5814. else
  5815. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  5816. fi
  5817. if test yes = "$GXX"; then
  5818. # Set up default GNU C++ configuration
  5819. LT_PATH_LD
  5820. # Check if GNU C++ uses GNU ld as the underlying linker, since the
  5821. # archiving commands below assume that GNU ld is being used.
  5822. if test yes = "$with_gnu_ld"; then
  5823. _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  5824. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
  5825. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5826. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  5827. # If archive_cmds runs LD, not CC, wlarc should be empty
  5828. # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
  5829. # investigate it a little bit more. (MM)
  5830. wlarc='$wl'
  5831. # ancient GNU ld didn't support --whole-archive et. al.
  5832. if eval "`$CC -print-prog-name=ld` --help 2>&1" |
  5833. $GREP 'no-whole-archive' > /dev/null; then
  5834. _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
  5835. else
  5836. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5837. fi
  5838. else
  5839. with_gnu_ld=no
  5840. wlarc=
  5841. # A generic and very simple default shared library creation
  5842. # command for GNU C++ for the case where it uses the native
  5843. # linker, instead of GNU ld. If possible, this setting should
  5844. # overridden to take advantage of the native linker features on
  5845. # the platform it is being used on.
  5846. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  5847. fi
  5848. # Commands to make compiler produce verbose output that lists
  5849. # what "hidden" libraries, object files and flags are used when
  5850. # linking a shared library.
  5851. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  5852. else
  5853. GXX=no
  5854. with_gnu_ld=no
  5855. wlarc=
  5856. fi
  5857. # PORTME: fill in a description of your system's C++ link characteristics
  5858. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  5859. _LT_TAGVAR(ld_shlibs, $1)=yes
  5860. case $host_os in
  5861. aix3*)
  5862. # FIXME: insert proper C++ library support
  5863. _LT_TAGVAR(ld_shlibs, $1)=no
  5864. ;;
  5865. aix[[4-9]]*)
  5866. if test ia64 = "$host_cpu"; then
  5867. # On IA64, the linker does run time linking by default, so we don't
  5868. # have to do anything special.
  5869. aix_use_runtimelinking=no
  5870. exp_sym_flag='-Bexport'
  5871. no_entry_flag=
  5872. else
  5873. aix_use_runtimelinking=no
  5874. # Test if we are trying to use run time linking or normal
  5875. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  5876. # have runtime linking enabled, and use it for executables.
  5877. # For shared libraries, we enable/disable runtime linking
  5878. # depending on the kind of the shared library created -
  5879. # when "with_aix_soname,aix_use_runtimelinking" is:
  5880. # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
  5881. # "aix,yes" lib.so shared, rtl:yes, for executables
  5882. # lib.a static archive
  5883. # "both,no" lib.so.V(shr.o) shared, rtl:yes
  5884. # lib.a(lib.so.V) shared, rtl:no, for executables
  5885. # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
  5886. # lib.a(lib.so.V) shared, rtl:no
  5887. # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
  5888. # lib.a static archive
  5889. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  5890. for ld_flag in $LDFLAGS; do
  5891. case $ld_flag in
  5892. *-brtl*)
  5893. aix_use_runtimelinking=yes
  5894. break
  5895. ;;
  5896. esac
  5897. done
  5898. if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
  5899. # With aix-soname=svr4, we create the lib.so.V shared archives only,
  5900. # so we don't have lib.a shared libs to link our executables.
  5901. # We have to force runtime linking in this case.
  5902. aix_use_runtimelinking=yes
  5903. LDFLAGS="$LDFLAGS -Wl,-brtl"
  5904. fi
  5905. ;;
  5906. esac
  5907. exp_sym_flag='-bexport'
  5908. no_entry_flag='-bnoentry'
  5909. fi
  5910. # When large executables or shared objects are built, AIX ld can
  5911. # have problems creating the table of contents. If linking a library
  5912. # or program results in "error TOC overflow" add -mminimal-toc to
  5913. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  5914. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  5915. _LT_TAGVAR(archive_cmds, $1)=''
  5916. _LT_TAGVAR(hardcode_direct, $1)=yes
  5917. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5918. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5919. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5920. _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
  5921. case $with_aix_soname,$aix_use_runtimelinking in
  5922. aix,*) ;; # no import file
  5923. svr4,* | *,yes) # use import file
  5924. # The Import File defines what to hardcode.
  5925. _LT_TAGVAR(hardcode_direct, $1)=no
  5926. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  5927. ;;
  5928. esac
  5929. if test yes = "$GXX"; then
  5930. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  5931. # We only want to do this on AIX 4.2 and lower, the check
  5932. # below for broken collect2 doesn't work under 4.3+
  5933. collect2name=`$CC -print-prog-name=collect2`
  5934. if test -f "$collect2name" &&
  5935. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  5936. then
  5937. # We have reworked collect2
  5938. :
  5939. else
  5940. # We have old collect2
  5941. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  5942. # It fails to find uninstalled libraries when the uninstalled
  5943. # path is not listed in the libpath. Setting hardcode_minus_L
  5944. # to unsupported forces relinking
  5945. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5946. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5947. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5948. fi
  5949. esac
  5950. shared_flag='-shared'
  5951. if test yes = "$aix_use_runtimelinking"; then
  5952. shared_flag=$shared_flag' $wl-G'
  5953. fi
  5954. # Need to ensure runtime linking is disabled for the traditional
  5955. # shared library, or the linker may eventually find shared libraries
  5956. # /with/ Import File - we do not want to mix them.
  5957. shared_flag_aix='-shared'
  5958. shared_flag_svr4='-shared $wl-G'
  5959. else
  5960. # not using gcc
  5961. if test ia64 = "$host_cpu"; then
  5962. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  5963. # chokes on -Wl,-G. The following line is correct:
  5964. shared_flag='-G'
  5965. else
  5966. if test yes = "$aix_use_runtimelinking"; then
  5967. shared_flag='$wl-G'
  5968. else
  5969. shared_flag='$wl-bM:SRE'
  5970. fi
  5971. shared_flag_aix='$wl-bM:SRE'
  5972. shared_flag_svr4='$wl-G'
  5973. fi
  5974. fi
  5975. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
  5976. # It seems that -bexpall does not export symbols beginning with
  5977. # underscore (_), so it is better to generate a list of symbols to
  5978. # export.
  5979. _LT_TAGVAR(always_export_symbols, $1)=yes
  5980. if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
  5981. # Warning - without using the other runtime loading flags (-brtl),
  5982. # -berok will link without error, but may produce a broken library.
  5983. # The "-G" linker flag allows undefined symbols.
  5984. _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
  5985. # Determine the default libpath from the value encoded in an empty
  5986. # executable.
  5987. _LT_SYS_MODULE_PATH_AIX([$1])
  5988. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
  5989. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
  5990. else
  5991. if test ia64 = "$host_cpu"; then
  5992. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
  5993. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  5994. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
  5995. else
  5996. # Determine the default libpath from the value encoded in an
  5997. # empty executable.
  5998. _LT_SYS_MODULE_PATH_AIX([$1])
  5999. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
  6000. # Warning - without using the other run time loading flags,
  6001. # -berok will link without error, but may produce a broken library.
  6002. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
  6003. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
  6004. if test yes = "$with_gnu_ld"; then
  6005. # We only use this code for GNU lds that support --whole-archive.
  6006. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
  6007. else
  6008. # Exported symbols can be pulled into shared objects from archives
  6009. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  6010. fi
  6011. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  6012. _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
  6013. # -brtl affects multiple linker settings, -berok does not and is overridden later
  6014. compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
  6015. if test svr4 != "$with_aix_soname"; then
  6016. # This is similar to how AIX traditionally builds its shared
  6017. # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
  6018. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
  6019. fi
  6020. if test aix != "$with_aix_soname"; then
  6021. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
  6022. else
  6023. # used by -dlpreopen to get the symbols
  6024. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
  6025. fi
  6026. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
  6027. fi
  6028. fi
  6029. ;;
  6030. beos*)
  6031. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  6032. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6033. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  6034. # support --undefined. This deserves some investigation. FIXME
  6035. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  6036. else
  6037. _LT_TAGVAR(ld_shlibs, $1)=no
  6038. fi
  6039. ;;
  6040. chorus*)
  6041. case $cc_basename in
  6042. *)
  6043. # FIXME: insert proper C++ library support
  6044. _LT_TAGVAR(ld_shlibs, $1)=no
  6045. ;;
  6046. esac
  6047. ;;
  6048. cygwin* | mingw* | pw32* | cegcc*)
  6049. case $GXX,$cc_basename in
  6050. ,cl* | no,cl*)
  6051. # Native MSVC
  6052. # hardcode_libdir_flag_spec is actually meaningless, as there is
  6053. # no search path for DLLs.
  6054. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  6055. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6056. _LT_TAGVAR(always_export_symbols, $1)=yes
  6057. _LT_TAGVAR(file_list_spec, $1)='@'
  6058. # Tell ltmain to make .lib files, not .a files.
  6059. libext=lib
  6060. # Tell ltmain to make .dll files, not .so files.
  6061. shrext_cmds=.dll
  6062. # FIXME: Setting linknames here is a bad hack.
  6063. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
  6064. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  6065. cp "$export_symbols" "$output_objdir/$soname.def";
  6066. echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
  6067. else
  6068. $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
  6069. fi~
  6070. $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  6071. linknames='
  6072. # The linker will not automatically build a static lib if we build a DLL.
  6073. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  6074. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  6075. # Don't use ranlib
  6076. _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  6077. _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  6078. lt_tool_outputfile="@TOOL_OUTPUT@"~
  6079. case $lt_outputfile in
  6080. *.exe|*.EXE) ;;
  6081. *)
  6082. lt_outputfile=$lt_outputfile.exe
  6083. lt_tool_outputfile=$lt_tool_outputfile.exe
  6084. ;;
  6085. esac~
  6086. func_to_tool_file "$lt_outputfile"~
  6087. if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
  6088. $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  6089. $RM "$lt_outputfile.manifest";
  6090. fi'
  6091. ;;
  6092. *)
  6093. # g++
  6094. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  6095. # as there is no search path for DLLs.
  6096. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6097. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
  6098. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6099. _LT_TAGVAR(always_export_symbols, $1)=no
  6100. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  6101. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  6102. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  6103. # If the export-symbols file already is a .def file, use it as
  6104. # is; otherwise, prepend EXPORTS...
  6105. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  6106. cp $export_symbols $output_objdir/$soname.def;
  6107. else
  6108. echo EXPORTS > $output_objdir/$soname.def;
  6109. cat $export_symbols >> $output_objdir/$soname.def;
  6110. fi~
  6111. $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'
  6112. else
  6113. _LT_TAGVAR(ld_shlibs, $1)=no
  6114. fi
  6115. ;;
  6116. esac
  6117. ;;
  6118. darwin* | rhapsody*)
  6119. _LT_DARWIN_LINKER_FEATURES($1)
  6120. ;;
  6121. os2*)
  6122. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6123. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  6124. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6125. shrext_cmds=.dll
  6126. _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  6127. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  6128. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  6129. $ECHO EXPORTS >> $output_objdir/$libname.def~
  6130. emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
  6131. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  6132. emximp -o $lib $output_objdir/$libname.def'
  6133. _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  6134. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  6135. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  6136. $ECHO EXPORTS >> $output_objdir/$libname.def~
  6137. prefix_cmds="$SED"~
  6138. if test EXPORTS = "`$SED 1q $export_symbols`"; then
  6139. prefix_cmds="$prefix_cmds -e 1d";
  6140. fi~
  6141. prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
  6142. cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
  6143. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  6144. emximp -o $lib $output_objdir/$libname.def'
  6145. _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
  6146. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  6147. ;;
  6148. dgux*)
  6149. case $cc_basename in
  6150. ec++*)
  6151. # FIXME: insert proper C++ library support
  6152. _LT_TAGVAR(ld_shlibs, $1)=no
  6153. ;;
  6154. ghcx*)
  6155. # Green Hills C++ Compiler
  6156. # FIXME: insert proper C++ library support
  6157. _LT_TAGVAR(ld_shlibs, $1)=no
  6158. ;;
  6159. *)
  6160. # FIXME: insert proper C++ library support
  6161. _LT_TAGVAR(ld_shlibs, $1)=no
  6162. ;;
  6163. esac
  6164. ;;
  6165. freebsd2.*)
  6166. # C++ shared libraries reported to be fairly broken before
  6167. # switch to ELF
  6168. _LT_TAGVAR(ld_shlibs, $1)=no
  6169. ;;
  6170. freebsd-elf*)
  6171. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6172. ;;
  6173. freebsd* | dragonfly*)
  6174. # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
  6175. # conventions
  6176. _LT_TAGVAR(ld_shlibs, $1)=yes
  6177. ;;
  6178. haiku*)
  6179. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  6180. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6181. ;;
  6182. hpux9*)
  6183. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  6184. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6185. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  6186. _LT_TAGVAR(hardcode_direct, $1)=yes
  6187. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  6188. # but as the default
  6189. # location of the library.
  6190. case $cc_basename in
  6191. CC*)
  6192. # FIXME: insert proper C++ library support
  6193. _LT_TAGVAR(ld_shlibs, $1)=no
  6194. ;;
  6195. aCC*)
  6196. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
  6197. # Commands to make compiler produce verbose output that lists
  6198. # what "hidden" libraries, object files and flags are used when
  6199. # linking a shared library.
  6200. #
  6201. # There doesn't appear to be a way to prevent this compiler from
  6202. # explicitly linking system object files so we need to strip them
  6203. # from the output so that they don't get included in the library
  6204. # dependencies.
  6205. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
  6206. ;;
  6207. *)
  6208. if test yes = "$GXX"; then
  6209. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
  6210. else
  6211. # FIXME: insert proper C++ library support
  6212. _LT_TAGVAR(ld_shlibs, $1)=no
  6213. fi
  6214. ;;
  6215. esac
  6216. ;;
  6217. hpux10*|hpux11*)
  6218. if test no = "$with_gnu_ld"; then
  6219. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  6220. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6221. case $host_cpu in
  6222. hppa*64*|ia64*)
  6223. ;;
  6224. *)
  6225. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  6226. ;;
  6227. esac
  6228. fi
  6229. case $host_cpu in
  6230. hppa*64*|ia64*)
  6231. _LT_TAGVAR(hardcode_direct, $1)=no
  6232. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6233. ;;
  6234. *)
  6235. _LT_TAGVAR(hardcode_direct, $1)=yes
  6236. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6237. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  6238. # but as the default
  6239. # location of the library.
  6240. ;;
  6241. esac
  6242. case $cc_basename in
  6243. CC*)
  6244. # FIXME: insert proper C++ library support
  6245. _LT_TAGVAR(ld_shlibs, $1)=no
  6246. ;;
  6247. aCC*)
  6248. case $host_cpu in
  6249. hppa*64*)
  6250. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6251. ;;
  6252. ia64*)
  6253. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6254. ;;
  6255. *)
  6256. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6257. ;;
  6258. esac
  6259. # Commands to make compiler produce verbose output that lists
  6260. # what "hidden" libraries, object files and flags are used when
  6261. # linking a shared library.
  6262. #
  6263. # There doesn't appear to be a way to prevent this compiler from
  6264. # explicitly linking system object files so we need to strip them
  6265. # from the output so that they don't get included in the library
  6266. # dependencies.
  6267. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
  6268. ;;
  6269. *)
  6270. if test yes = "$GXX"; then
  6271. if test no = "$with_gnu_ld"; then
  6272. case $host_cpu in
  6273. hppa*64*)
  6274. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6275. ;;
  6276. ia64*)
  6277. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6278. ;;
  6279. *)
  6280. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6281. ;;
  6282. esac
  6283. fi
  6284. else
  6285. # FIXME: insert proper C++ library support
  6286. _LT_TAGVAR(ld_shlibs, $1)=no
  6287. fi
  6288. ;;
  6289. esac
  6290. ;;
  6291. interix[[3-9]]*)
  6292. _LT_TAGVAR(hardcode_direct, $1)=no
  6293. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6294. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6295. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  6296. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  6297. # Instead, shared libraries are loaded at an image base (0x10000000 by
  6298. # default) and relocated if they conflict, which is a slow very memory
  6299. # consuming and fragmenting process. To avoid this, we pick a random,
  6300. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  6301. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  6302. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
  6303. _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
  6304. ;;
  6305. irix5* | irix6*)
  6306. case $cc_basename in
  6307. CC*)
  6308. # SGI C++
  6309. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
  6310. # Archives containing C++ object files must be created using
  6311. # "CC -ar", where "CC" is the IRIX C++ compiler. This is
  6312. # necessary to make sure instantiated templates are included
  6313. # in the archive.
  6314. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
  6315. ;;
  6316. *)
  6317. if test yes = "$GXX"; then
  6318. if test no = "$with_gnu_ld"; then
  6319. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
  6320. else
  6321. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
  6322. fi
  6323. fi
  6324. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6325. ;;
  6326. esac
  6327. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  6328. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6329. _LT_TAGVAR(inherit_rpath, $1)=yes
  6330. ;;
  6331. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  6332. case $cc_basename in
  6333. KCC*)
  6334. # Kuck and Associates, Inc. (KAI) C++ Compiler
  6335. # KCC will only create a shared library if the output file
  6336. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  6337. # to its proper name (with version) after linking.
  6338. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
  6339. _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib'
  6340. # Commands to make compiler produce verbose output that lists
  6341. # what "hidden" libraries, object files and flags are used when
  6342. # linking a shared library.
  6343. #
  6344. # There doesn't appear to be a way to prevent this compiler from
  6345. # explicitly linking system object files so we need to strip them
  6346. # from the output so that they don't get included in the library
  6347. # dependencies.
  6348. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
  6349. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6350. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  6351. # Archives containing C++ object files must be created using
  6352. # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  6353. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  6354. ;;
  6355. icpc* | ecpc* )
  6356. # Intel C++
  6357. with_gnu_ld=yes
  6358. # version 8.0 and above of icpc choke on multiply defined symbols
  6359. # if we add $predep_objects and $postdep_objects, however 7.1 and
  6360. # earlier do not add the objects themselves.
  6361. case `$CC -V 2>&1` in
  6362. *"Version 7."*)
  6363. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  6364. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
  6365. ;;
  6366. *) # Version 8.0 or newer
  6367. tmp_idyn=
  6368. case $host_cpu in
  6369. ia64*) tmp_idyn=' -i_dynamic';;
  6370. esac
  6371. _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  6372. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
  6373. ;;
  6374. esac
  6375. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6376. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6377. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  6378. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
  6379. ;;
  6380. pgCC* | pgcpp*)
  6381. # Portland Group C++ compiler
  6382. case `$CC -V` in
  6383. *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
  6384. _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
  6385. rm -rf $tpldir~
  6386. $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
  6387. compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
  6388. _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
  6389. rm -rf $tpldir~
  6390. $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
  6391. $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
  6392. $RANLIB $oldlib'
  6393. _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
  6394. rm -rf $tpldir~
  6395. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  6396. $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  6397. _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
  6398. rm -rf $tpldir~
  6399. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  6400. $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
  6401. ;;
  6402. *) # Version 6 and above use weak symbols
  6403. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  6404. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
  6405. ;;
  6406. esac
  6407. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
  6408. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  6409. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
  6410. ;;
  6411. cxx*)
  6412. # Compaq C++
  6413. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  6414. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols'
  6415. runpath_var=LD_RUN_PATH
  6416. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  6417. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6418. # Commands to make compiler produce verbose output that lists
  6419. # what "hidden" libraries, object files and flags are used when
  6420. # linking a shared library.
  6421. #
  6422. # There doesn't appear to be a way to prevent this compiler from
  6423. # explicitly linking system object files so we need to strip them
  6424. # from the output so that they don't get included in the library
  6425. # dependencies.
  6426. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
  6427. ;;
  6428. xl* | mpixl* | bgxl*)
  6429. # IBM XL 8.0 on PPC, with GNU ld
  6430. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  6431. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  6432. _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  6433. if test yes = "$supports_anon_versioning"; then
  6434. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  6435. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  6436. echo "local: *; };" >> $output_objdir/$libname.ver~
  6437. $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
  6438. fi
  6439. ;;
  6440. *)
  6441. case `$CC -V 2>&1 | sed 5q` in
  6442. *Sun\ C*)
  6443. # Sun C++ 5.9
  6444. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  6445. _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6446. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols'
  6447. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6448. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
  6449. _LT_TAGVAR(compiler_needs_object, $1)=yes
  6450. # Not sure whether something based on
  6451. # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
  6452. # would be better.
  6453. output_verbose_link_cmd='func_echo_all'
  6454. # Archives containing C++ object files must be created using
  6455. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  6456. # necessary to make sure instantiated templates are included
  6457. # in the archive.
  6458. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  6459. ;;
  6460. esac
  6461. ;;
  6462. esac
  6463. ;;
  6464. lynxos*)
  6465. # FIXME: insert proper C++ library support
  6466. _LT_TAGVAR(ld_shlibs, $1)=no
  6467. ;;
  6468. m88k*)
  6469. # FIXME: insert proper C++ library support
  6470. _LT_TAGVAR(ld_shlibs, $1)=no
  6471. ;;
  6472. mvs*)
  6473. case $cc_basename in
  6474. cxx*)
  6475. # FIXME: insert proper C++ library support
  6476. _LT_TAGVAR(ld_shlibs, $1)=no
  6477. ;;
  6478. *)
  6479. # FIXME: insert proper C++ library support
  6480. _LT_TAGVAR(ld_shlibs, $1)=no
  6481. ;;
  6482. esac
  6483. ;;
  6484. netbsd*)
  6485. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  6486. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
  6487. wlarc=
  6488. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6489. _LT_TAGVAR(hardcode_direct, $1)=yes
  6490. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6491. fi
  6492. # Workaround some broken pre-1.5 toolchains
  6493. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
  6494. ;;
  6495. *nto* | *qnx*)
  6496. _LT_TAGVAR(ld_shlibs, $1)=yes
  6497. ;;
  6498. openbsd* | bitrig*)
  6499. if test -f /usr/libexec/ld.so; then
  6500. _LT_TAGVAR(hardcode_direct, $1)=yes
  6501. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6502. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6503. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  6504. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6505. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
  6506. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib'
  6507. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  6508. _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
  6509. fi
  6510. output_verbose_link_cmd=func_echo_all
  6511. else
  6512. _LT_TAGVAR(ld_shlibs, $1)=no
  6513. fi
  6514. ;;
  6515. osf3* | osf4* | osf5*)
  6516. case $cc_basename in
  6517. KCC*)
  6518. # Kuck and Associates, Inc. (KAI) C++ Compiler
  6519. # KCC will only create a shared library if the output file
  6520. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  6521. # to its proper name (with version) after linking.
  6522. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
  6523. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6524. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6525. # Archives containing C++ object files must be created using
  6526. # the KAI C++ compiler.
  6527. case $host in
  6528. osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
  6529. *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
  6530. esac
  6531. ;;
  6532. RCC*)
  6533. # Rational C++ 2.4.1
  6534. # FIXME: insert proper C++ library support
  6535. _LT_TAGVAR(ld_shlibs, $1)=no
  6536. ;;
  6537. cxx*)
  6538. case $host in
  6539. osf3*)
  6540. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
  6541. _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
  6542. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  6543. ;;
  6544. *)
  6545. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  6546. _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
  6547. _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
  6548. echo "-hidden">> $lib.exp~
  6549. $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~
  6550. $RM $lib.exp'
  6551. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  6552. ;;
  6553. esac
  6554. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6555. # Commands to make compiler produce verbose output that lists
  6556. # what "hidden" libraries, object files and flags are used when
  6557. # linking a shared library.
  6558. #
  6559. # There doesn't appear to be a way to prevent this compiler from
  6560. # explicitly linking system object files so we need to strip them
  6561. # from the output so that they don't get included in the library
  6562. # dependencies.
  6563. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
  6564. ;;
  6565. *)
  6566. if test yes,no = "$GXX,$with_gnu_ld"; then
  6567. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
  6568. case $host in
  6569. osf3*)
  6570. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
  6571. ;;
  6572. *)
  6573. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
  6574. ;;
  6575. esac
  6576. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  6577. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6578. # Commands to make compiler produce verbose output that lists
  6579. # what "hidden" libraries, object files and flags are used when
  6580. # linking a shared library.
  6581. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  6582. else
  6583. # FIXME: insert proper C++ library support
  6584. _LT_TAGVAR(ld_shlibs, $1)=no
  6585. fi
  6586. ;;
  6587. esac
  6588. ;;
  6589. psos*)
  6590. # FIXME: insert proper C++ library support
  6591. _LT_TAGVAR(ld_shlibs, $1)=no
  6592. ;;
  6593. sunos4*)
  6594. case $cc_basename in
  6595. CC*)
  6596. # Sun C++ 4.x
  6597. # FIXME: insert proper C++ library support
  6598. _LT_TAGVAR(ld_shlibs, $1)=no
  6599. ;;
  6600. lcc*)
  6601. # Lucid
  6602. # FIXME: insert proper C++ library support
  6603. _LT_TAGVAR(ld_shlibs, $1)=no
  6604. ;;
  6605. *)
  6606. # FIXME: insert proper C++ library support
  6607. _LT_TAGVAR(ld_shlibs, $1)=no
  6608. ;;
  6609. esac
  6610. ;;
  6611. solaris*)
  6612. case $cc_basename in
  6613. CC* | sunCC*)
  6614. # Sun C++ 4.2, 5.x and Centerline C++
  6615. _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
  6616. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  6617. _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6618. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6619. $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'
  6620. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6621. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6622. case $host_os in
  6623. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6624. *)
  6625. # The compiler driver will combine and reorder linker options,
  6626. # but understands '-z linker_flag'.
  6627. # Supported since Solaris 2.6 (maybe 2.5.1?)
  6628. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  6629. ;;
  6630. esac
  6631. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6632. output_verbose_link_cmd='func_echo_all'
  6633. # Archives containing C++ object files must be created using
  6634. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  6635. # necessary to make sure instantiated templates are included
  6636. # in the archive.
  6637. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  6638. ;;
  6639. gcx*)
  6640. # Green Hills C++ Compiler
  6641. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
  6642. # The C++ compiler must be used to create the archive.
  6643. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
  6644. ;;
  6645. *)
  6646. # GNU C++ compiler with Solaris linker
  6647. if test yes,no = "$GXX,$with_gnu_ld"; then
  6648. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
  6649. if $CC --version | $GREP -v '^2\.7' > /dev/null; then
  6650. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
  6651. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6652. $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  6653. # Commands to make compiler produce verbose output that lists
  6654. # what "hidden" libraries, object files and flags are used when
  6655. # linking a shared library.
  6656. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  6657. else
  6658. # g++ 2.7 appears to require '-G' NOT '-shared' on this
  6659. # platform.
  6660. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
  6661. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6662. $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  6663. # Commands to make compiler produce verbose output that lists
  6664. # what "hidden" libraries, object files and flags are used when
  6665. # linking a shared library.
  6666. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  6667. fi
  6668. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
  6669. case $host_os in
  6670. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6671. *)
  6672. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
  6673. ;;
  6674. esac
  6675. fi
  6676. ;;
  6677. esac
  6678. ;;
  6679. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  6680. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  6681. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6682. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6683. runpath_var='LD_RUN_PATH'
  6684. case $cc_basename in
  6685. CC*)
  6686. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6687. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6688. ;;
  6689. *)
  6690. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6691. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6692. ;;
  6693. esac
  6694. ;;
  6695. sysv5* | sco3.2v5* | sco5v6*)
  6696. # Note: We CANNOT use -z defs as we might desire, because we do not
  6697. # link with -lc, and that would cause any symbols used from libc to
  6698. # always be unresolved, which means just about no library would
  6699. # ever link correctly. If we're not using GNU ld we use -z text
  6700. # though, which does catch some bad symbols but isn't as heavy-handed
  6701. # as -z defs.
  6702. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  6703. _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
  6704. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6705. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6706. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
  6707. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  6708. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6709. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
  6710. runpath_var='LD_RUN_PATH'
  6711. case $cc_basename in
  6712. CC*)
  6713. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6714. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6715. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
  6716. '"$_LT_TAGVAR(old_archive_cmds, $1)"
  6717. _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
  6718. '"$_LT_TAGVAR(reload_cmds, $1)"
  6719. ;;
  6720. *)
  6721. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6722. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6723. ;;
  6724. esac
  6725. ;;
  6726. tandem*)
  6727. case $cc_basename in
  6728. NCC*)
  6729. # NonStop-UX NCC 3.20
  6730. # FIXME: insert proper C++ library support
  6731. _LT_TAGVAR(ld_shlibs, $1)=no
  6732. ;;
  6733. *)
  6734. # FIXME: insert proper C++ library support
  6735. _LT_TAGVAR(ld_shlibs, $1)=no
  6736. ;;
  6737. esac
  6738. ;;
  6739. vxworks*)
  6740. # FIXME: insert proper C++ library support
  6741. _LT_TAGVAR(ld_shlibs, $1)=no
  6742. ;;
  6743. *)
  6744. # FIXME: insert proper C++ library support
  6745. _LT_TAGVAR(ld_shlibs, $1)=no
  6746. ;;
  6747. esac
  6748. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  6749. test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
  6750. _LT_TAGVAR(GCC, $1)=$GXX
  6751. _LT_TAGVAR(LD, $1)=$LD
  6752. ## CAVEAT EMPTOR:
  6753. ## There is no encapsulation within the following macros, do not change
  6754. ## the running order or otherwise move them around unless you know exactly
  6755. ## what you are doing...
  6756. _LT_SYS_HIDDEN_LIBDEPS($1)
  6757. _LT_COMPILER_PIC($1)
  6758. _LT_COMPILER_C_O($1)
  6759. _LT_COMPILER_FILE_LOCKS($1)
  6760. _LT_LINKER_SHLIBS($1)
  6761. _LT_SYS_DYNAMIC_LINKER($1)
  6762. _LT_LINKER_HARDCODE_LIBPATH($1)
  6763. _LT_CONFIG($1)
  6764. fi # test -n "$compiler"
  6765. CC=$lt_save_CC
  6766. CFLAGS=$lt_save_CFLAGS
  6767. LDCXX=$LD
  6768. LD=$lt_save_LD
  6769. GCC=$lt_save_GCC
  6770. with_gnu_ld=$lt_save_with_gnu_ld
  6771. lt_cv_path_LDCXX=$lt_cv_path_LD
  6772. lt_cv_path_LD=$lt_save_path_LD
  6773. lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
  6774. lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
  6775. fi # test yes != "$_lt_caught_CXX_error"
  6776. AC_LANG_POP
  6777. ])# _LT_LANG_CXX_CONFIG
  6778. # _LT_FUNC_STRIPNAME_CNF
  6779. # ----------------------
  6780. # func_stripname_cnf prefix suffix name
  6781. # strip PREFIX and SUFFIX off of NAME.
  6782. # PREFIX and SUFFIX must not contain globbing or regex special
  6783. # characters, hashes, percent signs, but SUFFIX may contain a leading
  6784. # dot (in which case that matches only a dot).
  6785. #
  6786. # This function is identical to the (non-XSI) version of func_stripname,
  6787. # except this one can be used by m4 code that may be executed by configure,
  6788. # rather than the libtool script.
  6789. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
  6790. AC_REQUIRE([_LT_DECL_SED])
  6791. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
  6792. func_stripname_cnf ()
  6793. {
  6794. case @S|@2 in
  6795. .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
  6796. *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
  6797. esac
  6798. } # func_stripname_cnf
  6799. ])# _LT_FUNC_STRIPNAME_CNF
  6800. # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
  6801. # ---------------------------------
  6802. # Figure out "hidden" library dependencies from verbose
  6803. # compiler output when linking a shared library.
  6804. # Parse the compiler output and extract the necessary
  6805. # objects, libraries and library flags.
  6806. m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
  6807. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  6808. AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
  6809. # Dependencies to place before and after the object being linked:
  6810. _LT_TAGVAR(predep_objects, $1)=
  6811. _LT_TAGVAR(postdep_objects, $1)=
  6812. _LT_TAGVAR(predeps, $1)=
  6813. _LT_TAGVAR(postdeps, $1)=
  6814. _LT_TAGVAR(compiler_lib_search_path, $1)=
  6815. dnl we can't use the lt_simple_compile_test_code here,
  6816. dnl because it contains code intended for an executable,
  6817. dnl not a library. It's possible we should let each
  6818. dnl tag define a new lt_????_link_test_code variable,
  6819. dnl but it's only used here...
  6820. m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
  6821. int a;
  6822. void foo (void) { a = 0; }
  6823. _LT_EOF
  6824. ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
  6825. class Foo
  6826. {
  6827. public:
  6828. Foo (void) { a = 0; }
  6829. private:
  6830. int a;
  6831. };
  6832. _LT_EOF
  6833. ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
  6834. subroutine foo
  6835. implicit none
  6836. integer*4 a
  6837. a=0
  6838. return
  6839. end
  6840. _LT_EOF
  6841. ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
  6842. subroutine foo
  6843. implicit none
  6844. integer a
  6845. a=0
  6846. return
  6847. end
  6848. _LT_EOF
  6849. ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
  6850. public class foo {
  6851. private int a;
  6852. public void bar (void) {
  6853. a = 0;
  6854. }
  6855. };
  6856. _LT_EOF
  6857. ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
  6858. package foo
  6859. func foo() {
  6860. }
  6861. _LT_EOF
  6862. ])
  6863. _lt_libdeps_save_CFLAGS=$CFLAGS
  6864. case "$CC $CFLAGS " in #(
  6865. *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
  6866. *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
  6867. *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
  6868. esac
  6869. dnl Parse the compiler output and extract the necessary
  6870. dnl objects, libraries and library flags.
  6871. if AC_TRY_EVAL(ac_compile); then
  6872. # Parse the compiler output and extract the necessary
  6873. # objects, libraries and library flags.
  6874. # Sentinel used to keep track of whether or not we are before
  6875. # the conftest object file.
  6876. pre_test_object_deps_done=no
  6877. for p in `eval "$output_verbose_link_cmd"`; do
  6878. case $prev$p in
  6879. -L* | -R* | -l*)
  6880. # Some compilers place space between "-{L,R}" and the path.
  6881. # Remove the space.
  6882. if test x-L = "$p" ||
  6883. test x-R = "$p"; then
  6884. prev=$p
  6885. continue
  6886. fi
  6887. # Expand the sysroot to ease extracting the directories later.
  6888. if test -z "$prev"; then
  6889. case $p in
  6890. -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
  6891. -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
  6892. -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
  6893. esac
  6894. fi
  6895. case $p in
  6896. =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
  6897. esac
  6898. if test no = "$pre_test_object_deps_done"; then
  6899. case $prev in
  6900. -L | -R)
  6901. # Internal compiler library paths should come after those
  6902. # provided the user. The postdeps already come after the
  6903. # user supplied libs so there is no need to process them.
  6904. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
  6905. _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
  6906. else
  6907. _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
  6908. fi
  6909. ;;
  6910. # The "-l" case would never come before the object being
  6911. # linked, so don't bother handling this case.
  6912. esac
  6913. else
  6914. if test -z "$_LT_TAGVAR(postdeps, $1)"; then
  6915. _LT_TAGVAR(postdeps, $1)=$prev$p
  6916. else
  6917. _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
  6918. fi
  6919. fi
  6920. prev=
  6921. ;;
  6922. *.lto.$objext) ;; # Ignore GCC LTO objects
  6923. *.$objext)
  6924. # This assumes that the test object file only shows up
  6925. # once in the compiler output.
  6926. if test "$p" = "conftest.$objext"; then
  6927. pre_test_object_deps_done=yes
  6928. continue
  6929. fi
  6930. if test no = "$pre_test_object_deps_done"; then
  6931. if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
  6932. _LT_TAGVAR(predep_objects, $1)=$p
  6933. else
  6934. _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
  6935. fi
  6936. else
  6937. if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
  6938. _LT_TAGVAR(postdep_objects, $1)=$p
  6939. else
  6940. _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
  6941. fi
  6942. fi
  6943. ;;
  6944. *) ;; # Ignore the rest.
  6945. esac
  6946. done
  6947. # Clean up.
  6948. rm -f a.out a.exe
  6949. else
  6950. echo "libtool.m4: error: problem compiling $1 test program"
  6951. fi
  6952. $RM -f confest.$objext
  6953. CFLAGS=$_lt_libdeps_save_CFLAGS
  6954. # PORTME: override above test on systems where it is broken
  6955. m4_if([$1], [CXX],
  6956. [case $host_os in
  6957. interix[[3-9]]*)
  6958. # Interix 3.5 installs completely hosed .la files for C++, so rather than
  6959. # hack all around it, let's just trust "g++" to DTRT.
  6960. _LT_TAGVAR(predep_objects,$1)=
  6961. _LT_TAGVAR(postdep_objects,$1)=
  6962. _LT_TAGVAR(postdeps,$1)=
  6963. ;;
  6964. esac
  6965. ])
  6966. case " $_LT_TAGVAR(postdeps, $1) " in
  6967. *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
  6968. esac
  6969. _LT_TAGVAR(compiler_lib_search_dirs, $1)=
  6970. if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
  6971. _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
  6972. fi
  6973. _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
  6974. [The directories searched by this compiler when creating a shared library])
  6975. _LT_TAGDECL([], [predep_objects], [1],
  6976. [Dependencies to place before and after the objects being linked to
  6977. create a shared library])
  6978. _LT_TAGDECL([], [postdep_objects], [1])
  6979. _LT_TAGDECL([], [predeps], [1])
  6980. _LT_TAGDECL([], [postdeps], [1])
  6981. _LT_TAGDECL([], [compiler_lib_search_path], [1],
  6982. [The library search path used internally by the compiler when linking
  6983. a shared library])
  6984. ])# _LT_SYS_HIDDEN_LIBDEPS
  6985. # _LT_LANG_F77_CONFIG([TAG])
  6986. # --------------------------
  6987. # Ensure that the configuration variables for a Fortran 77 compiler are
  6988. # suitably defined. These variables are subsequently used by _LT_CONFIG
  6989. # to write the compiler configuration to 'libtool'.
  6990. m4_defun([_LT_LANG_F77_CONFIG],
  6991. [AC_LANG_PUSH(Fortran 77)
  6992. if test -z "$F77" || test no = "$F77"; then
  6993. _lt_disable_F77=yes
  6994. fi
  6995. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6996. _LT_TAGVAR(allow_undefined_flag, $1)=
  6997. _LT_TAGVAR(always_export_symbols, $1)=no
  6998. _LT_TAGVAR(archive_expsym_cmds, $1)=
  6999. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  7000. _LT_TAGVAR(hardcode_direct, $1)=no
  7001. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  7002. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  7003. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  7004. _LT_TAGVAR(hardcode_minus_L, $1)=no
  7005. _LT_TAGVAR(hardcode_automatic, $1)=no
  7006. _LT_TAGVAR(inherit_rpath, $1)=no
  7007. _LT_TAGVAR(module_cmds, $1)=
  7008. _LT_TAGVAR(module_expsym_cmds, $1)=
  7009. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  7010. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7011. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  7012. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  7013. _LT_TAGVAR(no_undefined_flag, $1)=
  7014. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  7015. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  7016. # Source file extension for f77 test sources.
  7017. ac_ext=f
  7018. # Object file extension for compiled f77 test sources.
  7019. objext=o
  7020. _LT_TAGVAR(objext, $1)=$objext
  7021. # No sense in running all these tests if we already determined that
  7022. # the F77 compiler isn't working. Some variables (like enable_shared)
  7023. # are currently assumed to apply to all compilers on this platform,
  7024. # and will be corrupted by setting them based on a non-working compiler.
  7025. if test yes != "$_lt_disable_F77"; then
  7026. # Code to be used in simple compile tests
  7027. lt_simple_compile_test_code="\
  7028. subroutine t
  7029. return
  7030. end
  7031. "
  7032. # Code to be used in simple link tests
  7033. lt_simple_link_test_code="\
  7034. program t
  7035. end
  7036. "
  7037. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7038. _LT_TAG_COMPILER
  7039. # save warnings/boilerplate of simple test code
  7040. _LT_COMPILER_BOILERPLATE
  7041. _LT_LINKER_BOILERPLATE
  7042. # Allow CC to be a program name with arguments.
  7043. lt_save_CC=$CC
  7044. lt_save_GCC=$GCC
  7045. lt_save_CFLAGS=$CFLAGS
  7046. CC=${F77-"f77"}
  7047. CFLAGS=$FFLAGS
  7048. compiler=$CC
  7049. _LT_TAGVAR(compiler, $1)=$CC
  7050. _LT_CC_BASENAME([$compiler])
  7051. GCC=$G77
  7052. if test -n "$compiler"; then
  7053. AC_MSG_CHECKING([if libtool supports shared libraries])
  7054. AC_MSG_RESULT([$can_build_shared])
  7055. AC_MSG_CHECKING([whether to build shared libraries])
  7056. test no = "$can_build_shared" && enable_shared=no
  7057. # On AIX, shared libraries and static libraries use the same namespace, and
  7058. # are all built from PIC.
  7059. case $host_os in
  7060. aix3*)
  7061. test yes = "$enable_shared" && enable_static=no
  7062. if test -n "$RANLIB"; then
  7063. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  7064. postinstall_cmds='$RANLIB $lib'
  7065. fi
  7066. ;;
  7067. aix[[4-9]]*)
  7068. if test ia64 != "$host_cpu"; then
  7069. case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
  7070. yes,aix,yes) ;; # shared object as lib.so file only
  7071. yes,svr4,*) ;; # shared object as lib.so archive member only
  7072. yes,*) enable_static=no ;; # shared object in lib.a archive as well
  7073. esac
  7074. fi
  7075. ;;
  7076. esac
  7077. AC_MSG_RESULT([$enable_shared])
  7078. AC_MSG_CHECKING([whether to build static libraries])
  7079. # Make sure either enable_shared or enable_static is yes.
  7080. test yes = "$enable_shared" || enable_static=yes
  7081. AC_MSG_RESULT([$enable_static])
  7082. _LT_TAGVAR(GCC, $1)=$G77
  7083. _LT_TAGVAR(LD, $1)=$LD
  7084. ## CAVEAT EMPTOR:
  7085. ## There is no encapsulation within the following macros, do not change
  7086. ## the running order or otherwise move them around unless you know exactly
  7087. ## what you are doing...
  7088. _LT_COMPILER_PIC($1)
  7089. _LT_COMPILER_C_O($1)
  7090. _LT_COMPILER_FILE_LOCKS($1)
  7091. _LT_LINKER_SHLIBS($1)
  7092. _LT_SYS_DYNAMIC_LINKER($1)
  7093. _LT_LINKER_HARDCODE_LIBPATH($1)
  7094. _LT_CONFIG($1)
  7095. fi # test -n "$compiler"
  7096. GCC=$lt_save_GCC
  7097. CC=$lt_save_CC
  7098. CFLAGS=$lt_save_CFLAGS
  7099. fi # test yes != "$_lt_disable_F77"
  7100. AC_LANG_POP
  7101. ])# _LT_LANG_F77_CONFIG
  7102. # _LT_LANG_FC_CONFIG([TAG])
  7103. # -------------------------
  7104. # Ensure that the configuration variables for a Fortran compiler are
  7105. # suitably defined. These variables are subsequently used by _LT_CONFIG
  7106. # to write the compiler configuration to 'libtool'.
  7107. m4_defun([_LT_LANG_FC_CONFIG],
  7108. [AC_LANG_PUSH(Fortran)
  7109. if test -z "$FC" || test no = "$FC"; then
  7110. _lt_disable_FC=yes
  7111. fi
  7112. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7113. _LT_TAGVAR(allow_undefined_flag, $1)=
  7114. _LT_TAGVAR(always_export_symbols, $1)=no
  7115. _LT_TAGVAR(archive_expsym_cmds, $1)=
  7116. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  7117. _LT_TAGVAR(hardcode_direct, $1)=no
  7118. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  7119. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  7120. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  7121. _LT_TAGVAR(hardcode_minus_L, $1)=no
  7122. _LT_TAGVAR(hardcode_automatic, $1)=no
  7123. _LT_TAGVAR(inherit_rpath, $1)=no
  7124. _LT_TAGVAR(module_cmds, $1)=
  7125. _LT_TAGVAR(module_expsym_cmds, $1)=
  7126. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  7127. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7128. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  7129. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  7130. _LT_TAGVAR(no_undefined_flag, $1)=
  7131. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  7132. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  7133. # Source file extension for fc test sources.
  7134. ac_ext=${ac_fc_srcext-f}
  7135. # Object file extension for compiled fc test sources.
  7136. objext=o
  7137. _LT_TAGVAR(objext, $1)=$objext
  7138. # No sense in running all these tests if we already determined that
  7139. # the FC compiler isn't working. Some variables (like enable_shared)
  7140. # are currently assumed to apply to all compilers on this platform,
  7141. # and will be corrupted by setting them based on a non-working compiler.
  7142. if test yes != "$_lt_disable_FC"; then
  7143. # Code to be used in simple compile tests
  7144. lt_simple_compile_test_code="\
  7145. subroutine t
  7146. return
  7147. end
  7148. "
  7149. # Code to be used in simple link tests
  7150. lt_simple_link_test_code="\
  7151. program t
  7152. end
  7153. "
  7154. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7155. _LT_TAG_COMPILER
  7156. # save warnings/boilerplate of simple test code
  7157. _LT_COMPILER_BOILERPLATE
  7158. _LT_LINKER_BOILERPLATE
  7159. # Allow CC to be a program name with arguments.
  7160. lt_save_CC=$CC
  7161. lt_save_GCC=$GCC
  7162. lt_save_CFLAGS=$CFLAGS
  7163. CC=${FC-"f95"}
  7164. CFLAGS=$FCFLAGS
  7165. compiler=$CC
  7166. GCC=$ac_cv_fc_compiler_gnu
  7167. _LT_TAGVAR(compiler, $1)=$CC
  7168. _LT_CC_BASENAME([$compiler])
  7169. if test -n "$compiler"; then
  7170. AC_MSG_CHECKING([if libtool supports shared libraries])
  7171. AC_MSG_RESULT([$can_build_shared])
  7172. AC_MSG_CHECKING([whether to build shared libraries])
  7173. test no = "$can_build_shared" && enable_shared=no
  7174. # On AIX, shared libraries and static libraries use the same namespace, and
  7175. # are all built from PIC.
  7176. case $host_os in
  7177. aix3*)
  7178. test yes = "$enable_shared" && enable_static=no
  7179. if test -n "$RANLIB"; then
  7180. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  7181. postinstall_cmds='$RANLIB $lib'
  7182. fi
  7183. ;;
  7184. aix[[4-9]]*)
  7185. if test ia64 != "$host_cpu"; then
  7186. case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
  7187. yes,aix,yes) ;; # shared object as lib.so file only
  7188. yes,svr4,*) ;; # shared object as lib.so archive member only
  7189. yes,*) enable_static=no ;; # shared object in lib.a archive as well
  7190. esac
  7191. fi
  7192. ;;
  7193. esac
  7194. AC_MSG_RESULT([$enable_shared])
  7195. AC_MSG_CHECKING([whether to build static libraries])
  7196. # Make sure either enable_shared or enable_static is yes.
  7197. test yes = "$enable_shared" || enable_static=yes
  7198. AC_MSG_RESULT([$enable_static])
  7199. _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
  7200. _LT_TAGVAR(LD, $1)=$LD
  7201. ## CAVEAT EMPTOR:
  7202. ## There is no encapsulation within the following macros, do not change
  7203. ## the running order or otherwise move them around unless you know exactly
  7204. ## what you are doing...
  7205. _LT_SYS_HIDDEN_LIBDEPS($1)
  7206. _LT_COMPILER_PIC($1)
  7207. _LT_COMPILER_C_O($1)
  7208. _LT_COMPILER_FILE_LOCKS($1)
  7209. _LT_LINKER_SHLIBS($1)
  7210. _LT_SYS_DYNAMIC_LINKER($1)
  7211. _LT_LINKER_HARDCODE_LIBPATH($1)
  7212. _LT_CONFIG($1)
  7213. fi # test -n "$compiler"
  7214. GCC=$lt_save_GCC
  7215. CC=$lt_save_CC
  7216. CFLAGS=$lt_save_CFLAGS
  7217. fi # test yes != "$_lt_disable_FC"
  7218. AC_LANG_POP
  7219. ])# _LT_LANG_FC_CONFIG
  7220. # _LT_LANG_GCJ_CONFIG([TAG])
  7221. # --------------------------
  7222. # Ensure that the configuration variables for the GNU Java Compiler compiler
  7223. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  7224. # to write the compiler configuration to 'libtool'.
  7225. m4_defun([_LT_LANG_GCJ_CONFIG],
  7226. [AC_REQUIRE([LT_PROG_GCJ])dnl
  7227. AC_LANG_SAVE
  7228. # Source file extension for Java test sources.
  7229. ac_ext=java
  7230. # Object file extension for compiled Java test sources.
  7231. objext=o
  7232. _LT_TAGVAR(objext, $1)=$objext
  7233. # Code to be used in simple compile tests
  7234. lt_simple_compile_test_code="class foo {}"
  7235. # Code to be used in simple link tests
  7236. lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
  7237. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7238. _LT_TAG_COMPILER
  7239. # save warnings/boilerplate of simple test code
  7240. _LT_COMPILER_BOILERPLATE
  7241. _LT_LINKER_BOILERPLATE
  7242. # Allow CC to be a program name with arguments.
  7243. lt_save_CC=$CC
  7244. lt_save_CFLAGS=$CFLAGS
  7245. lt_save_GCC=$GCC
  7246. GCC=yes
  7247. CC=${GCJ-"gcj"}
  7248. CFLAGS=$GCJFLAGS
  7249. compiler=$CC
  7250. _LT_TAGVAR(compiler, $1)=$CC
  7251. _LT_TAGVAR(LD, $1)=$LD
  7252. _LT_CC_BASENAME([$compiler])
  7253. # GCJ did not exist at the time GCC didn't implicitly link libc in.
  7254. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7255. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7256. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  7257. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  7258. ## CAVEAT EMPTOR:
  7259. ## There is no encapsulation within the following macros, do not change
  7260. ## the running order or otherwise move them around unless you know exactly
  7261. ## what you are doing...
  7262. if test -n "$compiler"; then
  7263. _LT_COMPILER_NO_RTTI($1)
  7264. _LT_COMPILER_PIC($1)
  7265. _LT_COMPILER_C_O($1)
  7266. _LT_COMPILER_FILE_LOCKS($1)
  7267. _LT_LINKER_SHLIBS($1)
  7268. _LT_LINKER_HARDCODE_LIBPATH($1)
  7269. _LT_CONFIG($1)
  7270. fi
  7271. AC_LANG_RESTORE
  7272. GCC=$lt_save_GCC
  7273. CC=$lt_save_CC
  7274. CFLAGS=$lt_save_CFLAGS
  7275. ])# _LT_LANG_GCJ_CONFIG
  7276. # _LT_LANG_GO_CONFIG([TAG])
  7277. # --------------------------
  7278. # Ensure that the configuration variables for the GNU Go compiler
  7279. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  7280. # to write the compiler configuration to 'libtool'.
  7281. m4_defun([_LT_LANG_GO_CONFIG],
  7282. [AC_REQUIRE([LT_PROG_GO])dnl
  7283. AC_LANG_SAVE
  7284. # Source file extension for Go test sources.
  7285. ac_ext=go
  7286. # Object file extension for compiled Go test sources.
  7287. objext=o
  7288. _LT_TAGVAR(objext, $1)=$objext
  7289. # Code to be used in simple compile tests
  7290. lt_simple_compile_test_code="package main; func main() { }"
  7291. # Code to be used in simple link tests
  7292. lt_simple_link_test_code='package main; func main() { }'
  7293. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7294. _LT_TAG_COMPILER
  7295. # save warnings/boilerplate of simple test code
  7296. _LT_COMPILER_BOILERPLATE
  7297. _LT_LINKER_BOILERPLATE
  7298. # Allow CC to be a program name with arguments.
  7299. lt_save_CC=$CC
  7300. lt_save_CFLAGS=$CFLAGS
  7301. lt_save_GCC=$GCC
  7302. GCC=yes
  7303. CC=${GOC-"gccgo"}
  7304. CFLAGS=$GOFLAGS
  7305. compiler=$CC
  7306. _LT_TAGVAR(compiler, $1)=$CC
  7307. _LT_TAGVAR(LD, $1)=$LD
  7308. _LT_CC_BASENAME([$compiler])
  7309. # Go did not exist at the time GCC didn't implicitly link libc in.
  7310. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7311. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7312. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  7313. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  7314. ## CAVEAT EMPTOR:
  7315. ## There is no encapsulation within the following macros, do not change
  7316. ## the running order or otherwise move them around unless you know exactly
  7317. ## what you are doing...
  7318. if test -n "$compiler"; then
  7319. _LT_COMPILER_NO_RTTI($1)
  7320. _LT_COMPILER_PIC($1)
  7321. _LT_COMPILER_C_O($1)
  7322. _LT_COMPILER_FILE_LOCKS($1)
  7323. _LT_LINKER_SHLIBS($1)
  7324. _LT_LINKER_HARDCODE_LIBPATH($1)
  7325. _LT_CONFIG($1)
  7326. fi
  7327. AC_LANG_RESTORE
  7328. GCC=$lt_save_GCC
  7329. CC=$lt_save_CC
  7330. CFLAGS=$lt_save_CFLAGS
  7331. ])# _LT_LANG_GO_CONFIG
  7332. # _LT_LANG_RC_CONFIG([TAG])
  7333. # -------------------------
  7334. # Ensure that the configuration variables for the Windows resource compiler
  7335. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  7336. # to write the compiler configuration to 'libtool'.
  7337. m4_defun([_LT_LANG_RC_CONFIG],
  7338. [AC_REQUIRE([LT_PROG_RC])dnl
  7339. AC_LANG_SAVE
  7340. # Source file extension for RC test sources.
  7341. ac_ext=rc
  7342. # Object file extension for compiled RC test sources.
  7343. objext=o
  7344. _LT_TAGVAR(objext, $1)=$objext
  7345. # Code to be used in simple compile tests
  7346. lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
  7347. # Code to be used in simple link tests
  7348. lt_simple_link_test_code=$lt_simple_compile_test_code
  7349. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7350. _LT_TAG_COMPILER
  7351. # save warnings/boilerplate of simple test code
  7352. _LT_COMPILER_BOILERPLATE
  7353. _LT_LINKER_BOILERPLATE
  7354. # Allow CC to be a program name with arguments.
  7355. lt_save_CC=$CC
  7356. lt_save_CFLAGS=$CFLAGS
  7357. lt_save_GCC=$GCC
  7358. GCC=
  7359. CC=${RC-"windres"}
  7360. CFLAGS=
  7361. compiler=$CC
  7362. _LT_TAGVAR(compiler, $1)=$CC
  7363. _LT_CC_BASENAME([$compiler])
  7364. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  7365. if test -n "$compiler"; then
  7366. :
  7367. _LT_CONFIG($1)
  7368. fi
  7369. GCC=$lt_save_GCC
  7370. AC_LANG_RESTORE
  7371. CC=$lt_save_CC
  7372. CFLAGS=$lt_save_CFLAGS
  7373. ])# _LT_LANG_RC_CONFIG
  7374. # LT_PROG_GCJ
  7375. # -----------
  7376. AC_DEFUN([LT_PROG_GCJ],
  7377. [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
  7378. [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
  7379. [AC_CHECK_TOOL(GCJ, gcj,)
  7380. test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
  7381. AC_SUBST(GCJFLAGS)])])[]dnl
  7382. ])
  7383. # Old name:
  7384. AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
  7385. dnl aclocal-1.4 backwards compatibility:
  7386. dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
  7387. # LT_PROG_GO
  7388. # ----------
  7389. AC_DEFUN([LT_PROG_GO],
  7390. [AC_CHECK_TOOL(GOC, gccgo,)
  7391. ])
  7392. # LT_PROG_RC
  7393. # ----------
  7394. AC_DEFUN([LT_PROG_RC],
  7395. [AC_CHECK_TOOL(RC, windres,)
  7396. ])
  7397. # Old name:
  7398. AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
  7399. dnl aclocal-1.4 backwards compatibility:
  7400. dnl AC_DEFUN([LT_AC_PROG_RC], [])
  7401. # _LT_DECL_EGREP
  7402. # --------------
  7403. # If we don't have a new enough Autoconf to choose the best grep
  7404. # available, choose the one first in the user's PATH.
  7405. m4_defun([_LT_DECL_EGREP],
  7406. [AC_REQUIRE([AC_PROG_EGREP])dnl
  7407. AC_REQUIRE([AC_PROG_FGREP])dnl
  7408. test -z "$GREP" && GREP=grep
  7409. _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
  7410. _LT_DECL([], [EGREP], [1], [An ERE matcher])
  7411. _LT_DECL([], [FGREP], [1], [A literal string matcher])
  7412. dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
  7413. AC_SUBST([GREP])
  7414. ])
  7415. # _LT_DECL_OBJDUMP
  7416. # --------------
  7417. # If we don't have a new enough Autoconf to choose the best objdump
  7418. # available, choose the one first in the user's PATH.
  7419. m4_defun([_LT_DECL_OBJDUMP],
  7420. [AC_CHECK_TOOL(OBJDUMP, objdump, false)
  7421. test -z "$OBJDUMP" && OBJDUMP=objdump
  7422. _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
  7423. AC_SUBST([OBJDUMP])
  7424. ])
  7425. # _LT_DECL_DLLTOOL
  7426. # ----------------
  7427. # Ensure DLLTOOL variable is set.
  7428. m4_defun([_LT_DECL_DLLTOOL],
  7429. [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  7430. test -z "$DLLTOOL" && DLLTOOL=dlltool
  7431. _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
  7432. AC_SUBST([DLLTOOL])
  7433. ])
  7434. # _LT_DECL_SED
  7435. # ------------
  7436. # Check for a fully-functional sed program, that truncates
  7437. # as few characters as possible. Prefer GNU sed if found.
  7438. m4_defun([_LT_DECL_SED],
  7439. [AC_PROG_SED
  7440. test -z "$SED" && SED=sed
  7441. Xsed="$SED -e 1s/^X//"
  7442. _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
  7443. _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
  7444. [Sed that helps us avoid accidentally triggering echo(1) options like -n])
  7445. ])# _LT_DECL_SED
  7446. m4_ifndef([AC_PROG_SED], [
  7447. ############################################################
  7448. # NOTE: This macro has been submitted for inclusion into #
  7449. # GNU Autoconf as AC_PROG_SED. When it is available in #
  7450. # a released version of Autoconf we should remove this #
  7451. # macro and use it instead. #
  7452. ############################################################
  7453. m4_defun([AC_PROG_SED],
  7454. [AC_MSG_CHECKING([for a sed that does not truncate output])
  7455. AC_CACHE_VAL(lt_cv_path_SED,
  7456. [# Loop through the user's path and test for sed and gsed.
  7457. # Then use that list of sed's as ones to test for truncation.
  7458. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  7459. for as_dir in $PATH
  7460. do
  7461. IFS=$as_save_IFS
  7462. test -z "$as_dir" && as_dir=.
  7463. for lt_ac_prog in sed gsed; do
  7464. for ac_exec_ext in '' $ac_executable_extensions; do
  7465. if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
  7466. lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
  7467. fi
  7468. done
  7469. done
  7470. done
  7471. IFS=$as_save_IFS
  7472. lt_ac_max=0
  7473. lt_ac_count=0
  7474. # Add /usr/xpg4/bin/sed as it is typically found on Solaris
  7475. # along with /bin/sed that truncates output.
  7476. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
  7477. test ! -f "$lt_ac_sed" && continue
  7478. cat /dev/null > conftest.in
  7479. lt_ac_count=0
  7480. echo $ECHO_N "0123456789$ECHO_C" >conftest.in
  7481. # Check for GNU sed and select it if it is found.
  7482. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
  7483. lt_cv_path_SED=$lt_ac_sed
  7484. break
  7485. fi
  7486. while true; do
  7487. cat conftest.in conftest.in >conftest.tmp
  7488. mv conftest.tmp conftest.in
  7489. cp conftest.in conftest.nl
  7490. echo >>conftest.nl
  7491. $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
  7492. cmp -s conftest.out conftest.nl || break
  7493. # 10000 chars as input seems more than enough
  7494. test 10 -lt "$lt_ac_count" && break
  7495. lt_ac_count=`expr $lt_ac_count + 1`
  7496. if test "$lt_ac_count" -gt "$lt_ac_max"; then
  7497. lt_ac_max=$lt_ac_count
  7498. lt_cv_path_SED=$lt_ac_sed
  7499. fi
  7500. done
  7501. done
  7502. ])
  7503. SED=$lt_cv_path_SED
  7504. AC_SUBST([SED])
  7505. AC_MSG_RESULT([$SED])
  7506. ])#AC_PROG_SED
  7507. ])#m4_ifndef
  7508. # Old name:
  7509. AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
  7510. dnl aclocal-1.4 backwards compatibility:
  7511. dnl AC_DEFUN([LT_AC_PROG_SED], [])
  7512. # _LT_CHECK_SHELL_FEATURES
  7513. # ------------------------
  7514. # Find out whether the shell is Bourne or XSI compatible,
  7515. # or has some other useful features.
  7516. m4_defun([_LT_CHECK_SHELL_FEATURES],
  7517. [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
  7518. lt_unset=unset
  7519. else
  7520. lt_unset=false
  7521. fi
  7522. _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
  7523. # test EBCDIC or ASCII
  7524. case `echo X|tr X '\101'` in
  7525. A) # ASCII based system
  7526. # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
  7527. lt_SP2NL='tr \040 \012'
  7528. lt_NL2SP='tr \015\012 \040\040'
  7529. ;;
  7530. *) # EBCDIC based system
  7531. lt_SP2NL='tr \100 \n'
  7532. lt_NL2SP='tr \r\n \100\100'
  7533. ;;
  7534. esac
  7535. _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
  7536. _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
  7537. ])# _LT_CHECK_SHELL_FEATURES
  7538. # _LT_PATH_CONVERSION_FUNCTIONS
  7539. # -----------------------------
  7540. # Determine what file name conversion functions should be used by
  7541. # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
  7542. # for certain cross-compile configurations and native mingw.
  7543. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
  7544. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  7545. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  7546. AC_MSG_CHECKING([how to convert $build file names to $host format])
  7547. AC_CACHE_VAL(lt_cv_to_host_file_cmd,
  7548. [case $host in
  7549. *-*-mingw* )
  7550. case $build in
  7551. *-*-mingw* ) # actually msys
  7552. lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
  7553. ;;
  7554. *-*-cygwin* )
  7555. lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
  7556. ;;
  7557. * ) # otherwise, assume *nix
  7558. lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
  7559. ;;
  7560. esac
  7561. ;;
  7562. *-*-cygwin* )
  7563. case $build in
  7564. *-*-mingw* ) # actually msys
  7565. lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
  7566. ;;
  7567. *-*-cygwin* )
  7568. lt_cv_to_host_file_cmd=func_convert_file_noop
  7569. ;;
  7570. * ) # otherwise, assume *nix
  7571. lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
  7572. ;;
  7573. esac
  7574. ;;
  7575. * ) # unhandled hosts (and "normal" native builds)
  7576. lt_cv_to_host_file_cmd=func_convert_file_noop
  7577. ;;
  7578. esac
  7579. ])
  7580. to_host_file_cmd=$lt_cv_to_host_file_cmd
  7581. AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
  7582. _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
  7583. [0], [convert $build file names to $host format])dnl
  7584. AC_MSG_CHECKING([how to convert $build file names to toolchain format])
  7585. AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
  7586. [#assume ordinary cross tools, or native build.
  7587. lt_cv_to_tool_file_cmd=func_convert_file_noop
  7588. case $host in
  7589. *-*-mingw* )
  7590. case $build in
  7591. *-*-mingw* ) # actually msys
  7592. lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
  7593. ;;
  7594. esac
  7595. ;;
  7596. esac
  7597. ])
  7598. to_tool_file_cmd=$lt_cv_to_tool_file_cmd
  7599. AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
  7600. _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
  7601. [0], [convert $build files to toolchain format])dnl
  7602. ])# _LT_PATH_CONVERSION_FUNCTIONS