libtool.m4 280 KB

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