libtool.m4 280 KB

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