libtool.m4 258 KB

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