libtool.m4 300 KB

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