libtool.m4 275 KB

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