libtool.m4 304 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501
  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 <[email protected]>."
  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*|powerpc64le-*linux*)
  1264. LD="${LD-ld} -m elf64lppc"
  1265. ;;
  1266. powerpc-*linux*|powerpc64-*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$versuffix$shared_ext $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 .bundle || 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. # Handle Gentoo/FreeBSD as it was Linux
  2439. case $host_vendor in
  2440. gentoo)
  2441. version_type=linux ;;
  2442. *)
  2443. version_type=freebsd-$objformat ;;
  2444. esac
  2445. case $version_type in
  2446. freebsd-elf*)
  2447. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2448. soname_spec='$libname$release$shared_ext$major'
  2449. need_version=no
  2450. need_lib_prefix=no
  2451. ;;
  2452. freebsd-*)
  2453. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  2454. need_version=yes
  2455. ;;
  2456. linux)
  2457. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  2458. soname_spec='${libname}${release}${shared_ext}$major'
  2459. need_lib_prefix=no
  2460. need_version=no
  2461. ;;
  2462. esac
  2463. case $host_cpu in
  2464. powerpc64)
  2465. # On FreeBSD bi-arch platforms, a different variable is used for 32-bit
  2466. # binaries. See <https://man.freebsd.org/cgi/man.cgi?query=ld.so>.
  2467. AC_COMPILE_IFELSE(
  2468. [AC_LANG_SOURCE(
  2469. [[int test_pointer_size[sizeof (void *) - 5];
  2470. ]])],
  2471. [shlibpath_var=LD_LIBRARY_PATH],
  2472. [shlibpath_var=LD_32_LIBRARY_PATH])
  2473. ;;
  2474. *)
  2475. shlibpath_var=LD_LIBRARY_PATH
  2476. ;;
  2477. esac
  2478. case $host_os in
  2479. freebsd2.*)
  2480. shlibpath_overrides_runpath=yes
  2481. ;;
  2482. freebsd3.[[01]]* | freebsdelf3.[[01]]*)
  2483. shlibpath_overrides_runpath=yes
  2484. hardcode_into_libs=yes
  2485. ;;
  2486. freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
  2487. freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
  2488. shlibpath_overrides_runpath=no
  2489. hardcode_into_libs=yes
  2490. ;;
  2491. *) # from 4.6 on, and DragonFly
  2492. shlibpath_overrides_runpath=yes
  2493. hardcode_into_libs=yes
  2494. ;;
  2495. esac
  2496. ;;
  2497. haiku*)
  2498. version_type=linux # correct to gnu/linux during the next big refactor
  2499. need_lib_prefix=no
  2500. need_version=no
  2501. dynamic_linker="$host_os runtime_loader"
  2502. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2503. soname_spec='$libname$release$shared_ext$major'
  2504. shlibpath_var=LIBRARY_PATH
  2505. shlibpath_overrides_runpath=no
  2506. sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib'
  2507. sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib'
  2508. hardcode_into_libs=no
  2509. ;;
  2510. hpux9* | hpux10* | hpux11*)
  2511. # Give a soname corresponding to the major version so that dld.sl refuses to
  2512. # link against other versions.
  2513. version_type=sunos
  2514. need_lib_prefix=no
  2515. need_version=no
  2516. case $host_cpu in
  2517. ia64*)
  2518. shrext_cmds='.so'
  2519. hardcode_into_libs=yes
  2520. dynamic_linker="$host_os dld.so"
  2521. shlibpath_var=LD_LIBRARY_PATH
  2522. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  2523. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2524. soname_spec='$libname$release$shared_ext$major'
  2525. if test 32 = "$HPUX_IA64_MODE"; then
  2526. sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
  2527. sys_lib_dlsearch_path_spec=/usr/lib/hpux32
  2528. else
  2529. sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
  2530. sys_lib_dlsearch_path_spec=/usr/lib/hpux64
  2531. fi
  2532. ;;
  2533. hppa*64*)
  2534. shrext_cmds='.sl'
  2535. hardcode_into_libs=yes
  2536. dynamic_linker="$host_os dld.sl"
  2537. shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
  2538. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  2539. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2540. soname_spec='$libname$release$shared_ext$major'
  2541. sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
  2542. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2543. ;;
  2544. *)
  2545. shrext_cmds='.sl'
  2546. dynamic_linker="$host_os dld.sl"
  2547. shlibpath_var=SHLIB_PATH
  2548. shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  2549. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2550. soname_spec='$libname$release$shared_ext$major'
  2551. ;;
  2552. esac
  2553. # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
  2554. postinstall_cmds='chmod 555 $lib'
  2555. # or fails outright, so override atomically:
  2556. install_override_mode=555
  2557. ;;
  2558. interix[[3-9]]*)
  2559. version_type=linux # correct to gnu/linux during the next big refactor
  2560. need_lib_prefix=no
  2561. need_version=no
  2562. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2563. soname_spec='$libname$release$shared_ext$major'
  2564. dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
  2565. shlibpath_var=LD_LIBRARY_PATH
  2566. shlibpath_overrides_runpath=no
  2567. hardcode_into_libs=yes
  2568. ;;
  2569. irix5* | irix6* | nonstopux*)
  2570. case $host_os in
  2571. nonstopux*) version_type=nonstopux ;;
  2572. *)
  2573. if test yes = "$lt_cv_prog_gnu_ld"; then
  2574. version_type=linux # correct to gnu/linux during the next big refactor
  2575. else
  2576. version_type=irix
  2577. fi ;;
  2578. esac
  2579. need_lib_prefix=no
  2580. need_version=no
  2581. soname_spec='$libname$release$shared_ext$major'
  2582. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
  2583. case $host_os in
  2584. irix5* | nonstopux*)
  2585. libsuff= shlibsuff=
  2586. ;;
  2587. *)
  2588. case $LD in # libtool.m4 will add one of these switches to LD
  2589. *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
  2590. libsuff= shlibsuff= libmagic=32-bit;;
  2591. *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
  2592. libsuff=32 shlibsuff=N32 libmagic=N32;;
  2593. *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
  2594. libsuff=64 shlibsuff=64 libmagic=64-bit;;
  2595. *) libsuff= shlibsuff= libmagic=never-match;;
  2596. esac
  2597. ;;
  2598. esac
  2599. shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  2600. shlibpath_overrides_runpath=no
  2601. sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
  2602. sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
  2603. hardcode_into_libs=yes
  2604. ;;
  2605. # No shared lib support for Linux oldld, aout, or coff.
  2606. linux*oldld* | linux*aout* | linux*coff*)
  2607. dynamic_linker=no
  2608. ;;
  2609. linux*android*)
  2610. version_type=none # Android doesn't support versioned libraries.
  2611. need_lib_prefix=no
  2612. need_version=no
  2613. library_names_spec='$libname$release$shared_ext $libname$shared_ext'
  2614. soname_spec='$libname$release$shared_ext'
  2615. finish_cmds=
  2616. shlibpath_var=LD_LIBRARY_PATH
  2617. shlibpath_overrides_runpath=yes
  2618. # This implies no fast_install, which is unacceptable.
  2619. # Some rework will be needed to allow for fast_install
  2620. # before this can be enabled.
  2621. hardcode_into_libs=yes
  2622. dynamic_linker='Android linker'
  2623. # -rpath works at least for libraries that are not overridden by
  2624. # libraries installed in system locations.
  2625. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  2626. ;;
  2627. # This must be glibc/ELF.
  2628. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  2629. version_type=linux # correct to gnu/linux during the next big refactor
  2630. need_lib_prefix=no
  2631. need_version=no
  2632. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2633. soname_spec='$libname$release$shared_ext$major'
  2634. finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  2635. shlibpath_var=LD_LIBRARY_PATH
  2636. shlibpath_overrides_runpath=no
  2637. # Some binutils ld are patched to set DT_RUNPATH
  2638. AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
  2639. [lt_cv_shlibpath_overrides_runpath=no
  2640. save_LDFLAGS=$LDFLAGS
  2641. save_libdir=$libdir
  2642. eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
  2643. LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
  2644. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  2645. [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
  2646. [lt_cv_shlibpath_overrides_runpath=yes])])
  2647. LDFLAGS=$save_LDFLAGS
  2648. libdir=$save_libdir
  2649. ])
  2650. shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
  2651. # This implies no fast_install, which is unacceptable.
  2652. # Some rework will be needed to allow for fast_install
  2653. # before this can be enabled.
  2654. hardcode_into_libs=yes
  2655. # Ideally, we could use ldconfig to report *all* directories which are
  2656. # searched for libraries, however this is still not possible. Aside from not
  2657. # being certain /sbin/ldconfig is available, command
  2658. # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
  2659. # even though it is searched at run-time. Try to do the best guess by
  2660. # appending ld.so.conf contents (and includes) to the search path.
  2661. if test -f /etc/ld.so.conf; then
  2662. 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' ' '`
  2663. sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
  2664. fi
  2665. # We used to test for /lib/ld.so.1 and disable shared libraries on
  2666. # powerpc, because MkLinux only supported shared libraries with the
  2667. # GNU dynamic linker. Since this was broken with cross compilers,
  2668. # most powerpc-linux boxes support dynamic linking these days and
  2669. # people can always --disable-shared, the test was removed, and we
  2670. # assume the GNU/Linux dynamic linker is in use.
  2671. dynamic_linker='GNU/Linux ld.so'
  2672. ;;
  2673. netbsdelf*-gnu)
  2674. version_type=linux
  2675. need_lib_prefix=no
  2676. need_version=no
  2677. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2678. soname_spec='$libname$release$shared_ext$major'
  2679. shlibpath_var=LD_LIBRARY_PATH
  2680. shlibpath_overrides_runpath=no
  2681. hardcode_into_libs=yes
  2682. dynamic_linker='NetBSD ld.elf_so'
  2683. ;;
  2684. netbsd*)
  2685. version_type=sunos
  2686. need_lib_prefix=no
  2687. need_version=no
  2688. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  2689. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  2690. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2691. dynamic_linker='NetBSD (a.out) ld.so'
  2692. else
  2693. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2694. soname_spec='$libname$release$shared_ext$major'
  2695. dynamic_linker='NetBSD ld.elf_so'
  2696. fi
  2697. shlibpath_var=LD_LIBRARY_PATH
  2698. shlibpath_overrides_runpath=yes
  2699. hardcode_into_libs=yes
  2700. ;;
  2701. *-mlibc)
  2702. version_type=linux # correct to gnu/linux during the next big refactor
  2703. need_lib_prefix=no
  2704. need_version=no
  2705. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2706. soname_spec='$libname$release$shared_ext$major'
  2707. dynamic_linker='mlibc ld.so'
  2708. shlibpath_var=LD_LIBRARY_PATH
  2709. shlibpath_overrides_runpath=no
  2710. hardcode_into_libs=yes
  2711. ;;
  2712. newsos6)
  2713. version_type=linux # correct to gnu/linux during the next big refactor
  2714. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2715. shlibpath_var=LD_LIBRARY_PATH
  2716. shlibpath_overrides_runpath=yes
  2717. ;;
  2718. *nto* | *qnx*)
  2719. version_type=qnx
  2720. need_lib_prefix=no
  2721. need_version=no
  2722. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2723. soname_spec='$libname$release$shared_ext$major'
  2724. shlibpath_var=LD_LIBRARY_PATH
  2725. shlibpath_overrides_runpath=no
  2726. hardcode_into_libs=yes
  2727. dynamic_linker='ldqnx.so'
  2728. ;;
  2729. openbsd*)
  2730. version_type=sunos
  2731. sys_lib_dlsearch_path_spec=/usr/lib
  2732. need_lib_prefix=no
  2733. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
  2734. need_version=no
  2735. else
  2736. need_version=yes
  2737. fi
  2738. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  2739. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2740. shlibpath_var=LD_LIBRARY_PATH
  2741. shlibpath_overrides_runpath=yes
  2742. ;;
  2743. os2*)
  2744. libname_spec='$name'
  2745. version_type=windows
  2746. shrext_cmds=.dll
  2747. need_version=no
  2748. need_lib_prefix=no
  2749. # OS/2 can only load a DLL with a base name of 8 characters or less.
  2750. soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
  2751. v=$($ECHO $release$versuffix | tr -d .-);
  2752. n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
  2753. $ECHO $n$v`$shared_ext'
  2754. library_names_spec='${libname}_dll.$libext'
  2755. dynamic_linker='OS/2 ld.exe'
  2756. shlibpath_var=BEGINLIBPATH
  2757. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  2758. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2759. postinstall_cmds='base_file=`basename \$file`~
  2760. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
  2761. dldir=$destdir/`dirname \$dlpath`~
  2762. test -d \$dldir || mkdir -p \$dldir~
  2763. $install_prog $dir/$dlname \$dldir/$dlname~
  2764. chmod a+x \$dldir/$dlname~
  2765. if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
  2766. eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
  2767. fi'
  2768. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
  2769. dlpath=$dir/\$dldll~
  2770. $RM \$dlpath'
  2771. ;;
  2772. osf3* | osf4* | osf5*)
  2773. version_type=osf
  2774. need_lib_prefix=no
  2775. need_version=no
  2776. soname_spec='$libname$release$shared_ext$major'
  2777. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2778. shlibpath_var=LD_LIBRARY_PATH
  2779. sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  2780. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2781. ;;
  2782. rdos*)
  2783. dynamic_linker=no
  2784. ;;
  2785. serenity*)
  2786. version_type=linux # correct to gnu/linux during the next big refactor
  2787. need_lib_prefix=no
  2788. need_version=no
  2789. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2790. soname_spec='$libname$release$shared_ext$major'
  2791. shlibpath_var=LD_LIBRARY_PATH
  2792. shlibpath_overrides_runpath=no
  2793. dynamic_linker='SerenityOS LibELF'
  2794. ;;
  2795. solaris*)
  2796. version_type=linux # correct to gnu/linux during the next big refactor
  2797. need_lib_prefix=no
  2798. need_version=no
  2799. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2800. soname_spec='$libname$release$shared_ext$major'
  2801. shlibpath_var=LD_LIBRARY_PATH
  2802. shlibpath_overrides_runpath=yes
  2803. hardcode_into_libs=yes
  2804. # ldd complains unless libraries are executable
  2805. postinstall_cmds='chmod +x $lib'
  2806. ;;
  2807. sunos4*)
  2808. version_type=sunos
  2809. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  2810. finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  2811. shlibpath_var=LD_LIBRARY_PATH
  2812. shlibpath_overrides_runpath=yes
  2813. if test yes = "$with_gnu_ld"; then
  2814. need_lib_prefix=no
  2815. fi
  2816. need_version=yes
  2817. ;;
  2818. sysv4 | sysv4.3*)
  2819. version_type=linux # correct to gnu/linux during the next big refactor
  2820. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2821. soname_spec='$libname$release$shared_ext$major'
  2822. shlibpath_var=LD_LIBRARY_PATH
  2823. case $host_vendor in
  2824. sni)
  2825. shlibpath_overrides_runpath=no
  2826. need_lib_prefix=no
  2827. runpath_var=LD_RUN_PATH
  2828. ;;
  2829. siemens)
  2830. need_lib_prefix=no
  2831. ;;
  2832. motorola)
  2833. need_lib_prefix=no
  2834. need_version=no
  2835. shlibpath_overrides_runpath=no
  2836. sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  2837. ;;
  2838. esac
  2839. ;;
  2840. sysv4*MP*)
  2841. if test -d /usr/nec; then
  2842. version_type=linux # correct to gnu/linux during the next big refactor
  2843. library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
  2844. soname_spec='$libname$shared_ext.$major'
  2845. shlibpath_var=LD_LIBRARY_PATH
  2846. fi
  2847. ;;
  2848. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  2849. version_type=sco
  2850. need_lib_prefix=no
  2851. need_version=no
  2852. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
  2853. soname_spec='$libname$release$shared_ext$major'
  2854. shlibpath_var=LD_LIBRARY_PATH
  2855. shlibpath_overrides_runpath=yes
  2856. hardcode_into_libs=yes
  2857. if test yes = "$with_gnu_ld"; then
  2858. sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
  2859. else
  2860. sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
  2861. case $host_os in
  2862. sco3.2v5*)
  2863. sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
  2864. ;;
  2865. esac
  2866. fi
  2867. sys_lib_dlsearch_path_spec='/usr/lib'
  2868. ;;
  2869. tpf*)
  2870. # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
  2871. version_type=linux # correct to gnu/linux during the next big refactor
  2872. need_lib_prefix=no
  2873. need_version=no
  2874. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2875. shlibpath_var=LD_LIBRARY_PATH
  2876. shlibpath_overrides_runpath=no
  2877. hardcode_into_libs=yes
  2878. ;;
  2879. uts4*)
  2880. version_type=linux # correct to gnu/linux during the next big refactor
  2881. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2882. soname_spec='$libname$release$shared_ext$major'
  2883. shlibpath_var=LD_LIBRARY_PATH
  2884. ;;
  2885. emscripten*)
  2886. version_type=none
  2887. need_lib_prefix=no
  2888. need_version=no
  2889. library_names_spec='$libname$release$shared_ext'
  2890. soname_spec='$libname$release$shared_ext'
  2891. finish_cmds=
  2892. dynamic_linker="Emscripten linker"
  2893. _LT_COMPILER_PIC($1)='-fPIC'
  2894. _LT_TAGVAR(archive_cmds, $1)='$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib'
  2895. _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'
  2896. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  2897. _LT_TAGVAR(no_undefined_flag, $1)=
  2898. ;;
  2899. *)
  2900. dynamic_linker=no
  2901. ;;
  2902. esac
  2903. AC_MSG_RESULT([$dynamic_linker])
  2904. test no = "$dynamic_linker" && can_build_shared=no
  2905. variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  2906. if test yes = "$GCC"; then
  2907. variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  2908. fi
  2909. if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
  2910. sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
  2911. fi
  2912. if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
  2913. sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
  2914. fi
  2915. # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
  2916. configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
  2917. # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
  2918. func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
  2919. # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
  2920. configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
  2921. _LT_DECL([], [variables_saved_for_relink], [1],
  2922. [Variables whose values should be saved in libtool wrapper scripts and
  2923. restored at link time])
  2924. _LT_DECL([], [need_lib_prefix], [0],
  2925. [Do we need the "lib" prefix for modules?])
  2926. _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
  2927. _LT_DECL([], [version_type], [0], [Library versioning type])
  2928. _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
  2929. _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
  2930. _LT_DECL([], [shlibpath_overrides_runpath], [0],
  2931. [Is shlibpath searched before the hard-coded library search path?])
  2932. _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
  2933. _LT_DECL([], [library_names_spec], [1],
  2934. [[List of archive names. First name is the real one, the rest are links.
  2935. The last name is the one that the linker finds with -lNAME]])
  2936. _LT_DECL([], [soname_spec], [1],
  2937. [[The coded name of the library, if different from the real name]])
  2938. _LT_DECL([], [install_override_mode], [1],
  2939. [Permission mode override for installation of shared libraries])
  2940. _LT_DECL([], [postinstall_cmds], [2],
  2941. [Command to use after installation of a shared archive])
  2942. _LT_DECL([], [postuninstall_cmds], [2],
  2943. [Command to use after uninstallation of a shared archive])
  2944. _LT_DECL([], [finish_cmds], [2],
  2945. [Commands used to finish a libtool library installation in a directory])
  2946. _LT_DECL([], [finish_eval], [1],
  2947. [[As "finish_cmds", except a single script fragment to be evaled but
  2948. not shown]])
  2949. _LT_DECL([], [hardcode_into_libs], [0],
  2950. [Whether we should hardcode library paths into libraries])
  2951. _LT_DECL([], [sys_lib_search_path_spec], [2],
  2952. [Compile-time system search path for libraries])
  2953. _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
  2954. [Detected run-time system search path for libraries])
  2955. _LT_DECL([], [configure_time_lt_sys_library_path], [2],
  2956. [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
  2957. ])# _LT_SYS_DYNAMIC_LINKER
  2958. # _LT_PATH_TOOL_PREFIX(TOOL)
  2959. # --------------------------
  2960. # find a file program that can recognize shared library
  2961. AC_DEFUN([_LT_PATH_TOOL_PREFIX],
  2962. [m4_require([_LT_DECL_EGREP])dnl
  2963. AC_MSG_CHECKING([for $1])
  2964. AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
  2965. [case $MAGIC_CMD in
  2966. [[\\/*] | ?:[\\/]*])
  2967. lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
  2968. ;;
  2969. *)
  2970. lt_save_MAGIC_CMD=$MAGIC_CMD
  2971. lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
  2972. dnl $ac_dummy forces splitting on constant user-supplied paths.
  2973. dnl POSIX.2 word splitting is done only on the output of word expansions,
  2974. dnl not every word. This closes a longstanding sh security hole.
  2975. ac_dummy="m4_if([$2], , $PATH, [$2])"
  2976. for ac_dir in $ac_dummy; do
  2977. IFS=$lt_save_ifs
  2978. test -z "$ac_dir" && ac_dir=.
  2979. if test -f "$ac_dir/$1"; then
  2980. lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
  2981. if test -n "$file_magic_test_file"; then
  2982. case $deplibs_check_method in
  2983. "file_magic "*)
  2984. file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
  2985. MAGIC_CMD=$lt_cv_path_MAGIC_CMD
  2986. if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  2987. $EGREP "$file_magic_regex" > /dev/null; then
  2988. :
  2989. else
  2990. cat <<_LT_EOF 1>&2
  2991. *** Warning: the command libtool uses to detect shared libraries,
  2992. *** $file_magic_cmd, produces output that libtool cannot recognize.
  2993. *** The result is that libtool may fail to recognize shared libraries
  2994. *** as such. This will affect the creation of libtool libraries that
  2995. *** depend on shared libraries, but programs linked with such libtool
  2996. *** libraries will work regardless of this problem. Nevertheless, you
  2997. *** may want to report the problem to your system manager and/or to
  2998. *** [email protected]
  2999. _LT_EOF
  3000. fi ;;
  3001. esac
  3002. fi
  3003. break
  3004. fi
  3005. done
  3006. IFS=$lt_save_ifs
  3007. MAGIC_CMD=$lt_save_MAGIC_CMD
  3008. ;;
  3009. esac])
  3010. MAGIC_CMD=$lt_cv_path_MAGIC_CMD
  3011. if test -n "$MAGIC_CMD"; then
  3012. AC_MSG_RESULT($MAGIC_CMD)
  3013. else
  3014. AC_MSG_RESULT(no)
  3015. fi
  3016. _LT_DECL([], [MAGIC_CMD], [0],
  3017. [Used to examine libraries when file_magic_cmd begins with "file"])dnl
  3018. ])# _LT_PATH_TOOL_PREFIX
  3019. # Old name:
  3020. AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
  3021. dnl aclocal-1.4 backwards compatibility:
  3022. dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
  3023. # _LT_PATH_MAGIC
  3024. # --------------
  3025. # find a file program that can recognize a shared library
  3026. m4_defun([_LT_PATH_MAGIC],
  3027. [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
  3028. if test -z "$lt_cv_path_MAGIC_CMD"; then
  3029. if test -n "$ac_tool_prefix"; then
  3030. _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
  3031. else
  3032. MAGIC_CMD=:
  3033. fi
  3034. fi
  3035. ])# _LT_PATH_MAGIC
  3036. # LT_PATH_LD
  3037. # ----------
  3038. # find the pathname to the GNU or non-GNU linker
  3039. AC_DEFUN([LT_PATH_LD],
  3040. [AC_REQUIRE([AC_PROG_CC])dnl
  3041. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3042. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  3043. m4_require([_LT_DECL_SED])dnl
  3044. m4_require([_LT_DECL_EGREP])dnl
  3045. m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
  3046. AC_ARG_WITH([gnu-ld],
  3047. [AS_HELP_STRING([--with-gnu-ld],
  3048. [assume the C compiler uses GNU ld @<:@default=no@:>@])],
  3049. [test no = "$withval" || with_gnu_ld=yes],
  3050. [with_gnu_ld=no])dnl
  3051. ac_prog=ld
  3052. if test yes = "$GCC"; then
  3053. # Check if gcc -print-prog-name=ld gives a path.
  3054. AC_MSG_CHECKING([for ld used by $CC])
  3055. case $host in
  3056. *-*-mingw* | *-*-windows*)
  3057. # gcc leaves a trailing carriage return, which upsets mingw
  3058. ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  3059. *)
  3060. ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  3061. esac
  3062. case $ac_prog in
  3063. # Accept absolute paths.
  3064. [[\\/]]* | ?:[[\\/]]*)
  3065. re_direlt='/[[^/]][[^/]]*/\.\./'
  3066. # Canonicalize the pathname of ld
  3067. ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
  3068. while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
  3069. ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
  3070. done
  3071. test -z "$LD" && LD=$ac_prog
  3072. ;;
  3073. "")
  3074. # If it fails, then pretend we aren't using GCC.
  3075. ac_prog=ld
  3076. ;;
  3077. *)
  3078. # If it is relative, then search for the first ld in PATH.
  3079. with_gnu_ld=unknown
  3080. ;;
  3081. esac
  3082. elif test yes = "$with_gnu_ld"; then
  3083. AC_MSG_CHECKING([for GNU ld])
  3084. else
  3085. AC_MSG_CHECKING([for non-GNU ld])
  3086. fi
  3087. AC_CACHE_VAL(lt_cv_path_LD,
  3088. [if test -z "$LD"; then
  3089. lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
  3090. for ac_dir in $PATH; do
  3091. IFS=$lt_save_ifs
  3092. test -z "$ac_dir" && ac_dir=.
  3093. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  3094. lt_cv_path_LD=$ac_dir/$ac_prog
  3095. # Check to see if the program is GNU ld. I'd rather use --version,
  3096. # but apparently some variants of GNU ld only accept -v.
  3097. # Break only if it was the GNU/non-GNU ld that we prefer.
  3098. case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
  3099. *GNU* | *'with BFD'*)
  3100. test no != "$with_gnu_ld" && break
  3101. ;;
  3102. *)
  3103. test yes != "$with_gnu_ld" && break
  3104. ;;
  3105. esac
  3106. fi
  3107. done
  3108. IFS=$lt_save_ifs
  3109. else
  3110. lt_cv_path_LD=$LD # Let the user override the test with a path.
  3111. fi])
  3112. LD=$lt_cv_path_LD
  3113. if test -n "$LD"; then
  3114. AC_MSG_RESULT($LD)
  3115. else
  3116. AC_MSG_RESULT(no)
  3117. fi
  3118. test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  3119. _LT_PATH_LD_GNU
  3120. AC_SUBST([LD])
  3121. _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
  3122. ])# LT_PATH_LD
  3123. # Old names:
  3124. AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
  3125. AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
  3126. dnl aclocal-1.4 backwards compatibility:
  3127. dnl AC_DEFUN([AM_PROG_LD], [])
  3128. dnl AC_DEFUN([AC_PROG_LD], [])
  3129. # _LT_PATH_LD_GNU
  3130. #- --------------
  3131. m4_defun([_LT_PATH_LD_GNU],
  3132. [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
  3133. [# I'd rather use --version here, but apparently some GNU lds only accept -v.
  3134. case `$LD -v 2>&1 </dev/null` in
  3135. *GNU* | *'with BFD'*)
  3136. lt_cv_prog_gnu_ld=yes
  3137. ;;
  3138. *)
  3139. lt_cv_prog_gnu_ld=no
  3140. ;;
  3141. esac])
  3142. with_gnu_ld=$lt_cv_prog_gnu_ld
  3143. ])# _LT_PATH_LD_GNU
  3144. # _LT_CMD_RELOAD
  3145. # --------------
  3146. # find reload flag for linker
  3147. # -- PORTME Some linkers may need a different reload flag.
  3148. m4_defun([_LT_CMD_RELOAD],
  3149. [AC_CACHE_CHECK([for $LD option to reload object files],
  3150. lt_cv_ld_reload_flag,
  3151. [lt_cv_ld_reload_flag='-r'])
  3152. reload_flag=$lt_cv_ld_reload_flag
  3153. case $reload_flag in
  3154. "" | " "*) ;;
  3155. *) reload_flag=" $reload_flag" ;;
  3156. esac
  3157. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  3158. case $host_os in
  3159. cygwin* | mingw* | windows* | pw32* | cegcc*)
  3160. if test yes != "$GCC"; then
  3161. reload_cmds=false
  3162. fi
  3163. ;;
  3164. darwin*)
  3165. if test yes = "$GCC"; then
  3166. reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
  3167. else
  3168. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  3169. fi
  3170. ;;
  3171. esac
  3172. _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
  3173. _LT_TAGDECL([], [reload_cmds], [2])dnl
  3174. ])# _LT_CMD_RELOAD
  3175. # _LT_PATH_DD
  3176. # -----------
  3177. # find a working dd
  3178. m4_defun([_LT_PATH_DD],
  3179. [AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
  3180. [printf 0123456789abcdef0123456789abcdef >conftest.i
  3181. cat conftest.i conftest.i >conftest2.i
  3182. : ${lt_DD:=$DD}
  3183. AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
  3184. [if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
  3185. cmp -s conftest.i conftest.out \
  3186. && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
  3187. fi])
  3188. rm -f conftest.i conftest2.i conftest.out])
  3189. ])# _LT_PATH_DD
  3190. # _LT_CMD_TRUNCATE
  3191. # ----------------
  3192. # find command to truncate a binary pipe
  3193. m4_defun([_LT_CMD_TRUNCATE],
  3194. [m4_require([_LT_PATH_DD])
  3195. AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
  3196. [printf 0123456789abcdef0123456789abcdef >conftest.i
  3197. cat conftest.i conftest.i >conftest2.i
  3198. lt_cv_truncate_bin=
  3199. if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
  3200. cmp -s conftest.i conftest.out \
  3201. && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
  3202. fi
  3203. rm -f conftest.i conftest2.i conftest.out
  3204. test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
  3205. _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
  3206. [Command to truncate a binary pipe])
  3207. ])# _LT_CMD_TRUNCATE
  3208. # _LT_CHECK_MAGIC_METHOD
  3209. # ----------------------
  3210. # how to check for library dependencies
  3211. # -- PORTME fill in with the dynamic library characteristics
  3212. m4_defun([_LT_CHECK_MAGIC_METHOD],
  3213. [m4_require([_LT_DECL_EGREP])
  3214. m4_require([_LT_DECL_OBJDUMP])
  3215. AC_CACHE_CHECK([how to recognize dependent libraries],
  3216. lt_cv_deplibs_check_method,
  3217. [lt_cv_file_magic_cmd='$MAGIC_CMD'
  3218. lt_cv_file_magic_test_file=
  3219. lt_cv_deplibs_check_method='unknown'
  3220. # Need to set the preceding variable on all platforms that support
  3221. # interlibrary dependencies.
  3222. # 'none' -- dependencies not supported.
  3223. # 'unknown' -- same as none, but documents that we really don't know.
  3224. # 'pass_all' -- all dependencies passed with no checks.
  3225. # 'file_magic [[regex]]' -- check by looking for files in library path
  3226. # that responds to the $file_magic_cmd with a given extended regex.
  3227. # If you have 'file' or equivalent on your system and you're not sure
  3228. # whether 'pass_all' will *always* work, you probably want this one.
  3229. case $host_os in
  3230. aix[[4-9]]*)
  3231. lt_cv_deplibs_check_method=pass_all
  3232. ;;
  3233. beos*)
  3234. lt_cv_deplibs_check_method=pass_all
  3235. ;;
  3236. bsdi[[45]]*)
  3237. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
  3238. lt_cv_file_magic_cmd='$FILECMD -L'
  3239. lt_cv_file_magic_test_file=/shlib/libc.so
  3240. ;;
  3241. cygwin*)
  3242. # func_win32_libid is a shell function defined in ltmain.sh
  3243. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  3244. lt_cv_file_magic_cmd='func_win32_libid'
  3245. ;;
  3246. mingw* | windows* | pw32*)
  3247. # Base MSYS/MinGW do not provide the 'file' command needed by
  3248. # func_win32_libid shell function, so use a weaker test based on 'objdump',
  3249. # unless we find 'file', for example because we are cross-compiling.
  3250. if ( file / ) >/dev/null 2>&1; then
  3251. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  3252. lt_cv_file_magic_cmd='func_win32_libid'
  3253. else
  3254. # Keep this pattern in sync with the one in func_win32_libid.
  3255. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64|pe-aarch64)'
  3256. lt_cv_file_magic_cmd='$OBJDUMP -f'
  3257. fi
  3258. ;;
  3259. cegcc*)
  3260. # use the weaker test based on 'objdump'. See mingw*.
  3261. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
  3262. lt_cv_file_magic_cmd='$OBJDUMP -f'
  3263. ;;
  3264. darwin* | rhapsody*)
  3265. lt_cv_deplibs_check_method=pass_all
  3266. ;;
  3267. freebsd* | dragonfly* | midnightbsd*)
  3268. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  3269. case $host_cpu in
  3270. i*86 )
  3271. # Not sure whether the presence of OpenBSD here was a mistake.
  3272. # Let's accept both of them until this is cleared up.
  3273. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
  3274. lt_cv_file_magic_cmd=$FILECMD
  3275. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  3276. ;;
  3277. esac
  3278. else
  3279. lt_cv_deplibs_check_method=pass_all
  3280. fi
  3281. ;;
  3282. haiku*)
  3283. lt_cv_deplibs_check_method=pass_all
  3284. ;;
  3285. hpux10.20* | hpux11*)
  3286. lt_cv_file_magic_cmd=$FILECMD
  3287. case $host_cpu in
  3288. ia64*)
  3289. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
  3290. lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
  3291. ;;
  3292. hppa*64*)
  3293. [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]']
  3294. lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
  3295. ;;
  3296. *)
  3297. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
  3298. lt_cv_file_magic_test_file=/usr/lib/libc.sl
  3299. ;;
  3300. esac
  3301. ;;
  3302. interix[[3-9]]*)
  3303. # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
  3304. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
  3305. ;;
  3306. irix5* | irix6* | nonstopux*)
  3307. case $LD in
  3308. *-32|*"-32 ") libmagic=32-bit;;
  3309. *-n32|*"-n32 ") libmagic=N32;;
  3310. *-64|*"-64 ") libmagic=64-bit;;
  3311. *) libmagic=never-match;;
  3312. esac
  3313. lt_cv_deplibs_check_method=pass_all
  3314. ;;
  3315. # This must be glibc/ELF.
  3316. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  3317. lt_cv_deplibs_check_method=pass_all
  3318. ;;
  3319. *-mlibc)
  3320. lt_cv_deplibs_check_method=pass_all
  3321. ;;
  3322. netbsd* | netbsdelf*-gnu)
  3323. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  3324. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  3325. else
  3326. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
  3327. fi
  3328. ;;
  3329. newos6*)
  3330. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
  3331. lt_cv_file_magic_cmd=$FILECMD
  3332. lt_cv_file_magic_test_file=/usr/lib/libnls.so
  3333. ;;
  3334. *nto* | *qnx*)
  3335. lt_cv_deplibs_check_method=pass_all
  3336. ;;
  3337. openbsd*)
  3338. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
  3339. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
  3340. else
  3341. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  3342. fi
  3343. ;;
  3344. osf3* | osf4* | osf5*)
  3345. lt_cv_deplibs_check_method=pass_all
  3346. ;;
  3347. rdos*)
  3348. lt_cv_deplibs_check_method=pass_all
  3349. ;;
  3350. serenity*)
  3351. lt_cv_deplibs_check_method=pass_all
  3352. ;;
  3353. solaris*)
  3354. lt_cv_deplibs_check_method=pass_all
  3355. ;;
  3356. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  3357. lt_cv_deplibs_check_method=pass_all
  3358. ;;
  3359. sysv4 | sysv4.3*)
  3360. case $host_vendor in
  3361. motorola)
  3362. 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]]'
  3363. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  3364. ;;
  3365. ncr)
  3366. lt_cv_deplibs_check_method=pass_all
  3367. ;;
  3368. sequent)
  3369. lt_cv_file_magic_cmd='/bin/file'
  3370. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
  3371. ;;
  3372. sni)
  3373. lt_cv_file_magic_cmd='/bin/file'
  3374. lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
  3375. lt_cv_file_magic_test_file=/lib/libc.so
  3376. ;;
  3377. siemens)
  3378. lt_cv_deplibs_check_method=pass_all
  3379. ;;
  3380. pc)
  3381. lt_cv_deplibs_check_method=pass_all
  3382. ;;
  3383. esac
  3384. ;;
  3385. tpf*)
  3386. lt_cv_deplibs_check_method=pass_all
  3387. ;;
  3388. os2*)
  3389. lt_cv_deplibs_check_method=pass_all
  3390. ;;
  3391. esac
  3392. ])
  3393. file_magic_glob=
  3394. want_nocaseglob=no
  3395. if test "$build" = "$host"; then
  3396. case $host_os in
  3397. mingw* | windows* | pw32*)
  3398. if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
  3399. want_nocaseglob=yes
  3400. else
  3401. file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
  3402. fi
  3403. ;;
  3404. esac
  3405. fi
  3406. file_magic_cmd=$lt_cv_file_magic_cmd
  3407. deplibs_check_method=$lt_cv_deplibs_check_method
  3408. test -z "$deplibs_check_method" && deplibs_check_method=unknown
  3409. _LT_DECL([], [deplibs_check_method], [1],
  3410. [Method to check whether dependent libraries are shared objects])
  3411. _LT_DECL([], [file_magic_cmd], [1],
  3412. [Command to use when deplibs_check_method = "file_magic"])
  3413. _LT_DECL([], [file_magic_glob], [1],
  3414. [How to find potential files when deplibs_check_method = "file_magic"])
  3415. _LT_DECL([], [want_nocaseglob], [1],
  3416. [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
  3417. ])# _LT_CHECK_MAGIC_METHOD
  3418. # LT_PATH_NM
  3419. # ----------
  3420. # find the pathname to a BSD- or MS-compatible name lister
  3421. AC_DEFUN([LT_PATH_NM],
  3422. [AC_REQUIRE([AC_PROG_CC])dnl
  3423. AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
  3424. [if test -n "$NM"; then
  3425. # Let the user override the test.
  3426. lt_cv_path_NM=$NM
  3427. else
  3428. lt_nm_to_check=${ac_tool_prefix}nm
  3429. if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
  3430. lt_nm_to_check="$lt_nm_to_check nm"
  3431. fi
  3432. for lt_tmp_nm in $lt_nm_to_check; do
  3433. lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
  3434. for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
  3435. IFS=$lt_save_ifs
  3436. test -z "$ac_dir" && ac_dir=.
  3437. tmp_nm=$ac_dir/$lt_tmp_nm
  3438. if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
  3439. # Check to see if the nm accepts a BSD-compat flag.
  3440. # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
  3441. # nm: unknown option "B" ignored
  3442. # Tru64's nm complains that /dev/null is an invalid object file
  3443. # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
  3444. case $build_os in
  3445. mingw* | windows*) lt_bad_file=conftest.nm/nofile ;;
  3446. *) lt_bad_file=/dev/null ;;
  3447. esac
  3448. case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
  3449. *$lt_bad_file* | *'Invalid file or object type'*)
  3450. lt_cv_path_NM="$tmp_nm -B"
  3451. break 2
  3452. ;;
  3453. *)
  3454. case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
  3455. */dev/null*)
  3456. lt_cv_path_NM="$tmp_nm -p"
  3457. break 2
  3458. ;;
  3459. *)
  3460. lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
  3461. continue # so that we can try to find one that supports BSD flags
  3462. ;;
  3463. esac
  3464. ;;
  3465. esac
  3466. fi
  3467. done
  3468. IFS=$lt_save_ifs
  3469. done
  3470. : ${lt_cv_path_NM=no}
  3471. fi])
  3472. if test no != "$lt_cv_path_NM"; then
  3473. NM=$lt_cv_path_NM
  3474. else
  3475. # Didn't find any BSD compatible name lister, look for dumpbin.
  3476. if test -n "$DUMPBIN"; then :
  3477. # Let the user override the test.
  3478. else
  3479. AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
  3480. case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
  3481. *COFF*)
  3482. DUMPBIN="$DUMPBIN -symbols -headers"
  3483. ;;
  3484. *)
  3485. DUMPBIN=:
  3486. ;;
  3487. esac
  3488. fi
  3489. AC_SUBST([DUMPBIN])
  3490. if test : != "$DUMPBIN"; then
  3491. NM=$DUMPBIN
  3492. fi
  3493. fi
  3494. test -z "$NM" && NM=nm
  3495. AC_SUBST([NM])
  3496. _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
  3497. AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
  3498. [lt_cv_nm_interface="BSD nm"
  3499. echo "int some_variable = 0;" > conftest.$ac_ext
  3500. (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
  3501. (eval "$ac_compile" 2>conftest.err)
  3502. cat conftest.err >&AS_MESSAGE_LOG_FD
  3503. (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
  3504. (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
  3505. cat conftest.err >&AS_MESSAGE_LOG_FD
  3506. (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
  3507. cat conftest.out >&AS_MESSAGE_LOG_FD
  3508. if $GREP 'External.*some_variable' conftest.out > /dev/null; then
  3509. lt_cv_nm_interface="MS dumpbin"
  3510. fi
  3511. rm -f conftest*])
  3512. ])# LT_PATH_NM
  3513. # Old names:
  3514. AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
  3515. AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
  3516. dnl aclocal-1.4 backwards compatibility:
  3517. dnl AC_DEFUN([AM_PROG_NM], [])
  3518. dnl AC_DEFUN([AC_PROG_NM], [])
  3519. # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  3520. # --------------------------------
  3521. # how to determine the name of the shared library
  3522. # associated with a specific link library.
  3523. # -- PORTME fill in with the dynamic library characteristics
  3524. m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
  3525. [m4_require([_LT_DECL_EGREP])
  3526. m4_require([_LT_DECL_OBJDUMP])
  3527. m4_require([_LT_DECL_DLLTOOL])
  3528. AC_CACHE_CHECK([how to associate runtime and link libraries],
  3529. lt_cv_sharedlib_from_linklib_cmd,
  3530. [lt_cv_sharedlib_from_linklib_cmd='unknown'
  3531. case $host_os in
  3532. cygwin* | mingw* | windows* | pw32* | cegcc*)
  3533. # two different shell functions defined in ltmain.sh;
  3534. # decide which one to use based on capabilities of $DLLTOOL
  3535. case `$DLLTOOL --help 2>&1` in
  3536. *--identify-strict*)
  3537. lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
  3538. ;;
  3539. *)
  3540. lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
  3541. ;;
  3542. esac
  3543. ;;
  3544. *)
  3545. # fallback: assume linklib IS sharedlib
  3546. lt_cv_sharedlib_from_linklib_cmd=$ECHO
  3547. ;;
  3548. esac
  3549. ])
  3550. sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
  3551. test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
  3552. _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
  3553. [Command to associate shared and link libraries])
  3554. ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  3555. # _LT_PATH_MANIFEST_TOOL
  3556. # ----------------------
  3557. # locate the manifest tool
  3558. m4_defun([_LT_PATH_MANIFEST_TOOL],
  3559. [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
  3560. test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
  3561. AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_manifest_tool],
  3562. [lt_cv_path_manifest_tool=no
  3563. echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
  3564. $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
  3565. cat conftest.err >&AS_MESSAGE_LOG_FD
  3566. if $GREP 'Manifest Tool' conftest.out > /dev/null; then
  3567. lt_cv_path_manifest_tool=yes
  3568. fi
  3569. rm -f conftest*])
  3570. if test yes != "$lt_cv_path_manifest_tool"; then
  3571. MANIFEST_TOOL=:
  3572. fi
  3573. _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
  3574. ])# _LT_PATH_MANIFEST_TOOL
  3575. # _LT_DLL_DEF_P([FILE])
  3576. # ---------------------
  3577. # True iff FILE is a Windows DLL '.def' file.
  3578. # Keep in sync with func_dll_def_p in the libtool script
  3579. AC_DEFUN([_LT_DLL_DEF_P],
  3580. [dnl
  3581. test DEF = "`$SED -n dnl
  3582. -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace
  3583. -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments
  3584. -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl
  3585. -e q dnl Only consider the first "real" line
  3586. $1`" dnl
  3587. ])# _LT_DLL_DEF_P
  3588. # LT_LIB_M
  3589. # --------
  3590. # check for math library
  3591. AC_DEFUN([LT_LIB_M],
  3592. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3593. LIBM=
  3594. case $host in
  3595. *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-mingw* | *-*-pw32* | *-*-darwin*)
  3596. # These system don't have libm, or don't need it
  3597. ;;
  3598. *-ncr-sysv4.3*)
  3599. AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
  3600. AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
  3601. ;;
  3602. *)
  3603. AC_CHECK_LIB(m, cos, LIBM=-lm)
  3604. ;;
  3605. esac
  3606. AC_SUBST([LIBM])
  3607. ])# LT_LIB_M
  3608. # Old name:
  3609. AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
  3610. dnl aclocal-1.4 backwards compatibility:
  3611. dnl AC_DEFUN([AC_CHECK_LIBM], [])
  3612. # _LT_COMPILER_NO_RTTI([TAGNAME])
  3613. # -------------------------------
  3614. m4_defun([_LT_COMPILER_NO_RTTI],
  3615. [m4_require([_LT_TAG_COMPILER])dnl
  3616. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  3617. if test yes = "$GCC"; then
  3618. case $cc_basename in
  3619. nvcc*)
  3620. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
  3621. *)
  3622. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
  3623. esac
  3624. _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
  3625. lt_cv_prog_compiler_rtti_exceptions,
  3626. [-fno-rtti -fno-exceptions], [],
  3627. [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
  3628. fi
  3629. _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
  3630. [Compiler flag to turn off builtin functions])
  3631. ])# _LT_COMPILER_NO_RTTI
  3632. # _LT_CMD_GLOBAL_SYMBOLS
  3633. # ----------------------
  3634. m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
  3635. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3636. AC_REQUIRE([AC_PROG_CC])dnl
  3637. AC_REQUIRE([AC_PROG_AWK])dnl
  3638. AC_REQUIRE([LT_PATH_NM])dnl
  3639. AC_REQUIRE([LT_PATH_LD])dnl
  3640. m4_require([_LT_DECL_SED])dnl
  3641. m4_require([_LT_DECL_EGREP])dnl
  3642. m4_require([_LT_TAG_COMPILER])dnl
  3643. # Check for command to grab the raw symbol name followed by C symbol from nm.
  3644. AC_MSG_CHECKING([command to parse $NM output from $compiler object])
  3645. AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
  3646. [
  3647. # These are sane defaults that work on at least a few old systems.
  3648. # [They come from Ultrix. What could be older than Ultrix?!! ;)]
  3649. # Character class describing NM global symbol codes.
  3650. symcode='[[BCDEGRST]]'
  3651. # Regexp to match symbols that can be accessed directly from C.
  3652. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
  3653. # Define system-specific variables.
  3654. case $host_os in
  3655. aix*)
  3656. symcode='[[BCDT]]'
  3657. ;;
  3658. cygwin* | mingw* | windows* | pw32* | cegcc*)
  3659. symcode='[[ABCDGISTW]]'
  3660. ;;
  3661. hpux*)
  3662. if test ia64 = "$host_cpu"; then
  3663. symcode='[[ABCDEGRST]]'
  3664. fi
  3665. ;;
  3666. irix* | nonstopux*)
  3667. symcode='[[BCDEGRST]]'
  3668. ;;
  3669. osf*)
  3670. symcode='[[BCDEGQRST]]'
  3671. ;;
  3672. solaris*)
  3673. symcode='[[BCDRT]]'
  3674. ;;
  3675. sco3.2v5*)
  3676. symcode='[[DT]]'
  3677. ;;
  3678. sysv4.2uw2*)
  3679. symcode='[[DT]]'
  3680. ;;
  3681. sysv5* | sco5v6* | unixware* | OpenUNIX*)
  3682. symcode='[[ABDT]]'
  3683. ;;
  3684. sysv4)
  3685. symcode='[[DFNSTU]]'
  3686. ;;
  3687. esac
  3688. # If we're using GNU nm, then use its standard symbol codes.
  3689. case `$NM -V 2>&1` in
  3690. *GNU* | *'with BFD'*)
  3691. symcode='[[ABCDGIRSTW]]' ;;
  3692. esac
  3693. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3694. # Gets list of data symbols to import.
  3695. lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
  3696. # Adjust the below global symbol transforms to fixup imported variables.
  3697. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
  3698. lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
  3699. lt_c_name_lib_hook="\
  3700. -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
  3701. -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
  3702. else
  3703. # Disable hooks by default.
  3704. lt_cv_sys_global_symbol_to_import=
  3705. lt_cdecl_hook=
  3706. lt_c_name_hook=
  3707. lt_c_name_lib_hook=
  3708. fi
  3709. # Transform an extracted symbol line into a proper C declaration.
  3710. # Some systems (esp. on ia64) link data and code symbols differently,
  3711. # so use this general approach.
  3712. lt_cv_sys_global_symbol_to_cdecl="$SED -n"\
  3713. $lt_cdecl_hook\
  3714. " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
  3715. " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
  3716. # Transform an extracted symbol line into symbol name and symbol address
  3717. lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
  3718. $lt_c_name_hook\
  3719. " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
  3720. " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
  3721. # Transform an extracted symbol line into symbol name with lib prefix and
  3722. # symbol address.
  3723. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
  3724. $lt_c_name_lib_hook\
  3725. " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
  3726. " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
  3727. " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
  3728. # Handle CRLF in mingw tool chain
  3729. opt_cr=
  3730. case $build_os in
  3731. mingw* | windows*)
  3732. opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  3733. ;;
  3734. esac
  3735. # Try without a prefix underscore, then with it.
  3736. for ac_symprfx in "" "_"; do
  3737. # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
  3738. symxfrm="\\1 $ac_symprfx\\2 \\2"
  3739. # Write the raw and C identifiers.
  3740. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3741. # Fake it for dumpbin and say T for any non-static function,
  3742. # D for any global variable and I for any imported variable.
  3743. # Also find C++ and __fastcall symbols from MSVC++ or ICC,
  3744. # which start with @ or ?.
  3745. lt_cv_sys_global_symbol_pipe="$AWK ['"\
  3746. " {last_section=section; section=\$ 3};"\
  3747. " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
  3748. " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
  3749. " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
  3750. " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
  3751. " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
  3752. " \$ 0!~/External *\|/{next};"\
  3753. " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
  3754. " {if(hide[section]) next};"\
  3755. " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
  3756. " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
  3757. " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
  3758. " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
  3759. " ' prfx=^$ac_symprfx]"
  3760. else
  3761. lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
  3762. fi
  3763. lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
  3764. # Check to see that the pipe works correctly.
  3765. pipe_works=no
  3766. rm -f conftest*
  3767. cat > conftest.$ac_ext <<_LT_EOF
  3768. #ifdef __cplusplus
  3769. extern "C" {
  3770. #endif
  3771. char nm_test_var;
  3772. void nm_test_func(void);
  3773. void nm_test_func(void){}
  3774. #ifdef __cplusplus
  3775. }
  3776. #endif
  3777. int main(void){nm_test_var='a';nm_test_func();return(0);}
  3778. _LT_EOF
  3779. if AC_TRY_EVAL(ac_compile); then
  3780. # Now try to grab the symbols.
  3781. nlist=conftest.nm
  3782. $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD
  3783. if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then
  3784. # Try sorting and uniquifying the output.
  3785. if sort "$nlist" | uniq > "$nlist"T; then
  3786. mv -f "$nlist"T "$nlist"
  3787. else
  3788. rm -f "$nlist"T
  3789. fi
  3790. # Make sure that we snagged all the symbols we need.
  3791. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
  3792. if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
  3793. cat <<_LT_EOF > conftest.$ac_ext
  3794. /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
  3795. #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
  3796. /* DATA imports from DLLs on WIN32 can't be const, because runtime
  3797. relocations are performed -- see ld's documentation on pseudo-relocs. */
  3798. # define LT@&t@_DLSYM_CONST
  3799. #elif defined __osf__
  3800. /* This system does not cope well with relocations in const data. */
  3801. # define LT@&t@_DLSYM_CONST
  3802. #else
  3803. # define LT@&t@_DLSYM_CONST const
  3804. #endif
  3805. #ifdef __cplusplus
  3806. extern "C" {
  3807. #endif
  3808. _LT_EOF
  3809. # Now generate the symbol file.
  3810. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
  3811. cat <<_LT_EOF >> conftest.$ac_ext
  3812. /* The mapping between symbol names and symbols. */
  3813. LT@&t@_DLSYM_CONST struct {
  3814. const char *name;
  3815. void *address;
  3816. }
  3817. lt__PROGRAM__LTX_preloaded_symbols[[]] =
  3818. {
  3819. { "@PROGRAM@", (void *) 0 },
  3820. _LT_EOF
  3821. $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
  3822. cat <<\_LT_EOF >> conftest.$ac_ext
  3823. {0, (void *) 0}
  3824. };
  3825. /* This works around a problem in FreeBSD linker */
  3826. #ifdef FREEBSD_WORKAROUND
  3827. static const void *lt_preloaded_setup() {
  3828. return lt__PROGRAM__LTX_preloaded_symbols;
  3829. }
  3830. #endif
  3831. #ifdef __cplusplus
  3832. }
  3833. #endif
  3834. _LT_EOF
  3835. # Now try linking the two files.
  3836. mv conftest.$ac_objext conftstm.$ac_objext
  3837. lt_globsym_save_LIBS=$LIBS
  3838. lt_globsym_save_CFLAGS=$CFLAGS
  3839. LIBS=conftstm.$ac_objext
  3840. CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
  3841. if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
  3842. pipe_works=yes
  3843. fi
  3844. LIBS=$lt_globsym_save_LIBS
  3845. CFLAGS=$lt_globsym_save_CFLAGS
  3846. else
  3847. echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
  3848. fi
  3849. else
  3850. echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
  3851. fi
  3852. else
  3853. echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
  3854. fi
  3855. else
  3856. echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
  3857. cat conftest.$ac_ext >&5
  3858. fi
  3859. rm -rf conftest* conftst*
  3860. # Do not use the global_symbol_pipe unless it works.
  3861. if test yes = "$pipe_works"; then
  3862. break
  3863. else
  3864. lt_cv_sys_global_symbol_pipe=
  3865. fi
  3866. done
  3867. ])
  3868. if test -z "$lt_cv_sys_global_symbol_pipe"; then
  3869. lt_cv_sys_global_symbol_to_cdecl=
  3870. fi
  3871. if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
  3872. AC_MSG_RESULT(failed)
  3873. else
  3874. AC_MSG_RESULT(ok)
  3875. fi
  3876. # Response file support.
  3877. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3878. nm_file_list_spec='@'
  3879. elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
  3880. nm_file_list_spec='@'
  3881. fi
  3882. _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
  3883. [Take the output of nm and produce a listing of raw symbols and C names])
  3884. _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
  3885. [Transform the output of nm in a proper C declaration])
  3886. _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
  3887. [Transform the output of nm into a list of symbols to manually relocate])
  3888. _LT_DECL([global_symbol_to_c_name_address],
  3889. [lt_cv_sys_global_symbol_to_c_name_address], [1],
  3890. [Transform the output of nm in a C name address pair])
  3891. _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
  3892. [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
  3893. [Transform the output of nm in a C name address pair when lib prefix is needed])
  3894. _LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
  3895. [The name lister interface])
  3896. _LT_DECL([], [nm_file_list_spec], [1],
  3897. [Specify filename containing input files for $NM])
  3898. ]) # _LT_CMD_GLOBAL_SYMBOLS
  3899. # _LT_COMPILER_PIC([TAGNAME])
  3900. # ---------------------------
  3901. m4_defun([_LT_COMPILER_PIC],
  3902. [m4_require([_LT_TAG_COMPILER])dnl
  3903. _LT_TAGVAR(lt_prog_compiler_wl, $1)=
  3904. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3905. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3906. m4_if([$1], [CXX], [
  3907. # C++ specific cases for pic, static, wl, etc.
  3908. if test yes = "$GXX"; then
  3909. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3910. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3911. case $host_os in
  3912. aix*)
  3913. # All AIX code is PIC.
  3914. if test ia64 = "$host_cpu"; then
  3915. # AIX 5 now supports IA64 processor
  3916. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3917. fi
  3918. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3919. ;;
  3920. amigaos*)
  3921. case $host_cpu in
  3922. powerpc)
  3923. # see comment about AmigaOS4 .so support
  3924. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3925. ;;
  3926. m68k)
  3927. # FIXME: we need at least 68020 code to build shared libraries, but
  3928. # adding the '-m68020' flag to GCC prevents building anything better,
  3929. # like '-m68040'.
  3930. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  3931. ;;
  3932. esac
  3933. ;;
  3934. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  3935. # PIC is the default for these OSes.
  3936. ;;
  3937. mingw* | windows* | cygwin* | os2* | pw32* | cegcc*)
  3938. # This hack is so that the source file can tell whether it is being
  3939. # built for inclusion in a dll (and should export symbols for example).
  3940. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  3941. # (--disable-auto-import) libraries
  3942. m4_if([$1], [GCJ], [],
  3943. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3944. case $host_os in
  3945. os2*)
  3946. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
  3947. ;;
  3948. esac
  3949. ;;
  3950. darwin* | rhapsody*)
  3951. # PIC is the default on this platform
  3952. # Common symbols not allowed in MH_DYLIB files
  3953. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  3954. ;;
  3955. *djgpp*)
  3956. # DJGPP does not support shared libraries at all
  3957. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3958. ;;
  3959. haiku*)
  3960. # PIC is the default for Haiku.
  3961. # The "-static" flag exists, but is broken.
  3962. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3963. ;;
  3964. interix[[3-9]]*)
  3965. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  3966. # Instead, we relocate shared libraries at runtime.
  3967. ;;
  3968. sysv4*MP*)
  3969. if test -d /usr/nec; then
  3970. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  3971. fi
  3972. ;;
  3973. hpux*)
  3974. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  3975. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  3976. # sets the default TLS model and affects inlining.
  3977. case $host_cpu in
  3978. hppa*64*)
  3979. ;;
  3980. *)
  3981. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3982. ;;
  3983. esac
  3984. ;;
  3985. *qnx* | *nto*)
  3986. # QNX uses GNU C++, but need to define -shared option too, otherwise
  3987. # it will coredump.
  3988. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  3989. ;;
  3990. *)
  3991. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3992. ;;
  3993. esac
  3994. else
  3995. case $host_os in
  3996. aix[[4-9]]*)
  3997. # All AIX code is PIC.
  3998. if test ia64 = "$host_cpu"; then
  3999. # AIX 5 now supports IA64 processor
  4000. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4001. else
  4002. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  4003. fi
  4004. ;;
  4005. chorus*)
  4006. case $cc_basename in
  4007. cxch68*)
  4008. # Green Hills C++ Compiler
  4009. # _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"
  4010. ;;
  4011. esac
  4012. ;;
  4013. mingw* | windows* | cygwin* | os2* | pw32* | cegcc*)
  4014. # This hack is so that the source file can tell whether it is being
  4015. # built for inclusion in a dll (and should export symbols for example).
  4016. m4_if([$1], [GCJ], [],
  4017. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  4018. ;;
  4019. dgux*)
  4020. case $cc_basename in
  4021. ec++*)
  4022. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4023. ;;
  4024. ghcx*)
  4025. # Green Hills C++ Compiler
  4026. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4027. ;;
  4028. *)
  4029. ;;
  4030. esac
  4031. ;;
  4032. freebsd* | dragonfly* | midnightbsd*)
  4033. # FreeBSD uses GNU C++
  4034. ;;
  4035. hpux9* | hpux10* | hpux11*)
  4036. case $cc_basename in
  4037. CC*)
  4038. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4039. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
  4040. if test ia64 != "$host_cpu"; then
  4041. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4042. fi
  4043. ;;
  4044. aCC*)
  4045. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4046. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
  4047. case $host_cpu in
  4048. hppa*64*|ia64*)
  4049. # +Z the default
  4050. ;;
  4051. *)
  4052. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4053. ;;
  4054. esac
  4055. ;;
  4056. *)
  4057. ;;
  4058. esac
  4059. ;;
  4060. interix*)
  4061. # This is c89, which is MS Visual C++ (no shared libs)
  4062. # Anyone wants to do a port?
  4063. ;;
  4064. irix5* | irix6* | nonstopux*)
  4065. case $cc_basename in
  4066. CC*)
  4067. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4068. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4069. # CC pic flag -KPIC is the default.
  4070. ;;
  4071. *)
  4072. ;;
  4073. esac
  4074. ;;
  4075. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  4076. case $cc_basename in
  4077. KCC*)
  4078. # KAI C++ Compiler
  4079. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  4080. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4081. ;;
  4082. ecpc* )
  4083. # old Intel C++ for x86_64, which still supported -KPIC.
  4084. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4085. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4086. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4087. ;;
  4088. icpc* )
  4089. # Intel C++, used to be incompatible with GCC.
  4090. # ICC 10 doesn't accept -KPIC any more.
  4091. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4092. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4093. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4094. ;;
  4095. pgCC* | pgcpp*)
  4096. # Portland Group C++ compiler
  4097. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4098. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4099. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4100. ;;
  4101. cxx*)
  4102. # Compaq C++
  4103. # Make sure the PIC flag is empty. It appears that all Alpha
  4104. # Linux and Compaq Tru64 Unix objects are PIC.
  4105. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4106. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4107. ;;
  4108. xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
  4109. # IBM XL 8.0, 9.0 on PPC and BlueGene
  4110. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4111. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  4112. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  4113. ;;
  4114. *)
  4115. case `$CC -V 2>&1 | $SED 5q` in
  4116. *Sun\ C*)
  4117. # Sun C++ 5.9
  4118. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4119. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4120. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4121. ;;
  4122. esac
  4123. ;;
  4124. esac
  4125. ;;
  4126. lynxos*)
  4127. ;;
  4128. m88k*)
  4129. ;;
  4130. mvs*)
  4131. case $cc_basename in
  4132. cxx*)
  4133. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
  4134. ;;
  4135. *)
  4136. ;;
  4137. esac
  4138. ;;
  4139. netbsd* | netbsdelf*-gnu)
  4140. ;;
  4141. *-mlibc)
  4142. ;;
  4143. *qnx* | *nto*)
  4144. # QNX uses GNU C++, but need to define -shared option too, otherwise
  4145. # it will coredump.
  4146. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4147. ;;
  4148. osf3* | osf4* | osf5*)
  4149. case $cc_basename in
  4150. KCC*)
  4151. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  4152. ;;
  4153. RCC*)
  4154. # Rational C++ 2.4.1
  4155. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4156. ;;
  4157. cxx*)
  4158. # Digital/Compaq C++
  4159. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4160. # Make sure the PIC flag is empty. It appears that all Alpha
  4161. # Linux and Compaq Tru64 Unix objects are PIC.
  4162. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4163. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4164. ;;
  4165. *)
  4166. ;;
  4167. esac
  4168. ;;
  4169. psos*)
  4170. ;;
  4171. serenity*)
  4172. ;;
  4173. solaris*)
  4174. case $cc_basename in
  4175. CC* | sunCC*)
  4176. # Sun C++ 4.2, 5.x and Centerline C++
  4177. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4178. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4179. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4180. ;;
  4181. gcx*)
  4182. # Green Hills C++ Compiler
  4183. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4184. ;;
  4185. *)
  4186. ;;
  4187. esac
  4188. ;;
  4189. sunos4*)
  4190. case $cc_basename in
  4191. CC*)
  4192. # Sun C++ 4.x
  4193. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4194. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4195. ;;
  4196. lcc*)
  4197. # Lucid
  4198. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4199. ;;
  4200. *)
  4201. ;;
  4202. esac
  4203. ;;
  4204. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  4205. case $cc_basename in
  4206. CC*)
  4207. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4208. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4209. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4210. ;;
  4211. esac
  4212. ;;
  4213. tandem*)
  4214. case $cc_basename in
  4215. NCC*)
  4216. # NonStop-UX NCC 3.20
  4217. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4218. ;;
  4219. *)
  4220. ;;
  4221. esac
  4222. ;;
  4223. vxworks*)
  4224. ;;
  4225. *)
  4226. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4227. ;;
  4228. esac
  4229. fi
  4230. ],
  4231. [
  4232. if test yes = "$GCC"; then
  4233. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4234. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4235. case $host_os in
  4236. aix*)
  4237. # All AIX code is PIC.
  4238. if test ia64 = "$host_cpu"; then
  4239. # AIX 5 now supports IA64 processor
  4240. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4241. fi
  4242. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4243. ;;
  4244. amigaos*)
  4245. case $host_cpu in
  4246. powerpc)
  4247. # see comment about AmigaOS4 .so support
  4248. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4249. ;;
  4250. m68k)
  4251. # FIXME: we need at least 68020 code to build shared libraries, but
  4252. # adding the '-m68020' flag to GCC prevents building anything better,
  4253. # like '-m68040'.
  4254. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  4255. ;;
  4256. esac
  4257. ;;
  4258. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  4259. # PIC is the default for these OSes.
  4260. ;;
  4261. mingw* | windows* | cygwin* | pw32* | os2* | cegcc*)
  4262. # This hack is so that the source file can tell whether it is being
  4263. # built for inclusion in a dll (and should export symbols for example).
  4264. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  4265. # (--disable-auto-import) libraries
  4266. m4_if([$1], [GCJ], [],
  4267. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  4268. case $host_os in
  4269. os2*)
  4270. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
  4271. ;;
  4272. esac
  4273. ;;
  4274. darwin* | rhapsody*)
  4275. # PIC is the default on this platform
  4276. # Common symbols not allowed in MH_DYLIB files
  4277. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  4278. ;;
  4279. haiku*)
  4280. # PIC is the default for Haiku.
  4281. # The "-static" flag exists, but is broken.
  4282. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  4283. ;;
  4284. hpux*)
  4285. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  4286. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  4287. # sets the default TLS model and affects inlining.
  4288. case $host_cpu in
  4289. hppa*64*)
  4290. # +Z the default
  4291. ;;
  4292. *)
  4293. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4294. ;;
  4295. esac
  4296. ;;
  4297. interix[[3-9]]*)
  4298. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  4299. # Instead, we relocate shared libraries at runtime.
  4300. ;;
  4301. msdosdjgpp*)
  4302. # Just because we use GCC doesn't mean we suddenly get shared libraries
  4303. # on systems that don't support them.
  4304. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4305. enable_shared=no
  4306. ;;
  4307. *nto* | *qnx*)
  4308. # QNX uses GNU C++, but need to define -shared option too, otherwise
  4309. # it will coredump.
  4310. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4311. ;;
  4312. sysv4*MP*)
  4313. if test -d /usr/nec; then
  4314. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  4315. fi
  4316. ;;
  4317. *)
  4318. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4319. ;;
  4320. esac
  4321. case $cc_basename in
  4322. nvcc*) # Cuda Compiler Driver 2.2
  4323. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
  4324. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  4325. _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
  4326. fi
  4327. ;;
  4328. esac
  4329. else
  4330. # PORTME Check for flag to pass linker flags through the system compiler.
  4331. case $host_os in
  4332. aix*)
  4333. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4334. if test ia64 = "$host_cpu"; then
  4335. # AIX 5 now supports IA64 processor
  4336. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4337. else
  4338. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  4339. fi
  4340. ;;
  4341. darwin* | rhapsody*)
  4342. # PIC is the default on this platform
  4343. # Common symbols not allowed in MH_DYLIB files
  4344. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  4345. case $cc_basename in
  4346. nagfor*)
  4347. # NAG Fortran compiler
  4348. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
  4349. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4350. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4351. ;;
  4352. esac
  4353. ;;
  4354. mingw* | windows* | cygwin* | pw32* | os2* | cegcc*)
  4355. # This hack is so that the source file can tell whether it is being
  4356. # built for inclusion in a dll (and should export symbols for example).
  4357. m4_if([$1], [GCJ], [],
  4358. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  4359. case $host_os in
  4360. os2*)
  4361. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
  4362. ;;
  4363. esac
  4364. ;;
  4365. hpux9* | hpux10* | hpux11*)
  4366. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4367. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  4368. # not for PA HP-UX.
  4369. case $host_cpu in
  4370. hppa*64*|ia64*)
  4371. # +Z the default
  4372. ;;
  4373. *)
  4374. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4375. ;;
  4376. esac
  4377. # Is there a better lt_prog_compiler_static that works with the bundled CC?
  4378. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
  4379. ;;
  4380. irix5* | irix6* | nonstopux*)
  4381. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4382. # PIC (with -KPIC) is the default.
  4383. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4384. ;;
  4385. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  4386. case $cc_basename in
  4387. # old Intel for x86_64, which still supported -KPIC.
  4388. ecc*)
  4389. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4390. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4391. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4392. ;;
  4393. *flang* | ftn | f18* | f95*)
  4394. # Flang compiler.
  4395. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4396. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4397. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4398. ;;
  4399. # icc used to be incompatible with GCC.
  4400. # ICC 10 doesn't accept -KPIC any more.
  4401. icc* | ifort*)
  4402. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4403. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4404. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4405. ;;
  4406. # Lahey Fortran 8.1.
  4407. lf95*)
  4408. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4409. _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
  4410. _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
  4411. ;;
  4412. nagfor*)
  4413. # NAG Fortran compiler
  4414. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
  4415. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4416. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4417. ;;
  4418. tcc*)
  4419. # Fabrice Bellard et al's Tiny C Compiler
  4420. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4421. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4422. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4423. ;;
  4424. pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
  4425. # Portland Group compilers (*not* the Pentium gcc compiler,
  4426. # which looks to be a dead project)
  4427. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4428. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4429. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4430. ;;
  4431. ccc*)
  4432. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4433. # All Alpha code is PIC.
  4434. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4435. ;;
  4436. xl* | bgxl* | bgf* | mpixl*)
  4437. # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
  4438. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4439. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  4440. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  4441. ;;
  4442. *)
  4443. case `$CC -V 2>&1 | $SED 5q` in
  4444. *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
  4445. # Sun Fortran 8.3 passes all unrecognized flags to the linker
  4446. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4447. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4448. _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
  4449. ;;
  4450. *Sun\ F* | *Sun*Fortran*)
  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)='-Qoption ld '
  4454. ;;
  4455. *Sun\ C*)
  4456. # Sun C 5.9
  4457. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4458. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4459. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4460. ;;
  4461. *Intel*\ [[CF]]*Compiler*)
  4462. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4463. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4464. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4465. ;;
  4466. *Portland\ Group*)
  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)='-Bstatic'
  4470. ;;
  4471. esac
  4472. ;;
  4473. esac
  4474. ;;
  4475. newsos6)
  4476. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4477. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4478. ;;
  4479. *-mlibc)
  4480. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4481. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4482. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4483. ;;
  4484. *nto* | *qnx*)
  4485. # QNX uses GNU C++, but need to define -shared option too, otherwise
  4486. # it will coredump.
  4487. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4488. ;;
  4489. osf3* | osf4* | osf5*)
  4490. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4491. # All OSF/1 code is PIC.
  4492. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4493. ;;
  4494. rdos*)
  4495. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4496. ;;
  4497. serenity*)
  4498. ;;
  4499. solaris*)
  4500. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4501. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4502. case $cc_basename in
  4503. f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
  4504. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
  4505. *)
  4506. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
  4507. esac
  4508. ;;
  4509. sunos4*)
  4510. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4511. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4512. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4513. ;;
  4514. sysv4 | sysv4.2uw2* | sysv4.3*)
  4515. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4516. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4517. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4518. ;;
  4519. sysv4*MP*)
  4520. if test -d /usr/nec; then
  4521. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
  4522. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4523. fi
  4524. ;;
  4525. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  4526. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4527. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4528. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4529. ;;
  4530. unicos*)
  4531. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4532. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4533. ;;
  4534. uts4*)
  4535. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4536. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4537. ;;
  4538. *)
  4539. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4540. ;;
  4541. esac
  4542. fi
  4543. ])
  4544. case $host_os in
  4545. # For platforms that do not support PIC, -DPIC is meaningless:
  4546. *djgpp*)
  4547. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4548. ;;
  4549. *)
  4550. _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
  4551. ;;
  4552. esac
  4553. AC_CACHE_CHECK([for $compiler option to produce PIC],
  4554. [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
  4555. [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
  4556. _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
  4557. #
  4558. # Check to make sure the PIC flag actually works.
  4559. #
  4560. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  4561. _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
  4562. [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
  4563. [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
  4564. [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
  4565. "" | " "*) ;;
  4566. *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
  4567. esac],
  4568. [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4569. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
  4570. fi
  4571. _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
  4572. [Additional compiler flags for building library objects])
  4573. _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
  4574. [How to pass a linker flag through the compiler])
  4575. #
  4576. # Check to make sure the static flag actually works.
  4577. #
  4578. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
  4579. _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
  4580. _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
  4581. $lt_tmp_static_flag,
  4582. [],
  4583. [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
  4584. _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
  4585. [Compiler flag to prevent dynamic linking])
  4586. ])# _LT_COMPILER_PIC
  4587. # _LT_LINKER_SHLIBS([TAGNAME])
  4588. # ----------------------------
  4589. # See if the linker supports building shared libraries.
  4590. m4_defun([_LT_LINKER_SHLIBS],
  4591. [AC_REQUIRE([LT_PATH_LD])dnl
  4592. AC_REQUIRE([LT_PATH_NM])dnl
  4593. m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  4594. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  4595. m4_require([_LT_DECL_EGREP])dnl
  4596. m4_require([_LT_DECL_SED])dnl
  4597. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  4598. m4_require([_LT_TAG_COMPILER])dnl
  4599. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  4600. m4_if([$1], [CXX], [
  4601. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4602. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  4603. case $host_os in
  4604. aix[[4-9]]*)
  4605. # If we're using GNU nm, then we don't want the "-C" option.
  4606. # -C means demangle to GNU nm, but means don't demangle to AIX nm.
  4607. # Without the "-l" option, or with the "-B" option, AIX nm treats
  4608. # weak defined symbols like other global defined symbols, whereas
  4609. # GNU nm marks them as "W".
  4610. # While the 'weak' keyword is ignored in the Export File, we need
  4611. # it in the Import File for the 'aix-soname' feature, so we have
  4612. # to replace the "-B" option with "-P" for AIX nm.
  4613. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  4614. _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'
  4615. else
  4616. _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'
  4617. fi
  4618. ;;
  4619. pw32*)
  4620. _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
  4621. ;;
  4622. cygwin* | mingw* | windows* | cegcc*)
  4623. case $cc_basename in
  4624. cl* | icl*)
  4625. _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  4626. ;;
  4627. *)
  4628. _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'
  4629. _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  4630. ;;
  4631. esac
  4632. ;;
  4633. *)
  4634. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4635. ;;
  4636. esac
  4637. ], [
  4638. runpath_var=
  4639. _LT_TAGVAR(allow_undefined_flag, $1)=
  4640. _LT_TAGVAR(always_export_symbols, $1)=no
  4641. _LT_TAGVAR(archive_cmds, $1)=
  4642. _LT_TAGVAR(archive_expsym_cmds, $1)=
  4643. _LT_TAGVAR(compiler_needs_object, $1)=no
  4644. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  4645. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  4646. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4647. _LT_TAGVAR(hardcode_automatic, $1)=no
  4648. _LT_TAGVAR(hardcode_direct, $1)=no
  4649. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  4650. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4651. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  4652. _LT_TAGVAR(hardcode_minus_L, $1)=no
  4653. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  4654. _LT_TAGVAR(inherit_rpath, $1)=no
  4655. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  4656. _LT_TAGVAR(module_cmds, $1)=
  4657. _LT_TAGVAR(module_expsym_cmds, $1)=
  4658. _LT_TAGVAR(old_archive_from_new_cmds, $1)=
  4659. _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
  4660. _LT_TAGVAR(thread_safe_flag_spec, $1)=
  4661. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4662. # include_expsyms should be a list of space-separated symbols to be *always*
  4663. # included in the symbol list
  4664. _LT_TAGVAR(include_expsyms, $1)=
  4665. # exclude_expsyms can be an extended regexp of symbols to exclude
  4666. # it will be wrapped by ' (' and ')$', so one must not match beginning or
  4667. # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
  4668. # as well as any symbol that contains 'd'.
  4669. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  4670. # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  4671. # platforms (ab)use it in PIC code, but their linkers get confused if
  4672. # the symbol is explicitly referenced. Since portable code cannot
  4673. # rely on this symbol name, it's probably fine to never include it in
  4674. # preloaded symbol tables.
  4675. # Exclude shared library initialization/finalization symbols.
  4676. dnl Note also adjust exclude_expsyms for C++ above.
  4677. extract_expsyms_cmds=
  4678. case $host_os in
  4679. cygwin* | mingw* | windows* | pw32* | cegcc*)
  4680. # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
  4681. # When not using gcc, we currently assume that we are using
  4682. # Microsoft Visual C++ or Intel C++ Compiler.
  4683. if test yes != "$GCC"; then
  4684. with_gnu_ld=no
  4685. fi
  4686. ;;
  4687. interix*)
  4688. # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
  4689. with_gnu_ld=yes
  4690. ;;
  4691. esac
  4692. _LT_TAGVAR(ld_shlibs, $1)=yes
  4693. # On some targets, GNU ld is compatible enough with the native linker
  4694. # that we're better off using the native interface for both.
  4695. lt_use_gnu_ld_interface=no
  4696. if test yes = "$with_gnu_ld"; then
  4697. case $host_os in
  4698. aix*)
  4699. # The AIX port of GNU ld has always aspired to compatibility
  4700. # with the native linker. However, as the warning in the GNU ld
  4701. # block says, versions before 2.19.5* couldn't really create working
  4702. # shared libraries, regardless of the interface used.
  4703. case `$LD -v 2>&1` in
  4704. *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
  4705. *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
  4706. *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
  4707. *)
  4708. lt_use_gnu_ld_interface=yes
  4709. ;;
  4710. esac
  4711. ;;
  4712. *)
  4713. lt_use_gnu_ld_interface=yes
  4714. ;;
  4715. esac
  4716. fi
  4717. if test yes = "$lt_use_gnu_ld_interface"; then
  4718. # If archive_cmds runs LD, not CC, wlarc should be empty
  4719. wlarc='$wl'
  4720. # Set some defaults for GNU ld with shared library support. These
  4721. # are reset later if shared libraries are not supported. Putting them
  4722. # here allows them to be overridden if necessary.
  4723. runpath_var=LD_RUN_PATH
  4724. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  4725. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  4726. # ancient GNU ld didn't support --whole-archive et. al.
  4727. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
  4728. _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
  4729. else
  4730. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4731. fi
  4732. supports_anon_versioning=no
  4733. case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in
  4734. *GNU\ gold*) supports_anon_versioning=yes ;;
  4735. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
  4736. *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
  4737. *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
  4738. *\ 2.11.*) ;; # other 2.11 versions
  4739. *) supports_anon_versioning=yes ;;
  4740. esac
  4741. # See if GNU ld supports shared libraries.
  4742. case $host_os in
  4743. aix[[3-9]]*)
  4744. # On AIX/PPC, the GNU linker is very broken
  4745. if test ia64 != "$host_cpu"; then
  4746. _LT_TAGVAR(ld_shlibs, $1)=no
  4747. cat <<_LT_EOF 1>&2
  4748. *** Warning: the GNU linker, at least up to release 2.19, is reported
  4749. *** to be unable to reliably create shared libraries on AIX.
  4750. *** Therefore, libtool is disabling shared libraries support. If you
  4751. *** really care for shared libraries, you may want to install binutils
  4752. *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
  4753. *** You will then need to restart the configuration process.
  4754. _LT_EOF
  4755. fi
  4756. ;;
  4757. amigaos*)
  4758. case $host_cpu in
  4759. powerpc)
  4760. # see comment about AmigaOS4 .so support
  4761. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4762. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  4763. ;;
  4764. m68k)
  4765. _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)'
  4766. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4767. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4768. ;;
  4769. esac
  4770. ;;
  4771. beos*)
  4772. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4773. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4774. # Joseph Beckenbach <[email protected]> says some releases of gcc
  4775. # support --undefined. This deserves some investigation. FIXME
  4776. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4777. else
  4778. _LT_TAGVAR(ld_shlibs, $1)=no
  4779. fi
  4780. ;;
  4781. cygwin* | mingw* | windows* | pw32* | cegcc*)
  4782. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  4783. # as there is no search path for DLLs.
  4784. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4785. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
  4786. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4787. _LT_TAGVAR(always_export_symbols, $1)=no
  4788. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4789. _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'
  4790. _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  4791. _LT_TAGVAR(file_list_spec, $1)='@'
  4792. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  4793. _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'
  4794. # If the export-symbols file already is a .def file, use it as
  4795. # is; otherwise, prepend EXPORTS...
  4796. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  4797. cp $export_symbols $output_objdir/$soname.def;
  4798. else
  4799. echo EXPORTS > $output_objdir/$soname.def;
  4800. cat $export_symbols >> $output_objdir/$soname.def;
  4801. fi~
  4802. $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  4803. else
  4804. _LT_TAGVAR(ld_shlibs, $1)=no
  4805. fi
  4806. ;;
  4807. haiku*)
  4808. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4809. _LT_TAGVAR(link_all_deplibs, $1)=no
  4810. ;;
  4811. os2*)
  4812. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4813. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4814. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4815. shrext_cmds=.dll
  4816. _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  4817. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  4818. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  4819. $ECHO EXPORTS >> $output_objdir/$libname.def~
  4820. emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
  4821. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  4822. emximp -o $lib $output_objdir/$libname.def'
  4823. _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  4824. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  4825. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  4826. $ECHO EXPORTS >> $output_objdir/$libname.def~
  4827. prefix_cmds="$SED"~
  4828. if test EXPORTS = "`$SED 1q $export_symbols`"; then
  4829. prefix_cmds="$prefix_cmds -e 1d";
  4830. fi~
  4831. prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
  4832. cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
  4833. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  4834. emximp -o $lib $output_objdir/$libname.def'
  4835. _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
  4836. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4837. _LT_TAGVAR(file_list_spec, $1)='@'
  4838. ;;
  4839. interix[[3-9]]*)
  4840. _LT_TAGVAR(hardcode_direct, $1)=no
  4841. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4842. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  4843. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  4844. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  4845. # Instead, shared libraries are loaded at an image base (0x10000000 by
  4846. # default) and relocated if they conflict, which is a slow very memory
  4847. # consuming and fragmenting process. To avoid this, we pick a random,
  4848. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  4849. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  4850. _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'
  4851. _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'
  4852. ;;
  4853. gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
  4854. tmp_diet=no
  4855. if test linux-dietlibc = "$host_os"; then
  4856. case $cc_basename in
  4857. diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
  4858. esac
  4859. fi
  4860. if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
  4861. && test no = "$tmp_diet"
  4862. then
  4863. tmp_addflag=' $pic_flag'
  4864. tmp_sharedflag='-shared'
  4865. case $cc_basename,$host_cpu in
  4866. pgcc*) # Portland Group C compiler
  4867. _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'
  4868. tmp_addflag=' $pic_flag'
  4869. ;;
  4870. pgf77* | pgf90* | pgf95* | pgfortran*)
  4871. # Portland Group f77 and f90 compilers
  4872. _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'
  4873. tmp_addflag=' $pic_flag -Mnomain' ;;
  4874. ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
  4875. tmp_addflag=' -i_dynamic' ;;
  4876. efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
  4877. tmp_addflag=' -i_dynamic -nofor_main' ;;
  4878. ifc* | ifort*) # Intel Fortran compiler
  4879. tmp_addflag=' -nofor_main' ;;
  4880. lf95*) # Lahey Fortran 8.1
  4881. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4882. tmp_sharedflag='--shared' ;;
  4883. nagfor*) # NAGFOR 5.3
  4884. tmp_sharedflag='-Wl,-shared' ;;
  4885. xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
  4886. tmp_sharedflag='-qmkshrobj'
  4887. tmp_addflag= ;;
  4888. nvcc*) # Cuda Compiler Driver 2.2
  4889. _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'
  4890. _LT_TAGVAR(compiler_needs_object, $1)=yes
  4891. ;;
  4892. esac
  4893. case `$CC -V 2>&1 | $SED 5q` in
  4894. *Sun\ C*) # Sun C 5.9
  4895. _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'
  4896. _LT_TAGVAR(compiler_needs_object, $1)=yes
  4897. tmp_sharedflag='-G' ;;
  4898. *Sun\ F*) # Sun Fortran 8.3
  4899. tmp_sharedflag='-G' ;;
  4900. esac
  4901. _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4902. if test yes = "$supports_anon_versioning"; then
  4903. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  4904. cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4905. echo "local: *; };" >> $output_objdir/$libname.ver~
  4906. $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
  4907. fi
  4908. case $cc_basename in
  4909. tcc*)
  4910. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  4911. _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
  4912. ;;
  4913. xlf* | bgf* | bgxlf* | mpixlf*)
  4914. # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
  4915. _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
  4916. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  4917. _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
  4918. if test yes = "$supports_anon_versioning"; then
  4919. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  4920. cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4921. echo "local: *; };" >> $output_objdir/$libname.ver~
  4922. $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
  4923. fi
  4924. ;;
  4925. esac
  4926. else
  4927. _LT_TAGVAR(ld_shlibs, $1)=no
  4928. fi
  4929. ;;
  4930. *-mlibc)
  4931. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4932. _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'
  4933. ;;
  4934. netbsd* | netbsdelf*-gnu)
  4935. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  4936. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  4937. wlarc=
  4938. else
  4939. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4940. _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'
  4941. fi
  4942. ;;
  4943. solaris*)
  4944. if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
  4945. _LT_TAGVAR(ld_shlibs, $1)=no
  4946. cat <<_LT_EOF 1>&2
  4947. *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  4948. *** create shared libraries on Solaris systems. Therefore, libtool
  4949. *** is disabling shared libraries support. We urge you to upgrade GNU
  4950. *** binutils to release 2.9.1 or newer. Another option is to modify
  4951. *** your PATH or compiler configuration so that the native linker is
  4952. *** used, and then restart.
  4953. _LT_EOF
  4954. elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4955. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4956. _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'
  4957. else
  4958. _LT_TAGVAR(ld_shlibs, $1)=no
  4959. fi
  4960. ;;
  4961. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
  4962. case `$LD -v 2>&1` in
  4963. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
  4964. _LT_TAGVAR(ld_shlibs, $1)=no
  4965. cat <<_LT_EOF 1>&2
  4966. *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
  4967. *** reliably create shared libraries on SCO systems. Therefore, libtool
  4968. *** is disabling shared libraries support. We urge you to upgrade GNU
  4969. *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
  4970. *** your PATH or compiler configuration so that the native linker is
  4971. *** used, and then restart.
  4972. _LT_EOF
  4973. ;;
  4974. *)
  4975. # For security reasons, it is highly recommended that you always
  4976. # use absolute paths for naming shared libraries, and exclude the
  4977. # DT_RUNPATH tag from executables and libraries. But doing so
  4978. # requires that you compile everything twice, which is a pain.
  4979. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4980. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  4981. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4982. _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'
  4983. else
  4984. _LT_TAGVAR(ld_shlibs, $1)=no
  4985. fi
  4986. ;;
  4987. esac
  4988. ;;
  4989. sunos4*)
  4990. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4991. wlarc=
  4992. _LT_TAGVAR(hardcode_direct, $1)=yes
  4993. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4994. ;;
  4995. *)
  4996. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4997. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4998. _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'
  4999. else
  5000. _LT_TAGVAR(ld_shlibs, $1)=no
  5001. fi
  5002. ;;
  5003. esac
  5004. if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
  5005. runpath_var=
  5006. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  5007. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  5008. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5009. fi
  5010. else
  5011. # PORTME fill in a description of your system's linker (not GNU ld)
  5012. case $host_os in
  5013. aix3*)
  5014. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5015. _LT_TAGVAR(always_export_symbols, $1)=yes
  5016. _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'
  5017. # Note: this linker hardcodes the directories in LIBPATH if there
  5018. # are no directories specified by -L.
  5019. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5020. if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
  5021. # Neither direct hardcoding nor static linking is supported with a
  5022. # broken collect2.
  5023. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  5024. fi
  5025. ;;
  5026. aix[[4-9]]*)
  5027. if test ia64 = "$host_cpu"; then
  5028. # On IA64, the linker does run time linking by default, so we don't
  5029. # have to do anything special.
  5030. aix_use_runtimelinking=no
  5031. exp_sym_flag='-Bexport'
  5032. no_entry_flag=
  5033. else
  5034. # If we're using GNU nm, then we don't want the "-C" option.
  5035. # -C means demangle to GNU nm, but means don't demangle to AIX nm.
  5036. # Without the "-l" option, or with the "-B" option, AIX nm treats
  5037. # weak defined symbols like other global defined symbols, whereas
  5038. # GNU nm marks them as "W".
  5039. # While the 'weak' keyword is ignored in the Export File, we need
  5040. # it in the Import File for the 'aix-soname' feature, so we have
  5041. # to replace the "-B" option with "-P" for AIX nm.
  5042. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  5043. _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'
  5044. else
  5045. _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'
  5046. fi
  5047. aix_use_runtimelinking=no
  5048. # Test if we are trying to use run time linking or normal
  5049. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  5050. # have runtime linking enabled, and use it for executables.
  5051. # For shared libraries, we enable/disable runtime linking
  5052. # depending on the kind of the shared library created -
  5053. # when "with_aix_soname,aix_use_runtimelinking" is:
  5054. # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
  5055. # "aix,yes" lib.so shared, rtl:yes, for executables
  5056. # lib.a static archive
  5057. # "both,no" lib.so.V(shr.o) shared, rtl:yes
  5058. # lib.a(lib.so.V) shared, rtl:no, for executables
  5059. # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
  5060. # lib.a(lib.so.V) shared, rtl:no
  5061. # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
  5062. # lib.a static archive
  5063. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  5064. for ld_flag in $LDFLAGS; do
  5065. if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
  5066. aix_use_runtimelinking=yes
  5067. break
  5068. fi
  5069. done
  5070. if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
  5071. # With aix-soname=svr4, we create the lib.so.V shared archives only,
  5072. # so we don't have lib.a shared libs to link our executables.
  5073. # We have to force runtime linking in this case.
  5074. aix_use_runtimelinking=yes
  5075. LDFLAGS="$LDFLAGS -Wl,-brtl"
  5076. fi
  5077. ;;
  5078. esac
  5079. exp_sym_flag='-bexport'
  5080. no_entry_flag='-bnoentry'
  5081. fi
  5082. # When large executables or shared objects are built, AIX ld can
  5083. # have problems creating the table of contents. If linking a library
  5084. # or program results in "error TOC overflow" add -mminimal-toc to
  5085. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  5086. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  5087. _LT_TAGVAR(archive_cmds, $1)=''
  5088. _LT_TAGVAR(hardcode_direct, $1)=yes
  5089. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5090. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5091. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5092. _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
  5093. case $with_aix_soname,$aix_use_runtimelinking in
  5094. aix,*) ;; # traditional, no import file
  5095. svr4,* | *,yes) # use import file
  5096. # The Import File defines what to hardcode.
  5097. _LT_TAGVAR(hardcode_direct, $1)=no
  5098. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  5099. ;;
  5100. esac
  5101. if test yes = "$GCC"; then
  5102. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  5103. # We only want to do this on AIX 4.2 and lower, the check
  5104. # below for broken collect2 doesn't work under 4.3+
  5105. collect2name=`$CC -print-prog-name=collect2`
  5106. if test -f "$collect2name" &&
  5107. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  5108. then
  5109. # We have reworked collect2
  5110. :
  5111. else
  5112. # We have old collect2
  5113. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  5114. # It fails to find uninstalled libraries when the uninstalled
  5115. # path is not listed in the libpath. Setting hardcode_minus_L
  5116. # to unsupported forces relinking
  5117. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5118. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5119. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5120. fi
  5121. ;;
  5122. esac
  5123. shared_flag='-shared'
  5124. if test yes = "$aix_use_runtimelinking"; then
  5125. shared_flag="$shared_flag "'$wl-G'
  5126. fi
  5127. # Need to ensure runtime linking is disabled for the traditional
  5128. # shared library, or the linker may eventually find shared libraries
  5129. # /with/ Import File - we do not want to mix them.
  5130. shared_flag_aix='-shared'
  5131. shared_flag_svr4='-shared $wl-G'
  5132. else
  5133. # not using gcc
  5134. if test ia64 = "$host_cpu"; then
  5135. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  5136. # chokes on -Wl,-G. The following line is correct:
  5137. shared_flag='-G'
  5138. else
  5139. if test yes = "$aix_use_runtimelinking"; then
  5140. shared_flag='$wl-G'
  5141. else
  5142. shared_flag='$wl-bM:SRE'
  5143. fi
  5144. shared_flag_aix='$wl-bM:SRE'
  5145. shared_flag_svr4='$wl-G'
  5146. fi
  5147. fi
  5148. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
  5149. # It seems that -bexpall does not export symbols beginning with
  5150. # underscore (_), so it is better to generate a list of symbols to export.
  5151. _LT_TAGVAR(always_export_symbols, $1)=yes
  5152. if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
  5153. # Warning - without using the other runtime loading flags (-brtl),
  5154. # -berok will link without error, but may produce a broken library.
  5155. _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
  5156. # Determine the default libpath from the value encoded in an
  5157. # empty executable.
  5158. _LT_SYS_MODULE_PATH_AIX([$1])
  5159. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
  5160. _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
  5161. else
  5162. if test ia64 = "$host_cpu"; then
  5163. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
  5164. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  5165. _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"
  5166. else
  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. # Warning - without using the other run time loading flags,
  5172. # -berok will link without error, but may produce a broken library.
  5173. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
  5174. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
  5175. if test yes = "$with_gnu_ld"; then
  5176. # We only use this code for GNU lds that support --whole-archive.
  5177. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
  5178. else
  5179. # Exported symbols can be pulled into shared objects from archives
  5180. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  5181. fi
  5182. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5183. _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
  5184. # -brtl affects multiple linker settings, -berok does not and is overridden later
  5185. compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
  5186. if test svr4 != "$with_aix_soname"; then
  5187. # This is similar to how AIX traditionally builds its shared libraries.
  5188. _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'
  5189. fi
  5190. if test aix != "$with_aix_soname"; then
  5191. _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'
  5192. else
  5193. # used by -dlpreopen to get the symbols
  5194. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
  5195. fi
  5196. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
  5197. fi
  5198. fi
  5199. ;;
  5200. amigaos*)
  5201. case $host_cpu in
  5202. powerpc)
  5203. # see comment about AmigaOS4 .so support
  5204. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  5205. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  5206. ;;
  5207. m68k)
  5208. _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)'
  5209. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5210. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5211. ;;
  5212. esac
  5213. ;;
  5214. bsdi[[45]]*)
  5215. _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
  5216. ;;
  5217. cygwin* | mingw* | windows* | pw32* | cegcc*)
  5218. # When not using gcc, we currently assume that we are using
  5219. # Microsoft Visual C++ or Intel C++ Compiler.
  5220. # hardcode_libdir_flag_spec is actually meaningless, as there is
  5221. # no search path for DLLs.
  5222. case $cc_basename in
  5223. cl* | icl*)
  5224. # Native MSVC or ICC
  5225. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  5226. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5227. _LT_TAGVAR(always_export_symbols, $1)=yes
  5228. _LT_TAGVAR(file_list_spec, $1)='@'
  5229. # Tell ltmain to make .lib files, not .a files.
  5230. libext=lib
  5231. # Tell ltmain to make .dll files, not .so files.
  5232. shrext_cmds=.dll
  5233. # FIXME: Setting linknames here is a bad hack.
  5234. _LT_TAGVAR(archive_cmds, $1)='$CC -Fe$output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
  5235. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  5236. cp "$export_symbols" "$output_objdir/$soname.def";
  5237. echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
  5238. else
  5239. $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
  5240. fi~
  5241. $CC -Fe$tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  5242. linknames='
  5243. # The linker will not automatically build a static lib if we build a DLL.
  5244. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  5245. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5246. _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  5247. _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'
  5248. # Don't use ranlib
  5249. _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  5250. _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  5251. lt_tool_outputfile="@TOOL_OUTPUT@"~
  5252. case $lt_outputfile in
  5253. *.exe|*.EXE) ;;
  5254. *)
  5255. lt_outputfile=$lt_outputfile.exe
  5256. lt_tool_outputfile=$lt_tool_outputfile.exe
  5257. ;;
  5258. esac~
  5259. if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
  5260. $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  5261. $RM "$lt_outputfile.manifest";
  5262. fi'
  5263. ;;
  5264. *)
  5265. # Assume MSVC and ICC wrapper
  5266. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  5267. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5268. # Tell ltmain to make .lib files, not .a files.
  5269. libext=lib
  5270. # Tell ltmain to make .dll files, not .so files.
  5271. shrext_cmds=.dll
  5272. # FIXME: Setting linknames here is a bad hack.
  5273. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
  5274. # The linker will automatically build a .lib file if we build a DLL.
  5275. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  5276. # FIXME: Should let the user specify the lib program.
  5277. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
  5278. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5279. ;;
  5280. esac
  5281. ;;
  5282. darwin* | rhapsody*)
  5283. _LT_DARWIN_LINKER_FEATURES($1)
  5284. ;;
  5285. dgux*)
  5286. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5287. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5288. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5289. ;;
  5290. # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  5291. # support. Future versions do this automatically, but an explicit c++rt0.o
  5292. # does not break anything, and helps significantly (at the cost of a little
  5293. # extra space).
  5294. freebsd2.2*)
  5295. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
  5296. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5297. _LT_TAGVAR(hardcode_direct, $1)=yes
  5298. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5299. ;;
  5300. # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  5301. freebsd2.*)
  5302. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  5303. _LT_TAGVAR(hardcode_direct, $1)=yes
  5304. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5305. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5306. ;;
  5307. # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  5308. freebsd* | dragonfly* | midnightbsd*)
  5309. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5310. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5311. _LT_TAGVAR(hardcode_direct, $1)=yes
  5312. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5313. ;;
  5314. hpux9*)
  5315. if test yes = "$GCC"; then
  5316. _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'
  5317. else
  5318. _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'
  5319. fi
  5320. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  5321. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5322. _LT_TAGVAR(hardcode_direct, $1)=yes
  5323. # hardcode_minus_L: Not really in the search PATH,
  5324. # but as the default location of the library.
  5325. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5326. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  5327. ;;
  5328. hpux10*)
  5329. if test yes,no = "$GCC,$with_gnu_ld"; then
  5330. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  5331. else
  5332. _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
  5333. fi
  5334. if test no = "$with_gnu_ld"; then
  5335. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  5336. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5337. _LT_TAGVAR(hardcode_direct, $1)=yes
  5338. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5339. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  5340. # hardcode_minus_L: Not really in the search PATH,
  5341. # but as the default location of the library.
  5342. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5343. fi
  5344. ;;
  5345. hpux11*)
  5346. if test yes,no = "$GCC,$with_gnu_ld"; then
  5347. case $host_cpu in
  5348. hppa*64*)
  5349. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
  5350. ;;
  5351. ia64*)
  5352. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  5353. ;;
  5354. *)
  5355. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  5356. ;;
  5357. esac
  5358. else
  5359. case $host_cpu in
  5360. hppa*64*)
  5361. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
  5362. ;;
  5363. ia64*)
  5364. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  5365. ;;
  5366. *)
  5367. m4_if($1, [], [
  5368. # Older versions of the 11.00 compiler do not understand -b yet
  5369. # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
  5370. _LT_LINKER_OPTION([if $CC understands -b],
  5371. _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
  5372. [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
  5373. [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
  5374. [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
  5375. ;;
  5376. esac
  5377. fi
  5378. if test no = "$with_gnu_ld"; then
  5379. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  5380. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5381. case $host_cpu in
  5382. hppa*64*|ia64*)
  5383. _LT_TAGVAR(hardcode_direct, $1)=no
  5384. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5385. ;;
  5386. *)
  5387. _LT_TAGVAR(hardcode_direct, $1)=yes
  5388. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5389. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  5390. # hardcode_minus_L: Not really in the search PATH,
  5391. # but as the default location of the library.
  5392. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5393. ;;
  5394. esac
  5395. fi
  5396. ;;
  5397. irix5* | irix6* | nonstopux*)
  5398. if test yes = "$GCC"; then
  5399. _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'
  5400. # Try to use the -exported_symbol ld option, if it does not
  5401. # work, assume that -exports_file does not work either and
  5402. # implicitly export all symbols.
  5403. # This should be the same for all languages, so no per-tag cache variable.
  5404. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
  5405. [lt_cv_irix_exported_symbol],
  5406. [save_LDFLAGS=$LDFLAGS
  5407. LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
  5408. AC_LINK_IFELSE(
  5409. [AC_LANG_SOURCE(
  5410. [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
  5411. [C++], [[int foo (void) { return 0; }]],
  5412. [Fortran 77], [[
  5413. subroutine foo
  5414. end]],
  5415. [Fortran], [[
  5416. subroutine foo
  5417. end]])])],
  5418. [lt_cv_irix_exported_symbol=yes],
  5419. [lt_cv_irix_exported_symbol=no])
  5420. LDFLAGS=$save_LDFLAGS])
  5421. if test yes = "$lt_cv_irix_exported_symbol"; then
  5422. _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'
  5423. fi
  5424. else
  5425. _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'
  5426. _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'
  5427. fi
  5428. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  5429. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5430. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5431. _LT_TAGVAR(inherit_rpath, $1)=yes
  5432. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5433. ;;
  5434. linux*)
  5435. case $cc_basename in
  5436. tcc*)
  5437. # Fabrice Bellard et al's Tiny C Compiler
  5438. _LT_TAGVAR(ld_shlibs, $1)=yes
  5439. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5440. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5441. ;;
  5442. esac
  5443. ;;
  5444. *-mlibc)
  5445. ;;
  5446. netbsd* | netbsdelf*-gnu)
  5447. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  5448. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
  5449. else
  5450. _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
  5451. fi
  5452. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5453. _LT_TAGVAR(hardcode_direct, $1)=yes
  5454. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5455. ;;
  5456. newsos6)
  5457. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5458. _LT_TAGVAR(hardcode_direct, $1)=yes
  5459. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5460. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5461. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5462. ;;
  5463. *nto* | *qnx*)
  5464. ;;
  5465. openbsd*)
  5466. if test -f /usr/libexec/ld.so; then
  5467. _LT_TAGVAR(hardcode_direct, $1)=yes
  5468. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5469. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5470. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
  5471. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5472. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
  5473. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  5474. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  5475. else
  5476. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5477. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  5478. fi
  5479. else
  5480. _LT_TAGVAR(ld_shlibs, $1)=no
  5481. fi
  5482. ;;
  5483. os2*)
  5484. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5485. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5486. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5487. shrext_cmds=.dll
  5488. _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  5489. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  5490. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  5491. $ECHO EXPORTS >> $output_objdir/$libname.def~
  5492. emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
  5493. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  5494. emximp -o $lib $output_objdir/$libname.def'
  5495. _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  5496. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  5497. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  5498. $ECHO EXPORTS >> $output_objdir/$libname.def~
  5499. prefix_cmds="$SED"~
  5500. if test EXPORTS = "`$SED 1q $export_symbols`"; then
  5501. prefix_cmds="$prefix_cmds -e 1d";
  5502. fi~
  5503. prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
  5504. cat $export_symbols | $prefix_cmds >> $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(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
  5508. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5509. _LT_TAGVAR(file_list_spec, $1)='@'
  5510. ;;
  5511. osf3*)
  5512. if test yes = "$GCC"; then
  5513. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
  5514. _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'
  5515. else
  5516. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  5517. _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'
  5518. fi
  5519. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  5520. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5521. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5522. ;;
  5523. osf4* | osf5*) # as osf3* with the addition of -msym flag
  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 $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'
  5527. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5528. else
  5529. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  5530. _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'
  5531. _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~
  5532. $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'
  5533. # Both c and cxx compiler support -rpath directly
  5534. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  5535. fi
  5536. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  5537. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5538. ;;
  5539. serenity*)
  5540. ;;
  5541. solaris*)
  5542. _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
  5543. if test yes = "$GCC"; then
  5544. wlarc='$wl'
  5545. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
  5546. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5547. $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'
  5548. else
  5549. case `$CC -V 2>&1` in
  5550. *"Compilers 5.0"*)
  5551. wlarc=''
  5552. _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5553. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5554. $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
  5555. ;;
  5556. *)
  5557. wlarc='$wl'
  5558. _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
  5559. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5560. $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
  5561. ;;
  5562. esac
  5563. fi
  5564. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5565. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5566. case $host_os in
  5567. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  5568. *)
  5569. # The compiler driver will combine and reorder linker options,
  5570. # but understands '-z linker_flag'. GCC discards it without '$wl',
  5571. # but is careful enough not to reorder.
  5572. # Supported since Solaris 2.6 (maybe 2.5.1?)
  5573. if test yes = "$GCC"; then
  5574. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
  5575. else
  5576. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  5577. fi
  5578. ;;
  5579. esac
  5580. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5581. ;;
  5582. sunos4*)
  5583. if test sequent = "$host_vendor"; then
  5584. # Use $CC to link under sequent, because it throws in some extra .o
  5585. # files that make .init and .fini sections work.
  5586. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
  5587. else
  5588. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
  5589. fi
  5590. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5591. _LT_TAGVAR(hardcode_direct, $1)=yes
  5592. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5593. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5594. ;;
  5595. sysv4)
  5596. case $host_vendor in
  5597. sni)
  5598. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5599. _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
  5600. ;;
  5601. siemens)
  5602. ## LD is ld it makes a PLAMLIB
  5603. ## CC just makes a GrossModule.
  5604. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  5605. _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
  5606. _LT_TAGVAR(hardcode_direct, $1)=no
  5607. ;;
  5608. motorola)
  5609. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5610. _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
  5611. ;;
  5612. esac
  5613. runpath_var='LD_RUN_PATH'
  5614. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5615. ;;
  5616. sysv4.3*)
  5617. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5618. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5619. _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
  5620. ;;
  5621. sysv4*MP*)
  5622. if test -d /usr/nec; then
  5623. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5624. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5625. runpath_var=LD_RUN_PATH
  5626. hardcode_runpath_var=yes
  5627. _LT_TAGVAR(ld_shlibs, $1)=yes
  5628. fi
  5629. ;;
  5630. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  5631. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  5632. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5633. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5634. runpath_var='LD_RUN_PATH'
  5635. if test yes = "$GCC"; then
  5636. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5637. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5638. else
  5639. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5640. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5641. fi
  5642. ;;
  5643. sysv5* | sco3.2v5* | sco5v6*)
  5644. # Note: We CANNOT use -z defs as we might desire, because we do not
  5645. # link with -lc, and that would cause any symbols used from libc to
  5646. # always be unresolved, which means just about no library would
  5647. # ever link correctly. If we're not using GNU ld we use -z text
  5648. # though, which does catch some bad symbols but isn't as heavy-handed
  5649. # as -z defs.
  5650. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  5651. _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
  5652. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5653. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5654. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
  5655. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5656. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5657. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
  5658. runpath_var='LD_RUN_PATH'
  5659. if test yes = "$GCC"; then
  5660. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5661. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5662. else
  5663. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5664. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5665. fi
  5666. ;;
  5667. uts4*)
  5668. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5669. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5670. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5671. ;;
  5672. *)
  5673. _LT_TAGVAR(ld_shlibs, $1)=no
  5674. ;;
  5675. esac
  5676. if test sni = "$host_vendor"; then
  5677. case $host in
  5678. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  5679. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
  5680. ;;
  5681. esac
  5682. fi
  5683. fi
  5684. ])
  5685. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  5686. test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
  5687. _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
  5688. _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
  5689. _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
  5690. _LT_DECL([], [extract_expsyms_cmds], [2],
  5691. [The commands to extract the exported symbol list from a shared archive])
  5692. #
  5693. # Do we need to explicitly link libc?
  5694. #
  5695. case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
  5696. x|xyes)
  5697. # Assume -lc should be added
  5698. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5699. if test yes,yes = "$GCC,$enable_shared"; then
  5700. case $_LT_TAGVAR(archive_cmds, $1) in
  5701. *'~'*)
  5702. # FIXME: we may have to deal with multi-command sequences.
  5703. ;;
  5704. '$CC '*)
  5705. # Test whether the compiler implicitly links with -lc since on some
  5706. # systems, -lgcc has to come before -lc. If gcc already passes -lc
  5707. # to ld, don't add -lc before -lgcc.
  5708. AC_CACHE_CHECK([whether -lc should be explicitly linked in],
  5709. [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
  5710. [$RM conftest*
  5711. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  5712. if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
  5713. soname=conftest
  5714. lib=conftest
  5715. libobjs=conftest.$ac_objext
  5716. deplibs=
  5717. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
  5718. pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
  5719. compiler_flags=-v
  5720. linker_flags=-v
  5721. verstring=
  5722. output_objdir=.
  5723. libname=conftest
  5724. lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
  5725. _LT_TAGVAR(allow_undefined_flag, $1)=
  5726. if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
  5727. then
  5728. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5729. else
  5730. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5731. fi
  5732. _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
  5733. else
  5734. cat conftest.err 1>&5
  5735. fi
  5736. $RM conftest*
  5737. ])
  5738. _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
  5739. ;;
  5740. esac
  5741. fi
  5742. ;;
  5743. esac
  5744. _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
  5745. [Whether or not to add -lc for building shared libraries])
  5746. _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
  5747. [enable_shared_with_static_runtimes], [0],
  5748. [Whether or not to disallow shared libs when runtime libs are static])
  5749. _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
  5750. [Compiler flag to allow reflexive dlopens])
  5751. _LT_TAGDECL([], [whole_archive_flag_spec], [1],
  5752. [Compiler flag to generate shared objects directly from archives])
  5753. _LT_TAGDECL([], [compiler_needs_object], [1],
  5754. [Whether the compiler copes with passing no objects directly])
  5755. _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
  5756. [Create an old-style archive from a shared archive])
  5757. _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
  5758. [Create a temporary old-style archive to link instead of a shared archive])
  5759. _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
  5760. _LT_TAGDECL([], [archive_expsym_cmds], [2])
  5761. _LT_TAGDECL([], [module_cmds], [2],
  5762. [Commands used to build a loadable module if different from building
  5763. a shared archive.])
  5764. _LT_TAGDECL([], [module_expsym_cmds], [2])
  5765. _LT_TAGDECL([], [with_gnu_ld], [1],
  5766. [Whether we are building with GNU ld or not])
  5767. _LT_TAGDECL([], [allow_undefined_flag], [1],
  5768. [Flag that allows shared libraries with undefined symbols to be built])
  5769. _LT_TAGDECL([], [no_undefined_flag], [1],
  5770. [Flag that enforces no undefined symbols])
  5771. _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
  5772. [Flag to hardcode $libdir into a binary during linking.
  5773. This must work even if $libdir does not exist])
  5774. _LT_TAGDECL([], [hardcode_libdir_separator], [1],
  5775. [Whether we need a single "-rpath" flag with a separated argument])
  5776. _LT_TAGDECL([], [hardcode_direct], [0],
  5777. [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
  5778. DIR into the resulting binary])
  5779. _LT_TAGDECL([], [hardcode_direct_absolute], [0],
  5780. [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
  5781. DIR into the resulting binary and the resulting library dependency is
  5782. "absolute", i.e. impossible to change by setting $shlibpath_var if the
  5783. library is relocated])
  5784. _LT_TAGDECL([], [hardcode_minus_L], [0],
  5785. [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
  5786. into the resulting binary])
  5787. _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
  5788. [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
  5789. into the resulting binary])
  5790. _LT_TAGDECL([], [hardcode_automatic], [0],
  5791. [Set to "yes" if building a shared library automatically hardcodes DIR
  5792. into the library and all subsequent libraries and executables linked
  5793. against it])
  5794. _LT_TAGDECL([], [inherit_rpath], [0],
  5795. [Set to yes if linker adds runtime paths of dependent libraries
  5796. to runtime path list])
  5797. _LT_TAGDECL([], [link_all_deplibs], [0],
  5798. [Whether libtool must link a program against all its dependency libraries])
  5799. _LT_TAGDECL([], [always_export_symbols], [0],
  5800. [Set to "yes" if exported symbols are required])
  5801. _LT_TAGDECL([], [export_symbols_cmds], [2],
  5802. [The commands to list exported symbols])
  5803. _LT_TAGDECL([], [exclude_expsyms], [1],
  5804. [Symbols that should not be listed in the preloaded symbols])
  5805. _LT_TAGDECL([], [include_expsyms], [1],
  5806. [Symbols that must always be exported])
  5807. _LT_TAGDECL([], [prelink_cmds], [2],
  5808. [Commands necessary for linking programs (against libraries) with templates])
  5809. _LT_TAGDECL([], [postlink_cmds], [2],
  5810. [Commands necessary for finishing linking programs])
  5811. _LT_TAGDECL([], [file_list_spec], [1],
  5812. [Specify filename containing input files])
  5813. dnl FIXME: Not yet implemented
  5814. dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
  5815. dnl [Compiler flag to generate thread safe objects])
  5816. ])# _LT_LINKER_SHLIBS
  5817. # _LT_LANG_C_CONFIG([TAG])
  5818. # ------------------------
  5819. # Ensure that the configuration variables for a C compiler are suitably
  5820. # defined. These variables are subsequently used by _LT_CONFIG to write
  5821. # the compiler configuration to 'libtool'.
  5822. m4_defun([_LT_LANG_C_CONFIG],
  5823. [m4_require([_LT_DECL_EGREP])dnl
  5824. lt_save_CC=$CC
  5825. AC_LANG_PUSH(C)
  5826. # Source file extension for C test sources.
  5827. ac_ext=c
  5828. # Object file extension for compiled C test sources.
  5829. objext=o
  5830. _LT_TAGVAR(objext, $1)=$objext
  5831. # Code to be used in simple compile tests
  5832. lt_simple_compile_test_code="int some_variable = 0;"
  5833. # Code to be used in simple link tests
  5834. lt_simple_link_test_code='int main(void){return(0);}'
  5835. _LT_TAG_COMPILER
  5836. # Save the default compiler, since it gets overwritten when the other
  5837. # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
  5838. compiler_DEFAULT=$CC
  5839. # save warnings/boilerplate of simple test code
  5840. _LT_COMPILER_BOILERPLATE
  5841. _LT_LINKER_BOILERPLATE
  5842. ## CAVEAT EMPTOR:
  5843. ## There is no encapsulation within the following macros, do not change
  5844. ## the running order or otherwise move them around unless you know exactly
  5845. ## what you are doing...
  5846. if test -n "$compiler"; then
  5847. _LT_COMPILER_NO_RTTI($1)
  5848. _LT_COMPILER_PIC($1)
  5849. _LT_COMPILER_C_O($1)
  5850. _LT_COMPILER_FILE_LOCKS($1)
  5851. _LT_LINKER_SHLIBS($1)
  5852. _LT_SYS_DYNAMIC_LINKER($1)
  5853. _LT_LINKER_HARDCODE_LIBPATH($1)
  5854. LT_SYS_DLOPEN_SELF
  5855. _LT_CMD_STRIPLIB
  5856. # Report what library types will actually be built
  5857. AC_MSG_CHECKING([if libtool supports shared libraries])
  5858. AC_MSG_RESULT([$can_build_shared])
  5859. AC_MSG_CHECKING([whether to build shared libraries])
  5860. test no = "$can_build_shared" && enable_shared=no
  5861. # On AIX, shared libraries and static libraries use the same namespace, and
  5862. # are all built from PIC.
  5863. case $host_os in
  5864. aix3*)
  5865. test yes = "$enable_shared" && enable_static=no
  5866. if test -n "$RANLIB"; then
  5867. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  5868. postinstall_cmds='$RANLIB $lib'
  5869. fi
  5870. ;;
  5871. aix[[4-9]]*)
  5872. if test ia64 != "$host_cpu"; then
  5873. case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
  5874. yes,aix,yes) ;; # shared object as lib.so file only
  5875. yes,svr4,*) ;; # shared object as lib.so archive member only
  5876. yes,*) enable_static=no ;; # shared object in lib.a archive as well
  5877. esac
  5878. fi
  5879. ;;
  5880. esac
  5881. AC_MSG_RESULT([$enable_shared])
  5882. AC_MSG_CHECKING([whether to build static libraries])
  5883. # Make sure either enable_shared or enable_static is yes.
  5884. test yes = "$enable_shared" || enable_static=yes
  5885. AC_MSG_RESULT([$enable_static])
  5886. _LT_CONFIG($1)
  5887. fi
  5888. AC_LANG_POP
  5889. CC=$lt_save_CC
  5890. ])# _LT_LANG_C_CONFIG
  5891. # _LT_LANG_CXX_CONFIG([TAG])
  5892. # --------------------------
  5893. # Ensure that the configuration variables for a C++ compiler are suitably
  5894. # defined. These variables are subsequently used by _LT_CONFIG to write
  5895. # the compiler configuration to 'libtool'.
  5896. m4_defun([_LT_LANG_CXX_CONFIG],
  5897. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  5898. m4_require([_LT_DECL_EGREP])dnl
  5899. m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  5900. if test -n "$CXX" && ( test no != "$CXX" &&
  5901. ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
  5902. (test g++ != "$CXX"))); then
  5903. AC_PROG_CXXCPP
  5904. else
  5905. _lt_caught_CXX_error=yes
  5906. fi
  5907. AC_LANG_PUSH(C++)
  5908. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5909. _LT_TAGVAR(allow_undefined_flag, $1)=
  5910. _LT_TAGVAR(always_export_symbols, $1)=no
  5911. _LT_TAGVAR(archive_expsym_cmds, $1)=
  5912. _LT_TAGVAR(compiler_needs_object, $1)=no
  5913. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  5914. _LT_TAGVAR(hardcode_direct, $1)=no
  5915. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  5916. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  5917. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5918. _LT_TAGVAR(hardcode_minus_L, $1)=no
  5919. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  5920. _LT_TAGVAR(hardcode_automatic, $1)=no
  5921. _LT_TAGVAR(inherit_rpath, $1)=no
  5922. _LT_TAGVAR(module_cmds, $1)=
  5923. _LT_TAGVAR(module_expsym_cmds, $1)=
  5924. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  5925. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  5926. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  5927. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  5928. _LT_TAGVAR(no_undefined_flag, $1)=
  5929. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5930. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  5931. # Source file extension for C++ test sources.
  5932. ac_ext=cpp
  5933. # Object file extension for compiled C++ test sources.
  5934. objext=o
  5935. _LT_TAGVAR(objext, $1)=$objext
  5936. # No sense in running all these tests if we already determined that
  5937. # the CXX compiler isn't working. Some variables (like enable_shared)
  5938. # are currently assumed to apply to all compilers on this platform,
  5939. # and will be corrupted by setting them based on a non-working compiler.
  5940. if test yes != "$_lt_caught_CXX_error"; then
  5941. # Code to be used in simple compile tests
  5942. lt_simple_compile_test_code="int some_variable = 0;"
  5943. # Code to be used in simple link tests
  5944. lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
  5945. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  5946. _LT_TAG_COMPILER
  5947. # save warnings/boilerplate of simple test code
  5948. _LT_COMPILER_BOILERPLATE
  5949. _LT_LINKER_BOILERPLATE
  5950. # Allow CC to be a program name with arguments.
  5951. lt_save_CC=$CC
  5952. lt_save_CFLAGS=$CFLAGS
  5953. lt_save_LD=$LD
  5954. lt_save_GCC=$GCC
  5955. GCC=$GXX
  5956. lt_save_with_gnu_ld=$with_gnu_ld
  5957. lt_save_path_LD=$lt_cv_path_LD
  5958. if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
  5959. lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
  5960. else
  5961. $as_unset lt_cv_prog_gnu_ld
  5962. fi
  5963. if test -n "${lt_cv_path_LDCXX+set}"; then
  5964. lt_cv_path_LD=$lt_cv_path_LDCXX
  5965. else
  5966. $as_unset lt_cv_path_LD
  5967. fi
  5968. test -z "${LDCXX+set}" || LD=$LDCXX
  5969. CC=${CXX-"c++"}
  5970. CFLAGS=$CXXFLAGS
  5971. compiler=$CC
  5972. _LT_TAGVAR(compiler, $1)=$CC
  5973. _LT_CC_BASENAME([$compiler])
  5974. if test -n "$compiler"; then
  5975. # We don't want -fno-exception when compiling C++ code, so set the
  5976. # no_builtin_flag separately
  5977. if test yes = "$GXX"; then
  5978. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  5979. else
  5980. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  5981. fi
  5982. if test yes = "$GXX"; then
  5983. # Set up default GNU C++ configuration
  5984. LT_PATH_LD
  5985. # Check if GNU C++ uses GNU ld as the underlying linker, since the
  5986. # archiving commands below assume that GNU ld is being used.
  5987. if test yes = "$with_gnu_ld"; then
  5988. _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  5989. _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'
  5990. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5991. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  5992. # If archive_cmds runs LD, not CC, wlarc should be empty
  5993. # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
  5994. # investigate it a little bit more. (MM)
  5995. wlarc='$wl'
  5996. # ancient GNU ld didn't support --whole-archive et. al.
  5997. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
  5998. _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
  5999. else
  6000. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  6001. fi
  6002. else
  6003. with_gnu_ld=no
  6004. wlarc=
  6005. # A generic and very simple default shared library creation
  6006. # command for GNU C++ for the case where it uses the native
  6007. # linker, instead of GNU ld. If possible, this setting should
  6008. # overridden to take advantage of the native linker features on
  6009. # the platform it is being used on.
  6010. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  6011. fi
  6012. # Commands to make compiler produce verbose output that lists
  6013. # what "hidden" libraries, object files and flags are used when
  6014. # linking a shared library.
  6015. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [[-]]L"'
  6016. else
  6017. GXX=no
  6018. with_gnu_ld=no
  6019. wlarc=
  6020. fi
  6021. # PORTME: fill in a description of your system's C++ link characteristics
  6022. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  6023. _LT_TAGVAR(ld_shlibs, $1)=yes
  6024. case $host_os in
  6025. aix3*)
  6026. # FIXME: insert proper C++ library support
  6027. _LT_TAGVAR(ld_shlibs, $1)=no
  6028. ;;
  6029. aix[[4-9]]*)
  6030. if test ia64 = "$host_cpu"; then
  6031. # On IA64, the linker does run time linking by default, so we don't
  6032. # have to do anything special.
  6033. aix_use_runtimelinking=no
  6034. exp_sym_flag='-Bexport'
  6035. no_entry_flag=
  6036. else
  6037. aix_use_runtimelinking=no
  6038. # Test if we are trying to use run time linking or normal
  6039. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  6040. # have runtime linking enabled, and use it for executables.
  6041. # For shared libraries, we enable/disable runtime linking
  6042. # depending on the kind of the shared library created -
  6043. # when "with_aix_soname,aix_use_runtimelinking" is:
  6044. # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
  6045. # "aix,yes" lib.so shared, rtl:yes, for executables
  6046. # lib.a static archive
  6047. # "both,no" lib.so.V(shr.o) shared, rtl:yes
  6048. # lib.a(lib.so.V) shared, rtl:no, for executables
  6049. # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
  6050. # lib.a(lib.so.V) shared, rtl:no
  6051. # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
  6052. # lib.a static archive
  6053. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  6054. for ld_flag in $LDFLAGS; do
  6055. case $ld_flag in
  6056. *-brtl*)
  6057. aix_use_runtimelinking=yes
  6058. break
  6059. ;;
  6060. esac
  6061. done
  6062. if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
  6063. # With aix-soname=svr4, we create the lib.so.V shared archives only,
  6064. # so we don't have lib.a shared libs to link our executables.
  6065. # We have to force runtime linking in this case.
  6066. aix_use_runtimelinking=yes
  6067. LDFLAGS="$LDFLAGS -Wl,-brtl"
  6068. fi
  6069. ;;
  6070. esac
  6071. exp_sym_flag='-bexport'
  6072. no_entry_flag='-bnoentry'
  6073. fi
  6074. # When large executables or shared objects are built, AIX ld can
  6075. # have problems creating the table of contents. If linking a library
  6076. # or program results in "error TOC overflow" add -mminimal-toc to
  6077. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  6078. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  6079. _LT_TAGVAR(archive_cmds, $1)=''
  6080. _LT_TAGVAR(hardcode_direct, $1)=yes
  6081. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6082. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  6083. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6084. _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
  6085. case $with_aix_soname,$aix_use_runtimelinking in
  6086. aix,*) ;; # no import file
  6087. svr4,* | *,yes) # use import file
  6088. # The Import File defines what to hardcode.
  6089. _LT_TAGVAR(hardcode_direct, $1)=no
  6090. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  6091. ;;
  6092. esac
  6093. if test yes = "$GXX"; then
  6094. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  6095. # We only want to do this on AIX 4.2 and lower, the check
  6096. # below for broken collect2 doesn't work under 4.3+
  6097. collect2name=`$CC -print-prog-name=collect2`
  6098. if test -f "$collect2name" &&
  6099. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  6100. then
  6101. # We have reworked collect2
  6102. :
  6103. else
  6104. # We have old collect2
  6105. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  6106. # It fails to find uninstalled libraries when the uninstalled
  6107. # path is not listed in the libpath. Setting hardcode_minus_L
  6108. # to unsupported forces relinking
  6109. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  6110. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6111. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  6112. fi
  6113. esac
  6114. shared_flag='-shared'
  6115. if test yes = "$aix_use_runtimelinking"; then
  6116. shared_flag=$shared_flag' $wl-G'
  6117. fi
  6118. # Need to ensure runtime linking is disabled for the traditional
  6119. # shared library, or the linker may eventually find shared libraries
  6120. # /with/ Import File - we do not want to mix them.
  6121. shared_flag_aix='-shared'
  6122. shared_flag_svr4='-shared $wl-G'
  6123. else
  6124. # not using gcc
  6125. if test ia64 = "$host_cpu"; then
  6126. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  6127. # chokes on -Wl,-G. The following line is correct:
  6128. shared_flag='-G'
  6129. else
  6130. if test yes = "$aix_use_runtimelinking"; then
  6131. shared_flag='$wl-G'
  6132. else
  6133. shared_flag='$wl-bM:SRE'
  6134. fi
  6135. shared_flag_aix='$wl-bM:SRE'
  6136. shared_flag_svr4='$wl-G'
  6137. fi
  6138. fi
  6139. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
  6140. # It seems that -bexpall does not export symbols beginning with
  6141. # underscore (_), so it is better to generate a list of symbols to
  6142. # export.
  6143. _LT_TAGVAR(always_export_symbols, $1)=yes
  6144. if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
  6145. # Warning - without using the other runtime loading flags (-brtl),
  6146. # -berok will link without error, but may produce a broken library.
  6147. # The "-G" linker flag allows undefined symbols.
  6148. _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
  6149. # Determine the default libpath from the value encoded in an empty
  6150. # executable.
  6151. _LT_SYS_MODULE_PATH_AIX([$1])
  6152. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
  6153. _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
  6154. else
  6155. if test ia64 = "$host_cpu"; then
  6156. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
  6157. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  6158. _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"
  6159. else
  6160. # Determine the default libpath from the value encoded in an
  6161. # empty executable.
  6162. _LT_SYS_MODULE_PATH_AIX([$1])
  6163. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
  6164. # Warning - without using the other run time loading flags,
  6165. # -berok will link without error, but may produce a broken library.
  6166. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
  6167. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
  6168. if test yes = "$with_gnu_ld"; then
  6169. # We only use this code for GNU lds that support --whole-archive.
  6170. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
  6171. else
  6172. # Exported symbols can be pulled into shared objects from archives
  6173. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  6174. fi
  6175. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  6176. _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
  6177. # -brtl affects multiple linker settings, -berok does not and is overridden later
  6178. compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
  6179. if test svr4 != "$with_aix_soname"; then
  6180. # This is similar to how AIX traditionally builds its shared
  6181. # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
  6182. _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'
  6183. fi
  6184. if test aix != "$with_aix_soname"; then
  6185. _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'
  6186. else
  6187. # used by -dlpreopen to get the symbols
  6188. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
  6189. fi
  6190. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
  6191. fi
  6192. fi
  6193. ;;
  6194. beos*)
  6195. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  6196. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6197. # Joseph Beckenbach <[email protected]> says some releases of gcc
  6198. # support --undefined. This deserves some investigation. FIXME
  6199. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  6200. else
  6201. _LT_TAGVAR(ld_shlibs, $1)=no
  6202. fi
  6203. ;;
  6204. chorus*)
  6205. case $cc_basename in
  6206. *)
  6207. # FIXME: insert proper C++ library support
  6208. _LT_TAGVAR(ld_shlibs, $1)=no
  6209. ;;
  6210. esac
  6211. ;;
  6212. cygwin* | mingw* | windows* | pw32* | cegcc*)
  6213. case $GXX,$cc_basename in
  6214. ,cl* | no,cl* | ,icl* | no,icl*)
  6215. # Native MSVC or ICC
  6216. # hardcode_libdir_flag_spec is actually meaningless, as there is
  6217. # no search path for DLLs.
  6218. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  6219. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6220. _LT_TAGVAR(always_export_symbols, $1)=yes
  6221. _LT_TAGVAR(file_list_spec, $1)='@'
  6222. # Tell ltmain to make .lib files, not .a files.
  6223. libext=lib
  6224. # Tell ltmain to make .dll files, not .so files.
  6225. shrext_cmds=.dll
  6226. # FIXME: Setting linknames here is a bad hack.
  6227. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
  6228. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  6229. cp "$export_symbols" "$output_objdir/$soname.def";
  6230. echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
  6231. else
  6232. $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
  6233. fi~
  6234. $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  6235. linknames='
  6236. # The linker will not automatically build a static lib if we build a DLL.
  6237. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  6238. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  6239. # Don't use ranlib
  6240. _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  6241. _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  6242. lt_tool_outputfile="@TOOL_OUTPUT@"~
  6243. case $lt_outputfile in
  6244. *.exe|*.EXE) ;;
  6245. *)
  6246. lt_outputfile=$lt_outputfile.exe
  6247. lt_tool_outputfile=$lt_tool_outputfile.exe
  6248. ;;
  6249. esac~
  6250. func_to_tool_file "$lt_outputfile"~
  6251. if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
  6252. $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  6253. $RM "$lt_outputfile.manifest";
  6254. fi'
  6255. ;;
  6256. *)
  6257. # g++
  6258. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  6259. # as there is no search path for DLLs.
  6260. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6261. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
  6262. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6263. _LT_TAGVAR(always_export_symbols, $1)=no
  6264. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  6265. _LT_TAGVAR(file_list_spec, $1)='@'
  6266. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  6267. _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'
  6268. # If the export-symbols file already is a .def file, use it as
  6269. # is; otherwise, prepend EXPORTS...
  6270. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  6271. cp $export_symbols $output_objdir/$soname.def;
  6272. else
  6273. echo EXPORTS > $output_objdir/$soname.def;
  6274. cat $export_symbols >> $output_objdir/$soname.def;
  6275. fi~
  6276. $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'
  6277. else
  6278. _LT_TAGVAR(ld_shlibs, $1)=no
  6279. fi
  6280. ;;
  6281. esac
  6282. ;;
  6283. darwin* | rhapsody*)
  6284. _LT_DARWIN_LINKER_FEATURES($1)
  6285. ;;
  6286. os2*)
  6287. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6288. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  6289. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6290. shrext_cmds=.dll
  6291. _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  6292. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  6293. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  6294. $ECHO EXPORTS >> $output_objdir/$libname.def~
  6295. emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
  6296. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  6297. emximp -o $lib $output_objdir/$libname.def'
  6298. _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  6299. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  6300. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  6301. $ECHO EXPORTS >> $output_objdir/$libname.def~
  6302. prefix_cmds="$SED"~
  6303. if test EXPORTS = "`$SED 1q $export_symbols`"; then
  6304. prefix_cmds="$prefix_cmds -e 1d";
  6305. fi~
  6306. prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
  6307. cat $export_symbols | $prefix_cmds >> $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(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
  6311. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  6312. _LT_TAGVAR(file_list_spec, $1)='@'
  6313. ;;
  6314. dgux*)
  6315. case $cc_basename in
  6316. ec++*)
  6317. # FIXME: insert proper C++ library support
  6318. _LT_TAGVAR(ld_shlibs, $1)=no
  6319. ;;
  6320. ghcx*)
  6321. # Green Hills C++ Compiler
  6322. # FIXME: insert proper C++ library support
  6323. _LT_TAGVAR(ld_shlibs, $1)=no
  6324. ;;
  6325. *)
  6326. # FIXME: insert proper C++ library support
  6327. _LT_TAGVAR(ld_shlibs, $1)=no
  6328. ;;
  6329. esac
  6330. ;;
  6331. freebsd2.*)
  6332. # C++ shared libraries reported to be fairly broken before
  6333. # switch to ELF
  6334. _LT_TAGVAR(ld_shlibs, $1)=no
  6335. ;;
  6336. freebsd-elf*)
  6337. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6338. ;;
  6339. freebsd* | dragonfly* | midnightbsd*)
  6340. # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
  6341. # conventions
  6342. _LT_TAGVAR(ld_shlibs, $1)=yes
  6343. ;;
  6344. haiku*)
  6345. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  6346. _LT_TAGVAR(link_all_deplibs, $1)=no
  6347. ;;
  6348. hpux9*)
  6349. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  6350. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6351. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  6352. _LT_TAGVAR(hardcode_direct, $1)=yes
  6353. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  6354. # but as the default
  6355. # location of the library.
  6356. case $cc_basename in
  6357. CC*)
  6358. # FIXME: insert proper C++ library support
  6359. _LT_TAGVAR(ld_shlibs, $1)=no
  6360. ;;
  6361. aCC*)
  6362. _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'
  6363. # Commands to make compiler produce verbose output that lists
  6364. # what "hidden" libraries, object files and flags are used when
  6365. # linking a shared library.
  6366. #
  6367. # There doesn't appear to be a way to prevent this compiler from
  6368. # explicitly linking system object files so we need to strip them
  6369. # from the output so that they don't get included in the library
  6370. # dependencies.
  6371. 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"'
  6372. ;;
  6373. *)
  6374. if test yes = "$GXX"; then
  6375. _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'
  6376. else
  6377. # FIXME: insert proper C++ library support
  6378. _LT_TAGVAR(ld_shlibs, $1)=no
  6379. fi
  6380. ;;
  6381. esac
  6382. ;;
  6383. hpux10*|hpux11*)
  6384. if test no = "$with_gnu_ld"; then
  6385. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  6386. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6387. case $host_cpu in
  6388. hppa*64*|ia64*)
  6389. ;;
  6390. *)
  6391. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  6392. ;;
  6393. esac
  6394. fi
  6395. case $host_cpu in
  6396. hppa*64*|ia64*)
  6397. _LT_TAGVAR(hardcode_direct, $1)=no
  6398. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6399. ;;
  6400. *)
  6401. _LT_TAGVAR(hardcode_direct, $1)=yes
  6402. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6403. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  6404. # but as the default
  6405. # location of the library.
  6406. ;;
  6407. esac
  6408. case $cc_basename in
  6409. CC*)
  6410. # FIXME: insert proper C++ library support
  6411. _LT_TAGVAR(ld_shlibs, $1)=no
  6412. ;;
  6413. aCC*)
  6414. case $host_cpu in
  6415. hppa*64*)
  6416. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6417. ;;
  6418. ia64*)
  6419. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6420. ;;
  6421. *)
  6422. _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'
  6423. ;;
  6424. esac
  6425. # Commands to make compiler produce verbose output that lists
  6426. # what "hidden" libraries, object files and flags are used when
  6427. # linking a shared library.
  6428. #
  6429. # There doesn't appear to be a way to prevent this compiler from
  6430. # explicitly linking system object files so we need to strip them
  6431. # from the output so that they don't get included in the library
  6432. # dependencies.
  6433. 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"'
  6434. ;;
  6435. *)
  6436. if test yes = "$GXX"; then
  6437. if test no = "$with_gnu_ld"; then
  6438. case $host_cpu in
  6439. hppa*64*)
  6440. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6441. ;;
  6442. ia64*)
  6443. _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'
  6444. ;;
  6445. *)
  6446. _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'
  6447. ;;
  6448. esac
  6449. fi
  6450. else
  6451. # FIXME: insert proper C++ library support
  6452. _LT_TAGVAR(ld_shlibs, $1)=no
  6453. fi
  6454. ;;
  6455. esac
  6456. ;;
  6457. interix[[3-9]]*)
  6458. _LT_TAGVAR(hardcode_direct, $1)=no
  6459. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6460. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6461. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  6462. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  6463. # Instead, shared libraries are loaded at an image base (0x10000000 by
  6464. # default) and relocated if they conflict, which is a slow very memory
  6465. # consuming and fragmenting process. To avoid this, we pick a random,
  6466. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  6467. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  6468. _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'
  6469. _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'
  6470. ;;
  6471. irix5* | irix6*)
  6472. case $cc_basename in
  6473. CC*)
  6474. # SGI C++
  6475. _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'
  6476. # Archives containing C++ object files must be created using
  6477. # "CC -ar", where "CC" is the IRIX C++ compiler. This is
  6478. # necessary to make sure instantiated templates are included
  6479. # in the archive.
  6480. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
  6481. ;;
  6482. *)
  6483. if test yes = "$GXX"; then
  6484. if test no = "$with_gnu_ld"; then
  6485. _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'
  6486. else
  6487. _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'
  6488. fi
  6489. fi
  6490. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6491. ;;
  6492. esac
  6493. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  6494. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6495. _LT_TAGVAR(inherit_rpath, $1)=yes
  6496. ;;
  6497. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  6498. case $cc_basename in
  6499. KCC*)
  6500. # Kuck and Associates, Inc. (KAI) C++ Compiler
  6501. # KCC will only create a shared library if the output file
  6502. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  6503. # to its proper name (with version) after linking.
  6504. _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'
  6505. _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'
  6506. # Commands to make compiler produce verbose output that lists
  6507. # what "hidden" libraries, object files and flags are used when
  6508. # linking a shared library.
  6509. #
  6510. # There doesn't appear to be a way to prevent this compiler from
  6511. # explicitly linking system object files so we need to strip them
  6512. # from the output so that they don't get included in the library
  6513. # dependencies.
  6514. 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"'
  6515. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6516. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  6517. # Archives containing C++ object files must be created using
  6518. # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  6519. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  6520. ;;
  6521. icpc* | ecpc* )
  6522. # Intel C++
  6523. with_gnu_ld=yes
  6524. # version 8.0 and above of icpc choke on multiply defined symbols
  6525. # if we add $predep_objects and $postdep_objects, however 7.1 and
  6526. # earlier do not add the objects themselves.
  6527. case `$CC -V 2>&1` in
  6528. *"Version 7."*)
  6529. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  6530. _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'
  6531. ;;
  6532. *) # Version 8.0 or newer
  6533. tmp_idyn=
  6534. case $host_cpu in
  6535. ia64*) tmp_idyn=' -i_dynamic';;
  6536. esac
  6537. _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  6538. _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'
  6539. ;;
  6540. esac
  6541. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6542. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6543. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  6544. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
  6545. ;;
  6546. pgCC* | pgcpp*)
  6547. # Portland Group C++ compiler
  6548. case `$CC -V` in
  6549. *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
  6550. _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
  6551. rm -rf $tpldir~
  6552. $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
  6553. compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
  6554. _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
  6555. rm -rf $tpldir~
  6556. $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
  6557. $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
  6558. $RANLIB $oldlib'
  6559. _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
  6560. rm -rf $tpldir~
  6561. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  6562. $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  6563. _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
  6564. rm -rf $tpldir~
  6565. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  6566. $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'
  6567. ;;
  6568. *) # Version 6 and above use weak symbols
  6569. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  6570. _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'
  6571. ;;
  6572. esac
  6573. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
  6574. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  6575. _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'
  6576. ;;
  6577. cxx*)
  6578. # Compaq C++
  6579. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  6580. _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'
  6581. runpath_var=LD_RUN_PATH
  6582. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  6583. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6584. # Commands to make compiler produce verbose output that lists
  6585. # what "hidden" libraries, object files and flags are used when
  6586. # linking a shared library.
  6587. #
  6588. # There doesn't appear to be a way to prevent this compiler from
  6589. # explicitly linking system object files so we need to strip them
  6590. # from the output so that they don't get included in the library
  6591. # dependencies.
  6592. 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'
  6593. ;;
  6594. xl* | mpixl* | bgxl*)
  6595. # IBM XL 8.0 on PPC, with GNU ld
  6596. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  6597. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  6598. _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  6599. if test yes = "$supports_anon_versioning"; then
  6600. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  6601. cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  6602. echo "local: *; };" >> $output_objdir/$libname.ver~
  6603. $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
  6604. fi
  6605. ;;
  6606. *)
  6607. case `$CC -V 2>&1 | $SED 5q` in
  6608. *Sun\ C*)
  6609. # Sun C++ 5.9
  6610. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  6611. _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6612. _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'
  6613. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6614. _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'
  6615. _LT_TAGVAR(compiler_needs_object, $1)=yes
  6616. # Not sure whether something based on
  6617. # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
  6618. # would be better.
  6619. output_verbose_link_cmd='func_echo_all'
  6620. # Archives containing C++ object files must be created using
  6621. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  6622. # necessary to make sure instantiated templates are included
  6623. # in the archive.
  6624. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  6625. ;;
  6626. esac
  6627. ;;
  6628. esac
  6629. ;;
  6630. lynxos*)
  6631. # FIXME: insert proper C++ library support
  6632. _LT_TAGVAR(ld_shlibs, $1)=no
  6633. ;;
  6634. m88k*)
  6635. # FIXME: insert proper C++ library support
  6636. _LT_TAGVAR(ld_shlibs, $1)=no
  6637. ;;
  6638. mvs*)
  6639. case $cc_basename in
  6640. cxx*)
  6641. # FIXME: insert proper C++ library support
  6642. _LT_TAGVAR(ld_shlibs, $1)=no
  6643. ;;
  6644. *)
  6645. # FIXME: insert proper C++ library support
  6646. _LT_TAGVAR(ld_shlibs, $1)=no
  6647. ;;
  6648. esac
  6649. ;;
  6650. *-mlibc)
  6651. _LT_TAGVAR(ld_shlibs, $1)=yes
  6652. ;;
  6653. netbsd*)
  6654. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  6655. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
  6656. wlarc=
  6657. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6658. _LT_TAGVAR(hardcode_direct, $1)=yes
  6659. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6660. fi
  6661. # Workaround some broken pre-1.5 toolchains
  6662. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
  6663. ;;
  6664. *nto* | *qnx*)
  6665. _LT_TAGVAR(ld_shlibs, $1)=yes
  6666. ;;
  6667. openbsd*)
  6668. if test -f /usr/libexec/ld.so; then
  6669. _LT_TAGVAR(hardcode_direct, $1)=yes
  6670. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6671. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6672. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  6673. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6674. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
  6675. _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'
  6676. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  6677. _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
  6678. fi
  6679. output_verbose_link_cmd=func_echo_all
  6680. else
  6681. _LT_TAGVAR(ld_shlibs, $1)=no
  6682. fi
  6683. ;;
  6684. osf3* | osf4* | osf5*)
  6685. case $cc_basename in
  6686. KCC*)
  6687. # Kuck and Associates, Inc. (KAI) C++ Compiler
  6688. # KCC will only create a shared library if the output file
  6689. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  6690. # to its proper name (with version) after linking.
  6691. _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'
  6692. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6693. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6694. # Archives containing C++ object files must be created using
  6695. # the KAI C++ compiler.
  6696. case $host in
  6697. osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
  6698. *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
  6699. esac
  6700. ;;
  6701. RCC*)
  6702. # Rational C++ 2.4.1
  6703. # FIXME: insert proper C++ library support
  6704. _LT_TAGVAR(ld_shlibs, $1)=no
  6705. ;;
  6706. cxx*)
  6707. case $host in
  6708. osf3*)
  6709. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
  6710. _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'
  6711. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  6712. ;;
  6713. *)
  6714. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  6715. _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'
  6716. _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
  6717. echo "-hidden">> $lib.exp~
  6718. $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~
  6719. $RM $lib.exp'
  6720. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  6721. ;;
  6722. esac
  6723. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6724. # Commands to make compiler produce verbose output that lists
  6725. # what "hidden" libraries, object files and flags are used when
  6726. # linking a shared library.
  6727. #
  6728. # There doesn't appear to be a way to prevent this compiler from
  6729. # explicitly linking system object files so we need to strip them
  6730. # from the output so that they don't get included in the library
  6731. # dependencies.
  6732. 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"'
  6733. ;;
  6734. *)
  6735. if test yes,no = "$GXX,$with_gnu_ld"; then
  6736. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
  6737. case $host in
  6738. osf3*)
  6739. _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'
  6740. ;;
  6741. *)
  6742. _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'
  6743. ;;
  6744. esac
  6745. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  6746. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6747. # Commands to make compiler produce verbose output that lists
  6748. # what "hidden" libraries, object files and flags are used when
  6749. # linking a shared library.
  6750. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [[-]]L"'
  6751. else
  6752. # FIXME: insert proper C++ library support
  6753. _LT_TAGVAR(ld_shlibs, $1)=no
  6754. fi
  6755. ;;
  6756. esac
  6757. ;;
  6758. psos*)
  6759. # FIXME: insert proper C++ library support
  6760. _LT_TAGVAR(ld_shlibs, $1)=no
  6761. ;;
  6762. serenity*)
  6763. ;;
  6764. sunos4*)
  6765. case $cc_basename in
  6766. CC*)
  6767. # Sun C++ 4.x
  6768. # FIXME: insert proper C++ library support
  6769. _LT_TAGVAR(ld_shlibs, $1)=no
  6770. ;;
  6771. lcc*)
  6772. # Lucid
  6773. # FIXME: insert proper C++ library support
  6774. _LT_TAGVAR(ld_shlibs, $1)=no
  6775. ;;
  6776. *)
  6777. # FIXME: insert proper C++ library support
  6778. _LT_TAGVAR(ld_shlibs, $1)=no
  6779. ;;
  6780. esac
  6781. ;;
  6782. solaris*)
  6783. case $cc_basename in
  6784. CC* | sunCC*)
  6785. # Sun C++ 4.2, 5.x and Centerline C++
  6786. _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
  6787. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  6788. _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6789. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6790. $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'
  6791. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6792. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6793. case $host_os in
  6794. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6795. *)
  6796. # The compiler driver will combine and reorder linker options,
  6797. # but understands '-z linker_flag'.
  6798. # Supported since Solaris 2.6 (maybe 2.5.1?)
  6799. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  6800. ;;
  6801. esac
  6802. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6803. output_verbose_link_cmd='func_echo_all'
  6804. # Archives containing C++ object files must be created using
  6805. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  6806. # necessary to make sure instantiated templates are included
  6807. # in the archive.
  6808. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  6809. ;;
  6810. gcx*)
  6811. # Green Hills C++ Compiler
  6812. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
  6813. # The C++ compiler must be used to create the archive.
  6814. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
  6815. ;;
  6816. *)
  6817. # GNU C++ compiler with Solaris linker
  6818. if test yes,no = "$GXX,$with_gnu_ld"; then
  6819. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
  6820. if $CC --version | $GREP -v '^2\.7' > /dev/null; then
  6821. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
  6822. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6823. $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'
  6824. # Commands to make compiler produce verbose output that lists
  6825. # what "hidden" libraries, object files and flags are used when
  6826. # linking a shared library.
  6827. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [[-]]L"'
  6828. else
  6829. # g++ 2.7 appears to require '-G' NOT '-shared' on this
  6830. # platform.
  6831. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
  6832. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6833. $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'
  6834. # Commands to make compiler produce verbose output that lists
  6835. # what "hidden" libraries, object files and flags are used when
  6836. # linking a shared library.
  6837. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [[-]]L"'
  6838. fi
  6839. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
  6840. case $host_os in
  6841. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6842. *)
  6843. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
  6844. ;;
  6845. esac
  6846. fi
  6847. ;;
  6848. esac
  6849. ;;
  6850. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  6851. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  6852. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6853. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6854. runpath_var='LD_RUN_PATH'
  6855. case $cc_basename in
  6856. CC*)
  6857. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6858. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6859. ;;
  6860. *)
  6861. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6862. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6863. ;;
  6864. esac
  6865. ;;
  6866. sysv5* | sco3.2v5* | sco5v6*)
  6867. # Note: We CANNOT use -z defs as we might desire, because we do not
  6868. # link with -lc, and that would cause any symbols used from libc to
  6869. # always be unresolved, which means just about no library would
  6870. # ever link correctly. If we're not using GNU ld we use -z text
  6871. # though, which does catch some bad symbols but isn't as heavy-handed
  6872. # as -z defs.
  6873. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  6874. _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
  6875. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6876. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6877. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
  6878. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  6879. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6880. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
  6881. runpath_var='LD_RUN_PATH'
  6882. case $cc_basename in
  6883. CC*)
  6884. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6885. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6886. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
  6887. '"$_LT_TAGVAR(old_archive_cmds, $1)"
  6888. _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
  6889. '"$_LT_TAGVAR(reload_cmds, $1)"
  6890. ;;
  6891. *)
  6892. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6893. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6894. ;;
  6895. esac
  6896. ;;
  6897. tandem*)
  6898. case $cc_basename in
  6899. NCC*)
  6900. # NonStop-UX NCC 3.20
  6901. # FIXME: insert proper C++ library support
  6902. _LT_TAGVAR(ld_shlibs, $1)=no
  6903. ;;
  6904. *)
  6905. # FIXME: insert proper C++ library support
  6906. _LT_TAGVAR(ld_shlibs, $1)=no
  6907. ;;
  6908. esac
  6909. ;;
  6910. vxworks*)
  6911. # FIXME: insert proper C++ library support
  6912. _LT_TAGVAR(ld_shlibs, $1)=no
  6913. ;;
  6914. *)
  6915. # FIXME: insert proper C++ library support
  6916. _LT_TAGVAR(ld_shlibs, $1)=no
  6917. ;;
  6918. esac
  6919. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  6920. test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
  6921. _LT_TAGVAR(GCC, $1)=$GXX
  6922. _LT_TAGVAR(LD, $1)=$LD
  6923. ## CAVEAT EMPTOR:
  6924. ## There is no encapsulation within the following macros, do not change
  6925. ## the running order or otherwise move them around unless you know exactly
  6926. ## what you are doing...
  6927. _LT_SYS_HIDDEN_LIBDEPS($1)
  6928. _LT_COMPILER_PIC($1)
  6929. _LT_COMPILER_C_O($1)
  6930. _LT_COMPILER_FILE_LOCKS($1)
  6931. _LT_LINKER_SHLIBS($1)
  6932. _LT_SYS_DYNAMIC_LINKER($1)
  6933. _LT_LINKER_HARDCODE_LIBPATH($1)
  6934. _LT_CONFIG($1)
  6935. fi # test -n "$compiler"
  6936. CC=$lt_save_CC
  6937. CFLAGS=$lt_save_CFLAGS
  6938. LDCXX=$LD
  6939. LD=$lt_save_LD
  6940. GCC=$lt_save_GCC
  6941. with_gnu_ld=$lt_save_with_gnu_ld
  6942. lt_cv_path_LDCXX=$lt_cv_path_LD
  6943. lt_cv_path_LD=$lt_save_path_LD
  6944. lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
  6945. lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
  6946. fi # test yes != "$_lt_caught_CXX_error"
  6947. AC_LANG_POP
  6948. ])# _LT_LANG_CXX_CONFIG
  6949. # _LT_FUNC_STRIPNAME_CNF
  6950. # ----------------------
  6951. # func_stripname_cnf prefix suffix name
  6952. # strip PREFIX and SUFFIX off of NAME.
  6953. # PREFIX and SUFFIX must not contain globbing or regex special
  6954. # characters, hashes, percent signs, but SUFFIX may contain a leading
  6955. # dot (in which case that matches only a dot).
  6956. #
  6957. # This function is identical to the (non-XSI) version of func_stripname,
  6958. # except this one can be used by m4 code that may be executed by configure,
  6959. # rather than the libtool script.
  6960. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
  6961. AC_REQUIRE([_LT_DECL_SED])
  6962. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
  6963. func_stripname_cnf ()
  6964. {
  6965. case @S|@2 in
  6966. .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
  6967. *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
  6968. esac
  6969. } # func_stripname_cnf
  6970. ])# _LT_FUNC_STRIPNAME_CNF
  6971. # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
  6972. # ---------------------------------
  6973. # Figure out "hidden" library dependencies from verbose
  6974. # compiler output when linking a shared library.
  6975. # Parse the compiler output and extract the necessary
  6976. # objects, libraries and library flags.
  6977. m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
  6978. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  6979. AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
  6980. # Dependencies to place before and after the object being linked:
  6981. _LT_TAGVAR(predep_objects, $1)=
  6982. _LT_TAGVAR(postdep_objects, $1)=
  6983. _LT_TAGVAR(predeps, $1)=
  6984. _LT_TAGVAR(postdeps, $1)=
  6985. _LT_TAGVAR(compiler_lib_search_path, $1)=
  6986. dnl we can't use the lt_simple_compile_test_code here,
  6987. dnl because it contains code intended for an executable,
  6988. dnl not a library. It's possible we should let each
  6989. dnl tag define a new lt_????_link_test_code variable,
  6990. dnl but it's only used here...
  6991. m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
  6992. int a;
  6993. void foo (void) { a = 0; }
  6994. _LT_EOF
  6995. ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
  6996. class Foo
  6997. {
  6998. public:
  6999. Foo (void) { a = 0; }
  7000. private:
  7001. int a;
  7002. };
  7003. _LT_EOF
  7004. ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
  7005. subroutine foo
  7006. implicit none
  7007. integer*4 a
  7008. a=0
  7009. return
  7010. end
  7011. _LT_EOF
  7012. ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
  7013. subroutine foo
  7014. implicit none
  7015. integer a
  7016. a=0
  7017. return
  7018. end
  7019. _LT_EOF
  7020. ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
  7021. public class foo {
  7022. private int a;
  7023. public void bar (void) {
  7024. a = 0;
  7025. }
  7026. };
  7027. _LT_EOF
  7028. ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
  7029. package foo
  7030. func foo() {
  7031. }
  7032. _LT_EOF
  7033. ])
  7034. _lt_libdeps_save_CFLAGS=$CFLAGS
  7035. case "$CC $CFLAGS " in #(
  7036. *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
  7037. *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
  7038. *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
  7039. esac
  7040. dnl Parse the compiler output and extract the necessary
  7041. dnl objects, libraries and library flags.
  7042. if AC_TRY_EVAL(ac_compile); then
  7043. # Parse the compiler output and extract the necessary
  7044. # objects, libraries and library flags.
  7045. # Sentinel used to keep track of whether or not we are before
  7046. # the conftest object file.
  7047. pre_test_object_deps_done=no
  7048. for p in `eval "$output_verbose_link_cmd"`; do
  7049. case $prev$p in
  7050. -L* | -R* | -l*)
  7051. # Some compilers place space between "-{L,R,l}" and the path.
  7052. # Remove the space.
  7053. if test x-L = x"$p" ||
  7054. test x-R = x"$p" ||
  7055. test x-l = x"$p"; then
  7056. prev=$p
  7057. continue
  7058. fi
  7059. # Expand the sysroot to ease extracting the directories later.
  7060. if test -z "$prev"; then
  7061. case $p in
  7062. -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
  7063. -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
  7064. -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
  7065. esac
  7066. fi
  7067. case $p in
  7068. =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
  7069. esac
  7070. if test no = "$pre_test_object_deps_done"; then
  7071. case $prev in
  7072. -L | -R)
  7073. # Internal compiler library paths should come after those
  7074. # provided the user. The postdeps already come after the
  7075. # user supplied libs so there is no need to process them.
  7076. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
  7077. _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
  7078. else
  7079. _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
  7080. fi
  7081. ;;
  7082. # The "-l" case would never come before the object being
  7083. # linked, so don't bother handling this case.
  7084. esac
  7085. else
  7086. if test -z "$_LT_TAGVAR(postdeps, $1)"; then
  7087. _LT_TAGVAR(postdeps, $1)=$prev$p
  7088. else
  7089. _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
  7090. fi
  7091. fi
  7092. prev=
  7093. ;;
  7094. *.lto.$objext) ;; # Ignore GCC LTO objects
  7095. *.$objext)
  7096. # This assumes that the test object file only shows up
  7097. # once in the compiler output.
  7098. if test "$p" = "conftest.$objext"; then
  7099. pre_test_object_deps_done=yes
  7100. continue
  7101. fi
  7102. if test no = "$pre_test_object_deps_done"; then
  7103. if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
  7104. _LT_TAGVAR(predep_objects, $1)=$p
  7105. else
  7106. _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
  7107. fi
  7108. else
  7109. if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
  7110. _LT_TAGVAR(postdep_objects, $1)=$p
  7111. else
  7112. _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
  7113. fi
  7114. fi
  7115. ;;
  7116. *) ;; # Ignore the rest.
  7117. esac
  7118. done
  7119. # Clean up.
  7120. rm -f a.out a.exe
  7121. else
  7122. echo "libtool.m4: error: problem compiling $1 test program"
  7123. fi
  7124. $RM -f confest.$objext
  7125. CFLAGS=$_lt_libdeps_save_CFLAGS
  7126. # PORTME: override above test on systems where it is broken
  7127. m4_if([$1], [CXX],
  7128. [case $host_os in
  7129. interix[[3-9]]*)
  7130. # Interix 3.5 installs completely hosed .la files for C++, so rather than
  7131. # hack all around it, let's just trust "g++" to DTRT.
  7132. _LT_TAGVAR(predep_objects,$1)=
  7133. _LT_TAGVAR(postdep_objects,$1)=
  7134. _LT_TAGVAR(postdeps,$1)=
  7135. ;;
  7136. esac
  7137. ])
  7138. case " $_LT_TAGVAR(postdeps, $1) " in
  7139. *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
  7140. esac
  7141. _LT_TAGVAR(compiler_lib_search_dirs, $1)=
  7142. if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
  7143. _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
  7144. fi
  7145. _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
  7146. [The directories searched by this compiler when creating a shared library])
  7147. _LT_TAGDECL([], [predep_objects], [1],
  7148. [Dependencies to place before and after the objects being linked to
  7149. create a shared library])
  7150. _LT_TAGDECL([], [postdep_objects], [1])
  7151. _LT_TAGDECL([], [predeps], [1])
  7152. _LT_TAGDECL([], [postdeps], [1])
  7153. _LT_TAGDECL([], [compiler_lib_search_path], [1],
  7154. [The library search path used internally by the compiler when linking
  7155. a shared library])
  7156. ])# _LT_SYS_HIDDEN_LIBDEPS
  7157. # _LT_LANG_F77_CONFIG([TAG])
  7158. # --------------------------
  7159. # Ensure that the configuration variables for a Fortran 77 compiler are
  7160. # suitably defined. These variables are subsequently used by _LT_CONFIG
  7161. # to write the compiler configuration to 'libtool'.
  7162. m4_defun([_LT_LANG_F77_CONFIG],
  7163. [AC_LANG_PUSH(Fortran 77)
  7164. if test -z "$F77" || test no = "$F77"; then
  7165. _lt_disable_F77=yes
  7166. fi
  7167. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7168. _LT_TAGVAR(allow_undefined_flag, $1)=
  7169. _LT_TAGVAR(always_export_symbols, $1)=no
  7170. _LT_TAGVAR(archive_expsym_cmds, $1)=
  7171. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  7172. _LT_TAGVAR(hardcode_direct, $1)=no
  7173. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  7174. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  7175. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  7176. _LT_TAGVAR(hardcode_minus_L, $1)=no
  7177. _LT_TAGVAR(hardcode_automatic, $1)=no
  7178. _LT_TAGVAR(inherit_rpath, $1)=no
  7179. _LT_TAGVAR(module_cmds, $1)=
  7180. _LT_TAGVAR(module_expsym_cmds, $1)=
  7181. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  7182. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7183. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  7184. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  7185. _LT_TAGVAR(no_undefined_flag, $1)=
  7186. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  7187. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  7188. # Source file extension for f77 test sources.
  7189. ac_ext=f
  7190. # Object file extension for compiled f77 test sources.
  7191. objext=o
  7192. _LT_TAGVAR(objext, $1)=$objext
  7193. # No sense in running all these tests if we already determined that
  7194. # the F77 compiler isn't working. Some variables (like enable_shared)
  7195. # are currently assumed to apply to all compilers on this platform,
  7196. # and will be corrupted by setting them based on a non-working compiler.
  7197. if test yes != "$_lt_disable_F77"; then
  7198. # Code to be used in simple compile tests
  7199. lt_simple_compile_test_code="\
  7200. subroutine t
  7201. return
  7202. end
  7203. "
  7204. # Code to be used in simple link tests
  7205. lt_simple_link_test_code="\
  7206. program t
  7207. end
  7208. "
  7209. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7210. _LT_TAG_COMPILER
  7211. # save warnings/boilerplate of simple test code
  7212. _LT_COMPILER_BOILERPLATE
  7213. _LT_LINKER_BOILERPLATE
  7214. # Allow CC to be a program name with arguments.
  7215. lt_save_CC=$CC
  7216. lt_save_GCC=$GCC
  7217. lt_save_CFLAGS=$CFLAGS
  7218. CC=${F77-"f77"}
  7219. CFLAGS=$FFLAGS
  7220. compiler=$CC
  7221. _LT_TAGVAR(compiler, $1)=$CC
  7222. _LT_CC_BASENAME([$compiler])
  7223. GCC=$G77
  7224. if test -n "$compiler"; then
  7225. AC_MSG_CHECKING([if libtool supports shared libraries])
  7226. AC_MSG_RESULT([$can_build_shared])
  7227. AC_MSG_CHECKING([whether to build shared libraries])
  7228. test no = "$can_build_shared" && enable_shared=no
  7229. # On AIX, shared libraries and static libraries use the same namespace, and
  7230. # are all built from PIC.
  7231. case $host_os in
  7232. aix3*)
  7233. test yes = "$enable_shared" && enable_static=no
  7234. if test -n "$RANLIB"; then
  7235. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  7236. postinstall_cmds='$RANLIB $lib'
  7237. fi
  7238. ;;
  7239. aix[[4-9]]*)
  7240. if test ia64 != "$host_cpu"; then
  7241. case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
  7242. yes,aix,yes) ;; # shared object as lib.so file only
  7243. yes,svr4,*) ;; # shared object as lib.so archive member only
  7244. yes,*) enable_static=no ;; # shared object in lib.a archive as well
  7245. esac
  7246. fi
  7247. ;;
  7248. esac
  7249. AC_MSG_RESULT([$enable_shared])
  7250. AC_MSG_CHECKING([whether to build static libraries])
  7251. # Make sure either enable_shared or enable_static is yes.
  7252. test yes = "$enable_shared" || enable_static=yes
  7253. AC_MSG_RESULT([$enable_static])
  7254. _LT_TAGVAR(GCC, $1)=$G77
  7255. _LT_TAGVAR(LD, $1)=$LD
  7256. ## CAVEAT EMPTOR:
  7257. ## There is no encapsulation within the following macros, do not change
  7258. ## the running order or otherwise move them around unless you know exactly
  7259. ## what you are doing...
  7260. _LT_COMPILER_PIC($1)
  7261. _LT_COMPILER_C_O($1)
  7262. _LT_COMPILER_FILE_LOCKS($1)
  7263. _LT_LINKER_SHLIBS($1)
  7264. _LT_SYS_DYNAMIC_LINKER($1)
  7265. _LT_LINKER_HARDCODE_LIBPATH($1)
  7266. _LT_CONFIG($1)
  7267. fi # test -n "$compiler"
  7268. GCC=$lt_save_GCC
  7269. CC=$lt_save_CC
  7270. CFLAGS=$lt_save_CFLAGS
  7271. fi # test yes != "$_lt_disable_F77"
  7272. AC_LANG_POP
  7273. ])# _LT_LANG_F77_CONFIG
  7274. # _LT_LANG_FC_CONFIG([TAG])
  7275. # -------------------------
  7276. # Ensure that the configuration variables for a Fortran compiler are
  7277. # suitably defined. These variables are subsequently used by _LT_CONFIG
  7278. # to write the compiler configuration to 'libtool'.
  7279. m4_defun([_LT_LANG_FC_CONFIG],
  7280. [AC_LANG_PUSH(Fortran)
  7281. if test -z "$FC" || test no = "$FC"; then
  7282. _lt_disable_FC=yes
  7283. fi
  7284. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7285. _LT_TAGVAR(allow_undefined_flag, $1)=
  7286. _LT_TAGVAR(always_export_symbols, $1)=no
  7287. _LT_TAGVAR(archive_expsym_cmds, $1)=
  7288. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  7289. _LT_TAGVAR(hardcode_direct, $1)=no
  7290. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  7291. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  7292. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  7293. _LT_TAGVAR(hardcode_minus_L, $1)=no
  7294. _LT_TAGVAR(hardcode_automatic, $1)=no
  7295. _LT_TAGVAR(inherit_rpath, $1)=no
  7296. _LT_TAGVAR(module_cmds, $1)=
  7297. _LT_TAGVAR(module_expsym_cmds, $1)=
  7298. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  7299. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7300. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  7301. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  7302. _LT_TAGVAR(no_undefined_flag, $1)=
  7303. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  7304. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  7305. # Source file extension for fc test sources.
  7306. ac_ext=${ac_fc_srcext-f}
  7307. # Object file extension for compiled fc test sources.
  7308. objext=o
  7309. _LT_TAGVAR(objext, $1)=$objext
  7310. # No sense in running all these tests if we already determined that
  7311. # the FC compiler isn't working. Some variables (like enable_shared)
  7312. # are currently assumed to apply to all compilers on this platform,
  7313. # and will be corrupted by setting them based on a non-working compiler.
  7314. if test yes != "$_lt_disable_FC"; then
  7315. # Code to be used in simple compile tests
  7316. lt_simple_compile_test_code="\
  7317. subroutine t
  7318. return
  7319. end
  7320. "
  7321. # Code to be used in simple link tests
  7322. lt_simple_link_test_code="\
  7323. program t
  7324. end
  7325. "
  7326. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7327. _LT_TAG_COMPILER
  7328. # save warnings/boilerplate of simple test code
  7329. _LT_COMPILER_BOILERPLATE
  7330. _LT_LINKER_BOILERPLATE
  7331. # Allow CC to be a program name with arguments.
  7332. lt_save_CC=$CC
  7333. lt_save_GCC=$GCC
  7334. lt_save_CFLAGS=$CFLAGS
  7335. CC=${FC-"f95"}
  7336. CFLAGS=$FCFLAGS
  7337. compiler=$CC
  7338. GCC=$ac_cv_fc_compiler_gnu
  7339. _LT_TAGVAR(compiler, $1)=$CC
  7340. _LT_CC_BASENAME([$compiler])
  7341. if test -n "$compiler"; then
  7342. AC_MSG_CHECKING([if libtool supports shared libraries])
  7343. AC_MSG_RESULT([$can_build_shared])
  7344. AC_MSG_CHECKING([whether to build shared libraries])
  7345. test no = "$can_build_shared" && enable_shared=no
  7346. # On AIX, shared libraries and static libraries use the same namespace, and
  7347. # are all built from PIC.
  7348. case $host_os in
  7349. aix3*)
  7350. test yes = "$enable_shared" && enable_static=no
  7351. if test -n "$RANLIB"; then
  7352. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  7353. postinstall_cmds='$RANLIB $lib'
  7354. fi
  7355. ;;
  7356. aix[[4-9]]*)
  7357. if test ia64 != "$host_cpu"; then
  7358. case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
  7359. yes,aix,yes) ;; # shared object as lib.so file only
  7360. yes,svr4,*) ;; # shared object as lib.so archive member only
  7361. yes,*) enable_static=no ;; # shared object in lib.a archive as well
  7362. esac
  7363. fi
  7364. ;;
  7365. esac
  7366. AC_MSG_RESULT([$enable_shared])
  7367. AC_MSG_CHECKING([whether to build static libraries])
  7368. # Make sure either enable_shared or enable_static is yes.
  7369. test yes = "$enable_shared" || enable_static=yes
  7370. AC_MSG_RESULT([$enable_static])
  7371. _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
  7372. _LT_TAGVAR(LD, $1)=$LD
  7373. ## CAVEAT EMPTOR:
  7374. ## There is no encapsulation within the following macros, do not change
  7375. ## the running order or otherwise move them around unless you know exactly
  7376. ## what you are doing...
  7377. _LT_SYS_HIDDEN_LIBDEPS($1)
  7378. _LT_COMPILER_PIC($1)
  7379. _LT_COMPILER_C_O($1)
  7380. _LT_COMPILER_FILE_LOCKS($1)
  7381. _LT_LINKER_SHLIBS($1)
  7382. _LT_SYS_DYNAMIC_LINKER($1)
  7383. _LT_LINKER_HARDCODE_LIBPATH($1)
  7384. _LT_CONFIG($1)
  7385. fi # test -n "$compiler"
  7386. GCC=$lt_save_GCC
  7387. CC=$lt_save_CC
  7388. CFLAGS=$lt_save_CFLAGS
  7389. fi # test yes != "$_lt_disable_FC"
  7390. AC_LANG_POP
  7391. ])# _LT_LANG_FC_CONFIG
  7392. # _LT_LANG_GCJ_CONFIG([TAG])
  7393. # --------------------------
  7394. # Ensure that the configuration variables for the GNU Java Compiler compiler
  7395. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  7396. # to write the compiler configuration to 'libtool'.
  7397. m4_defun([_LT_LANG_GCJ_CONFIG],
  7398. [AC_REQUIRE([LT_PROG_GCJ])dnl
  7399. AC_LANG_SAVE
  7400. # Source file extension for Java test sources.
  7401. ac_ext=java
  7402. # Object file extension for compiled Java test sources.
  7403. objext=o
  7404. _LT_TAGVAR(objext, $1)=$objext
  7405. # Code to be used in simple compile tests
  7406. lt_simple_compile_test_code="class foo {}"
  7407. # Code to be used in simple link tests
  7408. lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
  7409. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7410. _LT_TAG_COMPILER
  7411. # save warnings/boilerplate of simple test code
  7412. _LT_COMPILER_BOILERPLATE
  7413. _LT_LINKER_BOILERPLATE
  7414. # Allow CC to be a program name with arguments.
  7415. lt_save_CC=$CC
  7416. lt_save_CFLAGS=$CFLAGS
  7417. lt_save_GCC=$GCC
  7418. GCC=yes
  7419. CC=${GCJ-"gcj"}
  7420. CFLAGS=$GCJFLAGS
  7421. compiler=$CC
  7422. _LT_TAGVAR(compiler, $1)=$CC
  7423. _LT_TAGVAR(LD, $1)=$LD
  7424. _LT_CC_BASENAME([$compiler])
  7425. # GCJ did not exist at the time GCC didn't implicitly link libc in.
  7426. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7427. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7428. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  7429. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  7430. ## CAVEAT EMPTOR:
  7431. ## There is no encapsulation within the following macros, do not change
  7432. ## the running order or otherwise move them around unless you know exactly
  7433. ## what you are doing...
  7434. if test -n "$compiler"; then
  7435. _LT_COMPILER_NO_RTTI($1)
  7436. _LT_COMPILER_PIC($1)
  7437. _LT_COMPILER_C_O($1)
  7438. _LT_COMPILER_FILE_LOCKS($1)
  7439. _LT_LINKER_SHLIBS($1)
  7440. _LT_LINKER_HARDCODE_LIBPATH($1)
  7441. _LT_CONFIG($1)
  7442. fi
  7443. AC_LANG_RESTORE
  7444. GCC=$lt_save_GCC
  7445. CC=$lt_save_CC
  7446. CFLAGS=$lt_save_CFLAGS
  7447. ])# _LT_LANG_GCJ_CONFIG
  7448. # _LT_LANG_GO_CONFIG([TAG])
  7449. # --------------------------
  7450. # Ensure that the configuration variables for the GNU Go compiler
  7451. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  7452. # to write the compiler configuration to 'libtool'.
  7453. m4_defun([_LT_LANG_GO_CONFIG],
  7454. [AC_REQUIRE([LT_PROG_GO])dnl
  7455. AC_LANG_SAVE
  7456. # Source file extension for Go test sources.
  7457. ac_ext=go
  7458. # Object file extension for compiled Go test sources.
  7459. objext=o
  7460. _LT_TAGVAR(objext, $1)=$objext
  7461. # Code to be used in simple compile tests
  7462. lt_simple_compile_test_code="package main; func main() { }"
  7463. # Code to be used in simple link tests
  7464. lt_simple_link_test_code='package main; func main() { }'
  7465. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7466. _LT_TAG_COMPILER
  7467. # save warnings/boilerplate of simple test code
  7468. _LT_COMPILER_BOILERPLATE
  7469. _LT_LINKER_BOILERPLATE
  7470. # Allow CC to be a program name with arguments.
  7471. lt_save_CC=$CC
  7472. lt_save_CFLAGS=$CFLAGS
  7473. lt_save_GCC=$GCC
  7474. GCC=yes
  7475. CC=${GOC-"gccgo"}
  7476. CFLAGS=$GOFLAGS
  7477. compiler=$CC
  7478. _LT_TAGVAR(compiler, $1)=$CC
  7479. _LT_TAGVAR(LD, $1)=$LD
  7480. _LT_CC_BASENAME([$compiler])
  7481. # Go did not exist at the time GCC didn't implicitly link libc in.
  7482. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7483. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7484. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  7485. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  7486. ## CAVEAT EMPTOR:
  7487. ## There is no encapsulation within the following macros, do not change
  7488. ## the running order or otherwise move them around unless you know exactly
  7489. ## what you are doing...
  7490. if test -n "$compiler"; then
  7491. _LT_COMPILER_NO_RTTI($1)
  7492. _LT_COMPILER_PIC($1)
  7493. _LT_COMPILER_C_O($1)
  7494. _LT_COMPILER_FILE_LOCKS($1)
  7495. _LT_LINKER_SHLIBS($1)
  7496. _LT_LINKER_HARDCODE_LIBPATH($1)
  7497. _LT_CONFIG($1)
  7498. fi
  7499. AC_LANG_RESTORE
  7500. GCC=$lt_save_GCC
  7501. CC=$lt_save_CC
  7502. CFLAGS=$lt_save_CFLAGS
  7503. ])# _LT_LANG_GO_CONFIG
  7504. # _LT_LANG_RC_CONFIG([TAG])
  7505. # -------------------------
  7506. # Ensure that the configuration variables for the Windows resource compiler
  7507. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  7508. # to write the compiler configuration to 'libtool'.
  7509. m4_defun([_LT_LANG_RC_CONFIG],
  7510. [AC_REQUIRE([LT_PROG_RC])dnl
  7511. AC_LANG_SAVE
  7512. # Source file extension for RC test sources.
  7513. ac_ext=rc
  7514. # Object file extension for compiled RC test sources.
  7515. objext=o
  7516. _LT_TAGVAR(objext, $1)=$objext
  7517. # Code to be used in simple compile tests
  7518. lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
  7519. # Code to be used in simple link tests
  7520. lt_simple_link_test_code=$lt_simple_compile_test_code
  7521. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7522. _LT_TAG_COMPILER
  7523. # save warnings/boilerplate of simple test code
  7524. _LT_COMPILER_BOILERPLATE
  7525. _LT_LINKER_BOILERPLATE
  7526. # Allow CC to be a program name with arguments.
  7527. lt_save_CC=$CC
  7528. lt_save_CFLAGS=$CFLAGS
  7529. lt_save_GCC=$GCC
  7530. GCC=
  7531. CC=${RC-"windres"}
  7532. CFLAGS=
  7533. compiler=$CC
  7534. _LT_TAGVAR(compiler, $1)=$CC
  7535. _LT_CC_BASENAME([$compiler])
  7536. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  7537. if test -n "$compiler"; then
  7538. :
  7539. _LT_CONFIG($1)
  7540. fi
  7541. GCC=$lt_save_GCC
  7542. AC_LANG_RESTORE
  7543. CC=$lt_save_CC
  7544. CFLAGS=$lt_save_CFLAGS
  7545. ])# _LT_LANG_RC_CONFIG
  7546. # LT_PROG_GCJ
  7547. # -----------
  7548. AC_DEFUN([LT_PROG_GCJ],
  7549. [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
  7550. [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
  7551. [AC_CHECK_TOOL(GCJ, gcj,)
  7552. test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
  7553. AC_SUBST(GCJFLAGS)])])[]dnl
  7554. ])
  7555. # Old name:
  7556. AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
  7557. dnl aclocal-1.4 backwards compatibility:
  7558. dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
  7559. # LT_PROG_GO
  7560. # ----------
  7561. AC_DEFUN([LT_PROG_GO],
  7562. [AC_CHECK_TOOL(GOC, gccgo,)
  7563. ])
  7564. # LT_PROG_RC
  7565. # ----------
  7566. AC_DEFUN([LT_PROG_RC],
  7567. [AC_CHECK_TOOL(RC, windres,)
  7568. ])
  7569. # Old name:
  7570. AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
  7571. dnl aclocal-1.4 backwards compatibility:
  7572. dnl AC_DEFUN([LT_AC_PROG_RC], [])
  7573. # _LT_DECL_EGREP
  7574. # --------------
  7575. # If we don't have a new enough Autoconf to choose the best grep
  7576. # available, choose the one first in the user's PATH.
  7577. m4_defun([_LT_DECL_EGREP],
  7578. [AC_REQUIRE([AC_PROG_EGREP])dnl
  7579. AC_REQUIRE([AC_PROG_FGREP])dnl
  7580. test -z "$GREP" && GREP=grep
  7581. _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
  7582. _LT_DECL([], [EGREP], [1], [An ERE matcher])
  7583. _LT_DECL([], [FGREP], [1], [A literal string matcher])
  7584. dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
  7585. AC_SUBST([GREP])
  7586. ])
  7587. # _LT_DECL_OBJDUMP
  7588. # --------------
  7589. # If we don't have a new enough Autoconf to choose the best objdump
  7590. # available, choose the one first in the user's PATH.
  7591. m4_defun([_LT_DECL_OBJDUMP],
  7592. [AC_CHECK_TOOL(OBJDUMP, objdump, false)
  7593. test -z "$OBJDUMP" && OBJDUMP=objdump
  7594. _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
  7595. AC_SUBST([OBJDUMP])
  7596. ])
  7597. # _LT_DECL_DLLTOOL
  7598. # ----------------
  7599. # Ensure DLLTOOL variable is set.
  7600. m4_defun([_LT_DECL_DLLTOOL],
  7601. [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  7602. test -z "$DLLTOOL" && DLLTOOL=dlltool
  7603. _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
  7604. AC_SUBST([DLLTOOL])
  7605. ])
  7606. # _LT_DECL_FILECMD
  7607. # ----------------
  7608. # Check for a file(cmd) program that can be used to detect file type and magic
  7609. m4_defun([_LT_DECL_FILECMD],
  7610. [AC_CHECK_PROG([FILECMD], [file], [file], [:])
  7611. _LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types])
  7612. ])# _LD_DECL_FILECMD
  7613. # _LT_DECL_SED
  7614. # ------------
  7615. # Check for a fully-functional sed program, that truncates
  7616. # as few characters as possible. Prefer GNU sed if found.
  7617. m4_defun([_LT_DECL_SED],
  7618. [AC_PROG_SED
  7619. test -z "$SED" && SED=sed
  7620. Xsed="$SED -e 1s/^X//"
  7621. _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
  7622. _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
  7623. [Sed that helps us avoid accidentally triggering echo(1) options like -n])
  7624. ])# _LT_DECL_SED
  7625. dnl aclocal-1.4 backwards compatibility:
  7626. dnl AC_DEFUN([LT_AC_PROG_SED], [])
  7627. # _LT_CHECK_SHELL_FEATURES
  7628. # ------------------------
  7629. # Find out whether the shell is Bourne or XSI compatible,
  7630. # or has some other useful features.
  7631. m4_defun([_LT_CHECK_SHELL_FEATURES],
  7632. [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
  7633. lt_unset=unset
  7634. else
  7635. lt_unset=false
  7636. fi
  7637. _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
  7638. # test EBCDIC or ASCII
  7639. case `echo X|tr X '\101'` in
  7640. A) # ASCII based system
  7641. # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
  7642. lt_SP2NL='tr \040 \012'
  7643. lt_NL2SP='tr \015\012 \040\040'
  7644. ;;
  7645. *) # EBCDIC based system
  7646. lt_SP2NL='tr \100 \n'
  7647. lt_NL2SP='tr \r\n \100\100'
  7648. ;;
  7649. esac
  7650. _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
  7651. _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
  7652. ])# _LT_CHECK_SHELL_FEATURES
  7653. # _LT_PATH_CONVERSION_FUNCTIONS
  7654. # -----------------------------
  7655. # Determine what file name conversion functions should be used by
  7656. # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
  7657. # for certain cross-compile configurations and native mingw.
  7658. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
  7659. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  7660. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  7661. AC_MSG_CHECKING([how to convert $build file names to $host format])
  7662. AC_CACHE_VAL(lt_cv_to_host_file_cmd,
  7663. [case $host in
  7664. *-*-mingw* )
  7665. case $build in
  7666. *-*-mingw* | *-*-windows* ) # actually msys
  7667. lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
  7668. ;;
  7669. *-*-cygwin* )
  7670. lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
  7671. ;;
  7672. * ) # otherwise, assume *nix
  7673. lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
  7674. ;;
  7675. esac
  7676. ;;
  7677. *-*-cygwin* )
  7678. case $build in
  7679. *-*-mingw* | *-*-windows* ) # actually msys
  7680. lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
  7681. ;;
  7682. *-*-cygwin* )
  7683. lt_cv_to_host_file_cmd=func_convert_file_noop
  7684. ;;
  7685. * ) # otherwise, assume *nix
  7686. lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
  7687. ;;
  7688. esac
  7689. ;;
  7690. * ) # unhandled hosts (and "normal" native builds)
  7691. lt_cv_to_host_file_cmd=func_convert_file_noop
  7692. ;;
  7693. esac
  7694. ])
  7695. to_host_file_cmd=$lt_cv_to_host_file_cmd
  7696. AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
  7697. _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
  7698. [0], [convert $build file names to $host format])dnl
  7699. AC_MSG_CHECKING([how to convert $build file names to toolchain format])
  7700. AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
  7701. [#assume ordinary cross tools, or native build.
  7702. lt_cv_to_tool_file_cmd=func_convert_file_noop
  7703. case $host in
  7704. *-*-mingw* | *-*-windows* )
  7705. case $build in
  7706. *-*-mingw* | *-*-windows* ) # actually msys
  7707. lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
  7708. ;;
  7709. esac
  7710. ;;
  7711. esac
  7712. ])
  7713. to_tool_file_cmd=$lt_cv_to_tool_file_cmd
  7714. AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
  7715. _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
  7716. [0], [convert $build files to toolchain format])dnl
  7717. ])# _LT_PATH_CONVERSION_FUNCTIONS