aclocal.m4 432 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980
  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. # iconv.m4 serial 19 (gettext-0.18.2)
  19. dnl Copyright (C) 2000-2002, 2007-2014, 2016 Free Software Foundation, Inc.
  20. dnl This file is free software; the Free Software Foundation
  21. dnl gives unlimited permission to copy and/or distribute it,
  22. dnl with or without modifications, as long as this notice is preserved.
  23. dnl From Bruno Haible.
  24. AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
  25. [
  26. dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
  27. AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
  28. AC_REQUIRE([AC_LIB_RPATH])
  29. dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
  30. dnl accordingly.
  31. AC_LIB_LINKFLAGS_BODY([iconv])
  32. ])
  33. AC_DEFUN([AM_ICONV_LINK],
  34. [
  35. dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
  36. dnl those with the standalone portable GNU libiconv installed).
  37. AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
  38. dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
  39. dnl accordingly.
  40. AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
  41. dnl Add $INCICONV to CPPFLAGS before performing the following checks,
  42. dnl because if the user has installed libiconv and not disabled its use
  43. dnl via --without-libiconv-prefix, he wants to use it. The first
  44. dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed.
  45. am_save_CPPFLAGS="$CPPFLAGS"
  46. AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
  47. AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
  48. am_cv_func_iconv="no, consider installing GNU libiconv"
  49. am_cv_lib_iconv=no
  50. AC_LINK_IFELSE(
  51. [AC_LANG_PROGRAM(
  52. [[
  53. #include <stdlib.h>
  54. #include <iconv.h>
  55. ]],
  56. [[iconv_t cd = iconv_open("","");
  57. iconv(cd,NULL,NULL,NULL,NULL);
  58. iconv_close(cd);]])],
  59. [am_cv_func_iconv=yes])
  60. if test "$am_cv_func_iconv" != yes; then
  61. am_save_LIBS="$LIBS"
  62. LIBS="$LIBS $LIBICONV"
  63. AC_LINK_IFELSE(
  64. [AC_LANG_PROGRAM(
  65. [[
  66. #include <stdlib.h>
  67. #include <iconv.h>
  68. ]],
  69. [[iconv_t cd = iconv_open("","");
  70. iconv(cd,NULL,NULL,NULL,NULL);
  71. iconv_close(cd);]])],
  72. [am_cv_lib_iconv=yes]
  73. [am_cv_func_iconv=yes])
  74. LIBS="$am_save_LIBS"
  75. fi
  76. ])
  77. if test "$am_cv_func_iconv" = yes; then
  78. AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
  79. dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11,
  80. dnl Solaris 10.
  81. am_save_LIBS="$LIBS"
  82. if test $am_cv_lib_iconv = yes; then
  83. LIBS="$LIBS $LIBICONV"
  84. fi
  85. am_cv_func_iconv_works=no
  86. for ac_iconv_const in '' 'const'; do
  87. AC_RUN_IFELSE(
  88. [AC_LANG_PROGRAM(
  89. [[
  90. #include <iconv.h>
  91. #include <string.h>
  92. #ifndef ICONV_CONST
  93. # define ICONV_CONST $ac_iconv_const
  94. #endif
  95. ]],
  96. [[int result = 0;
  97. /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
  98. returns. */
  99. {
  100. iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
  101. if (cd_utf8_to_88591 != (iconv_t)(-1))
  102. {
  103. static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
  104. char buf[10];
  105. ICONV_CONST char *inptr = input;
  106. size_t inbytesleft = strlen (input);
  107. char *outptr = buf;
  108. size_t outbytesleft = sizeof (buf);
  109. size_t res = iconv (cd_utf8_to_88591,
  110. &inptr, &inbytesleft,
  111. &outptr, &outbytesleft);
  112. if (res == 0)
  113. result |= 1;
  114. iconv_close (cd_utf8_to_88591);
  115. }
  116. }
  117. /* Test against Solaris 10 bug: Failures are not distinguishable from
  118. successful returns. */
  119. {
  120. iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
  121. if (cd_ascii_to_88591 != (iconv_t)(-1))
  122. {
  123. static ICONV_CONST char input[] = "\263";
  124. char buf[10];
  125. ICONV_CONST char *inptr = input;
  126. size_t inbytesleft = strlen (input);
  127. char *outptr = buf;
  128. size_t outbytesleft = sizeof (buf);
  129. size_t res = iconv (cd_ascii_to_88591,
  130. &inptr, &inbytesleft,
  131. &outptr, &outbytesleft);
  132. if (res == 0)
  133. result |= 2;
  134. iconv_close (cd_ascii_to_88591);
  135. }
  136. }
  137. /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
  138. {
  139. iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
  140. if (cd_88591_to_utf8 != (iconv_t)(-1))
  141. {
  142. static ICONV_CONST char input[] = "\304";
  143. static char buf[2] = { (char)0xDE, (char)0xAD };
  144. ICONV_CONST char *inptr = input;
  145. size_t inbytesleft = 1;
  146. char *outptr = buf;
  147. size_t outbytesleft = 1;
  148. size_t res = iconv (cd_88591_to_utf8,
  149. &inptr, &inbytesleft,
  150. &outptr, &outbytesleft);
  151. if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
  152. result |= 4;
  153. iconv_close (cd_88591_to_utf8);
  154. }
  155. }
  156. #if 0 /* This bug could be worked around by the caller. */
  157. /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
  158. {
  159. iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
  160. if (cd_88591_to_utf8 != (iconv_t)(-1))
  161. {
  162. static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
  163. char buf[50];
  164. ICONV_CONST char *inptr = input;
  165. size_t inbytesleft = strlen (input);
  166. char *outptr = buf;
  167. size_t outbytesleft = sizeof (buf);
  168. size_t res = iconv (cd_88591_to_utf8,
  169. &inptr, &inbytesleft,
  170. &outptr, &outbytesleft);
  171. if ((int)res > 0)
  172. result |= 8;
  173. iconv_close (cd_88591_to_utf8);
  174. }
  175. }
  176. #endif
  177. /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
  178. provided. */
  179. if (/* Try standardized names. */
  180. iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
  181. /* Try IRIX, OSF/1 names. */
  182. && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
  183. /* Try AIX names. */
  184. && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
  185. /* Try HP-UX names. */
  186. && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
  187. result |= 16;
  188. return result;
  189. ]])],
  190. [am_cv_func_iconv_works=yes], ,
  191. [case "$host_os" in
  192. aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
  193. *) am_cv_func_iconv_works="guessing yes" ;;
  194. esac])
  195. test "$am_cv_func_iconv_works" = no || break
  196. done
  197. LIBS="$am_save_LIBS"
  198. ])
  199. case "$am_cv_func_iconv_works" in
  200. *no) am_func_iconv=no am_cv_lib_iconv=no ;;
  201. *) am_func_iconv=yes ;;
  202. esac
  203. else
  204. am_func_iconv=no am_cv_lib_iconv=no
  205. fi
  206. if test "$am_func_iconv" = yes; then
  207. AC_DEFINE([HAVE_ICONV], [1],
  208. [Define if you have the iconv() function and it works.])
  209. fi
  210. if test "$am_cv_lib_iconv" = yes; then
  211. AC_MSG_CHECKING([how to link with libiconv])
  212. AC_MSG_RESULT([$LIBICONV])
  213. else
  214. dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
  215. dnl either.
  216. CPPFLAGS="$am_save_CPPFLAGS"
  217. LIBICONV=
  218. LTLIBICONV=
  219. fi
  220. AC_SUBST([LIBICONV])
  221. AC_SUBST([LTLIBICONV])
  222. ])
  223. dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
  224. dnl avoid warnings like
  225. dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
  226. dnl This is tricky because of the way 'aclocal' is implemented:
  227. dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
  228. dnl Otherwise aclocal's initial scan pass would miss the macro definition.
  229. dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
  230. dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
  231. dnl warnings.
  232. m4_define([gl_iconv_AC_DEFUN],
  233. m4_version_prereq([2.64],
  234. [[AC_DEFUN_ONCE(
  235. [$1], [$2])]],
  236. [m4_ifdef([gl_00GNULIB],
  237. [[AC_DEFUN_ONCE(
  238. [$1], [$2])]],
  239. [[AC_DEFUN(
  240. [$1], [$2])]])]))
  241. gl_iconv_AC_DEFUN([AM_ICONV],
  242. [
  243. AM_ICONV_LINK
  244. if test "$am_cv_func_iconv" = yes; then
  245. AC_MSG_CHECKING([for iconv declaration])
  246. AC_CACHE_VAL([am_cv_proto_iconv], [
  247. AC_COMPILE_IFELSE(
  248. [AC_LANG_PROGRAM(
  249. [[
  250. #include <stdlib.h>
  251. #include <iconv.h>
  252. extern
  253. #ifdef __cplusplus
  254. "C"
  255. #endif
  256. #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
  257. size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
  258. #else
  259. size_t iconv();
  260. #endif
  261. ]],
  262. [[]])],
  263. [am_cv_proto_iconv_arg1=""],
  264. [am_cv_proto_iconv_arg1="const"])
  265. am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
  266. am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
  267. AC_MSG_RESULT([
  268. $am_cv_proto_iconv])
  269. AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
  270. [Define as const if the declaration of iconv() needs const.])
  271. dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>.
  272. m4_ifdef([gl_ICONV_H_DEFAULTS],
  273. [AC_REQUIRE([gl_ICONV_H_DEFAULTS])
  274. if test -n "$am_cv_proto_iconv_arg1"; then
  275. ICONV_CONST="const"
  276. fi
  277. ])
  278. fi
  279. ])
  280. # lib-ld.m4 serial 6
  281. dnl Copyright (C) 1996-2003, 2009-2016 Free Software Foundation, Inc.
  282. dnl This file is free software; the Free Software Foundation
  283. dnl gives unlimited permission to copy and/or distribute it,
  284. dnl with or without modifications, as long as this notice is preserved.
  285. dnl Subroutines of libtool.m4,
  286. dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid
  287. dnl collision with libtool.m4.
  288. dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no.
  289. AC_DEFUN([AC_LIB_PROG_LD_GNU],
  290. [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
  291. [# I'd rather use --version here, but apparently some GNU lds only accept -v.
  292. case `$LD -v 2>&1 </dev/null` in
  293. *GNU* | *'with BFD'*)
  294. acl_cv_prog_gnu_ld=yes
  295. ;;
  296. *)
  297. acl_cv_prog_gnu_ld=no
  298. ;;
  299. esac])
  300. with_gnu_ld=$acl_cv_prog_gnu_ld
  301. ])
  302. dnl From libtool-2.4. Sets the variable LD.
  303. AC_DEFUN([AC_LIB_PROG_LD],
  304. [AC_REQUIRE([AC_PROG_CC])dnl
  305. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  306. AC_ARG_WITH([gnu-ld],
  307. [AS_HELP_STRING([--with-gnu-ld],
  308. [assume the C compiler uses GNU ld [default=no]])],
  309. [test "$withval" = no || with_gnu_ld=yes],
  310. [with_gnu_ld=no])dnl
  311. # Prepare PATH_SEPARATOR.
  312. # The user is always right.
  313. if test "${PATH_SEPARATOR+set}" != set; then
  314. # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
  315. # contains only /bin. Note that ksh looks also at the FPATH variable,
  316. # so we have to set that as well for the test.
  317. PATH_SEPARATOR=:
  318. (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
  319. && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
  320. || PATH_SEPARATOR=';'
  321. }
  322. fi
  323. ac_prog=ld
  324. if test "$GCC" = yes; then
  325. # Check if gcc -print-prog-name=ld gives a path.
  326. AC_MSG_CHECKING([for ld used by $CC])
  327. case $host in
  328. *-*-mingw*)
  329. # gcc leaves a trailing carriage return which upsets mingw
  330. ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  331. *)
  332. ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  333. esac
  334. case $ac_prog in
  335. # Accept absolute paths.
  336. [[\\/]]* | ?:[[\\/]]*)
  337. re_direlt='/[[^/]][[^/]]*/\.\./'
  338. # Canonicalize the pathname of ld
  339. ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
  340. while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
  341. ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
  342. done
  343. test -z "$LD" && LD="$ac_prog"
  344. ;;
  345. "")
  346. # If it fails, then pretend we aren't using GCC.
  347. ac_prog=ld
  348. ;;
  349. *)
  350. # If it is relative, then search for the first ld in PATH.
  351. with_gnu_ld=unknown
  352. ;;
  353. esac
  354. elif test "$with_gnu_ld" = yes; then
  355. AC_MSG_CHECKING([for GNU ld])
  356. else
  357. AC_MSG_CHECKING([for non-GNU ld])
  358. fi
  359. AC_CACHE_VAL([acl_cv_path_LD],
  360. [if test -z "$LD"; then
  361. acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  362. for ac_dir in $PATH; do
  363. IFS="$acl_save_ifs"
  364. test -z "$ac_dir" && ac_dir=.
  365. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  366. acl_cv_path_LD="$ac_dir/$ac_prog"
  367. # Check to see if the program is GNU ld. I'd rather use --version,
  368. # but apparently some variants of GNU ld only accept -v.
  369. # Break only if it was the GNU/non-GNU ld that we prefer.
  370. case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
  371. *GNU* | *'with BFD'*)
  372. test "$with_gnu_ld" != no && break
  373. ;;
  374. *)
  375. test "$with_gnu_ld" != yes && break
  376. ;;
  377. esac
  378. fi
  379. done
  380. IFS="$acl_save_ifs"
  381. else
  382. acl_cv_path_LD="$LD" # Let the user override the test with a path.
  383. fi])
  384. LD="$acl_cv_path_LD"
  385. if test -n "$LD"; then
  386. AC_MSG_RESULT([$LD])
  387. else
  388. AC_MSG_RESULT([no])
  389. fi
  390. test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  391. AC_LIB_PROG_LD_GNU
  392. ])
  393. # lib-link.m4 serial 26 (gettext-0.18.2)
  394. dnl Copyright (C) 2001-2016 Free Software Foundation, Inc.
  395. dnl This file is free software; the Free Software Foundation
  396. dnl gives unlimited permission to copy and/or distribute it,
  397. dnl with or without modifications, as long as this notice is preserved.
  398. dnl From Bruno Haible.
  399. AC_PREREQ([2.54])
  400. dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
  401. dnl the libraries corresponding to explicit and implicit dependencies.
  402. dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
  403. dnl augments the CPPFLAGS variable.
  404. dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
  405. dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
  406. AC_DEFUN([AC_LIB_LINKFLAGS],
  407. [
  408. AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
  409. AC_REQUIRE([AC_LIB_RPATH])
  410. pushdef([Name],[m4_translit([$1],[./+-], [____])])
  411. pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
  412. [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
  413. AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
  414. AC_LIB_LINKFLAGS_BODY([$1], [$2])
  415. ac_cv_lib[]Name[]_libs="$LIB[]NAME"
  416. ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
  417. ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
  418. ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
  419. ])
  420. LIB[]NAME="$ac_cv_lib[]Name[]_libs"
  421. LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
  422. INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
  423. LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
  424. AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
  425. AC_SUBST([LIB]NAME)
  426. AC_SUBST([LTLIB]NAME)
  427. AC_SUBST([LIB]NAME[_PREFIX])
  428. dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
  429. dnl results of this search when this library appears as a dependency.
  430. HAVE_LIB[]NAME=yes
  431. popdef([NAME])
  432. popdef([Name])
  433. ])
  434. dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
  435. dnl searches for libname and the libraries corresponding to explicit and
  436. dnl implicit dependencies, together with the specified include files and
  437. dnl the ability to compile and link the specified testcode. The missing-message
  438. dnl defaults to 'no' and may contain additional hints for the user.
  439. dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
  440. dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
  441. dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
  442. dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
  443. dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
  444. dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
  445. AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
  446. [
  447. AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
  448. AC_REQUIRE([AC_LIB_RPATH])
  449. pushdef([Name],[m4_translit([$1],[./+-], [____])])
  450. pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
  451. [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
  452. dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
  453. dnl accordingly.
  454. AC_LIB_LINKFLAGS_BODY([$1], [$2])
  455. dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
  456. dnl because if the user has installed lib[]Name and not disabled its use
  457. dnl via --without-lib[]Name-prefix, he wants to use it.
  458. ac_save_CPPFLAGS="$CPPFLAGS"
  459. AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
  460. AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
  461. ac_save_LIBS="$LIBS"
  462. dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
  463. dnl because these -l options might require -L options that are present in
  464. dnl LIBS. -l options benefit only from the -L options listed before it.
  465. dnl Otherwise, add it to the front of LIBS, because it may be a static
  466. dnl library that depends on another static library that is present in LIBS.
  467. dnl Static libraries benefit only from the static libraries listed after
  468. dnl it.
  469. case " $LIB[]NAME" in
  470. *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
  471. *) LIBS="$LIB[]NAME $LIBS" ;;
  472. esac
  473. AC_LINK_IFELSE(
  474. [AC_LANG_PROGRAM([[$3]], [[$4]])],
  475. [ac_cv_lib[]Name=yes],
  476. [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
  477. LIBS="$ac_save_LIBS"
  478. ])
  479. if test "$ac_cv_lib[]Name" = yes; then
  480. HAVE_LIB[]NAME=yes
  481. AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
  482. AC_MSG_CHECKING([how to link with lib[]$1])
  483. AC_MSG_RESULT([$LIB[]NAME])
  484. else
  485. HAVE_LIB[]NAME=no
  486. dnl If $LIB[]NAME didn't lead to a usable library, we don't need
  487. dnl $INC[]NAME either.
  488. CPPFLAGS="$ac_save_CPPFLAGS"
  489. LIB[]NAME=
  490. LTLIB[]NAME=
  491. LIB[]NAME[]_PREFIX=
  492. fi
  493. AC_SUBST([HAVE_LIB]NAME)
  494. AC_SUBST([LIB]NAME)
  495. AC_SUBST([LTLIB]NAME)
  496. AC_SUBST([LIB]NAME[_PREFIX])
  497. popdef([NAME])
  498. popdef([Name])
  499. ])
  500. dnl Determine the platform dependent parameters needed to use rpath:
  501. dnl acl_libext,
  502. dnl acl_shlibext,
  503. dnl acl_libname_spec,
  504. dnl acl_library_names_spec,
  505. dnl acl_hardcode_libdir_flag_spec,
  506. dnl acl_hardcode_libdir_separator,
  507. dnl acl_hardcode_direct,
  508. dnl acl_hardcode_minus_L.
  509. AC_DEFUN([AC_LIB_RPATH],
  510. [
  511. dnl Tell automake >= 1.10 to complain if config.rpath is missing.
  512. m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
  513. AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
  514. AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
  515. AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
  516. AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
  517. AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
  518. CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
  519. ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
  520. . ./conftest.sh
  521. rm -f ./conftest.sh
  522. acl_cv_rpath=done
  523. ])
  524. wl="$acl_cv_wl"
  525. acl_libext="$acl_cv_libext"
  526. acl_shlibext="$acl_cv_shlibext"
  527. acl_libname_spec="$acl_cv_libname_spec"
  528. acl_library_names_spec="$acl_cv_library_names_spec"
  529. acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
  530. acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
  531. acl_hardcode_direct="$acl_cv_hardcode_direct"
  532. acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
  533. dnl Determine whether the user wants rpath handling at all.
  534. AC_ARG_ENABLE([rpath],
  535. [ --disable-rpath do not hardcode runtime library paths],
  536. :, enable_rpath=yes)
  537. ])
  538. dnl AC_LIB_FROMPACKAGE(name, package)
  539. dnl declares that libname comes from the given package. The configure file
  540. dnl will then not have a --with-libname-prefix option but a
  541. dnl --with-package-prefix option. Several libraries can come from the same
  542. dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
  543. dnl macro call that searches for libname.
  544. AC_DEFUN([AC_LIB_FROMPACKAGE],
  545. [
  546. pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
  547. [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
  548. define([acl_frompackage_]NAME, [$2])
  549. popdef([NAME])
  550. pushdef([PACK],[$2])
  551. pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
  552. [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
  553. define([acl_libsinpackage_]PACKUP,
  554. m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1])
  555. popdef([PACKUP])
  556. popdef([PACK])
  557. ])
  558. dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
  559. dnl the libraries corresponding to explicit and implicit dependencies.
  560. dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
  561. dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
  562. dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
  563. AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
  564. [
  565. AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
  566. pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
  567. [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
  568. pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
  569. pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
  570. [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
  571. pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
  572. dnl Autoconf >= 2.61 supports dots in --with options.
  573. pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)])
  574. dnl By default, look in $includedir and $libdir.
  575. use_additional=yes
  576. AC_LIB_WITH_FINAL_PREFIX([
  577. eval additional_includedir=\"$includedir\"
  578. eval additional_libdir=\"$libdir\"
  579. ])
  580. AC_ARG_WITH(P_A_C_K[-prefix],
  581. [[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
  582. --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
  583. [
  584. if test "X$withval" = "Xno"; then
  585. use_additional=no
  586. else
  587. if test "X$withval" = "X"; then
  588. AC_LIB_WITH_FINAL_PREFIX([
  589. eval additional_includedir=\"$includedir\"
  590. eval additional_libdir=\"$libdir\"
  591. ])
  592. else
  593. additional_includedir="$withval/include"
  594. additional_libdir="$withval/$acl_libdirstem"
  595. if test "$acl_libdirstem2" != "$acl_libdirstem" \
  596. && ! test -d "$withval/$acl_libdirstem"; then
  597. additional_libdir="$withval/$acl_libdirstem2"
  598. fi
  599. fi
  600. fi
  601. ])
  602. dnl Search the library and its dependencies in $additional_libdir and
  603. dnl $LDFLAGS. Using breadth-first-seach.
  604. LIB[]NAME=
  605. LTLIB[]NAME=
  606. INC[]NAME=
  607. LIB[]NAME[]_PREFIX=
  608. dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
  609. dnl computed. So it has to be reset here.
  610. HAVE_LIB[]NAME=
  611. rpathdirs=
  612. ltrpathdirs=
  613. names_already_handled=
  614. names_next_round='$1 $2'
  615. while test -n "$names_next_round"; do
  616. names_this_round="$names_next_round"
  617. names_next_round=
  618. for name in $names_this_round; do
  619. already_handled=
  620. for n in $names_already_handled; do
  621. if test "$n" = "$name"; then
  622. already_handled=yes
  623. break
  624. fi
  625. done
  626. if test -z "$already_handled"; then
  627. names_already_handled="$names_already_handled $name"
  628. dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
  629. dnl or AC_LIB_HAVE_LINKFLAGS call.
  630. uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
  631. eval value=\"\$HAVE_LIB$uppername\"
  632. if test -n "$value"; then
  633. if test "$value" = yes; then
  634. eval value=\"\$LIB$uppername\"
  635. test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
  636. eval value=\"\$LTLIB$uppername\"
  637. test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
  638. else
  639. dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
  640. dnl that this library doesn't exist. So just drop it.
  641. :
  642. fi
  643. else
  644. dnl Search the library lib$name in $additional_libdir and $LDFLAGS
  645. dnl and the already constructed $LIBNAME/$LTLIBNAME.
  646. found_dir=
  647. found_la=
  648. found_so=
  649. found_a=
  650. eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
  651. if test -n "$acl_shlibext"; then
  652. shrext=".$acl_shlibext" # typically: shrext=.so
  653. else
  654. shrext=
  655. fi
  656. if test $use_additional = yes; then
  657. dir="$additional_libdir"
  658. dnl The same code as in the loop below:
  659. dnl First look for a shared library.
  660. if test -n "$acl_shlibext"; then
  661. if test -f "$dir/$libname$shrext"; then
  662. found_dir="$dir"
  663. found_so="$dir/$libname$shrext"
  664. else
  665. if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
  666. ver=`(cd "$dir" && \
  667. for f in "$libname$shrext".*; do echo "$f"; done \
  668. | sed -e "s,^$libname$shrext\\\\.,," \
  669. | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
  670. | sed 1q ) 2>/dev/null`
  671. if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
  672. found_dir="$dir"
  673. found_so="$dir/$libname$shrext.$ver"
  674. fi
  675. else
  676. eval library_names=\"$acl_library_names_spec\"
  677. for f in $library_names; do
  678. if test -f "$dir/$f"; then
  679. found_dir="$dir"
  680. found_so="$dir/$f"
  681. break
  682. fi
  683. done
  684. fi
  685. fi
  686. fi
  687. dnl Then look for a static library.
  688. if test "X$found_dir" = "X"; then
  689. if test -f "$dir/$libname.$acl_libext"; then
  690. found_dir="$dir"
  691. found_a="$dir/$libname.$acl_libext"
  692. fi
  693. fi
  694. if test "X$found_dir" != "X"; then
  695. if test -f "$dir/$libname.la"; then
  696. found_la="$dir/$libname.la"
  697. fi
  698. fi
  699. fi
  700. if test "X$found_dir" = "X"; then
  701. for x in $LDFLAGS $LTLIB[]NAME; do
  702. AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
  703. case "$x" in
  704. -L*)
  705. dir=`echo "X$x" | sed -e 's/^X-L//'`
  706. dnl First look for a shared library.
  707. if test -n "$acl_shlibext"; then
  708. if test -f "$dir/$libname$shrext"; then
  709. found_dir="$dir"
  710. found_so="$dir/$libname$shrext"
  711. else
  712. if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
  713. ver=`(cd "$dir" && \
  714. for f in "$libname$shrext".*; do echo "$f"; done \
  715. | sed -e "s,^$libname$shrext\\\\.,," \
  716. | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
  717. | sed 1q ) 2>/dev/null`
  718. if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
  719. found_dir="$dir"
  720. found_so="$dir/$libname$shrext.$ver"
  721. fi
  722. else
  723. eval library_names=\"$acl_library_names_spec\"
  724. for f in $library_names; do
  725. if test -f "$dir/$f"; then
  726. found_dir="$dir"
  727. found_so="$dir/$f"
  728. break
  729. fi
  730. done
  731. fi
  732. fi
  733. fi
  734. dnl Then look for a static library.
  735. if test "X$found_dir" = "X"; then
  736. if test -f "$dir/$libname.$acl_libext"; then
  737. found_dir="$dir"
  738. found_a="$dir/$libname.$acl_libext"
  739. fi
  740. fi
  741. if test "X$found_dir" != "X"; then
  742. if test -f "$dir/$libname.la"; then
  743. found_la="$dir/$libname.la"
  744. fi
  745. fi
  746. ;;
  747. esac
  748. if test "X$found_dir" != "X"; then
  749. break
  750. fi
  751. done
  752. fi
  753. if test "X$found_dir" != "X"; then
  754. dnl Found the library.
  755. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
  756. if test "X$found_so" != "X"; then
  757. dnl Linking with a shared library. We attempt to hardcode its
  758. dnl directory into the executable's runpath, unless it's the
  759. dnl standard /usr/lib.
  760. if test "$enable_rpath" = no \
  761. || test "X$found_dir" = "X/usr/$acl_libdirstem" \
  762. || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
  763. dnl No hardcoding is needed.
  764. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
  765. else
  766. dnl Use an explicit option to hardcode DIR into the resulting
  767. dnl binary.
  768. dnl Potentially add DIR to ltrpathdirs.
  769. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
  770. haveit=
  771. for x in $ltrpathdirs; do
  772. if test "X$x" = "X$found_dir"; then
  773. haveit=yes
  774. break
  775. fi
  776. done
  777. if test -z "$haveit"; then
  778. ltrpathdirs="$ltrpathdirs $found_dir"
  779. fi
  780. dnl The hardcoding into $LIBNAME is system dependent.
  781. if test "$acl_hardcode_direct" = yes; then
  782. dnl Using DIR/libNAME.so during linking hardcodes DIR into the
  783. dnl resulting binary.
  784. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
  785. else
  786. if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
  787. dnl Use an explicit option to hardcode DIR into the resulting
  788. dnl binary.
  789. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
  790. dnl Potentially add DIR to rpathdirs.
  791. dnl The rpathdirs will be appended to $LIBNAME at the end.
  792. haveit=
  793. for x in $rpathdirs; do
  794. if test "X$x" = "X$found_dir"; then
  795. haveit=yes
  796. break
  797. fi
  798. done
  799. if test -z "$haveit"; then
  800. rpathdirs="$rpathdirs $found_dir"
  801. fi
  802. else
  803. dnl Rely on "-L$found_dir".
  804. dnl But don't add it if it's already contained in the LDFLAGS
  805. dnl or the already constructed $LIBNAME
  806. haveit=
  807. for x in $LDFLAGS $LIB[]NAME; do
  808. AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
  809. if test "X$x" = "X-L$found_dir"; then
  810. haveit=yes
  811. break
  812. fi
  813. done
  814. if test -z "$haveit"; then
  815. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
  816. fi
  817. if test "$acl_hardcode_minus_L" != no; then
  818. dnl FIXME: Not sure whether we should use
  819. dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
  820. dnl here.
  821. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
  822. else
  823. dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
  824. dnl here, because this doesn't fit in flags passed to the
  825. dnl compiler. So give up. No hardcoding. This affects only
  826. dnl very old systems.
  827. dnl FIXME: Not sure whether we should use
  828. dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
  829. dnl here.
  830. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
  831. fi
  832. fi
  833. fi
  834. fi
  835. else
  836. if test "X$found_a" != "X"; then
  837. dnl Linking with a static library.
  838. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
  839. else
  840. dnl We shouldn't come here, but anyway it's good to have a
  841. dnl fallback.
  842. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
  843. fi
  844. fi
  845. dnl Assume the include files are nearby.
  846. additional_includedir=
  847. case "$found_dir" in
  848. */$acl_libdirstem | */$acl_libdirstem/)
  849. basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
  850. if test "$name" = '$1'; then
  851. LIB[]NAME[]_PREFIX="$basedir"
  852. fi
  853. additional_includedir="$basedir/include"
  854. ;;
  855. */$acl_libdirstem2 | */$acl_libdirstem2/)
  856. basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
  857. if test "$name" = '$1'; then
  858. LIB[]NAME[]_PREFIX="$basedir"
  859. fi
  860. additional_includedir="$basedir/include"
  861. ;;
  862. esac
  863. if test "X$additional_includedir" != "X"; then
  864. dnl Potentially add $additional_includedir to $INCNAME.
  865. dnl But don't add it
  866. dnl 1. if it's the standard /usr/include,
  867. dnl 2. if it's /usr/local/include and we are using GCC on Linux,
  868. dnl 3. if it's already present in $CPPFLAGS or the already
  869. dnl constructed $INCNAME,
  870. dnl 4. if it doesn't exist as a directory.
  871. if test "X$additional_includedir" != "X/usr/include"; then
  872. haveit=
  873. if test "X$additional_includedir" = "X/usr/local/include"; then
  874. if test -n "$GCC"; then
  875. case $host_os in
  876. linux* | gnu* | k*bsd*-gnu) haveit=yes;;
  877. esac
  878. fi
  879. fi
  880. if test -z "$haveit"; then
  881. for x in $CPPFLAGS $INC[]NAME; do
  882. AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
  883. if test "X$x" = "X-I$additional_includedir"; then
  884. haveit=yes
  885. break
  886. fi
  887. done
  888. if test -z "$haveit"; then
  889. if test -d "$additional_includedir"; then
  890. dnl Really add $additional_includedir to $INCNAME.
  891. INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
  892. fi
  893. fi
  894. fi
  895. fi
  896. fi
  897. dnl Look for dependencies.
  898. if test -n "$found_la"; then
  899. dnl Read the .la file. It defines the variables
  900. dnl dlname, library_names, old_library, dependency_libs, current,
  901. dnl age, revision, installed, dlopen, dlpreopen, libdir.
  902. save_libdir="$libdir"
  903. case "$found_la" in
  904. */* | *\\*) . "$found_la" ;;
  905. *) . "./$found_la" ;;
  906. esac
  907. libdir="$save_libdir"
  908. dnl We use only dependency_libs.
  909. for dep in $dependency_libs; do
  910. case "$dep" in
  911. -L*)
  912. additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
  913. dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
  914. dnl But don't add it
  915. dnl 1. if it's the standard /usr/lib,
  916. dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
  917. dnl 3. if it's already present in $LDFLAGS or the already
  918. dnl constructed $LIBNAME,
  919. dnl 4. if it doesn't exist as a directory.
  920. if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
  921. && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
  922. haveit=
  923. if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
  924. || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
  925. if test -n "$GCC"; then
  926. case $host_os in
  927. linux* | gnu* | k*bsd*-gnu) haveit=yes;;
  928. esac
  929. fi
  930. fi
  931. if test -z "$haveit"; then
  932. haveit=
  933. for x in $LDFLAGS $LIB[]NAME; do
  934. AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
  935. if test "X$x" = "X-L$additional_libdir"; then
  936. haveit=yes
  937. break
  938. fi
  939. done
  940. if test -z "$haveit"; then
  941. if test -d "$additional_libdir"; then
  942. dnl Really add $additional_libdir to $LIBNAME.
  943. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
  944. fi
  945. fi
  946. haveit=
  947. for x in $LDFLAGS $LTLIB[]NAME; do
  948. AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
  949. if test "X$x" = "X-L$additional_libdir"; then
  950. haveit=yes
  951. break
  952. fi
  953. done
  954. if test -z "$haveit"; then
  955. if test -d "$additional_libdir"; then
  956. dnl Really add $additional_libdir to $LTLIBNAME.
  957. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
  958. fi
  959. fi
  960. fi
  961. fi
  962. ;;
  963. -R*)
  964. dir=`echo "X$dep" | sed -e 's/^X-R//'`
  965. if test "$enable_rpath" != no; then
  966. dnl Potentially add DIR to rpathdirs.
  967. dnl The rpathdirs will be appended to $LIBNAME at the end.
  968. haveit=
  969. for x in $rpathdirs; do
  970. if test "X$x" = "X$dir"; then
  971. haveit=yes
  972. break
  973. fi
  974. done
  975. if test -z "$haveit"; then
  976. rpathdirs="$rpathdirs $dir"
  977. fi
  978. dnl Potentially add DIR to ltrpathdirs.
  979. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
  980. haveit=
  981. for x in $ltrpathdirs; do
  982. if test "X$x" = "X$dir"; then
  983. haveit=yes
  984. break
  985. fi
  986. done
  987. if test -z "$haveit"; then
  988. ltrpathdirs="$ltrpathdirs $dir"
  989. fi
  990. fi
  991. ;;
  992. -l*)
  993. dnl Handle this in the next round.
  994. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
  995. ;;
  996. *.la)
  997. dnl Handle this in the next round. Throw away the .la's
  998. dnl directory; it is already contained in a preceding -L
  999. dnl option.
  1000. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
  1001. ;;
  1002. *)
  1003. dnl Most likely an immediate library name.
  1004. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
  1005. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
  1006. ;;
  1007. esac
  1008. done
  1009. fi
  1010. else
  1011. dnl Didn't find the library; assume it is in the system directories
  1012. dnl known to the linker and runtime loader. (All the system
  1013. dnl directories known to the linker should also be known to the
  1014. dnl runtime loader, otherwise the system is severely misconfigured.)
  1015. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
  1016. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
  1017. fi
  1018. fi
  1019. fi
  1020. done
  1021. done
  1022. if test "X$rpathdirs" != "X"; then
  1023. if test -n "$acl_hardcode_libdir_separator"; then
  1024. dnl Weird platform: only the last -rpath option counts, the user must
  1025. dnl pass all path elements in one option. We can arrange that for a
  1026. dnl single library, but not when more than one $LIBNAMEs are used.
  1027. alldirs=
  1028. for found_dir in $rpathdirs; do
  1029. alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
  1030. done
  1031. dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
  1032. acl_save_libdir="$libdir"
  1033. libdir="$alldirs"
  1034. eval flag=\"$acl_hardcode_libdir_flag_spec\"
  1035. libdir="$acl_save_libdir"
  1036. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
  1037. else
  1038. dnl The -rpath options are cumulative.
  1039. for found_dir in $rpathdirs; do
  1040. acl_save_libdir="$libdir"
  1041. libdir="$found_dir"
  1042. eval flag=\"$acl_hardcode_libdir_flag_spec\"
  1043. libdir="$acl_save_libdir"
  1044. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
  1045. done
  1046. fi
  1047. fi
  1048. if test "X$ltrpathdirs" != "X"; then
  1049. dnl When using libtool, the option that works for both libraries and
  1050. dnl executables is -R. The -R options are cumulative.
  1051. for found_dir in $ltrpathdirs; do
  1052. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
  1053. done
  1054. fi
  1055. popdef([P_A_C_K])
  1056. popdef([PACKLIBS])
  1057. popdef([PACKUP])
  1058. popdef([PACK])
  1059. popdef([NAME])
  1060. ])
  1061. dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
  1062. dnl unless already present in VAR.
  1063. dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
  1064. dnl contains two or three consecutive elements that belong together.
  1065. AC_DEFUN([AC_LIB_APPENDTOVAR],
  1066. [
  1067. for element in [$2]; do
  1068. haveit=
  1069. for x in $[$1]; do
  1070. AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
  1071. if test "X$x" = "X$element"; then
  1072. haveit=yes
  1073. break
  1074. fi
  1075. done
  1076. if test -z "$haveit"; then
  1077. [$1]="${[$1]}${[$1]:+ }$element"
  1078. fi
  1079. done
  1080. ])
  1081. dnl For those cases where a variable contains several -L and -l options
  1082. dnl referring to unknown libraries and directories, this macro determines the
  1083. dnl necessary additional linker options for the runtime path.
  1084. dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
  1085. dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
  1086. dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
  1087. dnl otherwise linking without libtool is assumed.
  1088. AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
  1089. [
  1090. AC_REQUIRE([AC_LIB_RPATH])
  1091. AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
  1092. $1=
  1093. if test "$enable_rpath" != no; then
  1094. if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
  1095. dnl Use an explicit option to hardcode directories into the resulting
  1096. dnl binary.
  1097. rpathdirs=
  1098. next=
  1099. for opt in $2; do
  1100. if test -n "$next"; then
  1101. dir="$next"
  1102. dnl No need to hardcode the standard /usr/lib.
  1103. if test "X$dir" != "X/usr/$acl_libdirstem" \
  1104. && test "X$dir" != "X/usr/$acl_libdirstem2"; then
  1105. rpathdirs="$rpathdirs $dir"
  1106. fi
  1107. next=
  1108. else
  1109. case $opt in
  1110. -L) next=yes ;;
  1111. -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
  1112. dnl No need to hardcode the standard /usr/lib.
  1113. if test "X$dir" != "X/usr/$acl_libdirstem" \
  1114. && test "X$dir" != "X/usr/$acl_libdirstem2"; then
  1115. rpathdirs="$rpathdirs $dir"
  1116. fi
  1117. next= ;;
  1118. *) next= ;;
  1119. esac
  1120. fi
  1121. done
  1122. if test "X$rpathdirs" != "X"; then
  1123. if test -n ""$3""; then
  1124. dnl libtool is used for linking. Use -R options.
  1125. for dir in $rpathdirs; do
  1126. $1="${$1}${$1:+ }-R$dir"
  1127. done
  1128. else
  1129. dnl The linker is used for linking directly.
  1130. if test -n "$acl_hardcode_libdir_separator"; then
  1131. dnl Weird platform: only the last -rpath option counts, the user
  1132. dnl must pass all path elements in one option.
  1133. alldirs=
  1134. for dir in $rpathdirs; do
  1135. alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
  1136. done
  1137. acl_save_libdir="$libdir"
  1138. libdir="$alldirs"
  1139. eval flag=\"$acl_hardcode_libdir_flag_spec\"
  1140. libdir="$acl_save_libdir"
  1141. $1="$flag"
  1142. else
  1143. dnl The -rpath options are cumulative.
  1144. for dir in $rpathdirs; do
  1145. acl_save_libdir="$libdir"
  1146. libdir="$dir"
  1147. eval flag=\"$acl_hardcode_libdir_flag_spec\"
  1148. libdir="$acl_save_libdir"
  1149. $1="${$1}${$1:+ }$flag"
  1150. done
  1151. fi
  1152. fi
  1153. fi
  1154. fi
  1155. fi
  1156. AC_SUBST([$1])
  1157. ])
  1158. # lib-prefix.m4 serial 7 (gettext-0.18)
  1159. dnl Copyright (C) 2001-2005, 2008-2016 Free Software Foundation, Inc.
  1160. dnl This file is free software; the Free Software Foundation
  1161. dnl gives unlimited permission to copy and/or distribute it,
  1162. dnl with or without modifications, as long as this notice is preserved.
  1163. dnl From Bruno Haible.
  1164. dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
  1165. dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
  1166. dnl require excessive bracketing.
  1167. ifdef([AC_HELP_STRING],
  1168. [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
  1169. [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
  1170. dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
  1171. dnl to access previously installed libraries. The basic assumption is that
  1172. dnl a user will want packages to use other packages he previously installed
  1173. dnl with the same --prefix option.
  1174. dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
  1175. dnl libraries, but is otherwise very convenient.
  1176. AC_DEFUN([AC_LIB_PREFIX],
  1177. [
  1178. AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
  1179. AC_REQUIRE([AC_PROG_CC])
  1180. AC_REQUIRE([AC_CANONICAL_HOST])
  1181. AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
  1182. AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
  1183. dnl By default, look in $includedir and $libdir.
  1184. use_additional=yes
  1185. AC_LIB_WITH_FINAL_PREFIX([
  1186. eval additional_includedir=\"$includedir\"
  1187. eval additional_libdir=\"$libdir\"
  1188. ])
  1189. AC_LIB_ARG_WITH([lib-prefix],
  1190. [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
  1191. --without-lib-prefix don't search for libraries in includedir and libdir],
  1192. [
  1193. if test "X$withval" = "Xno"; then
  1194. use_additional=no
  1195. else
  1196. if test "X$withval" = "X"; then
  1197. AC_LIB_WITH_FINAL_PREFIX([
  1198. eval additional_includedir=\"$includedir\"
  1199. eval additional_libdir=\"$libdir\"
  1200. ])
  1201. else
  1202. additional_includedir="$withval/include"
  1203. additional_libdir="$withval/$acl_libdirstem"
  1204. fi
  1205. fi
  1206. ])
  1207. if test $use_additional = yes; then
  1208. dnl Potentially add $additional_includedir to $CPPFLAGS.
  1209. dnl But don't add it
  1210. dnl 1. if it's the standard /usr/include,
  1211. dnl 2. if it's already present in $CPPFLAGS,
  1212. dnl 3. if it's /usr/local/include and we are using GCC on Linux,
  1213. dnl 4. if it doesn't exist as a directory.
  1214. if test "X$additional_includedir" != "X/usr/include"; then
  1215. haveit=
  1216. for x in $CPPFLAGS; do
  1217. AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
  1218. if test "X$x" = "X-I$additional_includedir"; then
  1219. haveit=yes
  1220. break
  1221. fi
  1222. done
  1223. if test -z "$haveit"; then
  1224. if test "X$additional_includedir" = "X/usr/local/include"; then
  1225. if test -n "$GCC"; then
  1226. case $host_os in
  1227. linux* | gnu* | k*bsd*-gnu) haveit=yes;;
  1228. esac
  1229. fi
  1230. fi
  1231. if test -z "$haveit"; then
  1232. if test -d "$additional_includedir"; then
  1233. dnl Really add $additional_includedir to $CPPFLAGS.
  1234. CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
  1235. fi
  1236. fi
  1237. fi
  1238. fi
  1239. dnl Potentially add $additional_libdir to $LDFLAGS.
  1240. dnl But don't add it
  1241. dnl 1. if it's the standard /usr/lib,
  1242. dnl 2. if it's already present in $LDFLAGS,
  1243. dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
  1244. dnl 4. if it doesn't exist as a directory.
  1245. if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
  1246. haveit=
  1247. for x in $LDFLAGS; do
  1248. AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
  1249. if test "X$x" = "X-L$additional_libdir"; then
  1250. haveit=yes
  1251. break
  1252. fi
  1253. done
  1254. if test -z "$haveit"; then
  1255. if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
  1256. if test -n "$GCC"; then
  1257. case $host_os in
  1258. linux*) haveit=yes;;
  1259. esac
  1260. fi
  1261. fi
  1262. if test -z "$haveit"; then
  1263. if test -d "$additional_libdir"; then
  1264. dnl Really add $additional_libdir to $LDFLAGS.
  1265. LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
  1266. fi
  1267. fi
  1268. fi
  1269. fi
  1270. fi
  1271. ])
  1272. dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
  1273. dnl acl_final_exec_prefix, containing the values to which $prefix and
  1274. dnl $exec_prefix will expand at the end of the configure script.
  1275. AC_DEFUN([AC_LIB_PREPARE_PREFIX],
  1276. [
  1277. dnl Unfortunately, prefix and exec_prefix get only finally determined
  1278. dnl at the end of configure.
  1279. if test "X$prefix" = "XNONE"; then
  1280. acl_final_prefix="$ac_default_prefix"
  1281. else
  1282. acl_final_prefix="$prefix"
  1283. fi
  1284. if test "X$exec_prefix" = "XNONE"; then
  1285. acl_final_exec_prefix='${prefix}'
  1286. else
  1287. acl_final_exec_prefix="$exec_prefix"
  1288. fi
  1289. acl_save_prefix="$prefix"
  1290. prefix="$acl_final_prefix"
  1291. eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
  1292. prefix="$acl_save_prefix"
  1293. ])
  1294. dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
  1295. dnl variables prefix and exec_prefix bound to the values they will have
  1296. dnl at the end of the configure script.
  1297. AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
  1298. [
  1299. acl_save_prefix="$prefix"
  1300. prefix="$acl_final_prefix"
  1301. acl_save_exec_prefix="$exec_prefix"
  1302. exec_prefix="$acl_final_exec_prefix"
  1303. $1
  1304. exec_prefix="$acl_save_exec_prefix"
  1305. prefix="$acl_save_prefix"
  1306. ])
  1307. dnl AC_LIB_PREPARE_MULTILIB creates
  1308. dnl - a variable acl_libdirstem, containing the basename of the libdir, either
  1309. dnl "lib" or "lib64" or "lib/64",
  1310. dnl - a variable acl_libdirstem2, as a secondary possible value for
  1311. dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
  1312. dnl "lib/amd64".
  1313. AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
  1314. [
  1315. dnl There is no formal standard regarding lib and lib64.
  1316. dnl On glibc systems, the current practice is that on a system supporting
  1317. dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
  1318. dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
  1319. dnl the compiler's default mode by looking at the compiler's library search
  1320. dnl path. If at least one of its elements ends in /lib64 or points to a
  1321. dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
  1322. dnl Otherwise we use the default, namely "lib".
  1323. dnl On Solaris systems, the current practice is that on a system supporting
  1324. dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
  1325. dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
  1326. dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
  1327. AC_REQUIRE([AC_CANONICAL_HOST])
  1328. acl_libdirstem=lib
  1329. acl_libdirstem2=
  1330. case "$host_os" in
  1331. solaris*)
  1332. dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
  1333. dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
  1334. dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
  1335. dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
  1336. dnl symlink is missing, so we set acl_libdirstem2 too.
  1337. AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
  1338. [AC_EGREP_CPP([sixtyfour bits], [
  1339. #ifdef _LP64
  1340. sixtyfour bits
  1341. #endif
  1342. ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
  1343. ])
  1344. if test $gl_cv_solaris_64bit = yes; then
  1345. acl_libdirstem=lib/64
  1346. case "$host_cpu" in
  1347. sparc*) acl_libdirstem2=lib/sparcv9 ;;
  1348. i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
  1349. esac
  1350. fi
  1351. ;;
  1352. *)
  1353. searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
  1354. if test -n "$searchpath"; then
  1355. acl_save_IFS="${IFS= }"; IFS=":"
  1356. for searchdir in $searchpath; do
  1357. if test -d "$searchdir"; then
  1358. case "$searchdir" in
  1359. */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
  1360. */../ | */.. )
  1361. # Better ignore directories of this form. They are misleading.
  1362. ;;
  1363. *) searchdir=`cd "$searchdir" && pwd`
  1364. case "$searchdir" in
  1365. */lib64 ) acl_libdirstem=lib64 ;;
  1366. esac ;;
  1367. esac
  1368. fi
  1369. done
  1370. IFS="$acl_save_IFS"
  1371. fi
  1372. ;;
  1373. esac
  1374. test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
  1375. ])
  1376. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
  1377. #
  1378. # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
  1379. # Written by Gordon Matzigkeit, 1996
  1380. #
  1381. # This file is free software; the Free Software Foundation gives
  1382. # unlimited permission to copy and/or distribute it, with or without
  1383. # modifications, as long as this notice is preserved.
  1384. m4_define([_LT_COPYING], [dnl
  1385. # Copyright (C) 2014 Free Software Foundation, Inc.
  1386. # This is free software; see the source for copying conditions. There is NO
  1387. # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  1388. # GNU Libtool is free software; you can redistribute it and/or modify
  1389. # it under the terms of the GNU General Public License as published by
  1390. # the Free Software Foundation; either version 2 of of the License, or
  1391. # (at your option) any later version.
  1392. #
  1393. # As a special exception to the GNU General Public License, if you
  1394. # distribute this file as part of a program or library that is built
  1395. # using GNU Libtool, you may include this file under the same
  1396. # distribution terms that you use for the rest of that program.
  1397. #
  1398. # GNU Libtool is distributed in the hope that it will be useful, but
  1399. # WITHOUT ANY WARRANTY; without even the implied warranty of
  1400. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  1401. # GNU General Public License for more details.
  1402. #
  1403. # You should have received a copy of the GNU General Public License
  1404. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  1405. ])
  1406. # serial 58 LT_INIT
  1407. # LT_PREREQ(VERSION)
  1408. # ------------------
  1409. # Complain and exit if this libtool version is less that VERSION.
  1410. m4_defun([LT_PREREQ],
  1411. [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
  1412. [m4_default([$3],
  1413. [m4_fatal([Libtool version $1 or higher is required],
  1414. 63)])],
  1415. [$2])])
  1416. # _LT_CHECK_BUILDDIR
  1417. # ------------------
  1418. # Complain if the absolute build directory name contains unusual characters
  1419. m4_defun([_LT_CHECK_BUILDDIR],
  1420. [case `pwd` in
  1421. *\ * | *\ *)
  1422. AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
  1423. esac
  1424. ])
  1425. # LT_INIT([OPTIONS])
  1426. # ------------------
  1427. AC_DEFUN([LT_INIT],
  1428. [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
  1429. AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  1430. AC_BEFORE([$0], [LT_LANG])dnl
  1431. AC_BEFORE([$0], [LT_OUTPUT])dnl
  1432. AC_BEFORE([$0], [LTDL_INIT])dnl
  1433. m4_require([_LT_CHECK_BUILDDIR])dnl
  1434. dnl Autoconf doesn't catch unexpanded LT_ macros by default:
  1435. m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
  1436. m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
  1437. dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
  1438. dnl unless we require an AC_DEFUNed macro:
  1439. AC_REQUIRE([LTOPTIONS_VERSION])dnl
  1440. AC_REQUIRE([LTSUGAR_VERSION])dnl
  1441. AC_REQUIRE([LTVERSION_VERSION])dnl
  1442. AC_REQUIRE([LTOBSOLETE_VERSION])dnl
  1443. m4_require([_LT_PROG_LTMAIN])dnl
  1444. _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
  1445. dnl Parse OPTIONS
  1446. _LT_SET_OPTIONS([$0], [$1])
  1447. # This can be used to rebuild libtool when needed
  1448. LIBTOOL_DEPS=$ltmain
  1449. # Always use our own libtool.
  1450. LIBTOOL='$(SHELL) $(top_builddir)/libtool'
  1451. AC_SUBST(LIBTOOL)dnl
  1452. _LT_SETUP
  1453. # Only expand once:
  1454. m4_define([LT_INIT])
  1455. ])# LT_INIT
  1456. # Old names:
  1457. AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
  1458. AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
  1459. dnl aclocal-1.4 backwards compatibility:
  1460. dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
  1461. dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
  1462. # _LT_PREPARE_CC_BASENAME
  1463. # -----------------------
  1464. m4_defun([_LT_PREPARE_CC_BASENAME], [
  1465. # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
  1466. func_cc_basename ()
  1467. {
  1468. for cc_temp in @S|@*""; do
  1469. case $cc_temp in
  1470. compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
  1471. distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
  1472. \-*) ;;
  1473. *) break;;
  1474. esac
  1475. done
  1476. func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
  1477. }
  1478. ])# _LT_PREPARE_CC_BASENAME
  1479. # _LT_CC_BASENAME(CC)
  1480. # -------------------
  1481. # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
  1482. # but that macro is also expanded into generated libtool script, which
  1483. # arranges for $SED and $ECHO to be set by different means.
  1484. m4_defun([_LT_CC_BASENAME],
  1485. [m4_require([_LT_PREPARE_CC_BASENAME])dnl
  1486. AC_REQUIRE([_LT_DECL_SED])dnl
  1487. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
  1488. func_cc_basename $1
  1489. cc_basename=$func_cc_basename_result
  1490. ])
  1491. # _LT_FILEUTILS_DEFAULTS
  1492. # ----------------------
  1493. # It is okay to use these file commands and assume they have been set
  1494. # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
  1495. m4_defun([_LT_FILEUTILS_DEFAULTS],
  1496. [: ${CP="cp -f"}
  1497. : ${MV="mv -f"}
  1498. : ${RM="rm -f"}
  1499. ])# _LT_FILEUTILS_DEFAULTS
  1500. # _LT_SETUP
  1501. # ---------
  1502. m4_defun([_LT_SETUP],
  1503. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  1504. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  1505. AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
  1506. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
  1507. _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
  1508. dnl
  1509. _LT_DECL([], [host_alias], [0], [The host system])dnl
  1510. _LT_DECL([], [host], [0])dnl
  1511. _LT_DECL([], [host_os], [0])dnl
  1512. dnl
  1513. _LT_DECL([], [build_alias], [0], [The build system])dnl
  1514. _LT_DECL([], [build], [0])dnl
  1515. _LT_DECL([], [build_os], [0])dnl
  1516. dnl
  1517. AC_REQUIRE([AC_PROG_CC])dnl
  1518. AC_REQUIRE([LT_PATH_LD])dnl
  1519. AC_REQUIRE([LT_PATH_NM])dnl
  1520. dnl
  1521. AC_REQUIRE([AC_PROG_LN_S])dnl
  1522. test -z "$LN_S" && LN_S="ln -s"
  1523. _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
  1524. dnl
  1525. AC_REQUIRE([LT_CMD_MAX_LEN])dnl
  1526. _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
  1527. _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
  1528. dnl
  1529. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1530. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  1531. m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
  1532. m4_require([_LT_CMD_RELOAD])dnl
  1533. m4_require([_LT_CHECK_MAGIC_METHOD])dnl
  1534. m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
  1535. m4_require([_LT_CMD_OLD_ARCHIVE])dnl
  1536. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  1537. m4_require([_LT_WITH_SYSROOT])dnl
  1538. m4_require([_LT_CMD_TRUNCATE])dnl
  1539. _LT_CONFIG_LIBTOOL_INIT([
  1540. # See if we are running on zsh, and set the options that allow our
  1541. # commands through without removal of \ escapes INIT.
  1542. if test -n "\${ZSH_VERSION+set}"; then
  1543. setopt NO_GLOB_SUBST
  1544. fi
  1545. ])
  1546. if test -n "${ZSH_VERSION+set}"; then
  1547. setopt NO_GLOB_SUBST
  1548. fi
  1549. _LT_CHECK_OBJDIR
  1550. m4_require([_LT_TAG_COMPILER])dnl
  1551. case $host_os in
  1552. aix3*)
  1553. # AIX sometimes has problems with the GCC collect2 program. For some
  1554. # reason, if we set the COLLECT_NAMES environment variable, the problems
  1555. # vanish in a puff of smoke.
  1556. if test set != "${COLLECT_NAMES+set}"; then
  1557. COLLECT_NAMES=
  1558. export COLLECT_NAMES
  1559. fi
  1560. ;;
  1561. esac
  1562. # Global variables:
  1563. ofile=libtool
  1564. can_build_shared=yes
  1565. # All known linkers require a '.a' archive for static linking (except MSVC,
  1566. # which needs '.lib').
  1567. libext=a
  1568. with_gnu_ld=$lt_cv_prog_gnu_ld
  1569. old_CC=$CC
  1570. old_CFLAGS=$CFLAGS
  1571. # Set sane defaults for various variables
  1572. test -z "$CC" && CC=cc
  1573. test -z "$LTCC" && LTCC=$CC
  1574. test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
  1575. test -z "$LD" && LD=ld
  1576. test -z "$ac_objext" && ac_objext=o
  1577. _LT_CC_BASENAME([$compiler])
  1578. # Only perform the check for file, if the check method requires it
  1579. test -z "$MAGIC_CMD" && MAGIC_CMD=file
  1580. case $deplibs_check_method in
  1581. file_magic*)
  1582. if test "$file_magic_cmd" = '$MAGIC_CMD'; then
  1583. _LT_PATH_MAGIC
  1584. fi
  1585. ;;
  1586. esac
  1587. # Use C for the default configuration in the libtool script
  1588. LT_SUPPORTED_TAG([CC])
  1589. _LT_LANG_C_CONFIG
  1590. _LT_LANG_DEFAULT_CONFIG
  1591. _LT_CONFIG_COMMANDS
  1592. ])# _LT_SETUP
  1593. # _LT_PREPARE_SED_QUOTE_VARS
  1594. # --------------------------
  1595. # Define a few sed substitution that help us do robust quoting.
  1596. m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
  1597. [# Backslashify metacharacters that are still active within
  1598. # double-quoted strings.
  1599. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
  1600. # Same as above, but do not quote variable references.
  1601. double_quote_subst='s/\([["`\\]]\)/\\\1/g'
  1602. # Sed substitution to delay expansion of an escaped shell variable in a
  1603. # double_quote_subst'ed string.
  1604. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
  1605. # Sed substitution to delay expansion of an escaped single quote.
  1606. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
  1607. # Sed substitution to avoid accidental globbing in evaled expressions
  1608. no_glob_subst='s/\*/\\\*/g'
  1609. ])
  1610. # _LT_PROG_LTMAIN
  1611. # ---------------
  1612. # Note that this code is called both from 'configure', and 'config.status'
  1613. # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
  1614. # 'config.status' has no value for ac_aux_dir unless we are using Automake,
  1615. # so we pass a copy along to make sure it has a sensible value anyway.
  1616. m4_defun([_LT_PROG_LTMAIN],
  1617. [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
  1618. _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
  1619. ltmain=$ac_aux_dir/ltmain.sh
  1620. ])# _LT_PROG_LTMAIN
  1621. # So that we can recreate a full libtool script including additional
  1622. # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
  1623. # in macros and then make a single call at the end using the 'libtool'
  1624. # label.
  1625. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
  1626. # ----------------------------------------
  1627. # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  1628. m4_define([_LT_CONFIG_LIBTOOL_INIT],
  1629. [m4_ifval([$1],
  1630. [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
  1631. [$1
  1632. ])])])
  1633. # Initialize.
  1634. m4_define([_LT_OUTPUT_LIBTOOL_INIT])
  1635. # _LT_CONFIG_LIBTOOL([COMMANDS])
  1636. # ------------------------------
  1637. # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  1638. m4_define([_LT_CONFIG_LIBTOOL],
  1639. [m4_ifval([$1],
  1640. [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
  1641. [$1
  1642. ])])])
  1643. # Initialize.
  1644. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
  1645. # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
  1646. # -----------------------------------------------------
  1647. m4_defun([_LT_CONFIG_SAVE_COMMANDS],
  1648. [_LT_CONFIG_LIBTOOL([$1])
  1649. _LT_CONFIG_LIBTOOL_INIT([$2])
  1650. ])
  1651. # _LT_FORMAT_COMMENT([COMMENT])
  1652. # -----------------------------
  1653. # Add leading comment marks to the start of each line, and a trailing
  1654. # full-stop to the whole comment if one is not present already.
  1655. m4_define([_LT_FORMAT_COMMENT],
  1656. [m4_ifval([$1], [
  1657. m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
  1658. [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
  1659. )])
  1660. # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
  1661. # -------------------------------------------------------------------
  1662. # CONFIGNAME is the name given to the value in the libtool script.
  1663. # VARNAME is the (base) name used in the configure script.
  1664. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
  1665. # VARNAME. Any other value will be used directly.
  1666. m4_define([_LT_DECL],
  1667. [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
  1668. [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
  1669. [m4_ifval([$1], [$1], [$2])])
  1670. lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
  1671. m4_ifval([$4],
  1672. [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
  1673. lt_dict_add_subkey([lt_decl_dict], [$2],
  1674. [tagged?], [m4_ifval([$5], [yes], [no])])])
  1675. ])
  1676. # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
  1677. # --------------------------------------------------------
  1678. m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
  1679. # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
  1680. # ------------------------------------------------
  1681. m4_define([lt_decl_tag_varnames],
  1682. [_lt_decl_filter([tagged?], [yes], $@)])
  1683. # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
  1684. # ---------------------------------------------------------
  1685. m4_define([_lt_decl_filter],
  1686. [m4_case([$#],
  1687. [0], [m4_fatal([$0: too few arguments: $#])],
  1688. [1], [m4_fatal([$0: too few arguments: $#: $1])],
  1689. [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
  1690. [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
  1691. [lt_dict_filter([lt_decl_dict], $@)])[]dnl
  1692. ])
  1693. # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
  1694. # --------------------------------------------------
  1695. m4_define([lt_decl_quote_varnames],
  1696. [_lt_decl_filter([value], [1], $@)])
  1697. # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
  1698. # ---------------------------------------------------
  1699. m4_define([lt_decl_dquote_varnames],
  1700. [_lt_decl_filter([value], [2], $@)])
  1701. # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
  1702. # ---------------------------------------------------
  1703. m4_define([lt_decl_varnames_tagged],
  1704. [m4_assert([$# <= 2])dnl
  1705. _$0(m4_quote(m4_default([$1], [[, ]])),
  1706. m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
  1707. m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
  1708. m4_define([_lt_decl_varnames_tagged],
  1709. [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
  1710. # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
  1711. # ------------------------------------------------
  1712. m4_define([lt_decl_all_varnames],
  1713. [_$0(m4_quote(m4_default([$1], [[, ]])),
  1714. m4_if([$2], [],
  1715. m4_quote(lt_decl_varnames),
  1716. m4_quote(m4_shift($@))))[]dnl
  1717. ])
  1718. m4_define([_lt_decl_all_varnames],
  1719. [lt_join($@, lt_decl_varnames_tagged([$1],
  1720. lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
  1721. ])
  1722. # _LT_CONFIG_STATUS_DECLARE([VARNAME])
  1723. # ------------------------------------
  1724. # Quote a variable value, and forward it to 'config.status' so that its
  1725. # declaration there will have the same value as in 'configure'. VARNAME
  1726. # must have a single quote delimited value for this to work.
  1727. m4_define([_LT_CONFIG_STATUS_DECLARE],
  1728. [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
  1729. # _LT_CONFIG_STATUS_DECLARATIONS
  1730. # ------------------------------
  1731. # We delimit libtool config variables with single quotes, so when
  1732. # we write them to config.status, we have to be sure to quote all
  1733. # embedded single quotes properly. In configure, this macro expands
  1734. # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
  1735. #
  1736. # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
  1737. m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
  1738. [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
  1739. [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
  1740. # _LT_LIBTOOL_TAGS
  1741. # ----------------
  1742. # Output comment and list of tags supported by the script
  1743. m4_defun([_LT_LIBTOOL_TAGS],
  1744. [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
  1745. available_tags='_LT_TAGS'dnl
  1746. ])
  1747. # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
  1748. # -----------------------------------
  1749. # Extract the dictionary values for VARNAME (optionally with TAG) and
  1750. # expand to a commented shell variable setting:
  1751. #
  1752. # # Some comment about what VAR is for.
  1753. # visible_name=$lt_internal_name
  1754. m4_define([_LT_LIBTOOL_DECLARE],
  1755. [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
  1756. [description])))[]dnl
  1757. m4_pushdef([_libtool_name],
  1758. m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
  1759. m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
  1760. [0], [_libtool_name=[$]$1],
  1761. [1], [_libtool_name=$lt_[]$1],
  1762. [2], [_libtool_name=$lt_[]$1],
  1763. [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
  1764. m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
  1765. ])
  1766. # _LT_LIBTOOL_CONFIG_VARS
  1767. # -----------------------
  1768. # Produce commented declarations of non-tagged libtool config variables
  1769. # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
  1770. # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
  1771. # section) are produced by _LT_LIBTOOL_TAG_VARS.
  1772. m4_defun([_LT_LIBTOOL_CONFIG_VARS],
  1773. [m4_foreach([_lt_var],
  1774. m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
  1775. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
  1776. # _LT_LIBTOOL_TAG_VARS(TAG)
  1777. # -------------------------
  1778. m4_define([_LT_LIBTOOL_TAG_VARS],
  1779. [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
  1780. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
  1781. # _LT_TAGVAR(VARNAME, [TAGNAME])
  1782. # ------------------------------
  1783. m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
  1784. # _LT_CONFIG_COMMANDS
  1785. # -------------------
  1786. # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
  1787. # variables for single and double quote escaping we saved from calls
  1788. # to _LT_DECL, we can put quote escaped variables declarations
  1789. # into 'config.status', and then the shell code to quote escape them in
  1790. # for loops in 'config.status'. Finally, any additional code accumulated
  1791. # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
  1792. m4_defun([_LT_CONFIG_COMMANDS],
  1793. [AC_PROVIDE_IFELSE([LT_OUTPUT],
  1794. dnl If the libtool generation code has been placed in $CONFIG_LT,
  1795. dnl instead of duplicating it all over again into config.status,
  1796. dnl then we will have config.status run $CONFIG_LT later, so it
  1797. dnl needs to know what name is stored there:
  1798. [AC_CONFIG_COMMANDS([libtool],
  1799. [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
  1800. dnl If the libtool generation code is destined for config.status,
  1801. dnl expand the accumulated commands and init code now:
  1802. [AC_CONFIG_COMMANDS([libtool],
  1803. [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
  1804. ])#_LT_CONFIG_COMMANDS
  1805. # Initialize.
  1806. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
  1807. [
  1808. # The HP-UX ksh and POSIX shell print the target directory to stdout
  1809. # if CDPATH is set.
  1810. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  1811. sed_quote_subst='$sed_quote_subst'
  1812. double_quote_subst='$double_quote_subst'
  1813. delay_variable_subst='$delay_variable_subst'
  1814. _LT_CONFIG_STATUS_DECLARATIONS
  1815. LTCC='$LTCC'
  1816. LTCFLAGS='$LTCFLAGS'
  1817. compiler='$compiler_DEFAULT'
  1818. # A function that is used when there is no print builtin or printf.
  1819. func_fallback_echo ()
  1820. {
  1821. eval 'cat <<_LTECHO_EOF
  1822. \$[]1
  1823. _LTECHO_EOF'
  1824. }
  1825. # Quote evaled strings.
  1826. for var in lt_decl_all_varnames([[ \
  1827. ]], lt_decl_quote_varnames); do
  1828. case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  1829. *[[\\\\\\\`\\"\\\$]]*)
  1830. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
  1831. ;;
  1832. *)
  1833. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  1834. ;;
  1835. esac
  1836. done
  1837. # Double-quote double-evaled strings.
  1838. for var in lt_decl_all_varnames([[ \
  1839. ]], lt_decl_dquote_varnames); do
  1840. case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  1841. *[[\\\\\\\`\\"\\\$]]*)
  1842. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
  1843. ;;
  1844. *)
  1845. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  1846. ;;
  1847. esac
  1848. done
  1849. _LT_OUTPUT_LIBTOOL_INIT
  1850. ])
  1851. # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
  1852. # ------------------------------------
  1853. # Generate a child script FILE with all initialization necessary to
  1854. # reuse the environment learned by the parent script, and make the
  1855. # file executable. If COMMENT is supplied, it is inserted after the
  1856. # '#!' sequence but before initialization text begins. After this
  1857. # macro, additional text can be appended to FILE to form the body of
  1858. # the child script. The macro ends with non-zero status if the
  1859. # file could not be fully written (such as if the disk is full).
  1860. m4_ifdef([AS_INIT_GENERATED],
  1861. [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
  1862. [m4_defun([_LT_GENERATED_FILE_INIT],
  1863. [m4_require([AS_PREPARE])]dnl
  1864. [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
  1865. [lt_write_fail=0
  1866. cat >$1 <<_ASEOF || lt_write_fail=1
  1867. #! $SHELL
  1868. # Generated by $as_me.
  1869. $2
  1870. SHELL=\${CONFIG_SHELL-$SHELL}
  1871. export SHELL
  1872. _ASEOF
  1873. cat >>$1 <<\_ASEOF || lt_write_fail=1
  1874. AS_SHELL_SANITIZE
  1875. _AS_PREPARE
  1876. exec AS_MESSAGE_FD>&1
  1877. _ASEOF
  1878. test 0 = "$lt_write_fail" && chmod +x $1[]dnl
  1879. m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
  1880. # LT_OUTPUT
  1881. # ---------
  1882. # This macro allows early generation of the libtool script (before
  1883. # AC_OUTPUT is called), incase it is used in configure for compilation
  1884. # tests.
  1885. AC_DEFUN([LT_OUTPUT],
  1886. [: ${CONFIG_LT=./config.lt}
  1887. AC_MSG_NOTICE([creating $CONFIG_LT])
  1888. _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
  1889. [# Run this file to recreate a libtool stub with the current configuration.])
  1890. cat >>"$CONFIG_LT" <<\_LTEOF
  1891. lt_cl_silent=false
  1892. exec AS_MESSAGE_LOG_FD>>config.log
  1893. {
  1894. echo
  1895. AS_BOX([Running $as_me.])
  1896. } >&AS_MESSAGE_LOG_FD
  1897. lt_cl_help="\
  1898. '$as_me' creates a local libtool stub from the current configuration,
  1899. for use in further configure time tests before the real libtool is
  1900. generated.
  1901. Usage: $[0] [[OPTIONS]]
  1902. -h, --help print this help, then exit
  1903. -V, --version print version number, then exit
  1904. -q, --quiet do not print progress messages
  1905. -d, --debug don't remove temporary files
  1906. Report bugs to <bug-libtool@gnu.org>."
  1907. lt_cl_version="\
  1908. m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
  1909. m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
  1910. configured by $[0], generated by m4_PACKAGE_STRING.
  1911. Copyright (C) 2011 Free Software Foundation, Inc.
  1912. This config.lt script is free software; the Free Software Foundation
  1913. gives unlimited permision to copy, distribute and modify it."
  1914. while test 0 != $[#]
  1915. do
  1916. case $[1] in
  1917. --version | --v* | -V )
  1918. echo "$lt_cl_version"; exit 0 ;;
  1919. --help | --h* | -h )
  1920. echo "$lt_cl_help"; exit 0 ;;
  1921. --debug | --d* | -d )
  1922. debug=: ;;
  1923. --quiet | --q* | --silent | --s* | -q )
  1924. lt_cl_silent=: ;;
  1925. -*) AC_MSG_ERROR([unrecognized option: $[1]
  1926. Try '$[0] --help' for more information.]) ;;
  1927. *) AC_MSG_ERROR([unrecognized argument: $[1]
  1928. Try '$[0] --help' for more information.]) ;;
  1929. esac
  1930. shift
  1931. done
  1932. if $lt_cl_silent; then
  1933. exec AS_MESSAGE_FD>/dev/null
  1934. fi
  1935. _LTEOF
  1936. cat >>"$CONFIG_LT" <<_LTEOF
  1937. _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
  1938. _LTEOF
  1939. cat >>"$CONFIG_LT" <<\_LTEOF
  1940. AC_MSG_NOTICE([creating $ofile])
  1941. _LT_OUTPUT_LIBTOOL_COMMANDS
  1942. AS_EXIT(0)
  1943. _LTEOF
  1944. chmod +x "$CONFIG_LT"
  1945. # configure is writing to config.log, but config.lt does its own redirection,
  1946. # appending to config.log, which fails on DOS, as config.log is still kept
  1947. # open by configure. Here we exec the FD to /dev/null, effectively closing
  1948. # config.log, so it can be properly (re)opened and appended to by config.lt.
  1949. lt_cl_success=:
  1950. test yes = "$silent" &&
  1951. lt_config_lt_args="$lt_config_lt_args --quiet"
  1952. exec AS_MESSAGE_LOG_FD>/dev/null
  1953. $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
  1954. exec AS_MESSAGE_LOG_FD>>config.log
  1955. $lt_cl_success || AS_EXIT(1)
  1956. ])# LT_OUTPUT
  1957. # _LT_CONFIG(TAG)
  1958. # ---------------
  1959. # If TAG is the built-in tag, create an initial libtool script with a
  1960. # default configuration from the untagged config vars. Otherwise add code
  1961. # to config.status for appending the configuration named by TAG from the
  1962. # matching tagged config vars.
  1963. m4_defun([_LT_CONFIG],
  1964. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1965. _LT_CONFIG_SAVE_COMMANDS([
  1966. m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
  1967. m4_if(_LT_TAG, [C], [
  1968. # See if we are running on zsh, and set the options that allow our
  1969. # commands through without removal of \ escapes.
  1970. if test -n "${ZSH_VERSION+set}"; then
  1971. setopt NO_GLOB_SUBST
  1972. fi
  1973. cfgfile=${ofile}T
  1974. trap "$RM \"$cfgfile\"; exit 1" 1 2 15
  1975. $RM "$cfgfile"
  1976. cat <<_LT_EOF >> "$cfgfile"
  1977. #! $SHELL
  1978. # Generated automatically by $as_me ($PACKAGE) $VERSION
  1979. # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  1980. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  1981. # Provide generalized library-building support services.
  1982. # Written by Gordon Matzigkeit, 1996
  1983. _LT_COPYING
  1984. _LT_LIBTOOL_TAGS
  1985. # Configured defaults for sys_lib_dlsearch_path munging.
  1986. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
  1987. # ### BEGIN LIBTOOL CONFIG
  1988. _LT_LIBTOOL_CONFIG_VARS
  1989. _LT_LIBTOOL_TAG_VARS
  1990. # ### END LIBTOOL CONFIG
  1991. _LT_EOF
  1992. cat <<'_LT_EOF' >> "$cfgfile"
  1993. # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
  1994. _LT_PREPARE_MUNGE_PATH_LIST
  1995. _LT_PREPARE_CC_BASENAME
  1996. # ### END FUNCTIONS SHARED WITH CONFIGURE
  1997. _LT_EOF
  1998. case $host_os in
  1999. aix3*)
  2000. cat <<\_LT_EOF >> "$cfgfile"
  2001. # AIX sometimes has problems with the GCC collect2 program. For some
  2002. # reason, if we set the COLLECT_NAMES environment variable, the problems
  2003. # vanish in a puff of smoke.
  2004. if test set != "${COLLECT_NAMES+set}"; then
  2005. COLLECT_NAMES=
  2006. export COLLECT_NAMES
  2007. fi
  2008. _LT_EOF
  2009. ;;
  2010. esac
  2011. _LT_PROG_LTMAIN
  2012. # We use sed instead of cat because bash on DJGPP gets confused if
  2013. # if finds mixed CR/LF and LF-only lines. Since sed operates in
  2014. # text mode, it properly converts lines to CR/LF. This bash problem
  2015. # is reportedly fixed, but why not run on old versions too?
  2016. sed '$q' "$ltmain" >> "$cfgfile" \
  2017. || (rm -f "$cfgfile"; exit 1)
  2018. mv -f "$cfgfile" "$ofile" ||
  2019. (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
  2020. chmod +x "$ofile"
  2021. ],
  2022. [cat <<_LT_EOF >> "$ofile"
  2023. dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
  2024. dnl in a comment (ie after a #).
  2025. # ### BEGIN LIBTOOL TAG CONFIG: $1
  2026. _LT_LIBTOOL_TAG_VARS(_LT_TAG)
  2027. # ### END LIBTOOL TAG CONFIG: $1
  2028. _LT_EOF
  2029. ])dnl /m4_if
  2030. ],
  2031. [m4_if([$1], [], [
  2032. PACKAGE='$PACKAGE'
  2033. VERSION='$VERSION'
  2034. RM='$RM'
  2035. ofile='$ofile'], [])
  2036. ])dnl /_LT_CONFIG_SAVE_COMMANDS
  2037. ])# _LT_CONFIG
  2038. # LT_SUPPORTED_TAG(TAG)
  2039. # ---------------------
  2040. # Trace this macro to discover what tags are supported by the libtool
  2041. # --tag option, using:
  2042. # autoconf --trace 'LT_SUPPORTED_TAG:$1'
  2043. AC_DEFUN([LT_SUPPORTED_TAG], [])
  2044. # C support is built-in for now
  2045. m4_define([_LT_LANG_C_enabled], [])
  2046. m4_define([_LT_TAGS], [])
  2047. # LT_LANG(LANG)
  2048. # -------------
  2049. # Enable libtool support for the given language if not already enabled.
  2050. AC_DEFUN([LT_LANG],
  2051. [AC_BEFORE([$0], [LT_OUTPUT])dnl
  2052. m4_case([$1],
  2053. [C], [_LT_LANG(C)],
  2054. [C++], [_LT_LANG(CXX)],
  2055. [Go], [_LT_LANG(GO)],
  2056. [Java], [_LT_LANG(GCJ)],
  2057. [Fortran 77], [_LT_LANG(F77)],
  2058. [Fortran], [_LT_LANG(FC)],
  2059. [Windows Resource], [_LT_LANG(RC)],
  2060. [m4_ifdef([_LT_LANG_]$1[_CONFIG],
  2061. [_LT_LANG($1)],
  2062. [m4_fatal([$0: unsupported language: "$1"])])])dnl
  2063. ])# LT_LANG
  2064. # _LT_LANG(LANGNAME)
  2065. # ------------------
  2066. m4_defun([_LT_LANG],
  2067. [m4_ifdef([_LT_LANG_]$1[_enabled], [],
  2068. [LT_SUPPORTED_TAG([$1])dnl
  2069. m4_append([_LT_TAGS], [$1 ])dnl
  2070. m4_define([_LT_LANG_]$1[_enabled], [])dnl
  2071. _LT_LANG_$1_CONFIG($1)])dnl
  2072. ])# _LT_LANG
  2073. m4_ifndef([AC_PROG_GO], [
  2074. # NOTE: This macro has been submitted for inclusion into #
  2075. # GNU Autoconf as AC_PROG_GO. When it is available in #
  2076. # a released version of Autoconf we should remove this #
  2077. # macro and use it instead. #
  2078. m4_defun([AC_PROG_GO],
  2079. [AC_LANG_PUSH(Go)dnl
  2080. AC_ARG_VAR([GOC], [Go compiler command])dnl
  2081. AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
  2082. _AC_ARG_VAR_LDFLAGS()dnl
  2083. AC_CHECK_TOOL(GOC, gccgo)
  2084. if test -z "$GOC"; then
  2085. if test -n "$ac_tool_prefix"; then
  2086. AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
  2087. fi
  2088. fi
  2089. if test -z "$GOC"; then
  2090. AC_CHECK_PROG(GOC, gccgo, gccgo, false)
  2091. fi
  2092. ])#m4_defun
  2093. ])#m4_ifndef
  2094. # _LT_LANG_DEFAULT_CONFIG
  2095. # -----------------------
  2096. m4_defun([_LT_LANG_DEFAULT_CONFIG],
  2097. [AC_PROVIDE_IFELSE([AC_PROG_CXX],
  2098. [LT_LANG(CXX)],
  2099. [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
  2100. AC_PROVIDE_IFELSE([AC_PROG_F77],
  2101. [LT_LANG(F77)],
  2102. [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
  2103. AC_PROVIDE_IFELSE([AC_PROG_FC],
  2104. [LT_LANG(FC)],
  2105. [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
  2106. dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
  2107. dnl pulling things in needlessly.
  2108. AC_PROVIDE_IFELSE([AC_PROG_GCJ],
  2109. [LT_LANG(GCJ)],
  2110. [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
  2111. [LT_LANG(GCJ)],
  2112. [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
  2113. [LT_LANG(GCJ)],
  2114. [m4_ifdef([AC_PROG_GCJ],
  2115. [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
  2116. m4_ifdef([A][M_PROG_GCJ],
  2117. [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
  2118. m4_ifdef([LT_PROG_GCJ],
  2119. [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
  2120. AC_PROVIDE_IFELSE([AC_PROG_GO],
  2121. [LT_LANG(GO)],
  2122. [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
  2123. AC_PROVIDE_IFELSE([LT_PROG_RC],
  2124. [LT_LANG(RC)],
  2125. [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
  2126. ])# _LT_LANG_DEFAULT_CONFIG
  2127. # Obsolete macros:
  2128. AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
  2129. AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
  2130. AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
  2131. AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
  2132. AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
  2133. dnl aclocal-1.4 backwards compatibility:
  2134. dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
  2135. dnl AC_DEFUN([AC_LIBTOOL_F77], [])
  2136. dnl AC_DEFUN([AC_LIBTOOL_FC], [])
  2137. dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
  2138. dnl AC_DEFUN([AC_LIBTOOL_RC], [])
  2139. # _LT_TAG_COMPILER
  2140. # ----------------
  2141. m4_defun([_LT_TAG_COMPILER],
  2142. [AC_REQUIRE([AC_PROG_CC])dnl
  2143. _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
  2144. _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
  2145. _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
  2146. _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
  2147. # If no C compiler was specified, use CC.
  2148. LTCC=${LTCC-"$CC"}
  2149. # If no C compiler flags were specified, use CFLAGS.
  2150. LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
  2151. # Allow CC to be a program name with arguments.
  2152. compiler=$CC
  2153. ])# _LT_TAG_COMPILER
  2154. # _LT_COMPILER_BOILERPLATE
  2155. # ------------------------
  2156. # Check for compiler boilerplate output or warnings with
  2157. # the simple compiler test code.
  2158. m4_defun([_LT_COMPILER_BOILERPLATE],
  2159. [m4_require([_LT_DECL_SED])dnl
  2160. ac_outfile=conftest.$ac_objext
  2161. echo "$lt_simple_compile_test_code" >conftest.$ac_ext
  2162. eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  2163. _lt_compiler_boilerplate=`cat conftest.err`
  2164. $RM conftest*
  2165. ])# _LT_COMPILER_BOILERPLATE
  2166. # _LT_LINKER_BOILERPLATE
  2167. # ----------------------
  2168. # Check for linker boilerplate output or warnings with
  2169. # the simple link test code.
  2170. m4_defun([_LT_LINKER_BOILERPLATE],
  2171. [m4_require([_LT_DECL_SED])dnl
  2172. ac_outfile=conftest.$ac_objext
  2173. echo "$lt_simple_link_test_code" >conftest.$ac_ext
  2174. eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  2175. _lt_linker_boilerplate=`cat conftest.err`
  2176. $RM -r conftest*
  2177. ])# _LT_LINKER_BOILERPLATE
  2178. # _LT_REQUIRED_DARWIN_CHECKS
  2179. # -------------------------
  2180. m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
  2181. case $host_os in
  2182. rhapsody* | darwin*)
  2183. AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
  2184. AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
  2185. AC_CHECK_TOOL([LIPO], [lipo], [:])
  2186. AC_CHECK_TOOL([OTOOL], [otool], [:])
  2187. AC_CHECK_TOOL([OTOOL64], [otool64], [:])
  2188. _LT_DECL([], [DSYMUTIL], [1],
  2189. [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
  2190. _LT_DECL([], [NMEDIT], [1],
  2191. [Tool to change global to local symbols on Mac OS X])
  2192. _LT_DECL([], [LIPO], [1],
  2193. [Tool to manipulate fat objects and archives on Mac OS X])
  2194. _LT_DECL([], [OTOOL], [1],
  2195. [ldd/readelf like tool for Mach-O binaries on Mac OS X])
  2196. _LT_DECL([], [OTOOL64], [1],
  2197. [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
  2198. AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
  2199. [lt_cv_apple_cc_single_mod=no
  2200. if test -z "$LT_MULTI_MODULE"; then
  2201. # By default we will add the -single_module flag. You can override
  2202. # by either setting the environment variable LT_MULTI_MODULE
  2203. # non-empty at configure time, or by adding -multi_module to the
  2204. # link flags.
  2205. rm -rf libconftest.dylib*
  2206. echo "int foo(void){return 1;}" > conftest.c
  2207. echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  2208. -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
  2209. $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  2210. -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
  2211. _lt_result=$?
  2212. # If there is a non-empty error log, and "single_module"
  2213. # appears in it, assume the flag caused a linker warning
  2214. if test -s conftest.err && $GREP single_module conftest.err; then
  2215. cat conftest.err >&AS_MESSAGE_LOG_FD
  2216. # Otherwise, if the output was created with a 0 exit code from
  2217. # the compiler, it worked.
  2218. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
  2219. lt_cv_apple_cc_single_mod=yes
  2220. else
  2221. cat conftest.err >&AS_MESSAGE_LOG_FD
  2222. fi
  2223. rm -rf libconftest.dylib*
  2224. rm -f conftest.*
  2225. fi])
  2226. AC_CACHE_CHECK([for -exported_symbols_list linker flag],
  2227. [lt_cv_ld_exported_symbols_list],
  2228. [lt_cv_ld_exported_symbols_list=no
  2229. save_LDFLAGS=$LDFLAGS
  2230. echo "_main" > conftest.sym
  2231. LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
  2232. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  2233. [lt_cv_ld_exported_symbols_list=yes],
  2234. [lt_cv_ld_exported_symbols_list=no])
  2235. LDFLAGS=$save_LDFLAGS
  2236. ])
  2237. AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
  2238. [lt_cv_ld_force_load=no
  2239. cat > conftest.c << _LT_EOF
  2240. int forced_loaded() { return 2;}
  2241. _LT_EOF
  2242. echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
  2243. $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
  2244. echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
  2245. $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
  2246. echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
  2247. $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
  2248. cat > conftest.c << _LT_EOF
  2249. int main() { return 0;}
  2250. _LT_EOF
  2251. echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
  2252. $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
  2253. _lt_result=$?
  2254. if test -s conftest.err && $GREP force_load conftest.err; then
  2255. cat conftest.err >&AS_MESSAGE_LOG_FD
  2256. elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
  2257. lt_cv_ld_force_load=yes
  2258. else
  2259. cat conftest.err >&AS_MESSAGE_LOG_FD
  2260. fi
  2261. rm -f conftest.err libconftest.a conftest conftest.c
  2262. rm -rf conftest.dSYM
  2263. ])
  2264. case $host_os in
  2265. rhapsody* | darwin1.[[012]])
  2266. _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
  2267. darwin1.*)
  2268. _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
  2269. darwin*) # darwin 5.x on
  2270. # if running on 10.5 or later, the deployment target defaults
  2271. # to the OS version, if on x86, and 10.4, the deployment
  2272. # target defaults to 10.4. Don't you love it?
  2273. case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
  2274. 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
  2275. _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
  2276. 10.[[012]][[,.]]*)
  2277. _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
  2278. 10.*)
  2279. _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
  2280. esac
  2281. ;;
  2282. esac
  2283. if test yes = "$lt_cv_apple_cc_single_mod"; then
  2284. _lt_dar_single_mod='$single_module'
  2285. fi
  2286. if test yes = "$lt_cv_ld_exported_symbols_list"; then
  2287. _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
  2288. else
  2289. _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
  2290. fi
  2291. if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
  2292. _lt_dsymutil='~$DSYMUTIL $lib || :'
  2293. else
  2294. _lt_dsymutil=
  2295. fi
  2296. ;;
  2297. esac
  2298. ])
  2299. # _LT_DARWIN_LINKER_FEATURES([TAG])
  2300. # ---------------------------------
  2301. # Checks for linker and compiler features on darwin
  2302. m4_defun([_LT_DARWIN_LINKER_FEATURES],
  2303. [
  2304. m4_require([_LT_REQUIRED_DARWIN_CHECKS])
  2305. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  2306. _LT_TAGVAR(hardcode_direct, $1)=no
  2307. _LT_TAGVAR(hardcode_automatic, $1)=yes
  2308. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  2309. if test yes = "$lt_cv_ld_force_load"; then
  2310. _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\"`'
  2311. m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
  2312. [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
  2313. else
  2314. _LT_TAGVAR(whole_archive_flag_spec, $1)=''
  2315. fi
  2316. _LT_TAGVAR(link_all_deplibs, $1)=yes
  2317. _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
  2318. case $cc_basename in
  2319. ifort*|nagfor*) _lt_dar_can_shared=yes ;;
  2320. *) _lt_dar_can_shared=$GCC ;;
  2321. esac
  2322. if test yes = "$_lt_dar_can_shared"; then
  2323. output_verbose_link_cmd=func_echo_all
  2324. _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"
  2325. _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
  2326. _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"
  2327. _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"
  2328. m4_if([$1], [CXX],
  2329. [ if test yes != "$lt_cv_apple_cc_single_mod"; then
  2330. _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"
  2331. _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"
  2332. fi
  2333. ],[])
  2334. else
  2335. _LT_TAGVAR(ld_shlibs, $1)=no
  2336. fi
  2337. ])
  2338. # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
  2339. # ----------------------------------
  2340. # Links a minimal program and checks the executable
  2341. # for the system default hardcoded library path. In most cases,
  2342. # this is /usr/lib:/lib, but when the MPI compilers are used
  2343. # the location of the communication and MPI libs are included too.
  2344. # If we don't find anything, use the default library path according
  2345. # to the aix ld manual.
  2346. # Store the results from the different compilers for each TAGNAME.
  2347. # Allow to override them for all tags through lt_cv_aix_libpath.
  2348. m4_defun([_LT_SYS_MODULE_PATH_AIX],
  2349. [m4_require([_LT_DECL_SED])dnl
  2350. if test set = "${lt_cv_aix_libpath+set}"; then
  2351. aix_libpath=$lt_cv_aix_libpath
  2352. else
  2353. AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
  2354. [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
  2355. lt_aix_libpath_sed='[
  2356. /Import File Strings/,/^$/ {
  2357. /^0/ {
  2358. s/^0 *\([^ ]*\) *$/\1/
  2359. p
  2360. }
  2361. }]'
  2362. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  2363. # Check for a 64-bit object if we didn't find anything.
  2364. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
  2365. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  2366. fi],[])
  2367. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
  2368. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
  2369. fi
  2370. ])
  2371. aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
  2372. fi
  2373. ])# _LT_SYS_MODULE_PATH_AIX
  2374. # _LT_SHELL_INIT(ARG)
  2375. # -------------------
  2376. m4_define([_LT_SHELL_INIT],
  2377. [m4_divert_text([M4SH-INIT], [$1
  2378. ])])# _LT_SHELL_INIT
  2379. # _LT_PROG_ECHO_BACKSLASH
  2380. # -----------------------
  2381. # Find how we can fake an echo command that does not interpret backslash.
  2382. # In particular, with Autoconf 2.60 or later we add some code to the start
  2383. # of the generated configure script that will find a shell with a builtin
  2384. # printf (that we can use as an echo command).
  2385. m4_defun([_LT_PROG_ECHO_BACKSLASH],
  2386. [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  2387. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  2388. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  2389. AC_MSG_CHECKING([how to print strings])
  2390. # Test print first, because it will be a builtin if present.
  2391. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
  2392. test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
  2393. ECHO='print -r --'
  2394. elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
  2395. ECHO='printf %s\n'
  2396. else
  2397. # Use this function as a fallback that always works.
  2398. func_fallback_echo ()
  2399. {
  2400. eval 'cat <<_LTECHO_EOF
  2401. $[]1
  2402. _LTECHO_EOF'
  2403. }
  2404. ECHO='func_fallback_echo'
  2405. fi
  2406. # func_echo_all arg...
  2407. # Invoke $ECHO with all args, space-separated.
  2408. func_echo_all ()
  2409. {
  2410. $ECHO "$*"
  2411. }
  2412. case $ECHO in
  2413. printf*) AC_MSG_RESULT([printf]) ;;
  2414. print*) AC_MSG_RESULT([print -r]) ;;
  2415. *) AC_MSG_RESULT([cat]) ;;
  2416. esac
  2417. m4_ifdef([_AS_DETECT_SUGGESTED],
  2418. [_AS_DETECT_SUGGESTED([
  2419. test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
  2420. ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  2421. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  2422. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  2423. PATH=/empty FPATH=/empty; export PATH FPATH
  2424. test "X`printf %s $ECHO`" = "X$ECHO" \
  2425. || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
  2426. _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
  2427. _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
  2428. ])# _LT_PROG_ECHO_BACKSLASH
  2429. # _LT_WITH_SYSROOT
  2430. # ----------------
  2431. AC_DEFUN([_LT_WITH_SYSROOT],
  2432. [AC_MSG_CHECKING([for sysroot])
  2433. AC_ARG_WITH([sysroot],
  2434. [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
  2435. [Search for dependent libraries within DIR (or the compiler's sysroot
  2436. if not specified).])],
  2437. [], [with_sysroot=no])
  2438. dnl lt_sysroot will always be passed unquoted. We quote it here
  2439. dnl in case the user passed a directory name.
  2440. lt_sysroot=
  2441. case $with_sysroot in #(
  2442. yes)
  2443. if test yes = "$GCC"; then
  2444. lt_sysroot=`$CC --print-sysroot 2>/dev/null`
  2445. fi
  2446. ;; #(
  2447. /*)
  2448. lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
  2449. ;; #(
  2450. no|'')
  2451. ;; #(
  2452. *)
  2453. AC_MSG_RESULT([$with_sysroot])
  2454. AC_MSG_ERROR([The sysroot must be an absolute path.])
  2455. ;;
  2456. esac
  2457. AC_MSG_RESULT([${lt_sysroot:-no}])
  2458. _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
  2459. [dependent libraries, and where our libraries should be installed.])])
  2460. # _LT_ENABLE_LOCK
  2461. # ---------------
  2462. m4_defun([_LT_ENABLE_LOCK],
  2463. [AC_ARG_ENABLE([libtool-lock],
  2464. [AS_HELP_STRING([--disable-libtool-lock],
  2465. [avoid locking (might break parallel builds)])])
  2466. test no = "$enable_libtool_lock" || enable_libtool_lock=yes
  2467. # Some flags need to be propagated to the compiler or linker for good
  2468. # libtool support.
  2469. case $host in
  2470. ia64-*-hpux*)
  2471. # Find out what ABI is being produced by ac_compile, and set mode
  2472. # options accordingly.
  2473. echo 'int i;' > conftest.$ac_ext
  2474. if AC_TRY_EVAL(ac_compile); then
  2475. case `/usr/bin/file conftest.$ac_objext` in
  2476. *ELF-32*)
  2477. HPUX_IA64_MODE=32
  2478. ;;
  2479. *ELF-64*)
  2480. HPUX_IA64_MODE=64
  2481. ;;
  2482. esac
  2483. fi
  2484. rm -rf conftest*
  2485. ;;
  2486. *-*-irix6*)
  2487. # Find out what ABI is being produced by ac_compile, and set linker
  2488. # options accordingly.
  2489. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
  2490. if AC_TRY_EVAL(ac_compile); then
  2491. if test yes = "$lt_cv_prog_gnu_ld"; then
  2492. case `/usr/bin/file conftest.$ac_objext` in
  2493. *32-bit*)
  2494. LD="${LD-ld} -melf32bsmip"
  2495. ;;
  2496. *N32*)
  2497. LD="${LD-ld} -melf32bmipn32"
  2498. ;;
  2499. *64-bit*)
  2500. LD="${LD-ld} -melf64bmip"
  2501. ;;
  2502. esac
  2503. else
  2504. case `/usr/bin/file conftest.$ac_objext` in
  2505. *32-bit*)
  2506. LD="${LD-ld} -32"
  2507. ;;
  2508. *N32*)
  2509. LD="${LD-ld} -n32"
  2510. ;;
  2511. *64-bit*)
  2512. LD="${LD-ld} -64"
  2513. ;;
  2514. esac
  2515. fi
  2516. fi
  2517. rm -rf conftest*
  2518. ;;
  2519. mips64*-*linux*)
  2520. # Find out what ABI is being produced by ac_compile, and set linker
  2521. # options accordingly.
  2522. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
  2523. if AC_TRY_EVAL(ac_compile); then
  2524. emul=elf
  2525. case `/usr/bin/file conftest.$ac_objext` in
  2526. *32-bit*)
  2527. emul="${emul}32"
  2528. ;;
  2529. *64-bit*)
  2530. emul="${emul}64"
  2531. ;;
  2532. esac
  2533. case `/usr/bin/file conftest.$ac_objext` in
  2534. *MSB*)
  2535. emul="${emul}btsmip"
  2536. ;;
  2537. *LSB*)
  2538. emul="${emul}ltsmip"
  2539. ;;
  2540. esac
  2541. case `/usr/bin/file conftest.$ac_objext` in
  2542. *N32*)
  2543. emul="${emul}n32"
  2544. ;;
  2545. esac
  2546. LD="${LD-ld} -m $emul"
  2547. fi
  2548. rm -rf conftest*
  2549. ;;
  2550. x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
  2551. s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
  2552. # Find out what ABI is being produced by ac_compile, and set linker
  2553. # options accordingly. Note that the listed cases only cover the
  2554. # situations where additional linker options are needed (such as when
  2555. # doing 32-bit compilation for a host where ld defaults to 64-bit, or
  2556. # vice versa); the common cases where no linker options are needed do
  2557. # not appear in the list.
  2558. echo 'int i;' > conftest.$ac_ext
  2559. if AC_TRY_EVAL(ac_compile); then
  2560. case `/usr/bin/file conftest.o` in
  2561. *32-bit*)
  2562. case $host in
  2563. x86_64-*kfreebsd*-gnu)
  2564. LD="${LD-ld} -m elf_i386_fbsd"
  2565. ;;
  2566. x86_64-*linux*)
  2567. case `/usr/bin/file conftest.o` in
  2568. *x86-64*)
  2569. LD="${LD-ld} -m elf32_x86_64"
  2570. ;;
  2571. *)
  2572. LD="${LD-ld} -m elf_i386"
  2573. ;;
  2574. esac
  2575. ;;
  2576. powerpc64le-*linux*)
  2577. LD="${LD-ld} -m elf32lppclinux"
  2578. ;;
  2579. powerpc64-*linux*)
  2580. LD="${LD-ld} -m elf32ppclinux"
  2581. ;;
  2582. s390x-*linux*)
  2583. LD="${LD-ld} -m elf_s390"
  2584. ;;
  2585. sparc64-*linux*)
  2586. LD="${LD-ld} -m elf32_sparc"
  2587. ;;
  2588. esac
  2589. ;;
  2590. *64-bit*)
  2591. case $host in
  2592. x86_64-*kfreebsd*-gnu)
  2593. LD="${LD-ld} -m elf_x86_64_fbsd"
  2594. ;;
  2595. x86_64-*linux*)
  2596. LD="${LD-ld} -m elf_x86_64"
  2597. ;;
  2598. powerpcle-*linux*)
  2599. LD="${LD-ld} -m elf64lppc"
  2600. ;;
  2601. powerpc-*linux*)
  2602. LD="${LD-ld} -m elf64ppc"
  2603. ;;
  2604. s390*-*linux*|s390*-*tpf*)
  2605. LD="${LD-ld} -m elf64_s390"
  2606. ;;
  2607. sparc*-*linux*)
  2608. LD="${LD-ld} -m elf64_sparc"
  2609. ;;
  2610. esac
  2611. ;;
  2612. esac
  2613. fi
  2614. rm -rf conftest*
  2615. ;;
  2616. *-*-sco3.2v5*)
  2617. # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  2618. SAVE_CFLAGS=$CFLAGS
  2619. CFLAGS="$CFLAGS -belf"
  2620. AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
  2621. [AC_LANG_PUSH(C)
  2622. AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
  2623. AC_LANG_POP])
  2624. if test yes != "$lt_cv_cc_needs_belf"; then
  2625. # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  2626. CFLAGS=$SAVE_CFLAGS
  2627. fi
  2628. ;;
  2629. *-*solaris*)
  2630. # Find out what ABI is being produced by ac_compile, and set linker
  2631. # options accordingly.
  2632. echo 'int i;' > conftest.$ac_ext
  2633. if AC_TRY_EVAL(ac_compile); then
  2634. case `/usr/bin/file conftest.o` in
  2635. *64-bit*)
  2636. case $lt_cv_prog_gnu_ld in
  2637. yes*)
  2638. case $host in
  2639. i?86-*-solaris*|x86_64-*-solaris*)
  2640. LD="${LD-ld} -m elf_x86_64"
  2641. ;;
  2642. sparc*-*-solaris*)
  2643. LD="${LD-ld} -m elf64_sparc"
  2644. ;;
  2645. esac
  2646. # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
  2647. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
  2648. LD=${LD-ld}_sol2
  2649. fi
  2650. ;;
  2651. *)
  2652. if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
  2653. LD="${LD-ld} -64"
  2654. fi
  2655. ;;
  2656. esac
  2657. ;;
  2658. esac
  2659. fi
  2660. rm -rf conftest*
  2661. ;;
  2662. esac
  2663. need_locks=$enable_libtool_lock
  2664. ])# _LT_ENABLE_LOCK
  2665. # _LT_PROG_AR
  2666. # -----------
  2667. m4_defun([_LT_PROG_AR],
  2668. [AC_CHECK_TOOLS(AR, [ar], false)
  2669. : ${AR=ar}
  2670. : ${AR_FLAGS=cru}
  2671. _LT_DECL([], [AR], [1], [The archiver])
  2672. _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
  2673. AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
  2674. [lt_cv_ar_at_file=no
  2675. AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
  2676. [echo conftest.$ac_objext > conftest.lst
  2677. lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
  2678. AC_TRY_EVAL([lt_ar_try])
  2679. if test 0 -eq "$ac_status"; then
  2680. # Ensure the archiver fails upon bogus file names.
  2681. rm -f conftest.$ac_objext libconftest.a
  2682. AC_TRY_EVAL([lt_ar_try])
  2683. if test 0 -ne "$ac_status"; then
  2684. lt_cv_ar_at_file=@
  2685. fi
  2686. fi
  2687. rm -f conftest.* libconftest.a
  2688. ])
  2689. ])
  2690. if test no = "$lt_cv_ar_at_file"; then
  2691. archiver_list_spec=
  2692. else
  2693. archiver_list_spec=$lt_cv_ar_at_file
  2694. fi
  2695. _LT_DECL([], [archiver_list_spec], [1],
  2696. [How to feed a file listing to the archiver])
  2697. ])# _LT_PROG_AR
  2698. # _LT_CMD_OLD_ARCHIVE
  2699. # -------------------
  2700. m4_defun([_LT_CMD_OLD_ARCHIVE],
  2701. [_LT_PROG_AR
  2702. AC_CHECK_TOOL(STRIP, strip, :)
  2703. test -z "$STRIP" && STRIP=:
  2704. _LT_DECL([], [STRIP], [1], [A symbol stripping program])
  2705. AC_CHECK_TOOL(RANLIB, ranlib, :)
  2706. test -z "$RANLIB" && RANLIB=:
  2707. _LT_DECL([], [RANLIB], [1],
  2708. [Commands used to install an old-style archive])
  2709. # Determine commands to create old-style static archives.
  2710. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
  2711. old_postinstall_cmds='chmod 644 $oldlib'
  2712. old_postuninstall_cmds=
  2713. if test -n "$RANLIB"; then
  2714. case $host_os in
  2715. bitrig* | openbsd*)
  2716. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
  2717. ;;
  2718. *)
  2719. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
  2720. ;;
  2721. esac
  2722. old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
  2723. fi
  2724. case $host_os in
  2725. darwin*)
  2726. lock_old_archive_extraction=yes ;;
  2727. *)
  2728. lock_old_archive_extraction=no ;;
  2729. esac
  2730. _LT_DECL([], [old_postinstall_cmds], [2])
  2731. _LT_DECL([], [old_postuninstall_cmds], [2])
  2732. _LT_TAGDECL([], [old_archive_cmds], [2],
  2733. [Commands used to build an old-style archive])
  2734. _LT_DECL([], [lock_old_archive_extraction], [0],
  2735. [Whether to use a lock for old archive extraction])
  2736. ])# _LT_CMD_OLD_ARCHIVE
  2737. # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  2738. # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
  2739. # ----------------------------------------------------------------
  2740. # Check whether the given compiler option works
  2741. AC_DEFUN([_LT_COMPILER_OPTION],
  2742. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  2743. m4_require([_LT_DECL_SED])dnl
  2744. AC_CACHE_CHECK([$1], [$2],
  2745. [$2=no
  2746. m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
  2747. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  2748. lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment
  2749. # Insert the option either (1) after the last *FLAGS variable, or
  2750. # (2) before a word containing "conftest.", or (3) at the end.
  2751. # Note that $ac_compile itself does not contain backslashes and begins
  2752. # with a dollar sign (not a hyphen), so the echo should work correctly.
  2753. # The option is referenced via a variable to avoid confusing sed.
  2754. lt_compile=`echo "$ac_compile" | $SED \
  2755. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  2756. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  2757. -e 's:$: $lt_compiler_flag:'`
  2758. (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  2759. (eval "$lt_compile" 2>conftest.err)
  2760. ac_status=$?
  2761. cat conftest.err >&AS_MESSAGE_LOG_FD
  2762. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  2763. if (exit $ac_status) && test -s "$ac_outfile"; then
  2764. # The compiler can only warn and ignore the option if not recognized
  2765. # So say no if there are warnings other than the usual output.
  2766. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
  2767. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  2768. if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
  2769. $2=yes
  2770. fi
  2771. fi
  2772. $RM conftest*
  2773. ])
  2774. if test yes = "[$]$2"; then
  2775. m4_if([$5], , :, [$5])
  2776. else
  2777. m4_if([$6], , :, [$6])
  2778. fi
  2779. ])# _LT_COMPILER_OPTION
  2780. # Old name:
  2781. AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
  2782. dnl aclocal-1.4 backwards compatibility:
  2783. dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
  2784. # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  2785. # [ACTION-SUCCESS], [ACTION-FAILURE])
  2786. # ----------------------------------------------------
  2787. # Check whether the given linker option works
  2788. AC_DEFUN([_LT_LINKER_OPTION],
  2789. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  2790. m4_require([_LT_DECL_SED])dnl
  2791. AC_CACHE_CHECK([$1], [$2],
  2792. [$2=no
  2793. save_LDFLAGS=$LDFLAGS
  2794. LDFLAGS="$LDFLAGS $3"
  2795. echo "$lt_simple_link_test_code" > conftest.$ac_ext
  2796. if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
  2797. # The linker can only warn and ignore the option if not recognized
  2798. # So say no if there are warnings
  2799. if test -s conftest.err; then
  2800. # Append any errors to the config.log.
  2801. cat conftest.err 1>&AS_MESSAGE_LOG_FD
  2802. $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
  2803. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  2804. if diff conftest.exp conftest.er2 >/dev/null; then
  2805. $2=yes
  2806. fi
  2807. else
  2808. $2=yes
  2809. fi
  2810. fi
  2811. $RM -r conftest*
  2812. LDFLAGS=$save_LDFLAGS
  2813. ])
  2814. if test yes = "[$]$2"; then
  2815. m4_if([$4], , :, [$4])
  2816. else
  2817. m4_if([$5], , :, [$5])
  2818. fi
  2819. ])# _LT_LINKER_OPTION
  2820. # Old name:
  2821. AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
  2822. dnl aclocal-1.4 backwards compatibility:
  2823. dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
  2824. # LT_CMD_MAX_LEN
  2825. #---------------
  2826. AC_DEFUN([LT_CMD_MAX_LEN],
  2827. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2828. # find the maximum length of command line arguments
  2829. AC_MSG_CHECKING([the maximum length of command line arguments])
  2830. AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
  2831. i=0
  2832. teststring=ABCD
  2833. case $build_os in
  2834. msdosdjgpp*)
  2835. # On DJGPP, this test can blow up pretty badly due to problems in libc
  2836. # (any single argument exceeding 2000 bytes causes a buffer overrun
  2837. # during glob expansion). Even if it were fixed, the result of this
  2838. # check would be larger than it should be.
  2839. lt_cv_sys_max_cmd_len=12288; # 12K is about right
  2840. ;;
  2841. gnu*)
  2842. # Under GNU Hurd, this test is not required because there is
  2843. # no limit to the length of command line arguments.
  2844. # Libtool will interpret -1 as no limit whatsoever
  2845. lt_cv_sys_max_cmd_len=-1;
  2846. ;;
  2847. cygwin* | mingw* | cegcc*)
  2848. # On Win9x/ME, this test blows up -- it succeeds, but takes
  2849. # about 5 minutes as the teststring grows exponentially.
  2850. # Worse, since 9x/ME are not pre-emptively multitasking,
  2851. # you end up with a "frozen" computer, even though with patience
  2852. # the test eventually succeeds (with a max line length of 256k).
  2853. # Instead, let's just punt: use the minimum linelength reported by
  2854. # all of the supported platforms: 8192 (on NT/2K/XP).
  2855. lt_cv_sys_max_cmd_len=8192;
  2856. ;;
  2857. mint*)
  2858. # On MiNT this can take a long time and run out of memory.
  2859. lt_cv_sys_max_cmd_len=8192;
  2860. ;;
  2861. amigaos*)
  2862. # On AmigaOS with pdksh, this test takes hours, literally.
  2863. # So we just punt and use a minimum line length of 8192.
  2864. lt_cv_sys_max_cmd_len=8192;
  2865. ;;
  2866. bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
  2867. # This has been around since 386BSD, at least. Likely further.
  2868. if test -x /sbin/sysctl; then
  2869. lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
  2870. elif test -x /usr/sbin/sysctl; then
  2871. lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
  2872. else
  2873. lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
  2874. fi
  2875. # And add a safety zone
  2876. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  2877. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  2878. ;;
  2879. interix*)
  2880. # We know the value 262144 and hardcode it with a safety zone (like BSD)
  2881. lt_cv_sys_max_cmd_len=196608
  2882. ;;
  2883. os2*)
  2884. # The test takes a long time on OS/2.
  2885. lt_cv_sys_max_cmd_len=8192
  2886. ;;
  2887. osf*)
  2888. # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
  2889. # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
  2890. # nice to cause kernel panics so lets avoid the loop below.
  2891. # First set a reasonable default.
  2892. lt_cv_sys_max_cmd_len=16384
  2893. #
  2894. if test -x /sbin/sysconfig; then
  2895. case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
  2896. *1*) lt_cv_sys_max_cmd_len=-1 ;;
  2897. esac
  2898. fi
  2899. ;;
  2900. sco3.2v5*)
  2901. lt_cv_sys_max_cmd_len=102400
  2902. ;;
  2903. sysv5* | sco5v6* | sysv4.2uw2*)
  2904. kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
  2905. if test -n "$kargmax"; then
  2906. lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
  2907. else
  2908. lt_cv_sys_max_cmd_len=32768
  2909. fi
  2910. ;;
  2911. *)
  2912. lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
  2913. if test -n "$lt_cv_sys_max_cmd_len" && \
  2914. test undefined != "$lt_cv_sys_max_cmd_len"; then
  2915. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  2916. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  2917. else
  2918. # Make teststring a little bigger before we do anything with it.
  2919. # a 1K string should be a reasonable start.
  2920. for i in 1 2 3 4 5 6 7 8; do
  2921. teststring=$teststring$teststring
  2922. done
  2923. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
  2924. # If test is not a shell built-in, we'll probably end up computing a
  2925. # maximum length that is only half of the actual maximum length, but
  2926. # we can't tell.
  2927. while { test X`env echo "$teststring$teststring" 2>/dev/null` \
  2928. = "X$teststring$teststring"; } >/dev/null 2>&1 &&
  2929. test 17 != "$i" # 1/2 MB should be enough
  2930. do
  2931. i=`expr $i + 1`
  2932. teststring=$teststring$teststring
  2933. done
  2934. # Only check the string length outside the loop.
  2935. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
  2936. teststring=
  2937. # Add a significant safety factor because C++ compilers can tack on
  2938. # massive amounts of additional arguments before passing them to the
  2939. # linker. It appears as though 1/2 is a usable value.
  2940. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
  2941. fi
  2942. ;;
  2943. esac
  2944. ])
  2945. if test -n "$lt_cv_sys_max_cmd_len"; then
  2946. AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
  2947. else
  2948. AC_MSG_RESULT(none)
  2949. fi
  2950. max_cmd_len=$lt_cv_sys_max_cmd_len
  2951. _LT_DECL([], [max_cmd_len], [0],
  2952. [What is the maximum length of a command?])
  2953. ])# LT_CMD_MAX_LEN
  2954. # Old name:
  2955. AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
  2956. dnl aclocal-1.4 backwards compatibility:
  2957. dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
  2958. # _LT_HEADER_DLFCN
  2959. # ----------------
  2960. m4_defun([_LT_HEADER_DLFCN],
  2961. [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
  2962. ])# _LT_HEADER_DLFCN
  2963. # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
  2964. # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
  2965. # ----------------------------------------------------------------
  2966. m4_defun([_LT_TRY_DLOPEN_SELF],
  2967. [m4_require([_LT_HEADER_DLFCN])dnl
  2968. if test yes = "$cross_compiling"; then :
  2969. [$4]
  2970. else
  2971. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  2972. lt_status=$lt_dlunknown
  2973. cat > conftest.$ac_ext <<_LT_EOF
  2974. [#line $LINENO "configure"
  2975. #include "confdefs.h"
  2976. #if HAVE_DLFCN_H
  2977. #include <dlfcn.h>
  2978. #endif
  2979. #include <stdio.h>
  2980. #ifdef RTLD_GLOBAL
  2981. # define LT_DLGLOBAL RTLD_GLOBAL
  2982. #else
  2983. # ifdef DL_GLOBAL
  2984. # define LT_DLGLOBAL DL_GLOBAL
  2985. # else
  2986. # define LT_DLGLOBAL 0
  2987. # endif
  2988. #endif
  2989. /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
  2990. find out it does not work in some platform. */
  2991. #ifndef LT_DLLAZY_OR_NOW
  2992. # ifdef RTLD_LAZY
  2993. # define LT_DLLAZY_OR_NOW RTLD_LAZY
  2994. # else
  2995. # ifdef DL_LAZY
  2996. # define LT_DLLAZY_OR_NOW DL_LAZY
  2997. # else
  2998. # ifdef RTLD_NOW
  2999. # define LT_DLLAZY_OR_NOW RTLD_NOW
  3000. # else
  3001. # ifdef DL_NOW
  3002. # define LT_DLLAZY_OR_NOW DL_NOW
  3003. # else
  3004. # define LT_DLLAZY_OR_NOW 0
  3005. # endif
  3006. # endif
  3007. # endif
  3008. # endif
  3009. #endif
  3010. /* When -fvisibility=hidden is used, assume the code has been annotated
  3011. correspondingly for the symbols needed. */
  3012. #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
  3013. int fnord () __attribute__((visibility("default")));
  3014. #endif
  3015. int fnord () { return 42; }
  3016. int main ()
  3017. {
  3018. void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  3019. int status = $lt_dlunknown;
  3020. if (self)
  3021. {
  3022. if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
  3023. else
  3024. {
  3025. if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
  3026. else puts (dlerror ());
  3027. }
  3028. /* dlclose (self); */
  3029. }
  3030. else
  3031. puts (dlerror ());
  3032. return status;
  3033. }]
  3034. _LT_EOF
  3035. if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
  3036. (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
  3037. lt_status=$?
  3038. case x$lt_status in
  3039. x$lt_dlno_uscore) $1 ;;
  3040. x$lt_dlneed_uscore) $2 ;;
  3041. x$lt_dlunknown|x*) $3 ;;
  3042. esac
  3043. else :
  3044. # compilation failed
  3045. $3
  3046. fi
  3047. fi
  3048. rm -fr conftest*
  3049. ])# _LT_TRY_DLOPEN_SELF
  3050. # LT_SYS_DLOPEN_SELF
  3051. # ------------------
  3052. AC_DEFUN([LT_SYS_DLOPEN_SELF],
  3053. [m4_require([_LT_HEADER_DLFCN])dnl
  3054. if test yes != "$enable_dlopen"; then
  3055. enable_dlopen=unknown
  3056. enable_dlopen_self=unknown
  3057. enable_dlopen_self_static=unknown
  3058. else
  3059. lt_cv_dlopen=no
  3060. lt_cv_dlopen_libs=
  3061. case $host_os in
  3062. beos*)
  3063. lt_cv_dlopen=load_add_on
  3064. lt_cv_dlopen_libs=
  3065. lt_cv_dlopen_self=yes
  3066. ;;
  3067. mingw* | pw32* | cegcc*)
  3068. lt_cv_dlopen=LoadLibrary
  3069. lt_cv_dlopen_libs=
  3070. ;;
  3071. cygwin*)
  3072. lt_cv_dlopen=dlopen
  3073. lt_cv_dlopen_libs=
  3074. ;;
  3075. darwin*)
  3076. # if libdl is installed we need to link against it
  3077. AC_CHECK_LIB([dl], [dlopen],
  3078. [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
  3079. lt_cv_dlopen=dyld
  3080. lt_cv_dlopen_libs=
  3081. lt_cv_dlopen_self=yes
  3082. ])
  3083. ;;
  3084. tpf*)
  3085. # Don't try to run any link tests for TPF. We know it's impossible
  3086. # because TPF is a cross-compiler, and we know how we open DSOs.
  3087. lt_cv_dlopen=dlopen
  3088. lt_cv_dlopen_libs=
  3089. lt_cv_dlopen_self=no
  3090. ;;
  3091. *)
  3092. AC_CHECK_FUNC([shl_load],
  3093. [lt_cv_dlopen=shl_load],
  3094. [AC_CHECK_LIB([dld], [shl_load],
  3095. [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
  3096. [AC_CHECK_FUNC([dlopen],
  3097. [lt_cv_dlopen=dlopen],
  3098. [AC_CHECK_LIB([dl], [dlopen],
  3099. [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
  3100. [AC_CHECK_LIB([svld], [dlopen],
  3101. [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
  3102. [AC_CHECK_LIB([dld], [dld_link],
  3103. [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
  3104. ])
  3105. ])
  3106. ])
  3107. ])
  3108. ])
  3109. ;;
  3110. esac
  3111. if test no = "$lt_cv_dlopen"; then
  3112. enable_dlopen=no
  3113. else
  3114. enable_dlopen=yes
  3115. fi
  3116. case $lt_cv_dlopen in
  3117. dlopen)
  3118. save_CPPFLAGS=$CPPFLAGS
  3119. test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  3120. save_LDFLAGS=$LDFLAGS
  3121. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  3122. save_LIBS=$LIBS
  3123. LIBS="$lt_cv_dlopen_libs $LIBS"
  3124. AC_CACHE_CHECK([whether a program can dlopen itself],
  3125. lt_cv_dlopen_self, [dnl
  3126. _LT_TRY_DLOPEN_SELF(
  3127. lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
  3128. lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
  3129. ])
  3130. if test yes = "$lt_cv_dlopen_self"; then
  3131. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
  3132. AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
  3133. lt_cv_dlopen_self_static, [dnl
  3134. _LT_TRY_DLOPEN_SELF(
  3135. lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
  3136. lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
  3137. ])
  3138. fi
  3139. CPPFLAGS=$save_CPPFLAGS
  3140. LDFLAGS=$save_LDFLAGS
  3141. LIBS=$save_LIBS
  3142. ;;
  3143. esac
  3144. case $lt_cv_dlopen_self in
  3145. yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  3146. *) enable_dlopen_self=unknown ;;
  3147. esac
  3148. case $lt_cv_dlopen_self_static in
  3149. yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  3150. *) enable_dlopen_self_static=unknown ;;
  3151. esac
  3152. fi
  3153. _LT_DECL([dlopen_support], [enable_dlopen], [0],
  3154. [Whether dlopen is supported])
  3155. _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
  3156. [Whether dlopen of programs is supported])
  3157. _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
  3158. [Whether dlopen of statically linked programs is supported])
  3159. ])# LT_SYS_DLOPEN_SELF
  3160. # Old name:
  3161. AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
  3162. dnl aclocal-1.4 backwards compatibility:
  3163. dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
  3164. # _LT_COMPILER_C_O([TAGNAME])
  3165. # ---------------------------
  3166. # Check to see if options -c and -o are simultaneously supported by compiler.
  3167. # This macro does not hard code the compiler like AC_PROG_CC_C_O.
  3168. m4_defun([_LT_COMPILER_C_O],
  3169. [m4_require([_LT_DECL_SED])dnl
  3170. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  3171. m4_require([_LT_TAG_COMPILER])dnl
  3172. AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
  3173. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
  3174. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
  3175. $RM -r conftest 2>/dev/null
  3176. mkdir conftest
  3177. cd conftest
  3178. mkdir out
  3179. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  3180. lt_compiler_flag="-o out/conftest2.$ac_objext"
  3181. # Insert the option either (1) after the last *FLAGS variable, or
  3182. # (2) before a word containing "conftest.", or (3) at the end.
  3183. # Note that $ac_compile itself does not contain backslashes and begins
  3184. # with a dollar sign (not a hyphen), so the echo should work correctly.
  3185. lt_compile=`echo "$ac_compile" | $SED \
  3186. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  3187. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  3188. -e 's:$: $lt_compiler_flag:'`
  3189. (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  3190. (eval "$lt_compile" 2>out/conftest.err)
  3191. ac_status=$?
  3192. cat out/conftest.err >&AS_MESSAGE_LOG_FD
  3193. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  3194. if (exit $ac_status) && test -s out/conftest2.$ac_objext
  3195. then
  3196. # The compiler can only warn and ignore the option if not recognized
  3197. # So say no if there are warnings
  3198. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
  3199. $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
  3200. if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
  3201. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  3202. fi
  3203. fi
  3204. chmod u+w . 2>&AS_MESSAGE_LOG_FD
  3205. $RM conftest*
  3206. # SGI C++ compiler will create directory out/ii_files/ for
  3207. # template instantiation
  3208. test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
  3209. $RM out/* && rmdir out
  3210. cd ..
  3211. $RM -r conftest
  3212. $RM conftest*
  3213. ])
  3214. _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
  3215. [Does compiler simultaneously support -c and -o options?])
  3216. ])# _LT_COMPILER_C_O
  3217. # _LT_COMPILER_FILE_LOCKS([TAGNAME])
  3218. # ----------------------------------
  3219. # Check to see if we can do hard links to lock some files if needed
  3220. m4_defun([_LT_COMPILER_FILE_LOCKS],
  3221. [m4_require([_LT_ENABLE_LOCK])dnl
  3222. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  3223. _LT_COMPILER_C_O([$1])
  3224. hard_links=nottested
  3225. if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
  3226. # do not overwrite the value of need_locks provided by the user
  3227. AC_MSG_CHECKING([if we can lock with hard links])
  3228. hard_links=yes
  3229. $RM conftest*
  3230. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  3231. touch conftest.a
  3232. ln conftest.a conftest.b 2>&5 || hard_links=no
  3233. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  3234. AC_MSG_RESULT([$hard_links])
  3235. if test no = "$hard_links"; then
  3236. AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
  3237. need_locks=warn
  3238. fi
  3239. else
  3240. need_locks=no
  3241. fi
  3242. _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
  3243. ])# _LT_COMPILER_FILE_LOCKS
  3244. # _LT_CHECK_OBJDIR
  3245. # ----------------
  3246. m4_defun([_LT_CHECK_OBJDIR],
  3247. [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
  3248. [rm -f .libs 2>/dev/null
  3249. mkdir .libs 2>/dev/null
  3250. if test -d .libs; then
  3251. lt_cv_objdir=.libs
  3252. else
  3253. # MS-DOS does not allow filenames that begin with a dot.
  3254. lt_cv_objdir=_libs
  3255. fi
  3256. rmdir .libs 2>/dev/null])
  3257. objdir=$lt_cv_objdir
  3258. _LT_DECL([], [objdir], [0],
  3259. [The name of the directory that contains temporary libtool files])dnl
  3260. m4_pattern_allow([LT_OBJDIR])dnl
  3261. AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
  3262. [Define to the sub-directory where libtool stores uninstalled libraries.])
  3263. ])# _LT_CHECK_OBJDIR
  3264. # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
  3265. # --------------------------------------
  3266. # Check hardcoding attributes.
  3267. m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
  3268. [AC_MSG_CHECKING([how to hardcode library paths into programs])
  3269. _LT_TAGVAR(hardcode_action, $1)=
  3270. if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
  3271. test -n "$_LT_TAGVAR(runpath_var, $1)" ||
  3272. test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
  3273. # We can hardcode non-existent directories.
  3274. if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
  3275. # If the only mechanism to avoid hardcoding is shlibpath_var, we
  3276. # have to relink, otherwise we might link with an installed library
  3277. # when we should be linking with a yet-to-be-installed one
  3278. ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
  3279. test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
  3280. # Linking always hardcodes the temporary library directory.
  3281. _LT_TAGVAR(hardcode_action, $1)=relink
  3282. else
  3283. # We can link without hardcoding, and we can hardcode nonexisting dirs.
  3284. _LT_TAGVAR(hardcode_action, $1)=immediate
  3285. fi
  3286. else
  3287. # We cannot hardcode anything, or else we can only hardcode existing
  3288. # directories.
  3289. _LT_TAGVAR(hardcode_action, $1)=unsupported
  3290. fi
  3291. AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
  3292. if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
  3293. test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
  3294. # Fast installation is not supported
  3295. enable_fast_install=no
  3296. elif test yes = "$shlibpath_overrides_runpath" ||
  3297. test no = "$enable_shared"; then
  3298. # Fast installation is not necessary
  3299. enable_fast_install=needless
  3300. fi
  3301. _LT_TAGDECL([], [hardcode_action], [0],
  3302. [How to hardcode a shared library path into an executable])
  3303. ])# _LT_LINKER_HARDCODE_LIBPATH
  3304. # _LT_CMD_STRIPLIB
  3305. # ----------------
  3306. m4_defun([_LT_CMD_STRIPLIB],
  3307. [m4_require([_LT_DECL_EGREP])
  3308. striplib=
  3309. old_striplib=
  3310. AC_MSG_CHECKING([whether stripping libraries is possible])
  3311. if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
  3312. test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
  3313. test -z "$striplib" && striplib="$STRIP --strip-unneeded"
  3314. AC_MSG_RESULT([yes])
  3315. else
  3316. # FIXME - insert some real tests, host_os isn't really good enough
  3317. case $host_os in
  3318. darwin*)
  3319. if test -n "$STRIP"; then
  3320. striplib="$STRIP -x"
  3321. old_striplib="$STRIP -S"
  3322. AC_MSG_RESULT([yes])
  3323. else
  3324. AC_MSG_RESULT([no])
  3325. fi
  3326. ;;
  3327. *)
  3328. AC_MSG_RESULT([no])
  3329. ;;
  3330. esac
  3331. fi
  3332. _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
  3333. _LT_DECL([], [striplib], [1])
  3334. ])# _LT_CMD_STRIPLIB
  3335. # _LT_PREPARE_MUNGE_PATH_LIST
  3336. # ---------------------------
  3337. # Make sure func_munge_path_list() is defined correctly.
  3338. m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
  3339. [[# func_munge_path_list VARIABLE PATH
  3340. # -----------------------------------
  3341. # VARIABLE is name of variable containing _space_ separated list of
  3342. # directories to be munged by the contents of PATH, which is string
  3343. # having a format:
  3344. # "DIR[:DIR]:"
  3345. # string "DIR[ DIR]" will be prepended to VARIABLE
  3346. # ":DIR[:DIR]"
  3347. # string "DIR[ DIR]" will be appended to VARIABLE
  3348. # "DIRP[:DIRP]::[DIRA:]DIRA"
  3349. # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
  3350. # "DIRA[ DIRA]" will be appended to VARIABLE
  3351. # "DIR[:DIR]"
  3352. # VARIABLE will be replaced by "DIR[ DIR]"
  3353. func_munge_path_list ()
  3354. {
  3355. case x@S|@2 in
  3356. x)
  3357. ;;
  3358. *:)
  3359. eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
  3360. ;;
  3361. x:*)
  3362. eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
  3363. ;;
  3364. *::*)
  3365. eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
  3366. eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
  3367. ;;
  3368. *)
  3369. eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
  3370. ;;
  3371. esac
  3372. }
  3373. ]])# _LT_PREPARE_PATH_LIST
  3374. # _LT_SYS_DYNAMIC_LINKER([TAG])
  3375. # -----------------------------
  3376. # PORTME Fill in your ld.so characteristics
  3377. m4_defun([_LT_SYS_DYNAMIC_LINKER],
  3378. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3379. m4_require([_LT_DECL_EGREP])dnl
  3380. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  3381. m4_require([_LT_DECL_OBJDUMP])dnl
  3382. m4_require([_LT_DECL_SED])dnl
  3383. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  3384. m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
  3385. AC_MSG_CHECKING([dynamic linker characteristics])
  3386. m4_if([$1],
  3387. [], [
  3388. if test yes = "$GCC"; then
  3389. case $host_os in
  3390. darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
  3391. *) lt_awk_arg='/^libraries:/' ;;
  3392. esac
  3393. case $host_os in
  3394. mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
  3395. *) lt_sed_strip_eq='s|=/|/|g' ;;
  3396. esac
  3397. lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
  3398. case $lt_search_path_spec in
  3399. *\;*)
  3400. # if the path contains ";" then we assume it to be the separator
  3401. # otherwise default to the standard path separator (i.e. ":") - it is
  3402. # assumed that no part of a normal pathname contains ";" but that should
  3403. # okay in the real world where ";" in dirpaths is itself problematic.
  3404. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
  3405. ;;
  3406. *)
  3407. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
  3408. ;;
  3409. esac
  3410. # Ok, now we have the path, separated by spaces, we can step through it
  3411. # and add multilib dir if necessary...
  3412. lt_tmp_lt_search_path_spec=
  3413. lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
  3414. # ...but if some path component already ends with the multilib dir we assume
  3415. # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
  3416. case "$lt_multi_os_dir; $lt_search_path_spec " in
  3417. "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
  3418. lt_multi_os_dir=
  3419. ;;
  3420. esac
  3421. for lt_sys_path in $lt_search_path_spec; do
  3422. if test -d "$lt_sys_path$lt_multi_os_dir"; then
  3423. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
  3424. elif test -n "$lt_multi_os_dir"; then
  3425. test -d "$lt_sys_path" && \
  3426. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
  3427. fi
  3428. done
  3429. lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
  3430. BEGIN {RS = " "; FS = "/|\n";} {
  3431. lt_foo = "";
  3432. lt_count = 0;
  3433. for (lt_i = NF; lt_i > 0; lt_i--) {
  3434. if ($lt_i != "" && $lt_i != ".") {
  3435. if ($lt_i == "..") {
  3436. lt_count++;
  3437. } else {
  3438. if (lt_count == 0) {
  3439. lt_foo = "/" $lt_i lt_foo;
  3440. } else {
  3441. lt_count--;
  3442. }
  3443. }
  3444. }
  3445. }
  3446. if (lt_foo != "") { lt_freq[[lt_foo]]++; }
  3447. if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
  3448. }'`
  3449. # AWK program above erroneously prepends '/' to C:/dos/paths
  3450. # for these hosts.
  3451. case $host_os in
  3452. mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
  3453. $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
  3454. esac
  3455. sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
  3456. else
  3457. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  3458. fi])
  3459. library_names_spec=
  3460. libname_spec='lib$name'
  3461. soname_spec=
  3462. shrext_cmds=.so
  3463. postinstall_cmds=
  3464. postuninstall_cmds=
  3465. finish_cmds=
  3466. finish_eval=
  3467. shlibpath_var=
  3468. shlibpath_overrides_runpath=unknown
  3469. version_type=none
  3470. dynamic_linker="$host_os ld.so"
  3471. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  3472. need_lib_prefix=unknown
  3473. hardcode_into_libs=no
  3474. # when you set need_version to no, make sure it does not cause -set_version
  3475. # flags to be left without arguments
  3476. need_version=unknown
  3477. AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
  3478. [User-defined run-time library search path.])
  3479. case $host_os in
  3480. aix3*)
  3481. version_type=linux # correct to gnu/linux during the next big refactor
  3482. library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
  3483. shlibpath_var=LIBPATH
  3484. # AIX 3 has no versioning support, so we append a major version to the name.
  3485. soname_spec='$libname$release$shared_ext$major'
  3486. ;;
  3487. aix[[4-9]]*)
  3488. version_type=linux # correct to gnu/linux during the next big refactor
  3489. need_lib_prefix=no
  3490. need_version=no
  3491. hardcode_into_libs=yes
  3492. if test ia64 = "$host_cpu"; then
  3493. # AIX 5 supports IA64
  3494. library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
  3495. shlibpath_var=LD_LIBRARY_PATH
  3496. else
  3497. # With GCC up to 2.95.x, collect2 would create an import file
  3498. # for dependence libraries. The import file would start with
  3499. # the line '#! .'. This would cause the generated library to
  3500. # depend on '.', always an invalid library. This was fixed in
  3501. # development snapshots of GCC prior to 3.0.
  3502. case $host_os in
  3503. aix4 | aix4.[[01]] | aix4.[[01]].*)
  3504. if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
  3505. echo ' yes '
  3506. echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
  3507. :
  3508. else
  3509. can_build_shared=no
  3510. fi
  3511. ;;
  3512. esac
  3513. # Using Import Files as archive members, it is possible to support
  3514. # filename-based versioning of shared library archives on AIX. While
  3515. # this would work for both with and without runtime linking, it will
  3516. # prevent static linking of such archives. So we do filename-based
  3517. # shared library versioning with .so extension only, which is used
  3518. # when both runtime linking and shared linking is enabled.
  3519. # Unfortunately, runtime linking may impact performance, so we do
  3520. # not want this to be the default eventually. Also, we use the
  3521. # versioned .so libs for executables only if there is the -brtl
  3522. # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
  3523. # To allow for filename-based versioning support, we need to create
  3524. # libNAME.so.V as an archive file, containing:
  3525. # *) an Import File, referring to the versioned filename of the
  3526. # archive as well as the shared archive member, telling the
  3527. # bitwidth (32 or 64) of that shared object, and providing the
  3528. # list of exported symbols of that shared object, eventually
  3529. # decorated with the 'weak' keyword
  3530. # *) the shared object with the F_LOADONLY flag set, to really avoid
  3531. # it being seen by the linker.
  3532. # At run time we better use the real file rather than another symlink,
  3533. # but for link time we create the symlink libNAME.so -> libNAME.so.V
  3534. case $with_aix_soname,$aix_use_runtimelinking in
  3535. # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
  3536. # soname into executable. Probably we can add versioning support to
  3537. # collect2, so additional links can be useful in future.
  3538. aix,yes) # traditional libtool
  3539. dynamic_linker='AIX unversionable lib.so'
  3540. # If using run time linking (on AIX 4.2 or later) use lib<name>.so
  3541. # instead of lib<name>.a to let people know that these are not
  3542. # typical AIX shared libraries.
  3543. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  3544. ;;
  3545. aix,no) # traditional AIX only
  3546. dynamic_linker='AIX lib.a[(]lib.so.V[)]'
  3547. # We preserve .a as extension for shared libraries through AIX4.2
  3548. # and later when we are not doing run time linking.
  3549. library_names_spec='$libname$release.a $libname.a'
  3550. soname_spec='$libname$release$shared_ext$major'
  3551. ;;
  3552. svr4,*) # full svr4 only
  3553. dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
  3554. library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
  3555. # We do not specify a path in Import Files, so LIBPATH fires.
  3556. shlibpath_overrides_runpath=yes
  3557. ;;
  3558. *,yes) # both, prefer svr4
  3559. dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
  3560. library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
  3561. # unpreferred sharedlib libNAME.a needs extra handling
  3562. 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"'
  3563. 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"'
  3564. # We do not specify a path in Import Files, so LIBPATH fires.
  3565. shlibpath_overrides_runpath=yes
  3566. ;;
  3567. *,no) # both, prefer aix
  3568. dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
  3569. library_names_spec='$libname$release.a $libname.a'
  3570. soname_spec='$libname$release$shared_ext$major'
  3571. # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
  3572. 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)'
  3573. 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"'
  3574. ;;
  3575. esac
  3576. shlibpath_var=LIBPATH
  3577. fi
  3578. ;;
  3579. amigaos*)
  3580. case $host_cpu in
  3581. powerpc)
  3582. # Since July 2007 AmigaOS4 officially supports .so libraries.
  3583. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
  3584. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  3585. ;;
  3586. m68k)
  3587. library_names_spec='$libname.ixlibrary $libname.a'
  3588. # Create ${libname}_ixlibrary.a entries in /sys/libs.
  3589. 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'
  3590. ;;
  3591. esac
  3592. ;;
  3593. beos*)
  3594. library_names_spec='$libname$shared_ext'
  3595. dynamic_linker="$host_os ld.so"
  3596. shlibpath_var=LIBRARY_PATH
  3597. ;;
  3598. bsdi[[45]]*)
  3599. version_type=linux # correct to gnu/linux during the next big refactor
  3600. need_version=no
  3601. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  3602. soname_spec='$libname$release$shared_ext$major'
  3603. finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  3604. shlibpath_var=LD_LIBRARY_PATH
  3605. sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  3606. sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  3607. # the default ld.so.conf also contains /usr/contrib/lib and
  3608. # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  3609. # libtool to hard-code these into programs
  3610. ;;
  3611. cygwin* | mingw* | pw32* | cegcc*)
  3612. version_type=windows
  3613. shrext_cmds=.dll
  3614. need_version=no
  3615. need_lib_prefix=no
  3616. case $GCC,$cc_basename in
  3617. yes,*)
  3618. # gcc
  3619. library_names_spec='$libname.dll.a'
  3620. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  3621. postinstall_cmds='base_file=`basename \$file`~
  3622. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
  3623. dldir=$destdir/`dirname \$dlpath`~
  3624. test -d \$dldir || mkdir -p \$dldir~
  3625. $install_prog $dir/$dlname \$dldir/$dlname~
  3626. chmod a+x \$dldir/$dlname~
  3627. if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
  3628. eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
  3629. fi'
  3630. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  3631. dlpath=$dir/\$dldll~
  3632. $RM \$dlpath'
  3633. shlibpath_overrides_runpath=yes
  3634. case $host_os in
  3635. cygwin*)
  3636. # Cygwin DLLs use 'cyg' prefix rather than 'lib'
  3637. soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
  3638. m4_if([$1], [],[
  3639. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
  3640. ;;
  3641. mingw* | cegcc*)
  3642. # MinGW DLLs use traditional 'lib' prefix
  3643. soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
  3644. ;;
  3645. pw32*)
  3646. # pw32 DLLs use 'pw' prefix rather than 'lib'
  3647. library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
  3648. ;;
  3649. esac
  3650. dynamic_linker='Win32 ld.exe'
  3651. ;;
  3652. *,cl*)
  3653. # Native MSVC
  3654. libname_spec='$name'
  3655. soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
  3656. library_names_spec='$libname.dll.lib'
  3657. case $build_os in
  3658. mingw*)
  3659. sys_lib_search_path_spec=
  3660. lt_save_ifs=$IFS
  3661. IFS=';'
  3662. for lt_path in $LIB
  3663. do
  3664. IFS=$lt_save_ifs
  3665. # Let DOS variable expansion print the short 8.3 style file name.
  3666. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
  3667. sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
  3668. done
  3669. IFS=$lt_save_ifs
  3670. # Convert to MSYS style.
  3671. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
  3672. ;;
  3673. cygwin*)
  3674. # Convert to unix form, then to dos form, then back to unix form
  3675. # but this time dos style (no spaces!) so that the unix form looks
  3676. # like /cygdrive/c/PROGRA~1:/cygdr...
  3677. sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
  3678. sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
  3679. sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  3680. ;;
  3681. *)
  3682. sys_lib_search_path_spec=$LIB
  3683. if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
  3684. # It is most probably a Windows format PATH.
  3685. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  3686. else
  3687. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  3688. fi
  3689. # FIXME: find the short name or the path components, as spaces are
  3690. # common. (e.g. "Program Files" -> "PROGRA~1")
  3691. ;;
  3692. esac
  3693. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  3694. postinstall_cmds='base_file=`basename \$file`~
  3695. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
  3696. dldir=$destdir/`dirname \$dlpath`~
  3697. test -d \$dldir || mkdir -p \$dldir~
  3698. $install_prog $dir/$dlname \$dldir/$dlname'
  3699. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  3700. dlpath=$dir/\$dldll~
  3701. $RM \$dlpath'
  3702. shlibpath_overrides_runpath=yes
  3703. dynamic_linker='Win32 link.exe'
  3704. ;;
  3705. *)
  3706. # Assume MSVC wrapper
  3707. library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
  3708. dynamic_linker='Win32 ld.exe'
  3709. ;;
  3710. esac
  3711. # FIXME: first we should search . and the directory the executable is in
  3712. shlibpath_var=PATH
  3713. ;;
  3714. darwin* | rhapsody*)
  3715. dynamic_linker="$host_os dyld"
  3716. version_type=darwin
  3717. need_lib_prefix=no
  3718. need_version=no
  3719. library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
  3720. soname_spec='$libname$release$major$shared_ext'
  3721. shlibpath_overrides_runpath=yes
  3722. shlibpath_var=DYLD_LIBRARY_PATH
  3723. shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
  3724. m4_if([$1], [],[
  3725. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
  3726. sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
  3727. ;;
  3728. dgux*)
  3729. version_type=linux # correct to gnu/linux during the next big refactor
  3730. need_lib_prefix=no
  3731. need_version=no
  3732. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  3733. soname_spec='$libname$release$shared_ext$major'
  3734. shlibpath_var=LD_LIBRARY_PATH
  3735. ;;
  3736. freebsd* | dragonfly*)
  3737. # DragonFly does not have aout. When/if they implement a new
  3738. # versioning mechanism, adjust this.
  3739. if test -x /usr/bin/objformat; then
  3740. objformat=`/usr/bin/objformat`
  3741. else
  3742. case $host_os in
  3743. freebsd[[23]].*) objformat=aout ;;
  3744. *) objformat=elf ;;
  3745. esac
  3746. fi
  3747. version_type=freebsd-$objformat
  3748. case $version_type in
  3749. freebsd-elf*)
  3750. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  3751. soname_spec='$libname$release$shared_ext$major'
  3752. need_version=no
  3753. need_lib_prefix=no
  3754. ;;
  3755. freebsd-*)
  3756. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  3757. need_version=yes
  3758. ;;
  3759. esac
  3760. shlibpath_var=LD_LIBRARY_PATH
  3761. case $host_os in
  3762. freebsd2.*)
  3763. shlibpath_overrides_runpath=yes
  3764. ;;
  3765. freebsd3.[[01]]* | freebsdelf3.[[01]]*)
  3766. shlibpath_overrides_runpath=yes
  3767. hardcode_into_libs=yes
  3768. ;;
  3769. freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
  3770. freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
  3771. shlibpath_overrides_runpath=no
  3772. hardcode_into_libs=yes
  3773. ;;
  3774. *) # from 4.6 on, and DragonFly
  3775. shlibpath_overrides_runpath=yes
  3776. hardcode_into_libs=yes
  3777. ;;
  3778. esac
  3779. ;;
  3780. haiku*)
  3781. version_type=linux # correct to gnu/linux during the next big refactor
  3782. need_lib_prefix=no
  3783. need_version=no
  3784. dynamic_linker="$host_os runtime_loader"
  3785. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  3786. soname_spec='$libname$release$shared_ext$major'
  3787. shlibpath_var=LIBRARY_PATH
  3788. shlibpath_overrides_runpath=no
  3789. sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
  3790. hardcode_into_libs=yes
  3791. ;;
  3792. hpux9* | hpux10* | hpux11*)
  3793. # Give a soname corresponding to the major version so that dld.sl refuses to
  3794. # link against other versions.
  3795. version_type=sunos
  3796. need_lib_prefix=no
  3797. need_version=no
  3798. case $host_cpu in
  3799. ia64*)
  3800. shrext_cmds='.so'
  3801. hardcode_into_libs=yes
  3802. dynamic_linker="$host_os dld.so"
  3803. shlibpath_var=LD_LIBRARY_PATH
  3804. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  3805. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  3806. soname_spec='$libname$release$shared_ext$major'
  3807. if test 32 = "$HPUX_IA64_MODE"; then
  3808. sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
  3809. sys_lib_dlsearch_path_spec=/usr/lib/hpux32
  3810. else
  3811. sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
  3812. sys_lib_dlsearch_path_spec=/usr/lib/hpux64
  3813. fi
  3814. ;;
  3815. hppa*64*)
  3816. shrext_cmds='.sl'
  3817. hardcode_into_libs=yes
  3818. dynamic_linker="$host_os dld.sl"
  3819. shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
  3820. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  3821. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  3822. soname_spec='$libname$release$shared_ext$major'
  3823. sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
  3824. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  3825. ;;
  3826. *)
  3827. shrext_cmds='.sl'
  3828. dynamic_linker="$host_os dld.sl"
  3829. shlibpath_var=SHLIB_PATH
  3830. shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  3831. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  3832. soname_spec='$libname$release$shared_ext$major'
  3833. ;;
  3834. esac
  3835. # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
  3836. postinstall_cmds='chmod 555 $lib'
  3837. # or fails outright, so override atomically:
  3838. install_override_mode=555
  3839. ;;
  3840. interix[[3-9]]*)
  3841. version_type=linux # correct to gnu/linux during the next big refactor
  3842. need_lib_prefix=no
  3843. need_version=no
  3844. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  3845. soname_spec='$libname$release$shared_ext$major'
  3846. dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
  3847. shlibpath_var=LD_LIBRARY_PATH
  3848. shlibpath_overrides_runpath=no
  3849. hardcode_into_libs=yes
  3850. ;;
  3851. irix5* | irix6* | nonstopux*)
  3852. case $host_os in
  3853. nonstopux*) version_type=nonstopux ;;
  3854. *)
  3855. if test yes = "$lt_cv_prog_gnu_ld"; then
  3856. version_type=linux # correct to gnu/linux during the next big refactor
  3857. else
  3858. version_type=irix
  3859. fi ;;
  3860. esac
  3861. need_lib_prefix=no
  3862. need_version=no
  3863. soname_spec='$libname$release$shared_ext$major'
  3864. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
  3865. case $host_os in
  3866. irix5* | nonstopux*)
  3867. libsuff= shlibsuff=
  3868. ;;
  3869. *)
  3870. case $LD in # libtool.m4 will add one of these switches to LD
  3871. *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
  3872. libsuff= shlibsuff= libmagic=32-bit;;
  3873. *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
  3874. libsuff=32 shlibsuff=N32 libmagic=N32;;
  3875. *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
  3876. libsuff=64 shlibsuff=64 libmagic=64-bit;;
  3877. *) libsuff= shlibsuff= libmagic=never-match;;
  3878. esac
  3879. ;;
  3880. esac
  3881. shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  3882. shlibpath_overrides_runpath=no
  3883. sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
  3884. sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
  3885. hardcode_into_libs=yes
  3886. ;;
  3887. # No shared lib support for Linux oldld, aout, or coff.
  3888. linux*oldld* | linux*aout* | linux*coff*)
  3889. dynamic_linker=no
  3890. ;;
  3891. linux*android*)
  3892. version_type=none # Android doesn't support versioned libraries.
  3893. need_lib_prefix=no
  3894. need_version=no
  3895. library_names_spec='$libname$release$shared_ext'
  3896. soname_spec='$libname$release$shared_ext'
  3897. finish_cmds=
  3898. shlibpath_var=LD_LIBRARY_PATH
  3899. shlibpath_overrides_runpath=yes
  3900. # This implies no fast_install, which is unacceptable.
  3901. # Some rework will be needed to allow for fast_install
  3902. # before this can be enabled.
  3903. hardcode_into_libs=yes
  3904. dynamic_linker='Android linker'
  3905. # Don't embed -rpath directories since the linker doesn't support them.
  3906. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  3907. ;;
  3908. # This must be glibc/ELF.
  3909. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  3910. version_type=linux # correct to gnu/linux during the next big refactor
  3911. need_lib_prefix=no
  3912. need_version=no
  3913. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  3914. soname_spec='$libname$release$shared_ext$major'
  3915. finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  3916. shlibpath_var=LD_LIBRARY_PATH
  3917. shlibpath_overrides_runpath=no
  3918. # Some binutils ld are patched to set DT_RUNPATH
  3919. AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
  3920. [lt_cv_shlibpath_overrides_runpath=no
  3921. save_LDFLAGS=$LDFLAGS
  3922. save_libdir=$libdir
  3923. eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
  3924. LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
  3925. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  3926. [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
  3927. [lt_cv_shlibpath_overrides_runpath=yes])])
  3928. LDFLAGS=$save_LDFLAGS
  3929. libdir=$save_libdir
  3930. ])
  3931. shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
  3932. # This implies no fast_install, which is unacceptable.
  3933. # Some rework will be needed to allow for fast_install
  3934. # before this can be enabled.
  3935. hardcode_into_libs=yes
  3936. # Ideally, we could use ldconfig to report *all* directores which are
  3937. # searched for libraries, however this is still not possible. Aside from not
  3938. # being certain /sbin/ldconfig is available, command
  3939. # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
  3940. # even though it is searched at run-time. Try to do the best guess by
  3941. # appending ld.so.conf contents (and includes) to the search path.
  3942. if test -f /etc/ld.so.conf; then
  3943. 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' ' '`
  3944. sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
  3945. fi
  3946. # We used to test for /lib/ld.so.1 and disable shared libraries on
  3947. # powerpc, because MkLinux only supported shared libraries with the
  3948. # GNU dynamic linker. Since this was broken with cross compilers,
  3949. # most powerpc-linux boxes support dynamic linking these days and
  3950. # people can always --disable-shared, the test was removed, and we
  3951. # assume the GNU/Linux dynamic linker is in use.
  3952. dynamic_linker='GNU/Linux ld.so'
  3953. ;;
  3954. netbsd*)
  3955. version_type=sunos
  3956. need_lib_prefix=no
  3957. need_version=no
  3958. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  3959. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  3960. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  3961. dynamic_linker='NetBSD (a.out) ld.so'
  3962. else
  3963. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  3964. soname_spec='$libname$release$shared_ext$major'
  3965. dynamic_linker='NetBSD ld.elf_so'
  3966. fi
  3967. shlibpath_var=LD_LIBRARY_PATH
  3968. shlibpath_overrides_runpath=yes
  3969. hardcode_into_libs=yes
  3970. ;;
  3971. newsos6)
  3972. version_type=linux # correct to gnu/linux during the next big refactor
  3973. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  3974. shlibpath_var=LD_LIBRARY_PATH
  3975. shlibpath_overrides_runpath=yes
  3976. ;;
  3977. *nto* | *qnx*)
  3978. version_type=qnx
  3979. need_lib_prefix=no
  3980. need_version=no
  3981. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  3982. soname_spec='$libname$release$shared_ext$major'
  3983. shlibpath_var=LD_LIBRARY_PATH
  3984. shlibpath_overrides_runpath=no
  3985. hardcode_into_libs=yes
  3986. dynamic_linker='ldqnx.so'
  3987. ;;
  3988. openbsd* | bitrig*)
  3989. version_type=sunos
  3990. sys_lib_dlsearch_path_spec=/usr/lib
  3991. need_lib_prefix=no
  3992. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
  3993. need_version=no
  3994. else
  3995. need_version=yes
  3996. fi
  3997. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  3998. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  3999. shlibpath_var=LD_LIBRARY_PATH
  4000. shlibpath_overrides_runpath=yes
  4001. ;;
  4002. os2*)
  4003. libname_spec='$name'
  4004. version_type=windows
  4005. shrext_cmds=.dll
  4006. need_version=no
  4007. need_lib_prefix=no
  4008. # OS/2 can only load a DLL with a base name of 8 characters or less.
  4009. soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
  4010. v=$($ECHO $release$versuffix | tr -d .-);
  4011. n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
  4012. $ECHO $n$v`$shared_ext'
  4013. library_names_spec='${libname}_dll.$libext'
  4014. dynamic_linker='OS/2 ld.exe'
  4015. shlibpath_var=BEGINLIBPATH
  4016. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  4017. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  4018. postinstall_cmds='base_file=`basename \$file`~
  4019. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
  4020. dldir=$destdir/`dirname \$dlpath`~
  4021. test -d \$dldir || mkdir -p \$dldir~
  4022. $install_prog $dir/$dlname \$dldir/$dlname~
  4023. chmod a+x \$dldir/$dlname~
  4024. if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
  4025. eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
  4026. fi'
  4027. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
  4028. dlpath=$dir/\$dldll~
  4029. $RM \$dlpath'
  4030. ;;
  4031. osf3* | osf4* | osf5*)
  4032. version_type=osf
  4033. need_lib_prefix=no
  4034. need_version=no
  4035. soname_spec='$libname$release$shared_ext$major'
  4036. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  4037. shlibpath_var=LD_LIBRARY_PATH
  4038. sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  4039. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  4040. ;;
  4041. rdos*)
  4042. dynamic_linker=no
  4043. ;;
  4044. solaris*)
  4045. version_type=linux # correct to gnu/linux during the next big refactor
  4046. need_lib_prefix=no
  4047. need_version=no
  4048. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  4049. soname_spec='$libname$release$shared_ext$major'
  4050. shlibpath_var=LD_LIBRARY_PATH
  4051. shlibpath_overrides_runpath=yes
  4052. hardcode_into_libs=yes
  4053. # ldd complains unless libraries are executable
  4054. postinstall_cmds='chmod +x $lib'
  4055. ;;
  4056. sunos4*)
  4057. version_type=sunos
  4058. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  4059. finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  4060. shlibpath_var=LD_LIBRARY_PATH
  4061. shlibpath_overrides_runpath=yes
  4062. if test yes = "$with_gnu_ld"; then
  4063. need_lib_prefix=no
  4064. fi
  4065. need_version=yes
  4066. ;;
  4067. sysv4 | sysv4.3*)
  4068. version_type=linux # correct to gnu/linux during the next big refactor
  4069. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  4070. soname_spec='$libname$release$shared_ext$major'
  4071. shlibpath_var=LD_LIBRARY_PATH
  4072. case $host_vendor in
  4073. sni)
  4074. shlibpath_overrides_runpath=no
  4075. need_lib_prefix=no
  4076. runpath_var=LD_RUN_PATH
  4077. ;;
  4078. siemens)
  4079. need_lib_prefix=no
  4080. ;;
  4081. motorola)
  4082. need_lib_prefix=no
  4083. need_version=no
  4084. shlibpath_overrides_runpath=no
  4085. sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  4086. ;;
  4087. esac
  4088. ;;
  4089. sysv4*MP*)
  4090. if test -d /usr/nec; then
  4091. version_type=linux # correct to gnu/linux during the next big refactor
  4092. library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
  4093. soname_spec='$libname$shared_ext.$major'
  4094. shlibpath_var=LD_LIBRARY_PATH
  4095. fi
  4096. ;;
  4097. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  4098. version_type=sco
  4099. need_lib_prefix=no
  4100. need_version=no
  4101. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
  4102. soname_spec='$libname$release$shared_ext$major'
  4103. shlibpath_var=LD_LIBRARY_PATH
  4104. shlibpath_overrides_runpath=yes
  4105. hardcode_into_libs=yes
  4106. if test yes = "$with_gnu_ld"; then
  4107. sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
  4108. else
  4109. sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
  4110. case $host_os in
  4111. sco3.2v5*)
  4112. sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
  4113. ;;
  4114. esac
  4115. fi
  4116. sys_lib_dlsearch_path_spec='/usr/lib'
  4117. ;;
  4118. tpf*)
  4119. # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
  4120. version_type=linux # correct to gnu/linux during the next big refactor
  4121. need_lib_prefix=no
  4122. need_version=no
  4123. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  4124. shlibpath_var=LD_LIBRARY_PATH
  4125. shlibpath_overrides_runpath=no
  4126. hardcode_into_libs=yes
  4127. ;;
  4128. uts4*)
  4129. version_type=linux # correct to gnu/linux during the next big refactor
  4130. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  4131. soname_spec='$libname$release$shared_ext$major'
  4132. shlibpath_var=LD_LIBRARY_PATH
  4133. ;;
  4134. *)
  4135. dynamic_linker=no
  4136. ;;
  4137. esac
  4138. AC_MSG_RESULT([$dynamic_linker])
  4139. test no = "$dynamic_linker" && can_build_shared=no
  4140. variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  4141. if test yes = "$GCC"; then
  4142. variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  4143. fi
  4144. if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
  4145. sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
  4146. fi
  4147. if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
  4148. sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
  4149. fi
  4150. # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
  4151. configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
  4152. # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
  4153. func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
  4154. # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
  4155. configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
  4156. _LT_DECL([], [variables_saved_for_relink], [1],
  4157. [Variables whose values should be saved in libtool wrapper scripts and
  4158. restored at link time])
  4159. _LT_DECL([], [need_lib_prefix], [0],
  4160. [Do we need the "lib" prefix for modules?])
  4161. _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
  4162. _LT_DECL([], [version_type], [0], [Library versioning type])
  4163. _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
  4164. _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
  4165. _LT_DECL([], [shlibpath_overrides_runpath], [0],
  4166. [Is shlibpath searched before the hard-coded library search path?])
  4167. _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
  4168. _LT_DECL([], [library_names_spec], [1],
  4169. [[List of archive names. First name is the real one, the rest are links.
  4170. The last name is the one that the linker finds with -lNAME]])
  4171. _LT_DECL([], [soname_spec], [1],
  4172. [[The coded name of the library, if different from the real name]])
  4173. _LT_DECL([], [install_override_mode], [1],
  4174. [Permission mode override for installation of shared libraries])
  4175. _LT_DECL([], [postinstall_cmds], [2],
  4176. [Command to use after installation of a shared archive])
  4177. _LT_DECL([], [postuninstall_cmds], [2],
  4178. [Command to use after uninstallation of a shared archive])
  4179. _LT_DECL([], [finish_cmds], [2],
  4180. [Commands used to finish a libtool library installation in a directory])
  4181. _LT_DECL([], [finish_eval], [1],
  4182. [[As "finish_cmds", except a single script fragment to be evaled but
  4183. not shown]])
  4184. _LT_DECL([], [hardcode_into_libs], [0],
  4185. [Whether we should hardcode library paths into libraries])
  4186. _LT_DECL([], [sys_lib_search_path_spec], [2],
  4187. [Compile-time system search path for libraries])
  4188. _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
  4189. [Detected run-time system search path for libraries])
  4190. _LT_DECL([], [configure_time_lt_sys_library_path], [2],
  4191. [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
  4192. ])# _LT_SYS_DYNAMIC_LINKER
  4193. # _LT_PATH_TOOL_PREFIX(TOOL)
  4194. # --------------------------
  4195. # find a file program that can recognize shared library
  4196. AC_DEFUN([_LT_PATH_TOOL_PREFIX],
  4197. [m4_require([_LT_DECL_EGREP])dnl
  4198. AC_MSG_CHECKING([for $1])
  4199. AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
  4200. [case $MAGIC_CMD in
  4201. [[\\/*] | ?:[\\/]*])
  4202. lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
  4203. ;;
  4204. *)
  4205. lt_save_MAGIC_CMD=$MAGIC_CMD
  4206. lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
  4207. dnl $ac_dummy forces splitting on constant user-supplied paths.
  4208. dnl POSIX.2 word splitting is done only on the output of word expansions,
  4209. dnl not every word. This closes a longstanding sh security hole.
  4210. ac_dummy="m4_if([$2], , $PATH, [$2])"
  4211. for ac_dir in $ac_dummy; do
  4212. IFS=$lt_save_ifs
  4213. test -z "$ac_dir" && ac_dir=.
  4214. if test -f "$ac_dir/$1"; then
  4215. lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
  4216. if test -n "$file_magic_test_file"; then
  4217. case $deplibs_check_method in
  4218. "file_magic "*)
  4219. file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
  4220. MAGIC_CMD=$lt_cv_path_MAGIC_CMD
  4221. if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  4222. $EGREP "$file_magic_regex" > /dev/null; then
  4223. :
  4224. else
  4225. cat <<_LT_EOF 1>&2
  4226. *** Warning: the command libtool uses to detect shared libraries,
  4227. *** $file_magic_cmd, produces output that libtool cannot recognize.
  4228. *** The result is that libtool may fail to recognize shared libraries
  4229. *** as such. This will affect the creation of libtool libraries that
  4230. *** depend on shared libraries, but programs linked with such libtool
  4231. *** libraries will work regardless of this problem. Nevertheless, you
  4232. *** may want to report the problem to your system manager and/or to
  4233. *** bug-libtool@gnu.org
  4234. _LT_EOF
  4235. fi ;;
  4236. esac
  4237. fi
  4238. break
  4239. fi
  4240. done
  4241. IFS=$lt_save_ifs
  4242. MAGIC_CMD=$lt_save_MAGIC_CMD
  4243. ;;
  4244. esac])
  4245. MAGIC_CMD=$lt_cv_path_MAGIC_CMD
  4246. if test -n "$MAGIC_CMD"; then
  4247. AC_MSG_RESULT($MAGIC_CMD)
  4248. else
  4249. AC_MSG_RESULT(no)
  4250. fi
  4251. _LT_DECL([], [MAGIC_CMD], [0],
  4252. [Used to examine libraries when file_magic_cmd begins with "file"])dnl
  4253. ])# _LT_PATH_TOOL_PREFIX
  4254. # Old name:
  4255. AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
  4256. dnl aclocal-1.4 backwards compatibility:
  4257. dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
  4258. # _LT_PATH_MAGIC
  4259. # --------------
  4260. # find a file program that can recognize a shared library
  4261. m4_defun([_LT_PATH_MAGIC],
  4262. [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
  4263. if test -z "$lt_cv_path_MAGIC_CMD"; then
  4264. if test -n "$ac_tool_prefix"; then
  4265. _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
  4266. else
  4267. MAGIC_CMD=:
  4268. fi
  4269. fi
  4270. ])# _LT_PATH_MAGIC
  4271. # LT_PATH_LD
  4272. # ----------
  4273. # find the pathname to the GNU or non-GNU linker
  4274. AC_DEFUN([LT_PATH_LD],
  4275. [AC_REQUIRE([AC_PROG_CC])dnl
  4276. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  4277. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  4278. m4_require([_LT_DECL_SED])dnl
  4279. m4_require([_LT_DECL_EGREP])dnl
  4280. m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
  4281. AC_ARG_WITH([gnu-ld],
  4282. [AS_HELP_STRING([--with-gnu-ld],
  4283. [assume the C compiler uses GNU ld @<:@default=no@:>@])],
  4284. [test no = "$withval" || with_gnu_ld=yes],
  4285. [with_gnu_ld=no])dnl
  4286. ac_prog=ld
  4287. if test yes = "$GCC"; then
  4288. # Check if gcc -print-prog-name=ld gives a path.
  4289. AC_MSG_CHECKING([for ld used by $CC])
  4290. case $host in
  4291. *-*-mingw*)
  4292. # gcc leaves a trailing carriage return, which upsets mingw
  4293. ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  4294. *)
  4295. ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  4296. esac
  4297. case $ac_prog in
  4298. # Accept absolute paths.
  4299. [[\\/]]* | ?:[[\\/]]*)
  4300. re_direlt='/[[^/]][[^/]]*/\.\./'
  4301. # Canonicalize the pathname of ld
  4302. ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
  4303. while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
  4304. ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
  4305. done
  4306. test -z "$LD" && LD=$ac_prog
  4307. ;;
  4308. "")
  4309. # If it fails, then pretend we aren't using GCC.
  4310. ac_prog=ld
  4311. ;;
  4312. *)
  4313. # If it is relative, then search for the first ld in PATH.
  4314. with_gnu_ld=unknown
  4315. ;;
  4316. esac
  4317. elif test yes = "$with_gnu_ld"; then
  4318. AC_MSG_CHECKING([for GNU ld])
  4319. else
  4320. AC_MSG_CHECKING([for non-GNU ld])
  4321. fi
  4322. AC_CACHE_VAL(lt_cv_path_LD,
  4323. [if test -z "$LD"; then
  4324. lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
  4325. for ac_dir in $PATH; do
  4326. IFS=$lt_save_ifs
  4327. test -z "$ac_dir" && ac_dir=.
  4328. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  4329. lt_cv_path_LD=$ac_dir/$ac_prog
  4330. # Check to see if the program is GNU ld. I'd rather use --version,
  4331. # but apparently some variants of GNU ld only accept -v.
  4332. # Break only if it was the GNU/non-GNU ld that we prefer.
  4333. case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
  4334. *GNU* | *'with BFD'*)
  4335. test no != "$with_gnu_ld" && break
  4336. ;;
  4337. *)
  4338. test yes != "$with_gnu_ld" && break
  4339. ;;
  4340. esac
  4341. fi
  4342. done
  4343. IFS=$lt_save_ifs
  4344. else
  4345. lt_cv_path_LD=$LD # Let the user override the test with a path.
  4346. fi])
  4347. LD=$lt_cv_path_LD
  4348. if test -n "$LD"; then
  4349. AC_MSG_RESULT($LD)
  4350. else
  4351. AC_MSG_RESULT(no)
  4352. fi
  4353. test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  4354. _LT_PATH_LD_GNU
  4355. AC_SUBST([LD])
  4356. _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
  4357. ])# LT_PATH_LD
  4358. # Old names:
  4359. AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
  4360. AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
  4361. dnl aclocal-1.4 backwards compatibility:
  4362. dnl AC_DEFUN([AM_PROG_LD], [])
  4363. dnl AC_DEFUN([AC_PROG_LD], [])
  4364. # _LT_PATH_LD_GNU
  4365. #- --------------
  4366. m4_defun([_LT_PATH_LD_GNU],
  4367. [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
  4368. [# I'd rather use --version here, but apparently some GNU lds only accept -v.
  4369. case `$LD -v 2>&1 </dev/null` in
  4370. *GNU* | *'with BFD'*)
  4371. lt_cv_prog_gnu_ld=yes
  4372. ;;
  4373. *)
  4374. lt_cv_prog_gnu_ld=no
  4375. ;;
  4376. esac])
  4377. with_gnu_ld=$lt_cv_prog_gnu_ld
  4378. ])# _LT_PATH_LD_GNU
  4379. # _LT_CMD_RELOAD
  4380. # --------------
  4381. # find reload flag for linker
  4382. # -- PORTME Some linkers may need a different reload flag.
  4383. m4_defun([_LT_CMD_RELOAD],
  4384. [AC_CACHE_CHECK([for $LD option to reload object files],
  4385. lt_cv_ld_reload_flag,
  4386. [lt_cv_ld_reload_flag='-r'])
  4387. reload_flag=$lt_cv_ld_reload_flag
  4388. case $reload_flag in
  4389. "" | " "*) ;;
  4390. *) reload_flag=" $reload_flag" ;;
  4391. esac
  4392. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  4393. case $host_os in
  4394. cygwin* | mingw* | pw32* | cegcc*)
  4395. if test yes != "$GCC"; then
  4396. reload_cmds=false
  4397. fi
  4398. ;;
  4399. darwin*)
  4400. if test yes = "$GCC"; then
  4401. reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
  4402. else
  4403. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  4404. fi
  4405. ;;
  4406. esac
  4407. _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
  4408. _LT_TAGDECL([], [reload_cmds], [2])dnl
  4409. ])# _LT_CMD_RELOAD
  4410. # _LT_PATH_DD
  4411. # -----------
  4412. # find a working dd
  4413. m4_defun([_LT_PATH_DD],
  4414. [AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
  4415. [printf 0123456789abcdef0123456789abcdef >conftest.i
  4416. cat conftest.i conftest.i >conftest2.i
  4417. : ${lt_DD:=$DD}
  4418. AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
  4419. [if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
  4420. cmp -s conftest.i conftest.out \
  4421. && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
  4422. fi])
  4423. rm -f conftest.i conftest2.i conftest.out])
  4424. ])# _LT_PATH_DD
  4425. # _LT_CMD_TRUNCATE
  4426. # ----------------
  4427. # find command to truncate a binary pipe
  4428. m4_defun([_LT_CMD_TRUNCATE],
  4429. [m4_require([_LT_PATH_DD])
  4430. AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
  4431. [printf 0123456789abcdef0123456789abcdef >conftest.i
  4432. cat conftest.i conftest.i >conftest2.i
  4433. lt_cv_truncate_bin=
  4434. if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
  4435. cmp -s conftest.i conftest.out \
  4436. && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
  4437. fi
  4438. rm -f conftest.i conftest2.i conftest.out
  4439. test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
  4440. _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
  4441. [Command to truncate a binary pipe])
  4442. ])# _LT_CMD_TRUNCATE
  4443. # _LT_CHECK_MAGIC_METHOD
  4444. # ----------------------
  4445. # how to check for library dependencies
  4446. # -- PORTME fill in with the dynamic library characteristics
  4447. m4_defun([_LT_CHECK_MAGIC_METHOD],
  4448. [m4_require([_LT_DECL_EGREP])
  4449. m4_require([_LT_DECL_OBJDUMP])
  4450. AC_CACHE_CHECK([how to recognize dependent libraries],
  4451. lt_cv_deplibs_check_method,
  4452. [lt_cv_file_magic_cmd='$MAGIC_CMD'
  4453. lt_cv_file_magic_test_file=
  4454. lt_cv_deplibs_check_method='unknown'
  4455. # Need to set the preceding variable on all platforms that support
  4456. # interlibrary dependencies.
  4457. # 'none' -- dependencies not supported.
  4458. # 'unknown' -- same as none, but documents that we really don't know.
  4459. # 'pass_all' -- all dependencies passed with no checks.
  4460. # 'test_compile' -- check by making test program.
  4461. # 'file_magic [[regex]]' -- check by looking for files in library path
  4462. # that responds to the $file_magic_cmd with a given extended regex.
  4463. # If you have 'file' or equivalent on your system and you're not sure
  4464. # whether 'pass_all' will *always* work, you probably want this one.
  4465. case $host_os in
  4466. aix[[4-9]]*)
  4467. lt_cv_deplibs_check_method=pass_all
  4468. ;;
  4469. beos*)
  4470. lt_cv_deplibs_check_method=pass_all
  4471. ;;
  4472. bsdi[[45]]*)
  4473. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
  4474. lt_cv_file_magic_cmd='/usr/bin/file -L'
  4475. lt_cv_file_magic_test_file=/shlib/libc.so
  4476. ;;
  4477. cygwin*)
  4478. # func_win32_libid is a shell function defined in ltmain.sh
  4479. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  4480. lt_cv_file_magic_cmd='func_win32_libid'
  4481. ;;
  4482. mingw* | pw32*)
  4483. # Base MSYS/MinGW do not provide the 'file' command needed by
  4484. # func_win32_libid shell function, so use a weaker test based on 'objdump',
  4485. # unless we find 'file', for example because we are cross-compiling.
  4486. if ( file / ) >/dev/null 2>&1; then
  4487. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  4488. lt_cv_file_magic_cmd='func_win32_libid'
  4489. else
  4490. # Keep this pattern in sync with the one in func_win32_libid.
  4491. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
  4492. lt_cv_file_magic_cmd='$OBJDUMP -f'
  4493. fi
  4494. ;;
  4495. cegcc*)
  4496. # use the weaker test based on 'objdump'. See mingw*.
  4497. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
  4498. lt_cv_file_magic_cmd='$OBJDUMP -f'
  4499. ;;
  4500. darwin* | rhapsody*)
  4501. lt_cv_deplibs_check_method=pass_all
  4502. ;;
  4503. freebsd* | dragonfly*)
  4504. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  4505. case $host_cpu in
  4506. i*86 )
  4507. # Not sure whether the presence of OpenBSD here was a mistake.
  4508. # Let's accept both of them until this is cleared up.
  4509. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
  4510. lt_cv_file_magic_cmd=/usr/bin/file
  4511. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  4512. ;;
  4513. esac
  4514. else
  4515. lt_cv_deplibs_check_method=pass_all
  4516. fi
  4517. ;;
  4518. haiku*)
  4519. lt_cv_deplibs_check_method=pass_all
  4520. ;;
  4521. hpux10.20* | hpux11*)
  4522. lt_cv_file_magic_cmd=/usr/bin/file
  4523. case $host_cpu in
  4524. ia64*)
  4525. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
  4526. lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
  4527. ;;
  4528. hppa*64*)
  4529. [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]']
  4530. lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
  4531. ;;
  4532. *)
  4533. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
  4534. lt_cv_file_magic_test_file=/usr/lib/libc.sl
  4535. ;;
  4536. esac
  4537. ;;
  4538. interix[[3-9]]*)
  4539. # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
  4540. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
  4541. ;;
  4542. irix5* | irix6* | nonstopux*)
  4543. case $LD in
  4544. *-32|*"-32 ") libmagic=32-bit;;
  4545. *-n32|*"-n32 ") libmagic=N32;;
  4546. *-64|*"-64 ") libmagic=64-bit;;
  4547. *) libmagic=never-match;;
  4548. esac
  4549. lt_cv_deplibs_check_method=pass_all
  4550. ;;
  4551. # This must be glibc/ELF.
  4552. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  4553. lt_cv_deplibs_check_method=pass_all
  4554. ;;
  4555. netbsd*)
  4556. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  4557. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  4558. else
  4559. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
  4560. fi
  4561. ;;
  4562. newos6*)
  4563. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
  4564. lt_cv_file_magic_cmd=/usr/bin/file
  4565. lt_cv_file_magic_test_file=/usr/lib/libnls.so
  4566. ;;
  4567. *nto* | *qnx*)
  4568. lt_cv_deplibs_check_method=pass_all
  4569. ;;
  4570. openbsd* | bitrig*)
  4571. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
  4572. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
  4573. else
  4574. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  4575. fi
  4576. ;;
  4577. osf3* | osf4* | osf5*)
  4578. lt_cv_deplibs_check_method=pass_all
  4579. ;;
  4580. rdos*)
  4581. lt_cv_deplibs_check_method=pass_all
  4582. ;;
  4583. solaris*)
  4584. lt_cv_deplibs_check_method=pass_all
  4585. ;;
  4586. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  4587. lt_cv_deplibs_check_method=pass_all
  4588. ;;
  4589. sysv4 | sysv4.3*)
  4590. case $host_vendor in
  4591. motorola)
  4592. 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]]'
  4593. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  4594. ;;
  4595. ncr)
  4596. lt_cv_deplibs_check_method=pass_all
  4597. ;;
  4598. sequent)
  4599. lt_cv_file_magic_cmd='/bin/file'
  4600. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
  4601. ;;
  4602. sni)
  4603. lt_cv_file_magic_cmd='/bin/file'
  4604. lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
  4605. lt_cv_file_magic_test_file=/lib/libc.so
  4606. ;;
  4607. siemens)
  4608. lt_cv_deplibs_check_method=pass_all
  4609. ;;
  4610. pc)
  4611. lt_cv_deplibs_check_method=pass_all
  4612. ;;
  4613. esac
  4614. ;;
  4615. tpf*)
  4616. lt_cv_deplibs_check_method=pass_all
  4617. ;;
  4618. os2*)
  4619. lt_cv_deplibs_check_method=pass_all
  4620. ;;
  4621. esac
  4622. ])
  4623. file_magic_glob=
  4624. want_nocaseglob=no
  4625. if test "$build" = "$host"; then
  4626. case $host_os in
  4627. mingw* | pw32*)
  4628. if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
  4629. want_nocaseglob=yes
  4630. else
  4631. file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
  4632. fi
  4633. ;;
  4634. esac
  4635. fi
  4636. file_magic_cmd=$lt_cv_file_magic_cmd
  4637. deplibs_check_method=$lt_cv_deplibs_check_method
  4638. test -z "$deplibs_check_method" && deplibs_check_method=unknown
  4639. _LT_DECL([], [deplibs_check_method], [1],
  4640. [Method to check whether dependent libraries are shared objects])
  4641. _LT_DECL([], [file_magic_cmd], [1],
  4642. [Command to use when deplibs_check_method = "file_magic"])
  4643. _LT_DECL([], [file_magic_glob], [1],
  4644. [How to find potential files when deplibs_check_method = "file_magic"])
  4645. _LT_DECL([], [want_nocaseglob], [1],
  4646. [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
  4647. ])# _LT_CHECK_MAGIC_METHOD
  4648. # LT_PATH_NM
  4649. # ----------
  4650. # find the pathname to a BSD- or MS-compatible name lister
  4651. AC_DEFUN([LT_PATH_NM],
  4652. [AC_REQUIRE([AC_PROG_CC])dnl
  4653. AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
  4654. [if test -n "$NM"; then
  4655. # Let the user override the test.
  4656. lt_cv_path_NM=$NM
  4657. else
  4658. lt_nm_to_check=${ac_tool_prefix}nm
  4659. if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
  4660. lt_nm_to_check="$lt_nm_to_check nm"
  4661. fi
  4662. for lt_tmp_nm in $lt_nm_to_check; do
  4663. lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
  4664. for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
  4665. IFS=$lt_save_ifs
  4666. test -z "$ac_dir" && ac_dir=.
  4667. tmp_nm=$ac_dir/$lt_tmp_nm
  4668. if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
  4669. # Check to see if the nm accepts a BSD-compat flag.
  4670. # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
  4671. # nm: unknown option "B" ignored
  4672. # Tru64's nm complains that /dev/null is an invalid object file
  4673. # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
  4674. case $build_os in
  4675. mingw*) lt_bad_file=conftest.nm/nofile ;;
  4676. *) lt_bad_file=/dev/null ;;
  4677. esac
  4678. case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
  4679. *$lt_bad_file* | *'Invalid file or object type'*)
  4680. lt_cv_path_NM="$tmp_nm -B"
  4681. break 2
  4682. ;;
  4683. *)
  4684. case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
  4685. */dev/null*)
  4686. lt_cv_path_NM="$tmp_nm -p"
  4687. break 2
  4688. ;;
  4689. *)
  4690. lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
  4691. continue # so that we can try to find one that supports BSD flags
  4692. ;;
  4693. esac
  4694. ;;
  4695. esac
  4696. fi
  4697. done
  4698. IFS=$lt_save_ifs
  4699. done
  4700. : ${lt_cv_path_NM=no}
  4701. fi])
  4702. if test no != "$lt_cv_path_NM"; then
  4703. NM=$lt_cv_path_NM
  4704. else
  4705. # Didn't find any BSD compatible name lister, look for dumpbin.
  4706. if test -n "$DUMPBIN"; then :
  4707. # Let the user override the test.
  4708. else
  4709. AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
  4710. case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
  4711. *COFF*)
  4712. DUMPBIN="$DUMPBIN -symbols -headers"
  4713. ;;
  4714. *)
  4715. DUMPBIN=:
  4716. ;;
  4717. esac
  4718. fi
  4719. AC_SUBST([DUMPBIN])
  4720. if test : != "$DUMPBIN"; then
  4721. NM=$DUMPBIN
  4722. fi
  4723. fi
  4724. test -z "$NM" && NM=nm
  4725. AC_SUBST([NM])
  4726. _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
  4727. AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
  4728. [lt_cv_nm_interface="BSD nm"
  4729. echo "int some_variable = 0;" > conftest.$ac_ext
  4730. (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
  4731. (eval "$ac_compile" 2>conftest.err)
  4732. cat conftest.err >&AS_MESSAGE_LOG_FD
  4733. (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
  4734. (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
  4735. cat conftest.err >&AS_MESSAGE_LOG_FD
  4736. (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
  4737. cat conftest.out >&AS_MESSAGE_LOG_FD
  4738. if $GREP 'External.*some_variable' conftest.out > /dev/null; then
  4739. lt_cv_nm_interface="MS dumpbin"
  4740. fi
  4741. rm -f conftest*])
  4742. ])# LT_PATH_NM
  4743. # Old names:
  4744. AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
  4745. AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
  4746. dnl aclocal-1.4 backwards compatibility:
  4747. dnl AC_DEFUN([AM_PROG_NM], [])
  4748. dnl AC_DEFUN([AC_PROG_NM], [])
  4749. # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  4750. # --------------------------------
  4751. # how to determine the name of the shared library
  4752. # associated with a specific link library.
  4753. # -- PORTME fill in with the dynamic library characteristics
  4754. m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
  4755. [m4_require([_LT_DECL_EGREP])
  4756. m4_require([_LT_DECL_OBJDUMP])
  4757. m4_require([_LT_DECL_DLLTOOL])
  4758. AC_CACHE_CHECK([how to associate runtime and link libraries],
  4759. lt_cv_sharedlib_from_linklib_cmd,
  4760. [lt_cv_sharedlib_from_linklib_cmd='unknown'
  4761. case $host_os in
  4762. cygwin* | mingw* | pw32* | cegcc*)
  4763. # two different shell functions defined in ltmain.sh;
  4764. # decide which one to use based on capabilities of $DLLTOOL
  4765. case `$DLLTOOL --help 2>&1` in
  4766. *--identify-strict*)
  4767. lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
  4768. ;;
  4769. *)
  4770. lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
  4771. ;;
  4772. esac
  4773. ;;
  4774. *)
  4775. # fallback: assume linklib IS sharedlib
  4776. lt_cv_sharedlib_from_linklib_cmd=$ECHO
  4777. ;;
  4778. esac
  4779. ])
  4780. sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
  4781. test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
  4782. _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
  4783. [Command to associate shared and link libraries])
  4784. ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  4785. # _LT_PATH_MANIFEST_TOOL
  4786. # ----------------------
  4787. # locate the manifest tool
  4788. m4_defun([_LT_PATH_MANIFEST_TOOL],
  4789. [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
  4790. test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
  4791. AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
  4792. [lt_cv_path_mainfest_tool=no
  4793. echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
  4794. $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
  4795. cat conftest.err >&AS_MESSAGE_LOG_FD
  4796. if $GREP 'Manifest Tool' conftest.out > /dev/null; then
  4797. lt_cv_path_mainfest_tool=yes
  4798. fi
  4799. rm -f conftest*])
  4800. if test yes != "$lt_cv_path_mainfest_tool"; then
  4801. MANIFEST_TOOL=:
  4802. fi
  4803. _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
  4804. ])# _LT_PATH_MANIFEST_TOOL
  4805. # _LT_DLL_DEF_P([FILE])
  4806. # ---------------------
  4807. # True iff FILE is a Windows DLL '.def' file.
  4808. # Keep in sync with func_dll_def_p in the libtool script
  4809. AC_DEFUN([_LT_DLL_DEF_P],
  4810. [dnl
  4811. test DEF = "`$SED -n dnl
  4812. -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace
  4813. -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments
  4814. -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl
  4815. -e q dnl Only consider the first "real" line
  4816. $1`" dnl
  4817. ])# _LT_DLL_DEF_P
  4818. # LT_LIB_M
  4819. # --------
  4820. # check for math library
  4821. AC_DEFUN([LT_LIB_M],
  4822. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  4823. LIBM=
  4824. case $host in
  4825. *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
  4826. # These system don't have libm, or don't need it
  4827. ;;
  4828. *-ncr-sysv4.3*)
  4829. AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
  4830. AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
  4831. ;;
  4832. *)
  4833. AC_CHECK_LIB(m, cos, LIBM=-lm)
  4834. ;;
  4835. esac
  4836. AC_SUBST([LIBM])
  4837. ])# LT_LIB_M
  4838. # Old name:
  4839. AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
  4840. dnl aclocal-1.4 backwards compatibility:
  4841. dnl AC_DEFUN([AC_CHECK_LIBM], [])
  4842. # _LT_COMPILER_NO_RTTI([TAGNAME])
  4843. # -------------------------------
  4844. m4_defun([_LT_COMPILER_NO_RTTI],
  4845. [m4_require([_LT_TAG_COMPILER])dnl
  4846. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  4847. if test yes = "$GCC"; then
  4848. case $cc_basename in
  4849. nvcc*)
  4850. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
  4851. *)
  4852. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
  4853. esac
  4854. _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
  4855. lt_cv_prog_compiler_rtti_exceptions,
  4856. [-fno-rtti -fno-exceptions], [],
  4857. [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
  4858. fi
  4859. _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
  4860. [Compiler flag to turn off builtin functions])
  4861. ])# _LT_COMPILER_NO_RTTI
  4862. # _LT_CMD_GLOBAL_SYMBOLS
  4863. # ----------------------
  4864. m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
  4865. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  4866. AC_REQUIRE([AC_PROG_CC])dnl
  4867. AC_REQUIRE([AC_PROG_AWK])dnl
  4868. AC_REQUIRE([LT_PATH_NM])dnl
  4869. AC_REQUIRE([LT_PATH_LD])dnl
  4870. m4_require([_LT_DECL_SED])dnl
  4871. m4_require([_LT_DECL_EGREP])dnl
  4872. m4_require([_LT_TAG_COMPILER])dnl
  4873. # Check for command to grab the raw symbol name followed by C symbol from nm.
  4874. AC_MSG_CHECKING([command to parse $NM output from $compiler object])
  4875. AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
  4876. [
  4877. # These are sane defaults that work on at least a few old systems.
  4878. # [They come from Ultrix. What could be older than Ultrix?!! ;)]
  4879. # Character class describing NM global symbol codes.
  4880. symcode='[[BCDEGRST]]'
  4881. # Regexp to match symbols that can be accessed directly from C.
  4882. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
  4883. # Define system-specific variables.
  4884. case $host_os in
  4885. aix*)
  4886. symcode='[[BCDT]]'
  4887. ;;
  4888. cygwin* | mingw* | pw32* | cegcc*)
  4889. symcode='[[ABCDGISTW]]'
  4890. ;;
  4891. hpux*)
  4892. if test ia64 = "$host_cpu"; then
  4893. symcode='[[ABCDEGRST]]'
  4894. fi
  4895. ;;
  4896. irix* | nonstopux*)
  4897. symcode='[[BCDEGRST]]'
  4898. ;;
  4899. osf*)
  4900. symcode='[[BCDEGQRST]]'
  4901. ;;
  4902. solaris*)
  4903. symcode='[[BDRT]]'
  4904. ;;
  4905. sco3.2v5*)
  4906. symcode='[[DT]]'
  4907. ;;
  4908. sysv4.2uw2*)
  4909. symcode='[[DT]]'
  4910. ;;
  4911. sysv5* | sco5v6* | unixware* | OpenUNIX*)
  4912. symcode='[[ABDT]]'
  4913. ;;
  4914. sysv4)
  4915. symcode='[[DFNSTU]]'
  4916. ;;
  4917. esac
  4918. # If we're using GNU nm, then use its standard symbol codes.
  4919. case `$NM -V 2>&1` in
  4920. *GNU* | *'with BFD'*)
  4921. symcode='[[ABCDGIRSTW]]' ;;
  4922. esac
  4923. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  4924. # Gets list of data symbols to import.
  4925. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
  4926. # Adjust the below global symbol transforms to fixup imported variables.
  4927. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
  4928. lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
  4929. lt_c_name_lib_hook="\
  4930. -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
  4931. -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
  4932. else
  4933. # Disable hooks by default.
  4934. lt_cv_sys_global_symbol_to_import=
  4935. lt_cdecl_hook=
  4936. lt_c_name_hook=
  4937. lt_c_name_lib_hook=
  4938. fi
  4939. # Transform an extracted symbol line into a proper C declaration.
  4940. # Some systems (esp. on ia64) link data and code symbols differently,
  4941. # so use this general approach.
  4942. lt_cv_sys_global_symbol_to_cdecl="sed -n"\
  4943. $lt_cdecl_hook\
  4944. " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
  4945. " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
  4946. # Transform an extracted symbol line into symbol name and symbol address
  4947. lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
  4948. $lt_c_name_hook\
  4949. " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
  4950. " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
  4951. # Transform an extracted symbol line into symbol name with lib prefix and
  4952. # symbol address.
  4953. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
  4954. $lt_c_name_lib_hook\
  4955. " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
  4956. " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
  4957. " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
  4958. # Handle CRLF in mingw tool chain
  4959. opt_cr=
  4960. case $build_os in
  4961. mingw*)
  4962. opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  4963. ;;
  4964. esac
  4965. # Try without a prefix underscore, then with it.
  4966. for ac_symprfx in "" "_"; do
  4967. # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
  4968. symxfrm="\\1 $ac_symprfx\\2 \\2"
  4969. # Write the raw and C identifiers.
  4970. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  4971. # Fake it for dumpbin and say T for any non-static function,
  4972. # D for any global variable and I for any imported variable.
  4973. # Also find C++ and __fastcall symbols from MSVC++,
  4974. # which start with @ or ?.
  4975. lt_cv_sys_global_symbol_pipe="$AWK ['"\
  4976. " {last_section=section; section=\$ 3};"\
  4977. " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
  4978. " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
  4979. " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
  4980. " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
  4981. " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
  4982. " \$ 0!~/External *\|/{next};"\
  4983. " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
  4984. " {if(hide[section]) next};"\
  4985. " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
  4986. " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
  4987. " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
  4988. " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
  4989. " ' prfx=^$ac_symprfx]"
  4990. else
  4991. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
  4992. fi
  4993. lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
  4994. # Check to see that the pipe works correctly.
  4995. pipe_works=no
  4996. rm -f conftest*
  4997. cat > conftest.$ac_ext <<_LT_EOF
  4998. #ifdef __cplusplus
  4999. extern "C" {
  5000. #endif
  5001. char nm_test_var;
  5002. void nm_test_func(void);
  5003. void nm_test_func(void){}
  5004. #ifdef __cplusplus
  5005. }
  5006. #endif
  5007. int main(){nm_test_var='a';nm_test_func();return(0);}
  5008. _LT_EOF
  5009. if AC_TRY_EVAL(ac_compile); then
  5010. # Now try to grab the symbols.
  5011. nlist=conftest.nm
  5012. if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
  5013. # Try sorting and uniquifying the output.
  5014. if sort "$nlist" | uniq > "$nlist"T; then
  5015. mv -f "$nlist"T "$nlist"
  5016. else
  5017. rm -f "$nlist"T
  5018. fi
  5019. # Make sure that we snagged all the symbols we need.
  5020. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
  5021. if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
  5022. cat <<_LT_EOF > conftest.$ac_ext
  5023. /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
  5024. #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
  5025. /* DATA imports from DLLs on WIN32 can't be const, because runtime
  5026. relocations are performed -- see ld's documentation on pseudo-relocs. */
  5027. # define LT@&t@_DLSYM_CONST
  5028. #elif defined __osf__
  5029. /* This system does not cope well with relocations in const data. */
  5030. # define LT@&t@_DLSYM_CONST
  5031. #else
  5032. # define LT@&t@_DLSYM_CONST const
  5033. #endif
  5034. #ifdef __cplusplus
  5035. extern "C" {
  5036. #endif
  5037. _LT_EOF
  5038. # Now generate the symbol file.
  5039. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
  5040. cat <<_LT_EOF >> conftest.$ac_ext
  5041. /* The mapping between symbol names and symbols. */
  5042. LT@&t@_DLSYM_CONST struct {
  5043. const char *name;
  5044. void *address;
  5045. }
  5046. lt__PROGRAM__LTX_preloaded_symbols[[]] =
  5047. {
  5048. { "@PROGRAM@", (void *) 0 },
  5049. _LT_EOF
  5050. $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
  5051. cat <<\_LT_EOF >> conftest.$ac_ext
  5052. {0, (void *) 0}
  5053. };
  5054. /* This works around a problem in FreeBSD linker */
  5055. #ifdef FREEBSD_WORKAROUND
  5056. static const void *lt_preloaded_setup() {
  5057. return lt__PROGRAM__LTX_preloaded_symbols;
  5058. }
  5059. #endif
  5060. #ifdef __cplusplus
  5061. }
  5062. #endif
  5063. _LT_EOF
  5064. # Now try linking the two files.
  5065. mv conftest.$ac_objext conftstm.$ac_objext
  5066. lt_globsym_save_LIBS=$LIBS
  5067. lt_globsym_save_CFLAGS=$CFLAGS
  5068. LIBS=conftstm.$ac_objext
  5069. CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
  5070. if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
  5071. pipe_works=yes
  5072. fi
  5073. LIBS=$lt_globsym_save_LIBS
  5074. CFLAGS=$lt_globsym_save_CFLAGS
  5075. else
  5076. echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
  5077. fi
  5078. else
  5079. echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
  5080. fi
  5081. else
  5082. echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
  5083. fi
  5084. else
  5085. echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
  5086. cat conftest.$ac_ext >&5
  5087. fi
  5088. rm -rf conftest* conftst*
  5089. # Do not use the global_symbol_pipe unless it works.
  5090. if test yes = "$pipe_works"; then
  5091. break
  5092. else
  5093. lt_cv_sys_global_symbol_pipe=
  5094. fi
  5095. done
  5096. ])
  5097. if test -z "$lt_cv_sys_global_symbol_pipe"; then
  5098. lt_cv_sys_global_symbol_to_cdecl=
  5099. fi
  5100. if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
  5101. AC_MSG_RESULT(failed)
  5102. else
  5103. AC_MSG_RESULT(ok)
  5104. fi
  5105. # Response file support.
  5106. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  5107. nm_file_list_spec='@'
  5108. elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
  5109. nm_file_list_spec='@'
  5110. fi
  5111. _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
  5112. [Take the output of nm and produce a listing of raw symbols and C names])
  5113. _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
  5114. [Transform the output of nm in a proper C declaration])
  5115. _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
  5116. [Transform the output of nm into a list of symbols to manually relocate])
  5117. _LT_DECL([global_symbol_to_c_name_address],
  5118. [lt_cv_sys_global_symbol_to_c_name_address], [1],
  5119. [Transform the output of nm in a C name address pair])
  5120. _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
  5121. [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
  5122. [Transform the output of nm in a C name address pair when lib prefix is needed])
  5123. _LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
  5124. [The name lister interface])
  5125. _LT_DECL([], [nm_file_list_spec], [1],
  5126. [Specify filename containing input files for $NM])
  5127. ]) # _LT_CMD_GLOBAL_SYMBOLS
  5128. # _LT_COMPILER_PIC([TAGNAME])
  5129. # ---------------------------
  5130. m4_defun([_LT_COMPILER_PIC],
  5131. [m4_require([_LT_TAG_COMPILER])dnl
  5132. _LT_TAGVAR(lt_prog_compiler_wl, $1)=
  5133. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  5134. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  5135. m4_if([$1], [CXX], [
  5136. # C++ specific cases for pic, static, wl, etc.
  5137. if test yes = "$GXX"; then
  5138. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5139. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  5140. case $host_os in
  5141. aix*)
  5142. # All AIX code is PIC.
  5143. if test ia64 = "$host_cpu"; then
  5144. # AIX 5 now supports IA64 processor
  5145. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5146. fi
  5147. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  5148. ;;
  5149. amigaos*)
  5150. case $host_cpu in
  5151. powerpc)
  5152. # see comment about AmigaOS4 .so support
  5153. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  5154. ;;
  5155. m68k)
  5156. # FIXME: we need at least 68020 code to build shared libraries, but
  5157. # adding the '-m68020' flag to GCC prevents building anything better,
  5158. # like '-m68040'.
  5159. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  5160. ;;
  5161. esac
  5162. ;;
  5163. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  5164. # PIC is the default for these OSes.
  5165. ;;
  5166. mingw* | cygwin* | os2* | pw32* | cegcc*)
  5167. # This hack is so that the source file can tell whether it is being
  5168. # built for inclusion in a dll (and should export symbols for example).
  5169. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  5170. # (--disable-auto-import) libraries
  5171. m4_if([$1], [GCJ], [],
  5172. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  5173. case $host_os in
  5174. os2*)
  5175. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
  5176. ;;
  5177. esac
  5178. ;;
  5179. darwin* | rhapsody*)
  5180. # PIC is the default on this platform
  5181. # Common symbols not allowed in MH_DYLIB files
  5182. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  5183. ;;
  5184. *djgpp*)
  5185. # DJGPP does not support shared libraries at all
  5186. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  5187. ;;
  5188. haiku*)
  5189. # PIC is the default for Haiku.
  5190. # The "-static" flag exists, but is broken.
  5191. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  5192. ;;
  5193. interix[[3-9]]*)
  5194. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  5195. # Instead, we relocate shared libraries at runtime.
  5196. ;;
  5197. sysv4*MP*)
  5198. if test -d /usr/nec; then
  5199. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  5200. fi
  5201. ;;
  5202. hpux*)
  5203. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  5204. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  5205. # sets the default TLS model and affects inlining.
  5206. case $host_cpu in
  5207. hppa*64*)
  5208. ;;
  5209. *)
  5210. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  5211. ;;
  5212. esac
  5213. ;;
  5214. *qnx* | *nto*)
  5215. # QNX uses GNU C++, but need to define -shared option too, otherwise
  5216. # it will coredump.
  5217. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  5218. ;;
  5219. *)
  5220. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  5221. ;;
  5222. esac
  5223. else
  5224. case $host_os in
  5225. aix[[4-9]]*)
  5226. # All AIX code is PIC.
  5227. if test ia64 = "$host_cpu"; then
  5228. # AIX 5 now supports IA64 processor
  5229. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5230. else
  5231. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  5232. fi
  5233. ;;
  5234. chorus*)
  5235. case $cc_basename in
  5236. cxch68*)
  5237. # Green Hills C++ Compiler
  5238. # _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"
  5239. ;;
  5240. esac
  5241. ;;
  5242. mingw* | cygwin* | os2* | pw32* | cegcc*)
  5243. # This hack is so that the source file can tell whether it is being
  5244. # built for inclusion in a dll (and should export symbols for example).
  5245. m4_if([$1], [GCJ], [],
  5246. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  5247. ;;
  5248. dgux*)
  5249. case $cc_basename in
  5250. ec++*)
  5251. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5252. ;;
  5253. ghcx*)
  5254. # Green Hills C++ Compiler
  5255. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  5256. ;;
  5257. *)
  5258. ;;
  5259. esac
  5260. ;;
  5261. freebsd* | dragonfly*)
  5262. # FreeBSD uses GNU C++
  5263. ;;
  5264. hpux9* | hpux10* | hpux11*)
  5265. case $cc_basename in
  5266. CC*)
  5267. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5268. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
  5269. if test ia64 != "$host_cpu"; then
  5270. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  5271. fi
  5272. ;;
  5273. aCC*)
  5274. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5275. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
  5276. case $host_cpu in
  5277. hppa*64*|ia64*)
  5278. # +Z the default
  5279. ;;
  5280. *)
  5281. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  5282. ;;
  5283. esac
  5284. ;;
  5285. *)
  5286. ;;
  5287. esac
  5288. ;;
  5289. interix*)
  5290. # This is c89, which is MS Visual C++ (no shared libs)
  5291. # Anyone wants to do a port?
  5292. ;;
  5293. irix5* | irix6* | nonstopux*)
  5294. case $cc_basename in
  5295. CC*)
  5296. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5297. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  5298. # CC pic flag -KPIC is the default.
  5299. ;;
  5300. *)
  5301. ;;
  5302. esac
  5303. ;;
  5304. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  5305. case $cc_basename in
  5306. KCC*)
  5307. # KAI C++ Compiler
  5308. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  5309. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  5310. ;;
  5311. ecpc* )
  5312. # old Intel C++ for x86_64, which still supported -KPIC.
  5313. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5314. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5315. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  5316. ;;
  5317. icpc* )
  5318. # Intel C++, used to be incompatible with GCC.
  5319. # ICC 10 doesn't accept -KPIC any more.
  5320. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5321. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  5322. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  5323. ;;
  5324. pgCC* | pgcpp*)
  5325. # Portland Group C++ compiler
  5326. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5327. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  5328. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5329. ;;
  5330. cxx*)
  5331. # Compaq C++
  5332. # Make sure the PIC flag is empty. It appears that all Alpha
  5333. # Linux and Compaq Tru64 Unix objects are PIC.
  5334. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  5335. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  5336. ;;
  5337. xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
  5338. # IBM XL 8.0, 9.0 on PPC and BlueGene
  5339. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5340. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  5341. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  5342. ;;
  5343. *)
  5344. case `$CC -V 2>&1 | sed 5q` in
  5345. *Sun\ C*)
  5346. # Sun C++ 5.9
  5347. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5348. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5349. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  5350. ;;
  5351. esac
  5352. ;;
  5353. esac
  5354. ;;
  5355. lynxos*)
  5356. ;;
  5357. m88k*)
  5358. ;;
  5359. mvs*)
  5360. case $cc_basename in
  5361. cxx*)
  5362. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
  5363. ;;
  5364. *)
  5365. ;;
  5366. esac
  5367. ;;
  5368. netbsd*)
  5369. ;;
  5370. *qnx* | *nto*)
  5371. # QNX uses GNU C++, but need to define -shared option too, otherwise
  5372. # it will coredump.
  5373. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  5374. ;;
  5375. osf3* | osf4* | osf5*)
  5376. case $cc_basename in
  5377. KCC*)
  5378. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  5379. ;;
  5380. RCC*)
  5381. # Rational C++ 2.4.1
  5382. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  5383. ;;
  5384. cxx*)
  5385. # Digital/Compaq C++
  5386. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5387. # Make sure the PIC flag is empty. It appears that all Alpha
  5388. # Linux and Compaq Tru64 Unix objects are PIC.
  5389. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  5390. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  5391. ;;
  5392. *)
  5393. ;;
  5394. esac
  5395. ;;
  5396. psos*)
  5397. ;;
  5398. solaris*)
  5399. case $cc_basename in
  5400. CC* | sunCC*)
  5401. # Sun C++ 4.2, 5.x and Centerline C++
  5402. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5403. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5404. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  5405. ;;
  5406. gcx*)
  5407. # Green Hills C++ Compiler
  5408. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  5409. ;;
  5410. *)
  5411. ;;
  5412. esac
  5413. ;;
  5414. sunos4*)
  5415. case $cc_basename in
  5416. CC*)
  5417. # Sun C++ 4.x
  5418. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  5419. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5420. ;;
  5421. lcc*)
  5422. # Lucid
  5423. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  5424. ;;
  5425. *)
  5426. ;;
  5427. esac
  5428. ;;
  5429. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  5430. case $cc_basename in
  5431. CC*)
  5432. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5433. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5434. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5435. ;;
  5436. esac
  5437. ;;
  5438. tandem*)
  5439. case $cc_basename in
  5440. NCC*)
  5441. # NonStop-UX NCC 3.20
  5442. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5443. ;;
  5444. *)
  5445. ;;
  5446. esac
  5447. ;;
  5448. vxworks*)
  5449. ;;
  5450. *)
  5451. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  5452. ;;
  5453. esac
  5454. fi
  5455. ],
  5456. [
  5457. if test yes = "$GCC"; then
  5458. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5459. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  5460. case $host_os in
  5461. aix*)
  5462. # All AIX code is PIC.
  5463. if test ia64 = "$host_cpu"; then
  5464. # AIX 5 now supports IA64 processor
  5465. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5466. fi
  5467. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  5468. ;;
  5469. amigaos*)
  5470. case $host_cpu in
  5471. powerpc)
  5472. # see comment about AmigaOS4 .so support
  5473. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  5474. ;;
  5475. m68k)
  5476. # FIXME: we need at least 68020 code to build shared libraries, but
  5477. # adding the '-m68020' flag to GCC prevents building anything better,
  5478. # like '-m68040'.
  5479. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  5480. ;;
  5481. esac
  5482. ;;
  5483. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  5484. # PIC is the default for these OSes.
  5485. ;;
  5486. mingw* | cygwin* | pw32* | os2* | cegcc*)
  5487. # This hack is so that the source file can tell whether it is being
  5488. # built for inclusion in a dll (and should export symbols for example).
  5489. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  5490. # (--disable-auto-import) libraries
  5491. m4_if([$1], [GCJ], [],
  5492. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  5493. case $host_os in
  5494. os2*)
  5495. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
  5496. ;;
  5497. esac
  5498. ;;
  5499. darwin* | rhapsody*)
  5500. # PIC is the default on this platform
  5501. # Common symbols not allowed in MH_DYLIB files
  5502. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  5503. ;;
  5504. haiku*)
  5505. # PIC is the default for Haiku.
  5506. # The "-static" flag exists, but is broken.
  5507. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  5508. ;;
  5509. hpux*)
  5510. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  5511. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  5512. # sets the default TLS model and affects inlining.
  5513. case $host_cpu in
  5514. hppa*64*)
  5515. # +Z the default
  5516. ;;
  5517. *)
  5518. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  5519. ;;
  5520. esac
  5521. ;;
  5522. interix[[3-9]]*)
  5523. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  5524. # Instead, we relocate shared libraries at runtime.
  5525. ;;
  5526. msdosdjgpp*)
  5527. # Just because we use GCC doesn't mean we suddenly get shared libraries
  5528. # on systems that don't support them.
  5529. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  5530. enable_shared=no
  5531. ;;
  5532. *nto* | *qnx*)
  5533. # QNX uses GNU C++, but need to define -shared option too, otherwise
  5534. # it will coredump.
  5535. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  5536. ;;
  5537. sysv4*MP*)
  5538. if test -d /usr/nec; then
  5539. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  5540. fi
  5541. ;;
  5542. *)
  5543. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  5544. ;;
  5545. esac
  5546. case $cc_basename in
  5547. nvcc*) # Cuda Compiler Driver 2.2
  5548. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
  5549. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  5550. _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
  5551. fi
  5552. ;;
  5553. esac
  5554. else
  5555. # PORTME Check for flag to pass linker flags through the system compiler.
  5556. case $host_os in
  5557. aix*)
  5558. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5559. if test ia64 = "$host_cpu"; then
  5560. # AIX 5 now supports IA64 processor
  5561. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5562. else
  5563. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  5564. fi
  5565. ;;
  5566. darwin* | rhapsody*)
  5567. # PIC is the default on this platform
  5568. # Common symbols not allowed in MH_DYLIB files
  5569. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  5570. case $cc_basename in
  5571. nagfor*)
  5572. # NAG Fortran compiler
  5573. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
  5574. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  5575. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5576. ;;
  5577. esac
  5578. ;;
  5579. mingw* | cygwin* | pw32* | os2* | cegcc*)
  5580. # This hack is so that the source file can tell whether it is being
  5581. # built for inclusion in a dll (and should export symbols for example).
  5582. m4_if([$1], [GCJ], [],
  5583. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  5584. case $host_os in
  5585. os2*)
  5586. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
  5587. ;;
  5588. esac
  5589. ;;
  5590. hpux9* | hpux10* | hpux11*)
  5591. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5592. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  5593. # not for PA HP-UX.
  5594. case $host_cpu in
  5595. hppa*64*|ia64*)
  5596. # +Z the default
  5597. ;;
  5598. *)
  5599. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  5600. ;;
  5601. esac
  5602. # Is there a better lt_prog_compiler_static that works with the bundled CC?
  5603. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
  5604. ;;
  5605. irix5* | irix6* | nonstopux*)
  5606. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5607. # PIC (with -KPIC) is the default.
  5608. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  5609. ;;
  5610. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  5611. case $cc_basename in
  5612. # old Intel for x86_64, which still supported -KPIC.
  5613. ecc*)
  5614. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5615. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5616. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  5617. ;;
  5618. # icc used to be incompatible with GCC.
  5619. # ICC 10 doesn't accept -KPIC any more.
  5620. icc* | ifort*)
  5621. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5622. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  5623. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  5624. ;;
  5625. # Lahey Fortran 8.1.
  5626. lf95*)
  5627. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5628. _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
  5629. _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
  5630. ;;
  5631. nagfor*)
  5632. # NAG Fortran compiler
  5633. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
  5634. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  5635. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5636. ;;
  5637. tcc*)
  5638. # Fabrice Bellard et al's Tiny C Compiler
  5639. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5640. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  5641. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  5642. ;;
  5643. pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
  5644. # Portland Group compilers (*not* the Pentium gcc compiler,
  5645. # which looks to be a dead project)
  5646. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5647. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  5648. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5649. ;;
  5650. ccc*)
  5651. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5652. # All Alpha code is PIC.
  5653. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  5654. ;;
  5655. xl* | bgxl* | bgf* | mpixl*)
  5656. # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
  5657. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5658. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  5659. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  5660. ;;
  5661. *)
  5662. case `$CC -V 2>&1 | sed 5q` in
  5663. *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
  5664. # Sun Fortran 8.3 passes all unrecognized flags to the linker
  5665. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5666. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5667. _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
  5668. ;;
  5669. *Sun\ F* | *Sun*Fortran*)
  5670. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5671. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5672. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  5673. ;;
  5674. *Sun\ C*)
  5675. # Sun C 5.9
  5676. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5677. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5678. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5679. ;;
  5680. *Intel*\ [[CF]]*Compiler*)
  5681. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5682. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  5683. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  5684. ;;
  5685. *Portland\ Group*)
  5686. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5687. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  5688. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5689. ;;
  5690. esac
  5691. ;;
  5692. esac
  5693. ;;
  5694. newsos6)
  5695. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5696. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5697. ;;
  5698. *nto* | *qnx*)
  5699. # QNX uses GNU C++, but need to define -shared option too, otherwise
  5700. # it will coredump.
  5701. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  5702. ;;
  5703. osf3* | osf4* | osf5*)
  5704. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5705. # All OSF/1 code is PIC.
  5706. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  5707. ;;
  5708. rdos*)
  5709. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  5710. ;;
  5711. solaris*)
  5712. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5713. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5714. case $cc_basename in
  5715. f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
  5716. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
  5717. *)
  5718. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
  5719. esac
  5720. ;;
  5721. sunos4*)
  5722. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  5723. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  5724. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5725. ;;
  5726. sysv4 | sysv4.2uw2* | sysv4.3*)
  5727. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5728. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5729. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5730. ;;
  5731. sysv4*MP*)
  5732. if test -d /usr/nec; then
  5733. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
  5734. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5735. fi
  5736. ;;
  5737. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  5738. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5739. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5740. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5741. ;;
  5742. unicos*)
  5743. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5744. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  5745. ;;
  5746. uts4*)
  5747. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  5748. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5749. ;;
  5750. *)
  5751. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  5752. ;;
  5753. esac
  5754. fi
  5755. ])
  5756. case $host_os in
  5757. # For platforms that do not support PIC, -DPIC is meaningless:
  5758. *djgpp*)
  5759. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  5760. ;;
  5761. *)
  5762. _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
  5763. ;;
  5764. esac
  5765. AC_CACHE_CHECK([for $compiler option to produce PIC],
  5766. [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
  5767. [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
  5768. _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
  5769. #
  5770. # Check to make sure the PIC flag actually works.
  5771. #
  5772. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  5773. _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
  5774. [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
  5775. [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
  5776. [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
  5777. "" | " "*) ;;
  5778. *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
  5779. esac],
  5780. [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
  5781. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
  5782. fi
  5783. _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
  5784. [Additional compiler flags for building library objects])
  5785. _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
  5786. [How to pass a linker flag through the compiler])
  5787. #
  5788. # Check to make sure the static flag actually works.
  5789. #
  5790. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
  5791. _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
  5792. _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
  5793. $lt_tmp_static_flag,
  5794. [],
  5795. [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
  5796. _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
  5797. [Compiler flag to prevent dynamic linking])
  5798. ])# _LT_COMPILER_PIC
  5799. # _LT_LINKER_SHLIBS([TAGNAME])
  5800. # ----------------------------
  5801. # See if the linker supports building shared libraries.
  5802. m4_defun([_LT_LINKER_SHLIBS],
  5803. [AC_REQUIRE([LT_PATH_LD])dnl
  5804. AC_REQUIRE([LT_PATH_NM])dnl
  5805. m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  5806. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  5807. m4_require([_LT_DECL_EGREP])dnl
  5808. m4_require([_LT_DECL_SED])dnl
  5809. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  5810. m4_require([_LT_TAG_COMPILER])dnl
  5811. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  5812. m4_if([$1], [CXX], [
  5813. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  5814. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  5815. case $host_os in
  5816. aix[[4-9]]*)
  5817. # If we're using GNU nm, then we don't want the "-C" option.
  5818. # -C means demangle to GNU nm, but means don't demangle to AIX nm.
  5819. # Without the "-l" option, or with the "-B" option, AIX nm treats
  5820. # weak defined symbols like other global defined symbols, whereas
  5821. # GNU nm marks them as "W".
  5822. # While the 'weak' keyword is ignored in the Export File, we need
  5823. # it in the Import File for the 'aix-soname' feature, so we have
  5824. # to replace the "-B" option with "-P" for AIX nm.
  5825. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  5826. _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'
  5827. else
  5828. _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'
  5829. fi
  5830. ;;
  5831. pw32*)
  5832. _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
  5833. ;;
  5834. cygwin* | mingw* | cegcc*)
  5835. case $cc_basename in
  5836. cl*)
  5837. _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  5838. ;;
  5839. *)
  5840. _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'
  5841. _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  5842. ;;
  5843. esac
  5844. ;;
  5845. *)
  5846. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  5847. ;;
  5848. esac
  5849. ], [
  5850. runpath_var=
  5851. _LT_TAGVAR(allow_undefined_flag, $1)=
  5852. _LT_TAGVAR(always_export_symbols, $1)=no
  5853. _LT_TAGVAR(archive_cmds, $1)=
  5854. _LT_TAGVAR(archive_expsym_cmds, $1)=
  5855. _LT_TAGVAR(compiler_needs_object, $1)=no
  5856. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  5857. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  5858. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  5859. _LT_TAGVAR(hardcode_automatic, $1)=no
  5860. _LT_TAGVAR(hardcode_direct, $1)=no
  5861. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  5862. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  5863. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5864. _LT_TAGVAR(hardcode_minus_L, $1)=no
  5865. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  5866. _LT_TAGVAR(inherit_rpath, $1)=no
  5867. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  5868. _LT_TAGVAR(module_cmds, $1)=
  5869. _LT_TAGVAR(module_expsym_cmds, $1)=
  5870. _LT_TAGVAR(old_archive_from_new_cmds, $1)=
  5871. _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
  5872. _LT_TAGVAR(thread_safe_flag_spec, $1)=
  5873. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5874. # include_expsyms should be a list of space-separated symbols to be *always*
  5875. # included in the symbol list
  5876. _LT_TAGVAR(include_expsyms, $1)=
  5877. # exclude_expsyms can be an extended regexp of symbols to exclude
  5878. # it will be wrapped by ' (' and ')$', so one must not match beginning or
  5879. # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
  5880. # as well as any symbol that contains 'd'.
  5881. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  5882. # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  5883. # platforms (ab)use it in PIC code, but their linkers get confused if
  5884. # the symbol is explicitly referenced. Since portable code cannot
  5885. # rely on this symbol name, it's probably fine to never include it in
  5886. # preloaded symbol tables.
  5887. # Exclude shared library initialization/finalization symbols.
  5888. dnl Note also adjust exclude_expsyms for C++ above.
  5889. extract_expsyms_cmds=
  5890. case $host_os in
  5891. cygwin* | mingw* | pw32* | cegcc*)
  5892. # FIXME: the MSVC++ port hasn't been tested in a loooong time
  5893. # When not using gcc, we currently assume that we are using
  5894. # Microsoft Visual C++.
  5895. if test yes != "$GCC"; then
  5896. with_gnu_ld=no
  5897. fi
  5898. ;;
  5899. interix*)
  5900. # we just hope/assume this is gcc and not c89 (= MSVC++)
  5901. with_gnu_ld=yes
  5902. ;;
  5903. openbsd* | bitrig*)
  5904. with_gnu_ld=no
  5905. ;;
  5906. esac
  5907. _LT_TAGVAR(ld_shlibs, $1)=yes
  5908. # On some targets, GNU ld is compatible enough with the native linker
  5909. # that we're better off using the native interface for both.
  5910. lt_use_gnu_ld_interface=no
  5911. if test yes = "$with_gnu_ld"; then
  5912. case $host_os in
  5913. aix*)
  5914. # The AIX port of GNU ld has always aspired to compatibility
  5915. # with the native linker. However, as the warning in the GNU ld
  5916. # block says, versions before 2.19.5* couldn't really create working
  5917. # shared libraries, regardless of the interface used.
  5918. case `$LD -v 2>&1` in
  5919. *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
  5920. *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
  5921. *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
  5922. *)
  5923. lt_use_gnu_ld_interface=yes
  5924. ;;
  5925. esac
  5926. ;;
  5927. *)
  5928. lt_use_gnu_ld_interface=yes
  5929. ;;
  5930. esac
  5931. fi
  5932. if test yes = "$lt_use_gnu_ld_interface"; then
  5933. # If archive_cmds runs LD, not CC, wlarc should be empty
  5934. wlarc='$wl'
  5935. # Set some defaults for GNU ld with shared library support. These
  5936. # are reset later if shared libraries are not supported. Putting them
  5937. # here allows them to be overridden if necessary.
  5938. runpath_var=LD_RUN_PATH
  5939. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5940. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  5941. # ancient GNU ld didn't support --whole-archive et. al.
  5942. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
  5943. _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
  5944. else
  5945. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5946. fi
  5947. supports_anon_versioning=no
  5948. case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
  5949. *GNU\ gold*) supports_anon_versioning=yes ;;
  5950. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
  5951. *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
  5952. *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
  5953. *\ 2.11.*) ;; # other 2.11 versions
  5954. *) supports_anon_versioning=yes ;;
  5955. esac
  5956. # See if GNU ld supports shared libraries.
  5957. case $host_os in
  5958. aix[[3-9]]*)
  5959. # On AIX/PPC, the GNU linker is very broken
  5960. if test ia64 != "$host_cpu"; then
  5961. _LT_TAGVAR(ld_shlibs, $1)=no
  5962. cat <<_LT_EOF 1>&2
  5963. *** Warning: the GNU linker, at least up to release 2.19, is reported
  5964. *** to be unable to reliably create shared libraries on AIX.
  5965. *** Therefore, libtool is disabling shared libraries support. If you
  5966. *** really care for shared libraries, you may want to install binutils
  5967. *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
  5968. *** You will then need to restart the configuration process.
  5969. _LT_EOF
  5970. fi
  5971. ;;
  5972. amigaos*)
  5973. case $host_cpu in
  5974. powerpc)
  5975. # see comment about AmigaOS4 .so support
  5976. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  5977. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  5978. ;;
  5979. m68k)
  5980. _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)'
  5981. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5982. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5983. ;;
  5984. esac
  5985. ;;
  5986. beos*)
  5987. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  5988. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5989. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  5990. # support --undefined. This deserves some investigation. FIXME
  5991. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  5992. else
  5993. _LT_TAGVAR(ld_shlibs, $1)=no
  5994. fi
  5995. ;;
  5996. cygwin* | mingw* | pw32* | cegcc*)
  5997. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  5998. # as there is no search path for DLLs.
  5999. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6000. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
  6001. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6002. _LT_TAGVAR(always_export_symbols, $1)=no
  6003. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  6004. _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'
  6005. _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  6006. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  6007. _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'
  6008. # If the export-symbols file already is a .def file, use it as
  6009. # is; otherwise, prepend EXPORTS...
  6010. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  6011. cp $export_symbols $output_objdir/$soname.def;
  6012. else
  6013. echo EXPORTS > $output_objdir/$soname.def;
  6014. cat $export_symbols >> $output_objdir/$soname.def;
  6015. fi~
  6016. $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  6017. else
  6018. _LT_TAGVAR(ld_shlibs, $1)=no
  6019. fi
  6020. ;;
  6021. haiku*)
  6022. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  6023. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6024. ;;
  6025. os2*)
  6026. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6027. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  6028. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6029. shrext_cmds=.dll
  6030. _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  6031. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  6032. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  6033. $ECHO EXPORTS >> $output_objdir/$libname.def~
  6034. emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
  6035. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  6036. emximp -o $lib $output_objdir/$libname.def'
  6037. _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  6038. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  6039. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  6040. $ECHO EXPORTS >> $output_objdir/$libname.def~
  6041. prefix_cmds="$SED"~
  6042. if test EXPORTS = "`$SED 1q $export_symbols`"; then
  6043. prefix_cmds="$prefix_cmds -e 1d";
  6044. fi~
  6045. prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
  6046. cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
  6047. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  6048. emximp -o $lib $output_objdir/$libname.def'
  6049. _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
  6050. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  6051. ;;
  6052. interix[[3-9]]*)
  6053. _LT_TAGVAR(hardcode_direct, $1)=no
  6054. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6055. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6056. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  6057. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  6058. # Instead, shared libraries are loaded at an image base (0x10000000 by
  6059. # default) and relocated if they conflict, which is a slow very memory
  6060. # consuming and fragmenting process. To avoid this, we pick a random,
  6061. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  6062. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  6063. _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'
  6064. _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'
  6065. ;;
  6066. gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
  6067. tmp_diet=no
  6068. if test linux-dietlibc = "$host_os"; then
  6069. case $cc_basename in
  6070. diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
  6071. esac
  6072. fi
  6073. if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
  6074. && test no = "$tmp_diet"
  6075. then
  6076. tmp_addflag=' $pic_flag'
  6077. tmp_sharedflag='-shared'
  6078. case $cc_basename,$host_cpu in
  6079. pgcc*) # Portland Group C compiler
  6080. _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'
  6081. tmp_addflag=' $pic_flag'
  6082. ;;
  6083. pgf77* | pgf90* | pgf95* | pgfortran*)
  6084. # Portland Group f77 and f90 compilers
  6085. _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'
  6086. tmp_addflag=' $pic_flag -Mnomain' ;;
  6087. ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
  6088. tmp_addflag=' -i_dynamic' ;;
  6089. efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
  6090. tmp_addflag=' -i_dynamic -nofor_main' ;;
  6091. ifc* | ifort*) # Intel Fortran compiler
  6092. tmp_addflag=' -nofor_main' ;;
  6093. lf95*) # Lahey Fortran 8.1
  6094. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  6095. tmp_sharedflag='--shared' ;;
  6096. nagfor*) # NAGFOR 5.3
  6097. tmp_sharedflag='-Wl,-shared' ;;
  6098. xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
  6099. tmp_sharedflag='-qmkshrobj'
  6100. tmp_addflag= ;;
  6101. nvcc*) # Cuda Compiler Driver 2.2
  6102. _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'
  6103. _LT_TAGVAR(compiler_needs_object, $1)=yes
  6104. ;;
  6105. esac
  6106. case `$CC -V 2>&1 | sed 5q` in
  6107. *Sun\ C*) # Sun C 5.9
  6108. _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'
  6109. _LT_TAGVAR(compiler_needs_object, $1)=yes
  6110. tmp_sharedflag='-G' ;;
  6111. *Sun\ F*) # Sun Fortran 8.3
  6112. tmp_sharedflag='-G' ;;
  6113. esac
  6114. _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  6115. if test yes = "$supports_anon_versioning"; then
  6116. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  6117. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  6118. echo "local: *; };" >> $output_objdir/$libname.ver~
  6119. $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
  6120. fi
  6121. case $cc_basename in
  6122. tcc*)
  6123. _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
  6124. ;;
  6125. xlf* | bgf* | bgxlf* | mpixlf*)
  6126. # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
  6127. _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
  6128. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  6129. _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
  6130. if test yes = "$supports_anon_versioning"; then
  6131. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  6132. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  6133. echo "local: *; };" >> $output_objdir/$libname.ver~
  6134. $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
  6135. fi
  6136. ;;
  6137. esac
  6138. else
  6139. _LT_TAGVAR(ld_shlibs, $1)=no
  6140. fi
  6141. ;;
  6142. netbsd*)
  6143. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  6144. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  6145. wlarc=
  6146. else
  6147. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  6148. _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'
  6149. fi
  6150. ;;
  6151. solaris*)
  6152. if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
  6153. _LT_TAGVAR(ld_shlibs, $1)=no
  6154. cat <<_LT_EOF 1>&2
  6155. *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  6156. *** create shared libraries on Solaris systems. Therefore, libtool
  6157. *** is disabling shared libraries support. We urge you to upgrade GNU
  6158. *** binutils to release 2.9.1 or newer. Another option is to modify
  6159. *** your PATH or compiler configuration so that the native linker is
  6160. *** used, and then restart.
  6161. _LT_EOF
  6162. elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  6163. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  6164. _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'
  6165. else
  6166. _LT_TAGVAR(ld_shlibs, $1)=no
  6167. fi
  6168. ;;
  6169. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
  6170. case `$LD -v 2>&1` in
  6171. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
  6172. _LT_TAGVAR(ld_shlibs, $1)=no
  6173. cat <<_LT_EOF 1>&2
  6174. *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
  6175. *** reliably create shared libraries on SCO systems. Therefore, libtool
  6176. *** is disabling shared libraries support. We urge you to upgrade GNU
  6177. *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
  6178. *** your PATH or compiler configuration so that the native linker is
  6179. *** used, and then restart.
  6180. _LT_EOF
  6181. ;;
  6182. *)
  6183. # For security reasons, it is highly recommended that you always
  6184. # use absolute paths for naming shared libraries, and exclude the
  6185. # DT_RUNPATH tag from executables and libraries. But doing so
  6186. # requires that you compile everything twice, which is a pain.
  6187. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  6188. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  6189. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  6190. _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'
  6191. else
  6192. _LT_TAGVAR(ld_shlibs, $1)=no
  6193. fi
  6194. ;;
  6195. esac
  6196. ;;
  6197. sunos4*)
  6198. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  6199. wlarc=
  6200. _LT_TAGVAR(hardcode_direct, $1)=yes
  6201. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6202. ;;
  6203. *)
  6204. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  6205. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  6206. _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'
  6207. else
  6208. _LT_TAGVAR(ld_shlibs, $1)=no
  6209. fi
  6210. ;;
  6211. esac
  6212. if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
  6213. runpath_var=
  6214. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  6215. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  6216. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  6217. fi
  6218. else
  6219. # PORTME fill in a description of your system's linker (not GNU ld)
  6220. case $host_os in
  6221. aix3*)
  6222. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6223. _LT_TAGVAR(always_export_symbols, $1)=yes
  6224. _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'
  6225. # Note: this linker hardcodes the directories in LIBPATH if there
  6226. # are no directories specified by -L.
  6227. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  6228. if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
  6229. # Neither direct hardcoding nor static linking is supported with a
  6230. # broken collect2.
  6231. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  6232. fi
  6233. ;;
  6234. aix[[4-9]]*)
  6235. if test ia64 = "$host_cpu"; then
  6236. # On IA64, the linker does run time linking by default, so we don't
  6237. # have to do anything special.
  6238. aix_use_runtimelinking=no
  6239. exp_sym_flag='-Bexport'
  6240. no_entry_flag=
  6241. else
  6242. # If we're using GNU nm, then we don't want the "-C" option.
  6243. # -C means demangle to GNU nm, but means don't demangle to AIX nm.
  6244. # Without the "-l" option, or with the "-B" option, AIX nm treats
  6245. # weak defined symbols like other global defined symbols, whereas
  6246. # GNU nm marks them as "W".
  6247. # While the 'weak' keyword is ignored in the Export File, we need
  6248. # it in the Import File for the 'aix-soname' feature, so we have
  6249. # to replace the "-B" option with "-P" for AIX nm.
  6250. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  6251. _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'
  6252. else
  6253. _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'
  6254. fi
  6255. aix_use_runtimelinking=no
  6256. # Test if we are trying to use run time linking or normal
  6257. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  6258. # have runtime linking enabled, and use it for executables.
  6259. # For shared libraries, we enable/disable runtime linking
  6260. # depending on the kind of the shared library created -
  6261. # when "with_aix_soname,aix_use_runtimelinking" is:
  6262. # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
  6263. # "aix,yes" lib.so shared, rtl:yes, for executables
  6264. # lib.a static archive
  6265. # "both,no" lib.so.V(shr.o) shared, rtl:yes
  6266. # lib.a(lib.so.V) shared, rtl:no, for executables
  6267. # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
  6268. # lib.a(lib.so.V) shared, rtl:no
  6269. # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
  6270. # lib.a static archive
  6271. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  6272. for ld_flag in $LDFLAGS; do
  6273. if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
  6274. aix_use_runtimelinking=yes
  6275. break
  6276. fi
  6277. done
  6278. if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
  6279. # With aix-soname=svr4, we create the lib.so.V shared archives only,
  6280. # so we don't have lib.a shared libs to link our executables.
  6281. # We have to force runtime linking in this case.
  6282. aix_use_runtimelinking=yes
  6283. LDFLAGS="$LDFLAGS -Wl,-brtl"
  6284. fi
  6285. ;;
  6286. esac
  6287. exp_sym_flag='-bexport'
  6288. no_entry_flag='-bnoentry'
  6289. fi
  6290. # When large executables or shared objects are built, AIX ld can
  6291. # have problems creating the table of contents. If linking a library
  6292. # or program results in "error TOC overflow" add -mminimal-toc to
  6293. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  6294. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  6295. _LT_TAGVAR(archive_cmds, $1)=''
  6296. _LT_TAGVAR(hardcode_direct, $1)=yes
  6297. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6298. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  6299. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6300. _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
  6301. case $with_aix_soname,$aix_use_runtimelinking in
  6302. aix,*) ;; # traditional, no import file
  6303. svr4,* | *,yes) # use import file
  6304. # The Import File defines what to hardcode.
  6305. _LT_TAGVAR(hardcode_direct, $1)=no
  6306. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  6307. ;;
  6308. esac
  6309. if test yes = "$GCC"; then
  6310. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  6311. # We only want to do this on AIX 4.2 and lower, the check
  6312. # below for broken collect2 doesn't work under 4.3+
  6313. collect2name=`$CC -print-prog-name=collect2`
  6314. if test -f "$collect2name" &&
  6315. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  6316. then
  6317. # We have reworked collect2
  6318. :
  6319. else
  6320. # We have old collect2
  6321. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  6322. # It fails to find uninstalled libraries when the uninstalled
  6323. # path is not listed in the libpath. Setting hardcode_minus_L
  6324. # to unsupported forces relinking
  6325. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  6326. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6327. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  6328. fi
  6329. ;;
  6330. esac
  6331. shared_flag='-shared'
  6332. if test yes = "$aix_use_runtimelinking"; then
  6333. shared_flag="$shared_flag "'$wl-G'
  6334. fi
  6335. # Need to ensure runtime linking is disabled for the traditional
  6336. # shared library, or the linker may eventually find shared libraries
  6337. # /with/ Import File - we do not want to mix them.
  6338. shared_flag_aix='-shared'
  6339. shared_flag_svr4='-shared $wl-G'
  6340. else
  6341. # not using gcc
  6342. if test ia64 = "$host_cpu"; then
  6343. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  6344. # chokes on -Wl,-G. The following line is correct:
  6345. shared_flag='-G'
  6346. else
  6347. if test yes = "$aix_use_runtimelinking"; then
  6348. shared_flag='$wl-G'
  6349. else
  6350. shared_flag='$wl-bM:SRE'
  6351. fi
  6352. shared_flag_aix='$wl-bM:SRE'
  6353. shared_flag_svr4='$wl-G'
  6354. fi
  6355. fi
  6356. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
  6357. # It seems that -bexpall does not export symbols beginning with
  6358. # underscore (_), so it is better to generate a list of symbols to export.
  6359. _LT_TAGVAR(always_export_symbols, $1)=yes
  6360. if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
  6361. # Warning - without using the other runtime loading flags (-brtl),
  6362. # -berok will link without error, but may produce a broken library.
  6363. _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
  6364. # Determine the default libpath from the value encoded in an
  6365. # empty executable.
  6366. _LT_SYS_MODULE_PATH_AIX([$1])
  6367. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
  6368. _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
  6369. else
  6370. if test ia64 = "$host_cpu"; then
  6371. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
  6372. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  6373. _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"
  6374. else
  6375. # Determine the default libpath from the value encoded in an
  6376. # empty executable.
  6377. _LT_SYS_MODULE_PATH_AIX([$1])
  6378. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
  6379. # Warning - without using the other run time loading flags,
  6380. # -berok will link without error, but may produce a broken library.
  6381. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
  6382. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
  6383. if test yes = "$with_gnu_ld"; then
  6384. # We only use this code for GNU lds that support --whole-archive.
  6385. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
  6386. else
  6387. # Exported symbols can be pulled into shared objects from archives
  6388. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  6389. fi
  6390. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  6391. _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
  6392. # -brtl affects multiple linker settings, -berok does not and is overridden later
  6393. compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
  6394. if test svr4 != "$with_aix_soname"; then
  6395. # This is similar to how AIX traditionally builds its shared libraries.
  6396. _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'
  6397. fi
  6398. if test aix != "$with_aix_soname"; then
  6399. _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'
  6400. else
  6401. # used by -dlpreopen to get the symbols
  6402. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
  6403. fi
  6404. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
  6405. fi
  6406. fi
  6407. ;;
  6408. amigaos*)
  6409. case $host_cpu in
  6410. powerpc)
  6411. # see comment about AmigaOS4 .so support
  6412. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  6413. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  6414. ;;
  6415. m68k)
  6416. _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)'
  6417. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6418. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  6419. ;;
  6420. esac
  6421. ;;
  6422. bsdi[[45]]*)
  6423. _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
  6424. ;;
  6425. cygwin* | mingw* | pw32* | cegcc*)
  6426. # When not using gcc, we currently assume that we are using
  6427. # Microsoft Visual C++.
  6428. # hardcode_libdir_flag_spec is actually meaningless, as there is
  6429. # no search path for DLLs.
  6430. case $cc_basename in
  6431. cl*)
  6432. # Native MSVC
  6433. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  6434. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6435. _LT_TAGVAR(always_export_symbols, $1)=yes
  6436. _LT_TAGVAR(file_list_spec, $1)='@'
  6437. # Tell ltmain to make .lib files, not .a files.
  6438. libext=lib
  6439. # Tell ltmain to make .dll files, not .so files.
  6440. shrext_cmds=.dll
  6441. # FIXME: Setting linknames here is a bad hack.
  6442. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
  6443. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  6444. cp "$export_symbols" "$output_objdir/$soname.def";
  6445. echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
  6446. else
  6447. $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
  6448. fi~
  6449. $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  6450. linknames='
  6451. # The linker will not automatically build a static lib if we build a DLL.
  6452. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  6453. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  6454. _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  6455. _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'
  6456. # Don't use ranlib
  6457. _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  6458. _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  6459. lt_tool_outputfile="@TOOL_OUTPUT@"~
  6460. case $lt_outputfile in
  6461. *.exe|*.EXE) ;;
  6462. *)
  6463. lt_outputfile=$lt_outputfile.exe
  6464. lt_tool_outputfile=$lt_tool_outputfile.exe
  6465. ;;
  6466. esac~
  6467. if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
  6468. $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  6469. $RM "$lt_outputfile.manifest";
  6470. fi'
  6471. ;;
  6472. *)
  6473. # Assume MSVC wrapper
  6474. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  6475. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6476. # Tell ltmain to make .lib files, not .a files.
  6477. libext=lib
  6478. # Tell ltmain to make .dll files, not .so files.
  6479. shrext_cmds=.dll
  6480. # FIXME: Setting linknames here is a bad hack.
  6481. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
  6482. # The linker will automatically build a .lib file if we build a DLL.
  6483. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  6484. # FIXME: Should let the user specify the lib program.
  6485. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
  6486. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  6487. ;;
  6488. esac
  6489. ;;
  6490. darwin* | rhapsody*)
  6491. _LT_DARWIN_LINKER_FEATURES($1)
  6492. ;;
  6493. dgux*)
  6494. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  6495. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6496. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6497. ;;
  6498. # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  6499. # support. Future versions do this automatically, but an explicit c++rt0.o
  6500. # does not break anything, and helps significantly (at the cost of a little
  6501. # extra space).
  6502. freebsd2.2*)
  6503. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
  6504. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6505. _LT_TAGVAR(hardcode_direct, $1)=yes
  6506. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6507. ;;
  6508. # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  6509. freebsd2.*)
  6510. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  6511. _LT_TAGVAR(hardcode_direct, $1)=yes
  6512. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  6513. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6514. ;;
  6515. # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  6516. freebsd* | dragonfly*)
  6517. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  6518. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6519. _LT_TAGVAR(hardcode_direct, $1)=yes
  6520. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6521. ;;
  6522. hpux9*)
  6523. if test yes = "$GCC"; then
  6524. _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'
  6525. else
  6526. _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'
  6527. fi
  6528. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  6529. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6530. _LT_TAGVAR(hardcode_direct, $1)=yes
  6531. # hardcode_minus_L: Not really in the search PATH,
  6532. # but as the default location of the library.
  6533. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  6534. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  6535. ;;
  6536. hpux10*)
  6537. if test yes,no = "$GCC,$with_gnu_ld"; then
  6538. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  6539. else
  6540. _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
  6541. fi
  6542. if test no = "$with_gnu_ld"; then
  6543. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  6544. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6545. _LT_TAGVAR(hardcode_direct, $1)=yes
  6546. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6547. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  6548. # hardcode_minus_L: Not really in the search PATH,
  6549. # but as the default location of the library.
  6550. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  6551. fi
  6552. ;;
  6553. hpux11*)
  6554. if test yes,no = "$GCC,$with_gnu_ld"; then
  6555. case $host_cpu in
  6556. hppa*64*)
  6557. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
  6558. ;;
  6559. ia64*)
  6560. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  6561. ;;
  6562. *)
  6563. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  6564. ;;
  6565. esac
  6566. else
  6567. case $host_cpu in
  6568. hppa*64*)
  6569. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
  6570. ;;
  6571. ia64*)
  6572. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  6573. ;;
  6574. *)
  6575. m4_if($1, [], [
  6576. # Older versions of the 11.00 compiler do not understand -b yet
  6577. # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
  6578. _LT_LINKER_OPTION([if $CC understands -b],
  6579. _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
  6580. [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
  6581. [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
  6582. [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
  6583. ;;
  6584. esac
  6585. fi
  6586. if test no = "$with_gnu_ld"; then
  6587. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  6588. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6589. case $host_cpu in
  6590. hppa*64*|ia64*)
  6591. _LT_TAGVAR(hardcode_direct, $1)=no
  6592. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6593. ;;
  6594. *)
  6595. _LT_TAGVAR(hardcode_direct, $1)=yes
  6596. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6597. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  6598. # hardcode_minus_L: Not really in the search PATH,
  6599. # but as the default location of the library.
  6600. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  6601. ;;
  6602. esac
  6603. fi
  6604. ;;
  6605. irix5* | irix6* | nonstopux*)
  6606. if test yes = "$GCC"; then
  6607. _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'
  6608. # Try to use the -exported_symbol ld option, if it does not
  6609. # work, assume that -exports_file does not work either and
  6610. # implicitly export all symbols.
  6611. # This should be the same for all languages, so no per-tag cache variable.
  6612. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
  6613. [lt_cv_irix_exported_symbol],
  6614. [save_LDFLAGS=$LDFLAGS
  6615. LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
  6616. AC_LINK_IFELSE(
  6617. [AC_LANG_SOURCE(
  6618. [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
  6619. [C++], [[int foo (void) { return 0; }]],
  6620. [Fortran 77], [[
  6621. subroutine foo
  6622. end]],
  6623. [Fortran], [[
  6624. subroutine foo
  6625. end]])])],
  6626. [lt_cv_irix_exported_symbol=yes],
  6627. [lt_cv_irix_exported_symbol=no])
  6628. LDFLAGS=$save_LDFLAGS])
  6629. if test yes = "$lt_cv_irix_exported_symbol"; then
  6630. _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'
  6631. fi
  6632. else
  6633. _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'
  6634. _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'
  6635. fi
  6636. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  6637. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  6638. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6639. _LT_TAGVAR(inherit_rpath, $1)=yes
  6640. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6641. ;;
  6642. linux*)
  6643. case $cc_basename in
  6644. tcc*)
  6645. # Fabrice Bellard et al's Tiny C Compiler
  6646. _LT_TAGVAR(ld_shlibs, $1)=yes
  6647. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  6648. ;;
  6649. esac
  6650. ;;
  6651. netbsd*)
  6652. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  6653. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
  6654. else
  6655. _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
  6656. fi
  6657. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6658. _LT_TAGVAR(hardcode_direct, $1)=yes
  6659. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6660. ;;
  6661. newsos6)
  6662. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  6663. _LT_TAGVAR(hardcode_direct, $1)=yes
  6664. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  6665. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6666. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6667. ;;
  6668. *nto* | *qnx*)
  6669. ;;
  6670. openbsd* | bitrig*)
  6671. if test -f /usr/libexec/ld.so; then
  6672. _LT_TAGVAR(hardcode_direct, $1)=yes
  6673. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6674. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6675. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
  6676. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  6677. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
  6678. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6679. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  6680. else
  6681. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  6682. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6683. fi
  6684. else
  6685. _LT_TAGVAR(ld_shlibs, $1)=no
  6686. fi
  6687. ;;
  6688. os2*)
  6689. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6690. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  6691. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6692. shrext_cmds=.dll
  6693. _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  6694. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  6695. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  6696. $ECHO EXPORTS >> $output_objdir/$libname.def~
  6697. emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
  6698. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  6699. emximp -o $lib $output_objdir/$libname.def'
  6700. _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  6701. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  6702. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  6703. $ECHO EXPORTS >> $output_objdir/$libname.def~
  6704. prefix_cmds="$SED"~
  6705. if test EXPORTS = "`$SED 1q $export_symbols`"; then
  6706. prefix_cmds="$prefix_cmds -e 1d";
  6707. fi~
  6708. prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
  6709. cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
  6710. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  6711. emximp -o $lib $output_objdir/$libname.def'
  6712. _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
  6713. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  6714. ;;
  6715. osf3*)
  6716. if test yes = "$GCC"; then
  6717. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
  6718. _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'
  6719. else
  6720. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  6721. _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'
  6722. fi
  6723. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  6724. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  6725. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6726. ;;
  6727. osf4* | osf5*) # as osf3* with the addition of -msym flag
  6728. if test yes = "$GCC"; then
  6729. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
  6730. _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'
  6731. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  6732. else
  6733. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  6734. _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'
  6735. _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~
  6736. $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'
  6737. # Both c and cxx compiler support -rpath directly
  6738. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  6739. fi
  6740. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  6741. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6742. ;;
  6743. solaris*)
  6744. _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
  6745. if test yes = "$GCC"; then
  6746. wlarc='$wl'
  6747. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
  6748. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6749. $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'
  6750. else
  6751. case `$CC -V 2>&1` in
  6752. *"Compilers 5.0"*)
  6753. wlarc=''
  6754. _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
  6755. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6756. $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
  6757. ;;
  6758. *)
  6759. wlarc='$wl'
  6760. _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
  6761. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6762. $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
  6763. ;;
  6764. esac
  6765. fi
  6766. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6767. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6768. case $host_os in
  6769. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6770. *)
  6771. # The compiler driver will combine and reorder linker options,
  6772. # but understands '-z linker_flag'. GCC discards it without '$wl',
  6773. # but is careful enough not to reorder.
  6774. # Supported since Solaris 2.6 (maybe 2.5.1?)
  6775. if test yes = "$GCC"; then
  6776. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
  6777. else
  6778. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  6779. fi
  6780. ;;
  6781. esac
  6782. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6783. ;;
  6784. sunos4*)
  6785. if test sequent = "$host_vendor"; then
  6786. # Use $CC to link under sequent, because it throws in some extra .o
  6787. # files that make .init and .fini sections work.
  6788. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
  6789. else
  6790. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
  6791. fi
  6792. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6793. _LT_TAGVAR(hardcode_direct, $1)=yes
  6794. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  6795. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6796. ;;
  6797. sysv4)
  6798. case $host_vendor in
  6799. sni)
  6800. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  6801. _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
  6802. ;;
  6803. siemens)
  6804. ## LD is ld it makes a PLAMLIB
  6805. ## CC just makes a GrossModule.
  6806. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  6807. _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
  6808. _LT_TAGVAR(hardcode_direct, $1)=no
  6809. ;;
  6810. motorola)
  6811. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  6812. _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
  6813. ;;
  6814. esac
  6815. runpath_var='LD_RUN_PATH'
  6816. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6817. ;;
  6818. sysv4.3*)
  6819. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  6820. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6821. _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
  6822. ;;
  6823. sysv4*MP*)
  6824. if test -d /usr/nec; then
  6825. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  6826. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6827. runpath_var=LD_RUN_PATH
  6828. hardcode_runpath_var=yes
  6829. _LT_TAGVAR(ld_shlibs, $1)=yes
  6830. fi
  6831. ;;
  6832. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  6833. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  6834. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6835. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6836. runpath_var='LD_RUN_PATH'
  6837. if test yes = "$GCC"; then
  6838. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6839. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6840. else
  6841. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6842. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6843. fi
  6844. ;;
  6845. sysv5* | sco3.2v5* | sco5v6*)
  6846. # Note: We CANNOT use -z defs as we might desire, because we do not
  6847. # link with -lc, and that would cause any symbols used from libc to
  6848. # always be unresolved, which means just about no library would
  6849. # ever link correctly. If we're not using GNU ld we use -z text
  6850. # though, which does catch some bad symbols but isn't as heavy-handed
  6851. # as -z defs.
  6852. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  6853. _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
  6854. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6855. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6856. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
  6857. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  6858. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6859. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
  6860. runpath_var='LD_RUN_PATH'
  6861. if test yes = "$GCC"; then
  6862. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6863. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6864. else
  6865. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6866. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6867. fi
  6868. ;;
  6869. uts4*)
  6870. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  6871. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6872. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6873. ;;
  6874. *)
  6875. _LT_TAGVAR(ld_shlibs, $1)=no
  6876. ;;
  6877. esac
  6878. if test sni = "$host_vendor"; then
  6879. case $host in
  6880. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  6881. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
  6882. ;;
  6883. esac
  6884. fi
  6885. fi
  6886. ])
  6887. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  6888. test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
  6889. _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
  6890. _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
  6891. _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
  6892. _LT_DECL([], [extract_expsyms_cmds], [2],
  6893. [The commands to extract the exported symbol list from a shared archive])
  6894. #
  6895. # Do we need to explicitly link libc?
  6896. #
  6897. case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
  6898. x|xyes)
  6899. # Assume -lc should be added
  6900. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  6901. if test yes,yes = "$GCC,$enable_shared"; then
  6902. case $_LT_TAGVAR(archive_cmds, $1) in
  6903. *'~'*)
  6904. # FIXME: we may have to deal with multi-command sequences.
  6905. ;;
  6906. '$CC '*)
  6907. # Test whether the compiler implicitly links with -lc since on some
  6908. # systems, -lgcc has to come before -lc. If gcc already passes -lc
  6909. # to ld, don't add -lc before -lgcc.
  6910. AC_CACHE_CHECK([whether -lc should be explicitly linked in],
  6911. [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
  6912. [$RM conftest*
  6913. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  6914. if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
  6915. soname=conftest
  6916. lib=conftest
  6917. libobjs=conftest.$ac_objext
  6918. deplibs=
  6919. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
  6920. pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
  6921. compiler_flags=-v
  6922. linker_flags=-v
  6923. verstring=
  6924. output_objdir=.
  6925. libname=conftest
  6926. lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
  6927. _LT_TAGVAR(allow_undefined_flag, $1)=
  6928. if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
  6929. then
  6930. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6931. else
  6932. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  6933. fi
  6934. _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
  6935. else
  6936. cat conftest.err 1>&5
  6937. fi
  6938. $RM conftest*
  6939. ])
  6940. _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
  6941. ;;
  6942. esac
  6943. fi
  6944. ;;
  6945. esac
  6946. _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
  6947. [Whether or not to add -lc for building shared libraries])
  6948. _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
  6949. [enable_shared_with_static_runtimes], [0],
  6950. [Whether or not to disallow shared libs when runtime libs are static])
  6951. _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
  6952. [Compiler flag to allow reflexive dlopens])
  6953. _LT_TAGDECL([], [whole_archive_flag_spec], [1],
  6954. [Compiler flag to generate shared objects directly from archives])
  6955. _LT_TAGDECL([], [compiler_needs_object], [1],
  6956. [Whether the compiler copes with passing no objects directly])
  6957. _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
  6958. [Create an old-style archive from a shared archive])
  6959. _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
  6960. [Create a temporary old-style archive to link instead of a shared archive])
  6961. _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
  6962. _LT_TAGDECL([], [archive_expsym_cmds], [2])
  6963. _LT_TAGDECL([], [module_cmds], [2],
  6964. [Commands used to build a loadable module if different from building
  6965. a shared archive.])
  6966. _LT_TAGDECL([], [module_expsym_cmds], [2])
  6967. _LT_TAGDECL([], [with_gnu_ld], [1],
  6968. [Whether we are building with GNU ld or not])
  6969. _LT_TAGDECL([], [allow_undefined_flag], [1],
  6970. [Flag that allows shared libraries with undefined symbols to be built])
  6971. _LT_TAGDECL([], [no_undefined_flag], [1],
  6972. [Flag that enforces no undefined symbols])
  6973. _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
  6974. [Flag to hardcode $libdir into a binary during linking.
  6975. This must work even if $libdir does not exist])
  6976. _LT_TAGDECL([], [hardcode_libdir_separator], [1],
  6977. [Whether we need a single "-rpath" flag with a separated argument])
  6978. _LT_TAGDECL([], [hardcode_direct], [0],
  6979. [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
  6980. DIR into the resulting binary])
  6981. _LT_TAGDECL([], [hardcode_direct_absolute], [0],
  6982. [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
  6983. DIR into the resulting binary and the resulting library dependency is
  6984. "absolute", i.e impossible to change by setting $shlibpath_var if the
  6985. library is relocated])
  6986. _LT_TAGDECL([], [hardcode_minus_L], [0],
  6987. [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
  6988. into the resulting binary])
  6989. _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
  6990. [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
  6991. into the resulting binary])
  6992. _LT_TAGDECL([], [hardcode_automatic], [0],
  6993. [Set to "yes" if building a shared library automatically hardcodes DIR
  6994. into the library and all subsequent libraries and executables linked
  6995. against it])
  6996. _LT_TAGDECL([], [inherit_rpath], [0],
  6997. [Set to yes if linker adds runtime paths of dependent libraries
  6998. to runtime path list])
  6999. _LT_TAGDECL([], [link_all_deplibs], [0],
  7000. [Whether libtool must link a program against all its dependency libraries])
  7001. _LT_TAGDECL([], [always_export_symbols], [0],
  7002. [Set to "yes" if exported symbols are required])
  7003. _LT_TAGDECL([], [export_symbols_cmds], [2],
  7004. [The commands to list exported symbols])
  7005. _LT_TAGDECL([], [exclude_expsyms], [1],
  7006. [Symbols that should not be listed in the preloaded symbols])
  7007. _LT_TAGDECL([], [include_expsyms], [1],
  7008. [Symbols that must always be exported])
  7009. _LT_TAGDECL([], [prelink_cmds], [2],
  7010. [Commands necessary for linking programs (against libraries) with templates])
  7011. _LT_TAGDECL([], [postlink_cmds], [2],
  7012. [Commands necessary for finishing linking programs])
  7013. _LT_TAGDECL([], [file_list_spec], [1],
  7014. [Specify filename containing input files])
  7015. dnl FIXME: Not yet implemented
  7016. dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
  7017. dnl [Compiler flag to generate thread safe objects])
  7018. ])# _LT_LINKER_SHLIBS
  7019. # _LT_LANG_C_CONFIG([TAG])
  7020. # ------------------------
  7021. # Ensure that the configuration variables for a C compiler are suitably
  7022. # defined. These variables are subsequently used by _LT_CONFIG to write
  7023. # the compiler configuration to 'libtool'.
  7024. m4_defun([_LT_LANG_C_CONFIG],
  7025. [m4_require([_LT_DECL_EGREP])dnl
  7026. lt_save_CC=$CC
  7027. AC_LANG_PUSH(C)
  7028. # Source file extension for C test sources.
  7029. ac_ext=c
  7030. # Object file extension for compiled C test sources.
  7031. objext=o
  7032. _LT_TAGVAR(objext, $1)=$objext
  7033. # Code to be used in simple compile tests
  7034. lt_simple_compile_test_code="int some_variable = 0;"
  7035. # Code to be used in simple link tests
  7036. lt_simple_link_test_code='int main(){return(0);}'
  7037. _LT_TAG_COMPILER
  7038. # Save the default compiler, since it gets overwritten when the other
  7039. # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
  7040. compiler_DEFAULT=$CC
  7041. # save warnings/boilerplate of simple test code
  7042. _LT_COMPILER_BOILERPLATE
  7043. _LT_LINKER_BOILERPLATE
  7044. if test -n "$compiler"; then
  7045. _LT_COMPILER_NO_RTTI($1)
  7046. _LT_COMPILER_PIC($1)
  7047. _LT_COMPILER_C_O($1)
  7048. _LT_COMPILER_FILE_LOCKS($1)
  7049. _LT_LINKER_SHLIBS($1)
  7050. _LT_SYS_DYNAMIC_LINKER($1)
  7051. _LT_LINKER_HARDCODE_LIBPATH($1)
  7052. LT_SYS_DLOPEN_SELF
  7053. _LT_CMD_STRIPLIB
  7054. # Report what library types will actually be built
  7055. AC_MSG_CHECKING([if libtool supports shared libraries])
  7056. AC_MSG_RESULT([$can_build_shared])
  7057. AC_MSG_CHECKING([whether to build shared libraries])
  7058. test no = "$can_build_shared" && enable_shared=no
  7059. # On AIX, shared libraries and static libraries use the same namespace, and
  7060. # are all built from PIC.
  7061. case $host_os in
  7062. aix3*)
  7063. test yes = "$enable_shared" && enable_static=no
  7064. if test -n "$RANLIB"; then
  7065. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  7066. postinstall_cmds='$RANLIB $lib'
  7067. fi
  7068. ;;
  7069. aix[[4-9]]*)
  7070. if test ia64 != "$host_cpu"; then
  7071. case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
  7072. yes,aix,yes) ;; # shared object as lib.so file only
  7073. yes,svr4,*) ;; # shared object as lib.so archive member only
  7074. yes,*) enable_static=no ;; # shared object in lib.a archive as well
  7075. esac
  7076. fi
  7077. ;;
  7078. esac
  7079. AC_MSG_RESULT([$enable_shared])
  7080. AC_MSG_CHECKING([whether to build static libraries])
  7081. # Make sure either enable_shared or enable_static is yes.
  7082. test yes = "$enable_shared" || enable_static=yes
  7083. AC_MSG_RESULT([$enable_static])
  7084. _LT_CONFIG($1)
  7085. fi
  7086. AC_LANG_POP
  7087. CC=$lt_save_CC
  7088. ])# _LT_LANG_C_CONFIG
  7089. # _LT_LANG_CXX_CONFIG([TAG])
  7090. # --------------------------
  7091. # Ensure that the configuration variables for a C++ compiler are suitably
  7092. # defined. These variables are subsequently used by _LT_CONFIG to write
  7093. # the compiler configuration to 'libtool'.
  7094. m4_defun([_LT_LANG_CXX_CONFIG],
  7095. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  7096. m4_require([_LT_DECL_EGREP])dnl
  7097. m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  7098. if test -n "$CXX" && ( test no != "$CXX" &&
  7099. ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
  7100. (test g++ != "$CXX"))); then
  7101. AC_PROG_CXXCPP
  7102. else
  7103. _lt_caught_CXX_error=yes
  7104. fi
  7105. AC_LANG_PUSH(C++)
  7106. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7107. _LT_TAGVAR(allow_undefined_flag, $1)=
  7108. _LT_TAGVAR(always_export_symbols, $1)=no
  7109. _LT_TAGVAR(archive_expsym_cmds, $1)=
  7110. _LT_TAGVAR(compiler_needs_object, $1)=no
  7111. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  7112. _LT_TAGVAR(hardcode_direct, $1)=no
  7113. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  7114. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  7115. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  7116. _LT_TAGVAR(hardcode_minus_L, $1)=no
  7117. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  7118. _LT_TAGVAR(hardcode_automatic, $1)=no
  7119. _LT_TAGVAR(inherit_rpath, $1)=no
  7120. _LT_TAGVAR(module_cmds, $1)=
  7121. _LT_TAGVAR(module_expsym_cmds, $1)=
  7122. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  7123. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7124. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  7125. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  7126. _LT_TAGVAR(no_undefined_flag, $1)=
  7127. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  7128. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  7129. # Source file extension for C++ test sources.
  7130. ac_ext=cpp
  7131. # Object file extension for compiled C++ test sources.
  7132. objext=o
  7133. _LT_TAGVAR(objext, $1)=$objext
  7134. # No sense in running all these tests if we already determined that
  7135. # the CXX compiler isn't working. Some variables (like enable_shared)
  7136. # are currently assumed to apply to all compilers on this platform,
  7137. # and will be corrupted by setting them based on a non-working compiler.
  7138. if test yes != "$_lt_caught_CXX_error"; then
  7139. # Code to be used in simple compile tests
  7140. lt_simple_compile_test_code="int some_variable = 0;"
  7141. # Code to be used in simple link tests
  7142. lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
  7143. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7144. _LT_TAG_COMPILER
  7145. # save warnings/boilerplate of simple test code
  7146. _LT_COMPILER_BOILERPLATE
  7147. _LT_LINKER_BOILERPLATE
  7148. # Allow CC to be a program name with arguments.
  7149. lt_save_CC=$CC
  7150. lt_save_CFLAGS=$CFLAGS
  7151. lt_save_LD=$LD
  7152. lt_save_GCC=$GCC
  7153. GCC=$GXX
  7154. lt_save_with_gnu_ld=$with_gnu_ld
  7155. lt_save_path_LD=$lt_cv_path_LD
  7156. if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
  7157. lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
  7158. else
  7159. $as_unset lt_cv_prog_gnu_ld
  7160. fi
  7161. if test -n "${lt_cv_path_LDCXX+set}"; then
  7162. lt_cv_path_LD=$lt_cv_path_LDCXX
  7163. else
  7164. $as_unset lt_cv_path_LD
  7165. fi
  7166. test -z "${LDCXX+set}" || LD=$LDCXX
  7167. CC=${CXX-"c++"}
  7168. CFLAGS=$CXXFLAGS
  7169. compiler=$CC
  7170. _LT_TAGVAR(compiler, $1)=$CC
  7171. _LT_CC_BASENAME([$compiler])
  7172. if test -n "$compiler"; then
  7173. # We don't want -fno-exception when compiling C++ code, so set the
  7174. # no_builtin_flag separately
  7175. if test yes = "$GXX"; then
  7176. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  7177. else
  7178. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  7179. fi
  7180. if test yes = "$GXX"; then
  7181. # Set up default GNU C++ configuration
  7182. LT_PATH_LD
  7183. # Check if GNU C++ uses GNU ld as the underlying linker, since the
  7184. # archiving commands below assume that GNU ld is being used.
  7185. if test yes = "$with_gnu_ld"; then
  7186. _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  7187. _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'
  7188. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  7189. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  7190. # If archive_cmds runs LD, not CC, wlarc should be empty
  7191. # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
  7192. # investigate it a little bit more. (MM)
  7193. wlarc='$wl'
  7194. # ancient GNU ld didn't support --whole-archive et. al.
  7195. if eval "`$CC -print-prog-name=ld` --help 2>&1" |
  7196. $GREP 'no-whole-archive' > /dev/null; then
  7197. _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
  7198. else
  7199. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  7200. fi
  7201. else
  7202. with_gnu_ld=no
  7203. wlarc=
  7204. # A generic and very simple default shared library creation
  7205. # command for GNU C++ for the case where it uses the native
  7206. # linker, instead of GNU ld. If possible, this setting should
  7207. # overridden to take advantage of the native linker features on
  7208. # the platform it is being used on.
  7209. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  7210. fi
  7211. # Commands to make compiler produce verbose output that lists
  7212. # what "hidden" libraries, object files and flags are used when
  7213. # linking a shared library.
  7214. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  7215. else
  7216. GXX=no
  7217. with_gnu_ld=no
  7218. wlarc=
  7219. fi
  7220. # PORTME: fill in a description of your system's C++ link characteristics
  7221. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  7222. _LT_TAGVAR(ld_shlibs, $1)=yes
  7223. case $host_os in
  7224. aix3*)
  7225. # FIXME: insert proper C++ library support
  7226. _LT_TAGVAR(ld_shlibs, $1)=no
  7227. ;;
  7228. aix[[4-9]]*)
  7229. if test ia64 = "$host_cpu"; then
  7230. # On IA64, the linker does run time linking by default, so we don't
  7231. # have to do anything special.
  7232. aix_use_runtimelinking=no
  7233. exp_sym_flag='-Bexport'
  7234. no_entry_flag=
  7235. else
  7236. aix_use_runtimelinking=no
  7237. # Test if we are trying to use run time linking or normal
  7238. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  7239. # have runtime linking enabled, and use it for executables.
  7240. # For shared libraries, we enable/disable runtime linking
  7241. # depending on the kind of the shared library created -
  7242. # when "with_aix_soname,aix_use_runtimelinking" is:
  7243. # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
  7244. # "aix,yes" lib.so shared, rtl:yes, for executables
  7245. # lib.a static archive
  7246. # "both,no" lib.so.V(shr.o) shared, rtl:yes
  7247. # lib.a(lib.so.V) shared, rtl:no, for executables
  7248. # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
  7249. # lib.a(lib.so.V) shared, rtl:no
  7250. # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
  7251. # lib.a static archive
  7252. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  7253. for ld_flag in $LDFLAGS; do
  7254. case $ld_flag in
  7255. *-brtl*)
  7256. aix_use_runtimelinking=yes
  7257. break
  7258. ;;
  7259. esac
  7260. done
  7261. if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
  7262. # With aix-soname=svr4, we create the lib.so.V shared archives only,
  7263. # so we don't have lib.a shared libs to link our executables.
  7264. # We have to force runtime linking in this case.
  7265. aix_use_runtimelinking=yes
  7266. LDFLAGS="$LDFLAGS -Wl,-brtl"
  7267. fi
  7268. ;;
  7269. esac
  7270. exp_sym_flag='-bexport'
  7271. no_entry_flag='-bnoentry'
  7272. fi
  7273. # When large executables or shared objects are built, AIX ld can
  7274. # have problems creating the table of contents. If linking a library
  7275. # or program results in "error TOC overflow" add -mminimal-toc to
  7276. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  7277. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  7278. _LT_TAGVAR(archive_cmds, $1)=''
  7279. _LT_TAGVAR(hardcode_direct, $1)=yes
  7280. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  7281. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  7282. _LT_TAGVAR(link_all_deplibs, $1)=yes
  7283. _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
  7284. case $with_aix_soname,$aix_use_runtimelinking in
  7285. aix,*) ;; # no import file
  7286. svr4,* | *,yes) # use import file
  7287. # The Import File defines what to hardcode.
  7288. _LT_TAGVAR(hardcode_direct, $1)=no
  7289. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  7290. ;;
  7291. esac
  7292. if test yes = "$GXX"; then
  7293. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  7294. # We only want to do this on AIX 4.2 and lower, the check
  7295. # below for broken collect2 doesn't work under 4.3+
  7296. collect2name=`$CC -print-prog-name=collect2`
  7297. if test -f "$collect2name" &&
  7298. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  7299. then
  7300. # We have reworked collect2
  7301. :
  7302. else
  7303. # We have old collect2
  7304. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  7305. # It fails to find uninstalled libraries when the uninstalled
  7306. # path is not listed in the libpath. Setting hardcode_minus_L
  7307. # to unsupported forces relinking
  7308. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  7309. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  7310. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  7311. fi
  7312. esac
  7313. shared_flag='-shared'
  7314. if test yes = "$aix_use_runtimelinking"; then
  7315. shared_flag=$shared_flag' $wl-G'
  7316. fi
  7317. # Need to ensure runtime linking is disabled for the traditional
  7318. # shared library, or the linker may eventually find shared libraries
  7319. # /with/ Import File - we do not want to mix them.
  7320. shared_flag_aix='-shared'
  7321. shared_flag_svr4='-shared $wl-G'
  7322. else
  7323. # not using gcc
  7324. if test ia64 = "$host_cpu"; then
  7325. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  7326. # chokes on -Wl,-G. The following line is correct:
  7327. shared_flag='-G'
  7328. else
  7329. if test yes = "$aix_use_runtimelinking"; then
  7330. shared_flag='$wl-G'
  7331. else
  7332. shared_flag='$wl-bM:SRE'
  7333. fi
  7334. shared_flag_aix='$wl-bM:SRE'
  7335. shared_flag_svr4='$wl-G'
  7336. fi
  7337. fi
  7338. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
  7339. # It seems that -bexpall does not export symbols beginning with
  7340. # underscore (_), so it is better to generate a list of symbols to
  7341. # export.
  7342. _LT_TAGVAR(always_export_symbols, $1)=yes
  7343. if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
  7344. # Warning - without using the other runtime loading flags (-brtl),
  7345. # -berok will link without error, but may produce a broken library.
  7346. # The "-G" linker flag allows undefined symbols.
  7347. _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
  7348. # Determine the default libpath from the value encoded in an empty
  7349. # executable.
  7350. _LT_SYS_MODULE_PATH_AIX([$1])
  7351. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
  7352. _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
  7353. else
  7354. if test ia64 = "$host_cpu"; then
  7355. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
  7356. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  7357. _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"
  7358. else
  7359. # Determine the default libpath from the value encoded in an
  7360. # empty executable.
  7361. _LT_SYS_MODULE_PATH_AIX([$1])
  7362. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
  7363. # Warning - without using the other run time loading flags,
  7364. # -berok will link without error, but may produce a broken library.
  7365. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
  7366. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
  7367. if test yes = "$with_gnu_ld"; then
  7368. # We only use this code for GNU lds that support --whole-archive.
  7369. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
  7370. else
  7371. # Exported symbols can be pulled into shared objects from archives
  7372. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  7373. fi
  7374. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  7375. _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
  7376. # -brtl affects multiple linker settings, -berok does not and is overridden later
  7377. compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
  7378. if test svr4 != "$with_aix_soname"; then
  7379. # This is similar to how AIX traditionally builds its shared
  7380. # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
  7381. _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'
  7382. fi
  7383. if test aix != "$with_aix_soname"; then
  7384. _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'
  7385. else
  7386. # used by -dlpreopen to get the symbols
  7387. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
  7388. fi
  7389. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
  7390. fi
  7391. fi
  7392. ;;
  7393. beos*)
  7394. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  7395. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  7396. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  7397. # support --undefined. This deserves some investigation. FIXME
  7398. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  7399. else
  7400. _LT_TAGVAR(ld_shlibs, $1)=no
  7401. fi
  7402. ;;
  7403. chorus*)
  7404. case $cc_basename in
  7405. *)
  7406. # FIXME: insert proper C++ library support
  7407. _LT_TAGVAR(ld_shlibs, $1)=no
  7408. ;;
  7409. esac
  7410. ;;
  7411. cygwin* | mingw* | pw32* | cegcc*)
  7412. case $GXX,$cc_basename in
  7413. ,cl* | no,cl*)
  7414. # Native MSVC
  7415. # hardcode_libdir_flag_spec is actually meaningless, as there is
  7416. # no search path for DLLs.
  7417. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  7418. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  7419. _LT_TAGVAR(always_export_symbols, $1)=yes
  7420. _LT_TAGVAR(file_list_spec, $1)='@'
  7421. # Tell ltmain to make .lib files, not .a files.
  7422. libext=lib
  7423. # Tell ltmain to make .dll files, not .so files.
  7424. shrext_cmds=.dll
  7425. # FIXME: Setting linknames here is a bad hack.
  7426. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
  7427. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  7428. cp "$export_symbols" "$output_objdir/$soname.def";
  7429. echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
  7430. else
  7431. $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
  7432. fi~
  7433. $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  7434. linknames='
  7435. # The linker will not automatically build a static lib if we build a DLL.
  7436. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  7437. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  7438. # Don't use ranlib
  7439. _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  7440. _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  7441. lt_tool_outputfile="@TOOL_OUTPUT@"~
  7442. case $lt_outputfile in
  7443. *.exe|*.EXE) ;;
  7444. *)
  7445. lt_outputfile=$lt_outputfile.exe
  7446. lt_tool_outputfile=$lt_tool_outputfile.exe
  7447. ;;
  7448. esac~
  7449. func_to_tool_file "$lt_outputfile"~
  7450. if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
  7451. $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  7452. $RM "$lt_outputfile.manifest";
  7453. fi'
  7454. ;;
  7455. *)
  7456. # g++
  7457. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  7458. # as there is no search path for DLLs.
  7459. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  7460. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
  7461. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  7462. _LT_TAGVAR(always_export_symbols, $1)=no
  7463. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  7464. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  7465. _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'
  7466. # If the export-symbols file already is a .def file, use it as
  7467. # is; otherwise, prepend EXPORTS...
  7468. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  7469. cp $export_symbols $output_objdir/$soname.def;
  7470. else
  7471. echo EXPORTS > $output_objdir/$soname.def;
  7472. cat $export_symbols >> $output_objdir/$soname.def;
  7473. fi~
  7474. $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'
  7475. else
  7476. _LT_TAGVAR(ld_shlibs, $1)=no
  7477. fi
  7478. ;;
  7479. esac
  7480. ;;
  7481. darwin* | rhapsody*)
  7482. _LT_DARWIN_LINKER_FEATURES($1)
  7483. ;;
  7484. os2*)
  7485. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  7486. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  7487. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  7488. shrext_cmds=.dll
  7489. _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  7490. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  7491. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  7492. $ECHO EXPORTS >> $output_objdir/$libname.def~
  7493. emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
  7494. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  7495. emximp -o $lib $output_objdir/$libname.def'
  7496. _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  7497. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  7498. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  7499. $ECHO EXPORTS >> $output_objdir/$libname.def~
  7500. prefix_cmds="$SED"~
  7501. if test EXPORTS = "`$SED 1q $export_symbols`"; then
  7502. prefix_cmds="$prefix_cmds -e 1d";
  7503. fi~
  7504. prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
  7505. cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
  7506. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  7507. emximp -o $lib $output_objdir/$libname.def'
  7508. _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
  7509. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  7510. ;;
  7511. dgux*)
  7512. case $cc_basename in
  7513. ec++*)
  7514. # FIXME: insert proper C++ library support
  7515. _LT_TAGVAR(ld_shlibs, $1)=no
  7516. ;;
  7517. ghcx*)
  7518. # Green Hills C++ Compiler
  7519. # FIXME: insert proper C++ library support
  7520. _LT_TAGVAR(ld_shlibs, $1)=no
  7521. ;;
  7522. *)
  7523. # FIXME: insert proper C++ library support
  7524. _LT_TAGVAR(ld_shlibs, $1)=no
  7525. ;;
  7526. esac
  7527. ;;
  7528. freebsd2.*)
  7529. # C++ shared libraries reported to be fairly broken before
  7530. # switch to ELF
  7531. _LT_TAGVAR(ld_shlibs, $1)=no
  7532. ;;
  7533. freebsd-elf*)
  7534. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7535. ;;
  7536. freebsd* | dragonfly*)
  7537. # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
  7538. # conventions
  7539. _LT_TAGVAR(ld_shlibs, $1)=yes
  7540. ;;
  7541. haiku*)
  7542. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  7543. _LT_TAGVAR(link_all_deplibs, $1)=yes
  7544. ;;
  7545. hpux9*)
  7546. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  7547. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  7548. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  7549. _LT_TAGVAR(hardcode_direct, $1)=yes
  7550. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  7551. # but as the default
  7552. # location of the library.
  7553. case $cc_basename in
  7554. CC*)
  7555. # FIXME: insert proper C++ library support
  7556. _LT_TAGVAR(ld_shlibs, $1)=no
  7557. ;;
  7558. aCC*)
  7559. _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'
  7560. # Commands to make compiler produce verbose output that lists
  7561. # what "hidden" libraries, object files and flags are used when
  7562. # linking a shared library.
  7563. #
  7564. # There doesn't appear to be a way to prevent this compiler from
  7565. # explicitly linking system object files so we need to strip them
  7566. # from the output so that they don't get included in the library
  7567. # dependencies.
  7568. 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"'
  7569. ;;
  7570. *)
  7571. if test yes = "$GXX"; then
  7572. _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'
  7573. else
  7574. # FIXME: insert proper C++ library support
  7575. _LT_TAGVAR(ld_shlibs, $1)=no
  7576. fi
  7577. ;;
  7578. esac
  7579. ;;
  7580. hpux10*|hpux11*)
  7581. if test no = "$with_gnu_ld"; then
  7582. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  7583. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  7584. case $host_cpu in
  7585. hppa*64*|ia64*)
  7586. ;;
  7587. *)
  7588. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  7589. ;;
  7590. esac
  7591. fi
  7592. case $host_cpu in
  7593. hppa*64*|ia64*)
  7594. _LT_TAGVAR(hardcode_direct, $1)=no
  7595. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  7596. ;;
  7597. *)
  7598. _LT_TAGVAR(hardcode_direct, $1)=yes
  7599. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  7600. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  7601. # but as the default
  7602. # location of the library.
  7603. ;;
  7604. esac
  7605. case $cc_basename in
  7606. CC*)
  7607. # FIXME: insert proper C++ library support
  7608. _LT_TAGVAR(ld_shlibs, $1)=no
  7609. ;;
  7610. aCC*)
  7611. case $host_cpu in
  7612. hppa*64*)
  7613. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  7614. ;;
  7615. ia64*)
  7616. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  7617. ;;
  7618. *)
  7619. _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'
  7620. ;;
  7621. esac
  7622. # Commands to make compiler produce verbose output that lists
  7623. # what "hidden" libraries, object files and flags are used when
  7624. # linking a shared library.
  7625. #
  7626. # There doesn't appear to be a way to prevent this compiler from
  7627. # explicitly linking system object files so we need to strip them
  7628. # from the output so that they don't get included in the library
  7629. # dependencies.
  7630. 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"'
  7631. ;;
  7632. *)
  7633. if test yes = "$GXX"; then
  7634. if test no = "$with_gnu_ld"; then
  7635. case $host_cpu in
  7636. hppa*64*)
  7637. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  7638. ;;
  7639. ia64*)
  7640. _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'
  7641. ;;
  7642. *)
  7643. _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'
  7644. ;;
  7645. esac
  7646. fi
  7647. else
  7648. # FIXME: insert proper C++ library support
  7649. _LT_TAGVAR(ld_shlibs, $1)=no
  7650. fi
  7651. ;;
  7652. esac
  7653. ;;
  7654. interix[[3-9]]*)
  7655. _LT_TAGVAR(hardcode_direct, $1)=no
  7656. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  7657. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  7658. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  7659. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  7660. # Instead, shared libraries are loaded at an image base (0x10000000 by
  7661. # default) and relocated if they conflict, which is a slow very memory
  7662. # consuming and fragmenting process. To avoid this, we pick a random,
  7663. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  7664. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  7665. _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'
  7666. _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'
  7667. ;;
  7668. irix5* | irix6*)
  7669. case $cc_basename in
  7670. CC*)
  7671. # SGI C++
  7672. _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'
  7673. # Archives containing C++ object files must be created using
  7674. # "CC -ar", where "CC" is the IRIX C++ compiler. This is
  7675. # necessary to make sure instantiated templates are included
  7676. # in the archive.
  7677. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
  7678. ;;
  7679. *)
  7680. if test yes = "$GXX"; then
  7681. if test no = "$with_gnu_ld"; then
  7682. _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'
  7683. else
  7684. _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'
  7685. fi
  7686. fi
  7687. _LT_TAGVAR(link_all_deplibs, $1)=yes
  7688. ;;
  7689. esac
  7690. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  7691. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  7692. _LT_TAGVAR(inherit_rpath, $1)=yes
  7693. ;;
  7694. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  7695. case $cc_basename in
  7696. KCC*)
  7697. # Kuck and Associates, Inc. (KAI) C++ Compiler
  7698. # KCC will only create a shared library if the output file
  7699. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  7700. # to its proper name (with version) after linking.
  7701. _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'
  7702. _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'
  7703. # Commands to make compiler produce verbose output that lists
  7704. # what "hidden" libraries, object files and flags are used when
  7705. # linking a shared library.
  7706. #
  7707. # There doesn't appear to be a way to prevent this compiler from
  7708. # explicitly linking system object files so we need to strip them
  7709. # from the output so that they don't get included in the library
  7710. # dependencies.
  7711. 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"'
  7712. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  7713. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  7714. # Archives containing C++ object files must be created using
  7715. # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  7716. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  7717. ;;
  7718. icpc* | ecpc* )
  7719. # Intel C++
  7720. with_gnu_ld=yes
  7721. # version 8.0 and above of icpc choke on multiply defined symbols
  7722. # if we add $predep_objects and $postdep_objects, however 7.1 and
  7723. # earlier do not add the objects themselves.
  7724. case `$CC -V 2>&1` in
  7725. *"Version 7."*)
  7726. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  7727. _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'
  7728. ;;
  7729. *) # Version 8.0 or newer
  7730. tmp_idyn=
  7731. case $host_cpu in
  7732. ia64*) tmp_idyn=' -i_dynamic';;
  7733. esac
  7734. _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  7735. _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'
  7736. ;;
  7737. esac
  7738. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7739. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  7740. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  7741. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
  7742. ;;
  7743. pgCC* | pgcpp*)
  7744. # Portland Group C++ compiler
  7745. case `$CC -V` in
  7746. *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
  7747. _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
  7748. rm -rf $tpldir~
  7749. $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
  7750. compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
  7751. _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
  7752. rm -rf $tpldir~
  7753. $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
  7754. $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
  7755. $RANLIB $oldlib'
  7756. _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
  7757. rm -rf $tpldir~
  7758. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  7759. $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  7760. _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
  7761. rm -rf $tpldir~
  7762. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  7763. $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'
  7764. ;;
  7765. *) # Version 6 and above use weak symbols
  7766. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  7767. _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'
  7768. ;;
  7769. esac
  7770. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
  7771. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  7772. _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'
  7773. ;;
  7774. cxx*)
  7775. # Compaq C++
  7776. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  7777. _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'
  7778. runpath_var=LD_RUN_PATH
  7779. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  7780. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  7781. # Commands to make compiler produce verbose output that lists
  7782. # what "hidden" libraries, object files and flags are used when
  7783. # linking a shared library.
  7784. #
  7785. # There doesn't appear to be a way to prevent this compiler from
  7786. # explicitly linking system object files so we need to strip them
  7787. # from the output so that they don't get included in the library
  7788. # dependencies.
  7789. 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'
  7790. ;;
  7791. xl* | mpixl* | bgxl*)
  7792. # IBM XL 8.0 on PPC, with GNU ld
  7793. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  7794. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  7795. _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  7796. if test yes = "$supports_anon_versioning"; then
  7797. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  7798. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  7799. echo "local: *; };" >> $output_objdir/$libname.ver~
  7800. $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
  7801. fi
  7802. ;;
  7803. *)
  7804. case `$CC -V 2>&1 | sed 5q` in
  7805. *Sun\ C*)
  7806. # Sun C++ 5.9
  7807. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  7808. _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  7809. _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'
  7810. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  7811. _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'
  7812. _LT_TAGVAR(compiler_needs_object, $1)=yes
  7813. # Not sure whether something based on
  7814. # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
  7815. # would be better.
  7816. output_verbose_link_cmd='func_echo_all'
  7817. # Archives containing C++ object files must be created using
  7818. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  7819. # necessary to make sure instantiated templates are included
  7820. # in the archive.
  7821. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  7822. ;;
  7823. esac
  7824. ;;
  7825. esac
  7826. ;;
  7827. lynxos*)
  7828. # FIXME: insert proper C++ library support
  7829. _LT_TAGVAR(ld_shlibs, $1)=no
  7830. ;;
  7831. m88k*)
  7832. # FIXME: insert proper C++ library support
  7833. _LT_TAGVAR(ld_shlibs, $1)=no
  7834. ;;
  7835. mvs*)
  7836. case $cc_basename in
  7837. cxx*)
  7838. # FIXME: insert proper C++ library support
  7839. _LT_TAGVAR(ld_shlibs, $1)=no
  7840. ;;
  7841. *)
  7842. # FIXME: insert proper C++ library support
  7843. _LT_TAGVAR(ld_shlibs, $1)=no
  7844. ;;
  7845. esac
  7846. ;;
  7847. netbsd*)
  7848. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  7849. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
  7850. wlarc=
  7851. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  7852. _LT_TAGVAR(hardcode_direct, $1)=yes
  7853. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  7854. fi
  7855. # Workaround some broken pre-1.5 toolchains
  7856. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
  7857. ;;
  7858. *nto* | *qnx*)
  7859. _LT_TAGVAR(ld_shlibs, $1)=yes
  7860. ;;
  7861. openbsd* | bitrig*)
  7862. if test -f /usr/libexec/ld.so; then
  7863. _LT_TAGVAR(hardcode_direct, $1)=yes
  7864. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  7865. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  7866. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  7867. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  7868. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
  7869. _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'
  7870. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  7871. _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
  7872. fi
  7873. output_verbose_link_cmd=func_echo_all
  7874. else
  7875. _LT_TAGVAR(ld_shlibs, $1)=no
  7876. fi
  7877. ;;
  7878. osf3* | osf4* | osf5*)
  7879. case $cc_basename in
  7880. KCC*)
  7881. # Kuck and Associates, Inc. (KAI) C++ Compiler
  7882. # KCC will only create a shared library if the output file
  7883. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  7884. # to its proper name (with version) after linking.
  7885. _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'
  7886. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  7887. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  7888. # Archives containing C++ object files must be created using
  7889. # the KAI C++ compiler.
  7890. case $host in
  7891. osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
  7892. *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
  7893. esac
  7894. ;;
  7895. RCC*)
  7896. # Rational C++ 2.4.1
  7897. # FIXME: insert proper C++ library support
  7898. _LT_TAGVAR(ld_shlibs, $1)=no
  7899. ;;
  7900. cxx*)
  7901. case $host in
  7902. osf3*)
  7903. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
  7904. _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'
  7905. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  7906. ;;
  7907. *)
  7908. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  7909. _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'
  7910. _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
  7911. echo "-hidden">> $lib.exp~
  7912. $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~
  7913. $RM $lib.exp'
  7914. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  7915. ;;
  7916. esac
  7917. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  7918. # Commands to make compiler produce verbose output that lists
  7919. # what "hidden" libraries, object files and flags are used when
  7920. # linking a shared library.
  7921. #
  7922. # There doesn't appear to be a way to prevent this compiler from
  7923. # explicitly linking system object files so we need to strip them
  7924. # from the output so that they don't get included in the library
  7925. # dependencies.
  7926. 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"'
  7927. ;;
  7928. *)
  7929. if test yes,no = "$GXX,$with_gnu_ld"; then
  7930. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
  7931. case $host in
  7932. osf3*)
  7933. _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'
  7934. ;;
  7935. *)
  7936. _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'
  7937. ;;
  7938. esac
  7939. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  7940. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  7941. # Commands to make compiler produce verbose output that lists
  7942. # what "hidden" libraries, object files and flags are used when
  7943. # linking a shared library.
  7944. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  7945. else
  7946. # FIXME: insert proper C++ library support
  7947. _LT_TAGVAR(ld_shlibs, $1)=no
  7948. fi
  7949. ;;
  7950. esac
  7951. ;;
  7952. psos*)
  7953. # FIXME: insert proper C++ library support
  7954. _LT_TAGVAR(ld_shlibs, $1)=no
  7955. ;;
  7956. sunos4*)
  7957. case $cc_basename in
  7958. CC*)
  7959. # Sun C++ 4.x
  7960. # FIXME: insert proper C++ library support
  7961. _LT_TAGVAR(ld_shlibs, $1)=no
  7962. ;;
  7963. lcc*)
  7964. # Lucid
  7965. # FIXME: insert proper C++ library support
  7966. _LT_TAGVAR(ld_shlibs, $1)=no
  7967. ;;
  7968. *)
  7969. # FIXME: insert proper C++ library support
  7970. _LT_TAGVAR(ld_shlibs, $1)=no
  7971. ;;
  7972. esac
  7973. ;;
  7974. solaris*)
  7975. case $cc_basename in
  7976. CC* | sunCC*)
  7977. # Sun C++ 4.2, 5.x and Centerline C++
  7978. _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
  7979. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  7980. _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  7981. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  7982. $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'
  7983. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  7984. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  7985. case $host_os in
  7986. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  7987. *)
  7988. # The compiler driver will combine and reorder linker options,
  7989. # but understands '-z linker_flag'.
  7990. # Supported since Solaris 2.6 (maybe 2.5.1?)
  7991. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  7992. ;;
  7993. esac
  7994. _LT_TAGVAR(link_all_deplibs, $1)=yes
  7995. output_verbose_link_cmd='func_echo_all'
  7996. # Archives containing C++ object files must be created using
  7997. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  7998. # necessary to make sure instantiated templates are included
  7999. # in the archive.
  8000. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  8001. ;;
  8002. gcx*)
  8003. # Green Hills C++ Compiler
  8004. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
  8005. # The C++ compiler must be used to create the archive.
  8006. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
  8007. ;;
  8008. *)
  8009. # GNU C++ compiler with Solaris linker
  8010. if test yes,no = "$GXX,$with_gnu_ld"; then
  8011. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
  8012. if $CC --version | $GREP -v '^2\.7' > /dev/null; then
  8013. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
  8014. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  8015. $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'
  8016. # Commands to make compiler produce verbose output that lists
  8017. # what "hidden" libraries, object files and flags are used when
  8018. # linking a shared library.
  8019. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  8020. else
  8021. # g++ 2.7 appears to require '-G' NOT '-shared' on this
  8022. # platform.
  8023. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
  8024. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  8025. $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'
  8026. # Commands to make compiler produce verbose output that lists
  8027. # what "hidden" libraries, object files and flags are used when
  8028. # linking a shared library.
  8029. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  8030. fi
  8031. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
  8032. case $host_os in
  8033. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  8034. *)
  8035. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
  8036. ;;
  8037. esac
  8038. fi
  8039. ;;
  8040. esac
  8041. ;;
  8042. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  8043. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  8044. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  8045. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  8046. runpath_var='LD_RUN_PATH'
  8047. case $cc_basename in
  8048. CC*)
  8049. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  8050. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  8051. ;;
  8052. *)
  8053. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  8054. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  8055. ;;
  8056. esac
  8057. ;;
  8058. sysv5* | sco3.2v5* | sco5v6*)
  8059. # Note: We CANNOT use -z defs as we might desire, because we do not
  8060. # link with -lc, and that would cause any symbols used from libc to
  8061. # always be unresolved, which means just about no library would
  8062. # ever link correctly. If we're not using GNU ld we use -z text
  8063. # though, which does catch some bad symbols but isn't as heavy-handed
  8064. # as -z defs.
  8065. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  8066. _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
  8067. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  8068. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  8069. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
  8070. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  8071. _LT_TAGVAR(link_all_deplibs, $1)=yes
  8072. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
  8073. runpath_var='LD_RUN_PATH'
  8074. case $cc_basename in
  8075. CC*)
  8076. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  8077. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  8078. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
  8079. '"$_LT_TAGVAR(old_archive_cmds, $1)"
  8080. _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
  8081. '"$_LT_TAGVAR(reload_cmds, $1)"
  8082. ;;
  8083. *)
  8084. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  8085. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  8086. ;;
  8087. esac
  8088. ;;
  8089. tandem*)
  8090. case $cc_basename in
  8091. NCC*)
  8092. # NonStop-UX NCC 3.20
  8093. # FIXME: insert proper C++ library support
  8094. _LT_TAGVAR(ld_shlibs, $1)=no
  8095. ;;
  8096. *)
  8097. # FIXME: insert proper C++ library support
  8098. _LT_TAGVAR(ld_shlibs, $1)=no
  8099. ;;
  8100. esac
  8101. ;;
  8102. vxworks*)
  8103. # FIXME: insert proper C++ library support
  8104. _LT_TAGVAR(ld_shlibs, $1)=no
  8105. ;;
  8106. *)
  8107. # FIXME: insert proper C++ library support
  8108. _LT_TAGVAR(ld_shlibs, $1)=no
  8109. ;;
  8110. esac
  8111. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  8112. test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
  8113. _LT_TAGVAR(GCC, $1)=$GXX
  8114. _LT_TAGVAR(LD, $1)=$LD
  8115. ## CAVEAT EMPTOR:
  8116. ## There is no encapsulation within the following macros, do not change
  8117. ## the running order or otherwise move them around unless you know exactly
  8118. ## what you are doing...
  8119. _LT_SYS_HIDDEN_LIBDEPS($1)
  8120. _LT_COMPILER_PIC($1)
  8121. _LT_COMPILER_C_O($1)
  8122. _LT_COMPILER_FILE_LOCKS($1)
  8123. _LT_LINKER_SHLIBS($1)
  8124. _LT_SYS_DYNAMIC_LINKER($1)
  8125. _LT_LINKER_HARDCODE_LIBPATH($1)
  8126. _LT_CONFIG($1)
  8127. fi # test -n "$compiler"
  8128. CC=$lt_save_CC
  8129. CFLAGS=$lt_save_CFLAGS
  8130. LDCXX=$LD
  8131. LD=$lt_save_LD
  8132. GCC=$lt_save_GCC
  8133. with_gnu_ld=$lt_save_with_gnu_ld
  8134. lt_cv_path_LDCXX=$lt_cv_path_LD
  8135. lt_cv_path_LD=$lt_save_path_LD
  8136. lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
  8137. lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
  8138. fi # test yes != "$_lt_caught_CXX_error"
  8139. AC_LANG_POP
  8140. ])# _LT_LANG_CXX_CONFIG
  8141. # _LT_FUNC_STRIPNAME_CNF
  8142. # ----------------------
  8143. # func_stripname_cnf prefix suffix name
  8144. # strip PREFIX and SUFFIX off of NAME.
  8145. # PREFIX and SUFFIX must not contain globbing or regex special
  8146. # characters, hashes, percent signs, but SUFFIX may contain a leading
  8147. # dot (in which case that matches only a dot).
  8148. #
  8149. # This function is identical to the (non-XSI) version of func_stripname,
  8150. # except this one can be used by m4 code that may be executed by configure,
  8151. # rather than the libtool script.
  8152. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
  8153. AC_REQUIRE([_LT_DECL_SED])
  8154. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
  8155. func_stripname_cnf ()
  8156. {
  8157. case @S|@2 in
  8158. .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
  8159. *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
  8160. esac
  8161. } # func_stripname_cnf
  8162. ])# _LT_FUNC_STRIPNAME_CNF
  8163. # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
  8164. # ---------------------------------
  8165. # Figure out "hidden" library dependencies from verbose
  8166. # compiler output when linking a shared library.
  8167. # Parse the compiler output and extract the necessary
  8168. # objects, libraries and library flags.
  8169. m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
  8170. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  8171. AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
  8172. # Dependencies to place before and after the object being linked:
  8173. _LT_TAGVAR(predep_objects, $1)=
  8174. _LT_TAGVAR(postdep_objects, $1)=
  8175. _LT_TAGVAR(predeps, $1)=
  8176. _LT_TAGVAR(postdeps, $1)=
  8177. _LT_TAGVAR(compiler_lib_search_path, $1)=
  8178. dnl we can't use the lt_simple_compile_test_code here,
  8179. dnl because it contains code intended for an executable,
  8180. dnl not a library. It's possible we should let each
  8181. dnl tag define a new lt_????_link_test_code variable,
  8182. dnl but it's only used here...
  8183. m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
  8184. int a;
  8185. void foo (void) { a = 0; }
  8186. _LT_EOF
  8187. ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
  8188. class Foo
  8189. {
  8190. public:
  8191. Foo (void) { a = 0; }
  8192. private:
  8193. int a;
  8194. };
  8195. _LT_EOF
  8196. ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
  8197. subroutine foo
  8198. implicit none
  8199. integer*4 a
  8200. a=0
  8201. return
  8202. end
  8203. _LT_EOF
  8204. ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
  8205. subroutine foo
  8206. implicit none
  8207. integer a
  8208. a=0
  8209. return
  8210. end
  8211. _LT_EOF
  8212. ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
  8213. public class foo {
  8214. private int a;
  8215. public void bar (void) {
  8216. a = 0;
  8217. }
  8218. };
  8219. _LT_EOF
  8220. ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
  8221. package foo
  8222. func foo() {
  8223. }
  8224. _LT_EOF
  8225. ])
  8226. _lt_libdeps_save_CFLAGS=$CFLAGS
  8227. case "$CC $CFLAGS " in #(
  8228. *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
  8229. *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
  8230. *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
  8231. esac
  8232. dnl Parse the compiler output and extract the necessary
  8233. dnl objects, libraries and library flags.
  8234. if AC_TRY_EVAL(ac_compile); then
  8235. # Parse the compiler output and extract the necessary
  8236. # objects, libraries and library flags.
  8237. # Sentinel used to keep track of whether or not we are before
  8238. # the conftest object file.
  8239. pre_test_object_deps_done=no
  8240. for p in `eval "$output_verbose_link_cmd"`; do
  8241. case $prev$p in
  8242. -L* | -R* | -l*)
  8243. # Some compilers place space between "-{L,R}" and the path.
  8244. # Remove the space.
  8245. if test x-L = "$p" ||
  8246. test x-R = "$p"; then
  8247. prev=$p
  8248. continue
  8249. fi
  8250. # Expand the sysroot to ease extracting the directories later.
  8251. if test -z "$prev"; then
  8252. case $p in
  8253. -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
  8254. -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
  8255. -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
  8256. esac
  8257. fi
  8258. case $p in
  8259. =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
  8260. esac
  8261. if test no = "$pre_test_object_deps_done"; then
  8262. case $prev in
  8263. -L | -R)
  8264. # Internal compiler library paths should come after those
  8265. # provided the user. The postdeps already come after the
  8266. # user supplied libs so there is no need to process them.
  8267. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
  8268. _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
  8269. else
  8270. _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
  8271. fi
  8272. ;;
  8273. # The "-l" case would never come before the object being
  8274. # linked, so don't bother handling this case.
  8275. esac
  8276. else
  8277. if test -z "$_LT_TAGVAR(postdeps, $1)"; then
  8278. _LT_TAGVAR(postdeps, $1)=$prev$p
  8279. else
  8280. _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
  8281. fi
  8282. fi
  8283. prev=
  8284. ;;
  8285. *.lto.$objext) ;; # Ignore GCC LTO objects
  8286. *.$objext)
  8287. # This assumes that the test object file only shows up
  8288. # once in the compiler output.
  8289. if test "$p" = "conftest.$objext"; then
  8290. pre_test_object_deps_done=yes
  8291. continue
  8292. fi
  8293. if test no = "$pre_test_object_deps_done"; then
  8294. if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
  8295. _LT_TAGVAR(predep_objects, $1)=$p
  8296. else
  8297. _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
  8298. fi
  8299. else
  8300. if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
  8301. _LT_TAGVAR(postdep_objects, $1)=$p
  8302. else
  8303. _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
  8304. fi
  8305. fi
  8306. ;;
  8307. *) ;; # Ignore the rest.
  8308. esac
  8309. done
  8310. # Clean up.
  8311. rm -f a.out a.exe
  8312. else
  8313. echo "libtool.m4: error: problem compiling $1 test program"
  8314. fi
  8315. $RM -f confest.$objext
  8316. CFLAGS=$_lt_libdeps_save_CFLAGS
  8317. # PORTME: override above test on systems where it is broken
  8318. m4_if([$1], [CXX],
  8319. [case $host_os in
  8320. interix[[3-9]]*)
  8321. # Interix 3.5 installs completely hosed .la files for C++, so rather than
  8322. # hack all around it, let's just trust "g++" to DTRT.
  8323. _LT_TAGVAR(predep_objects,$1)=
  8324. _LT_TAGVAR(postdep_objects,$1)=
  8325. _LT_TAGVAR(postdeps,$1)=
  8326. ;;
  8327. esac
  8328. ])
  8329. case " $_LT_TAGVAR(postdeps, $1) " in
  8330. *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
  8331. esac
  8332. _LT_TAGVAR(compiler_lib_search_dirs, $1)=
  8333. if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
  8334. _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
  8335. fi
  8336. _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
  8337. [The directories searched by this compiler when creating a shared library])
  8338. _LT_TAGDECL([], [predep_objects], [1],
  8339. [Dependencies to place before and after the objects being linked to
  8340. create a shared library])
  8341. _LT_TAGDECL([], [postdep_objects], [1])
  8342. _LT_TAGDECL([], [predeps], [1])
  8343. _LT_TAGDECL([], [postdeps], [1])
  8344. _LT_TAGDECL([], [compiler_lib_search_path], [1],
  8345. [The library search path used internally by the compiler when linking
  8346. a shared library])
  8347. ])# _LT_SYS_HIDDEN_LIBDEPS
  8348. # _LT_LANG_F77_CONFIG([TAG])
  8349. # --------------------------
  8350. # Ensure that the configuration variables for a Fortran 77 compiler are
  8351. # suitably defined. These variables are subsequently used by _LT_CONFIG
  8352. # to write the compiler configuration to 'libtool'.
  8353. m4_defun([_LT_LANG_F77_CONFIG],
  8354. [AC_LANG_PUSH(Fortran 77)
  8355. if test -z "$F77" || test no = "$F77"; then
  8356. _lt_disable_F77=yes
  8357. fi
  8358. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  8359. _LT_TAGVAR(allow_undefined_flag, $1)=
  8360. _LT_TAGVAR(always_export_symbols, $1)=no
  8361. _LT_TAGVAR(archive_expsym_cmds, $1)=
  8362. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  8363. _LT_TAGVAR(hardcode_direct, $1)=no
  8364. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  8365. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  8366. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  8367. _LT_TAGVAR(hardcode_minus_L, $1)=no
  8368. _LT_TAGVAR(hardcode_automatic, $1)=no
  8369. _LT_TAGVAR(inherit_rpath, $1)=no
  8370. _LT_TAGVAR(module_cmds, $1)=
  8371. _LT_TAGVAR(module_expsym_cmds, $1)=
  8372. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  8373. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  8374. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  8375. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  8376. _LT_TAGVAR(no_undefined_flag, $1)=
  8377. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  8378. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  8379. # Source file extension for f77 test sources.
  8380. ac_ext=f
  8381. # Object file extension for compiled f77 test sources.
  8382. objext=o
  8383. _LT_TAGVAR(objext, $1)=$objext
  8384. # No sense in running all these tests if we already determined that
  8385. # the F77 compiler isn't working. Some variables (like enable_shared)
  8386. # are currently assumed to apply to all compilers on this platform,
  8387. # and will be corrupted by setting them based on a non-working compiler.
  8388. if test yes != "$_lt_disable_F77"; then
  8389. # Code to be used in simple compile tests
  8390. lt_simple_compile_test_code="\
  8391. subroutine t
  8392. return
  8393. end
  8394. "
  8395. # Code to be used in simple link tests
  8396. lt_simple_link_test_code="\
  8397. program t
  8398. end
  8399. "
  8400. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  8401. _LT_TAG_COMPILER
  8402. # save warnings/boilerplate of simple test code
  8403. _LT_COMPILER_BOILERPLATE
  8404. _LT_LINKER_BOILERPLATE
  8405. # Allow CC to be a program name with arguments.
  8406. lt_save_CC=$CC
  8407. lt_save_GCC=$GCC
  8408. lt_save_CFLAGS=$CFLAGS
  8409. CC=${F77-"f77"}
  8410. CFLAGS=$FFLAGS
  8411. compiler=$CC
  8412. _LT_TAGVAR(compiler, $1)=$CC
  8413. _LT_CC_BASENAME([$compiler])
  8414. GCC=$G77
  8415. if test -n "$compiler"; then
  8416. AC_MSG_CHECKING([if libtool supports shared libraries])
  8417. AC_MSG_RESULT([$can_build_shared])
  8418. AC_MSG_CHECKING([whether to build shared libraries])
  8419. test no = "$can_build_shared" && enable_shared=no
  8420. # On AIX, shared libraries and static libraries use the same namespace, and
  8421. # are all built from PIC.
  8422. case $host_os in
  8423. aix3*)
  8424. test yes = "$enable_shared" && enable_static=no
  8425. if test -n "$RANLIB"; then
  8426. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  8427. postinstall_cmds='$RANLIB $lib'
  8428. fi
  8429. ;;
  8430. aix[[4-9]]*)
  8431. if test ia64 != "$host_cpu"; then
  8432. case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
  8433. yes,aix,yes) ;; # shared object as lib.so file only
  8434. yes,svr4,*) ;; # shared object as lib.so archive member only
  8435. yes,*) enable_static=no ;; # shared object in lib.a archive as well
  8436. esac
  8437. fi
  8438. ;;
  8439. esac
  8440. AC_MSG_RESULT([$enable_shared])
  8441. AC_MSG_CHECKING([whether to build static libraries])
  8442. # Make sure either enable_shared or enable_static is yes.
  8443. test yes = "$enable_shared" || enable_static=yes
  8444. AC_MSG_RESULT([$enable_static])
  8445. _LT_TAGVAR(GCC, $1)=$G77
  8446. _LT_TAGVAR(LD, $1)=$LD
  8447. ## CAVEAT EMPTOR:
  8448. ## There is no encapsulation within the following macros, do not change
  8449. ## the running order or otherwise move them around unless you know exactly
  8450. ## what you are doing...
  8451. _LT_COMPILER_PIC($1)
  8452. _LT_COMPILER_C_O($1)
  8453. _LT_COMPILER_FILE_LOCKS($1)
  8454. _LT_LINKER_SHLIBS($1)
  8455. _LT_SYS_DYNAMIC_LINKER($1)
  8456. _LT_LINKER_HARDCODE_LIBPATH($1)
  8457. _LT_CONFIG($1)
  8458. fi # test -n "$compiler"
  8459. GCC=$lt_save_GCC
  8460. CC=$lt_save_CC
  8461. CFLAGS=$lt_save_CFLAGS
  8462. fi # test yes != "$_lt_disable_F77"
  8463. AC_LANG_POP
  8464. ])# _LT_LANG_F77_CONFIG
  8465. # _LT_LANG_FC_CONFIG([TAG])
  8466. # -------------------------
  8467. # Ensure that the configuration variables for a Fortran compiler are
  8468. # suitably defined. These variables are subsequently used by _LT_CONFIG
  8469. # to write the compiler configuration to 'libtool'.
  8470. m4_defun([_LT_LANG_FC_CONFIG],
  8471. [AC_LANG_PUSH(Fortran)
  8472. if test -z "$FC" || test no = "$FC"; then
  8473. _lt_disable_FC=yes
  8474. fi
  8475. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  8476. _LT_TAGVAR(allow_undefined_flag, $1)=
  8477. _LT_TAGVAR(always_export_symbols, $1)=no
  8478. _LT_TAGVAR(archive_expsym_cmds, $1)=
  8479. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  8480. _LT_TAGVAR(hardcode_direct, $1)=no
  8481. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  8482. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  8483. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  8484. _LT_TAGVAR(hardcode_minus_L, $1)=no
  8485. _LT_TAGVAR(hardcode_automatic, $1)=no
  8486. _LT_TAGVAR(inherit_rpath, $1)=no
  8487. _LT_TAGVAR(module_cmds, $1)=
  8488. _LT_TAGVAR(module_expsym_cmds, $1)=
  8489. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  8490. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  8491. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  8492. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  8493. _LT_TAGVAR(no_undefined_flag, $1)=
  8494. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  8495. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  8496. # Source file extension for fc test sources.
  8497. ac_ext=${ac_fc_srcext-f}
  8498. # Object file extension for compiled fc test sources.
  8499. objext=o
  8500. _LT_TAGVAR(objext, $1)=$objext
  8501. # No sense in running all these tests if we already determined that
  8502. # the FC compiler isn't working. Some variables (like enable_shared)
  8503. # are currently assumed to apply to all compilers on this platform,
  8504. # and will be corrupted by setting them based on a non-working compiler.
  8505. if test yes != "$_lt_disable_FC"; then
  8506. # Code to be used in simple compile tests
  8507. lt_simple_compile_test_code="\
  8508. subroutine t
  8509. return
  8510. end
  8511. "
  8512. # Code to be used in simple link tests
  8513. lt_simple_link_test_code="\
  8514. program t
  8515. end
  8516. "
  8517. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  8518. _LT_TAG_COMPILER
  8519. # save warnings/boilerplate of simple test code
  8520. _LT_COMPILER_BOILERPLATE
  8521. _LT_LINKER_BOILERPLATE
  8522. # Allow CC to be a program name with arguments.
  8523. lt_save_CC=$CC
  8524. lt_save_GCC=$GCC
  8525. lt_save_CFLAGS=$CFLAGS
  8526. CC=${FC-"f95"}
  8527. CFLAGS=$FCFLAGS
  8528. compiler=$CC
  8529. GCC=$ac_cv_fc_compiler_gnu
  8530. _LT_TAGVAR(compiler, $1)=$CC
  8531. _LT_CC_BASENAME([$compiler])
  8532. if test -n "$compiler"; then
  8533. AC_MSG_CHECKING([if libtool supports shared libraries])
  8534. AC_MSG_RESULT([$can_build_shared])
  8535. AC_MSG_CHECKING([whether to build shared libraries])
  8536. test no = "$can_build_shared" && enable_shared=no
  8537. # On AIX, shared libraries and static libraries use the same namespace, and
  8538. # are all built from PIC.
  8539. case $host_os in
  8540. aix3*)
  8541. test yes = "$enable_shared" && enable_static=no
  8542. if test -n "$RANLIB"; then
  8543. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  8544. postinstall_cmds='$RANLIB $lib'
  8545. fi
  8546. ;;
  8547. aix[[4-9]]*)
  8548. if test ia64 != "$host_cpu"; then
  8549. case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
  8550. yes,aix,yes) ;; # shared object as lib.so file only
  8551. yes,svr4,*) ;; # shared object as lib.so archive member only
  8552. yes,*) enable_static=no ;; # shared object in lib.a archive as well
  8553. esac
  8554. fi
  8555. ;;
  8556. esac
  8557. AC_MSG_RESULT([$enable_shared])
  8558. AC_MSG_CHECKING([whether to build static libraries])
  8559. # Make sure either enable_shared or enable_static is yes.
  8560. test yes = "$enable_shared" || enable_static=yes
  8561. AC_MSG_RESULT([$enable_static])
  8562. _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
  8563. _LT_TAGVAR(LD, $1)=$LD
  8564. ## CAVEAT EMPTOR:
  8565. ## There is no encapsulation within the following macros, do not change
  8566. ## the running order or otherwise move them around unless you know exactly
  8567. ## what you are doing...
  8568. _LT_SYS_HIDDEN_LIBDEPS($1)
  8569. _LT_COMPILER_PIC($1)
  8570. _LT_COMPILER_C_O($1)
  8571. _LT_COMPILER_FILE_LOCKS($1)
  8572. _LT_LINKER_SHLIBS($1)
  8573. _LT_SYS_DYNAMIC_LINKER($1)
  8574. _LT_LINKER_HARDCODE_LIBPATH($1)
  8575. _LT_CONFIG($1)
  8576. fi # test -n "$compiler"
  8577. GCC=$lt_save_GCC
  8578. CC=$lt_save_CC
  8579. CFLAGS=$lt_save_CFLAGS
  8580. fi # test yes != "$_lt_disable_FC"
  8581. AC_LANG_POP
  8582. ])# _LT_LANG_FC_CONFIG
  8583. # _LT_LANG_GCJ_CONFIG([TAG])
  8584. # --------------------------
  8585. # Ensure that the configuration variables for the GNU Java Compiler compiler
  8586. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  8587. # to write the compiler configuration to 'libtool'.
  8588. m4_defun([_LT_LANG_GCJ_CONFIG],
  8589. [AC_REQUIRE([LT_PROG_GCJ])dnl
  8590. AC_LANG_SAVE
  8591. # Source file extension for Java test sources.
  8592. ac_ext=java
  8593. # Object file extension for compiled Java test sources.
  8594. objext=o
  8595. _LT_TAGVAR(objext, $1)=$objext
  8596. # Code to be used in simple compile tests
  8597. lt_simple_compile_test_code="class foo {}"
  8598. # Code to be used in simple link tests
  8599. lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
  8600. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  8601. _LT_TAG_COMPILER
  8602. # save warnings/boilerplate of simple test code
  8603. _LT_COMPILER_BOILERPLATE
  8604. _LT_LINKER_BOILERPLATE
  8605. # Allow CC to be a program name with arguments.
  8606. lt_save_CC=$CC
  8607. lt_save_CFLAGS=$CFLAGS
  8608. lt_save_GCC=$GCC
  8609. GCC=yes
  8610. CC=${GCJ-"gcj"}
  8611. CFLAGS=$GCJFLAGS
  8612. compiler=$CC
  8613. _LT_TAGVAR(compiler, $1)=$CC
  8614. _LT_TAGVAR(LD, $1)=$LD
  8615. _LT_CC_BASENAME([$compiler])
  8616. # GCJ did not exist at the time GCC didn't implicitly link libc in.
  8617. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  8618. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  8619. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  8620. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  8621. if test -n "$compiler"; then
  8622. _LT_COMPILER_NO_RTTI($1)
  8623. _LT_COMPILER_PIC($1)
  8624. _LT_COMPILER_C_O($1)
  8625. _LT_COMPILER_FILE_LOCKS($1)
  8626. _LT_LINKER_SHLIBS($1)
  8627. _LT_LINKER_HARDCODE_LIBPATH($1)
  8628. _LT_CONFIG($1)
  8629. fi
  8630. AC_LANG_RESTORE
  8631. GCC=$lt_save_GCC
  8632. CC=$lt_save_CC
  8633. CFLAGS=$lt_save_CFLAGS
  8634. ])# _LT_LANG_GCJ_CONFIG
  8635. # _LT_LANG_GO_CONFIG([TAG])
  8636. # --------------------------
  8637. # Ensure that the configuration variables for the GNU Go compiler
  8638. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  8639. # to write the compiler configuration to 'libtool'.
  8640. m4_defun([_LT_LANG_GO_CONFIG],
  8641. [AC_REQUIRE([LT_PROG_GO])dnl
  8642. AC_LANG_SAVE
  8643. # Source file extension for Go test sources.
  8644. ac_ext=go
  8645. # Object file extension for compiled Go test sources.
  8646. objext=o
  8647. _LT_TAGVAR(objext, $1)=$objext
  8648. # Code to be used in simple compile tests
  8649. lt_simple_compile_test_code="package main; func main() { }"
  8650. # Code to be used in simple link tests
  8651. lt_simple_link_test_code='package main; func main() { }'
  8652. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  8653. _LT_TAG_COMPILER
  8654. # save warnings/boilerplate of simple test code
  8655. _LT_COMPILER_BOILERPLATE
  8656. _LT_LINKER_BOILERPLATE
  8657. # Allow CC to be a program name with arguments.
  8658. lt_save_CC=$CC
  8659. lt_save_CFLAGS=$CFLAGS
  8660. lt_save_GCC=$GCC
  8661. GCC=yes
  8662. CC=${GOC-"gccgo"}
  8663. CFLAGS=$GOFLAGS
  8664. compiler=$CC
  8665. _LT_TAGVAR(compiler, $1)=$CC
  8666. _LT_TAGVAR(LD, $1)=$LD
  8667. _LT_CC_BASENAME([$compiler])
  8668. # Go did not exist at the time GCC didn't implicitly link libc in.
  8669. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  8670. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  8671. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  8672. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  8673. if test -n "$compiler"; then
  8674. _LT_COMPILER_NO_RTTI($1)
  8675. _LT_COMPILER_PIC($1)
  8676. _LT_COMPILER_C_O($1)
  8677. _LT_COMPILER_FILE_LOCKS($1)
  8678. _LT_LINKER_SHLIBS($1)
  8679. _LT_LINKER_HARDCODE_LIBPATH($1)
  8680. _LT_CONFIG($1)
  8681. fi
  8682. AC_LANG_RESTORE
  8683. GCC=$lt_save_GCC
  8684. CC=$lt_save_CC
  8685. CFLAGS=$lt_save_CFLAGS
  8686. ])# _LT_LANG_GO_CONFIG
  8687. # _LT_LANG_RC_CONFIG([TAG])
  8688. # -------------------------
  8689. # Ensure that the configuration variables for the Windows resource compiler
  8690. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  8691. # to write the compiler configuration to 'libtool'.
  8692. m4_defun([_LT_LANG_RC_CONFIG],
  8693. [AC_REQUIRE([LT_PROG_RC])dnl
  8694. AC_LANG_SAVE
  8695. # Source file extension for RC test sources.
  8696. ac_ext=rc
  8697. # Object file extension for compiled RC test sources.
  8698. objext=o
  8699. _LT_TAGVAR(objext, $1)=$objext
  8700. # Code to be used in simple compile tests
  8701. lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
  8702. # Code to be used in simple link tests
  8703. lt_simple_link_test_code=$lt_simple_compile_test_code
  8704. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  8705. _LT_TAG_COMPILER
  8706. # save warnings/boilerplate of simple test code
  8707. _LT_COMPILER_BOILERPLATE
  8708. _LT_LINKER_BOILERPLATE
  8709. # Allow CC to be a program name with arguments.
  8710. lt_save_CC=$CC
  8711. lt_save_CFLAGS=$CFLAGS
  8712. lt_save_GCC=$GCC
  8713. GCC=
  8714. CC=${RC-"windres"}
  8715. CFLAGS=
  8716. compiler=$CC
  8717. _LT_TAGVAR(compiler, $1)=$CC
  8718. _LT_CC_BASENAME([$compiler])
  8719. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  8720. if test -n "$compiler"; then
  8721. :
  8722. _LT_CONFIG($1)
  8723. fi
  8724. GCC=$lt_save_GCC
  8725. AC_LANG_RESTORE
  8726. CC=$lt_save_CC
  8727. CFLAGS=$lt_save_CFLAGS
  8728. ])# _LT_LANG_RC_CONFIG
  8729. # LT_PROG_GCJ
  8730. # -----------
  8731. AC_DEFUN([LT_PROG_GCJ],
  8732. [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
  8733. [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
  8734. [AC_CHECK_TOOL(GCJ, gcj,)
  8735. test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
  8736. AC_SUBST(GCJFLAGS)])])[]dnl
  8737. ])
  8738. # Old name:
  8739. AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
  8740. dnl aclocal-1.4 backwards compatibility:
  8741. dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
  8742. # LT_PROG_GO
  8743. # ----------
  8744. AC_DEFUN([LT_PROG_GO],
  8745. [AC_CHECK_TOOL(GOC, gccgo,)
  8746. ])
  8747. # LT_PROG_RC
  8748. # ----------
  8749. AC_DEFUN([LT_PROG_RC],
  8750. [AC_CHECK_TOOL(RC, windres,)
  8751. ])
  8752. # Old name:
  8753. AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
  8754. dnl aclocal-1.4 backwards compatibility:
  8755. dnl AC_DEFUN([LT_AC_PROG_RC], [])
  8756. # _LT_DECL_EGREP
  8757. # --------------
  8758. # If we don't have a new enough Autoconf to choose the best grep
  8759. # available, choose the one first in the user's PATH.
  8760. m4_defun([_LT_DECL_EGREP],
  8761. [AC_REQUIRE([AC_PROG_EGREP])dnl
  8762. AC_REQUIRE([AC_PROG_FGREP])dnl
  8763. test -z "$GREP" && GREP=grep
  8764. _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
  8765. _LT_DECL([], [EGREP], [1], [An ERE matcher])
  8766. _LT_DECL([], [FGREP], [1], [A literal string matcher])
  8767. dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
  8768. AC_SUBST([GREP])
  8769. ])
  8770. # _LT_DECL_OBJDUMP
  8771. # --------------
  8772. # If we don't have a new enough Autoconf to choose the best objdump
  8773. # available, choose the one first in the user's PATH.
  8774. m4_defun([_LT_DECL_OBJDUMP],
  8775. [AC_CHECK_TOOL(OBJDUMP, objdump, false)
  8776. test -z "$OBJDUMP" && OBJDUMP=objdump
  8777. _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
  8778. AC_SUBST([OBJDUMP])
  8779. ])
  8780. # _LT_DECL_DLLTOOL
  8781. # ----------------
  8782. # Ensure DLLTOOL variable is set.
  8783. m4_defun([_LT_DECL_DLLTOOL],
  8784. [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  8785. test -z "$DLLTOOL" && DLLTOOL=dlltool
  8786. _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
  8787. AC_SUBST([DLLTOOL])
  8788. ])
  8789. # _LT_DECL_SED
  8790. # ------------
  8791. # Check for a fully-functional sed program, that truncates
  8792. # as few characters as possible. Prefer GNU sed if found.
  8793. m4_defun([_LT_DECL_SED],
  8794. [AC_PROG_SED
  8795. test -z "$SED" && SED=sed
  8796. Xsed="$SED -e 1s/^X//"
  8797. _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
  8798. _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
  8799. [Sed that helps us avoid accidentally triggering echo(1) options like -n])
  8800. ])# _LT_DECL_SED
  8801. m4_ifndef([AC_PROG_SED], [
  8802. # NOTE: This macro has been submitted for inclusion into #
  8803. # GNU Autoconf as AC_PROG_SED. When it is available in #
  8804. # a released version of Autoconf we should remove this #
  8805. # macro and use it instead. #
  8806. m4_defun([AC_PROG_SED],
  8807. [AC_MSG_CHECKING([for a sed that does not truncate output])
  8808. AC_CACHE_VAL(lt_cv_path_SED,
  8809. [# Loop through the user's path and test for sed and gsed.
  8810. # Then use that list of sed's as ones to test for truncation.
  8811. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  8812. for as_dir in $PATH
  8813. do
  8814. IFS=$as_save_IFS
  8815. test -z "$as_dir" && as_dir=.
  8816. for lt_ac_prog in sed gsed; do
  8817. for ac_exec_ext in '' $ac_executable_extensions; do
  8818. if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
  8819. lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
  8820. fi
  8821. done
  8822. done
  8823. done
  8824. IFS=$as_save_IFS
  8825. lt_ac_max=0
  8826. lt_ac_count=0
  8827. # Add /usr/xpg4/bin/sed as it is typically found on Solaris
  8828. # along with /bin/sed that truncates output.
  8829. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
  8830. test ! -f "$lt_ac_sed" && continue
  8831. cat /dev/null > conftest.in
  8832. lt_ac_count=0
  8833. echo $ECHO_N "0123456789$ECHO_C" >conftest.in
  8834. # Check for GNU sed and select it if it is found.
  8835. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
  8836. lt_cv_path_SED=$lt_ac_sed
  8837. break
  8838. fi
  8839. while true; do
  8840. cat conftest.in conftest.in >conftest.tmp
  8841. mv conftest.tmp conftest.in
  8842. cp conftest.in conftest.nl
  8843. echo >>conftest.nl
  8844. $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
  8845. cmp -s conftest.out conftest.nl || break
  8846. # 10000 chars as input seems more than enough
  8847. test 10 -lt "$lt_ac_count" && break
  8848. lt_ac_count=`expr $lt_ac_count + 1`
  8849. if test "$lt_ac_count" -gt "$lt_ac_max"; then
  8850. lt_ac_max=$lt_ac_count
  8851. lt_cv_path_SED=$lt_ac_sed
  8852. fi
  8853. done
  8854. done
  8855. ])
  8856. SED=$lt_cv_path_SED
  8857. AC_SUBST([SED])
  8858. AC_MSG_RESULT([$SED])
  8859. ])#AC_PROG_SED
  8860. ])#m4_ifndef
  8861. # Old name:
  8862. AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
  8863. dnl aclocal-1.4 backwards compatibility:
  8864. dnl AC_DEFUN([LT_AC_PROG_SED], [])
  8865. # _LT_CHECK_SHELL_FEATURES
  8866. # ------------------------
  8867. # Find out whether the shell is Bourne or XSI compatible,
  8868. # or has some other useful features.
  8869. m4_defun([_LT_CHECK_SHELL_FEATURES],
  8870. [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
  8871. lt_unset=unset
  8872. else
  8873. lt_unset=false
  8874. fi
  8875. _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
  8876. # test EBCDIC or ASCII
  8877. case `echo X|tr X '\101'` in
  8878. A) # ASCII based system
  8879. # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
  8880. lt_SP2NL='tr \040 \012'
  8881. lt_NL2SP='tr \015\012 \040\040'
  8882. ;;
  8883. *) # EBCDIC based system
  8884. lt_SP2NL='tr \100 \n'
  8885. lt_NL2SP='tr \r\n \100\100'
  8886. ;;
  8887. esac
  8888. _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
  8889. _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
  8890. ])# _LT_CHECK_SHELL_FEATURES
  8891. # _LT_PATH_CONVERSION_FUNCTIONS
  8892. # -----------------------------
  8893. # Determine what file name conversion functions should be used by
  8894. # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
  8895. # for certain cross-compile configurations and native mingw.
  8896. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
  8897. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  8898. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  8899. AC_MSG_CHECKING([how to convert $build file names to $host format])
  8900. AC_CACHE_VAL(lt_cv_to_host_file_cmd,
  8901. [case $host in
  8902. *-*-mingw* )
  8903. case $build in
  8904. *-*-mingw* ) # actually msys
  8905. lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
  8906. ;;
  8907. *-*-cygwin* )
  8908. lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
  8909. ;;
  8910. * ) # otherwise, assume *nix
  8911. lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
  8912. ;;
  8913. esac
  8914. ;;
  8915. *-*-cygwin* )
  8916. case $build in
  8917. *-*-mingw* ) # actually msys
  8918. lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
  8919. ;;
  8920. *-*-cygwin* )
  8921. lt_cv_to_host_file_cmd=func_convert_file_noop
  8922. ;;
  8923. * ) # otherwise, assume *nix
  8924. lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
  8925. ;;
  8926. esac
  8927. ;;
  8928. * ) # unhandled hosts (and "normal" native builds)
  8929. lt_cv_to_host_file_cmd=func_convert_file_noop
  8930. ;;
  8931. esac
  8932. ])
  8933. to_host_file_cmd=$lt_cv_to_host_file_cmd
  8934. AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
  8935. _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
  8936. [0], [convert $build file names to $host format])dnl
  8937. AC_MSG_CHECKING([how to convert $build file names to toolchain format])
  8938. AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
  8939. [#assume ordinary cross tools, or native build.
  8940. lt_cv_to_tool_file_cmd=func_convert_file_noop
  8941. case $host in
  8942. *-*-mingw* )
  8943. case $build in
  8944. *-*-mingw* ) # actually msys
  8945. lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
  8946. ;;
  8947. esac
  8948. ;;
  8949. esac
  8950. ])
  8951. to_tool_file_cmd=$lt_cv_to_tool_file_cmd
  8952. AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
  8953. _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
  8954. [0], [convert $build files to toolchain format])dnl
  8955. ])# _LT_PATH_CONVERSION_FUNCTIONS
  8956. # Helper functions for option handling. -*- Autoconf -*-
  8957. #
  8958. # Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
  8959. # Foundation, Inc.
  8960. # Written by Gary V. Vaughan, 2004
  8961. #
  8962. # This file is free software; the Free Software Foundation gives
  8963. # unlimited permission to copy and/or distribute it, with or without
  8964. # modifications, as long as this notice is preserved.
  8965. # serial 8 ltoptions.m4
  8966. # This is to help aclocal find these macros, as it can't see m4_define.
  8967. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
  8968. # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
  8969. # ------------------------------------------
  8970. m4_define([_LT_MANGLE_OPTION],
  8971. [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
  8972. # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
  8973. # ---------------------------------------
  8974. # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
  8975. # matching handler defined, dispatch to it. Other OPTION-NAMEs are
  8976. # saved as a flag.
  8977. m4_define([_LT_SET_OPTION],
  8978. [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
  8979. m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
  8980. _LT_MANGLE_DEFUN([$1], [$2]),
  8981. [m4_warning([Unknown $1 option '$2'])])[]dnl
  8982. ])
  8983. # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
  8984. # ------------------------------------------------------------
  8985. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  8986. m4_define([_LT_IF_OPTION],
  8987. [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
  8988. # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
  8989. # -------------------------------------------------------
  8990. # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
  8991. # are set.
  8992. m4_define([_LT_UNLESS_OPTIONS],
  8993. [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
  8994. [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
  8995. [m4_define([$0_found])])])[]dnl
  8996. m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
  8997. ])[]dnl
  8998. ])
  8999. # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
  9000. # ----------------------------------------
  9001. # OPTION-LIST is a space-separated list of Libtool options associated
  9002. # with MACRO-NAME. If any OPTION has a matching handler declared with
  9003. # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
  9004. # the unknown option and exit.
  9005. m4_defun([_LT_SET_OPTIONS],
  9006. [# Set options
  9007. m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
  9008. [_LT_SET_OPTION([$1], _LT_Option)])
  9009. m4_if([$1],[LT_INIT],[
  9010. dnl
  9011. dnl Simply set some default values (i.e off) if boolean options were not
  9012. dnl specified:
  9013. _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
  9014. ])
  9015. _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
  9016. ])
  9017. dnl
  9018. dnl If no reference was made to various pairs of opposing options, then
  9019. dnl we run the default mode handler for the pair. For example, if neither
  9020. dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
  9021. dnl archives by default:
  9022. _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
  9023. _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
  9024. _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
  9025. _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
  9026. [_LT_ENABLE_FAST_INSTALL])
  9027. _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
  9028. [_LT_WITH_AIX_SONAME([aix])])
  9029. ])
  9030. ])# _LT_SET_OPTIONS
  9031. # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
  9032. # -----------------------------------------
  9033. m4_define([_LT_MANGLE_DEFUN],
  9034. [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
  9035. # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
  9036. # -----------------------------------------------
  9037. m4_define([LT_OPTION_DEFINE],
  9038. [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
  9039. ])# LT_OPTION_DEFINE
  9040. # dlopen
  9041. # ------
  9042. LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
  9043. ])
  9044. AU_DEFUN([AC_LIBTOOL_DLOPEN],
  9045. [_LT_SET_OPTION([LT_INIT], [dlopen])
  9046. AC_DIAGNOSE([obsolete],
  9047. [$0: Remove this warning and the call to _LT_SET_OPTION when you
  9048. put the 'dlopen' option into LT_INIT's first parameter.])
  9049. ])
  9050. dnl aclocal-1.4 backwards compatibility:
  9051. dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
  9052. # win32-dll
  9053. # ---------
  9054. # Declare package support for building win32 dll's.
  9055. LT_OPTION_DEFINE([LT_INIT], [win32-dll],
  9056. [enable_win32_dll=yes
  9057. case $host in
  9058. *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
  9059. AC_CHECK_TOOL(AS, as, false)
  9060. AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  9061. AC_CHECK_TOOL(OBJDUMP, objdump, false)
  9062. ;;
  9063. esac
  9064. test -z "$AS" && AS=as
  9065. _LT_DECL([], [AS], [1], [Assembler program])dnl
  9066. test -z "$DLLTOOL" && DLLTOOL=dlltool
  9067. _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
  9068. test -z "$OBJDUMP" && OBJDUMP=objdump
  9069. _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
  9070. ])# win32-dll
  9071. AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
  9072. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  9073. _LT_SET_OPTION([LT_INIT], [win32-dll])
  9074. AC_DIAGNOSE([obsolete],
  9075. [$0: Remove this warning and the call to _LT_SET_OPTION when you
  9076. put the 'win32-dll' option into LT_INIT's first parameter.])
  9077. ])
  9078. dnl aclocal-1.4 backwards compatibility:
  9079. dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
  9080. # _LT_ENABLE_SHARED([DEFAULT])
  9081. # ----------------------------
  9082. # implement the --enable-shared flag, and supports the 'shared' and
  9083. # 'disable-shared' LT_INIT options.
  9084. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
  9085. m4_define([_LT_ENABLE_SHARED],
  9086. [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
  9087. AC_ARG_ENABLE([shared],
  9088. [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
  9089. [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
  9090. [p=${PACKAGE-default}
  9091. case $enableval in
  9092. yes) enable_shared=yes ;;
  9093. no) enable_shared=no ;;
  9094. *)
  9095. enable_shared=no
  9096. # Look at the argument we got. We use all the common list separators.
  9097. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
  9098. for pkg in $enableval; do
  9099. IFS=$lt_save_ifs
  9100. if test "X$pkg" = "X$p"; then
  9101. enable_shared=yes
  9102. fi
  9103. done
  9104. IFS=$lt_save_ifs
  9105. ;;
  9106. esac],
  9107. [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
  9108. _LT_DECL([build_libtool_libs], [enable_shared], [0],
  9109. [Whether or not to build shared libraries])
  9110. ])# _LT_ENABLE_SHARED
  9111. LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
  9112. LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
  9113. # Old names:
  9114. AC_DEFUN([AC_ENABLE_SHARED],
  9115. [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
  9116. ])
  9117. AC_DEFUN([AC_DISABLE_SHARED],
  9118. [_LT_SET_OPTION([LT_INIT], [disable-shared])
  9119. ])
  9120. AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
  9121. AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
  9122. dnl aclocal-1.4 backwards compatibility:
  9123. dnl AC_DEFUN([AM_ENABLE_SHARED], [])
  9124. dnl AC_DEFUN([AM_DISABLE_SHARED], [])
  9125. # _LT_ENABLE_STATIC([DEFAULT])
  9126. # ----------------------------
  9127. # implement the --enable-static flag, and support the 'static' and
  9128. # 'disable-static' LT_INIT options.
  9129. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
  9130. m4_define([_LT_ENABLE_STATIC],
  9131. [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
  9132. AC_ARG_ENABLE([static],
  9133. [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
  9134. [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
  9135. [p=${PACKAGE-default}
  9136. case $enableval in
  9137. yes) enable_static=yes ;;
  9138. no) enable_static=no ;;
  9139. *)
  9140. enable_static=no
  9141. # Look at the argument we got. We use all the common list separators.
  9142. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
  9143. for pkg in $enableval; do
  9144. IFS=$lt_save_ifs
  9145. if test "X$pkg" = "X$p"; then
  9146. enable_static=yes
  9147. fi
  9148. done
  9149. IFS=$lt_save_ifs
  9150. ;;
  9151. esac],
  9152. [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
  9153. _LT_DECL([build_old_libs], [enable_static], [0],
  9154. [Whether or not to build static libraries])
  9155. ])# _LT_ENABLE_STATIC
  9156. LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
  9157. LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
  9158. # Old names:
  9159. AC_DEFUN([AC_ENABLE_STATIC],
  9160. [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
  9161. ])
  9162. AC_DEFUN([AC_DISABLE_STATIC],
  9163. [_LT_SET_OPTION([LT_INIT], [disable-static])
  9164. ])
  9165. AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
  9166. AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
  9167. dnl aclocal-1.4 backwards compatibility:
  9168. dnl AC_DEFUN([AM_ENABLE_STATIC], [])
  9169. dnl AC_DEFUN([AM_DISABLE_STATIC], [])
  9170. # _LT_ENABLE_FAST_INSTALL([DEFAULT])
  9171. # ----------------------------------
  9172. # implement the --enable-fast-install flag, and support the 'fast-install'
  9173. # and 'disable-fast-install' LT_INIT options.
  9174. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
  9175. m4_define([_LT_ENABLE_FAST_INSTALL],
  9176. [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
  9177. AC_ARG_ENABLE([fast-install],
  9178. [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
  9179. [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
  9180. [p=${PACKAGE-default}
  9181. case $enableval in
  9182. yes) enable_fast_install=yes ;;
  9183. no) enable_fast_install=no ;;
  9184. *)
  9185. enable_fast_install=no
  9186. # Look at the argument we got. We use all the common list separators.
  9187. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
  9188. for pkg in $enableval; do
  9189. IFS=$lt_save_ifs
  9190. if test "X$pkg" = "X$p"; then
  9191. enable_fast_install=yes
  9192. fi
  9193. done
  9194. IFS=$lt_save_ifs
  9195. ;;
  9196. esac],
  9197. [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
  9198. _LT_DECL([fast_install], [enable_fast_install], [0],
  9199. [Whether or not to optimize for fast installation])dnl
  9200. ])# _LT_ENABLE_FAST_INSTALL
  9201. LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
  9202. LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
  9203. # Old names:
  9204. AU_DEFUN([AC_ENABLE_FAST_INSTALL],
  9205. [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
  9206. AC_DIAGNOSE([obsolete],
  9207. [$0: Remove this warning and the call to _LT_SET_OPTION when you put
  9208. the 'fast-install' option into LT_INIT's first parameter.])
  9209. ])
  9210. AU_DEFUN([AC_DISABLE_FAST_INSTALL],
  9211. [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
  9212. AC_DIAGNOSE([obsolete],
  9213. [$0: Remove this warning and the call to _LT_SET_OPTION when you put
  9214. the 'disable-fast-install' option into LT_INIT's first parameter.])
  9215. ])
  9216. dnl aclocal-1.4 backwards compatibility:
  9217. dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
  9218. dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
  9219. # _LT_WITH_AIX_SONAME([DEFAULT])
  9220. # ----------------------------------
  9221. # implement the --with-aix-soname flag, and support the `aix-soname=aix'
  9222. # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
  9223. # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
  9224. m4_define([_LT_WITH_AIX_SONAME],
  9225. [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
  9226. shared_archive_member_spec=
  9227. case $host,$enable_shared in
  9228. power*-*-aix[[5-9]]*,yes)
  9229. AC_MSG_CHECKING([which variant of shared library versioning to provide])
  9230. AC_ARG_WITH([aix-soname],
  9231. [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
  9232. [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
  9233. [case $withval in
  9234. aix|svr4|both)
  9235. ;;
  9236. *)
  9237. AC_MSG_ERROR([Unknown argument to --with-aix-soname])
  9238. ;;
  9239. esac
  9240. lt_cv_with_aix_soname=$with_aix_soname],
  9241. [AC_CACHE_VAL([lt_cv_with_aix_soname],
  9242. [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
  9243. with_aix_soname=$lt_cv_with_aix_soname])
  9244. AC_MSG_RESULT([$with_aix_soname])
  9245. if test aix != "$with_aix_soname"; then
  9246. # For the AIX way of multilib, we name the shared archive member
  9247. # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
  9248. # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
  9249. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
  9250. # the AIX toolchain works better with OBJECT_MODE set (default 32).
  9251. if test 64 = "${OBJECT_MODE-32}"; then
  9252. shared_archive_member_spec=shr_64
  9253. else
  9254. shared_archive_member_spec=shr
  9255. fi
  9256. fi
  9257. ;;
  9258. *)
  9259. with_aix_soname=aix
  9260. ;;
  9261. esac
  9262. _LT_DECL([], [shared_archive_member_spec], [0],
  9263. [Shared archive member basename, for filename based shared library versioning on AIX])dnl
  9264. ])# _LT_WITH_AIX_SONAME
  9265. LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
  9266. LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
  9267. LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
  9268. # _LT_WITH_PIC([MODE])
  9269. # --------------------
  9270. # implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
  9271. # LT_INIT options.
  9272. # MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
  9273. m4_define([_LT_WITH_PIC],
  9274. [AC_ARG_WITH([pic],
  9275. [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
  9276. [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
  9277. [lt_p=${PACKAGE-default}
  9278. case $withval in
  9279. yes|no) pic_mode=$withval ;;
  9280. *)
  9281. pic_mode=default
  9282. # Look at the argument we got. We use all the common list separators.
  9283. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
  9284. for lt_pkg in $withval; do
  9285. IFS=$lt_save_ifs
  9286. if test "X$lt_pkg" = "X$lt_p"; then
  9287. pic_mode=yes
  9288. fi
  9289. done
  9290. IFS=$lt_save_ifs
  9291. ;;
  9292. esac],
  9293. [pic_mode=m4_default([$1], [default])])
  9294. _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
  9295. ])# _LT_WITH_PIC
  9296. LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
  9297. LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
  9298. # Old name:
  9299. AU_DEFUN([AC_LIBTOOL_PICMODE],
  9300. [_LT_SET_OPTION([LT_INIT], [pic-only])
  9301. AC_DIAGNOSE([obsolete],
  9302. [$0: Remove this warning and the call to _LT_SET_OPTION when you
  9303. put the 'pic-only' option into LT_INIT's first parameter.])
  9304. ])
  9305. dnl aclocal-1.4 backwards compatibility:
  9306. dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
  9307. m4_define([_LTDL_MODE], [])
  9308. LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
  9309. [m4_define([_LTDL_MODE], [nonrecursive])])
  9310. LT_OPTION_DEFINE([LTDL_INIT], [recursive],
  9311. [m4_define([_LTDL_MODE], [recursive])])
  9312. LT_OPTION_DEFINE([LTDL_INIT], [subproject],
  9313. [m4_define([_LTDL_MODE], [subproject])])
  9314. m4_define([_LTDL_TYPE], [])
  9315. LT_OPTION_DEFINE([LTDL_INIT], [installable],
  9316. [m4_define([_LTDL_TYPE], [installable])])
  9317. LT_OPTION_DEFINE([LTDL_INIT], [convenience],
  9318. [m4_define([_LTDL_TYPE], [convenience])])
  9319. # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
  9320. #
  9321. # Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
  9322. # Foundation, Inc.
  9323. # Written by Gary V. Vaughan, 2004
  9324. #
  9325. # This file is free software; the Free Software Foundation gives
  9326. # unlimited permission to copy and/or distribute it, with or without
  9327. # modifications, as long as this notice is preserved.
  9328. # serial 6 ltsugar.m4
  9329. # This is to help aclocal find these macros, as it can't see m4_define.
  9330. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
  9331. # lt_join(SEP, ARG1, [ARG2...])
  9332. # -----------------------------
  9333. # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
  9334. # associated separator.
  9335. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
  9336. # versions in m4sugar had bugs.
  9337. m4_define([lt_join],
  9338. [m4_if([$#], [1], [],
  9339. [$#], [2], [[$2]],
  9340. [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
  9341. m4_define([_lt_join],
  9342. [m4_if([$#$2], [2], [],
  9343. [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
  9344. # lt_car(LIST)
  9345. # lt_cdr(LIST)
  9346. # ------------
  9347. # Manipulate m4 lists.
  9348. # These macros are necessary as long as will still need to support
  9349. # Autoconf-2.59, which quotes differently.
  9350. m4_define([lt_car], [[$1]])
  9351. m4_define([lt_cdr],
  9352. [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
  9353. [$#], 1, [],
  9354. [m4_dquote(m4_shift($@))])])
  9355. m4_define([lt_unquote], $1)
  9356. # lt_append(MACRO-NAME, STRING, [SEPARATOR])
  9357. # ------------------------------------------
  9358. # Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
  9359. # Note that neither SEPARATOR nor STRING are expanded; they are appended
  9360. # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
  9361. # No SEPARATOR is output if MACRO-NAME was previously undefined (different
  9362. # than defined and empty).
  9363. #
  9364. # This macro is needed until we can rely on Autoconf 2.62, since earlier
  9365. # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
  9366. m4_define([lt_append],
  9367. [m4_define([$1],
  9368. m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
  9369. # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
  9370. # ----------------------------------------------------------
  9371. # Produce a SEP delimited list of all paired combinations of elements of
  9372. # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
  9373. # has the form PREFIXmINFIXSUFFIXn.
  9374. # Needed until we can rely on m4_combine added in Autoconf 2.62.
  9375. m4_define([lt_combine],
  9376. [m4_if(m4_eval([$# > 3]), [1],
  9377. [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
  9378. [[m4_foreach([_Lt_prefix], [$2],
  9379. [m4_foreach([_Lt_suffix],
  9380. ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
  9381. [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
  9382. # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
  9383. # -----------------------------------------------------------------------
  9384. # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
  9385. # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
  9386. m4_define([lt_if_append_uniq],
  9387. [m4_ifdef([$1],
  9388. [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
  9389. [lt_append([$1], [$2], [$3])$4],
  9390. [$5])],
  9391. [lt_append([$1], [$2], [$3])$4])])
  9392. # lt_dict_add(DICT, KEY, VALUE)
  9393. # -----------------------------
  9394. m4_define([lt_dict_add],
  9395. [m4_define([$1($2)], [$3])])
  9396. # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
  9397. # --------------------------------------------
  9398. m4_define([lt_dict_add_subkey],
  9399. [m4_define([$1($2:$3)], [$4])])
  9400. # lt_dict_fetch(DICT, KEY, [SUBKEY])
  9401. # ----------------------------------
  9402. m4_define([lt_dict_fetch],
  9403. [m4_ifval([$3],
  9404. m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
  9405. m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
  9406. # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
  9407. # -----------------------------------------------------------------
  9408. m4_define([lt_if_dict_fetch],
  9409. [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
  9410. [$5],
  9411. [$6])])
  9412. # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
  9413. # --------------------------------------------------------------
  9414. m4_define([lt_dict_filter],
  9415. [m4_if([$5], [], [],
  9416. [lt_join(m4_quote(m4_default([$4], [[, ]])),
  9417. lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
  9418. [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
  9419. ])
  9420. # ltversion.m4 -- version numbers -*- Autoconf -*-
  9421. #
  9422. # Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
  9423. # Written by Scott James Remnant, 2004
  9424. #
  9425. # This file is free software; the Free Software Foundation gives
  9426. # unlimited permission to copy and/or distribute it, with or without
  9427. # modifications, as long as this notice is preserved.
  9428. # @configure_input@
  9429. # serial 4179 ltversion.m4
  9430. # This file is part of GNU Libtool
  9431. m4_define([LT_PACKAGE_VERSION], [2.4.6])
  9432. m4_define([LT_PACKAGE_REVISION], [2.4.6])
  9433. AC_DEFUN([LTVERSION_VERSION],
  9434. [macro_version='2.4.6'
  9435. macro_revision='2.4.6'
  9436. _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
  9437. _LT_DECL(, macro_revision, 0)
  9438. ])
  9439. # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
  9440. #
  9441. # Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
  9442. # Foundation, Inc.
  9443. # Written by Scott James Remnant, 2004.
  9444. #
  9445. # This file is free software; the Free Software Foundation gives
  9446. # unlimited permission to copy and/or distribute it, with or without
  9447. # modifications, as long as this notice is preserved.
  9448. # serial 5 lt~obsolete.m4
  9449. # These exist entirely to fool aclocal when bootstrapping libtool.
  9450. #
  9451. # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
  9452. # which have later been changed to m4_define as they aren't part of the
  9453. # exported API, or moved to Autoconf or Automake where they belong.
  9454. #
  9455. # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
  9456. # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
  9457. # using a macro with the same name in our local m4/libtool.m4 it'll
  9458. # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
  9459. # and doesn't know about Autoconf macros at all.)
  9460. #
  9461. # So we provide this file, which has a silly filename so it's always
  9462. # included after everything else. This provides aclocal with the
  9463. # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
  9464. # because those macros already exist, or will be overwritten later.
  9465. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
  9466. #
  9467. # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
  9468. # Yes, that means every name once taken will need to remain here until
  9469. # we give up compatibility with versions before 1.7, at which point
  9470. # we need to keep only those names which we still refer to.
  9471. # This is to help aclocal find these macros, as it can't see m4_define.
  9472. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
  9473. m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
  9474. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
  9475. m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
  9476. m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
  9477. m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
  9478. m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
  9479. m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
  9480. m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
  9481. m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
  9482. m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
  9483. m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
  9484. m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
  9485. m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
  9486. m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
  9487. m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
  9488. m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
  9489. m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
  9490. m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
  9491. m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
  9492. m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
  9493. m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
  9494. m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
  9495. m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
  9496. m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
  9497. m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
  9498. m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
  9499. m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
  9500. m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
  9501. m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
  9502. m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
  9503. m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
  9504. m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
  9505. m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
  9506. m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
  9507. m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
  9508. m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
  9509. m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
  9510. m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
  9511. m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
  9512. m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
  9513. m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
  9514. m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
  9515. m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
  9516. m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
  9517. m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
  9518. m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
  9519. m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
  9520. m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
  9521. m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
  9522. m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
  9523. m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
  9524. m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
  9525. m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
  9526. m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
  9527. m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
  9528. m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
  9529. m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
  9530. m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
  9531. m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
  9532. m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
  9533. m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
  9534. # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
  9535. # serial 11 (pkg-config-0.29.1)
  9536. dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
  9537. dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
  9538. dnl
  9539. dnl This program is free software; you can redistribute it and/or modify
  9540. dnl it under the terms of the GNU General Public License as published by
  9541. dnl the Free Software Foundation; either version 2 of the License, or
  9542. dnl (at your option) any later version.
  9543. dnl
  9544. dnl This program is distributed in the hope that it will be useful, but
  9545. dnl WITHOUT ANY WARRANTY; without even the implied warranty of
  9546. dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  9547. dnl General Public License for more details.
  9548. dnl
  9549. dnl You should have received a copy of the GNU General Public License
  9550. dnl along with this program; if not, write to the Free Software
  9551. dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  9552. dnl 02111-1307, USA.
  9553. dnl
  9554. dnl As a special exception to the GNU General Public License, if you
  9555. dnl distribute this file as part of a program that contains a
  9556. dnl configuration script generated by Autoconf, you may include it under
  9557. dnl the same distribution terms that you use for the rest of that
  9558. dnl program.
  9559. dnl PKG_PREREQ(MIN-VERSION)
  9560. dnl -----------------------
  9561. dnl Since: 0.29
  9562. dnl
  9563. dnl Verify that the version of the pkg-config macros are at least
  9564. dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
  9565. dnl installed version of pkg-config, this checks the developer's version
  9566. dnl of pkg.m4 when generating configure.
  9567. dnl
  9568. dnl To ensure that this macro is defined, also add:
  9569. dnl m4_ifndef([PKG_PREREQ],
  9570. dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
  9571. dnl
  9572. dnl See the "Since" comment for each macro you use to see what version
  9573. dnl of the macros you require.
  9574. m4_defun([PKG_PREREQ],
  9575. [m4_define([PKG_MACROS_VERSION], [0.29.1])
  9576. m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
  9577. [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
  9578. ])dnl PKG_PREREQ
  9579. dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
  9580. dnl ----------------------------------
  9581. dnl Since: 0.16
  9582. dnl
  9583. dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
  9584. dnl first found in the path. Checks that the version of pkg-config found
  9585. dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
  9586. dnl used since that's the first version where most current features of
  9587. dnl pkg-config existed.
  9588. AC_DEFUN([PKG_PROG_PKG_CONFIG],
  9589. [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
  9590. m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
  9591. m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
  9592. AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
  9593. AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
  9594. AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
  9595. if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
  9596. AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
  9597. fi
  9598. if test -n "$PKG_CONFIG"; then
  9599. _pkg_min_version=m4_default([$1], [0.9.0])
  9600. AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
  9601. if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
  9602. AC_MSG_RESULT([yes])
  9603. else
  9604. AC_MSG_RESULT([no])
  9605. PKG_CONFIG=""
  9606. fi
  9607. fi[]dnl
  9608. ])dnl PKG_PROG_PKG_CONFIG
  9609. dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
  9610. dnl -------------------------------------------------------------------
  9611. dnl Since: 0.18
  9612. dnl
  9613. dnl Check to see whether a particular set of modules exists. Similar to
  9614. dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
  9615. dnl
  9616. dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
  9617. dnl only at the first occurence in configure.ac, so if the first place
  9618. dnl it's called might be skipped (such as if it is within an "if", you
  9619. dnl have to call PKG_CHECK_EXISTS manually
  9620. AC_DEFUN([PKG_CHECK_EXISTS],
  9621. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  9622. if test -n "$PKG_CONFIG" && \
  9623. AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
  9624. m4_default([$2], [:])
  9625. m4_ifvaln([$3], [else
  9626. $3])dnl
  9627. fi])
  9628. dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
  9629. dnl ---------------------------------------------
  9630. dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
  9631. dnl pkg_failed based on the result.
  9632. m4_define([_PKG_CONFIG],
  9633. [if test -n "$$1"; then
  9634. pkg_cv_[]$1="$$1"
  9635. elif test -n "$PKG_CONFIG"; then
  9636. PKG_CHECK_EXISTS([$3],
  9637. [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
  9638. test "x$?" != "x0" && pkg_failed=yes ],
  9639. [pkg_failed=yes])
  9640. else
  9641. pkg_failed=untried
  9642. fi[]dnl
  9643. ])dnl _PKG_CONFIG
  9644. dnl _PKG_SHORT_ERRORS_SUPPORTED
  9645. dnl ---------------------------
  9646. dnl Internal check to see if pkg-config supports short errors.
  9647. AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
  9648. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
  9649. if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  9650. _pkg_short_errors_supported=yes
  9651. else
  9652. _pkg_short_errors_supported=no
  9653. fi[]dnl
  9654. ])dnl _PKG_SHORT_ERRORS_SUPPORTED
  9655. dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
  9656. dnl [ACTION-IF-NOT-FOUND])
  9657. dnl --------------------------------------------------------------
  9658. dnl Since: 0.4.0
  9659. dnl
  9660. dnl Note that if there is a possibility the first call to
  9661. dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
  9662. dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
  9663. AC_DEFUN([PKG_CHECK_MODULES],
  9664. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  9665. AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
  9666. AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
  9667. pkg_failed=no
  9668. AC_MSG_CHECKING([for $1])
  9669. _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
  9670. _PKG_CONFIG([$1][_LIBS], [libs], [$2])
  9671. m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
  9672. and $1[]_LIBS to avoid the need to call pkg-config.
  9673. See the pkg-config man page for more details.])
  9674. if test $pkg_failed = yes; then
  9675. AC_MSG_RESULT([no])
  9676. _PKG_SHORT_ERRORS_SUPPORTED
  9677. if test $_pkg_short_errors_supported = yes; then
  9678. $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
  9679. else
  9680. $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
  9681. fi
  9682. # Put the nasty error message in config.log where it belongs
  9683. echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
  9684. m4_default([$4], [AC_MSG_ERROR(
  9685. [Package requirements ($2) were not met:
  9686. $$1_PKG_ERRORS
  9687. Consider adjusting the PKG_CONFIG_PATH environment variable if you
  9688. installed software in a non-standard prefix.
  9689. _PKG_TEXT])[]dnl
  9690. ])
  9691. elif test $pkg_failed = untried; then
  9692. AC_MSG_RESULT([no])
  9693. m4_default([$4], [AC_MSG_FAILURE(
  9694. [The pkg-config script could not be found or is too old. Make sure it
  9695. is in your PATH or set the PKG_CONFIG environment variable to the full
  9696. path to pkg-config.
  9697. _PKG_TEXT
  9698. To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
  9699. ])
  9700. else
  9701. $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
  9702. $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
  9703. AC_MSG_RESULT([yes])
  9704. $3
  9705. fi[]dnl
  9706. ])dnl PKG_CHECK_MODULES
  9707. dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
  9708. dnl [ACTION-IF-NOT-FOUND])
  9709. dnl ---------------------------------------------------------------------
  9710. dnl Since: 0.29
  9711. dnl
  9712. dnl Checks for existence of MODULES and gathers its build flags with
  9713. dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
  9714. dnl and VARIABLE-PREFIX_LIBS from --libs.
  9715. dnl
  9716. dnl Note that if there is a possibility the first call to
  9717. dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
  9718. dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
  9719. dnl configure.ac.
  9720. AC_DEFUN([PKG_CHECK_MODULES_STATIC],
  9721. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  9722. _save_PKG_CONFIG=$PKG_CONFIG
  9723. PKG_CONFIG="$PKG_CONFIG --static"
  9724. PKG_CHECK_MODULES($@)
  9725. PKG_CONFIG=$_save_PKG_CONFIG[]dnl
  9726. ])dnl PKG_CHECK_MODULES_STATIC
  9727. dnl PKG_INSTALLDIR([DIRECTORY])
  9728. dnl -------------------------
  9729. dnl Since: 0.27
  9730. dnl
  9731. dnl Substitutes the variable pkgconfigdir as the location where a module
  9732. dnl should install pkg-config .pc files. By default the directory is
  9733. dnl $libdir/pkgconfig, but the default can be changed by passing
  9734. dnl DIRECTORY. The user can override through the --with-pkgconfigdir
  9735. dnl parameter.
  9736. AC_DEFUN([PKG_INSTALLDIR],
  9737. [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
  9738. m4_pushdef([pkg_description],
  9739. [pkg-config installation directory @<:@]pkg_default[@:>@])
  9740. AC_ARG_WITH([pkgconfigdir],
  9741. [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
  9742. [with_pkgconfigdir=]pkg_default)
  9743. AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
  9744. m4_popdef([pkg_default])
  9745. m4_popdef([pkg_description])
  9746. ])dnl PKG_INSTALLDIR
  9747. dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
  9748. dnl --------------------------------
  9749. dnl Since: 0.27
  9750. dnl
  9751. dnl Substitutes the variable noarch_pkgconfigdir as the location where a
  9752. dnl module should install arch-independent pkg-config .pc files. By
  9753. dnl default the directory is $datadir/pkgconfig, but the default can be
  9754. dnl changed by passing DIRECTORY. The user can override through the
  9755. dnl --with-noarch-pkgconfigdir parameter.
  9756. AC_DEFUN([PKG_NOARCH_INSTALLDIR],
  9757. [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
  9758. m4_pushdef([pkg_description],
  9759. [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
  9760. AC_ARG_WITH([noarch-pkgconfigdir],
  9761. [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
  9762. [with_noarch_pkgconfigdir=]pkg_default)
  9763. AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
  9764. m4_popdef([pkg_default])
  9765. m4_popdef([pkg_description])
  9766. ])dnl PKG_NOARCH_INSTALLDIR
  9767. dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
  9768. dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
  9769. dnl -------------------------------------------
  9770. dnl Since: 0.28
  9771. dnl
  9772. dnl Retrieves the value of the pkg-config variable for the given module.
  9773. AC_DEFUN([PKG_CHECK_VAR],
  9774. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  9775. AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
  9776. _PKG_CONFIG([$1], [variable="][$3]["], [$2])
  9777. AS_VAR_COPY([$1], [pkg_cv_][$1])
  9778. AS_VAR_IF([$1], [""], [$5], [$4])dnl
  9779. ])dnl PKG_CHECK_VAR
  9780. dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES,
  9781. dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND],
  9782. dnl [DESCRIPTION], [DEFAULT])
  9783. dnl ------------------------------------------
  9784. dnl
  9785. dnl Prepare a "--with-" configure option using the lowercase
  9786. dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and
  9787. dnl PKG_CHECK_MODULES in a single macro.
  9788. AC_DEFUN([PKG_WITH_MODULES],
  9789. [
  9790. m4_pushdef([with_arg], m4_tolower([$1]))
  9791. m4_pushdef([description],
  9792. [m4_default([$5], [build with ]with_arg[ support])])
  9793. m4_pushdef([def_arg], [m4_default([$6], [auto])])
  9794. m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes])
  9795. m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no])
  9796. m4_case(def_arg,
  9797. [yes],[m4_pushdef([with_without], [--without-]with_arg)],
  9798. [m4_pushdef([with_without],[--with-]with_arg)])
  9799. AC_ARG_WITH(with_arg,
  9800. AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),,
  9801. [AS_TR_SH([with_]with_arg)=def_arg])
  9802. AS_CASE([$AS_TR_SH([with_]with_arg)],
  9803. [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)],
  9804. [auto],[PKG_CHECK_MODULES([$1],[$2],
  9805. [m4_n([def_action_if_found]) $3],
  9806. [m4_n([def_action_if_not_found]) $4])])
  9807. m4_popdef([with_arg])
  9808. m4_popdef([description])
  9809. m4_popdef([def_arg])
  9810. ])dnl PKG_WITH_MODULES
  9811. dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
  9812. dnl [DESCRIPTION], [DEFAULT])
  9813. dnl -----------------------------------------------
  9814. dnl
  9815. dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES
  9816. dnl check._[VARIABLE-PREFIX] is exported as make variable.
  9817. AC_DEFUN([PKG_HAVE_WITH_MODULES],
  9818. [
  9819. PKG_WITH_MODULES([$1],[$2],,,[$3],[$4])
  9820. AM_CONDITIONAL([HAVE_][$1],
  9821. [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"])
  9822. ])dnl PKG_HAVE_WITH_MODULES
  9823. dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
  9824. dnl [DESCRIPTION], [DEFAULT])
  9825. dnl ------------------------------------------------------
  9826. dnl
  9827. dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after
  9828. dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make
  9829. dnl and preprocessor variable.
  9830. AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES],
  9831. [
  9832. PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4])
  9833. AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"],
  9834. [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])])
  9835. ])dnl PKG_HAVE_DEFINE_WITH_MODULES
  9836. # Copyright (C) 2002-2017 Free Software Foundation, Inc.
  9837. #
  9838. # This file is free software; the Free Software Foundation
  9839. # gives unlimited permission to copy and/or distribute it,
  9840. # with or without modifications, as long as this notice is preserved.
  9841. # AM_AUTOMAKE_VERSION(VERSION)
  9842. # ----------------------------
  9843. # Automake X.Y traces this macro to ensure aclocal.m4 has been
  9844. # generated from the m4 files accompanying Automake X.Y.
  9845. # (This private macro should not be called outside this file.)
  9846. AC_DEFUN([AM_AUTOMAKE_VERSION],
  9847. [am__api_version='1.15'
  9848. dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
  9849. dnl require some minimum version. Point them to the right macro.
  9850. m4_if([$1], [1.15.1], [],
  9851. [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
  9852. ])
  9853. # _AM_AUTOCONF_VERSION(VERSION)
  9854. # -----------------------------
  9855. # aclocal traces this macro to find the Autoconf version.
  9856. # This is a private macro too. Using m4_define simplifies
  9857. # the logic in aclocal, which can simply ignore this definition.
  9858. m4_define([_AM_AUTOCONF_VERSION], [])
  9859. # AM_SET_CURRENT_AUTOMAKE_VERSION
  9860. # -------------------------------
  9861. # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
  9862. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
  9863. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
  9864. [AM_AUTOMAKE_VERSION([1.15.1])dnl
  9865. m4_ifndef([AC_AUTOCONF_VERSION],
  9866. [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
  9867. _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
  9868. # AM_AUX_DIR_EXPAND -*- Autoconf -*-
  9869. # Copyright (C) 2001-2017 Free Software Foundation, Inc.
  9870. #
  9871. # This file is free software; the Free Software Foundation
  9872. # gives unlimited permission to copy and/or distribute it,
  9873. # with or without modifications, as long as this notice is preserved.
  9874. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
  9875. # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
  9876. # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
  9877. #
  9878. # Of course, Automake must honor this variable whenever it calls a
  9879. # tool from the auxiliary directory. The problem is that $srcdir (and
  9880. # therefore $ac_aux_dir as well) can be either absolute or relative,
  9881. # depending on how configure is run. This is pretty annoying, since
  9882. # it makes $ac_aux_dir quite unusable in subdirectories: in the top
  9883. # source directory, any form will work fine, but in subdirectories a
  9884. # relative path needs to be adjusted first.
  9885. #
  9886. # $ac_aux_dir/missing
  9887. # fails when called from a subdirectory if $ac_aux_dir is relative
  9888. # $top_srcdir/$ac_aux_dir/missing
  9889. # fails if $ac_aux_dir is absolute,
  9890. # fails when called from a subdirectory in a VPATH build with
  9891. # a relative $ac_aux_dir
  9892. #
  9893. # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
  9894. # are both prefixed by $srcdir. In an in-source build this is usually
  9895. # harmless because $srcdir is '.', but things will broke when you
  9896. # start a VPATH build or use an absolute $srcdir.
  9897. #
  9898. # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
  9899. # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
  9900. # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
  9901. # and then we would define $MISSING as
  9902. # MISSING="\${SHELL} $am_aux_dir/missing"
  9903. # This will work as long as MISSING is not called from configure, because
  9904. # unfortunately $(top_srcdir) has no meaning in configure.
  9905. # However there are other variables, like CC, which are often used in
  9906. # configure, and could therefore not use this "fixed" $ac_aux_dir.
  9907. #
  9908. # Another solution, used here, is to always expand $ac_aux_dir to an
  9909. # absolute PATH. The drawback is that using absolute paths prevent a
  9910. # configured tree to be moved without reconfiguration.
  9911. AC_DEFUN([AM_AUX_DIR_EXPAND],
  9912. [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  9913. # Expand $ac_aux_dir to an absolute path.
  9914. am_aux_dir=`cd "$ac_aux_dir" && pwd`
  9915. ])
  9916. # AM_CONDITIONAL -*- Autoconf -*-
  9917. # Copyright (C) 1997-2017 Free Software Foundation, Inc.
  9918. #
  9919. # This file is free software; the Free Software Foundation
  9920. # gives unlimited permission to copy and/or distribute it,
  9921. # with or without modifications, as long as this notice is preserved.
  9922. # AM_CONDITIONAL(NAME, SHELL-CONDITION)
  9923. # -------------------------------------
  9924. # Define a conditional.
  9925. AC_DEFUN([AM_CONDITIONAL],
  9926. [AC_PREREQ([2.52])dnl
  9927. m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
  9928. [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
  9929. AC_SUBST([$1_TRUE])dnl
  9930. AC_SUBST([$1_FALSE])dnl
  9931. _AM_SUBST_NOTMAKE([$1_TRUE])dnl
  9932. _AM_SUBST_NOTMAKE([$1_FALSE])dnl
  9933. m4_define([_AM_COND_VALUE_$1], [$2])dnl
  9934. if $2; then
  9935. $1_TRUE=
  9936. $1_FALSE='#'
  9937. else
  9938. $1_TRUE='#'
  9939. $1_FALSE=
  9940. fi
  9941. AC_CONFIG_COMMANDS_PRE(
  9942. [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
  9943. AC_MSG_ERROR([[conditional "$1" was never defined.
  9944. Usually this means the macro was only invoked conditionally.]])
  9945. fi])])
  9946. # Copyright (C) 1999-2017 Free Software Foundation, Inc.
  9947. #
  9948. # This file is free software; the Free Software Foundation
  9949. # gives unlimited permission to copy and/or distribute it,
  9950. # with or without modifications, as long as this notice is preserved.
  9951. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
  9952. # written in clear, in which case automake, when reading aclocal.m4,
  9953. # will think it sees a *use*, and therefore will trigger all it's
  9954. # C support machinery. Also note that it means that autoscan, seeing
  9955. # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
  9956. # _AM_DEPENDENCIES(NAME)
  9957. # ----------------------
  9958. # See how the compiler implements dependency checking.
  9959. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
  9960. # We try a few techniques and use that to set a single cache variable.
  9961. #
  9962. # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
  9963. # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
  9964. # dependency, and given that the user is not expected to run this macro,
  9965. # just rely on AC_PROG_CC.
  9966. AC_DEFUN([_AM_DEPENDENCIES],
  9967. [AC_REQUIRE([AM_SET_DEPDIR])dnl
  9968. AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
  9969. AC_REQUIRE([AM_MAKE_INCLUDE])dnl
  9970. AC_REQUIRE([AM_DEP_TRACK])dnl
  9971. m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
  9972. [$1], [CXX], [depcc="$CXX" am_compiler_list=],
  9973. [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
  9974. [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
  9975. [$1], [UPC], [depcc="$UPC" am_compiler_list=],
  9976. [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
  9977. [depcc="$$1" am_compiler_list=])
  9978. AC_CACHE_CHECK([dependency style of $depcc],
  9979. [am_cv_$1_dependencies_compiler_type],
  9980. [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  9981. # We make a subdir and do the tests there. Otherwise we can end up
  9982. # making bogus files that we don't know about and never remove. For
  9983. # instance it was reported that on HP-UX the gcc test will end up
  9984. # making a dummy file named 'D' -- because '-MD' means "put the output
  9985. # in D".
  9986. rm -rf conftest.dir
  9987. mkdir conftest.dir
  9988. # Copy depcomp to subdir because otherwise we won't find it if we're
  9989. # using a relative directory.
  9990. cp "$am_depcomp" conftest.dir
  9991. cd conftest.dir
  9992. # We will build objects and dependencies in a subdirectory because
  9993. # it helps to detect inapplicable dependency modes. For instance
  9994. # both Tru64's cc and ICC support -MD to output dependencies as a
  9995. # side effect of compilation, but ICC will put the dependencies in
  9996. # the current directory while Tru64 will put them in the object
  9997. # directory.
  9998. mkdir sub
  9999. am_cv_$1_dependencies_compiler_type=none
  10000. if test "$am_compiler_list" = ""; then
  10001. am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
  10002. fi
  10003. am__universal=false
  10004. m4_case([$1], [CC],
  10005. [case " $depcc " in #(
  10006. *\ -arch\ *\ -arch\ *) am__universal=true ;;
  10007. esac],
  10008. [CXX],
  10009. [case " $depcc " in #(
  10010. *\ -arch\ *\ -arch\ *) am__universal=true ;;
  10011. esac])
  10012. for depmode in $am_compiler_list; do
  10013. # Setup a source with many dependencies, because some compilers
  10014. # like to wrap large dependency lists on column 80 (with \), and
  10015. # we should not choose a depcomp mode which is confused by this.
  10016. #
  10017. # We need to recreate these files for each test, as the compiler may
  10018. # overwrite some of them when testing with obscure command lines.
  10019. # This happens at least with the AIX C compiler.
  10020. : > sub/conftest.c
  10021. for i in 1 2 3 4 5 6; do
  10022. echo '#include "conftst'$i'.h"' >> sub/conftest.c
  10023. # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
  10024. # Solaris 10 /bin/sh.
  10025. echo '/* dummy */' > sub/conftst$i.h
  10026. done
  10027. echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
  10028. # We check with '-c' and '-o' for the sake of the "dashmstdout"
  10029. # mode. It turns out that the SunPro C++ compiler does not properly
  10030. # handle '-M -o', and we need to detect this. Also, some Intel
  10031. # versions had trouble with output in subdirs.
  10032. am__obj=sub/conftest.${OBJEXT-o}
  10033. am__minus_obj="-o $am__obj"
  10034. case $depmode in
  10035. gcc)
  10036. # This depmode causes a compiler race in universal mode.
  10037. test "$am__universal" = false || continue
  10038. ;;
  10039. nosideeffect)
  10040. # After this tag, mechanisms are not by side-effect, so they'll
  10041. # only be used when explicitly requested.
  10042. if test "x$enable_dependency_tracking" = xyes; then
  10043. continue
  10044. else
  10045. break
  10046. fi
  10047. ;;
  10048. msvc7 | msvc7msys | msvisualcpp | msvcmsys)
  10049. # This compiler won't grok '-c -o', but also, the minuso test has
  10050. # not run yet. These depmodes are late enough in the game, and
  10051. # so weak that their functioning should not be impacted.
  10052. am__obj=conftest.${OBJEXT-o}
  10053. am__minus_obj=
  10054. ;;
  10055. none) break ;;
  10056. esac
  10057. if depmode=$depmode \
  10058. source=sub/conftest.c object=$am__obj \
  10059. depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
  10060. $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
  10061. >/dev/null 2>conftest.err &&
  10062. grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
  10063. grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
  10064. grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
  10065. ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
  10066. # icc doesn't choke on unknown options, it will just issue warnings
  10067. # or remarks (even with -Werror). So we grep stderr for any message
  10068. # that says an option was ignored or not supported.
  10069. # When given -MP, icc 7.0 and 7.1 complain thusly:
  10070. # icc: Command line warning: ignoring option '-M'; no argument required
  10071. # The diagnosis changed in icc 8.0:
  10072. # icc: Command line remark: option '-MP' not supported
  10073. if (grep 'ignoring option' conftest.err ||
  10074. grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
  10075. am_cv_$1_dependencies_compiler_type=$depmode
  10076. break
  10077. fi
  10078. fi
  10079. done
  10080. cd ..
  10081. rm -rf conftest.dir
  10082. else
  10083. am_cv_$1_dependencies_compiler_type=none
  10084. fi
  10085. ])
  10086. AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
  10087. AM_CONDITIONAL([am__fastdep$1], [
  10088. test "x$enable_dependency_tracking" != xno \
  10089. && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
  10090. ])
  10091. # AM_SET_DEPDIR
  10092. # -------------
  10093. # Choose a directory name for dependency files.
  10094. # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
  10095. AC_DEFUN([AM_SET_DEPDIR],
  10096. [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  10097. AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
  10098. ])
  10099. # AM_DEP_TRACK
  10100. # ------------
  10101. AC_DEFUN([AM_DEP_TRACK],
  10102. [AC_ARG_ENABLE([dependency-tracking], [dnl
  10103. AS_HELP_STRING(
  10104. [--enable-dependency-tracking],
  10105. [do not reject slow dependency extractors])
  10106. AS_HELP_STRING(
  10107. [--disable-dependency-tracking],
  10108. [speeds up one-time build])])
  10109. if test "x$enable_dependency_tracking" != xno; then
  10110. am_depcomp="$ac_aux_dir/depcomp"
  10111. AMDEPBACKSLASH='\'
  10112. am__nodep='_no'
  10113. fi
  10114. AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
  10115. AC_SUBST([AMDEPBACKSLASH])dnl
  10116. _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
  10117. AC_SUBST([am__nodep])dnl
  10118. _AM_SUBST_NOTMAKE([am__nodep])dnl
  10119. ])
  10120. # Generate code to set up dependency tracking. -*- Autoconf -*-
  10121. # Copyright (C) 1999-2017 Free Software Foundation, Inc.
  10122. #
  10123. # This file is free software; the Free Software Foundation
  10124. # gives unlimited permission to copy and/or distribute it,
  10125. # with or without modifications, as long as this notice is preserved.
  10126. # _AM_OUTPUT_DEPENDENCY_COMMANDS
  10127. # ------------------------------
  10128. AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
  10129. [{
  10130. # Older Autoconf quotes --file arguments for eval, but not when files
  10131. # are listed without --file. Let's play safe and only enable the eval
  10132. # if we detect the quoting.
  10133. case $CONFIG_FILES in
  10134. *\'*) eval set x "$CONFIG_FILES" ;;
  10135. *) set x $CONFIG_FILES ;;
  10136. esac
  10137. shift
  10138. for mf
  10139. do
  10140. # Strip MF so we end up with the name of the file.
  10141. mf=`echo "$mf" | sed -e 's/:.*$//'`
  10142. # Check whether this is an Automake generated Makefile or not.
  10143. # We used to match only the files named 'Makefile.in', but
  10144. # some people rename them; so instead we look at the file content.
  10145. # Grep'ing the first line is not enough: some people post-process
  10146. # each Makefile.in and add a new line on top of each file to say so.
  10147. # Grep'ing the whole file is not good either: AIX grep has a line
  10148. # limit of 2048, but all sed's we know have understand at least 4000.
  10149. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
  10150. dirpart=`AS_DIRNAME("$mf")`
  10151. else
  10152. continue
  10153. fi
  10154. # Extract the definition of DEPDIR, am__include, and am__quote
  10155. # from the Makefile without running 'make'.
  10156. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
  10157. test -z "$DEPDIR" && continue
  10158. am__include=`sed -n 's/^am__include = //p' < "$mf"`
  10159. test -z "$am__include" && continue
  10160. am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
  10161. # Find all dependency output files, they are included files with
  10162. # $(DEPDIR) in their names. We invoke sed twice because it is the
  10163. # simplest approach to changing $(DEPDIR) to its actual value in the
  10164. # expansion.
  10165. for file in `sed -n "
  10166. s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
  10167. sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
  10168. # Make sure the directory exists.
  10169. test -f "$dirpart/$file" && continue
  10170. fdir=`AS_DIRNAME(["$file"])`
  10171. AS_MKDIR_P([$dirpart/$fdir])
  10172. # echo "creating $dirpart/$file"
  10173. echo '# dummy' > "$dirpart/$file"
  10174. done
  10175. done
  10176. }
  10177. ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
  10178. # AM_OUTPUT_DEPENDENCY_COMMANDS
  10179. # -----------------------------
  10180. # This macro should only be invoked once -- use via AC_REQUIRE.
  10181. #
  10182. # This code is only required when automatic dependency tracking
  10183. # is enabled. FIXME. This creates each '.P' file that we will
  10184. # need in order to bootstrap the dependency handling code.
  10185. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
  10186. [AC_CONFIG_COMMANDS([depfiles],
  10187. [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
  10188. [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
  10189. ])
  10190. # Copyright (C) 1996-2017 Free Software Foundation, Inc.
  10191. #
  10192. # This file is free software; the Free Software Foundation
  10193. # gives unlimited permission to copy and/or distribute it,
  10194. # with or without modifications, as long as this notice is preserved.
  10195. AC_DEFUN([AM_WITH_DMALLOC],
  10196. [AC_MSG_CHECKING([if malloc debugging is wanted])
  10197. AC_ARG_WITH([dmalloc],
  10198. [AS_HELP_STRING([--with-dmalloc],
  10199. [use dmalloc, as in http://www.dmalloc.com])],
  10200. [if test "$withval" = yes; then
  10201. AC_MSG_RESULT([yes])
  10202. AC_DEFINE([WITH_DMALLOC], [1],
  10203. [Define if using the dmalloc debugging malloc package])
  10204. LIBS="$LIBS -ldmalloc"
  10205. LDFLAGS="$LDFLAGS -g"
  10206. else
  10207. AC_MSG_RESULT([no])
  10208. fi], [AC_MSG_RESULT([no])])
  10209. ])
  10210. # Do all the work for Automake. -*- Autoconf -*-
  10211. # Copyright (C) 1996-2017 Free Software Foundation, Inc.
  10212. #
  10213. # This file is free software; the Free Software Foundation
  10214. # gives unlimited permission to copy and/or distribute it,
  10215. # with or without modifications, as long as this notice is preserved.
  10216. # This macro actually does too much. Some checks are only needed if
  10217. # your package does certain things. But this isn't really a big deal.
  10218. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
  10219. m4_define([AC_PROG_CC],
  10220. m4_defn([AC_PROG_CC])
  10221. [_AM_PROG_CC_C_O
  10222. ])
  10223. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
  10224. # AM_INIT_AUTOMAKE([OPTIONS])
  10225. # -----------------------------------------------
  10226. # The call with PACKAGE and VERSION arguments is the old style
  10227. # call (pre autoconf-2.50), which is being phased out. PACKAGE
  10228. # and VERSION should now be passed to AC_INIT and removed from
  10229. # the call to AM_INIT_AUTOMAKE.
  10230. # We support both call styles for the transition. After
  10231. # the next Automake release, Autoconf can make the AC_INIT
  10232. # arguments mandatory, and then we can depend on a new Autoconf
  10233. # release and drop the old call support.
  10234. AC_DEFUN([AM_INIT_AUTOMAKE],
  10235. [AC_PREREQ([2.65])dnl
  10236. dnl Autoconf wants to disallow AM_ names. We explicitly allow
  10237. dnl the ones we care about.
  10238. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
  10239. AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
  10240. AC_REQUIRE([AC_PROG_INSTALL])dnl
  10241. if test "`cd $srcdir && pwd`" != "`pwd`"; then
  10242. # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
  10243. # is not polluted with repeated "-I."
  10244. AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
  10245. # test to see if srcdir already configured
  10246. if test -f $srcdir/config.status; then
  10247. AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  10248. fi
  10249. fi
  10250. # test whether we have cygpath
  10251. if test -z "$CYGPATH_W"; then
  10252. if (cygpath --version) >/dev/null 2>/dev/null; then
  10253. CYGPATH_W='cygpath -w'
  10254. else
  10255. CYGPATH_W=echo
  10256. fi
  10257. fi
  10258. AC_SUBST([CYGPATH_W])
  10259. # Define the identity of the package.
  10260. dnl Distinguish between old-style and new-style calls.
  10261. m4_ifval([$2],
  10262. [AC_DIAGNOSE([obsolete],
  10263. [$0: two- and three-arguments forms are deprecated.])
  10264. m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  10265. AC_SUBST([PACKAGE], [$1])dnl
  10266. AC_SUBST([VERSION], [$2])],
  10267. [_AM_SET_OPTIONS([$1])dnl
  10268. dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
  10269. m4_if(
  10270. m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
  10271. [ok:ok],,
  10272. [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
  10273. AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  10274. AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
  10275. _AM_IF_OPTION([no-define],,
  10276. [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
  10277. AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
  10278. # Some tools Automake needs.
  10279. AC_REQUIRE([AM_SANITY_CHECK])dnl
  10280. AC_REQUIRE([AC_ARG_PROGRAM])dnl
  10281. AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
  10282. AM_MISSING_PROG([AUTOCONF], [autoconf])
  10283. AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
  10284. AM_MISSING_PROG([AUTOHEADER], [autoheader])
  10285. AM_MISSING_PROG([MAKEINFO], [makeinfo])
  10286. AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  10287. AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
  10288. AC_REQUIRE([AC_PROG_MKDIR_P])dnl
  10289. # For better backward compatibility. To be removed once Automake 1.9.x
  10290. # dies out for good. For more background, see:
  10291. # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
  10292. # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
  10293. AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
  10294. # We need awk for the "check" target (and possibly the TAP driver). The
  10295. # system "awk" is bad on some platforms.
  10296. AC_REQUIRE([AC_PROG_AWK])dnl
  10297. AC_REQUIRE([AC_PROG_MAKE_SET])dnl
  10298. AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  10299. _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
  10300. [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
  10301. [_AM_PROG_TAR([v7])])])
  10302. _AM_IF_OPTION([no-dependencies],,
  10303. [AC_PROVIDE_IFELSE([AC_PROG_CC],
  10304. [_AM_DEPENDENCIES([CC])],
  10305. [m4_define([AC_PROG_CC],
  10306. m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
  10307. AC_PROVIDE_IFELSE([AC_PROG_CXX],
  10308. [_AM_DEPENDENCIES([CXX])],
  10309. [m4_define([AC_PROG_CXX],
  10310. m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
  10311. AC_PROVIDE_IFELSE([AC_PROG_OBJC],
  10312. [_AM_DEPENDENCIES([OBJC])],
  10313. [m4_define([AC_PROG_OBJC],
  10314. m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
  10315. AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
  10316. [_AM_DEPENDENCIES([OBJCXX])],
  10317. [m4_define([AC_PROG_OBJCXX],
  10318. m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
  10319. ])
  10320. AC_REQUIRE([AM_SILENT_RULES])dnl
  10321. dnl The testsuite driver may need to know about EXEEXT, so add the
  10322. dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
  10323. dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
  10324. AC_CONFIG_COMMANDS_PRE(dnl
  10325. [m4_provide_if([_AM_COMPILER_EXEEXT],
  10326. [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
  10327. # POSIX will say in a future version that running "rm -f" with no argument
  10328. # is OK; and we want to be able to make that assumption in our Makefile
  10329. # recipes. So use an aggressive probe to check that the usage we want is
  10330. # actually supported "in the wild" to an acceptable degree.
  10331. # See automake bug#10828.
  10332. # To make any issue more visible, cause the running configure to be aborted
  10333. # by default if the 'rm' program in use doesn't match our expectations; the
  10334. # user can still override this though.
  10335. if rm -f && rm -fr && rm -rf; then : OK; else
  10336. cat >&2 <<'END'
  10337. Oops!
  10338. Your 'rm' program seems unable to run without file operands specified
  10339. on the command line, even when the '-f' option is present. This is contrary
  10340. to the behaviour of most rm programs out there, and not conforming with
  10341. the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
  10342. Please tell bug-automake@gnu.org about your system, including the value
  10343. of your $PATH and any error possibly output before this message. This
  10344. can help us improve future automake versions.
  10345. END
  10346. if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
  10347. echo 'Configuration will proceed anyway, since you have set the' >&2
  10348. echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
  10349. echo >&2
  10350. else
  10351. cat >&2 <<'END'
  10352. Aborting the configuration process, to ensure you take notice of the issue.
  10353. You can download and install GNU coreutils to get an 'rm' implementation
  10354. that behaves properly: <http://www.gnu.org/software/coreutils/>.
  10355. If you want to complete the configuration process using your problematic
  10356. 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
  10357. to "yes", and re-run configure.
  10358. END
  10359. AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
  10360. fi
  10361. fi
  10362. dnl The trailing newline in this macro's definition is deliberate, for
  10363. dnl backward compatibility and to allow trailing 'dnl'-style comments
  10364. dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
  10365. ])
  10366. dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
  10367. dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
  10368. dnl mangled by Autoconf and run in a shell conditional statement.
  10369. m4_define([_AC_COMPILER_EXEEXT],
  10370. m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
  10371. # When config.status generates a header, we must update the stamp-h file.
  10372. # This file resides in the same directory as the config header
  10373. # that is generated. The stamp files are numbered to have different names.
  10374. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
  10375. # loop where config.status creates the headers, so we can generate
  10376. # our stamp files there.
  10377. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
  10378. [# Compute $1's index in $config_headers.
  10379. _am_arg=$1
  10380. _am_stamp_count=1
  10381. for _am_header in $config_headers :; do
  10382. case $_am_header in
  10383. $_am_arg | $_am_arg:* )
  10384. break ;;
  10385. * )
  10386. _am_stamp_count=`expr $_am_stamp_count + 1` ;;
  10387. esac
  10388. done
  10389. echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
  10390. # Copyright (C) 2001-2017 Free Software Foundation, Inc.
  10391. #
  10392. # This file is free software; the Free Software Foundation
  10393. # gives unlimited permission to copy and/or distribute it,
  10394. # with or without modifications, as long as this notice is preserved.
  10395. # AM_PROG_INSTALL_SH
  10396. # ------------------
  10397. # Define $install_sh.
  10398. AC_DEFUN([AM_PROG_INSTALL_SH],
  10399. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  10400. if test x"${install_sh+set}" != xset; then
  10401. case $am_aux_dir in
  10402. *\ * | *\ *)
  10403. install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
  10404. *)
  10405. install_sh="\${SHELL} $am_aux_dir/install-sh"
  10406. esac
  10407. fi
  10408. AC_SUBST([install_sh])])
  10409. # Copyright (C) 2003-2017 Free Software Foundation, Inc.
  10410. #
  10411. # This file is free software; the Free Software Foundation
  10412. # gives unlimited permission to copy and/or distribute it,
  10413. # with or without modifications, as long as this notice is preserved.
  10414. # Check whether the underlying file-system supports filenames
  10415. # with a leading dot. For instance MS-DOS doesn't.
  10416. AC_DEFUN([AM_SET_LEADING_DOT],
  10417. [rm -rf .tst 2>/dev/null
  10418. mkdir .tst 2>/dev/null
  10419. if test -d .tst; then
  10420. am__leading_dot=.
  10421. else
  10422. am__leading_dot=_
  10423. fi
  10424. rmdir .tst 2>/dev/null
  10425. AC_SUBST([am__leading_dot])])
  10426. # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
  10427. # From Jim Meyering
  10428. # Copyright (C) 1996-2017 Free Software Foundation, Inc.
  10429. #
  10430. # This file is free software; the Free Software Foundation
  10431. # gives unlimited permission to copy and/or distribute it,
  10432. # with or without modifications, as long as this notice is preserved.
  10433. # AM_MAINTAINER_MODE([DEFAULT-MODE])
  10434. # ----------------------------------
  10435. # Control maintainer-specific portions of Makefiles.
  10436. # Default is to disable them, unless 'enable' is passed literally.
  10437. # For symmetry, 'disable' may be passed as well. Anyway, the user
  10438. # can override the default with the --enable/--disable switch.
  10439. AC_DEFUN([AM_MAINTAINER_MODE],
  10440. [m4_case(m4_default([$1], [disable]),
  10441. [enable], [m4_define([am_maintainer_other], [disable])],
  10442. [disable], [m4_define([am_maintainer_other], [enable])],
  10443. [m4_define([am_maintainer_other], [enable])
  10444. m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
  10445. AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
  10446. dnl maintainer-mode's default is 'disable' unless 'enable' is passed
  10447. AC_ARG_ENABLE([maintainer-mode],
  10448. [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
  10449. am_maintainer_other[ make rules and dependencies not useful
  10450. (and sometimes confusing) to the casual installer])],
  10451. [USE_MAINTAINER_MODE=$enableval],
  10452. [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
  10453. AC_MSG_RESULT([$USE_MAINTAINER_MODE])
  10454. AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
  10455. MAINT=$MAINTAINER_MODE_TRUE
  10456. AC_SUBST([MAINT])dnl
  10457. ]
  10458. )
  10459. # Check to see how 'make' treats includes. -*- Autoconf -*-
  10460. # Copyright (C) 2001-2017 Free Software Foundation, Inc.
  10461. #
  10462. # This file is free software; the Free Software Foundation
  10463. # gives unlimited permission to copy and/or distribute it,
  10464. # with or without modifications, as long as this notice is preserved.
  10465. # AM_MAKE_INCLUDE()
  10466. # -----------------
  10467. # Check to see how make treats includes.
  10468. AC_DEFUN([AM_MAKE_INCLUDE],
  10469. [am_make=${MAKE-make}
  10470. cat > confinc << 'END'
  10471. am__doit:
  10472. @echo this is the am__doit target
  10473. .PHONY: am__doit
  10474. END
  10475. # If we don't find an include directive, just comment out the code.
  10476. AC_MSG_CHECKING([for style of include used by $am_make])
  10477. am__include="#"
  10478. am__quote=
  10479. _am_result=none
  10480. # First try GNU make style include.
  10481. echo "include confinc" > confmf
  10482. # Ignore all kinds of additional output from 'make'.
  10483. case `$am_make -s -f confmf 2> /dev/null` in #(
  10484. *the\ am__doit\ target*)
  10485. am__include=include
  10486. am__quote=
  10487. _am_result=GNU
  10488. ;;
  10489. esac
  10490. # Now try BSD make style include.
  10491. if test "$am__include" = "#"; then
  10492. echo '.include "confinc"' > confmf
  10493. case `$am_make -s -f confmf 2> /dev/null` in #(
  10494. *the\ am__doit\ target*)
  10495. am__include=.include
  10496. am__quote="\""
  10497. _am_result=BSD
  10498. ;;
  10499. esac
  10500. fi
  10501. AC_SUBST([am__include])
  10502. AC_SUBST([am__quote])
  10503. AC_MSG_RESULT([$_am_result])
  10504. rm -f confinc confmf
  10505. ])
  10506. # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
  10507. # Copyright (C) 1997-2017 Free Software Foundation, Inc.
  10508. #
  10509. # This file is free software; the Free Software Foundation
  10510. # gives unlimited permission to copy and/or distribute it,
  10511. # with or without modifications, as long as this notice is preserved.
  10512. # AM_MISSING_PROG(NAME, PROGRAM)
  10513. # ------------------------------
  10514. AC_DEFUN([AM_MISSING_PROG],
  10515. [AC_REQUIRE([AM_MISSING_HAS_RUN])
  10516. $1=${$1-"${am_missing_run}$2"}
  10517. AC_SUBST($1)])
  10518. # AM_MISSING_HAS_RUN
  10519. # ------------------
  10520. # Define MISSING if not defined so far and test if it is modern enough.
  10521. # If it is, set am_missing_run to use it, otherwise, to nothing.
  10522. AC_DEFUN([AM_MISSING_HAS_RUN],
  10523. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  10524. AC_REQUIRE_AUX_FILE([missing])dnl
  10525. if test x"${MISSING+set}" != xset; then
  10526. case $am_aux_dir in
  10527. *\ * | *\ *)
  10528. MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
  10529. *)
  10530. MISSING="\${SHELL} $am_aux_dir/missing" ;;
  10531. esac
  10532. fi
  10533. # Use eval to expand $SHELL
  10534. if eval "$MISSING --is-lightweight"; then
  10535. am_missing_run="$MISSING "
  10536. else
  10537. am_missing_run=
  10538. AC_MSG_WARN(['missing' script is too old or missing])
  10539. fi
  10540. ])
  10541. # Helper functions for option handling. -*- Autoconf -*-
  10542. # Copyright (C) 2001-2017 Free Software Foundation, Inc.
  10543. #
  10544. # This file is free software; the Free Software Foundation
  10545. # gives unlimited permission to copy and/or distribute it,
  10546. # with or without modifications, as long as this notice is preserved.
  10547. # _AM_MANGLE_OPTION(NAME)
  10548. # -----------------------
  10549. AC_DEFUN([_AM_MANGLE_OPTION],
  10550. [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
  10551. # _AM_SET_OPTION(NAME)
  10552. # --------------------
  10553. # Set option NAME. Presently that only means defining a flag for this option.
  10554. AC_DEFUN([_AM_SET_OPTION],
  10555. [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
  10556. # _AM_SET_OPTIONS(OPTIONS)
  10557. # ------------------------
  10558. # OPTIONS is a space-separated list of Automake options.
  10559. AC_DEFUN([_AM_SET_OPTIONS],
  10560. [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
  10561. # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
  10562. # -------------------------------------------
  10563. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  10564. AC_DEFUN([_AM_IF_OPTION],
  10565. [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
  10566. # Copyright (C) 1999-2017 Free Software Foundation, Inc.
  10567. #
  10568. # This file is free software; the Free Software Foundation
  10569. # gives unlimited permission to copy and/or distribute it,
  10570. # with or without modifications, as long as this notice is preserved.
  10571. # _AM_PROG_CC_C_O
  10572. # ---------------
  10573. # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
  10574. # to automatically call this.
  10575. AC_DEFUN([_AM_PROG_CC_C_O],
  10576. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  10577. AC_REQUIRE_AUX_FILE([compile])dnl
  10578. AC_LANG_PUSH([C])dnl
  10579. AC_CACHE_CHECK(
  10580. [whether $CC understands -c and -o together],
  10581. [am_cv_prog_cc_c_o],
  10582. [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
  10583. # Make sure it works both with $CC and with simple cc.
  10584. # Following AC_PROG_CC_C_O, we do the test twice because some
  10585. # compilers refuse to overwrite an existing .o file with -o,
  10586. # though they will create one.
  10587. am_cv_prog_cc_c_o=yes
  10588. for am_i in 1 2; do
  10589. if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
  10590. && test -f conftest2.$ac_objext; then
  10591. : OK
  10592. else
  10593. am_cv_prog_cc_c_o=no
  10594. break
  10595. fi
  10596. done
  10597. rm -f core conftest*
  10598. unset am_i])
  10599. if test "$am_cv_prog_cc_c_o" != yes; then
  10600. # Losing compiler, so override with the script.
  10601. # FIXME: It is wrong to rewrite CC.
  10602. # But if we don't then we get into trouble of one sort or another.
  10603. # A longer-term fix would be to have automake use am__CC in this case,
  10604. # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
  10605. CC="$am_aux_dir/compile $CC"
  10606. fi
  10607. AC_LANG_POP([C])])
  10608. # For backward compatibility.
  10609. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
  10610. # Copyright (C) 2001-2017 Free Software Foundation, Inc.
  10611. #
  10612. # This file is free software; the Free Software Foundation
  10613. # gives unlimited permission to copy and/or distribute it,
  10614. # with or without modifications, as long as this notice is preserved.
  10615. # AM_RUN_LOG(COMMAND)
  10616. # -------------------
  10617. # Run COMMAND, save the exit status in ac_status, and log it.
  10618. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
  10619. AC_DEFUN([AM_RUN_LOG],
  10620. [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
  10621. ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
  10622. ac_status=$?
  10623. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  10624. (exit $ac_status); }])
  10625. # Check to make sure that the build environment is sane. -*- Autoconf -*-
  10626. # Copyright (C) 1996-2017 Free Software Foundation, Inc.
  10627. #
  10628. # This file is free software; the Free Software Foundation
  10629. # gives unlimited permission to copy and/or distribute it,
  10630. # with or without modifications, as long as this notice is preserved.
  10631. # AM_SANITY_CHECK
  10632. # ---------------
  10633. AC_DEFUN([AM_SANITY_CHECK],
  10634. [AC_MSG_CHECKING([whether build environment is sane])
  10635. # Reject unsafe characters in $srcdir or the absolute working directory
  10636. # name. Accept space and tab only in the latter.
  10637. am_lf='
  10638. '
  10639. case `pwd` in
  10640. *[[\\\"\#\$\&\'\`$am_lf]]*)
  10641. AC_MSG_ERROR([unsafe absolute working directory name]);;
  10642. esac
  10643. case $srcdir in
  10644. *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
  10645. AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
  10646. esac
  10647. # Do 'set' in a subshell so we don't clobber the current shell's
  10648. # arguments. Must try -L first in case configure is actually a
  10649. # symlink; some systems play weird games with the mod time of symlinks
  10650. # (eg FreeBSD returns the mod time of the symlink's containing
  10651. # directory).
  10652. if (
  10653. am_has_slept=no
  10654. for am_try in 1 2; do
  10655. echo "timestamp, slept: $am_has_slept" > conftest.file
  10656. set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
  10657. if test "$[*]" = "X"; then
  10658. # -L didn't work.
  10659. set X `ls -t "$srcdir/configure" conftest.file`
  10660. fi
  10661. if test "$[*]" != "X $srcdir/configure conftest.file" \
  10662. && test "$[*]" != "X conftest.file $srcdir/configure"; then
  10663. # If neither matched, then we have a broken ls. This can happen
  10664. # if, for instance, CONFIG_SHELL is bash and it inherits a
  10665. # broken ls alias from the environment. This has actually
  10666. # happened. Such a system could not be considered "sane".
  10667. AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
  10668. alias in your environment])
  10669. fi
  10670. if test "$[2]" = conftest.file || test $am_try -eq 2; then
  10671. break
  10672. fi
  10673. # Just in case.
  10674. sleep 1
  10675. am_has_slept=yes
  10676. done
  10677. test "$[2]" = conftest.file
  10678. )
  10679. then
  10680. # Ok.
  10681. :
  10682. else
  10683. AC_MSG_ERROR([newly created file is older than distributed files!
  10684. Check your system clock])
  10685. fi
  10686. AC_MSG_RESULT([yes])
  10687. # If we didn't sleep, we still need to ensure time stamps of config.status and
  10688. # generated files are strictly newer.
  10689. am_sleep_pid=
  10690. if grep 'slept: no' conftest.file >/dev/null 2>&1; then
  10691. ( sleep 1 ) &
  10692. am_sleep_pid=$!
  10693. fi
  10694. AC_CONFIG_COMMANDS_PRE(
  10695. [AC_MSG_CHECKING([that generated files are newer than configure])
  10696. if test -n "$am_sleep_pid"; then
  10697. # Hide warnings about reused PIDs.
  10698. wait $am_sleep_pid 2>/dev/null
  10699. fi
  10700. AC_MSG_RESULT([done])])
  10701. rm -f conftest.file
  10702. ])
  10703. # Copyright (C) 2009-2017 Free Software Foundation, Inc.
  10704. #
  10705. # This file is free software; the Free Software Foundation
  10706. # gives unlimited permission to copy and/or distribute it,
  10707. # with or without modifications, as long as this notice is preserved.
  10708. # AM_SILENT_RULES([DEFAULT])
  10709. # --------------------------
  10710. # Enable less verbose build rules; with the default set to DEFAULT
  10711. # ("yes" being less verbose, "no" or empty being verbose).
  10712. AC_DEFUN([AM_SILENT_RULES],
  10713. [AC_ARG_ENABLE([silent-rules], [dnl
  10714. AS_HELP_STRING(
  10715. [--enable-silent-rules],
  10716. [less verbose build output (undo: "make V=1")])
  10717. AS_HELP_STRING(
  10718. [--disable-silent-rules],
  10719. [verbose build output (undo: "make V=0")])dnl
  10720. ])
  10721. case $enable_silent_rules in @%:@ (((
  10722. yes) AM_DEFAULT_VERBOSITY=0;;
  10723. no) AM_DEFAULT_VERBOSITY=1;;
  10724. *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
  10725. esac
  10726. dnl
  10727. dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
  10728. dnl do not support nested variable expansions.
  10729. dnl See automake bug#9928 and bug#10237.
  10730. am_make=${MAKE-make}
  10731. AC_CACHE_CHECK([whether $am_make supports nested variables],
  10732. [am_cv_make_support_nested_variables],
  10733. [if AS_ECHO([['TRUE=$(BAR$(V))
  10734. BAR0=false
  10735. BAR1=true
  10736. V=1
  10737. am__doit:
  10738. @$(TRUE)
  10739. .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
  10740. am_cv_make_support_nested_variables=yes
  10741. else
  10742. am_cv_make_support_nested_variables=no
  10743. fi])
  10744. if test $am_cv_make_support_nested_variables = yes; then
  10745. dnl Using '$V' instead of '$(V)' breaks IRIX make.
  10746. AM_V='$(V)'
  10747. AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
  10748. else
  10749. AM_V=$AM_DEFAULT_VERBOSITY
  10750. AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
  10751. fi
  10752. AC_SUBST([AM_V])dnl
  10753. AM_SUBST_NOTMAKE([AM_V])dnl
  10754. AC_SUBST([AM_DEFAULT_V])dnl
  10755. AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
  10756. AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
  10757. AM_BACKSLASH='\'
  10758. AC_SUBST([AM_BACKSLASH])dnl
  10759. _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
  10760. ])
  10761. # Copyright (C) 2001-2017 Free Software Foundation, Inc.
  10762. #
  10763. # This file is free software; the Free Software Foundation
  10764. # gives unlimited permission to copy and/or distribute it,
  10765. # with or without modifications, as long as this notice is preserved.
  10766. # AM_PROG_INSTALL_STRIP
  10767. # ---------------------
  10768. # One issue with vendor 'install' (even GNU) is that you can't
  10769. # specify the program used to strip binaries. This is especially
  10770. # annoying in cross-compiling environments, where the build's strip
  10771. # is unlikely to handle the host's binaries.
  10772. # Fortunately install-sh will honor a STRIPPROG variable, so we
  10773. # always use install-sh in "make install-strip", and initialize
  10774. # STRIPPROG with the value of the STRIP variable (set by the user).
  10775. AC_DEFUN([AM_PROG_INSTALL_STRIP],
  10776. [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  10777. # Installed binaries are usually stripped using 'strip' when the user
  10778. # run "make install-strip". However 'strip' might not be the right
  10779. # tool to use in cross-compilation environments, therefore Automake
  10780. # will honor the 'STRIP' environment variable to overrule this program.
  10781. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
  10782. if test "$cross_compiling" != no; then
  10783. AC_CHECK_TOOL([STRIP], [strip], :)
  10784. fi
  10785. INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
  10786. AC_SUBST([INSTALL_STRIP_PROGRAM])])
  10787. # Copyright (C) 2006-2017 Free Software Foundation, Inc.
  10788. #
  10789. # This file is free software; the Free Software Foundation
  10790. # gives unlimited permission to copy and/or distribute it,
  10791. # with or without modifications, as long as this notice is preserved.
  10792. # _AM_SUBST_NOTMAKE(VARIABLE)
  10793. # ---------------------------
  10794. # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
  10795. # This macro is traced by Automake.
  10796. AC_DEFUN([_AM_SUBST_NOTMAKE])
  10797. # AM_SUBST_NOTMAKE(VARIABLE)
  10798. # --------------------------
  10799. # Public sister of _AM_SUBST_NOTMAKE.
  10800. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
  10801. # Check how to create a tarball. -*- Autoconf -*-
  10802. # Copyright (C) 2004-2017 Free Software Foundation, Inc.
  10803. #
  10804. # This file is free software; the Free Software Foundation
  10805. # gives unlimited permission to copy and/or distribute it,
  10806. # with or without modifications, as long as this notice is preserved.
  10807. # _AM_PROG_TAR(FORMAT)
  10808. # --------------------
  10809. # Check how to create a tarball in format FORMAT.
  10810. # FORMAT should be one of 'v7', 'ustar', or 'pax'.
  10811. #
  10812. # Substitute a variable $(am__tar) that is a command
  10813. # writing to stdout a FORMAT-tarball containing the directory
  10814. # $tardir.
  10815. # tardir=directory && $(am__tar) > result.tar
  10816. #
  10817. # Substitute a variable $(am__untar) that extract such
  10818. # a tarball read from stdin.
  10819. # $(am__untar) < result.tar
  10820. #
  10821. AC_DEFUN([_AM_PROG_TAR],
  10822. [# Always define AMTAR for backward compatibility. Yes, it's still used
  10823. # in the wild :-( We should find a proper way to deprecate it ...
  10824. AC_SUBST([AMTAR], ['$${TAR-tar}'])
  10825. # We'll loop over all known methods to create a tar archive until one works.
  10826. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
  10827. m4_if([$1], [v7],
  10828. [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
  10829. [m4_case([$1],
  10830. [ustar],
  10831. [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
  10832. # There is notably a 21 bits limit for the UID and the GID. In fact,
  10833. # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
  10834. # and bug#13588).
  10835. am_max_uid=2097151 # 2^21 - 1
  10836. am_max_gid=$am_max_uid
  10837. # The $UID and $GID variables are not portable, so we need to resort
  10838. # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
  10839. # below are definitely unexpected, so allow the users to see them
  10840. # (that is, avoid stderr redirection).
  10841. am_uid=`id -u || echo unknown`
  10842. am_gid=`id -g || echo unknown`
  10843. AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
  10844. if test $am_uid -le $am_max_uid; then
  10845. AC_MSG_RESULT([yes])
  10846. else
  10847. AC_MSG_RESULT([no])
  10848. _am_tools=none
  10849. fi
  10850. AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
  10851. if test $am_gid -le $am_max_gid; then
  10852. AC_MSG_RESULT([yes])
  10853. else
  10854. AC_MSG_RESULT([no])
  10855. _am_tools=none
  10856. fi],
  10857. [pax],
  10858. [],
  10859. [m4_fatal([Unknown tar format])])
  10860. AC_MSG_CHECKING([how to create a $1 tar archive])
  10861. # Go ahead even if we have the value already cached. We do so because we
  10862. # need to set the values for the 'am__tar' and 'am__untar' variables.
  10863. _am_tools=${am_cv_prog_tar_$1-$_am_tools}
  10864. for _am_tool in $_am_tools; do
  10865. case $_am_tool in
  10866. gnutar)
  10867. for _am_tar in tar gnutar gtar; do
  10868. AM_RUN_LOG([$_am_tar --version]) && break
  10869. done
  10870. am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
  10871. am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
  10872. am__untar="$_am_tar -xf -"
  10873. ;;
  10874. plaintar)
  10875. # Must skip GNU tar: if it does not support --format= it doesn't create
  10876. # ustar tarball either.
  10877. (tar --version) >/dev/null 2>&1 && continue
  10878. am__tar='tar chf - "$$tardir"'
  10879. am__tar_='tar chf - "$tardir"'
  10880. am__untar='tar xf -'
  10881. ;;
  10882. pax)
  10883. am__tar='pax -L -x $1 -w "$$tardir"'
  10884. am__tar_='pax -L -x $1 -w "$tardir"'
  10885. am__untar='pax -r'
  10886. ;;
  10887. cpio)
  10888. am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
  10889. am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
  10890. am__untar='cpio -i -H $1 -d'
  10891. ;;
  10892. none)
  10893. am__tar=false
  10894. am__tar_=false
  10895. am__untar=false
  10896. ;;
  10897. esac
  10898. # If the value was cached, stop now. We just wanted to have am__tar
  10899. # and am__untar set.
  10900. test -n "${am_cv_prog_tar_$1}" && break
  10901. # tar/untar a dummy directory, and stop if the command works.
  10902. rm -rf conftest.dir
  10903. mkdir conftest.dir
  10904. echo GrepMe > conftest.dir/file
  10905. AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
  10906. rm -rf conftest.dir
  10907. if test -s conftest.tar; then
  10908. AM_RUN_LOG([$am__untar <conftest.tar])
  10909. AM_RUN_LOG([cat conftest.dir/file])
  10910. grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
  10911. fi
  10912. done
  10913. rm -rf conftest.dir
  10914. AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
  10915. AC_MSG_RESULT([$am_cv_prog_tar_$1])])
  10916. AC_SUBST([am__tar])
  10917. AC_SUBST([am__untar])
  10918. ]) # _AM_PROG_TAR
  10919. m4_include([acinclude.m4])