libtool.m4 254 KB

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