libtool.m4 252 KB

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