1
0

libtool.m4 299 KB

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