aclocal.m4 376 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528
  1. # generated automatically by aclocal 1.15.1 -*- Autoconf -*-
  2. # Copyright (C) 1996-2017 Free Software Foundation, Inc.
  3. # This file is free software; the Free Software Foundation
  4. # gives unlimited permission to copy and/or distribute it,
  5. # with or without modifications, as long as this notice is preserved.
  6. # This program is distributed in the hope that it will be useful,
  7. # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  8. # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  9. # PARTICULAR PURPOSE.
  10. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
  11. m4_ifndef([AC_AUTOCONF_VERSION],
  12. [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
  13. m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
  14. [m4_warning([this file was generated for autoconf 2.69.
  15. You have another version of autoconf. It may work, but is not guaranteed to.
  16. If you have problems, you may need to regenerate the build system entirely.
  17. To do so, use the procedure documented by the package, typically 'autoreconf'.])])
  18. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
  19. #
  20. # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
  21. # Written by Gordon Matzigkeit, 1996
  22. #
  23. # This file is free software; the Free Software Foundation gives
  24. # unlimited permission to copy and/or distribute it, with or without
  25. # modifications, as long as this notice is preserved.
  26. m4_define([_LT_COPYING], [dnl
  27. # Copyright (C) 2014 Free Software Foundation, Inc.
  28. # This is free software; see the source for copying conditions. There is NO
  29. # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  30. # GNU Libtool is free software; you can redistribute it and/or modify
  31. # it under the terms of the GNU General Public License as published by
  32. # the Free Software Foundation; either version 2 of of the License, or
  33. # (at your option) any later version.
  34. #
  35. # As a special exception to the GNU General Public License, if you
  36. # distribute this file as part of a program or library that is built
  37. # using GNU Libtool, you may include this file under the same
  38. # distribution terms that you use for the rest of that program.
  39. #
  40. # GNU Libtool is distributed in the hope that it will be useful, but
  41. # WITHOUT ANY WARRANTY; without even the implied warranty of
  42. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  43. # GNU General Public License for more details.
  44. #
  45. # You should have received a copy of the GNU General Public License
  46. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  47. ])
  48. # serial 58 LT_INIT
  49. # LT_PREREQ(VERSION)
  50. # ------------------
  51. # Complain and exit if this libtool version is less that VERSION.
  52. m4_defun([LT_PREREQ],
  53. [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
  54. [m4_default([$3],
  55. [m4_fatal([Libtool version $1 or higher is required],
  56. 63)])],
  57. [$2])])
  58. # _LT_CHECK_BUILDDIR
  59. # ------------------
  60. # Complain if the absolute build directory name contains unusual characters
  61. m4_defun([_LT_CHECK_BUILDDIR],
  62. [case `pwd` in
  63. *\ * | *\ *)
  64. AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
  65. esac
  66. ])
  67. # LT_INIT([OPTIONS])
  68. # ------------------
  69. AC_DEFUN([LT_INIT],
  70. [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
  71. AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  72. AC_BEFORE([$0], [LT_LANG])dnl
  73. AC_BEFORE([$0], [LT_OUTPUT])dnl
  74. AC_BEFORE([$0], [LTDL_INIT])dnl
  75. m4_require([_LT_CHECK_BUILDDIR])dnl
  76. dnl Autoconf doesn't catch unexpanded LT_ macros by default:
  77. m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
  78. m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
  79. dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
  80. dnl unless we require an AC_DEFUNed macro:
  81. AC_REQUIRE([LTOPTIONS_VERSION])dnl
  82. AC_REQUIRE([LTSUGAR_VERSION])dnl
  83. AC_REQUIRE([LTVERSION_VERSION])dnl
  84. AC_REQUIRE([LTOBSOLETE_VERSION])dnl
  85. m4_require([_LT_PROG_LTMAIN])dnl
  86. _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
  87. dnl Parse OPTIONS
  88. _LT_SET_OPTIONS([$0], [$1])
  89. # This can be used to rebuild libtool when needed
  90. LIBTOOL_DEPS=$ltmain
  91. # Always use our own libtool.
  92. LIBTOOL='$(SHELL) $(top_builddir)/libtool'
  93. AC_SUBST(LIBTOOL)dnl
  94. _LT_SETUP
  95. # Only expand once:
  96. m4_define([LT_INIT])
  97. ])# LT_INIT
  98. # Old names:
  99. AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
  100. AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
  101. dnl aclocal-1.4 backwards compatibility:
  102. dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
  103. dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
  104. # _LT_PREPARE_CC_BASENAME
  105. # -----------------------
  106. m4_defun([_LT_PREPARE_CC_BASENAME], [
  107. # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
  108. func_cc_basename ()
  109. {
  110. for cc_temp in @S|@*""; do
  111. case $cc_temp in
  112. compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
  113. distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
  114. \-*) ;;
  115. *) break;;
  116. esac
  117. done
  118. func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
  119. }
  120. ])# _LT_PREPARE_CC_BASENAME
  121. # _LT_CC_BASENAME(CC)
  122. # -------------------
  123. # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
  124. # but that macro is also expanded into generated libtool script, which
  125. # arranges for $SED and $ECHO to be set by different means.
  126. m4_defun([_LT_CC_BASENAME],
  127. [m4_require([_LT_PREPARE_CC_BASENAME])dnl
  128. AC_REQUIRE([_LT_DECL_SED])dnl
  129. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
  130. func_cc_basename $1
  131. cc_basename=$func_cc_basename_result
  132. ])
  133. # _LT_FILEUTILS_DEFAULTS
  134. # ----------------------
  135. # It is okay to use these file commands and assume they have been set
  136. # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
  137. m4_defun([_LT_FILEUTILS_DEFAULTS],
  138. [: ${CP="cp -f"}
  139. : ${MV="mv -f"}
  140. : ${RM="rm -f"}
  141. ])# _LT_FILEUTILS_DEFAULTS
  142. # _LT_SETUP
  143. # ---------
  144. m4_defun([_LT_SETUP],
  145. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  146. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  147. AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
  148. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
  149. _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
  150. dnl
  151. _LT_DECL([], [host_alias], [0], [The host system])dnl
  152. _LT_DECL([], [host], [0])dnl
  153. _LT_DECL([], [host_os], [0])dnl
  154. dnl
  155. _LT_DECL([], [build_alias], [0], [The build system])dnl
  156. _LT_DECL([], [build], [0])dnl
  157. _LT_DECL([], [build_os], [0])dnl
  158. dnl
  159. AC_REQUIRE([AC_PROG_CC])dnl
  160. AC_REQUIRE([LT_PATH_LD])dnl
  161. AC_REQUIRE([LT_PATH_NM])dnl
  162. dnl
  163. AC_REQUIRE([AC_PROG_LN_S])dnl
  164. test -z "$LN_S" && LN_S="ln -s"
  165. _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
  166. dnl
  167. AC_REQUIRE([LT_CMD_MAX_LEN])dnl
  168. _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
  169. _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
  170. dnl
  171. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  172. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  173. m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
  174. m4_require([_LT_CMD_RELOAD])dnl
  175. m4_require([_LT_CHECK_MAGIC_METHOD])dnl
  176. m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
  177. m4_require([_LT_CMD_OLD_ARCHIVE])dnl
  178. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  179. m4_require([_LT_WITH_SYSROOT])dnl
  180. m4_require([_LT_CMD_TRUNCATE])dnl
  181. _LT_CONFIG_LIBTOOL_INIT([
  182. # See if we are running on zsh, and set the options that allow our
  183. # commands through without removal of \ escapes INIT.
  184. if test -n "\${ZSH_VERSION+set}"; then
  185. setopt NO_GLOB_SUBST
  186. fi
  187. ])
  188. if test -n "${ZSH_VERSION+set}"; then
  189. setopt NO_GLOB_SUBST
  190. fi
  191. _LT_CHECK_OBJDIR
  192. m4_require([_LT_TAG_COMPILER])dnl
  193. case $host_os in
  194. aix3*)
  195. # AIX sometimes has problems with the GCC collect2 program. For some
  196. # reason, if we set the COLLECT_NAMES environment variable, the problems
  197. # vanish in a puff of smoke.
  198. if test set != "${COLLECT_NAMES+set}"; then
  199. COLLECT_NAMES=
  200. export COLLECT_NAMES
  201. fi
  202. ;;
  203. esac
  204. # Global variables:
  205. ofile=libtool
  206. can_build_shared=yes
  207. # All known linkers require a '.a' archive for static linking (except MSVC,
  208. # which needs '.lib').
  209. libext=a
  210. with_gnu_ld=$lt_cv_prog_gnu_ld
  211. old_CC=$CC
  212. old_CFLAGS=$CFLAGS
  213. # Set sane defaults for various variables
  214. test -z "$CC" && CC=cc
  215. test -z "$LTCC" && LTCC=$CC
  216. test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
  217. test -z "$LD" && LD=ld
  218. test -z "$ac_objext" && ac_objext=o
  219. _LT_CC_BASENAME([$compiler])
  220. # Only perform the check for file, if the check method requires it
  221. test -z "$MAGIC_CMD" && MAGIC_CMD=file
  222. case $deplibs_check_method in
  223. file_magic*)
  224. if test "$file_magic_cmd" = '$MAGIC_CMD'; then
  225. _LT_PATH_MAGIC
  226. fi
  227. ;;
  228. esac
  229. # Use C for the default configuration in the libtool script
  230. LT_SUPPORTED_TAG([CC])
  231. _LT_LANG_C_CONFIG
  232. _LT_LANG_DEFAULT_CONFIG
  233. _LT_CONFIG_COMMANDS
  234. ])# _LT_SETUP
  235. # _LT_PREPARE_SED_QUOTE_VARS
  236. # --------------------------
  237. # Define a few sed substitution that help us do robust quoting.
  238. m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
  239. [# Backslashify metacharacters that are still active within
  240. # double-quoted strings.
  241. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
  242. # Same as above, but do not quote variable references.
  243. double_quote_subst='s/\([["`\\]]\)/\\\1/g'
  244. # Sed substitution to delay expansion of an escaped shell variable in a
  245. # double_quote_subst'ed string.
  246. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
  247. # Sed substitution to delay expansion of an escaped single quote.
  248. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
  249. # Sed substitution to avoid accidental globbing in evaled expressions
  250. no_glob_subst='s/\*/\\\*/g'
  251. ])
  252. # _LT_PROG_LTMAIN
  253. # ---------------
  254. # Note that this code is called both from 'configure', and 'config.status'
  255. # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
  256. # 'config.status' has no value for ac_aux_dir unless we are using Automake,
  257. # so we pass a copy along to make sure it has a sensible value anyway.
  258. m4_defun([_LT_PROG_LTMAIN],
  259. [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
  260. _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
  261. ltmain=$ac_aux_dir/ltmain.sh
  262. ])# _LT_PROG_LTMAIN
  263. # So that we can recreate a full libtool script including additional
  264. # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
  265. # in macros and then make a single call at the end using the 'libtool'
  266. # label.
  267. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
  268. # ----------------------------------------
  269. # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  270. m4_define([_LT_CONFIG_LIBTOOL_INIT],
  271. [m4_ifval([$1],
  272. [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
  273. [$1
  274. ])])])
  275. # Initialize.
  276. m4_define([_LT_OUTPUT_LIBTOOL_INIT])
  277. # _LT_CONFIG_LIBTOOL([COMMANDS])
  278. # ------------------------------
  279. # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  280. m4_define([_LT_CONFIG_LIBTOOL],
  281. [m4_ifval([$1],
  282. [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
  283. [$1
  284. ])])])
  285. # Initialize.
  286. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
  287. # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
  288. # -----------------------------------------------------
  289. m4_defun([_LT_CONFIG_SAVE_COMMANDS],
  290. [_LT_CONFIG_LIBTOOL([$1])
  291. _LT_CONFIG_LIBTOOL_INIT([$2])
  292. ])
  293. # _LT_FORMAT_COMMENT([COMMENT])
  294. # -----------------------------
  295. # Add leading comment marks to the start of each line, and a trailing
  296. # full-stop to the whole comment if one is not present already.
  297. m4_define([_LT_FORMAT_COMMENT],
  298. [m4_ifval([$1], [
  299. m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
  300. [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
  301. )])
  302. # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
  303. # -------------------------------------------------------------------
  304. # CONFIGNAME is the name given to the value in the libtool script.
  305. # VARNAME is the (base) name used in the configure script.
  306. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
  307. # VARNAME. Any other value will be used directly.
  308. m4_define([_LT_DECL],
  309. [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
  310. [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
  311. [m4_ifval([$1], [$1], [$2])])
  312. lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
  313. m4_ifval([$4],
  314. [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
  315. lt_dict_add_subkey([lt_decl_dict], [$2],
  316. [tagged?], [m4_ifval([$5], [yes], [no])])])
  317. ])
  318. # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
  319. # --------------------------------------------------------
  320. m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
  321. # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
  322. # ------------------------------------------------
  323. m4_define([lt_decl_tag_varnames],
  324. [_lt_decl_filter([tagged?], [yes], $@)])
  325. # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
  326. # ---------------------------------------------------------
  327. m4_define([_lt_decl_filter],
  328. [m4_case([$#],
  329. [0], [m4_fatal([$0: too few arguments: $#])],
  330. [1], [m4_fatal([$0: too few arguments: $#: $1])],
  331. [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
  332. [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
  333. [lt_dict_filter([lt_decl_dict], $@)])[]dnl
  334. ])
  335. # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
  336. # --------------------------------------------------
  337. m4_define([lt_decl_quote_varnames],
  338. [_lt_decl_filter([value], [1], $@)])
  339. # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
  340. # ---------------------------------------------------
  341. m4_define([lt_decl_dquote_varnames],
  342. [_lt_decl_filter([value], [2], $@)])
  343. # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
  344. # ---------------------------------------------------
  345. m4_define([lt_decl_varnames_tagged],
  346. [m4_assert([$# <= 2])dnl
  347. _$0(m4_quote(m4_default([$1], [[, ]])),
  348. m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
  349. m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
  350. m4_define([_lt_decl_varnames_tagged],
  351. [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
  352. # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
  353. # ------------------------------------------------
  354. m4_define([lt_decl_all_varnames],
  355. [_$0(m4_quote(m4_default([$1], [[, ]])),
  356. m4_if([$2], [],
  357. m4_quote(lt_decl_varnames),
  358. m4_quote(m4_shift($@))))[]dnl
  359. ])
  360. m4_define([_lt_decl_all_varnames],
  361. [lt_join($@, lt_decl_varnames_tagged([$1],
  362. lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
  363. ])
  364. # _LT_CONFIG_STATUS_DECLARE([VARNAME])
  365. # ------------------------------------
  366. # Quote a variable value, and forward it to 'config.status' so that its
  367. # declaration there will have the same value as in 'configure'. VARNAME
  368. # must have a single quote delimited value for this to work.
  369. m4_define([_LT_CONFIG_STATUS_DECLARE],
  370. [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
  371. # _LT_CONFIG_STATUS_DECLARATIONS
  372. # ------------------------------
  373. # We delimit libtool config variables with single quotes, so when
  374. # we write them to config.status, we have to be sure to quote all
  375. # embedded single quotes properly. In configure, this macro expands
  376. # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
  377. #
  378. # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
  379. m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
  380. [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
  381. [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
  382. # _LT_LIBTOOL_TAGS
  383. # ----------------
  384. # Output comment and list of tags supported by the script
  385. m4_defun([_LT_LIBTOOL_TAGS],
  386. [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
  387. available_tags='_LT_TAGS'dnl
  388. ])
  389. # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
  390. # -----------------------------------
  391. # Extract the dictionary values for VARNAME (optionally with TAG) and
  392. # expand to a commented shell variable setting:
  393. #
  394. # # Some comment about what VAR is for.
  395. # visible_name=$lt_internal_name
  396. m4_define([_LT_LIBTOOL_DECLARE],
  397. [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
  398. [description])))[]dnl
  399. m4_pushdef([_libtool_name],
  400. m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
  401. m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
  402. [0], [_libtool_name=[$]$1],
  403. [1], [_libtool_name=$lt_[]$1],
  404. [2], [_libtool_name=$lt_[]$1],
  405. [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
  406. m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
  407. ])
  408. # _LT_LIBTOOL_CONFIG_VARS
  409. # -----------------------
  410. # Produce commented declarations of non-tagged libtool config variables
  411. # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
  412. # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
  413. # section) are produced by _LT_LIBTOOL_TAG_VARS.
  414. m4_defun([_LT_LIBTOOL_CONFIG_VARS],
  415. [m4_foreach([_lt_var],
  416. m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
  417. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
  418. # _LT_LIBTOOL_TAG_VARS(TAG)
  419. # -------------------------
  420. m4_define([_LT_LIBTOOL_TAG_VARS],
  421. [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
  422. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
  423. # _LT_TAGVAR(VARNAME, [TAGNAME])
  424. # ------------------------------
  425. m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
  426. # _LT_CONFIG_COMMANDS
  427. # -------------------
  428. # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
  429. # variables for single and double quote escaping we saved from calls
  430. # to _LT_DECL, we can put quote escaped variables declarations
  431. # into 'config.status', and then the shell code to quote escape them in
  432. # for loops in 'config.status'. Finally, any additional code accumulated
  433. # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
  434. m4_defun([_LT_CONFIG_COMMANDS],
  435. [AC_PROVIDE_IFELSE([LT_OUTPUT],
  436. dnl If the libtool generation code has been placed in $CONFIG_LT,
  437. dnl instead of duplicating it all over again into config.status,
  438. dnl then we will have config.status run $CONFIG_LT later, so it
  439. dnl needs to know what name is stored there:
  440. [AC_CONFIG_COMMANDS([libtool],
  441. [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
  442. dnl If the libtool generation code is destined for config.status,
  443. dnl expand the accumulated commands and init code now:
  444. [AC_CONFIG_COMMANDS([libtool],
  445. [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
  446. ])#_LT_CONFIG_COMMANDS
  447. # Initialize.
  448. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
  449. [
  450. # The HP-UX ksh and POSIX shell print the target directory to stdout
  451. # if CDPATH is set.
  452. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  453. sed_quote_subst='$sed_quote_subst'
  454. double_quote_subst='$double_quote_subst'
  455. delay_variable_subst='$delay_variable_subst'
  456. _LT_CONFIG_STATUS_DECLARATIONS
  457. LTCC='$LTCC'
  458. LTCFLAGS='$LTCFLAGS'
  459. compiler='$compiler_DEFAULT'
  460. # A function that is used when there is no print builtin or printf.
  461. func_fallback_echo ()
  462. {
  463. eval 'cat <<_LTECHO_EOF
  464. \$[]1
  465. _LTECHO_EOF'
  466. }
  467. # Quote evaled strings.
  468. for var in lt_decl_all_varnames([[ \
  469. ]], lt_decl_quote_varnames); do
  470. case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  471. *[[\\\\\\\`\\"\\\$]]*)
  472. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
  473. ;;
  474. *)
  475. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  476. ;;
  477. esac
  478. done
  479. # Double-quote double-evaled strings.
  480. for var in lt_decl_all_varnames([[ \
  481. ]], lt_decl_dquote_varnames); do
  482. case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  483. *[[\\\\\\\`\\"\\\$]]*)
  484. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
  485. ;;
  486. *)
  487. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  488. ;;
  489. esac
  490. done
  491. _LT_OUTPUT_LIBTOOL_INIT
  492. ])
  493. # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
  494. # ------------------------------------
  495. # Generate a child script FILE with all initialization necessary to
  496. # reuse the environment learned by the parent script, and make the
  497. # file executable. If COMMENT is supplied, it is inserted after the
  498. # '#!' sequence but before initialization text begins. After this
  499. # macro, additional text can be appended to FILE to form the body of
  500. # the child script. The macro ends with non-zero status if the
  501. # file could not be fully written (such as if the disk is full).
  502. m4_ifdef([AS_INIT_GENERATED],
  503. [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
  504. [m4_defun([_LT_GENERATED_FILE_INIT],
  505. [m4_require([AS_PREPARE])]dnl
  506. [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
  507. [lt_write_fail=0
  508. cat >$1 <<_ASEOF || lt_write_fail=1
  509. #! $SHELL
  510. # Generated by $as_me.
  511. $2
  512. SHELL=\${CONFIG_SHELL-$SHELL}
  513. export SHELL
  514. _ASEOF
  515. cat >>$1 <<\_ASEOF || lt_write_fail=1
  516. AS_SHELL_SANITIZE
  517. _AS_PREPARE
  518. exec AS_MESSAGE_FD>&1
  519. _ASEOF
  520. test 0 = "$lt_write_fail" && chmod +x $1[]dnl
  521. m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
  522. # LT_OUTPUT
  523. # ---------
  524. # This macro allows early generation of the libtool script (before
  525. # AC_OUTPUT is called), incase it is used in configure for compilation
  526. # tests.
  527. AC_DEFUN([LT_OUTPUT],
  528. [: ${CONFIG_LT=./config.lt}
  529. AC_MSG_NOTICE([creating $CONFIG_LT])
  530. _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
  531. [# Run this file to recreate a libtool stub with the current configuration.])
  532. cat >>"$CONFIG_LT" <<\_LTEOF
  533. lt_cl_silent=false
  534. exec AS_MESSAGE_LOG_FD>>config.log
  535. {
  536. echo
  537. AS_BOX([Running $as_me.])
  538. } >&AS_MESSAGE_LOG_FD
  539. lt_cl_help="\
  540. '$as_me' creates a local libtool stub from the current configuration,
  541. for use in further configure time tests before the real libtool is
  542. generated.
  543. Usage: $[0] [[OPTIONS]]
  544. -h, --help print this help, then exit
  545. -V, --version print version number, then exit
  546. -q, --quiet do not print progress messages
  547. -d, --debug don't remove temporary files
  548. Report bugs to <bug-libtool@gnu.org>."
  549. lt_cl_version="\
  550. m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
  551. m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
  552. configured by $[0], generated by m4_PACKAGE_STRING.
  553. Copyright (C) 2011 Free Software Foundation, Inc.
  554. This config.lt script is free software; the Free Software Foundation
  555. gives unlimited permision to copy, distribute and modify it."
  556. while test 0 != $[#]
  557. do
  558. case $[1] in
  559. --version | --v* | -V )
  560. echo "$lt_cl_version"; exit 0 ;;
  561. --help | --h* | -h )
  562. echo "$lt_cl_help"; exit 0 ;;
  563. --debug | --d* | -d )
  564. debug=: ;;
  565. --quiet | --q* | --silent | --s* | -q )
  566. lt_cl_silent=: ;;
  567. -*) AC_MSG_ERROR([unrecognized option: $[1]
  568. Try '$[0] --help' for more information.]) ;;
  569. *) AC_MSG_ERROR([unrecognized argument: $[1]
  570. Try '$[0] --help' for more information.]) ;;
  571. esac
  572. shift
  573. done
  574. if $lt_cl_silent; then
  575. exec AS_MESSAGE_FD>/dev/null
  576. fi
  577. _LTEOF
  578. cat >>"$CONFIG_LT" <<_LTEOF
  579. _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
  580. _LTEOF
  581. cat >>"$CONFIG_LT" <<\_LTEOF
  582. AC_MSG_NOTICE([creating $ofile])
  583. _LT_OUTPUT_LIBTOOL_COMMANDS
  584. AS_EXIT(0)
  585. _LTEOF
  586. chmod +x "$CONFIG_LT"
  587. # configure is writing to config.log, but config.lt does its own redirection,
  588. # appending to config.log, which fails on DOS, as config.log is still kept
  589. # open by configure. Here we exec the FD to /dev/null, effectively closing
  590. # config.log, so it can be properly (re)opened and appended to by config.lt.
  591. lt_cl_success=:
  592. test yes = "$silent" &&
  593. lt_config_lt_args="$lt_config_lt_args --quiet"
  594. exec AS_MESSAGE_LOG_FD>/dev/null
  595. $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
  596. exec AS_MESSAGE_LOG_FD>>config.log
  597. $lt_cl_success || AS_EXIT(1)
  598. ])# LT_OUTPUT
  599. # _LT_CONFIG(TAG)
  600. # ---------------
  601. # If TAG is the built-in tag, create an initial libtool script with a
  602. # default configuration from the untagged config vars. Otherwise add code
  603. # to config.status for appending the configuration named by TAG from the
  604. # matching tagged config vars.
  605. m4_defun([_LT_CONFIG],
  606. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  607. _LT_CONFIG_SAVE_COMMANDS([
  608. m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
  609. m4_if(_LT_TAG, [C], [
  610. # See if we are running on zsh, and set the options that allow our
  611. # commands through without removal of \ escapes.
  612. if test -n "${ZSH_VERSION+set}"; then
  613. setopt NO_GLOB_SUBST
  614. fi
  615. cfgfile=${ofile}T
  616. trap "$RM \"$cfgfile\"; exit 1" 1 2 15
  617. $RM "$cfgfile"
  618. cat <<_LT_EOF >> "$cfgfile"
  619. #! $SHELL
  620. # Generated automatically by $as_me ($PACKAGE) $VERSION
  621. # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  622. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  623. # Provide generalized library-building support services.
  624. # Written by Gordon Matzigkeit, 1996
  625. _LT_COPYING
  626. _LT_LIBTOOL_TAGS
  627. # Configured defaults for sys_lib_dlsearch_path munging.
  628. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
  629. # ### BEGIN LIBTOOL CONFIG
  630. _LT_LIBTOOL_CONFIG_VARS
  631. _LT_LIBTOOL_TAG_VARS
  632. # ### END LIBTOOL CONFIG
  633. _LT_EOF
  634. cat <<'_LT_EOF' >> "$cfgfile"
  635. # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
  636. _LT_PREPARE_MUNGE_PATH_LIST
  637. _LT_PREPARE_CC_BASENAME
  638. # ### END FUNCTIONS SHARED WITH CONFIGURE
  639. _LT_EOF
  640. case $host_os in
  641. aix3*)
  642. cat <<\_LT_EOF >> "$cfgfile"
  643. # AIX sometimes has problems with the GCC collect2 program. For some
  644. # reason, if we set the COLLECT_NAMES environment variable, the problems
  645. # vanish in a puff of smoke.
  646. if test set != "${COLLECT_NAMES+set}"; then
  647. COLLECT_NAMES=
  648. export COLLECT_NAMES
  649. fi
  650. _LT_EOF
  651. ;;
  652. esac
  653. _LT_PROG_LTMAIN
  654. # We use sed instead of cat because bash on DJGPP gets confused if
  655. # if finds mixed CR/LF and LF-only lines. Since sed operates in
  656. # text mode, it properly converts lines to CR/LF. This bash problem
  657. # is reportedly fixed, but why not run on old versions too?
  658. sed '$q' "$ltmain" >> "$cfgfile" \
  659. || (rm -f "$cfgfile"; exit 1)
  660. mv -f "$cfgfile" "$ofile" ||
  661. (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
  662. chmod +x "$ofile"
  663. ],
  664. [cat <<_LT_EOF >> "$ofile"
  665. dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
  666. dnl in a comment (ie after a #).
  667. # ### BEGIN LIBTOOL TAG CONFIG: $1
  668. _LT_LIBTOOL_TAG_VARS(_LT_TAG)
  669. # ### END LIBTOOL TAG CONFIG: $1
  670. _LT_EOF
  671. ])dnl /m4_if
  672. ],
  673. [m4_if([$1], [], [
  674. PACKAGE='$PACKAGE'
  675. VERSION='$VERSION'
  676. RM='$RM'
  677. ofile='$ofile'], [])
  678. ])dnl /_LT_CONFIG_SAVE_COMMANDS
  679. ])# _LT_CONFIG
  680. # LT_SUPPORTED_TAG(TAG)
  681. # ---------------------
  682. # Trace this macro to discover what tags are supported by the libtool
  683. # --tag option, using:
  684. # autoconf --trace 'LT_SUPPORTED_TAG:$1'
  685. AC_DEFUN([LT_SUPPORTED_TAG], [])
  686. # C support is built-in for now
  687. m4_define([_LT_LANG_C_enabled], [])
  688. m4_define([_LT_TAGS], [])
  689. # LT_LANG(LANG)
  690. # -------------
  691. # Enable libtool support for the given language if not already enabled.
  692. AC_DEFUN([LT_LANG],
  693. [AC_BEFORE([$0], [LT_OUTPUT])dnl
  694. m4_case([$1],
  695. [C], [_LT_LANG(C)],
  696. [C++], [_LT_LANG(CXX)],
  697. [Go], [_LT_LANG(GO)],
  698. [Java], [_LT_LANG(GCJ)],
  699. [Fortran 77], [_LT_LANG(F77)],
  700. [Fortran], [_LT_LANG(FC)],
  701. [Windows Resource], [_LT_LANG(RC)],
  702. [m4_ifdef([_LT_LANG_]$1[_CONFIG],
  703. [_LT_LANG($1)],
  704. [m4_fatal([$0: unsupported language: "$1"])])])dnl
  705. ])# LT_LANG
  706. # _LT_LANG(LANGNAME)
  707. # ------------------
  708. m4_defun([_LT_LANG],
  709. [m4_ifdef([_LT_LANG_]$1[_enabled], [],
  710. [LT_SUPPORTED_TAG([$1])dnl
  711. m4_append([_LT_TAGS], [$1 ])dnl
  712. m4_define([_LT_LANG_]$1[_enabled], [])dnl
  713. _LT_LANG_$1_CONFIG($1)])dnl
  714. ])# _LT_LANG
  715. m4_ifndef([AC_PROG_GO], [
  716. # NOTE: This macro has been submitted for inclusion into #
  717. # GNU Autoconf as AC_PROG_GO. When it is available in #
  718. # a released version of Autoconf we should remove this #
  719. # macro and use it instead. #
  720. m4_defun([AC_PROG_GO],
  721. [AC_LANG_PUSH(Go)dnl
  722. AC_ARG_VAR([GOC], [Go compiler command])dnl
  723. AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
  724. _AC_ARG_VAR_LDFLAGS()dnl
  725. AC_CHECK_TOOL(GOC, gccgo)
  726. if test -z "$GOC"; then
  727. if test -n "$ac_tool_prefix"; then
  728. AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
  729. fi
  730. fi
  731. if test -z "$GOC"; then
  732. AC_CHECK_PROG(GOC, gccgo, gccgo, false)
  733. fi
  734. ])#m4_defun
  735. ])#m4_ifndef
  736. # _LT_LANG_DEFAULT_CONFIG
  737. # -----------------------
  738. m4_defun([_LT_LANG_DEFAULT_CONFIG],
  739. [AC_PROVIDE_IFELSE([AC_PROG_CXX],
  740. [LT_LANG(CXX)],
  741. [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
  742. AC_PROVIDE_IFELSE([AC_PROG_F77],
  743. [LT_LANG(F77)],
  744. [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
  745. AC_PROVIDE_IFELSE([AC_PROG_FC],
  746. [LT_LANG(FC)],
  747. [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
  748. dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
  749. dnl pulling things in needlessly.
  750. AC_PROVIDE_IFELSE([AC_PROG_GCJ],
  751. [LT_LANG(GCJ)],
  752. [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
  753. [LT_LANG(GCJ)],
  754. [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
  755. [LT_LANG(GCJ)],
  756. [m4_ifdef([AC_PROG_GCJ],
  757. [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
  758. m4_ifdef([A][M_PROG_GCJ],
  759. [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
  760. m4_ifdef([LT_PROG_GCJ],
  761. [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
  762. AC_PROVIDE_IFELSE([AC_PROG_GO],
  763. [LT_LANG(GO)],
  764. [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
  765. AC_PROVIDE_IFELSE([LT_PROG_RC],
  766. [LT_LANG(RC)],
  767. [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
  768. ])# _LT_LANG_DEFAULT_CONFIG
  769. # Obsolete macros:
  770. AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
  771. AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
  772. AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
  773. AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
  774. AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
  775. dnl aclocal-1.4 backwards compatibility:
  776. dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
  777. dnl AC_DEFUN([AC_LIBTOOL_F77], [])
  778. dnl AC_DEFUN([AC_LIBTOOL_FC], [])
  779. dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
  780. dnl AC_DEFUN([AC_LIBTOOL_RC], [])
  781. # _LT_TAG_COMPILER
  782. # ----------------
  783. m4_defun([_LT_TAG_COMPILER],
  784. [AC_REQUIRE([AC_PROG_CC])dnl
  785. _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
  786. _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
  787. _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
  788. _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
  789. # If no C compiler was specified, use CC.
  790. LTCC=${LTCC-"$CC"}
  791. # If no C compiler flags were specified, use CFLAGS.
  792. LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
  793. # Allow CC to be a program name with arguments.
  794. compiler=$CC
  795. ])# _LT_TAG_COMPILER
  796. # _LT_COMPILER_BOILERPLATE
  797. # ------------------------
  798. # Check for compiler boilerplate output or warnings with
  799. # the simple compiler test code.
  800. m4_defun([_LT_COMPILER_BOILERPLATE],
  801. [m4_require([_LT_DECL_SED])dnl
  802. ac_outfile=conftest.$ac_objext
  803. echo "$lt_simple_compile_test_code" >conftest.$ac_ext
  804. eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  805. _lt_compiler_boilerplate=`cat conftest.err`
  806. $RM conftest*
  807. ])# _LT_COMPILER_BOILERPLATE
  808. # _LT_LINKER_BOILERPLATE
  809. # ----------------------
  810. # Check for linker boilerplate output or warnings with
  811. # the simple link test code.
  812. m4_defun([_LT_LINKER_BOILERPLATE],
  813. [m4_require([_LT_DECL_SED])dnl
  814. ac_outfile=conftest.$ac_objext
  815. echo "$lt_simple_link_test_code" >conftest.$ac_ext
  816. eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  817. _lt_linker_boilerplate=`cat conftest.err`
  818. $RM -r conftest*
  819. ])# _LT_LINKER_BOILERPLATE
  820. # _LT_REQUIRED_DARWIN_CHECKS
  821. # -------------------------
  822. m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
  823. case $host_os in
  824. rhapsody* | darwin*)
  825. AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
  826. AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
  827. AC_CHECK_TOOL([LIPO], [lipo], [:])
  828. AC_CHECK_TOOL([OTOOL], [otool], [:])
  829. AC_CHECK_TOOL([OTOOL64], [otool64], [:])
  830. _LT_DECL([], [DSYMUTIL], [1],
  831. [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
  832. _LT_DECL([], [NMEDIT], [1],
  833. [Tool to change global to local symbols on Mac OS X])
  834. _LT_DECL([], [LIPO], [1],
  835. [Tool to manipulate fat objects and archives on Mac OS X])
  836. _LT_DECL([], [OTOOL], [1],
  837. [ldd/readelf like tool for Mach-O binaries on Mac OS X])
  838. _LT_DECL([], [OTOOL64], [1],
  839. [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
  840. AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
  841. [lt_cv_apple_cc_single_mod=no
  842. if test -z "$LT_MULTI_MODULE"; then
  843. # By default we will add the -single_module flag. You can override
  844. # by either setting the environment variable LT_MULTI_MODULE
  845. # non-empty at configure time, or by adding -multi_module to the
  846. # link flags.
  847. rm -rf libconftest.dylib*
  848. echo "int foo(void){return 1;}" > conftest.c
  849. echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  850. -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
  851. $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  852. -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
  853. _lt_result=$?
  854. # If there is a non-empty error log, and "single_module"
  855. # appears in it, assume the flag caused a linker warning
  856. if test -s conftest.err && $GREP single_module conftest.err; then
  857. cat conftest.err >&AS_MESSAGE_LOG_FD
  858. # Otherwise, if the output was created with a 0 exit code from
  859. # the compiler, it worked.
  860. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
  861. lt_cv_apple_cc_single_mod=yes
  862. else
  863. cat conftest.err >&AS_MESSAGE_LOG_FD
  864. fi
  865. rm -rf libconftest.dylib*
  866. rm -f conftest.*
  867. fi])
  868. AC_CACHE_CHECK([for -exported_symbols_list linker flag],
  869. [lt_cv_ld_exported_symbols_list],
  870. [lt_cv_ld_exported_symbols_list=no
  871. save_LDFLAGS=$LDFLAGS
  872. echo "_main" > conftest.sym
  873. LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
  874. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  875. [lt_cv_ld_exported_symbols_list=yes],
  876. [lt_cv_ld_exported_symbols_list=no])
  877. LDFLAGS=$save_LDFLAGS
  878. ])
  879. AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
  880. [lt_cv_ld_force_load=no
  881. cat > conftest.c << _LT_EOF
  882. int forced_loaded() { return 2;}
  883. _LT_EOF
  884. echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
  885. $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
  886. echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
  887. $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
  888. echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
  889. $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
  890. cat > conftest.c << _LT_EOF
  891. int main() { return 0;}
  892. _LT_EOF
  893. echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
  894. $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
  895. _lt_result=$?
  896. if test -s conftest.err && $GREP force_load conftest.err; then
  897. cat conftest.err >&AS_MESSAGE_LOG_FD
  898. elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
  899. lt_cv_ld_force_load=yes
  900. else
  901. cat conftest.err >&AS_MESSAGE_LOG_FD
  902. fi
  903. rm -f conftest.err libconftest.a conftest conftest.c
  904. rm -rf conftest.dSYM
  905. ])
  906. case $host_os in
  907. rhapsody* | darwin1.[[012]])
  908. _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
  909. darwin1.*)
  910. _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
  911. darwin*) # darwin 5.x on
  912. # if running on 10.5 or later, the deployment target defaults
  913. # to the OS version, if on x86, and 10.4, the deployment
  914. # target defaults to 10.4. Don't you love it?
  915. case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
  916. 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
  917. _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
  918. 10.[[012]][[,.]]*)
  919. _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
  920. 10.*)
  921. _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
  922. esac
  923. ;;
  924. esac
  925. if test yes = "$lt_cv_apple_cc_single_mod"; then
  926. _lt_dar_single_mod='$single_module'
  927. fi
  928. if test yes = "$lt_cv_ld_exported_symbols_list"; then
  929. _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
  930. else
  931. _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
  932. fi
  933. if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
  934. _lt_dsymutil='~$DSYMUTIL $lib || :'
  935. else
  936. _lt_dsymutil=
  937. fi
  938. ;;
  939. esac
  940. ])
  941. # _LT_DARWIN_LINKER_FEATURES([TAG])
  942. # ---------------------------------
  943. # Checks for linker and compiler features on darwin
  944. m4_defun([_LT_DARWIN_LINKER_FEATURES],
  945. [
  946. m4_require([_LT_REQUIRED_DARWIN_CHECKS])
  947. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  948. _LT_TAGVAR(hardcode_direct, $1)=no
  949. _LT_TAGVAR(hardcode_automatic, $1)=yes
  950. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  951. if test yes = "$lt_cv_ld_force_load"; then
  952. _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
  953. m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
  954. [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
  955. else
  956. _LT_TAGVAR(whole_archive_flag_spec, $1)=''
  957. fi
  958. _LT_TAGVAR(link_all_deplibs, $1)=yes
  959. _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
  960. case $cc_basename in
  961. ifort*|nagfor*) _lt_dar_can_shared=yes ;;
  962. *) _lt_dar_can_shared=$GCC ;;
  963. esac
  964. if test yes = "$_lt_dar_can_shared"; then
  965. output_verbose_link_cmd=func_echo_all
  966. _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"
  967. _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
  968. _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"
  969. _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"
  970. m4_if([$1], [CXX],
  971. [ if test yes != "$lt_cv_apple_cc_single_mod"; then
  972. _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"
  973. _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"
  974. fi
  975. ],[])
  976. else
  977. _LT_TAGVAR(ld_shlibs, $1)=no
  978. fi
  979. ])
  980. # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
  981. # ----------------------------------
  982. # Links a minimal program and checks the executable
  983. # for the system default hardcoded library path. In most cases,
  984. # this is /usr/lib:/lib, but when the MPI compilers are used
  985. # the location of the communication and MPI libs are included too.
  986. # If we don't find anything, use the default library path according
  987. # to the aix ld manual.
  988. # Store the results from the different compilers for each TAGNAME.
  989. # Allow to override them for all tags through lt_cv_aix_libpath.
  990. m4_defun([_LT_SYS_MODULE_PATH_AIX],
  991. [m4_require([_LT_DECL_SED])dnl
  992. if test set = "${lt_cv_aix_libpath+set}"; then
  993. aix_libpath=$lt_cv_aix_libpath
  994. else
  995. AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
  996. [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
  997. lt_aix_libpath_sed='[
  998. /Import File Strings/,/^$/ {
  999. /^0/ {
  1000. s/^0 *\([^ ]*\) *$/\1/
  1001. p
  1002. }
  1003. }]'
  1004. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  1005. # Check for a 64-bit object if we didn't find anything.
  1006. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
  1007. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  1008. fi],[])
  1009. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
  1010. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
  1011. fi
  1012. ])
  1013. aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
  1014. fi
  1015. ])# _LT_SYS_MODULE_PATH_AIX
  1016. # _LT_SHELL_INIT(ARG)
  1017. # -------------------
  1018. m4_define([_LT_SHELL_INIT],
  1019. [m4_divert_text([M4SH-INIT], [$1
  1020. ])])# _LT_SHELL_INIT
  1021. # _LT_PROG_ECHO_BACKSLASH
  1022. # -----------------------
  1023. # Find how we can fake an echo command that does not interpret backslash.
  1024. # In particular, with Autoconf 2.60 or later we add some code to the start
  1025. # of the generated configure script that will find a shell with a builtin
  1026. # printf (that we can use as an echo command).
  1027. m4_defun([_LT_PROG_ECHO_BACKSLASH],
  1028. [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  1029. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  1030. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  1031. AC_MSG_CHECKING([how to print strings])
  1032. # Test print first, because it will be a builtin if present.
  1033. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
  1034. test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
  1035. ECHO='print -r --'
  1036. elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
  1037. ECHO='printf %s\n'
  1038. else
  1039. # Use this function as a fallback that always works.
  1040. func_fallback_echo ()
  1041. {
  1042. eval 'cat <<_LTECHO_EOF
  1043. $[]1
  1044. _LTECHO_EOF'
  1045. }
  1046. ECHO='func_fallback_echo'
  1047. fi
  1048. # func_echo_all arg...
  1049. # Invoke $ECHO with all args, space-separated.
  1050. func_echo_all ()
  1051. {
  1052. $ECHO "$*"
  1053. }
  1054. case $ECHO in
  1055. printf*) AC_MSG_RESULT([printf]) ;;
  1056. print*) AC_MSG_RESULT([print -r]) ;;
  1057. *) AC_MSG_RESULT([cat]) ;;
  1058. esac
  1059. m4_ifdef([_AS_DETECT_SUGGESTED],
  1060. [_AS_DETECT_SUGGESTED([
  1061. test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
  1062. ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  1063. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  1064. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  1065. PATH=/empty FPATH=/empty; export PATH FPATH
  1066. test "X`printf %s $ECHO`" = "X$ECHO" \
  1067. || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
  1068. _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
  1069. _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
  1070. ])# _LT_PROG_ECHO_BACKSLASH
  1071. # _LT_WITH_SYSROOT
  1072. # ----------------
  1073. AC_DEFUN([_LT_WITH_SYSROOT],
  1074. [AC_MSG_CHECKING([for sysroot])
  1075. AC_ARG_WITH([sysroot],
  1076. [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
  1077. [Search for dependent libraries within DIR (or the compiler's sysroot
  1078. if not specified).])],
  1079. [], [with_sysroot=no])
  1080. dnl lt_sysroot will always be passed unquoted. We quote it here
  1081. dnl in case the user passed a directory name.
  1082. lt_sysroot=
  1083. case $with_sysroot in #(
  1084. yes)
  1085. if test yes = "$GCC"; then
  1086. lt_sysroot=`$CC --print-sysroot 2>/dev/null`
  1087. fi
  1088. ;; #(
  1089. /*)
  1090. lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
  1091. ;; #(
  1092. no|'')
  1093. ;; #(
  1094. *)
  1095. AC_MSG_RESULT([$with_sysroot])
  1096. AC_MSG_ERROR([The sysroot must be an absolute path.])
  1097. ;;
  1098. esac
  1099. AC_MSG_RESULT([${lt_sysroot:-no}])
  1100. _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
  1101. [dependent libraries, and where our libraries should be installed.])])
  1102. # _LT_ENABLE_LOCK
  1103. # ---------------
  1104. m4_defun([_LT_ENABLE_LOCK],
  1105. [AC_ARG_ENABLE([libtool-lock],
  1106. [AS_HELP_STRING([--disable-libtool-lock],
  1107. [avoid locking (might break parallel builds)])])
  1108. test no = "$enable_libtool_lock" || enable_libtool_lock=yes
  1109. # Some flags need to be propagated to the compiler or linker for good
  1110. # libtool support.
  1111. case $host in
  1112. ia64-*-hpux*)
  1113. # Find out what ABI is being produced by ac_compile, and set mode
  1114. # options accordingly.
  1115. echo 'int i;' > conftest.$ac_ext
  1116. if AC_TRY_EVAL(ac_compile); then
  1117. case `/usr/bin/file conftest.$ac_objext` in
  1118. *ELF-32*)
  1119. HPUX_IA64_MODE=32
  1120. ;;
  1121. *ELF-64*)
  1122. HPUX_IA64_MODE=64
  1123. ;;
  1124. esac
  1125. fi
  1126. rm -rf conftest*
  1127. ;;
  1128. *-*-irix6*)
  1129. # Find out what ABI is being produced by ac_compile, and set linker
  1130. # options accordingly.
  1131. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
  1132. if AC_TRY_EVAL(ac_compile); then
  1133. if test yes = "$lt_cv_prog_gnu_ld"; then
  1134. case `/usr/bin/file conftest.$ac_objext` in
  1135. *32-bit*)
  1136. LD="${LD-ld} -melf32bsmip"
  1137. ;;
  1138. *N32*)
  1139. LD="${LD-ld} -melf32bmipn32"
  1140. ;;
  1141. *64-bit*)
  1142. LD="${LD-ld} -melf64bmip"
  1143. ;;
  1144. esac
  1145. else
  1146. case `/usr/bin/file conftest.$ac_objext` in
  1147. *32-bit*)
  1148. LD="${LD-ld} -32"
  1149. ;;
  1150. *N32*)
  1151. LD="${LD-ld} -n32"
  1152. ;;
  1153. *64-bit*)
  1154. LD="${LD-ld} -64"
  1155. ;;
  1156. esac
  1157. fi
  1158. fi
  1159. rm -rf conftest*
  1160. ;;
  1161. mips64*-*linux*)
  1162. # Find out what ABI is being produced by ac_compile, and set linker
  1163. # options accordingly.
  1164. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
  1165. if AC_TRY_EVAL(ac_compile); then
  1166. emul=elf
  1167. case `/usr/bin/file conftest.$ac_objext` in
  1168. *32-bit*)
  1169. emul="${emul}32"
  1170. ;;
  1171. *64-bit*)
  1172. emul="${emul}64"
  1173. ;;
  1174. esac
  1175. case `/usr/bin/file conftest.$ac_objext` in
  1176. *MSB*)
  1177. emul="${emul}btsmip"
  1178. ;;
  1179. *LSB*)
  1180. emul="${emul}ltsmip"
  1181. ;;
  1182. esac
  1183. case `/usr/bin/file conftest.$ac_objext` in
  1184. *N32*)
  1185. emul="${emul}n32"
  1186. ;;
  1187. esac
  1188. LD="${LD-ld} -m $emul"
  1189. fi
  1190. rm -rf conftest*
  1191. ;;
  1192. x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
  1193. s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
  1194. # Find out what ABI is being produced by ac_compile, and set linker
  1195. # options accordingly. Note that the listed cases only cover the
  1196. # situations where additional linker options are needed (such as when
  1197. # doing 32-bit compilation for a host where ld defaults to 64-bit, or
  1198. # vice versa); the common cases where no linker options are needed do
  1199. # not appear in the list.
  1200. echo 'int i;' > conftest.$ac_ext
  1201. if AC_TRY_EVAL(ac_compile); then
  1202. case `/usr/bin/file conftest.o` in
  1203. *32-bit*)
  1204. case $host in
  1205. x86_64-*kfreebsd*-gnu)
  1206. LD="${LD-ld} -m elf_i386_fbsd"
  1207. ;;
  1208. x86_64-*linux*)
  1209. case `/usr/bin/file conftest.o` in
  1210. *x86-64*)
  1211. LD="${LD-ld} -m elf32_x86_64"
  1212. ;;
  1213. *)
  1214. LD="${LD-ld} -m elf_i386"
  1215. ;;
  1216. esac
  1217. ;;
  1218. powerpc64le-*linux*)
  1219. LD="${LD-ld} -m elf32lppclinux"
  1220. ;;
  1221. powerpc64-*linux*)
  1222. LD="${LD-ld} -m elf32ppclinux"
  1223. ;;
  1224. s390x-*linux*)
  1225. LD="${LD-ld} -m elf_s390"
  1226. ;;
  1227. sparc64-*linux*)
  1228. LD="${LD-ld} -m elf32_sparc"
  1229. ;;
  1230. esac
  1231. ;;
  1232. *64-bit*)
  1233. case $host in
  1234. x86_64-*kfreebsd*-gnu)
  1235. LD="${LD-ld} -m elf_x86_64_fbsd"
  1236. ;;
  1237. x86_64-*linux*)
  1238. LD="${LD-ld} -m elf_x86_64"
  1239. ;;
  1240. powerpcle-*linux*)
  1241. LD="${LD-ld} -m elf64lppc"
  1242. ;;
  1243. powerpc-*linux*)
  1244. LD="${LD-ld} -m elf64ppc"
  1245. ;;
  1246. s390*-*linux*|s390*-*tpf*)
  1247. LD="${LD-ld} -m elf64_s390"
  1248. ;;
  1249. sparc*-*linux*)
  1250. LD="${LD-ld} -m elf64_sparc"
  1251. ;;
  1252. esac
  1253. ;;
  1254. esac
  1255. fi
  1256. rm -rf conftest*
  1257. ;;
  1258. *-*-sco3.2v5*)
  1259. # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  1260. SAVE_CFLAGS=$CFLAGS
  1261. CFLAGS="$CFLAGS -belf"
  1262. AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
  1263. [AC_LANG_PUSH(C)
  1264. AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
  1265. AC_LANG_POP])
  1266. if test yes != "$lt_cv_cc_needs_belf"; then
  1267. # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  1268. CFLAGS=$SAVE_CFLAGS
  1269. fi
  1270. ;;
  1271. *-*solaris*)
  1272. # Find out what ABI is being produced by ac_compile, and set linker
  1273. # options accordingly.
  1274. echo 'int i;' > conftest.$ac_ext
  1275. if AC_TRY_EVAL(ac_compile); then
  1276. case `/usr/bin/file conftest.o` in
  1277. *64-bit*)
  1278. case $lt_cv_prog_gnu_ld in
  1279. yes*)
  1280. case $host in
  1281. i?86-*-solaris*|x86_64-*-solaris*)
  1282. LD="${LD-ld} -m elf_x86_64"
  1283. ;;
  1284. sparc*-*-solaris*)
  1285. LD="${LD-ld} -m elf64_sparc"
  1286. ;;
  1287. esac
  1288. # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
  1289. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
  1290. LD=${LD-ld}_sol2
  1291. fi
  1292. ;;
  1293. *)
  1294. if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
  1295. LD="${LD-ld} -64"
  1296. fi
  1297. ;;
  1298. esac
  1299. ;;
  1300. esac
  1301. fi
  1302. rm -rf conftest*
  1303. ;;
  1304. esac
  1305. need_locks=$enable_libtool_lock
  1306. ])# _LT_ENABLE_LOCK
  1307. # _LT_PROG_AR
  1308. # -----------
  1309. m4_defun([_LT_PROG_AR],
  1310. [AC_CHECK_TOOLS(AR, [ar], false)
  1311. : ${AR=ar}
  1312. : ${AR_FLAGS=cru}
  1313. _LT_DECL([], [AR], [1], [The archiver])
  1314. _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
  1315. AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
  1316. [lt_cv_ar_at_file=no
  1317. AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
  1318. [echo conftest.$ac_objext > conftest.lst
  1319. lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
  1320. AC_TRY_EVAL([lt_ar_try])
  1321. if test 0 -eq "$ac_status"; then
  1322. # Ensure the archiver fails upon bogus file names.
  1323. rm -f conftest.$ac_objext libconftest.a
  1324. AC_TRY_EVAL([lt_ar_try])
  1325. if test 0 -ne "$ac_status"; then
  1326. lt_cv_ar_at_file=@
  1327. fi
  1328. fi
  1329. rm -f conftest.* libconftest.a
  1330. ])
  1331. ])
  1332. if test no = "$lt_cv_ar_at_file"; then
  1333. archiver_list_spec=
  1334. else
  1335. archiver_list_spec=$lt_cv_ar_at_file
  1336. fi
  1337. _LT_DECL([], [archiver_list_spec], [1],
  1338. [How to feed a file listing to the archiver])
  1339. ])# _LT_PROG_AR
  1340. # _LT_CMD_OLD_ARCHIVE
  1341. # -------------------
  1342. m4_defun([_LT_CMD_OLD_ARCHIVE],
  1343. [_LT_PROG_AR
  1344. AC_CHECK_TOOL(STRIP, strip, :)
  1345. test -z "$STRIP" && STRIP=:
  1346. _LT_DECL([], [STRIP], [1], [A symbol stripping program])
  1347. AC_CHECK_TOOL(RANLIB, ranlib, :)
  1348. test -z "$RANLIB" && RANLIB=:
  1349. _LT_DECL([], [RANLIB], [1],
  1350. [Commands used to install an old-style archive])
  1351. # Determine commands to create old-style static archives.
  1352. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
  1353. old_postinstall_cmds='chmod 644 $oldlib'
  1354. old_postuninstall_cmds=
  1355. if test -n "$RANLIB"; then
  1356. case $host_os in
  1357. bitrig* | openbsd*)
  1358. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
  1359. ;;
  1360. *)
  1361. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
  1362. ;;
  1363. esac
  1364. old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
  1365. fi
  1366. case $host_os in
  1367. darwin*)
  1368. lock_old_archive_extraction=yes ;;
  1369. *)
  1370. lock_old_archive_extraction=no ;;
  1371. esac
  1372. _LT_DECL([], [old_postinstall_cmds], [2])
  1373. _LT_DECL([], [old_postuninstall_cmds], [2])
  1374. _LT_TAGDECL([], [old_archive_cmds], [2],
  1375. [Commands used to build an old-style archive])
  1376. _LT_DECL([], [lock_old_archive_extraction], [0],
  1377. [Whether to use a lock for old archive extraction])
  1378. ])# _LT_CMD_OLD_ARCHIVE
  1379. # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  1380. # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
  1381. # ----------------------------------------------------------------
  1382. # Check whether the given compiler option works
  1383. AC_DEFUN([_LT_COMPILER_OPTION],
  1384. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1385. m4_require([_LT_DECL_SED])dnl
  1386. AC_CACHE_CHECK([$1], [$2],
  1387. [$2=no
  1388. m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
  1389. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  1390. lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment
  1391. # Insert the option either (1) after the last *FLAGS variable, or
  1392. # (2) before a word containing "conftest.", or (3) at the end.
  1393. # Note that $ac_compile itself does not contain backslashes and begins
  1394. # with a dollar sign (not a hyphen), so the echo should work correctly.
  1395. # The option is referenced via a variable to avoid confusing sed.
  1396. lt_compile=`echo "$ac_compile" | $SED \
  1397. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  1398. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  1399. -e 's:$: $lt_compiler_flag:'`
  1400. (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  1401. (eval "$lt_compile" 2>conftest.err)
  1402. ac_status=$?
  1403. cat conftest.err >&AS_MESSAGE_LOG_FD
  1404. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  1405. if (exit $ac_status) && test -s "$ac_outfile"; then
  1406. # The compiler can only warn and ignore the option if not recognized
  1407. # So say no if there are warnings other than the usual output.
  1408. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
  1409. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  1410. if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
  1411. $2=yes
  1412. fi
  1413. fi
  1414. $RM conftest*
  1415. ])
  1416. if test yes = "[$]$2"; then
  1417. m4_if([$5], , :, [$5])
  1418. else
  1419. m4_if([$6], , :, [$6])
  1420. fi
  1421. ])# _LT_COMPILER_OPTION
  1422. # Old name:
  1423. AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
  1424. dnl aclocal-1.4 backwards compatibility:
  1425. dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
  1426. # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  1427. # [ACTION-SUCCESS], [ACTION-FAILURE])
  1428. # ----------------------------------------------------
  1429. # Check whether the given linker option works
  1430. AC_DEFUN([_LT_LINKER_OPTION],
  1431. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1432. m4_require([_LT_DECL_SED])dnl
  1433. AC_CACHE_CHECK([$1], [$2],
  1434. [$2=no
  1435. save_LDFLAGS=$LDFLAGS
  1436. LDFLAGS="$LDFLAGS $3"
  1437. echo "$lt_simple_link_test_code" > conftest.$ac_ext
  1438. if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
  1439. # The linker can only warn and ignore the option if not recognized
  1440. # So say no if there are warnings
  1441. if test -s conftest.err; then
  1442. # Append any errors to the config.log.
  1443. cat conftest.err 1>&AS_MESSAGE_LOG_FD
  1444. $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
  1445. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  1446. if diff conftest.exp conftest.er2 >/dev/null; then
  1447. $2=yes
  1448. fi
  1449. else
  1450. $2=yes
  1451. fi
  1452. fi
  1453. $RM -r conftest*
  1454. LDFLAGS=$save_LDFLAGS
  1455. ])
  1456. if test yes = "[$]$2"; then
  1457. m4_if([$4], , :, [$4])
  1458. else
  1459. m4_if([$5], , :, [$5])
  1460. fi
  1461. ])# _LT_LINKER_OPTION
  1462. # Old name:
  1463. AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
  1464. dnl aclocal-1.4 backwards compatibility:
  1465. dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
  1466. # LT_CMD_MAX_LEN
  1467. #---------------
  1468. AC_DEFUN([LT_CMD_MAX_LEN],
  1469. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  1470. # find the maximum length of command line arguments
  1471. AC_MSG_CHECKING([the maximum length of command line arguments])
  1472. AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
  1473. i=0
  1474. teststring=ABCD
  1475. case $build_os in
  1476. msdosdjgpp*)
  1477. # On DJGPP, this test can blow up pretty badly due to problems in libc
  1478. # (any single argument exceeding 2000 bytes causes a buffer overrun
  1479. # during glob expansion). Even if it were fixed, the result of this
  1480. # check would be larger than it should be.
  1481. lt_cv_sys_max_cmd_len=12288; # 12K is about right
  1482. ;;
  1483. gnu*)
  1484. # Under GNU Hurd, this test is not required because there is
  1485. # no limit to the length of command line arguments.
  1486. # Libtool will interpret -1 as no limit whatsoever
  1487. lt_cv_sys_max_cmd_len=-1;
  1488. ;;
  1489. cygwin* | mingw* | cegcc*)
  1490. # On Win9x/ME, this test blows up -- it succeeds, but takes
  1491. # about 5 minutes as the teststring grows exponentially.
  1492. # Worse, since 9x/ME are not pre-emptively multitasking,
  1493. # you end up with a "frozen" computer, even though with patience
  1494. # the test eventually succeeds (with a max line length of 256k).
  1495. # Instead, let's just punt: use the minimum linelength reported by
  1496. # all of the supported platforms: 8192 (on NT/2K/XP).
  1497. lt_cv_sys_max_cmd_len=8192;
  1498. ;;
  1499. mint*)
  1500. # On MiNT this can take a long time and run out of memory.
  1501. lt_cv_sys_max_cmd_len=8192;
  1502. ;;
  1503. amigaos*)
  1504. # On AmigaOS with pdksh, this test takes hours, literally.
  1505. # So we just punt and use a minimum line length of 8192.
  1506. lt_cv_sys_max_cmd_len=8192;
  1507. ;;
  1508. bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
  1509. # This has been around since 386BSD, at least. Likely further.
  1510. if test -x /sbin/sysctl; then
  1511. lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
  1512. elif test -x /usr/sbin/sysctl; then
  1513. lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
  1514. else
  1515. lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
  1516. fi
  1517. # And add a safety zone
  1518. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  1519. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  1520. ;;
  1521. interix*)
  1522. # We know the value 262144 and hardcode it with a safety zone (like BSD)
  1523. lt_cv_sys_max_cmd_len=196608
  1524. ;;
  1525. os2*)
  1526. # The test takes a long time on OS/2.
  1527. lt_cv_sys_max_cmd_len=8192
  1528. ;;
  1529. osf*)
  1530. # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
  1531. # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
  1532. # nice to cause kernel panics so lets avoid the loop below.
  1533. # First set a reasonable default.
  1534. lt_cv_sys_max_cmd_len=16384
  1535. #
  1536. if test -x /sbin/sysconfig; then
  1537. case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
  1538. *1*) lt_cv_sys_max_cmd_len=-1 ;;
  1539. esac
  1540. fi
  1541. ;;
  1542. sco3.2v5*)
  1543. lt_cv_sys_max_cmd_len=102400
  1544. ;;
  1545. sysv5* | sco5v6* | sysv4.2uw2*)
  1546. kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
  1547. if test -n "$kargmax"; then
  1548. lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
  1549. else
  1550. lt_cv_sys_max_cmd_len=32768
  1551. fi
  1552. ;;
  1553. *)
  1554. lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
  1555. if test -n "$lt_cv_sys_max_cmd_len" && \
  1556. test undefined != "$lt_cv_sys_max_cmd_len"; then
  1557. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  1558. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  1559. else
  1560. # Make teststring a little bigger before we do anything with it.
  1561. # a 1K string should be a reasonable start.
  1562. for i in 1 2 3 4 5 6 7 8; do
  1563. teststring=$teststring$teststring
  1564. done
  1565. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
  1566. # If test is not a shell built-in, we'll probably end up computing a
  1567. # maximum length that is only half of the actual maximum length, but
  1568. # we can't tell.
  1569. while { test X`env echo "$teststring$teststring" 2>/dev/null` \
  1570. = "X$teststring$teststring"; } >/dev/null 2>&1 &&
  1571. test 17 != "$i" # 1/2 MB should be enough
  1572. do
  1573. i=`expr $i + 1`
  1574. teststring=$teststring$teststring
  1575. done
  1576. # Only check the string length outside the loop.
  1577. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
  1578. teststring=
  1579. # Add a significant safety factor because C++ compilers can tack on
  1580. # massive amounts of additional arguments before passing them to the
  1581. # linker. It appears as though 1/2 is a usable value.
  1582. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
  1583. fi
  1584. ;;
  1585. esac
  1586. ])
  1587. if test -n "$lt_cv_sys_max_cmd_len"; then
  1588. AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
  1589. else
  1590. AC_MSG_RESULT(none)
  1591. fi
  1592. max_cmd_len=$lt_cv_sys_max_cmd_len
  1593. _LT_DECL([], [max_cmd_len], [0],
  1594. [What is the maximum length of a command?])
  1595. ])# LT_CMD_MAX_LEN
  1596. # Old name:
  1597. AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
  1598. dnl aclocal-1.4 backwards compatibility:
  1599. dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
  1600. # _LT_HEADER_DLFCN
  1601. # ----------------
  1602. m4_defun([_LT_HEADER_DLFCN],
  1603. [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
  1604. ])# _LT_HEADER_DLFCN
  1605. # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
  1606. # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
  1607. # ----------------------------------------------------------------
  1608. m4_defun([_LT_TRY_DLOPEN_SELF],
  1609. [m4_require([_LT_HEADER_DLFCN])dnl
  1610. if test yes = "$cross_compiling"; then :
  1611. [$4]
  1612. else
  1613. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  1614. lt_status=$lt_dlunknown
  1615. cat > conftest.$ac_ext <<_LT_EOF
  1616. [#line $LINENO "configure"
  1617. #include "confdefs.h"
  1618. #if HAVE_DLFCN_H
  1619. #include <dlfcn.h>
  1620. #endif
  1621. #include <stdio.h>
  1622. #ifdef RTLD_GLOBAL
  1623. # define LT_DLGLOBAL RTLD_GLOBAL
  1624. #else
  1625. # ifdef DL_GLOBAL
  1626. # define LT_DLGLOBAL DL_GLOBAL
  1627. # else
  1628. # define LT_DLGLOBAL 0
  1629. # endif
  1630. #endif
  1631. /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
  1632. find out it does not work in some platform. */
  1633. #ifndef LT_DLLAZY_OR_NOW
  1634. # ifdef RTLD_LAZY
  1635. # define LT_DLLAZY_OR_NOW RTLD_LAZY
  1636. # else
  1637. # ifdef DL_LAZY
  1638. # define LT_DLLAZY_OR_NOW DL_LAZY
  1639. # else
  1640. # ifdef RTLD_NOW
  1641. # define LT_DLLAZY_OR_NOW RTLD_NOW
  1642. # else
  1643. # ifdef DL_NOW
  1644. # define LT_DLLAZY_OR_NOW DL_NOW
  1645. # else
  1646. # define LT_DLLAZY_OR_NOW 0
  1647. # endif
  1648. # endif
  1649. # endif
  1650. # endif
  1651. #endif
  1652. /* When -fvisibility=hidden is used, assume the code has been annotated
  1653. correspondingly for the symbols needed. */
  1654. #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
  1655. int fnord () __attribute__((visibility("default")));
  1656. #endif
  1657. int fnord () { return 42; }
  1658. int main ()
  1659. {
  1660. void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  1661. int status = $lt_dlunknown;
  1662. if (self)
  1663. {
  1664. if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
  1665. else
  1666. {
  1667. if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
  1668. else puts (dlerror ());
  1669. }
  1670. /* dlclose (self); */
  1671. }
  1672. else
  1673. puts (dlerror ());
  1674. return status;
  1675. }]
  1676. _LT_EOF
  1677. if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
  1678. (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
  1679. lt_status=$?
  1680. case x$lt_status in
  1681. x$lt_dlno_uscore) $1 ;;
  1682. x$lt_dlneed_uscore) $2 ;;
  1683. x$lt_dlunknown|x*) $3 ;;
  1684. esac
  1685. else :
  1686. # compilation failed
  1687. $3
  1688. fi
  1689. fi
  1690. rm -fr conftest*
  1691. ])# _LT_TRY_DLOPEN_SELF
  1692. # LT_SYS_DLOPEN_SELF
  1693. # ------------------
  1694. AC_DEFUN([LT_SYS_DLOPEN_SELF],
  1695. [m4_require([_LT_HEADER_DLFCN])dnl
  1696. if test yes != "$enable_dlopen"; then
  1697. enable_dlopen=unknown
  1698. enable_dlopen_self=unknown
  1699. enable_dlopen_self_static=unknown
  1700. else
  1701. lt_cv_dlopen=no
  1702. lt_cv_dlopen_libs=
  1703. case $host_os in
  1704. beos*)
  1705. lt_cv_dlopen=load_add_on
  1706. lt_cv_dlopen_libs=
  1707. lt_cv_dlopen_self=yes
  1708. ;;
  1709. mingw* | pw32* | cegcc*)
  1710. lt_cv_dlopen=LoadLibrary
  1711. lt_cv_dlopen_libs=
  1712. ;;
  1713. cygwin*)
  1714. lt_cv_dlopen=dlopen
  1715. lt_cv_dlopen_libs=
  1716. ;;
  1717. darwin*)
  1718. # if libdl is installed we need to link against it
  1719. AC_CHECK_LIB([dl], [dlopen],
  1720. [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
  1721. lt_cv_dlopen=dyld
  1722. lt_cv_dlopen_libs=
  1723. lt_cv_dlopen_self=yes
  1724. ])
  1725. ;;
  1726. tpf*)
  1727. # Don't try to run any link tests for TPF. We know it's impossible
  1728. # because TPF is a cross-compiler, and we know how we open DSOs.
  1729. lt_cv_dlopen=dlopen
  1730. lt_cv_dlopen_libs=
  1731. lt_cv_dlopen_self=no
  1732. ;;
  1733. *)
  1734. AC_CHECK_FUNC([shl_load],
  1735. [lt_cv_dlopen=shl_load],
  1736. [AC_CHECK_LIB([dld], [shl_load],
  1737. [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
  1738. [AC_CHECK_FUNC([dlopen],
  1739. [lt_cv_dlopen=dlopen],
  1740. [AC_CHECK_LIB([dl], [dlopen],
  1741. [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
  1742. [AC_CHECK_LIB([svld], [dlopen],
  1743. [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
  1744. [AC_CHECK_LIB([dld], [dld_link],
  1745. [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
  1746. ])
  1747. ])
  1748. ])
  1749. ])
  1750. ])
  1751. ;;
  1752. esac
  1753. if test no = "$lt_cv_dlopen"; then
  1754. enable_dlopen=no
  1755. else
  1756. enable_dlopen=yes
  1757. fi
  1758. case $lt_cv_dlopen in
  1759. dlopen)
  1760. save_CPPFLAGS=$CPPFLAGS
  1761. test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  1762. save_LDFLAGS=$LDFLAGS
  1763. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  1764. save_LIBS=$LIBS
  1765. LIBS="$lt_cv_dlopen_libs $LIBS"
  1766. AC_CACHE_CHECK([whether a program can dlopen itself],
  1767. lt_cv_dlopen_self, [dnl
  1768. _LT_TRY_DLOPEN_SELF(
  1769. lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
  1770. lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
  1771. ])
  1772. if test yes = "$lt_cv_dlopen_self"; then
  1773. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
  1774. AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
  1775. lt_cv_dlopen_self_static, [dnl
  1776. _LT_TRY_DLOPEN_SELF(
  1777. lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
  1778. lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
  1779. ])
  1780. fi
  1781. CPPFLAGS=$save_CPPFLAGS
  1782. LDFLAGS=$save_LDFLAGS
  1783. LIBS=$save_LIBS
  1784. ;;
  1785. esac
  1786. case $lt_cv_dlopen_self in
  1787. yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  1788. *) enable_dlopen_self=unknown ;;
  1789. esac
  1790. case $lt_cv_dlopen_self_static in
  1791. yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  1792. *) enable_dlopen_self_static=unknown ;;
  1793. esac
  1794. fi
  1795. _LT_DECL([dlopen_support], [enable_dlopen], [0],
  1796. [Whether dlopen is supported])
  1797. _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
  1798. [Whether dlopen of programs is supported])
  1799. _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
  1800. [Whether dlopen of statically linked programs is supported])
  1801. ])# LT_SYS_DLOPEN_SELF
  1802. # Old name:
  1803. AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
  1804. dnl aclocal-1.4 backwards compatibility:
  1805. dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
  1806. # _LT_COMPILER_C_O([TAGNAME])
  1807. # ---------------------------
  1808. # Check to see if options -c and -o are simultaneously supported by compiler.
  1809. # This macro does not hard code the compiler like AC_PROG_CC_C_O.
  1810. m4_defun([_LT_COMPILER_C_O],
  1811. [m4_require([_LT_DECL_SED])dnl
  1812. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1813. m4_require([_LT_TAG_COMPILER])dnl
  1814. AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
  1815. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
  1816. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
  1817. $RM -r conftest 2>/dev/null
  1818. mkdir conftest
  1819. cd conftest
  1820. mkdir out
  1821. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  1822. lt_compiler_flag="-o out/conftest2.$ac_objext"
  1823. # Insert the option either (1) after the last *FLAGS variable, or
  1824. # (2) before a word containing "conftest.", or (3) at the end.
  1825. # Note that $ac_compile itself does not contain backslashes and begins
  1826. # with a dollar sign (not a hyphen), so the echo should work correctly.
  1827. lt_compile=`echo "$ac_compile" | $SED \
  1828. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  1829. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  1830. -e 's:$: $lt_compiler_flag:'`
  1831. (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  1832. (eval "$lt_compile" 2>out/conftest.err)
  1833. ac_status=$?
  1834. cat out/conftest.err >&AS_MESSAGE_LOG_FD
  1835. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  1836. if (exit $ac_status) && test -s out/conftest2.$ac_objext
  1837. then
  1838. # The compiler can only warn and ignore the option if not recognized
  1839. # So say no if there are warnings
  1840. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
  1841. $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
  1842. if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
  1843. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  1844. fi
  1845. fi
  1846. chmod u+w . 2>&AS_MESSAGE_LOG_FD
  1847. $RM conftest*
  1848. # SGI C++ compiler will create directory out/ii_files/ for
  1849. # template instantiation
  1850. test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
  1851. $RM out/* && rmdir out
  1852. cd ..
  1853. $RM -r conftest
  1854. $RM conftest*
  1855. ])
  1856. _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
  1857. [Does compiler simultaneously support -c and -o options?])
  1858. ])# _LT_COMPILER_C_O
  1859. # _LT_COMPILER_FILE_LOCKS([TAGNAME])
  1860. # ----------------------------------
  1861. # Check to see if we can do hard links to lock some files if needed
  1862. m4_defun([_LT_COMPILER_FILE_LOCKS],
  1863. [m4_require([_LT_ENABLE_LOCK])dnl
  1864. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1865. _LT_COMPILER_C_O([$1])
  1866. hard_links=nottested
  1867. if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
  1868. # do not overwrite the value of need_locks provided by the user
  1869. AC_MSG_CHECKING([if we can lock with hard links])
  1870. hard_links=yes
  1871. $RM conftest*
  1872. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1873. touch conftest.a
  1874. ln conftest.a conftest.b 2>&5 || hard_links=no
  1875. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1876. AC_MSG_RESULT([$hard_links])
  1877. if test no = "$hard_links"; then
  1878. AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
  1879. need_locks=warn
  1880. fi
  1881. else
  1882. need_locks=no
  1883. fi
  1884. _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
  1885. ])# _LT_COMPILER_FILE_LOCKS
  1886. # _LT_CHECK_OBJDIR
  1887. # ----------------
  1888. m4_defun([_LT_CHECK_OBJDIR],
  1889. [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
  1890. [rm -f .libs 2>/dev/null
  1891. mkdir .libs 2>/dev/null
  1892. if test -d .libs; then
  1893. lt_cv_objdir=.libs
  1894. else
  1895. # MS-DOS does not allow filenames that begin with a dot.
  1896. lt_cv_objdir=_libs
  1897. fi
  1898. rmdir .libs 2>/dev/null])
  1899. objdir=$lt_cv_objdir
  1900. _LT_DECL([], [objdir], [0],
  1901. [The name of the directory that contains temporary libtool files])dnl
  1902. m4_pattern_allow([LT_OBJDIR])dnl
  1903. AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
  1904. [Define to the sub-directory where libtool stores uninstalled libraries.])
  1905. ])# _LT_CHECK_OBJDIR
  1906. # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
  1907. # --------------------------------------
  1908. # Check hardcoding attributes.
  1909. m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
  1910. [AC_MSG_CHECKING([how to hardcode library paths into programs])
  1911. _LT_TAGVAR(hardcode_action, $1)=
  1912. if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
  1913. test -n "$_LT_TAGVAR(runpath_var, $1)" ||
  1914. test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
  1915. # We can hardcode non-existent directories.
  1916. if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
  1917. # If the only mechanism to avoid hardcoding is shlibpath_var, we
  1918. # have to relink, otherwise we might link with an installed library
  1919. # when we should be linking with a yet-to-be-installed one
  1920. ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
  1921. test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
  1922. # Linking always hardcodes the temporary library directory.
  1923. _LT_TAGVAR(hardcode_action, $1)=relink
  1924. else
  1925. # We can link without hardcoding, and we can hardcode nonexisting dirs.
  1926. _LT_TAGVAR(hardcode_action, $1)=immediate
  1927. fi
  1928. else
  1929. # We cannot hardcode anything, or else we can only hardcode existing
  1930. # directories.
  1931. _LT_TAGVAR(hardcode_action, $1)=unsupported
  1932. fi
  1933. AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
  1934. if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
  1935. test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
  1936. # Fast installation is not supported
  1937. enable_fast_install=no
  1938. elif test yes = "$shlibpath_overrides_runpath" ||
  1939. test no = "$enable_shared"; then
  1940. # Fast installation is not necessary
  1941. enable_fast_install=needless
  1942. fi
  1943. _LT_TAGDECL([], [hardcode_action], [0],
  1944. [How to hardcode a shared library path into an executable])
  1945. ])# _LT_LINKER_HARDCODE_LIBPATH
  1946. # _LT_CMD_STRIPLIB
  1947. # ----------------
  1948. m4_defun([_LT_CMD_STRIPLIB],
  1949. [m4_require([_LT_DECL_EGREP])
  1950. striplib=
  1951. old_striplib=
  1952. AC_MSG_CHECKING([whether stripping libraries is possible])
  1953. if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
  1954. test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
  1955. test -z "$striplib" && striplib="$STRIP --strip-unneeded"
  1956. AC_MSG_RESULT([yes])
  1957. else
  1958. # FIXME - insert some real tests, host_os isn't really good enough
  1959. case $host_os in
  1960. darwin*)
  1961. if test -n "$STRIP"; then
  1962. striplib="$STRIP -x"
  1963. old_striplib="$STRIP -S"
  1964. AC_MSG_RESULT([yes])
  1965. else
  1966. AC_MSG_RESULT([no])
  1967. fi
  1968. ;;
  1969. *)
  1970. AC_MSG_RESULT([no])
  1971. ;;
  1972. esac
  1973. fi
  1974. _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
  1975. _LT_DECL([], [striplib], [1])
  1976. ])# _LT_CMD_STRIPLIB
  1977. # _LT_PREPARE_MUNGE_PATH_LIST
  1978. # ---------------------------
  1979. # Make sure func_munge_path_list() is defined correctly.
  1980. m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
  1981. [[# func_munge_path_list VARIABLE PATH
  1982. # -----------------------------------
  1983. # VARIABLE is name of variable containing _space_ separated list of
  1984. # directories to be munged by the contents of PATH, which is string
  1985. # having a format:
  1986. # "DIR[:DIR]:"
  1987. # string "DIR[ DIR]" will be prepended to VARIABLE
  1988. # ":DIR[:DIR]"
  1989. # string "DIR[ DIR]" will be appended to VARIABLE
  1990. # "DIRP[:DIRP]::[DIRA:]DIRA"
  1991. # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
  1992. # "DIRA[ DIRA]" will be appended to VARIABLE
  1993. # "DIR[:DIR]"
  1994. # VARIABLE will be replaced by "DIR[ DIR]"
  1995. func_munge_path_list ()
  1996. {
  1997. case x@S|@2 in
  1998. x)
  1999. ;;
  2000. *:)
  2001. eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
  2002. ;;
  2003. x:*)
  2004. eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
  2005. ;;
  2006. *::*)
  2007. eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
  2008. eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
  2009. ;;
  2010. *)
  2011. eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
  2012. ;;
  2013. esac
  2014. }
  2015. ]])# _LT_PREPARE_PATH_LIST
  2016. # _LT_SYS_DYNAMIC_LINKER([TAG])
  2017. # -----------------------------
  2018. # PORTME Fill in your ld.so characteristics
  2019. m4_defun([_LT_SYS_DYNAMIC_LINKER],
  2020. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2021. m4_require([_LT_DECL_EGREP])dnl
  2022. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  2023. m4_require([_LT_DECL_OBJDUMP])dnl
  2024. m4_require([_LT_DECL_SED])dnl
  2025. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  2026. m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
  2027. AC_MSG_CHECKING([dynamic linker characteristics])
  2028. m4_if([$1],
  2029. [], [
  2030. if test yes = "$GCC"; then
  2031. case $host_os in
  2032. darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
  2033. *) lt_awk_arg='/^libraries:/' ;;
  2034. esac
  2035. case $host_os in
  2036. mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
  2037. *) lt_sed_strip_eq='s|=/|/|g' ;;
  2038. esac
  2039. lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
  2040. case $lt_search_path_spec in
  2041. *\;*)
  2042. # if the path contains ";" then we assume it to be the separator
  2043. # otherwise default to the standard path separator (i.e. ":") - it is
  2044. # assumed that no part of a normal pathname contains ";" but that should
  2045. # okay in the real world where ";" in dirpaths is itself problematic.
  2046. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
  2047. ;;
  2048. *)
  2049. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
  2050. ;;
  2051. esac
  2052. # Ok, now we have the path, separated by spaces, we can step through it
  2053. # and add multilib dir if necessary...
  2054. lt_tmp_lt_search_path_spec=
  2055. lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
  2056. # ...but if some path component already ends with the multilib dir we assume
  2057. # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
  2058. case "$lt_multi_os_dir; $lt_search_path_spec " in
  2059. "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
  2060. lt_multi_os_dir=
  2061. ;;
  2062. esac
  2063. for lt_sys_path in $lt_search_path_spec; do
  2064. if test -d "$lt_sys_path$lt_multi_os_dir"; then
  2065. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
  2066. elif test -n "$lt_multi_os_dir"; then
  2067. test -d "$lt_sys_path" && \
  2068. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
  2069. fi
  2070. done
  2071. lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
  2072. BEGIN {RS = " "; FS = "/|\n";} {
  2073. lt_foo = "";
  2074. lt_count = 0;
  2075. for (lt_i = NF; lt_i > 0; lt_i--) {
  2076. if ($lt_i != "" && $lt_i != ".") {
  2077. if ($lt_i == "..") {
  2078. lt_count++;
  2079. } else {
  2080. if (lt_count == 0) {
  2081. lt_foo = "/" $lt_i lt_foo;
  2082. } else {
  2083. lt_count--;
  2084. }
  2085. }
  2086. }
  2087. }
  2088. if (lt_foo != "") { lt_freq[[lt_foo]]++; }
  2089. if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
  2090. }'`
  2091. # AWK program above erroneously prepends '/' to C:/dos/paths
  2092. # for these hosts.
  2093. case $host_os in
  2094. mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
  2095. $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
  2096. esac
  2097. sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
  2098. else
  2099. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  2100. fi])
  2101. library_names_spec=
  2102. libname_spec='lib$name'
  2103. soname_spec=
  2104. shrext_cmds=.so
  2105. postinstall_cmds=
  2106. postuninstall_cmds=
  2107. finish_cmds=
  2108. finish_eval=
  2109. shlibpath_var=
  2110. shlibpath_overrides_runpath=unknown
  2111. version_type=none
  2112. dynamic_linker="$host_os ld.so"
  2113. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  2114. need_lib_prefix=unknown
  2115. hardcode_into_libs=no
  2116. # when you set need_version to no, make sure it does not cause -set_version
  2117. # flags to be left without arguments
  2118. need_version=unknown
  2119. AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
  2120. [User-defined run-time library search path.])
  2121. case $host_os in
  2122. aix3*)
  2123. version_type=linux # correct to gnu/linux during the next big refactor
  2124. library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
  2125. shlibpath_var=LIBPATH
  2126. # AIX 3 has no versioning support, so we append a major version to the name.
  2127. soname_spec='$libname$release$shared_ext$major'
  2128. ;;
  2129. aix[[4-9]]*)
  2130. version_type=linux # correct to gnu/linux during the next big refactor
  2131. need_lib_prefix=no
  2132. need_version=no
  2133. hardcode_into_libs=yes
  2134. if test ia64 = "$host_cpu"; then
  2135. # AIX 5 supports IA64
  2136. library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
  2137. shlibpath_var=LD_LIBRARY_PATH
  2138. else
  2139. # With GCC up to 2.95.x, collect2 would create an import file
  2140. # for dependence libraries. The import file would start with
  2141. # the line '#! .'. This would cause the generated library to
  2142. # depend on '.', always an invalid library. This was fixed in
  2143. # development snapshots of GCC prior to 3.0.
  2144. case $host_os in
  2145. aix4 | aix4.[[01]] | aix4.[[01]].*)
  2146. if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
  2147. echo ' yes '
  2148. echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
  2149. :
  2150. else
  2151. can_build_shared=no
  2152. fi
  2153. ;;
  2154. esac
  2155. # Using Import Files as archive members, it is possible to support
  2156. # filename-based versioning of shared library archives on AIX. While
  2157. # this would work for both with and without runtime linking, it will
  2158. # prevent static linking of such archives. So we do filename-based
  2159. # shared library versioning with .so extension only, which is used
  2160. # when both runtime linking and shared linking is enabled.
  2161. # Unfortunately, runtime linking may impact performance, so we do
  2162. # not want this to be the default eventually. Also, we use the
  2163. # versioned .so libs for executables only if there is the -brtl
  2164. # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
  2165. # To allow for filename-based versioning support, we need to create
  2166. # libNAME.so.V as an archive file, containing:
  2167. # *) an Import File, referring to the versioned filename of the
  2168. # archive as well as the shared archive member, telling the
  2169. # bitwidth (32 or 64) of that shared object, and providing the
  2170. # list of exported symbols of that shared object, eventually
  2171. # decorated with the 'weak' keyword
  2172. # *) the shared object with the F_LOADONLY flag set, to really avoid
  2173. # it being seen by the linker.
  2174. # At run time we better use the real file rather than another symlink,
  2175. # but for link time we create the symlink libNAME.so -> libNAME.so.V
  2176. case $with_aix_soname,$aix_use_runtimelinking in
  2177. # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
  2178. # soname into executable. Probably we can add versioning support to
  2179. # collect2, so additional links can be useful in future.
  2180. aix,yes) # traditional libtool
  2181. dynamic_linker='AIX unversionable lib.so'
  2182. # If using run time linking (on AIX 4.2 or later) use lib<name>.so
  2183. # instead of lib<name>.a to let people know that these are not
  2184. # typical AIX shared libraries.
  2185. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2186. ;;
  2187. aix,no) # traditional AIX only
  2188. dynamic_linker='AIX lib.a[(]lib.so.V[)]'
  2189. # We preserve .a as extension for shared libraries through AIX4.2
  2190. # and later when we are not doing run time linking.
  2191. library_names_spec='$libname$release.a $libname.a'
  2192. soname_spec='$libname$release$shared_ext$major'
  2193. ;;
  2194. svr4,*) # full svr4 only
  2195. dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
  2196. library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
  2197. # We do not specify a path in Import Files, so LIBPATH fires.
  2198. shlibpath_overrides_runpath=yes
  2199. ;;
  2200. *,yes) # both, prefer svr4
  2201. dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
  2202. library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
  2203. # unpreferred sharedlib libNAME.a needs extra handling
  2204. postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
  2205. postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
  2206. # We do not specify a path in Import Files, so LIBPATH fires.
  2207. shlibpath_overrides_runpath=yes
  2208. ;;
  2209. *,no) # both, prefer aix
  2210. dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
  2211. library_names_spec='$libname$release.a $libname.a'
  2212. soname_spec='$libname$release$shared_ext$major'
  2213. # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
  2214. postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
  2215. postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
  2216. ;;
  2217. esac
  2218. shlibpath_var=LIBPATH
  2219. fi
  2220. ;;
  2221. amigaos*)
  2222. case $host_cpu in
  2223. powerpc)
  2224. # Since July 2007 AmigaOS4 officially supports .so libraries.
  2225. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
  2226. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2227. ;;
  2228. m68k)
  2229. library_names_spec='$libname.ixlibrary $libname.a'
  2230. # Create ${libname}_ixlibrary.a entries in /sys/libs.
  2231. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $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'
  2232. ;;
  2233. esac
  2234. ;;
  2235. beos*)
  2236. library_names_spec='$libname$shared_ext'
  2237. dynamic_linker="$host_os ld.so"
  2238. shlibpath_var=LIBRARY_PATH
  2239. ;;
  2240. bsdi[[45]]*)
  2241. version_type=linux # correct to gnu/linux during the next big refactor
  2242. need_version=no
  2243. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2244. soname_spec='$libname$release$shared_ext$major'
  2245. finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  2246. shlibpath_var=LD_LIBRARY_PATH
  2247. sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  2248. sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  2249. # the default ld.so.conf also contains /usr/contrib/lib and
  2250. # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  2251. # libtool to hard-code these into programs
  2252. ;;
  2253. cygwin* | mingw* | pw32* | cegcc*)
  2254. version_type=windows
  2255. shrext_cmds=.dll
  2256. need_version=no
  2257. need_lib_prefix=no
  2258. case $GCC,$cc_basename in
  2259. yes,*)
  2260. # gcc
  2261. library_names_spec='$libname.dll.a'
  2262. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  2263. postinstall_cmds='base_file=`basename \$file`~
  2264. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
  2265. dldir=$destdir/`dirname \$dlpath`~
  2266. test -d \$dldir || mkdir -p \$dldir~
  2267. $install_prog $dir/$dlname \$dldir/$dlname~
  2268. chmod a+x \$dldir/$dlname~
  2269. if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
  2270. eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
  2271. fi'
  2272. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  2273. dlpath=$dir/\$dldll~
  2274. $RM \$dlpath'
  2275. shlibpath_overrides_runpath=yes
  2276. case $host_os in
  2277. cygwin*)
  2278. # Cygwin DLLs use 'cyg' prefix rather than 'lib'
  2279. soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
  2280. m4_if([$1], [],[
  2281. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
  2282. ;;
  2283. mingw* | cegcc*)
  2284. # MinGW DLLs use traditional 'lib' prefix
  2285. soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
  2286. ;;
  2287. pw32*)
  2288. # pw32 DLLs use 'pw' prefix rather than 'lib'
  2289. library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
  2290. ;;
  2291. esac
  2292. dynamic_linker='Win32 ld.exe'
  2293. ;;
  2294. *,cl*)
  2295. # Native MSVC
  2296. libname_spec='$name'
  2297. soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
  2298. library_names_spec='$libname.dll.lib'
  2299. case $build_os in
  2300. mingw*)
  2301. sys_lib_search_path_spec=
  2302. lt_save_ifs=$IFS
  2303. IFS=';'
  2304. for lt_path in $LIB
  2305. do
  2306. IFS=$lt_save_ifs
  2307. # Let DOS variable expansion print the short 8.3 style file name.
  2308. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
  2309. sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
  2310. done
  2311. IFS=$lt_save_ifs
  2312. # Convert to MSYS style.
  2313. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
  2314. ;;
  2315. cygwin*)
  2316. # Convert to unix form, then to dos form, then back to unix form
  2317. # but this time dos style (no spaces!) so that the unix form looks
  2318. # like /cygdrive/c/PROGRA~1:/cygdr...
  2319. sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
  2320. sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
  2321. sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  2322. ;;
  2323. *)
  2324. sys_lib_search_path_spec=$LIB
  2325. if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
  2326. # It is most probably a Windows format PATH.
  2327. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  2328. else
  2329. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  2330. fi
  2331. # FIXME: find the short name or the path components, as spaces are
  2332. # common. (e.g. "Program Files" -> "PROGRA~1")
  2333. ;;
  2334. esac
  2335. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  2336. postinstall_cmds='base_file=`basename \$file`~
  2337. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
  2338. dldir=$destdir/`dirname \$dlpath`~
  2339. test -d \$dldir || mkdir -p \$dldir~
  2340. $install_prog $dir/$dlname \$dldir/$dlname'
  2341. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  2342. dlpath=$dir/\$dldll~
  2343. $RM \$dlpath'
  2344. shlibpath_overrides_runpath=yes
  2345. dynamic_linker='Win32 link.exe'
  2346. ;;
  2347. *)
  2348. # Assume MSVC wrapper
  2349. library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
  2350. dynamic_linker='Win32 ld.exe'
  2351. ;;
  2352. esac
  2353. # FIXME: first we should search . and the directory the executable is in
  2354. shlibpath_var=PATH
  2355. ;;
  2356. darwin* | rhapsody*)
  2357. dynamic_linker="$host_os dyld"
  2358. version_type=darwin
  2359. need_lib_prefix=no
  2360. need_version=no
  2361. library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
  2362. soname_spec='$libname$release$major$shared_ext'
  2363. shlibpath_overrides_runpath=yes
  2364. shlibpath_var=DYLD_LIBRARY_PATH
  2365. shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
  2366. m4_if([$1], [],[
  2367. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
  2368. sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
  2369. ;;
  2370. dgux*)
  2371. version_type=linux # correct to gnu/linux during the next big refactor
  2372. need_lib_prefix=no
  2373. need_version=no
  2374. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2375. soname_spec='$libname$release$shared_ext$major'
  2376. shlibpath_var=LD_LIBRARY_PATH
  2377. ;;
  2378. freebsd* | dragonfly*)
  2379. # DragonFly does not have aout. When/if they implement a new
  2380. # versioning mechanism, adjust this.
  2381. if test -x /usr/bin/objformat; then
  2382. objformat=`/usr/bin/objformat`
  2383. else
  2384. case $host_os in
  2385. freebsd[[23]].*) objformat=aout ;;
  2386. *) objformat=elf ;;
  2387. esac
  2388. fi
  2389. version_type=freebsd-$objformat
  2390. case $version_type in
  2391. freebsd-elf*)
  2392. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2393. soname_spec='$libname$release$shared_ext$major'
  2394. need_version=no
  2395. need_lib_prefix=no
  2396. ;;
  2397. freebsd-*)
  2398. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  2399. need_version=yes
  2400. ;;
  2401. esac
  2402. shlibpath_var=LD_LIBRARY_PATH
  2403. case $host_os in
  2404. freebsd2.*)
  2405. shlibpath_overrides_runpath=yes
  2406. ;;
  2407. freebsd3.[[01]]* | freebsdelf3.[[01]]*)
  2408. shlibpath_overrides_runpath=yes
  2409. hardcode_into_libs=yes
  2410. ;;
  2411. freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
  2412. freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
  2413. shlibpath_overrides_runpath=no
  2414. hardcode_into_libs=yes
  2415. ;;
  2416. *) # from 4.6 on, and DragonFly
  2417. shlibpath_overrides_runpath=yes
  2418. hardcode_into_libs=yes
  2419. ;;
  2420. esac
  2421. ;;
  2422. haiku*)
  2423. version_type=linux # correct to gnu/linux during the next big refactor
  2424. need_lib_prefix=no
  2425. need_version=no
  2426. dynamic_linker="$host_os runtime_loader"
  2427. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2428. soname_spec='$libname$release$shared_ext$major'
  2429. shlibpath_var=LIBRARY_PATH
  2430. shlibpath_overrides_runpath=no
  2431. sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
  2432. hardcode_into_libs=yes
  2433. ;;
  2434. hpux9* | hpux10* | hpux11*)
  2435. # Give a soname corresponding to the major version so that dld.sl refuses to
  2436. # link against other versions.
  2437. version_type=sunos
  2438. need_lib_prefix=no
  2439. need_version=no
  2440. case $host_cpu in
  2441. ia64*)
  2442. shrext_cmds='.so'
  2443. hardcode_into_libs=yes
  2444. dynamic_linker="$host_os dld.so"
  2445. shlibpath_var=LD_LIBRARY_PATH
  2446. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  2447. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2448. soname_spec='$libname$release$shared_ext$major'
  2449. if test 32 = "$HPUX_IA64_MODE"; then
  2450. sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
  2451. sys_lib_dlsearch_path_spec=/usr/lib/hpux32
  2452. else
  2453. sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
  2454. sys_lib_dlsearch_path_spec=/usr/lib/hpux64
  2455. fi
  2456. ;;
  2457. hppa*64*)
  2458. shrext_cmds='.sl'
  2459. hardcode_into_libs=yes
  2460. dynamic_linker="$host_os dld.sl"
  2461. shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
  2462. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  2463. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2464. soname_spec='$libname$release$shared_ext$major'
  2465. sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
  2466. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2467. ;;
  2468. *)
  2469. shrext_cmds='.sl'
  2470. dynamic_linker="$host_os dld.sl"
  2471. shlibpath_var=SHLIB_PATH
  2472. shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  2473. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2474. soname_spec='$libname$release$shared_ext$major'
  2475. ;;
  2476. esac
  2477. # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
  2478. postinstall_cmds='chmod 555 $lib'
  2479. # or fails outright, so override atomically:
  2480. install_override_mode=555
  2481. ;;
  2482. interix[[3-9]]*)
  2483. version_type=linux # correct to gnu/linux during the next big refactor
  2484. need_lib_prefix=no
  2485. need_version=no
  2486. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2487. soname_spec='$libname$release$shared_ext$major'
  2488. dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
  2489. shlibpath_var=LD_LIBRARY_PATH
  2490. shlibpath_overrides_runpath=no
  2491. hardcode_into_libs=yes
  2492. ;;
  2493. irix5* | irix6* | nonstopux*)
  2494. case $host_os in
  2495. nonstopux*) version_type=nonstopux ;;
  2496. *)
  2497. if test yes = "$lt_cv_prog_gnu_ld"; then
  2498. version_type=linux # correct to gnu/linux during the next big refactor
  2499. else
  2500. version_type=irix
  2501. fi ;;
  2502. esac
  2503. need_lib_prefix=no
  2504. need_version=no
  2505. soname_spec='$libname$release$shared_ext$major'
  2506. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
  2507. case $host_os in
  2508. irix5* | nonstopux*)
  2509. libsuff= shlibsuff=
  2510. ;;
  2511. *)
  2512. case $LD in # libtool.m4 will add one of these switches to LD
  2513. *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
  2514. libsuff= shlibsuff= libmagic=32-bit;;
  2515. *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
  2516. libsuff=32 shlibsuff=N32 libmagic=N32;;
  2517. *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
  2518. libsuff=64 shlibsuff=64 libmagic=64-bit;;
  2519. *) libsuff= shlibsuff= libmagic=never-match;;
  2520. esac
  2521. ;;
  2522. esac
  2523. shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  2524. shlibpath_overrides_runpath=no
  2525. sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
  2526. sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
  2527. hardcode_into_libs=yes
  2528. ;;
  2529. # No shared lib support for Linux oldld, aout, or coff.
  2530. linux*oldld* | linux*aout* | linux*coff*)
  2531. dynamic_linker=no
  2532. ;;
  2533. linux*android*)
  2534. version_type=none # Android doesn't support versioned libraries.
  2535. need_lib_prefix=no
  2536. need_version=no
  2537. library_names_spec='$libname$release$shared_ext'
  2538. soname_spec='$libname$release$shared_ext'
  2539. finish_cmds=
  2540. shlibpath_var=LD_LIBRARY_PATH
  2541. shlibpath_overrides_runpath=yes
  2542. # This implies no fast_install, which is unacceptable.
  2543. # Some rework will be needed to allow for fast_install
  2544. # before this can be enabled.
  2545. hardcode_into_libs=yes
  2546. dynamic_linker='Android linker'
  2547. # Don't embed -rpath directories since the linker doesn't support them.
  2548. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  2549. ;;
  2550. # This must be glibc/ELF.
  2551. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  2552. version_type=linux # correct to gnu/linux during the next big refactor
  2553. need_lib_prefix=no
  2554. need_version=no
  2555. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2556. soname_spec='$libname$release$shared_ext$major'
  2557. finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  2558. shlibpath_var=LD_LIBRARY_PATH
  2559. shlibpath_overrides_runpath=no
  2560. # Some binutils ld are patched to set DT_RUNPATH
  2561. AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
  2562. [lt_cv_shlibpath_overrides_runpath=no
  2563. save_LDFLAGS=$LDFLAGS
  2564. save_libdir=$libdir
  2565. eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
  2566. LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
  2567. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  2568. [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
  2569. [lt_cv_shlibpath_overrides_runpath=yes])])
  2570. LDFLAGS=$save_LDFLAGS
  2571. libdir=$save_libdir
  2572. ])
  2573. shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
  2574. # This implies no fast_install, which is unacceptable.
  2575. # Some rework will be needed to allow for fast_install
  2576. # before this can be enabled.
  2577. hardcode_into_libs=yes
  2578. # Add ABI-specific directories to the system library path.
  2579. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
  2580. # Ideally, we could use ldconfig to report *all* directores which are
  2581. # searched for libraries, however this is still not possible. Aside from not
  2582. # being certain /sbin/ldconfig is available, command
  2583. # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
  2584. # even though it is searched at run-time. Try to do the best guess by
  2585. # appending ld.so.conf contents (and includes) to the search path.
  2586. if test -f /etc/ld.so.conf; then
  2587. lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
  2588. sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
  2589. fi
  2590. # We used to test for /lib/ld.so.1 and disable shared libraries on
  2591. # powerpc, because MkLinux only supported shared libraries with the
  2592. # GNU dynamic linker. Since this was broken with cross compilers,
  2593. # most powerpc-linux boxes support dynamic linking these days and
  2594. # people can always --disable-shared, the test was removed, and we
  2595. # assume the GNU/Linux dynamic linker is in use.
  2596. dynamic_linker='GNU/Linux ld.so'
  2597. ;;
  2598. netbsd*)
  2599. version_type=sunos
  2600. need_lib_prefix=no
  2601. need_version=no
  2602. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  2603. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  2604. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2605. dynamic_linker='NetBSD (a.out) ld.so'
  2606. else
  2607. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2608. soname_spec='$libname$release$shared_ext$major'
  2609. dynamic_linker='NetBSD ld.elf_so'
  2610. fi
  2611. shlibpath_var=LD_LIBRARY_PATH
  2612. shlibpath_overrides_runpath=yes
  2613. hardcode_into_libs=yes
  2614. ;;
  2615. newsos6)
  2616. version_type=linux # correct to gnu/linux during the next big refactor
  2617. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2618. shlibpath_var=LD_LIBRARY_PATH
  2619. shlibpath_overrides_runpath=yes
  2620. ;;
  2621. *nto* | *qnx*)
  2622. version_type=qnx
  2623. need_lib_prefix=no
  2624. need_version=no
  2625. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2626. soname_spec='$libname$release$shared_ext$major'
  2627. shlibpath_var=LD_LIBRARY_PATH
  2628. shlibpath_overrides_runpath=no
  2629. hardcode_into_libs=yes
  2630. dynamic_linker='ldqnx.so'
  2631. ;;
  2632. openbsd* | bitrig*)
  2633. version_type=sunos
  2634. sys_lib_dlsearch_path_spec=/usr/lib
  2635. need_lib_prefix=no
  2636. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
  2637. need_version=no
  2638. else
  2639. need_version=yes
  2640. fi
  2641. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  2642. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2643. shlibpath_var=LD_LIBRARY_PATH
  2644. shlibpath_overrides_runpath=yes
  2645. ;;
  2646. os2*)
  2647. libname_spec='$name'
  2648. version_type=windows
  2649. shrext_cmds=.dll
  2650. need_version=no
  2651. need_lib_prefix=no
  2652. # OS/2 can only load a DLL with a base name of 8 characters or less.
  2653. soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
  2654. v=$($ECHO $release$versuffix | tr -d .-);
  2655. n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
  2656. $ECHO $n$v`$shared_ext'
  2657. library_names_spec='${libname}_dll.$libext'
  2658. dynamic_linker='OS/2 ld.exe'
  2659. shlibpath_var=BEGINLIBPATH
  2660. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  2661. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2662. postinstall_cmds='base_file=`basename \$file`~
  2663. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
  2664. dldir=$destdir/`dirname \$dlpath`~
  2665. test -d \$dldir || mkdir -p \$dldir~
  2666. $install_prog $dir/$dlname \$dldir/$dlname~
  2667. chmod a+x \$dldir/$dlname~
  2668. if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
  2669. eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
  2670. fi'
  2671. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
  2672. dlpath=$dir/\$dldll~
  2673. $RM \$dlpath'
  2674. ;;
  2675. osf3* | osf4* | osf5*)
  2676. version_type=osf
  2677. need_lib_prefix=no
  2678. need_version=no
  2679. soname_spec='$libname$release$shared_ext$major'
  2680. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2681. shlibpath_var=LD_LIBRARY_PATH
  2682. sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  2683. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2684. ;;
  2685. rdos*)
  2686. dynamic_linker=no
  2687. ;;
  2688. solaris*)
  2689. version_type=linux # correct to gnu/linux during the next big refactor
  2690. need_lib_prefix=no
  2691. need_version=no
  2692. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2693. soname_spec='$libname$release$shared_ext$major'
  2694. shlibpath_var=LD_LIBRARY_PATH
  2695. shlibpath_overrides_runpath=yes
  2696. hardcode_into_libs=yes
  2697. # ldd complains unless libraries are executable
  2698. postinstall_cmds='chmod +x $lib'
  2699. ;;
  2700. sunos4*)
  2701. version_type=sunos
  2702. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  2703. finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  2704. shlibpath_var=LD_LIBRARY_PATH
  2705. shlibpath_overrides_runpath=yes
  2706. if test yes = "$with_gnu_ld"; then
  2707. need_lib_prefix=no
  2708. fi
  2709. need_version=yes
  2710. ;;
  2711. sysv4 | sysv4.3*)
  2712. version_type=linux # correct to gnu/linux during the next big refactor
  2713. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2714. soname_spec='$libname$release$shared_ext$major'
  2715. shlibpath_var=LD_LIBRARY_PATH
  2716. case $host_vendor in
  2717. sni)
  2718. shlibpath_overrides_runpath=no
  2719. need_lib_prefix=no
  2720. runpath_var=LD_RUN_PATH
  2721. ;;
  2722. siemens)
  2723. need_lib_prefix=no
  2724. ;;
  2725. motorola)
  2726. need_lib_prefix=no
  2727. need_version=no
  2728. shlibpath_overrides_runpath=no
  2729. sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  2730. ;;
  2731. esac
  2732. ;;
  2733. sysv4*MP*)
  2734. if test -d /usr/nec; then
  2735. version_type=linux # correct to gnu/linux during the next big refactor
  2736. library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
  2737. soname_spec='$libname$shared_ext.$major'
  2738. shlibpath_var=LD_LIBRARY_PATH
  2739. fi
  2740. ;;
  2741. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  2742. version_type=sco
  2743. need_lib_prefix=no
  2744. need_version=no
  2745. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
  2746. soname_spec='$libname$release$shared_ext$major'
  2747. shlibpath_var=LD_LIBRARY_PATH
  2748. shlibpath_overrides_runpath=yes
  2749. hardcode_into_libs=yes
  2750. if test yes = "$with_gnu_ld"; then
  2751. sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
  2752. else
  2753. sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
  2754. case $host_os in
  2755. sco3.2v5*)
  2756. sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
  2757. ;;
  2758. esac
  2759. fi
  2760. sys_lib_dlsearch_path_spec='/usr/lib'
  2761. ;;
  2762. tpf*)
  2763. # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
  2764. version_type=linux # correct to gnu/linux during the next big refactor
  2765. need_lib_prefix=no
  2766. need_version=no
  2767. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2768. shlibpath_var=LD_LIBRARY_PATH
  2769. shlibpath_overrides_runpath=no
  2770. hardcode_into_libs=yes
  2771. ;;
  2772. uts4*)
  2773. version_type=linux # correct to gnu/linux during the next big refactor
  2774. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2775. soname_spec='$libname$release$shared_ext$major'
  2776. shlibpath_var=LD_LIBRARY_PATH
  2777. ;;
  2778. *)
  2779. dynamic_linker=no
  2780. ;;
  2781. esac
  2782. AC_MSG_RESULT([$dynamic_linker])
  2783. test no = "$dynamic_linker" && can_build_shared=no
  2784. variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  2785. if test yes = "$GCC"; then
  2786. variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  2787. fi
  2788. if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
  2789. sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
  2790. fi
  2791. if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
  2792. sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
  2793. fi
  2794. # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
  2795. configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
  2796. # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
  2797. func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
  2798. # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
  2799. configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
  2800. _LT_DECL([], [variables_saved_for_relink], [1],
  2801. [Variables whose values should be saved in libtool wrapper scripts and
  2802. restored at link time])
  2803. _LT_DECL([], [need_lib_prefix], [0],
  2804. [Do we need the "lib" prefix for modules?])
  2805. _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
  2806. _LT_DECL([], [version_type], [0], [Library versioning type])
  2807. _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
  2808. _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
  2809. _LT_DECL([], [shlibpath_overrides_runpath], [0],
  2810. [Is shlibpath searched before the hard-coded library search path?])
  2811. _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
  2812. _LT_DECL([], [library_names_spec], [1],
  2813. [[List of archive names. First name is the real one, the rest are links.
  2814. The last name is the one that the linker finds with -lNAME]])
  2815. _LT_DECL([], [soname_spec], [1],
  2816. [[The coded name of the library, if different from the real name]])
  2817. _LT_DECL([], [install_override_mode], [1],
  2818. [Permission mode override for installation of shared libraries])
  2819. _LT_DECL([], [postinstall_cmds], [2],
  2820. [Command to use after installation of a shared archive])
  2821. _LT_DECL([], [postuninstall_cmds], [2],
  2822. [Command to use after uninstallation of a shared archive])
  2823. _LT_DECL([], [finish_cmds], [2],
  2824. [Commands used to finish a libtool library installation in a directory])
  2825. _LT_DECL([], [finish_eval], [1],
  2826. [[As "finish_cmds", except a single script fragment to be evaled but
  2827. not shown]])
  2828. _LT_DECL([], [hardcode_into_libs], [0],
  2829. [Whether we should hardcode library paths into libraries])
  2830. _LT_DECL([], [sys_lib_search_path_spec], [2],
  2831. [Compile-time system search path for libraries])
  2832. _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
  2833. [Detected run-time system search path for libraries])
  2834. _LT_DECL([], [configure_time_lt_sys_library_path], [2],
  2835. [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
  2836. ])# _LT_SYS_DYNAMIC_LINKER
  2837. # _LT_PATH_TOOL_PREFIX(TOOL)
  2838. # --------------------------
  2839. # find a file program that can recognize shared library
  2840. AC_DEFUN([_LT_PATH_TOOL_PREFIX],
  2841. [m4_require([_LT_DECL_EGREP])dnl
  2842. AC_MSG_CHECKING([for $1])
  2843. AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
  2844. [case $MAGIC_CMD in
  2845. [[\\/*] | ?:[\\/]*])
  2846. lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
  2847. ;;
  2848. *)
  2849. lt_save_MAGIC_CMD=$MAGIC_CMD
  2850. lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
  2851. dnl $ac_dummy forces splitting on constant user-supplied paths.
  2852. dnl POSIX.2 word splitting is done only on the output of word expansions,
  2853. dnl not every word. This closes a longstanding sh security hole.
  2854. ac_dummy="m4_if([$2], , $PATH, [$2])"
  2855. for ac_dir in $ac_dummy; do
  2856. IFS=$lt_save_ifs
  2857. test -z "$ac_dir" && ac_dir=.
  2858. if test -f "$ac_dir/$1"; then
  2859. lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
  2860. if test -n "$file_magic_test_file"; then
  2861. case $deplibs_check_method in
  2862. "file_magic "*)
  2863. file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
  2864. MAGIC_CMD=$lt_cv_path_MAGIC_CMD
  2865. if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  2866. $EGREP "$file_magic_regex" > /dev/null; then
  2867. :
  2868. else
  2869. cat <<_LT_EOF 1>&2
  2870. *** Warning: the command libtool uses to detect shared libraries,
  2871. *** $file_magic_cmd, produces output that libtool cannot recognize.
  2872. *** The result is that libtool may fail to recognize shared libraries
  2873. *** as such. This will affect the creation of libtool libraries that
  2874. *** depend on shared libraries, but programs linked with such libtool
  2875. *** libraries will work regardless of this problem. Nevertheless, you
  2876. *** may want to report the problem to your system manager and/or to
  2877. *** bug-libtool@gnu.org
  2878. _LT_EOF
  2879. fi ;;
  2880. esac
  2881. fi
  2882. break
  2883. fi
  2884. done
  2885. IFS=$lt_save_ifs
  2886. MAGIC_CMD=$lt_save_MAGIC_CMD
  2887. ;;
  2888. esac])
  2889. MAGIC_CMD=$lt_cv_path_MAGIC_CMD
  2890. if test -n "$MAGIC_CMD"; then
  2891. AC_MSG_RESULT($MAGIC_CMD)
  2892. else
  2893. AC_MSG_RESULT(no)
  2894. fi
  2895. _LT_DECL([], [MAGIC_CMD], [0],
  2896. [Used to examine libraries when file_magic_cmd begins with "file"])dnl
  2897. ])# _LT_PATH_TOOL_PREFIX
  2898. # Old name:
  2899. AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
  2900. dnl aclocal-1.4 backwards compatibility:
  2901. dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
  2902. # _LT_PATH_MAGIC
  2903. # --------------
  2904. # find a file program that can recognize a shared library
  2905. m4_defun([_LT_PATH_MAGIC],
  2906. [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
  2907. if test -z "$lt_cv_path_MAGIC_CMD"; then
  2908. if test -n "$ac_tool_prefix"; then
  2909. _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
  2910. else
  2911. MAGIC_CMD=:
  2912. fi
  2913. fi
  2914. ])# _LT_PATH_MAGIC
  2915. # LT_PATH_LD
  2916. # ----------
  2917. # find the pathname to the GNU or non-GNU linker
  2918. AC_DEFUN([LT_PATH_LD],
  2919. [AC_REQUIRE([AC_PROG_CC])dnl
  2920. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2921. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  2922. m4_require([_LT_DECL_SED])dnl
  2923. m4_require([_LT_DECL_EGREP])dnl
  2924. m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
  2925. AC_ARG_WITH([gnu-ld],
  2926. [AS_HELP_STRING([--with-gnu-ld],
  2927. [assume the C compiler uses GNU ld @<:@default=no@:>@])],
  2928. [test no = "$withval" || with_gnu_ld=yes],
  2929. [with_gnu_ld=no])dnl
  2930. ac_prog=ld
  2931. if test yes = "$GCC"; then
  2932. # Check if gcc -print-prog-name=ld gives a path.
  2933. AC_MSG_CHECKING([for ld used by $CC])
  2934. case $host in
  2935. *-*-mingw*)
  2936. # gcc leaves a trailing carriage return, which upsets mingw
  2937. ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  2938. *)
  2939. ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  2940. esac
  2941. case $ac_prog in
  2942. # Accept absolute paths.
  2943. [[\\/]]* | ?:[[\\/]]*)
  2944. re_direlt='/[[^/]][[^/]]*/\.\./'
  2945. # Canonicalize the pathname of ld
  2946. ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
  2947. while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
  2948. ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
  2949. done
  2950. test -z "$LD" && LD=$ac_prog
  2951. ;;
  2952. "")
  2953. # If it fails, then pretend we aren't using GCC.
  2954. ac_prog=ld
  2955. ;;
  2956. *)
  2957. # If it is relative, then search for the first ld in PATH.
  2958. with_gnu_ld=unknown
  2959. ;;
  2960. esac
  2961. elif test yes = "$with_gnu_ld"; then
  2962. AC_MSG_CHECKING([for GNU ld])
  2963. else
  2964. AC_MSG_CHECKING([for non-GNU ld])
  2965. fi
  2966. AC_CACHE_VAL(lt_cv_path_LD,
  2967. [if test -z "$LD"; then
  2968. lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
  2969. for ac_dir in $PATH; do
  2970. IFS=$lt_save_ifs
  2971. test -z "$ac_dir" && ac_dir=.
  2972. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  2973. lt_cv_path_LD=$ac_dir/$ac_prog
  2974. # Check to see if the program is GNU ld. I'd rather use --version,
  2975. # but apparently some variants of GNU ld only accept -v.
  2976. # Break only if it was the GNU/non-GNU ld that we prefer.
  2977. case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
  2978. *GNU* | *'with BFD'*)
  2979. test no != "$with_gnu_ld" && break
  2980. ;;
  2981. *)
  2982. test yes != "$with_gnu_ld" && break
  2983. ;;
  2984. esac
  2985. fi
  2986. done
  2987. IFS=$lt_save_ifs
  2988. else
  2989. lt_cv_path_LD=$LD # Let the user override the test with a path.
  2990. fi])
  2991. LD=$lt_cv_path_LD
  2992. if test -n "$LD"; then
  2993. AC_MSG_RESULT($LD)
  2994. else
  2995. AC_MSG_RESULT(no)
  2996. fi
  2997. test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  2998. _LT_PATH_LD_GNU
  2999. AC_SUBST([LD])
  3000. _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
  3001. ])# LT_PATH_LD
  3002. # Old names:
  3003. AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
  3004. AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
  3005. dnl aclocal-1.4 backwards compatibility:
  3006. dnl AC_DEFUN([AM_PROG_LD], [])
  3007. dnl AC_DEFUN([AC_PROG_LD], [])
  3008. # _LT_PATH_LD_GNU
  3009. #- --------------
  3010. m4_defun([_LT_PATH_LD_GNU],
  3011. [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
  3012. [# I'd rather use --version here, but apparently some GNU lds only accept -v.
  3013. case `$LD -v 2>&1 </dev/null` in
  3014. *GNU* | *'with BFD'*)
  3015. lt_cv_prog_gnu_ld=yes
  3016. ;;
  3017. *)
  3018. lt_cv_prog_gnu_ld=no
  3019. ;;
  3020. esac])
  3021. with_gnu_ld=$lt_cv_prog_gnu_ld
  3022. ])# _LT_PATH_LD_GNU
  3023. # _LT_CMD_RELOAD
  3024. # --------------
  3025. # find reload flag for linker
  3026. # -- PORTME Some linkers may need a different reload flag.
  3027. m4_defun([_LT_CMD_RELOAD],
  3028. [AC_CACHE_CHECK([for $LD option to reload object files],
  3029. lt_cv_ld_reload_flag,
  3030. [lt_cv_ld_reload_flag='-r'])
  3031. reload_flag=$lt_cv_ld_reload_flag
  3032. case $reload_flag in
  3033. "" | " "*) ;;
  3034. *) reload_flag=" $reload_flag" ;;
  3035. esac
  3036. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  3037. case $host_os in
  3038. cygwin* | mingw* | pw32* | cegcc*)
  3039. if test yes != "$GCC"; then
  3040. reload_cmds=false
  3041. fi
  3042. ;;
  3043. darwin*)
  3044. if test yes = "$GCC"; then
  3045. reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
  3046. else
  3047. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  3048. fi
  3049. ;;
  3050. esac
  3051. _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
  3052. _LT_TAGDECL([], [reload_cmds], [2])dnl
  3053. ])# _LT_CMD_RELOAD
  3054. # _LT_PATH_DD
  3055. # -----------
  3056. # find a working dd
  3057. m4_defun([_LT_PATH_DD],
  3058. [AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
  3059. [printf 0123456789abcdef0123456789abcdef >conftest.i
  3060. cat conftest.i conftest.i >conftest2.i
  3061. : ${lt_DD:=$DD}
  3062. AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
  3063. [if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
  3064. cmp -s conftest.i conftest.out \
  3065. && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
  3066. fi])
  3067. rm -f conftest.i conftest2.i conftest.out])
  3068. ])# _LT_PATH_DD
  3069. # _LT_CMD_TRUNCATE
  3070. # ----------------
  3071. # find command to truncate a binary pipe
  3072. m4_defun([_LT_CMD_TRUNCATE],
  3073. [m4_require([_LT_PATH_DD])
  3074. AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
  3075. [printf 0123456789abcdef0123456789abcdef >conftest.i
  3076. cat conftest.i conftest.i >conftest2.i
  3077. lt_cv_truncate_bin=
  3078. if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
  3079. cmp -s conftest.i conftest.out \
  3080. && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
  3081. fi
  3082. rm -f conftest.i conftest2.i conftest.out
  3083. test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
  3084. _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
  3085. [Command to truncate a binary pipe])
  3086. ])# _LT_CMD_TRUNCATE
  3087. # _LT_CHECK_MAGIC_METHOD
  3088. # ----------------------
  3089. # how to check for library dependencies
  3090. # -- PORTME fill in with the dynamic library characteristics
  3091. m4_defun([_LT_CHECK_MAGIC_METHOD],
  3092. [m4_require([_LT_DECL_EGREP])
  3093. m4_require([_LT_DECL_OBJDUMP])
  3094. AC_CACHE_CHECK([how to recognize dependent libraries],
  3095. lt_cv_deplibs_check_method,
  3096. [lt_cv_file_magic_cmd='$MAGIC_CMD'
  3097. lt_cv_file_magic_test_file=
  3098. lt_cv_deplibs_check_method='unknown'
  3099. # Need to set the preceding variable on all platforms that support
  3100. # interlibrary dependencies.
  3101. # 'none' -- dependencies not supported.
  3102. # 'unknown' -- same as none, but documents that we really don't know.
  3103. # 'pass_all' -- all dependencies passed with no checks.
  3104. # 'test_compile' -- check by making test program.
  3105. # 'file_magic [[regex]]' -- check by looking for files in library path
  3106. # that responds to the $file_magic_cmd with a given extended regex.
  3107. # If you have 'file' or equivalent on your system and you're not sure
  3108. # whether 'pass_all' will *always* work, you probably want this one.
  3109. case $host_os in
  3110. aix[[4-9]]*)
  3111. lt_cv_deplibs_check_method=pass_all
  3112. ;;
  3113. beos*)
  3114. lt_cv_deplibs_check_method=pass_all
  3115. ;;
  3116. bsdi[[45]]*)
  3117. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
  3118. lt_cv_file_magic_cmd='/usr/bin/file -L'
  3119. lt_cv_file_magic_test_file=/shlib/libc.so
  3120. ;;
  3121. cygwin*)
  3122. # func_win32_libid is a shell function defined in ltmain.sh
  3123. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  3124. lt_cv_file_magic_cmd='func_win32_libid'
  3125. ;;
  3126. mingw* | pw32*)
  3127. # Base MSYS/MinGW do not provide the 'file' command needed by
  3128. # func_win32_libid shell function, so use a weaker test based on 'objdump',
  3129. # unless we find 'file', for example because we are cross-compiling.
  3130. if ( file / ) >/dev/null 2>&1; then
  3131. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  3132. lt_cv_file_magic_cmd='func_win32_libid'
  3133. else
  3134. # Keep this pattern in sync with the one in func_win32_libid.
  3135. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
  3136. lt_cv_file_magic_cmd='$OBJDUMP -f'
  3137. fi
  3138. ;;
  3139. cegcc*)
  3140. # use the weaker test based on 'objdump'. See mingw*.
  3141. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
  3142. lt_cv_file_magic_cmd='$OBJDUMP -f'
  3143. ;;
  3144. darwin* | rhapsody*)
  3145. lt_cv_deplibs_check_method=pass_all
  3146. ;;
  3147. freebsd* | dragonfly*)
  3148. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  3149. case $host_cpu in
  3150. i*86 )
  3151. # Not sure whether the presence of OpenBSD here was a mistake.
  3152. # Let's accept both of them until this is cleared up.
  3153. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
  3154. lt_cv_file_magic_cmd=/usr/bin/file
  3155. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  3156. ;;
  3157. esac
  3158. else
  3159. lt_cv_deplibs_check_method=pass_all
  3160. fi
  3161. ;;
  3162. haiku*)
  3163. lt_cv_deplibs_check_method=pass_all
  3164. ;;
  3165. hpux10.20* | hpux11*)
  3166. lt_cv_file_magic_cmd=/usr/bin/file
  3167. case $host_cpu in
  3168. ia64*)
  3169. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
  3170. lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
  3171. ;;
  3172. hppa*64*)
  3173. [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
  3174. lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
  3175. ;;
  3176. *)
  3177. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
  3178. lt_cv_file_magic_test_file=/usr/lib/libc.sl
  3179. ;;
  3180. esac
  3181. ;;
  3182. interix[[3-9]]*)
  3183. # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
  3184. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
  3185. ;;
  3186. irix5* | irix6* | nonstopux*)
  3187. case $LD in
  3188. *-32|*"-32 ") libmagic=32-bit;;
  3189. *-n32|*"-n32 ") libmagic=N32;;
  3190. *-64|*"-64 ") libmagic=64-bit;;
  3191. *) libmagic=never-match;;
  3192. esac
  3193. lt_cv_deplibs_check_method=pass_all
  3194. ;;
  3195. # This must be glibc/ELF.
  3196. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  3197. lt_cv_deplibs_check_method=pass_all
  3198. ;;
  3199. netbsd*)
  3200. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  3201. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  3202. else
  3203. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
  3204. fi
  3205. ;;
  3206. newos6*)
  3207. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
  3208. lt_cv_file_magic_cmd=/usr/bin/file
  3209. lt_cv_file_magic_test_file=/usr/lib/libnls.so
  3210. ;;
  3211. *nto* | *qnx*)
  3212. lt_cv_deplibs_check_method=pass_all
  3213. ;;
  3214. openbsd* | bitrig*)
  3215. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
  3216. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
  3217. else
  3218. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  3219. fi
  3220. ;;
  3221. osf3* | osf4* | osf5*)
  3222. lt_cv_deplibs_check_method=pass_all
  3223. ;;
  3224. rdos*)
  3225. lt_cv_deplibs_check_method=pass_all
  3226. ;;
  3227. solaris*)
  3228. lt_cv_deplibs_check_method=pass_all
  3229. ;;
  3230. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  3231. lt_cv_deplibs_check_method=pass_all
  3232. ;;
  3233. sysv4 | sysv4.3*)
  3234. case $host_vendor in
  3235. motorola)
  3236. 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]]'
  3237. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  3238. ;;
  3239. ncr)
  3240. lt_cv_deplibs_check_method=pass_all
  3241. ;;
  3242. sequent)
  3243. lt_cv_file_magic_cmd='/bin/file'
  3244. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
  3245. ;;
  3246. sni)
  3247. lt_cv_file_magic_cmd='/bin/file'
  3248. lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
  3249. lt_cv_file_magic_test_file=/lib/libc.so
  3250. ;;
  3251. siemens)
  3252. lt_cv_deplibs_check_method=pass_all
  3253. ;;
  3254. pc)
  3255. lt_cv_deplibs_check_method=pass_all
  3256. ;;
  3257. esac
  3258. ;;
  3259. tpf*)
  3260. lt_cv_deplibs_check_method=pass_all
  3261. ;;
  3262. os2*)
  3263. lt_cv_deplibs_check_method=pass_all
  3264. ;;
  3265. esac
  3266. ])
  3267. file_magic_glob=
  3268. want_nocaseglob=no
  3269. if test "$build" = "$host"; then
  3270. case $host_os in
  3271. mingw* | pw32*)
  3272. if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
  3273. want_nocaseglob=yes
  3274. else
  3275. file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
  3276. fi
  3277. ;;
  3278. esac
  3279. fi
  3280. file_magic_cmd=$lt_cv_file_magic_cmd
  3281. deplibs_check_method=$lt_cv_deplibs_check_method
  3282. test -z "$deplibs_check_method" && deplibs_check_method=unknown
  3283. _LT_DECL([], [deplibs_check_method], [1],
  3284. [Method to check whether dependent libraries are shared objects])
  3285. _LT_DECL([], [file_magic_cmd], [1],
  3286. [Command to use when deplibs_check_method = "file_magic"])
  3287. _LT_DECL([], [file_magic_glob], [1],
  3288. [How to find potential files when deplibs_check_method = "file_magic"])
  3289. _LT_DECL([], [want_nocaseglob], [1],
  3290. [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
  3291. ])# _LT_CHECK_MAGIC_METHOD
  3292. # LT_PATH_NM
  3293. # ----------
  3294. # find the pathname to a BSD- or MS-compatible name lister
  3295. AC_DEFUN([LT_PATH_NM],
  3296. [AC_REQUIRE([AC_PROG_CC])dnl
  3297. AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
  3298. [if test -n "$NM"; then
  3299. # Let the user override the test.
  3300. lt_cv_path_NM=$NM
  3301. else
  3302. lt_nm_to_check=${ac_tool_prefix}nm
  3303. if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
  3304. lt_nm_to_check="$lt_nm_to_check nm"
  3305. fi
  3306. for lt_tmp_nm in $lt_nm_to_check; do
  3307. lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
  3308. for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
  3309. IFS=$lt_save_ifs
  3310. test -z "$ac_dir" && ac_dir=.
  3311. tmp_nm=$ac_dir/$lt_tmp_nm
  3312. if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
  3313. # Check to see if the nm accepts a BSD-compat flag.
  3314. # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
  3315. # nm: unknown option "B" ignored
  3316. # Tru64's nm complains that /dev/null is an invalid object file
  3317. # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
  3318. case $build_os in
  3319. mingw*) lt_bad_file=conftest.nm/nofile ;;
  3320. *) lt_bad_file=/dev/null ;;
  3321. esac
  3322. case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
  3323. *$lt_bad_file* | *'Invalid file or object type'*)
  3324. lt_cv_path_NM="$tmp_nm -B"
  3325. break 2
  3326. ;;
  3327. *)
  3328. case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
  3329. */dev/null*)
  3330. lt_cv_path_NM="$tmp_nm -p"
  3331. break 2
  3332. ;;
  3333. *)
  3334. lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
  3335. continue # so that we can try to find one that supports BSD flags
  3336. ;;
  3337. esac
  3338. ;;
  3339. esac
  3340. fi
  3341. done
  3342. IFS=$lt_save_ifs
  3343. done
  3344. : ${lt_cv_path_NM=no}
  3345. fi])
  3346. if test no != "$lt_cv_path_NM"; then
  3347. NM=$lt_cv_path_NM
  3348. else
  3349. # Didn't find any BSD compatible name lister, look for dumpbin.
  3350. if test -n "$DUMPBIN"; then :
  3351. # Let the user override the test.
  3352. else
  3353. AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
  3354. case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
  3355. *COFF*)
  3356. DUMPBIN="$DUMPBIN -symbols -headers"
  3357. ;;
  3358. *)
  3359. DUMPBIN=:
  3360. ;;
  3361. esac
  3362. fi
  3363. AC_SUBST([DUMPBIN])
  3364. if test : != "$DUMPBIN"; then
  3365. NM=$DUMPBIN
  3366. fi
  3367. fi
  3368. test -z "$NM" && NM=nm
  3369. AC_SUBST([NM])
  3370. _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
  3371. AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
  3372. [lt_cv_nm_interface="BSD nm"
  3373. echo "int some_variable = 0;" > conftest.$ac_ext
  3374. (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
  3375. (eval "$ac_compile" 2>conftest.err)
  3376. cat conftest.err >&AS_MESSAGE_LOG_FD
  3377. (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
  3378. (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
  3379. cat conftest.err >&AS_MESSAGE_LOG_FD
  3380. (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
  3381. cat conftest.out >&AS_MESSAGE_LOG_FD
  3382. if $GREP 'External.*some_variable' conftest.out > /dev/null; then
  3383. lt_cv_nm_interface="MS dumpbin"
  3384. fi
  3385. rm -f conftest*])
  3386. ])# LT_PATH_NM
  3387. # Old names:
  3388. AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
  3389. AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
  3390. dnl aclocal-1.4 backwards compatibility:
  3391. dnl AC_DEFUN([AM_PROG_NM], [])
  3392. dnl AC_DEFUN([AC_PROG_NM], [])
  3393. # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  3394. # --------------------------------
  3395. # how to determine the name of the shared library
  3396. # associated with a specific link library.
  3397. # -- PORTME fill in with the dynamic library characteristics
  3398. m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
  3399. [m4_require([_LT_DECL_EGREP])
  3400. m4_require([_LT_DECL_OBJDUMP])
  3401. m4_require([_LT_DECL_DLLTOOL])
  3402. AC_CACHE_CHECK([how to associate runtime and link libraries],
  3403. lt_cv_sharedlib_from_linklib_cmd,
  3404. [lt_cv_sharedlib_from_linklib_cmd='unknown'
  3405. case $host_os in
  3406. cygwin* | mingw* | pw32* | cegcc*)
  3407. # two different shell functions defined in ltmain.sh;
  3408. # decide which one to use based on capabilities of $DLLTOOL
  3409. case `$DLLTOOL --help 2>&1` in
  3410. *--identify-strict*)
  3411. lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
  3412. ;;
  3413. *)
  3414. lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
  3415. ;;
  3416. esac
  3417. ;;
  3418. *)
  3419. # fallback: assume linklib IS sharedlib
  3420. lt_cv_sharedlib_from_linklib_cmd=$ECHO
  3421. ;;
  3422. esac
  3423. ])
  3424. sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
  3425. test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
  3426. _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
  3427. [Command to associate shared and link libraries])
  3428. ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  3429. # _LT_PATH_MANIFEST_TOOL
  3430. # ----------------------
  3431. # locate the manifest tool
  3432. m4_defun([_LT_PATH_MANIFEST_TOOL],
  3433. [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
  3434. test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
  3435. AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
  3436. [lt_cv_path_mainfest_tool=no
  3437. echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
  3438. $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
  3439. cat conftest.err >&AS_MESSAGE_LOG_FD
  3440. if $GREP 'Manifest Tool' conftest.out > /dev/null; then
  3441. lt_cv_path_mainfest_tool=yes
  3442. fi
  3443. rm -f conftest*])
  3444. if test yes != "$lt_cv_path_mainfest_tool"; then
  3445. MANIFEST_TOOL=:
  3446. fi
  3447. _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
  3448. ])# _LT_PATH_MANIFEST_TOOL
  3449. # _LT_DLL_DEF_P([FILE])
  3450. # ---------------------
  3451. # True iff FILE is a Windows DLL '.def' file.
  3452. # Keep in sync with func_dll_def_p in the libtool script
  3453. AC_DEFUN([_LT_DLL_DEF_P],
  3454. [dnl
  3455. test DEF = "`$SED -n dnl
  3456. -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace
  3457. -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments
  3458. -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl
  3459. -e q dnl Only consider the first "real" line
  3460. $1`" dnl
  3461. ])# _LT_DLL_DEF_P
  3462. # LT_LIB_M
  3463. # --------
  3464. # check for math library
  3465. AC_DEFUN([LT_LIB_M],
  3466. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3467. LIBM=
  3468. case $host in
  3469. *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
  3470. # These system don't have libm, or don't need it
  3471. ;;
  3472. *-ncr-sysv4.3*)
  3473. AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
  3474. AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
  3475. ;;
  3476. *)
  3477. AC_CHECK_LIB(m, cos, LIBM=-lm)
  3478. ;;
  3479. esac
  3480. AC_SUBST([LIBM])
  3481. ])# LT_LIB_M
  3482. # Old name:
  3483. AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
  3484. dnl aclocal-1.4 backwards compatibility:
  3485. dnl AC_DEFUN([AC_CHECK_LIBM], [])
  3486. # _LT_COMPILER_NO_RTTI([TAGNAME])
  3487. # -------------------------------
  3488. m4_defun([_LT_COMPILER_NO_RTTI],
  3489. [m4_require([_LT_TAG_COMPILER])dnl
  3490. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  3491. if test yes = "$GCC"; then
  3492. case $cc_basename in
  3493. nvcc*)
  3494. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
  3495. *)
  3496. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
  3497. esac
  3498. _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
  3499. lt_cv_prog_compiler_rtti_exceptions,
  3500. [-fno-rtti -fno-exceptions], [],
  3501. [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
  3502. fi
  3503. _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
  3504. [Compiler flag to turn off builtin functions])
  3505. ])# _LT_COMPILER_NO_RTTI
  3506. # _LT_CMD_GLOBAL_SYMBOLS
  3507. # ----------------------
  3508. m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
  3509. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3510. AC_REQUIRE([AC_PROG_CC])dnl
  3511. AC_REQUIRE([AC_PROG_AWK])dnl
  3512. AC_REQUIRE([LT_PATH_NM])dnl
  3513. AC_REQUIRE([LT_PATH_LD])dnl
  3514. m4_require([_LT_DECL_SED])dnl
  3515. m4_require([_LT_DECL_EGREP])dnl
  3516. m4_require([_LT_TAG_COMPILER])dnl
  3517. # Check for command to grab the raw symbol name followed by C symbol from nm.
  3518. AC_MSG_CHECKING([command to parse $NM output from $compiler object])
  3519. AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
  3520. [
  3521. # These are sane defaults that work on at least a few old systems.
  3522. # [They come from Ultrix. What could be older than Ultrix?!! ;)]
  3523. # Character class describing NM global symbol codes.
  3524. symcode='[[BCDEGRST]]'
  3525. # Regexp to match symbols that can be accessed directly from C.
  3526. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
  3527. # Define system-specific variables.
  3528. case $host_os in
  3529. aix*)
  3530. symcode='[[BCDT]]'
  3531. ;;
  3532. cygwin* | mingw* | pw32* | cegcc*)
  3533. symcode='[[ABCDGISTW]]'
  3534. ;;
  3535. hpux*)
  3536. if test ia64 = "$host_cpu"; then
  3537. symcode='[[ABCDEGRST]]'
  3538. fi
  3539. ;;
  3540. irix* | nonstopux*)
  3541. symcode='[[BCDEGRST]]'
  3542. ;;
  3543. osf*)
  3544. symcode='[[BCDEGQRST]]'
  3545. ;;
  3546. solaris*)
  3547. symcode='[[BDRT]]'
  3548. ;;
  3549. sco3.2v5*)
  3550. symcode='[[DT]]'
  3551. ;;
  3552. sysv4.2uw2*)
  3553. symcode='[[DT]]'
  3554. ;;
  3555. sysv5* | sco5v6* | unixware* | OpenUNIX*)
  3556. symcode='[[ABDT]]'
  3557. ;;
  3558. sysv4)
  3559. symcode='[[DFNSTU]]'
  3560. ;;
  3561. esac
  3562. # If we're using GNU nm, then use its standard symbol codes.
  3563. case `$NM -V 2>&1` in
  3564. *GNU* | *'with BFD'*)
  3565. symcode='[[ABCDGIRSTW]]' ;;
  3566. esac
  3567. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3568. # Gets list of data symbols to import.
  3569. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
  3570. # Adjust the below global symbol transforms to fixup imported variables.
  3571. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
  3572. lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
  3573. lt_c_name_lib_hook="\
  3574. -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
  3575. -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
  3576. else
  3577. # Disable hooks by default.
  3578. lt_cv_sys_global_symbol_to_import=
  3579. lt_cdecl_hook=
  3580. lt_c_name_hook=
  3581. lt_c_name_lib_hook=
  3582. fi
  3583. # Transform an extracted symbol line into a proper C declaration.
  3584. # Some systems (esp. on ia64) link data and code symbols differently,
  3585. # so use this general approach.
  3586. lt_cv_sys_global_symbol_to_cdecl="sed -n"\
  3587. $lt_cdecl_hook\
  3588. " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
  3589. " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
  3590. # Transform an extracted symbol line into symbol name and symbol address
  3591. lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
  3592. $lt_c_name_hook\
  3593. " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
  3594. " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
  3595. # Transform an extracted symbol line into symbol name with lib prefix and
  3596. # symbol address.
  3597. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
  3598. $lt_c_name_lib_hook\
  3599. " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
  3600. " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
  3601. " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
  3602. # Handle CRLF in mingw tool chain
  3603. opt_cr=
  3604. case $build_os in
  3605. mingw*)
  3606. opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  3607. ;;
  3608. esac
  3609. # Try without a prefix underscore, then with it.
  3610. for ac_symprfx in "" "_"; do
  3611. # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
  3612. symxfrm="\\1 $ac_symprfx\\2 \\2"
  3613. # Write the raw and C identifiers.
  3614. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3615. # Fake it for dumpbin and say T for any non-static function,
  3616. # D for any global variable and I for any imported variable.
  3617. # Also find C++ and __fastcall symbols from MSVC++,
  3618. # which start with @ or ?.
  3619. lt_cv_sys_global_symbol_pipe="$AWK ['"\
  3620. " {last_section=section; section=\$ 3};"\
  3621. " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
  3622. " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
  3623. " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
  3624. " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
  3625. " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
  3626. " \$ 0!~/External *\|/{next};"\
  3627. " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
  3628. " {if(hide[section]) next};"\
  3629. " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
  3630. " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
  3631. " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
  3632. " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
  3633. " ' prfx=^$ac_symprfx]"
  3634. else
  3635. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
  3636. fi
  3637. lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
  3638. # Check to see that the pipe works correctly.
  3639. pipe_works=no
  3640. rm -f conftest*
  3641. cat > conftest.$ac_ext <<_LT_EOF
  3642. #ifdef __cplusplus
  3643. extern "C" {
  3644. #endif
  3645. char nm_test_var;
  3646. void nm_test_func(void);
  3647. void nm_test_func(void){}
  3648. #ifdef __cplusplus
  3649. }
  3650. #endif
  3651. int main(){nm_test_var='a';nm_test_func();return(0);}
  3652. _LT_EOF
  3653. if AC_TRY_EVAL(ac_compile); then
  3654. # Now try to grab the symbols.
  3655. nlist=conftest.nm
  3656. if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
  3657. # Try sorting and uniquifying the output.
  3658. if sort "$nlist" | uniq > "$nlist"T; then
  3659. mv -f "$nlist"T "$nlist"
  3660. else
  3661. rm -f "$nlist"T
  3662. fi
  3663. # Make sure that we snagged all the symbols we need.
  3664. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
  3665. if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
  3666. cat <<_LT_EOF > conftest.$ac_ext
  3667. /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
  3668. #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
  3669. /* DATA imports from DLLs on WIN32 can't be const, because runtime
  3670. relocations are performed -- see ld's documentation on pseudo-relocs. */
  3671. # define LT@&t@_DLSYM_CONST
  3672. #elif defined __osf__
  3673. /* This system does not cope well with relocations in const data. */
  3674. # define LT@&t@_DLSYM_CONST
  3675. #else
  3676. # define LT@&t@_DLSYM_CONST const
  3677. #endif
  3678. #ifdef __cplusplus
  3679. extern "C" {
  3680. #endif
  3681. _LT_EOF
  3682. # Now generate the symbol file.
  3683. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
  3684. cat <<_LT_EOF >> conftest.$ac_ext
  3685. /* The mapping between symbol names and symbols. */
  3686. LT@&t@_DLSYM_CONST struct {
  3687. const char *name;
  3688. void *address;
  3689. }
  3690. lt__PROGRAM__LTX_preloaded_symbols[[]] =
  3691. {
  3692. { "@PROGRAM@", (void *) 0 },
  3693. _LT_EOF
  3694. $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
  3695. cat <<\_LT_EOF >> conftest.$ac_ext
  3696. {0, (void *) 0}
  3697. };
  3698. /* This works around a problem in FreeBSD linker */
  3699. #ifdef FREEBSD_WORKAROUND
  3700. static const void *lt_preloaded_setup() {
  3701. return lt__PROGRAM__LTX_preloaded_symbols;
  3702. }
  3703. #endif
  3704. #ifdef __cplusplus
  3705. }
  3706. #endif
  3707. _LT_EOF
  3708. # Now try linking the two files.
  3709. mv conftest.$ac_objext conftstm.$ac_objext
  3710. lt_globsym_save_LIBS=$LIBS
  3711. lt_globsym_save_CFLAGS=$CFLAGS
  3712. LIBS=conftstm.$ac_objext
  3713. CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
  3714. if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
  3715. pipe_works=yes
  3716. fi
  3717. LIBS=$lt_globsym_save_LIBS
  3718. CFLAGS=$lt_globsym_save_CFLAGS
  3719. else
  3720. echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
  3721. fi
  3722. else
  3723. echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
  3724. fi
  3725. else
  3726. echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
  3727. fi
  3728. else
  3729. echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
  3730. cat conftest.$ac_ext >&5
  3731. fi
  3732. rm -rf conftest* conftst*
  3733. # Do not use the global_symbol_pipe unless it works.
  3734. if test yes = "$pipe_works"; then
  3735. break
  3736. else
  3737. lt_cv_sys_global_symbol_pipe=
  3738. fi
  3739. done
  3740. ])
  3741. if test -z "$lt_cv_sys_global_symbol_pipe"; then
  3742. lt_cv_sys_global_symbol_to_cdecl=
  3743. fi
  3744. if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
  3745. AC_MSG_RESULT(failed)
  3746. else
  3747. AC_MSG_RESULT(ok)
  3748. fi
  3749. # Response file support.
  3750. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3751. nm_file_list_spec='@'
  3752. elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
  3753. nm_file_list_spec='@'
  3754. fi
  3755. _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
  3756. [Take the output of nm and produce a listing of raw symbols and C names])
  3757. _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
  3758. [Transform the output of nm in a proper C declaration])
  3759. _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
  3760. [Transform the output of nm into a list of symbols to manually relocate])
  3761. _LT_DECL([global_symbol_to_c_name_address],
  3762. [lt_cv_sys_global_symbol_to_c_name_address], [1],
  3763. [Transform the output of nm in a C name address pair])
  3764. _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
  3765. [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
  3766. [Transform the output of nm in a C name address pair when lib prefix is needed])
  3767. _LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
  3768. [The name lister interface])
  3769. _LT_DECL([], [nm_file_list_spec], [1],
  3770. [Specify filename containing input files for $NM])
  3771. ]) # _LT_CMD_GLOBAL_SYMBOLS
  3772. # _LT_COMPILER_PIC([TAGNAME])
  3773. # ---------------------------
  3774. m4_defun([_LT_COMPILER_PIC],
  3775. [m4_require([_LT_TAG_COMPILER])dnl
  3776. _LT_TAGVAR(lt_prog_compiler_wl, $1)=
  3777. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3778. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3779. m4_if([$1], [CXX], [
  3780. # C++ specific cases for pic, static, wl, etc.
  3781. if test yes = "$GXX"; then
  3782. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3783. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3784. case $host_os in
  3785. aix*)
  3786. # All AIX code is PIC.
  3787. if test ia64 = "$host_cpu"; then
  3788. # AIX 5 now supports IA64 processor
  3789. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3790. fi
  3791. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3792. ;;
  3793. amigaos*)
  3794. case $host_cpu in
  3795. powerpc)
  3796. # see comment about AmigaOS4 .so support
  3797. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3798. ;;
  3799. m68k)
  3800. # FIXME: we need at least 68020 code to build shared libraries, but
  3801. # adding the '-m68020' flag to GCC prevents building anything better,
  3802. # like '-m68040'.
  3803. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  3804. ;;
  3805. esac
  3806. ;;
  3807. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  3808. # PIC is the default for these OSes.
  3809. ;;
  3810. mingw* | cygwin* | os2* | pw32* | cegcc*)
  3811. # This hack is so that the source file can tell whether it is being
  3812. # built for inclusion in a dll (and should export symbols for example).
  3813. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  3814. # (--disable-auto-import) libraries
  3815. m4_if([$1], [GCJ], [],
  3816. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3817. case $host_os in
  3818. os2*)
  3819. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
  3820. ;;
  3821. esac
  3822. ;;
  3823. darwin* | rhapsody*)
  3824. # PIC is the default on this platform
  3825. # Common symbols not allowed in MH_DYLIB files
  3826. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  3827. ;;
  3828. *djgpp*)
  3829. # DJGPP does not support shared libraries at all
  3830. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3831. ;;
  3832. haiku*)
  3833. # PIC is the default for Haiku.
  3834. # The "-static" flag exists, but is broken.
  3835. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3836. ;;
  3837. interix[[3-9]]*)
  3838. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  3839. # Instead, we relocate shared libraries at runtime.
  3840. ;;
  3841. sysv4*MP*)
  3842. if test -d /usr/nec; then
  3843. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  3844. fi
  3845. ;;
  3846. hpux*)
  3847. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  3848. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  3849. # sets the default TLS model and affects inlining.
  3850. case $host_cpu in
  3851. hppa*64*)
  3852. ;;
  3853. *)
  3854. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3855. ;;
  3856. esac
  3857. ;;
  3858. *qnx* | *nto*)
  3859. # QNX uses GNU C++, but need to define -shared option too, otherwise
  3860. # it will coredump.
  3861. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  3862. ;;
  3863. *)
  3864. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3865. ;;
  3866. esac
  3867. else
  3868. case $host_os in
  3869. aix[[4-9]]*)
  3870. # All AIX code is PIC.
  3871. if test ia64 = "$host_cpu"; then
  3872. # AIX 5 now supports IA64 processor
  3873. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3874. else
  3875. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  3876. fi
  3877. ;;
  3878. chorus*)
  3879. case $cc_basename in
  3880. cxch68*)
  3881. # Green Hills C++ Compiler
  3882. # _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"
  3883. ;;
  3884. esac
  3885. ;;
  3886. mingw* | cygwin* | os2* | pw32* | cegcc*)
  3887. # This hack is so that the source file can tell whether it is being
  3888. # built for inclusion in a dll (and should export symbols for example).
  3889. m4_if([$1], [GCJ], [],
  3890. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3891. ;;
  3892. dgux*)
  3893. case $cc_basename in
  3894. ec++*)
  3895. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3896. ;;
  3897. ghcx*)
  3898. # Green Hills C++ Compiler
  3899. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3900. ;;
  3901. *)
  3902. ;;
  3903. esac
  3904. ;;
  3905. freebsd* | dragonfly*)
  3906. # FreeBSD uses GNU C++
  3907. ;;
  3908. hpux9* | hpux10* | hpux11*)
  3909. case $cc_basename in
  3910. CC*)
  3911. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3912. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
  3913. if test ia64 != "$host_cpu"; then
  3914. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  3915. fi
  3916. ;;
  3917. aCC*)
  3918. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3919. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
  3920. case $host_cpu in
  3921. hppa*64*|ia64*)
  3922. # +Z the default
  3923. ;;
  3924. *)
  3925. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  3926. ;;
  3927. esac
  3928. ;;
  3929. *)
  3930. ;;
  3931. esac
  3932. ;;
  3933. interix*)
  3934. # This is c89, which is MS Visual C++ (no shared libs)
  3935. # Anyone wants to do a port?
  3936. ;;
  3937. irix5* | irix6* | nonstopux*)
  3938. case $cc_basename in
  3939. CC*)
  3940. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3941. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3942. # CC pic flag -KPIC is the default.
  3943. ;;
  3944. *)
  3945. ;;
  3946. esac
  3947. ;;
  3948. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  3949. case $cc_basename in
  3950. KCC*)
  3951. # KAI C++ Compiler
  3952. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  3953. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3954. ;;
  3955. ecpc* )
  3956. # old Intel C++ for x86_64, which still supported -KPIC.
  3957. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3958. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3959. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3960. ;;
  3961. icpc* )
  3962. # Intel C++, used to be incompatible with GCC.
  3963. # ICC 10 doesn't accept -KPIC any more.
  3964. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3965. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3966. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3967. ;;
  3968. pgCC* | pgcpp*)
  3969. # Portland Group C++ compiler
  3970. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3971. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  3972. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3973. ;;
  3974. cxx*)
  3975. # Compaq C++
  3976. # Make sure the PIC flag is empty. It appears that all Alpha
  3977. # Linux and Compaq Tru64 Unix objects are PIC.
  3978. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3979. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3980. ;;
  3981. xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
  3982. # IBM XL 8.0, 9.0 on PPC and BlueGene
  3983. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3984. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  3985. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  3986. ;;
  3987. *)
  3988. case `$CC -V 2>&1 | sed 5q` in
  3989. *Sun\ C*)
  3990. # Sun C++ 5.9
  3991. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3992. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3993. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  3994. ;;
  3995. esac
  3996. ;;
  3997. esac
  3998. ;;
  3999. lynxos*)
  4000. ;;
  4001. m88k*)
  4002. ;;
  4003. mvs*)
  4004. case $cc_basename in
  4005. cxx*)
  4006. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
  4007. ;;
  4008. *)
  4009. ;;
  4010. esac
  4011. ;;
  4012. netbsd*)
  4013. ;;
  4014. *qnx* | *nto*)
  4015. # QNX uses GNU C++, but need to define -shared option too, otherwise
  4016. # it will coredump.
  4017. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4018. ;;
  4019. osf3* | osf4* | osf5*)
  4020. case $cc_basename in
  4021. KCC*)
  4022. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  4023. ;;
  4024. RCC*)
  4025. # Rational C++ 2.4.1
  4026. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4027. ;;
  4028. cxx*)
  4029. # Digital/Compaq C++
  4030. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4031. # Make sure the PIC flag is empty. It appears that all Alpha
  4032. # Linux and Compaq Tru64 Unix objects are PIC.
  4033. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4034. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4035. ;;
  4036. *)
  4037. ;;
  4038. esac
  4039. ;;
  4040. psos*)
  4041. ;;
  4042. solaris*)
  4043. case $cc_basename in
  4044. CC* | sunCC*)
  4045. # Sun C++ 4.2, 5.x and Centerline C++
  4046. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4047. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4048. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4049. ;;
  4050. gcx*)
  4051. # Green Hills C++ Compiler
  4052. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4053. ;;
  4054. *)
  4055. ;;
  4056. esac
  4057. ;;
  4058. sunos4*)
  4059. case $cc_basename in
  4060. CC*)
  4061. # Sun C++ 4.x
  4062. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4063. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4064. ;;
  4065. lcc*)
  4066. # Lucid
  4067. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4068. ;;
  4069. *)
  4070. ;;
  4071. esac
  4072. ;;
  4073. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  4074. case $cc_basename in
  4075. CC*)
  4076. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4077. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4078. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4079. ;;
  4080. esac
  4081. ;;
  4082. tandem*)
  4083. case $cc_basename in
  4084. NCC*)
  4085. # NonStop-UX NCC 3.20
  4086. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4087. ;;
  4088. *)
  4089. ;;
  4090. esac
  4091. ;;
  4092. vxworks*)
  4093. ;;
  4094. *)
  4095. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4096. ;;
  4097. esac
  4098. fi
  4099. ],
  4100. [
  4101. if test yes = "$GCC"; then
  4102. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4103. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4104. case $host_os in
  4105. aix*)
  4106. # All AIX code is PIC.
  4107. if test ia64 = "$host_cpu"; then
  4108. # AIX 5 now supports IA64 processor
  4109. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4110. fi
  4111. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4112. ;;
  4113. amigaos*)
  4114. case $host_cpu in
  4115. powerpc)
  4116. # see comment about AmigaOS4 .so support
  4117. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4118. ;;
  4119. m68k)
  4120. # FIXME: we need at least 68020 code to build shared libraries, but
  4121. # adding the '-m68020' flag to GCC prevents building anything better,
  4122. # like '-m68040'.
  4123. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  4124. ;;
  4125. esac
  4126. ;;
  4127. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  4128. # PIC is the default for these OSes.
  4129. ;;
  4130. mingw* | cygwin* | pw32* | os2* | cegcc*)
  4131. # This hack is so that the source file can tell whether it is being
  4132. # built for inclusion in a dll (and should export symbols for example).
  4133. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  4134. # (--disable-auto-import) libraries
  4135. m4_if([$1], [GCJ], [],
  4136. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  4137. case $host_os in
  4138. os2*)
  4139. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
  4140. ;;
  4141. esac
  4142. ;;
  4143. darwin* | rhapsody*)
  4144. # PIC is the default on this platform
  4145. # Common symbols not allowed in MH_DYLIB files
  4146. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  4147. ;;
  4148. haiku*)
  4149. # PIC is the default for Haiku.
  4150. # The "-static" flag exists, but is broken.
  4151. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  4152. ;;
  4153. hpux*)
  4154. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  4155. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  4156. # sets the default TLS model and affects inlining.
  4157. case $host_cpu in
  4158. hppa*64*)
  4159. # +Z the default
  4160. ;;
  4161. *)
  4162. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4163. ;;
  4164. esac
  4165. ;;
  4166. interix[[3-9]]*)
  4167. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  4168. # Instead, we relocate shared libraries at runtime.
  4169. ;;
  4170. msdosdjgpp*)
  4171. # Just because we use GCC doesn't mean we suddenly get shared libraries
  4172. # on systems that don't support them.
  4173. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4174. enable_shared=no
  4175. ;;
  4176. *nto* | *qnx*)
  4177. # QNX uses GNU C++, but need to define -shared option too, otherwise
  4178. # it will coredump.
  4179. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4180. ;;
  4181. sysv4*MP*)
  4182. if test -d /usr/nec; then
  4183. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  4184. fi
  4185. ;;
  4186. *)
  4187. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4188. ;;
  4189. esac
  4190. case $cc_basename in
  4191. nvcc*) # Cuda Compiler Driver 2.2
  4192. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
  4193. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  4194. _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
  4195. fi
  4196. ;;
  4197. esac
  4198. else
  4199. # PORTME Check for flag to pass linker flags through the system compiler.
  4200. case $host_os in
  4201. aix*)
  4202. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4203. if test ia64 = "$host_cpu"; then
  4204. # AIX 5 now supports IA64 processor
  4205. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4206. else
  4207. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  4208. fi
  4209. ;;
  4210. darwin* | rhapsody*)
  4211. # PIC is the default on this platform
  4212. # Common symbols not allowed in MH_DYLIB files
  4213. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  4214. case $cc_basename in
  4215. nagfor*)
  4216. # NAG Fortran compiler
  4217. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
  4218. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4219. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4220. ;;
  4221. esac
  4222. ;;
  4223. mingw* | cygwin* | pw32* | os2* | cegcc*)
  4224. # This hack is so that the source file can tell whether it is being
  4225. # built for inclusion in a dll (and should export symbols for example).
  4226. m4_if([$1], [GCJ], [],
  4227. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  4228. case $host_os in
  4229. os2*)
  4230. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
  4231. ;;
  4232. esac
  4233. ;;
  4234. hpux9* | hpux10* | hpux11*)
  4235. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4236. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  4237. # not for PA HP-UX.
  4238. case $host_cpu in
  4239. hppa*64*|ia64*)
  4240. # +Z the default
  4241. ;;
  4242. *)
  4243. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4244. ;;
  4245. esac
  4246. # Is there a better lt_prog_compiler_static that works with the bundled CC?
  4247. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
  4248. ;;
  4249. irix5* | irix6* | nonstopux*)
  4250. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4251. # PIC (with -KPIC) is the default.
  4252. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4253. ;;
  4254. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  4255. case $cc_basename in
  4256. # old Intel for x86_64, which still supported -KPIC.
  4257. ecc*)
  4258. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4259. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4260. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4261. ;;
  4262. # icc used to be incompatible with GCC.
  4263. # ICC 10 doesn't accept -KPIC any more.
  4264. icc* | ifort*)
  4265. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4266. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4267. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4268. ;;
  4269. # Lahey Fortran 8.1.
  4270. lf95*)
  4271. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4272. _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
  4273. _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
  4274. ;;
  4275. nagfor*)
  4276. # NAG Fortran compiler
  4277. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
  4278. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4279. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4280. ;;
  4281. tcc*)
  4282. # Fabrice Bellard et al's Tiny C Compiler
  4283. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4284. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4285. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4286. ;;
  4287. pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
  4288. # Portland Group compilers (*not* the Pentium gcc compiler,
  4289. # which looks to be a dead project)
  4290. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4291. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4292. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4293. ;;
  4294. ccc*)
  4295. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4296. # All Alpha code is PIC.
  4297. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4298. ;;
  4299. xl* | bgxl* | bgf* | mpixl*)
  4300. # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
  4301. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4302. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  4303. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  4304. ;;
  4305. *)
  4306. case `$CC -V 2>&1 | sed 5q` in
  4307. *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
  4308. # Sun Fortran 8.3 passes all unrecognized flags to the linker
  4309. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4310. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4311. _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
  4312. ;;
  4313. *Sun\ F* | *Sun*Fortran*)
  4314. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4315. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4316. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4317. ;;
  4318. *Sun\ C*)
  4319. # Sun C 5.9
  4320. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4321. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4322. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4323. ;;
  4324. *Intel*\ [[CF]]*Compiler*)
  4325. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4326. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4327. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4328. ;;
  4329. *Portland\ Group*)
  4330. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4331. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4332. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4333. ;;
  4334. esac
  4335. ;;
  4336. esac
  4337. ;;
  4338. newsos6)
  4339. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4340. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4341. ;;
  4342. *nto* | *qnx*)
  4343. # QNX uses GNU C++, but need to define -shared option too, otherwise
  4344. # it will coredump.
  4345. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4346. ;;
  4347. osf3* | osf4* | osf5*)
  4348. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4349. # All OSF/1 code is PIC.
  4350. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4351. ;;
  4352. rdos*)
  4353. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4354. ;;
  4355. solaris*)
  4356. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4357. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4358. case $cc_basename in
  4359. f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
  4360. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
  4361. *)
  4362. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
  4363. esac
  4364. ;;
  4365. sunos4*)
  4366. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4367. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4368. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4369. ;;
  4370. sysv4 | sysv4.2uw2* | sysv4.3*)
  4371. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4372. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4373. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4374. ;;
  4375. sysv4*MP*)
  4376. if test -d /usr/nec; then
  4377. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
  4378. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4379. fi
  4380. ;;
  4381. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  4382. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4383. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4384. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4385. ;;
  4386. unicos*)
  4387. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4388. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4389. ;;
  4390. uts4*)
  4391. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4392. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4393. ;;
  4394. *)
  4395. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4396. ;;
  4397. esac
  4398. fi
  4399. ])
  4400. case $host_os in
  4401. # For platforms that do not support PIC, -DPIC is meaningless:
  4402. *djgpp*)
  4403. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4404. ;;
  4405. *)
  4406. _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
  4407. ;;
  4408. esac
  4409. AC_CACHE_CHECK([for $compiler option to produce PIC],
  4410. [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
  4411. [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
  4412. _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
  4413. #
  4414. # Check to make sure the PIC flag actually works.
  4415. #
  4416. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  4417. _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
  4418. [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
  4419. [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
  4420. [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
  4421. "" | " "*) ;;
  4422. *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
  4423. esac],
  4424. [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4425. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
  4426. fi
  4427. _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
  4428. [Additional compiler flags for building library objects])
  4429. _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
  4430. [How to pass a linker flag through the compiler])
  4431. #
  4432. # Check to make sure the static flag actually works.
  4433. #
  4434. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
  4435. _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
  4436. _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
  4437. $lt_tmp_static_flag,
  4438. [],
  4439. [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
  4440. _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
  4441. [Compiler flag to prevent dynamic linking])
  4442. ])# _LT_COMPILER_PIC
  4443. # _LT_LINKER_SHLIBS([TAGNAME])
  4444. # ----------------------------
  4445. # See if the linker supports building shared libraries.
  4446. m4_defun([_LT_LINKER_SHLIBS],
  4447. [AC_REQUIRE([LT_PATH_LD])dnl
  4448. AC_REQUIRE([LT_PATH_NM])dnl
  4449. m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  4450. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  4451. m4_require([_LT_DECL_EGREP])dnl
  4452. m4_require([_LT_DECL_SED])dnl
  4453. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  4454. m4_require([_LT_TAG_COMPILER])dnl
  4455. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  4456. m4_if([$1], [CXX], [
  4457. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4458. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  4459. case $host_os in
  4460. aix[[4-9]]*)
  4461. # If we're using GNU nm, then we don't want the "-C" option.
  4462. # -C means demangle to GNU nm, but means don't demangle to AIX nm.
  4463. # Without the "-l" option, or with the "-B" option, AIX nm treats
  4464. # weak defined symbols like other global defined symbols, whereas
  4465. # GNU nm marks them as "W".
  4466. # While the 'weak' keyword is ignored in the Export File, we need
  4467. # it in the Import File for the 'aix-soname' feature, so we have
  4468. # to replace the "-B" option with "-P" for AIX nm.
  4469. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  4470. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
  4471. else
  4472. _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
  4473. fi
  4474. ;;
  4475. pw32*)
  4476. _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
  4477. ;;
  4478. cygwin* | mingw* | cegcc*)
  4479. case $cc_basename in
  4480. cl*)
  4481. _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  4482. ;;
  4483. *)
  4484. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
  4485. _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  4486. ;;
  4487. esac
  4488. ;;
  4489. *)
  4490. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4491. ;;
  4492. esac
  4493. ], [
  4494. runpath_var=
  4495. _LT_TAGVAR(allow_undefined_flag, $1)=
  4496. _LT_TAGVAR(always_export_symbols, $1)=no
  4497. _LT_TAGVAR(archive_cmds, $1)=
  4498. _LT_TAGVAR(archive_expsym_cmds, $1)=
  4499. _LT_TAGVAR(compiler_needs_object, $1)=no
  4500. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  4501. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  4502. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4503. _LT_TAGVAR(hardcode_automatic, $1)=no
  4504. _LT_TAGVAR(hardcode_direct, $1)=no
  4505. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  4506. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4507. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  4508. _LT_TAGVAR(hardcode_minus_L, $1)=no
  4509. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  4510. _LT_TAGVAR(inherit_rpath, $1)=no
  4511. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  4512. _LT_TAGVAR(module_cmds, $1)=
  4513. _LT_TAGVAR(module_expsym_cmds, $1)=
  4514. _LT_TAGVAR(old_archive_from_new_cmds, $1)=
  4515. _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
  4516. _LT_TAGVAR(thread_safe_flag_spec, $1)=
  4517. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4518. # include_expsyms should be a list of space-separated symbols to be *always*
  4519. # included in the symbol list
  4520. _LT_TAGVAR(include_expsyms, $1)=
  4521. # exclude_expsyms can be an extended regexp of symbols to exclude
  4522. # it will be wrapped by ' (' and ')$', so one must not match beginning or
  4523. # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
  4524. # as well as any symbol that contains 'd'.
  4525. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  4526. # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  4527. # platforms (ab)use it in PIC code, but their linkers get confused if
  4528. # the symbol is explicitly referenced. Since portable code cannot
  4529. # rely on this symbol name, it's probably fine to never include it in
  4530. # preloaded symbol tables.
  4531. # Exclude shared library initialization/finalization symbols.
  4532. dnl Note also adjust exclude_expsyms for C++ above.
  4533. extract_expsyms_cmds=
  4534. case $host_os in
  4535. cygwin* | mingw* | pw32* | cegcc*)
  4536. # FIXME: the MSVC++ port hasn't been tested in a loooong time
  4537. # When not using gcc, we currently assume that we are using
  4538. # Microsoft Visual C++.
  4539. if test yes != "$GCC"; then
  4540. with_gnu_ld=no
  4541. fi
  4542. ;;
  4543. interix*)
  4544. # we just hope/assume this is gcc and not c89 (= MSVC++)
  4545. with_gnu_ld=yes
  4546. ;;
  4547. openbsd* | bitrig*)
  4548. with_gnu_ld=no
  4549. ;;
  4550. esac
  4551. _LT_TAGVAR(ld_shlibs, $1)=yes
  4552. # On some targets, GNU ld is compatible enough with the native linker
  4553. # that we're better off using the native interface for both.
  4554. lt_use_gnu_ld_interface=no
  4555. if test yes = "$with_gnu_ld"; then
  4556. case $host_os in
  4557. aix*)
  4558. # The AIX port of GNU ld has always aspired to compatibility
  4559. # with the native linker. However, as the warning in the GNU ld
  4560. # block says, versions before 2.19.5* couldn't really create working
  4561. # shared libraries, regardless of the interface used.
  4562. case `$LD -v 2>&1` in
  4563. *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
  4564. *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
  4565. *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
  4566. *)
  4567. lt_use_gnu_ld_interface=yes
  4568. ;;
  4569. esac
  4570. ;;
  4571. *)
  4572. lt_use_gnu_ld_interface=yes
  4573. ;;
  4574. esac
  4575. fi
  4576. if test yes = "$lt_use_gnu_ld_interface"; then
  4577. # If archive_cmds runs LD, not CC, wlarc should be empty
  4578. wlarc='$wl'
  4579. # Set some defaults for GNU ld with shared library support. These
  4580. # are reset later if shared libraries are not supported. Putting them
  4581. # here allows them to be overridden if necessary.
  4582. runpath_var=LD_RUN_PATH
  4583. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  4584. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  4585. # ancient GNU ld didn't support --whole-archive et. al.
  4586. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
  4587. _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
  4588. else
  4589. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4590. fi
  4591. supports_anon_versioning=no
  4592. case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
  4593. *GNU\ gold*) supports_anon_versioning=yes ;;
  4594. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
  4595. *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
  4596. *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
  4597. *\ 2.11.*) ;; # other 2.11 versions
  4598. *) supports_anon_versioning=yes ;;
  4599. esac
  4600. # See if GNU ld supports shared libraries.
  4601. case $host_os in
  4602. aix[[3-9]]*)
  4603. # On AIX/PPC, the GNU linker is very broken
  4604. if test ia64 != "$host_cpu"; then
  4605. _LT_TAGVAR(ld_shlibs, $1)=no
  4606. cat <<_LT_EOF 1>&2
  4607. *** Warning: the GNU linker, at least up to release 2.19, is reported
  4608. *** to be unable to reliably create shared libraries on AIX.
  4609. *** Therefore, libtool is disabling shared libraries support. If you
  4610. *** really care for shared libraries, you may want to install binutils
  4611. *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
  4612. *** You will then need to restart the configuration process.
  4613. _LT_EOF
  4614. fi
  4615. ;;
  4616. amigaos*)
  4617. case $host_cpu in
  4618. powerpc)
  4619. # see comment about AmigaOS4 .so support
  4620. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4621. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  4622. ;;
  4623. m68k)
  4624. _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)'
  4625. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4626. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4627. ;;
  4628. esac
  4629. ;;
  4630. beos*)
  4631. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4632. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4633. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  4634. # support --undefined. This deserves some investigation. FIXME
  4635. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4636. else
  4637. _LT_TAGVAR(ld_shlibs, $1)=no
  4638. fi
  4639. ;;
  4640. cygwin* | mingw* | pw32* | cegcc*)
  4641. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  4642. # as there is no search path for DLLs.
  4643. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4644. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
  4645. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4646. _LT_TAGVAR(always_export_symbols, $1)=no
  4647. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4648. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
  4649. _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  4650. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  4651. _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'
  4652. # If the export-symbols file already is a .def file, use it as
  4653. # is; otherwise, prepend EXPORTS...
  4654. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  4655. cp $export_symbols $output_objdir/$soname.def;
  4656. else
  4657. echo EXPORTS > $output_objdir/$soname.def;
  4658. cat $export_symbols >> $output_objdir/$soname.def;
  4659. fi~
  4660. $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  4661. else
  4662. _LT_TAGVAR(ld_shlibs, $1)=no
  4663. fi
  4664. ;;
  4665. haiku*)
  4666. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4667. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4668. ;;
  4669. os2*)
  4670. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4671. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4672. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4673. shrext_cmds=.dll
  4674. _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  4675. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  4676. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  4677. $ECHO EXPORTS >> $output_objdir/$libname.def~
  4678. emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
  4679. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  4680. emximp -o $lib $output_objdir/$libname.def'
  4681. _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  4682. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  4683. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  4684. $ECHO EXPORTS >> $output_objdir/$libname.def~
  4685. prefix_cmds="$SED"~
  4686. if test EXPORTS = "`$SED 1q $export_symbols`"; then
  4687. prefix_cmds="$prefix_cmds -e 1d";
  4688. fi~
  4689. prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
  4690. cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
  4691. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  4692. emximp -o $lib $output_objdir/$libname.def'
  4693. _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
  4694. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4695. ;;
  4696. interix[[3-9]]*)
  4697. _LT_TAGVAR(hardcode_direct, $1)=no
  4698. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4699. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  4700. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  4701. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  4702. # Instead, shared libraries are loaded at an image base (0x10000000 by
  4703. # default) and relocated if they conflict, which is a slow very memory
  4704. # consuming and fragmenting process. To avoid this, we pick a random,
  4705. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  4706. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  4707. _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'
  4708. _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'
  4709. ;;
  4710. gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
  4711. tmp_diet=no
  4712. if test linux-dietlibc = "$host_os"; then
  4713. case $cc_basename in
  4714. diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
  4715. esac
  4716. fi
  4717. if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
  4718. && test no = "$tmp_diet"
  4719. then
  4720. tmp_addflag=' $pic_flag'
  4721. tmp_sharedflag='-shared'
  4722. case $cc_basename,$host_cpu in
  4723. pgcc*) # Portland Group C compiler
  4724. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
  4725. tmp_addflag=' $pic_flag'
  4726. ;;
  4727. pgf77* | pgf90* | pgf95* | pgfortran*)
  4728. # Portland Group f77 and f90 compilers
  4729. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
  4730. tmp_addflag=' $pic_flag -Mnomain' ;;
  4731. ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
  4732. tmp_addflag=' -i_dynamic' ;;
  4733. efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
  4734. tmp_addflag=' -i_dynamic -nofor_main' ;;
  4735. ifc* | ifort*) # Intel Fortran compiler
  4736. tmp_addflag=' -nofor_main' ;;
  4737. lf95*) # Lahey Fortran 8.1
  4738. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4739. tmp_sharedflag='--shared' ;;
  4740. nagfor*) # NAGFOR 5.3
  4741. tmp_sharedflag='-Wl,-shared' ;;
  4742. xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
  4743. tmp_sharedflag='-qmkshrobj'
  4744. tmp_addflag= ;;
  4745. nvcc*) # Cuda Compiler Driver 2.2
  4746. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
  4747. _LT_TAGVAR(compiler_needs_object, $1)=yes
  4748. ;;
  4749. esac
  4750. case `$CC -V 2>&1 | sed 5q` in
  4751. *Sun\ C*) # Sun C 5.9
  4752. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
  4753. _LT_TAGVAR(compiler_needs_object, $1)=yes
  4754. tmp_sharedflag='-G' ;;
  4755. *Sun\ F*) # Sun Fortran 8.3
  4756. tmp_sharedflag='-G' ;;
  4757. esac
  4758. _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4759. if test yes = "$supports_anon_versioning"; then
  4760. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  4761. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4762. echo "local: *; };" >> $output_objdir/$libname.ver~
  4763. $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
  4764. fi
  4765. case $cc_basename in
  4766. tcc*)
  4767. _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
  4768. ;;
  4769. xlf* | bgf* | bgxlf* | mpixlf*)
  4770. # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
  4771. _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
  4772. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  4773. _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
  4774. if test yes = "$supports_anon_versioning"; then
  4775. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  4776. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4777. echo "local: *; };" >> $output_objdir/$libname.ver~
  4778. $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
  4779. fi
  4780. ;;
  4781. esac
  4782. else
  4783. _LT_TAGVAR(ld_shlibs, $1)=no
  4784. fi
  4785. ;;
  4786. netbsd*)
  4787. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  4788. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  4789. wlarc=
  4790. else
  4791. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4792. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
  4793. fi
  4794. ;;
  4795. solaris*)
  4796. if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
  4797. _LT_TAGVAR(ld_shlibs, $1)=no
  4798. cat <<_LT_EOF 1>&2
  4799. *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  4800. *** create shared libraries on Solaris systems. Therefore, libtool
  4801. *** is disabling shared libraries support. We urge you to upgrade GNU
  4802. *** binutils to release 2.9.1 or newer. Another option is to modify
  4803. *** your PATH or compiler configuration so that the native linker is
  4804. *** used, and then restart.
  4805. _LT_EOF
  4806. elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4807. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4808. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
  4809. else
  4810. _LT_TAGVAR(ld_shlibs, $1)=no
  4811. fi
  4812. ;;
  4813. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
  4814. case `$LD -v 2>&1` in
  4815. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
  4816. _LT_TAGVAR(ld_shlibs, $1)=no
  4817. cat <<_LT_EOF 1>&2
  4818. *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
  4819. *** reliably create shared libraries on SCO systems. Therefore, libtool
  4820. *** is disabling shared libraries support. We urge you to upgrade GNU
  4821. *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
  4822. *** your PATH or compiler configuration so that the native linker is
  4823. *** used, and then restart.
  4824. _LT_EOF
  4825. ;;
  4826. *)
  4827. # For security reasons, it is highly recommended that you always
  4828. # use absolute paths for naming shared libraries, and exclude the
  4829. # DT_RUNPATH tag from executables and libraries. But doing so
  4830. # requires that you compile everything twice, which is a pain.
  4831. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4832. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  4833. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4834. _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'
  4835. else
  4836. _LT_TAGVAR(ld_shlibs, $1)=no
  4837. fi
  4838. ;;
  4839. esac
  4840. ;;
  4841. sunos4*)
  4842. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4843. wlarc=
  4844. _LT_TAGVAR(hardcode_direct, $1)=yes
  4845. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4846. ;;
  4847. *)
  4848. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4849. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4850. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
  4851. else
  4852. _LT_TAGVAR(ld_shlibs, $1)=no
  4853. fi
  4854. ;;
  4855. esac
  4856. if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
  4857. runpath_var=
  4858. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4859. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  4860. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4861. fi
  4862. else
  4863. # PORTME fill in a description of your system's linker (not GNU ld)
  4864. case $host_os in
  4865. aix3*)
  4866. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4867. _LT_TAGVAR(always_export_symbols, $1)=yes
  4868. _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'
  4869. # Note: this linker hardcodes the directories in LIBPATH if there
  4870. # are no directories specified by -L.
  4871. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4872. if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
  4873. # Neither direct hardcoding nor static linking is supported with a
  4874. # broken collect2.
  4875. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  4876. fi
  4877. ;;
  4878. aix[[4-9]]*)
  4879. if test ia64 = "$host_cpu"; then
  4880. # On IA64, the linker does run time linking by default, so we don't
  4881. # have to do anything special.
  4882. aix_use_runtimelinking=no
  4883. exp_sym_flag='-Bexport'
  4884. no_entry_flag=
  4885. else
  4886. # If we're using GNU nm, then we don't want the "-C" option.
  4887. # -C means demangle to GNU nm, but means don't demangle to AIX nm.
  4888. # Without the "-l" option, or with the "-B" option, AIX nm treats
  4889. # weak defined symbols like other global defined symbols, whereas
  4890. # GNU nm marks them as "W".
  4891. # While the 'weak' keyword is ignored in the Export File, we need
  4892. # it in the Import File for the 'aix-soname' feature, so we have
  4893. # to replace the "-B" option with "-P" for AIX nm.
  4894. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  4895. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
  4896. else
  4897. _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
  4898. fi
  4899. aix_use_runtimelinking=no
  4900. # Test if we are trying to use run time linking or normal
  4901. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  4902. # have runtime linking enabled, and use it for executables.
  4903. # For shared libraries, we enable/disable runtime linking
  4904. # depending on the kind of the shared library created -
  4905. # when "with_aix_soname,aix_use_runtimelinking" is:
  4906. # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
  4907. # "aix,yes" lib.so shared, rtl:yes, for executables
  4908. # lib.a static archive
  4909. # "both,no" lib.so.V(shr.o) shared, rtl:yes
  4910. # lib.a(lib.so.V) shared, rtl:no, for executables
  4911. # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
  4912. # lib.a(lib.so.V) shared, rtl:no
  4913. # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
  4914. # lib.a static archive
  4915. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  4916. for ld_flag in $LDFLAGS; do
  4917. if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
  4918. aix_use_runtimelinking=yes
  4919. break
  4920. fi
  4921. done
  4922. if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
  4923. # With aix-soname=svr4, we create the lib.so.V shared archives only,
  4924. # so we don't have lib.a shared libs to link our executables.
  4925. # We have to force runtime linking in this case.
  4926. aix_use_runtimelinking=yes
  4927. LDFLAGS="$LDFLAGS -Wl,-brtl"
  4928. fi
  4929. ;;
  4930. esac
  4931. exp_sym_flag='-bexport'
  4932. no_entry_flag='-bnoentry'
  4933. fi
  4934. # When large executables or shared objects are built, AIX ld can
  4935. # have problems creating the table of contents. If linking a library
  4936. # or program results in "error TOC overflow" add -mminimal-toc to
  4937. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  4938. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  4939. _LT_TAGVAR(archive_cmds, $1)=''
  4940. _LT_TAGVAR(hardcode_direct, $1)=yes
  4941. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4942. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  4943. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4944. _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
  4945. case $with_aix_soname,$aix_use_runtimelinking in
  4946. aix,*) ;; # traditional, no import file
  4947. svr4,* | *,yes) # use import file
  4948. # The Import File defines what to hardcode.
  4949. _LT_TAGVAR(hardcode_direct, $1)=no
  4950. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  4951. ;;
  4952. esac
  4953. if test yes = "$GCC"; then
  4954. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  4955. # We only want to do this on AIX 4.2 and lower, the check
  4956. # below for broken collect2 doesn't work under 4.3+
  4957. collect2name=`$CC -print-prog-name=collect2`
  4958. if test -f "$collect2name" &&
  4959. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  4960. then
  4961. # We have reworked collect2
  4962. :
  4963. else
  4964. # We have old collect2
  4965. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  4966. # It fails to find uninstalled libraries when the uninstalled
  4967. # path is not listed in the libpath. Setting hardcode_minus_L
  4968. # to unsupported forces relinking
  4969. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4970. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4971. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  4972. fi
  4973. ;;
  4974. esac
  4975. shared_flag='-shared'
  4976. if test yes = "$aix_use_runtimelinking"; then
  4977. shared_flag="$shared_flag "'$wl-G'
  4978. fi
  4979. # Need to ensure runtime linking is disabled for the traditional
  4980. # shared library, or the linker may eventually find shared libraries
  4981. # /with/ Import File - we do not want to mix them.
  4982. shared_flag_aix='-shared'
  4983. shared_flag_svr4='-shared $wl-G'
  4984. else
  4985. # not using gcc
  4986. if test ia64 = "$host_cpu"; then
  4987. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  4988. # chokes on -Wl,-G. The following line is correct:
  4989. shared_flag='-G'
  4990. else
  4991. if test yes = "$aix_use_runtimelinking"; then
  4992. shared_flag='$wl-G'
  4993. else
  4994. shared_flag='$wl-bM:SRE'
  4995. fi
  4996. shared_flag_aix='$wl-bM:SRE'
  4997. shared_flag_svr4='$wl-G'
  4998. fi
  4999. fi
  5000. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
  5001. # It seems that -bexpall does not export symbols beginning with
  5002. # underscore (_), so it is better to generate a list of symbols to export.
  5003. _LT_TAGVAR(always_export_symbols, $1)=yes
  5004. if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
  5005. # Warning - without using the other runtime loading flags (-brtl),
  5006. # -berok will link without error, but may produce a broken library.
  5007. _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
  5008. # Determine the default libpath from the value encoded in an
  5009. # empty executable.
  5010. _LT_SYS_MODULE_PATH_AIX([$1])
  5011. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
  5012. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
  5013. else
  5014. if test ia64 = "$host_cpu"; then
  5015. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
  5016. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  5017. _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"
  5018. else
  5019. # Determine the default libpath from the value encoded in an
  5020. # empty executable.
  5021. _LT_SYS_MODULE_PATH_AIX([$1])
  5022. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
  5023. # Warning - without using the other run time loading flags,
  5024. # -berok will link without error, but may produce a broken library.
  5025. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
  5026. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
  5027. if test yes = "$with_gnu_ld"; then
  5028. # We only use this code for GNU lds that support --whole-archive.
  5029. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
  5030. else
  5031. # Exported symbols can be pulled into shared objects from archives
  5032. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  5033. fi
  5034. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5035. _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
  5036. # -brtl affects multiple linker settings, -berok does not and is overridden later
  5037. compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
  5038. if test svr4 != "$with_aix_soname"; then
  5039. # This is similar to how AIX traditionally builds its shared libraries.
  5040. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
  5041. fi
  5042. if test aix != "$with_aix_soname"; then
  5043. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
  5044. else
  5045. # used by -dlpreopen to get the symbols
  5046. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
  5047. fi
  5048. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
  5049. fi
  5050. fi
  5051. ;;
  5052. amigaos*)
  5053. case $host_cpu in
  5054. powerpc)
  5055. # see comment about AmigaOS4 .so support
  5056. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  5057. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  5058. ;;
  5059. m68k)
  5060. _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)'
  5061. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5062. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5063. ;;
  5064. esac
  5065. ;;
  5066. bsdi[[45]]*)
  5067. _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
  5068. ;;
  5069. cygwin* | mingw* | pw32* | cegcc*)
  5070. # When not using gcc, we currently assume that we are using
  5071. # Microsoft Visual C++.
  5072. # hardcode_libdir_flag_spec is actually meaningless, as there is
  5073. # no search path for DLLs.
  5074. case $cc_basename in
  5075. cl*)
  5076. # Native MSVC
  5077. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  5078. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5079. _LT_TAGVAR(always_export_symbols, $1)=yes
  5080. _LT_TAGVAR(file_list_spec, $1)='@'
  5081. # Tell ltmain to make .lib files, not .a files.
  5082. libext=lib
  5083. # Tell ltmain to make .dll files, not .so files.
  5084. shrext_cmds=.dll
  5085. # FIXME: Setting linknames here is a bad hack.
  5086. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
  5087. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  5088. cp "$export_symbols" "$output_objdir/$soname.def";
  5089. echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
  5090. else
  5091. $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
  5092. fi~
  5093. $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  5094. linknames='
  5095. # The linker will not automatically build a static lib if we build a DLL.
  5096. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  5097. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5098. _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  5099. _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'
  5100. # Don't use ranlib
  5101. _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  5102. _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  5103. lt_tool_outputfile="@TOOL_OUTPUT@"~
  5104. case $lt_outputfile in
  5105. *.exe|*.EXE) ;;
  5106. *)
  5107. lt_outputfile=$lt_outputfile.exe
  5108. lt_tool_outputfile=$lt_tool_outputfile.exe
  5109. ;;
  5110. esac~
  5111. if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
  5112. $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  5113. $RM "$lt_outputfile.manifest";
  5114. fi'
  5115. ;;
  5116. *)
  5117. # Assume MSVC wrapper
  5118. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  5119. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5120. # Tell ltmain to make .lib files, not .a files.
  5121. libext=lib
  5122. # Tell ltmain to make .dll files, not .so files.
  5123. shrext_cmds=.dll
  5124. # FIXME: Setting linknames here is a bad hack.
  5125. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
  5126. # The linker will automatically build a .lib file if we build a DLL.
  5127. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  5128. # FIXME: Should let the user specify the lib program.
  5129. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
  5130. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5131. ;;
  5132. esac
  5133. ;;
  5134. darwin* | rhapsody*)
  5135. _LT_DARWIN_LINKER_FEATURES($1)
  5136. ;;
  5137. dgux*)
  5138. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5139. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5140. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5141. ;;
  5142. # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  5143. # support. Future versions do this automatically, but an explicit c++rt0.o
  5144. # does not break anything, and helps significantly (at the cost of a little
  5145. # extra space).
  5146. freebsd2.2*)
  5147. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
  5148. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5149. _LT_TAGVAR(hardcode_direct, $1)=yes
  5150. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5151. ;;
  5152. # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  5153. freebsd2.*)
  5154. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  5155. _LT_TAGVAR(hardcode_direct, $1)=yes
  5156. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5157. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5158. ;;
  5159. # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  5160. freebsd* | dragonfly*)
  5161. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5162. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5163. _LT_TAGVAR(hardcode_direct, $1)=yes
  5164. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5165. ;;
  5166. hpux9*)
  5167. if test yes = "$GCC"; then
  5168. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
  5169. else
  5170. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
  5171. fi
  5172. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  5173. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5174. _LT_TAGVAR(hardcode_direct, $1)=yes
  5175. # hardcode_minus_L: Not really in the search PATH,
  5176. # but as the default location of the library.
  5177. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5178. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  5179. ;;
  5180. hpux10*)
  5181. if test yes,no = "$GCC,$with_gnu_ld"; then
  5182. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  5183. else
  5184. _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
  5185. fi
  5186. if test no = "$with_gnu_ld"; then
  5187. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  5188. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5189. _LT_TAGVAR(hardcode_direct, $1)=yes
  5190. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5191. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  5192. # hardcode_minus_L: Not really in the search PATH,
  5193. # but as the default location of the library.
  5194. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5195. fi
  5196. ;;
  5197. hpux11*)
  5198. if test yes,no = "$GCC,$with_gnu_ld"; then
  5199. case $host_cpu in
  5200. hppa*64*)
  5201. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
  5202. ;;
  5203. ia64*)
  5204. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  5205. ;;
  5206. *)
  5207. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  5208. ;;
  5209. esac
  5210. else
  5211. case $host_cpu in
  5212. hppa*64*)
  5213. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
  5214. ;;
  5215. ia64*)
  5216. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  5217. ;;
  5218. *)
  5219. m4_if($1, [], [
  5220. # Older versions of the 11.00 compiler do not understand -b yet
  5221. # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
  5222. _LT_LINKER_OPTION([if $CC understands -b],
  5223. _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
  5224. [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
  5225. [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
  5226. [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
  5227. ;;
  5228. esac
  5229. fi
  5230. if test no = "$with_gnu_ld"; then
  5231. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  5232. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5233. case $host_cpu in
  5234. hppa*64*|ia64*)
  5235. _LT_TAGVAR(hardcode_direct, $1)=no
  5236. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5237. ;;
  5238. *)
  5239. _LT_TAGVAR(hardcode_direct, $1)=yes
  5240. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5241. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  5242. # hardcode_minus_L: Not really in the search PATH,
  5243. # but as the default location of the library.
  5244. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5245. ;;
  5246. esac
  5247. fi
  5248. ;;
  5249. irix5* | irix6* | nonstopux*)
  5250. if test yes = "$GCC"; then
  5251. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
  5252. # Try to use the -exported_symbol ld option, if it does not
  5253. # work, assume that -exports_file does not work either and
  5254. # implicitly export all symbols.
  5255. # This should be the same for all languages, so no per-tag cache variable.
  5256. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
  5257. [lt_cv_irix_exported_symbol],
  5258. [save_LDFLAGS=$LDFLAGS
  5259. LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
  5260. AC_LINK_IFELSE(
  5261. [AC_LANG_SOURCE(
  5262. [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
  5263. [C++], [[int foo (void) { return 0; }]],
  5264. [Fortran 77], [[
  5265. subroutine foo
  5266. end]],
  5267. [Fortran], [[
  5268. subroutine foo
  5269. end]])])],
  5270. [lt_cv_irix_exported_symbol=yes],
  5271. [lt_cv_irix_exported_symbol=no])
  5272. LDFLAGS=$save_LDFLAGS])
  5273. if test yes = "$lt_cv_irix_exported_symbol"; then
  5274. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
  5275. fi
  5276. else
  5277. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
  5278. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
  5279. fi
  5280. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  5281. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5282. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5283. _LT_TAGVAR(inherit_rpath, $1)=yes
  5284. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5285. ;;
  5286. linux*)
  5287. case $cc_basename in
  5288. tcc*)
  5289. # Fabrice Bellard et al's Tiny C Compiler
  5290. _LT_TAGVAR(ld_shlibs, $1)=yes
  5291. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5292. ;;
  5293. esac
  5294. ;;
  5295. netbsd*)
  5296. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  5297. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
  5298. else
  5299. _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
  5300. fi
  5301. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5302. _LT_TAGVAR(hardcode_direct, $1)=yes
  5303. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5304. ;;
  5305. newsos6)
  5306. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5307. _LT_TAGVAR(hardcode_direct, $1)=yes
  5308. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5309. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5310. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5311. ;;
  5312. *nto* | *qnx*)
  5313. ;;
  5314. openbsd* | bitrig*)
  5315. if test -f /usr/libexec/ld.so; then
  5316. _LT_TAGVAR(hardcode_direct, $1)=yes
  5317. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5318. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5319. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
  5320. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5321. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
  5322. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  5323. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  5324. else
  5325. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5326. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  5327. fi
  5328. else
  5329. _LT_TAGVAR(ld_shlibs, $1)=no
  5330. fi
  5331. ;;
  5332. os2*)
  5333. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5334. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5335. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5336. shrext_cmds=.dll
  5337. _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  5338. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  5339. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  5340. $ECHO EXPORTS >> $output_objdir/$libname.def~
  5341. emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
  5342. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  5343. emximp -o $lib $output_objdir/$libname.def'
  5344. _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  5345. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  5346. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  5347. $ECHO EXPORTS >> $output_objdir/$libname.def~
  5348. prefix_cmds="$SED"~
  5349. if test EXPORTS = "`$SED 1q $export_symbols`"; then
  5350. prefix_cmds="$prefix_cmds -e 1d";
  5351. fi~
  5352. prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
  5353. cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
  5354. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  5355. emximp -o $lib $output_objdir/$libname.def'
  5356. _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
  5357. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5358. ;;
  5359. osf3*)
  5360. if test yes = "$GCC"; then
  5361. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
  5362. _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
  5363. else
  5364. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  5365. _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
  5366. fi
  5367. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  5368. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5369. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5370. ;;
  5371. osf4* | osf5*) # as osf3* with the addition of -msym flag
  5372. if test yes = "$GCC"; then
  5373. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
  5374. _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
  5375. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5376. else
  5377. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  5378. _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
  5379. _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~
  5380. $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
  5381. # Both c and cxx compiler support -rpath directly
  5382. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  5383. fi
  5384. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  5385. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5386. ;;
  5387. solaris*)
  5388. _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
  5389. if test yes = "$GCC"; then
  5390. wlarc='$wl'
  5391. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
  5392. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5393. $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
  5394. else
  5395. case `$CC -V 2>&1` in
  5396. *"Compilers 5.0"*)
  5397. wlarc=''
  5398. _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5399. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5400. $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
  5401. ;;
  5402. *)
  5403. wlarc='$wl'
  5404. _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
  5405. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5406. $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
  5407. ;;
  5408. esac
  5409. fi
  5410. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5411. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5412. case $host_os in
  5413. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  5414. *)
  5415. # The compiler driver will combine and reorder linker options,
  5416. # but understands '-z linker_flag'. GCC discards it without '$wl',
  5417. # but is careful enough not to reorder.
  5418. # Supported since Solaris 2.6 (maybe 2.5.1?)
  5419. if test yes = "$GCC"; then
  5420. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
  5421. else
  5422. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  5423. fi
  5424. ;;
  5425. esac
  5426. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5427. ;;
  5428. sunos4*)
  5429. if test sequent = "$host_vendor"; then
  5430. # Use $CC to link under sequent, because it throws in some extra .o
  5431. # files that make .init and .fini sections work.
  5432. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
  5433. else
  5434. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
  5435. fi
  5436. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5437. _LT_TAGVAR(hardcode_direct, $1)=yes
  5438. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5439. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5440. ;;
  5441. sysv4)
  5442. case $host_vendor in
  5443. sni)
  5444. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5445. _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
  5446. ;;
  5447. siemens)
  5448. ## LD is ld it makes a PLAMLIB
  5449. ## CC just makes a GrossModule.
  5450. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  5451. _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
  5452. _LT_TAGVAR(hardcode_direct, $1)=no
  5453. ;;
  5454. motorola)
  5455. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5456. _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
  5457. ;;
  5458. esac
  5459. runpath_var='LD_RUN_PATH'
  5460. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5461. ;;
  5462. sysv4.3*)
  5463. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5464. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5465. _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
  5466. ;;
  5467. sysv4*MP*)
  5468. if test -d /usr/nec; then
  5469. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5470. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5471. runpath_var=LD_RUN_PATH
  5472. hardcode_runpath_var=yes
  5473. _LT_TAGVAR(ld_shlibs, $1)=yes
  5474. fi
  5475. ;;
  5476. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  5477. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  5478. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5479. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5480. runpath_var='LD_RUN_PATH'
  5481. if test yes = "$GCC"; then
  5482. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5483. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5484. else
  5485. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5486. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5487. fi
  5488. ;;
  5489. sysv5* | sco3.2v5* | sco5v6*)
  5490. # Note: We CANNOT use -z defs as we might desire, because we do not
  5491. # link with -lc, and that would cause any symbols used from libc to
  5492. # always be unresolved, which means just about no library would
  5493. # ever link correctly. If we're not using GNU ld we use -z text
  5494. # though, which does catch some bad symbols but isn't as heavy-handed
  5495. # as -z defs.
  5496. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  5497. _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
  5498. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5499. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5500. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
  5501. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5502. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5503. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
  5504. runpath_var='LD_RUN_PATH'
  5505. if test yes = "$GCC"; then
  5506. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5507. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5508. else
  5509. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5510. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5511. fi
  5512. ;;
  5513. uts4*)
  5514. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5515. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5516. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5517. ;;
  5518. *)
  5519. _LT_TAGVAR(ld_shlibs, $1)=no
  5520. ;;
  5521. esac
  5522. if test sni = "$host_vendor"; then
  5523. case $host in
  5524. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  5525. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
  5526. ;;
  5527. esac
  5528. fi
  5529. fi
  5530. ])
  5531. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  5532. test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
  5533. _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
  5534. _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
  5535. _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
  5536. _LT_DECL([], [extract_expsyms_cmds], [2],
  5537. [The commands to extract the exported symbol list from a shared archive])
  5538. #
  5539. # Do we need to explicitly link libc?
  5540. #
  5541. case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
  5542. x|xyes)
  5543. # Assume -lc should be added
  5544. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5545. if test yes,yes = "$GCC,$enable_shared"; then
  5546. case $_LT_TAGVAR(archive_cmds, $1) in
  5547. *'~'*)
  5548. # FIXME: we may have to deal with multi-command sequences.
  5549. ;;
  5550. '$CC '*)
  5551. # Test whether the compiler implicitly links with -lc since on some
  5552. # systems, -lgcc has to come before -lc. If gcc already passes -lc
  5553. # to ld, don't add -lc before -lgcc.
  5554. AC_CACHE_CHECK([whether -lc should be explicitly linked in],
  5555. [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
  5556. [$RM conftest*
  5557. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  5558. if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
  5559. soname=conftest
  5560. lib=conftest
  5561. libobjs=conftest.$ac_objext
  5562. deplibs=
  5563. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
  5564. pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
  5565. compiler_flags=-v
  5566. linker_flags=-v
  5567. verstring=
  5568. output_objdir=.
  5569. libname=conftest
  5570. lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
  5571. _LT_TAGVAR(allow_undefined_flag, $1)=
  5572. if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
  5573. then
  5574. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5575. else
  5576. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5577. fi
  5578. _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
  5579. else
  5580. cat conftest.err 1>&5
  5581. fi
  5582. $RM conftest*
  5583. ])
  5584. _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
  5585. ;;
  5586. esac
  5587. fi
  5588. ;;
  5589. esac
  5590. _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
  5591. [Whether or not to add -lc for building shared libraries])
  5592. _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
  5593. [enable_shared_with_static_runtimes], [0],
  5594. [Whether or not to disallow shared libs when runtime libs are static])
  5595. _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
  5596. [Compiler flag to allow reflexive dlopens])
  5597. _LT_TAGDECL([], [whole_archive_flag_spec], [1],
  5598. [Compiler flag to generate shared objects directly from archives])
  5599. _LT_TAGDECL([], [compiler_needs_object], [1],
  5600. [Whether the compiler copes with passing no objects directly])
  5601. _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
  5602. [Create an old-style archive from a shared archive])
  5603. _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
  5604. [Create a temporary old-style archive to link instead of a shared archive])
  5605. _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
  5606. _LT_TAGDECL([], [archive_expsym_cmds], [2])
  5607. _LT_TAGDECL([], [module_cmds], [2],
  5608. [Commands used to build a loadable module if different from building
  5609. a shared archive.])
  5610. _LT_TAGDECL([], [module_expsym_cmds], [2])
  5611. _LT_TAGDECL([], [with_gnu_ld], [1],
  5612. [Whether we are building with GNU ld or not])
  5613. _LT_TAGDECL([], [allow_undefined_flag], [1],
  5614. [Flag that allows shared libraries with undefined symbols to be built])
  5615. _LT_TAGDECL([], [no_undefined_flag], [1],
  5616. [Flag that enforces no undefined symbols])
  5617. _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
  5618. [Flag to hardcode $libdir into a binary during linking.
  5619. This must work even if $libdir does not exist])
  5620. _LT_TAGDECL([], [hardcode_libdir_separator], [1],
  5621. [Whether we need a single "-rpath" flag with a separated argument])
  5622. _LT_TAGDECL([], [hardcode_direct], [0],
  5623. [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
  5624. DIR into the resulting binary])
  5625. _LT_TAGDECL([], [hardcode_direct_absolute], [0],
  5626. [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
  5627. DIR into the resulting binary and the resulting library dependency is
  5628. "absolute", i.e impossible to change by setting $shlibpath_var if the
  5629. library is relocated])
  5630. _LT_TAGDECL([], [hardcode_minus_L], [0],
  5631. [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
  5632. into the resulting binary])
  5633. _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
  5634. [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
  5635. into the resulting binary])
  5636. _LT_TAGDECL([], [hardcode_automatic], [0],
  5637. [Set to "yes" if building a shared library automatically hardcodes DIR
  5638. into the library and all subsequent libraries and executables linked
  5639. against it])
  5640. _LT_TAGDECL([], [inherit_rpath], [0],
  5641. [Set to yes if linker adds runtime paths of dependent libraries
  5642. to runtime path list])
  5643. _LT_TAGDECL([], [link_all_deplibs], [0],
  5644. [Whether libtool must link a program against all its dependency libraries])
  5645. _LT_TAGDECL([], [always_export_symbols], [0],
  5646. [Set to "yes" if exported symbols are required])
  5647. _LT_TAGDECL([], [export_symbols_cmds], [2],
  5648. [The commands to list exported symbols])
  5649. _LT_TAGDECL([], [exclude_expsyms], [1],
  5650. [Symbols that should not be listed in the preloaded symbols])
  5651. _LT_TAGDECL([], [include_expsyms], [1],
  5652. [Symbols that must always be exported])
  5653. _LT_TAGDECL([], [prelink_cmds], [2],
  5654. [Commands necessary for linking programs (against libraries) with templates])
  5655. _LT_TAGDECL([], [postlink_cmds], [2],
  5656. [Commands necessary for finishing linking programs])
  5657. _LT_TAGDECL([], [file_list_spec], [1],
  5658. [Specify filename containing input files])
  5659. dnl FIXME: Not yet implemented
  5660. dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
  5661. dnl [Compiler flag to generate thread safe objects])
  5662. ])# _LT_LINKER_SHLIBS
  5663. # _LT_LANG_C_CONFIG([TAG])
  5664. # ------------------------
  5665. # Ensure that the configuration variables for a C compiler are suitably
  5666. # defined. These variables are subsequently used by _LT_CONFIG to write
  5667. # the compiler configuration to 'libtool'.
  5668. m4_defun([_LT_LANG_C_CONFIG],
  5669. [m4_require([_LT_DECL_EGREP])dnl
  5670. lt_save_CC=$CC
  5671. AC_LANG_PUSH(C)
  5672. # Source file extension for C test sources.
  5673. ac_ext=c
  5674. # Object file extension for compiled C test sources.
  5675. objext=o
  5676. _LT_TAGVAR(objext, $1)=$objext
  5677. # Code to be used in simple compile tests
  5678. lt_simple_compile_test_code="int some_variable = 0;"
  5679. # Code to be used in simple link tests
  5680. lt_simple_link_test_code='int main(){return(0);}'
  5681. _LT_TAG_COMPILER
  5682. # Save the default compiler, since it gets overwritten when the other
  5683. # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
  5684. compiler_DEFAULT=$CC
  5685. # save warnings/boilerplate of simple test code
  5686. _LT_COMPILER_BOILERPLATE
  5687. _LT_LINKER_BOILERPLATE
  5688. if test -n "$compiler"; then
  5689. _LT_COMPILER_NO_RTTI($1)
  5690. _LT_COMPILER_PIC($1)
  5691. _LT_COMPILER_C_O($1)
  5692. _LT_COMPILER_FILE_LOCKS($1)
  5693. _LT_LINKER_SHLIBS($1)
  5694. _LT_SYS_DYNAMIC_LINKER($1)
  5695. _LT_LINKER_HARDCODE_LIBPATH($1)
  5696. LT_SYS_DLOPEN_SELF
  5697. _LT_CMD_STRIPLIB
  5698. # Report what library types will actually be built
  5699. AC_MSG_CHECKING([if libtool supports shared libraries])
  5700. AC_MSG_RESULT([$can_build_shared])
  5701. AC_MSG_CHECKING([whether to build shared libraries])
  5702. test no = "$can_build_shared" && enable_shared=no
  5703. # On AIX, shared libraries and static libraries use the same namespace, and
  5704. # are all built from PIC.
  5705. case $host_os in
  5706. aix3*)
  5707. test yes = "$enable_shared" && enable_static=no
  5708. if test -n "$RANLIB"; then
  5709. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  5710. postinstall_cmds='$RANLIB $lib'
  5711. fi
  5712. ;;
  5713. aix[[4-9]]*)
  5714. if test ia64 != "$host_cpu"; then
  5715. case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
  5716. yes,aix,yes) ;; # shared object as lib.so file only
  5717. yes,svr4,*) ;; # shared object as lib.so archive member only
  5718. yes,*) enable_static=no ;; # shared object in lib.a archive as well
  5719. esac
  5720. fi
  5721. ;;
  5722. esac
  5723. AC_MSG_RESULT([$enable_shared])
  5724. AC_MSG_CHECKING([whether to build static libraries])
  5725. # Make sure either enable_shared or enable_static is yes.
  5726. test yes = "$enable_shared" || enable_static=yes
  5727. AC_MSG_RESULT([$enable_static])
  5728. _LT_CONFIG($1)
  5729. fi
  5730. AC_LANG_POP
  5731. CC=$lt_save_CC
  5732. ])# _LT_LANG_C_CONFIG
  5733. # _LT_LANG_CXX_CONFIG([TAG])
  5734. # --------------------------
  5735. # Ensure that the configuration variables for a C++ compiler are suitably
  5736. # defined. These variables are subsequently used by _LT_CONFIG to write
  5737. # the compiler configuration to 'libtool'.
  5738. m4_defun([_LT_LANG_CXX_CONFIG],
  5739. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  5740. m4_require([_LT_DECL_EGREP])dnl
  5741. m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  5742. if test -n "$CXX" && ( test no != "$CXX" &&
  5743. ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
  5744. (test g++ != "$CXX"))); then
  5745. AC_PROG_CXXCPP
  5746. else
  5747. _lt_caught_CXX_error=yes
  5748. fi
  5749. AC_LANG_PUSH(C++)
  5750. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5751. _LT_TAGVAR(allow_undefined_flag, $1)=
  5752. _LT_TAGVAR(always_export_symbols, $1)=no
  5753. _LT_TAGVAR(archive_expsym_cmds, $1)=
  5754. _LT_TAGVAR(compiler_needs_object, $1)=no
  5755. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  5756. _LT_TAGVAR(hardcode_direct, $1)=no
  5757. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  5758. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  5759. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5760. _LT_TAGVAR(hardcode_minus_L, $1)=no
  5761. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  5762. _LT_TAGVAR(hardcode_automatic, $1)=no
  5763. _LT_TAGVAR(inherit_rpath, $1)=no
  5764. _LT_TAGVAR(module_cmds, $1)=
  5765. _LT_TAGVAR(module_expsym_cmds, $1)=
  5766. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  5767. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  5768. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  5769. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  5770. _LT_TAGVAR(no_undefined_flag, $1)=
  5771. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5772. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  5773. # Source file extension for C++ test sources.
  5774. ac_ext=cpp
  5775. # Object file extension for compiled C++ test sources.
  5776. objext=o
  5777. _LT_TAGVAR(objext, $1)=$objext
  5778. # No sense in running all these tests if we already determined that
  5779. # the CXX compiler isn't working. Some variables (like enable_shared)
  5780. # are currently assumed to apply to all compilers on this platform,
  5781. # and will be corrupted by setting them based on a non-working compiler.
  5782. if test yes != "$_lt_caught_CXX_error"; then
  5783. # Code to be used in simple compile tests
  5784. lt_simple_compile_test_code="int some_variable = 0;"
  5785. # Code to be used in simple link tests
  5786. lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
  5787. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  5788. _LT_TAG_COMPILER
  5789. # save warnings/boilerplate of simple test code
  5790. _LT_COMPILER_BOILERPLATE
  5791. _LT_LINKER_BOILERPLATE
  5792. # Allow CC to be a program name with arguments.
  5793. lt_save_CC=$CC
  5794. lt_save_CFLAGS=$CFLAGS
  5795. lt_save_LD=$LD
  5796. lt_save_GCC=$GCC
  5797. GCC=$GXX
  5798. lt_save_with_gnu_ld=$with_gnu_ld
  5799. lt_save_path_LD=$lt_cv_path_LD
  5800. if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
  5801. lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
  5802. else
  5803. $as_unset lt_cv_prog_gnu_ld
  5804. fi
  5805. if test -n "${lt_cv_path_LDCXX+set}"; then
  5806. lt_cv_path_LD=$lt_cv_path_LDCXX
  5807. else
  5808. $as_unset lt_cv_path_LD
  5809. fi
  5810. test -z "${LDCXX+set}" || LD=$LDCXX
  5811. CC=${CXX-"c++"}
  5812. CFLAGS=$CXXFLAGS
  5813. compiler=$CC
  5814. _LT_TAGVAR(compiler, $1)=$CC
  5815. _LT_CC_BASENAME([$compiler])
  5816. if test -n "$compiler"; then
  5817. # We don't want -fno-exception when compiling C++ code, so set the
  5818. # no_builtin_flag separately
  5819. if test yes = "$GXX"; then
  5820. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  5821. else
  5822. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  5823. fi
  5824. if test yes = "$GXX"; then
  5825. # Set up default GNU C++ configuration
  5826. LT_PATH_LD
  5827. # Check if GNU C++ uses GNU ld as the underlying linker, since the
  5828. # archiving commands below assume that GNU ld is being used.
  5829. if test yes = "$with_gnu_ld"; then
  5830. _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  5831. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
  5832. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5833. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  5834. # If archive_cmds runs LD, not CC, wlarc should be empty
  5835. # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
  5836. # investigate it a little bit more. (MM)
  5837. wlarc='$wl'
  5838. # ancient GNU ld didn't support --whole-archive et. al.
  5839. if eval "`$CC -print-prog-name=ld` --help 2>&1" |
  5840. $GREP 'no-whole-archive' > /dev/null; then
  5841. _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
  5842. else
  5843. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5844. fi
  5845. else
  5846. with_gnu_ld=no
  5847. wlarc=
  5848. # A generic and very simple default shared library creation
  5849. # command for GNU C++ for the case where it uses the native
  5850. # linker, instead of GNU ld. If possible, this setting should
  5851. # overridden to take advantage of the native linker features on
  5852. # the platform it is being used on.
  5853. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  5854. fi
  5855. # Commands to make compiler produce verbose output that lists
  5856. # what "hidden" libraries, object files and flags are used when
  5857. # linking a shared library.
  5858. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  5859. else
  5860. GXX=no
  5861. with_gnu_ld=no
  5862. wlarc=
  5863. fi
  5864. # PORTME: fill in a description of your system's C++ link characteristics
  5865. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  5866. _LT_TAGVAR(ld_shlibs, $1)=yes
  5867. case $host_os in
  5868. aix3*)
  5869. # FIXME: insert proper C++ library support
  5870. _LT_TAGVAR(ld_shlibs, $1)=no
  5871. ;;
  5872. aix[[4-9]]*)
  5873. if test ia64 = "$host_cpu"; then
  5874. # On IA64, the linker does run time linking by default, so we don't
  5875. # have to do anything special.
  5876. aix_use_runtimelinking=no
  5877. exp_sym_flag='-Bexport'
  5878. no_entry_flag=
  5879. else
  5880. aix_use_runtimelinking=no
  5881. # Test if we are trying to use run time linking or normal
  5882. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  5883. # have runtime linking enabled, and use it for executables.
  5884. # For shared libraries, we enable/disable runtime linking
  5885. # depending on the kind of the shared library created -
  5886. # when "with_aix_soname,aix_use_runtimelinking" is:
  5887. # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
  5888. # "aix,yes" lib.so shared, rtl:yes, for executables
  5889. # lib.a static archive
  5890. # "both,no" lib.so.V(shr.o) shared, rtl:yes
  5891. # lib.a(lib.so.V) shared, rtl:no, for executables
  5892. # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
  5893. # lib.a(lib.so.V) shared, rtl:no
  5894. # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
  5895. # lib.a static archive
  5896. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  5897. for ld_flag in $LDFLAGS; do
  5898. case $ld_flag in
  5899. *-brtl*)
  5900. aix_use_runtimelinking=yes
  5901. break
  5902. ;;
  5903. esac
  5904. done
  5905. if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
  5906. # With aix-soname=svr4, we create the lib.so.V shared archives only,
  5907. # so we don't have lib.a shared libs to link our executables.
  5908. # We have to force runtime linking in this case.
  5909. aix_use_runtimelinking=yes
  5910. LDFLAGS="$LDFLAGS -Wl,-brtl"
  5911. fi
  5912. ;;
  5913. esac
  5914. exp_sym_flag='-bexport'
  5915. no_entry_flag='-bnoentry'
  5916. fi
  5917. # When large executables or shared objects are built, AIX ld can
  5918. # have problems creating the table of contents. If linking a library
  5919. # or program results in "error TOC overflow" add -mminimal-toc to
  5920. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  5921. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  5922. _LT_TAGVAR(archive_cmds, $1)=''
  5923. _LT_TAGVAR(hardcode_direct, $1)=yes
  5924. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5925. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5926. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5927. _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
  5928. case $with_aix_soname,$aix_use_runtimelinking in
  5929. aix,*) ;; # no import file
  5930. svr4,* | *,yes) # use import file
  5931. # The Import File defines what to hardcode.
  5932. _LT_TAGVAR(hardcode_direct, $1)=no
  5933. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  5934. ;;
  5935. esac
  5936. if test yes = "$GXX"; then
  5937. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  5938. # We only want to do this on AIX 4.2 and lower, the check
  5939. # below for broken collect2 doesn't work under 4.3+
  5940. collect2name=`$CC -print-prog-name=collect2`
  5941. if test -f "$collect2name" &&
  5942. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  5943. then
  5944. # We have reworked collect2
  5945. :
  5946. else
  5947. # We have old collect2
  5948. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  5949. # It fails to find uninstalled libraries when the uninstalled
  5950. # path is not listed in the libpath. Setting hardcode_minus_L
  5951. # to unsupported forces relinking
  5952. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5953. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5954. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5955. fi
  5956. esac
  5957. shared_flag='-shared'
  5958. if test yes = "$aix_use_runtimelinking"; then
  5959. shared_flag=$shared_flag' $wl-G'
  5960. fi
  5961. # Need to ensure runtime linking is disabled for the traditional
  5962. # shared library, or the linker may eventually find shared libraries
  5963. # /with/ Import File - we do not want to mix them.
  5964. shared_flag_aix='-shared'
  5965. shared_flag_svr4='-shared $wl-G'
  5966. else
  5967. # not using gcc
  5968. if test ia64 = "$host_cpu"; then
  5969. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  5970. # chokes on -Wl,-G. The following line is correct:
  5971. shared_flag='-G'
  5972. else
  5973. if test yes = "$aix_use_runtimelinking"; then
  5974. shared_flag='$wl-G'
  5975. else
  5976. shared_flag='$wl-bM:SRE'
  5977. fi
  5978. shared_flag_aix='$wl-bM:SRE'
  5979. shared_flag_svr4='$wl-G'
  5980. fi
  5981. fi
  5982. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
  5983. # It seems that -bexpall does not export symbols beginning with
  5984. # underscore (_), so it is better to generate a list of symbols to
  5985. # export.
  5986. _LT_TAGVAR(always_export_symbols, $1)=yes
  5987. if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
  5988. # Warning - without using the other runtime loading flags (-brtl),
  5989. # -berok will link without error, but may produce a broken library.
  5990. # The "-G" linker flag allows undefined symbols.
  5991. _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
  5992. # Determine the default libpath from the value encoded in an empty
  5993. # executable.
  5994. _LT_SYS_MODULE_PATH_AIX([$1])
  5995. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
  5996. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
  5997. else
  5998. if test ia64 = "$host_cpu"; then
  5999. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
  6000. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  6001. _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"
  6002. else
  6003. # Determine the default libpath from the value encoded in an
  6004. # empty executable.
  6005. _LT_SYS_MODULE_PATH_AIX([$1])
  6006. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
  6007. # Warning - without using the other run time loading flags,
  6008. # -berok will link without error, but may produce a broken library.
  6009. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
  6010. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
  6011. if test yes = "$with_gnu_ld"; then
  6012. # We only use this code for GNU lds that support --whole-archive.
  6013. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
  6014. else
  6015. # Exported symbols can be pulled into shared objects from archives
  6016. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  6017. fi
  6018. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  6019. _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
  6020. # -brtl affects multiple linker settings, -berok does not and is overridden later
  6021. compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
  6022. if test svr4 != "$with_aix_soname"; then
  6023. # This is similar to how AIX traditionally builds its shared
  6024. # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
  6025. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
  6026. fi
  6027. if test aix != "$with_aix_soname"; then
  6028. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
  6029. else
  6030. # used by -dlpreopen to get the symbols
  6031. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
  6032. fi
  6033. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
  6034. fi
  6035. fi
  6036. ;;
  6037. beos*)
  6038. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  6039. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6040. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  6041. # support --undefined. This deserves some investigation. FIXME
  6042. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  6043. else
  6044. _LT_TAGVAR(ld_shlibs, $1)=no
  6045. fi
  6046. ;;
  6047. chorus*)
  6048. case $cc_basename in
  6049. *)
  6050. # FIXME: insert proper C++ library support
  6051. _LT_TAGVAR(ld_shlibs, $1)=no
  6052. ;;
  6053. esac
  6054. ;;
  6055. cygwin* | mingw* | pw32* | cegcc*)
  6056. case $GXX,$cc_basename in
  6057. ,cl* | no,cl*)
  6058. # Native MSVC
  6059. # hardcode_libdir_flag_spec is actually meaningless, as there is
  6060. # no search path for DLLs.
  6061. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  6062. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6063. _LT_TAGVAR(always_export_symbols, $1)=yes
  6064. _LT_TAGVAR(file_list_spec, $1)='@'
  6065. # Tell ltmain to make .lib files, not .a files.
  6066. libext=lib
  6067. # Tell ltmain to make .dll files, not .so files.
  6068. shrext_cmds=.dll
  6069. # FIXME: Setting linknames here is a bad hack.
  6070. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
  6071. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  6072. cp "$export_symbols" "$output_objdir/$soname.def";
  6073. echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
  6074. else
  6075. $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
  6076. fi~
  6077. $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  6078. linknames='
  6079. # The linker will not automatically build a static lib if we build a DLL.
  6080. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  6081. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  6082. # Don't use ranlib
  6083. _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  6084. _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  6085. lt_tool_outputfile="@TOOL_OUTPUT@"~
  6086. case $lt_outputfile in
  6087. *.exe|*.EXE) ;;
  6088. *)
  6089. lt_outputfile=$lt_outputfile.exe
  6090. lt_tool_outputfile=$lt_tool_outputfile.exe
  6091. ;;
  6092. esac~
  6093. func_to_tool_file "$lt_outputfile"~
  6094. if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
  6095. $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  6096. $RM "$lt_outputfile.manifest";
  6097. fi'
  6098. ;;
  6099. *)
  6100. # g++
  6101. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  6102. # as there is no search path for DLLs.
  6103. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6104. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
  6105. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6106. _LT_TAGVAR(always_export_symbols, $1)=no
  6107. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  6108. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  6109. _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'
  6110. # If the export-symbols file already is a .def file, use it as
  6111. # is; otherwise, prepend EXPORTS...
  6112. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  6113. cp $export_symbols $output_objdir/$soname.def;
  6114. else
  6115. echo EXPORTS > $output_objdir/$soname.def;
  6116. cat $export_symbols >> $output_objdir/$soname.def;
  6117. fi~
  6118. $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'
  6119. else
  6120. _LT_TAGVAR(ld_shlibs, $1)=no
  6121. fi
  6122. ;;
  6123. esac
  6124. ;;
  6125. darwin* | rhapsody*)
  6126. _LT_DARWIN_LINKER_FEATURES($1)
  6127. ;;
  6128. os2*)
  6129. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6130. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  6131. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6132. shrext_cmds=.dll
  6133. _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  6134. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  6135. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  6136. $ECHO EXPORTS >> $output_objdir/$libname.def~
  6137. emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
  6138. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  6139. emximp -o $lib $output_objdir/$libname.def'
  6140. _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  6141. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  6142. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  6143. $ECHO EXPORTS >> $output_objdir/$libname.def~
  6144. prefix_cmds="$SED"~
  6145. if test EXPORTS = "`$SED 1q $export_symbols`"; then
  6146. prefix_cmds="$prefix_cmds -e 1d";
  6147. fi~
  6148. prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
  6149. cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
  6150. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  6151. emximp -o $lib $output_objdir/$libname.def'
  6152. _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
  6153. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  6154. ;;
  6155. dgux*)
  6156. case $cc_basename in
  6157. ec++*)
  6158. # FIXME: insert proper C++ library support
  6159. _LT_TAGVAR(ld_shlibs, $1)=no
  6160. ;;
  6161. ghcx*)
  6162. # Green Hills C++ Compiler
  6163. # FIXME: insert proper C++ library support
  6164. _LT_TAGVAR(ld_shlibs, $1)=no
  6165. ;;
  6166. *)
  6167. # FIXME: insert proper C++ library support
  6168. _LT_TAGVAR(ld_shlibs, $1)=no
  6169. ;;
  6170. esac
  6171. ;;
  6172. freebsd2.*)
  6173. # C++ shared libraries reported to be fairly broken before
  6174. # switch to ELF
  6175. _LT_TAGVAR(ld_shlibs, $1)=no
  6176. ;;
  6177. freebsd-elf*)
  6178. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6179. ;;
  6180. freebsd* | dragonfly*)
  6181. # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
  6182. # conventions
  6183. _LT_TAGVAR(ld_shlibs, $1)=yes
  6184. ;;
  6185. haiku*)
  6186. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  6187. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6188. ;;
  6189. hpux9*)
  6190. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  6191. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6192. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  6193. _LT_TAGVAR(hardcode_direct, $1)=yes
  6194. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  6195. # but as the default
  6196. # location of the library.
  6197. case $cc_basename in
  6198. CC*)
  6199. # FIXME: insert proper C++ library support
  6200. _LT_TAGVAR(ld_shlibs, $1)=no
  6201. ;;
  6202. aCC*)
  6203. _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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
  6204. # Commands to make compiler produce verbose output that lists
  6205. # what "hidden" libraries, object files and flags are used when
  6206. # linking a shared library.
  6207. #
  6208. # There doesn't appear to be a way to prevent this compiler from
  6209. # explicitly linking system object files so we need to strip them
  6210. # from the output so that they don't get included in the library
  6211. # dependencies.
  6212. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
  6213. ;;
  6214. *)
  6215. if test yes = "$GXX"; then
  6216. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
  6217. else
  6218. # FIXME: insert proper C++ library support
  6219. _LT_TAGVAR(ld_shlibs, $1)=no
  6220. fi
  6221. ;;
  6222. esac
  6223. ;;
  6224. hpux10*|hpux11*)
  6225. if test no = "$with_gnu_ld"; then
  6226. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  6227. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6228. case $host_cpu in
  6229. hppa*64*|ia64*)
  6230. ;;
  6231. *)
  6232. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  6233. ;;
  6234. esac
  6235. fi
  6236. case $host_cpu in
  6237. hppa*64*|ia64*)
  6238. _LT_TAGVAR(hardcode_direct, $1)=no
  6239. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6240. ;;
  6241. *)
  6242. _LT_TAGVAR(hardcode_direct, $1)=yes
  6243. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6244. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  6245. # but as the default
  6246. # location of the library.
  6247. ;;
  6248. esac
  6249. case $cc_basename in
  6250. CC*)
  6251. # FIXME: insert proper C++ library support
  6252. _LT_TAGVAR(ld_shlibs, $1)=no
  6253. ;;
  6254. aCC*)
  6255. case $host_cpu in
  6256. hppa*64*)
  6257. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6258. ;;
  6259. ia64*)
  6260. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6261. ;;
  6262. *)
  6263. _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'
  6264. ;;
  6265. esac
  6266. # Commands to make compiler produce verbose output that lists
  6267. # what "hidden" libraries, object files and flags are used when
  6268. # linking a shared library.
  6269. #
  6270. # There doesn't appear to be a way to prevent this compiler from
  6271. # explicitly linking system object files so we need to strip them
  6272. # from the output so that they don't get included in the library
  6273. # dependencies.
  6274. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
  6275. ;;
  6276. *)
  6277. if test yes = "$GXX"; then
  6278. if test no = "$with_gnu_ld"; then
  6279. case $host_cpu in
  6280. hppa*64*)
  6281. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6282. ;;
  6283. ia64*)
  6284. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6285. ;;
  6286. *)
  6287. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6288. ;;
  6289. esac
  6290. fi
  6291. else
  6292. # FIXME: insert proper C++ library support
  6293. _LT_TAGVAR(ld_shlibs, $1)=no
  6294. fi
  6295. ;;
  6296. esac
  6297. ;;
  6298. interix[[3-9]]*)
  6299. _LT_TAGVAR(hardcode_direct, $1)=no
  6300. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6301. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6302. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  6303. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  6304. # Instead, shared libraries are loaded at an image base (0x10000000 by
  6305. # default) and relocated if they conflict, which is a slow very memory
  6306. # consuming and fragmenting process. To avoid this, we pick a random,
  6307. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  6308. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  6309. _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'
  6310. _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'
  6311. ;;
  6312. irix5* | irix6*)
  6313. case $cc_basename in
  6314. CC*)
  6315. # SGI C++
  6316. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
  6317. # Archives containing C++ object files must be created using
  6318. # "CC -ar", where "CC" is the IRIX C++ compiler. This is
  6319. # necessary to make sure instantiated templates are included
  6320. # in the archive.
  6321. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
  6322. ;;
  6323. *)
  6324. if test yes = "$GXX"; then
  6325. if test no = "$with_gnu_ld"; then
  6326. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
  6327. else
  6328. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
  6329. fi
  6330. fi
  6331. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6332. ;;
  6333. esac
  6334. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  6335. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6336. _LT_TAGVAR(inherit_rpath, $1)=yes
  6337. ;;
  6338. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  6339. case $cc_basename in
  6340. KCC*)
  6341. # Kuck and Associates, Inc. (KAI) C++ Compiler
  6342. # KCC will only create a shared library if the output file
  6343. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  6344. # to its proper name (with version) after linking.
  6345. _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'
  6346. _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'
  6347. # Commands to make compiler produce verbose output that lists
  6348. # what "hidden" libraries, object files and flags are used when
  6349. # linking a shared library.
  6350. #
  6351. # There doesn't appear to be a way to prevent this compiler from
  6352. # explicitly linking system object files so we need to strip them
  6353. # from the output so that they don't get included in the library
  6354. # dependencies.
  6355. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
  6356. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6357. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  6358. # Archives containing C++ object files must be created using
  6359. # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  6360. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  6361. ;;
  6362. icpc* | ecpc* )
  6363. # Intel C++
  6364. with_gnu_ld=yes
  6365. # version 8.0 and above of icpc choke on multiply defined symbols
  6366. # if we add $predep_objects and $postdep_objects, however 7.1 and
  6367. # earlier do not add the objects themselves.
  6368. case `$CC -V 2>&1` in
  6369. *"Version 7."*)
  6370. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  6371. _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'
  6372. ;;
  6373. *) # Version 8.0 or newer
  6374. tmp_idyn=
  6375. case $host_cpu in
  6376. ia64*) tmp_idyn=' -i_dynamic';;
  6377. esac
  6378. _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  6379. _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'
  6380. ;;
  6381. esac
  6382. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6383. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6384. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  6385. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
  6386. ;;
  6387. pgCC* | pgcpp*)
  6388. # Portland Group C++ compiler
  6389. case `$CC -V` in
  6390. *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
  6391. _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
  6392. rm -rf $tpldir~
  6393. $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
  6394. compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
  6395. _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
  6396. rm -rf $tpldir~
  6397. $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
  6398. $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
  6399. $RANLIB $oldlib'
  6400. _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
  6401. rm -rf $tpldir~
  6402. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  6403. $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  6404. _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
  6405. rm -rf $tpldir~
  6406. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  6407. $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
  6408. ;;
  6409. *) # Version 6 and above use weak symbols
  6410. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  6411. _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'
  6412. ;;
  6413. esac
  6414. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
  6415. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  6416. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
  6417. ;;
  6418. cxx*)
  6419. # Compaq C++
  6420. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  6421. _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'
  6422. runpath_var=LD_RUN_PATH
  6423. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  6424. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6425. # Commands to make compiler produce verbose output that lists
  6426. # what "hidden" libraries, object files and flags are used when
  6427. # linking a shared library.
  6428. #
  6429. # There doesn't appear to be a way to prevent this compiler from
  6430. # explicitly linking system object files so we need to strip them
  6431. # from the output so that they don't get included in the library
  6432. # dependencies.
  6433. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
  6434. ;;
  6435. xl* | mpixl* | bgxl*)
  6436. # IBM XL 8.0 on PPC, with GNU ld
  6437. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  6438. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  6439. _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  6440. if test yes = "$supports_anon_versioning"; then
  6441. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  6442. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  6443. echo "local: *; };" >> $output_objdir/$libname.ver~
  6444. $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
  6445. fi
  6446. ;;
  6447. *)
  6448. case `$CC -V 2>&1 | sed 5q` in
  6449. *Sun\ C*)
  6450. # Sun C++ 5.9
  6451. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  6452. _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6453. _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'
  6454. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6455. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
  6456. _LT_TAGVAR(compiler_needs_object, $1)=yes
  6457. # Not sure whether something based on
  6458. # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
  6459. # would be better.
  6460. output_verbose_link_cmd='func_echo_all'
  6461. # Archives containing C++ object files must be created using
  6462. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  6463. # necessary to make sure instantiated templates are included
  6464. # in the archive.
  6465. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  6466. ;;
  6467. esac
  6468. ;;
  6469. esac
  6470. ;;
  6471. lynxos*)
  6472. # FIXME: insert proper C++ library support
  6473. _LT_TAGVAR(ld_shlibs, $1)=no
  6474. ;;
  6475. m88k*)
  6476. # FIXME: insert proper C++ library support
  6477. _LT_TAGVAR(ld_shlibs, $1)=no
  6478. ;;
  6479. mvs*)
  6480. case $cc_basename in
  6481. cxx*)
  6482. # FIXME: insert proper C++ library support
  6483. _LT_TAGVAR(ld_shlibs, $1)=no
  6484. ;;
  6485. *)
  6486. # FIXME: insert proper C++ library support
  6487. _LT_TAGVAR(ld_shlibs, $1)=no
  6488. ;;
  6489. esac
  6490. ;;
  6491. netbsd*)
  6492. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  6493. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
  6494. wlarc=
  6495. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6496. _LT_TAGVAR(hardcode_direct, $1)=yes
  6497. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6498. fi
  6499. # Workaround some broken pre-1.5 toolchains
  6500. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
  6501. ;;
  6502. *nto* | *qnx*)
  6503. _LT_TAGVAR(ld_shlibs, $1)=yes
  6504. ;;
  6505. openbsd* | bitrig*)
  6506. if test -f /usr/libexec/ld.so; then
  6507. _LT_TAGVAR(hardcode_direct, $1)=yes
  6508. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6509. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6510. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  6511. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6512. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
  6513. _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'
  6514. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  6515. _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
  6516. fi
  6517. output_verbose_link_cmd=func_echo_all
  6518. else
  6519. _LT_TAGVAR(ld_shlibs, $1)=no
  6520. fi
  6521. ;;
  6522. osf3* | osf4* | osf5*)
  6523. case $cc_basename in
  6524. KCC*)
  6525. # Kuck and Associates, Inc. (KAI) C++ Compiler
  6526. # KCC will only create a shared library if the output file
  6527. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  6528. # to its proper name (with version) after linking.
  6529. _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'
  6530. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6531. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6532. # Archives containing C++ object files must be created using
  6533. # the KAI C++ compiler.
  6534. case $host in
  6535. osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
  6536. *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
  6537. esac
  6538. ;;
  6539. RCC*)
  6540. # Rational C++ 2.4.1
  6541. # FIXME: insert proper C++ library support
  6542. _LT_TAGVAR(ld_shlibs, $1)=no
  6543. ;;
  6544. cxx*)
  6545. case $host in
  6546. osf3*)
  6547. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
  6548. _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
  6549. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  6550. ;;
  6551. *)
  6552. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  6553. _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
  6554. _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
  6555. echo "-hidden">> $lib.exp~
  6556. $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
  6557. $RM $lib.exp'
  6558. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  6559. ;;
  6560. esac
  6561. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6562. # Commands to make compiler produce verbose output that lists
  6563. # what "hidden" libraries, object files and flags are used when
  6564. # linking a shared library.
  6565. #
  6566. # There doesn't appear to be a way to prevent this compiler from
  6567. # explicitly linking system object files so we need to strip them
  6568. # from the output so that they don't get included in the library
  6569. # dependencies.
  6570. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
  6571. ;;
  6572. *)
  6573. if test yes,no = "$GXX,$with_gnu_ld"; then
  6574. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
  6575. case $host in
  6576. osf3*)
  6577. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
  6578. ;;
  6579. *)
  6580. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
  6581. ;;
  6582. esac
  6583. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  6584. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6585. # Commands to make compiler produce verbose output that lists
  6586. # what "hidden" libraries, object files and flags are used when
  6587. # linking a shared library.
  6588. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  6589. else
  6590. # FIXME: insert proper C++ library support
  6591. _LT_TAGVAR(ld_shlibs, $1)=no
  6592. fi
  6593. ;;
  6594. esac
  6595. ;;
  6596. psos*)
  6597. # FIXME: insert proper C++ library support
  6598. _LT_TAGVAR(ld_shlibs, $1)=no
  6599. ;;
  6600. sunos4*)
  6601. case $cc_basename in
  6602. CC*)
  6603. # Sun C++ 4.x
  6604. # FIXME: insert proper C++ library support
  6605. _LT_TAGVAR(ld_shlibs, $1)=no
  6606. ;;
  6607. lcc*)
  6608. # Lucid
  6609. # FIXME: insert proper C++ library support
  6610. _LT_TAGVAR(ld_shlibs, $1)=no
  6611. ;;
  6612. *)
  6613. # FIXME: insert proper C++ library support
  6614. _LT_TAGVAR(ld_shlibs, $1)=no
  6615. ;;
  6616. esac
  6617. ;;
  6618. solaris*)
  6619. case $cc_basename in
  6620. CC* | sunCC*)
  6621. # Sun C++ 4.2, 5.x and Centerline C++
  6622. _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
  6623. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  6624. _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6625. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6626. $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'
  6627. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6628. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6629. case $host_os in
  6630. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6631. *)
  6632. # The compiler driver will combine and reorder linker options,
  6633. # but understands '-z linker_flag'.
  6634. # Supported since Solaris 2.6 (maybe 2.5.1?)
  6635. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  6636. ;;
  6637. esac
  6638. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6639. output_verbose_link_cmd='func_echo_all'
  6640. # Archives containing C++ object files must be created using
  6641. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  6642. # necessary to make sure instantiated templates are included
  6643. # in the archive.
  6644. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  6645. ;;
  6646. gcx*)
  6647. # Green Hills C++ Compiler
  6648. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
  6649. # The C++ compiler must be used to create the archive.
  6650. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
  6651. ;;
  6652. *)
  6653. # GNU C++ compiler with Solaris linker
  6654. if test yes,no = "$GXX,$with_gnu_ld"; then
  6655. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
  6656. if $CC --version | $GREP -v '^2\.7' > /dev/null; then
  6657. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
  6658. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6659. $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  6660. # Commands to make compiler produce verbose output that lists
  6661. # what "hidden" libraries, object files and flags are used when
  6662. # linking a shared library.
  6663. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  6664. else
  6665. # g++ 2.7 appears to require '-G' NOT '-shared' on this
  6666. # platform.
  6667. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
  6668. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6669. $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  6670. # Commands to make compiler produce verbose output that lists
  6671. # what "hidden" libraries, object files and flags are used when
  6672. # linking a shared library.
  6673. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  6674. fi
  6675. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
  6676. case $host_os in
  6677. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6678. *)
  6679. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
  6680. ;;
  6681. esac
  6682. fi
  6683. ;;
  6684. esac
  6685. ;;
  6686. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  6687. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  6688. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6689. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6690. runpath_var='LD_RUN_PATH'
  6691. case $cc_basename in
  6692. CC*)
  6693. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6694. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6695. ;;
  6696. *)
  6697. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6698. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6699. ;;
  6700. esac
  6701. ;;
  6702. sysv5* | sco3.2v5* | sco5v6*)
  6703. # Note: We CANNOT use -z defs as we might desire, because we do not
  6704. # link with -lc, and that would cause any symbols used from libc to
  6705. # always be unresolved, which means just about no library would
  6706. # ever link correctly. If we're not using GNU ld we use -z text
  6707. # though, which does catch some bad symbols but isn't as heavy-handed
  6708. # as -z defs.
  6709. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  6710. _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
  6711. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6712. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6713. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
  6714. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  6715. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6716. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
  6717. runpath_var='LD_RUN_PATH'
  6718. case $cc_basename in
  6719. CC*)
  6720. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6721. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6722. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
  6723. '"$_LT_TAGVAR(old_archive_cmds, $1)"
  6724. _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
  6725. '"$_LT_TAGVAR(reload_cmds, $1)"
  6726. ;;
  6727. *)
  6728. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6729. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6730. ;;
  6731. esac
  6732. ;;
  6733. tandem*)
  6734. case $cc_basename in
  6735. NCC*)
  6736. # NonStop-UX NCC 3.20
  6737. # FIXME: insert proper C++ library support
  6738. _LT_TAGVAR(ld_shlibs, $1)=no
  6739. ;;
  6740. *)
  6741. # FIXME: insert proper C++ library support
  6742. _LT_TAGVAR(ld_shlibs, $1)=no
  6743. ;;
  6744. esac
  6745. ;;
  6746. vxworks*)
  6747. # FIXME: insert proper C++ library support
  6748. _LT_TAGVAR(ld_shlibs, $1)=no
  6749. ;;
  6750. *)
  6751. # FIXME: insert proper C++ library support
  6752. _LT_TAGVAR(ld_shlibs, $1)=no
  6753. ;;
  6754. esac
  6755. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  6756. test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
  6757. _LT_TAGVAR(GCC, $1)=$GXX
  6758. _LT_TAGVAR(LD, $1)=$LD
  6759. ## CAVEAT EMPTOR:
  6760. ## There is no encapsulation within the following macros, do not change
  6761. ## the running order or otherwise move them around unless you know exactly
  6762. ## what you are doing...
  6763. _LT_SYS_HIDDEN_LIBDEPS($1)
  6764. _LT_COMPILER_PIC($1)
  6765. _LT_COMPILER_C_O($1)
  6766. _LT_COMPILER_FILE_LOCKS($1)
  6767. _LT_LINKER_SHLIBS($1)
  6768. _LT_SYS_DYNAMIC_LINKER($1)
  6769. _LT_LINKER_HARDCODE_LIBPATH($1)
  6770. _LT_CONFIG($1)
  6771. fi # test -n "$compiler"
  6772. CC=$lt_save_CC
  6773. CFLAGS=$lt_save_CFLAGS
  6774. LDCXX=$LD
  6775. LD=$lt_save_LD
  6776. GCC=$lt_save_GCC
  6777. with_gnu_ld=$lt_save_with_gnu_ld
  6778. lt_cv_path_LDCXX=$lt_cv_path_LD
  6779. lt_cv_path_LD=$lt_save_path_LD
  6780. lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
  6781. lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
  6782. fi # test yes != "$_lt_caught_CXX_error"
  6783. AC_LANG_POP
  6784. ])# _LT_LANG_CXX_CONFIG
  6785. # _LT_FUNC_STRIPNAME_CNF
  6786. # ----------------------
  6787. # func_stripname_cnf prefix suffix name
  6788. # strip PREFIX and SUFFIX off of NAME.
  6789. # PREFIX and SUFFIX must not contain globbing or regex special
  6790. # characters, hashes, percent signs, but SUFFIX may contain a leading
  6791. # dot (in which case that matches only a dot).
  6792. #
  6793. # This function is identical to the (non-XSI) version of func_stripname,
  6794. # except this one can be used by m4 code that may be executed by configure,
  6795. # rather than the libtool script.
  6796. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
  6797. AC_REQUIRE([_LT_DECL_SED])
  6798. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
  6799. func_stripname_cnf ()
  6800. {
  6801. case @S|@2 in
  6802. .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
  6803. *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
  6804. esac
  6805. } # func_stripname_cnf
  6806. ])# _LT_FUNC_STRIPNAME_CNF
  6807. # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
  6808. # ---------------------------------
  6809. # Figure out "hidden" library dependencies from verbose
  6810. # compiler output when linking a shared library.
  6811. # Parse the compiler output and extract the necessary
  6812. # objects, libraries and library flags.
  6813. m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
  6814. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  6815. AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
  6816. # Dependencies to place before and after the object being linked:
  6817. _LT_TAGVAR(predep_objects, $1)=
  6818. _LT_TAGVAR(postdep_objects, $1)=
  6819. _LT_TAGVAR(predeps, $1)=
  6820. _LT_TAGVAR(postdeps, $1)=
  6821. _LT_TAGVAR(compiler_lib_search_path, $1)=
  6822. dnl we can't use the lt_simple_compile_test_code here,
  6823. dnl because it contains code intended for an executable,
  6824. dnl not a library. It's possible we should let each
  6825. dnl tag define a new lt_????_link_test_code variable,
  6826. dnl but it's only used here...
  6827. m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
  6828. int a;
  6829. void foo (void) { a = 0; }
  6830. _LT_EOF
  6831. ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
  6832. class Foo
  6833. {
  6834. public:
  6835. Foo (void) { a = 0; }
  6836. private:
  6837. int a;
  6838. };
  6839. _LT_EOF
  6840. ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
  6841. subroutine foo
  6842. implicit none
  6843. integer*4 a
  6844. a=0
  6845. return
  6846. end
  6847. _LT_EOF
  6848. ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
  6849. subroutine foo
  6850. implicit none
  6851. integer a
  6852. a=0
  6853. return
  6854. end
  6855. _LT_EOF
  6856. ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
  6857. public class foo {
  6858. private int a;
  6859. public void bar (void) {
  6860. a = 0;
  6861. }
  6862. };
  6863. _LT_EOF
  6864. ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
  6865. package foo
  6866. func foo() {
  6867. }
  6868. _LT_EOF
  6869. ])
  6870. _lt_libdeps_save_CFLAGS=$CFLAGS
  6871. case "$CC $CFLAGS " in #(
  6872. *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
  6873. *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
  6874. *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
  6875. esac
  6876. dnl Parse the compiler output and extract the necessary
  6877. dnl objects, libraries and library flags.
  6878. if AC_TRY_EVAL(ac_compile); then
  6879. # Parse the compiler output and extract the necessary
  6880. # objects, libraries and library flags.
  6881. # Sentinel used to keep track of whether or not we are before
  6882. # the conftest object file.
  6883. pre_test_object_deps_done=no
  6884. for p in `eval "$output_verbose_link_cmd"`; do
  6885. case $prev$p in
  6886. -L* | -R* | -l*)
  6887. # Some compilers place space between "-{L,R}" and the path.
  6888. # Remove the space.
  6889. if test x-L = "$p" ||
  6890. test x-R = "$p"; then
  6891. prev=$p
  6892. continue
  6893. fi
  6894. # Expand the sysroot to ease extracting the directories later.
  6895. if test -z "$prev"; then
  6896. case $p in
  6897. -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
  6898. -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
  6899. -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
  6900. esac
  6901. fi
  6902. case $p in
  6903. =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
  6904. esac
  6905. if test no = "$pre_test_object_deps_done"; then
  6906. case $prev in
  6907. -L | -R)
  6908. # Internal compiler library paths should come after those
  6909. # provided the user. The postdeps already come after the
  6910. # user supplied libs so there is no need to process them.
  6911. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
  6912. _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
  6913. else
  6914. _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
  6915. fi
  6916. ;;
  6917. # The "-l" case would never come before the object being
  6918. # linked, so don't bother handling this case.
  6919. esac
  6920. else
  6921. if test -z "$_LT_TAGVAR(postdeps, $1)"; then
  6922. _LT_TAGVAR(postdeps, $1)=$prev$p
  6923. else
  6924. _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
  6925. fi
  6926. fi
  6927. prev=
  6928. ;;
  6929. *.lto.$objext) ;; # Ignore GCC LTO objects
  6930. *.$objext)
  6931. # This assumes that the test object file only shows up
  6932. # once in the compiler output.
  6933. if test "$p" = "conftest.$objext"; then
  6934. pre_test_object_deps_done=yes
  6935. continue
  6936. fi
  6937. if test no = "$pre_test_object_deps_done"; then
  6938. if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
  6939. _LT_TAGVAR(predep_objects, $1)=$p
  6940. else
  6941. _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
  6942. fi
  6943. else
  6944. if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
  6945. _LT_TAGVAR(postdep_objects, $1)=$p
  6946. else
  6947. _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
  6948. fi
  6949. fi
  6950. ;;
  6951. *) ;; # Ignore the rest.
  6952. esac
  6953. done
  6954. # Clean up.
  6955. rm -f a.out a.exe
  6956. else
  6957. echo "libtool.m4: error: problem compiling $1 test program"
  6958. fi
  6959. $RM -f confest.$objext
  6960. CFLAGS=$_lt_libdeps_save_CFLAGS
  6961. # PORTME: override above test on systems where it is broken
  6962. m4_if([$1], [CXX],
  6963. [case $host_os in
  6964. interix[[3-9]]*)
  6965. # Interix 3.5 installs completely hosed .la files for C++, so rather than
  6966. # hack all around it, let's just trust "g++" to DTRT.
  6967. _LT_TAGVAR(predep_objects,$1)=
  6968. _LT_TAGVAR(postdep_objects,$1)=
  6969. _LT_TAGVAR(postdeps,$1)=
  6970. ;;
  6971. esac
  6972. ])
  6973. case " $_LT_TAGVAR(postdeps, $1) " in
  6974. *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
  6975. esac
  6976. _LT_TAGVAR(compiler_lib_search_dirs, $1)=
  6977. if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
  6978. _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
  6979. fi
  6980. _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
  6981. [The directories searched by this compiler when creating a shared library])
  6982. _LT_TAGDECL([], [predep_objects], [1],
  6983. [Dependencies to place before and after the objects being linked to
  6984. create a shared library])
  6985. _LT_TAGDECL([], [postdep_objects], [1])
  6986. _LT_TAGDECL([], [predeps], [1])
  6987. _LT_TAGDECL([], [postdeps], [1])
  6988. _LT_TAGDECL([], [compiler_lib_search_path], [1],
  6989. [The library search path used internally by the compiler when linking
  6990. a shared library])
  6991. ])# _LT_SYS_HIDDEN_LIBDEPS
  6992. # _LT_LANG_F77_CONFIG([TAG])
  6993. # --------------------------
  6994. # Ensure that the configuration variables for a Fortran 77 compiler are
  6995. # suitably defined. These variables are subsequently used by _LT_CONFIG
  6996. # to write the compiler configuration to 'libtool'.
  6997. m4_defun([_LT_LANG_F77_CONFIG],
  6998. [AC_LANG_PUSH(Fortran 77)
  6999. if test -z "$F77" || test no = "$F77"; then
  7000. _lt_disable_F77=yes
  7001. fi
  7002. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7003. _LT_TAGVAR(allow_undefined_flag, $1)=
  7004. _LT_TAGVAR(always_export_symbols, $1)=no
  7005. _LT_TAGVAR(archive_expsym_cmds, $1)=
  7006. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  7007. _LT_TAGVAR(hardcode_direct, $1)=no
  7008. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  7009. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  7010. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  7011. _LT_TAGVAR(hardcode_minus_L, $1)=no
  7012. _LT_TAGVAR(hardcode_automatic, $1)=no
  7013. _LT_TAGVAR(inherit_rpath, $1)=no
  7014. _LT_TAGVAR(module_cmds, $1)=
  7015. _LT_TAGVAR(module_expsym_cmds, $1)=
  7016. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  7017. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7018. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  7019. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  7020. _LT_TAGVAR(no_undefined_flag, $1)=
  7021. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  7022. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  7023. # Source file extension for f77 test sources.
  7024. ac_ext=f
  7025. # Object file extension for compiled f77 test sources.
  7026. objext=o
  7027. _LT_TAGVAR(objext, $1)=$objext
  7028. # No sense in running all these tests if we already determined that
  7029. # the F77 compiler isn't working. Some variables (like enable_shared)
  7030. # are currently assumed to apply to all compilers on this platform,
  7031. # and will be corrupted by setting them based on a non-working compiler.
  7032. if test yes != "$_lt_disable_F77"; then
  7033. # Code to be used in simple compile tests
  7034. lt_simple_compile_test_code="\
  7035. subroutine t
  7036. return
  7037. end
  7038. "
  7039. # Code to be used in simple link tests
  7040. lt_simple_link_test_code="\
  7041. program t
  7042. end
  7043. "
  7044. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7045. _LT_TAG_COMPILER
  7046. # save warnings/boilerplate of simple test code
  7047. _LT_COMPILER_BOILERPLATE
  7048. _LT_LINKER_BOILERPLATE
  7049. # Allow CC to be a program name with arguments.
  7050. lt_save_CC=$CC
  7051. lt_save_GCC=$GCC
  7052. lt_save_CFLAGS=$CFLAGS
  7053. CC=${F77-"f77"}
  7054. CFLAGS=$FFLAGS
  7055. compiler=$CC
  7056. _LT_TAGVAR(compiler, $1)=$CC
  7057. _LT_CC_BASENAME([$compiler])
  7058. GCC=$G77
  7059. if test -n "$compiler"; then
  7060. AC_MSG_CHECKING([if libtool supports shared libraries])
  7061. AC_MSG_RESULT([$can_build_shared])
  7062. AC_MSG_CHECKING([whether to build shared libraries])
  7063. test no = "$can_build_shared" && enable_shared=no
  7064. # On AIX, shared libraries and static libraries use the same namespace, and
  7065. # are all built from PIC.
  7066. case $host_os in
  7067. aix3*)
  7068. test yes = "$enable_shared" && enable_static=no
  7069. if test -n "$RANLIB"; then
  7070. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  7071. postinstall_cmds='$RANLIB $lib'
  7072. fi
  7073. ;;
  7074. aix[[4-9]]*)
  7075. if test ia64 != "$host_cpu"; then
  7076. case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
  7077. yes,aix,yes) ;; # shared object as lib.so file only
  7078. yes,svr4,*) ;; # shared object as lib.so archive member only
  7079. yes,*) enable_static=no ;; # shared object in lib.a archive as well
  7080. esac
  7081. fi
  7082. ;;
  7083. esac
  7084. AC_MSG_RESULT([$enable_shared])
  7085. AC_MSG_CHECKING([whether to build static libraries])
  7086. # Make sure either enable_shared or enable_static is yes.
  7087. test yes = "$enable_shared" || enable_static=yes
  7088. AC_MSG_RESULT([$enable_static])
  7089. _LT_TAGVAR(GCC, $1)=$G77
  7090. _LT_TAGVAR(LD, $1)=$LD
  7091. ## CAVEAT EMPTOR:
  7092. ## There is no encapsulation within the following macros, do not change
  7093. ## the running order or otherwise move them around unless you know exactly
  7094. ## what you are doing...
  7095. _LT_COMPILER_PIC($1)
  7096. _LT_COMPILER_C_O($1)
  7097. _LT_COMPILER_FILE_LOCKS($1)
  7098. _LT_LINKER_SHLIBS($1)
  7099. _LT_SYS_DYNAMIC_LINKER($1)
  7100. _LT_LINKER_HARDCODE_LIBPATH($1)
  7101. _LT_CONFIG($1)
  7102. fi # test -n "$compiler"
  7103. GCC=$lt_save_GCC
  7104. CC=$lt_save_CC
  7105. CFLAGS=$lt_save_CFLAGS
  7106. fi # test yes != "$_lt_disable_F77"
  7107. AC_LANG_POP
  7108. ])# _LT_LANG_F77_CONFIG
  7109. # _LT_LANG_FC_CONFIG([TAG])
  7110. # -------------------------
  7111. # Ensure that the configuration variables for a Fortran compiler are
  7112. # suitably defined. These variables are subsequently used by _LT_CONFIG
  7113. # to write the compiler configuration to 'libtool'.
  7114. m4_defun([_LT_LANG_FC_CONFIG],
  7115. [AC_LANG_PUSH(Fortran)
  7116. if test -z "$FC" || test no = "$FC"; then
  7117. _lt_disable_FC=yes
  7118. fi
  7119. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7120. _LT_TAGVAR(allow_undefined_flag, $1)=
  7121. _LT_TAGVAR(always_export_symbols, $1)=no
  7122. _LT_TAGVAR(archive_expsym_cmds, $1)=
  7123. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  7124. _LT_TAGVAR(hardcode_direct, $1)=no
  7125. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  7126. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  7127. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  7128. _LT_TAGVAR(hardcode_minus_L, $1)=no
  7129. _LT_TAGVAR(hardcode_automatic, $1)=no
  7130. _LT_TAGVAR(inherit_rpath, $1)=no
  7131. _LT_TAGVAR(module_cmds, $1)=
  7132. _LT_TAGVAR(module_expsym_cmds, $1)=
  7133. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  7134. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7135. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  7136. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  7137. _LT_TAGVAR(no_undefined_flag, $1)=
  7138. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  7139. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  7140. # Source file extension for fc test sources.
  7141. ac_ext=${ac_fc_srcext-f}
  7142. # Object file extension for compiled fc test sources.
  7143. objext=o
  7144. _LT_TAGVAR(objext, $1)=$objext
  7145. # No sense in running all these tests if we already determined that
  7146. # the FC compiler isn't working. Some variables (like enable_shared)
  7147. # are currently assumed to apply to all compilers on this platform,
  7148. # and will be corrupted by setting them based on a non-working compiler.
  7149. if test yes != "$_lt_disable_FC"; then
  7150. # Code to be used in simple compile tests
  7151. lt_simple_compile_test_code="\
  7152. subroutine t
  7153. return
  7154. end
  7155. "
  7156. # Code to be used in simple link tests
  7157. lt_simple_link_test_code="\
  7158. program t
  7159. end
  7160. "
  7161. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7162. _LT_TAG_COMPILER
  7163. # save warnings/boilerplate of simple test code
  7164. _LT_COMPILER_BOILERPLATE
  7165. _LT_LINKER_BOILERPLATE
  7166. # Allow CC to be a program name with arguments.
  7167. lt_save_CC=$CC
  7168. lt_save_GCC=$GCC
  7169. lt_save_CFLAGS=$CFLAGS
  7170. CC=${FC-"f95"}
  7171. CFLAGS=$FCFLAGS
  7172. compiler=$CC
  7173. GCC=$ac_cv_fc_compiler_gnu
  7174. _LT_TAGVAR(compiler, $1)=$CC
  7175. _LT_CC_BASENAME([$compiler])
  7176. if test -n "$compiler"; then
  7177. AC_MSG_CHECKING([if libtool supports shared libraries])
  7178. AC_MSG_RESULT([$can_build_shared])
  7179. AC_MSG_CHECKING([whether to build shared libraries])
  7180. test no = "$can_build_shared" && enable_shared=no
  7181. # On AIX, shared libraries and static libraries use the same namespace, and
  7182. # are all built from PIC.
  7183. case $host_os in
  7184. aix3*)
  7185. test yes = "$enable_shared" && enable_static=no
  7186. if test -n "$RANLIB"; then
  7187. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  7188. postinstall_cmds='$RANLIB $lib'
  7189. fi
  7190. ;;
  7191. aix[[4-9]]*)
  7192. if test ia64 != "$host_cpu"; then
  7193. case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
  7194. yes,aix,yes) ;; # shared object as lib.so file only
  7195. yes,svr4,*) ;; # shared object as lib.so archive member only
  7196. yes,*) enable_static=no ;; # shared object in lib.a archive as well
  7197. esac
  7198. fi
  7199. ;;
  7200. esac
  7201. AC_MSG_RESULT([$enable_shared])
  7202. AC_MSG_CHECKING([whether to build static libraries])
  7203. # Make sure either enable_shared or enable_static is yes.
  7204. test yes = "$enable_shared" || enable_static=yes
  7205. AC_MSG_RESULT([$enable_static])
  7206. _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
  7207. _LT_TAGVAR(LD, $1)=$LD
  7208. ## CAVEAT EMPTOR:
  7209. ## There is no encapsulation within the following macros, do not change
  7210. ## the running order or otherwise move them around unless you know exactly
  7211. ## what you are doing...
  7212. _LT_SYS_HIDDEN_LIBDEPS($1)
  7213. _LT_COMPILER_PIC($1)
  7214. _LT_COMPILER_C_O($1)
  7215. _LT_COMPILER_FILE_LOCKS($1)
  7216. _LT_LINKER_SHLIBS($1)
  7217. _LT_SYS_DYNAMIC_LINKER($1)
  7218. _LT_LINKER_HARDCODE_LIBPATH($1)
  7219. _LT_CONFIG($1)
  7220. fi # test -n "$compiler"
  7221. GCC=$lt_save_GCC
  7222. CC=$lt_save_CC
  7223. CFLAGS=$lt_save_CFLAGS
  7224. fi # test yes != "$_lt_disable_FC"
  7225. AC_LANG_POP
  7226. ])# _LT_LANG_FC_CONFIG
  7227. # _LT_LANG_GCJ_CONFIG([TAG])
  7228. # --------------------------
  7229. # Ensure that the configuration variables for the GNU Java Compiler compiler
  7230. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  7231. # to write the compiler configuration to 'libtool'.
  7232. m4_defun([_LT_LANG_GCJ_CONFIG],
  7233. [AC_REQUIRE([LT_PROG_GCJ])dnl
  7234. AC_LANG_SAVE
  7235. # Source file extension for Java test sources.
  7236. ac_ext=java
  7237. # Object file extension for compiled Java test sources.
  7238. objext=o
  7239. _LT_TAGVAR(objext, $1)=$objext
  7240. # Code to be used in simple compile tests
  7241. lt_simple_compile_test_code="class foo {}"
  7242. # Code to be used in simple link tests
  7243. lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
  7244. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7245. _LT_TAG_COMPILER
  7246. # save warnings/boilerplate of simple test code
  7247. _LT_COMPILER_BOILERPLATE
  7248. _LT_LINKER_BOILERPLATE
  7249. # Allow CC to be a program name with arguments.
  7250. lt_save_CC=$CC
  7251. lt_save_CFLAGS=$CFLAGS
  7252. lt_save_GCC=$GCC
  7253. GCC=yes
  7254. CC=${GCJ-"gcj"}
  7255. CFLAGS=$GCJFLAGS
  7256. compiler=$CC
  7257. _LT_TAGVAR(compiler, $1)=$CC
  7258. _LT_TAGVAR(LD, $1)=$LD
  7259. _LT_CC_BASENAME([$compiler])
  7260. # GCJ did not exist at the time GCC didn't implicitly link libc in.
  7261. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7262. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7263. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  7264. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  7265. if test -n "$compiler"; then
  7266. _LT_COMPILER_NO_RTTI($1)
  7267. _LT_COMPILER_PIC($1)
  7268. _LT_COMPILER_C_O($1)
  7269. _LT_COMPILER_FILE_LOCKS($1)
  7270. _LT_LINKER_SHLIBS($1)
  7271. _LT_LINKER_HARDCODE_LIBPATH($1)
  7272. _LT_CONFIG($1)
  7273. fi
  7274. AC_LANG_RESTORE
  7275. GCC=$lt_save_GCC
  7276. CC=$lt_save_CC
  7277. CFLAGS=$lt_save_CFLAGS
  7278. ])# _LT_LANG_GCJ_CONFIG
  7279. # _LT_LANG_GO_CONFIG([TAG])
  7280. # --------------------------
  7281. # Ensure that the configuration variables for the GNU Go compiler
  7282. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  7283. # to write the compiler configuration to 'libtool'.
  7284. m4_defun([_LT_LANG_GO_CONFIG],
  7285. [AC_REQUIRE([LT_PROG_GO])dnl
  7286. AC_LANG_SAVE
  7287. # Source file extension for Go test sources.
  7288. ac_ext=go
  7289. # Object file extension for compiled Go test sources.
  7290. objext=o
  7291. _LT_TAGVAR(objext, $1)=$objext
  7292. # Code to be used in simple compile tests
  7293. lt_simple_compile_test_code="package main; func main() { }"
  7294. # Code to be used in simple link tests
  7295. lt_simple_link_test_code='package main; func main() { }'
  7296. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7297. _LT_TAG_COMPILER
  7298. # save warnings/boilerplate of simple test code
  7299. _LT_COMPILER_BOILERPLATE
  7300. _LT_LINKER_BOILERPLATE
  7301. # Allow CC to be a program name with arguments.
  7302. lt_save_CC=$CC
  7303. lt_save_CFLAGS=$CFLAGS
  7304. lt_save_GCC=$GCC
  7305. GCC=yes
  7306. CC=${GOC-"gccgo"}
  7307. CFLAGS=$GOFLAGS
  7308. compiler=$CC
  7309. _LT_TAGVAR(compiler, $1)=$CC
  7310. _LT_TAGVAR(LD, $1)=$LD
  7311. _LT_CC_BASENAME([$compiler])
  7312. # Go did not exist at the time GCC didn't implicitly link libc in.
  7313. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7314. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7315. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  7316. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  7317. if test -n "$compiler"; then
  7318. _LT_COMPILER_NO_RTTI($1)
  7319. _LT_COMPILER_PIC($1)
  7320. _LT_COMPILER_C_O($1)
  7321. _LT_COMPILER_FILE_LOCKS($1)
  7322. _LT_LINKER_SHLIBS($1)
  7323. _LT_LINKER_HARDCODE_LIBPATH($1)
  7324. _LT_CONFIG($1)
  7325. fi
  7326. AC_LANG_RESTORE
  7327. GCC=$lt_save_GCC
  7328. CC=$lt_save_CC
  7329. CFLAGS=$lt_save_CFLAGS
  7330. ])# _LT_LANG_GO_CONFIG
  7331. # _LT_LANG_RC_CONFIG([TAG])
  7332. # -------------------------
  7333. # Ensure that the configuration variables for the Windows resource compiler
  7334. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  7335. # to write the compiler configuration to 'libtool'.
  7336. m4_defun([_LT_LANG_RC_CONFIG],
  7337. [AC_REQUIRE([LT_PROG_RC])dnl
  7338. AC_LANG_SAVE
  7339. # Source file extension for RC test sources.
  7340. ac_ext=rc
  7341. # Object file extension for compiled RC test sources.
  7342. objext=o
  7343. _LT_TAGVAR(objext, $1)=$objext
  7344. # Code to be used in simple compile tests
  7345. lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
  7346. # Code to be used in simple link tests
  7347. lt_simple_link_test_code=$lt_simple_compile_test_code
  7348. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7349. _LT_TAG_COMPILER
  7350. # save warnings/boilerplate of simple test code
  7351. _LT_COMPILER_BOILERPLATE
  7352. _LT_LINKER_BOILERPLATE
  7353. # Allow CC to be a program name with arguments.
  7354. lt_save_CC=$CC
  7355. lt_save_CFLAGS=$CFLAGS
  7356. lt_save_GCC=$GCC
  7357. GCC=
  7358. CC=${RC-"windres"}
  7359. CFLAGS=
  7360. compiler=$CC
  7361. _LT_TAGVAR(compiler, $1)=$CC
  7362. _LT_CC_BASENAME([$compiler])
  7363. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  7364. if test -n "$compiler"; then
  7365. :
  7366. _LT_CONFIG($1)
  7367. fi
  7368. GCC=$lt_save_GCC
  7369. AC_LANG_RESTORE
  7370. CC=$lt_save_CC
  7371. CFLAGS=$lt_save_CFLAGS
  7372. ])# _LT_LANG_RC_CONFIG
  7373. # LT_PROG_GCJ
  7374. # -----------
  7375. AC_DEFUN([LT_PROG_GCJ],
  7376. [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
  7377. [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
  7378. [AC_CHECK_TOOL(GCJ, gcj,)
  7379. test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
  7380. AC_SUBST(GCJFLAGS)])])[]dnl
  7381. ])
  7382. # Old name:
  7383. AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
  7384. dnl aclocal-1.4 backwards compatibility:
  7385. dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
  7386. # LT_PROG_GO
  7387. # ----------
  7388. AC_DEFUN([LT_PROG_GO],
  7389. [AC_CHECK_TOOL(GOC, gccgo,)
  7390. ])
  7391. # LT_PROG_RC
  7392. # ----------
  7393. AC_DEFUN([LT_PROG_RC],
  7394. [AC_CHECK_TOOL(RC, windres,)
  7395. ])
  7396. # Old name:
  7397. AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
  7398. dnl aclocal-1.4 backwards compatibility:
  7399. dnl AC_DEFUN([LT_AC_PROG_RC], [])
  7400. # _LT_DECL_EGREP
  7401. # --------------
  7402. # If we don't have a new enough Autoconf to choose the best grep
  7403. # available, choose the one first in the user's PATH.
  7404. m4_defun([_LT_DECL_EGREP],
  7405. [AC_REQUIRE([AC_PROG_EGREP])dnl
  7406. AC_REQUIRE([AC_PROG_FGREP])dnl
  7407. test -z "$GREP" && GREP=grep
  7408. _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
  7409. _LT_DECL([], [EGREP], [1], [An ERE matcher])
  7410. _LT_DECL([], [FGREP], [1], [A literal string matcher])
  7411. dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
  7412. AC_SUBST([GREP])
  7413. ])
  7414. # _LT_DECL_OBJDUMP
  7415. # --------------
  7416. # If we don't have a new enough Autoconf to choose the best objdump
  7417. # available, choose the one first in the user's PATH.
  7418. m4_defun([_LT_DECL_OBJDUMP],
  7419. [AC_CHECK_TOOL(OBJDUMP, objdump, false)
  7420. test -z "$OBJDUMP" && OBJDUMP=objdump
  7421. _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
  7422. AC_SUBST([OBJDUMP])
  7423. ])
  7424. # _LT_DECL_DLLTOOL
  7425. # ----------------
  7426. # Ensure DLLTOOL variable is set.
  7427. m4_defun([_LT_DECL_DLLTOOL],
  7428. [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  7429. test -z "$DLLTOOL" && DLLTOOL=dlltool
  7430. _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
  7431. AC_SUBST([DLLTOOL])
  7432. ])
  7433. # _LT_DECL_SED
  7434. # ------------
  7435. # Check for a fully-functional sed program, that truncates
  7436. # as few characters as possible. Prefer GNU sed if found.
  7437. m4_defun([_LT_DECL_SED],
  7438. [AC_PROG_SED
  7439. test -z "$SED" && SED=sed
  7440. Xsed="$SED -e 1s/^X//"
  7441. _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
  7442. _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
  7443. [Sed that helps us avoid accidentally triggering echo(1) options like -n])
  7444. ])# _LT_DECL_SED
  7445. m4_ifndef([AC_PROG_SED], [
  7446. # NOTE: This macro has been submitted for inclusion into #
  7447. # GNU Autoconf as AC_PROG_SED. When it is available in #
  7448. # a released version of Autoconf we should remove this #
  7449. # macro and use it instead. #
  7450. m4_defun([AC_PROG_SED],
  7451. [AC_MSG_CHECKING([for a sed that does not truncate output])
  7452. AC_CACHE_VAL(lt_cv_path_SED,
  7453. [# Loop through the user's path and test for sed and gsed.
  7454. # Then use that list of sed's as ones to test for truncation.
  7455. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  7456. for as_dir in $PATH
  7457. do
  7458. IFS=$as_save_IFS
  7459. test -z "$as_dir" && as_dir=.
  7460. for lt_ac_prog in sed gsed; do
  7461. for ac_exec_ext in '' $ac_executable_extensions; do
  7462. if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
  7463. lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
  7464. fi
  7465. done
  7466. done
  7467. done
  7468. IFS=$as_save_IFS
  7469. lt_ac_max=0
  7470. lt_ac_count=0
  7471. # Add /usr/xpg4/bin/sed as it is typically found on Solaris
  7472. # along with /bin/sed that truncates output.
  7473. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
  7474. test ! -f "$lt_ac_sed" && continue
  7475. cat /dev/null > conftest.in
  7476. lt_ac_count=0
  7477. echo $ECHO_N "0123456789$ECHO_C" >conftest.in
  7478. # Check for GNU sed and select it if it is found.
  7479. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
  7480. lt_cv_path_SED=$lt_ac_sed
  7481. break
  7482. fi
  7483. while true; do
  7484. cat conftest.in conftest.in >conftest.tmp
  7485. mv conftest.tmp conftest.in
  7486. cp conftest.in conftest.nl
  7487. echo >>conftest.nl
  7488. $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
  7489. cmp -s conftest.out conftest.nl || break
  7490. # 10000 chars as input seems more than enough
  7491. test 10 -lt "$lt_ac_count" && break
  7492. lt_ac_count=`expr $lt_ac_count + 1`
  7493. if test "$lt_ac_count" -gt "$lt_ac_max"; then
  7494. lt_ac_max=$lt_ac_count
  7495. lt_cv_path_SED=$lt_ac_sed
  7496. fi
  7497. done
  7498. done
  7499. ])
  7500. SED=$lt_cv_path_SED
  7501. AC_SUBST([SED])
  7502. AC_MSG_RESULT([$SED])
  7503. ])#AC_PROG_SED
  7504. ])#m4_ifndef
  7505. # Old name:
  7506. AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
  7507. dnl aclocal-1.4 backwards compatibility:
  7508. dnl AC_DEFUN([LT_AC_PROG_SED], [])
  7509. # _LT_CHECK_SHELL_FEATURES
  7510. # ------------------------
  7511. # Find out whether the shell is Bourne or XSI compatible,
  7512. # or has some other useful features.
  7513. m4_defun([_LT_CHECK_SHELL_FEATURES],
  7514. [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
  7515. lt_unset=unset
  7516. else
  7517. lt_unset=false
  7518. fi
  7519. _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
  7520. # test EBCDIC or ASCII
  7521. case `echo X|tr X '\101'` in
  7522. A) # ASCII based system
  7523. # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
  7524. lt_SP2NL='tr \040 \012'
  7525. lt_NL2SP='tr \015\012 \040\040'
  7526. ;;
  7527. *) # EBCDIC based system
  7528. lt_SP2NL='tr \100 \n'
  7529. lt_NL2SP='tr \r\n \100\100'
  7530. ;;
  7531. esac
  7532. _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
  7533. _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
  7534. ])# _LT_CHECK_SHELL_FEATURES
  7535. # _LT_PATH_CONVERSION_FUNCTIONS
  7536. # -----------------------------
  7537. # Determine what file name conversion functions should be used by
  7538. # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
  7539. # for certain cross-compile configurations and native mingw.
  7540. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
  7541. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  7542. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  7543. AC_MSG_CHECKING([how to convert $build file names to $host format])
  7544. AC_CACHE_VAL(lt_cv_to_host_file_cmd,
  7545. [case $host in
  7546. *-*-mingw* )
  7547. case $build in
  7548. *-*-mingw* ) # actually msys
  7549. lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
  7550. ;;
  7551. *-*-cygwin* )
  7552. lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
  7553. ;;
  7554. * ) # otherwise, assume *nix
  7555. lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
  7556. ;;
  7557. esac
  7558. ;;
  7559. *-*-cygwin* )
  7560. case $build in
  7561. *-*-mingw* ) # actually msys
  7562. lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
  7563. ;;
  7564. *-*-cygwin* )
  7565. lt_cv_to_host_file_cmd=func_convert_file_noop
  7566. ;;
  7567. * ) # otherwise, assume *nix
  7568. lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
  7569. ;;
  7570. esac
  7571. ;;
  7572. * ) # unhandled hosts (and "normal" native builds)
  7573. lt_cv_to_host_file_cmd=func_convert_file_noop
  7574. ;;
  7575. esac
  7576. ])
  7577. to_host_file_cmd=$lt_cv_to_host_file_cmd
  7578. AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
  7579. _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
  7580. [0], [convert $build file names to $host format])dnl
  7581. AC_MSG_CHECKING([how to convert $build file names to toolchain format])
  7582. AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
  7583. [#assume ordinary cross tools, or native build.
  7584. lt_cv_to_tool_file_cmd=func_convert_file_noop
  7585. case $host in
  7586. *-*-mingw* )
  7587. case $build in
  7588. *-*-mingw* ) # actually msys
  7589. lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
  7590. ;;
  7591. esac
  7592. ;;
  7593. esac
  7594. ])
  7595. to_tool_file_cmd=$lt_cv_to_tool_file_cmd
  7596. AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
  7597. _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
  7598. [0], [convert $build files to toolchain format])dnl
  7599. ])# _LT_PATH_CONVERSION_FUNCTIONS
  7600. # Helper functions for option handling. -*- Autoconf -*-
  7601. #
  7602. # Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
  7603. # Foundation, Inc.
  7604. # Written by Gary V. Vaughan, 2004
  7605. #
  7606. # This file is free software; the Free Software Foundation gives
  7607. # unlimited permission to copy and/or distribute it, with or without
  7608. # modifications, as long as this notice is preserved.
  7609. # serial 8 ltoptions.m4
  7610. # This is to help aclocal find these macros, as it can't see m4_define.
  7611. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
  7612. # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
  7613. # ------------------------------------------
  7614. m4_define([_LT_MANGLE_OPTION],
  7615. [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
  7616. # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
  7617. # ---------------------------------------
  7618. # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
  7619. # matching handler defined, dispatch to it. Other OPTION-NAMEs are
  7620. # saved as a flag.
  7621. m4_define([_LT_SET_OPTION],
  7622. [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
  7623. m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
  7624. _LT_MANGLE_DEFUN([$1], [$2]),
  7625. [m4_warning([Unknown $1 option '$2'])])[]dnl
  7626. ])
  7627. # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
  7628. # ------------------------------------------------------------
  7629. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  7630. m4_define([_LT_IF_OPTION],
  7631. [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
  7632. # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
  7633. # -------------------------------------------------------
  7634. # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
  7635. # are set.
  7636. m4_define([_LT_UNLESS_OPTIONS],
  7637. [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
  7638. [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
  7639. [m4_define([$0_found])])])[]dnl
  7640. m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
  7641. ])[]dnl
  7642. ])
  7643. # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
  7644. # ----------------------------------------
  7645. # OPTION-LIST is a space-separated list of Libtool options associated
  7646. # with MACRO-NAME. If any OPTION has a matching handler declared with
  7647. # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
  7648. # the unknown option and exit.
  7649. m4_defun([_LT_SET_OPTIONS],
  7650. [# Set options
  7651. m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
  7652. [_LT_SET_OPTION([$1], _LT_Option)])
  7653. m4_if([$1],[LT_INIT],[
  7654. dnl
  7655. dnl Simply set some default values (i.e off) if boolean options were not
  7656. dnl specified:
  7657. _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
  7658. ])
  7659. _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
  7660. ])
  7661. dnl
  7662. dnl If no reference was made to various pairs of opposing options, then
  7663. dnl we run the default mode handler for the pair. For example, if neither
  7664. dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
  7665. dnl archives by default:
  7666. _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
  7667. _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
  7668. _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
  7669. _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
  7670. [_LT_ENABLE_FAST_INSTALL])
  7671. _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
  7672. [_LT_WITH_AIX_SONAME([aix])])
  7673. ])
  7674. ])# _LT_SET_OPTIONS
  7675. # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
  7676. # -----------------------------------------
  7677. m4_define([_LT_MANGLE_DEFUN],
  7678. [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
  7679. # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
  7680. # -----------------------------------------------
  7681. m4_define([LT_OPTION_DEFINE],
  7682. [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
  7683. ])# LT_OPTION_DEFINE
  7684. # dlopen
  7685. # ------
  7686. LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
  7687. ])
  7688. AU_DEFUN([AC_LIBTOOL_DLOPEN],
  7689. [_LT_SET_OPTION([LT_INIT], [dlopen])
  7690. AC_DIAGNOSE([obsolete],
  7691. [$0: Remove this warning and the call to _LT_SET_OPTION when you
  7692. put the 'dlopen' option into LT_INIT's first parameter.])
  7693. ])
  7694. dnl aclocal-1.4 backwards compatibility:
  7695. dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
  7696. # win32-dll
  7697. # ---------
  7698. # Declare package support for building win32 dll's.
  7699. LT_OPTION_DEFINE([LT_INIT], [win32-dll],
  7700. [enable_win32_dll=yes
  7701. case $host in
  7702. *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
  7703. AC_CHECK_TOOL(AS, as, false)
  7704. AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  7705. AC_CHECK_TOOL(OBJDUMP, objdump, false)
  7706. ;;
  7707. esac
  7708. test -z "$AS" && AS=as
  7709. _LT_DECL([], [AS], [1], [Assembler program])dnl
  7710. test -z "$DLLTOOL" && DLLTOOL=dlltool
  7711. _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
  7712. test -z "$OBJDUMP" && OBJDUMP=objdump
  7713. _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
  7714. ])# win32-dll
  7715. AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
  7716. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  7717. _LT_SET_OPTION([LT_INIT], [win32-dll])
  7718. AC_DIAGNOSE([obsolete],
  7719. [$0: Remove this warning and the call to _LT_SET_OPTION when you
  7720. put the 'win32-dll' option into LT_INIT's first parameter.])
  7721. ])
  7722. dnl aclocal-1.4 backwards compatibility:
  7723. dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
  7724. # _LT_ENABLE_SHARED([DEFAULT])
  7725. # ----------------------------
  7726. # implement the --enable-shared flag, and supports the 'shared' and
  7727. # 'disable-shared' LT_INIT options.
  7728. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
  7729. m4_define([_LT_ENABLE_SHARED],
  7730. [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
  7731. AC_ARG_ENABLE([shared],
  7732. [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
  7733. [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
  7734. [p=${PACKAGE-default}
  7735. case $enableval in
  7736. yes) enable_shared=yes ;;
  7737. no) enable_shared=no ;;
  7738. *)
  7739. enable_shared=no
  7740. # Look at the argument we got. We use all the common list separators.
  7741. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
  7742. for pkg in $enableval; do
  7743. IFS=$lt_save_ifs
  7744. if test "X$pkg" = "X$p"; then
  7745. enable_shared=yes
  7746. fi
  7747. done
  7748. IFS=$lt_save_ifs
  7749. ;;
  7750. esac],
  7751. [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
  7752. _LT_DECL([build_libtool_libs], [enable_shared], [0],
  7753. [Whether or not to build shared libraries])
  7754. ])# _LT_ENABLE_SHARED
  7755. LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
  7756. LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
  7757. # Old names:
  7758. AC_DEFUN([AC_ENABLE_SHARED],
  7759. [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
  7760. ])
  7761. AC_DEFUN([AC_DISABLE_SHARED],
  7762. [_LT_SET_OPTION([LT_INIT], [disable-shared])
  7763. ])
  7764. AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
  7765. AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
  7766. dnl aclocal-1.4 backwards compatibility:
  7767. dnl AC_DEFUN([AM_ENABLE_SHARED], [])
  7768. dnl AC_DEFUN([AM_DISABLE_SHARED], [])
  7769. # _LT_ENABLE_STATIC([DEFAULT])
  7770. # ----------------------------
  7771. # implement the --enable-static flag, and support the 'static' and
  7772. # 'disable-static' LT_INIT options.
  7773. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
  7774. m4_define([_LT_ENABLE_STATIC],
  7775. [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
  7776. AC_ARG_ENABLE([static],
  7777. [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
  7778. [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
  7779. [p=${PACKAGE-default}
  7780. case $enableval in
  7781. yes) enable_static=yes ;;
  7782. no) enable_static=no ;;
  7783. *)
  7784. enable_static=no
  7785. # Look at the argument we got. We use all the common list separators.
  7786. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
  7787. for pkg in $enableval; do
  7788. IFS=$lt_save_ifs
  7789. if test "X$pkg" = "X$p"; then
  7790. enable_static=yes
  7791. fi
  7792. done
  7793. IFS=$lt_save_ifs
  7794. ;;
  7795. esac],
  7796. [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
  7797. _LT_DECL([build_old_libs], [enable_static], [0],
  7798. [Whether or not to build static libraries])
  7799. ])# _LT_ENABLE_STATIC
  7800. LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
  7801. LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
  7802. # Old names:
  7803. AC_DEFUN([AC_ENABLE_STATIC],
  7804. [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
  7805. ])
  7806. AC_DEFUN([AC_DISABLE_STATIC],
  7807. [_LT_SET_OPTION([LT_INIT], [disable-static])
  7808. ])
  7809. AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
  7810. AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
  7811. dnl aclocal-1.4 backwards compatibility:
  7812. dnl AC_DEFUN([AM_ENABLE_STATIC], [])
  7813. dnl AC_DEFUN([AM_DISABLE_STATIC], [])
  7814. # _LT_ENABLE_FAST_INSTALL([DEFAULT])
  7815. # ----------------------------------
  7816. # implement the --enable-fast-install flag, and support the 'fast-install'
  7817. # and 'disable-fast-install' LT_INIT options.
  7818. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
  7819. m4_define([_LT_ENABLE_FAST_INSTALL],
  7820. [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
  7821. AC_ARG_ENABLE([fast-install],
  7822. [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
  7823. [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
  7824. [p=${PACKAGE-default}
  7825. case $enableval in
  7826. yes) enable_fast_install=yes ;;
  7827. no) enable_fast_install=no ;;
  7828. *)
  7829. enable_fast_install=no
  7830. # Look at the argument we got. We use all the common list separators.
  7831. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
  7832. for pkg in $enableval; do
  7833. IFS=$lt_save_ifs
  7834. if test "X$pkg" = "X$p"; then
  7835. enable_fast_install=yes
  7836. fi
  7837. done
  7838. IFS=$lt_save_ifs
  7839. ;;
  7840. esac],
  7841. [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
  7842. _LT_DECL([fast_install], [enable_fast_install], [0],
  7843. [Whether or not to optimize for fast installation])dnl
  7844. ])# _LT_ENABLE_FAST_INSTALL
  7845. LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
  7846. LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
  7847. # Old names:
  7848. AU_DEFUN([AC_ENABLE_FAST_INSTALL],
  7849. [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
  7850. AC_DIAGNOSE([obsolete],
  7851. [$0: Remove this warning and the call to _LT_SET_OPTION when you put
  7852. the 'fast-install' option into LT_INIT's first parameter.])
  7853. ])
  7854. AU_DEFUN([AC_DISABLE_FAST_INSTALL],
  7855. [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
  7856. AC_DIAGNOSE([obsolete],
  7857. [$0: Remove this warning and the call to _LT_SET_OPTION when you put
  7858. the 'disable-fast-install' option into LT_INIT's first parameter.])
  7859. ])
  7860. dnl aclocal-1.4 backwards compatibility:
  7861. dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
  7862. dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
  7863. # _LT_WITH_AIX_SONAME([DEFAULT])
  7864. # ----------------------------------
  7865. # implement the --with-aix-soname flag, and support the `aix-soname=aix'
  7866. # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
  7867. # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
  7868. m4_define([_LT_WITH_AIX_SONAME],
  7869. [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
  7870. shared_archive_member_spec=
  7871. case $host,$enable_shared in
  7872. power*-*-aix[[5-9]]*,yes)
  7873. AC_MSG_CHECKING([which variant of shared library versioning to provide])
  7874. AC_ARG_WITH([aix-soname],
  7875. [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
  7876. [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
  7877. [case $withval in
  7878. aix|svr4|both)
  7879. ;;
  7880. *)
  7881. AC_MSG_ERROR([Unknown argument to --with-aix-soname])
  7882. ;;
  7883. esac
  7884. lt_cv_with_aix_soname=$with_aix_soname],
  7885. [AC_CACHE_VAL([lt_cv_with_aix_soname],
  7886. [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
  7887. with_aix_soname=$lt_cv_with_aix_soname])
  7888. AC_MSG_RESULT([$with_aix_soname])
  7889. if test aix != "$with_aix_soname"; then
  7890. # For the AIX way of multilib, we name the shared archive member
  7891. # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
  7892. # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
  7893. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
  7894. # the AIX toolchain works better with OBJECT_MODE set (default 32).
  7895. if test 64 = "${OBJECT_MODE-32}"; then
  7896. shared_archive_member_spec=shr_64
  7897. else
  7898. shared_archive_member_spec=shr
  7899. fi
  7900. fi
  7901. ;;
  7902. *)
  7903. with_aix_soname=aix
  7904. ;;
  7905. esac
  7906. _LT_DECL([], [shared_archive_member_spec], [0],
  7907. [Shared archive member basename, for filename based shared library versioning on AIX])dnl
  7908. ])# _LT_WITH_AIX_SONAME
  7909. LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
  7910. LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
  7911. LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
  7912. # _LT_WITH_PIC([MODE])
  7913. # --------------------
  7914. # implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
  7915. # LT_INIT options.
  7916. # MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
  7917. m4_define([_LT_WITH_PIC],
  7918. [AC_ARG_WITH([pic],
  7919. [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
  7920. [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
  7921. [lt_p=${PACKAGE-default}
  7922. case $withval in
  7923. yes|no) pic_mode=$withval ;;
  7924. *)
  7925. pic_mode=default
  7926. # Look at the argument we got. We use all the common list separators.
  7927. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
  7928. for lt_pkg in $withval; do
  7929. IFS=$lt_save_ifs
  7930. if test "X$lt_pkg" = "X$lt_p"; then
  7931. pic_mode=yes
  7932. fi
  7933. done
  7934. IFS=$lt_save_ifs
  7935. ;;
  7936. esac],
  7937. [pic_mode=m4_default([$1], [default])])
  7938. _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
  7939. ])# _LT_WITH_PIC
  7940. LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
  7941. LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
  7942. # Old name:
  7943. AU_DEFUN([AC_LIBTOOL_PICMODE],
  7944. [_LT_SET_OPTION([LT_INIT], [pic-only])
  7945. AC_DIAGNOSE([obsolete],
  7946. [$0: Remove this warning and the call to _LT_SET_OPTION when you
  7947. put the 'pic-only' option into LT_INIT's first parameter.])
  7948. ])
  7949. dnl aclocal-1.4 backwards compatibility:
  7950. dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
  7951. m4_define([_LTDL_MODE], [])
  7952. LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
  7953. [m4_define([_LTDL_MODE], [nonrecursive])])
  7954. LT_OPTION_DEFINE([LTDL_INIT], [recursive],
  7955. [m4_define([_LTDL_MODE], [recursive])])
  7956. LT_OPTION_DEFINE([LTDL_INIT], [subproject],
  7957. [m4_define([_LTDL_MODE], [subproject])])
  7958. m4_define([_LTDL_TYPE], [])
  7959. LT_OPTION_DEFINE([LTDL_INIT], [installable],
  7960. [m4_define([_LTDL_TYPE], [installable])])
  7961. LT_OPTION_DEFINE([LTDL_INIT], [convenience],
  7962. [m4_define([_LTDL_TYPE], [convenience])])
  7963. # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
  7964. #
  7965. # Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
  7966. # Foundation, Inc.
  7967. # Written by Gary V. Vaughan, 2004
  7968. #
  7969. # This file is free software; the Free Software Foundation gives
  7970. # unlimited permission to copy and/or distribute it, with or without
  7971. # modifications, as long as this notice is preserved.
  7972. # serial 6 ltsugar.m4
  7973. # This is to help aclocal find these macros, as it can't see m4_define.
  7974. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
  7975. # lt_join(SEP, ARG1, [ARG2...])
  7976. # -----------------------------
  7977. # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
  7978. # associated separator.
  7979. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
  7980. # versions in m4sugar had bugs.
  7981. m4_define([lt_join],
  7982. [m4_if([$#], [1], [],
  7983. [$#], [2], [[$2]],
  7984. [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
  7985. m4_define([_lt_join],
  7986. [m4_if([$#$2], [2], [],
  7987. [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
  7988. # lt_car(LIST)
  7989. # lt_cdr(LIST)
  7990. # ------------
  7991. # Manipulate m4 lists.
  7992. # These macros are necessary as long as will still need to support
  7993. # Autoconf-2.59, which quotes differently.
  7994. m4_define([lt_car], [[$1]])
  7995. m4_define([lt_cdr],
  7996. [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
  7997. [$#], 1, [],
  7998. [m4_dquote(m4_shift($@))])])
  7999. m4_define([lt_unquote], $1)
  8000. # lt_append(MACRO-NAME, STRING, [SEPARATOR])
  8001. # ------------------------------------------
  8002. # Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
  8003. # Note that neither SEPARATOR nor STRING are expanded; they are appended
  8004. # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
  8005. # No SEPARATOR is output if MACRO-NAME was previously undefined (different
  8006. # than defined and empty).
  8007. #
  8008. # This macro is needed until we can rely on Autoconf 2.62, since earlier
  8009. # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
  8010. m4_define([lt_append],
  8011. [m4_define([$1],
  8012. m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
  8013. # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
  8014. # ----------------------------------------------------------
  8015. # Produce a SEP delimited list of all paired combinations of elements of
  8016. # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
  8017. # has the form PREFIXmINFIXSUFFIXn.
  8018. # Needed until we can rely on m4_combine added in Autoconf 2.62.
  8019. m4_define([lt_combine],
  8020. [m4_if(m4_eval([$# > 3]), [1],
  8021. [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
  8022. [[m4_foreach([_Lt_prefix], [$2],
  8023. [m4_foreach([_Lt_suffix],
  8024. ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
  8025. [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
  8026. # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
  8027. # -----------------------------------------------------------------------
  8028. # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
  8029. # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
  8030. m4_define([lt_if_append_uniq],
  8031. [m4_ifdef([$1],
  8032. [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
  8033. [lt_append([$1], [$2], [$3])$4],
  8034. [$5])],
  8035. [lt_append([$1], [$2], [$3])$4])])
  8036. # lt_dict_add(DICT, KEY, VALUE)
  8037. # -----------------------------
  8038. m4_define([lt_dict_add],
  8039. [m4_define([$1($2)], [$3])])
  8040. # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
  8041. # --------------------------------------------
  8042. m4_define([lt_dict_add_subkey],
  8043. [m4_define([$1($2:$3)], [$4])])
  8044. # lt_dict_fetch(DICT, KEY, [SUBKEY])
  8045. # ----------------------------------
  8046. m4_define([lt_dict_fetch],
  8047. [m4_ifval([$3],
  8048. m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
  8049. m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
  8050. # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
  8051. # -----------------------------------------------------------------
  8052. m4_define([lt_if_dict_fetch],
  8053. [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
  8054. [$5],
  8055. [$6])])
  8056. # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
  8057. # --------------------------------------------------------------
  8058. m4_define([lt_dict_filter],
  8059. [m4_if([$5], [], [],
  8060. [lt_join(m4_quote(m4_default([$4], [[, ]])),
  8061. lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
  8062. [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
  8063. ])
  8064. # ltversion.m4 -- version numbers -*- Autoconf -*-
  8065. #
  8066. # Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
  8067. # Written by Scott James Remnant, 2004
  8068. #
  8069. # This file is free software; the Free Software Foundation gives
  8070. # unlimited permission to copy and/or distribute it, with or without
  8071. # modifications, as long as this notice is preserved.
  8072. # @configure_input@
  8073. # serial 4179 ltversion.m4
  8074. # This file is part of GNU Libtool
  8075. m4_define([LT_PACKAGE_VERSION], [2.4.6])
  8076. m4_define([LT_PACKAGE_REVISION], [2.4.6])
  8077. AC_DEFUN([LTVERSION_VERSION],
  8078. [macro_version='2.4.6'
  8079. macro_revision='2.4.6'
  8080. _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
  8081. _LT_DECL(, macro_revision, 0)
  8082. ])
  8083. # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
  8084. #
  8085. # Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
  8086. # Foundation, Inc.
  8087. # Written by Scott James Remnant, 2004.
  8088. #
  8089. # This file is free software; the Free Software Foundation gives
  8090. # unlimited permission to copy and/or distribute it, with or without
  8091. # modifications, as long as this notice is preserved.
  8092. # serial 5 lt~obsolete.m4
  8093. # These exist entirely to fool aclocal when bootstrapping libtool.
  8094. #
  8095. # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
  8096. # which have later been changed to m4_define as they aren't part of the
  8097. # exported API, or moved to Autoconf or Automake where they belong.
  8098. #
  8099. # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
  8100. # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
  8101. # using a macro with the same name in our local m4/libtool.m4 it'll
  8102. # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
  8103. # and doesn't know about Autoconf macros at all.)
  8104. #
  8105. # So we provide this file, which has a silly filename so it's always
  8106. # included after everything else. This provides aclocal with the
  8107. # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
  8108. # because those macros already exist, or will be overwritten later.
  8109. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
  8110. #
  8111. # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
  8112. # Yes, that means every name once taken will need to remain here until
  8113. # we give up compatibility with versions before 1.7, at which point
  8114. # we need to keep only those names which we still refer to.
  8115. # This is to help aclocal find these macros, as it can't see m4_define.
  8116. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
  8117. m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
  8118. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
  8119. m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
  8120. m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
  8121. m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
  8122. m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
  8123. m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
  8124. m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
  8125. m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
  8126. m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
  8127. m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
  8128. m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
  8129. m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
  8130. m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
  8131. m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
  8132. m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
  8133. m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
  8134. m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
  8135. m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
  8136. m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
  8137. m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
  8138. m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
  8139. m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
  8140. m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
  8141. m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
  8142. m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
  8143. m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
  8144. m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
  8145. m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
  8146. m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
  8147. m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
  8148. m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
  8149. m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
  8150. m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
  8151. m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
  8152. m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
  8153. m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
  8154. m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
  8155. m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
  8156. m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
  8157. m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
  8158. m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
  8159. m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
  8160. m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
  8161. m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
  8162. m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
  8163. m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
  8164. m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
  8165. m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
  8166. m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
  8167. m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
  8168. m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
  8169. m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
  8170. m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
  8171. m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
  8172. m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
  8173. m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
  8174. m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
  8175. m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
  8176. m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
  8177. m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
  8178. # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
  8179. # serial 11 (pkg-config-0.29.1)
  8180. dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
  8181. dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
  8182. dnl
  8183. dnl This program is free software; you can redistribute it and/or modify
  8184. dnl it under the terms of the GNU General Public License as published by
  8185. dnl the Free Software Foundation; either version 2 of the License, or
  8186. dnl (at your option) any later version.
  8187. dnl
  8188. dnl This program is distributed in the hope that it will be useful, but
  8189. dnl WITHOUT ANY WARRANTY; without even the implied warranty of
  8190. dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  8191. dnl General Public License for more details.
  8192. dnl
  8193. dnl You should have received a copy of the GNU General Public License
  8194. dnl along with this program; if not, write to the Free Software
  8195. dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  8196. dnl 02111-1307, USA.
  8197. dnl
  8198. dnl As a special exception to the GNU General Public License, if you
  8199. dnl distribute this file as part of a program that contains a
  8200. dnl configuration script generated by Autoconf, you may include it under
  8201. dnl the same distribution terms that you use for the rest of that
  8202. dnl program.
  8203. dnl PKG_PREREQ(MIN-VERSION)
  8204. dnl -----------------------
  8205. dnl Since: 0.29
  8206. dnl
  8207. dnl Verify that the version of the pkg-config macros are at least
  8208. dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
  8209. dnl installed version of pkg-config, this checks the developer's version
  8210. dnl of pkg.m4 when generating configure.
  8211. dnl
  8212. dnl To ensure that this macro is defined, also add:
  8213. dnl m4_ifndef([PKG_PREREQ],
  8214. dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
  8215. dnl
  8216. dnl See the "Since" comment for each macro you use to see what version
  8217. dnl of the macros you require.
  8218. m4_defun([PKG_PREREQ],
  8219. [m4_define([PKG_MACROS_VERSION], [0.29.1])
  8220. m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
  8221. [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
  8222. ])dnl PKG_PREREQ
  8223. dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
  8224. dnl ----------------------------------
  8225. dnl Since: 0.16
  8226. dnl
  8227. dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
  8228. dnl first found in the path. Checks that the version of pkg-config found
  8229. dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
  8230. dnl used since that's the first version where most current features of
  8231. dnl pkg-config existed.
  8232. AC_DEFUN([PKG_PROG_PKG_CONFIG],
  8233. [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
  8234. m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
  8235. m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
  8236. AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
  8237. AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
  8238. AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
  8239. if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
  8240. AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
  8241. fi
  8242. if test -n "$PKG_CONFIG"; then
  8243. _pkg_min_version=m4_default([$1], [0.9.0])
  8244. AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
  8245. if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
  8246. AC_MSG_RESULT([yes])
  8247. else
  8248. AC_MSG_RESULT([no])
  8249. PKG_CONFIG=""
  8250. fi
  8251. fi[]dnl
  8252. ])dnl PKG_PROG_PKG_CONFIG
  8253. dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
  8254. dnl -------------------------------------------------------------------
  8255. dnl Since: 0.18
  8256. dnl
  8257. dnl Check to see whether a particular set of modules exists. Similar to
  8258. dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
  8259. dnl
  8260. dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
  8261. dnl only at the first occurence in configure.ac, so if the first place
  8262. dnl it's called might be skipped (such as if it is within an "if", you
  8263. dnl have to call PKG_CHECK_EXISTS manually
  8264. AC_DEFUN([PKG_CHECK_EXISTS],
  8265. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  8266. if test -n "$PKG_CONFIG" && \
  8267. AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
  8268. m4_default([$2], [:])
  8269. m4_ifvaln([$3], [else
  8270. $3])dnl
  8271. fi])
  8272. dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
  8273. dnl ---------------------------------------------
  8274. dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
  8275. dnl pkg_failed based on the result.
  8276. m4_define([_PKG_CONFIG],
  8277. [if test -n "$$1"; then
  8278. pkg_cv_[]$1="$$1"
  8279. elif test -n "$PKG_CONFIG"; then
  8280. PKG_CHECK_EXISTS([$3],
  8281. [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
  8282. test "x$?" != "x0" && pkg_failed=yes ],
  8283. [pkg_failed=yes])
  8284. else
  8285. pkg_failed=untried
  8286. fi[]dnl
  8287. ])dnl _PKG_CONFIG
  8288. dnl _PKG_SHORT_ERRORS_SUPPORTED
  8289. dnl ---------------------------
  8290. dnl Internal check to see if pkg-config supports short errors.
  8291. AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
  8292. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
  8293. if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  8294. _pkg_short_errors_supported=yes
  8295. else
  8296. _pkg_short_errors_supported=no
  8297. fi[]dnl
  8298. ])dnl _PKG_SHORT_ERRORS_SUPPORTED
  8299. dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
  8300. dnl [ACTION-IF-NOT-FOUND])
  8301. dnl --------------------------------------------------------------
  8302. dnl Since: 0.4.0
  8303. dnl
  8304. dnl Note that if there is a possibility the first call to
  8305. dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
  8306. dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
  8307. AC_DEFUN([PKG_CHECK_MODULES],
  8308. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  8309. AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
  8310. AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
  8311. pkg_failed=no
  8312. AC_MSG_CHECKING([for $1])
  8313. _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
  8314. _PKG_CONFIG([$1][_LIBS], [libs], [$2])
  8315. m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
  8316. and $1[]_LIBS to avoid the need to call pkg-config.
  8317. See the pkg-config man page for more details.])
  8318. if test $pkg_failed = yes; then
  8319. AC_MSG_RESULT([no])
  8320. _PKG_SHORT_ERRORS_SUPPORTED
  8321. if test $_pkg_short_errors_supported = yes; then
  8322. $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
  8323. else
  8324. $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
  8325. fi
  8326. # Put the nasty error message in config.log where it belongs
  8327. echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
  8328. m4_default([$4], [AC_MSG_ERROR(
  8329. [Package requirements ($2) were not met:
  8330. $$1_PKG_ERRORS
  8331. Consider adjusting the PKG_CONFIG_PATH environment variable if you
  8332. installed software in a non-standard prefix.
  8333. _PKG_TEXT])[]dnl
  8334. ])
  8335. elif test $pkg_failed = untried; then
  8336. AC_MSG_RESULT([no])
  8337. m4_default([$4], [AC_MSG_FAILURE(
  8338. [The pkg-config script could not be found or is too old. Make sure it
  8339. is in your PATH or set the PKG_CONFIG environment variable to the full
  8340. path to pkg-config.
  8341. _PKG_TEXT
  8342. To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
  8343. ])
  8344. else
  8345. $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
  8346. $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
  8347. AC_MSG_RESULT([yes])
  8348. $3
  8349. fi[]dnl
  8350. ])dnl PKG_CHECK_MODULES
  8351. dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
  8352. dnl [ACTION-IF-NOT-FOUND])
  8353. dnl ---------------------------------------------------------------------
  8354. dnl Since: 0.29
  8355. dnl
  8356. dnl Checks for existence of MODULES and gathers its build flags with
  8357. dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
  8358. dnl and VARIABLE-PREFIX_LIBS from --libs.
  8359. dnl
  8360. dnl Note that if there is a possibility the first call to
  8361. dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
  8362. dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
  8363. dnl configure.ac.
  8364. AC_DEFUN([PKG_CHECK_MODULES_STATIC],
  8365. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  8366. _save_PKG_CONFIG=$PKG_CONFIG
  8367. PKG_CONFIG="$PKG_CONFIG --static"
  8368. PKG_CHECK_MODULES($@)
  8369. PKG_CONFIG=$_save_PKG_CONFIG[]dnl
  8370. ])dnl PKG_CHECK_MODULES_STATIC
  8371. dnl PKG_INSTALLDIR([DIRECTORY])
  8372. dnl -------------------------
  8373. dnl Since: 0.27
  8374. dnl
  8375. dnl Substitutes the variable pkgconfigdir as the location where a module
  8376. dnl should install pkg-config .pc files. By default the directory is
  8377. dnl $libdir/pkgconfig, but the default can be changed by passing
  8378. dnl DIRECTORY. The user can override through the --with-pkgconfigdir
  8379. dnl parameter.
  8380. AC_DEFUN([PKG_INSTALLDIR],
  8381. [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
  8382. m4_pushdef([pkg_description],
  8383. [pkg-config installation directory @<:@]pkg_default[@:>@])
  8384. AC_ARG_WITH([pkgconfigdir],
  8385. [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
  8386. [with_pkgconfigdir=]pkg_default)
  8387. AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
  8388. m4_popdef([pkg_default])
  8389. m4_popdef([pkg_description])
  8390. ])dnl PKG_INSTALLDIR
  8391. dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
  8392. dnl --------------------------------
  8393. dnl Since: 0.27
  8394. dnl
  8395. dnl Substitutes the variable noarch_pkgconfigdir as the location where a
  8396. dnl module should install arch-independent pkg-config .pc files. By
  8397. dnl default the directory is $datadir/pkgconfig, but the default can be
  8398. dnl changed by passing DIRECTORY. The user can override through the
  8399. dnl --with-noarch-pkgconfigdir parameter.
  8400. AC_DEFUN([PKG_NOARCH_INSTALLDIR],
  8401. [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
  8402. m4_pushdef([pkg_description],
  8403. [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
  8404. AC_ARG_WITH([noarch-pkgconfigdir],
  8405. [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
  8406. [with_noarch_pkgconfigdir=]pkg_default)
  8407. AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
  8408. m4_popdef([pkg_default])
  8409. m4_popdef([pkg_description])
  8410. ])dnl PKG_NOARCH_INSTALLDIR
  8411. dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
  8412. dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
  8413. dnl -------------------------------------------
  8414. dnl Since: 0.28
  8415. dnl
  8416. dnl Retrieves the value of the pkg-config variable for the given module.
  8417. AC_DEFUN([PKG_CHECK_VAR],
  8418. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  8419. AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
  8420. _PKG_CONFIG([$1], [variable="][$3]["], [$2])
  8421. AS_VAR_COPY([$1], [pkg_cv_][$1])
  8422. AS_VAR_IF([$1], [""], [$5], [$4])dnl
  8423. ])dnl PKG_CHECK_VAR
  8424. dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES,
  8425. dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND],
  8426. dnl [DESCRIPTION], [DEFAULT])
  8427. dnl ------------------------------------------
  8428. dnl
  8429. dnl Prepare a "--with-" configure option using the lowercase
  8430. dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and
  8431. dnl PKG_CHECK_MODULES in a single macro.
  8432. AC_DEFUN([PKG_WITH_MODULES],
  8433. [
  8434. m4_pushdef([with_arg], m4_tolower([$1]))
  8435. m4_pushdef([description],
  8436. [m4_default([$5], [build with ]with_arg[ support])])
  8437. m4_pushdef([def_arg], [m4_default([$6], [auto])])
  8438. m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes])
  8439. m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no])
  8440. m4_case(def_arg,
  8441. [yes],[m4_pushdef([with_without], [--without-]with_arg)],
  8442. [m4_pushdef([with_without],[--with-]with_arg)])
  8443. AC_ARG_WITH(with_arg,
  8444. AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),,
  8445. [AS_TR_SH([with_]with_arg)=def_arg])
  8446. AS_CASE([$AS_TR_SH([with_]with_arg)],
  8447. [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)],
  8448. [auto],[PKG_CHECK_MODULES([$1],[$2],
  8449. [m4_n([def_action_if_found]) $3],
  8450. [m4_n([def_action_if_not_found]) $4])])
  8451. m4_popdef([with_arg])
  8452. m4_popdef([description])
  8453. m4_popdef([def_arg])
  8454. ])dnl PKG_WITH_MODULES
  8455. dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
  8456. dnl [DESCRIPTION], [DEFAULT])
  8457. dnl -----------------------------------------------
  8458. dnl
  8459. dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES
  8460. dnl check._[VARIABLE-PREFIX] is exported as make variable.
  8461. AC_DEFUN([PKG_HAVE_WITH_MODULES],
  8462. [
  8463. PKG_WITH_MODULES([$1],[$2],,,[$3],[$4])
  8464. AM_CONDITIONAL([HAVE_][$1],
  8465. [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"])
  8466. ])dnl PKG_HAVE_WITH_MODULES
  8467. dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
  8468. dnl [DESCRIPTION], [DEFAULT])
  8469. dnl ------------------------------------------------------
  8470. dnl
  8471. dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after
  8472. dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make
  8473. dnl and preprocessor variable.
  8474. AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES],
  8475. [
  8476. PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4])
  8477. AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"],
  8478. [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])])
  8479. ])dnl PKG_HAVE_DEFINE_WITH_MODULES
  8480. # Copyright (C) 2002-2017 Free Software Foundation, Inc.
  8481. #
  8482. # This file is free software; the Free Software Foundation
  8483. # gives unlimited permission to copy and/or distribute it,
  8484. # with or without modifications, as long as this notice is preserved.
  8485. # AM_AUTOMAKE_VERSION(VERSION)
  8486. # ----------------------------
  8487. # Automake X.Y traces this macro to ensure aclocal.m4 has been
  8488. # generated from the m4 files accompanying Automake X.Y.
  8489. # (This private macro should not be called outside this file.)
  8490. AC_DEFUN([AM_AUTOMAKE_VERSION],
  8491. [am__api_version='1.15'
  8492. dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
  8493. dnl require some minimum version. Point them to the right macro.
  8494. m4_if([$1], [1.15.1], [],
  8495. [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
  8496. ])
  8497. # _AM_AUTOCONF_VERSION(VERSION)
  8498. # -----------------------------
  8499. # aclocal traces this macro to find the Autoconf version.
  8500. # This is a private macro too. Using m4_define simplifies
  8501. # the logic in aclocal, which can simply ignore this definition.
  8502. m4_define([_AM_AUTOCONF_VERSION], [])
  8503. # AM_SET_CURRENT_AUTOMAKE_VERSION
  8504. # -------------------------------
  8505. # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
  8506. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
  8507. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
  8508. [AM_AUTOMAKE_VERSION([1.15.1])dnl
  8509. m4_ifndef([AC_AUTOCONF_VERSION],
  8510. [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
  8511. _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
  8512. # AM_AUX_DIR_EXPAND -*- Autoconf -*-
  8513. # Copyright (C) 2001-2017 Free Software Foundation, Inc.
  8514. #
  8515. # This file is free software; the Free Software Foundation
  8516. # gives unlimited permission to copy and/or distribute it,
  8517. # with or without modifications, as long as this notice is preserved.
  8518. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
  8519. # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
  8520. # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
  8521. #
  8522. # Of course, Automake must honor this variable whenever it calls a
  8523. # tool from the auxiliary directory. The problem is that $srcdir (and
  8524. # therefore $ac_aux_dir as well) can be either absolute or relative,
  8525. # depending on how configure is run. This is pretty annoying, since
  8526. # it makes $ac_aux_dir quite unusable in subdirectories: in the top
  8527. # source directory, any form will work fine, but in subdirectories a
  8528. # relative path needs to be adjusted first.
  8529. #
  8530. # $ac_aux_dir/missing
  8531. # fails when called from a subdirectory if $ac_aux_dir is relative
  8532. # $top_srcdir/$ac_aux_dir/missing
  8533. # fails if $ac_aux_dir is absolute,
  8534. # fails when called from a subdirectory in a VPATH build with
  8535. # a relative $ac_aux_dir
  8536. #
  8537. # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
  8538. # are both prefixed by $srcdir. In an in-source build this is usually
  8539. # harmless because $srcdir is '.', but things will broke when you
  8540. # start a VPATH build or use an absolute $srcdir.
  8541. #
  8542. # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
  8543. # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
  8544. # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
  8545. # and then we would define $MISSING as
  8546. # MISSING="\${SHELL} $am_aux_dir/missing"
  8547. # This will work as long as MISSING is not called from configure, because
  8548. # unfortunately $(top_srcdir) has no meaning in configure.
  8549. # However there are other variables, like CC, which are often used in
  8550. # configure, and could therefore not use this "fixed" $ac_aux_dir.
  8551. #
  8552. # Another solution, used here, is to always expand $ac_aux_dir to an
  8553. # absolute PATH. The drawback is that using absolute paths prevent a
  8554. # configured tree to be moved without reconfiguration.
  8555. AC_DEFUN([AM_AUX_DIR_EXPAND],
  8556. [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  8557. # Expand $ac_aux_dir to an absolute path.
  8558. am_aux_dir=`cd "$ac_aux_dir" && pwd`
  8559. ])
  8560. # AM_CONDITIONAL -*- Autoconf -*-
  8561. # Copyright (C) 1997-2017 Free Software Foundation, Inc.
  8562. #
  8563. # This file is free software; the Free Software Foundation
  8564. # gives unlimited permission to copy and/or distribute it,
  8565. # with or without modifications, as long as this notice is preserved.
  8566. # AM_CONDITIONAL(NAME, SHELL-CONDITION)
  8567. # -------------------------------------
  8568. # Define a conditional.
  8569. AC_DEFUN([AM_CONDITIONAL],
  8570. [AC_PREREQ([2.52])dnl
  8571. m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
  8572. [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
  8573. AC_SUBST([$1_TRUE])dnl
  8574. AC_SUBST([$1_FALSE])dnl
  8575. _AM_SUBST_NOTMAKE([$1_TRUE])dnl
  8576. _AM_SUBST_NOTMAKE([$1_FALSE])dnl
  8577. m4_define([_AM_COND_VALUE_$1], [$2])dnl
  8578. if $2; then
  8579. $1_TRUE=
  8580. $1_FALSE='#'
  8581. else
  8582. $1_TRUE='#'
  8583. $1_FALSE=
  8584. fi
  8585. AC_CONFIG_COMMANDS_PRE(
  8586. [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
  8587. AC_MSG_ERROR([[conditional "$1" was never defined.
  8588. Usually this means the macro was only invoked conditionally.]])
  8589. fi])])
  8590. # Copyright (C) 1999-2017 Free Software Foundation, Inc.
  8591. #
  8592. # This file is free software; the Free Software Foundation
  8593. # gives unlimited permission to copy and/or distribute it,
  8594. # with or without modifications, as long as this notice is preserved.
  8595. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
  8596. # written in clear, in which case automake, when reading aclocal.m4,
  8597. # will think it sees a *use*, and therefore will trigger all it's
  8598. # C support machinery. Also note that it means that autoscan, seeing
  8599. # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
  8600. # _AM_DEPENDENCIES(NAME)
  8601. # ----------------------
  8602. # See how the compiler implements dependency checking.
  8603. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
  8604. # We try a few techniques and use that to set a single cache variable.
  8605. #
  8606. # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
  8607. # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
  8608. # dependency, and given that the user is not expected to run this macro,
  8609. # just rely on AC_PROG_CC.
  8610. AC_DEFUN([_AM_DEPENDENCIES],
  8611. [AC_REQUIRE([AM_SET_DEPDIR])dnl
  8612. AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
  8613. AC_REQUIRE([AM_MAKE_INCLUDE])dnl
  8614. AC_REQUIRE([AM_DEP_TRACK])dnl
  8615. m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
  8616. [$1], [CXX], [depcc="$CXX" am_compiler_list=],
  8617. [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
  8618. [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
  8619. [$1], [UPC], [depcc="$UPC" am_compiler_list=],
  8620. [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
  8621. [depcc="$$1" am_compiler_list=])
  8622. AC_CACHE_CHECK([dependency style of $depcc],
  8623. [am_cv_$1_dependencies_compiler_type],
  8624. [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  8625. # We make a subdir and do the tests there. Otherwise we can end up
  8626. # making bogus files that we don't know about and never remove. For
  8627. # instance it was reported that on HP-UX the gcc test will end up
  8628. # making a dummy file named 'D' -- because '-MD' means "put the output
  8629. # in D".
  8630. rm -rf conftest.dir
  8631. mkdir conftest.dir
  8632. # Copy depcomp to subdir because otherwise we won't find it if we're
  8633. # using a relative directory.
  8634. cp "$am_depcomp" conftest.dir
  8635. cd conftest.dir
  8636. # We will build objects and dependencies in a subdirectory because
  8637. # it helps to detect inapplicable dependency modes. For instance
  8638. # both Tru64's cc and ICC support -MD to output dependencies as a
  8639. # side effect of compilation, but ICC will put the dependencies in
  8640. # the current directory while Tru64 will put them in the object
  8641. # directory.
  8642. mkdir sub
  8643. am_cv_$1_dependencies_compiler_type=none
  8644. if test "$am_compiler_list" = ""; then
  8645. am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
  8646. fi
  8647. am__universal=false
  8648. m4_case([$1], [CC],
  8649. [case " $depcc " in #(
  8650. *\ -arch\ *\ -arch\ *) am__universal=true ;;
  8651. esac],
  8652. [CXX],
  8653. [case " $depcc " in #(
  8654. *\ -arch\ *\ -arch\ *) am__universal=true ;;
  8655. esac])
  8656. for depmode in $am_compiler_list; do
  8657. # Setup a source with many dependencies, because some compilers
  8658. # like to wrap large dependency lists on column 80 (with \), and
  8659. # we should not choose a depcomp mode which is confused by this.
  8660. #
  8661. # We need to recreate these files for each test, as the compiler may
  8662. # overwrite some of them when testing with obscure command lines.
  8663. # This happens at least with the AIX C compiler.
  8664. : > sub/conftest.c
  8665. for i in 1 2 3 4 5 6; do
  8666. echo '#include "conftst'$i'.h"' >> sub/conftest.c
  8667. # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
  8668. # Solaris 10 /bin/sh.
  8669. echo '/* dummy */' > sub/conftst$i.h
  8670. done
  8671. echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
  8672. # We check with '-c' and '-o' for the sake of the "dashmstdout"
  8673. # mode. It turns out that the SunPro C++ compiler does not properly
  8674. # handle '-M -o', and we need to detect this. Also, some Intel
  8675. # versions had trouble with output in subdirs.
  8676. am__obj=sub/conftest.${OBJEXT-o}
  8677. am__minus_obj="-o $am__obj"
  8678. case $depmode in
  8679. gcc)
  8680. # This depmode causes a compiler race in universal mode.
  8681. test "$am__universal" = false || continue
  8682. ;;
  8683. nosideeffect)
  8684. # After this tag, mechanisms are not by side-effect, so they'll
  8685. # only be used when explicitly requested.
  8686. if test "x$enable_dependency_tracking" = xyes; then
  8687. continue
  8688. else
  8689. break
  8690. fi
  8691. ;;
  8692. msvc7 | msvc7msys | msvisualcpp | msvcmsys)
  8693. # This compiler won't grok '-c -o', but also, the minuso test has
  8694. # not run yet. These depmodes are late enough in the game, and
  8695. # so weak that their functioning should not be impacted.
  8696. am__obj=conftest.${OBJEXT-o}
  8697. am__minus_obj=
  8698. ;;
  8699. none) break ;;
  8700. esac
  8701. if depmode=$depmode \
  8702. source=sub/conftest.c object=$am__obj \
  8703. depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
  8704. $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
  8705. >/dev/null 2>conftest.err &&
  8706. grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
  8707. grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
  8708. grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
  8709. ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
  8710. # icc doesn't choke on unknown options, it will just issue warnings
  8711. # or remarks (even with -Werror). So we grep stderr for any message
  8712. # that says an option was ignored or not supported.
  8713. # When given -MP, icc 7.0 and 7.1 complain thusly:
  8714. # icc: Command line warning: ignoring option '-M'; no argument required
  8715. # The diagnosis changed in icc 8.0:
  8716. # icc: Command line remark: option '-MP' not supported
  8717. if (grep 'ignoring option' conftest.err ||
  8718. grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
  8719. am_cv_$1_dependencies_compiler_type=$depmode
  8720. break
  8721. fi
  8722. fi
  8723. done
  8724. cd ..
  8725. rm -rf conftest.dir
  8726. else
  8727. am_cv_$1_dependencies_compiler_type=none
  8728. fi
  8729. ])
  8730. AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
  8731. AM_CONDITIONAL([am__fastdep$1], [
  8732. test "x$enable_dependency_tracking" != xno \
  8733. && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
  8734. ])
  8735. # AM_SET_DEPDIR
  8736. # -------------
  8737. # Choose a directory name for dependency files.
  8738. # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
  8739. AC_DEFUN([AM_SET_DEPDIR],
  8740. [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  8741. AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
  8742. ])
  8743. # AM_DEP_TRACK
  8744. # ------------
  8745. AC_DEFUN([AM_DEP_TRACK],
  8746. [AC_ARG_ENABLE([dependency-tracking], [dnl
  8747. AS_HELP_STRING(
  8748. [--enable-dependency-tracking],
  8749. [do not reject slow dependency extractors])
  8750. AS_HELP_STRING(
  8751. [--disable-dependency-tracking],
  8752. [speeds up one-time build])])
  8753. if test "x$enable_dependency_tracking" != xno; then
  8754. am_depcomp="$ac_aux_dir/depcomp"
  8755. AMDEPBACKSLASH='\'
  8756. am__nodep='_no'
  8757. fi
  8758. AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
  8759. AC_SUBST([AMDEPBACKSLASH])dnl
  8760. _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
  8761. AC_SUBST([am__nodep])dnl
  8762. _AM_SUBST_NOTMAKE([am__nodep])dnl
  8763. ])
  8764. # Generate code to set up dependency tracking. -*- Autoconf -*-
  8765. # Copyright (C) 1999-2017 Free Software Foundation, Inc.
  8766. #
  8767. # This file is free software; the Free Software Foundation
  8768. # gives unlimited permission to copy and/or distribute it,
  8769. # with or without modifications, as long as this notice is preserved.
  8770. # _AM_OUTPUT_DEPENDENCY_COMMANDS
  8771. # ------------------------------
  8772. AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
  8773. [{
  8774. # Older Autoconf quotes --file arguments for eval, but not when files
  8775. # are listed without --file. Let's play safe and only enable the eval
  8776. # if we detect the quoting.
  8777. case $CONFIG_FILES in
  8778. *\'*) eval set x "$CONFIG_FILES" ;;
  8779. *) set x $CONFIG_FILES ;;
  8780. esac
  8781. shift
  8782. for mf
  8783. do
  8784. # Strip MF so we end up with the name of the file.
  8785. mf=`echo "$mf" | sed -e 's/:.*$//'`
  8786. # Check whether this is an Automake generated Makefile or not.
  8787. # We used to match only the files named 'Makefile.in', but
  8788. # some people rename them; so instead we look at the file content.
  8789. # Grep'ing the first line is not enough: some people post-process
  8790. # each Makefile.in and add a new line on top of each file to say so.
  8791. # Grep'ing the whole file is not good either: AIX grep has a line
  8792. # limit of 2048, but all sed's we know have understand at least 4000.
  8793. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
  8794. dirpart=`AS_DIRNAME("$mf")`
  8795. else
  8796. continue
  8797. fi
  8798. # Extract the definition of DEPDIR, am__include, and am__quote
  8799. # from the Makefile without running 'make'.
  8800. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
  8801. test -z "$DEPDIR" && continue
  8802. am__include=`sed -n 's/^am__include = //p' < "$mf"`
  8803. test -z "$am__include" && continue
  8804. am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
  8805. # Find all dependency output files, they are included files with
  8806. # $(DEPDIR) in their names. We invoke sed twice because it is the
  8807. # simplest approach to changing $(DEPDIR) to its actual value in the
  8808. # expansion.
  8809. for file in `sed -n "
  8810. s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
  8811. sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
  8812. # Make sure the directory exists.
  8813. test -f "$dirpart/$file" && continue
  8814. fdir=`AS_DIRNAME(["$file"])`
  8815. AS_MKDIR_P([$dirpart/$fdir])
  8816. # echo "creating $dirpart/$file"
  8817. echo '# dummy' > "$dirpart/$file"
  8818. done
  8819. done
  8820. }
  8821. ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
  8822. # AM_OUTPUT_DEPENDENCY_COMMANDS
  8823. # -----------------------------
  8824. # This macro should only be invoked once -- use via AC_REQUIRE.
  8825. #
  8826. # This code is only required when automatic dependency tracking
  8827. # is enabled. FIXME. This creates each '.P' file that we will
  8828. # need in order to bootstrap the dependency handling code.
  8829. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
  8830. [AC_CONFIG_COMMANDS([depfiles],
  8831. [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
  8832. [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
  8833. ])
  8834. # Do all the work for Automake. -*- Autoconf -*-
  8835. # Copyright (C) 1996-2017 Free Software Foundation, Inc.
  8836. #
  8837. # This file is free software; the Free Software Foundation
  8838. # gives unlimited permission to copy and/or distribute it,
  8839. # with or without modifications, as long as this notice is preserved.
  8840. # This macro actually does too much. Some checks are only needed if
  8841. # your package does certain things. But this isn't really a big deal.
  8842. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
  8843. m4_define([AC_PROG_CC],
  8844. m4_defn([AC_PROG_CC])
  8845. [_AM_PROG_CC_C_O
  8846. ])
  8847. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
  8848. # AM_INIT_AUTOMAKE([OPTIONS])
  8849. # -----------------------------------------------
  8850. # The call with PACKAGE and VERSION arguments is the old style
  8851. # call (pre autoconf-2.50), which is being phased out. PACKAGE
  8852. # and VERSION should now be passed to AC_INIT and removed from
  8853. # the call to AM_INIT_AUTOMAKE.
  8854. # We support both call styles for the transition. After
  8855. # the next Automake release, Autoconf can make the AC_INIT
  8856. # arguments mandatory, and then we can depend on a new Autoconf
  8857. # release and drop the old call support.
  8858. AC_DEFUN([AM_INIT_AUTOMAKE],
  8859. [AC_PREREQ([2.65])dnl
  8860. dnl Autoconf wants to disallow AM_ names. We explicitly allow
  8861. dnl the ones we care about.
  8862. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
  8863. AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
  8864. AC_REQUIRE([AC_PROG_INSTALL])dnl
  8865. if test "`cd $srcdir && pwd`" != "`pwd`"; then
  8866. # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
  8867. # is not polluted with repeated "-I."
  8868. AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
  8869. # test to see if srcdir already configured
  8870. if test -f $srcdir/config.status; then
  8871. AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  8872. fi
  8873. fi
  8874. # test whether we have cygpath
  8875. if test -z "$CYGPATH_W"; then
  8876. if (cygpath --version) >/dev/null 2>/dev/null; then
  8877. CYGPATH_W='cygpath -w'
  8878. else
  8879. CYGPATH_W=echo
  8880. fi
  8881. fi
  8882. AC_SUBST([CYGPATH_W])
  8883. # Define the identity of the package.
  8884. dnl Distinguish between old-style and new-style calls.
  8885. m4_ifval([$2],
  8886. [AC_DIAGNOSE([obsolete],
  8887. [$0: two- and three-arguments forms are deprecated.])
  8888. m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  8889. AC_SUBST([PACKAGE], [$1])dnl
  8890. AC_SUBST([VERSION], [$2])],
  8891. [_AM_SET_OPTIONS([$1])dnl
  8892. dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
  8893. m4_if(
  8894. m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
  8895. [ok:ok],,
  8896. [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
  8897. AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  8898. AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
  8899. _AM_IF_OPTION([no-define],,
  8900. [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
  8901. AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
  8902. # Some tools Automake needs.
  8903. AC_REQUIRE([AM_SANITY_CHECK])dnl
  8904. AC_REQUIRE([AC_ARG_PROGRAM])dnl
  8905. AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
  8906. AM_MISSING_PROG([AUTOCONF], [autoconf])
  8907. AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
  8908. AM_MISSING_PROG([AUTOHEADER], [autoheader])
  8909. AM_MISSING_PROG([MAKEINFO], [makeinfo])
  8910. AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  8911. AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
  8912. AC_REQUIRE([AC_PROG_MKDIR_P])dnl
  8913. # For better backward compatibility. To be removed once Automake 1.9.x
  8914. # dies out for good. For more background, see:
  8915. # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
  8916. # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
  8917. AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
  8918. # We need awk for the "check" target (and possibly the TAP driver). The
  8919. # system "awk" is bad on some platforms.
  8920. AC_REQUIRE([AC_PROG_AWK])dnl
  8921. AC_REQUIRE([AC_PROG_MAKE_SET])dnl
  8922. AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  8923. _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
  8924. [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
  8925. [_AM_PROG_TAR([v7])])])
  8926. _AM_IF_OPTION([no-dependencies],,
  8927. [AC_PROVIDE_IFELSE([AC_PROG_CC],
  8928. [_AM_DEPENDENCIES([CC])],
  8929. [m4_define([AC_PROG_CC],
  8930. m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
  8931. AC_PROVIDE_IFELSE([AC_PROG_CXX],
  8932. [_AM_DEPENDENCIES([CXX])],
  8933. [m4_define([AC_PROG_CXX],
  8934. m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
  8935. AC_PROVIDE_IFELSE([AC_PROG_OBJC],
  8936. [_AM_DEPENDENCIES([OBJC])],
  8937. [m4_define([AC_PROG_OBJC],
  8938. m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
  8939. AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
  8940. [_AM_DEPENDENCIES([OBJCXX])],
  8941. [m4_define([AC_PROG_OBJCXX],
  8942. m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
  8943. ])
  8944. AC_REQUIRE([AM_SILENT_RULES])dnl
  8945. dnl The testsuite driver may need to know about EXEEXT, so add the
  8946. dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
  8947. dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
  8948. AC_CONFIG_COMMANDS_PRE(dnl
  8949. [m4_provide_if([_AM_COMPILER_EXEEXT],
  8950. [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
  8951. # POSIX will say in a future version that running "rm -f" with no argument
  8952. # is OK; and we want to be able to make that assumption in our Makefile
  8953. # recipes. So use an aggressive probe to check that the usage we want is
  8954. # actually supported "in the wild" to an acceptable degree.
  8955. # See automake bug#10828.
  8956. # To make any issue more visible, cause the running configure to be aborted
  8957. # by default if the 'rm' program in use doesn't match our expectations; the
  8958. # user can still override this though.
  8959. if rm -f && rm -fr && rm -rf; then : OK; else
  8960. cat >&2 <<'END'
  8961. Oops!
  8962. Your 'rm' program seems unable to run without file operands specified
  8963. on the command line, even when the '-f' option is present. This is contrary
  8964. to the behaviour of most rm programs out there, and not conforming with
  8965. the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
  8966. Please tell bug-automake@gnu.org about your system, including the value
  8967. of your $PATH and any error possibly output before this message. This
  8968. can help us improve future automake versions.
  8969. END
  8970. if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
  8971. echo 'Configuration will proceed anyway, since you have set the' >&2
  8972. echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
  8973. echo >&2
  8974. else
  8975. cat >&2 <<'END'
  8976. Aborting the configuration process, to ensure you take notice of the issue.
  8977. You can download and install GNU coreutils to get an 'rm' implementation
  8978. that behaves properly: <http://www.gnu.org/software/coreutils/>.
  8979. If you want to complete the configuration process using your problematic
  8980. 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
  8981. to "yes", and re-run configure.
  8982. END
  8983. AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
  8984. fi
  8985. fi
  8986. dnl The trailing newline in this macro's definition is deliberate, for
  8987. dnl backward compatibility and to allow trailing 'dnl'-style comments
  8988. dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
  8989. ])
  8990. dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
  8991. dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
  8992. dnl mangled by Autoconf and run in a shell conditional statement.
  8993. m4_define([_AC_COMPILER_EXEEXT],
  8994. m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
  8995. # When config.status generates a header, we must update the stamp-h file.
  8996. # This file resides in the same directory as the config header
  8997. # that is generated. The stamp files are numbered to have different names.
  8998. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
  8999. # loop where config.status creates the headers, so we can generate
  9000. # our stamp files there.
  9001. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
  9002. [# Compute $1's index in $config_headers.
  9003. _am_arg=$1
  9004. _am_stamp_count=1
  9005. for _am_header in $config_headers :; do
  9006. case $_am_header in
  9007. $_am_arg | $_am_arg:* )
  9008. break ;;
  9009. * )
  9010. _am_stamp_count=`expr $_am_stamp_count + 1` ;;
  9011. esac
  9012. done
  9013. echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
  9014. # Copyright (C) 2001-2017 Free Software Foundation, Inc.
  9015. #
  9016. # This file is free software; the Free Software Foundation
  9017. # gives unlimited permission to copy and/or distribute it,
  9018. # with or without modifications, as long as this notice is preserved.
  9019. # AM_PROG_INSTALL_SH
  9020. # ------------------
  9021. # Define $install_sh.
  9022. AC_DEFUN([AM_PROG_INSTALL_SH],
  9023. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  9024. if test x"${install_sh+set}" != xset; then
  9025. case $am_aux_dir in
  9026. *\ * | *\ *)
  9027. install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
  9028. *)
  9029. install_sh="\${SHELL} $am_aux_dir/install-sh"
  9030. esac
  9031. fi
  9032. AC_SUBST([install_sh])])
  9033. # Copyright (C) 2003-2017 Free Software Foundation, Inc.
  9034. #
  9035. # This file is free software; the Free Software Foundation
  9036. # gives unlimited permission to copy and/or distribute it,
  9037. # with or without modifications, as long as this notice is preserved.
  9038. # Check whether the underlying file-system supports filenames
  9039. # with a leading dot. For instance MS-DOS doesn't.
  9040. AC_DEFUN([AM_SET_LEADING_DOT],
  9041. [rm -rf .tst 2>/dev/null
  9042. mkdir .tst 2>/dev/null
  9043. if test -d .tst; then
  9044. am__leading_dot=.
  9045. else
  9046. am__leading_dot=_
  9047. fi
  9048. rmdir .tst 2>/dev/null
  9049. AC_SUBST([am__leading_dot])])
  9050. # Check to see how 'make' treats includes. -*- Autoconf -*-
  9051. # Copyright (C) 2001-2017 Free Software Foundation, Inc.
  9052. #
  9053. # This file is free software; the Free Software Foundation
  9054. # gives unlimited permission to copy and/or distribute it,
  9055. # with or without modifications, as long as this notice is preserved.
  9056. # AM_MAKE_INCLUDE()
  9057. # -----------------
  9058. # Check to see how make treats includes.
  9059. AC_DEFUN([AM_MAKE_INCLUDE],
  9060. [am_make=${MAKE-make}
  9061. cat > confinc << 'END'
  9062. am__doit:
  9063. @echo this is the am__doit target
  9064. .PHONY: am__doit
  9065. END
  9066. # If we don't find an include directive, just comment out the code.
  9067. AC_MSG_CHECKING([for style of include used by $am_make])
  9068. am__include="#"
  9069. am__quote=
  9070. _am_result=none
  9071. # First try GNU make style include.
  9072. echo "include confinc" > confmf
  9073. # Ignore all kinds of additional output from 'make'.
  9074. case `$am_make -s -f confmf 2> /dev/null` in #(
  9075. *the\ am__doit\ target*)
  9076. am__include=include
  9077. am__quote=
  9078. _am_result=GNU
  9079. ;;
  9080. esac
  9081. # Now try BSD make style include.
  9082. if test "$am__include" = "#"; then
  9083. echo '.include "confinc"' > confmf
  9084. case `$am_make -s -f confmf 2> /dev/null` in #(
  9085. *the\ am__doit\ target*)
  9086. am__include=.include
  9087. am__quote="\""
  9088. _am_result=BSD
  9089. ;;
  9090. esac
  9091. fi
  9092. AC_SUBST([am__include])
  9093. AC_SUBST([am__quote])
  9094. AC_MSG_RESULT([$_am_result])
  9095. rm -f confinc confmf
  9096. ])
  9097. # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
  9098. # Copyright (C) 1997-2017 Free Software Foundation, Inc.
  9099. #
  9100. # This file is free software; the Free Software Foundation
  9101. # gives unlimited permission to copy and/or distribute it,
  9102. # with or without modifications, as long as this notice is preserved.
  9103. # AM_MISSING_PROG(NAME, PROGRAM)
  9104. # ------------------------------
  9105. AC_DEFUN([AM_MISSING_PROG],
  9106. [AC_REQUIRE([AM_MISSING_HAS_RUN])
  9107. $1=${$1-"${am_missing_run}$2"}
  9108. AC_SUBST($1)])
  9109. # AM_MISSING_HAS_RUN
  9110. # ------------------