Shared admin folder
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

libtool.m4.in 254KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376
  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. version_type=freebsd-$objformat
  2042. case $version_type in
  2043. freebsd-elf*)
  2044. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  2045. need_version=no
  2046. need_lib_prefix=no
  2047. ;;
  2048. freebsd-*)
  2049. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
  2050. need_version=yes
  2051. ;;
  2052. esac
  2053. shlibpath_var=LD_LIBRARY_PATH
  2054. case $host_os in
  2055. freebsd2*)
  2056. shlibpath_overrides_runpath=yes
  2057. ;;
  2058. freebsd3.[[01]]* | freebsdelf3.[[01]]*)
  2059. shlibpath_overrides_runpath=yes
  2060. hardcode_into_libs=yes
  2061. ;;
  2062. freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
  2063. freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
  2064. shlibpath_overrides_runpath=no
  2065. hardcode_into_libs=yes
  2066. ;;
  2067. *) # from 4.6 on, and DragonFly
  2068. shlibpath_overrides_runpath=yes
  2069. hardcode_into_libs=yes
  2070. ;;
  2071. esac
  2072. ;;
  2073. gnu*)
  2074. version_type=linux
  2075. need_lib_prefix=no
  2076. need_version=no
  2077. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  2078. soname_spec='${libname}${release}${shared_ext}$major'
  2079. shlibpath_var=LD_LIBRARY_PATH
  2080. hardcode_into_libs=yes
  2081. ;;
  2082. hpux9* | hpux10* | hpux11*)
  2083. # Give a soname corresponding to the major version so that dld.sl refuses to
  2084. # link against other versions.
  2085. version_type=sunos
  2086. need_lib_prefix=no
  2087. need_version=no
  2088. case $host_cpu in
  2089. ia64*)
  2090. shrext_cmds='.so'
  2091. hardcode_into_libs=yes
  2092. dynamic_linker="$host_os dld.so"
  2093. shlibpath_var=LD_LIBRARY_PATH
  2094. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  2095. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2096. soname_spec='${libname}${release}${shared_ext}$major'
  2097. if test "X$HPUX_IA64_MODE" = X32; then
  2098. sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
  2099. else
  2100. sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
  2101. fi
  2102. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2103. ;;
  2104. hppa*64*)
  2105. shrext_cmds='.sl'
  2106. hardcode_into_libs=yes
  2107. dynamic_linker="$host_os dld.sl"
  2108. shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
  2109. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  2110. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2111. soname_spec='${libname}${release}${shared_ext}$major'
  2112. sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
  2113. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2114. ;;
  2115. *)
  2116. shrext_cmds='.sl'
  2117. dynamic_linker="$host_os dld.sl"
  2118. shlibpath_var=SHLIB_PATH
  2119. shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  2120. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2121. soname_spec='${libname}${release}${shared_ext}$major'
  2122. ;;
  2123. esac
  2124. # HP-UX runs *really* slowly unless shared libraries are mode 555.
  2125. postinstall_cmds='chmod 555 $lib'
  2126. ;;
  2127. interix[[3-9]]*)
  2128. version_type=linux
  2129. need_lib_prefix=no
  2130. need_version=no
  2131. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  2132. soname_spec='${libname}${release}${shared_ext}$major'
  2133. dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
  2134. shlibpath_var=LD_LIBRARY_PATH
  2135. shlibpath_overrides_runpath=no
  2136. hardcode_into_libs=yes
  2137. ;;
  2138. irix5* | irix6* | nonstopux*)
  2139. case $host_os in
  2140. nonstopux*) version_type=nonstopux ;;
  2141. *)
  2142. if test "$lt_cv_prog_gnu_ld" = yes; then
  2143. version_type=linux
  2144. else
  2145. version_type=irix
  2146. fi ;;
  2147. esac
  2148. need_lib_prefix=no
  2149. need_version=no
  2150. soname_spec='${libname}${release}${shared_ext}$major'
  2151. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
  2152. case $host_os in
  2153. irix5* | nonstopux*)
  2154. libsuff= shlibsuff=
  2155. ;;
  2156. *)
  2157. case $LD in # libtool.m4 will add one of these switches to LD
  2158. *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
  2159. libsuff= shlibsuff= libmagic=32-bit;;
  2160. *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
  2161. libsuff=32 shlibsuff=N32 libmagic=N32;;
  2162. *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
  2163. libsuff=64 shlibsuff=64 libmagic=64-bit;;
  2164. *) libsuff= shlibsuff= libmagic=never-match;;
  2165. esac
  2166. ;;
  2167. esac
  2168. shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  2169. shlibpath_overrides_runpath=no
  2170. sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
  2171. sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
  2172. hardcode_into_libs=yes
  2173. ;;
  2174. # No shared lib support for Linux oldld, aout, or coff.
  2175. linux*oldld* | linux*aout* | linux*coff*)
  2176. dynamic_linker=no
  2177. ;;
  2178. # This must be Linux ELF.
  2179. linux* | k*bsd*-gnu)
  2180. version_type=linux
  2181. need_lib_prefix=no
  2182. need_version=no
  2183. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2184. soname_spec='${libname}${release}${shared_ext}$major'
  2185. finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  2186. shlibpath_var=LD_LIBRARY_PATH
  2187. shlibpath_overrides_runpath=no
  2188. # Some binutils ld are patched to set DT_RUNPATH
  2189. save_LDFLAGS=$LDFLAGS
  2190. save_libdir=$libdir
  2191. eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
  2192. LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
  2193. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  2194. [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
  2195. [shlibpath_overrides_runpath=yes])])
  2196. LDFLAGS=$save_LDFLAGS
  2197. libdir=$save_libdir
  2198. # This implies no fast_install, which is unacceptable.
  2199. # Some rework will be needed to allow for fast_install
  2200. # before this can be enabled.
  2201. hardcode_into_libs=yes
  2202. # Append ld.so.conf contents to the search path
  2203. if test -f /etc/ld.so.conf; then
  2204. 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' ' '`
  2205. sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
  2206. fi
  2207. # We used to test for /lib/ld.so.1 and disable shared libraries on
  2208. # powerpc, because MkLinux only supported shared libraries with the
  2209. # GNU dynamic linker. Since this was broken with cross compilers,
  2210. # most powerpc-linux boxes support dynamic linking these days and
  2211. # people can always --disable-shared, the test was removed, and we
  2212. # assume the GNU/Linux dynamic linker is in use.
  2213. dynamic_linker='GNU/Linux ld.so'
  2214. ;;
  2215. netbsdelf*-gnu)
  2216. version_type=linux
  2217. need_lib_prefix=no
  2218. need_version=no
  2219. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  2220. soname_spec='${libname}${release}${shared_ext}$major'
  2221. shlibpath_var=LD_LIBRARY_PATH
  2222. shlibpath_overrides_runpath=no
  2223. hardcode_into_libs=yes
  2224. dynamic_linker='NetBSD ld.elf_so'
  2225. ;;
  2226. netbsd*)
  2227. version_type=sunos
  2228. need_lib_prefix=no
  2229. need_version=no
  2230. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  2231. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  2232. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2233. dynamic_linker='NetBSD (a.out) ld.so'
  2234. else
  2235. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  2236. soname_spec='${libname}${release}${shared_ext}$major'
  2237. dynamic_linker='NetBSD ld.elf_so'
  2238. fi
  2239. shlibpath_var=LD_LIBRARY_PATH
  2240. shlibpath_overrides_runpath=yes
  2241. hardcode_into_libs=yes
  2242. ;;
  2243. newsos6)
  2244. version_type=linux
  2245. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2246. shlibpath_var=LD_LIBRARY_PATH
  2247. shlibpath_overrides_runpath=yes
  2248. ;;
  2249. *nto* | *qnx*)
  2250. version_type=qnx
  2251. need_lib_prefix=no
  2252. need_version=no
  2253. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2254. soname_spec='${libname}${release}${shared_ext}$major'
  2255. shlibpath_var=LD_LIBRARY_PATH
  2256. shlibpath_overrides_runpath=no
  2257. hardcode_into_libs=yes
  2258. dynamic_linker='ldqnx.so'
  2259. ;;
  2260. openbsd*)
  2261. version_type=sunos
  2262. sys_lib_dlsearch_path_spec="/usr/lib"
  2263. need_lib_prefix=no
  2264. # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
  2265. case $host_os in
  2266. openbsd3.3 | openbsd3.3.*) need_version=yes ;;
  2267. *) need_version=no ;;
  2268. esac
  2269. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  2270. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2271. shlibpath_var=LD_LIBRARY_PATH
  2272. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  2273. case $host_os in
  2274. openbsd2.[[89]] | openbsd2.[[89]].*)
  2275. shlibpath_overrides_runpath=no
  2276. ;;
  2277. *)
  2278. shlibpath_overrides_runpath=yes
  2279. ;;
  2280. esac
  2281. else
  2282. shlibpath_overrides_runpath=yes
  2283. fi
  2284. ;;
  2285. os2*)
  2286. libname_spec='$name'
  2287. shrext_cmds=".dll"
  2288. need_lib_prefix=no
  2289. library_names_spec='$libname${shared_ext} $libname.a'
  2290. dynamic_linker='OS/2 ld.exe'
  2291. shlibpath_var=LIBPATH
  2292. ;;
  2293. osf3* | osf4* | osf5*)
  2294. version_type=osf
  2295. need_lib_prefix=no
  2296. need_version=no
  2297. soname_spec='${libname}${release}${shared_ext}$major'
  2298. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2299. shlibpath_var=LD_LIBRARY_PATH
  2300. sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  2301. sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  2302. ;;
  2303. rdos*)
  2304. dynamic_linker=no
  2305. ;;
  2306. solaris*)
  2307. version_type=linux
  2308. need_lib_prefix=no
  2309. need_version=no
  2310. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2311. soname_spec='${libname}${release}${shared_ext}$major'
  2312. shlibpath_var=LD_LIBRARY_PATH
  2313. shlibpath_overrides_runpath=yes
  2314. hardcode_into_libs=yes
  2315. # ldd complains unless libraries are executable
  2316. postinstall_cmds='chmod +x $lib'
  2317. ;;
  2318. sunos4*)
  2319. version_type=sunos
  2320. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  2321. finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  2322. shlibpath_var=LD_LIBRARY_PATH
  2323. shlibpath_overrides_runpath=yes
  2324. if test "$with_gnu_ld" = yes; then
  2325. need_lib_prefix=no
  2326. fi
  2327. need_version=yes
  2328. ;;
  2329. sysv4 | sysv4.3*)
  2330. version_type=linux
  2331. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2332. soname_spec='${libname}${release}${shared_ext}$major'
  2333. shlibpath_var=LD_LIBRARY_PATH
  2334. case $host_vendor in
  2335. sni)
  2336. shlibpath_overrides_runpath=no
  2337. need_lib_prefix=no
  2338. runpath_var=LD_RUN_PATH
  2339. ;;
  2340. siemens)
  2341. need_lib_prefix=no
  2342. ;;
  2343. motorola)
  2344. need_lib_prefix=no
  2345. need_version=no
  2346. shlibpath_overrides_runpath=no
  2347. sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  2348. ;;
  2349. esac
  2350. ;;
  2351. sysv4*MP*)
  2352. if test -d /usr/nec ;then
  2353. version_type=linux
  2354. library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
  2355. soname_spec='$libname${shared_ext}.$major'
  2356. shlibpath_var=LD_LIBRARY_PATH
  2357. fi
  2358. ;;
  2359. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  2360. version_type=freebsd-elf
  2361. need_lib_prefix=no
  2362. need_version=no
  2363. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  2364. soname_spec='${libname}${release}${shared_ext}$major'
  2365. shlibpath_var=LD_LIBRARY_PATH
  2366. shlibpath_overrides_runpath=yes
  2367. hardcode_into_libs=yes
  2368. if test "$with_gnu_ld" = yes; then
  2369. sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
  2370. else
  2371. sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
  2372. case $host_os in
  2373. sco3.2v5*)
  2374. sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
  2375. ;;
  2376. esac
  2377. fi
  2378. sys_lib_dlsearch_path_spec='/usr/lib'
  2379. ;;
  2380. tpf*)
  2381. # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
  2382. version_type=linux
  2383. need_lib_prefix=no
  2384. need_version=no
  2385. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2386. shlibpath_var=LD_LIBRARY_PATH
  2387. shlibpath_overrides_runpath=no
  2388. hardcode_into_libs=yes
  2389. ;;
  2390. uts4*)
  2391. version_type=linux
  2392. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2393. soname_spec='${libname}${release}${shared_ext}$major'
  2394. shlibpath_var=LD_LIBRARY_PATH
  2395. ;;
  2396. *)
  2397. dynamic_linker=no
  2398. ;;
  2399. esac
  2400. AC_MSG_RESULT([$dynamic_linker])
  2401. test "$dynamic_linker" = no && can_build_shared=no
  2402. variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  2403. if test "$GCC" = yes; then
  2404. variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  2405. fi
  2406. if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
  2407. sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
  2408. fi
  2409. if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
  2410. sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
  2411. fi
  2412. _LT_DECL([], [variables_saved_for_relink], [1],
  2413. [Variables whose values should be saved in libtool wrapper scripts and
  2414. restored at link time])
  2415. _LT_DECL([], [need_lib_prefix], [0],
  2416. [Do we need the "lib" prefix for modules?])
  2417. _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
  2418. _LT_DECL([], [version_type], [0], [Library versioning type])
  2419. _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
  2420. _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
  2421. _LT_DECL([], [shlibpath_overrides_runpath], [0],
  2422. [Is shlibpath searched before the hard-coded library search path?])
  2423. _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
  2424. _LT_DECL([], [library_names_spec], [1],
  2425. [[List of archive names. First name is the real one, the rest are links.
  2426. The last name is the one that the linker finds with -lNAME]])
  2427. _LT_DECL([], [soname_spec], [1],
  2428. [[The coded name of the library, if different from the real name]])
  2429. _LT_DECL([], [postinstall_cmds], [2],
  2430. [Command to use after installation of a shared archive])
  2431. _LT_DECL([], [postuninstall_cmds], [2],
  2432. [Command to use after uninstallation of a shared archive])
  2433. _LT_DECL([], [finish_cmds], [2],
  2434. [Commands used to finish a libtool library installation in a directory])
  2435. _LT_DECL([], [finish_eval], [1],
  2436. [[As "finish_cmds", except a single script fragment to be evaled but
  2437. not shown]])
  2438. _LT_DECL([], [hardcode_into_libs], [0],
  2439. [Whether we should hardcode library paths into libraries])
  2440. _LT_DECL([], [sys_lib_search_path_spec], [2],
  2441. [Compile-time system search path for libraries])
  2442. _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
  2443. [Run-time system search path for libraries])
  2444. ])# _LT_SYS_DYNAMIC_LINKER
  2445. # _LT_PATH_TOOL_PREFIX(TOOL)
  2446. # --------------------------
  2447. # find a file program which can recognize shared library
  2448. AC_DEFUN([_LT_PATH_TOOL_PREFIX],
  2449. [m4_require([_LT_DECL_EGREP])dnl
  2450. AC_MSG_CHECKING([for $1])
  2451. AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
  2452. [case $MAGIC_CMD in
  2453. [[\\/*] | ?:[\\/]*])
  2454. lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
  2455. ;;
  2456. *)
  2457. lt_save_MAGIC_CMD="$MAGIC_CMD"
  2458. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  2459. dnl $ac_dummy forces splitting on constant user-supplied paths.
  2460. dnl POSIX.2 word splitting is done only on the output of word expansions,
  2461. dnl not every word. This closes a longstanding sh security hole.
  2462. ac_dummy="m4_if([$2], , $PATH, [$2])"
  2463. for ac_dir in $ac_dummy; do
  2464. IFS="$lt_save_ifs"
  2465. test -z "$ac_dir" && ac_dir=.
  2466. if test -f $ac_dir/$1; then
  2467. lt_cv_path_MAGIC_CMD="$ac_dir/$1"
  2468. if test -n "$file_magic_test_file"; then
  2469. case $deplibs_check_method in
  2470. "file_magic "*)
  2471. file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
  2472. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  2473. if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  2474. $EGREP "$file_magic_regex" > /dev/null; then
  2475. :
  2476. else
  2477. cat <<_LT_EOF 1>&2
  2478. *** Warning: the command libtool uses to detect shared libraries,
  2479. *** $file_magic_cmd, produces output that libtool cannot recognize.
  2480. *** The result is that libtool may fail to recognize shared libraries
  2481. *** as such. This will affect the creation of libtool libraries that
  2482. *** depend on shared libraries, but programs linked with such libtool
  2483. *** libraries will work regardless of this problem. Nevertheless, you
  2484. *** may want to report the problem to your system manager and/or to
  2485. *** bug-libtool@gnu.org
  2486. _LT_EOF
  2487. fi ;;
  2488. esac
  2489. fi
  2490. break
  2491. fi
  2492. done
  2493. IFS="$lt_save_ifs"
  2494. MAGIC_CMD="$lt_save_MAGIC_CMD"
  2495. ;;
  2496. esac])
  2497. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  2498. if test -n "$MAGIC_CMD"; then
  2499. AC_MSG_RESULT($MAGIC_CMD)
  2500. else
  2501. AC_MSG_RESULT(no)
  2502. fi
  2503. _LT_DECL([], [MAGIC_CMD], [0],
  2504. [Used to examine libraries when file_magic_cmd begins with "file"])dnl
  2505. ])# _LT_PATH_TOOL_PREFIX
  2506. # Old name:
  2507. AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
  2508. dnl aclocal-1.4 backwards compatibility:
  2509. dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
  2510. # _LT_PATH_MAGIC
  2511. # --------------
  2512. # find a file program which can recognize a shared library
  2513. m4_defun([_LT_PATH_MAGIC],
  2514. [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
  2515. if test -z "$lt_cv_path_MAGIC_CMD"; then
  2516. if test -n "$ac_tool_prefix"; then
  2517. _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
  2518. else
  2519. MAGIC_CMD=:
  2520. fi
  2521. fi
  2522. ])# _LT_PATH_MAGIC
  2523. # LT_PATH_LD
  2524. # ----------
  2525. # find the pathname to the GNU or non-GNU linker
  2526. AC_DEFUN([LT_PATH_LD],
  2527. [AC_REQUIRE([AC_PROG_CC])dnl
  2528. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2529. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  2530. m4_require([_LT_DECL_SED])dnl
  2531. m4_require([_LT_DECL_EGREP])dnl
  2532. AC_ARG_WITH([gnu-ld],
  2533. [AS_HELP_STRING([--with-gnu-ld],
  2534. [assume the C compiler uses GNU ld @<:@default=no@:>@])],
  2535. [test "$withval" = no || with_gnu_ld=yes],
  2536. [with_gnu_ld=no])dnl
  2537. ac_prog=ld
  2538. if test "$GCC" = yes; then
  2539. # Check if gcc -print-prog-name=ld gives a path.
  2540. AC_MSG_CHECKING([for ld used by $CC])
  2541. case $host in
  2542. *-*-mingw*)
  2543. # gcc leaves a trailing carriage return which upsets mingw
  2544. ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  2545. *)
  2546. ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  2547. esac
  2548. case $ac_prog in
  2549. # Accept absolute paths.
  2550. [[\\/]]* | ?:[[\\/]]*)
  2551. re_direlt='/[[^/]][[^/]]*/\.\./'
  2552. # Canonicalize the pathname of ld
  2553. ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
  2554. while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
  2555. ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
  2556. done
  2557. test -z "$LD" && LD="$ac_prog"
  2558. ;;
  2559. "")
  2560. # If it fails, then pretend we aren't using GCC.
  2561. ac_prog=ld
  2562. ;;
  2563. *)
  2564. # If it is relative, then search for the first ld in PATH.
  2565. with_gnu_ld=unknown
  2566. ;;
  2567. esac
  2568. elif test "$with_gnu_ld" = yes; then
  2569. AC_MSG_CHECKING([for GNU ld])
  2570. else
  2571. AC_MSG_CHECKING([for non-GNU ld])
  2572. fi
  2573. AC_CACHE_VAL(lt_cv_path_LD,
  2574. [if test -z "$LD"; then
  2575. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  2576. for ac_dir in $PATH; do
  2577. IFS="$lt_save_ifs"
  2578. test -z "$ac_dir" && ac_dir=.
  2579. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  2580. lt_cv_path_LD="$ac_dir/$ac_prog"
  2581. # Check to see if the program is GNU ld. I'd rather use --version,
  2582. # but apparently some variants of GNU ld only accept -v.
  2583. # Break only if it was the GNU/non-GNU ld that we prefer.
  2584. case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
  2585. *GNU* | *'with BFD'*)
  2586. test "$with_gnu_ld" != no && break
  2587. ;;
  2588. *)
  2589. test "$with_gnu_ld" != yes && break
  2590. ;;
  2591. esac
  2592. fi
  2593. done
  2594. IFS="$lt_save_ifs"
  2595. else
  2596. lt_cv_path_LD="$LD" # Let the user override the test with a path.
  2597. fi])
  2598. LD="$lt_cv_path_LD"
  2599. if test -n "$LD"; then
  2600. AC_MSG_RESULT($LD)
  2601. else
  2602. AC_MSG_RESULT(no)
  2603. fi
  2604. test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  2605. _LT_PATH_LD_GNU
  2606. AC_SUBST([LD])
  2607. _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
  2608. ])# LT_PATH_LD
  2609. # Old names:
  2610. AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
  2611. AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
  2612. dnl aclocal-1.4 backwards compatibility:
  2613. dnl AC_DEFUN([AM_PROG_LD], [])
  2614. dnl AC_DEFUN([AC_PROG_LD], [])
  2615. # _LT_PATH_LD_GNU
  2616. #- --------------
  2617. m4_defun([_LT_PATH_LD_GNU],
  2618. [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
  2619. [# I'd rather use --version here, but apparently some GNU lds only accept -v.
  2620. case `$LD -v 2>&1 </dev/null` in
  2621. *GNU* | *'with BFD'*)
  2622. lt_cv_prog_gnu_ld=yes
  2623. ;;
  2624. *)
  2625. lt_cv_prog_gnu_ld=no
  2626. ;;
  2627. esac])
  2628. with_gnu_ld=$lt_cv_prog_gnu_ld
  2629. ])# _LT_PATH_LD_GNU
  2630. # _LT_CMD_RELOAD
  2631. # --------------
  2632. # find reload flag for linker
  2633. # -- PORTME Some linkers may need a different reload flag.
  2634. m4_defun([_LT_CMD_RELOAD],
  2635. [AC_CACHE_CHECK([for $LD option to reload object files],
  2636. lt_cv_ld_reload_flag,
  2637. [lt_cv_ld_reload_flag='-r'])
  2638. reload_flag=$lt_cv_ld_reload_flag
  2639. case $reload_flag in
  2640. "" | " "*) ;;
  2641. *) reload_flag=" $reload_flag" ;;
  2642. esac
  2643. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  2644. case $host_os in
  2645. darwin*)
  2646. if test "$GCC" = yes; then
  2647. reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
  2648. else
  2649. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  2650. fi
  2651. ;;
  2652. esac
  2653. _LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
  2654. _LT_DECL([], [reload_cmds], [2])dnl
  2655. ])# _LT_CMD_RELOAD
  2656. # _LT_CHECK_MAGIC_METHOD
  2657. # ----------------------
  2658. # how to check for library dependencies
  2659. # -- PORTME fill in with the dynamic library characteristics
  2660. m4_defun([_LT_CHECK_MAGIC_METHOD],
  2661. [m4_require([_LT_DECL_EGREP])
  2662. m4_require([_LT_DECL_OBJDUMP])
  2663. AC_CACHE_CHECK([how to recognize dependent libraries],
  2664. lt_cv_deplibs_check_method,
  2665. [lt_cv_file_magic_cmd='$MAGIC_CMD'
  2666. lt_cv_file_magic_test_file=
  2667. lt_cv_deplibs_check_method='unknown'
  2668. # Need to set the preceding variable on all platforms that support
  2669. # interlibrary dependencies.
  2670. # 'none' -- dependencies not supported.
  2671. # `unknown' -- same as none, but documents that we really don't know.
  2672. # 'pass_all' -- all dependencies passed with no checks.
  2673. # 'test_compile' -- check by making test program.
  2674. # 'file_magic [[regex]]' -- check by looking for files in library path
  2675. # which responds to the $file_magic_cmd with a given extended regex.
  2676. # If you have `file' or equivalent on your system and you're not sure
  2677. # whether `pass_all' will *always* work, you probably want this one.
  2678. case $host_os in
  2679. aix[[4-9]]*)
  2680. lt_cv_deplibs_check_method=pass_all
  2681. ;;
  2682. beos*)
  2683. lt_cv_deplibs_check_method=pass_all
  2684. ;;
  2685. bsdi[[45]]*)
  2686. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
  2687. lt_cv_file_magic_cmd='/usr/bin/file -L'
  2688. lt_cv_file_magic_test_file=/shlib/libc.so
  2689. ;;
  2690. cygwin*)
  2691. # func_win32_libid is a shell function defined in ltmain.sh
  2692. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  2693. lt_cv_file_magic_cmd='func_win32_libid'
  2694. ;;
  2695. mingw* | pw32*)
  2696. # Base MSYS/MinGW do not provide the 'file' command needed by
  2697. # func_win32_libid shell function, so use a weaker test based on 'objdump',
  2698. # unless we find 'file', for example because we are cross-compiling.
  2699. if ( file / ) >/dev/null 2>&1; then
  2700. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  2701. lt_cv_file_magic_cmd='func_win32_libid'
  2702. else
  2703. lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
  2704. lt_cv_file_magic_cmd='$OBJDUMP -f'
  2705. fi
  2706. ;;
  2707. cegcc)
  2708. # use the weaker test based on 'objdump'. See mingw*.
  2709. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
  2710. lt_cv_file_magic_cmd='$OBJDUMP -f'
  2711. ;;
  2712. darwin* | rhapsody*)
  2713. lt_cv_deplibs_check_method=pass_all
  2714. ;;
  2715. freebsd* | dragonfly*)
  2716. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  2717. case $host_cpu in
  2718. i*86 )
  2719. # Not sure whether the presence of OpenBSD here was a mistake.
  2720. # Let's accept both of them until this is cleared up.
  2721. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
  2722. lt_cv_file_magic_cmd=/usr/bin/file
  2723. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  2724. ;;
  2725. esac
  2726. else
  2727. lt_cv_deplibs_check_method=pass_all
  2728. fi
  2729. ;;
  2730. gnu*)
  2731. lt_cv_deplibs_check_method=pass_all
  2732. ;;
  2733. hpux10.20* | hpux11*)
  2734. lt_cv_file_magic_cmd=/usr/bin/file
  2735. case $host_cpu in
  2736. ia64*)
  2737. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
  2738. lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
  2739. ;;
  2740. hppa*64*)
  2741. [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]']
  2742. lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
  2743. ;;
  2744. *)
  2745. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
  2746. lt_cv_file_magic_test_file=/usr/lib/libc.sl
  2747. ;;
  2748. esac
  2749. ;;
  2750. interix[[3-9]]*)
  2751. # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
  2752. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
  2753. ;;
  2754. irix5* | irix6* | nonstopux*)
  2755. case $LD in
  2756. *-32|*"-32 ") libmagic=32-bit;;
  2757. *-n32|*"-n32 ") libmagic=N32;;
  2758. *-64|*"-64 ") libmagic=64-bit;;
  2759. *) libmagic=never-match;;
  2760. esac
  2761. lt_cv_deplibs_check_method=pass_all
  2762. ;;
  2763. # This must be Linux ELF.
  2764. linux* | k*bsd*-gnu)
  2765. lt_cv_deplibs_check_method=pass_all
  2766. ;;
  2767. netbsd* | netbsdelf*-gnu)
  2768. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  2769. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  2770. else
  2771. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
  2772. fi
  2773. ;;
  2774. newos6*)
  2775. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
  2776. lt_cv_file_magic_cmd=/usr/bin/file
  2777. lt_cv_file_magic_test_file=/usr/lib/libnls.so
  2778. ;;
  2779. *nto* | *qnx*)
  2780. lt_cv_deplibs_check_method=pass_all
  2781. ;;
  2782. openbsd*)
  2783. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  2784. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
  2785. else
  2786. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  2787. fi
  2788. ;;
  2789. osf3* | osf4* | osf5*)
  2790. lt_cv_deplibs_check_method=pass_all
  2791. ;;
  2792. rdos*)
  2793. lt_cv_deplibs_check_method=pass_all
  2794. ;;
  2795. solaris*)
  2796. lt_cv_deplibs_check_method=pass_all
  2797. ;;
  2798. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  2799. lt_cv_deplibs_check_method=pass_all
  2800. ;;
  2801. sysv4 | sysv4.3*)
  2802. case $host_vendor in
  2803. motorola)
  2804. 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]]'
  2805. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  2806. ;;
  2807. ncr)
  2808. lt_cv_deplibs_check_method=pass_all
  2809. ;;
  2810. sequent)
  2811. lt_cv_file_magic_cmd='/bin/file'
  2812. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
  2813. ;;
  2814. sni)
  2815. lt_cv_file_magic_cmd='/bin/file'
  2816. lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
  2817. lt_cv_file_magic_test_file=/lib/libc.so
  2818. ;;
  2819. siemens)
  2820. lt_cv_deplibs_check_method=pass_all
  2821. ;;
  2822. pc)
  2823. lt_cv_deplibs_check_method=pass_all
  2824. ;;
  2825. esac
  2826. ;;
  2827. tpf*)
  2828. lt_cv_deplibs_check_method=pass_all
  2829. ;;
  2830. esac
  2831. ])
  2832. file_magic_cmd=$lt_cv_file_magic_cmd
  2833. deplibs_check_method=$lt_cv_deplibs_check_method
  2834. test -z "$deplibs_check_method" && deplibs_check_method=unknown
  2835. _LT_DECL([], [deplibs_check_method], [1],
  2836. [Method to check whether dependent libraries are shared objects])
  2837. _LT_DECL([], [file_magic_cmd], [1],
  2838. [Command to use when deplibs_check_method == "file_magic"])
  2839. ])# _LT_CHECK_MAGIC_METHOD
  2840. # LT_PATH_NM
  2841. # ----------
  2842. # find the pathname to a BSD- or MS-compatible name lister
  2843. AC_DEFUN([LT_PATH_NM],
  2844. [AC_REQUIRE([AC_PROG_CC])dnl
  2845. AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
  2846. [if test -n "$NM"; then
  2847. # Let the user override the test.
  2848. lt_cv_path_NM="$NM"
  2849. else
  2850. lt_nm_to_check="${ac_tool_prefix}nm"
  2851. if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
  2852. lt_nm_to_check="$lt_nm_to_check nm"
  2853. fi
  2854. for lt_tmp_nm in $lt_nm_to_check; do
  2855. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  2856. for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
  2857. IFS="$lt_save_ifs"
  2858. test -z "$ac_dir" && ac_dir=.
  2859. tmp_nm="$ac_dir/$lt_tmp_nm"
  2860. if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
  2861. # Check to see if the nm accepts a BSD-compat flag.
  2862. # Adding the `sed 1q' prevents false positives on HP-UX, which says:
  2863. # nm: unknown option "B" ignored
  2864. # Tru64's nm complains that /dev/null is an invalid object file
  2865. case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
  2866. */dev/null* | *'Invalid file or object type'*)
  2867. lt_cv_path_NM="$tmp_nm -B"
  2868. break
  2869. ;;
  2870. *)
  2871. case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
  2872. */dev/null*)
  2873. lt_cv_path_NM="$tmp_nm -p"
  2874. break
  2875. ;;
  2876. *)
  2877. lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
  2878. continue # so that we can try to find one that supports BSD flags
  2879. ;;
  2880. esac
  2881. ;;
  2882. esac
  2883. fi
  2884. done
  2885. IFS="$lt_save_ifs"
  2886. done
  2887. : ${lt_cv_path_NM=no}
  2888. fi])
  2889. if test "$lt_cv_path_NM" != "no"; then
  2890. NM="$lt_cv_path_NM"
  2891. else
  2892. # Didn't find any BSD compatible name lister, look for dumpbin.
  2893. AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
  2894. AC_SUBST([DUMPBIN])
  2895. if test "$DUMPBIN" != ":"; then
  2896. NM="$DUMPBIN"
  2897. fi
  2898. fi
  2899. test -z "$NM" && NM=nm
  2900. AC_SUBST([NM])
  2901. _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
  2902. AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
  2903. [lt_cv_nm_interface="BSD nm"
  2904. echo "int some_variable = 0;" > conftest.$ac_ext
  2905. (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
  2906. (eval "$ac_compile" 2>conftest.err)
  2907. cat conftest.err >&AS_MESSAGE_LOG_FD
  2908. (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
  2909. (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
  2910. cat conftest.err >&AS_MESSAGE_LOG_FD
  2911. (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
  2912. cat conftest.out >&AS_MESSAGE_LOG_FD
  2913. if $GREP 'External.*some_variable' conftest.out > /dev/null; then
  2914. lt_cv_nm_interface="MS dumpbin"
  2915. fi
  2916. rm -f conftest*])
  2917. ])# LT_PATH_NM
  2918. # Old names:
  2919. AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
  2920. AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
  2921. dnl aclocal-1.4 backwards compatibility:
  2922. dnl AC_DEFUN([AM_PROG_NM], [])
  2923. dnl AC_DEFUN([AC_PROG_NM], [])
  2924. # LT_LIB_M
  2925. # --------
  2926. # check for math library
  2927. AC_DEFUN([LT_LIB_M],
  2928. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2929. LIBM=
  2930. case $host in
  2931. *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
  2932. # These system don't have libm, or don't need it
  2933. ;;
  2934. *-ncr-sysv4.3*)
  2935. AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
  2936. AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
  2937. ;;
  2938. *)
  2939. AC_CHECK_LIB(m, cos, LIBM="-lm")
  2940. ;;
  2941. esac
  2942. AC_SUBST([LIBM])
  2943. ])# LT_LIB_M
  2944. # Old name:
  2945. AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
  2946. dnl aclocal-1.4 backwards compatibility:
  2947. dnl AC_DEFUN([AC_CHECK_LIBM], [])
  2948. # _LT_COMPILER_NO_RTTI([TAGNAME])
  2949. # -------------------------------
  2950. m4_defun([_LT_COMPILER_NO_RTTI],
  2951. [m4_require([_LT_TAG_COMPILER])dnl
  2952. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  2953. if test "$GCC" = yes; then
  2954. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  2955. _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
  2956. lt_cv_prog_compiler_rtti_exceptions,
  2957. [-fno-rtti -fno-exceptions], [],
  2958. [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
  2959. fi
  2960. _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
  2961. [Compiler flag to turn off builtin functions])
  2962. ])# _LT_COMPILER_NO_RTTI
  2963. # _LT_CMD_GLOBAL_SYMBOLS
  2964. # ----------------------
  2965. m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
  2966. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2967. AC_REQUIRE([AC_PROG_CC])dnl
  2968. AC_REQUIRE([LT_PATH_NM])dnl
  2969. AC_REQUIRE([LT_PATH_LD])dnl
  2970. m4_require([_LT_DECL_SED])dnl
  2971. m4_require([_LT_DECL_EGREP])dnl
  2972. m4_require([_LT_TAG_COMPILER])dnl
  2973. # Check for command to grab the raw symbol name followed by C symbol from nm.
  2974. AC_MSG_CHECKING([command to parse $NM output from $compiler object])
  2975. AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
  2976. [
  2977. # These are sane defaults that work on at least a few old systems.
  2978. # [They come from Ultrix. What could be older than Ultrix?!! ;)]
  2979. # Character class describing NM global symbol codes.
  2980. symcode='[[BCDEGRST]]'
  2981. # Regexp to match symbols that can be accessed directly from C.
  2982. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
  2983. # Define system-specific variables.
  2984. case $host_os in
  2985. aix*)
  2986. symcode='[[BCDT]]'
  2987. ;;
  2988. cygwin* | mingw* | pw32* | cegcc*)
  2989. symcode='[[ABCDGISTW]]'
  2990. ;;
  2991. hpux*)
  2992. if test "$host_cpu" = ia64; then
  2993. symcode='[[ABCDEGRST]]'
  2994. fi
  2995. ;;
  2996. irix* | nonstopux*)
  2997. symcode='[[BCDEGRST]]'
  2998. ;;
  2999. osf*)
  3000. symcode='[[BCDEGQRST]]'
  3001. ;;
  3002. solaris*)
  3003. symcode='[[BDRT]]'
  3004. ;;
  3005. sco3.2v5*)
  3006. symcode='[[DT]]'
  3007. ;;
  3008. sysv4.2uw2*)
  3009. symcode='[[DT]]'
  3010. ;;
  3011. sysv5* | sco5v6* | unixware* | OpenUNIX*)
  3012. symcode='[[ABDT]]'
  3013. ;;
  3014. sysv4)
  3015. symcode='[[DFNSTU]]'
  3016. ;;
  3017. esac
  3018. # If we're using GNU nm, then use its standard symbol codes.
  3019. case `$NM -V 2>&1` in
  3020. *GNU* | *'with BFD'*)
  3021. symcode='[[ABCDGIRSTW]]' ;;
  3022. esac
  3023. # Transform an extracted symbol line into a proper C declaration.
  3024. # Some systems (esp. on ia64) link data and code symbols differently,
  3025. # so use this general approach.
  3026. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  3027. # Transform an extracted symbol line into symbol name and symbol address
  3028. lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
  3029. 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'"
  3030. # Handle CRLF in mingw tool chain
  3031. opt_cr=
  3032. case $build_os in
  3033. mingw*)
  3034. opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  3035. ;;
  3036. esac
  3037. # Try without a prefix underscore, then with it.
  3038. for ac_symprfx in "" "_"; do
  3039. # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
  3040. symxfrm="\\1 $ac_symprfx\\2 \\2"
  3041. # Write the raw and C identifiers.
  3042. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3043. # Fake it for dumpbin and say T for any non-static function
  3044. # and D for any global variable.
  3045. # Also find C++ and __fastcall symbols from MSVC++,
  3046. # which start with @ or ?.
  3047. lt_cv_sys_global_symbol_pipe="$AWK ['"\
  3048. " {last_section=section; section=\$ 3};"\
  3049. " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
  3050. " \$ 0!~/External *\|/{next};"\
  3051. " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
  3052. " {if(hide[section]) next};"\
  3053. " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
  3054. " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
  3055. " s[1]~/^[@?]/{print s[1], s[1]; next};"\
  3056. " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
  3057. " ' prfx=^$ac_symprfx]"
  3058. else
  3059. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
  3060. fi
  3061. # Check to see that the pipe works correctly.
  3062. pipe_works=no
  3063. rm -f conftest*
  3064. cat > conftest.$ac_ext <<_LT_EOF
  3065. #ifdef __cplusplus
  3066. extern "C" {
  3067. #endif
  3068. char nm_test_var;
  3069. void nm_test_func(void);
  3070. void nm_test_func(void){}
  3071. #ifdef __cplusplus
  3072. }
  3073. #endif
  3074. int main(){nm_test_var='a';nm_test_func();return(0);}
  3075. _LT_EOF
  3076. if AC_TRY_EVAL(ac_compile); then
  3077. # Now try to grab the symbols.
  3078. nlist=conftest.nm
  3079. if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
  3080. # Try sorting and uniquifying the output.
  3081. if sort "$nlist" | uniq > "$nlist"T; then
  3082. mv -f "$nlist"T "$nlist"
  3083. else
  3084. rm -f "$nlist"T
  3085. fi
  3086. # Make sure that we snagged all the symbols we need.
  3087. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
  3088. if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
  3089. cat <<_LT_EOF > conftest.$ac_ext
  3090. #ifdef __cplusplus
  3091. extern "C" {
  3092. #endif
  3093. _LT_EOF
  3094. # Now generate the symbol file.
  3095. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
  3096. cat <<_LT_EOF >> conftest.$ac_ext
  3097. /* The mapping between symbol names and symbols. */
  3098. const struct {
  3099. const char *name;
  3100. void *address;
  3101. }
  3102. lt__PROGRAM__LTX_preloaded_symbols[[]] =
  3103. {
  3104. { "@PROGRAM@", (void *) 0 },
  3105. _LT_EOF
  3106. $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
  3107. cat <<\_LT_EOF >> conftest.$ac_ext
  3108. {0, (void *) 0}
  3109. };
  3110. /* This works around a problem in FreeBSD linker */
  3111. #ifdef FREEBSD_WORKAROUND
  3112. static const void *lt_preloaded_setup() {
  3113. return lt__PROGRAM__LTX_preloaded_symbols;
  3114. }
  3115. #endif
  3116. #ifdef __cplusplus
  3117. }
  3118. #endif
  3119. _LT_EOF
  3120. # Now try linking the two files.
  3121. mv conftest.$ac_objext conftstm.$ac_objext
  3122. lt_save_LIBS="$LIBS"
  3123. lt_save_CFLAGS="$CFLAGS"
  3124. LIBS="conftstm.$ac_objext"
  3125. CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
  3126. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
  3127. pipe_works=yes
  3128. fi
  3129. LIBS="$lt_save_LIBS"
  3130. CFLAGS="$lt_save_CFLAGS"
  3131. else
  3132. echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
  3133. fi
  3134. else
  3135. echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
  3136. fi
  3137. else
  3138. echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
  3139. fi
  3140. else
  3141. echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
  3142. cat conftest.$ac_ext >&5
  3143. fi
  3144. rm -rf conftest* conftst*
  3145. # Do not use the global_symbol_pipe unless it works.
  3146. if test "$pipe_works" = yes; then
  3147. break
  3148. else
  3149. lt_cv_sys_global_symbol_pipe=
  3150. fi
  3151. done
  3152. ])
  3153. if test -z "$lt_cv_sys_global_symbol_pipe"; then
  3154. lt_cv_sys_global_symbol_to_cdecl=
  3155. fi
  3156. if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
  3157. AC_MSG_RESULT(failed)
  3158. else
  3159. AC_MSG_RESULT(ok)
  3160. fi
  3161. _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
  3162. [Take the output of nm and produce a listing of raw symbols and C names])
  3163. _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
  3164. [Transform the output of nm in a proper C declaration])
  3165. _LT_DECL([global_symbol_to_c_name_address],
  3166. [lt_cv_sys_global_symbol_to_c_name_address], [1],
  3167. [Transform the output of nm in a C name address pair])
  3168. _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
  3169. [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
  3170. [Transform the output of nm in a C name address pair when lib prefix is needed])
  3171. ]) # _LT_CMD_GLOBAL_SYMBOLS
  3172. # _LT_COMPILER_PIC([TAGNAME])
  3173. # ---------------------------
  3174. m4_defun([_LT_COMPILER_PIC],
  3175. [m4_require([_LT_TAG_COMPILER])dnl
  3176. _LT_TAGVAR(lt_prog_compiler_wl, $1)=
  3177. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3178. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3179. AC_MSG_CHECKING([for $compiler option to produce PIC])
  3180. m4_if([$1], [CXX], [
  3181. # C++ specific cases for pic, static, wl, etc.
  3182. if test "$GXX" = yes; then
  3183. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3184. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3185. case $host_os in
  3186. aix*)
  3187. # All AIX code is PIC.
  3188. if test "$host_cpu" = ia64; then
  3189. # AIX 5 now supports IA64 processor
  3190. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3191. fi
  3192. ;;
  3193. amigaos*)
  3194. case $host_cpu in
  3195. powerpc)
  3196. # see comment about AmigaOS4 .so support
  3197. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3198. ;;
  3199. m68k)
  3200. # FIXME: we need at least 68020 code to build shared libraries, but
  3201. # adding the `-m68020' flag to GCC prevents building anything better,
  3202. # like `-m68040'.
  3203. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  3204. ;;
  3205. esac
  3206. ;;
  3207. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  3208. # PIC is the default for these OSes.
  3209. ;;
  3210. mingw* | cygwin* | os2* | pw32* | cegcc*)
  3211. # This hack is so that the source file can tell whether it is being
  3212. # built for inclusion in a dll (and should export symbols for example).
  3213. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  3214. # (--disable-auto-import) libraries
  3215. m4_if([$1], [GCJ], [],
  3216. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3217. ;;
  3218. darwin* | rhapsody*)
  3219. # PIC is the default on this platform
  3220. # Common symbols not allowed in MH_DYLIB files
  3221. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  3222. ;;
  3223. *djgpp*)
  3224. # DJGPP does not support shared libraries at all
  3225. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3226. ;;
  3227. interix[[3-9]]*)
  3228. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  3229. # Instead, we relocate shared libraries at runtime.
  3230. ;;
  3231. sysv4*MP*)
  3232. if test -d /usr/nec; then
  3233. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  3234. fi
  3235. ;;
  3236. hpux*)
  3237. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  3238. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  3239. # sets the default TLS model and affects inlining.
  3240. case $host_cpu in
  3241. hppa*64*)
  3242. ;;
  3243. *)
  3244. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3245. ;;
  3246. esac
  3247. ;;
  3248. *qnx* | *nto*)
  3249. # QNX uses GNU C++, but need to define -shared option too, otherwise
  3250. # it will coredump.
  3251. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  3252. ;;
  3253. *)
  3254. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3255. ;;
  3256. esac
  3257. else
  3258. case $host_os in
  3259. aix[[4-9]]*)
  3260. # All AIX code is PIC.
  3261. if test "$host_cpu" = ia64; then
  3262. # AIX 5 now supports IA64 processor
  3263. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3264. else
  3265. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  3266. fi
  3267. ;;
  3268. chorus*)
  3269. case $cc_basename in
  3270. cxch68*)
  3271. # Green Hills C++ Compiler
  3272. # _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"
  3273. ;;
  3274. esac
  3275. ;;
  3276. dgux*)
  3277. case $cc_basename in
  3278. ec++*)
  3279. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3280. ;;
  3281. ghcx*)
  3282. # Green Hills C++ Compiler
  3283. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3284. ;;
  3285. *)
  3286. ;;
  3287. esac
  3288. ;;
  3289. freebsd* | dragonfly*)
  3290. # FreeBSD uses GNU C++
  3291. ;;
  3292. hpux9* | hpux10* | hpux11*)
  3293. case $cc_basename in
  3294. CC*)
  3295. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3296. _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  3297. if test "$host_cpu" != ia64; then
  3298. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  3299. fi
  3300. ;;
  3301. aCC*)
  3302. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3303. _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  3304. case $host_cpu in
  3305. hppa*64*|ia64*)
  3306. # +Z the default
  3307. ;;
  3308. *)
  3309. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  3310. ;;
  3311. esac
  3312. ;;
  3313. *)
  3314. ;;
  3315. esac
  3316. ;;
  3317. interix*)
  3318. # This is c89, which is MS Visual C++ (no shared libs)
  3319. # Anyone wants to do a port?
  3320. ;;
  3321. irix5* | irix6* | nonstopux*)
  3322. case $cc_basename in
  3323. CC*)
  3324. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3325. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3326. # CC pic flag -KPIC is the default.
  3327. ;;
  3328. *)
  3329. ;;
  3330. esac
  3331. ;;
  3332. linux* | k*bsd*-gnu)
  3333. case $cc_basename in
  3334. KCC*)
  3335. # KAI C++ Compiler
  3336. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  3337. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3338. ;;
  3339. ecpc* )
  3340. # old Intel C++ for x86_64 which still supported -KPIC.
  3341. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3342. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3343. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3344. ;;
  3345. icpc* )
  3346. # Intel C++, used to be incompatible with GCC.
  3347. # ICC 10 doesn't accept -KPIC any more.
  3348. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3349. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3350. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3351. ;;
  3352. pgCC* | pgcpp*)
  3353. # Portland Group C++ compiler
  3354. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3355. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  3356. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3357. ;;
  3358. cxx*)
  3359. # Compaq C++
  3360. # Make sure the PIC flag is empty. It appears that all Alpha
  3361. # Linux and Compaq Tru64 Unix objects are PIC.
  3362. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3363. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3364. ;;
  3365. xlc* | xlC*)
  3366. # IBM XL 8.0 on PPC
  3367. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3368. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  3369. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  3370. ;;
  3371. *)
  3372. case `$CC -V 2>&1 | sed 5q` in
  3373. *Sun\ C*)
  3374. # Sun C++ 5.9
  3375. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3376. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3377. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  3378. ;;
  3379. esac
  3380. ;;
  3381. esac
  3382. ;;
  3383. lynxos*)
  3384. ;;
  3385. m88k*)
  3386. ;;
  3387. mvs*)
  3388. case $cc_basename in
  3389. cxx*)
  3390. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
  3391. ;;
  3392. *)
  3393. ;;
  3394. esac
  3395. ;;
  3396. netbsd* | netbsdelf*-gnu)
  3397. ;;
  3398. *qnx* | *nto*)
  3399. # QNX uses GNU C++, but need to define -shared option too, otherwise
  3400. # it will coredump.
  3401. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  3402. ;;
  3403. osf3* | osf4* | osf5*)
  3404. case $cc_basename in
  3405. KCC*)
  3406. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  3407. ;;
  3408. RCC*)
  3409. # Rational C++ 2.4.1
  3410. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3411. ;;
  3412. cxx*)
  3413. # Digital/Compaq C++
  3414. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3415. # Make sure the PIC flag is empty. It appears that all Alpha
  3416. # Linux and Compaq Tru64 Unix objects are PIC.
  3417. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3418. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3419. ;;
  3420. *)
  3421. ;;
  3422. esac
  3423. ;;
  3424. psos*)
  3425. ;;
  3426. solaris*)
  3427. case $cc_basename in
  3428. CC*)
  3429. # Sun C++ 4.2, 5.x and Centerline C++
  3430. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3431. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3432. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  3433. ;;
  3434. gcx*)
  3435. # Green Hills C++ Compiler
  3436. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  3437. ;;
  3438. *)
  3439. ;;
  3440. esac
  3441. ;;
  3442. sunos4*)
  3443. case $cc_basename in
  3444. CC*)
  3445. # Sun C++ 4.x
  3446. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3447. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3448. ;;
  3449. lcc*)
  3450. # Lucid
  3451. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3452. ;;
  3453. *)
  3454. ;;
  3455. esac
  3456. ;;
  3457. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  3458. case $cc_basename in
  3459. CC*)
  3460. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3461. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3462. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3463. ;;
  3464. esac
  3465. ;;
  3466. tandem*)
  3467. case $cc_basename in
  3468. NCC*)
  3469. # NonStop-UX NCC 3.20
  3470. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3471. ;;
  3472. *)
  3473. ;;
  3474. esac
  3475. ;;
  3476. vxworks*)
  3477. ;;
  3478. *)
  3479. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  3480. ;;
  3481. esac
  3482. fi
  3483. ],
  3484. [
  3485. if test "$GCC" = yes; then
  3486. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3487. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3488. case $host_os in
  3489. aix*)
  3490. # All AIX code is PIC.
  3491. if test "$host_cpu" = ia64; then
  3492. # AIX 5 now supports IA64 processor
  3493. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3494. fi
  3495. ;;
  3496. amigaos*)
  3497. case $host_cpu in
  3498. powerpc)
  3499. # see comment about AmigaOS4 .so support
  3500. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3501. ;;
  3502. m68k)
  3503. # FIXME: we need at least 68020 code to build shared libraries, but
  3504. # adding the `-m68020' flag to GCC prevents building anything better,
  3505. # like `-m68040'.
  3506. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  3507. ;;
  3508. esac
  3509. ;;
  3510. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  3511. # PIC is the default for these OSes.
  3512. ;;
  3513. mingw* | cygwin* | pw32* | os2* | cegcc*)
  3514. # This hack is so that the source file can tell whether it is being
  3515. # built for inclusion in a dll (and should export symbols for example).
  3516. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  3517. # (--disable-auto-import) libraries
  3518. m4_if([$1], [GCJ], [],
  3519. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3520. ;;
  3521. darwin* | rhapsody*)
  3522. # PIC is the default on this platform
  3523. # Common symbols not allowed in MH_DYLIB files
  3524. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  3525. ;;
  3526. hpux*)
  3527. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  3528. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  3529. # sets the default TLS model and affects inlining.
  3530. case $host_cpu in
  3531. hppa*64*)
  3532. # +Z the default
  3533. ;;
  3534. *)
  3535. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3536. ;;
  3537. esac
  3538. ;;
  3539. interix[[3-9]]*)
  3540. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  3541. # Instead, we relocate shared libraries at runtime.
  3542. ;;
  3543. msdosdjgpp*)
  3544. # Just because we use GCC doesn't mean we suddenly get shared libraries
  3545. # on systems that don't support them.
  3546. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  3547. enable_shared=no
  3548. ;;
  3549. *nto* | *qnx*)
  3550. # QNX uses GNU C++, but need to define -shared option too, otherwise
  3551. # it will coredump.
  3552. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  3553. ;;
  3554. sysv4*MP*)
  3555. if test -d /usr/nec; then
  3556. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  3557. fi
  3558. ;;
  3559. *)
  3560. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3561. ;;
  3562. esac
  3563. else
  3564. # PORTME Check for flag to pass linker flags through the system compiler.
  3565. case $host_os in
  3566. aix*)
  3567. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3568. if test "$host_cpu" = ia64; then
  3569. # AIX 5 now supports IA64 processor
  3570. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3571. else
  3572. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  3573. fi
  3574. ;;
  3575. mingw* | cygwin* | pw32* | os2* | cegcc*)
  3576. # This hack is so that the source file can tell whether it is being
  3577. # built for inclusion in a dll (and should export symbols for example).
  3578. m4_if([$1], [GCJ], [],
  3579. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3580. ;;
  3581. hpux9* | hpux10* | hpux11*)
  3582. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3583. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  3584. # not for PA HP-UX.
  3585. case $host_cpu in
  3586. hppa*64*|ia64*)
  3587. # +Z the default
  3588. ;;
  3589. *)
  3590. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  3591. ;;
  3592. esac
  3593. # Is there a better lt_prog_compiler_static that works with the bundled CC?
  3594. _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  3595. ;;
  3596. irix5* | irix6* | nonstopux*)
  3597. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3598. # PIC (with -KPIC) is the default.
  3599. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3600. ;;
  3601. linux* | k*bsd*-gnu)
  3602. case $cc_basename in
  3603. # old Intel for x86_64 which still supported -KPIC.
  3604. ecc*)
  3605. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3606. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3607. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3608. ;;
  3609. # icc used to be incompatible with GCC.
  3610. # ICC 10 doesn't accept -KPIC any more.
  3611. icc* | ifort*)
  3612. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3613. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3614. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3615. ;;
  3616. # Lahey Fortran 8.1.
  3617. lf95*)
  3618. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3619. _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
  3620. _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
  3621. ;;
  3622. pgcc* | pgf77* | pgf90* | pgf95*)
  3623. # Portland Group compilers (*not* the Pentium gcc compiler,
  3624. # which looks to be a dead project)
  3625. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3626. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  3627. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3628. ;;
  3629. ccc*)
  3630. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3631. # All Alpha code is PIC.
  3632. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3633. ;;
  3634. xl*)
  3635. # IBM XL C 8.0/Fortran 10.1 on PPC
  3636. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3637. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  3638. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  3639. ;;
  3640. *)
  3641. case `$CC -V 2>&1 | sed 5q` in
  3642. *Sun\ C*)
  3643. # Sun C 5.9
  3644. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3645. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3646. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3647. ;;
  3648. *Sun\ F*)
  3649. # Sun Fortran 8.3 passes all unrecognized flags to the linker
  3650. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3651. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3652. _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
  3653. ;;
  3654. esac
  3655. ;;
  3656. esac
  3657. ;;
  3658. newsos6)
  3659. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3660. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3661. ;;
  3662. *nto* | *qnx*)
  3663. # QNX uses GNU C++, but need to define -shared option too, otherwise
  3664. # it will coredump.
  3665. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  3666. ;;
  3667. osf3* | osf4* | osf5*)
  3668. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3669. # All OSF/1 code is PIC.
  3670. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3671. ;;
  3672. rdos*)
  3673. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3674. ;;
  3675. solaris*)
  3676. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3677. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3678. case $cc_basename in
  3679. f77* | f90* | f95*)
  3680. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
  3681. *)
  3682. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
  3683. esac
  3684. ;;
  3685. sunos4*)
  3686. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  3687. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  3688. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3689. ;;
  3690. sysv4 | sysv4.2uw2* | sysv4.3*)
  3691. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3692. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3693. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3694. ;;
  3695. sysv4*MP*)
  3696. if test -d /usr/nec ;then
  3697. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
  3698. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3699. fi
  3700. ;;
  3701. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  3702. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3703. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3704. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3705. ;;
  3706. unicos*)
  3707. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3708. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  3709. ;;
  3710. uts4*)
  3711. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3712. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3713. ;;
  3714. *)
  3715. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  3716. ;;
  3717. esac
  3718. fi
  3719. ])
  3720. case $host_os in
  3721. # For platforms which do not support PIC, -DPIC is meaningless:
  3722. *djgpp*)
  3723. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3724. ;;
  3725. *)
  3726. _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
  3727. ;;
  3728. esac
  3729. AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
  3730. _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
  3731. [How to pass a linker flag through the compiler])
  3732. #
  3733. # Check to make sure the PIC flag actually works.
  3734. #
  3735. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  3736. _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
  3737. [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
  3738. [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
  3739. [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
  3740. "" | " "*) ;;
  3741. *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
  3742. esac],
  3743. [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3744. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
  3745. fi
  3746. _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
  3747. [Additional compiler flags for building library objects])
  3748. #
  3749. # Check to make sure the static flag actually works.
  3750. #
  3751. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
  3752. _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
  3753. _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
  3754. $lt_tmp_static_flag,
  3755. [],
  3756. [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
  3757. _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
  3758. [Compiler flag to prevent dynamic linking])
  3759. ])# _LT_COMPILER_PIC
  3760. # _LT_LINKER_SHLIBS([TAGNAME])
  3761. # ----------------------------
  3762. # See if the linker supports building shared libraries.
  3763. m4_defun([_LT_LINKER_SHLIBS],
  3764. [AC_REQUIRE([LT_PATH_LD])dnl
  3765. AC_REQUIRE([LT_PATH_NM])dnl
  3766. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  3767. m4_require([_LT_DECL_EGREP])dnl
  3768. m4_require([_LT_DECL_SED])dnl
  3769. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  3770. m4_require([_LT_TAG_COMPILER])dnl
  3771. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  3772. m4_if([$1], [CXX], [
  3773. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  3774. case $host_os in
  3775. aix[[4-9]]*)
  3776. # If we're using GNU nm, then we don't want the "-C" option.
  3777. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  3778. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  3779. _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'
  3780. else
  3781. _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'
  3782. fi
  3783. ;;
  3784. pw32*)
  3785. _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
  3786. ;;
  3787. cygwin* | mingw* | cegcc*)
  3788. _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'
  3789. ;;
  3790. linux* | k*bsd*-gnu)
  3791. _LT_TAGVAR(link_all_deplibs, $1)=no
  3792. ;;
  3793. *)
  3794. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  3795. ;;
  3796. esac
  3797. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  3798. ], [
  3799. runpath_var=
  3800. _LT_TAGVAR(allow_undefined_flag, $1)=
  3801. _LT_TAGVAR(always_export_symbols, $1)=no
  3802. _LT_TAGVAR(archive_cmds, $1)=
  3803. _LT_TAGVAR(archive_expsym_cmds, $1)=
  3804. _LT_TAGVAR(compiler_needs_object, $1)=no
  3805. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  3806. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  3807. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  3808. _LT_TAGVAR(hardcode_automatic, $1)=no
  3809. _LT_TAGVAR(hardcode_direct, $1)=no
  3810. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  3811. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  3812. _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  3813. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  3814. _LT_TAGVAR(hardcode_minus_L, $1)=no
  3815. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  3816. _LT_TAGVAR(inherit_rpath, $1)=no
  3817. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  3818. _LT_TAGVAR(module_cmds, $1)=
  3819. _LT_TAGVAR(module_expsym_cmds, $1)=
  3820. _LT_TAGVAR(old_archive_from_new_cmds, $1)=
  3821. _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
  3822. _LT_TAGVAR(thread_safe_flag_spec, $1)=
  3823. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  3824. # include_expsyms should be a list of space-separated symbols to be *always*
  3825. # included in the symbol list
  3826. _LT_TAGVAR(include_expsyms, $1)=
  3827. # exclude_expsyms can be an extended regexp of symbols to exclude
  3828. # it will be wrapped by ` (' and `)$', so one must not match beginning or
  3829. # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
  3830. # as well as any symbol that contains `d'.
  3831. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  3832. # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  3833. # platforms (ab)use it in PIC code, but their linkers get confused if
  3834. # the symbol is explicitly referenced. Since portable code cannot
  3835. # rely on this symbol name, it's probably fine to never include it in
  3836. # preloaded symbol tables.
  3837. # Exclude shared library initialization/finalization symbols.
  3838. dnl Note also adjust exclude_expsyms for C++ above.
  3839. extract_expsyms_cmds=
  3840. case $host_os in
  3841. cygwin* | mingw* | pw32* | cegcc*)
  3842. # FIXME: the MSVC++ port hasn't been tested in a loooong time
  3843. # When not using gcc, we currently assume that we are using
  3844. # Microsoft Visual C++.
  3845. if test "$GCC" != yes; then
  3846. with_gnu_ld=no
  3847. fi
  3848. ;;
  3849. interix*)
  3850. # we just hope/assume this is gcc and not c89 (= MSVC++)
  3851. with_gnu_ld=yes
  3852. ;;
  3853. openbsd*)
  3854. with_gnu_ld=no
  3855. ;;
  3856. linux* | k*bsd*-gnu)
  3857. _LT_TAGVAR(link_all_deplibs, $1)=no
  3858. ;;
  3859. esac
  3860. _LT_TAGVAR(ld_shlibs, $1)=yes
  3861. if test "$with_gnu_ld" = yes; then
  3862. # If archive_cmds runs LD, not CC, wlarc should be empty
  3863. wlarc='${wl}'
  3864. # Set some defaults for GNU ld with shared library support. These
  3865. # are reset later if shared libraries are not supported. Putting them
  3866. # here allows them to be overridden if necessary.
  3867. runpath_var=LD_RUN_PATH
  3868. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  3869. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  3870. # ancient GNU ld didn't support --whole-archive et. al.
  3871. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
  3872. _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  3873. else
  3874. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  3875. fi
  3876. supports_anon_versioning=no
  3877. case `$LD -v 2>&1` in
  3878. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
  3879. *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
  3880. *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
  3881. *\ 2.11.*) ;; # other 2.11 versions
  3882. *) supports_anon_versioning=yes ;;
  3883. esac
  3884. # See if GNU ld supports shared libraries.
  3885. case $host_os in
  3886. aix[[3-9]]*)
  3887. # On AIX/PPC, the GNU linker is very broken
  3888. if test "$host_cpu" != ia64; then
  3889. _LT_TAGVAR(ld_shlibs, $1)=no
  3890. cat <<_LT_EOF 1>&2
  3891. *** Warning: the GNU linker, at least up to release 2.9.1, is reported
  3892. *** to be unable to reliably create shared libraries on AIX.
  3893. *** Therefore, libtool is disabling shared libraries support. If you
  3894. *** really care for shared libraries, you may want to modify your PATH
  3895. *** so that a non-GNU linker is found, and then restart.
  3896. _LT_EOF
  3897. fi
  3898. ;;
  3899. amigaos*)
  3900. case $host_cpu in
  3901. powerpc)
  3902. # see comment about AmigaOS4 .so support
  3903. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  3904. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  3905. ;;
  3906. m68k)
  3907. _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)'
  3908. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  3909. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  3910. ;;
  3911. esac
  3912. ;;
  3913. beos*)
  3914. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  3915. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  3916. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  3917. # support --undefined. This deserves some investigation. FIXME
  3918. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  3919. else
  3920. _LT_TAGVAR(ld_shlibs, $1)=no
  3921. fi
  3922. ;;
  3923. cygwin* | mingw* | pw32* | cegcc*)
  3924. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  3925. # as there is no search path for DLLs.
  3926. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  3927. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  3928. _LT_TAGVAR(always_export_symbols, $1)=no
  3929. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  3930. _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'
  3931. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  3932. _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'
  3933. # If the export-symbols file already is a .def file (1st line
  3934. # is EXPORTS), use it as is; otherwise, prepend...
  3935. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  3936. cp $export_symbols $output_objdir/$soname.def;
  3937. else
  3938. echo EXPORTS > $output_objdir/$soname.def;
  3939. cat $export_symbols >> $output_objdir/$soname.def;
  3940. fi~
  3941. $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  3942. else
  3943. _LT_TAGVAR(ld_shlibs, $1)=no
  3944. fi
  3945. ;;
  3946. interix[[3-9]]*)
  3947. _LT_TAGVAR(hardcode_direct, $1)=no
  3948. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  3949. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  3950. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  3951. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  3952. # Instead, shared libraries are loaded at an image base (0x10000000 by
  3953. # default) and relocated if they conflict, which is a slow very memory
  3954. # consuming and fragmenting process. To avoid this, we pick a random,
  3955. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  3956. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  3957. _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'
  3958. _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'
  3959. ;;
  3960. gnu* | linux* | tpf* | k*bsd*-gnu)
  3961. tmp_diet=no
  3962. if test "$host_os" = linux-dietlibc; then
  3963. case $cc_basename in
  3964. diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
  3965. esac
  3966. fi
  3967. if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
  3968. && test "$tmp_diet" = no
  3969. then
  3970. tmp_addflag=
  3971. tmp_sharedflag='-shared'
  3972. case $cc_basename,$host_cpu in
  3973. pgcc*) # Portland Group C compiler
  3974. _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'
  3975. tmp_addflag=' $pic_flag'
  3976. ;;
  3977. pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
  3978. _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'
  3979. tmp_addflag=' $pic_flag -Mnomain' ;;
  3980. ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
  3981. tmp_addflag=' -i_dynamic' ;;
  3982. efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
  3983. tmp_addflag=' -i_dynamic -nofor_main' ;;
  3984. ifc* | ifort*) # Intel Fortran compiler
  3985. tmp_addflag=' -nofor_main' ;;
  3986. lf95*) # Lahey Fortran 8.1
  3987. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  3988. tmp_sharedflag='--shared' ;;
  3989. xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
  3990. tmp_sharedflag='-qmkshrobj'
  3991. tmp_addflag= ;;
  3992. esac
  3993. case `$CC -V 2>&1 | sed 5q` in
  3994. *Sun\ C*) # Sun C 5.9
  3995. _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'
  3996. _LT_TAGVAR(compiler_needs_object, $1)=yes
  3997. tmp_sharedflag='-G' ;;
  3998. *Sun\ F*) # Sun Fortran 8.3
  3999. tmp_sharedflag='-G' ;;
  4000. esac
  4001. _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4002. if test "x$supports_anon_versioning" = xyes; then
  4003. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  4004. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4005. echo "local: *; };" >> $output_objdir/$libname.ver~
  4006. $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  4007. fi
  4008. case $cc_basename in
  4009. xlf*)
  4010. # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
  4011. _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
  4012. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4013. _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
  4014. _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
  4015. if test "x$supports_anon_versioning" = xyes; then
  4016. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  4017. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4018. echo "local: *; };" >> $output_objdir/$libname.ver~
  4019. $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
  4020. fi
  4021. ;;
  4022. esac
  4023. else
  4024. _LT_TAGVAR(ld_shlibs, $1)=no
  4025. fi
  4026. ;;
  4027. netbsd* | netbsdelf*-gnu)
  4028. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  4029. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  4030. wlarc=
  4031. else
  4032. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4033. _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'
  4034. fi
  4035. ;;
  4036. solaris*)
  4037. if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
  4038. _LT_TAGVAR(ld_shlibs, $1)=no
  4039. cat <<_LT_EOF 1>&2
  4040. *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  4041. *** create shared libraries on Solaris systems. Therefore, libtool
  4042. *** is disabling shared libraries support. We urge you to upgrade GNU
  4043. *** binutils to release 2.9.1 or newer. Another option is to modify
  4044. *** your PATH or compiler configuration so that the native linker is
  4045. *** used, and then restart.
  4046. _LT_EOF
  4047. elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4048. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4049. _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'
  4050. else
  4051. _LT_TAGVAR(ld_shlibs, $1)=no
  4052. fi
  4053. ;;
  4054. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
  4055. case `$LD -v 2>&1` in
  4056. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
  4057. _LT_TAGVAR(ld_shlibs, $1)=no
  4058. cat <<_LT_EOF 1>&2
  4059. *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
  4060. *** reliably create shared libraries on SCO systems. Therefore, libtool
  4061. *** is disabling shared libraries support. We urge you to upgrade GNU
  4062. *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
  4063. *** your PATH or compiler configuration so that the native linker is
  4064. *** used, and then restart.
  4065. _LT_EOF
  4066. ;;
  4067. *)
  4068. # For security reasons, it is highly recommended that you always
  4069. # use absolute paths for naming shared libraries, and exclude the
  4070. # DT_RUNPATH tag from executables and libraries. But doing so
  4071. # requires that you compile everything twice, which is a pain.
  4072. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4073. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4074. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4075. _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'
  4076. else
  4077. _LT_TAGVAR(ld_shlibs, $1)=no
  4078. fi
  4079. ;;
  4080. esac
  4081. ;;
  4082. sunos4*)
  4083. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4084. wlarc=
  4085. _LT_TAGVAR(hardcode_direct, $1)=yes
  4086. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4087. ;;
  4088. *)
  4089. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4090. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4091. _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'
  4092. else
  4093. _LT_TAGVAR(ld_shlibs, $1)=no
  4094. fi
  4095. ;;
  4096. esac
  4097. if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
  4098. runpath_var=
  4099. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4100. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  4101. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4102. fi
  4103. else
  4104. # PORTME fill in a description of your system's linker (not GNU ld)
  4105. case $host_os in
  4106. aix3*)
  4107. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4108. _LT_TAGVAR(always_export_symbols, $1)=yes
  4109. _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'
  4110. # Note: this linker hardcodes the directories in LIBPATH if there
  4111. # are no directories specified by -L.
  4112. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4113. if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
  4114. # Neither direct hardcoding nor static linking is supported with a
  4115. # broken collect2.
  4116. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  4117. fi
  4118. ;;
  4119. aix[[4-9]]*)
  4120. if test "$host_cpu" = ia64; then
  4121. # On IA64, the linker does run time linking by default, so we don't
  4122. # have to do anything special.
  4123. aix_use_runtimelinking=no
  4124. exp_sym_flag='-Bexport'
  4125. no_entry_flag=""
  4126. else
  4127. # If we're using GNU nm, then we don't want the "-C" option.
  4128. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  4129. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  4130. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  4131. else
  4132. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  4133. fi
  4134. aix_use_runtimelinking=no
  4135. # Test if we are trying to use run time linking or normal
  4136. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  4137. # need to do runtime linking.
  4138. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  4139. for ld_flag in $LDFLAGS; do
  4140. if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
  4141. aix_use_runtimelinking=yes
  4142. break
  4143. fi
  4144. done
  4145. ;;
  4146. esac
  4147. exp_sym_flag='-bexport'
  4148. no_entry_flag='-bnoentry'
  4149. fi
  4150. # When large executables or shared objects are built, AIX ld can
  4151. # have problems creating the table of contents. If linking a library
  4152. # or program results in "error TOC overflow" add -mminimal-toc to
  4153. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  4154. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  4155. _LT_TAGVAR(archive_cmds, $1)=''
  4156. _LT_TAGVAR(hardcode_direct, $1)=yes
  4157. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4158. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  4159. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4160. _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
  4161. if test "$GCC" = yes; then
  4162. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  4163. # We only want to do this on AIX 4.2 and lower, the check
  4164. # below for broken collect2 doesn't work under 4.3+
  4165. collect2name=`${CC} -print-prog-name=collect2`
  4166. if test -f "$collect2name" &&
  4167. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  4168. then
  4169. # We have reworked collect2
  4170. :
  4171. else
  4172. # We have old collect2
  4173. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  4174. # It fails to find uninstalled libraries when the uninstalled
  4175. # path is not listed in the libpath. Setting hardcode_minus_L
  4176. # to unsupported forces relinking
  4177. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4178. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4179. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  4180. fi
  4181. ;;
  4182. esac
  4183. shared_flag='-shared'
  4184. if test "$aix_use_runtimelinking" = yes; then
  4185. shared_flag="$shared_flag "'${wl}-G'
  4186. fi
  4187. _LT_TAGVAR(link_all_deplibs, $1)=no
  4188. else
  4189. # not using gcc
  4190. if test "$host_cpu" = ia64; then
  4191. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  4192. # chokes on -Wl,-G. The following line is correct:
  4193. shared_flag='-G'
  4194. else
  4195. if test "$aix_use_runtimelinking" = yes; then
  4196. shared_flag='${wl}-G'
  4197. else
  4198. shared_flag='${wl}-bM:SRE'
  4199. fi
  4200. fi
  4201. fi
  4202. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
  4203. # It seems that -bexpall does not export symbols beginning with
  4204. # underscore (_), so it is better to generate a list of symbols to export.
  4205. _LT_TAGVAR(always_export_symbols, $1)=yes
  4206. if test "$aix_use_runtimelinking" = yes; then
  4207. # Warning - without using the other runtime loading flags (-brtl),
  4208. # -berok will link without error, but may produce a broken library.
  4209. _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
  4210. # Determine the default libpath from the value encoded in an
  4211. # empty executable.
  4212. _LT_SYS_MODULE_PATH_AIX
  4213. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  4214. _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"
  4215. else
  4216. if test "$host_cpu" = ia64; then
  4217. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  4218. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  4219. _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"
  4220. else
  4221. # Determine the default libpath from the value encoded in an
  4222. # empty executable.
  4223. _LT_SYS_MODULE_PATH_AIX
  4224. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  4225. # Warning - without using the other run time loading flags,
  4226. # -berok will link without error, but may produce a broken library.
  4227. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  4228. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  4229. # Exported symbols can be pulled into shared objects from archives
  4230. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  4231. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  4232. # This is similar to how AIX traditionally builds its shared libraries.
  4233. _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'
  4234. fi
  4235. fi
  4236. ;;
  4237. amigaos*)
  4238. case $host_cpu in
  4239. powerpc)
  4240. # see comment about AmigaOS4 .so support
  4241. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4242. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  4243. ;;
  4244. m68k)
  4245. _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)'
  4246. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4247. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4248. ;;
  4249. esac
  4250. ;;
  4251. bsdi[[45]]*)
  4252. _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
  4253. ;;
  4254. cygwin* | mingw* | pw32* | cegcc*)
  4255. # When not using gcc, we currently assume that we are using
  4256. # Microsoft Visual C++.
  4257. # hardcode_libdir_flag_spec is actually meaningless, as there is
  4258. # no search path for DLLs.
  4259. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  4260. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4261. # Tell ltmain to make .lib files, not .a files.
  4262. libext=lib
  4263. # Tell ltmain to make .dll files, not .so files.
  4264. shrext_cmds=".dll"
  4265. # FIXME: Setting linknames here is a bad hack.
  4266. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
  4267. # The linker will automatically build a .lib file if we build a DLL.
  4268. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  4269. # FIXME: Should let the user specify the lib program.
  4270. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
  4271. _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
  4272. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4273. ;;
  4274. darwin* | rhapsody*)
  4275. _LT_DARWIN_LINKER_FEATURES($1)
  4276. ;;
  4277. dgux*)
  4278. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  4279. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4280. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4281. ;;
  4282. freebsd1*)
  4283. _LT_TAGVAR(ld_shlibs, $1)=no
  4284. ;;
  4285. # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  4286. # support. Future versions do this automatically, but an explicit c++rt0.o
  4287. # does not break anything, and helps significantly (at the cost of a little
  4288. # extra space).
  4289. freebsd2.2*)
  4290. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
  4291. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4292. _LT_TAGVAR(hardcode_direct, $1)=yes
  4293. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4294. ;;
  4295. # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  4296. freebsd2*)
  4297. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4298. _LT_TAGVAR(hardcode_direct, $1)=yes
  4299. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4300. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4301. ;;
  4302. # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  4303. freebsd* | dragonfly*)
  4304. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
  4305. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4306. _LT_TAGVAR(hardcode_direct, $1)=yes
  4307. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4308. ;;
  4309. hpux9*)
  4310. if test "$GCC" = yes; then
  4311. _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'
  4312. else
  4313. _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'
  4314. fi
  4315. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  4316. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4317. _LT_TAGVAR(hardcode_direct, $1)=yes
  4318. # hardcode_minus_L: Not really in the search PATH,
  4319. # but as the default location of the library.
  4320. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4321. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4322. ;;
  4323. hpux10*)
  4324. if test "$GCC" = yes -a "$with_gnu_ld" = no; then
  4325. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  4326. else
  4327. _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
  4328. fi
  4329. if test "$with_gnu_ld" = no; then
  4330. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  4331. _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
  4332. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4333. _LT_TAGVAR(hardcode_direct, $1)=yes
  4334. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4335. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4336. # hardcode_minus_L: Not really in the search PATH,
  4337. # but as the default location of the library.
  4338. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4339. fi
  4340. ;;
  4341. hpux11*)
  4342. if test "$GCC" = yes -a "$with_gnu_ld" = no; then
  4343. case $host_cpu in
  4344. hppa*64*)
  4345. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  4346. ;;
  4347. ia64*)
  4348. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  4349. ;;
  4350. *)
  4351. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  4352. ;;
  4353. esac
  4354. else
  4355. case $host_cpu in
  4356. hppa*64*)
  4357. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  4358. ;;
  4359. ia64*)
  4360. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  4361. ;;
  4362. *)
  4363. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  4364. ;;
  4365. esac
  4366. fi
  4367. if test "$with_gnu_ld" = no; then
  4368. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  4369. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4370. case $host_cpu in
  4371. hppa*64*|ia64*)
  4372. _LT_TAGVAR(hardcode_direct, $1)=no
  4373. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4374. ;;
  4375. *)
  4376. _LT_TAGVAR(hardcode_direct, $1)=yes
  4377. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4378. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4379. # hardcode_minus_L: Not really in the search PATH,
  4380. # but as the default location of the library.
  4381. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4382. ;;
  4383. esac
  4384. fi
  4385. ;;
  4386. irix5* | irix6* | nonstopux*)
  4387. if test "$GCC" = yes; then
  4388. _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'
  4389. # Try to use the -exported_symbol ld option, if it does not
  4390. # work, assume that -exports_file does not work either and
  4391. # implicitly export all symbols.
  4392. save_LDFLAGS="$LDFLAGS"
  4393. LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
  4394. AC_LINK_IFELSE(int foo(void) {},
  4395. _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'
  4396. )
  4397. LDFLAGS="$save_LDFLAGS"
  4398. else
  4399. _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'
  4400. _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'
  4401. fi
  4402. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  4403. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4404. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4405. _LT_TAGVAR(inherit_rpath, $1)=yes
  4406. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4407. ;;
  4408. netbsd* | netbsdelf*-gnu)
  4409. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  4410. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
  4411. else
  4412. _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
  4413. fi
  4414. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4415. _LT_TAGVAR(hardcode_direct, $1)=yes
  4416. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4417. ;;
  4418. newsos6)
  4419. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  4420. _LT_TAGVAR(hardcode_direct, $1)=yes
  4421. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4422. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4423. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4424. ;;
  4425. *nto* | *qnx*)
  4426. ;;
  4427. openbsd*)
  4428. if test -f /usr/libexec/ld.so; then
  4429. _LT_TAGVAR(hardcode_direct, $1)=yes
  4430. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4431. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4432. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  4433. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  4434. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
  4435. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  4436. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4437. else
  4438. case $host_os in
  4439. openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
  4440. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4441. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4442. ;;
  4443. *)
  4444. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  4445. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  4446. ;;
  4447. esac
  4448. fi
  4449. else
  4450. _LT_TAGVAR(ld_shlibs, $1)=no
  4451. fi
  4452. ;;
  4453. os2*)
  4454. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4455. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4456. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4457. _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'
  4458. _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
  4459. ;;
  4460. osf3*)
  4461. if test "$GCC" = yes; then
  4462. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  4463. _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'
  4464. else
  4465. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  4466. _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'
  4467. fi
  4468. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  4469. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4470. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4471. ;;
  4472. osf4* | osf5*) # as osf3* with the addition of -msym flag
  4473. if test "$GCC" = yes; then
  4474. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  4475. _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'
  4476. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4477. else
  4478. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  4479. _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'
  4480. _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~
  4481. $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'
  4482. # Both c and cxx compiler support -rpath directly
  4483. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  4484. fi
  4485. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  4486. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4487. ;;
  4488. solaris*)
  4489. _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
  4490. if test "$GCC" = yes; then
  4491. wlarc='${wl}'
  4492. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  4493. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  4494. $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
  4495. else
  4496. case `$CC -V 2>&1` in
  4497. *"Compilers 5.0"*)
  4498. wlarc=''
  4499. _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_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. $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
  4502. ;;
  4503. *)
  4504. wlarc='${wl}'
  4505. _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
  4506. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  4507. $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
  4508. ;;
  4509. esac
  4510. fi
  4511. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4512. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4513. case $host_os in
  4514. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  4515. *)
  4516. # The compiler driver will combine and reorder linker options,
  4517. # but understands `-z linker_flag'. GCC discards it without `$wl',
  4518. # but is careful enough not to reorder.
  4519. # Supported since Solaris 2.6 (maybe 2.5.1?)
  4520. if test "$GCC" = yes; then
  4521. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
  4522. else
  4523. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  4524. fi
  4525. ;;
  4526. esac
  4527. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4528. ;;
  4529. sunos4*)
  4530. if test "x$host_vendor" = xsequent; then
  4531. # Use $CC to link under sequent, because it throws in some extra .o
  4532. # files that make .init and .fini sections work.
  4533. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
  4534. else
  4535. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
  4536. fi
  4537. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4538. _LT_TAGVAR(hardcode_direct, $1)=yes
  4539. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4540. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4541. ;;
  4542. sysv4)
  4543. case $host_vendor in
  4544. sni)
  4545. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  4546. _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
  4547. ;;
  4548. siemens)
  4549. ## LD is ld it makes a PLAMLIB
  4550. ## CC just makes a GrossModule.
  4551. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  4552. _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
  4553. _LT_TAGVAR(hardcode_direct, $1)=no
  4554. ;;
  4555. motorola)
  4556. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  4557. _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
  4558. ;;
  4559. esac
  4560. runpath_var='LD_RUN_PATH'
  4561. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4562. ;;
  4563. sysv4.3*)
  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. _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
  4567. ;;
  4568. sysv4*MP*)
  4569. if test -d /usr/nec; then
  4570. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  4571. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4572. runpath_var=LD_RUN_PATH
  4573. hardcode_runpath_var=yes
  4574. _LT_TAGVAR(ld_shlibs, $1)=yes
  4575. fi
  4576. ;;
  4577. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  4578. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  4579. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  4580. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4581. runpath_var='LD_RUN_PATH'
  4582. if test "$GCC" = yes; then
  4583. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  4584. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  4585. else
  4586. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  4587. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  4588. fi
  4589. ;;
  4590. sysv5* | sco3.2v5* | sco5v6*)
  4591. # Note: We can NOT use -z defs as we might desire, because we do not
  4592. # link with -lc, and that would cause any symbols used from libc to
  4593. # always be unresolved, which means just about no library would
  4594. # ever link correctly. If we're not using GNU ld we use -z text
  4595. # though, which does catch some bad symbols but isn't as heavy-handed
  4596. # as -z defs.
  4597. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  4598. _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
  4599. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  4600. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4601. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
  4602. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  4603. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4604. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  4605. runpath_var='LD_RUN_PATH'
  4606. if test "$GCC" = yes; then
  4607. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  4608. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  4609. else
  4610. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  4611. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  4612. fi
  4613. ;;
  4614. uts4*)
  4615. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  4616. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4617. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4618. ;;
  4619. *)
  4620. _LT_TAGVAR(ld_shlibs, $1)=no
  4621. ;;
  4622. esac
  4623. if test x$host_vendor = xsni; then
  4624. case $host in
  4625. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  4626. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
  4627. ;;
  4628. esac
  4629. fi
  4630. fi
  4631. ])
  4632. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  4633. test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  4634. _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
  4635. _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
  4636. _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
  4637. _LT_DECL([], [extract_expsyms_cmds], [2],
  4638. [The commands to extract the exported symbol list from a shared archive])
  4639. #
  4640. # Do we need to explicitly link libc?
  4641. #
  4642. case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
  4643. x|xyes)
  4644. # Assume -lc should be added
  4645. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  4646. if test "$enable_shared" = yes && test "$GCC" = yes; then
  4647. case $_LT_TAGVAR(archive_cmds, $1) in
  4648. *'~'*)
  4649. # FIXME: we may have to deal with multi-command sequences.
  4650. ;;
  4651. '$CC '*)
  4652. # Test whether the compiler implicitly links with -lc since on some
  4653. # systems, -lgcc has to come before -lc. If gcc already passes -lc
  4654. # to ld, don't add -lc before -lgcc.
  4655. AC_MSG_CHECKING([whether -lc should be explicitly linked in])
  4656. $RM conftest*
  4657. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  4658. if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
  4659. soname=conftest
  4660. lib=conftest
  4661. libobjs=conftest.$ac_objext
  4662. deplibs=
  4663. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
  4664. pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
  4665. compiler_flags=-v
  4666. linker_flags=-v
  4667. verstring=
  4668. output_objdir=.
  4669. libname=conftest
  4670. lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
  4671. _LT_TAGVAR(allow_undefined_flag, $1)=
  4672. if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
  4673. then
  4674. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  4675. else
  4676. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  4677. fi
  4678. _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
  4679. else
  4680. cat conftest.err 1>&5
  4681. fi
  4682. $RM conftest*
  4683. AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
  4684. ;;
  4685. esac
  4686. fi
  4687. ;;
  4688. esac
  4689. _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
  4690. [Whether or not to add -lc for building shared libraries])
  4691. _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
  4692. [enable_shared_with_static_runtimes], [0],
  4693. [Whether or not to disallow shared libs when runtime libs are static])
  4694. _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
  4695. [Compiler flag to allow reflexive dlopens])
  4696. _LT_TAGDECL([], [whole_archive_flag_spec], [1],
  4697. [Compiler flag to generate shared objects directly from archives])
  4698. _LT_TAGDECL([], [compiler_needs_object], [1],
  4699. [Whether the compiler copes with passing no objects directly])
  4700. _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
  4701. [Create an old-style archive from a shared archive])
  4702. _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
  4703. [Create a temporary old-style archive to link instead of a shared archive])
  4704. _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
  4705. _LT_TAGDECL([], [archive_expsym_cmds], [2])
  4706. _LT_TAGDECL([], [module_cmds], [2],
  4707. [Commands used to build a loadable module if different from building
  4708. a shared archive.])
  4709. _LT_TAGDECL([], [module_expsym_cmds], [2])
  4710. _LT_TAGDECL([], [with_gnu_ld], [1],
  4711. [Whether we are building with GNU ld or not])
  4712. _LT_TAGDECL([], [allow_undefined_flag], [1],
  4713. [Flag that allows shared libraries with undefined symbols to be built])
  4714. _LT_TAGDECL([], [no_undefined_flag], [1],
  4715. [Flag that enforces no undefined symbols])
  4716. _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
  4717. [Flag to hardcode $libdir into a binary during linking.
  4718. This must work even if $libdir does not exist])
  4719. _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
  4720. [[If ld is used when linking, flag to hardcode $libdir into a binary
  4721. during linking. This must work even if $libdir does not exist]])
  4722. _LT_TAGDECL([], [hardcode_libdir_separator], [1],
  4723. [Whether we need a single "-rpath" flag with a separated argument])
  4724. _LT_TAGDECL([], [hardcode_direct], [0],
  4725. [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
  4726. DIR into the resulting binary])
  4727. _LT_TAGDECL([], [hardcode_direct_absolute], [0],
  4728. [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
  4729. DIR into the resulting binary and the resulting library dependency is
  4730. "absolute", i.e impossible to change by setting ${shlibpath_var} if the
  4731. library is relocated])
  4732. _LT_TAGDECL([], [hardcode_minus_L], [0],
  4733. [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
  4734. into the resulting binary])
  4735. _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
  4736. [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
  4737. into the resulting binary])
  4738. _LT_TAGDECL([], [hardcode_automatic], [0],
  4739. [Set to "yes" if building a shared library automatically hardcodes DIR
  4740. into the library and all subsequent libraries and executables linked
  4741. against it])
  4742. _LT_TAGDECL([], [inherit_rpath], [0],
  4743. [Set to yes if linker adds runtime paths of dependent libraries
  4744. to runtime path list])
  4745. _LT_TAGDECL([], [link_all_deplibs], [0],
  4746. [Whether libtool must link a program against all its dependency libraries])
  4747. _LT_TAGDECL([], [fix_srcfile_path], [1],
  4748. [Fix the shell variable $srcfile for the compiler])
  4749. _LT_TAGDECL([], [always_export_symbols], [0],
  4750. [Set to "yes" if exported symbols are required])
  4751. _LT_TAGDECL([], [export_symbols_cmds], [2],
  4752. [The commands to list exported symbols])
  4753. _LT_TAGDECL([], [exclude_expsyms], [1],
  4754. [Symbols that should not be listed in the preloaded symbols])
  4755. _LT_TAGDECL([], [include_expsyms], [1],
  4756. [Symbols that must always be exported])
  4757. _LT_TAGDECL([], [prelink_cmds], [2],
  4758. [Commands necessary for linking programs (against libraries) with templates])
  4759. _LT_TAGDECL([], [file_list_spec], [1],
  4760. [Specify filename containing input files])
  4761. dnl FIXME: Not yet implemented
  4762. dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
  4763. dnl [Compiler flag to generate thread safe objects])
  4764. ])# _LT_LINKER_SHLIBS
  4765. # _LT_LANG_C_CONFIG([TAG])
  4766. # ------------------------
  4767. # Ensure that the configuration variables for a C compiler are suitably
  4768. # defined. These variables are subsequently used by _LT_CONFIG to write
  4769. # the compiler configuration to `libtool'.
  4770. m4_defun([_LT_LANG_C_CONFIG],
  4771. [m4_require([_LT_DECL_EGREP])dnl
  4772. lt_save_CC="$CC"
  4773. AC_LANG_PUSH(C)
  4774. # Source file extension for C test sources.
  4775. ac_ext=c
  4776. # Object file extension for compiled C test sources.
  4777. objext=o
  4778. _LT_TAGVAR(objext, $1)=$objext
  4779. # Code to be used in simple compile tests
  4780. lt_simple_compile_test_code="int some_variable = 0;"
  4781. # Code to be used in simple link tests
  4782. lt_simple_link_test_code='int main(){return(0);}'
  4783. _LT_TAG_COMPILER
  4784. # Save the default compiler, since it gets overwritten when the other
  4785. # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
  4786. compiler_DEFAULT=$CC
  4787. # save warnings/boilerplate of simple test code
  4788. _LT_COMPILER_BOILERPLATE
  4789. _LT_LINKER_BOILERPLATE
  4790. ## CAVEAT EMPTOR:
  4791. ## There is no encapsulation within the following macros, do not change
  4792. ## the running order or otherwise move them around unless you know exactly
  4793. ## what you are doing...
  4794. if test -n "$compiler"; then
  4795. _LT_COMPILER_NO_RTTI($1)
  4796. _LT_COMPILER_PIC($1)
  4797. _LT_COMPILER_C_O($1)
  4798. _LT_COMPILER_FILE_LOCKS($1)
  4799. _LT_LINKER_SHLIBS($1)
  4800. _LT_SYS_DYNAMIC_LINKER($1)
  4801. _LT_LINKER_HARDCODE_LIBPATH($1)
  4802. LT_SYS_DLOPEN_SELF
  4803. _LT_CMD_STRIPLIB
  4804. # Report which library types will actually be built
  4805. AC_MSG_CHECKING([if libtool supports shared libraries])
  4806. AC_MSG_RESULT([$can_build_shared])
  4807. AC_MSG_CHECKING([whether to build shared libraries])
  4808. test "$can_build_shared" = "no" && enable_shared=no
  4809. # On AIX, shared libraries and static libraries use the same namespace, and
  4810. # are all built from PIC.
  4811. case $host_os in
  4812. aix3*)
  4813. test "$enable_shared" = yes && enable_static=no
  4814. if test -n "$RANLIB"; then
  4815. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  4816. postinstall_cmds='$RANLIB $lib'
  4817. fi
  4818. ;;
  4819. aix[[4-9]]*)
  4820. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  4821. test "$enable_shared" = yes && enable_static=no
  4822. fi
  4823. ;;
  4824. esac
  4825. AC_MSG_RESULT([$enable_shared])
  4826. AC_MSG_CHECKING([whether to build static libraries])
  4827. # Make sure either enable_shared or enable_static is yes.
  4828. test "$enable_shared" = yes || enable_static=yes
  4829. AC_MSG_RESULT([$enable_static])
  4830. _LT_CONFIG($1)
  4831. fi
  4832. AC_LANG_POP
  4833. CC="$lt_save_CC"
  4834. ])# _LT_LANG_C_CONFIG
  4835. # _LT_PROG_CXX
  4836. # ------------
  4837. # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
  4838. # compiler, we have our own version here.
  4839. m4_defun([_LT_PROG_CXX],
  4840. [
  4841. pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
  4842. AC_PROG_CXX
  4843. if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
  4844. ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
  4845. (test "X$CXX" != "Xg++"))) ; then
  4846. AC_PROG_CXXCPP
  4847. else
  4848. _lt_caught_CXX_error=yes
  4849. fi
  4850. popdef([AC_MSG_ERROR])
  4851. ])# _LT_PROG_CXX
  4852. dnl aclocal-1.4 backwards compatibility:
  4853. dnl AC_DEFUN([_LT_PROG_CXX], [])
  4854. # _LT_LANG_CXX_CONFIG([TAG])
  4855. # --------------------------
  4856. # Ensure that the configuration variables for a C++ compiler are suitably
  4857. # defined. These variables are subsequently used by _LT_CONFIG to write
  4858. # the compiler configuration to `libtool'.
  4859. m4_defun([_LT_LANG_CXX_CONFIG],
  4860. [AC_REQUIRE([_LT_PROG_CXX])dnl
  4861. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  4862. m4_require([_LT_DECL_EGREP])dnl
  4863. AC_LANG_PUSH(C++)
  4864. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  4865. _LT_TAGVAR(allow_undefined_flag, $1)=
  4866. _LT_TAGVAR(always_export_symbols, $1)=no
  4867. _LT_TAGVAR(archive_expsym_cmds, $1)=
  4868. _LT_TAGVAR(compiler_needs_object, $1)=no
  4869. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  4870. _LT_TAGVAR(hardcode_direct, $1)=no
  4871. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  4872. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4873. _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  4874. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  4875. _LT_TAGVAR(hardcode_minus_L, $1)=no
  4876. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  4877. _LT_TAGVAR(hardcode_automatic, $1)=no
  4878. _LT_TAGVAR(inherit_rpath, $1)=no
  4879. _LT_TAGVAR(module_cmds, $1)=
  4880. _LT_TAGVAR(module_expsym_cmds, $1)=
  4881. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  4882. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  4883. _LT_TAGVAR(no_undefined_flag, $1)=
  4884. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4885. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  4886. # Source file extension for C++ test sources.
  4887. ac_ext=cpp
  4888. # Object file extension for compiled C++ test sources.
  4889. objext=o
  4890. _LT_TAGVAR(objext, $1)=$objext
  4891. # No sense in running all these tests if we already determined that
  4892. # the CXX compiler isn't working. Some variables (like enable_shared)
  4893. # are currently assumed to apply to all compilers on this platform,
  4894. # and will be corrupted by setting them based on a non-working compiler.
  4895. if test "$_lt_caught_CXX_error" != yes; then
  4896. # Code to be used in simple compile tests
  4897. lt_simple_compile_test_code="int some_variable = 0;"
  4898. # Code to be used in simple link tests
  4899. lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
  4900. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  4901. _LT_TAG_COMPILER
  4902. # save warnings/boilerplate of simple test code
  4903. _LT_COMPILER_BOILERPLATE
  4904. _LT_LINKER_BOILERPLATE
  4905. # Allow CC to be a program name with arguments.
  4906. lt_save_CC=$CC
  4907. lt_save_LD=$LD
  4908. lt_save_GCC=$GCC
  4909. GCC=$GXX
  4910. lt_save_with_gnu_ld=$with_gnu_ld
  4911. lt_save_path_LD=$lt_cv_path_LD
  4912. if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
  4913. lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
  4914. else
  4915. $as_unset lt_cv_prog_gnu_ld
  4916. fi
  4917. if test -n "${lt_cv_path_LDCXX+set}"; then
  4918. lt_cv_path_LD=$lt_cv_path_LDCXX
  4919. else
  4920. $as_unset lt_cv_path_LD
  4921. fi
  4922. test -z "${LDCXX+set}" || LD=$LDCXX
  4923. CC=${CXX-"c++"}
  4924. compiler=$CC
  4925. _LT_TAGVAR(compiler, $1)=$CC
  4926. _LT_CC_BASENAME([$compiler])
  4927. if test -n "$compiler"; then
  4928. # We don't want -fno-exception when compiling C++ code, so set the
  4929. # no_builtin_flag separately
  4930. if test "$GXX" = yes; then
  4931. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  4932. else
  4933. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  4934. fi
  4935. if test "$GXX" = yes; then
  4936. # Set up default GNU C++ configuration
  4937. LT_PATH_LD
  4938. # Check if GNU C++ uses GNU ld as the underlying linker, since the
  4939. # archiving commands below assume that GNU ld is being used.
  4940. if test "$with_gnu_ld" = yes; then
  4941. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4942. _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'
  4943. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4944. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  4945. # If archive_cmds runs LD, not CC, wlarc should be empty
  4946. # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
  4947. # investigate it a little bit more. (MM)
  4948. wlarc='${wl}'
  4949. # ancient GNU ld didn't support --whole-archive et. al.
  4950. if eval "`$CC -print-prog-name=ld` --help 2>&1" |
  4951. $GREP 'no-whole-archive' > /dev/null; then
  4952. _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  4953. else
  4954. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4955. fi
  4956. else
  4957. with_gnu_ld=no
  4958. wlarc=
  4959. # A generic and very simple default shared library creation
  4960. # command for GNU C++ for the case where it uses the native
  4961. # linker, instead of GNU ld. If possible, this setting should
  4962. # overridden to take advantage of the native linker features on
  4963. # the platform it is being used on.
  4964. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  4965. fi
  4966. # Commands to make compiler produce verbose output that lists
  4967. # what "hidden" libraries, object files and flags are used when
  4968. # linking a shared library.
  4969. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
  4970. else
  4971. GXX=no
  4972. with_gnu_ld=no
  4973. wlarc=
  4974. fi
  4975. # PORTME: fill in a description of your system's C++ link characteristics
  4976. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  4977. _LT_TAGVAR(ld_shlibs, $1)=yes
  4978. case $host_os in
  4979. aix3*)
  4980. # FIXME: insert proper C++ library support
  4981. _LT_TAGVAR(ld_shlibs, $1)=no
  4982. ;;
  4983. aix[[4-9]]*)
  4984. if test "$host_cpu" = ia64; then
  4985. # On IA64, the linker does run time linking by default, so we don't
  4986. # have to do anything special.
  4987. aix_use_runtimelinking=no
  4988. exp_sym_flag='-Bexport'
  4989. no_entry_flag=""
  4990. else
  4991. aix_use_runtimelinking=no
  4992. # Test if we are trying to use run time linking or normal
  4993. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  4994. # need to do runtime linking.
  4995. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  4996. for ld_flag in $LDFLAGS; do
  4997. case $ld_flag in
  4998. *-brtl*)
  4999. aix_use_runtimelinking=yes
  5000. break
  5001. ;;
  5002. esac
  5003. done
  5004. ;;
  5005. esac
  5006. exp_sym_flag='-bexport'
  5007. no_entry_flag='-bnoentry'
  5008. fi
  5009. # When large executables or shared objects are built, AIX ld can
  5010. # have problems creating the table of contents. If linking a library
  5011. # or program results in "error TOC overflow" add -mminimal-toc to
  5012. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  5013. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  5014. _LT_TAGVAR(archive_cmds, $1)=''
  5015. _LT_TAGVAR(hardcode_direct, $1)=yes
  5016. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5017. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5018. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5019. _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
  5020. if test "$GXX" = yes; then
  5021. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  5022. # We only want to do this on AIX 4.2 and lower, the check
  5023. # below for broken collect2 doesn't work under 4.3+
  5024. collect2name=`${CC} -print-prog-name=collect2`
  5025. if test -f "$collect2name" &&
  5026. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  5027. then
  5028. # We have reworked collect2
  5029. :
  5030. else
  5031. # We have old collect2
  5032. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  5033. # It fails to find uninstalled libraries when the uninstalled
  5034. # path is not listed in the libpath. Setting hardcode_minus_L
  5035. # to unsupported forces relinking
  5036. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5037. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5038. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5039. fi
  5040. esac
  5041. shared_flag='-shared'
  5042. if test "$aix_use_runtimelinking" = yes; then
  5043. shared_flag="$shared_flag "'${wl}-G'
  5044. fi
  5045. else
  5046. # not using gcc
  5047. if test "$host_cpu" = ia64; then
  5048. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  5049. # chokes on -Wl,-G. The following line is correct:
  5050. shared_flag='-G'
  5051. else
  5052. if test "$aix_use_runtimelinking" = yes; then
  5053. shared_flag='${wl}-G'
  5054. else
  5055. shared_flag='${wl}-bM:SRE'
  5056. fi
  5057. fi
  5058. fi
  5059. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
  5060. # It seems that -bexpall does not export symbols beginning with
  5061. # underscore (_), so it is better to generate a list of symbols to
  5062. # export.
  5063. _LT_TAGVAR(always_export_symbols, $1)=yes
  5064. if test "$aix_use_runtimelinking" = yes; then
  5065. # Warning - without using the other runtime loading flags (-brtl),
  5066. # -berok will link without error, but may produce a broken library.
  5067. _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
  5068. # Determine the default libpath from the value encoded in an empty
  5069. # executable.
  5070. _LT_SYS_MODULE_PATH_AIX
  5071. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  5072. _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"
  5073. else
  5074. if test "$host_cpu" = ia64; then
  5075. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  5076. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  5077. _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"
  5078. else
  5079. # Determine the default libpath from the value encoded in an
  5080. # empty executable.
  5081. _LT_SYS_MODULE_PATH_AIX
  5082. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  5083. # Warning - without using the other run time loading flags,
  5084. # -berok will link without error, but may produce a broken library.
  5085. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  5086. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  5087. # Exported symbols can be pulled into shared objects from archives
  5088. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  5089. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5090. # This is similar to how AIX traditionally builds its shared
  5091. # libraries.
  5092. _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'
  5093. fi
  5094. fi
  5095. ;;
  5096. beos*)
  5097. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  5098. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5099. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  5100. # support --undefined. This deserves some investigation. FIXME
  5101. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5102. else
  5103. _LT_TAGVAR(ld_shlibs, $1)=no
  5104. fi
  5105. ;;
  5106. chorus*)
  5107. case $cc_basename in
  5108. *)
  5109. # FIXME: insert proper C++ library support
  5110. _LT_TAGVAR(ld_shlibs, $1)=no
  5111. ;;
  5112. esac
  5113. ;;
  5114. cygwin* | mingw* | pw32* | cegcc*)
  5115. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  5116. # as there is no search path for DLLs.
  5117. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5118. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5119. _LT_TAGVAR(always_export_symbols, $1)=no
  5120. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5121. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  5122. _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'
  5123. # If the export-symbols file already is a .def file (1st line
  5124. # is EXPORTS), use it as is; otherwise, prepend...
  5125. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  5126. cp $export_symbols $output_objdir/$soname.def;
  5127. else
  5128. echo EXPORTS > $output_objdir/$soname.def;
  5129. cat $export_symbols >> $output_objdir/$soname.def;
  5130. fi~
  5131. $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'
  5132. else
  5133. _LT_TAGVAR(ld_shlibs, $1)=no
  5134. fi
  5135. ;;
  5136. darwin* | rhapsody*)
  5137. _LT_DARWIN_LINKER_FEATURES($1)
  5138. ;;
  5139. dgux*)
  5140. case $cc_basename in
  5141. ec++*)
  5142. # FIXME: insert proper C++ library support
  5143. _LT_TAGVAR(ld_shlibs, $1)=no
  5144. ;;
  5145. ghcx*)
  5146. # Green Hills C++ Compiler
  5147. # FIXME: insert proper C++ library support
  5148. _LT_TAGVAR(ld_shlibs, $1)=no
  5149. ;;
  5150. *)
  5151. # FIXME: insert proper C++ library support
  5152. _LT_TAGVAR(ld_shlibs, $1)=no
  5153. ;;
  5154. esac
  5155. ;;
  5156. freebsd[[12]]*)
  5157. # C++ shared libraries reported to be fairly broken before
  5158. # switch to ELF
  5159. _LT_TAGVAR(ld_shlibs, $1)=no
  5160. ;;
  5161. freebsd-elf*)
  5162. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5163. ;;
  5164. freebsd* | dragonfly*)
  5165. # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
  5166. # conventions
  5167. _LT_TAGVAR(ld_shlibs, $1)=yes
  5168. ;;
  5169. gnu*)
  5170. ;;
  5171. hpux9*)
  5172. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5173. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5174. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5175. _LT_TAGVAR(hardcode_direct, $1)=yes
  5176. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  5177. # but as the default
  5178. # location of the library.
  5179. case $cc_basename in
  5180. CC*)
  5181. # FIXME: insert proper C++ library support
  5182. _LT_TAGVAR(ld_shlibs, $1)=no
  5183. ;;
  5184. aCC*)
  5185. _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'
  5186. # Commands to make compiler produce verbose output that lists
  5187. # what "hidden" libraries, object files and flags are used when
  5188. # linking a shared library.
  5189. #
  5190. # There doesn't appear to be a way to prevent this compiler from
  5191. # explicitly linking system object files so we need to strip them
  5192. # from the output so that they don't get included in the library
  5193. # dependencies.
  5194. 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'
  5195. ;;
  5196. *)
  5197. if test "$GXX" = yes; then
  5198. _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'
  5199. else
  5200. # FIXME: insert proper C++ library support
  5201. _LT_TAGVAR(ld_shlibs, $1)=no
  5202. fi
  5203. ;;
  5204. esac
  5205. ;;
  5206. hpux10*|hpux11*)
  5207. if test $with_gnu_ld = no; then
  5208. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5209. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5210. case $host_cpu in
  5211. hppa*64*|ia64*)
  5212. ;;
  5213. *)
  5214. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5215. ;;
  5216. esac
  5217. fi
  5218. case $host_cpu in
  5219. hppa*64*|ia64*)
  5220. _LT_TAGVAR(hardcode_direct, $1)=no
  5221. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5222. ;;
  5223. *)
  5224. _LT_TAGVAR(hardcode_direct, $1)=yes
  5225. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5226. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  5227. # but as the default
  5228. # location of the library.
  5229. ;;
  5230. esac
  5231. case $cc_basename in
  5232. CC*)
  5233. # FIXME: insert proper C++ library support
  5234. _LT_TAGVAR(ld_shlibs, $1)=no
  5235. ;;
  5236. aCC*)
  5237. case $host_cpu in
  5238. hppa*64*)
  5239. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5240. ;;
  5241. ia64*)
  5242. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5243. ;;
  5244. *)
  5245. _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'
  5246. ;;
  5247. esac
  5248. # Commands to make compiler produce verbose output that lists
  5249. # what "hidden" libraries, object files and flags are used when
  5250. # linking a shared library.
  5251. #
  5252. # There doesn't appear to be a way to prevent this compiler from
  5253. # explicitly linking system object files so we need to strip them
  5254. # from the output so that they don't get included in the library
  5255. # dependencies.
  5256. 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'
  5257. ;;
  5258. *)
  5259. if test "$GXX" = yes; then
  5260. if test $with_gnu_ld = no; then
  5261. case $host_cpu in
  5262. hppa*64*)
  5263. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5264. ;;
  5265. ia64*)
  5266. _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'
  5267. ;;
  5268. *)
  5269. _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'
  5270. ;;
  5271. esac
  5272. fi
  5273. else
  5274. # FIXME: insert proper C++ library support
  5275. _LT_TAGVAR(ld_shlibs, $1)=no
  5276. fi
  5277. ;;
  5278. esac
  5279. ;;
  5280. interix[[3-9]]*)
  5281. _LT_TAGVAR(hardcode_direct, $1)=no
  5282. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5283. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5284. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5285. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  5286. # Instead, shared libraries are loaded at an image base (0x10000000 by
  5287. # default) and relocated if they conflict, which is a slow very memory
  5288. # consuming and fragmenting process. To avoid this, we pick a random,
  5289. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  5290. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  5291. _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'
  5292. _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'
  5293. ;;
  5294. irix5* | irix6*)
  5295. case $cc_basename in
  5296. CC*)
  5297. # SGI C++
  5298. _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'
  5299. # Archives containing C++ object files must be created using
  5300. # "CC -ar", where "CC" is the IRIX C++ compiler. This is
  5301. # necessary to make sure instantiated templates are included
  5302. # in the archive.
  5303. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
  5304. ;;
  5305. *)
  5306. if test "$GXX" = yes; then
  5307. if test "$with_gnu_ld" = no; then
  5308. _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'
  5309. else
  5310. _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'
  5311. fi
  5312. fi
  5313. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5314. ;;
  5315. esac
  5316. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5317. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5318. _LT_TAGVAR(inherit_rpath, $1)=yes
  5319. ;;
  5320. linux* | k*bsd*-gnu)
  5321. case $cc_basename in
  5322. KCC*)
  5323. # Kuck and Associates, Inc. (KAI) C++ Compiler
  5324. # KCC will only create a shared library if the output file
  5325. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  5326. # to its proper name (with version) after linking.
  5327. _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'
  5328. _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'
  5329. # Commands to make compiler produce verbose output that lists
  5330. # what "hidden" libraries, object files and flags are used when
  5331. # linking a shared library.
  5332. #
  5333. # There doesn't appear to be a way to prevent this compiler from
  5334. # explicitly linking system object files so we need to strip them
  5335. # from the output so that they don't get included in the library
  5336. # dependencies.
  5337. 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'
  5338. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5339. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5340. # Archives containing C++ object files must be created using
  5341. # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  5342. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  5343. ;;
  5344. icpc* | ecpc* )
  5345. # Intel C++
  5346. with_gnu_ld=yes
  5347. # version 8.0 and above of icpc choke on multiply defined symbols
  5348. # if we add $predep_objects and $postdep_objects, however 7.1 and
  5349. # earlier do not add the objects themselves.
  5350. case `$CC -V 2>&1` in
  5351. *"Version 7."*)
  5352. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5353. _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'
  5354. ;;
  5355. *) # Version 8.0 or newer
  5356. tmp_idyn=
  5357. case $host_cpu in
  5358. ia64*) tmp_idyn=' -i_dynamic';;
  5359. esac
  5360. _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5361. _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'
  5362. ;;
  5363. esac
  5364. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5365. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5366. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5367. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  5368. ;;
  5369. pgCC* | pgcpp*)
  5370. # Portland Group C++ compiler
  5371. case `$CC -V` in
  5372. *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
  5373. _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
  5374. rm -rf $tpldir~
  5375. $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
  5376. compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
  5377. _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
  5378. rm -rf $tpldir~
  5379. $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
  5380. $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
  5381. $RANLIB $oldlib'
  5382. _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
  5383. rm -rf $tpldir~
  5384. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  5385. $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
  5386. _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
  5387. rm -rf $tpldir~
  5388. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  5389. $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'
  5390. ;;
  5391. *) # Version 6 will use weak symbols
  5392. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
  5393. _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'
  5394. ;;
  5395. esac
  5396. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
  5397. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5398. _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'
  5399. ;;
  5400. cxx*)
  5401. # Compaq C++
  5402. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5403. _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'
  5404. runpath_var=LD_RUN_PATH
  5405. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  5406. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5407. # Commands to make compiler produce verbose output that lists
  5408. # what "hidden" libraries, object files and flags are used when
  5409. # linking a shared library.
  5410. #
  5411. # There doesn't appear to be a way to prevent this compiler from
  5412. # explicitly linking system object files so we need to strip them
  5413. # from the output so that they don't get included in the library
  5414. # dependencies.
  5415. 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'
  5416. ;;
  5417. xl*)
  5418. # IBM XL 8.0 on PPC, with GNU ld
  5419. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5420. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5421. _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5422. if test "x$supports_anon_versioning" = xyes; then
  5423. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  5424. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  5425. echo "local: *; };" >> $output_objdir/$libname.ver~
  5426. $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  5427. fi
  5428. ;;
  5429. *)
  5430. case `$CC -V 2>&1 | sed 5q` in
  5431. *Sun\ C*)
  5432. # Sun C++ 5.9
  5433. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  5434. _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5435. _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'
  5436. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5437. _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'
  5438. _LT_TAGVAR(compiler_needs_object, $1)=yes
  5439. # Not sure whether something based on
  5440. # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
  5441. # would be better.
  5442. output_verbose_link_cmd='echo'
  5443. # Archives containing C++ object files must be created using
  5444. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  5445. # necessary to make sure instantiated templates are included
  5446. # in the archive.
  5447. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  5448. ;;
  5449. esac
  5450. ;;
  5451. esac
  5452. ;;
  5453. lynxos*)
  5454. # FIXME: insert proper C++ library support
  5455. _LT_TAGVAR(ld_shlibs, $1)=no
  5456. ;;
  5457. m88k*)
  5458. # FIXME: insert proper C++ library support
  5459. _LT_TAGVAR(ld_shlibs, $1)=no
  5460. ;;
  5461. mvs*)
  5462. case $cc_basename in
  5463. cxx*)
  5464. # FIXME: insert proper C++ library support
  5465. _LT_TAGVAR(ld_shlibs, $1)=no
  5466. ;;
  5467. *)
  5468. # FIXME: insert proper C++ library support
  5469. _LT_TAGVAR(ld_shlibs, $1)=no
  5470. ;;
  5471. esac
  5472. ;;
  5473. netbsd*)
  5474. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  5475. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
  5476. wlarc=
  5477. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5478. _LT_TAGVAR(hardcode_direct, $1)=yes
  5479. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5480. fi
  5481. # Workaround some broken pre-1.5 toolchains
  5482. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
  5483. ;;
  5484. *nto* | *qnx*)
  5485. _LT_TAGVAR(ld_shlibs, $1)=yes
  5486. ;;
  5487. openbsd2*)
  5488. # C++ shared libraries are fairly broken
  5489. _LT_TAGVAR(ld_shlibs, $1)=no
  5490. ;;
  5491. openbsd*)
  5492. if test -f /usr/libexec/ld.so; then
  5493. _LT_TAGVAR(hardcode_direct, $1)=yes
  5494. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5495. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5496. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  5497. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5498. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  5499. _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'
  5500. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5501. _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  5502. fi
  5503. output_verbose_link_cmd=echo
  5504. else
  5505. _LT_TAGVAR(ld_shlibs, $1)=no
  5506. fi
  5507. ;;
  5508. osf3* | osf4* | osf5*)
  5509. case $cc_basename in
  5510. KCC*)
  5511. # Kuck and Associates, Inc. (KAI) C++ Compiler
  5512. # KCC will only create a shared library if the output file
  5513. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  5514. # to its proper name (with version) after linking.
  5515. _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'
  5516. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5517. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5518. # Archives containing C++ object files must be created using
  5519. # the KAI C++ compiler.
  5520. case $host in
  5521. osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
  5522. *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
  5523. esac
  5524. ;;
  5525. RCC*)
  5526. # Rational C++ 2.4.1
  5527. # FIXME: insert proper C++ library support
  5528. _LT_TAGVAR(ld_shlibs, $1)=no
  5529. ;;
  5530. cxx*)
  5531. case $host in
  5532. osf3*)
  5533. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  5534. _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'
  5535. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5536. ;;
  5537. *)
  5538. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  5539. _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'
  5540. _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
  5541. echo "-hidden">> $lib.exp~
  5542. $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~
  5543. $RM $lib.exp'
  5544. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  5545. ;;
  5546. esac
  5547. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5548. # Commands to make compiler produce verbose output that lists
  5549. # what "hidden" libraries, object files and flags are used when
  5550. # linking a shared library.
  5551. #
  5552. # There doesn't appear to be a way to prevent this compiler from
  5553. # explicitly linking system object files so we need to strip them
  5554. # from the output so that they don't get included in the library
  5555. # dependencies.
  5556. 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'
  5557. ;;
  5558. *)
  5559. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  5560. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  5561. case $host in
  5562. osf3*)
  5563. _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'
  5564. ;;
  5565. *)
  5566. _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'
  5567. ;;
  5568. esac
  5569. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5570. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5571. # Commands to make compiler produce verbose output that lists
  5572. # what "hidden" libraries, object files and flags are used when
  5573. # linking a shared library.
  5574. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
  5575. else
  5576. # FIXME: insert proper C++ library support
  5577. _LT_TAGVAR(ld_shlibs, $1)=no
  5578. fi
  5579. ;;
  5580. esac
  5581. ;;
  5582. psos*)
  5583. # FIXME: insert proper C++ library support
  5584. _LT_TAGVAR(ld_shlibs, $1)=no
  5585. ;;
  5586. sunos4*)
  5587. case $cc_basename in
  5588. CC*)
  5589. # Sun C++ 4.x
  5590. # FIXME: insert proper C++ library support
  5591. _LT_TAGVAR(ld_shlibs, $1)=no
  5592. ;;
  5593. lcc*)
  5594. # Lucid
  5595. # FIXME: insert proper C++ library support
  5596. _LT_TAGVAR(ld_shlibs, $1)=no
  5597. ;;
  5598. *)
  5599. # FIXME: insert proper C++ library support
  5600. _LT_TAGVAR(ld_shlibs, $1)=no
  5601. ;;
  5602. esac
  5603. ;;
  5604. solaris*)
  5605. case $cc_basename in
  5606. CC*)
  5607. # Sun C++ 4.2, 5.x and Centerline C++
  5608. _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
  5609. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  5610. _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5611. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5612. $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'
  5613. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5614. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5615. case $host_os in
  5616. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  5617. *)
  5618. # The compiler driver will combine and reorder linker options,
  5619. # but understands `-z linker_flag'.
  5620. # Supported since Solaris 2.6 (maybe 2.5.1?)
  5621. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  5622. ;;
  5623. esac
  5624. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5625. output_verbose_link_cmd='echo'
  5626. # Archives containing C++ object files must be created using
  5627. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  5628. # necessary to make sure instantiated templates are included
  5629. # in the archive.
  5630. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  5631. ;;
  5632. gcx*)
  5633. # Green Hills C++ Compiler
  5634. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  5635. # The C++ compiler must be used to create the archive.
  5636. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
  5637. ;;
  5638. *)
  5639. # GNU C++ compiler with Solaris linker
  5640. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  5641. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
  5642. if $CC --version | $GREP -v '^2\.7' > /dev/null; then
  5643. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  5644. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5645. $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  5646. # Commands to make compiler produce verbose output that lists
  5647. # what "hidden" libraries, object files and flags are used when
  5648. # linking a shared library.
  5649. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
  5650. else
  5651. # g++ 2.7 appears to require `-G' NOT `-shared' on this
  5652. # platform.
  5653. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  5654. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5655. $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  5656. # Commands to make compiler produce verbose output that lists
  5657. # what "hidden" libraries, object files and flags are used when
  5658. # linking a shared library.
  5659. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
  5660. fi
  5661. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
  5662. case $host_os in
  5663. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  5664. *)
  5665. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
  5666. ;;
  5667. esac
  5668. fi
  5669. ;;
  5670. esac
  5671. ;;
  5672. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  5673. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  5674. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5675. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5676. runpath_var='LD_RUN_PATH'
  5677. case $cc_basename in
  5678. CC*)
  5679. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5680. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5681. ;;
  5682. *)
  5683. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5684. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5685. ;;
  5686. esac
  5687. ;;
  5688. sysv5* | sco3.2v5* | sco5v6*)
  5689. # Note: We can NOT use -z defs as we might desire, because we do not
  5690. # link with -lc, and that would cause any symbols used from libc to
  5691. # always be unresolved, which means just about no library would
  5692. # ever link correctly. If we're not using GNU ld we use -z text
  5693. # though, which does catch some bad symbols but isn't as heavy-handed
  5694. # as -z defs.
  5695. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  5696. _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
  5697. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5698. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5699. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
  5700. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5701. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5702. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  5703. runpath_var='LD_RUN_PATH'
  5704. case $cc_basename in
  5705. CC*)
  5706. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5707. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5708. ;;
  5709. *)
  5710. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5711. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5712. ;;
  5713. esac
  5714. ;;
  5715. tandem*)
  5716. case $cc_basename in
  5717. NCC*)
  5718. # NonStop-UX NCC 3.20
  5719. # FIXME: insert proper C++ library support
  5720. _LT_TAGVAR(ld_shlibs, $1)=no
  5721. ;;
  5722. *)
  5723. # FIXME: insert proper C++ library support
  5724. _LT_TAGVAR(ld_shlibs, $1)=no
  5725. ;;
  5726. esac
  5727. ;;
  5728. vxworks*)
  5729. # FIXME: insert proper C++ library support
  5730. _LT_TAGVAR(ld_shlibs, $1)=no
  5731. ;;
  5732. *)
  5733. # FIXME: insert proper C++ library support
  5734. _LT_TAGVAR(ld_shlibs, $1)=no
  5735. ;;
  5736. esac
  5737. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  5738. test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  5739. _LT_TAGVAR(GCC, $1)="$GXX"
  5740. _LT_TAGVAR(LD, $1)="$LD"
  5741. ## CAVEAT EMPTOR:
  5742. ## There is no encapsulation within the following macros, do not change
  5743. ## the running order or otherwise move them around unless you know exactly
  5744. ## what you are doing...
  5745. _LT_SYS_HIDDEN_LIBDEPS($1)
  5746. _LT_COMPILER_PIC($1)
  5747. _LT_COMPILER_C_O($1)
  5748. _LT_COMPILER_FILE_LOCKS($1)
  5749. _LT_LINKER_SHLIBS($1)
  5750. _LT_SYS_DYNAMIC_LINKER($1)
  5751. _LT_LINKER_HARDCODE_LIBPATH($1)
  5752. _LT_CONFIG($1)
  5753. fi # test -n "$compiler"
  5754. CC=$lt_save_CC
  5755. LDCXX=$LD
  5756. LD=$lt_save_LD
  5757. GCC=$lt_save_GCC
  5758. with_gnu_ld=$lt_save_with_gnu_ld
  5759. lt_cv_path_LDCXX=$lt_cv_path_LD
  5760. lt_cv_path_LD=$lt_save_path_LD
  5761. lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
  5762. lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
  5763. fi # test "$_lt_caught_CXX_error" != yes
  5764. AC_LANG_POP
  5765. ])# _LT_LANG_CXX_CONFIG
  5766. # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
  5767. # ---------------------------------
  5768. # Figure out "hidden" library dependencies from verbose
  5769. # compiler output when linking a shared library.
  5770. # Parse the compiler output and extract the necessary
  5771. # objects, libraries and library flags.
  5772. m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
  5773. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  5774. # Dependencies to place before and after the object being linked:
  5775. _LT_TAGVAR(predep_objects, $1)=
  5776. _LT_TAGVAR(postdep_objects, $1)=
  5777. _LT_TAGVAR(predeps, $1)=
  5778. _LT_TAGVAR(postdeps, $1)=
  5779. _LT_TAGVAR(compiler_lib_search_path, $1)=
  5780. dnl we can't use the lt_simple_compile_test_code here,
  5781. dnl because it contains code intended for an executable,
  5782. dnl not a library. It's possible we should let each
  5783. dnl tag define a new lt_????_link_test_code variable,
  5784. dnl but it's only used here...
  5785. m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
  5786. int a;
  5787. void foo (void) { a = 0; }
  5788. _LT_EOF
  5789. ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
  5790. class Foo
  5791. {
  5792. public:
  5793. Foo (void) { a = 0; }
  5794. private:
  5795. int a;
  5796. };
  5797. _LT_EOF
  5798. ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
  5799. subroutine foo
  5800. implicit none
  5801. integer*4 a
  5802. a=0
  5803. return
  5804. end
  5805. _LT_EOF
  5806. ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
  5807. subroutine foo
  5808. implicit none
  5809. integer a
  5810. a=0
  5811. return
  5812. end
  5813. _LT_EOF
  5814. ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
  5815. public class foo {
  5816. private int a;
  5817. public void bar (void) {
  5818. a = 0;
  5819. }
  5820. };
  5821. _LT_EOF
  5822. ])
  5823. dnl Parse the compiler output and extract the necessary
  5824. dnl objects, libraries and library flags.
  5825. if AC_TRY_EVAL(ac_compile); then
  5826. # Parse the compiler output and extract the necessary
  5827. # objects, libraries and library flags.
  5828. # Sentinel used to keep track of whether or not we are before
  5829. # the conftest object file.
  5830. pre_test_object_deps_done=no
  5831. for p in `eval "$output_verbose_link_cmd"`; do
  5832. case $p in
  5833. -L* | -R* | -l*)
  5834. # Some compilers place space between "-{L,R}" and the path.
  5835. # Remove the space.
  5836. if test $p = "-L" ||
  5837. test $p = "-R"; then
  5838. prev=$p
  5839. continue
  5840. else
  5841. prev=
  5842. fi
  5843. if test "$pre_test_object_deps_done" = no; then
  5844. case $p in
  5845. -L* | -R*)
  5846. # Internal compiler library paths should come after those
  5847. # provided the user. The postdeps already come after the
  5848. # user supplied libs so there is no need to process them.
  5849. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
  5850. _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
  5851. else
  5852. _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
  5853. fi
  5854. ;;
  5855. # The "-l" case would never come before the object being
  5856. # linked, so don't bother handling this case.
  5857. esac
  5858. else
  5859. if test -z "$_LT_TAGVAR(postdeps, $1)"; then
  5860. _LT_TAGVAR(postdeps, $1)="${prev}${p}"
  5861. else
  5862. _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
  5863. fi
  5864. fi
  5865. ;;
  5866. *.$objext)
  5867. # This assumes that the test object file only shows up
  5868. # once in the compiler output.
  5869. if test "$p" = "conftest.$objext"; then
  5870. pre_test_object_deps_done=yes
  5871. continue
  5872. fi
  5873. if test "$pre_test_object_deps_done" = no; then
  5874. if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
  5875. _LT_TAGVAR(predep_objects, $1)="$p"
  5876. else
  5877. _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
  5878. fi
  5879. else
  5880. if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
  5881. _LT_TAGVAR(postdep_objects, $1)="$p"
  5882. else
  5883. _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
  5884. fi
  5885. fi
  5886. ;;
  5887. *) ;; # Ignore the rest.
  5888. esac
  5889. done
  5890. # Clean up.
  5891. rm -f a.out a.exe
  5892. else
  5893. echo "libtool.m4: error: problem compiling $1 test program"
  5894. fi
  5895. $RM -f confest.$objext
  5896. # PORTME: override above test on systems where it is broken
  5897. m4_if([$1], [CXX],
  5898. [case $host_os in
  5899. interix[[3-9]]*)
  5900. # Interix 3.5 installs completely hosed .la files for C++, so rather than
  5901. # hack all around it, let's just trust "g++" to DTRT.
  5902. _LT_TAGVAR(predep_objects,$1)=
  5903. _LT_TAGVAR(postdep_objects,$1)=
  5904. _LT_TAGVAR(postdeps,$1)=
  5905. ;;
  5906. linux*)
  5907. case `$CC -V 2>&1 | sed 5q` in
  5908. *Sun\ C*)
  5909. # Sun C++ 5.9
  5910. # The more standards-conforming stlport4 library is
  5911. # incompatible with the Cstd library. Avoid specifying
  5912. # it if it's in CXXFLAGS. Ignore libCrun as
  5913. # -library=stlport4 depends on it.
  5914. case " $CXX $CXXFLAGS " in
  5915. *" -library=stlport4 "*)
  5916. solaris_use_stlport4=yes
  5917. ;;
  5918. esac
  5919. if test "$solaris_use_stlport4" != yes; then
  5920. _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
  5921. fi
  5922. ;;
  5923. esac
  5924. ;;
  5925. solaris*)
  5926. case $cc_basename in
  5927. CC*)
  5928. # The more standards-conforming stlport4 library is
  5929. # incompatible with the Cstd library. Avoid specifying
  5930. # it if it's in CXXFLAGS. Ignore libCrun as
  5931. # -library=stlport4 depends on it.
  5932. case " $CXX $CXXFLAGS " in
  5933. *" -library=stlport4 "*)
  5934. solaris_use_stlport4=yes
  5935. ;;
  5936. esac
  5937. # Adding this requires a known-good setup of shared libraries for
  5938. # Sun compiler versions before 5.6, else PIC objects from an old
  5939. # archive will be linked into the output, leading to subtle bugs.
  5940. if test "$solaris_use_stlport4" != yes; then
  5941. _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
  5942. fi
  5943. ;;
  5944. esac
  5945. ;;
  5946. esac
  5947. ])
  5948. case " $_LT_TAGVAR(postdeps, $1) " in
  5949. *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
  5950. esac
  5951. _LT_TAGVAR(compiler_lib_search_dirs, $1)=
  5952. if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
  5953. _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
  5954. fi
  5955. _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
  5956. [The directories searched by this compiler when creating a shared library])
  5957. _LT_TAGDECL([], [predep_objects], [1],
  5958. [Dependencies to place before and after the objects being linked to
  5959. create a shared library])
  5960. _LT_TAGDECL([], [postdep_objects], [1])
  5961. _LT_TAGDECL([], [predeps], [1])
  5962. _LT_TAGDECL([], [postdeps], [1])
  5963. _LT_TAGDECL([], [compiler_lib_search_path], [1],
  5964. [The library search path used internally by the compiler when linking
  5965. a shared library])
  5966. ])# _LT_SYS_HIDDEN_LIBDEPS
  5967. # _LT_PROG_F77
  5968. # ------------
  5969. # Since AC_PROG_F77 is broken, in that it returns the empty string
  5970. # if there is no fortran compiler, we have our own version here.
  5971. m4_defun([_LT_PROG_F77],
  5972. [
  5973. pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
  5974. AC_PROG_F77
  5975. if test -z "$F77" || test "X$F77" = "Xno"; then
  5976. _lt_disable_F77=yes
  5977. fi
  5978. popdef([AC_MSG_ERROR])
  5979. ])# _LT_PROG_F77
  5980. dnl aclocal-1.4 backwards compatibility:
  5981. dnl AC_DEFUN([_LT_PROG_F77], [])
  5982. # _LT_LANG_F77_CONFIG([TAG])
  5983. # --------------------------
  5984. # Ensure that the configuration variables for a Fortran 77 compiler are
  5985. # suitably defined. These variables are subsequently used by _LT_CONFIG
  5986. # to write the compiler configuration to `libtool'.
  5987. m4_defun([_LT_LANG_F77_CONFIG],
  5988. [AC_REQUIRE([_LT_PROG_F77])dnl
  5989. AC_LANG_PUSH(Fortran 77)
  5990. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5991. _LT_TAGVAR(allow_undefined_flag, $1)=
  5992. _LT_TAGVAR(always_export_symbols, $1)=no
  5993. _LT_TAGVAR(archive_expsym_cmds, $1)=
  5994. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  5995. _LT_TAGVAR(hardcode_direct, $1)=no
  5996. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  5997. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  5998. _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  5999. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  6000. _LT_TAGVAR(hardcode_minus_L, $1)=no
  6001. _LT_TAGVAR(hardcode_automatic, $1)=no
  6002. _LT_TAGVAR(inherit_rpath, $1)=no
  6003. _LT_TAGVAR(module_cmds, $1)=
  6004. _LT_TAGVAR(module_expsym_cmds, $1)=
  6005. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  6006. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  6007. _LT_TAGVAR(no_undefined_flag, $1)=
  6008. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  6009. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  6010. # Source file extension for f77 test sources.
  6011. ac_ext=f
  6012. # Object file extension for compiled f77 test sources.
  6013. objext=o
  6014. _LT_TAGVAR(objext, $1)=$objext
  6015. # No sense in running all these tests if we already determined that
  6016. # the F77 compiler isn't working. Some variables (like enable_shared)
  6017. # are currently assumed to apply to all compilers on this platform,
  6018. # and will be corrupted by setting them based on a non-working compiler.
  6019. if test "$_lt_disable_F77" != yes; then
  6020. # Code to be used in simple compile tests
  6021. lt_simple_compile_test_code="\
  6022. subroutine t
  6023. return
  6024. end
  6025. "
  6026. # Code to be used in simple link tests
  6027. lt_simple_link_test_code="\
  6028. program t
  6029. end
  6030. "
  6031. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6032. _LT_TAG_COMPILER
  6033. # save warnings/boilerplate of simple test code
  6034. _LT_COMPILER_BOILERPLATE
  6035. _LT_LINKER_BOILERPLATE
  6036. # Allow CC to be a program name with arguments.
  6037. lt_save_CC="$CC"
  6038. lt_save_GCC=$GCC
  6039. CC=${F77-"f77"}
  6040. compiler=$CC
  6041. _LT_TAGVAR(compiler, $1)=$CC
  6042. _LT_CC_BASENAME([$compiler])
  6043. GCC=$G77
  6044. if test -n "$compiler"; then
  6045. AC_MSG_CHECKING([if libtool supports shared libraries])
  6046. AC_MSG_RESULT([$can_build_shared])
  6047. AC_MSG_CHECKING([whether to build shared libraries])
  6048. test "$can_build_shared" = "no" && enable_shared=no
  6049. # On AIX, shared libraries and static libraries use the same namespace, and
  6050. # are all built from PIC.
  6051. case $host_os in
  6052. aix3*)
  6053. test "$enable_shared" = yes && enable_static=no
  6054. if test -n "$RANLIB"; then
  6055. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  6056. postinstall_cmds='$RANLIB $lib'
  6057. fi
  6058. ;;
  6059. aix[[4-9]]*)
  6060. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  6061. test "$enable_shared" = yes && enable_static=no
  6062. fi
  6063. ;;
  6064. esac
  6065. AC_MSG_RESULT([$enable_shared])
  6066. AC_MSG_CHECKING([whether to build static libraries])
  6067. # Make sure either enable_shared or enable_static is yes.
  6068. test "$enable_shared" = yes || enable_static=yes
  6069. AC_MSG_RESULT([$enable_static])
  6070. _LT_TAGVAR(GCC, $1)="$G77"
  6071. _LT_TAGVAR(LD, $1)="$LD"
  6072. ## CAVEAT EMPTOR:
  6073. ## There is no encapsulation within the following macros, do not change
  6074. ## the running order or otherwise move them around unless you know exactly
  6075. ## what you are doing...
  6076. _LT_COMPILER_PIC($1)
  6077. _LT_COMPILER_C_O($1)
  6078. _LT_COMPILER_FILE_LOCKS($1)
  6079. _LT_LINKER_SHLIBS($1)
  6080. _LT_SYS_DYNAMIC_LINKER($1)
  6081. _LT_LINKER_HARDCODE_LIBPATH($1)
  6082. _LT_CONFIG($1)
  6083. fi # test -n "$compiler"
  6084. GCC=$lt_save_GCC
  6085. CC="$lt_save_CC"
  6086. fi # test "$_lt_disable_F77" != yes
  6087. AC_LANG_POP
  6088. ])# _LT_LANG_F77_CONFIG
  6089. # _LT_PROG_FC
  6090. # -----------
  6091. # Since AC_PROG_FC is broken, in that it returns the empty string
  6092. # if there is no fortran compiler, we have our own version here.
  6093. m4_defun([_LT_PROG_FC],
  6094. [
  6095. pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
  6096. AC_PROG_FC
  6097. if test -z "$FC" || test "X$FC" = "Xno"; then
  6098. _lt_disable_FC=yes
  6099. fi
  6100. popdef([AC_MSG_ERROR])
  6101. ])# _LT_PROG_FC
  6102. dnl aclocal-1.4 backwards compatibility:
  6103. dnl AC_DEFUN([_LT_PROG_FC], [])
  6104. # _LT_LANG_FC_CONFIG([TAG])
  6105. # -------------------------
  6106. # Ensure that the configuration variables for a Fortran compiler are
  6107. # suitably defined. These variables are subsequently used by _LT_CONFIG
  6108. # to write the compiler configuration to `libtool'.
  6109. m4_defun([_LT_LANG_FC_CONFIG],
  6110. [AC_REQUIRE([_LT_PROG_FC])dnl
  6111. AC_LANG_PUSH(Fortran)
  6112. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6113. _LT_TAGVAR(allow_undefined_flag, $1)=
  6114. _LT_TAGVAR(always_export_symbols, $1)=no
  6115. _LT_TAGVAR(archive_expsym_cmds, $1)=
  6116. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  6117. _LT_TAGVAR(hardcode_direct, $1)=no
  6118. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  6119. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  6120. _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  6121. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  6122. _LT_TAGVAR(hardcode_minus_L, $1)=no
  6123. _LT_TAGVAR(hardcode_automatic, $1)=no
  6124. _LT_TAGVAR(inherit_rpath, $1)=no
  6125. _LT_TAGVAR(module_cmds, $1)=
  6126. _LT_TAGVAR(module_expsym_cmds, $1)=
  6127. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  6128. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  6129. _LT_TAGVAR(no_undefined_flag, $1)=
  6130. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  6131. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  6132. # Source file extension for fc test sources.
  6133. ac_ext=${ac_fc_srcext-f}
  6134. # Object file extension for compiled fc test sources.
  6135. objext=o
  6136. _LT_TAGVAR(objext, $1)=$objext
  6137. # No sense in running all these tests if we already determined that
  6138. # the FC compiler isn't working. Some variables (like enable_shared)
  6139. # are currently assumed to apply to all compilers on this platform,
  6140. # and will be corrupted by setting them based on a non-working compiler.
  6141. if test "$_lt_disable_FC" != yes; then
  6142. # Code to be used in simple compile tests
  6143. lt_simple_compile_test_code="\
  6144. subroutine t
  6145. return
  6146. end
  6147. "
  6148. # Code to be used in simple link tests
  6149. lt_simple_link_test_code="\
  6150. program t
  6151. end
  6152. "
  6153. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6154. _LT_TAG_COMPILER
  6155. # save warnings/boilerplate of simple test code
  6156. _LT_COMPILER_BOILERPLATE
  6157. _LT_LINKER_BOILERPLATE
  6158. # Allow CC to be a program name with arguments.
  6159. lt_save_CC="$CC"
  6160. lt_save_GCC=$GCC
  6161. CC=${FC-"f95"}
  6162. compiler=$CC
  6163. GCC=$ac_cv_fc_compiler_gnu
  6164. _LT_TAGVAR(compiler, $1)=$CC
  6165. _LT_CC_BASENAME([$compiler])
  6166. if test -n "$compiler"; then
  6167. AC_MSG_CHECKING([if libtool supports shared libraries])
  6168. AC_MSG_RESULT([$can_build_shared])
  6169. AC_MSG_CHECKING([whether to build shared libraries])
  6170. test "$can_build_shared" = "no" && enable_shared=no
  6171. # On AIX, shared libraries and static libraries use the same namespace, and
  6172. # are all built from PIC.
  6173. case $host_os in
  6174. aix3*)
  6175. test "$enable_shared" = yes && enable_static=no
  6176. if test -n "$RANLIB"; then
  6177. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  6178. postinstall_cmds='$RANLIB $lib'
  6179. fi
  6180. ;;
  6181. aix[[4-9]]*)
  6182. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  6183. test "$enable_shared" = yes && enable_static=no
  6184. fi
  6185. ;;
  6186. esac
  6187. AC_MSG_RESULT([$enable_shared])
  6188. AC_MSG_CHECKING([whether to build static libraries])
  6189. # Make sure either enable_shared or enable_static is yes.
  6190. test "$enable_shared" = yes || enable_static=yes
  6191. AC_MSG_RESULT([$enable_static])
  6192. _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
  6193. _LT_TAGVAR(LD, $1)="$LD"
  6194. ## CAVEAT EMPTOR:
  6195. ## There is no encapsulation within the following macros, do not change
  6196. ## the running order or otherwise move them around unless you know exactly
  6197. ## what you are doing...
  6198. _LT_SYS_HIDDEN_LIBDEPS($1)
  6199. _LT_COMPILER_PIC($1)
  6200. _LT_COMPILER_C_O($1)
  6201. _LT_COMPILER_FILE_LOCKS($1)
  6202. _LT_LINKER_SHLIBS($1)
  6203. _LT_SYS_DYNAMIC_LINKER($1)
  6204. _LT_LINKER_HARDCODE_LIBPATH($1)
  6205. _LT_CONFIG($1)
  6206. fi # test -n "$compiler"
  6207. GCC=$lt_save_GCC
  6208. CC="$lt_save_CC"
  6209. fi # test "$_lt_disable_FC" != yes
  6210. AC_LANG_POP
  6211. ])# _LT_LANG_FC_CONFIG
  6212. # _LT_LANG_GCJ_CONFIG([TAG])
  6213. # --------------------------
  6214. # Ensure that the configuration variables for the GNU Java Compiler compiler
  6215. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  6216. # to write the compiler configuration to `libtool'.
  6217. m4_defun([_LT_LANG_GCJ_CONFIG],
  6218. [AC_REQUIRE([LT_PROG_GCJ])dnl
  6219. AC_LANG_SAVE
  6220. # Source file extension for Java test sources.
  6221. ac_ext=java
  6222. # Object file extension for compiled Java test sources.
  6223. objext=o
  6224. _LT_TAGVAR(objext, $1)=$objext
  6225. # Code to be used in simple compile tests
  6226. lt_simple_compile_test_code="class foo {}"
  6227. # Code to be used in simple link tests
  6228. lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
  6229. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6230. _LT_TAG_COMPILER
  6231. # save warnings/boilerplate of simple test code
  6232. _LT_COMPILER_BOILERPLATE
  6233. _LT_LINKER_BOILERPLATE
  6234. # Allow CC to be a program name with arguments.
  6235. lt_save_CC="$CC"
  6236. lt_save_GCC=$GCC
  6237. GCC=yes
  6238. CC=${GCJ-"gcj"}
  6239. compiler=$CC
  6240. _LT_TAGVAR(compiler, $1)=$CC
  6241. _LT_TAGVAR(LD, $1)="$LD"
  6242. _LT_CC_BASENAME([$compiler])
  6243. # GCJ did not exist at the time GCC didn't implicitly link libc in.
  6244. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6245. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  6246. ## CAVEAT EMPTOR:
  6247. ## There is no encapsulation within the following macros, do not change
  6248. ## the running order or otherwise move them around unless you know exactly
  6249. ## what you are doing...
  6250. if test -n "$compiler"; then
  6251. _LT_COMPILER_NO_RTTI($1)
  6252. _LT_COMPILER_PIC($1)
  6253. _LT_COMPILER_C_O($1)
  6254. _LT_COMPILER_FILE_LOCKS($1)
  6255. _LT_LINKER_SHLIBS($1)
  6256. _LT_LINKER_HARDCODE_LIBPATH($1)
  6257. _LT_CONFIG($1)
  6258. fi
  6259. AC_LANG_RESTORE
  6260. GCC=$lt_save_GCC
  6261. CC="$lt_save_CC"
  6262. ])# _LT_LANG_GCJ_CONFIG
  6263. # _LT_LANG_RC_CONFIG([TAG])
  6264. # -------------------------
  6265. # Ensure that the configuration variables for the Windows resource compiler
  6266. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  6267. # to write the compiler configuration to `libtool'.
  6268. m4_defun([_LT_LANG_RC_CONFIG],
  6269. [AC_REQUIRE([LT_PROG_RC])dnl
  6270. AC_LANG_SAVE
  6271. # Source file extension for RC test sources.
  6272. ac_ext=rc
  6273. # Object file extension for compiled RC test sources.
  6274. objext=o
  6275. _LT_TAGVAR(objext, $1)=$objext
  6276. # Code to be used in simple compile tests
  6277. lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
  6278. # Code to be used in simple link tests
  6279. lt_simple_link_test_code="$lt_simple_compile_test_code"
  6280. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6281. _LT_TAG_COMPILER
  6282. # save warnings/boilerplate of simple test code
  6283. _LT_COMPILER_BOILERPLATE
  6284. _LT_LINKER_BOILERPLATE
  6285. # Allow CC to be a program name with arguments.
  6286. lt_save_CC="$CC"
  6287. lt_save_GCC=$GCC
  6288. GCC=
  6289. CC=${RC-"windres"}
  6290. compiler=$CC
  6291. _LT_TAGVAR(compiler, $1)=$CC
  6292. _LT_CC_BASENAME([$compiler])
  6293. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  6294. if test -n "$compiler"; then
  6295. :
  6296. _LT_CONFIG($1)
  6297. fi
  6298. GCC=$lt_save_GCC
  6299. AC_LANG_RESTORE
  6300. CC="$lt_save_CC"
  6301. ])# _LT_LANG_RC_CONFIG
  6302. # LT_PROG_GCJ
  6303. # -----------
  6304. AC_DEFUN([LT_PROG_GCJ],
  6305. [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
  6306. [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
  6307. [AC_CHECK_TOOL(GCJ, gcj,)
  6308. test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
  6309. AC_SUBST(GCJFLAGS)])])[]dnl
  6310. ])
  6311. # Old name:
  6312. AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
  6313. dnl aclocal-1.4 backwards compatibility:
  6314. dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
  6315. # LT_PROG_RC
  6316. # ----------
  6317. AC_DEFUN([LT_PROG_RC],
  6318. [AC_CHECK_TOOL(RC, windres,)
  6319. ])
  6320. # Old name:
  6321. AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
  6322. dnl aclocal-1.4 backwards compatibility:
  6323. dnl AC_DEFUN([LT_AC_PROG_RC], [])
  6324. # _LT_DECL_EGREP
  6325. # --------------
  6326. # If we don't have a new enough Autoconf to choose the best grep
  6327. # available, choose the one first in the user's PATH.
  6328. m4_defun([_LT_DECL_EGREP],
  6329. [AC_REQUIRE([AC_PROG_EGREP])dnl
  6330. AC_REQUIRE([AC_PROG_FGREP])dnl
  6331. test -z "$GREP" && GREP=grep
  6332. _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
  6333. _LT_DECL([], [EGREP], [1], [An ERE matcher])
  6334. _LT_DECL([], [FGREP], [1], [A literal string matcher])
  6335. dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
  6336. AC_SUBST([GREP])
  6337. ])
  6338. # _LT_DECL_OBJDUMP
  6339. # --------------
  6340. # If we don't have a new enough Autoconf to choose the best objdump
  6341. # available, choose the one first in the user's PATH.
  6342. m4_defun([_LT_DECL_OBJDUMP],
  6343. [AC_CHECK_TOOL(OBJDUMP, objdump, false)
  6344. test -z "$OBJDUMP" && OBJDUMP=objdump
  6345. _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
  6346. AC_SUBST([OBJDUMP])
  6347. ])
  6348. # _LT_DECL_SED
  6349. # ------------
  6350. # Check for a fully-functional sed program, that truncates
  6351. # as few characters as possible. Prefer GNU sed if found.
  6352. m4_defun([_LT_DECL_SED],
  6353. [AC_PROG_SED
  6354. test -z "$SED" && SED=sed
  6355. Xsed="$SED -e 1s/^X//"
  6356. _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
  6357. _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
  6358. [Sed that helps us avoid accidentally triggering echo(1) options like -n])
  6359. ])# _LT_DECL_SED
  6360. m4_ifndef([AC_PROG_SED], [
  6361. ############################################################
  6362. # NOTE: This macro has been submitted for inclusion into #
  6363. # GNU Autoconf as AC_PROG_SED. When it is available in #
  6364. # a released version of Autoconf we should remove this #
  6365. # macro and use it instead. #
  6366. ############################################################
  6367. m4_defun([AC_PROG_SED],
  6368. [AC_MSG_CHECKING([for a sed that does not truncate output])
  6369. AC_CACHE_VAL(lt_cv_path_SED,
  6370. [# Loop through the user's path and test for sed and gsed.
  6371. # Then use that list of sed's as ones to test for truncation.
  6372. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6373. for as_dir in $PATH
  6374. do
  6375. IFS=$as_save_IFS
  6376. test -z "$as_dir" && as_dir=.
  6377. for lt_ac_prog in sed gsed; do
  6378. for ac_exec_ext in '' $ac_executable_extensions; do
  6379. if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
  6380. lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
  6381. fi
  6382. done
  6383. done
  6384. done
  6385. IFS=$as_save_IFS
  6386. lt_ac_max=0
  6387. lt_ac_count=0
  6388. # Add /usr/xpg4/bin/sed as it is typically found on Solaris
  6389. # along with /bin/sed that truncates output.
  6390. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
  6391. test ! -f $lt_ac_sed && continue
  6392. cat /dev/null > conftest.in
  6393. lt_ac_count=0
  6394. echo $ECHO_N "0123456789$ECHO_C" >conftest.in
  6395. # Check for GNU sed and select it if it is found.
  6396. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
  6397. lt_cv_path_SED=$lt_ac_sed
  6398. break
  6399. fi
  6400. while true; do
  6401. cat conftest.in conftest.in >conftest.tmp
  6402. mv conftest.tmp conftest.in
  6403. cp conftest.in conftest.nl
  6404. echo >>conftest.nl
  6405. $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
  6406. cmp -s conftest.out conftest.nl || break
  6407. # 10000 chars as input seems more than enough
  6408. test $lt_ac_count -gt 10 && break
  6409. lt_ac_count=`expr $lt_ac_count + 1`
  6410. if test $lt_ac_count -gt $lt_ac_max; then
  6411. lt_ac_max=$lt_ac_count
  6412. lt_cv_path_SED=$lt_ac_sed
  6413. fi
  6414. done
  6415. done
  6416. ])
  6417. SED=$lt_cv_path_SED
  6418. AC_SUBST([SED])
  6419. AC_MSG_RESULT([$SED])
  6420. ])#AC_PROG_SED
  6421. ])#m4_ifndef
  6422. # Old name:
  6423. AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
  6424. dnl aclocal-1.4 backwards compatibility:
  6425. dnl AC_DEFUN([LT_AC_PROG_SED], [])
  6426. # _LT_CHECK_SHELL_FEATURES
  6427. # ------------------------
  6428. # Find out whether the shell is Bourne or XSI compatible,
  6429. # or has some other useful features.
  6430. m4_defun([_LT_CHECK_SHELL_FEATURES],
  6431. [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
  6432. # Try some XSI features
  6433. xsi_shell=no
  6434. ( _lt_dummy="a/b/c"
  6435. test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
  6436. = c,a/b,, \
  6437. && eval 'test $(( 1 + 1 )) -eq 2 \
  6438. && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
  6439. && xsi_shell=yes
  6440. AC_MSG_RESULT([$xsi_shell])
  6441. _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
  6442. AC_MSG_CHECKING([whether the shell understands "+="])
  6443. lt_shell_append=no
  6444. ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
  6445. >/dev/null 2>&1 \
  6446. && lt_shell_append=yes
  6447. AC_MSG_RESULT([$lt_shell_append])
  6448. _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
  6449. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
  6450. lt_unset=unset
  6451. else
  6452. lt_unset=false
  6453. fi
  6454. _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
  6455. # test EBCDIC or ASCII
  6456. case `echo X|tr X '\101'` in
  6457. A) # ASCII based system
  6458. # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
  6459. lt_SP2NL='tr \040 \012'
  6460. lt_NL2SP='tr \015\012 \040\040'
  6461. ;;
  6462. *) # EBCDIC based system
  6463. lt_SP2NL='tr \100 \n'
  6464. lt_NL2SP='tr \r\n \100\100'
  6465. ;;
  6466. esac
  6467. _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
  6468. _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
  6469. ])# _LT_CHECK_SHELL_FEATURES
  6470. # _LT_PROG_XSI_SHELLFNS
  6471. # ---------------------
  6472. # Bourne and XSI compatible variants of some useful shell functions.
  6473. m4_defun([_LT_PROG_XSI_SHELLFNS],
  6474. [case $xsi_shell in
  6475. yes)
  6476. cat << \_LT_EOF >> "$cfgfile"
  6477. # func_dirname file append nondir_replacement
  6478. # Compute the dirname of FILE. If nonempty, add APPEND to the result,
  6479. # otherwise set result to NONDIR_REPLACEMENT.
  6480. func_dirname ()
  6481. {
  6482. case ${1} in
  6483. */*) func_dirname_result="${1%/*}${2}" ;;
  6484. * ) func_dirname_result="${3}" ;;
  6485. esac
  6486. }
  6487. # func_basename file
  6488. func_basename ()
  6489. {
  6490. func_basename_result="${1##*/}"
  6491. }
  6492. # func_dirname_and_basename file append nondir_replacement
  6493. # perform func_basename and func_dirname in a single function
  6494. # call:
  6495. # dirname: Compute the dirname of FILE. If nonempty,
  6496. # add APPEND to the result, otherwise set result
  6497. # to NONDIR_REPLACEMENT.
  6498. # value returned in "$func_dirname_result"
  6499. # basename: Compute filename of FILE.
  6500. # value retuned in "$func_basename_result"
  6501. # Implementation must be kept synchronized with func_dirname
  6502. # and func_basename. For efficiency, we do not delegate to
  6503. # those functions but instead duplicate the functionality here.
  6504. func_dirname_and_basename ()
  6505. {
  6506. case ${1} in
  6507. */*) func_dirname_result="${1%/*}${2}" ;;
  6508. * ) func_dirname_result="${3}" ;;
  6509. esac
  6510. func_basename_result="${1##*/}"
  6511. }
  6512. # func_stripname prefix suffix name
  6513. # strip PREFIX and SUFFIX off of NAME.
  6514. # PREFIX and SUFFIX must not contain globbing or regex special
  6515. # characters, hashes, percent signs, but SUFFIX may contain a leading
  6516. # dot (in which case that matches only a dot).
  6517. func_stripname ()
  6518. {
  6519. # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
  6520. # positional parameters, so assign one to ordinary parameter first.
  6521. func_stripname_result=${3}
  6522. func_stripname_result=${func_stripname_result#"${1}"}
  6523. func_stripname_result=${func_stripname_result%"${2}"}
  6524. }
  6525. # func_opt_split
  6526. func_opt_split ()
  6527. {
  6528. func_opt_split_opt=${1%%=*}
  6529. func_opt_split_arg=${1#*=}
  6530. }
  6531. # func_lo2o object
  6532. func_lo2o ()
  6533. {
  6534. case ${1} in
  6535. *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
  6536. *) func_lo2o_result=${1} ;;
  6537. esac
  6538. }
  6539. # func_xform libobj-or-source
  6540. func_xform ()
  6541. {
  6542. func_xform_result=${1%.*}.lo
  6543. }
  6544. # func_arith arithmetic-term...
  6545. func_arith ()
  6546. {
  6547. func_arith_result=$(( $[*] ))
  6548. }
  6549. # func_len string
  6550. # STRING may not start with a hyphen.
  6551. func_len ()
  6552. {
  6553. func_len_result=${#1}
  6554. }
  6555. _LT_EOF
  6556. ;;
  6557. *) # Bourne compatible functions.
  6558. cat << \_LT_EOF >> "$cfgfile"
  6559. # func_dirname file append nondir_replacement
  6560. # Compute the dirname of FILE. If nonempty, add APPEND to the result,
  6561. # otherwise set result to NONDIR_REPLACEMENT.
  6562. func_dirname ()
  6563. {
  6564. # Extract subdirectory from the argument.
  6565. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
  6566. if test "X$func_dirname_result" = "X${1}"; then
  6567. func_dirname_result="${3}"
  6568. else
  6569. func_dirname_result="$func_dirname_result${2}"
  6570. fi
  6571. }
  6572. # func_basename file
  6573. func_basename ()
  6574. {
  6575. func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
  6576. }
  6577. dnl func_dirname_and_basename
  6578. dnl A portable version of this function is already defined in general.m4sh
  6579. dnl so there is no need for it here.
  6580. # func_stripname prefix suffix name
  6581. # strip PREFIX and SUFFIX off of NAME.
  6582. # PREFIX and SUFFIX must not contain globbing or regex special
  6583. # characters, hashes, percent signs, but SUFFIX may contain a leading
  6584. # dot (in which case that matches only a dot).
  6585. # func_strip_suffix prefix name
  6586. func_stripname ()
  6587. {
  6588. case ${2} in
  6589. .*) func_stripname_result=`$ECHO "X${3}" \
  6590. | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
  6591. *) func_stripname_result=`$ECHO "X${3}" \
  6592. | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
  6593. esac
  6594. }
  6595. # sed scripts:
  6596. my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
  6597. my_sed_long_arg='1s/^-[[^=]]*=//'
  6598. # func_opt_split
  6599. func_opt_split ()
  6600. {
  6601. func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
  6602. func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
  6603. }
  6604. # func_lo2o object
  6605. func_lo2o ()
  6606. {
  6607. func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
  6608. }
  6609. # func_xform libobj-or-source
  6610. func_xform ()
  6611. {
  6612. func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
  6613. }
  6614. # func_arith arithmetic-term...
  6615. func_arith ()
  6616. {
  6617. func_arith_result=`expr "$[@]"`
  6618. }
  6619. # func_len string
  6620. # STRING may not start with a hyphen.
  6621. func_len ()
  6622. {
  6623. func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
  6624. }
  6625. _LT_EOF
  6626. esac
  6627. case $lt_shell_append in
  6628. yes)
  6629. cat << \_LT_EOF >> "$cfgfile"
  6630. # func_append var value
  6631. # Append VALUE to the end of shell variable VAR.
  6632. func_append ()
  6633. {
  6634. eval "$[1]+=\$[2]"
  6635. }
  6636. _LT_EOF
  6637. ;;
  6638. *)
  6639. cat << \_LT_EOF >> "$cfgfile"
  6640. # func_append var value
  6641. # Append VALUE to the end of shell variable VAR.
  6642. func_append ()
  6643. {
  6644. eval "$[1]=\$$[1]\$[2]"
  6645. }
  6646. _LT_EOF
  6647. ;;
  6648. esac
  6649. ])