libtool.m4 280 KB

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