libtool.m4 259 KB

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