1
0

libtool.m4 305 KB

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