aclocal.m4 318 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068
  1. # generated automatically by aclocal 1.9.6 -*- Autoconf -*-
  2. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
  3. # 2005 Free Software Foundation, Inc.
  4. # This file is free software; the Free Software Foundation
  5. # gives unlimited permission to copy and/or distribute it,
  6. # with or without modifications, as long as this notice is preserved.
  7. # This program is distributed in the hope that it will be useful,
  8. # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  9. # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  10. # PARTICULAR PURPOSE.
  11. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
  12. # serial 52 AC_PROG_LIBTOOL
  13. # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
  14. # -----------------------------------------------------------
  15. # If this macro is not defined by Autoconf, define it here.
  16. m4_ifdef([AC_PROVIDE_IFELSE],
  17. [],
  18. [m4_define([AC_PROVIDE_IFELSE],
  19. [m4_ifdef([AC_PROVIDE_$1],
  20. [$2], [$3])])])
  21. # AC_PROG_LIBTOOL
  22. # ---------------
  23. AC_DEFUN([AC_PROG_LIBTOOL],
  24. [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
  25. dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
  26. dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
  27. AC_PROVIDE_IFELSE([AC_PROG_CXX],
  28. [AC_LIBTOOL_CXX],
  29. [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
  30. ])])
  31. dnl And a similar setup for Fortran 77 support
  32. AC_PROVIDE_IFELSE([AC_PROG_F77],
  33. [AC_LIBTOOL_F77],
  34. [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
  35. ])])
  36. dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
  37. dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
  38. dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
  39. AC_PROVIDE_IFELSE([AC_PROG_GCJ],
  40. [AC_LIBTOOL_GCJ],
  41. [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
  42. [AC_LIBTOOL_GCJ],
  43. [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
  44. [AC_LIBTOOL_GCJ],
  45. [ifdef([AC_PROG_GCJ],
  46. [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
  47. ifdef([A][M_PROG_GCJ],
  48. [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
  49. ifdef([LT_AC_PROG_GCJ],
  50. [define([LT_AC_PROG_GCJ],
  51. defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
  52. ])])# AC_PROG_LIBTOOL
  53. # _AC_PROG_LIBTOOL
  54. # ----------------
  55. AC_DEFUN([_AC_PROG_LIBTOOL],
  56. [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
  57. AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
  58. AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
  59. AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
  60. # This can be used to rebuild libtool when needed
  61. LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
  62. # Always use our own libtool.
  63. LIBTOOL='$(SHELL) $(top_builddir)/libtool'
  64. AC_SUBST(LIBTOOL)dnl
  65. # Prevent multiple expansion
  66. define([AC_PROG_LIBTOOL], [])
  67. ])# _AC_PROG_LIBTOOL
  68. # AC_LIBTOOL_SETUP
  69. # ----------------
  70. AC_DEFUN([AC_LIBTOOL_SETUP],
  71. [AC_PREREQ(2.50)dnl
  72. AC_REQUIRE([AC_ENABLE_SHARED])dnl
  73. AC_REQUIRE([AC_ENABLE_STATIC])dnl
  74. AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
  75. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  76. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  77. AC_REQUIRE([AC_PROG_CC])dnl
  78. AC_REQUIRE([AC_PROG_LD])dnl
  79. AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
  80. AC_REQUIRE([AC_PROG_NM])dnl
  81. AC_REQUIRE([AC_PROG_LN_S])dnl
  82. AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
  83. # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
  84. AC_REQUIRE([AC_OBJEXT])dnl
  85. AC_REQUIRE([AC_EXEEXT])dnl
  86. dnl
  87. AC_LIBTOOL_SYS_MAX_CMD_LEN
  88. AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
  89. AC_LIBTOOL_OBJDIR
  90. AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
  91. _LT_AC_PROG_ECHO_BACKSLASH
  92. case $host_os in
  93. aix3*)
  94. # AIX sometimes has problems with the GCC collect2 program. For some
  95. # reason, if we set the COLLECT_NAMES environment variable, the problems
  96. # vanish in a puff of smoke.
  97. if test "X${COLLECT_NAMES+set}" != Xset; then
  98. COLLECT_NAMES=
  99. export COLLECT_NAMES
  100. fi
  101. ;;
  102. esac
  103. # Sed substitution that helps us do robust quoting. It backslashifies
  104. # metacharacters that are still active within double-quoted strings.
  105. Xsed='sed -e 1s/^X//'
  106. [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
  107. # Same as above, but do not quote variable references.
  108. [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
  109. # Sed substitution to delay expansion of an escaped shell variable in a
  110. # double_quote_subst'ed string.
  111. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
  112. # Sed substitution to avoid accidental globbing in evaled expressions
  113. no_glob_subst='s/\*/\\\*/g'
  114. # Constants:
  115. rm="rm -f"
  116. # Global variables:
  117. default_ofile=libtool
  118. can_build_shared=yes
  119. # All known linkers require a `.a' archive for static linking (except MSVC,
  120. # which needs '.lib').
  121. libext=a
  122. ltmain="$ac_aux_dir/ltmain.sh"
  123. ofile="$default_ofile"
  124. with_gnu_ld="$lt_cv_prog_gnu_ld"
  125. AC_CHECK_TOOL(AR, ar, false)
  126. AC_CHECK_TOOL(RANLIB, ranlib, :)
  127. AC_CHECK_TOOL(STRIP, strip, :)
  128. old_CC="$CC"
  129. old_CFLAGS="$CFLAGS"
  130. # Set sane defaults for various variables
  131. test -z "$AR" && AR=ar
  132. test -z "$AR_FLAGS" && AR_FLAGS=cru
  133. test -z "$AS" && AS=as
  134. test -z "$CC" && CC=cc
  135. test -z "$LTCC" && LTCC=$CC
  136. test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
  137. test -z "$DLLTOOL" && DLLTOOL=dlltool
  138. test -z "$LD" && LD=ld
  139. test -z "$LN_S" && LN_S="ln -s"
  140. test -z "$MAGIC_CMD" && MAGIC_CMD=file
  141. test -z "$NM" && NM=nm
  142. test -z "$SED" && SED=sed
  143. test -z "$OBJDUMP" && OBJDUMP=objdump
  144. test -z "$RANLIB" && RANLIB=:
  145. test -z "$STRIP" && STRIP=:
  146. test -z "$ac_objext" && ac_objext=o
  147. # Determine commands to create old-style static archives.
  148. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
  149. old_postinstall_cmds='chmod 644 $oldlib'
  150. old_postuninstall_cmds=
  151. if test -n "$RANLIB"; then
  152. case $host_os in
  153. openbsd*)
  154. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
  155. ;;
  156. *)
  157. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
  158. ;;
  159. esac
  160. old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
  161. fi
  162. _LT_CC_BASENAME([$compiler])
  163. # Only perform the check for file, if the check method requires it
  164. case $deplibs_check_method in
  165. file_magic*)
  166. if test "$file_magic_cmd" = '$MAGIC_CMD'; then
  167. AC_PATH_MAGIC
  168. fi
  169. ;;
  170. esac
  171. _LT_REQUIRED_DARWIN_CHECKS
  172. AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
  173. AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
  174. enable_win32_dll=yes, enable_win32_dll=no)
  175. AC_ARG_ENABLE([libtool-lock],
  176. [AC_HELP_STRING([--disable-libtool-lock],
  177. [avoid locking (might break parallel builds)])])
  178. test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  179. AC_ARG_WITH([pic],
  180. [AC_HELP_STRING([--with-pic],
  181. [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
  182. [pic_mode="$withval"],
  183. [pic_mode=default])
  184. test -z "$pic_mode" && pic_mode=default
  185. # Use C for the default configuration in the libtool script
  186. tagname=
  187. AC_LIBTOOL_LANG_C_CONFIG
  188. _LT_AC_TAGCONFIG
  189. ])# AC_LIBTOOL_SETUP
  190. # _LT_AC_SYS_COMPILER
  191. # -------------------
  192. AC_DEFUN([_LT_AC_SYS_COMPILER],
  193. [AC_REQUIRE([AC_PROG_CC])dnl
  194. # If no C compiler was specified, use CC.
  195. LTCC=${LTCC-"$CC"}
  196. # If no C compiler flags were specified, use CFLAGS.
  197. LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
  198. # Allow CC to be a program name with arguments.
  199. compiler=$CC
  200. ])# _LT_AC_SYS_COMPILER
  201. # _LT_CC_BASENAME(CC)
  202. # -------------------
  203. # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
  204. AC_DEFUN([_LT_CC_BASENAME],
  205. [for cc_temp in $1""; do
  206. case $cc_temp in
  207. compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
  208. distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
  209. \-*) ;;
  210. *) break;;
  211. esac
  212. done
  213. cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
  214. ])
  215. # _LT_COMPILER_BOILERPLATE
  216. # ------------------------
  217. # Check for compiler boilerplate output or warnings with
  218. # the simple compiler test code.
  219. AC_DEFUN([_LT_COMPILER_BOILERPLATE],
  220. [AC_REQUIRE([LT_AC_PROG_SED])dnl
  221. ac_outfile=conftest.$ac_objext
  222. echo "$lt_simple_compile_test_code" >conftest.$ac_ext
  223. eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  224. _lt_compiler_boilerplate=`cat conftest.err`
  225. $rm conftest*
  226. ])# _LT_COMPILER_BOILERPLATE
  227. # _LT_LINKER_BOILERPLATE
  228. # ----------------------
  229. # Check for linker boilerplate output or warnings with
  230. # the simple link test code.
  231. AC_DEFUN([_LT_LINKER_BOILERPLATE],
  232. [AC_REQUIRE([LT_AC_PROG_SED])dnl
  233. ac_outfile=conftest.$ac_objext
  234. echo "$lt_simple_link_test_code" >conftest.$ac_ext
  235. eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  236. _lt_linker_boilerplate=`cat conftest.err`
  237. $rm -r conftest*
  238. ])# _LT_LINKER_BOILERPLATE
  239. # _LT_REQUIRED_DARWIN_CHECKS
  240. # --------------------------
  241. # Check for some things on darwin
  242. AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[
  243. case $host_os in
  244. rhapsody* | darwin*)
  245. AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
  246. AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
  247. AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
  248. [lt_cv_apple_cc_single_mod=no
  249. if test -z "${LT_MULTI_MODULE}"; then
  250. # By default we will add the -single_module flag. You can override
  251. # by either setting the environment variable LT_MULTI_MODULE
  252. # non-empty at configure time, or by adding -multi_module to the
  253. # link flags.
  254. echo "int foo(void){return 1;}" > conftest.c
  255. $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  256. -dynamiclib ${wl}-single_module conftest.c
  257. if test -f libconftest.dylib; then
  258. lt_cv_apple_cc_single_mod=yes
  259. rm -rf libconftest.dylib*
  260. fi
  261. rm conftest.c
  262. fi])
  263. AC_CACHE_CHECK([for -exported_symbols_list linker flag],
  264. [lt_cv_ld_exported_symbols_list],
  265. [lt_cv_ld_exported_symbols_list=no
  266. save_LDFLAGS=$LDFLAGS
  267. echo "_main" > conftest.sym
  268. LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
  269. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  270. [lt_cv_ld_exported_symbols_list=yes],
  271. [lt_cv_ld_exported_symbols_list=no])
  272. LDFLAGS="$save_LDFLAGS"
  273. ])
  274. case $host_os in
  275. rhapsody* | darwin1.[[0123]])
  276. _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
  277. darwin1.*)
  278. _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
  279. darwin*)
  280. # if running on 10.5 or later, the deployment target defaults
  281. # to the OS version, if on x86, and 10.4, the deployment
  282. # target defaults to 10.4. Don't you love it?
  283. case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
  284. 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
  285. _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
  286. 10.[[012]]*)
  287. _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
  288. 10.*)
  289. _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
  290. esac
  291. ;;
  292. esac
  293. if test "$lt_cv_apple_cc_single_mod" = "yes"; then
  294. _lt_dar_single_mod='$single_module'
  295. fi
  296. if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
  297. _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
  298. else
  299. _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}"
  300. fi
  301. if test "$DSYMUTIL" != ":"; then
  302. _lt_dsymutil="~$DSYMUTIL \$lib || :"
  303. else
  304. _lt_dsymutil=
  305. fi
  306. ;;
  307. esac
  308. ])
  309. # _LT_AC_SYS_LIBPATH_AIX
  310. # ----------------------
  311. # Links a minimal program and checks the executable
  312. # for the system default hardcoded library path. In most cases,
  313. # this is /usr/lib:/lib, but when the MPI compilers are used
  314. # the location of the communication and MPI libs are included too.
  315. # If we don't find anything, use the default library path according
  316. # to the aix ld manual.
  317. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
  318. [AC_REQUIRE([LT_AC_PROG_SED])dnl
  319. AC_LINK_IFELSE(AC_LANG_PROGRAM,[
  320. lt_aix_libpath_sed='
  321. /Import File Strings/,/^$/ {
  322. /^0/ {
  323. s/^0 *\(.*\)$/\1/
  324. p
  325. }
  326. }'
  327. aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  328. # Check for a 64-bit object if we didn't find anything.
  329. if test -z "$aix_libpath"; then
  330. aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  331. fi],[])
  332. if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  333. ])# _LT_AC_SYS_LIBPATH_AIX
  334. # _LT_AC_SHELL_INIT(ARG)
  335. # ----------------------
  336. AC_DEFUN([_LT_AC_SHELL_INIT],
  337. [ifdef([AC_DIVERSION_NOTICE],
  338. [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
  339. [AC_DIVERT_PUSH(NOTICE)])
  340. $1
  341. AC_DIVERT_POP
  342. ])# _LT_AC_SHELL_INIT
  343. # _LT_AC_PROG_ECHO_BACKSLASH
  344. # --------------------------
  345. # Add some code to the start of the generated configure script which
  346. # will find an echo command which doesn't interpret backslashes.
  347. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
  348. [_LT_AC_SHELL_INIT([
  349. # Check that we are running under the correct shell.
  350. SHELL=${CONFIG_SHELL-/bin/sh}
  351. case X$ECHO in
  352. X*--fallback-echo)
  353. # Remove one level of quotation (which was required for Make).
  354. ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
  355. ;;
  356. esac
  357. echo=${ECHO-echo}
  358. if test "X[$]1" = X--no-reexec; then
  359. # Discard the --no-reexec flag, and continue.
  360. shift
  361. elif test "X[$]1" = X--fallback-echo; then
  362. # Avoid inline document here, it may be left over
  363. :
  364. elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
  365. # Yippee, $echo works!
  366. :
  367. else
  368. # Restart under the correct shell.
  369. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
  370. fi
  371. if test "X[$]1" = X--fallback-echo; then
  372. # used as fallback echo
  373. shift
  374. cat <<EOF
  375. [$]*
  376. EOF
  377. exit 0
  378. fi
  379. # The HP-UX ksh and POSIX shell print the target directory to stdout
  380. # if CDPATH is set.
  381. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  382. if test -z "$ECHO"; then
  383. if test "X${echo_test_string+set}" != Xset; then
  384. # find a string as large as possible, as long as the shell can cope with it
  385. for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
  386. # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
  387. if (echo_test_string=`eval $cmd`) 2>/dev/null &&
  388. echo_test_string=`eval $cmd` &&
  389. (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
  390. then
  391. break
  392. fi
  393. done
  394. fi
  395. if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
  396. echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
  397. test "X$echo_testing_string" = "X$echo_test_string"; then
  398. :
  399. else
  400. # The Solaris, AIX, and Digital Unix default echo programs unquote
  401. # backslashes. This makes it impossible to quote backslashes using
  402. # echo "$something" | sed 's/\\/\\\\/g'
  403. #
  404. # So, first we look for a working echo in the user's PATH.
  405. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  406. for dir in $PATH /usr/ucb; do
  407. IFS="$lt_save_ifs"
  408. if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
  409. test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
  410. echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
  411. test "X$echo_testing_string" = "X$echo_test_string"; then
  412. echo="$dir/echo"
  413. break
  414. fi
  415. done
  416. IFS="$lt_save_ifs"
  417. if test "X$echo" = Xecho; then
  418. # We didn't find a better echo, so look for alternatives.
  419. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
  420. echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
  421. test "X$echo_testing_string" = "X$echo_test_string"; then
  422. # This shell has a builtin print -r that does the trick.
  423. echo='print -r'
  424. elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
  425. test "X$CONFIG_SHELL" != X/bin/ksh; then
  426. # If we have ksh, try running configure again with it.
  427. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
  428. export ORIGINAL_CONFIG_SHELL
  429. CONFIG_SHELL=/bin/ksh
  430. export CONFIG_SHELL
  431. exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
  432. else
  433. # Try using printf.
  434. echo='printf %s\n'
  435. if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
  436. echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
  437. test "X$echo_testing_string" = "X$echo_test_string"; then
  438. # Cool, printf works
  439. :
  440. elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
  441. test "X$echo_testing_string" = 'X\t' &&
  442. echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  443. test "X$echo_testing_string" = "X$echo_test_string"; then
  444. CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
  445. export CONFIG_SHELL
  446. SHELL="$CONFIG_SHELL"
  447. export SHELL
  448. echo="$CONFIG_SHELL [$]0 --fallback-echo"
  449. elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
  450. test "X$echo_testing_string" = 'X\t' &&
  451. echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  452. test "X$echo_testing_string" = "X$echo_test_string"; then
  453. echo="$CONFIG_SHELL [$]0 --fallback-echo"
  454. else
  455. # maybe with a smaller string...
  456. prev=:
  457. for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
  458. if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
  459. then
  460. break
  461. fi
  462. prev="$cmd"
  463. done
  464. if test "$prev" != 'sed 50q "[$]0"'; then
  465. echo_test_string=`eval $prev`
  466. export echo_test_string
  467. exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
  468. else
  469. # Oops. We lost completely, so just stick with echo.
  470. echo=echo
  471. fi
  472. fi
  473. fi
  474. fi
  475. fi
  476. fi
  477. # Copy echo and quote the copy suitably for passing to libtool from
  478. # the Makefile, instead of quoting the original, which is used later.
  479. ECHO=$echo
  480. if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
  481. ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
  482. fi
  483. AC_SUBST(ECHO)
  484. ])])# _LT_AC_PROG_ECHO_BACKSLASH
  485. # _LT_AC_LOCK
  486. # -----------
  487. AC_DEFUN([_LT_AC_LOCK],
  488. [AC_ARG_ENABLE([libtool-lock],
  489. [AC_HELP_STRING([--disable-libtool-lock],
  490. [avoid locking (might break parallel builds)])])
  491. test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  492. # Some flags need to be propagated to the compiler or linker for good
  493. # libtool support.
  494. case $host in
  495. ia64-*-hpux*)
  496. # Find out which ABI we are using.
  497. echo 'int i;' > conftest.$ac_ext
  498. if AC_TRY_EVAL(ac_compile); then
  499. case `/usr/bin/file conftest.$ac_objext` in
  500. *ELF-32*)
  501. HPUX_IA64_MODE="32"
  502. ;;
  503. *ELF-64*)
  504. HPUX_IA64_MODE="64"
  505. ;;
  506. esac
  507. fi
  508. rm -rf conftest*
  509. ;;
  510. *-*-irix6*)
  511. # Find out which ABI we are using.
  512. echo '[#]line __oline__ "configure"' > conftest.$ac_ext
  513. if AC_TRY_EVAL(ac_compile); then
  514. if test "$lt_cv_prog_gnu_ld" = yes; then
  515. case `/usr/bin/file conftest.$ac_objext` in
  516. *32-bit*)
  517. LD="${LD-ld} -melf32bsmip"
  518. ;;
  519. *N32*)
  520. LD="${LD-ld} -melf32bmipn32"
  521. ;;
  522. *64-bit*)
  523. LD="${LD-ld} -melf64bmip"
  524. ;;
  525. esac
  526. else
  527. case `/usr/bin/file conftest.$ac_objext` in
  528. *32-bit*)
  529. LD="${LD-ld} -32"
  530. ;;
  531. *N32*)
  532. LD="${LD-ld} -n32"
  533. ;;
  534. *64-bit*)
  535. LD="${LD-ld} -64"
  536. ;;
  537. esac
  538. fi
  539. fi
  540. rm -rf conftest*
  541. ;;
  542. x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
  543. s390*-*linux*|sparc*-*linux*)
  544. # Find out which ABI we are using.
  545. echo 'int i;' > conftest.$ac_ext
  546. if AC_TRY_EVAL(ac_compile); then
  547. case `/usr/bin/file conftest.o` in
  548. *32-bit*)
  549. case $host in
  550. x86_64-*kfreebsd*-gnu)
  551. LD="${LD-ld} -m elf_i386_fbsd"
  552. ;;
  553. x86_64-*linux*)
  554. LD="${LD-ld} -m elf_i386"
  555. ;;
  556. ppc64-*linux*|powerpc64-*linux*)
  557. LD="${LD-ld} -m elf32ppclinux"
  558. ;;
  559. s390x-*linux*)
  560. LD="${LD-ld} -m elf_s390"
  561. ;;
  562. sparc64-*linux*)
  563. LD="${LD-ld} -m elf32_sparc"
  564. ;;
  565. esac
  566. ;;
  567. *64-bit*)
  568. case $host in
  569. x86_64-*kfreebsd*-gnu)
  570. LD="${LD-ld} -m elf_x86_64_fbsd"
  571. ;;
  572. x86_64-*linux*)
  573. LD="${LD-ld} -m elf_x86_64"
  574. ;;
  575. ppc*-*linux*|powerpc*-*linux*)
  576. LD="${LD-ld} -m elf64ppc"
  577. ;;
  578. s390*-*linux*)
  579. LD="${LD-ld} -m elf64_s390"
  580. ;;
  581. sparc*-*linux*)
  582. LD="${LD-ld} -m elf64_sparc"
  583. ;;
  584. esac
  585. ;;
  586. esac
  587. fi
  588. rm -rf conftest*
  589. ;;
  590. *-*-sco3.2v5*)
  591. # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  592. SAVE_CFLAGS="$CFLAGS"
  593. CFLAGS="$CFLAGS -belf"
  594. AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
  595. [AC_LANG_PUSH(C)
  596. AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
  597. AC_LANG_POP])
  598. if test x"$lt_cv_cc_needs_belf" != x"yes"; then
  599. # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  600. CFLAGS="$SAVE_CFLAGS"
  601. fi
  602. ;;
  603. sparc*-*solaris*)
  604. # Find out which ABI we are using.
  605. echo 'int i;' > conftest.$ac_ext
  606. if AC_TRY_EVAL(ac_compile); then
  607. case `/usr/bin/file conftest.o` in
  608. *64-bit*)
  609. case $lt_cv_prog_gnu_ld in
  610. yes*) LD="${LD-ld} -m elf64_sparc" ;;
  611. *)
  612. if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
  613. LD="${LD-ld} -64"
  614. fi
  615. ;;
  616. esac
  617. ;;
  618. esac
  619. fi
  620. rm -rf conftest*
  621. ;;
  622. AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
  623. [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
  624. AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  625. AC_CHECK_TOOL(AS, as, false)
  626. AC_CHECK_TOOL(OBJDUMP, objdump, false)
  627. ;;
  628. ])
  629. esac
  630. need_locks="$enable_libtool_lock"
  631. ])# _LT_AC_LOCK
  632. # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  633. # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
  634. # ----------------------------------------------------------------
  635. # Check whether the given compiler option works
  636. AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
  637. [AC_REQUIRE([LT_AC_PROG_SED])
  638. AC_CACHE_CHECK([$1], [$2],
  639. [$2=no
  640. ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
  641. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  642. lt_compiler_flag="$3"
  643. # Insert the option either (1) after the last *FLAGS variable, or
  644. # (2) before a word containing "conftest.", or (3) at the end.
  645. # Note that $ac_compile itself does not contain backslashes and begins
  646. # with a dollar sign (not a hyphen), so the echo should work correctly.
  647. # The option is referenced via a variable to avoid confusing sed.
  648. lt_compile=`echo "$ac_compile" | $SED \
  649. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  650. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  651. -e 's:$: $lt_compiler_flag:'`
  652. (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  653. (eval "$lt_compile" 2>conftest.err)
  654. ac_status=$?
  655. cat conftest.err >&AS_MESSAGE_LOG_FD
  656. echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  657. if (exit $ac_status) && test -s "$ac_outfile"; then
  658. # The compiler can only warn and ignore the option if not recognized
  659. # So say no if there are warnings other than the usual output.
  660. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
  661. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  662. if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
  663. $2=yes
  664. fi
  665. fi
  666. $rm conftest*
  667. ])
  668. if test x"[$]$2" = xyes; then
  669. ifelse([$5], , :, [$5])
  670. else
  671. ifelse([$6], , :, [$6])
  672. fi
  673. ])# AC_LIBTOOL_COMPILER_OPTION
  674. # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  675. # [ACTION-SUCCESS], [ACTION-FAILURE])
  676. # ------------------------------------------------------------
  677. # Check whether the given compiler option works
  678. AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
  679. [AC_REQUIRE([LT_AC_PROG_SED])dnl
  680. AC_CACHE_CHECK([$1], [$2],
  681. [$2=no
  682. save_LDFLAGS="$LDFLAGS"
  683. LDFLAGS="$LDFLAGS $3"
  684. echo "$lt_simple_link_test_code" > conftest.$ac_ext
  685. if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
  686. # The linker can only warn and ignore the option if not recognized
  687. # So say no if there are warnings
  688. if test -s conftest.err; then
  689. # Append any errors to the config.log.
  690. cat conftest.err 1>&AS_MESSAGE_LOG_FD
  691. $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
  692. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  693. if diff conftest.exp conftest.er2 >/dev/null; then
  694. $2=yes
  695. fi
  696. else
  697. $2=yes
  698. fi
  699. fi
  700. $rm -r conftest*
  701. LDFLAGS="$save_LDFLAGS"
  702. ])
  703. if test x"[$]$2" = xyes; then
  704. ifelse([$4], , :, [$4])
  705. else
  706. ifelse([$5], , :, [$5])
  707. fi
  708. ])# AC_LIBTOOL_LINKER_OPTION
  709. # AC_LIBTOOL_SYS_MAX_CMD_LEN
  710. # --------------------------
  711. AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
  712. [# find the maximum length of command line arguments
  713. AC_MSG_CHECKING([the maximum length of command line arguments])
  714. AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
  715. i=0
  716. teststring="ABCD"
  717. case $build_os in
  718. msdosdjgpp*)
  719. # On DJGPP, this test can blow up pretty badly due to problems in libc
  720. # (any single argument exceeding 2000 bytes causes a buffer overrun
  721. # during glob expansion). Even if it were fixed, the result of this
  722. # check would be larger than it should be.
  723. lt_cv_sys_max_cmd_len=12288; # 12K is about right
  724. ;;
  725. gnu*)
  726. # Under GNU Hurd, this test is not required because there is
  727. # no limit to the length of command line arguments.
  728. # Libtool will interpret -1 as no limit whatsoever
  729. lt_cv_sys_max_cmd_len=-1;
  730. ;;
  731. cygwin* | mingw*)
  732. # On Win9x/ME, this test blows up -- it succeeds, but takes
  733. # about 5 minutes as the teststring grows exponentially.
  734. # Worse, since 9x/ME are not pre-emptively multitasking,
  735. # you end up with a "frozen" computer, even though with patience
  736. # the test eventually succeeds (with a max line length of 256k).
  737. # Instead, let's just punt: use the minimum linelength reported by
  738. # all of the supported platforms: 8192 (on NT/2K/XP).
  739. lt_cv_sys_max_cmd_len=8192;
  740. ;;
  741. amigaos*)
  742. # On AmigaOS with pdksh, this test takes hours, literally.
  743. # So we just punt and use a minimum line length of 8192.
  744. lt_cv_sys_max_cmd_len=8192;
  745. ;;
  746. netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
  747. # This has been around since 386BSD, at least. Likely further.
  748. if test -x /sbin/sysctl; then
  749. lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
  750. elif test -x /usr/sbin/sysctl; then
  751. lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
  752. else
  753. lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
  754. fi
  755. # And add a safety zone
  756. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  757. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  758. ;;
  759. interix*)
  760. # We know the value 262144 and hardcode it with a safety zone (like BSD)
  761. lt_cv_sys_max_cmd_len=196608
  762. ;;
  763. osf*)
  764. # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
  765. # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
  766. # nice to cause kernel panics so lets avoid the loop below.
  767. # First set a reasonable default.
  768. lt_cv_sys_max_cmd_len=16384
  769. #
  770. if test -x /sbin/sysconfig; then
  771. case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
  772. *1*) lt_cv_sys_max_cmd_len=-1 ;;
  773. esac
  774. fi
  775. ;;
  776. sco3.2v5*)
  777. lt_cv_sys_max_cmd_len=102400
  778. ;;
  779. sysv5* | sco5v6* | sysv4.2uw2*)
  780. kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
  781. if test -n "$kargmax"; then
  782. lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
  783. else
  784. lt_cv_sys_max_cmd_len=32768
  785. fi
  786. ;;
  787. *)
  788. lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
  789. if test -n "$lt_cv_sys_max_cmd_len"; then
  790. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  791. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  792. else
  793. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
  794. while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
  795. = "XX$teststring") >/dev/null 2>&1 &&
  796. new_result=`expr "X$teststring" : ".*" 2>&1` &&
  797. lt_cv_sys_max_cmd_len=$new_result &&
  798. test $i != 17 # 1/2 MB should be enough
  799. do
  800. i=`expr $i + 1`
  801. teststring=$teststring$teststring
  802. done
  803. teststring=
  804. # Add a significant safety factor because C++ compilers can tack on massive
  805. # amounts of additional arguments before passing them to the linker.
  806. # It appears as though 1/2 is a usable value.
  807. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
  808. fi
  809. ;;
  810. esac
  811. ])
  812. if test -n $lt_cv_sys_max_cmd_len ; then
  813. AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
  814. else
  815. AC_MSG_RESULT(none)
  816. fi
  817. ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
  818. # _LT_AC_CHECK_DLFCN
  819. # ------------------
  820. AC_DEFUN([_LT_AC_CHECK_DLFCN],
  821. [AC_CHECK_HEADERS(dlfcn.h)dnl
  822. ])# _LT_AC_CHECK_DLFCN
  823. # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
  824. # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
  825. # ---------------------------------------------------------------------
  826. AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
  827. [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
  828. if test "$cross_compiling" = yes; then :
  829. [$4]
  830. else
  831. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  832. lt_status=$lt_dlunknown
  833. cat > conftest.$ac_ext <<EOF
  834. [#line __oline__ "configure"
  835. #include "confdefs.h"
  836. #if HAVE_DLFCN_H
  837. #include <dlfcn.h>
  838. #endif
  839. #include <stdio.h>
  840. #ifdef RTLD_GLOBAL
  841. # define LT_DLGLOBAL RTLD_GLOBAL
  842. #else
  843. # ifdef DL_GLOBAL
  844. # define LT_DLGLOBAL DL_GLOBAL
  845. # else
  846. # define LT_DLGLOBAL 0
  847. # endif
  848. #endif
  849. /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
  850. find out it does not work in some platform. */
  851. #ifndef LT_DLLAZY_OR_NOW
  852. # ifdef RTLD_LAZY
  853. # define LT_DLLAZY_OR_NOW RTLD_LAZY
  854. # else
  855. # ifdef DL_LAZY
  856. # define LT_DLLAZY_OR_NOW DL_LAZY
  857. # else
  858. # ifdef RTLD_NOW
  859. # define LT_DLLAZY_OR_NOW RTLD_NOW
  860. # else
  861. # ifdef DL_NOW
  862. # define LT_DLLAZY_OR_NOW DL_NOW
  863. # else
  864. # define LT_DLLAZY_OR_NOW 0
  865. # endif
  866. # endif
  867. # endif
  868. # endif
  869. #endif
  870. #ifdef __cplusplus
  871. extern "C" void exit (int);
  872. #endif
  873. void fnord() { int i=42;}
  874. int main ()
  875. {
  876. void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  877. int status = $lt_dlunknown;
  878. if (self)
  879. {
  880. if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
  881. else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
  882. /* dlclose (self); */
  883. }
  884. else
  885. puts (dlerror ());
  886. exit (status);
  887. }]
  888. EOF
  889. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
  890. (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
  891. lt_status=$?
  892. case x$lt_status in
  893. x$lt_dlno_uscore) $1 ;;
  894. x$lt_dlneed_uscore) $2 ;;
  895. x$lt_dlunknown|x*) $3 ;;
  896. esac
  897. else :
  898. # compilation failed
  899. $3
  900. fi
  901. fi
  902. rm -fr conftest*
  903. ])# _LT_AC_TRY_DLOPEN_SELF
  904. # AC_LIBTOOL_DLOPEN_SELF
  905. # ----------------------
  906. AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
  907. [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
  908. if test "x$enable_dlopen" != xyes; then
  909. enable_dlopen=unknown
  910. enable_dlopen_self=unknown
  911. enable_dlopen_self_static=unknown
  912. else
  913. lt_cv_dlopen=no
  914. lt_cv_dlopen_libs=
  915. case $host_os in
  916. beos*)
  917. lt_cv_dlopen="load_add_on"
  918. lt_cv_dlopen_libs=
  919. lt_cv_dlopen_self=yes
  920. ;;
  921. mingw* | pw32*)
  922. lt_cv_dlopen="LoadLibrary"
  923. lt_cv_dlopen_libs=
  924. ;;
  925. cygwin*)
  926. lt_cv_dlopen="dlopen"
  927. lt_cv_dlopen_libs=
  928. ;;
  929. darwin*)
  930. # if libdl is installed we need to link against it
  931. AC_CHECK_LIB([dl], [dlopen],
  932. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
  933. lt_cv_dlopen="dyld"
  934. lt_cv_dlopen_libs=
  935. lt_cv_dlopen_self=yes
  936. ])
  937. ;;
  938. *)
  939. AC_CHECK_FUNC([shl_load],
  940. [lt_cv_dlopen="shl_load"],
  941. [AC_CHECK_LIB([dld], [shl_load],
  942. [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
  943. [AC_CHECK_FUNC([dlopen],
  944. [lt_cv_dlopen="dlopen"],
  945. [AC_CHECK_LIB([dl], [dlopen],
  946. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
  947. [AC_CHECK_LIB([svld], [dlopen],
  948. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
  949. [AC_CHECK_LIB([dld], [dld_link],
  950. [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
  951. ])
  952. ])
  953. ])
  954. ])
  955. ])
  956. ;;
  957. esac
  958. if test "x$lt_cv_dlopen" != xno; then
  959. enable_dlopen=yes
  960. else
  961. enable_dlopen=no
  962. fi
  963. case $lt_cv_dlopen in
  964. dlopen)
  965. save_CPPFLAGS="$CPPFLAGS"
  966. test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  967. save_LDFLAGS="$LDFLAGS"
  968. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  969. save_LIBS="$LIBS"
  970. LIBS="$lt_cv_dlopen_libs $LIBS"
  971. AC_CACHE_CHECK([whether a program can dlopen itself],
  972. lt_cv_dlopen_self, [dnl
  973. _LT_AC_TRY_DLOPEN_SELF(
  974. lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
  975. lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
  976. ])
  977. if test "x$lt_cv_dlopen_self" = xyes; then
  978. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
  979. AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
  980. lt_cv_dlopen_self_static, [dnl
  981. _LT_AC_TRY_DLOPEN_SELF(
  982. lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
  983. lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
  984. ])
  985. fi
  986. CPPFLAGS="$save_CPPFLAGS"
  987. LDFLAGS="$save_LDFLAGS"
  988. LIBS="$save_LIBS"
  989. ;;
  990. esac
  991. case $lt_cv_dlopen_self in
  992. yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  993. *) enable_dlopen_self=unknown ;;
  994. esac
  995. case $lt_cv_dlopen_self_static in
  996. yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  997. *) enable_dlopen_self_static=unknown ;;
  998. esac
  999. fi
  1000. ])# AC_LIBTOOL_DLOPEN_SELF
  1001. # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
  1002. # ---------------------------------
  1003. # Check to see if options -c and -o are simultaneously supported by compiler
  1004. AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
  1005. [AC_REQUIRE([LT_AC_PROG_SED])dnl
  1006. AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
  1007. AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
  1008. [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
  1009. [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
  1010. $rm -r conftest 2>/dev/null
  1011. mkdir conftest
  1012. cd conftest
  1013. mkdir out
  1014. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  1015. lt_compiler_flag="-o out/conftest2.$ac_objext"
  1016. # Insert the option either (1) after the last *FLAGS variable, or
  1017. # (2) before a word containing "conftest.", or (3) at the end.
  1018. # Note that $ac_compile itself does not contain backslashes and begins
  1019. # with a dollar sign (not a hyphen), so the echo should work correctly.
  1020. lt_compile=`echo "$ac_compile" | $SED \
  1021. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  1022. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  1023. -e 's:$: $lt_compiler_flag:'`
  1024. (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  1025. (eval "$lt_compile" 2>out/conftest.err)
  1026. ac_status=$?
  1027. cat out/conftest.err >&AS_MESSAGE_LOG_FD
  1028. echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  1029. if (exit $ac_status) && test -s out/conftest2.$ac_objext
  1030. then
  1031. # The compiler can only warn and ignore the option if not recognized
  1032. # So say no if there are warnings
  1033. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
  1034. $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
  1035. if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
  1036. _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  1037. fi
  1038. fi
  1039. chmod u+w . 2>&AS_MESSAGE_LOG_FD
  1040. $rm conftest*
  1041. # SGI C++ compiler will create directory out/ii_files/ for
  1042. # template instantiation
  1043. test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
  1044. $rm out/* && rmdir out
  1045. cd ..
  1046. rmdir conftest
  1047. $rm conftest*
  1048. ])
  1049. ])# AC_LIBTOOL_PROG_CC_C_O
  1050. # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
  1051. # -----------------------------------------
  1052. # Check to see if we can do hard links to lock some files if needed
  1053. AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
  1054. [AC_REQUIRE([_LT_AC_LOCK])dnl
  1055. hard_links="nottested"
  1056. if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
  1057. # do not overwrite the value of need_locks provided by the user
  1058. AC_MSG_CHECKING([if we can lock with hard links])
  1059. hard_links=yes
  1060. $rm conftest*
  1061. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1062. touch conftest.a
  1063. ln conftest.a conftest.b 2>&5 || hard_links=no
  1064. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1065. AC_MSG_RESULT([$hard_links])
  1066. if test "$hard_links" = no; then
  1067. AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
  1068. need_locks=warn
  1069. fi
  1070. else
  1071. need_locks=no
  1072. fi
  1073. ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
  1074. # AC_LIBTOOL_OBJDIR
  1075. # -----------------
  1076. AC_DEFUN([AC_LIBTOOL_OBJDIR],
  1077. [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
  1078. [rm -f .libs 2>/dev/null
  1079. mkdir .libs 2>/dev/null
  1080. if test -d .libs; then
  1081. lt_cv_objdir=.libs
  1082. else
  1083. # MS-DOS does not allow filenames that begin with a dot.
  1084. lt_cv_objdir=_libs
  1085. fi
  1086. rmdir .libs 2>/dev/null])
  1087. objdir=$lt_cv_objdir
  1088. ])# AC_LIBTOOL_OBJDIR
  1089. # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
  1090. # ----------------------------------------------
  1091. # Check hardcoding attributes.
  1092. AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
  1093. [AC_MSG_CHECKING([how to hardcode library paths into programs])
  1094. _LT_AC_TAGVAR(hardcode_action, $1)=
  1095. if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
  1096. test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
  1097. test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
  1098. # We can hardcode non-existant directories.
  1099. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
  1100. # If the only mechanism to avoid hardcoding is shlibpath_var, we
  1101. # have to relink, otherwise we might link with an installed library
  1102. # when we should be linking with a yet-to-be-installed one
  1103. ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
  1104. test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
  1105. # Linking always hardcodes the temporary library directory.
  1106. _LT_AC_TAGVAR(hardcode_action, $1)=relink
  1107. else
  1108. # We can link without hardcoding, and we can hardcode nonexisting dirs.
  1109. _LT_AC_TAGVAR(hardcode_action, $1)=immediate
  1110. fi
  1111. else
  1112. # We cannot hardcode anything, or else we can only hardcode existing
  1113. # directories.
  1114. _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
  1115. fi
  1116. AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
  1117. if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
  1118. # Fast installation is not supported
  1119. enable_fast_install=no
  1120. elif test "$shlibpath_overrides_runpath" = yes ||
  1121. test "$enable_shared" = no; then
  1122. # Fast installation is not necessary
  1123. enable_fast_install=needless
  1124. fi
  1125. ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
  1126. # AC_LIBTOOL_SYS_LIB_STRIP
  1127. # ------------------------
  1128. AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
  1129. [striplib=
  1130. old_striplib=
  1131. AC_MSG_CHECKING([whether stripping libraries is possible])
  1132. if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
  1133. test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
  1134. test -z "$striplib" && striplib="$STRIP --strip-unneeded"
  1135. AC_MSG_RESULT([yes])
  1136. else
  1137. # FIXME - insert some real tests, host_os isn't really good enough
  1138. case $host_os in
  1139. darwin*)
  1140. if test -n "$STRIP" ; then
  1141. striplib="$STRIP -x"
  1142. old_striplib="$STRIP -S"
  1143. AC_MSG_RESULT([yes])
  1144. else
  1145. AC_MSG_RESULT([no])
  1146. fi
  1147. ;;
  1148. *)
  1149. AC_MSG_RESULT([no])
  1150. ;;
  1151. esac
  1152. fi
  1153. ])# AC_LIBTOOL_SYS_LIB_STRIP
  1154. # AC_LIBTOOL_SYS_DYNAMIC_LINKER
  1155. # -----------------------------
  1156. # PORTME Fill in your ld.so characteristics
  1157. AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
  1158. [AC_REQUIRE([LT_AC_PROG_SED])dnl
  1159. AC_MSG_CHECKING([dynamic linker characteristics])
  1160. library_names_spec=
  1161. libname_spec='lib$name'
  1162. soname_spec=
  1163. shrext_cmds=".so"
  1164. postinstall_cmds=
  1165. postuninstall_cmds=
  1166. finish_cmds=
  1167. finish_eval=
  1168. shlibpath_var=
  1169. shlibpath_overrides_runpath=unknown
  1170. version_type=none
  1171. dynamic_linker="$host_os ld.so"
  1172. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  1173. m4_if($1,[],[
  1174. if test "$GCC" = yes; then
  1175. case $host_os in
  1176. darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
  1177. *) lt_awk_arg="/^libraries:/" ;;
  1178. esac
  1179. lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
  1180. if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
  1181. # if the path contains ";" then we assume it to be the separator
  1182. # otherwise default to the standard path separator (i.e. ":") - it is
  1183. # assumed that no part of a normal pathname contains ";" but that should
  1184. # okay in the real world where ";" in dirpaths is itself problematic.
  1185. lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
  1186. else
  1187. lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  1188. fi
  1189. # Ok, now we have the path, separated by spaces, we can step through it
  1190. # and add multilib dir if necessary.
  1191. lt_tmp_lt_search_path_spec=
  1192. lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
  1193. for lt_sys_path in $lt_search_path_spec; do
  1194. if test -d "$lt_sys_path/$lt_multi_os_dir"; then
  1195. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
  1196. else
  1197. test -d "$lt_sys_path" && \
  1198. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
  1199. fi
  1200. done
  1201. lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
  1202. BEGIN {RS=" "; FS="/|\n";} {
  1203. lt_foo="";
  1204. lt_count=0;
  1205. for (lt_i = NF; lt_i > 0; lt_i--) {
  1206. if ($lt_i != "" && $lt_i != ".") {
  1207. if ($lt_i == "..") {
  1208. lt_count++;
  1209. } else {
  1210. if (lt_count == 0) {
  1211. lt_foo="/" $lt_i lt_foo;
  1212. } else {
  1213. lt_count--;
  1214. }
  1215. }
  1216. }
  1217. }
  1218. if (lt_foo != "") { lt_freq[[lt_foo]]++; }
  1219. if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
  1220. }'`
  1221. sys_lib_search_path_spec=`echo $lt_search_path_spec`
  1222. else
  1223. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  1224. fi])
  1225. need_lib_prefix=unknown
  1226. hardcode_into_libs=no
  1227. # when you set need_version to no, make sure it does not cause -set_version
  1228. # flags to be left without arguments
  1229. need_version=unknown
  1230. case $host_os in
  1231. aix3*)
  1232. version_type=linux
  1233. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
  1234. shlibpath_var=LIBPATH
  1235. # AIX 3 has no versioning support, so we append a major version to the name.
  1236. soname_spec='${libname}${release}${shared_ext}$major'
  1237. ;;
  1238. aix[[4-9]]*)
  1239. version_type=linux
  1240. need_lib_prefix=no
  1241. need_version=no
  1242. hardcode_into_libs=yes
  1243. if test "$host_cpu" = ia64; then
  1244. # AIX 5 supports IA64
  1245. library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
  1246. shlibpath_var=LD_LIBRARY_PATH
  1247. else
  1248. # With GCC up to 2.95.x, collect2 would create an import file
  1249. # for dependence libraries. The import file would start with
  1250. # the line `#! .'. This would cause the generated library to
  1251. # depend on `.', always an invalid library. This was fixed in
  1252. # development snapshots of GCC prior to 3.0.
  1253. case $host_os in
  1254. aix4 | aix4.[[01]] | aix4.[[01]].*)
  1255. if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
  1256. echo ' yes '
  1257. echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
  1258. :
  1259. else
  1260. can_build_shared=no
  1261. fi
  1262. ;;
  1263. esac
  1264. # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
  1265. # soname into executable. Probably we can add versioning support to
  1266. # collect2, so additional links can be useful in future.
  1267. if test "$aix_use_runtimelinking" = yes; then
  1268. # If using run time linking (on AIX 4.2 or later) use lib<name>.so
  1269. # instead of lib<name>.a to let people know that these are not
  1270. # typical AIX shared libraries.
  1271. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1272. else
  1273. # We preserve .a as extension for shared libraries through AIX4.2
  1274. # and later when we are not doing run time linking.
  1275. library_names_spec='${libname}${release}.a $libname.a'
  1276. soname_spec='${libname}${release}${shared_ext}$major'
  1277. fi
  1278. shlibpath_var=LIBPATH
  1279. fi
  1280. ;;
  1281. amigaos*)
  1282. library_names_spec='$libname.ixlibrary $libname.a'
  1283. # Create ${libname}_ixlibrary.a entries in /sys/libs.
  1284. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
  1285. ;;
  1286. beos*)
  1287. library_names_spec='${libname}${shared_ext}'
  1288. dynamic_linker="$host_os ld.so"
  1289. shlibpath_var=LIBRARY_PATH
  1290. ;;
  1291. bsdi[[45]]*)
  1292. version_type=linux
  1293. need_version=no
  1294. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1295. soname_spec='${libname}${release}${shared_ext}$major'
  1296. finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  1297. shlibpath_var=LD_LIBRARY_PATH
  1298. sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  1299. sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  1300. # the default ld.so.conf also contains /usr/contrib/lib and
  1301. # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  1302. # libtool to hard-code these into programs
  1303. ;;
  1304. cygwin* | mingw* | pw32*)
  1305. version_type=windows
  1306. shrext_cmds=".dll"
  1307. need_version=no
  1308. need_lib_prefix=no
  1309. case $GCC,$host_os in
  1310. yes,cygwin* | yes,mingw* | yes,pw32*)
  1311. library_names_spec='$libname.dll.a'
  1312. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  1313. postinstall_cmds='base_file=`basename \${file}`~
  1314. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
  1315. dldir=$destdir/`dirname \$dlpath`~
  1316. test -d \$dldir || mkdir -p \$dldir~
  1317. $install_prog $dir/$dlname \$dldir/$dlname~
  1318. chmod a+x \$dldir/$dlname'
  1319. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  1320. dlpath=$dir/\$dldll~
  1321. $rm \$dlpath'
  1322. shlibpath_overrides_runpath=yes
  1323. case $host_os in
  1324. cygwin*)
  1325. # Cygwin DLLs use 'cyg' prefix rather than 'lib'
  1326. soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  1327. sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
  1328. ;;
  1329. mingw*)
  1330. # MinGW DLLs use traditional 'lib' prefix
  1331. soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  1332. sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
  1333. if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
  1334. # It is most probably a Windows format PATH printed by
  1335. # mingw gcc, but we are running on Cygwin. Gcc prints its search
  1336. # path with ; separators, and with drive letters. We can handle the
  1337. # drive letters (cygwin fileutils understands them), so leave them,
  1338. # especially as we might pass files found there to a mingw objdump,
  1339. # which wouldn't understand a cygwinified path. Ahh.
  1340. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  1341. else
  1342. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  1343. fi
  1344. ;;
  1345. pw32*)
  1346. # pw32 DLLs use 'pw' prefix rather than 'lib'
  1347. library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  1348. ;;
  1349. esac
  1350. ;;
  1351. *)
  1352. library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
  1353. ;;
  1354. esac
  1355. dynamic_linker='Win32 ld.exe'
  1356. # FIXME: first we should search . and the directory the executable is in
  1357. shlibpath_var=PATH
  1358. ;;
  1359. darwin* | rhapsody*)
  1360. dynamic_linker="$host_os dyld"
  1361. version_type=darwin
  1362. need_lib_prefix=no
  1363. need_version=no
  1364. library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
  1365. soname_spec='${libname}${release}${major}$shared_ext'
  1366. shlibpath_overrides_runpath=yes
  1367. shlibpath_var=DYLD_LIBRARY_PATH
  1368. shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
  1369. m4_if([$1], [],[
  1370. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
  1371. sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
  1372. ;;
  1373. dgux*)
  1374. version_type=linux
  1375. need_lib_prefix=no
  1376. need_version=no
  1377. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
  1378. soname_spec='${libname}${release}${shared_ext}$major'
  1379. shlibpath_var=LD_LIBRARY_PATH
  1380. ;;
  1381. freebsd1*)
  1382. dynamic_linker=no
  1383. ;;
  1384. freebsd* | dragonfly*)
  1385. # DragonFly does not have aout. When/if they implement a new
  1386. # versioning mechanism, adjust this.
  1387. if test -x /usr/bin/objformat; then
  1388. objformat=`/usr/bin/objformat`
  1389. else
  1390. case $host_os in
  1391. freebsd[[123]]*) objformat=aout ;;
  1392. *) objformat=elf ;;
  1393. esac
  1394. fi
  1395. version_type=freebsd-$objformat
  1396. case $version_type in
  1397. freebsd-elf*)
  1398. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  1399. need_version=no
  1400. need_lib_prefix=no
  1401. ;;
  1402. freebsd-*)
  1403. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
  1404. need_version=yes
  1405. ;;
  1406. esac
  1407. shlibpath_var=LD_LIBRARY_PATH
  1408. case $host_os in
  1409. freebsd2*)
  1410. shlibpath_overrides_runpath=yes
  1411. ;;
  1412. freebsd3.[[01]]* | freebsdelf3.[[01]]*)
  1413. shlibpath_overrides_runpath=yes
  1414. hardcode_into_libs=yes
  1415. ;;
  1416. freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
  1417. freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
  1418. shlibpath_overrides_runpath=no
  1419. hardcode_into_libs=yes
  1420. ;;
  1421. *) # from 4.6 on, and DragonFly
  1422. shlibpath_overrides_runpath=yes
  1423. hardcode_into_libs=yes
  1424. ;;
  1425. esac
  1426. ;;
  1427. gnu*)
  1428. version_type=linux
  1429. need_lib_prefix=no
  1430. need_version=no
  1431. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  1432. soname_spec='${libname}${release}${shared_ext}$major'
  1433. shlibpath_var=LD_LIBRARY_PATH
  1434. hardcode_into_libs=yes
  1435. ;;
  1436. hpux9* | hpux10* | hpux11*)
  1437. # Give a soname corresponding to the major version so that dld.sl refuses to
  1438. # link against other versions.
  1439. version_type=sunos
  1440. need_lib_prefix=no
  1441. need_version=no
  1442. case $host_cpu in
  1443. ia64*)
  1444. shrext_cmds='.so'
  1445. hardcode_into_libs=yes
  1446. dynamic_linker="$host_os dld.so"
  1447. shlibpath_var=LD_LIBRARY_PATH
  1448. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  1449. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1450. soname_spec='${libname}${release}${shared_ext}$major'
  1451. if test "X$HPUX_IA64_MODE" = X32; then
  1452. sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
  1453. else
  1454. sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
  1455. fi
  1456. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  1457. ;;
  1458. hppa*64*)
  1459. shrext_cmds='.sl'
  1460. hardcode_into_libs=yes
  1461. dynamic_linker="$host_os dld.sl"
  1462. shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
  1463. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  1464. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1465. soname_spec='${libname}${release}${shared_ext}$major'
  1466. sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
  1467. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  1468. ;;
  1469. *)
  1470. shrext_cmds='.sl'
  1471. dynamic_linker="$host_os dld.sl"
  1472. shlibpath_var=SHLIB_PATH
  1473. shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  1474. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1475. soname_spec='${libname}${release}${shared_ext}$major'
  1476. ;;
  1477. esac
  1478. # HP-UX runs *really* slowly unless shared libraries are mode 555.
  1479. postinstall_cmds='chmod 555 $lib'
  1480. ;;
  1481. interix[[3-9]]*)
  1482. version_type=linux
  1483. need_lib_prefix=no
  1484. need_version=no
  1485. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  1486. soname_spec='${libname}${release}${shared_ext}$major'
  1487. dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
  1488. shlibpath_var=LD_LIBRARY_PATH
  1489. shlibpath_overrides_runpath=no
  1490. hardcode_into_libs=yes
  1491. ;;
  1492. irix5* | irix6* | nonstopux*)
  1493. case $host_os in
  1494. nonstopux*) version_type=nonstopux ;;
  1495. *)
  1496. if test "$lt_cv_prog_gnu_ld" = yes; then
  1497. version_type=linux
  1498. else
  1499. version_type=irix
  1500. fi ;;
  1501. esac
  1502. need_lib_prefix=no
  1503. need_version=no
  1504. soname_spec='${libname}${release}${shared_ext}$major'
  1505. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
  1506. case $host_os in
  1507. irix5* | nonstopux*)
  1508. libsuff= shlibsuff=
  1509. ;;
  1510. *)
  1511. case $LD in # libtool.m4 will add one of these switches to LD
  1512. *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
  1513. libsuff= shlibsuff= libmagic=32-bit;;
  1514. *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
  1515. libsuff=32 shlibsuff=N32 libmagic=N32;;
  1516. *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
  1517. libsuff=64 shlibsuff=64 libmagic=64-bit;;
  1518. *) libsuff= shlibsuff= libmagic=never-match;;
  1519. esac
  1520. ;;
  1521. esac
  1522. shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  1523. shlibpath_overrides_runpath=no
  1524. sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
  1525. sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
  1526. hardcode_into_libs=yes
  1527. ;;
  1528. # No shared lib support for Linux oldld, aout, or coff.
  1529. linux*oldld* | linux*aout* | linux*coff*)
  1530. dynamic_linker=no
  1531. ;;
  1532. # This must be Linux ELF.
  1533. linux* | k*bsd*-gnu)
  1534. version_type=linux
  1535. need_lib_prefix=no
  1536. need_version=no
  1537. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1538. soname_spec='${libname}${release}${shared_ext}$major'
  1539. finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  1540. shlibpath_var=LD_LIBRARY_PATH
  1541. shlibpath_overrides_runpath=no
  1542. # This implies no fast_install, which is unacceptable.
  1543. # Some rework will be needed to allow for fast_install
  1544. # before this can be enabled.
  1545. hardcode_into_libs=yes
  1546. # Append ld.so.conf contents to the search path
  1547. if test -f /etc/ld.so.conf; then
  1548. lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
  1549. sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
  1550. fi
  1551. # We used to test for /lib/ld.so.1 and disable shared libraries on
  1552. # powerpc, because MkLinux only supported shared libraries with the
  1553. # GNU dynamic linker. Since this was broken with cross compilers,
  1554. # most powerpc-linux boxes support dynamic linking these days and
  1555. # people can always --disable-shared, the test was removed, and we
  1556. # assume the GNU/Linux dynamic linker is in use.
  1557. dynamic_linker='GNU/Linux ld.so'
  1558. ;;
  1559. netbsd*)
  1560. version_type=sunos
  1561. need_lib_prefix=no
  1562. need_version=no
  1563. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  1564. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  1565. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  1566. dynamic_linker='NetBSD (a.out) ld.so'
  1567. else
  1568. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  1569. soname_spec='${libname}${release}${shared_ext}$major'
  1570. dynamic_linker='NetBSD ld.elf_so'
  1571. fi
  1572. shlibpath_var=LD_LIBRARY_PATH
  1573. shlibpath_overrides_runpath=yes
  1574. hardcode_into_libs=yes
  1575. ;;
  1576. newsos6)
  1577. version_type=linux
  1578. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1579. shlibpath_var=LD_LIBRARY_PATH
  1580. shlibpath_overrides_runpath=yes
  1581. ;;
  1582. nto-qnx*)
  1583. version_type=linux
  1584. need_lib_prefix=no
  1585. need_version=no
  1586. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1587. soname_spec='${libname}${release}${shared_ext}$major'
  1588. shlibpath_var=LD_LIBRARY_PATH
  1589. shlibpath_overrides_runpath=yes
  1590. ;;
  1591. openbsd*)
  1592. version_type=sunos
  1593. sys_lib_dlsearch_path_spec="/usr/lib"
  1594. need_lib_prefix=no
  1595. # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
  1596. case $host_os in
  1597. openbsd3.3 | openbsd3.3.*) need_version=yes ;;
  1598. *) need_version=no ;;
  1599. esac
  1600. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  1601. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  1602. shlibpath_var=LD_LIBRARY_PATH
  1603. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  1604. case $host_os in
  1605. openbsd2.[[89]] | openbsd2.[[89]].*)
  1606. shlibpath_overrides_runpath=no
  1607. ;;
  1608. *)
  1609. shlibpath_overrides_runpath=yes
  1610. ;;
  1611. esac
  1612. else
  1613. shlibpath_overrides_runpath=yes
  1614. fi
  1615. ;;
  1616. os2*)
  1617. libname_spec='$name'
  1618. shrext_cmds=".dll"
  1619. need_lib_prefix=no
  1620. library_names_spec='$libname${shared_ext} $libname.a'
  1621. dynamic_linker='OS/2 ld.exe'
  1622. shlibpath_var=LIBPATH
  1623. ;;
  1624. osf3* | osf4* | osf5*)
  1625. version_type=osf
  1626. need_lib_prefix=no
  1627. need_version=no
  1628. soname_spec='${libname}${release}${shared_ext}$major'
  1629. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1630. shlibpath_var=LD_LIBRARY_PATH
  1631. sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  1632. sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  1633. ;;
  1634. rdos*)
  1635. dynamic_linker=no
  1636. ;;
  1637. solaris*)
  1638. version_type=linux
  1639. need_lib_prefix=no
  1640. need_version=no
  1641. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1642. soname_spec='${libname}${release}${shared_ext}$major'
  1643. shlibpath_var=LD_LIBRARY_PATH
  1644. shlibpath_overrides_runpath=yes
  1645. hardcode_into_libs=yes
  1646. # ldd complains unless libraries are executable
  1647. postinstall_cmds='chmod +x $lib'
  1648. ;;
  1649. sunos4*)
  1650. version_type=sunos
  1651. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  1652. finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  1653. shlibpath_var=LD_LIBRARY_PATH
  1654. shlibpath_overrides_runpath=yes
  1655. if test "$with_gnu_ld" = yes; then
  1656. need_lib_prefix=no
  1657. fi
  1658. need_version=yes
  1659. ;;
  1660. sysv4 | sysv4.3*)
  1661. version_type=linux
  1662. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1663. soname_spec='${libname}${release}${shared_ext}$major'
  1664. shlibpath_var=LD_LIBRARY_PATH
  1665. case $host_vendor in
  1666. sni)
  1667. shlibpath_overrides_runpath=no
  1668. need_lib_prefix=no
  1669. export_dynamic_flag_spec='${wl}-Blargedynsym'
  1670. runpath_var=LD_RUN_PATH
  1671. ;;
  1672. siemens)
  1673. need_lib_prefix=no
  1674. ;;
  1675. motorola)
  1676. need_lib_prefix=no
  1677. need_version=no
  1678. shlibpath_overrides_runpath=no
  1679. sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  1680. ;;
  1681. esac
  1682. ;;
  1683. sysv4*MP*)
  1684. if test -d /usr/nec ;then
  1685. version_type=linux
  1686. library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
  1687. soname_spec='$libname${shared_ext}.$major'
  1688. shlibpath_var=LD_LIBRARY_PATH
  1689. fi
  1690. ;;
  1691. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  1692. version_type=freebsd-elf
  1693. need_lib_prefix=no
  1694. need_version=no
  1695. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  1696. soname_spec='${libname}${release}${shared_ext}$major'
  1697. shlibpath_var=LD_LIBRARY_PATH
  1698. hardcode_into_libs=yes
  1699. if test "$with_gnu_ld" = yes; then
  1700. sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
  1701. shlibpath_overrides_runpath=no
  1702. else
  1703. sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
  1704. shlibpath_overrides_runpath=yes
  1705. case $host_os in
  1706. sco3.2v5*)
  1707. sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
  1708. ;;
  1709. esac
  1710. fi
  1711. sys_lib_dlsearch_path_spec='/usr/lib'
  1712. ;;
  1713. uts4*)
  1714. version_type=linux
  1715. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1716. soname_spec='${libname}${release}${shared_ext}$major'
  1717. shlibpath_var=LD_LIBRARY_PATH
  1718. ;;
  1719. *)
  1720. dynamic_linker=no
  1721. ;;
  1722. esac
  1723. AC_MSG_RESULT([$dynamic_linker])
  1724. test "$dynamic_linker" = no && can_build_shared=no
  1725. AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec],
  1726. [lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"])
  1727. sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
  1728. AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec],
  1729. [lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"])
  1730. sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
  1731. variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  1732. if test "$GCC" = yes; then
  1733. variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  1734. fi
  1735. ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
  1736. # _LT_AC_TAGCONFIG
  1737. # ----------------
  1738. AC_DEFUN([_LT_AC_TAGCONFIG],
  1739. [AC_REQUIRE([LT_AC_PROG_SED])dnl
  1740. AC_ARG_WITH([tags],
  1741. [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
  1742. [include additional configurations @<:@automatic@:>@])],
  1743. [tagnames="$withval"])
  1744. if test -f "$ltmain" && test -n "$tagnames"; then
  1745. if test ! -f "${ofile}"; then
  1746. AC_MSG_WARN([output file `$ofile' does not exist])
  1747. fi
  1748. if test -z "$LTCC"; then
  1749. eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
  1750. if test -z "$LTCC"; then
  1751. AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
  1752. else
  1753. AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
  1754. fi
  1755. fi
  1756. if test -z "$LTCFLAGS"; then
  1757. eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
  1758. fi
  1759. # Extract list of available tagged configurations in $ofile.
  1760. # Note that this assumes the entire list is on one line.
  1761. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
  1762. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  1763. for tagname in $tagnames; do
  1764. IFS="$lt_save_ifs"
  1765. # Check whether tagname contains only valid characters
  1766. case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
  1767. "") ;;
  1768. *) AC_MSG_ERROR([invalid tag name: $tagname])
  1769. ;;
  1770. esac
  1771. if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
  1772. then
  1773. AC_MSG_ERROR([tag name \"$tagname\" already exists])
  1774. fi
  1775. # Update the list of available tags.
  1776. if test -n "$tagname"; then
  1777. echo appending configuration tag \"$tagname\" to $ofile
  1778. case $tagname in
  1779. CXX)
  1780. if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
  1781. ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
  1782. (test "X$CXX" != "Xg++"))) ; then
  1783. AC_LIBTOOL_LANG_CXX_CONFIG
  1784. else
  1785. tagname=""
  1786. fi
  1787. ;;
  1788. F77)
  1789. if test -n "$F77" && test "X$F77" != "Xno"; then
  1790. AC_LIBTOOL_LANG_F77_CONFIG
  1791. else
  1792. tagname=""
  1793. fi
  1794. ;;
  1795. GCJ)
  1796. if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
  1797. AC_LIBTOOL_LANG_GCJ_CONFIG
  1798. else
  1799. tagname=""
  1800. fi
  1801. ;;
  1802. RC)
  1803. AC_LIBTOOL_LANG_RC_CONFIG
  1804. ;;
  1805. *)
  1806. AC_MSG_ERROR([Unsupported tag name: $tagname])
  1807. ;;
  1808. esac
  1809. # Append the new tag name to the list of available tags.
  1810. if test -n "$tagname" ; then
  1811. available_tags="$available_tags $tagname"
  1812. fi
  1813. fi
  1814. done
  1815. IFS="$lt_save_ifs"
  1816. # Now substitute the updated list of available tags.
  1817. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
  1818. mv "${ofile}T" "$ofile"
  1819. chmod +x "$ofile"
  1820. else
  1821. rm -f "${ofile}T"
  1822. AC_MSG_ERROR([unable to update list of available tagged configurations.])
  1823. fi
  1824. fi
  1825. ])# _LT_AC_TAGCONFIG
  1826. # AC_LIBTOOL_DLOPEN
  1827. # -----------------
  1828. # enable checks for dlopen support
  1829. AC_DEFUN([AC_LIBTOOL_DLOPEN],
  1830. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
  1831. ])# AC_LIBTOOL_DLOPEN
  1832. # AC_LIBTOOL_WIN32_DLL
  1833. # --------------------
  1834. # declare package support for building win32 DLLs
  1835. AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
  1836. [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
  1837. ])# AC_LIBTOOL_WIN32_DLL
  1838. # AC_ENABLE_SHARED([DEFAULT])
  1839. # ---------------------------
  1840. # implement the --enable-shared flag
  1841. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  1842. AC_DEFUN([AC_ENABLE_SHARED],
  1843. [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
  1844. AC_ARG_ENABLE([shared],
  1845. [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
  1846. [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
  1847. [p=${PACKAGE-default}
  1848. case $enableval in
  1849. yes) enable_shared=yes ;;
  1850. no) enable_shared=no ;;
  1851. *)
  1852. enable_shared=no
  1853. # Look at the argument we got. We use all the common list separators.
  1854. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  1855. for pkg in $enableval; do
  1856. IFS="$lt_save_ifs"
  1857. if test "X$pkg" = "X$p"; then
  1858. enable_shared=yes
  1859. fi
  1860. done
  1861. IFS="$lt_save_ifs"
  1862. ;;
  1863. esac],
  1864. [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
  1865. ])# AC_ENABLE_SHARED
  1866. # AC_DISABLE_SHARED
  1867. # -----------------
  1868. # set the default shared flag to --disable-shared
  1869. AC_DEFUN([AC_DISABLE_SHARED],
  1870. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  1871. AC_ENABLE_SHARED(no)
  1872. ])# AC_DISABLE_SHARED
  1873. # AC_ENABLE_STATIC([DEFAULT])
  1874. # ---------------------------
  1875. # implement the --enable-static flag
  1876. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  1877. AC_DEFUN([AC_ENABLE_STATIC],
  1878. [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
  1879. AC_ARG_ENABLE([static],
  1880. [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
  1881. [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
  1882. [p=${PACKAGE-default}
  1883. case $enableval in
  1884. yes) enable_static=yes ;;
  1885. no) enable_static=no ;;
  1886. *)
  1887. enable_static=no
  1888. # Look at the argument we got. We use all the common list separators.
  1889. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  1890. for pkg in $enableval; do
  1891. IFS="$lt_save_ifs"
  1892. if test "X$pkg" = "X$p"; then
  1893. enable_static=yes
  1894. fi
  1895. done
  1896. IFS="$lt_save_ifs"
  1897. ;;
  1898. esac],
  1899. [enable_static=]AC_ENABLE_STATIC_DEFAULT)
  1900. ])# AC_ENABLE_STATIC
  1901. # AC_DISABLE_STATIC
  1902. # -----------------
  1903. # set the default static flag to --disable-static
  1904. AC_DEFUN([AC_DISABLE_STATIC],
  1905. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  1906. AC_ENABLE_STATIC(no)
  1907. ])# AC_DISABLE_STATIC
  1908. # AC_ENABLE_FAST_INSTALL([DEFAULT])
  1909. # ---------------------------------
  1910. # implement the --enable-fast-install flag
  1911. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  1912. AC_DEFUN([AC_ENABLE_FAST_INSTALL],
  1913. [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
  1914. AC_ARG_ENABLE([fast-install],
  1915. [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
  1916. [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
  1917. [p=${PACKAGE-default}
  1918. case $enableval in
  1919. yes) enable_fast_install=yes ;;
  1920. no) enable_fast_install=no ;;
  1921. *)
  1922. enable_fast_install=no
  1923. # Look at the argument we got. We use all the common list separators.
  1924. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  1925. for pkg in $enableval; do
  1926. IFS="$lt_save_ifs"
  1927. if test "X$pkg" = "X$p"; then
  1928. enable_fast_install=yes
  1929. fi
  1930. done
  1931. IFS="$lt_save_ifs"
  1932. ;;
  1933. esac],
  1934. [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
  1935. ])# AC_ENABLE_FAST_INSTALL
  1936. # AC_DISABLE_FAST_INSTALL
  1937. # -----------------------
  1938. # set the default to --disable-fast-install
  1939. AC_DEFUN([AC_DISABLE_FAST_INSTALL],
  1940. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  1941. AC_ENABLE_FAST_INSTALL(no)
  1942. ])# AC_DISABLE_FAST_INSTALL
  1943. # AC_LIBTOOL_PICMODE([MODE])
  1944. # --------------------------
  1945. # implement the --with-pic flag
  1946. # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
  1947. AC_DEFUN([AC_LIBTOOL_PICMODE],
  1948. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  1949. pic_mode=ifelse($#,1,$1,default)
  1950. ])# AC_LIBTOOL_PICMODE
  1951. # AC_PROG_EGREP
  1952. # -------------
  1953. # This is predefined starting with Autoconf 2.54, so this conditional
  1954. # definition can be removed once we require Autoconf 2.54 or later.
  1955. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
  1956. [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
  1957. [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
  1958. then ac_cv_prog_egrep='grep -E'
  1959. else ac_cv_prog_egrep='egrep'
  1960. fi])
  1961. EGREP=$ac_cv_prog_egrep
  1962. AC_SUBST([EGREP])
  1963. ])])
  1964. # AC_PATH_TOOL_PREFIX
  1965. # -------------------
  1966. # find a file program which can recognize shared library
  1967. AC_DEFUN([AC_PATH_TOOL_PREFIX],
  1968. [AC_REQUIRE([AC_PROG_EGREP])dnl
  1969. AC_MSG_CHECKING([for $1])
  1970. AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
  1971. [case $MAGIC_CMD in
  1972. [[\\/*] | ?:[\\/]*])
  1973. lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
  1974. ;;
  1975. *)
  1976. lt_save_MAGIC_CMD="$MAGIC_CMD"
  1977. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  1978. dnl $ac_dummy forces splitting on constant user-supplied paths.
  1979. dnl POSIX.2 word splitting is done only on the output of word expansions,
  1980. dnl not every word. This closes a longstanding sh security hole.
  1981. ac_dummy="ifelse([$2], , $PATH, [$2])"
  1982. for ac_dir in $ac_dummy; do
  1983. IFS="$lt_save_ifs"
  1984. test -z "$ac_dir" && ac_dir=.
  1985. if test -f $ac_dir/$1; then
  1986. lt_cv_path_MAGIC_CMD="$ac_dir/$1"
  1987. if test -n "$file_magic_test_file"; then
  1988. case $deplibs_check_method in
  1989. "file_magic "*)
  1990. file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
  1991. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  1992. if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  1993. $EGREP "$file_magic_regex" > /dev/null; then
  1994. :
  1995. else
  1996. cat <<EOF 1>&2
  1997. *** Warning: the command libtool uses to detect shared libraries,
  1998. *** $file_magic_cmd, produces output that libtool cannot recognize.
  1999. *** The result is that libtool may fail to recognize shared libraries
  2000. *** as such. This will affect the creation of libtool libraries that
  2001. *** depend on shared libraries, but programs linked with such libtool
  2002. *** libraries will work regardless of this problem. Nevertheless, you
  2003. *** may want to report the problem to your system manager and/or to
  2004. *** bug-libtool@gnu.org
  2005. EOF
  2006. fi ;;
  2007. esac
  2008. fi
  2009. break
  2010. fi
  2011. done
  2012. IFS="$lt_save_ifs"
  2013. MAGIC_CMD="$lt_save_MAGIC_CMD"
  2014. ;;
  2015. esac])
  2016. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  2017. if test -n "$MAGIC_CMD"; then
  2018. AC_MSG_RESULT($MAGIC_CMD)
  2019. else
  2020. AC_MSG_RESULT(no)
  2021. fi
  2022. ])# AC_PATH_TOOL_PREFIX
  2023. # AC_PATH_MAGIC
  2024. # -------------
  2025. # find a file program which can recognize a shared library
  2026. AC_DEFUN([AC_PATH_MAGIC],
  2027. [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
  2028. if test -z "$lt_cv_path_MAGIC_CMD"; then
  2029. if test -n "$ac_tool_prefix"; then
  2030. AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
  2031. else
  2032. MAGIC_CMD=:
  2033. fi
  2034. fi
  2035. ])# AC_PATH_MAGIC
  2036. # AC_PROG_LD
  2037. # ----------
  2038. # find the pathname to the GNU or non-GNU linker
  2039. AC_DEFUN([AC_PROG_LD],
  2040. [AC_ARG_WITH([gnu-ld],
  2041. [AC_HELP_STRING([--with-gnu-ld],
  2042. [assume the C compiler uses GNU ld @<:@default=no@:>@])],
  2043. [test "$withval" = no || with_gnu_ld=yes],
  2044. [with_gnu_ld=no])
  2045. AC_REQUIRE([LT_AC_PROG_SED])dnl
  2046. AC_REQUIRE([AC_PROG_CC])dnl
  2047. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2048. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  2049. ac_prog=ld
  2050. if test "$GCC" = yes; then
  2051. # Check if gcc -print-prog-name=ld gives a path.
  2052. AC_MSG_CHECKING([for ld used by $CC])
  2053. case $host in
  2054. *-*-mingw*)
  2055. # gcc leaves a trailing carriage return which upsets mingw
  2056. ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  2057. *)
  2058. ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  2059. esac
  2060. case $ac_prog in
  2061. # Accept absolute paths.
  2062. [[\\/]]* | ?:[[\\/]]*)
  2063. re_direlt='/[[^/]][[^/]]*/\.\./'
  2064. # Canonicalize the pathname of ld
  2065. ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
  2066. while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
  2067. ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
  2068. done
  2069. test -z "$LD" && LD="$ac_prog"
  2070. ;;
  2071. "")
  2072. # If it fails, then pretend we aren't using GCC.
  2073. ac_prog=ld
  2074. ;;
  2075. *)
  2076. # If it is relative, then search for the first ld in PATH.
  2077. with_gnu_ld=unknown
  2078. ;;
  2079. esac
  2080. elif test "$with_gnu_ld" = yes; then
  2081. AC_MSG_CHECKING([for GNU ld])
  2082. else
  2083. AC_MSG_CHECKING([for non-GNU ld])
  2084. fi
  2085. AC_CACHE_VAL(lt_cv_path_LD,
  2086. [if test -z "$LD"; then
  2087. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  2088. for ac_dir in $PATH; do
  2089. IFS="$lt_save_ifs"
  2090. test -z "$ac_dir" && ac_dir=.
  2091. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  2092. lt_cv_path_LD="$ac_dir/$ac_prog"
  2093. # Check to see if the program is GNU ld. I'd rather use --version,
  2094. # but apparently some variants of GNU ld only accept -v.
  2095. # Break only if it was the GNU/non-GNU ld that we prefer.
  2096. case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
  2097. *GNU* | *'with BFD'*)
  2098. test "$with_gnu_ld" != no && break
  2099. ;;
  2100. *)
  2101. test "$with_gnu_ld" != yes && break
  2102. ;;
  2103. esac
  2104. fi
  2105. done
  2106. IFS="$lt_save_ifs"
  2107. else
  2108. lt_cv_path_LD="$LD" # Let the user override the test with a path.
  2109. fi])
  2110. LD="$lt_cv_path_LD"
  2111. if test -n "$LD"; then
  2112. AC_MSG_RESULT($LD)
  2113. else
  2114. AC_MSG_RESULT(no)
  2115. fi
  2116. test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  2117. AC_PROG_LD_GNU
  2118. ])# AC_PROG_LD
  2119. # AC_PROG_LD_GNU
  2120. # --------------
  2121. AC_DEFUN([AC_PROG_LD_GNU],
  2122. [AC_REQUIRE([AC_PROG_EGREP])dnl
  2123. AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
  2124. [# I'd rather use --version here, but apparently some GNU lds only accept -v.
  2125. case `$LD -v 2>&1 </dev/null` in
  2126. *GNU* | *'with BFD'*)
  2127. lt_cv_prog_gnu_ld=yes
  2128. ;;
  2129. *)
  2130. lt_cv_prog_gnu_ld=no
  2131. ;;
  2132. esac])
  2133. with_gnu_ld=$lt_cv_prog_gnu_ld
  2134. ])# AC_PROG_LD_GNU
  2135. # AC_PROG_LD_RELOAD_FLAG
  2136. # ----------------------
  2137. # find reload flag for linker
  2138. # -- PORTME Some linkers may need a different reload flag.
  2139. AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
  2140. [AC_CACHE_CHECK([for $LD option to reload object files],
  2141. lt_cv_ld_reload_flag,
  2142. [lt_cv_ld_reload_flag='-r'])
  2143. reload_flag=$lt_cv_ld_reload_flag
  2144. case $reload_flag in
  2145. "" | " "*) ;;
  2146. *) reload_flag=" $reload_flag" ;;
  2147. esac
  2148. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  2149. case $host_os in
  2150. darwin*)
  2151. if test "$GCC" = yes; then
  2152. reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
  2153. else
  2154. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  2155. fi
  2156. ;;
  2157. esac
  2158. ])# AC_PROG_LD_RELOAD_FLAG
  2159. # AC_DEPLIBS_CHECK_METHOD
  2160. # -----------------------
  2161. # how to check for library dependencies
  2162. # -- PORTME fill in with the dynamic library characteristics
  2163. AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
  2164. [AC_CACHE_CHECK([how to recognize dependent libraries],
  2165. lt_cv_deplibs_check_method,
  2166. [lt_cv_file_magic_cmd='$MAGIC_CMD'
  2167. lt_cv_file_magic_test_file=
  2168. lt_cv_deplibs_check_method='unknown'
  2169. # Need to set the preceding variable on all platforms that support
  2170. # interlibrary dependencies.
  2171. # 'none' -- dependencies not supported.
  2172. # `unknown' -- same as none, but documents that we really don't know.
  2173. # 'pass_all' -- all dependencies passed with no checks.
  2174. # 'test_compile' -- check by making test program.
  2175. # 'file_magic [[regex]]' -- check by looking for files in library path
  2176. # which responds to the $file_magic_cmd with a given extended regex.
  2177. # If you have `file' or equivalent on your system and you're not sure
  2178. # whether `pass_all' will *always* work, you probably want this one.
  2179. case $host_os in
  2180. aix[[4-9]]*)
  2181. lt_cv_deplibs_check_method=pass_all
  2182. ;;
  2183. beos*)
  2184. lt_cv_deplibs_check_method=pass_all
  2185. ;;
  2186. bsdi[[45]]*)
  2187. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
  2188. lt_cv_file_magic_cmd='/usr/bin/file -L'
  2189. lt_cv_file_magic_test_file=/shlib/libc.so
  2190. ;;
  2191. cygwin*)
  2192. # func_win32_libid is a shell function defined in ltmain.sh
  2193. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  2194. lt_cv_file_magic_cmd='func_win32_libid'
  2195. ;;
  2196. mingw* | pw32*)
  2197. # Base MSYS/MinGW do not provide the 'file' command needed by
  2198. # func_win32_libid shell function, so use a weaker test based on 'objdump',
  2199. # unless we find 'file', for example because we are cross-compiling.
  2200. if ( file / ) >/dev/null 2>&1; then
  2201. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  2202. lt_cv_file_magic_cmd='func_win32_libid'
  2203. else
  2204. lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
  2205. lt_cv_file_magic_cmd='$OBJDUMP -f'
  2206. fi
  2207. ;;
  2208. darwin* | rhapsody*)
  2209. lt_cv_deplibs_check_method=pass_all
  2210. ;;
  2211. freebsd* | dragonfly*)
  2212. if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  2213. case $host_cpu in
  2214. i*86 )
  2215. # Not sure whether the presence of OpenBSD here was a mistake.
  2216. # Let's accept both of them until this is cleared up.
  2217. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
  2218. lt_cv_file_magic_cmd=/usr/bin/file
  2219. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  2220. ;;
  2221. esac
  2222. else
  2223. lt_cv_deplibs_check_method=pass_all
  2224. fi
  2225. ;;
  2226. gnu*)
  2227. lt_cv_deplibs_check_method=pass_all
  2228. ;;
  2229. hpux10.20* | hpux11*)
  2230. lt_cv_file_magic_cmd=/usr/bin/file
  2231. case $host_cpu in
  2232. ia64*)
  2233. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
  2234. lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
  2235. ;;
  2236. hppa*64*)
  2237. [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
  2238. lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
  2239. ;;
  2240. *)
  2241. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
  2242. lt_cv_file_magic_test_file=/usr/lib/libc.sl
  2243. ;;
  2244. esac
  2245. ;;
  2246. interix[[3-9]]*)
  2247. # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
  2248. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
  2249. ;;
  2250. irix5* | irix6* | nonstopux*)
  2251. case $LD in
  2252. *-32|*"-32 ") libmagic=32-bit;;
  2253. *-n32|*"-n32 ") libmagic=N32;;
  2254. *-64|*"-64 ") libmagic=64-bit;;
  2255. *) libmagic=never-match;;
  2256. esac
  2257. lt_cv_deplibs_check_method=pass_all
  2258. ;;
  2259. # This must be Linux ELF.
  2260. linux* | k*bsd*-gnu)
  2261. lt_cv_deplibs_check_method=pass_all
  2262. ;;
  2263. netbsd*)
  2264. if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  2265. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  2266. else
  2267. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
  2268. fi
  2269. ;;
  2270. newos6*)
  2271. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
  2272. lt_cv_file_magic_cmd=/usr/bin/file
  2273. lt_cv_file_magic_test_file=/usr/lib/libnls.so
  2274. ;;
  2275. nto-qnx*)
  2276. lt_cv_deplibs_check_method=unknown
  2277. ;;
  2278. openbsd*)
  2279. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  2280. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
  2281. else
  2282. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  2283. fi
  2284. ;;
  2285. osf3* | osf4* | osf5*)
  2286. lt_cv_deplibs_check_method=pass_all
  2287. ;;
  2288. rdos*)
  2289. lt_cv_deplibs_check_method=pass_all
  2290. ;;
  2291. solaris*)
  2292. lt_cv_deplibs_check_method=pass_all
  2293. ;;
  2294. sysv4 | sysv4.3*)
  2295. case $host_vendor in
  2296. motorola)
  2297. 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]]'
  2298. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  2299. ;;
  2300. ncr)
  2301. lt_cv_deplibs_check_method=pass_all
  2302. ;;
  2303. sequent)
  2304. lt_cv_file_magic_cmd='/bin/file'
  2305. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
  2306. ;;
  2307. sni)
  2308. lt_cv_file_magic_cmd='/bin/file'
  2309. lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
  2310. lt_cv_file_magic_test_file=/lib/libc.so
  2311. ;;
  2312. siemens)
  2313. lt_cv_deplibs_check_method=pass_all
  2314. ;;
  2315. pc)
  2316. lt_cv_deplibs_check_method=pass_all
  2317. ;;
  2318. esac
  2319. ;;
  2320. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  2321. lt_cv_deplibs_check_method=pass_all
  2322. ;;
  2323. esac
  2324. ])
  2325. file_magic_cmd=$lt_cv_file_magic_cmd
  2326. deplibs_check_method=$lt_cv_deplibs_check_method
  2327. test -z "$deplibs_check_method" && deplibs_check_method=unknown
  2328. ])# AC_DEPLIBS_CHECK_METHOD
  2329. # AC_PROG_NM
  2330. # ----------
  2331. # find the pathname to a BSD-compatible name lister
  2332. AC_DEFUN([AC_PROG_NM],
  2333. [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
  2334. [if test -n "$NM"; then
  2335. # Let the user override the test.
  2336. lt_cv_path_NM="$NM"
  2337. else
  2338. lt_nm_to_check="${ac_tool_prefix}nm"
  2339. if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
  2340. lt_nm_to_check="$lt_nm_to_check nm"
  2341. fi
  2342. for lt_tmp_nm in $lt_nm_to_check; do
  2343. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  2344. for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
  2345. IFS="$lt_save_ifs"
  2346. test -z "$ac_dir" && ac_dir=.
  2347. tmp_nm="$ac_dir/$lt_tmp_nm"
  2348. if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
  2349. # Check to see if the nm accepts a BSD-compat flag.
  2350. # Adding the `sed 1q' prevents false positives on HP-UX, which says:
  2351. # nm: unknown option "B" ignored
  2352. # Tru64's nm complains that /dev/null is an invalid object file
  2353. case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
  2354. */dev/null* | *'Invalid file or object type'*)
  2355. lt_cv_path_NM="$tmp_nm -B"
  2356. break
  2357. ;;
  2358. *)
  2359. case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
  2360. */dev/null*)
  2361. lt_cv_path_NM="$tmp_nm -p"
  2362. break
  2363. ;;
  2364. *)
  2365. lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
  2366. continue # so that we can try to find one that supports BSD flags
  2367. ;;
  2368. esac
  2369. ;;
  2370. esac
  2371. fi
  2372. done
  2373. IFS="$lt_save_ifs"
  2374. done
  2375. test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
  2376. fi])
  2377. NM="$lt_cv_path_NM"
  2378. ])# AC_PROG_NM
  2379. # AC_CHECK_LIBM
  2380. # -------------
  2381. # check for math library
  2382. AC_DEFUN([AC_CHECK_LIBM],
  2383. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2384. LIBM=
  2385. case $host in
  2386. *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
  2387. # These system don't have libm, or don't need it
  2388. ;;
  2389. *-ncr-sysv4.3*)
  2390. AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
  2391. AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
  2392. ;;
  2393. *)
  2394. AC_CHECK_LIB(m, cos, LIBM="-lm")
  2395. ;;
  2396. esac
  2397. ])# AC_CHECK_LIBM
  2398. # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
  2399. # -----------------------------------
  2400. # sets LIBLTDL to the link flags for the libltdl convenience library and
  2401. # LTDLINCL to the include flags for the libltdl header and adds
  2402. # --enable-ltdl-convenience to the configure arguments. Note that
  2403. # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
  2404. # it is assumed to be `libltdl'. LIBLTDL will be prefixed with
  2405. # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
  2406. # (note the single quotes!). If your package is not flat and you're not
  2407. # using automake, define top_builddir and top_srcdir appropriately in
  2408. # the Makefiles.
  2409. AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
  2410. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  2411. case $enable_ltdl_convenience in
  2412. no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
  2413. "") enable_ltdl_convenience=yes
  2414. ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
  2415. esac
  2416. LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
  2417. LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
  2418. # For backwards non-gettext consistent compatibility...
  2419. INCLTDL="$LTDLINCL"
  2420. ])# AC_LIBLTDL_CONVENIENCE
  2421. # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
  2422. # -----------------------------------
  2423. # sets LIBLTDL to the link flags for the libltdl installable library and
  2424. # LTDLINCL to the include flags for the libltdl header and adds
  2425. # --enable-ltdl-install to the configure arguments. Note that
  2426. # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
  2427. # and an installed libltdl is not found, it is assumed to be `libltdl'.
  2428. # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
  2429. # '${top_srcdir}/' (note the single quotes!). If your package is not
  2430. # flat and you're not using automake, define top_builddir and top_srcdir
  2431. # appropriately in the Makefiles.
  2432. # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
  2433. AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
  2434. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  2435. AC_CHECK_LIB(ltdl, lt_dlinit,
  2436. [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
  2437. [if test x"$enable_ltdl_install" = xno; then
  2438. AC_MSG_WARN([libltdl not installed, but installation disabled])
  2439. else
  2440. enable_ltdl_install=yes
  2441. fi
  2442. ])
  2443. if test x"$enable_ltdl_install" = x"yes"; then
  2444. ac_configure_args="$ac_configure_args --enable-ltdl-install"
  2445. LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
  2446. LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
  2447. else
  2448. ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
  2449. LIBLTDL="-lltdl"
  2450. LTDLINCL=
  2451. fi
  2452. # For backwards non-gettext consistent compatibility...
  2453. INCLTDL="$LTDLINCL"
  2454. ])# AC_LIBLTDL_INSTALLABLE
  2455. # AC_LIBTOOL_CXX
  2456. # --------------
  2457. # enable support for C++ libraries
  2458. AC_DEFUN([AC_LIBTOOL_CXX],
  2459. [AC_REQUIRE([_LT_AC_LANG_CXX])
  2460. ])# AC_LIBTOOL_CXX
  2461. # _LT_AC_LANG_CXX
  2462. # ---------------
  2463. AC_DEFUN([_LT_AC_LANG_CXX],
  2464. [AC_REQUIRE([AC_PROG_CXX])
  2465. AC_REQUIRE([_LT_AC_PROG_CXXCPP])
  2466. _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
  2467. ])# _LT_AC_LANG_CXX
  2468. # _LT_AC_PROG_CXXCPP
  2469. # ------------------
  2470. AC_DEFUN([_LT_AC_PROG_CXXCPP],
  2471. [
  2472. AC_REQUIRE([AC_PROG_CXX])
  2473. if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
  2474. ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
  2475. (test "X$CXX" != "Xg++"))) ; then
  2476. AC_PROG_CXXCPP
  2477. fi
  2478. ])# _LT_AC_PROG_CXXCPP
  2479. # AC_LIBTOOL_F77
  2480. # --------------
  2481. # enable support for Fortran 77 libraries
  2482. AC_DEFUN([AC_LIBTOOL_F77],
  2483. [AC_REQUIRE([_LT_AC_LANG_F77])
  2484. ])# AC_LIBTOOL_F77
  2485. # _LT_AC_LANG_F77
  2486. # ---------------
  2487. AC_DEFUN([_LT_AC_LANG_F77],
  2488. [AC_REQUIRE([AC_PROG_F77])
  2489. _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
  2490. ])# _LT_AC_LANG_F77
  2491. # AC_LIBTOOL_GCJ
  2492. # --------------
  2493. # enable support for GCJ libraries
  2494. AC_DEFUN([AC_LIBTOOL_GCJ],
  2495. [AC_REQUIRE([_LT_AC_LANG_GCJ])
  2496. ])# AC_LIBTOOL_GCJ
  2497. # _LT_AC_LANG_GCJ
  2498. # ---------------
  2499. AC_DEFUN([_LT_AC_LANG_GCJ],
  2500. [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
  2501. [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
  2502. [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
  2503. [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
  2504. [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
  2505. [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
  2506. _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
  2507. ])# _LT_AC_LANG_GCJ
  2508. # AC_LIBTOOL_RC
  2509. # -------------
  2510. # enable support for Windows resource files
  2511. AC_DEFUN([AC_LIBTOOL_RC],
  2512. [AC_REQUIRE([LT_AC_PROG_RC])
  2513. _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
  2514. ])# AC_LIBTOOL_RC
  2515. # AC_LIBTOOL_LANG_C_CONFIG
  2516. # ------------------------
  2517. # Ensure that the configuration vars for the C compiler are
  2518. # suitably defined. Those variables are subsequently used by
  2519. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  2520. AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
  2521. AC_DEFUN([_LT_AC_LANG_C_CONFIG],
  2522. [lt_save_CC="$CC"
  2523. AC_LANG_PUSH(C)
  2524. # Source file extension for C test sources.
  2525. ac_ext=c
  2526. # Object file extension for compiled C test sources.
  2527. objext=o
  2528. _LT_AC_TAGVAR(objext, $1)=$objext
  2529. # Code to be used in simple compile tests
  2530. lt_simple_compile_test_code="int some_variable = 0;"
  2531. # Code to be used in simple link tests
  2532. lt_simple_link_test_code='int main(){return(0);}'
  2533. _LT_AC_SYS_COMPILER
  2534. # save warnings/boilerplate of simple test code
  2535. _LT_COMPILER_BOILERPLATE
  2536. _LT_LINKER_BOILERPLATE
  2537. AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
  2538. AC_LIBTOOL_PROG_COMPILER_PIC($1)
  2539. AC_LIBTOOL_PROG_CC_C_O($1)
  2540. AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
  2541. AC_LIBTOOL_PROG_LD_SHLIBS($1)
  2542. AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  2543. AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  2544. AC_LIBTOOL_SYS_LIB_STRIP
  2545. AC_LIBTOOL_DLOPEN_SELF
  2546. # Report which library types will actually be built
  2547. AC_MSG_CHECKING([if libtool supports shared libraries])
  2548. AC_MSG_RESULT([$can_build_shared])
  2549. AC_MSG_CHECKING([whether to build shared libraries])
  2550. test "$can_build_shared" = "no" && enable_shared=no
  2551. # On AIX, shared libraries and static libraries use the same namespace, and
  2552. # are all built from PIC.
  2553. case $host_os in
  2554. aix3*)
  2555. test "$enable_shared" = yes && enable_static=no
  2556. if test -n "$RANLIB"; then
  2557. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  2558. postinstall_cmds='$RANLIB $lib'
  2559. fi
  2560. ;;
  2561. aix[[4-9]]*)
  2562. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  2563. test "$enable_shared" = yes && enable_static=no
  2564. fi
  2565. ;;
  2566. esac
  2567. AC_MSG_RESULT([$enable_shared])
  2568. AC_MSG_CHECKING([whether to build static libraries])
  2569. # Make sure either enable_shared or enable_static is yes.
  2570. test "$enable_shared" = yes || enable_static=yes
  2571. AC_MSG_RESULT([$enable_static])
  2572. AC_LIBTOOL_CONFIG($1)
  2573. AC_LANG_POP
  2574. CC="$lt_save_CC"
  2575. ])# AC_LIBTOOL_LANG_C_CONFIG
  2576. # AC_LIBTOOL_LANG_CXX_CONFIG
  2577. # --------------------------
  2578. # Ensure that the configuration vars for the C compiler are
  2579. # suitably defined. Those variables are subsequently used by
  2580. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  2581. AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
  2582. AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
  2583. [AC_LANG_PUSH(C++)
  2584. AC_REQUIRE([AC_PROG_CXX])
  2585. AC_REQUIRE([_LT_AC_PROG_CXXCPP])
  2586. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  2587. _LT_AC_TAGVAR(allow_undefined_flag, $1)=
  2588. _LT_AC_TAGVAR(always_export_symbols, $1)=no
  2589. _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
  2590. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
  2591. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  2592. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
  2593. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  2594. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  2595. _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
  2596. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  2597. _LT_AC_TAGVAR(hardcode_automatic, $1)=no
  2598. _LT_AC_TAGVAR(module_cmds, $1)=
  2599. _LT_AC_TAGVAR(module_expsym_cmds, $1)=
  2600. _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
  2601. _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  2602. _LT_AC_TAGVAR(no_undefined_flag, $1)=
  2603. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  2604. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  2605. # Dependencies to place before and after the object being linked:
  2606. _LT_AC_TAGVAR(predep_objects, $1)=
  2607. _LT_AC_TAGVAR(postdep_objects, $1)=
  2608. _LT_AC_TAGVAR(predeps, $1)=
  2609. _LT_AC_TAGVAR(postdeps, $1)=
  2610. _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
  2611. _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
  2612. # Source file extension for C++ test sources.
  2613. ac_ext=cpp
  2614. # Object file extension for compiled C++ test sources.
  2615. objext=o
  2616. _LT_AC_TAGVAR(objext, $1)=$objext
  2617. # Code to be used in simple compile tests
  2618. lt_simple_compile_test_code="int some_variable = 0;"
  2619. # Code to be used in simple link tests
  2620. lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
  2621. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  2622. _LT_AC_SYS_COMPILER
  2623. # save warnings/boilerplate of simple test code
  2624. _LT_COMPILER_BOILERPLATE
  2625. _LT_LINKER_BOILERPLATE
  2626. # Allow CC to be a program name with arguments.
  2627. lt_save_CC=$CC
  2628. lt_save_LD=$LD
  2629. lt_save_GCC=$GCC
  2630. GCC=$GXX
  2631. lt_save_with_gnu_ld=$with_gnu_ld
  2632. lt_save_path_LD=$lt_cv_path_LD
  2633. if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
  2634. lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
  2635. else
  2636. $as_unset lt_cv_prog_gnu_ld
  2637. fi
  2638. if test -n "${lt_cv_path_LDCXX+set}"; then
  2639. lt_cv_path_LD=$lt_cv_path_LDCXX
  2640. else
  2641. $as_unset lt_cv_path_LD
  2642. fi
  2643. test -z "${LDCXX+set}" || LD=$LDCXX
  2644. CC=${CXX-"c++"}
  2645. compiler=$CC
  2646. _LT_AC_TAGVAR(compiler, $1)=$CC
  2647. _LT_CC_BASENAME([$compiler])
  2648. # We don't want -fno-exception wen compiling C++ code, so set the
  2649. # no_builtin_flag separately
  2650. if test "$GXX" = yes; then
  2651. _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  2652. else
  2653. _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  2654. fi
  2655. if test "$GXX" = yes; then
  2656. # Set up default GNU C++ configuration
  2657. AC_PROG_LD
  2658. # Check if GNU C++ uses GNU ld as the underlying linker, since the
  2659. # archiving commands below assume that GNU ld is being used.
  2660. if test "$with_gnu_ld" = yes; then
  2661. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  2662. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  2663. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
  2664. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  2665. # If archive_cmds runs LD, not CC, wlarc should be empty
  2666. # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
  2667. # investigate it a little bit more. (MM)
  2668. wlarc='${wl}'
  2669. # ancient GNU ld didn't support --whole-archive et. al.
  2670. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
  2671. grep 'no-whole-archive' > /dev/null; then
  2672. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  2673. else
  2674. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  2675. fi
  2676. else
  2677. with_gnu_ld=no
  2678. wlarc=
  2679. # A generic and very simple default shared library creation
  2680. # command for GNU C++ for the case where it uses the native
  2681. # linker, instead of GNU ld. If possible, this setting should
  2682. # overridden to take advantage of the native linker features on
  2683. # the platform it is being used on.
  2684. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  2685. fi
  2686. # Commands to make compiler produce verbose output that lists
  2687. # what "hidden" libraries, object files and flags are used when
  2688. # linking a shared library.
  2689. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
  2690. else
  2691. GXX=no
  2692. with_gnu_ld=no
  2693. wlarc=
  2694. fi
  2695. # PORTME: fill in a description of your system's C++ link characteristics
  2696. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  2697. _LT_AC_TAGVAR(ld_shlibs, $1)=yes
  2698. case $host_os in
  2699. aix3*)
  2700. # FIXME: insert proper C++ library support
  2701. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2702. ;;
  2703. aix[[4-9]]*)
  2704. if test "$host_cpu" = ia64; then
  2705. # On IA64, the linker does run time linking by default, so we don't
  2706. # have to do anything special.
  2707. aix_use_runtimelinking=no
  2708. exp_sym_flag='-Bexport'
  2709. no_entry_flag=""
  2710. else
  2711. aix_use_runtimelinking=no
  2712. # Test if we are trying to use run time linking or normal
  2713. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  2714. # need to do runtime linking.
  2715. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  2716. for ld_flag in $LDFLAGS; do
  2717. case $ld_flag in
  2718. *-brtl*)
  2719. aix_use_runtimelinking=yes
  2720. break
  2721. ;;
  2722. esac
  2723. done
  2724. ;;
  2725. esac
  2726. exp_sym_flag='-bexport'
  2727. no_entry_flag='-bnoentry'
  2728. fi
  2729. # When large executables or shared objects are built, AIX ld can
  2730. # have problems creating the table of contents. If linking a library
  2731. # or program results in "error TOC overflow" add -mminimal-toc to
  2732. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  2733. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  2734. _LT_AC_TAGVAR(archive_cmds, $1)=''
  2735. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  2736. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
  2737. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  2738. if test "$GXX" = yes; then
  2739. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  2740. # We only want to do this on AIX 4.2 and lower, the check
  2741. # below for broken collect2 doesn't work under 4.3+
  2742. collect2name=`${CC} -print-prog-name=collect2`
  2743. if test -f "$collect2name" && \
  2744. strings "$collect2name" | grep resolve_lib_name >/dev/null
  2745. then
  2746. # We have reworked collect2
  2747. :
  2748. else
  2749. # We have old collect2
  2750. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
  2751. # It fails to find uninstalled libraries when the uninstalled
  2752. # path is not listed in the libpath. Setting hardcode_minus_L
  2753. # to unsupported forces relinking
  2754. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  2755. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  2756. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  2757. fi
  2758. ;;
  2759. esac
  2760. shared_flag='-shared'
  2761. if test "$aix_use_runtimelinking" = yes; then
  2762. shared_flag="$shared_flag "'${wl}-G'
  2763. fi
  2764. else
  2765. # not using gcc
  2766. if test "$host_cpu" = ia64; then
  2767. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  2768. # chokes on -Wl,-G. The following line is correct:
  2769. shared_flag='-G'
  2770. else
  2771. if test "$aix_use_runtimelinking" = yes; then
  2772. shared_flag='${wl}-G'
  2773. else
  2774. shared_flag='${wl}-bM:SRE'
  2775. fi
  2776. fi
  2777. fi
  2778. # It seems that -bexpall does not export symbols beginning with
  2779. # underscore (_), so it is better to generate a list of symbols to export.
  2780. _LT_AC_TAGVAR(always_export_symbols, $1)=yes
  2781. if test "$aix_use_runtimelinking" = yes; then
  2782. # Warning - without using the other runtime loading flags (-brtl),
  2783. # -berok will link without error, but may produce a broken library.
  2784. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
  2785. # Determine the default libpath from the value encoded in an empty executable.
  2786. _LT_AC_SYS_LIBPATH_AIX
  2787. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  2788. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
  2789. else
  2790. if test "$host_cpu" = ia64; then
  2791. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  2792. _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  2793. _LT_AC_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"
  2794. else
  2795. # Determine the default libpath from the value encoded in an empty executable.
  2796. _LT_AC_SYS_LIBPATH_AIX
  2797. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  2798. # Warning - without using the other run time loading flags,
  2799. # -berok will link without error, but may produce a broken library.
  2800. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  2801. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  2802. # Exported symbols can be pulled into shared objects from archives
  2803. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  2804. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
  2805. # This is similar to how AIX traditionally builds its shared libraries.
  2806. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
  2807. fi
  2808. fi
  2809. ;;
  2810. beos*)
  2811. if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  2812. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  2813. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  2814. # support --undefined. This deserves some investigation. FIXME
  2815. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  2816. else
  2817. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2818. fi
  2819. ;;
  2820. chorus*)
  2821. case $cc_basename in
  2822. *)
  2823. # FIXME: insert proper C++ library support
  2824. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2825. ;;
  2826. esac
  2827. ;;
  2828. cygwin* | mingw* | pw32*)
  2829. # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  2830. # as there is no search path for DLLs.
  2831. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  2832. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  2833. _LT_AC_TAGVAR(always_export_symbols, $1)=no
  2834. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  2835. if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
  2836. _LT_AC_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'
  2837. # If the export-symbols file already is a .def file (1st line
  2838. # is EXPORTS), use it as is; otherwise, prepend...
  2839. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  2840. cp $export_symbols $output_objdir/$soname.def;
  2841. else
  2842. echo EXPORTS > $output_objdir/$soname.def;
  2843. cat $export_symbols >> $output_objdir/$soname.def;
  2844. fi~
  2845. $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'
  2846. else
  2847. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2848. fi
  2849. ;;
  2850. darwin* | rhapsody*)
  2851. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  2852. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  2853. _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
  2854. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  2855. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
  2856. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  2857. _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
  2858. if test "$GXX" = yes ; then
  2859. output_verbose_link_cmd='echo'
  2860. _LT_AC_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}"
  2861. _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
  2862. _LT_AC_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}"
  2863. _LT_AC_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}"
  2864. if test "$lt_cv_apple_cc_single_mod" != "yes"; then
  2865. _LT_AC_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}"
  2866. _LT_AC_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}"
  2867. fi
  2868. else
  2869. case $cc_basename in
  2870. xlc*)
  2871. output_verbose_link_cmd='echo'
  2872. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
  2873. _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
  2874. # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
  2875. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  2876. _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  2877. ;;
  2878. *)
  2879. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2880. ;;
  2881. esac
  2882. fi
  2883. ;;
  2884. dgux*)
  2885. case $cc_basename in
  2886. ec++*)
  2887. # FIXME: insert proper C++ library support
  2888. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2889. ;;
  2890. ghcx*)
  2891. # Green Hills C++ Compiler
  2892. # FIXME: insert proper C++ library support
  2893. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2894. ;;
  2895. *)
  2896. # FIXME: insert proper C++ library support
  2897. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2898. ;;
  2899. esac
  2900. ;;
  2901. freebsd[[12]]*)
  2902. # C++ shared libraries reported to be fairly broken before switch to ELF
  2903. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2904. ;;
  2905. freebsd-elf*)
  2906. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  2907. ;;
  2908. freebsd* | dragonfly*)
  2909. # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
  2910. # conventions
  2911. _LT_AC_TAGVAR(ld_shlibs, $1)=yes
  2912. ;;
  2913. gnu*)
  2914. ;;
  2915. hpux9*)
  2916. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  2917. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  2918. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  2919. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  2920. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  2921. # but as the default
  2922. # location of the library.
  2923. case $cc_basename in
  2924. CC*)
  2925. # FIXME: insert proper C++ library support
  2926. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2927. ;;
  2928. aCC*)
  2929. _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  2930. # Commands to make compiler produce verbose output that lists
  2931. # what "hidden" libraries, object files and flags are used when
  2932. # linking a shared library.
  2933. #
  2934. # There doesn't appear to be a way to prevent this compiler from
  2935. # explicitly linking system object files so we need to strip them
  2936. # from the output so that they don't get included in the library
  2937. # dependencies.
  2938. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
  2939. ;;
  2940. *)
  2941. if test "$GXX" = yes; then
  2942. _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  2943. else
  2944. # FIXME: insert proper C++ library support
  2945. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2946. fi
  2947. ;;
  2948. esac
  2949. ;;
  2950. hpux10*|hpux11*)
  2951. if test $with_gnu_ld = no; then
  2952. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  2953. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  2954. case $host_cpu in
  2955. hppa*64*|ia64*) ;;
  2956. *)
  2957. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  2958. ;;
  2959. esac
  2960. fi
  2961. case $host_cpu in
  2962. hppa*64*|ia64*)
  2963. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  2964. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  2965. ;;
  2966. *)
  2967. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  2968. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  2969. # but as the default
  2970. # location of the library.
  2971. ;;
  2972. esac
  2973. case $cc_basename in
  2974. CC*)
  2975. # FIXME: insert proper C++ library support
  2976. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2977. ;;
  2978. aCC*)
  2979. case $host_cpu in
  2980. hppa*64*)
  2981. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  2982. ;;
  2983. ia64*)
  2984. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  2985. ;;
  2986. *)
  2987. _LT_AC_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'
  2988. ;;
  2989. esac
  2990. # Commands to make compiler produce verbose output that lists
  2991. # what "hidden" libraries, object files and flags are used when
  2992. # linking a shared library.
  2993. #
  2994. # There doesn't appear to be a way to prevent this compiler from
  2995. # explicitly linking system object files so we need to strip them
  2996. # from the output so that they don't get included in the library
  2997. # dependencies.
  2998. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
  2999. ;;
  3000. *)
  3001. if test "$GXX" = yes; then
  3002. if test $with_gnu_ld = no; then
  3003. case $host_cpu in
  3004. hppa*64*)
  3005. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  3006. ;;
  3007. ia64*)
  3008. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  3009. ;;
  3010. *)
  3011. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  3012. ;;
  3013. esac
  3014. fi
  3015. else
  3016. # FIXME: insert proper C++ library support
  3017. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3018. fi
  3019. ;;
  3020. esac
  3021. ;;
  3022. interix[[3-9]]*)
  3023. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  3024. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  3025. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  3026. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  3027. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  3028. # Instead, shared libraries are loaded at an image base (0x10000000 by
  3029. # default) and relocated if they conflict, which is a slow very memory
  3030. # consuming and fragmenting process. To avoid this, we pick a random,
  3031. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  3032. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  3033. _LT_AC_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'
  3034. _LT_AC_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'
  3035. ;;
  3036. irix5* | irix6*)
  3037. case $cc_basename in
  3038. CC*)
  3039. # SGI C++
  3040. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  3041. # Archives containing C++ object files must be created using
  3042. # "CC -ar", where "CC" is the IRIX C++ compiler. This is
  3043. # necessary to make sure instantiated templates are included
  3044. # in the archive.
  3045. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
  3046. ;;
  3047. *)
  3048. if test "$GXX" = yes; then
  3049. if test "$with_gnu_ld" = no; then
  3050. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  3051. else
  3052. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
  3053. fi
  3054. fi
  3055. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  3056. ;;
  3057. esac
  3058. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  3059. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3060. ;;
  3061. linux* | k*bsd*-gnu)
  3062. case $cc_basename in
  3063. KCC*)
  3064. # Kuck and Associates, Inc. (KAI) C++ Compiler
  3065. # KCC will only create a shared library if the output file
  3066. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  3067. # to its proper name (with version) after linking.
  3068. _LT_AC_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'
  3069. _LT_AC_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'
  3070. # Commands to make compiler produce verbose output that lists
  3071. # what "hidden" libraries, object files and flags are used when
  3072. # linking a shared library.
  3073. #
  3074. # There doesn't appear to be a way to prevent this compiler from
  3075. # explicitly linking system object files so we need to strip them
  3076. # from the output so that they don't get included in the library
  3077. # dependencies.
  3078. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
  3079. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
  3080. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  3081. # Archives containing C++ object files must be created using
  3082. # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  3083. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  3084. ;;
  3085. icpc*)
  3086. # Intel C++
  3087. with_gnu_ld=yes
  3088. # version 8.0 and above of icpc choke on multiply defined symbols
  3089. # if we add $predep_objects and $postdep_objects, however 7.1 and
  3090. # earlier do not add the objects themselves.
  3091. case `$CC -V 2>&1` in
  3092. *"Version 7."*)
  3093. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  3094. _LT_AC_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'
  3095. ;;
  3096. *) # Version 8.0 or newer
  3097. tmp_idyn=
  3098. case $host_cpu in
  3099. ia64*) tmp_idyn=' -i_dynamic';;
  3100. esac
  3101. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  3102. _LT_AC_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'
  3103. ;;
  3104. esac
  3105. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  3106. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  3107. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  3108. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  3109. ;;
  3110. pgCC* | pgcpp*)
  3111. # Portland Group C++ compiler
  3112. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
  3113. _LT_AC_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'
  3114. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
  3115. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  3116. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
  3117. ;;
  3118. cxx*)
  3119. # Compaq C++
  3120. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  3121. _LT_AC_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'
  3122. runpath_var=LD_RUN_PATH
  3123. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  3124. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3125. # Commands to make compiler produce verbose output that lists
  3126. # what "hidden" libraries, object files and flags are used when
  3127. # linking a shared library.
  3128. #
  3129. # There doesn't appear to be a way to prevent this compiler from
  3130. # explicitly linking system object files so we need to strip them
  3131. # from the output so that they don't get included in the library
  3132. # dependencies.
  3133. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $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; echo $list'
  3134. ;;
  3135. *)
  3136. case `$CC -V 2>&1 | sed 5q` in
  3137. *Sun\ C*)
  3138. # Sun C++ 5.9
  3139. _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  3140. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  3141. _LT_AC_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'
  3142. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  3143. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
  3144. # Not sure whether something based on
  3145. # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
  3146. # would be better.
  3147. output_verbose_link_cmd='echo'
  3148. # Archives containing C++ object files must be created using
  3149. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  3150. # necessary to make sure instantiated templates are included
  3151. # in the archive.
  3152. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  3153. ;;
  3154. esac
  3155. ;;
  3156. esac
  3157. ;;
  3158. lynxos*)
  3159. # FIXME: insert proper C++ library support
  3160. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3161. ;;
  3162. m88k*)
  3163. # FIXME: insert proper C++ library support
  3164. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3165. ;;
  3166. mvs*)
  3167. case $cc_basename in
  3168. cxx*)
  3169. # FIXME: insert proper C++ library support
  3170. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3171. ;;
  3172. *)
  3173. # FIXME: insert proper C++ library support
  3174. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3175. ;;
  3176. esac
  3177. ;;
  3178. netbsd*)
  3179. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  3180. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
  3181. wlarc=
  3182. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  3183. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  3184. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  3185. fi
  3186. # Workaround some broken pre-1.5 toolchains
  3187. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
  3188. ;;
  3189. openbsd2*)
  3190. # C++ shared libraries are fairly broken
  3191. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3192. ;;
  3193. openbsd*)
  3194. if test -f /usr/libexec/ld.so; then
  3195. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  3196. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  3197. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  3198. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  3199. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  3200. _LT_AC_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'
  3201. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  3202. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  3203. fi
  3204. output_verbose_link_cmd='echo'
  3205. else
  3206. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3207. fi
  3208. ;;
  3209. osf3*)
  3210. case $cc_basename in
  3211. KCC*)
  3212. # Kuck and Associates, Inc. (KAI) C++ Compiler
  3213. # KCC will only create a shared library if the output file
  3214. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  3215. # to its proper name (with version) after linking.
  3216. _LT_AC_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'
  3217. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  3218. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3219. # Archives containing C++ object files must be created using
  3220. # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  3221. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  3222. ;;
  3223. RCC*)
  3224. # Rational C++ 2.4.1
  3225. # FIXME: insert proper C++ library support
  3226. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3227. ;;
  3228. cxx*)
  3229. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  3230. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  3231. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  3232. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3233. # Commands to make compiler produce verbose output that lists
  3234. # what "hidden" libraries, object files and flags are used when
  3235. # linking a shared library.
  3236. #
  3237. # There doesn't appear to be a way to prevent this compiler from
  3238. # explicitly linking system object files so we need to strip them
  3239. # from the output so that they don't get included in the library
  3240. # dependencies.
  3241. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list'
  3242. ;;
  3243. *)
  3244. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  3245. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  3246. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  3247. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  3248. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3249. # Commands to make compiler produce verbose output that lists
  3250. # what "hidden" libraries, object files and flags are used when
  3251. # linking a shared library.
  3252. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
  3253. else
  3254. # FIXME: insert proper C++ library support
  3255. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3256. fi
  3257. ;;
  3258. esac
  3259. ;;
  3260. osf4* | osf5*)
  3261. case $cc_basename in
  3262. KCC*)
  3263. # Kuck and Associates, Inc. (KAI) C++ Compiler
  3264. # KCC will only create a shared library if the output file
  3265. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  3266. # to its proper name (with version) after linking.
  3267. _LT_AC_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'
  3268. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  3269. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3270. # Archives containing C++ object files must be created using
  3271. # the KAI C++ compiler.
  3272. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
  3273. ;;
  3274. RCC*)
  3275. # Rational C++ 2.4.1
  3276. # FIXME: insert proper C++ library support
  3277. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3278. ;;
  3279. cxx*)
  3280. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  3281. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  3282. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
  3283. echo "-hidden">> $lib.exp~
  3284. $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~
  3285. $rm $lib.exp'
  3286. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  3287. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3288. # Commands to make compiler produce verbose output that lists
  3289. # what "hidden" libraries, object files and flags are used when
  3290. # linking a shared library.
  3291. #
  3292. # There doesn't appear to be a way to prevent this compiler from
  3293. # explicitly linking system object files so we need to strip them
  3294. # from the output so that they don't get included in the library
  3295. # dependencies.
  3296. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list'
  3297. ;;
  3298. *)
  3299. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  3300. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  3301. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  3302. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  3303. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3304. # Commands to make compiler produce verbose output that lists
  3305. # what "hidden" libraries, object files and flags are used when
  3306. # linking a shared library.
  3307. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
  3308. else
  3309. # FIXME: insert proper C++ library support
  3310. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3311. fi
  3312. ;;
  3313. esac
  3314. ;;
  3315. psos*)
  3316. # FIXME: insert proper C++ library support
  3317. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3318. ;;
  3319. sunos4*)
  3320. case $cc_basename in
  3321. CC*)
  3322. # Sun C++ 4.x
  3323. # FIXME: insert proper C++ library support
  3324. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3325. ;;
  3326. lcc*)
  3327. # Lucid
  3328. # FIXME: insert proper C++ library support
  3329. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3330. ;;
  3331. *)
  3332. # FIXME: insert proper C++ library support
  3333. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3334. ;;
  3335. esac
  3336. ;;
  3337. solaris*)
  3338. case $cc_basename in
  3339. CC*)
  3340. # Sun C++ 4.2, 5.x and Centerline C++
  3341. _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
  3342. _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  3343. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  3344. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  3345. $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'
  3346. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  3347. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  3348. case $host_os in
  3349. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  3350. *)
  3351. # The compiler driver will combine and reorder linker options,
  3352. # but understands `-z linker_flag'.
  3353. # Supported since Solaris 2.6 (maybe 2.5.1?)
  3354. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  3355. ;;
  3356. esac
  3357. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  3358. output_verbose_link_cmd='echo'
  3359. # Archives containing C++ object files must be created using
  3360. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  3361. # necessary to make sure instantiated templates are included
  3362. # in the archive.
  3363. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  3364. ;;
  3365. gcx*)
  3366. # Green Hills C++ Compiler
  3367. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  3368. # The C++ compiler must be used to create the archive.
  3369. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
  3370. ;;
  3371. *)
  3372. # GNU C++ compiler with Solaris linker
  3373. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  3374. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
  3375. if $CC --version | grep -v '^2\.7' > /dev/null; then
  3376. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  3377. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  3378. $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
  3379. # Commands to make compiler produce verbose output that lists
  3380. # what "hidden" libraries, object files and flags are used when
  3381. # linking a shared library.
  3382. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
  3383. else
  3384. # g++ 2.7 appears to require `-G' NOT `-shared' on this
  3385. # platform.
  3386. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  3387. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  3388. $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
  3389. # Commands to make compiler produce verbose output that lists
  3390. # what "hidden" libraries, object files and flags are used when
  3391. # linking a shared library.
  3392. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
  3393. fi
  3394. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
  3395. case $host_os in
  3396. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  3397. *)
  3398. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
  3399. ;;
  3400. esac
  3401. fi
  3402. ;;
  3403. esac
  3404. ;;
  3405. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  3406. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  3407. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  3408. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  3409. runpath_var='LD_RUN_PATH'
  3410. case $cc_basename in
  3411. CC*)
  3412. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  3413. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  3414. ;;
  3415. *)
  3416. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  3417. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  3418. ;;
  3419. esac
  3420. ;;
  3421. sysv5* | sco3.2v5* | sco5v6*)
  3422. # Note: We can NOT use -z defs as we might desire, because we do not
  3423. # link with -lc, and that would cause any symbols used from libc to
  3424. # always be unresolved, which means just about no library would
  3425. # ever link correctly. If we're not using GNU ld we use -z text
  3426. # though, which does catch some bad symbols but isn't as heavy-handed
  3427. # as -z defs.
  3428. # For security reasons, it is highly recommended that you always
  3429. # use absolute paths for naming shared libraries, and exclude the
  3430. # DT_RUNPATH tag from executables and libraries. But doing so
  3431. # requires that you compile everything twice, which is a pain.
  3432. # So that behaviour is only enabled if SCOABSPATH is set to a
  3433. # non-empty value in the environment. Most likely only useful for
  3434. # creating official distributions of packages.
  3435. # This is a hack until libtool officially supports absolute path
  3436. # names for shared libraries.
  3437. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  3438. _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
  3439. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  3440. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  3441. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
  3442. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
  3443. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  3444. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  3445. runpath_var='LD_RUN_PATH'
  3446. case $cc_basename in
  3447. CC*)
  3448. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
  3449. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
  3450. ;;
  3451. *)
  3452. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
  3453. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
  3454. ;;
  3455. esac
  3456. ;;
  3457. tandem*)
  3458. case $cc_basename in
  3459. NCC*)
  3460. # NonStop-UX NCC 3.20
  3461. # FIXME: insert proper C++ library support
  3462. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3463. ;;
  3464. *)
  3465. # FIXME: insert proper C++ library support
  3466. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3467. ;;
  3468. esac
  3469. ;;
  3470. vxworks*)
  3471. # FIXME: insert proper C++ library support
  3472. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3473. ;;
  3474. *)
  3475. # FIXME: insert proper C++ library support
  3476. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3477. ;;
  3478. esac
  3479. AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
  3480. test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  3481. _LT_AC_TAGVAR(GCC, $1)="$GXX"
  3482. _LT_AC_TAGVAR(LD, $1)="$LD"
  3483. AC_LIBTOOL_POSTDEP_PREDEP($1)
  3484. AC_LIBTOOL_PROG_COMPILER_PIC($1)
  3485. AC_LIBTOOL_PROG_CC_C_O($1)
  3486. AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
  3487. AC_LIBTOOL_PROG_LD_SHLIBS($1)
  3488. AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  3489. AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  3490. AC_LIBTOOL_CONFIG($1)
  3491. AC_LANG_POP
  3492. CC=$lt_save_CC
  3493. LDCXX=$LD
  3494. LD=$lt_save_LD
  3495. GCC=$lt_save_GCC
  3496. with_gnu_ldcxx=$with_gnu_ld
  3497. with_gnu_ld=$lt_save_with_gnu_ld
  3498. lt_cv_path_LDCXX=$lt_cv_path_LD
  3499. lt_cv_path_LD=$lt_save_path_LD
  3500. lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
  3501. lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
  3502. ])# AC_LIBTOOL_LANG_CXX_CONFIG
  3503. # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
  3504. # ------------------------------------
  3505. # Figure out "hidden" library dependencies from verbose
  3506. # compiler output when linking a shared library.
  3507. # Parse the compiler output and extract the necessary
  3508. # objects, libraries and library flags.
  3509. AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],
  3510. [AC_REQUIRE([LT_AC_PROG_SED])dnl
  3511. dnl we can't use the lt_simple_compile_test_code here,
  3512. dnl because it contains code intended for an executable,
  3513. dnl not a library. It's possible we should let each
  3514. dnl tag define a new lt_????_link_test_code variable,
  3515. dnl but it's only used here...
  3516. ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
  3517. int a;
  3518. void foo (void) { a = 0; }
  3519. EOF
  3520. ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
  3521. class Foo
  3522. {
  3523. public:
  3524. Foo (void) { a = 0; }
  3525. private:
  3526. int a;
  3527. };
  3528. EOF
  3529. ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
  3530. subroutine foo
  3531. implicit none
  3532. integer*4 a
  3533. a=0
  3534. return
  3535. end
  3536. EOF
  3537. ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
  3538. public class foo {
  3539. private int a;
  3540. public void bar (void) {
  3541. a = 0;
  3542. }
  3543. };
  3544. EOF
  3545. ])
  3546. dnl Parse the compiler output and extract the necessary
  3547. dnl objects, libraries and library flags.
  3548. if AC_TRY_EVAL(ac_compile); then
  3549. # Parse the compiler output and extract the necessary
  3550. # objects, libraries and library flags.
  3551. # Sentinel used to keep track of whether or not we are before
  3552. # the conftest object file.
  3553. pre_test_object_deps_done=no
  3554. # The `*' in the case matches for architectures that use `case' in
  3555. # $output_verbose_cmd can trigger glob expansion during the loop
  3556. # eval without this substitution.
  3557. output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
  3558. for p in `eval $output_verbose_link_cmd`; do
  3559. case $p in
  3560. -L* | -R* | -l*)
  3561. # Some compilers place space between "-{L,R}" and the path.
  3562. # Remove the space.
  3563. if test $p = "-L" \
  3564. || test $p = "-R"; then
  3565. prev=$p
  3566. continue
  3567. else
  3568. prev=
  3569. fi
  3570. if test "$pre_test_object_deps_done" = no; then
  3571. case $p in
  3572. -L* | -R*)
  3573. # Internal compiler library paths should come after those
  3574. # provided the user. The postdeps already come after the
  3575. # user supplied libs so there is no need to process them.
  3576. if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
  3577. _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
  3578. else
  3579. _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
  3580. fi
  3581. ;;
  3582. # The "-l" case would never come before the object being
  3583. # linked, so don't bother handling this case.
  3584. esac
  3585. else
  3586. if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
  3587. _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
  3588. else
  3589. _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
  3590. fi
  3591. fi
  3592. ;;
  3593. *.$objext)
  3594. # This assumes that the test object file only shows up
  3595. # once in the compiler output.
  3596. if test "$p" = "conftest.$objext"; then
  3597. pre_test_object_deps_done=yes
  3598. continue
  3599. fi
  3600. if test "$pre_test_object_deps_done" = no; then
  3601. if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
  3602. _LT_AC_TAGVAR(predep_objects, $1)="$p"
  3603. else
  3604. _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
  3605. fi
  3606. else
  3607. if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
  3608. _LT_AC_TAGVAR(postdep_objects, $1)="$p"
  3609. else
  3610. _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
  3611. fi
  3612. fi
  3613. ;;
  3614. *) ;; # Ignore the rest.
  3615. esac
  3616. done
  3617. # Clean up.
  3618. rm -f a.out a.exe
  3619. else
  3620. echo "libtool.m4: error: problem compiling $1 test program"
  3621. fi
  3622. $rm -f confest.$objext
  3623. _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
  3624. if test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
  3625. _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
  3626. fi
  3627. # PORTME: override above test on systems where it is broken
  3628. ifelse([$1],[CXX],
  3629. [case $host_os in
  3630. interix[[3-9]]*)
  3631. # Interix 3.5 installs completely hosed .la files for C++, so rather than
  3632. # hack all around it, let's just trust "g++" to DTRT.
  3633. _LT_AC_TAGVAR(predep_objects,$1)=
  3634. _LT_AC_TAGVAR(postdep_objects,$1)=
  3635. _LT_AC_TAGVAR(postdeps,$1)=
  3636. ;;
  3637. linux*)
  3638. case `$CC -V 2>&1 | sed 5q` in
  3639. *Sun\ C*)
  3640. # Sun C++ 5.9
  3641. #
  3642. # The more standards-conforming stlport4 library is
  3643. # incompatible with the Cstd library. Avoid specifying
  3644. # it if it's in CXXFLAGS. Ignore libCrun as
  3645. # -library=stlport4 depends on it.
  3646. case " $CXX $CXXFLAGS " in
  3647. *" -library=stlport4 "*)
  3648. solaris_use_stlport4=yes
  3649. ;;
  3650. esac
  3651. if test "$solaris_use_stlport4" != yes; then
  3652. _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
  3653. fi
  3654. ;;
  3655. esac
  3656. ;;
  3657. solaris*)
  3658. case $cc_basename in
  3659. CC*)
  3660. # The more standards-conforming stlport4 library is
  3661. # incompatible with the Cstd library. Avoid specifying
  3662. # it if it's in CXXFLAGS. Ignore libCrun as
  3663. # -library=stlport4 depends on it.
  3664. case " $CXX $CXXFLAGS " in
  3665. *" -library=stlport4 "*)
  3666. solaris_use_stlport4=yes
  3667. ;;
  3668. esac
  3669. # Adding this requires a known-good setup of shared libraries for
  3670. # Sun compiler versions before 5.6, else PIC objects from an old
  3671. # archive will be linked into the output, leading to subtle bugs.
  3672. if test "$solaris_use_stlport4" != yes; then
  3673. _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
  3674. fi
  3675. ;;
  3676. esac
  3677. ;;
  3678. esac
  3679. ])
  3680. case " $_LT_AC_TAGVAR(postdeps, $1) " in
  3681. *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
  3682. esac
  3683. ])# AC_LIBTOOL_POSTDEP_PREDEP
  3684. # AC_LIBTOOL_LANG_F77_CONFIG
  3685. # --------------------------
  3686. # Ensure that the configuration vars for the C compiler are
  3687. # suitably defined. Those variables are subsequently used by
  3688. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  3689. AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
  3690. AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
  3691. [AC_REQUIRE([AC_PROG_F77])
  3692. AC_LANG_PUSH(Fortran 77)
  3693. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  3694. _LT_AC_TAGVAR(allow_undefined_flag, $1)=
  3695. _LT_AC_TAGVAR(always_export_symbols, $1)=no
  3696. _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
  3697. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
  3698. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  3699. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
  3700. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  3701. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  3702. _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
  3703. _LT_AC_TAGVAR(hardcode_automatic, $1)=no
  3704. _LT_AC_TAGVAR(module_cmds, $1)=
  3705. _LT_AC_TAGVAR(module_expsym_cmds, $1)=
  3706. _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
  3707. _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  3708. _LT_AC_TAGVAR(no_undefined_flag, $1)=
  3709. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  3710. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  3711. # Source file extension for f77 test sources.
  3712. ac_ext=f
  3713. # Object file extension for compiled f77 test sources.
  3714. objext=o
  3715. _LT_AC_TAGVAR(objext, $1)=$objext
  3716. # Code to be used in simple compile tests
  3717. lt_simple_compile_test_code="\
  3718. subroutine t
  3719. return
  3720. end
  3721. "
  3722. # Code to be used in simple link tests
  3723. lt_simple_link_test_code="\
  3724. program t
  3725. end
  3726. "
  3727. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  3728. _LT_AC_SYS_COMPILER
  3729. # save warnings/boilerplate of simple test code
  3730. _LT_COMPILER_BOILERPLATE
  3731. _LT_LINKER_BOILERPLATE
  3732. # Allow CC to be a program name with arguments.
  3733. lt_save_CC="$CC"
  3734. CC=${F77-"f77"}
  3735. compiler=$CC
  3736. _LT_AC_TAGVAR(compiler, $1)=$CC
  3737. _LT_CC_BASENAME([$compiler])
  3738. AC_MSG_CHECKING([if libtool supports shared libraries])
  3739. AC_MSG_RESULT([$can_build_shared])
  3740. AC_MSG_CHECKING([whether to build shared libraries])
  3741. test "$can_build_shared" = "no" && enable_shared=no
  3742. # On AIX, shared libraries and static libraries use the same namespace, and
  3743. # are all built from PIC.
  3744. case $host_os in
  3745. aix3*)
  3746. test "$enable_shared" = yes && enable_static=no
  3747. if test -n "$RANLIB"; then
  3748. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  3749. postinstall_cmds='$RANLIB $lib'
  3750. fi
  3751. ;;
  3752. aix[[4-9]]*)
  3753. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  3754. test "$enable_shared" = yes && enable_static=no
  3755. fi
  3756. ;;
  3757. esac
  3758. AC_MSG_RESULT([$enable_shared])
  3759. AC_MSG_CHECKING([whether to build static libraries])
  3760. # Make sure either enable_shared or enable_static is yes.
  3761. test "$enable_shared" = yes || enable_static=yes
  3762. AC_MSG_RESULT([$enable_static])
  3763. _LT_AC_TAGVAR(GCC, $1)="$G77"
  3764. _LT_AC_TAGVAR(LD, $1)="$LD"
  3765. AC_LIBTOOL_PROG_COMPILER_PIC($1)
  3766. AC_LIBTOOL_PROG_CC_C_O($1)
  3767. AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
  3768. AC_LIBTOOL_PROG_LD_SHLIBS($1)
  3769. AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  3770. AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  3771. AC_LIBTOOL_CONFIG($1)
  3772. AC_LANG_POP
  3773. CC="$lt_save_CC"
  3774. ])# AC_LIBTOOL_LANG_F77_CONFIG
  3775. # AC_LIBTOOL_LANG_GCJ_CONFIG
  3776. # --------------------------
  3777. # Ensure that the configuration vars for the C compiler are
  3778. # suitably defined. Those variables are subsequently used by
  3779. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  3780. AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
  3781. AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
  3782. [AC_LANG_SAVE
  3783. # Source file extension for Java test sources.
  3784. ac_ext=java
  3785. # Object file extension for compiled Java test sources.
  3786. objext=o
  3787. _LT_AC_TAGVAR(objext, $1)=$objext
  3788. # Code to be used in simple compile tests
  3789. lt_simple_compile_test_code="class foo {}"
  3790. # Code to be used in simple link tests
  3791. lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
  3792. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  3793. _LT_AC_SYS_COMPILER
  3794. # save warnings/boilerplate of simple test code
  3795. _LT_COMPILER_BOILERPLATE
  3796. _LT_LINKER_BOILERPLATE
  3797. # Allow CC to be a program name with arguments.
  3798. lt_save_CC="$CC"
  3799. CC=${GCJ-"gcj"}
  3800. compiler=$CC
  3801. _LT_AC_TAGVAR(compiler, $1)=$CC
  3802. _LT_CC_BASENAME([$compiler])
  3803. # GCJ did not exist at the time GCC didn't implicitly link libc in.
  3804. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  3805. _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  3806. AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
  3807. AC_LIBTOOL_PROG_COMPILER_PIC($1)
  3808. AC_LIBTOOL_PROG_CC_C_O($1)
  3809. AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
  3810. AC_LIBTOOL_PROG_LD_SHLIBS($1)
  3811. AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  3812. AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  3813. AC_LIBTOOL_CONFIG($1)
  3814. AC_LANG_RESTORE
  3815. CC="$lt_save_CC"
  3816. ])# AC_LIBTOOL_LANG_GCJ_CONFIG
  3817. # AC_LIBTOOL_LANG_RC_CONFIG
  3818. # -------------------------
  3819. # Ensure that the configuration vars for the Windows resource compiler are
  3820. # suitably defined. Those variables are subsequently used by
  3821. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  3822. AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
  3823. AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
  3824. [AC_LANG_SAVE
  3825. # Source file extension for RC test sources.
  3826. ac_ext=rc
  3827. # Object file extension for compiled RC test sources.
  3828. objext=o
  3829. _LT_AC_TAGVAR(objext, $1)=$objext
  3830. # Code to be used in simple compile tests
  3831. lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
  3832. # Code to be used in simple link tests
  3833. lt_simple_link_test_code="$lt_simple_compile_test_code"
  3834. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  3835. _LT_AC_SYS_COMPILER
  3836. # save warnings/boilerplate of simple test code
  3837. _LT_COMPILER_BOILERPLATE
  3838. _LT_LINKER_BOILERPLATE
  3839. # Allow CC to be a program name with arguments.
  3840. lt_save_CC="$CC"
  3841. CC=${RC-"windres"}
  3842. compiler=$CC
  3843. _LT_AC_TAGVAR(compiler, $1)=$CC
  3844. _LT_CC_BASENAME([$compiler])
  3845. _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  3846. AC_LIBTOOL_CONFIG($1)
  3847. AC_LANG_RESTORE
  3848. CC="$lt_save_CC"
  3849. ])# AC_LIBTOOL_LANG_RC_CONFIG
  3850. # AC_LIBTOOL_CONFIG([TAGNAME])
  3851. # ----------------------------
  3852. # If TAGNAME is not passed, then create an initial libtool script
  3853. # with a default configuration from the untagged config vars. Otherwise
  3854. # add code to config.status for appending the configuration named by
  3855. # TAGNAME from the matching tagged config vars.
  3856. AC_DEFUN([AC_LIBTOOL_CONFIG],
  3857. [# The else clause should only fire when bootstrapping the
  3858. # libtool distribution, otherwise you forgot to ship ltmain.sh
  3859. # with your package, and you will get complaints that there are
  3860. # no rules to generate ltmain.sh.
  3861. if test -f "$ltmain"; then
  3862. # See if we are running on zsh, and set the options which allow our commands through
  3863. # without removal of \ escapes.
  3864. if test -n "${ZSH_VERSION+set}" ; then
  3865. setopt NO_GLOB_SUBST
  3866. fi
  3867. # Now quote all the things that may contain metacharacters while being
  3868. # careful not to overquote the AC_SUBSTed values. We take copies of the
  3869. # variables and quote the copies for generation of the libtool script.
  3870. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
  3871. SED SHELL STRIP \
  3872. libname_spec library_names_spec soname_spec extract_expsyms_cmds \
  3873. old_striplib striplib file_magic_cmd finish_cmds finish_eval \
  3874. deplibs_check_method reload_flag reload_cmds need_locks \
  3875. lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
  3876. lt_cv_sys_global_symbol_to_c_name_address \
  3877. sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
  3878. old_postinstall_cmds old_postuninstall_cmds \
  3879. _LT_AC_TAGVAR(compiler, $1) \
  3880. _LT_AC_TAGVAR(CC, $1) \
  3881. _LT_AC_TAGVAR(LD, $1) \
  3882. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
  3883. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
  3884. _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
  3885. _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
  3886. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
  3887. _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
  3888. _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
  3889. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
  3890. _LT_AC_TAGVAR(old_archive_cmds, $1) \
  3891. _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
  3892. _LT_AC_TAGVAR(predep_objects, $1) \
  3893. _LT_AC_TAGVAR(postdep_objects, $1) \
  3894. _LT_AC_TAGVAR(predeps, $1) \
  3895. _LT_AC_TAGVAR(postdeps, $1) \
  3896. _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
  3897. _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \
  3898. _LT_AC_TAGVAR(archive_cmds, $1) \
  3899. _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
  3900. _LT_AC_TAGVAR(postinstall_cmds, $1) \
  3901. _LT_AC_TAGVAR(postuninstall_cmds, $1) \
  3902. _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
  3903. _LT_AC_TAGVAR(allow_undefined_flag, $1) \
  3904. _LT_AC_TAGVAR(no_undefined_flag, $1) \
  3905. _LT_AC_TAGVAR(export_symbols_cmds, $1) \
  3906. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
  3907. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
  3908. _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
  3909. _LT_AC_TAGVAR(hardcode_automatic, $1) \
  3910. _LT_AC_TAGVAR(module_cmds, $1) \
  3911. _LT_AC_TAGVAR(module_expsym_cmds, $1) \
  3912. _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
  3913. _LT_AC_TAGVAR(fix_srcfile_path, $1) \
  3914. _LT_AC_TAGVAR(exclude_expsyms, $1) \
  3915. _LT_AC_TAGVAR(include_expsyms, $1); do
  3916. case $var in
  3917. _LT_AC_TAGVAR(old_archive_cmds, $1) | \
  3918. _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
  3919. _LT_AC_TAGVAR(archive_cmds, $1) | \
  3920. _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
  3921. _LT_AC_TAGVAR(module_cmds, $1) | \
  3922. _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
  3923. _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
  3924. _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
  3925. extract_expsyms_cmds | reload_cmds | finish_cmds | \
  3926. postinstall_cmds | postuninstall_cmds | \
  3927. old_postinstall_cmds | old_postuninstall_cmds | \
  3928. sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
  3929. # Double-quote double-evaled strings.
  3930. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
  3931. ;;
  3932. *)
  3933. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
  3934. ;;
  3935. esac
  3936. done
  3937. case $lt_echo in
  3938. *'\[$]0 --fallback-echo"')
  3939. lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
  3940. ;;
  3941. esac
  3942. ifelse([$1], [],
  3943. [cfgfile="${ofile}T"
  3944. trap "$rm \"$cfgfile\"; exit 1" 1 2 15
  3945. $rm -f "$cfgfile"
  3946. AC_MSG_NOTICE([creating $ofile])],
  3947. [cfgfile="$ofile"])
  3948. cat <<__EOF__ >> "$cfgfile"
  3949. ifelse([$1], [],
  3950. [#! $SHELL
  3951. # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
  3952. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
  3953. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  3954. #
  3955. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
  3956. # Free Software Foundation, Inc.
  3957. #
  3958. # This file is part of GNU Libtool:
  3959. # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  3960. #
  3961. # This program is free software; you can redistribute it and/or modify
  3962. # it under the terms of the GNU General Public License as published by
  3963. # the Free Software Foundation; either version 2 of the License, or
  3964. # (at your option) any later version.
  3965. #
  3966. # This program is distributed in the hope that it will be useful, but
  3967. # WITHOUT ANY WARRANTY; without even the implied warranty of
  3968. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  3969. # General Public License for more details.
  3970. #
  3971. # You should have received a copy of the GNU General Public License
  3972. # along with this program; if not, write to the Free Software
  3973. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  3974. #
  3975. # As a special exception to the GNU General Public License, if you
  3976. # distribute this file as part of a program that contains a
  3977. # configuration script generated by Autoconf, you may include it under
  3978. # the same distribution terms that you use for the rest of that program.
  3979. # A sed program that does not truncate output.
  3980. SED=$lt_SED
  3981. # Sed that helps us avoid accidentally triggering echo(1) options like -n.
  3982. Xsed="$SED -e 1s/^X//"
  3983. # The HP-UX ksh and POSIX shell print the target directory to stdout
  3984. # if CDPATH is set.
  3985. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  3986. # The names of the tagged configurations supported by this script.
  3987. available_tags=
  3988. # ### BEGIN LIBTOOL CONFIG],
  3989. [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
  3990. # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  3991. # Shell to use when invoking shell scripts.
  3992. SHELL=$lt_SHELL
  3993. # Whether or not to build shared libraries.
  3994. build_libtool_libs=$enable_shared
  3995. # Whether or not to build static libraries.
  3996. build_old_libs=$enable_static
  3997. # Whether or not to add -lc for building shared libraries.
  3998. build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
  3999. # Whether or not to disallow shared libs when runtime libs are static
  4000. allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
  4001. # Whether or not to optimize for fast installation.
  4002. fast_install=$enable_fast_install
  4003. # The host system.
  4004. host_alias=$host_alias
  4005. host=$host
  4006. host_os=$host_os
  4007. # The build system.
  4008. build_alias=$build_alias
  4009. build=$build
  4010. build_os=$build_os
  4011. # An echo program that does not interpret backslashes.
  4012. echo=$lt_echo
  4013. # The archiver.
  4014. AR=$lt_AR
  4015. AR_FLAGS=$lt_AR_FLAGS
  4016. # A C compiler.
  4017. LTCC=$lt_LTCC
  4018. # LTCC compiler flags.
  4019. LTCFLAGS=$lt_LTCFLAGS
  4020. # A language-specific compiler.
  4021. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
  4022. # Is the compiler the GNU C compiler?
  4023. with_gcc=$_LT_AC_TAGVAR(GCC, $1)
  4024. # An ERE matcher.
  4025. EGREP=$lt_EGREP
  4026. # The linker used to build libraries.
  4027. LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
  4028. # Whether we need hard or soft links.
  4029. LN_S=$lt_LN_S
  4030. # A BSD-compatible nm program.
  4031. NM=$lt_NM
  4032. # A symbol stripping program
  4033. STRIP=$lt_STRIP
  4034. # Used to examine libraries when file_magic_cmd begins "file"
  4035. MAGIC_CMD=$MAGIC_CMD
  4036. # Used on cygwin: DLL creation program.
  4037. DLLTOOL="$DLLTOOL"
  4038. # Used on cygwin: object dumper.
  4039. OBJDUMP="$OBJDUMP"
  4040. # Used on cygwin: assembler.
  4041. AS="$AS"
  4042. # The name of the directory that contains temporary libtool files.
  4043. objdir=$objdir
  4044. # How to create reloadable object files.
  4045. reload_flag=$lt_reload_flag
  4046. reload_cmds=$lt_reload_cmds
  4047. # How to pass a linker flag through the compiler.
  4048. wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
  4049. # Object file suffix (normally "o").
  4050. objext="$ac_objext"
  4051. # Old archive suffix (normally "a").
  4052. libext="$libext"
  4053. # Shared library suffix (normally ".so").
  4054. shrext_cmds='$shrext_cmds'
  4055. # Executable file suffix (normally "").
  4056. exeext="$exeext"
  4057. # Additional compiler flags for building library objects.
  4058. pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
  4059. pic_mode=$pic_mode
  4060. # What is the maximum length of a command?
  4061. max_cmd_len=$lt_cv_sys_max_cmd_len
  4062. # Does compiler simultaneously support -c and -o options?
  4063. compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
  4064. # Must we lock files when doing compilation?
  4065. need_locks=$lt_need_locks
  4066. # Do we need the lib prefix for modules?
  4067. need_lib_prefix=$need_lib_prefix
  4068. # Do we need a version for libraries?
  4069. need_version=$need_version
  4070. # Whether dlopen is supported.
  4071. dlopen_support=$enable_dlopen
  4072. # Whether dlopen of programs is supported.
  4073. dlopen_self=$enable_dlopen_self
  4074. # Whether dlopen of statically linked programs is supported.
  4075. dlopen_self_static=$enable_dlopen_self_static
  4076. # Compiler flag to prevent dynamic linking.
  4077. link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
  4078. # Compiler flag to turn off builtin functions.
  4079. no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
  4080. # Compiler flag to allow reflexive dlopens.
  4081. export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
  4082. # Compiler flag to generate shared objects directly from archives.
  4083. whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
  4084. # Compiler flag to generate thread-safe objects.
  4085. thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
  4086. # Library versioning type.
  4087. version_type=$version_type
  4088. # Format of library name prefix.
  4089. libname_spec=$lt_libname_spec
  4090. # List of archive names. First name is the real one, the rest are links.
  4091. # The last name is the one that the linker finds with -lNAME.
  4092. library_names_spec=$lt_library_names_spec
  4093. # The coded name of the library, if different from the real name.
  4094. soname_spec=$lt_soname_spec
  4095. # Commands used to build and install an old-style archive.
  4096. RANLIB=$lt_RANLIB
  4097. old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
  4098. old_postinstall_cmds=$lt_old_postinstall_cmds
  4099. old_postuninstall_cmds=$lt_old_postuninstall_cmds
  4100. # Create an old-style archive from a shared archive.
  4101. old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
  4102. # Create a temporary old-style archive to link instead of a shared archive.
  4103. old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
  4104. # Commands used to build and install a shared archive.
  4105. archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
  4106. archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
  4107. postinstall_cmds=$lt_postinstall_cmds
  4108. postuninstall_cmds=$lt_postuninstall_cmds
  4109. # Commands used to build a loadable module (assumed same as above if empty)
  4110. module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
  4111. module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
  4112. # Commands to strip libraries.
  4113. old_striplib=$lt_old_striplib
  4114. striplib=$lt_striplib
  4115. # Dependencies to place before the objects being linked to create a
  4116. # shared library.
  4117. predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
  4118. # Dependencies to place after the objects being linked to create a
  4119. # shared library.
  4120. postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
  4121. # Dependencies to place before the objects being linked to create a
  4122. # shared library.
  4123. predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
  4124. # Dependencies to place after the objects being linked to create a
  4125. # shared library.
  4126. postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
  4127. # The directories searched by this compiler when creating a shared
  4128. # library
  4129. compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)
  4130. # The library search path used internally by the compiler when linking
  4131. # a shared library.
  4132. compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
  4133. # Method to check whether dependent libraries are shared objects.
  4134. deplibs_check_method=$lt_deplibs_check_method
  4135. # Command to use when deplibs_check_method == file_magic.
  4136. file_magic_cmd=$lt_file_magic_cmd
  4137. # Flag that allows shared libraries with undefined symbols to be built.
  4138. allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
  4139. # Flag that forces no undefined symbols.
  4140. no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
  4141. # Commands used to finish a libtool library installation in a directory.
  4142. finish_cmds=$lt_finish_cmds
  4143. # Same as above, but a single script fragment to be evaled but not shown.
  4144. finish_eval=$lt_finish_eval
  4145. # Take the output of nm and produce a listing of raw symbols and C names.
  4146. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
  4147. # Transform the output of nm in a proper C declaration
  4148. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
  4149. # Transform the output of nm in a C name address pair
  4150. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
  4151. # This is the shared library runtime path variable.
  4152. runpath_var=$runpath_var
  4153. # This is the shared library path variable.
  4154. shlibpath_var=$shlibpath_var
  4155. # Is shlibpath searched before the hard-coded library search path?
  4156. shlibpath_overrides_runpath=$shlibpath_overrides_runpath
  4157. # How to hardcode a shared library path into an executable.
  4158. hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
  4159. # Whether we should hardcode library paths into libraries.
  4160. hardcode_into_libs=$hardcode_into_libs
  4161. # Flag to hardcode \$libdir into a binary during linking.
  4162. # This must work even if \$libdir does not exist.
  4163. hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
  4164. # If ld is used when linking, flag to hardcode \$libdir into
  4165. # a binary during linking. This must work even if \$libdir does
  4166. # not exist.
  4167. hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
  4168. # Whether we need a single -rpath flag with a separated argument.
  4169. hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
  4170. # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
  4171. # resulting binary.
  4172. hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
  4173. # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
  4174. # resulting binary.
  4175. hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
  4176. # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
  4177. # the resulting binary.
  4178. hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
  4179. # Set to yes if building a shared library automatically hardcodes DIR into the library
  4180. # and all subsequent libraries and executables linked against it.
  4181. hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
  4182. # Variables whose values should be saved in libtool wrapper scripts and
  4183. # restored at relink time.
  4184. variables_saved_for_relink="$variables_saved_for_relink"
  4185. # Whether libtool must link a program against all its dependency libraries.
  4186. link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
  4187. # Compile-time system search path for libraries
  4188. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
  4189. # Run-time system search path for libraries
  4190. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
  4191. # Fix the shell variable \$srcfile for the compiler.
  4192. fix_srcfile_path=$lt_fix_srcfile_path
  4193. # Set to yes if exported symbols are required.
  4194. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
  4195. # The commands to list exported symbols.
  4196. export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
  4197. # The commands to extract the exported symbol list from a shared archive.
  4198. extract_expsyms_cmds=$lt_extract_expsyms_cmds
  4199. # Symbols that should not be listed in the preloaded symbols.
  4200. exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
  4201. # Symbols that must always be exported.
  4202. include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
  4203. ifelse([$1],[],
  4204. [# ### END LIBTOOL CONFIG],
  4205. [# ### END LIBTOOL TAG CONFIG: $tagname])
  4206. __EOF__
  4207. ifelse([$1],[], [
  4208. case $host_os in
  4209. aix3*)
  4210. cat <<\EOF >> "$cfgfile"
  4211. # AIX sometimes has problems with the GCC collect2 program. For some
  4212. # reason, if we set the COLLECT_NAMES environment variable, the problems
  4213. # vanish in a puff of smoke.
  4214. if test "X${COLLECT_NAMES+set}" != Xset; then
  4215. COLLECT_NAMES=
  4216. export COLLECT_NAMES
  4217. fi
  4218. EOF
  4219. ;;
  4220. esac
  4221. # We use sed instead of cat because bash on DJGPP gets confused if
  4222. # if finds mixed CR/LF and LF-only lines. Since sed operates in
  4223. # text mode, it properly converts lines to CR/LF. This bash problem
  4224. # is reportedly fixed, but why not run on old versions too?
  4225. sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
  4226. mv -f "$cfgfile" "$ofile" || \
  4227. (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
  4228. chmod +x "$ofile"
  4229. ])
  4230. else
  4231. # If there is no Makefile yet, we rely on a make rule to execute
  4232. # `config.status --recheck' to rerun these tests and create the
  4233. # libtool script then.
  4234. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
  4235. if test -f "$ltmain_in"; then
  4236. test -f Makefile && make "$ltmain"
  4237. fi
  4238. fi
  4239. ])# AC_LIBTOOL_CONFIG
  4240. # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
  4241. # -------------------------------------------
  4242. AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
  4243. [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
  4244. _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  4245. if test "$GCC" = yes; then
  4246. _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  4247. AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
  4248. lt_cv_prog_compiler_rtti_exceptions,
  4249. [-fno-rtti -fno-exceptions], [],
  4250. [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
  4251. fi
  4252. ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
  4253. # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
  4254. # ---------------------------------
  4255. AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
  4256. [AC_REQUIRE([AC_CANONICAL_HOST])
  4257. AC_REQUIRE([LT_AC_PROG_SED])
  4258. AC_REQUIRE([AC_PROG_NM])
  4259. AC_REQUIRE([AC_OBJEXT])
  4260. # Check for command to grab the raw symbol name followed by C symbol from nm.
  4261. AC_MSG_CHECKING([command to parse $NM output from $compiler object])
  4262. AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
  4263. [
  4264. # These are sane defaults that work on at least a few old systems.
  4265. # [They come from Ultrix. What could be older than Ultrix?!! ;)]
  4266. # Character class describing NM global symbol codes.
  4267. symcode='[[BCDEGRST]]'
  4268. # Regexp to match symbols that can be accessed directly from C.
  4269. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
  4270. # Transform an extracted symbol line into a proper C declaration
  4271. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
  4272. # Transform an extracted symbol line into symbol name and symbol address
  4273. lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
  4274. # Define system-specific variables.
  4275. case $host_os in
  4276. aix*)
  4277. symcode='[[BCDT]]'
  4278. ;;
  4279. cygwin* | mingw* | pw32*)
  4280. symcode='[[ABCDGISTW]]'
  4281. ;;
  4282. hpux*) # Its linker distinguishes data from code symbols
  4283. if test "$host_cpu" = ia64; then
  4284. symcode='[[ABCDEGRST]]'
  4285. fi
  4286. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  4287. lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
  4288. ;;
  4289. linux* | k*bsd*-gnu)
  4290. if test "$host_cpu" = ia64; then
  4291. symcode='[[ABCDGIRSTW]]'
  4292. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  4293. lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
  4294. fi
  4295. ;;
  4296. irix* | nonstopux*)
  4297. symcode='[[BCDEGRST]]'
  4298. ;;
  4299. osf*)
  4300. symcode='[[BCDEGQRST]]'
  4301. ;;
  4302. solaris*)
  4303. symcode='[[BDRT]]'
  4304. ;;
  4305. sco3.2v5*)
  4306. symcode='[[DT]]'
  4307. ;;
  4308. sysv4.2uw2*)
  4309. symcode='[[DT]]'
  4310. ;;
  4311. sysv5* | sco5v6* | unixware* | OpenUNIX*)
  4312. symcode='[[ABDT]]'
  4313. ;;
  4314. sysv4)
  4315. symcode='[[DFNSTU]]'
  4316. ;;
  4317. esac
  4318. # Handle CRLF in mingw tool chain
  4319. opt_cr=
  4320. case $build_os in
  4321. mingw*)
  4322. opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  4323. ;;
  4324. esac
  4325. # If we're using GNU nm, then use its standard symbol codes.
  4326. case `$NM -V 2>&1` in
  4327. *GNU* | *'with BFD'*)
  4328. symcode='[[ABCDGIRSTW]]' ;;
  4329. esac
  4330. # Try without a prefix undercore, then with it.
  4331. for ac_symprfx in "" "_"; do
  4332. # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
  4333. symxfrm="\\1 $ac_symprfx\\2 \\2"
  4334. # Write the raw and C identifiers.
  4335. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
  4336. # Check to see that the pipe works correctly.
  4337. pipe_works=no
  4338. rm -f conftest*
  4339. cat > conftest.$ac_ext <<EOF
  4340. #ifdef __cplusplus
  4341. extern "C" {
  4342. #endif
  4343. char nm_test_var;
  4344. void nm_test_func(){}
  4345. #ifdef __cplusplus
  4346. }
  4347. #endif
  4348. int main(){nm_test_var='a';nm_test_func();return(0);}
  4349. EOF
  4350. if AC_TRY_EVAL(ac_compile); then
  4351. # Now try to grab the symbols.
  4352. nlist=conftest.nm
  4353. if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
  4354. # Try sorting and uniquifying the output.
  4355. if sort "$nlist" | uniq > "$nlist"T; then
  4356. mv -f "$nlist"T "$nlist"
  4357. else
  4358. rm -f "$nlist"T
  4359. fi
  4360. # Make sure that we snagged all the symbols we need.
  4361. if grep ' nm_test_var$' "$nlist" >/dev/null; then
  4362. if grep ' nm_test_func$' "$nlist" >/dev/null; then
  4363. cat <<EOF > conftest.$ac_ext
  4364. #ifdef __cplusplus
  4365. extern "C" {
  4366. #endif
  4367. EOF
  4368. # Now generate the symbol file.
  4369. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
  4370. cat <<EOF >> conftest.$ac_ext
  4371. #if defined (__STDC__) && __STDC__
  4372. # define lt_ptr_t void *
  4373. #else
  4374. # define lt_ptr_t char *
  4375. # define const
  4376. #endif
  4377. /* The mapping between symbol names and symbols. */
  4378. const struct {
  4379. const char *name;
  4380. lt_ptr_t address;
  4381. }
  4382. lt_preloaded_symbols[[]] =
  4383. {
  4384. EOF
  4385. $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
  4386. cat <<\EOF >> conftest.$ac_ext
  4387. {0, (lt_ptr_t) 0}
  4388. };
  4389. #ifdef __cplusplus
  4390. }
  4391. #endif
  4392. EOF
  4393. # Now try linking the two files.
  4394. mv conftest.$ac_objext conftstm.$ac_objext
  4395. lt_save_LIBS="$LIBS"
  4396. lt_save_CFLAGS="$CFLAGS"
  4397. LIBS="conftstm.$ac_objext"
  4398. CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
  4399. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
  4400. pipe_works=yes
  4401. fi
  4402. LIBS="$lt_save_LIBS"
  4403. CFLAGS="$lt_save_CFLAGS"
  4404. else
  4405. echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
  4406. fi
  4407. else
  4408. echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
  4409. fi
  4410. else
  4411. echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
  4412. fi
  4413. else
  4414. echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
  4415. cat conftest.$ac_ext >&5
  4416. fi
  4417. rm -rf conftest* conftst*
  4418. # Do not use the global_symbol_pipe unless it works.
  4419. if test "$pipe_works" = yes; then
  4420. break
  4421. else
  4422. lt_cv_sys_global_symbol_pipe=
  4423. fi
  4424. done
  4425. ])
  4426. if test -z "$lt_cv_sys_global_symbol_pipe"; then
  4427. lt_cv_sys_global_symbol_to_cdecl=
  4428. fi
  4429. if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
  4430. AC_MSG_RESULT(failed)
  4431. else
  4432. AC_MSG_RESULT(ok)
  4433. fi
  4434. ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
  4435. # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
  4436. # ---------------------------------------
  4437. AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
  4438. [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
  4439. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  4440. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
  4441. AC_MSG_CHECKING([for $compiler option to produce PIC])
  4442. ifelse([$1],[CXX],[
  4443. # C++ specific cases for pic, static, wl, etc.
  4444. if test "$GXX" = yes; then
  4445. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4446. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4447. case $host_os in
  4448. aix*)
  4449. # All AIX code is PIC.
  4450. if test "$host_cpu" = ia64; then
  4451. # AIX 5 now supports IA64 processor
  4452. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4453. fi
  4454. ;;
  4455. amigaos*)
  4456. # FIXME: we need at least 68020 code to build shared libraries, but
  4457. # adding the `-m68020' flag to GCC prevents building anything better,
  4458. # like `-m68040'.
  4459. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  4460. ;;
  4461. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  4462. # PIC is the default for these OSes.
  4463. ;;
  4464. mingw* | cygwin* | os2* | pw32*)
  4465. # This hack is so that the source file can tell whether it is being
  4466. # built for inclusion in a dll (and should export symbols for example).
  4467. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  4468. # (--disable-auto-import) libraries
  4469. m4_if([$1], [GCJ], [],
  4470. [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  4471. ;;
  4472. darwin* | rhapsody*)
  4473. # PIC is the default on this platform
  4474. # Common symbols not allowed in MH_DYLIB files
  4475. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  4476. ;;
  4477. *djgpp*)
  4478. # DJGPP does not support shared libraries at all
  4479. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  4480. ;;
  4481. interix[[3-9]]*)
  4482. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  4483. # Instead, we relocate shared libraries at runtime.
  4484. ;;
  4485. sysv4*MP*)
  4486. if test -d /usr/nec; then
  4487. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  4488. fi
  4489. ;;
  4490. hpux*)
  4491. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  4492. # not for PA HP-UX.
  4493. case $host_cpu in
  4494. hppa*64*|ia64*)
  4495. ;;
  4496. *)
  4497. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4498. ;;
  4499. esac
  4500. ;;
  4501. *)
  4502. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4503. ;;
  4504. esac
  4505. else
  4506. case $host_os in
  4507. aix[[4-9]]*)
  4508. # All AIX code is PIC.
  4509. if test "$host_cpu" = ia64; then
  4510. # AIX 5 now supports IA64 processor
  4511. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4512. else
  4513. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  4514. fi
  4515. ;;
  4516. chorus*)
  4517. case $cc_basename in
  4518. cxch68*)
  4519. # Green Hills C++ Compiler
  4520. # _LT_AC_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"
  4521. ;;
  4522. esac
  4523. ;;
  4524. darwin*)
  4525. # PIC is the default on this platform
  4526. # Common symbols not allowed in MH_DYLIB files
  4527. case $cc_basename in
  4528. xlc*)
  4529. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
  4530. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4531. ;;
  4532. esac
  4533. ;;
  4534. dgux*)
  4535. case $cc_basename in
  4536. ec++*)
  4537. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4538. ;;
  4539. ghcx*)
  4540. # Green Hills C++ Compiler
  4541. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4542. ;;
  4543. *)
  4544. ;;
  4545. esac
  4546. ;;
  4547. freebsd* | dragonfly*)
  4548. # FreeBSD uses GNU C++
  4549. ;;
  4550. hpux9* | hpux10* | hpux11*)
  4551. case $cc_basename in
  4552. CC*)
  4553. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4554. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  4555. if test "$host_cpu" != ia64; then
  4556. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4557. fi
  4558. ;;
  4559. aCC*)
  4560. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4561. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  4562. case $host_cpu in
  4563. hppa*64*|ia64*)
  4564. # +Z the default
  4565. ;;
  4566. *)
  4567. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4568. ;;
  4569. esac
  4570. ;;
  4571. *)
  4572. ;;
  4573. esac
  4574. ;;
  4575. interix*)
  4576. # This is c89, which is MS Visual C++ (no shared libs)
  4577. # Anyone wants to do a port?
  4578. ;;
  4579. irix5* | irix6* | nonstopux*)
  4580. case $cc_basename in
  4581. CC*)
  4582. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4583. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4584. # CC pic flag -KPIC is the default.
  4585. ;;
  4586. *)
  4587. ;;
  4588. esac
  4589. ;;
  4590. linux* | k*bsd*-gnu)
  4591. case $cc_basename in
  4592. KCC*)
  4593. # KAI C++ Compiler
  4594. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  4595. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4596. ;;
  4597. icpc* | ecpc*)
  4598. # Intel C++
  4599. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4600. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4601. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4602. ;;
  4603. pgCC* | pgcpp*)
  4604. # Portland Group C++ compiler.
  4605. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4606. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4607. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4608. ;;
  4609. cxx*)
  4610. # Compaq C++
  4611. # Make sure the PIC flag is empty. It appears that all Alpha
  4612. # Linux and Compaq Tru64 Unix objects are PIC.
  4613. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  4614. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4615. ;;
  4616. *)
  4617. case `$CC -V 2>&1 | sed 5q` in
  4618. *Sun\ C*)
  4619. # Sun C++ 5.9
  4620. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4621. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4622. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4623. ;;
  4624. esac
  4625. ;;
  4626. esac
  4627. ;;
  4628. lynxos*)
  4629. ;;
  4630. m88k*)
  4631. ;;
  4632. mvs*)
  4633. case $cc_basename in
  4634. cxx*)
  4635. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
  4636. ;;
  4637. *)
  4638. ;;
  4639. esac
  4640. ;;
  4641. netbsd*)
  4642. ;;
  4643. osf3* | osf4* | osf5*)
  4644. case $cc_basename in
  4645. KCC*)
  4646. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  4647. ;;
  4648. RCC*)
  4649. # Rational C++ 2.4.1
  4650. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4651. ;;
  4652. cxx*)
  4653. # Digital/Compaq C++
  4654. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4655. # Make sure the PIC flag is empty. It appears that all Alpha
  4656. # Linux and Compaq Tru64 Unix objects are PIC.
  4657. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  4658. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4659. ;;
  4660. *)
  4661. ;;
  4662. esac
  4663. ;;
  4664. psos*)
  4665. ;;
  4666. solaris*)
  4667. case $cc_basename in
  4668. CC*)
  4669. # Sun C++ 4.2, 5.x and Centerline C++
  4670. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4671. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4672. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4673. ;;
  4674. gcx*)
  4675. # Green Hills C++ Compiler
  4676. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4677. ;;
  4678. *)
  4679. ;;
  4680. esac
  4681. ;;
  4682. sunos4*)
  4683. case $cc_basename in
  4684. CC*)
  4685. # Sun C++ 4.x
  4686. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4687. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4688. ;;
  4689. lcc*)
  4690. # Lucid
  4691. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4692. ;;
  4693. *)
  4694. ;;
  4695. esac
  4696. ;;
  4697. tandem*)
  4698. case $cc_basename in
  4699. NCC*)
  4700. # NonStop-UX NCC 3.20
  4701. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4702. ;;
  4703. *)
  4704. ;;
  4705. esac
  4706. ;;
  4707. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  4708. case $cc_basename in
  4709. CC*)
  4710. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4711. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4712. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4713. ;;
  4714. esac
  4715. ;;
  4716. vxworks*)
  4717. ;;
  4718. *)
  4719. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4720. ;;
  4721. esac
  4722. fi
  4723. ],
  4724. [
  4725. if test "$GCC" = yes; then
  4726. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4727. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4728. case $host_os in
  4729. aix*)
  4730. # All AIX code is PIC.
  4731. if test "$host_cpu" = ia64; then
  4732. # AIX 5 now supports IA64 processor
  4733. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4734. fi
  4735. ;;
  4736. amigaos*)
  4737. # FIXME: we need at least 68020 code to build shared libraries, but
  4738. # adding the `-m68020' flag to GCC prevents building anything better,
  4739. # like `-m68040'.
  4740. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  4741. ;;
  4742. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  4743. # PIC is the default for these OSes.
  4744. ;;
  4745. mingw* | cygwin* | pw32* | os2*)
  4746. # This hack is so that the source file can tell whether it is being
  4747. # built for inclusion in a dll (and should export symbols for example).
  4748. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  4749. # (--disable-auto-import) libraries
  4750. m4_if([$1], [GCJ], [],
  4751. [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  4752. ;;
  4753. darwin* | rhapsody*)
  4754. # PIC is the default on this platform
  4755. # Common symbols not allowed in MH_DYLIB files
  4756. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  4757. ;;
  4758. interix[[3-9]]*)
  4759. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  4760. # Instead, we relocate shared libraries at runtime.
  4761. ;;
  4762. msdosdjgpp*)
  4763. # Just because we use GCC doesn't mean we suddenly get shared libraries
  4764. # on systems that don't support them.
  4765. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4766. enable_shared=no
  4767. ;;
  4768. sysv4*MP*)
  4769. if test -d /usr/nec; then
  4770. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  4771. fi
  4772. ;;
  4773. hpux*)
  4774. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  4775. # not for PA HP-UX.
  4776. case $host_cpu in
  4777. hppa*64*|ia64*)
  4778. # +Z the default
  4779. ;;
  4780. *)
  4781. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4782. ;;
  4783. esac
  4784. ;;
  4785. *)
  4786. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4787. ;;
  4788. esac
  4789. else
  4790. # PORTME Check for flag to pass linker flags through the system compiler.
  4791. case $host_os in
  4792. aix*)
  4793. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4794. if test "$host_cpu" = ia64; then
  4795. # AIX 5 now supports IA64 processor
  4796. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4797. else
  4798. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  4799. fi
  4800. ;;
  4801. darwin*)
  4802. # PIC is the default on this platform
  4803. # Common symbols not allowed in MH_DYLIB files
  4804. case $cc_basename in
  4805. xlc*)
  4806. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
  4807. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4808. ;;
  4809. esac
  4810. ;;
  4811. mingw* | cygwin* | pw32* | os2*)
  4812. # This hack is so that the source file can tell whether it is being
  4813. # built for inclusion in a dll (and should export symbols for example).
  4814. m4_if([$1], [GCJ], [],
  4815. [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  4816. ;;
  4817. hpux9* | hpux10* | hpux11*)
  4818. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4819. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  4820. # not for PA HP-UX.
  4821. case $host_cpu in
  4822. hppa*64*|ia64*)
  4823. # +Z the default
  4824. ;;
  4825. *)
  4826. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4827. ;;
  4828. esac
  4829. # Is there a better lt_prog_compiler_static that works with the bundled CC?
  4830. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  4831. ;;
  4832. irix5* | irix6* | nonstopux*)
  4833. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4834. # PIC (with -KPIC) is the default.
  4835. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4836. ;;
  4837. newsos6)
  4838. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4839. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4840. ;;
  4841. linux* | k*bsd*-gnu)
  4842. case $cc_basename in
  4843. icc* | ecc*)
  4844. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4845. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4846. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4847. ;;
  4848. pgcc* | pgf77* | pgf90* | pgf95*)
  4849. # Portland Group compilers (*not* the Pentium gcc compiler,
  4850. # which looks to be a dead project)
  4851. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4852. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4853. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4854. ;;
  4855. ccc*)
  4856. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4857. # All Alpha code is PIC.
  4858. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4859. ;;
  4860. *)
  4861. case `$CC -V 2>&1 | sed 5q` in
  4862. *Sun\ C*)
  4863. # Sun C 5.9
  4864. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4865. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4866. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4867. ;;
  4868. *Sun\ F*)
  4869. # Sun Fortran 8.3 passes all unrecognized flags to the linker
  4870. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4871. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4872. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
  4873. ;;
  4874. esac
  4875. ;;
  4876. esac
  4877. ;;
  4878. osf3* | osf4* | osf5*)
  4879. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4880. # All OSF/1 code is PIC.
  4881. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4882. ;;
  4883. rdos*)
  4884. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4885. ;;
  4886. solaris*)
  4887. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4888. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4889. case $cc_basename in
  4890. f77* | f90* | f95*)
  4891. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
  4892. *)
  4893. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
  4894. esac
  4895. ;;
  4896. sunos4*)
  4897. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4898. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4899. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4900. ;;
  4901. sysv4 | sysv4.2uw2* | sysv4.3*)
  4902. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4903. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4904. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4905. ;;
  4906. sysv4*MP*)
  4907. if test -d /usr/nec ;then
  4908. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
  4909. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4910. fi
  4911. ;;
  4912. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  4913. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4914. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4915. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4916. ;;
  4917. unicos*)
  4918. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4919. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4920. ;;
  4921. uts4*)
  4922. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4923. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4924. ;;
  4925. *)
  4926. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4927. ;;
  4928. esac
  4929. fi
  4930. ])
  4931. AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
  4932. #
  4933. # Check to make sure the PIC flag actually works.
  4934. #
  4935. if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
  4936. AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
  4937. _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1),
  4938. [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
  4939. [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
  4940. "" | " "*) ;;
  4941. *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
  4942. esac],
  4943. [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  4944. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
  4945. fi
  4946. case $host_os in
  4947. # For platforms which do not support PIC, -DPIC is meaningless:
  4948. *djgpp*)
  4949. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  4950. ;;
  4951. *)
  4952. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
  4953. ;;
  4954. esac
  4955. #
  4956. # Check to make sure the static flag actually works.
  4957. #
  4958. wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
  4959. AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
  4960. _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1),
  4961. $lt_tmp_static_flag,
  4962. [],
  4963. [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
  4964. ])
  4965. # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
  4966. # ------------------------------------
  4967. # See if the linker supports building shared libraries.
  4968. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
  4969. [AC_REQUIRE([LT_AC_PROG_SED])dnl
  4970. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  4971. ifelse([$1],[CXX],[
  4972. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4973. case $host_os in
  4974. aix[[4-9]]*)
  4975. # If we're using GNU nm, then we don't want the "-C" option.
  4976. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  4977. if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
  4978. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
  4979. else
  4980. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
  4981. fi
  4982. ;;
  4983. pw32*)
  4984. _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
  4985. ;;
  4986. cygwin* | mingw*)
  4987. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
  4988. ;;
  4989. *)
  4990. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4991. ;;
  4992. esac
  4993. _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  4994. ],[
  4995. runpath_var=
  4996. _LT_AC_TAGVAR(allow_undefined_flag, $1)=
  4997. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  4998. _LT_AC_TAGVAR(archive_cmds, $1)=
  4999. _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
  5000. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
  5001. _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
  5002. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
  5003. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  5004. _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
  5005. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
  5006. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  5007. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  5008. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  5009. _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
  5010. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  5011. _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
  5012. _LT_AC_TAGVAR(hardcode_automatic, $1)=no
  5013. _LT_AC_TAGVAR(module_cmds, $1)=
  5014. _LT_AC_TAGVAR(module_expsym_cmds, $1)=
  5015. _LT_AC_TAGVAR(always_export_symbols, $1)=no
  5016. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  5017. # include_expsyms should be a list of space-separated symbols to be *always*
  5018. # included in the symbol list
  5019. _LT_AC_TAGVAR(include_expsyms, $1)=
  5020. # exclude_expsyms can be an extended regexp of symbols to exclude
  5021. # it will be wrapped by ` (' and `)$', so one must not match beginning or
  5022. # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
  5023. # as well as any symbol that contains `d'.
  5024. _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  5025. # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  5026. # platforms (ab)use it in PIC code, but their linkers get confused if
  5027. # the symbol is explicitly referenced. Since portable code cannot
  5028. # rely on this symbol name, it's probably fine to never include it in
  5029. # preloaded symbol tables.
  5030. # Exclude shared library initialization/finalization symbols.
  5031. dnl Note also adjust exclude_expsyms for C++ above.
  5032. extract_expsyms_cmds=
  5033. # Just being paranoid about ensuring that cc_basename is set.
  5034. _LT_CC_BASENAME([$compiler])
  5035. case $host_os in
  5036. cygwin* | mingw* | pw32*)
  5037. # FIXME: the MSVC++ port hasn't been tested in a loooong time
  5038. # When not using gcc, we currently assume that we are using
  5039. # Microsoft Visual C++.
  5040. if test "$GCC" != yes; then
  5041. with_gnu_ld=no
  5042. fi
  5043. ;;
  5044. interix*)
  5045. # we just hope/assume this is gcc and not c89 (= MSVC++)
  5046. with_gnu_ld=yes
  5047. ;;
  5048. openbsd*)
  5049. with_gnu_ld=no
  5050. ;;
  5051. esac
  5052. _LT_AC_TAGVAR(ld_shlibs, $1)=yes
  5053. if test "$with_gnu_ld" = yes; then
  5054. # If archive_cmds runs LD, not CC, wlarc should be empty
  5055. wlarc='${wl}'
  5056. # Set some defaults for GNU ld with shared library support. These
  5057. # are reset later if shared libraries are not supported. Putting them
  5058. # here allows them to be overridden if necessary.
  5059. runpath_var=LD_RUN_PATH
  5060. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
  5061. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5062. # ancient GNU ld didn't support --whole-archive et. al.
  5063. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
  5064. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  5065. else
  5066. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  5067. fi
  5068. supports_anon_versioning=no
  5069. case `$LD -v 2>/dev/null` in
  5070. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
  5071. *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
  5072. *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
  5073. *\ 2.11.*) ;; # other 2.11 versions
  5074. *) supports_anon_versioning=yes ;;
  5075. esac
  5076. # See if GNU ld supports shared libraries.
  5077. case $host_os in
  5078. aix[[3-9]]*)
  5079. # On AIX/PPC, the GNU linker is very broken
  5080. if test "$host_cpu" != ia64; then
  5081. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5082. cat <<EOF 1>&2
  5083. *** Warning: the GNU linker, at least up to release 2.9.1, is reported
  5084. *** to be unable to reliably create shared libraries on AIX.
  5085. *** Therefore, libtool is disabling shared libraries support. If you
  5086. *** really care for shared libraries, you may want to modify your PATH
  5087. *** so that a non-GNU linker is found, and then restart.
  5088. EOF
  5089. fi
  5090. ;;
  5091. amigaos*)
  5092. _LT_AC_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)'
  5093. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5094. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5095. # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
  5096. # that the semantics of dynamic libraries on AmigaOS, at least up
  5097. # to version 4, is to share data among multiple programs linked
  5098. # with the same dynamic library. Since this doesn't match the
  5099. # behavior of shared libraries on other platforms, we can't use
  5100. # them.
  5101. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5102. ;;
  5103. beos*)
  5104. if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  5105. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  5106. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  5107. # support --undefined. This deserves some investigation. FIXME
  5108. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5109. else
  5110. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5111. fi
  5112. ;;
  5113. cygwin* | mingw* | pw32*)
  5114. # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  5115. # as there is no search path for DLLs.
  5116. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5117. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  5118. _LT_AC_TAGVAR(always_export_symbols, $1)=no
  5119. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5120. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
  5121. if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
  5122. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  5123. # If the export-symbols file already is a .def file (1st line
  5124. # is EXPORTS), use it as is; otherwise, prepend...
  5125. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  5126. cp $export_symbols $output_objdir/$soname.def;
  5127. else
  5128. echo EXPORTS > $output_objdir/$soname.def;
  5129. cat $export_symbols >> $output_objdir/$soname.def;
  5130. fi~
  5131. $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  5132. else
  5133. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5134. fi
  5135. ;;
  5136. interix[[3-9]]*)
  5137. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  5138. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5139. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5140. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5141. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  5142. # Instead, shared libraries are loaded at an image base (0x10000000 by
  5143. # default) and relocated if they conflict, which is a slow very memory
  5144. # consuming and fragmenting process. To avoid this, we pick a random,
  5145. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  5146. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  5147. _LT_AC_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'
  5148. _LT_AC_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'
  5149. ;;
  5150. gnu* | linux* | k*bsd*-gnu)
  5151. if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  5152. tmp_addflag=
  5153. case $cc_basename,$host_cpu in
  5154. pgcc*) # Portland Group C compiler
  5155. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
  5156. tmp_addflag=' $pic_flag'
  5157. ;;
  5158. pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
  5159. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
  5160. tmp_addflag=' $pic_flag -Mnomain' ;;
  5161. ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
  5162. tmp_addflag=' -i_dynamic' ;;
  5163. efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
  5164. tmp_addflag=' -i_dynamic -nofor_main' ;;
  5165. ifc* | ifort*) # Intel Fortran compiler
  5166. tmp_addflag=' -nofor_main' ;;
  5167. esac
  5168. case `$CC -V 2>&1 | sed 5q` in
  5169. *Sun\ C*) # Sun C 5.9
  5170. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
  5171. tmp_sharedflag='-G' ;;
  5172. *Sun\ F*) # Sun Fortran 8.3
  5173. tmp_sharedflag='-G' ;;
  5174. *)
  5175. tmp_sharedflag='-shared' ;;
  5176. esac
  5177. _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5178. if test $supports_anon_versioning = yes; then
  5179. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
  5180. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  5181. $echo "local: *; };" >> $output_objdir/$libname.ver~
  5182. $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  5183. fi
  5184. else
  5185. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5186. fi
  5187. ;;
  5188. netbsd*)
  5189. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  5190. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  5191. wlarc=
  5192. else
  5193. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5194. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  5195. fi
  5196. ;;
  5197. solaris*)
  5198. if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
  5199. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5200. cat <<EOF 1>&2
  5201. *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  5202. *** create shared libraries on Solaris systems. Therefore, libtool
  5203. *** is disabling shared libraries support. We urge you to upgrade GNU
  5204. *** binutils to release 2.9.1 or newer. Another option is to modify
  5205. *** your PATH or compiler configuration so that the native linker is
  5206. *** used, and then restart.
  5207. EOF
  5208. elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  5209. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5210. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  5211. else
  5212. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5213. fi
  5214. ;;
  5215. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
  5216. case `$LD -v 2>&1` in
  5217. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
  5218. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5219. cat <<_LT_EOF 1>&2
  5220. *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
  5221. *** reliably create shared libraries on SCO systems. Therefore, libtool
  5222. *** is disabling shared libraries support. We urge you to upgrade GNU
  5223. *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
  5224. *** your PATH or compiler configuration so that the native linker is
  5225. *** used, and then restart.
  5226. _LT_EOF
  5227. ;;
  5228. *)
  5229. if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  5230. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
  5231. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
  5232. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
  5233. else
  5234. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5235. fi
  5236. ;;
  5237. esac
  5238. ;;
  5239. sunos4*)
  5240. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  5241. wlarc=
  5242. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5243. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5244. ;;
  5245. *)
  5246. if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  5247. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5248. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  5249. else
  5250. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5251. fi
  5252. ;;
  5253. esac
  5254. if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
  5255. runpath_var=
  5256. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
  5257. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
  5258. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  5259. fi
  5260. else
  5261. # PORTME fill in a description of your system's linker (not GNU ld)
  5262. case $host_os in
  5263. aix3*)
  5264. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  5265. _LT_AC_TAGVAR(always_export_symbols, $1)=yes
  5266. _LT_AC_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'
  5267. # Note: this linker hardcodes the directories in LIBPATH if there
  5268. # are no directories specified by -L.
  5269. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5270. if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
  5271. # Neither direct hardcoding nor static linking is supported with a
  5272. # broken collect2.
  5273. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
  5274. fi
  5275. ;;
  5276. aix[[4-9]]*)
  5277. if test "$host_cpu" = ia64; then
  5278. # On IA64, the linker does run time linking by default, so we don't
  5279. # have to do anything special.
  5280. aix_use_runtimelinking=no
  5281. exp_sym_flag='-Bexport'
  5282. no_entry_flag=""
  5283. else
  5284. # If we're using GNU nm, then we don't want the "-C" option.
  5285. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  5286. if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
  5287. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
  5288. else
  5289. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
  5290. fi
  5291. aix_use_runtimelinking=no
  5292. # Test if we are trying to use run time linking or normal
  5293. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  5294. # need to do runtime linking.
  5295. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  5296. for ld_flag in $LDFLAGS; do
  5297. if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
  5298. aix_use_runtimelinking=yes
  5299. break
  5300. fi
  5301. done
  5302. ;;
  5303. esac
  5304. exp_sym_flag='-bexport'
  5305. no_entry_flag='-bnoentry'
  5306. fi
  5307. # When large executables or shared objects are built, AIX ld can
  5308. # have problems creating the table of contents. If linking a library
  5309. # or program results in "error TOC overflow" add -mminimal-toc to
  5310. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  5311. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  5312. _LT_AC_TAGVAR(archive_cmds, $1)=''
  5313. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5314. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
  5315. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  5316. if test "$GCC" = yes; then
  5317. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  5318. # We only want to do this on AIX 4.2 and lower, the check
  5319. # below for broken collect2 doesn't work under 4.3+
  5320. collect2name=`${CC} -print-prog-name=collect2`
  5321. if test -f "$collect2name" && \
  5322. strings "$collect2name" | grep resolve_lib_name >/dev/null
  5323. then
  5324. # We have reworked collect2
  5325. :
  5326. else
  5327. # We have old collect2
  5328. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
  5329. # It fails to find uninstalled libraries when the uninstalled
  5330. # path is not listed in the libpath. Setting hardcode_minus_L
  5331. # to unsupported forces relinking
  5332. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5333. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5334. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  5335. fi
  5336. ;;
  5337. esac
  5338. shared_flag='-shared'
  5339. if test "$aix_use_runtimelinking" = yes; then
  5340. shared_flag="$shared_flag "'${wl}-G'
  5341. fi
  5342. else
  5343. # not using gcc
  5344. if test "$host_cpu" = ia64; then
  5345. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  5346. # chokes on -Wl,-G. The following line is correct:
  5347. shared_flag='-G'
  5348. else
  5349. if test "$aix_use_runtimelinking" = yes; then
  5350. shared_flag='${wl}-G'
  5351. else
  5352. shared_flag='${wl}-bM:SRE'
  5353. fi
  5354. fi
  5355. fi
  5356. # It seems that -bexpall does not export symbols beginning with
  5357. # underscore (_), so it is better to generate a list of symbols to export.
  5358. _LT_AC_TAGVAR(always_export_symbols, $1)=yes
  5359. if test "$aix_use_runtimelinking" = yes; then
  5360. # Warning - without using the other runtime loading flags (-brtl),
  5361. # -berok will link without error, but may produce a broken library.
  5362. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
  5363. # Determine the default libpath from the value encoded in an empty executable.
  5364. _LT_AC_SYS_LIBPATH_AIX
  5365. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  5366. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
  5367. else
  5368. if test "$host_cpu" = ia64; then
  5369. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  5370. _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  5371. _LT_AC_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"
  5372. else
  5373. # Determine the default libpath from the value encoded in an empty executable.
  5374. _LT_AC_SYS_LIBPATH_AIX
  5375. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  5376. # Warning - without using the other run time loading flags,
  5377. # -berok will link without error, but may produce a broken library.
  5378. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  5379. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  5380. # Exported symbols can be pulled into shared objects from archives
  5381. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  5382. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
  5383. # This is similar to how AIX traditionally builds its shared libraries.
  5384. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
  5385. fi
  5386. fi
  5387. ;;
  5388. amigaos*)
  5389. _LT_AC_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)'
  5390. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5391. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5392. # see comment about different semantics on the GNU ld section
  5393. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5394. ;;
  5395. bsdi[[45]]*)
  5396. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
  5397. ;;
  5398. cygwin* | mingw* | pw32*)
  5399. # When not using gcc, we currently assume that we are using
  5400. # Microsoft Visual C++.
  5401. # hardcode_libdir_flag_spec is actually meaningless, as there is
  5402. # no search path for DLLs.
  5403. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  5404. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  5405. # Tell ltmain to make .lib files, not .a files.
  5406. libext=lib
  5407. # Tell ltmain to make .dll files, not .so files.
  5408. shrext_cmds=".dll"
  5409. # FIXME: Setting linknames here is a bad hack.
  5410. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
  5411. # The linker will automatically build a .lib file if we build a DLL.
  5412. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
  5413. # FIXME: Should let the user specify the lib program.
  5414. _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
  5415. _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
  5416. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5417. ;;
  5418. darwin* | rhapsody*)
  5419. case $host_os in
  5420. rhapsody* | darwin1.[[012]])
  5421. _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
  5422. ;;
  5423. *) # Darwin 1.3 on
  5424. if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
  5425. _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
  5426. else
  5427. case ${MACOSX_DEPLOYMENT_TARGET} in
  5428. 10.[[012]])
  5429. _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
  5430. ;;
  5431. 10.*)
  5432. _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
  5433. ;;
  5434. esac
  5435. fi
  5436. ;;
  5437. esac
  5438. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  5439. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  5440. _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
  5441. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  5442. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
  5443. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  5444. if test "$GCC" = yes ; then
  5445. output_verbose_link_cmd='echo'
  5446. _LT_AC_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}"
  5447. _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
  5448. _LT_AC_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}"
  5449. _LT_AC_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}"
  5450. else
  5451. case $cc_basename in
  5452. xlc*)
  5453. output_verbose_link_cmd='echo'
  5454. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
  5455. _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
  5456. # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
  5457. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  5458. _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  5459. ;;
  5460. *)
  5461. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5462. ;;
  5463. esac
  5464. fi
  5465. ;;
  5466. dgux*)
  5467. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5468. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5469. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5470. ;;
  5471. freebsd1*)
  5472. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5473. ;;
  5474. # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  5475. # support. Future versions do this automatically, but an explicit c++rt0.o
  5476. # does not break anything, and helps significantly (at the cost of a little
  5477. # extra space).
  5478. freebsd2.2*)
  5479. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
  5480. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5481. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5482. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5483. ;;
  5484. # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  5485. freebsd2*)
  5486. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  5487. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5488. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5489. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5490. ;;
  5491. # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  5492. freebsd* | dragonfly*)
  5493. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
  5494. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5495. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5496. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5497. ;;
  5498. hpux9*)
  5499. if test "$GCC" = yes; then
  5500. _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  5501. else
  5502. _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  5503. fi
  5504. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5505. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5506. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5507. # hardcode_minus_L: Not really in the search PATH,
  5508. # but as the default location of the library.
  5509. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5510. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5511. ;;
  5512. hpux10*)
  5513. if test "$GCC" = yes -a "$with_gnu_ld" = no; then
  5514. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  5515. else
  5516. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
  5517. fi
  5518. if test "$with_gnu_ld" = no; then
  5519. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5520. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5521. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5522. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5523. # hardcode_minus_L: Not really in the search PATH,
  5524. # but as the default location of the library.
  5525. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5526. fi
  5527. ;;
  5528. hpux11*)
  5529. if test "$GCC" = yes -a "$with_gnu_ld" = no; then
  5530. case $host_cpu in
  5531. hppa*64*)
  5532. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  5533. ;;
  5534. ia64*)
  5535. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  5536. ;;
  5537. *)
  5538. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  5539. ;;
  5540. esac
  5541. else
  5542. case $host_cpu in
  5543. hppa*64*)
  5544. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  5545. ;;
  5546. ia64*)
  5547. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  5548. ;;
  5549. *)
  5550. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  5551. ;;
  5552. esac
  5553. fi
  5554. if test "$with_gnu_ld" = no; then
  5555. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5556. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5557. case $host_cpu in
  5558. hppa*64*|ia64*)
  5559. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
  5560. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  5561. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5562. ;;
  5563. *)
  5564. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5565. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5566. # hardcode_minus_L: Not really in the search PATH,
  5567. # but as the default location of the library.
  5568. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5569. ;;
  5570. esac
  5571. fi
  5572. ;;
  5573. irix5* | irix6* | nonstopux*)
  5574. if test "$GCC" = yes; then
  5575. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  5576. else
  5577. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  5578. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
  5579. fi
  5580. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5581. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5582. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  5583. ;;
  5584. netbsd*)
  5585. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  5586. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
  5587. else
  5588. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
  5589. fi
  5590. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5591. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5592. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5593. ;;
  5594. newsos6)
  5595. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5596. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5597. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5598. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5599. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5600. ;;
  5601. openbsd*)
  5602. if test -f /usr/libexec/ld.so; then
  5603. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5604. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5605. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  5606. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5607. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
  5608. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5609. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5610. else
  5611. case $host_os in
  5612. openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
  5613. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  5614. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5615. ;;
  5616. *)
  5617. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5618. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5619. ;;
  5620. esac
  5621. fi
  5622. else
  5623. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5624. fi
  5625. ;;
  5626. os2*)
  5627. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5628. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5629. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  5630. _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
  5631. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
  5632. ;;
  5633. osf3*)
  5634. if test "$GCC" = yes; then
  5635. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  5636. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  5637. else
  5638. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  5639. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  5640. fi
  5641. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5642. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5643. ;;
  5644. osf4* | osf5*) # as osf3* with the addition of -msym flag
  5645. if test "$GCC" = yes; then
  5646. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  5647. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  5648. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5649. else
  5650. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  5651. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  5652. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
  5653. $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
  5654. # Both c and cxx compiler support -rpath directly
  5655. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  5656. fi
  5657. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5658. ;;
  5659. solaris*)
  5660. _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
  5661. if test "$GCC" = yes; then
  5662. wlarc='${wl}'
  5663. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  5664. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  5665. $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
  5666. else
  5667. wlarc=''
  5668. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5669. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  5670. $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
  5671. fi
  5672. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5673. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5674. case $host_os in
  5675. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  5676. *)
  5677. # The compiler driver will combine and reorder linker options,
  5678. # but understands `-z linker_flag'. GCC discards it without `$wl',
  5679. # but is careful enough not to reorder.
  5680. # Supported since Solaris 2.6 (maybe 2.5.1?)
  5681. if test "$GCC" = yes; then
  5682. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
  5683. else
  5684. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  5685. fi
  5686. ;;
  5687. esac
  5688. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  5689. ;;
  5690. sunos4*)
  5691. if test "x$host_vendor" = xsequent; then
  5692. # Use $CC to link under sequent, because it throws in some extra .o
  5693. # files that make .init and .fini sections work.
  5694. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
  5695. else
  5696. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
  5697. fi
  5698. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5699. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5700. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5701. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5702. ;;
  5703. sysv4)
  5704. case $host_vendor in
  5705. sni)
  5706. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5707. _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
  5708. ;;
  5709. siemens)
  5710. ## LD is ld it makes a PLAMLIB
  5711. ## CC just makes a GrossModule.
  5712. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  5713. _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
  5714. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  5715. ;;
  5716. motorola)
  5717. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5718. _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
  5719. ;;
  5720. esac
  5721. runpath_var='LD_RUN_PATH'
  5722. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5723. ;;
  5724. sysv4.3*)
  5725. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5726. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5727. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
  5728. ;;
  5729. sysv4*MP*)
  5730. if test -d /usr/nec; then
  5731. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5732. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5733. runpath_var=LD_RUN_PATH
  5734. hardcode_runpath_var=yes
  5735. _LT_AC_TAGVAR(ld_shlibs, $1)=yes
  5736. fi
  5737. ;;
  5738. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  5739. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  5740. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  5741. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5742. runpath_var='LD_RUN_PATH'
  5743. if test "$GCC" = yes; then
  5744. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5745. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5746. else
  5747. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5748. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5749. fi
  5750. ;;
  5751. sysv5* | sco3.2v5* | sco5v6*)
  5752. # Note: We can NOT use -z defs as we might desire, because we do not
  5753. # link with -lc, and that would cause any symbols used from libc to
  5754. # always be unresolved, which means just about no library would
  5755. # ever link correctly. If we're not using GNU ld we use -z text
  5756. # though, which does catch some bad symbols but isn't as heavy-handed
  5757. # as -z defs.
  5758. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  5759. _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
  5760. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  5761. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5762. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
  5763. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
  5764. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  5765. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  5766. runpath_var='LD_RUN_PATH'
  5767. if test "$GCC" = yes; then
  5768. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
  5769. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
  5770. else
  5771. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
  5772. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
  5773. fi
  5774. ;;
  5775. uts4*)
  5776. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5777. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5778. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5779. ;;
  5780. *)
  5781. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5782. ;;
  5783. esac
  5784. fi
  5785. ])
  5786. AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
  5787. test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  5788. #
  5789. # Do we need to explicitly link libc?
  5790. #
  5791. case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
  5792. x|xyes)
  5793. # Assume -lc should be added
  5794. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
  5795. if test "$enable_shared" = yes && test "$GCC" = yes; then
  5796. case $_LT_AC_TAGVAR(archive_cmds, $1) in
  5797. *'~'*)
  5798. # FIXME: we may have to deal with multi-command sequences.
  5799. ;;
  5800. '$CC '*)
  5801. # Test whether the compiler implicitly links with -lc since on some
  5802. # systems, -lgcc has to come before -lc. If gcc already passes -lc
  5803. # to ld, don't add -lc before -lgcc.
  5804. AC_MSG_CHECKING([whether -lc should be explicitly linked in])
  5805. $rm conftest*
  5806. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  5807. if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
  5808. soname=conftest
  5809. lib=conftest
  5810. libobjs=conftest.$ac_objext
  5811. deplibs=
  5812. wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
  5813. pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
  5814. compiler_flags=-v
  5815. linker_flags=-v
  5816. verstring=
  5817. output_objdir=.
  5818. libname=conftest
  5819. lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
  5820. _LT_AC_TAGVAR(allow_undefined_flag, $1)=
  5821. if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
  5822. then
  5823. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  5824. else
  5825. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
  5826. fi
  5827. _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
  5828. else
  5829. cat conftest.err 1>&5
  5830. fi
  5831. $rm conftest*
  5832. AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
  5833. ;;
  5834. esac
  5835. fi
  5836. ;;
  5837. esac
  5838. ])# AC_LIBTOOL_PROG_LD_SHLIBS
  5839. # _LT_AC_FILE_LTDLL_C
  5840. # -------------------
  5841. # Be careful that the start marker always follows a newline.
  5842. AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
  5843. # /* ltdll.c starts here */
  5844. # #define WIN32_LEAN_AND_MEAN
  5845. # #include <windows.h>
  5846. # #undef WIN32_LEAN_AND_MEAN
  5847. # #include <stdio.h>
  5848. #
  5849. # #ifndef __CYGWIN__
  5850. # # ifdef __CYGWIN32__
  5851. # # define __CYGWIN__ __CYGWIN32__
  5852. # # endif
  5853. # #endif
  5854. #
  5855. # #ifdef __cplusplus
  5856. # extern "C" {
  5857. # #endif
  5858. # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
  5859. # #ifdef __cplusplus
  5860. # }
  5861. # #endif
  5862. #
  5863. # #ifdef __CYGWIN__
  5864. # #include <cygwin/cygwin_dll.h>
  5865. # DECLARE_CYGWIN_DLL( DllMain );
  5866. # #endif
  5867. # HINSTANCE __hDllInstance_base;
  5868. #
  5869. # BOOL APIENTRY
  5870. # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
  5871. # {
  5872. # __hDllInstance_base = hInst;
  5873. # return TRUE;
  5874. # }
  5875. # /* ltdll.c ends here */
  5876. ])# _LT_AC_FILE_LTDLL_C
  5877. # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
  5878. # ---------------------------------
  5879. AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
  5880. # old names
  5881. AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
  5882. AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
  5883. AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
  5884. AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
  5885. AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
  5886. AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
  5887. AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
  5888. # This is just to silence aclocal about the macro not being used
  5889. ifelse([AC_DISABLE_FAST_INSTALL])
  5890. AC_DEFUN([LT_AC_PROG_GCJ],
  5891. [AC_CHECK_TOOL(GCJ, gcj, no)
  5892. test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
  5893. AC_SUBST(GCJFLAGS)
  5894. ])
  5895. AC_DEFUN([LT_AC_PROG_RC],
  5896. [AC_CHECK_TOOL(RC, windres, no)
  5897. ])
  5898. # Cheap backport of AS_EXECUTABLE_P and required macros
  5899. # from Autoconf 2.59; we should not use $as_executable_p directly.
  5900. # _AS_TEST_PREPARE
  5901. # ----------------
  5902. m4_ifndef([_AS_TEST_PREPARE],
  5903. [m4_defun([_AS_TEST_PREPARE],
  5904. [if test -x / >/dev/null 2>&1; then
  5905. as_executable_p='test -x'
  5906. else
  5907. as_executable_p='test -f'
  5908. fi
  5909. ])])# _AS_TEST_PREPARE
  5910. # AS_EXECUTABLE_P
  5911. # ---------------
  5912. # Check whether a file is executable.
  5913. m4_ifndef([AS_EXECUTABLE_P],
  5914. [m4_defun([AS_EXECUTABLE_P],
  5915. [AS_REQUIRE([_AS_TEST_PREPARE])dnl
  5916. $as_executable_p $1[]dnl
  5917. ])])# AS_EXECUTABLE_P
  5918. # NOTE: This macro has been submitted for inclusion into #
  5919. # GNU Autoconf as AC_PROG_SED. When it is available in #
  5920. # a released version of Autoconf we should remove this #
  5921. # macro and use it instead. #
  5922. # LT_AC_PROG_SED
  5923. # --------------
  5924. # Check for a fully-functional sed program, that truncates
  5925. # as few characters as possible. Prefer GNU sed if found.
  5926. AC_DEFUN([LT_AC_PROG_SED],
  5927. [AC_MSG_CHECKING([for a sed that does not truncate output])
  5928. AC_CACHE_VAL(lt_cv_path_SED,
  5929. [# Loop through the user's path and test for sed and gsed.
  5930. # Then use that list of sed's as ones to test for truncation.
  5931. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  5932. for as_dir in $PATH
  5933. do
  5934. IFS=$as_save_IFS
  5935. test -z "$as_dir" && as_dir=.
  5936. for lt_ac_prog in sed gsed; do
  5937. for ac_exec_ext in '' $ac_executable_extensions; do
  5938. if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then
  5939. lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
  5940. fi
  5941. done
  5942. done
  5943. done
  5944. IFS=$as_save_IFS
  5945. lt_ac_max=0
  5946. lt_ac_count=0
  5947. # Add /usr/xpg4/bin/sed as it is typically found on Solaris
  5948. # along with /bin/sed that truncates output.
  5949. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
  5950. test ! -f $lt_ac_sed && continue
  5951. cat /dev/null > conftest.in
  5952. lt_ac_count=0
  5953. echo $ECHO_N "0123456789$ECHO_C" >conftest.in
  5954. # Check for GNU sed and select it if it is found.
  5955. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
  5956. lt_cv_path_SED=$lt_ac_sed
  5957. break
  5958. fi
  5959. while true; do
  5960. cat conftest.in conftest.in >conftest.tmp
  5961. mv conftest.tmp conftest.in
  5962. cp conftest.in conftest.nl
  5963. echo >>conftest.nl
  5964. $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
  5965. cmp -s conftest.out conftest.nl || break
  5966. # 10000 chars as input seems more than enough
  5967. test $lt_ac_count -gt 10 && break
  5968. lt_ac_count=`expr $lt_ac_count + 1`
  5969. if test $lt_ac_count -gt $lt_ac_max; then
  5970. lt_ac_max=$lt_ac_count
  5971. lt_cv_path_SED=$lt_ac_sed
  5972. fi
  5973. done
  5974. done
  5975. ])
  5976. SED=$lt_cv_path_SED
  5977. AC_SUBST([SED])
  5978. AC_MSG_RESULT([$SED])
  5979. ])
  5980. # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
  5981. #
  5982. # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
  5983. #
  5984. # This program is free software; you can redistribute it and/or modify
  5985. # it under the terms of the GNU General Public License as published by
  5986. # the Free Software Foundation; either version 2 of the License, or
  5987. # (at your option) any later version.
  5988. #
  5989. # This program is distributed in the hope that it will be useful, but
  5990. # WITHOUT ANY WARRANTY; without even the implied warranty of
  5991. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  5992. # General Public License for more details.
  5993. #
  5994. # You should have received a copy of the GNU General Public License
  5995. # along with this program; if not, write to the Free Software
  5996. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  5997. #
  5998. # As a special exception to the GNU General Public License, if you
  5999. # distribute this file as part of a program that contains a
  6000. # configuration script generated by Autoconf, you may include it under
  6001. # the same distribution terms that you use for the rest of that program.
  6002. # PKG_PROG_PKG_CONFIG([MIN-VERSION])
  6003. # ----------------------------------
  6004. AC_DEFUN([PKG_PROG_PKG_CONFIG],
  6005. [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
  6006. m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
  6007. AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
  6008. if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
  6009. AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
  6010. fi
  6011. if test -n "$PKG_CONFIG"; then
  6012. _pkg_min_version=m4_default([$1], [0.9.0])
  6013. AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
  6014. if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
  6015. AC_MSG_RESULT([yes])
  6016. else
  6017. AC_MSG_RESULT([no])
  6018. PKG_CONFIG=""
  6019. fi
  6020. fi[]dnl
  6021. ])# PKG_PROG_PKG_CONFIG
  6022. # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
  6023. #
  6024. # Check to see whether a particular set of modules exists. Similar
  6025. # to PKG_CHECK_MODULES(), but does not set variables or print errors.
  6026. #
  6027. #
  6028. # Similar to PKG_CHECK_MODULES, make sure that the first instance of
  6029. # this or PKG_CHECK_MODULES is called, or make sure to call
  6030. # PKG_CHECK_EXISTS manually
  6031. # --------------------------------------------------------------
  6032. AC_DEFUN([PKG_CHECK_EXISTS],
  6033. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  6034. if test -n "$PKG_CONFIG" && \
  6035. AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
  6036. m4_ifval([$2], [$2], [:])
  6037. m4_ifvaln([$3], [else
  6038. $3])dnl
  6039. fi])
  6040. # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
  6041. # ---------------------------------------------
  6042. m4_define([_PKG_CONFIG],
  6043. [if test -n "$PKG_CONFIG"; then
  6044. if test -n "$$1"; then
  6045. pkg_cv_[]$1="$$1"
  6046. else
  6047. PKG_CHECK_EXISTS([$3],
  6048. [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
  6049. [pkg_failed=yes])
  6050. fi
  6051. else
  6052. pkg_failed=untried
  6053. fi[]dnl
  6054. ])# _PKG_CONFIG
  6055. # _PKG_SHORT_ERRORS_SUPPORTED
  6056. # -----------------------------
  6057. AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
  6058. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
  6059. if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  6060. _pkg_short_errors_supported=yes
  6061. else
  6062. _pkg_short_errors_supported=no
  6063. fi[]dnl
  6064. ])# _PKG_SHORT_ERRORS_SUPPORTED
  6065. # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
  6066. # [ACTION-IF-NOT-FOUND])
  6067. #
  6068. #
  6069. # Note that if there is a possibility the first call to
  6070. # PKG_CHECK_MODULES might not happen, you should be sure to include an
  6071. # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
  6072. #
  6073. #
  6074. # --------------------------------------------------------------
  6075. AC_DEFUN([PKG_CHECK_MODULES],
  6076. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  6077. AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
  6078. AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
  6079. pkg_failed=no
  6080. AC_MSG_CHECKING([for $1])
  6081. _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
  6082. _PKG_CONFIG([$1][_LIBS], [libs], [$2])
  6083. m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
  6084. and $1[]_LIBS to avoid the need to call pkg-config.
  6085. See the pkg-config man page for more details.])
  6086. if test $pkg_failed = yes; then
  6087. _PKG_SHORT_ERRORS_SUPPORTED
  6088. if test $_pkg_short_errors_supported = yes; then
  6089. $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
  6090. else
  6091. $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
  6092. fi
  6093. # Put the nasty error message in config.log where it belongs
  6094. echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
  6095. ifelse([$4], , [AC_MSG_ERROR(dnl
  6096. [Package requirements ($2) were not met:
  6097. $$1_PKG_ERRORS
  6098. Consider adjusting the PKG_CONFIG_PATH environment variable if you
  6099. installed software in a non-standard prefix.
  6100. _PKG_TEXT
  6101. ])],
  6102. [AC_MSG_RESULT([no])
  6103. $4])
  6104. elif test $pkg_failed = untried; then
  6105. ifelse([$4], , [AC_MSG_FAILURE(dnl
  6106. [The pkg-config script could not be found or is too old. Make sure it
  6107. is in your PATH or set the PKG_CONFIG environment variable to the full
  6108. path to pkg-config.
  6109. _PKG_TEXT
  6110. To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
  6111. [$4])
  6112. else
  6113. $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
  6114. $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
  6115. AC_MSG_RESULT([yes])
  6116. ifelse([$3], , :, [$3])
  6117. fi[]dnl
  6118. ])# PKG_CHECK_MODULES
  6119. # Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
  6120. #
  6121. # This file is free software; the Free Software Foundation
  6122. # gives unlimited permission to copy and/or distribute it,
  6123. # with or without modifications, as long as this notice is preserved.
  6124. # AM_AUTOMAKE_VERSION(VERSION)
  6125. # ----------------------------
  6126. # Automake X.Y traces this macro to ensure aclocal.m4 has been
  6127. # generated from the m4 files accompanying Automake X.Y.
  6128. AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
  6129. # AM_SET_CURRENT_AUTOMAKE_VERSION
  6130. # -------------------------------
  6131. # Call AM_AUTOMAKE_VERSION so it can be traced.
  6132. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
  6133. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
  6134. [AM_AUTOMAKE_VERSION([1.9.6])])
  6135. # AM_AUX_DIR_EXPAND -*- Autoconf -*-
  6136. # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
  6137. #
  6138. # This file is free software; the Free Software Foundation
  6139. # gives unlimited permission to copy and/or distribute it,
  6140. # with or without modifications, as long as this notice is preserved.
  6141. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
  6142. # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
  6143. # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
  6144. #
  6145. # Of course, Automake must honor this variable whenever it calls a
  6146. # tool from the auxiliary directory. The problem is that $srcdir (and
  6147. # therefore $ac_aux_dir as well) can be either absolute or relative,
  6148. # depending on how configure is run. This is pretty annoying, since
  6149. # it makes $ac_aux_dir quite unusable in subdirectories: in the top
  6150. # source directory, any form will work fine, but in subdirectories a
  6151. # relative path needs to be adjusted first.
  6152. #
  6153. # $ac_aux_dir/missing
  6154. # fails when called from a subdirectory if $ac_aux_dir is relative
  6155. # $top_srcdir/$ac_aux_dir/missing
  6156. # fails if $ac_aux_dir is absolute,
  6157. # fails when called from a subdirectory in a VPATH build with
  6158. # a relative $ac_aux_dir
  6159. #
  6160. # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
  6161. # are both prefixed by $srcdir. In an in-source build this is usually
  6162. # harmless because $srcdir is `.', but things will broke when you
  6163. # start a VPATH build or use an absolute $srcdir.
  6164. #
  6165. # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
  6166. # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
  6167. # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
  6168. # and then we would define $MISSING as
  6169. # MISSING="\${SHELL} $am_aux_dir/missing"
  6170. # This will work as long as MISSING is not called from configure, because
  6171. # unfortunately $(top_srcdir) has no meaning in configure.
  6172. # However there are other variables, like CC, which are often used in
  6173. # configure, and could therefore not use this "fixed" $ac_aux_dir.
  6174. #
  6175. # Another solution, used here, is to always expand $ac_aux_dir to an
  6176. # absolute PATH. The drawback is that using absolute paths prevent a
  6177. # configured tree to be moved without reconfiguration.
  6178. AC_DEFUN([AM_AUX_DIR_EXPAND],
  6179. [dnl Rely on autoconf to set up CDPATH properly.
  6180. AC_PREREQ([2.50])dnl
  6181. # expand $ac_aux_dir to an absolute path
  6182. am_aux_dir=`cd $ac_aux_dir && pwd`
  6183. ])
  6184. # AM_CONDITIONAL -*- Autoconf -*-
  6185. # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
  6186. # Free Software Foundation, Inc.
  6187. #
  6188. # This file is free software; the Free Software Foundation
  6189. # gives unlimited permission to copy and/or distribute it,
  6190. # with or without modifications, as long as this notice is preserved.
  6191. # serial 7
  6192. # AM_CONDITIONAL(NAME, SHELL-CONDITION)
  6193. # -------------------------------------
  6194. # Define a conditional.
  6195. AC_DEFUN([AM_CONDITIONAL],
  6196. [AC_PREREQ(2.52)dnl
  6197. ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
  6198. [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
  6199. AC_SUBST([$1_TRUE])
  6200. AC_SUBST([$1_FALSE])
  6201. if $2; then
  6202. $1_TRUE=
  6203. $1_FALSE='#'
  6204. else
  6205. $1_TRUE='#'
  6206. $1_FALSE=
  6207. fi
  6208. AC_CONFIG_COMMANDS_PRE(
  6209. [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
  6210. AC_MSG_ERROR([[conditional "$1" was never defined.
  6211. Usually this means the macro was only invoked conditionally.]])
  6212. fi])])
  6213. # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
  6214. # Free Software Foundation, Inc.
  6215. #
  6216. # This file is free software; the Free Software Foundation
  6217. # gives unlimited permission to copy and/or distribute it,
  6218. # with or without modifications, as long as this notice is preserved.
  6219. # serial 8
  6220. # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
  6221. # written in clear, in which case automake, when reading aclocal.m4,
  6222. # will think it sees a *use*, and therefore will trigger all it's
  6223. # C support machinery. Also note that it means that autoscan, seeing
  6224. # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
  6225. # _AM_DEPENDENCIES(NAME)
  6226. # ----------------------
  6227. # See how the compiler implements dependency checking.
  6228. # NAME is "CC", "CXX", "GCJ", or "OBJC".
  6229. # We try a few techniques and use that to set a single cache variable.
  6230. #
  6231. # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
  6232. # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
  6233. # dependency, and given that the user is not expected to run this macro,
  6234. # just rely on AC_PROG_CC.
  6235. AC_DEFUN([_AM_DEPENDENCIES],
  6236. [AC_REQUIRE([AM_SET_DEPDIR])dnl
  6237. AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
  6238. AC_REQUIRE([AM_MAKE_INCLUDE])dnl
  6239. AC_REQUIRE([AM_DEP_TRACK])dnl
  6240. ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
  6241. [$1], CXX, [depcc="$CXX" am_compiler_list=],
  6242. [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
  6243. [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
  6244. [depcc="$$1" am_compiler_list=])
  6245. AC_CACHE_CHECK([dependency style of $depcc],
  6246. [am_cv_$1_dependencies_compiler_type],
  6247. [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  6248. # We make a subdir and do the tests there. Otherwise we can end up
  6249. # making bogus files that we don't know about and never remove. For
  6250. # instance it was reported that on HP-UX the gcc test will end up
  6251. # making a dummy file named `D' -- because `-MD' means `put the output
  6252. # in D'.
  6253. mkdir conftest.dir
  6254. # Copy depcomp to subdir because otherwise we won't find it if we're
  6255. # using a relative directory.
  6256. cp "$am_depcomp" conftest.dir
  6257. cd conftest.dir
  6258. # We will build objects and dependencies in a subdirectory because
  6259. # it helps to detect inapplicable dependency modes. For instance
  6260. # both Tru64's cc and ICC support -MD to output dependencies as a
  6261. # side effect of compilation, but ICC will put the dependencies in
  6262. # the current directory while Tru64 will put them in the object
  6263. # directory.
  6264. mkdir sub
  6265. am_cv_$1_dependencies_compiler_type=none
  6266. if test "$am_compiler_list" = ""; then
  6267. am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
  6268. fi
  6269. for depmode in $am_compiler_list; do
  6270. # Setup a source with many dependencies, because some compilers
  6271. # like to wrap large dependency lists on column 80 (with \), and
  6272. # we should not choose a depcomp mode which is confused by this.
  6273. #
  6274. # We need to recreate these files for each test, as the compiler may
  6275. # overwrite some of them when testing with obscure command lines.
  6276. # This happens at least with the AIX C compiler.
  6277. : > sub/conftest.c
  6278. for i in 1 2 3 4 5 6; do
  6279. echo '#include "conftst'$i'.h"' >> sub/conftest.c
  6280. # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
  6281. # Solaris 8's {/usr,}/bin/sh.
  6282. touch sub/conftst$i.h
  6283. done
  6284. echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
  6285. case $depmode in
  6286. nosideeffect)
  6287. # after this tag, mechanisms are not by side-effect, so they'll
  6288. # only be used when explicitly requested
  6289. if test "x$enable_dependency_tracking" = xyes; then
  6290. continue
  6291. else
  6292. break
  6293. fi
  6294. ;;
  6295. none) break ;;
  6296. esac
  6297. # We check with `-c' and `-o' for the sake of the "dashmstdout"
  6298. # mode. It turns out that the SunPro C++ compiler does not properly
  6299. # handle `-M -o', and we need to detect this.
  6300. if depmode=$depmode \
  6301. source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
  6302. depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
  6303. $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
  6304. >/dev/null 2>conftest.err &&
  6305. grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
  6306. grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
  6307. ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
  6308. # icc doesn't choke on unknown options, it will just issue warnings
  6309. # or remarks (even with -Werror). So we grep stderr for any message
  6310. # that says an option was ignored or not supported.
  6311. # When given -MP, icc 7.0 and 7.1 complain thusly:
  6312. # icc: Command line warning: ignoring option '-M'; no argument required
  6313. # The diagnosis changed in icc 8.0:
  6314. # icc: Command line remark: option '-MP' not supported
  6315. if (grep 'ignoring option' conftest.err ||
  6316. grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
  6317. am_cv_$1_dependencies_compiler_type=$depmode
  6318. break
  6319. fi
  6320. fi
  6321. done
  6322. cd ..
  6323. rm -rf conftest.dir
  6324. else
  6325. am_cv_$1_dependencies_compiler_type=none
  6326. fi
  6327. ])
  6328. AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
  6329. AM_CONDITIONAL([am__fastdep$1], [
  6330. test "x$enable_dependency_tracking" != xno \
  6331. && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
  6332. ])
  6333. # AM_SET_DEPDIR
  6334. # -------------
  6335. # Choose a directory name for dependency files.
  6336. # This macro is AC_REQUIREd in _AM_DEPENDENCIES
  6337. AC_DEFUN([AM_SET_DEPDIR],
  6338. [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  6339. AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
  6340. ])
  6341. # AM_DEP_TRACK
  6342. # ------------
  6343. AC_DEFUN([AM_DEP_TRACK],
  6344. [AC_ARG_ENABLE(dependency-tracking,
  6345. [ --disable-dependency-tracking speeds up one-time build
  6346. --enable-dependency-tracking do not reject slow dependency extractors])
  6347. if test "x$enable_dependency_tracking" != xno; then
  6348. am_depcomp="$ac_aux_dir/depcomp"
  6349. AMDEPBACKSLASH='\'
  6350. fi
  6351. AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
  6352. AC_SUBST([AMDEPBACKSLASH])
  6353. ])
  6354. # Generate code to set up dependency tracking. -*- Autoconf -*-
  6355. # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
  6356. # Free Software Foundation, Inc.
  6357. #
  6358. # This file is free software; the Free Software Foundation
  6359. # gives unlimited permission to copy and/or distribute it,
  6360. # with or without modifications, as long as this notice is preserved.
  6361. #serial 3
  6362. # _AM_OUTPUT_DEPENDENCY_COMMANDS
  6363. # ------------------------------
  6364. AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
  6365. [for mf in $CONFIG_FILES; do
  6366. # Strip MF so we end up with the name of the file.
  6367. mf=`echo "$mf" | sed -e 's/:.*$//'`
  6368. # Check whether this is an Automake generated Makefile or not.
  6369. # We used to match only the files named `Makefile.in', but
  6370. # some people rename them; so instead we look at the file content.
  6371. # Grep'ing the first line is not enough: some people post-process
  6372. # each Makefile.in and add a new line on top of each file to say so.
  6373. # So let's grep whole file.
  6374. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
  6375. dirpart=`AS_DIRNAME("$mf")`
  6376. else
  6377. continue
  6378. fi
  6379. # Extract the definition of DEPDIR, am__include, and am__quote
  6380. # from the Makefile without running `make'.
  6381. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
  6382. test -z "$DEPDIR" && continue
  6383. am__include=`sed -n 's/^am__include = //p' < "$mf"`
  6384. test -z "am__include" && continue
  6385. am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
  6386. # When using ansi2knr, U may be empty or an underscore; expand it
  6387. U=`sed -n 's/^U = //p' < "$mf"`
  6388. # Find all dependency output files, they are included files with
  6389. # $(DEPDIR) in their names. We invoke sed twice because it is the
  6390. # simplest approach to changing $(DEPDIR) to its actual value in the
  6391. # expansion.
  6392. for file in `sed -n "
  6393. s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
  6394. sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
  6395. # Make sure the directory exists.
  6396. test -f "$dirpart/$file" && continue
  6397. fdir=`AS_DIRNAME(["$file"])`
  6398. AS_MKDIR_P([$dirpart/$fdir])
  6399. # echo "creating $dirpart/$file"
  6400. echo '# dummy' > "$dirpart/$file"
  6401. done
  6402. done
  6403. ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
  6404. # AM_OUTPUT_DEPENDENCY_COMMANDS
  6405. # -----------------------------
  6406. # This macro should only be invoked once -- use via AC_REQUIRE.
  6407. #
  6408. # This code is only required when automatic dependency tracking
  6409. # is enabled. FIXME. This creates each `.P' file that we will
  6410. # need in order to bootstrap the dependency handling code.
  6411. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
  6412. [AC_CONFIG_COMMANDS([depfiles],
  6413. [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
  6414. [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
  6415. ])
  6416. # Do all the work for Automake. -*- Autoconf -*-
  6417. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
  6418. # Free Software Foundation, Inc.
  6419. #
  6420. # This file is free software; the Free Software Foundation
  6421. # gives unlimited permission to copy and/or distribute it,
  6422. # with or without modifications, as long as this notice is preserved.
  6423. # serial 12
  6424. # This macro actually does too much. Some checks are only needed if
  6425. # your package does certain things. But this isn't really a big deal.
  6426. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
  6427. # AM_INIT_AUTOMAKE([OPTIONS])
  6428. # -----------------------------------------------
  6429. # The call with PACKAGE and VERSION arguments is the old style
  6430. # call (pre autoconf-2.50), which is being phased out. PACKAGE
  6431. # and VERSION should now be passed to AC_INIT and removed from
  6432. # the call to AM_INIT_AUTOMAKE.
  6433. # We support both call styles for the transition. After
  6434. # the next Automake release, Autoconf can make the AC_INIT
  6435. # arguments mandatory, and then we can depend on a new Autoconf
  6436. # release and drop the old call support.
  6437. AC_DEFUN([AM_INIT_AUTOMAKE],
  6438. [AC_PREREQ([2.58])dnl
  6439. dnl Autoconf wants to disallow AM_ names. We explicitly allow
  6440. dnl the ones we care about.
  6441. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
  6442. AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
  6443. AC_REQUIRE([AC_PROG_INSTALL])dnl
  6444. # test to see if srcdir already configured
  6445. if test "`cd $srcdir && pwd`" != "`pwd`" &&
  6446. test -f $srcdir/config.status; then
  6447. AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  6448. fi
  6449. # test whether we have cygpath
  6450. if test -z "$CYGPATH_W"; then
  6451. if (cygpath --version) >/dev/null 2>/dev/null; then
  6452. CYGPATH_W='cygpath -w'
  6453. else
  6454. CYGPATH_W=echo
  6455. fi
  6456. fi
  6457. AC_SUBST([CYGPATH_W])
  6458. # Define the identity of the package.
  6459. dnl Distinguish between old-style and new-style calls.
  6460. m4_ifval([$2],
  6461. [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  6462. AC_SUBST([PACKAGE], [$1])dnl
  6463. AC_SUBST([VERSION], [$2])],
  6464. [_AM_SET_OPTIONS([$1])dnl
  6465. AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  6466. AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
  6467. _AM_IF_OPTION([no-define],,
  6468. [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
  6469. AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
  6470. # Some tools Automake needs.
  6471. AC_REQUIRE([AM_SANITY_CHECK])dnl
  6472. AC_REQUIRE([AC_ARG_PROGRAM])dnl
  6473. AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
  6474. AM_MISSING_PROG(AUTOCONF, autoconf)
  6475. AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
  6476. AM_MISSING_PROG(AUTOHEADER, autoheader)
  6477. AM_MISSING_PROG(MAKEINFO, makeinfo)
  6478. AM_PROG_INSTALL_SH
  6479. AM_PROG_INSTALL_STRIP
  6480. AC_REQUIRE([AM_PROG_MKDIR_P])dnl
  6481. # We need awk for the "check" target. The system "awk" is bad on
  6482. # some platforms.
  6483. AC_REQUIRE([AC_PROG_AWK])dnl
  6484. AC_REQUIRE([AC_PROG_MAKE_SET])dnl
  6485. AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  6486. _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
  6487. [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
  6488. [_AM_PROG_TAR([v7])])])
  6489. _AM_IF_OPTION([no-dependencies],,
  6490. [AC_PROVIDE_IFELSE([AC_PROG_CC],
  6491. [_AM_DEPENDENCIES(CC)],
  6492. [define([AC_PROG_CC],
  6493. defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
  6494. AC_PROVIDE_IFELSE([AC_PROG_CXX],
  6495. [_AM_DEPENDENCIES(CXX)],
  6496. [define([AC_PROG_CXX],
  6497. defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
  6498. ])
  6499. ])
  6500. # When config.status generates a header, we must update the stamp-h file.
  6501. # This file resides in the same directory as the config header
  6502. # that is generated. The stamp files are numbered to have different names.
  6503. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
  6504. # loop where config.status creates the headers, so we can generate
  6505. # our stamp files there.
  6506. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
  6507. [# Compute $1's index in $config_headers.
  6508. _am_stamp_count=1
  6509. for _am_header in $config_headers :; do
  6510. case $_am_header in
  6511. $1 | $1:* )
  6512. break ;;
  6513. * )
  6514. _am_stamp_count=`expr $_am_stamp_count + 1` ;;
  6515. esac
  6516. done
  6517. echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
  6518. # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
  6519. #
  6520. # This file is free software; the Free Software Foundation
  6521. # gives unlimited permission to copy and/or distribute it,
  6522. # with or without modifications, as long as this notice is preserved.
  6523. # AM_PROG_INSTALL_SH
  6524. # ------------------
  6525. # Define $install_sh.
  6526. AC_DEFUN([AM_PROG_INSTALL_SH],
  6527. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  6528. install_sh=${install_sh-"$am_aux_dir/install-sh"}
  6529. AC_SUBST(install_sh)])
  6530. # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
  6531. #
  6532. # This file is free software; the Free Software Foundation
  6533. # gives unlimited permission to copy and/or distribute it,
  6534. # with or without modifications, as long as this notice is preserved.
  6535. # serial 2
  6536. # Check whether the underlying file-system supports filenames
  6537. # with a leading dot. For instance MS-DOS doesn't.
  6538. AC_DEFUN([AM_SET_LEADING_DOT],
  6539. [rm -rf .tst 2>/dev/null
  6540. mkdir .tst 2>/dev/null
  6541. if test -d .tst; then
  6542. am__leading_dot=.
  6543. else
  6544. am__leading_dot=_
  6545. fi
  6546. rmdir .tst 2>/dev/null
  6547. AC_SUBST([am__leading_dot])])
  6548. # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
  6549. # From Jim Meyering
  6550. # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
  6551. # Free Software Foundation, Inc.
  6552. #
  6553. # This file is free software; the Free Software Foundation
  6554. # gives unlimited permission to copy and/or distribute it,
  6555. # with or without modifications, as long as this notice is preserved.
  6556. # serial 4
  6557. AC_DEFUN([AM_MAINTAINER_MODE],
  6558. [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
  6559. dnl maintainer-mode is disabled by default
  6560. AC_ARG_ENABLE(maintainer-mode,
  6561. [ --enable-maintainer-mode enable make rules and dependencies not useful
  6562. (and sometimes confusing) to the casual installer],
  6563. USE_MAINTAINER_MODE=$enableval,
  6564. USE_MAINTAINER_MODE=no)
  6565. AC_MSG_RESULT([$USE_MAINTAINER_MODE])
  6566. AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
  6567. MAINT=$MAINTAINER_MODE_TRUE
  6568. AC_SUBST(MAINT)dnl
  6569. ]
  6570. )
  6571. AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
  6572. # Check to see how 'make' treats includes. -*- Autoconf -*-
  6573. # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
  6574. #
  6575. # This file is free software; the Free Software Foundation
  6576. # gives unlimited permission to copy and/or distribute it,
  6577. # with or without modifications, as long as this notice is preserved.
  6578. # serial 3
  6579. # AM_MAKE_INCLUDE()
  6580. # -----------------
  6581. # Check to see how make treats includes.
  6582. AC_DEFUN([AM_MAKE_INCLUDE],
  6583. [am_make=${MAKE-make}
  6584. cat > confinc << 'END'
  6585. am__doit:
  6586. @echo done
  6587. .PHONY: am__doit
  6588. END
  6589. # If we don't find an include directive, just comment out the code.
  6590. AC_MSG_CHECKING([for style of include used by $am_make])
  6591. am__include="#"
  6592. am__quote=
  6593. _am_result=none
  6594. # First try GNU make style include.
  6595. echo "include confinc" > confmf
  6596. # We grep out `Entering directory' and `Leaving directory'
  6597. # messages which can occur if `w' ends up in MAKEFLAGS.
  6598. # In particular we don't look at `^make:' because GNU make might
  6599. # be invoked under some other name (usually "gmake"), in which
  6600. # case it prints its new name instead of `make'.
  6601. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
  6602. am__include=include
  6603. am__quote=
  6604. _am_result=GNU
  6605. fi
  6606. # Now try BSD make style include.
  6607. if test "$am__include" = "#"; then
  6608. echo '.include "confinc"' > confmf
  6609. if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
  6610. am__include=.include
  6611. am__quote="\""
  6612. _am_result=BSD
  6613. fi
  6614. fi
  6615. AC_SUBST([am__include])
  6616. AC_SUBST([am__quote])
  6617. AC_MSG_RESULT([$_am_result])
  6618. rm -f confinc confmf
  6619. ])
  6620. # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
  6621. # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
  6622. # Free Software Foundation, Inc.
  6623. #
  6624. # This file is free software; the Free Software Foundation
  6625. # gives unlimited permission to copy and/or distribute it,
  6626. # with or without modifications, as long as this notice is preserved.
  6627. # serial 4
  6628. # AM_MISSING_PROG(NAME, PROGRAM)
  6629. # ------------------------------
  6630. AC_DEFUN([AM_MISSING_PROG],
  6631. [AC_REQUIRE([AM_MISSING_HAS_RUN])
  6632. $1=${$1-"${am_missing_run}$2"}
  6633. AC_SUBST($1)])
  6634. # AM_MISSING_HAS_RUN
  6635. # ------------------
  6636. # Define MISSING if not defined so far and test if it supports --run.
  6637. # If it does, set am_missing_run to use it, otherwise, to nothing.
  6638. AC_DEFUN([AM_MISSING_HAS_RUN],
  6639. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  6640. test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
  6641. # Use eval to expand $SHELL
  6642. if eval "$MISSING --run true"; then
  6643. am_missing_run="$MISSING --run "
  6644. else
  6645. am_missing_run=
  6646. AC_MSG_WARN([`missing' script is too old or missing])
  6647. fi
  6648. ])
  6649. # Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
  6650. #
  6651. # This file is free software; the Free Software Foundation
  6652. # gives unlimited permission to copy and/or distribute it,
  6653. # with or without modifications, as long as this notice is preserved.
  6654. # AM_PROG_MKDIR_P
  6655. # ---------------
  6656. # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
  6657. #
  6658. # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
  6659. # created by `make install' are always world readable, even if the
  6660. # installer happens to have an overly restrictive umask (e.g. 077).
  6661. # This was a mistake. There are at least two reasons why we must not
  6662. # use `-m 0755':
  6663. # - it causes special bits like SGID to be ignored,
  6664. # - it may be too restrictive (some setups expect 775 directories).
  6665. #
  6666. # Do not use -m 0755 and let people choose whatever they expect by
  6667. # setting umask.
  6668. #
  6669. # We cannot accept any implementation of `mkdir' that recognizes `-p'.
  6670. # Some implementations (such as Solaris 8's) are not thread-safe: if a
  6671. # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
  6672. # concurrently, both version can detect that a/ is missing, but only
  6673. # one can create it and the other will error out. Consequently we
  6674. # restrict ourselves to GNU make (using the --version option ensures
  6675. # this.)
  6676. AC_DEFUN([AM_PROG_MKDIR_P],
  6677. [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
  6678. # We used to keeping the `.' as first argument, in order to
  6679. # allow $(mkdir_p) to be used without argument. As in
  6680. # $(mkdir_p) $(somedir)
  6681. # where $(somedir) is conditionally defined. However this is wrong
  6682. # for two reasons:
  6683. # 1. if the package is installed by a user who cannot write `.'
  6684. # make install will fail,
  6685. # 2. the above comment should most certainly read
  6686. # $(mkdir_p) $(DESTDIR)$(somedir)
  6687. # so it does not work when $(somedir) is undefined and
  6688. # $(DESTDIR) is not.
  6689. # To support the latter case, we have to write
  6690. # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
  6691. # so the `.' trick is pointless.
  6692. mkdir_p='mkdir -p --'
  6693. else
  6694. # On NextStep and OpenStep, the `mkdir' command does not
  6695. # recognize any option. It will interpret all options as
  6696. # directories to create, and then abort because `.' already
  6697. # exists.
  6698. for d in ./-p ./--version;
  6699. do
  6700. test -d $d && rmdir $d
  6701. done
  6702. # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
  6703. if test -f "$ac_aux_dir/mkinstalldirs"; then
  6704. mkdir_p='$(mkinstalldirs)'
  6705. else
  6706. mkdir_p='$(SHELL) $(install_sh) -d'
  6707. fi
  6708. fi
  6709. AC_SUBST([mkdir_p])])
  6710. # Helper functions for option handling. -*- Autoconf -*-
  6711. # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
  6712. #
  6713. # This file is free software; the Free Software Foundation
  6714. # gives unlimited permission to copy and/or distribute it,
  6715. # with or without modifications, as long as this notice is preserved.
  6716. # serial 3
  6717. # _AM_MANGLE_OPTION(NAME)
  6718. # -----------------------
  6719. AC_DEFUN([_AM_MANGLE_OPTION],
  6720. [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
  6721. # _AM_SET_OPTION(NAME)
  6722. # ------------------------------
  6723. # Set option NAME. Presently that only means defining a flag for this option.
  6724. AC_DEFUN([_AM_SET_OPTION],
  6725. [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
  6726. # _AM_SET_OPTIONS(OPTIONS)
  6727. # ----------------------------------
  6728. # OPTIONS is a space-separated list of Automake options.
  6729. AC_DEFUN([_AM_SET_OPTIONS],
  6730. [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
  6731. # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
  6732. # -------------------------------------------
  6733. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  6734. AC_DEFUN([_AM_IF_OPTION],
  6735. [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
  6736. # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
  6737. #
  6738. # This file is free software; the Free Software Foundation
  6739. # gives unlimited permission to copy and/or distribute it,
  6740. # with or without modifications, as long as this notice is preserved.
  6741. # AM_PROG_INSTALL_STRIP
  6742. # ---------------------
  6743. # One issue with vendor `install' (even GNU) is that you can't
  6744. # specify the program used to strip binaries. This is especially
  6745. # annoying in cross-compiling environments, where the build's strip
  6746. # is unlikely to handle the host's binaries.
  6747. # Fortunately install-sh will honor a STRIPPROG variable, so we
  6748. # always use install-sh in `make install-strip', and initialize
  6749. # STRIPPROG with the value of the STRIP variable (set by the user).
  6750. AC_DEFUN([AM_PROG_INSTALL_STRIP],
  6751. [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  6752. # Installed binaries are usually stripped using `strip' when the user
  6753. # run `make install-strip'. However `strip' might not be the right
  6754. # tool to use in cross-compilation environments, therefore Automake
  6755. # will honor the `STRIP' environment variable to overrule this program.
  6756. dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
  6757. if test "$cross_compiling" != no; then
  6758. AC_CHECK_TOOL([STRIP], [strip], :)
  6759. fi
  6760. INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
  6761. AC_SUBST([INSTALL_STRIP_PROGRAM])])
  6762. # Check how to create a tarball. -*- Autoconf -*-
  6763. # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
  6764. #
  6765. # This file is free software; the Free Software Foundation
  6766. # gives unlimited permission to copy and/or distribute it,
  6767. # with or without modifications, as long as this notice is preserved.
  6768. # serial 2
  6769. # _AM_PROG_TAR(FORMAT)
  6770. # --------------------
  6771. # Check how to create a tarball in format FORMAT.
  6772. # FORMAT should be one of `v7', `ustar', or `pax'.
  6773. #
  6774. # Substitute a variable $(am__tar) that is a command
  6775. # writing to stdout a FORMAT-tarball containing the directory
  6776. # $tardir.
  6777. # tardir=directory && $(am__tar) > result.tar
  6778. #
  6779. # Substitute a variable $(am__untar) that extract such
  6780. # a tarball read from stdin.
  6781. # $(am__untar) < result.tar
  6782. AC_DEFUN([_AM_PROG_TAR],
  6783. [# Always define AMTAR for backward compatibility.
  6784. AM_MISSING_PROG([AMTAR], [tar])
  6785. m4_if([$1], [v7],
  6786. [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
  6787. [m4_case([$1], [ustar],, [pax],,
  6788. [m4_fatal([Unknown tar format])])
  6789. AC_MSG_CHECKING([how to create a $1 tar archive])
  6790. # Loop over all known methods to create a tar archive until one works.
  6791. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
  6792. _am_tools=${am_cv_prog_tar_$1-$_am_tools}
  6793. # Do not fold the above two line into one, because Tru64 sh and
  6794. # Solaris sh will not grok spaces in the rhs of `-'.
  6795. for _am_tool in $_am_tools
  6796. do
  6797. case $_am_tool in
  6798. gnutar)
  6799. for _am_tar in tar gnutar gtar;
  6800. do
  6801. AM_RUN_LOG([$_am_tar --version]) && break
  6802. done
  6803. am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
  6804. am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
  6805. am__untar="$_am_tar -xf -"
  6806. ;;
  6807. plaintar)
  6808. # Must skip GNU tar: if it does not support --format= it doesn't create
  6809. # ustar tarball either.
  6810. (tar --version) >/dev/null 2>&1 && continue
  6811. am__tar='tar chf - "$$tardir"'
  6812. am__tar_='tar chf - "$tardir"'
  6813. am__untar='tar xf -'
  6814. ;;
  6815. pax)
  6816. am__tar='pax -L -x $1 -w "$$tardir"'
  6817. am__tar_='pax -L -x $1 -w "$tardir"'
  6818. am__untar='pax -r'
  6819. ;;
  6820. cpio)
  6821. am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
  6822. am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
  6823. am__untar='cpio -i -H $1 -d'
  6824. ;;
  6825. none)
  6826. am__tar=false
  6827. am__tar_=false
  6828. am__untar=false
  6829. ;;
  6830. esac
  6831. # If the value was cached, stop now. We just wanted to have am__tar
  6832. # and am__untar set.
  6833. test -n "${am_cv_prog_tar_$1}" && break
  6834. # tar/untar a dummy directory, and stop if the command works
  6835. rm -rf conftest.dir
  6836. mkdir conftest.dir
  6837. echo GrepMe > conftest.dir/file
  6838. AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
  6839. rm -rf conftest.dir
  6840. if test -s conftest.tar; then
  6841. AM_RUN_LOG([$am__untar <conftest.tar])
  6842. grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
  6843. fi
  6844. done
  6845. rm -rf conftest.dir
  6846. AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
  6847. AC_MSG_RESULT([$am_cv_prog_tar_$1])])
  6848. AC_SUBST([am__tar])
  6849. AC_SUBST([am__untar])
  6850. ]) # _AM_PROG_TAR
  6851. dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
  6852. dnl
  6853. dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
  6854. dnl
  6855. dnl Permission is hereby granted, free of charge, to any person obtaining a
  6856. dnl copy of this software and associated documentation files (the "Software"),
  6857. dnl to deal in the Software without restriction, including without limitation
  6858. dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
  6859. dnl and/or sell copies of the Software, and to permit persons to whom the
  6860. dnl Software is furnished to do so, subject to the following conditions:
  6861. dnl
  6862. dnl The above copyright notice and this permission notice (including the next
  6863. dnl paragraph) shall be included in all copies or substantial portions of the
  6864. dnl Software.
  6865. dnl
  6866. dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  6867. dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  6868. dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  6869. dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  6870. dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  6871. dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  6872. dnl DEALINGS IN THE SOFTWARE.
  6873. # XORG_MACROS_VERSION(required-version)
  6874. # -------------------------------------
  6875. # Minimum version: 1.1.0
  6876. #
  6877. # If you're using a macro added in Version 1.1 or newer, include this in
  6878. # your configure.ac with the minimum required version, such as:
  6879. # XORG_MACROS_VERSION(1.1)
  6880. #
  6881. # To ensure that this macro is defined, also add:
  6882. # m4_ifndef([XORG_MACROS_VERSION],
  6883. # [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
  6884. #
  6885. #
  6886. # See the "minimum version" comment for each macro you use to see what
  6887. # version you require.
  6888. m4_defun([XORG_MACROS_VERSION],[
  6889. m4_define([vers_have], [1.13.0])
  6890. m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
  6891. m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
  6892. m4_if(m4_cmp(maj_have, maj_needed), 0,,
  6893. [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
  6894. m4_if(m4_version_compare(vers_have, [$1]), -1,
  6895. [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
  6896. m4_undefine([vers_have])
  6897. m4_undefine([maj_have])
  6898. m4_undefine([maj_needed])
  6899. ]) # XORG_MACROS_VERSION
  6900. # XORG_PROG_RAWCPP()
  6901. # ------------------
  6902. # Minimum version: 1.0.0
  6903. #
  6904. # Find cpp program and necessary flags for use in pre-processing text files
  6905. # such as man pages and config files
  6906. AC_DEFUN([XORG_PROG_RAWCPP],[
  6907. AC_REQUIRE([AC_PROG_CPP])
  6908. AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}],
  6909. [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
  6910. # Check for flag to avoid builtin definitions - assumes unix is predefined,
  6911. # which is not the best choice for supporting other OS'es, but covers most
  6912. # of the ones we need for now.
  6913. AC_MSG_CHECKING([if $RAWCPP requires -undef])
  6914. AC_LANG_CONFTEST([Does cpp redefine unix ?])
  6915. if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
  6916. AC_MSG_RESULT([no])
  6917. else
  6918. if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
  6919. RAWCPPFLAGS=-undef
  6920. AC_MSG_RESULT([yes])
  6921. # under Cygwin unix is still defined even with -undef
  6922. elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
  6923. RAWCPPFLAGS="-undef -ansi"
  6924. AC_MSG_RESULT([yes, with -ansi])
  6925. else
  6926. AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.])
  6927. fi
  6928. fi
  6929. rm -f conftest.$ac_ext
  6930. AC_MSG_CHECKING([if $RAWCPP requires -traditional])
  6931. AC_LANG_CONFTEST([Does cpp preserve "whitespace"?])
  6932. if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
  6933. AC_MSG_RESULT([no])
  6934. else
  6935. if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
  6936. RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
  6937. AC_MSG_RESULT([yes])
  6938. else
  6939. AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.])
  6940. fi
  6941. fi
  6942. rm -f conftest.$ac_ext
  6943. AC_SUBST(RAWCPPFLAGS)
  6944. ]) # XORG_PROG_RAWCPP
  6945. # XORG_MANPAGE_SECTIONS()
  6946. # -----------------------
  6947. # Minimum version: 1.0.0
  6948. #
  6949. # Determine which sections man pages go in for the different man page types
  6950. # on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
  6951. # Not sure if there's any better way than just hardcoding by OS name.
  6952. # Override default settings by setting environment variables
  6953. # Added MAN_SUBSTS in version 1.8
  6954. # Added AC_PROG_SED in version 1.8
  6955. AC_DEFUN([XORG_MANPAGE_SECTIONS],[
  6956. AC_REQUIRE([AC_CANONICAL_HOST])
  6957. AC_REQUIRE([AC_PROG_SED])
  6958. if test x$APP_MAN_SUFFIX = x ; then
  6959. APP_MAN_SUFFIX=1
  6960. fi
  6961. if test x$APP_MAN_DIR = x ; then
  6962. APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
  6963. fi
  6964. if test x$LIB_MAN_SUFFIX = x ; then
  6965. LIB_MAN_SUFFIX=3
  6966. fi
  6967. if test x$LIB_MAN_DIR = x ; then
  6968. LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
  6969. fi
  6970. if test x$FILE_MAN_SUFFIX = x ; then
  6971. case $host_os in
  6972. solaris*) FILE_MAN_SUFFIX=4 ;;
  6973. *) FILE_MAN_SUFFIX=5 ;;
  6974. esac
  6975. fi
  6976. if test x$FILE_MAN_DIR = x ; then
  6977. FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
  6978. fi
  6979. if test x$MISC_MAN_SUFFIX = x ; then
  6980. case $host_os in
  6981. solaris*) MISC_MAN_SUFFIX=5 ;;
  6982. *) MISC_MAN_SUFFIX=7 ;;
  6983. esac
  6984. fi
  6985. if test x$MISC_MAN_DIR = x ; then
  6986. MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
  6987. fi
  6988. if test x$DRIVER_MAN_SUFFIX = x ; then
  6989. case $host_os in
  6990. solaris*) DRIVER_MAN_SUFFIX=7 ;;
  6991. *) DRIVER_MAN_SUFFIX=4 ;;
  6992. esac
  6993. fi
  6994. if test x$DRIVER_MAN_DIR = x ; then
  6995. DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
  6996. fi
  6997. if test x$ADMIN_MAN_SUFFIX = x ; then
  6998. case $host_os in
  6999. solaris*) ADMIN_MAN_SUFFIX=1m ;;
  7000. *) ADMIN_MAN_SUFFIX=8 ;;
  7001. esac
  7002. fi
  7003. if test x$ADMIN_MAN_DIR = x ; then
  7004. ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
  7005. fi
  7006. AC_SUBST([APP_MAN_SUFFIX])
  7007. AC_SUBST([LIB_MAN_SUFFIX])
  7008. AC_SUBST([FILE_MAN_SUFFIX])
  7009. AC_SUBST([MISC_MAN_SUFFIX])
  7010. AC_SUBST([DRIVER_MAN_SUFFIX])
  7011. AC_SUBST([ADMIN_MAN_SUFFIX])
  7012. AC_SUBST([APP_MAN_DIR])
  7013. AC_SUBST([LIB_MAN_DIR])
  7014. AC_SUBST([FILE_MAN_DIR])
  7015. AC_SUBST([MISC_MAN_DIR])
  7016. AC_SUBST([DRIVER_MAN_DIR])
  7017. AC_SUBST([ADMIN_MAN_DIR])
  7018. XORG_MAN_PAGE="X Version 11"
  7019. AC_SUBST([XORG_MAN_PAGE])
  7020. MAN_SUBSTS="\
  7021. -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
  7022. -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
  7023. -e 's|__xservername__|Xorg|g' \
  7024. -e 's|__xconfigfile__|xorg.conf|g' \
  7025. -e 's|__projectroot__|\$(prefix)|g' \
  7026. -e 's|__apploaddir__|\$(appdefaultdir)|g' \
  7027. -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
  7028. -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
  7029. -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
  7030. -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
  7031. -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
  7032. -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
  7033. AC_SUBST([MAN_SUBSTS])
  7034. ]) # XORG_MANPAGE_SECTIONS
  7035. # XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
  7036. # ------------------------
  7037. # Minimum version: 1.7.0
  7038. #
  7039. # Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
  7040. # provided by xorg-sgml-doctools, if installed.
  7041. AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
  7042. AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
  7043. XORG_SGML_PATH=
  7044. PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
  7045. [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
  7046. [m4_ifval([$1],[:],
  7047. [if test x"$cross_compiling" != x"yes" ; then
  7048. AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
  7049. [XORG_SGML_PATH=$prefix/share/sgml])
  7050. fi])
  7051. ])
  7052. # Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
  7053. # the path and the name of the doc stylesheet
  7054. if test "x$XORG_SGML_PATH" != "x" ; then
  7055. AC_MSG_RESULT([$XORG_SGML_PATH])
  7056. STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
  7057. XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
  7058. else
  7059. AC_MSG_RESULT([no])
  7060. fi
  7061. AC_SUBST(XORG_SGML_PATH)
  7062. AC_SUBST(STYLESHEET_SRCDIR)
  7063. AC_SUBST(XSL_STYLESHEET)
  7064. AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
  7065. ]) # XORG_CHECK_SGML_DOCTOOLS
  7066. # XORG_CHECK_LINUXDOC
  7067. # -------------------
  7068. # Minimum version: 1.0.0
  7069. #
  7070. # Defines the variable MAKE_TEXT if the necessary tools and
  7071. # files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
  7072. # Whether or not the necessary tools and files are found can be checked
  7073. # with the AM_CONDITIONAL "BUILD_LINUXDOC"
  7074. AC_DEFUN([XORG_CHECK_LINUXDOC],[
  7075. AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
  7076. AC_REQUIRE([XORG_WITH_PS2PDF])
  7077. AC_PATH_PROG(LINUXDOC, linuxdoc)
  7078. AC_MSG_CHECKING([whether to build documentation])
  7079. if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
  7080. BUILDDOC=yes
  7081. else
  7082. BUILDDOC=no
  7083. fi
  7084. AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
  7085. AC_MSG_RESULT([$BUILDDOC])
  7086. AC_MSG_CHECKING([whether to build pdf documentation])
  7087. if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
  7088. BUILDPDFDOC=yes
  7089. else
  7090. BUILDPDFDOC=no
  7091. fi
  7092. AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
  7093. AC_MSG_RESULT([$BUILDPDFDOC])
  7094. MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
  7095. MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
  7096. MAKE_PDF="$PS2PDF"
  7097. MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0"
  7098. AC_SUBST(MAKE_TEXT)
  7099. AC_SUBST(MAKE_PS)
  7100. AC_SUBST(MAKE_PDF)
  7101. AC_SUBST(MAKE_HTML)
  7102. ]) # XORG_CHECK_LINUXDOC
  7103. # XORG_CHECK_DOCBOOK
  7104. # -------------------
  7105. # Minimum version: 1.0.0
  7106. #
  7107. # Checks for the ability to build output formats from SGML DocBook source.
  7108. # For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
  7109. # indicates whether the necessary tools and files are found and, if set,
  7110. # $(MAKE_XXX) blah.sgml will produce blah.xxx.
  7111. AC_DEFUN([XORG_CHECK_DOCBOOK],[
  7112. AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
  7113. BUILDTXTDOC=no
  7114. BUILDPDFDOC=no
  7115. BUILDPSDOC=no
  7116. BUILDHTMLDOC=no
  7117. AC_PATH_PROG(DOCBOOKPS, docbook2ps)
  7118. AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
  7119. AC_PATH_PROG(DOCBOOKHTML, docbook2html)
  7120. AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
  7121. AC_MSG_CHECKING([whether to build text documentation])
  7122. if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
  7123. test x$BUILD_TXTDOC != xno; then
  7124. BUILDTXTDOC=yes
  7125. fi
  7126. AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
  7127. AC_MSG_RESULT([$BUILDTXTDOC])
  7128. AC_MSG_CHECKING([whether to build PDF documentation])
  7129. if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
  7130. test x$BUILD_PDFDOC != xno; then
  7131. BUILDPDFDOC=yes
  7132. fi
  7133. AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
  7134. AC_MSG_RESULT([$BUILDPDFDOC])
  7135. AC_MSG_CHECKING([whether to build PostScript documentation])
  7136. if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
  7137. test x$BUILD_PSDOC != xno; then
  7138. BUILDPSDOC=yes
  7139. fi
  7140. AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
  7141. AC_MSG_RESULT([$BUILDPSDOC])
  7142. AC_MSG_CHECKING([whether to build HTML documentation])
  7143. if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
  7144. test x$BUILD_HTMLDOC != xno; then
  7145. BUILDHTMLDOC=yes
  7146. fi
  7147. AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
  7148. AC_MSG_RESULT([$BUILDHTMLDOC])
  7149. MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
  7150. MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
  7151. MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
  7152. MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
  7153. AC_SUBST(MAKE_TEXT)
  7154. AC_SUBST(MAKE_PS)
  7155. AC_SUBST(MAKE_PDF)
  7156. AC_SUBST(MAKE_HTML)
  7157. ]) # XORG_CHECK_DOCBOOK
  7158. # XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
  7159. # ----------------
  7160. # Minimum version: 1.5.0
  7161. # Minimum version for optional DEFAULT argument: 1.11.0
  7162. #
  7163. # Documentation tools are not always available on all platforms and sometimes
  7164. # not at the appropriate level. This macro enables a module to test for the
  7165. # presence of the tool and obtain it's path in separate variables. Coupled with
  7166. # the --with-xmlto option, it allows maximum flexibilty in making decisions
  7167. # as whether or not to use the xmlto package. When DEFAULT is not specified,
  7168. # --with-xmlto assumes 'auto'.
  7169. #
  7170. # Interface to module:
  7171. # HAVE_XMLTO: used in makefiles to conditionally generate documentation
  7172. # XMLTO: returns the path of the xmlto program found
  7173. # returns the path set by the user in the environment
  7174. # --with-xmlto: 'yes' user instructs the module to use xmlto
  7175. # 'no' user instructs the module not to use xmlto
  7176. #
  7177. # Added in version 1.10.0
  7178. # HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
  7179. # xmlto for text output requires either lynx, links, or w3m browsers
  7180. #
  7181. # If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
  7182. #
  7183. AC_DEFUN([XORG_WITH_XMLTO],[
  7184. AC_ARG_VAR([XMLTO], [Path to xmlto command])
  7185. m4_define([_defopt], m4_default([$2], [auto]))
  7186. AC_ARG_WITH(xmlto,
  7187. AS_HELP_STRING([--with-xmlto],
  7188. [Use xmlto to regenerate documentation (default: ]_defopt[)]),
  7189. [use_xmlto=$withval], [use_xmlto=]_defopt)
  7190. m4_undefine([_defopt])
  7191. if test "x$use_xmlto" = x"auto"; then
  7192. AC_PATH_PROG([XMLTO], [xmlto])
  7193. if test "x$XMLTO" = "x"; then
  7194. AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
  7195. have_xmlto=no
  7196. else
  7197. have_xmlto=yes
  7198. fi
  7199. elif test "x$use_xmlto" = x"yes" ; then
  7200. AC_PATH_PROG([XMLTO], [xmlto])
  7201. if test "x$XMLTO" = "x"; then
  7202. AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
  7203. fi
  7204. have_xmlto=yes
  7205. elif test "x$use_xmlto" = x"no" ; then
  7206. if test "x$XMLTO" != "x"; then
  7207. AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
  7208. fi
  7209. have_xmlto=no
  7210. else
  7211. AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
  7212. fi
  7213. # Test for a minimum version of xmlto, if provided.
  7214. m4_ifval([$1],
  7215. [if test "$have_xmlto" = yes; then
  7216. # scrape the xmlto version
  7217. AC_MSG_CHECKING([the xmlto version])
  7218. xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
  7219. AC_MSG_RESULT([$xmlto_version])
  7220. AS_VERSION_COMPARE([$xmlto_version], [$1],
  7221. [if test "x$use_xmlto" = xauto; then
  7222. AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
  7223. have_xmlto=no
  7224. else
  7225. AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
  7226. fi])
  7227. fi])
  7228. # Test for the ability of xmlto to generate a text target
  7229. have_xmlto_text=no
  7230. cat > conftest.xml << "EOF"
  7231. EOF
  7232. AS_IF([test "$have_xmlto" = yes],
  7233. [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
  7234. [have_xmlto_text=yes],
  7235. [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
  7236. rm -f conftest.xml
  7237. AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
  7238. AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
  7239. ]) # XORG_WITH_XMLTO
  7240. # XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT])
  7241. # --------------------------------------------
  7242. # Minimum version: 1.12.0
  7243. # Minimum version for optional DEFAULT argument: 1.12.0
  7244. #
  7245. # XSLT (Extensible Stylesheet Language Transformations) is a declarative,
  7246. # XML-based language used for the transformation of XML documents.
  7247. # The xsltproc command line tool is for applying XSLT stylesheets to XML documents.
  7248. # It is used under the cover by xmlto to generate html files from DocBook/XML.
  7249. # The XSLT processor is often used as a standalone tool for transformations.
  7250. # It should not be assumed that this tool is used only to work with documnetation.
  7251. # When DEFAULT is not specified, --with-xsltproc assumes 'auto'.
  7252. #
  7253. # Interface to module:
  7254. # HAVE_XSLTPROC: used in makefiles to conditionally generate documentation
  7255. # XSLTPROC: returns the path of the xsltproc program found
  7256. # returns the path set by the user in the environment
  7257. # --with-xsltproc: 'yes' user instructs the module to use xsltproc
  7258. # 'no' user instructs the module not to use xsltproc
  7259. # have_xsltproc: returns yes if xsltproc found in PATH or no
  7260. #
  7261. # If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path.
  7262. #
  7263. AC_DEFUN([XORG_WITH_XSLTPROC],[
  7264. AC_ARG_VAR([XSLTPROC], [Path to xsltproc command])
  7265. m4_define([_defopt], m4_default([$2], [auto]))
  7266. AC_ARG_WITH(xsltproc,
  7267. AS_HELP_STRING([--with-xsltproc],
  7268. [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]),
  7269. [use_xsltproc=$withval], [use_xsltproc=]_defopt)
  7270. m4_undefine([_defopt])
  7271. if test "x$use_xsltproc" = x"auto"; then
  7272. AC_PATH_PROG([XSLTPROC], [xsltproc])
  7273. if test "x$XSLTPROC" = "x"; then
  7274. AC_MSG_WARN([xsltproc not found - cannot transform XML documents])
  7275. have_xsltproc=no
  7276. else
  7277. have_xsltproc=yes
  7278. fi
  7279. elif test "x$use_xsltproc" = x"yes" ; then
  7280. AC_PATH_PROG([XSLTPROC], [xsltproc])
  7281. if test "x$XSLTPROC" = "x"; then
  7282. AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH])
  7283. fi
  7284. have_xsltproc=yes
  7285. elif test "x$use_xsltproc" = x"no" ; then
  7286. if test "x$XSLTPROC" != "x"; then
  7287. AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified])
  7288. fi
  7289. have_xsltproc=no
  7290. else
  7291. AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no'])
  7292. fi
  7293. # Checking for minimum version is not implemented
  7294. # but we want to keep the interface consistent with other commands
  7295. m4_ifval([$1],[AC_MSG_WARN(Checking for MIN-VERSION is not implemented.)])
  7296. AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes])
  7297. ]) # XORG_WITH_XSLTPROC
  7298. # XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
  7299. # ----------------
  7300. # Minimum version: 1.5.0
  7301. # Minimum version for optional DEFAULT argument: 1.11.0
  7302. #
  7303. # Documentation tools are not always available on all platforms and sometimes
  7304. # not at the appropriate level. This macro enables a module to test for the
  7305. # presence of the tool and obtain it's path in separate variables. Coupled with
  7306. # the --with-asciidoc option, it allows maximum flexibilty in making decisions
  7307. # as whether or not to use the asciidoc package. When DEFAULT is not specified,
  7308. # --with-asciidoc assumes 'auto'.
  7309. #
  7310. # Interface to module:
  7311. # HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
  7312. # ASCIIDOC: returns the path of the asciidoc program found
  7313. # returns the path set by the user in the environment
  7314. # --with-asciidoc: 'yes' user instructs the module to use asciidoc
  7315. # 'no' user instructs the module not to use asciidoc
  7316. #
  7317. # If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
  7318. #
  7319. AC_DEFUN([XORG_WITH_ASCIIDOC],[
  7320. AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
  7321. m4_define([_defopt], m4_default([$2], [auto]))
  7322. AC_ARG_WITH(asciidoc,
  7323. AS_HELP_STRING([--with-asciidoc],
  7324. [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
  7325. [use_asciidoc=$withval], [use_asciidoc=]_defopt)
  7326. m4_undefine([_defopt])
  7327. if test "x$use_asciidoc" = x"auto"; then
  7328. AC_PATH_PROG([ASCIIDOC], [asciidoc])
  7329. if test "x$ASCIIDOC" = "x"; then
  7330. AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
  7331. have_asciidoc=no
  7332. else
  7333. have_asciidoc=yes
  7334. fi
  7335. elif test "x$use_asciidoc" = x"yes" ; then
  7336. AC_PATH_PROG([ASCIIDOC], [asciidoc])
  7337. if test "x$ASCIIDOC" = "x"; then
  7338. AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
  7339. fi
  7340. have_asciidoc=yes
  7341. elif test "x$use_asciidoc" = x"no" ; then
  7342. if test "x$ASCIIDOC" != "x"; then
  7343. AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
  7344. fi
  7345. have_asciidoc=no
  7346. else
  7347. AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
  7348. fi
  7349. m4_ifval([$1],
  7350. [if test "$have_asciidoc" = yes; then
  7351. # scrape the asciidoc version
  7352. AC_MSG_CHECKING([the asciidoc version])
  7353. asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
  7354. AC_MSG_RESULT([$asciidoc_version])
  7355. AS_VERSION_COMPARE([$asciidoc_version], [$1],
  7356. [if test "x$use_asciidoc" = xauto; then
  7357. AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
  7358. have_asciidoc=no
  7359. else
  7360. AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
  7361. fi])
  7362. fi])
  7363. AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
  7364. ]) # XORG_WITH_ASCIIDOC
  7365. # XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
  7366. # --------------------------------
  7367. # Minimum version: 1.5.0
  7368. # Minimum version for optional DEFAULT argument: 1.11.0
  7369. #
  7370. # Documentation tools are not always available on all platforms and sometimes
  7371. # not at the appropriate level. This macro enables a module to test for the
  7372. # presence of the tool and obtain it's path in separate variables. Coupled with
  7373. # the --with-doxygen option, it allows maximum flexibilty in making decisions
  7374. # as whether or not to use the doxygen package. When DEFAULT is not specified,
  7375. # --with-doxygen assumes 'auto'.
  7376. #
  7377. # Interface to module:
  7378. # HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
  7379. # DOXYGEN: returns the path of the doxygen program found
  7380. # returns the path set by the user in the environment
  7381. # --with-doxygen: 'yes' user instructs the module to use doxygen
  7382. # 'no' user instructs the module not to use doxygen
  7383. #
  7384. # If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
  7385. #
  7386. AC_DEFUN([XORG_WITH_DOXYGEN],[
  7387. AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
  7388. m4_define([_defopt], m4_default([$2], [auto]))
  7389. AC_ARG_WITH(doxygen,
  7390. AS_HELP_STRING([--with-doxygen],
  7391. [Use doxygen to regenerate documentation (default: ]_defopt[)]),
  7392. [use_doxygen=$withval], [use_doxygen=]_defopt)
  7393. m4_undefine([_defopt])
  7394. if test "x$use_doxygen" = x"auto"; then
  7395. AC_PATH_PROG([DOXYGEN], [doxygen])
  7396. if test "x$DOXYGEN" = "x"; then
  7397. AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
  7398. have_doxygen=no
  7399. else
  7400. have_doxygen=yes
  7401. fi
  7402. elif test "x$use_doxygen" = x"yes" ; then
  7403. AC_PATH_PROG([DOXYGEN], [doxygen])
  7404. if test "x$DOXYGEN" = "x"; then
  7405. AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
  7406. fi
  7407. have_doxygen=yes
  7408. elif test "x$use_doxygen" = x"no" ; then
  7409. if test "x$DOXYGEN" != "x"; then
  7410. AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
  7411. fi
  7412. have_doxygen=no
  7413. else
  7414. AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
  7415. fi
  7416. m4_ifval([$1],
  7417. [if test "$have_doxygen" = yes; then
  7418. # scrape the doxygen version
  7419. AC_MSG_CHECKING([the doxygen version])
  7420. doxygen_version=`$DOXYGEN --version 2>/dev/null`
  7421. AC_MSG_RESULT([$doxygen_version])
  7422. AS_VERSION_COMPARE([$doxygen_version], [$1],
  7423. [if test "x$use_doxygen" = xauto; then
  7424. AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
  7425. have_doxygen=no
  7426. else
  7427. AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
  7428. fi])
  7429. fi])
  7430. AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
  7431. ]) # XORG_WITH_DOXYGEN
  7432. # XORG_WITH_GROFF([DEFAULT])
  7433. # ----------------
  7434. # Minimum version: 1.6.0
  7435. # Minimum version for optional DEFAULT argument: 1.11.0
  7436. #
  7437. # Documentation tools are not always available on all platforms and sometimes
  7438. # not at the appropriate level. This macro enables a module to test for the
  7439. # presence of the tool and obtain it's path in separate variables. Coupled with
  7440. # the --with-groff option, it allows maximum flexibilty in making decisions
  7441. # as whether or not to use the groff package. When DEFAULT is not specified,
  7442. # --with-groff assumes 'auto'.
  7443. #
  7444. # Interface to module:
  7445. # HAVE_GROFF: used in makefiles to conditionally generate documentation
  7446. # HAVE_GROFF_MM: the memorandum macros (-mm) package
  7447. # HAVE_GROFF_MS: the -ms macros package
  7448. # GROFF: returns the path of the groff program found
  7449. # returns the path set by the user in the environment
  7450. # --with-groff: 'yes' user instructs the module to use groff
  7451. # 'no' user instructs the module not to use groff
  7452. #
  7453. # Added in version 1.9.0:
  7454. # HAVE_GROFF_HTML: groff has dependencies to output HTML format:
  7455. # pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
  7456. # psselect from the psutils package.
  7457. # the ghostcript package. Refer to the grohtml man pages
  7458. #
  7459. # If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
  7460. #
  7461. # OS and distros often splits groff in a basic and full package, the former
  7462. # having the groff program and the later having devices, fonts and macros
  7463. # Checking for the groff executable is not enough.
  7464. #
  7465. # If macros are missing, we cannot assume that groff is useless, so we don't
  7466. # unset HAVE_GROFF or GROFF env variables.
  7467. # HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
  7468. #
  7469. AC_DEFUN([XORG_WITH_GROFF],[
  7470. AC_ARG_VAR([GROFF], [Path to groff command])
  7471. m4_define([_defopt], m4_default([$1], [auto]))
  7472. AC_ARG_WITH(groff,
  7473. AS_HELP_STRING([--with-groff],
  7474. [Use groff to regenerate documentation (default: ]_defopt[)]),
  7475. [use_groff=$withval], [use_groff=]_defopt)
  7476. m4_undefine([_defopt])
  7477. if test "x$use_groff" = x"auto"; then
  7478. AC_PATH_PROG([GROFF], [groff])
  7479. if test "x$GROFF" = "x"; then
  7480. AC_MSG_WARN([groff not found - documentation targets will be skipped])
  7481. have_groff=no
  7482. else
  7483. have_groff=yes
  7484. fi
  7485. elif test "x$use_groff" = x"yes" ; then
  7486. AC_PATH_PROG([GROFF], [groff])
  7487. if test "x$GROFF" = "x"; then
  7488. AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
  7489. fi
  7490. have_groff=yes
  7491. elif test "x$use_groff" = x"no" ; then
  7492. if test "x$GROFF" != "x"; then
  7493. AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
  7494. fi
  7495. have_groff=no
  7496. else
  7497. AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
  7498. fi
  7499. # We have groff, test for the presence of the macro packages
  7500. if test "x$have_groff" = x"yes"; then
  7501. AC_MSG_CHECKING([for ${GROFF} -ms macros])
  7502. if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
  7503. groff_ms_works=yes
  7504. else
  7505. groff_ms_works=no
  7506. fi
  7507. AC_MSG_RESULT([$groff_ms_works])
  7508. AC_MSG_CHECKING([for ${GROFF} -mm macros])
  7509. if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
  7510. groff_mm_works=yes
  7511. else
  7512. groff_mm_works=no
  7513. fi
  7514. AC_MSG_RESULT([$groff_mm_works])
  7515. fi
  7516. # We have groff, test for HTML dependencies, one command per package
  7517. if test "x$have_groff" = x"yes"; then
  7518. AC_PATH_PROGS(GS_PATH, [gs gswin32c])
  7519. AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
  7520. AC_PATH_PROG(PSSELECT_PATH, [psselect])
  7521. if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
  7522. have_groff_html=yes
  7523. else
  7524. have_groff_html=no
  7525. AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
  7526. fi
  7527. fi
  7528. # Set Automake conditionals for Makefiles
  7529. AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
  7530. AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
  7531. AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
  7532. AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
  7533. ]) # XORG_WITH_GROFF
  7534. # XORG_WITH_FOP([DEFAULT])
  7535. # ----------------
  7536. # Minimum version: 1.6.0
  7537. # Minimum version for optional DEFAULT argument: 1.11.0
  7538. #
  7539. # Documentation tools are not always available on all platforms and sometimes
  7540. # not at the appropriate level. This macro enables a module to test for the
  7541. # presence of the tool and obtain it's path in separate variables. Coupled with
  7542. # the --with-fop option, it allows maximum flexibilty in making decisions
  7543. # as whether or not to use the fop package. When DEFAULT is not specified,
  7544. # --with-fop assumes 'auto'.
  7545. #
  7546. # Interface to module:
  7547. # HAVE_FOP: used in makefiles to conditionally generate documentation
  7548. # FOP: returns the path of the fop program found
  7549. # returns the path set by the user in the environment
  7550. # --with-fop: 'yes' user instructs the module to use fop
  7551. # 'no' user instructs the module not to use fop
  7552. #
  7553. # If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
  7554. #
  7555. AC_DEFUN([XORG_WITH_FOP],[
  7556. AC_ARG_VAR([FOP], [Path to fop command])
  7557. m4_define([_defopt], m4_default([$1], [auto]))
  7558. AC_ARG_WITH(fop,
  7559. AS_HELP_STRING([--with-fop],
  7560. [Use fop to regenerate documentation (default: ]_defopt[)]),
  7561. [use_fop=$withval], [use_fop=]_defopt)
  7562. m4_undefine([_defopt])
  7563. if test "x$use_fop" = x"auto"; then
  7564. AC_PATH_PROG([FOP], [fop])
  7565. if test "x$FOP" = "x"; then
  7566. AC_MSG_WARN([fop not found - documentation targets will be skipped])
  7567. have_fop=no
  7568. else
  7569. have_fop=yes
  7570. fi
  7571. elif test "x$use_fop" = x"yes" ; then
  7572. AC_PATH_PROG([FOP], [fop])
  7573. if test "x$FOP" = "x"; then
  7574. AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
  7575. fi
  7576. have_fop=yes
  7577. elif test "x$use_fop" = x"no" ; then
  7578. if test "x$FOP" != "x"; then
  7579. AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
  7580. fi
  7581. have_fop=no
  7582. else
  7583. AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
  7584. fi
  7585. AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
  7586. ]) # XORG_WITH_FOP
  7587. # XORG_WITH_PS2PDF([DEFAULT])
  7588. # ----------------
  7589. # Minimum version: 1.6.0
  7590. # Minimum version for optional DEFAULT argument: 1.11.0
  7591. #
  7592. # Documentation tools are not always available on all platforms and sometimes
  7593. # not at the appropriate level. This macro enables a module to test for the
  7594. # presence of the tool and obtain it's path in separate variables. Coupled with
  7595. # the --with-ps2pdf option, it allows maximum flexibilty in making decisions
  7596. # as whether or not to use the ps2pdf package. When DEFAULT is not specified,
  7597. # --with-ps2pdf assumes 'auto'.
  7598. #
  7599. # Interface to module:
  7600. # HAVE_PS2PDF: used in makefiles to conditionally generate documentation
  7601. # PS2PDF: returns the path of the ps2pdf program found
  7602. # returns the path set by the user in the environment
  7603. # --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
  7604. # 'no' user instructs the module not to use ps2pdf
  7605. #
  7606. # If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
  7607. #
  7608. AC_DEFUN([XORG_WITH_PS2PDF],[
  7609. AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
  7610. m4_define([_defopt], m4_default([$1], [auto]))
  7611. AC_ARG_WITH(ps2pdf,
  7612. AS_HELP_STRING([--with-ps2pdf],
  7613. [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
  7614. [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
  7615. m4_undefine([_defopt])
  7616. if test "x$use_ps2pdf" = x"auto"; then
  7617. AC_PATH_PROG([PS2PDF], [ps2pdf])
  7618. if test "x$PS2PDF" = "x"; then
  7619. AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
  7620. have_ps2pdf=no
  7621. else
  7622. have_ps2pdf=yes
  7623. fi
  7624. elif test "x$use_ps2pdf" = x"yes" ; then
  7625. AC_PATH_PROG([PS2PDF], [ps2pdf])
  7626. if test "x$PS2PDF" = "x"; then
  7627. AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
  7628. fi
  7629. have_ps2pdf=yes
  7630. elif test "x$use_ps2pdf" = x"no" ; then
  7631. if test "x$PS2PDF" != "x"; then
  7632. AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
  7633. fi
  7634. have_ps2pdf=no
  7635. else
  7636. AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
  7637. fi
  7638. AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
  7639. ]) # XORG_WITH_PS2PDF
  7640. # XORG_ENABLE_DOCS (enable_docs=yes)
  7641. # ----------------
  7642. # Minimum version: 1.6.0
  7643. #
  7644. # Documentation tools are not always available on all platforms and sometimes
  7645. # not at the appropriate level. This macro enables a builder to skip all
  7646. # documentation targets except traditional man pages.
  7647. # Combined with the specific tool checking macros XORG_WITH_*, it provides
  7648. # maximum flexibilty in controlling documentation building.
  7649. # Refer to:
  7650. # XORG_WITH_XMLTO --with-xmlto
  7651. # XORG_WITH_ASCIIDOC --with-asciidoc
  7652. # XORG_WITH_DOXYGEN --with-doxygen
  7653. # XORG_WITH_FOP --with-fop
  7654. # XORG_WITH_GROFF --with-groff
  7655. # XORG_WITH_PS2PDF --with-ps2pdf
  7656. #
  7657. # Interface to module:
  7658. # ENABLE_DOCS: used in makefiles to conditionally generate documentation
  7659. # --enable-docs: 'yes' user instructs the module to generate docs
  7660. # 'no' user instructs the module not to generate docs
  7661. # parm1: specify the default value, yes or no.
  7662. #
  7663. AC_DEFUN([XORG_ENABLE_DOCS],[
  7664. m4_define([docs_default], m4_default([$1], [yes]))
  7665. AC_ARG_ENABLE(docs,
  7666. AS_HELP_STRING([--enable-docs],
  7667. [Enable building the documentation (default: ]docs_default[)]),
  7668. [build_docs=$enableval], [build_docs=]docs_default)
  7669. m4_undefine([docs_default])
  7670. AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
  7671. AC_MSG_CHECKING([whether to build documentation])
  7672. AC_MSG_RESULT([$build_docs])
  7673. ]) # XORG_ENABLE_DOCS
  7674. # XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
  7675. # ----------------
  7676. # Minimum version: 1.6.0
  7677. #
  7678. # This macro enables a builder to skip all developer documentation.
  7679. # Combined with the specific tool checking macros XORG_WITH_*, it provides
  7680. # maximum flexibilty in controlling documentation building.
  7681. # Refer to:
  7682. # XORG_WITH_XMLTO --with-xmlto
  7683. # XORG_WITH_ASCIIDOC --with-asciidoc
  7684. # XORG_WITH_DOXYGEN --with-doxygen
  7685. # XORG_WITH_FOP --with-fop
  7686. # XORG_WITH_GROFF --with-groff
  7687. # XORG_WITH_PS2PDF --with-ps2pdf
  7688. #
  7689. # Interface to module:
  7690. # ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs
  7691. # --enable-devel-docs: 'yes' user instructs the module to generate developer docs
  7692. # 'no' user instructs the module not to generate developer docs
  7693. # parm1: specify the default value, yes or no.
  7694. #
  7695. AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
  7696. m4_define([devel_default], m4_default([$1], [yes]))
  7697. AC_ARG_ENABLE(devel-docs,
  7698. AS_HELP_STRING([--enable-devel-docs],
  7699. [Enable building the developer documentation (default: ]devel_default[)]),
  7700. [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
  7701. m4_undefine([devel_default])
  7702. AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
  7703. AC_MSG_CHECKING([whether to build developer documentation])
  7704. AC_MSG_RESULT([$build_devel_docs])
  7705. ]) # XORG_ENABLE_DEVEL_DOCS
  7706. # XORG_ENABLE_SPECS (enable_specs=yes)
  7707. # ----------------
  7708. # Minimum version: 1.6.0
  7709. #
  7710. # This macro enables a builder to skip all functional specification targets.
  7711. # Combined with the specific tool checking macros XORG_WITH_*, it provides
  7712. # maximum flexibilty in controlling documentation building.
  7713. # Refer to:
  7714. # XORG_WITH_XMLTO --with-xmlto
  7715. # XORG_WITH_ASCIIDOC --with-asciidoc
  7716. # XORG_WITH_DOXYGEN --with-doxygen
  7717. # XORG_WITH_FOP --with-fop
  7718. # XORG_WITH_GROFF --with-groff
  7719. # XORG_WITH_PS2PDF --with-ps2pdf
  7720. #
  7721. # Interface to module:
  7722. # ENABLE_SPECS: used in makefiles to conditionally generate specs
  7723. # --enable-specs: 'yes' user instructs the module to generate specs
  7724. # 'no' user instructs the module not to generate specs
  7725. # parm1: specify the default value, yes or no.
  7726. #
  7727. AC_DEFUN([XORG_ENABLE_SPECS],[
  7728. m4_define([spec_default], m4_default([$1], [yes]))
  7729. AC_ARG_ENABLE(specs,
  7730. AS_HELP_STRING([--enable-specs],
  7731. [Enable building the specs (default: ]spec_default[)]),
  7732. [build_specs=$enableval], [build_specs=]spec_default)
  7733. m4_undefine([spec_default])
  7734. AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
  7735. AC_MSG_CHECKING([whether to build functional specifications])
  7736. AC_MSG_RESULT([$build_specs])
  7737. ]) # XORG_ENABLE_SPECS
  7738. # XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto)
  7739. # ----------------------------------------------
  7740. # Minimum version: 1.13.0
  7741. #
  7742. # This macro enables a builder to enable/disable unit testing
  7743. # It makes no assumption about the test cases implementation
  7744. # Test cases may or may not use Automake "Support for test suites"
  7745. # They may or may not use the software utility library GLib
  7746. #
  7747. # When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL
  7748. # ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib.
  7749. # The variable enable_unit_tests is used by other macros in this file.
  7750. #
  7751. # Interface to module:
  7752. # ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests
  7753. # enable_unit_tests: used in configure.ac for additional configuration
  7754. # --enable-unit-tests: 'yes' user instructs the module to build tests
  7755. # 'no' user instructs the module not to build tests
  7756. # parm1: specify the default value, yes or no.
  7757. #
  7758. AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[
  7759. AC_BEFORE([$0], [XORG_WITH_GLIB])
  7760. AC_BEFORE([$0], [XORG_LD_WRAP])
  7761. m4_define([_defopt], m4_default([$1], [auto]))
  7762. AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests],
  7763. [Enable building unit test cases (default: ]_defopt[)]),
  7764. [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt)
  7765. m4_undefine([_defopt])
  7766. AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno])
  7767. AC_MSG_CHECKING([whether to build unit test cases])
  7768. AC_MSG_RESULT([$enable_unit_tests])
  7769. ]) # XORG_ENABLE_UNIT_TESTS
  7770. # XORG_WITH_GLIB([MIN-VERSION], [DEFAULT])
  7771. # ----------------------------------------
  7772. # Minimum version: 1.13.0
  7773. #
  7774. # GLib is a library which provides advanced data structures and functions.
  7775. # This macro enables a module to test for the presence of Glib.
  7776. #
  7777. # When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing.
  7778. # Otherwise the value of $enable_unit_tests is blank.
  7779. #
  7780. # Interface to module:
  7781. # HAVE_GLIB: used in makefiles to conditionally build targets
  7782. # with_glib: used in configure.ac to know if GLib has been found
  7783. # --with-glib: 'yes' user instructs the module to use glib
  7784. # 'no' user instructs the module not to use glib
  7785. #
  7786. AC_DEFUN([XORG_WITH_GLIB],[
  7787. AC_REQUIRE([PKG_PROG_PKG_CONFIG])
  7788. m4_define([_defopt], m4_default([$2], [auto]))
  7789. AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib],
  7790. [Use GLib library for unit testing (default: ]_defopt[)]),
  7791. [with_glib=$withval], [with_glib=]_defopt)
  7792. m4_undefine([_defopt])
  7793. have_glib=no
  7794. # Do not probe GLib if user explicitly disabled unit testing
  7795. if test "x$enable_unit_tests" != x"no"; then
  7796. # Do not probe GLib if user explicitly disabled it
  7797. if test "x$with_glib" != x"no"; then
  7798. m4_ifval(
  7799. [$1],
  7800. [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])],
  7801. [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])]
  7802. )
  7803. fi
  7804. fi
  7805. # Not having GLib when unit testing has been explicitly requested is an error
  7806. if test "x$enable_unit_tests" = x"yes"; then
  7807. if test "x$have_glib" = x"no"; then
  7808. AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
  7809. fi
  7810. fi
  7811. # Having unit testing disabled when GLib has been explicitly requested is an error
  7812. if test "x$enable_unit_tests" = x"no"; then
  7813. if test "x$with_glib" = x"yes"; then
  7814. AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
  7815. fi
  7816. fi
  7817. # Not having GLib when it has been explicitly requested is an error
  7818. if test "x$with_glib" = x"yes"; then
  7819. if test "x$have_glib" = x"no"; then
  7820. AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found])
  7821. fi
  7822. fi
  7823. AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes])
  7824. ]) # XORG_WITH_GLIB
  7825. # XORG_LD_WRAP
  7826. # ------------
  7827. # Minimum version: 1.13.0
  7828. #
  7829. # Check if linker supports -wrap, passed via compiler flags
  7830. #
  7831. # When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing.
  7832. # Otherwise the value of $enable_unit_tests is blank.
  7833. #
  7834. AC_DEFUN([XORG_LD_WRAP],[
  7835. XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no])
  7836. # Not having ld wrap when unit testing has been explicitly requested is an error
  7837. if test "x$enable_unit_tests" = x"yes"; then
  7838. if test "x$have_ld_wrap" = x"no"; then
  7839. AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available])
  7840. fi
  7841. fi
  7842. AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes])
  7843. #
  7844. ]) # XORG_LD_WRAP
  7845. # XORG_CHECK_LINKER_FLAGS
  7846. # -----------------------
  7847. # SYNOPSIS
  7848. #
  7849. # XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE])
  7850. #
  7851. # DESCRIPTION
  7852. #
  7853. # Check whether the given linker FLAGS work with the current language's
  7854. # linker, or whether they give an error.
  7855. #
  7856. # ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
  7857. # success/failure.
  7858. #
  7859. # NOTE: Based on AX_CHECK_COMPILER_FLAGS.
  7860. #
  7861. # LICENSE
  7862. #
  7863. # Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org>
  7864. # Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu>
  7865. # Copyright (c) 2009 Matteo Frigo
  7866. #
  7867. # This program is free software: you can redistribute it and/or modify it
  7868. # under the terms of the GNU General Public License as published by the
  7869. # Free Software Foundation, either version 3 of the License, or (at your
  7870. # option) any later version.
  7871. #
  7872. # This program is distributed in the hope that it will be useful, but
  7873. # WITHOUT ANY WARRANTY; without even the implied warranty of
  7874. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
  7875. # Public License for more details.
  7876. #
  7877. # You should have received a copy of the GNU General Public License along
  7878. # with this program. If not, see <http://www.gnu.org/licenses/>.
  7879. #
  7880. # As a special exception, the respective Autoconf Macro's copyright owner
  7881. # gives unlimited permission to copy, distribute and modify the configure
  7882. # scripts that are the output of Autoconf when processing the Macro. You
  7883. # need not follow the terms of the GNU General Public License when using
  7884. # or distributing such scripts, even though portions of the text of the
  7885. # Macro appear in them. The GNU General Public License (GPL) does govern
  7886. # all other use of the material that constitutes the Autoconf Macro.
  7887. #
  7888. # This special exception to the GPL applies to versions of the Autoconf
  7889. # Macro released by the Autoconf Archive. When you make and distribute a
  7890. # modified version of the Autoconf Macro, you may extend this special
  7891. # exception to the GPL to apply to your modified version as well.#
  7892. AC_DEFUN([XORG_CHECK_LINKER_FLAGS],
  7893. [AC_MSG_CHECKING([whether the linker accepts $1])
  7894. dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
  7895. AS_LITERAL_IF([$1],
  7896. [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [
  7897. ax_save_FLAGS=$LDFLAGS
  7898. LDFLAGS="$1"
  7899. AC_LINK_IFELSE([AC_LANG_PROGRAM()],
  7900. AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
  7901. AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
  7902. LDFLAGS=$ax_save_FLAGS])],
  7903. [ax_save_FLAGS=$LDFLAGS
  7904. LDFLAGS="$1"
  7905. AC_LINK_IFELSE([AC_LANG_PROGRAM()],
  7906. eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
  7907. eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
  7908. LDFLAGS=$ax_save_FLAGS])
  7909. eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1])
  7910. AC_MSG_RESULT($xorg_check_linker_flags)
  7911. if test "x$xorg_check_linker_flags" = xyes; then
  7912. m4_default([$2], :)
  7913. else
  7914. m4_default([$3], :)
  7915. fi
  7916. ]) # XORG_CHECK_LINKER_FLAGS
  7917. # XORG_CHECK_MALLOC_ZERO
  7918. # ----------------------
  7919. # Minimum version: 1.0.0
  7920. #
  7921. # Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
  7922. # malloc(0) returns NULL. Packages should add one of these cflags to
  7923. # their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
  7924. AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
  7925. AC_ARG_ENABLE(malloc0returnsnull,
  7926. AS_HELP_STRING([--enable-malloc0returnsnull],
  7927. [malloc(0) returns NULL (default: auto)]),
  7928. [MALLOC_ZERO_RETURNS_NULL=$enableval],
  7929. [MALLOC_ZERO_RETURNS_NULL=auto])
  7930. AC_MSG_CHECKING([whether malloc(0) returns NULL])
  7931. if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
  7932. AC_RUN_IFELSE([AC_LANG_PROGRAM([
  7933. #include <stdlib.h>
  7934. ],[
  7935. char *m0, *r0, *c0, *p;
  7936. m0 = malloc(0);
  7937. p = malloc(10);
  7938. r0 = realloc(p,0);
  7939. c0 = calloc(0,10);
  7940. exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1);
  7941. ])],
  7942. [MALLOC_ZERO_RETURNS_NULL=yes],
  7943. [MALLOC_ZERO_RETURNS_NULL=no],
  7944. [MALLOC_ZERO_RETURNS_NULL=yes])
  7945. fi
  7946. AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
  7947. if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
  7948. MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
  7949. XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
  7950. XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
  7951. else
  7952. MALLOC_ZERO_CFLAGS=""
  7953. XMALLOC_ZERO_CFLAGS=""
  7954. XTMALLOC_ZERO_CFLAGS=""
  7955. fi
  7956. AC_SUBST([MALLOC_ZERO_CFLAGS])
  7957. AC_SUBST([XMALLOC_ZERO_CFLAGS])
  7958. AC_SUBST([XTMALLOC_ZERO_CFLAGS])
  7959. ]) # XORG_CHECK_MALLOC_ZERO
  7960. # XORG_WITH_LINT()
  7961. # ----------------
  7962. # Minimum version: 1.1.0
  7963. #
  7964. # This macro enables the use of a tool that flags some suspicious and
  7965. # non-portable constructs (likely to be bugs) in C language source code.
  7966. # It will attempt to locate the tool and use appropriate options.
  7967. # There are various lint type tools on different platforms.
  7968. #
  7969. # Interface to module:
  7970. # LINT: returns the path to the tool found on the platform
  7971. # or the value set to LINT on the configure cmd line
  7972. # also an Automake conditional
  7973. # LINT_FLAGS: an Automake variable with appropriate flags
  7974. #
  7975. # --with-lint: 'yes' user instructs the module to use lint
  7976. # 'no' user instructs the module not to use lint (default)
  7977. #
  7978. # If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
  7979. # If the user sets the value of LINT_FLAGS, they are used verbatim.
  7980. #
  7981. AC_DEFUN([XORG_WITH_LINT],[
  7982. AC_ARG_VAR([LINT], [Path to a lint-style command])
  7983. AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
  7984. AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
  7985. [Use a lint-style source code checker (default: disabled)])],
  7986. [use_lint=$withval], [use_lint=no])
  7987. # Obtain platform specific info like program name and options
  7988. # The lint program on FreeBSD and NetBSD is different from the one on Solaris
  7989. case $host_os in
  7990. *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
  7991. lint_name=splint
  7992. lint_options="-badflag"
  7993. ;;
  7994. *freebsd* | *netbsd*)
  7995. lint_name=lint
  7996. lint_options="-u -b"
  7997. ;;
  7998. *solaris*)
  7999. lint_name=lint
  8000. lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
  8001. ;;
  8002. esac
  8003. # Test for the presence of the program (either guessed by the code or spelled out by the user)
  8004. if test "x$use_lint" = x"yes" ; then
  8005. AC_PATH_PROG([LINT], [$lint_name])
  8006. if test "x$LINT" = "x"; then
  8007. AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
  8008. fi
  8009. elif test "x$use_lint" = x"no" ; then
  8010. if test "x$LINT" != "x"; then
  8011. AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
  8012. fi
  8013. else
  8014. AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
  8015. fi
  8016. # User supplied flags override default flags
  8017. if test "x$LINT_FLAGS" != "x"; then
  8018. lint_options=$LINT_FLAGS
  8019. fi
  8020. AC_SUBST([LINT_FLAGS],[$lint_options])
  8021. AM_CONDITIONAL(LINT, [test "x$LINT" != x])
  8022. ]) # XORG_WITH_LINT
  8023. # XORG_LINT_LIBRARY(LIBNAME)
  8024. # --------------------------
  8025. # Minimum version: 1.1.0
  8026. #
  8027. # Sets up flags for building lint libraries for checking programs that call
  8028. # functions in the library.
  8029. #
  8030. # Interface to module:
  8031. # LINTLIB - Automake variable with the name of lint library file to make
  8032. # MAKE_LINT_LIB - Automake conditional
  8033. #
  8034. # --enable-lint-library: - 'yes' user instructs the module to created a lint library
  8035. # - 'no' user instructs the module not to create a lint library (default)
  8036. AC_DEFUN([XORG_LINT_LIBRARY],[
  8037. AC_REQUIRE([XORG_WITH_LINT])
  8038. AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
  8039. [Create lint library (default: disabled)])],
  8040. [make_lint_lib=$enableval], [make_lint_lib=no])
  8041. if test "x$make_lint_lib" = x"yes" ; then
  8042. LINTLIB=llib-l$1.ln
  8043. if test "x$LINT" = "x"; then
  8044. AC_MSG_ERROR([Cannot make lint library without --with-lint])
  8045. fi
  8046. elif test "x$make_lint_lib" != x"no" ; then
  8047. AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
  8048. fi
  8049. AC_SUBST(LINTLIB)
  8050. AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
  8051. ]) # XORG_LINT_LIBRARY
  8052. # XORG_CWARNFLAGS
  8053. # ---------------
  8054. # Minimum version: 1.2.0
  8055. #
  8056. # Defines CWARNFLAGS to enable C compiler warnings.
  8057. #
  8058. AC_DEFUN([XORG_CWARNFLAGS], [
  8059. AC_REQUIRE([AC_PROG_CC_C99])
  8060. if test "x$GCC" = xyes ; then
  8061. CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
  8062. -Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
  8063. -Wbad-function-cast -Wformat=2"
  8064. case `$CC -dumpversion` in
  8065. 3.4.* | 4.*)
  8066. CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
  8067. ;;
  8068. esac
  8069. else
  8070. AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
  8071. if test "x$SUNCC" = "xyes"; then
  8072. CWARNFLAGS="-v"
  8073. fi
  8074. fi
  8075. AC_SUBST(CWARNFLAGS)
  8076. ]) # XORG_CWARNFLAGS
  8077. # XORG_STRICT_OPTION
  8078. # -----------------------
  8079. # Minimum version: 1.3.0
  8080. #
  8081. # Add configure option to enable strict compilation
  8082. AC_DEFUN([XORG_STRICT_OPTION], [
  8083. # If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
  8084. AC_REQUIRE([AC_PROG_CC_C99])
  8085. AC_REQUIRE([XORG_CWARNFLAGS])
  8086. AC_ARG_ENABLE(strict-compilation,
  8087. AS_HELP_STRING([--enable-strict-compilation],
  8088. [Enable all warnings from compiler and make them errors (default: disabled)]),
  8089. [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
  8090. if test "x$STRICT_COMPILE" = "xyes"; then
  8091. AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
  8092. AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
  8093. if test "x$GCC" = xyes ; then
  8094. STRICT_CFLAGS="-pedantic -Werror"
  8095. elif test "x$SUNCC" = "xyes"; then
  8096. STRICT_CFLAGS="-errwarn"
  8097. elif test "x$INTELCC" = "xyes"; then
  8098. STRICT_CFLAGS="-Werror"
  8099. fi
  8100. fi
  8101. CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
  8102. AC_SUBST([CWARNFLAGS])
  8103. ]) # XORG_STRICT_OPTION
  8104. # XORG_DEFAULT_OPTIONS
  8105. # --------------------
  8106. # Minimum version: 1.3.0
  8107. #
  8108. # Defines default options for X.Org modules.
  8109. #
  8110. AC_DEFUN([XORG_DEFAULT_OPTIONS], [
  8111. AC_REQUIRE([AC_PROG_INSTALL])
  8112. XORG_CWARNFLAGS
  8113. XORG_STRICT_OPTION
  8114. XORG_RELEASE_VERSION
  8115. XORG_CHANGELOG
  8116. XORG_INSTALL
  8117. XORG_MANPAGE_SECTIONS
  8118. m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
  8119. [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
  8120. ]) # XORG_DEFAULT_OPTIONS
  8121. # XORG_INSTALL()
  8122. # ----------------
  8123. # Minimum version: 1.4.0
  8124. #
  8125. # Defines the variable INSTALL_CMD as the command to copy
  8126. # INSTALL from $prefix/share/util-macros.
  8127. #
  8128. AC_DEFUN([XORG_INSTALL], [
  8129. AC_REQUIRE([PKG_PROG_PKG_CONFIG])
  8130. macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
  8131. INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
  8132. mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
  8133. || (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
  8134. echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
  8135. AC_SUBST([INSTALL_CMD])
  8136. ]) # XORG_INSTALL
  8137. dnl Copyright 2005 Red Hat, Inc
  8138. dnl
  8139. dnl Permission to use, copy, modify, distribute, and sell this software and its
  8140. dnl documentation for any purpose is hereby granted without fee, provided that
  8141. dnl the above copyright notice appear in all copies and that both that
  8142. dnl copyright notice and this permission notice appear in supporting
  8143. dnl documentation.
  8144. dnl
  8145. dnl The above copyright notice and this permission notice shall be included
  8146. dnl in all copies or substantial portions of the Software.
  8147. dnl
  8148. dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  8149. dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  8150. dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  8151. dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
  8152. dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  8153. dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  8154. dnl OTHER DEALINGS IN THE SOFTWARE.
  8155. dnl
  8156. dnl Except as contained in this notice, the name of the copyright holders shall
  8157. dnl not be used in advertising or otherwise to promote the sale, use or
  8158. dnl other dealings in this Software without prior written authorization
  8159. dnl from the copyright holders.
  8160. dnl
  8161. # XORG_RELEASE_VERSION
  8162. # --------------------
  8163. # Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
  8164. AC_DEFUN([XORG_RELEASE_VERSION],[
  8165. AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
  8166. [`echo $PACKAGE_VERSION | cut -d . -f 1`],
  8167. [Major version of this package])
  8168. PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
  8169. if test "x$PVM" = "x"; then
  8170. PVM="0"
  8171. fi
  8172. AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
  8173. [$PVM],
  8174. [Minor version of this package])
  8175. PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
  8176. if test "x$PVP" = "x"; then
  8177. PVP="0"
  8178. fi
  8179. AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
  8180. [$PVP],
  8181. [Patch version of this package])
  8182. ])
  8183. # XORG_CHANGELOG()
  8184. # ----------------
  8185. # Minimum version: 1.2.0
  8186. #
  8187. # Defines the variable CHANGELOG_CMD as the command to generate
  8188. # ChangeLog from git.
  8189. #
  8190. #
  8191. AC_DEFUN([XORG_CHANGELOG], [
  8192. CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
  8193. mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
  8194. || (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
  8195. echo 'git directory not found: installing possibly empty changelog.' >&2)"
  8196. AC_SUBST([CHANGELOG_CMD])
  8197. ]) # XORG_CHANGELOG