aclocal.m4 245 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040
  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 47 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 M$VC,
  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 "$DLLTOOL" && DLLTOOL=dlltool
  137. test -z "$LD" && LD=ld
  138. test -z "$LN_S" && LN_S="ln -s"
  139. test -z "$MAGIC_CMD" && MAGIC_CMD=file
  140. test -z "$NM" && NM=nm
  141. test -z "$SED" && SED=sed
  142. test -z "$OBJDUMP" && OBJDUMP=objdump
  143. test -z "$RANLIB" && RANLIB=:
  144. test -z "$STRIP" && STRIP=:
  145. test -z "$ac_objext" && ac_objext=o
  146. # Determine commands to create old-style static archives.
  147. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
  148. old_postinstall_cmds='chmod 644 $oldlib'
  149. old_postuninstall_cmds=
  150. if test -n "$RANLIB"; then
  151. case $host_os in
  152. openbsd*)
  153. old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
  154. ;;
  155. *)
  156. old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
  157. ;;
  158. esac
  159. old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
  160. fi
  161. _LT_CC_BASENAME([$compiler])
  162. # Only perform the check for file, if the check method requires it
  163. case $deplibs_check_method in
  164. file_magic*)
  165. if test "$file_magic_cmd" = '$MAGIC_CMD'; then
  166. AC_PATH_MAGIC
  167. fi
  168. ;;
  169. esac
  170. AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
  171. AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
  172. enable_win32_dll=yes, enable_win32_dll=no)
  173. AC_ARG_ENABLE([libtool-lock],
  174. [AC_HELP_STRING([--disable-libtool-lock],
  175. [avoid locking (might break parallel builds)])])
  176. test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  177. AC_ARG_WITH([pic],
  178. [AC_HELP_STRING([--with-pic],
  179. [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
  180. [pic_mode="$withval"],
  181. [pic_mode=default])
  182. test -z "$pic_mode" && pic_mode=default
  183. # Use C for the default configuration in the libtool script
  184. tagname=
  185. AC_LIBTOOL_LANG_C_CONFIG
  186. _LT_AC_TAGCONFIG
  187. ])# AC_LIBTOOL_SETUP
  188. # _LT_AC_SYS_COMPILER
  189. # -------------------
  190. AC_DEFUN([_LT_AC_SYS_COMPILER],
  191. [AC_REQUIRE([AC_PROG_CC])dnl
  192. # If no C compiler was specified, use CC.
  193. LTCC=${LTCC-"$CC"}
  194. # Allow CC to be a program name with arguments.
  195. compiler=$CC
  196. ])# _LT_AC_SYS_COMPILER
  197. # _LT_CC_BASENAME(CC)
  198. # -------------------
  199. # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
  200. AC_DEFUN([_LT_CC_BASENAME],
  201. [for cc_temp in $1""; do
  202. case $cc_temp in
  203. compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
  204. distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
  205. \-*) ;;
  206. *) break;;
  207. esac
  208. done
  209. cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
  210. ])
  211. # _LT_COMPILER_BOILERPLATE
  212. # ------------------------
  213. # Check for compiler boilerplate output or warnings with
  214. # the simple compiler test code.
  215. AC_DEFUN([_LT_COMPILER_BOILERPLATE],
  216. [ac_outfile=conftest.$ac_objext
  217. printf "$lt_simple_compile_test_code" >conftest.$ac_ext
  218. eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
  219. _lt_compiler_boilerplate=`cat conftest.err`
  220. $rm conftest*
  221. ])# _LT_COMPILER_BOILERPLATE
  222. # _LT_LINKER_BOILERPLATE
  223. # ----------------------
  224. # Check for linker boilerplate output or warnings with
  225. # the simple link test code.
  226. AC_DEFUN([_LT_LINKER_BOILERPLATE],
  227. [ac_outfile=conftest.$ac_objext
  228. printf "$lt_simple_link_test_code" >conftest.$ac_ext
  229. eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
  230. _lt_linker_boilerplate=`cat conftest.err`
  231. $rm conftest*
  232. ])# _LT_LINKER_BOILERPLATE
  233. # _LT_AC_SYS_LIBPATH_AIX
  234. # ----------------------
  235. # Links a minimal program and checks the executable
  236. # for the system default hardcoded library path. In most cases,
  237. # this is /usr/lib:/lib, but when the MPI compilers are used
  238. # the location of the communication and MPI libs are included too.
  239. # If we don't find anything, use the default library path according
  240. # to the aix ld manual.
  241. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
  242. [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
  243. aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
  244. }'`
  245. # Check for a 64-bit object if we didn't find anything.
  246. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
  247. }'`; fi],[])
  248. if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  249. ])# _LT_AC_SYS_LIBPATH_AIX
  250. # _LT_AC_SHELL_INIT(ARG)
  251. # ----------------------
  252. AC_DEFUN([_LT_AC_SHELL_INIT],
  253. [ifdef([AC_DIVERSION_NOTICE],
  254. [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
  255. [AC_DIVERT_PUSH(NOTICE)])
  256. $1
  257. AC_DIVERT_POP
  258. ])# _LT_AC_SHELL_INIT
  259. # _LT_AC_PROG_ECHO_BACKSLASH
  260. # --------------------------
  261. # Add some code to the start of the generated configure script which
  262. # will find an echo command which doesn't interpret backslashes.
  263. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
  264. [_LT_AC_SHELL_INIT([
  265. # Check that we are running under the correct shell.
  266. SHELL=${CONFIG_SHELL-/bin/sh}
  267. case X$ECHO in
  268. X*--fallback-echo)
  269. # Remove one level of quotation (which was required for Make).
  270. ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
  271. ;;
  272. esac
  273. echo=${ECHO-echo}
  274. if test "X[$]1" = X--no-reexec; then
  275. # Discard the --no-reexec flag, and continue.
  276. shift
  277. elif test "X[$]1" = X--fallback-echo; then
  278. # Avoid inline document here, it may be left over
  279. :
  280. elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
  281. # Yippee, $echo works!
  282. :
  283. else
  284. # Restart under the correct shell.
  285. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
  286. fi
  287. if test "X[$]1" = X--fallback-echo; then
  288. # used as fallback echo
  289. shift
  290. cat <<EOF
  291. [$]*
  292. EOF
  293. exit 0
  294. fi
  295. # The HP-UX ksh and POSIX shell print the target directory to stdout
  296. # if CDPATH is set.
  297. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  298. if test -z "$ECHO"; then
  299. if test "X${echo_test_string+set}" != Xset; then
  300. # find a string as large as possible, as long as the shell can cope with it
  301. for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
  302. # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
  303. if (echo_test_string="`eval $cmd`") 2>/dev/null &&
  304. echo_test_string="`eval $cmd`" &&
  305. (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
  306. then
  307. break
  308. fi
  309. done
  310. fi
  311. if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
  312. echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
  313. test "X$echo_testing_string" = "X$echo_test_string"; then
  314. :
  315. else
  316. # The Solaris, AIX, and Digital Unix default echo programs unquote
  317. # backslashes. This makes it impossible to quote backslashes using
  318. # echo "$something" | sed 's/\\/\\\\/g'
  319. #
  320. # So, first we look for a working echo in the user's PATH.
  321. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  322. for dir in $PATH /usr/ucb; do
  323. IFS="$lt_save_ifs"
  324. if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
  325. test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
  326. echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
  327. test "X$echo_testing_string" = "X$echo_test_string"; then
  328. echo="$dir/echo"
  329. break
  330. fi
  331. done
  332. IFS="$lt_save_ifs"
  333. if test "X$echo" = Xecho; then
  334. # We didn't find a better echo, so look for alternatives.
  335. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
  336. echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
  337. test "X$echo_testing_string" = "X$echo_test_string"; then
  338. # This shell has a builtin print -r that does the trick.
  339. echo='print -r'
  340. elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
  341. test "X$CONFIG_SHELL" != X/bin/ksh; then
  342. # If we have ksh, try running configure again with it.
  343. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
  344. export ORIGINAL_CONFIG_SHELL
  345. CONFIG_SHELL=/bin/ksh
  346. export CONFIG_SHELL
  347. exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
  348. else
  349. # Try using printf.
  350. echo='printf %s\n'
  351. if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
  352. echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
  353. test "X$echo_testing_string" = "X$echo_test_string"; then
  354. # Cool, printf works
  355. :
  356. elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
  357. test "X$echo_testing_string" = 'X\t' &&
  358. echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  359. test "X$echo_testing_string" = "X$echo_test_string"; then
  360. CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
  361. export CONFIG_SHELL
  362. SHELL="$CONFIG_SHELL"
  363. export SHELL
  364. echo="$CONFIG_SHELL [$]0 --fallback-echo"
  365. elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
  366. test "X$echo_testing_string" = 'X\t' &&
  367. echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  368. test "X$echo_testing_string" = "X$echo_test_string"; then
  369. echo="$CONFIG_SHELL [$]0 --fallback-echo"
  370. else
  371. # maybe with a smaller string...
  372. prev=:
  373. for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
  374. if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
  375. then
  376. break
  377. fi
  378. prev="$cmd"
  379. done
  380. if test "$prev" != 'sed 50q "[$]0"'; then
  381. echo_test_string=`eval $prev`
  382. export echo_test_string
  383. exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
  384. else
  385. # Oops. We lost completely, so just stick with echo.
  386. echo=echo
  387. fi
  388. fi
  389. fi
  390. fi
  391. fi
  392. fi
  393. # Copy echo and quote the copy suitably for passing to libtool from
  394. # the Makefile, instead of quoting the original, which is used later.
  395. ECHO=$echo
  396. if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
  397. ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
  398. fi
  399. AC_SUBST(ECHO)
  400. ])])# _LT_AC_PROG_ECHO_BACKSLASH
  401. # _LT_AC_LOCK
  402. # -----------
  403. AC_DEFUN([_LT_AC_LOCK],
  404. [AC_ARG_ENABLE([libtool-lock],
  405. [AC_HELP_STRING([--disable-libtool-lock],
  406. [avoid locking (might break parallel builds)])])
  407. test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  408. # Some flags need to be propagated to the compiler or linker for good
  409. # libtool support.
  410. case $host in
  411. ia64-*-hpux*)
  412. # Find out which ABI we are using.
  413. echo 'int i;' > conftest.$ac_ext
  414. if AC_TRY_EVAL(ac_compile); then
  415. case `/usr/bin/file conftest.$ac_objext` in
  416. *ELF-32*)
  417. HPUX_IA64_MODE="32"
  418. ;;
  419. *ELF-64*)
  420. HPUX_IA64_MODE="64"
  421. ;;
  422. esac
  423. fi
  424. rm -rf conftest*
  425. ;;
  426. *-*-irix6*)
  427. # Find out which ABI we are using.
  428. echo '[#]line __oline__ "configure"' > conftest.$ac_ext
  429. if AC_TRY_EVAL(ac_compile); then
  430. if test "$lt_cv_prog_gnu_ld" = yes; then
  431. case `/usr/bin/file conftest.$ac_objext` in
  432. *32-bit*)
  433. LD="${LD-ld} -melf32bsmip"
  434. ;;
  435. *N32*)
  436. LD="${LD-ld} -melf32bmipn32"
  437. ;;
  438. *64-bit*)
  439. LD="${LD-ld} -melf64bmip"
  440. ;;
  441. esac
  442. else
  443. case `/usr/bin/file conftest.$ac_objext` in
  444. *32-bit*)
  445. LD="${LD-ld} -32"
  446. ;;
  447. *N32*)
  448. LD="${LD-ld} -n32"
  449. ;;
  450. *64-bit*)
  451. LD="${LD-ld} -64"
  452. ;;
  453. esac
  454. fi
  455. fi
  456. rm -rf conftest*
  457. ;;
  458. x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
  459. # Find out which ABI we are using.
  460. echo 'int i;' > conftest.$ac_ext
  461. if AC_TRY_EVAL(ac_compile); then
  462. case "`/usr/bin/file conftest.o`" in
  463. *32-bit*)
  464. case $host in
  465. x86_64-*linux*)
  466. LD="${LD-ld} -m elf_i386"
  467. ;;
  468. ppc64-*linux*|powerpc64-*linux*)
  469. LD="${LD-ld} -m elf32ppclinux"
  470. ;;
  471. s390x-*linux*)
  472. LD="${LD-ld} -m elf_s390"
  473. ;;
  474. sparc64-*linux*)
  475. LD="${LD-ld} -m elf32_sparc"
  476. ;;
  477. esac
  478. ;;
  479. *64-bit*)
  480. case $host in
  481. x86_64-*linux*)
  482. LD="${LD-ld} -m elf_x86_64"
  483. ;;
  484. ppc*-*linux*|powerpc*-*linux*)
  485. LD="${LD-ld} -m elf64ppc"
  486. ;;
  487. s390*-*linux*)
  488. LD="${LD-ld} -m elf64_s390"
  489. ;;
  490. sparc*-*linux*)
  491. LD="${LD-ld} -m elf64_sparc"
  492. ;;
  493. esac
  494. ;;
  495. esac
  496. fi
  497. rm -rf conftest*
  498. ;;
  499. *-*-sco3.2v5*)
  500. # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  501. SAVE_CFLAGS="$CFLAGS"
  502. CFLAGS="$CFLAGS -belf"
  503. AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
  504. [AC_LANG_PUSH(C)
  505. AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
  506. AC_LANG_POP])
  507. if test x"$lt_cv_cc_needs_belf" != x"yes"; then
  508. # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  509. CFLAGS="$SAVE_CFLAGS"
  510. fi
  511. ;;
  512. AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
  513. [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
  514. AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  515. AC_CHECK_TOOL(AS, as, false)
  516. AC_CHECK_TOOL(OBJDUMP, objdump, false)
  517. ;;
  518. ])
  519. esac
  520. need_locks="$enable_libtool_lock"
  521. ])# _LT_AC_LOCK
  522. # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  523. # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
  524. # ----------------------------------------------------------------
  525. # Check whether the given compiler option works
  526. AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
  527. [AC_REQUIRE([LT_AC_PROG_SED])
  528. AC_CACHE_CHECK([$1], [$2],
  529. [$2=no
  530. ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
  531. printf "$lt_simple_compile_test_code" > conftest.$ac_ext
  532. lt_compiler_flag="$3"
  533. # Insert the option either (1) after the last *FLAGS variable, or
  534. # (2) before a word containing "conftest.", or (3) at the end.
  535. # Note that $ac_compile itself does not contain backslashes and begins
  536. # with a dollar sign (not a hyphen), so the echo should work correctly.
  537. # The option is referenced via a variable to avoid confusing sed.
  538. lt_compile=`echo "$ac_compile" | $SED \
  539. -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
  540. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  541. -e 's:$: $lt_compiler_flag:'`
  542. (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  543. (eval "$lt_compile" 2>conftest.err)
  544. ac_status=$?
  545. cat conftest.err >&AS_MESSAGE_LOG_FD
  546. echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  547. if (exit $ac_status) && test -s "$ac_outfile"; then
  548. # The compiler can only warn and ignore the option if not recognized
  549. # So say no if there are warnings other than the usual output.
  550. $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
  551. $SED '/^$/d' conftest.err >conftest.er2
  552. if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
  553. $2=yes
  554. fi
  555. fi
  556. $rm conftest*
  557. ])
  558. if test x"[$]$2" = xyes; then
  559. ifelse([$5], , :, [$5])
  560. else
  561. ifelse([$6], , :, [$6])
  562. fi
  563. ])# AC_LIBTOOL_COMPILER_OPTION
  564. # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  565. # [ACTION-SUCCESS], [ACTION-FAILURE])
  566. # ------------------------------------------------------------
  567. # Check whether the given compiler option works
  568. AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
  569. [AC_CACHE_CHECK([$1], [$2],
  570. [$2=no
  571. save_LDFLAGS="$LDFLAGS"
  572. LDFLAGS="$LDFLAGS $3"
  573. printf "$lt_simple_link_test_code" > conftest.$ac_ext
  574. if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
  575. # The compiler can only warn and ignore the option if not recognized
  576. # So say no if there are warnings
  577. if test -s conftest.err; then
  578. # Append any errors to the config.log.
  579. cat conftest.err 1>&AS_MESSAGE_LOG_FD
  580. $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
  581. $SED '/^$/d' conftest.err >conftest.er2
  582. if diff conftest.exp conftest.er2 >/dev/null; then
  583. $2=yes
  584. fi
  585. else
  586. $2=yes
  587. fi
  588. fi
  589. $rm conftest*
  590. LDFLAGS="$save_LDFLAGS"
  591. ])
  592. if test x"[$]$2" = xyes; then
  593. ifelse([$4], , :, [$4])
  594. else
  595. ifelse([$5], , :, [$5])
  596. fi
  597. ])# AC_LIBTOOL_LINKER_OPTION
  598. # AC_LIBTOOL_SYS_MAX_CMD_LEN
  599. # --------------------------
  600. AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
  601. [# find the maximum length of command line arguments
  602. AC_MSG_CHECKING([the maximum length of command line arguments])
  603. AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
  604. i=0
  605. teststring="ABCD"
  606. case $build_os in
  607. msdosdjgpp*)
  608. # On DJGPP, this test can blow up pretty badly due to problems in libc
  609. # (any single argument exceeding 2000 bytes causes a buffer overrun
  610. # during glob expansion). Even if it were fixed, the result of this
  611. # check would be larger than it should be.
  612. lt_cv_sys_max_cmd_len=12288; # 12K is about right
  613. ;;
  614. gnu*)
  615. # Under GNU Hurd, this test is not required because there is
  616. # no limit to the length of command line arguments.
  617. # Libtool will interpret -1 as no limit whatsoever
  618. lt_cv_sys_max_cmd_len=-1;
  619. ;;
  620. cygwin* | mingw*)
  621. # On Win9x/ME, this test blows up -- it succeeds, but takes
  622. # about 5 minutes as the teststring grows exponentially.
  623. # Worse, since 9x/ME are not pre-emptively multitasking,
  624. # you end up with a "frozen" computer, even though with patience
  625. # the test eventually succeeds (with a max line length of 256k).
  626. # Instead, let's just punt: use the minimum linelength reported by
  627. # all of the supported platforms: 8192 (on NT/2K/XP).
  628. lt_cv_sys_max_cmd_len=8192;
  629. ;;
  630. amigaos*)
  631. # On AmigaOS with pdksh, this test takes hours, literally.
  632. # So we just punt and use a minimum line length of 8192.
  633. lt_cv_sys_max_cmd_len=8192;
  634. ;;
  635. netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
  636. # This has been around since 386BSD, at least. Likely further.
  637. if test -x /sbin/sysctl; then
  638. lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
  639. elif test -x /usr/sbin/sysctl; then
  640. lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
  641. else
  642. lt_cv_sys_max_cmd_len=65536 # usable default for *BSD
  643. fi
  644. # And add a safety zone
  645. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  646. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  647. ;;
  648. osf*)
  649. # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
  650. # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
  651. # nice to cause kernel panics so lets avoid the loop below.
  652. # First set a reasonable default.
  653. lt_cv_sys_max_cmd_len=16384
  654. #
  655. if test -x /sbin/sysconfig; then
  656. case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
  657. *1*) lt_cv_sys_max_cmd_len=-1 ;;
  658. esac
  659. fi
  660. ;;
  661. *)
  662. # If test is not a shell built-in, we'll probably end up computing a
  663. # maximum length that is only half of the actual maximum length, but
  664. # we can't tell.
  665. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
  666. while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
  667. = "XX$teststring") >/dev/null 2>&1 &&
  668. new_result=`expr "X$teststring" : ".*" 2>&1` &&
  669. lt_cv_sys_max_cmd_len=$new_result &&
  670. test $i != 17 # 1/2 MB should be enough
  671. do
  672. i=`expr $i + 1`
  673. teststring=$teststring$teststring
  674. done
  675. teststring=
  676. # Add a significant safety factor because C++ compilers can tack on massive
  677. # amounts of additional arguments before passing them to the linker.
  678. # It appears as though 1/2 is a usable value.
  679. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
  680. ;;
  681. esac
  682. ])
  683. if test -n $lt_cv_sys_max_cmd_len ; then
  684. AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
  685. else
  686. AC_MSG_RESULT(none)
  687. fi
  688. ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
  689. # _LT_AC_CHECK_DLFCN
  690. # --------------------
  691. AC_DEFUN([_LT_AC_CHECK_DLFCN],
  692. [AC_CHECK_HEADERS(dlfcn.h)dnl
  693. ])# _LT_AC_CHECK_DLFCN
  694. # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
  695. # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
  696. # ------------------------------------------------------------------
  697. AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
  698. [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
  699. if test "$cross_compiling" = yes; then :
  700. [$4]
  701. else
  702. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  703. lt_status=$lt_dlunknown
  704. cat > conftest.$ac_ext <<EOF
  705. [#line __oline__ "configure"
  706. #include "confdefs.h"
  707. #if HAVE_DLFCN_H
  708. #include <dlfcn.h>
  709. #endif
  710. #include <stdio.h>
  711. #ifdef RTLD_GLOBAL
  712. # define LT_DLGLOBAL RTLD_GLOBAL
  713. #else
  714. # ifdef DL_GLOBAL
  715. # define LT_DLGLOBAL DL_GLOBAL
  716. # else
  717. # define LT_DLGLOBAL 0
  718. # endif
  719. #endif
  720. /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
  721. find out it does not work in some platform. */
  722. #ifndef LT_DLLAZY_OR_NOW
  723. # ifdef RTLD_LAZY
  724. # define LT_DLLAZY_OR_NOW RTLD_LAZY
  725. # else
  726. # ifdef DL_LAZY
  727. # define LT_DLLAZY_OR_NOW DL_LAZY
  728. # else
  729. # ifdef RTLD_NOW
  730. # define LT_DLLAZY_OR_NOW RTLD_NOW
  731. # else
  732. # ifdef DL_NOW
  733. # define LT_DLLAZY_OR_NOW DL_NOW
  734. # else
  735. # define LT_DLLAZY_OR_NOW 0
  736. # endif
  737. # endif
  738. # endif
  739. # endif
  740. #endif
  741. #ifdef __cplusplus
  742. extern "C" void exit (int);
  743. #endif
  744. void fnord() { int i=42;}
  745. int main ()
  746. {
  747. void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  748. int status = $lt_dlunknown;
  749. if (self)
  750. {
  751. if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
  752. else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
  753. /* dlclose (self); */
  754. }
  755. exit (status);
  756. }]
  757. EOF
  758. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
  759. (./conftest; exit; ) 2>/dev/null
  760. lt_status=$?
  761. case x$lt_status in
  762. x$lt_dlno_uscore) $1 ;;
  763. x$lt_dlneed_uscore) $2 ;;
  764. x$lt_unknown|x*) $3 ;;
  765. esac
  766. else :
  767. # compilation failed
  768. $3
  769. fi
  770. fi
  771. rm -fr conftest*
  772. ])# _LT_AC_TRY_DLOPEN_SELF
  773. # AC_LIBTOOL_DLOPEN_SELF
  774. # -------------------
  775. AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
  776. [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
  777. if test "x$enable_dlopen" != xyes; then
  778. enable_dlopen=unknown
  779. enable_dlopen_self=unknown
  780. enable_dlopen_self_static=unknown
  781. else
  782. lt_cv_dlopen=no
  783. lt_cv_dlopen_libs=
  784. case $host_os in
  785. beos*)
  786. lt_cv_dlopen="load_add_on"
  787. lt_cv_dlopen_libs=
  788. lt_cv_dlopen_self=yes
  789. ;;
  790. mingw* | pw32*)
  791. lt_cv_dlopen="LoadLibrary"
  792. lt_cv_dlopen_libs=
  793. ;;
  794. cygwin*)
  795. lt_cv_dlopen="dlopen"
  796. lt_cv_dlopen_libs=
  797. ;;
  798. darwin*)
  799. # if libdl is installed we need to link against it
  800. AC_CHECK_LIB([dl], [dlopen],
  801. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
  802. lt_cv_dlopen="dyld"
  803. lt_cv_dlopen_libs=
  804. lt_cv_dlopen_self=yes
  805. ])
  806. ;;
  807. *)
  808. AC_CHECK_FUNC([shl_load],
  809. [lt_cv_dlopen="shl_load"],
  810. [AC_CHECK_LIB([dld], [shl_load],
  811. [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
  812. [AC_CHECK_FUNC([dlopen],
  813. [lt_cv_dlopen="dlopen"],
  814. [AC_CHECK_LIB([dl], [dlopen],
  815. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
  816. [AC_CHECK_LIB([svld], [dlopen],
  817. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
  818. [AC_CHECK_LIB([dld], [dld_link],
  819. [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
  820. ])
  821. ])
  822. ])
  823. ])
  824. ])
  825. ;;
  826. esac
  827. if test "x$lt_cv_dlopen" != xno; then
  828. enable_dlopen=yes
  829. else
  830. enable_dlopen=no
  831. fi
  832. case $lt_cv_dlopen in
  833. dlopen)
  834. save_CPPFLAGS="$CPPFLAGS"
  835. test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  836. save_LDFLAGS="$LDFLAGS"
  837. eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  838. save_LIBS="$LIBS"
  839. LIBS="$lt_cv_dlopen_libs $LIBS"
  840. AC_CACHE_CHECK([whether a program can dlopen itself],
  841. lt_cv_dlopen_self, [dnl
  842. _LT_AC_TRY_DLOPEN_SELF(
  843. lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
  844. lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
  845. ])
  846. if test "x$lt_cv_dlopen_self" = xyes; then
  847. LDFLAGS="$LDFLAGS $link_static_flag"
  848. AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
  849. lt_cv_dlopen_self_static, [dnl
  850. _LT_AC_TRY_DLOPEN_SELF(
  851. lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
  852. lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
  853. ])
  854. fi
  855. CPPFLAGS="$save_CPPFLAGS"
  856. LDFLAGS="$save_LDFLAGS"
  857. LIBS="$save_LIBS"
  858. ;;
  859. esac
  860. case $lt_cv_dlopen_self in
  861. yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  862. *) enable_dlopen_self=unknown ;;
  863. esac
  864. case $lt_cv_dlopen_self_static in
  865. yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  866. *) enable_dlopen_self_static=unknown ;;
  867. esac
  868. fi
  869. ])# AC_LIBTOOL_DLOPEN_SELF
  870. # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
  871. # ---------------------------------
  872. # Check to see if options -c and -o are simultaneously supported by compiler
  873. AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
  874. [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
  875. AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
  876. [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
  877. [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
  878. $rm -r conftest 2>/dev/null
  879. mkdir conftest
  880. cd conftest
  881. mkdir out
  882. printf "$lt_simple_compile_test_code" > conftest.$ac_ext
  883. lt_compiler_flag="-o out/conftest2.$ac_objext"
  884. # Insert the option either (1) after the last *FLAGS variable, or
  885. # (2) before a word containing "conftest.", or (3) at the end.
  886. # Note that $ac_compile itself does not contain backslashes and begins
  887. # with a dollar sign (not a hyphen), so the echo should work correctly.
  888. lt_compile=`echo "$ac_compile" | $SED \
  889. -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
  890. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  891. -e 's:$: $lt_compiler_flag:'`
  892. (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  893. (eval "$lt_compile" 2>out/conftest.err)
  894. ac_status=$?
  895. cat out/conftest.err >&AS_MESSAGE_LOG_FD
  896. echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  897. if (exit $ac_status) && test -s out/conftest2.$ac_objext
  898. then
  899. # The compiler can only warn and ignore the option if not recognized
  900. # So say no if there are warnings
  901. $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
  902. $SED '/^$/d' out/conftest.err >out/conftest.er2
  903. if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
  904. _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  905. fi
  906. fi
  907. chmod u+w .
  908. $rm conftest*
  909. # SGI C++ compiler will create directory out/ii_files/ for
  910. # template instantiation
  911. test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
  912. $rm out/* && rmdir out
  913. cd ..
  914. rmdir conftest
  915. $rm conftest*
  916. ])
  917. ])# AC_LIBTOOL_PROG_CC_C_O
  918. # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
  919. # -----------------------------------------
  920. # Check to see if we can do hard links to lock some files if needed
  921. AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
  922. [AC_REQUIRE([_LT_AC_LOCK])dnl
  923. hard_links="nottested"
  924. if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
  925. # do not overwrite the value of need_locks provided by the user
  926. AC_MSG_CHECKING([if we can lock with hard links])
  927. hard_links=yes
  928. $rm conftest*
  929. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  930. touch conftest.a
  931. ln conftest.a conftest.b 2>&5 || hard_links=no
  932. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  933. AC_MSG_RESULT([$hard_links])
  934. if test "$hard_links" = no; then
  935. AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
  936. need_locks=warn
  937. fi
  938. else
  939. need_locks=no
  940. fi
  941. ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
  942. # AC_LIBTOOL_OBJDIR
  943. # -----------------
  944. AC_DEFUN([AC_LIBTOOL_OBJDIR],
  945. [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
  946. [rm -f .libs 2>/dev/null
  947. mkdir .libs 2>/dev/null
  948. if test -d .libs; then
  949. lt_cv_objdir=.libs
  950. else
  951. # MS-DOS does not allow filenames that begin with a dot.
  952. lt_cv_objdir=_libs
  953. fi
  954. rmdir .libs 2>/dev/null])
  955. objdir=$lt_cv_objdir
  956. ])# AC_LIBTOOL_OBJDIR
  957. # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
  958. # ----------------------------------------------
  959. # Check hardcoding attributes.
  960. AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
  961. [AC_MSG_CHECKING([how to hardcode library paths into programs])
  962. _LT_AC_TAGVAR(hardcode_action, $1)=
  963. if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
  964. test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
  965. test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
  966. # We can hardcode non-existant directories.
  967. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
  968. # If the only mechanism to avoid hardcoding is shlibpath_var, we
  969. # have to relink, otherwise we might link with an installed library
  970. # when we should be linking with a yet-to-be-installed one
  971. ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
  972. test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
  973. # Linking always hardcodes the temporary library directory.
  974. _LT_AC_TAGVAR(hardcode_action, $1)=relink
  975. else
  976. # We can link without hardcoding, and we can hardcode nonexisting dirs.
  977. _LT_AC_TAGVAR(hardcode_action, $1)=immediate
  978. fi
  979. else
  980. # We cannot hardcode anything, or else we can only hardcode existing
  981. # directories.
  982. _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
  983. fi
  984. AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
  985. if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
  986. # Fast installation is not supported
  987. enable_fast_install=no
  988. elif test "$shlibpath_overrides_runpath" = yes ||
  989. test "$enable_shared" = no; then
  990. # Fast installation is not necessary
  991. enable_fast_install=needless
  992. fi
  993. ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
  994. # AC_LIBTOOL_SYS_LIB_STRIP
  995. # ------------------------
  996. AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
  997. [striplib=
  998. old_striplib=
  999. AC_MSG_CHECKING([whether stripping libraries is possible])
  1000. if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
  1001. test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
  1002. test -z "$striplib" && striplib="$STRIP --strip-unneeded"
  1003. AC_MSG_RESULT([yes])
  1004. else
  1005. # FIXME - insert some real tests, host_os isn't really good enough
  1006. case $host_os in
  1007. darwin*)
  1008. if test -n "$STRIP" ; then
  1009. striplib="$STRIP -x"
  1010. AC_MSG_RESULT([yes])
  1011. else
  1012. AC_MSG_RESULT([no])
  1013. fi
  1014. ;;
  1015. *)
  1016. AC_MSG_RESULT([no])
  1017. ;;
  1018. esac
  1019. fi
  1020. ])# AC_LIBTOOL_SYS_LIB_STRIP
  1021. # AC_LIBTOOL_SYS_DYNAMIC_LINKER
  1022. # -----------------------------
  1023. # PORTME Fill in your ld.so characteristics
  1024. AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
  1025. [AC_MSG_CHECKING([dynamic linker characteristics])
  1026. library_names_spec=
  1027. libname_spec='lib$name'
  1028. soname_spec=
  1029. shrext_cmds=".so"
  1030. postinstall_cmds=
  1031. postuninstall_cmds=
  1032. finish_cmds=
  1033. finish_eval=
  1034. shlibpath_var=
  1035. shlibpath_overrides_runpath=unknown
  1036. version_type=none
  1037. dynamic_linker="$host_os ld.so"
  1038. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  1039. if test "$GCC" = yes; then
  1040. sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
  1041. if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
  1042. # if the path contains ";" then we assume it to be the separator
  1043. # otherwise default to the standard path separator (i.e. ":") - it is
  1044. # assumed that no part of a normal pathname contains ";" but that should
  1045. # okay in the real world where ";" in dirpaths is itself problematic.
  1046. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  1047. else
  1048. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  1049. fi
  1050. else
  1051. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  1052. fi
  1053. need_lib_prefix=unknown
  1054. hardcode_into_libs=no
  1055. # when you set need_version to no, make sure it does not cause -set_version
  1056. # flags to be left without arguments
  1057. need_version=unknown
  1058. case $host_os in
  1059. aix3*)
  1060. version_type=linux
  1061. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
  1062. shlibpath_var=LIBPATH
  1063. # AIX 3 has no versioning support, so we append a major version to the name.
  1064. soname_spec='${libname}${release}${shared_ext}$major'
  1065. ;;
  1066. aix4* | aix5*)
  1067. version_type=linux
  1068. need_lib_prefix=no
  1069. need_version=no
  1070. hardcode_into_libs=yes
  1071. if test "$host_cpu" = ia64; then
  1072. # AIX 5 supports IA64
  1073. library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
  1074. shlibpath_var=LD_LIBRARY_PATH
  1075. else
  1076. # With GCC up to 2.95.x, collect2 would create an import file
  1077. # for dependence libraries. The import file would start with
  1078. # the line `#! .'. This would cause the generated library to
  1079. # depend on `.', always an invalid library. This was fixed in
  1080. # development snapshots of GCC prior to 3.0.
  1081. case $host_os in
  1082. aix4 | aix4.[[01]] | aix4.[[01]].*)
  1083. if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
  1084. echo ' yes '
  1085. echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
  1086. :
  1087. else
  1088. can_build_shared=no
  1089. fi
  1090. ;;
  1091. esac
  1092. # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
  1093. # soname into executable. Probably we can add versioning support to
  1094. # collect2, so additional links can be useful in future.
  1095. if test "$aix_use_runtimelinking" = yes; then
  1096. # If using run time linking (on AIX 4.2 or later) use lib<name>.so
  1097. # instead of lib<name>.a to let people know that these are not
  1098. # typical AIX shared libraries.
  1099. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1100. else
  1101. # We preserve .a as extension for shared libraries through AIX4.2
  1102. # and later when we are not doing run time linking.
  1103. library_names_spec='${libname}${release}.a $libname.a'
  1104. soname_spec='${libname}${release}${shared_ext}$major'
  1105. fi
  1106. shlibpath_var=LIBPATH
  1107. fi
  1108. ;;
  1109. amigaos*)
  1110. library_names_spec='$libname.ixlibrary $libname.a'
  1111. # Create ${libname}_ixlibrary.a entries in /sys/libs.
  1112. 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'
  1113. ;;
  1114. beos*)
  1115. library_names_spec='${libname}${shared_ext}'
  1116. dynamic_linker="$host_os ld.so"
  1117. shlibpath_var=LIBRARY_PATH
  1118. ;;
  1119. bsdi[[45]]*)
  1120. version_type=linux
  1121. need_version=no
  1122. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1123. soname_spec='${libname}${release}${shared_ext}$major'
  1124. finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  1125. shlibpath_var=LD_LIBRARY_PATH
  1126. sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  1127. sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  1128. # the default ld.so.conf also contains /usr/contrib/lib and
  1129. # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  1130. # libtool to hard-code these into programs
  1131. ;;
  1132. cygwin* | mingw* | pw32*)
  1133. version_type=windows
  1134. shrext_cmds=".dll"
  1135. need_version=no
  1136. need_lib_prefix=no
  1137. case $GCC,$host_os in
  1138. yes,cygwin* | yes,mingw* | yes,pw32*)
  1139. library_names_spec='$libname.dll.a'
  1140. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  1141. postinstall_cmds='base_file=`basename \${file}`~
  1142. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
  1143. dldir=$destdir/`dirname \$dlpath`~
  1144. test -d \$dldir || mkdir -p \$dldir~
  1145. $install_prog $dir/$dlname \$dldir/$dlname'
  1146. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  1147. dlpath=$dir/\$dldll~
  1148. $rm \$dlpath'
  1149. shlibpath_overrides_runpath=yes
  1150. case $host_os in
  1151. cygwin*)
  1152. # Cygwin DLLs use 'cyg' prefix rather than 'lib'
  1153. soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  1154. sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
  1155. ;;
  1156. mingw*)
  1157. # MinGW DLLs use traditional 'lib' prefix
  1158. soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  1159. sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
  1160. if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
  1161. # It is most probably a Windows format PATH printed by
  1162. # mingw gcc, but we are running on Cygwin. Gcc prints its search
  1163. # path with ; separators, and with drive letters. We can handle the
  1164. # drive letters (cygwin fileutils understands them), so leave them,
  1165. # especially as we might pass files found there to a mingw objdump,
  1166. # which wouldn't understand a cygwinified path. Ahh.
  1167. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  1168. else
  1169. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  1170. fi
  1171. ;;
  1172. pw32*)
  1173. # pw32 DLLs use 'pw' prefix rather than 'lib'
  1174. library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  1175. ;;
  1176. esac
  1177. ;;
  1178. *)
  1179. library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
  1180. ;;
  1181. esac
  1182. dynamic_linker='Win32 ld.exe'
  1183. # FIXME: first we should search . and the directory the executable is in
  1184. shlibpath_var=PATH
  1185. ;;
  1186. darwin* | rhapsody*)
  1187. dynamic_linker="$host_os dyld"
  1188. version_type=darwin
  1189. need_lib_prefix=no
  1190. need_version=no
  1191. library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
  1192. soname_spec='${libname}${release}${major}$shared_ext'
  1193. shlibpath_overrides_runpath=yes
  1194. shlibpath_var=DYLD_LIBRARY_PATH
  1195. shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
  1196. # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
  1197. if test "$GCC" = yes; then
  1198. sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
  1199. else
  1200. sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
  1201. fi
  1202. sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
  1203. ;;
  1204. dgux*)
  1205. version_type=linux
  1206. need_lib_prefix=no
  1207. need_version=no
  1208. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
  1209. soname_spec='${libname}${release}${shared_ext}$major'
  1210. shlibpath_var=LD_LIBRARY_PATH
  1211. ;;
  1212. freebsd1*)
  1213. dynamic_linker=no
  1214. ;;
  1215. kfreebsd*-gnu)
  1216. version_type=linux
  1217. need_lib_prefix=no
  1218. need_version=no
  1219. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  1220. soname_spec='${libname}${release}${shared_ext}$major'
  1221. shlibpath_var=LD_LIBRARY_PATH
  1222. shlibpath_overrides_runpath=no
  1223. hardcode_into_libs=yes
  1224. dynamic_linker='GNU ld.so'
  1225. ;;
  1226. freebsd* | dragonfly*)
  1227. # DragonFly does not have aout. When/if they implement a new
  1228. # versioning mechanism, adjust this.
  1229. objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
  1230. version_type=freebsd-$objformat
  1231. case $version_type in
  1232. freebsd-elf*)
  1233. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  1234. need_version=no
  1235. need_lib_prefix=no
  1236. ;;
  1237. freebsd-*)
  1238. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
  1239. need_version=yes
  1240. ;;
  1241. esac
  1242. shlibpath_var=LD_LIBRARY_PATH
  1243. case $host_os in
  1244. freebsd2*)
  1245. shlibpath_overrides_runpath=yes
  1246. ;;
  1247. freebsd3.[[01]]* | freebsdelf3.[[01]]*)
  1248. shlibpath_overrides_runpath=yes
  1249. hardcode_into_libs=yes
  1250. ;;
  1251. *) # from 3.2 on
  1252. shlibpath_overrides_runpath=no
  1253. hardcode_into_libs=yes
  1254. ;;
  1255. esac
  1256. ;;
  1257. gnu*)
  1258. version_type=linux
  1259. need_lib_prefix=no
  1260. need_version=no
  1261. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  1262. soname_spec='${libname}${release}${shared_ext}$major'
  1263. shlibpath_var=LD_LIBRARY_PATH
  1264. hardcode_into_libs=yes
  1265. ;;
  1266. hpux9* | hpux10* | hpux11*)
  1267. # Give a soname corresponding to the major version so that dld.sl refuses to
  1268. # link against other versions.
  1269. version_type=sunos
  1270. need_lib_prefix=no
  1271. need_version=no
  1272. case "$host_cpu" in
  1273. ia64*)
  1274. shrext_cmds='.so'
  1275. hardcode_into_libs=yes
  1276. dynamic_linker="$host_os dld.so"
  1277. shlibpath_var=LD_LIBRARY_PATH
  1278. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  1279. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1280. soname_spec='${libname}${release}${shared_ext}$major'
  1281. if test "X$HPUX_IA64_MODE" = X32; then
  1282. sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
  1283. else
  1284. sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
  1285. fi
  1286. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  1287. ;;
  1288. hppa*64*)
  1289. shrext_cmds='.sl'
  1290. hardcode_into_libs=yes
  1291. dynamic_linker="$host_os dld.sl"
  1292. shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
  1293. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  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. sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
  1297. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  1298. ;;
  1299. *)
  1300. shrext_cmds='.sl'
  1301. dynamic_linker="$host_os dld.sl"
  1302. shlibpath_var=SHLIB_PATH
  1303. shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  1304. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1305. soname_spec='${libname}${release}${shared_ext}$major'
  1306. ;;
  1307. esac
  1308. # HP-UX runs *really* slowly unless shared libraries are mode 555.
  1309. postinstall_cmds='chmod 555 $lib'
  1310. ;;
  1311. irix5* | irix6* | nonstopux*)
  1312. case $host_os in
  1313. nonstopux*) version_type=nonstopux ;;
  1314. *)
  1315. if test "$lt_cv_prog_gnu_ld" = yes; then
  1316. version_type=linux
  1317. else
  1318. version_type=irix
  1319. fi ;;
  1320. esac
  1321. need_lib_prefix=no
  1322. need_version=no
  1323. soname_spec='${libname}${release}${shared_ext}$major'
  1324. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
  1325. case $host_os in
  1326. irix5* | nonstopux*)
  1327. libsuff= shlibsuff=
  1328. ;;
  1329. *)
  1330. case $LD in # libtool.m4 will add one of these switches to LD
  1331. *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
  1332. libsuff= shlibsuff= libmagic=32-bit;;
  1333. *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
  1334. libsuff=32 shlibsuff=N32 libmagic=N32;;
  1335. *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
  1336. libsuff=64 shlibsuff=64 libmagic=64-bit;;
  1337. *) libsuff= shlibsuff= libmagic=never-match;;
  1338. esac
  1339. ;;
  1340. esac
  1341. shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  1342. shlibpath_overrides_runpath=no
  1343. sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
  1344. sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
  1345. hardcode_into_libs=yes
  1346. ;;
  1347. # No shared lib support for Linux oldld, aout, or coff.
  1348. linux*oldld* | linux*aout* | linux*coff*)
  1349. dynamic_linker=no
  1350. ;;
  1351. # This must be Linux ELF.
  1352. linux*)
  1353. version_type=linux
  1354. need_lib_prefix=no
  1355. need_version=no
  1356. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1357. soname_spec='${libname}${release}${shared_ext}$major'
  1358. finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  1359. shlibpath_var=LD_LIBRARY_PATH
  1360. shlibpath_overrides_runpath=no
  1361. # This implies no fast_install, which is unacceptable.
  1362. # Some rework will be needed to allow for fast_install
  1363. # before this can be enabled.
  1364. hardcode_into_libs=yes
  1365. # Append ld.so.conf contents to the search path
  1366. if test -f /etc/ld.so.conf; then
  1367. lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
  1368. sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
  1369. fi
  1370. # We used to test for /lib/ld.so.1 and disable shared libraries on
  1371. # powerpc, because MkLinux only supported shared libraries with the
  1372. # GNU dynamic linker. Since this was broken with cross compilers,
  1373. # most powerpc-linux boxes support dynamic linking these days and
  1374. # people can always --disable-shared, the test was removed, and we
  1375. # assume the GNU/Linux dynamic linker is in use.
  1376. dynamic_linker='GNU/Linux ld.so'
  1377. ;;
  1378. knetbsd*-gnu)
  1379. version_type=linux
  1380. need_lib_prefix=no
  1381. need_version=no
  1382. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  1383. soname_spec='${libname}${release}${shared_ext}$major'
  1384. shlibpath_var=LD_LIBRARY_PATH
  1385. shlibpath_overrides_runpath=no
  1386. hardcode_into_libs=yes
  1387. dynamic_linker='GNU ld.so'
  1388. ;;
  1389. netbsd*)
  1390. version_type=sunos
  1391. need_lib_prefix=no
  1392. need_version=no
  1393. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  1394. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  1395. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  1396. dynamic_linker='NetBSD (a.out) ld.so'
  1397. else
  1398. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  1399. soname_spec='${libname}${release}${shared_ext}$major'
  1400. dynamic_linker='NetBSD ld.elf_so'
  1401. fi
  1402. shlibpath_var=LD_LIBRARY_PATH
  1403. shlibpath_overrides_runpath=yes
  1404. hardcode_into_libs=yes
  1405. ;;
  1406. newsos6)
  1407. version_type=linux
  1408. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1409. shlibpath_var=LD_LIBRARY_PATH
  1410. shlibpath_overrides_runpath=yes
  1411. ;;
  1412. nto-qnx*)
  1413. version_type=linux
  1414. need_lib_prefix=no
  1415. need_version=no
  1416. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1417. soname_spec='${libname}${release}${shared_ext}$major'
  1418. shlibpath_var=LD_LIBRARY_PATH
  1419. shlibpath_overrides_runpath=yes
  1420. ;;
  1421. openbsd*)
  1422. version_type=sunos
  1423. need_lib_prefix=no
  1424. # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
  1425. case $host_os in
  1426. openbsd3.3 | openbsd3.3.*) need_version=yes ;;
  1427. *) need_version=no ;;
  1428. esac
  1429. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  1430. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  1431. shlibpath_var=LD_LIBRARY_PATH
  1432. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  1433. case $host_os in
  1434. openbsd2.[[89]] | openbsd2.[[89]].*)
  1435. shlibpath_overrides_runpath=no
  1436. ;;
  1437. *)
  1438. shlibpath_overrides_runpath=yes
  1439. ;;
  1440. esac
  1441. else
  1442. shlibpath_overrides_runpath=yes
  1443. fi
  1444. ;;
  1445. os2*)
  1446. libname_spec='$name'
  1447. shrext_cmds=".dll"
  1448. need_lib_prefix=no
  1449. library_names_spec='$libname${shared_ext} $libname.a'
  1450. dynamic_linker='OS/2 ld.exe'
  1451. shlibpath_var=LIBPATH
  1452. ;;
  1453. osf3* | osf4* | osf5*)
  1454. version_type=osf
  1455. need_lib_prefix=no
  1456. need_version=no
  1457. soname_spec='${libname}${release}${shared_ext}$major'
  1458. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1459. shlibpath_var=LD_LIBRARY_PATH
  1460. sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  1461. sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  1462. ;;
  1463. sco3.2v5*)
  1464. version_type=osf
  1465. soname_spec='${libname}${release}${shared_ext}$major'
  1466. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1467. shlibpath_var=LD_LIBRARY_PATH
  1468. ;;
  1469. solaris*)
  1470. version_type=linux
  1471. need_lib_prefix=no
  1472. need_version=no
  1473. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1474. soname_spec='${libname}${release}${shared_ext}$major'
  1475. shlibpath_var=LD_LIBRARY_PATH
  1476. shlibpath_overrides_runpath=yes
  1477. hardcode_into_libs=yes
  1478. # ldd complains unless libraries are executable
  1479. postinstall_cmds='chmod +x $lib'
  1480. ;;
  1481. sunos4*)
  1482. version_type=sunos
  1483. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  1484. finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  1485. shlibpath_var=LD_LIBRARY_PATH
  1486. shlibpath_overrides_runpath=yes
  1487. if test "$with_gnu_ld" = yes; then
  1488. need_lib_prefix=no
  1489. fi
  1490. need_version=yes
  1491. ;;
  1492. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  1493. version_type=linux
  1494. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1495. soname_spec='${libname}${release}${shared_ext}$major'
  1496. shlibpath_var=LD_LIBRARY_PATH
  1497. case $host_vendor in
  1498. sni)
  1499. shlibpath_overrides_runpath=no
  1500. need_lib_prefix=no
  1501. export_dynamic_flag_spec='${wl}-Blargedynsym'
  1502. runpath_var=LD_RUN_PATH
  1503. ;;
  1504. siemens)
  1505. need_lib_prefix=no
  1506. ;;
  1507. motorola)
  1508. need_lib_prefix=no
  1509. need_version=no
  1510. shlibpath_overrides_runpath=no
  1511. sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  1512. ;;
  1513. esac
  1514. ;;
  1515. sysv4*MP*)
  1516. if test -d /usr/nec ;then
  1517. version_type=linux
  1518. library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
  1519. soname_spec='$libname${shared_ext}.$major'
  1520. shlibpath_var=LD_LIBRARY_PATH
  1521. fi
  1522. ;;
  1523. uts4*)
  1524. version_type=linux
  1525. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1526. soname_spec='${libname}${release}${shared_ext}$major'
  1527. shlibpath_var=LD_LIBRARY_PATH
  1528. ;;
  1529. *)
  1530. dynamic_linker=no
  1531. ;;
  1532. esac
  1533. AC_MSG_RESULT([$dynamic_linker])
  1534. test "$dynamic_linker" = no && can_build_shared=no
  1535. ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
  1536. # _LT_AC_TAGCONFIG
  1537. # ----------------
  1538. AC_DEFUN([_LT_AC_TAGCONFIG],
  1539. [AC_ARG_WITH([tags],
  1540. [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
  1541. [include additional configurations @<:@automatic@:>@])],
  1542. [tagnames="$withval"])
  1543. if test -f "$ltmain" && test -n "$tagnames"; then
  1544. if test ! -f "${ofile}"; then
  1545. AC_MSG_WARN([output file `$ofile' does not exist])
  1546. fi
  1547. if test -z "$LTCC"; then
  1548. eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
  1549. if test -z "$LTCC"; then
  1550. AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
  1551. else
  1552. AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
  1553. fi
  1554. fi
  1555. # Extract list of available tagged configurations in $ofile.
  1556. # Note that this assumes the entire list is on one line.
  1557. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
  1558. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  1559. for tagname in $tagnames; do
  1560. IFS="$lt_save_ifs"
  1561. # Check whether tagname contains only valid characters
  1562. case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
  1563. "") ;;
  1564. *) AC_MSG_ERROR([invalid tag name: $tagname])
  1565. ;;
  1566. esac
  1567. if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
  1568. then
  1569. AC_MSG_ERROR([tag name \"$tagname\" already exists])
  1570. fi
  1571. # Update the list of available tags.
  1572. if test -n "$tagname"; then
  1573. echo appending configuration tag \"$tagname\" to $ofile
  1574. case $tagname in
  1575. CXX)
  1576. if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
  1577. ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
  1578. (test "X$CXX" != "Xg++"))) ; then
  1579. AC_LIBTOOL_LANG_CXX_CONFIG
  1580. else
  1581. tagname=""
  1582. fi
  1583. ;;
  1584. F77)
  1585. if test -n "$F77" && test "X$F77" != "Xno"; then
  1586. AC_LIBTOOL_LANG_F77_CONFIG
  1587. else
  1588. tagname=""
  1589. fi
  1590. ;;
  1591. GCJ)
  1592. if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
  1593. AC_LIBTOOL_LANG_GCJ_CONFIG
  1594. else
  1595. tagname=""
  1596. fi
  1597. ;;
  1598. RC)
  1599. AC_LIBTOOL_LANG_RC_CONFIG
  1600. ;;
  1601. *)
  1602. AC_MSG_ERROR([Unsupported tag name: $tagname])
  1603. ;;
  1604. esac
  1605. # Append the new tag name to the list of available tags.
  1606. if test -n "$tagname" ; then
  1607. available_tags="$available_tags $tagname"
  1608. fi
  1609. fi
  1610. done
  1611. IFS="$lt_save_ifs"
  1612. # Now substitute the updated list of available tags.
  1613. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
  1614. mv "${ofile}T" "$ofile"
  1615. chmod +x "$ofile"
  1616. else
  1617. rm -f "${ofile}T"
  1618. AC_MSG_ERROR([unable to update list of available tagged configurations.])
  1619. fi
  1620. fi
  1621. ])# _LT_AC_TAGCONFIG
  1622. # AC_LIBTOOL_DLOPEN
  1623. # -----------------
  1624. # enable checks for dlopen support
  1625. AC_DEFUN([AC_LIBTOOL_DLOPEN],
  1626. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
  1627. ])# AC_LIBTOOL_DLOPEN
  1628. # AC_LIBTOOL_WIN32_DLL
  1629. # --------------------
  1630. # declare package support for building win32 dll's
  1631. AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
  1632. [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
  1633. ])# AC_LIBTOOL_WIN32_DLL
  1634. # AC_ENABLE_SHARED([DEFAULT])
  1635. # ---------------------------
  1636. # implement the --enable-shared flag
  1637. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  1638. AC_DEFUN([AC_ENABLE_SHARED],
  1639. [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
  1640. AC_ARG_ENABLE([shared],
  1641. [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
  1642. [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
  1643. [p=${PACKAGE-default}
  1644. case $enableval in
  1645. yes) enable_shared=yes ;;
  1646. no) enable_shared=no ;;
  1647. *)
  1648. enable_shared=no
  1649. # Look at the argument we got. We use all the common list separators.
  1650. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  1651. for pkg in $enableval; do
  1652. IFS="$lt_save_ifs"
  1653. if test "X$pkg" = "X$p"; then
  1654. enable_shared=yes
  1655. fi
  1656. done
  1657. IFS="$lt_save_ifs"
  1658. ;;
  1659. esac],
  1660. [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
  1661. ])# AC_ENABLE_SHARED
  1662. # AC_DISABLE_SHARED
  1663. # -----------------
  1664. #- set the default shared flag to --disable-shared
  1665. AC_DEFUN([AC_DISABLE_SHARED],
  1666. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  1667. AC_ENABLE_SHARED(no)
  1668. ])# AC_DISABLE_SHARED
  1669. # AC_ENABLE_STATIC([DEFAULT])
  1670. # ---------------------------
  1671. # implement the --enable-static flag
  1672. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  1673. AC_DEFUN([AC_ENABLE_STATIC],
  1674. [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
  1675. AC_ARG_ENABLE([static],
  1676. [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
  1677. [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
  1678. [p=${PACKAGE-default}
  1679. case $enableval in
  1680. yes) enable_static=yes ;;
  1681. no) enable_static=no ;;
  1682. *)
  1683. enable_static=no
  1684. # Look at the argument we got. We use all the common list separators.
  1685. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  1686. for pkg in $enableval; do
  1687. IFS="$lt_save_ifs"
  1688. if test "X$pkg" = "X$p"; then
  1689. enable_static=yes
  1690. fi
  1691. done
  1692. IFS="$lt_save_ifs"
  1693. ;;
  1694. esac],
  1695. [enable_static=]AC_ENABLE_STATIC_DEFAULT)
  1696. ])# AC_ENABLE_STATIC
  1697. # AC_DISABLE_STATIC
  1698. # -----------------
  1699. # set the default static flag to --disable-static
  1700. AC_DEFUN([AC_DISABLE_STATIC],
  1701. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  1702. AC_ENABLE_STATIC(no)
  1703. ])# AC_DISABLE_STATIC
  1704. # AC_ENABLE_FAST_INSTALL([DEFAULT])
  1705. # ---------------------------------
  1706. # implement the --enable-fast-install flag
  1707. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  1708. AC_DEFUN([AC_ENABLE_FAST_INSTALL],
  1709. [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
  1710. AC_ARG_ENABLE([fast-install],
  1711. [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
  1712. [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
  1713. [p=${PACKAGE-default}
  1714. case $enableval in
  1715. yes) enable_fast_install=yes ;;
  1716. no) enable_fast_install=no ;;
  1717. *)
  1718. enable_fast_install=no
  1719. # Look at the argument we got. We use all the common list separators.
  1720. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  1721. for pkg in $enableval; do
  1722. IFS="$lt_save_ifs"
  1723. if test "X$pkg" = "X$p"; then
  1724. enable_fast_install=yes
  1725. fi
  1726. done
  1727. IFS="$lt_save_ifs"
  1728. ;;
  1729. esac],
  1730. [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
  1731. ])# AC_ENABLE_FAST_INSTALL
  1732. # AC_DISABLE_FAST_INSTALL
  1733. # -----------------------
  1734. # set the default to --disable-fast-install
  1735. AC_DEFUN([AC_DISABLE_FAST_INSTALL],
  1736. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  1737. AC_ENABLE_FAST_INSTALL(no)
  1738. ])# AC_DISABLE_FAST_INSTALL
  1739. # AC_LIBTOOL_PICMODE([MODE])
  1740. # --------------------------
  1741. # implement the --with-pic flag
  1742. # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
  1743. AC_DEFUN([AC_LIBTOOL_PICMODE],
  1744. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  1745. pic_mode=ifelse($#,1,$1,default)
  1746. ])# AC_LIBTOOL_PICMODE
  1747. # AC_PROG_EGREP
  1748. # -------------
  1749. # This is predefined starting with Autoconf 2.54, so this conditional
  1750. # definition can be removed once we require Autoconf 2.54 or later.
  1751. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
  1752. [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
  1753. [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
  1754. then ac_cv_prog_egrep='grep -E'
  1755. else ac_cv_prog_egrep='egrep'
  1756. fi])
  1757. EGREP=$ac_cv_prog_egrep
  1758. AC_SUBST([EGREP])
  1759. ])])
  1760. # AC_PATH_TOOL_PREFIX
  1761. # -------------------
  1762. # find a file program which can recognise shared library
  1763. AC_DEFUN([AC_PATH_TOOL_PREFIX],
  1764. [AC_REQUIRE([AC_PROG_EGREP])dnl
  1765. AC_MSG_CHECKING([for $1])
  1766. AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
  1767. [case $MAGIC_CMD in
  1768. [[\\/*] | ?:[\\/]*])
  1769. lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
  1770. ;;
  1771. *)
  1772. lt_save_MAGIC_CMD="$MAGIC_CMD"
  1773. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  1774. dnl $ac_dummy forces splitting on constant user-supplied paths.
  1775. dnl POSIX.2 word splitting is done only on the output of word expansions,
  1776. dnl not every word. This closes a longstanding sh security hole.
  1777. ac_dummy="ifelse([$2], , $PATH, [$2])"
  1778. for ac_dir in $ac_dummy; do
  1779. IFS="$lt_save_ifs"
  1780. test -z "$ac_dir" && ac_dir=.
  1781. if test -f $ac_dir/$1; then
  1782. lt_cv_path_MAGIC_CMD="$ac_dir/$1"
  1783. if test -n "$file_magic_test_file"; then
  1784. case $deplibs_check_method in
  1785. "file_magic "*)
  1786. file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
  1787. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  1788. if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  1789. $EGREP "$file_magic_regex" > /dev/null; then
  1790. :
  1791. else
  1792. cat <<EOF 1>&2
  1793. *** Warning: the command libtool uses to detect shared libraries,
  1794. *** $file_magic_cmd, produces output that libtool cannot recognize.
  1795. *** The result is that libtool may fail to recognize shared libraries
  1796. *** as such. This will affect the creation of libtool libraries that
  1797. *** depend on shared libraries, but programs linked with such libtool
  1798. *** libraries will work regardless of this problem. Nevertheless, you
  1799. *** may want to report the problem to your system manager and/or to
  1800. *** bug-libtool@gnu.org
  1801. EOF
  1802. fi ;;
  1803. esac
  1804. fi
  1805. break
  1806. fi
  1807. done
  1808. IFS="$lt_save_ifs"
  1809. MAGIC_CMD="$lt_save_MAGIC_CMD"
  1810. ;;
  1811. esac])
  1812. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  1813. if test -n "$MAGIC_CMD"; then
  1814. AC_MSG_RESULT($MAGIC_CMD)
  1815. else
  1816. AC_MSG_RESULT(no)
  1817. fi
  1818. ])# AC_PATH_TOOL_PREFIX
  1819. # AC_PATH_MAGIC
  1820. # -------------
  1821. # find a file program which can recognise a shared library
  1822. AC_DEFUN([AC_PATH_MAGIC],
  1823. [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
  1824. if test -z "$lt_cv_path_MAGIC_CMD"; then
  1825. if test -n "$ac_tool_prefix"; then
  1826. AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
  1827. else
  1828. MAGIC_CMD=:
  1829. fi
  1830. fi
  1831. ])# AC_PATH_MAGIC
  1832. # AC_PROG_LD
  1833. # ----------
  1834. # find the pathname to the GNU or non-GNU linker
  1835. AC_DEFUN([AC_PROG_LD],
  1836. [AC_ARG_WITH([gnu-ld],
  1837. [AC_HELP_STRING([--with-gnu-ld],
  1838. [assume the C compiler uses GNU ld @<:@default=no@:>@])],
  1839. [test "$withval" = no || with_gnu_ld=yes],
  1840. [with_gnu_ld=no])
  1841. AC_REQUIRE([LT_AC_PROG_SED])dnl
  1842. AC_REQUIRE([AC_PROG_CC])dnl
  1843. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  1844. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  1845. ac_prog=ld
  1846. if test "$GCC" = yes; then
  1847. # Check if gcc -print-prog-name=ld gives a path.
  1848. AC_MSG_CHECKING([for ld used by $CC])
  1849. case $host in
  1850. *-*-mingw*)
  1851. # gcc leaves a trailing carriage return which upsets mingw
  1852. ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  1853. *)
  1854. ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  1855. esac
  1856. case $ac_prog in
  1857. # Accept absolute paths.
  1858. [[\\/]]* | ?:[[\\/]]*)
  1859. re_direlt='/[[^/]][[^/]]*/\.\./'
  1860. # Canonicalize the pathname of ld
  1861. ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
  1862. while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
  1863. ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
  1864. done
  1865. test -z "$LD" && LD="$ac_prog"
  1866. ;;
  1867. "")
  1868. # If it fails, then pretend we aren't using GCC.
  1869. ac_prog=ld
  1870. ;;
  1871. *)
  1872. # If it is relative, then search for the first ld in PATH.
  1873. with_gnu_ld=unknown
  1874. ;;
  1875. esac
  1876. elif test "$with_gnu_ld" = yes; then
  1877. AC_MSG_CHECKING([for GNU ld])
  1878. else
  1879. AC_MSG_CHECKING([for non-GNU ld])
  1880. fi
  1881. AC_CACHE_VAL(lt_cv_path_LD,
  1882. [if test -z "$LD"; then
  1883. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  1884. for ac_dir in $PATH; do
  1885. IFS="$lt_save_ifs"
  1886. test -z "$ac_dir" && ac_dir=.
  1887. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  1888. lt_cv_path_LD="$ac_dir/$ac_prog"
  1889. # Check to see if the program is GNU ld. I'd rather use --version,
  1890. # but apparently some GNU ld's only accept -v.
  1891. # Break only if it was the GNU/non-GNU ld that we prefer.
  1892. case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
  1893. *GNU* | *'with BFD'*)
  1894. test "$with_gnu_ld" != no && break
  1895. ;;
  1896. *)
  1897. test "$with_gnu_ld" != yes && break
  1898. ;;
  1899. esac
  1900. fi
  1901. done
  1902. IFS="$lt_save_ifs"
  1903. else
  1904. lt_cv_path_LD="$LD" # Let the user override the test with a path.
  1905. fi])
  1906. LD="$lt_cv_path_LD"
  1907. if test -n "$LD"; then
  1908. AC_MSG_RESULT($LD)
  1909. else
  1910. AC_MSG_RESULT(no)
  1911. fi
  1912. test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  1913. AC_PROG_LD_GNU
  1914. ])# AC_PROG_LD
  1915. # AC_PROG_LD_GNU
  1916. # --------------
  1917. AC_DEFUN([AC_PROG_LD_GNU],
  1918. [AC_REQUIRE([AC_PROG_EGREP])dnl
  1919. AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
  1920. [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
  1921. case `$LD -v 2>&1 </dev/null` in
  1922. *GNU* | *'with BFD'*)
  1923. lt_cv_prog_gnu_ld=yes
  1924. ;;
  1925. *)
  1926. lt_cv_prog_gnu_ld=no
  1927. ;;
  1928. esac])
  1929. with_gnu_ld=$lt_cv_prog_gnu_ld
  1930. ])# AC_PROG_LD_GNU
  1931. # AC_PROG_LD_RELOAD_FLAG
  1932. # ----------------------
  1933. # find reload flag for linker
  1934. # -- PORTME Some linkers may need a different reload flag.
  1935. AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
  1936. [AC_CACHE_CHECK([for $LD option to reload object files],
  1937. lt_cv_ld_reload_flag,
  1938. [lt_cv_ld_reload_flag='-r'])
  1939. reload_flag=$lt_cv_ld_reload_flag
  1940. case $reload_flag in
  1941. "" | " "*) ;;
  1942. *) reload_flag=" $reload_flag" ;;
  1943. esac
  1944. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  1945. case $host_os in
  1946. darwin*)
  1947. if test "$GCC" = yes; then
  1948. reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
  1949. else
  1950. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  1951. fi
  1952. ;;
  1953. esac
  1954. ])# AC_PROG_LD_RELOAD_FLAG
  1955. # AC_DEPLIBS_CHECK_METHOD
  1956. # -----------------------
  1957. # how to check for library dependencies
  1958. # -- PORTME fill in with the dynamic library characteristics
  1959. AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
  1960. [AC_CACHE_CHECK([how to recognise dependent libraries],
  1961. lt_cv_deplibs_check_method,
  1962. [lt_cv_file_magic_cmd='$MAGIC_CMD'
  1963. lt_cv_file_magic_test_file=
  1964. lt_cv_deplibs_check_method='unknown'
  1965. # Need to set the preceding variable on all platforms that support
  1966. # interlibrary dependencies.
  1967. # 'none' -- dependencies not supported.
  1968. # `unknown' -- same as none, but documents that we really don't know.
  1969. # 'pass_all' -- all dependencies passed with no checks.
  1970. # 'test_compile' -- check by making test program.
  1971. # 'file_magic [[regex]]' -- check by looking for files in library path
  1972. # which responds to the $file_magic_cmd with a given extended regex.
  1973. # If you have `file' or equivalent on your system and you're not sure
  1974. # whether `pass_all' will *always* work, you probably want this one.
  1975. case $host_os in
  1976. aix4* | aix5*)
  1977. lt_cv_deplibs_check_method=pass_all
  1978. ;;
  1979. beos*)
  1980. lt_cv_deplibs_check_method=pass_all
  1981. ;;
  1982. bsdi[[45]]*)
  1983. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
  1984. lt_cv_file_magic_cmd='/usr/bin/file -L'
  1985. lt_cv_file_magic_test_file=/shlib/libc.so
  1986. ;;
  1987. cygwin*)
  1988. # func_win32_libid is a shell function defined in ltmain.sh
  1989. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  1990. lt_cv_file_magic_cmd='func_win32_libid'
  1991. ;;
  1992. mingw* | pw32*)
  1993. # Base MSYS/MinGW do not provide the 'file' command needed by
  1994. # func_win32_libid shell function, so use a weaker test based on 'objdump'.
  1995. lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
  1996. lt_cv_file_magic_cmd='$OBJDUMP -f'
  1997. ;;
  1998. darwin* | rhapsody*)
  1999. lt_cv_deplibs_check_method=pass_all
  2000. ;;
  2001. freebsd* | kfreebsd*-gnu | dragonfly*)
  2002. if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  2003. case $host_cpu in
  2004. i*86 )
  2005. # Not sure whether the presence of OpenBSD here was a mistake.
  2006. # Let's accept both of them until this is cleared up.
  2007. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
  2008. lt_cv_file_magic_cmd=/usr/bin/file
  2009. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  2010. ;;
  2011. esac
  2012. else
  2013. lt_cv_deplibs_check_method=pass_all
  2014. fi
  2015. ;;
  2016. gnu*)
  2017. lt_cv_deplibs_check_method=pass_all
  2018. ;;
  2019. hpux10.20* | hpux11*)
  2020. lt_cv_file_magic_cmd=/usr/bin/file
  2021. case "$host_cpu" in
  2022. ia64*)
  2023. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
  2024. lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
  2025. ;;
  2026. hppa*64*)
  2027. [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]']
  2028. lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
  2029. ;;
  2030. *)
  2031. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
  2032. lt_cv_file_magic_test_file=/usr/lib/libc.sl
  2033. ;;
  2034. esac
  2035. ;;
  2036. irix5* | irix6* | nonstopux*)
  2037. case $LD in
  2038. *-32|*"-32 ") libmagic=32-bit;;
  2039. *-n32|*"-n32 ") libmagic=N32;;
  2040. *-64|*"-64 ") libmagic=64-bit;;
  2041. *) libmagic=never-match;;
  2042. esac
  2043. lt_cv_deplibs_check_method=pass_all
  2044. ;;
  2045. # This must be Linux ELF.
  2046. linux*)
  2047. lt_cv_deplibs_check_method=pass_all
  2048. ;;
  2049. netbsd*)
  2050. if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  2051. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  2052. else
  2053. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
  2054. fi
  2055. ;;
  2056. newos6*)
  2057. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
  2058. lt_cv_file_magic_cmd=/usr/bin/file
  2059. lt_cv_file_magic_test_file=/usr/lib/libnls.so
  2060. ;;
  2061. nto-qnx*)
  2062. lt_cv_deplibs_check_method=unknown
  2063. ;;
  2064. openbsd*)
  2065. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  2066. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
  2067. else
  2068. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  2069. fi
  2070. ;;
  2071. osf3* | osf4* | osf5*)
  2072. lt_cv_deplibs_check_method=pass_all
  2073. ;;
  2074. sco3.2v5*)
  2075. lt_cv_deplibs_check_method=pass_all
  2076. ;;
  2077. solaris*)
  2078. lt_cv_deplibs_check_method=pass_all
  2079. ;;
  2080. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  2081. case $host_vendor in
  2082. motorola)
  2083. 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]]'
  2084. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  2085. ;;
  2086. ncr)
  2087. lt_cv_deplibs_check_method=pass_all
  2088. ;;
  2089. sequent)
  2090. lt_cv_file_magic_cmd='/bin/file'
  2091. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
  2092. ;;
  2093. sni)
  2094. lt_cv_file_magic_cmd='/bin/file'
  2095. lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
  2096. lt_cv_file_magic_test_file=/lib/libc.so
  2097. ;;
  2098. siemens)
  2099. lt_cv_deplibs_check_method=pass_all
  2100. ;;
  2101. esac
  2102. ;;
  2103. sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
  2104. lt_cv_deplibs_check_method=pass_all
  2105. ;;
  2106. esac
  2107. ])
  2108. file_magic_cmd=$lt_cv_file_magic_cmd
  2109. deplibs_check_method=$lt_cv_deplibs_check_method
  2110. test -z "$deplibs_check_method" && deplibs_check_method=unknown
  2111. ])# AC_DEPLIBS_CHECK_METHOD
  2112. # AC_PROG_NM
  2113. # ----------
  2114. # find the pathname to a BSD-compatible name lister
  2115. AC_DEFUN([AC_PROG_NM],
  2116. [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
  2117. [if test -n "$NM"; then
  2118. # Let the user override the test.
  2119. lt_cv_path_NM="$NM"
  2120. else
  2121. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  2122. for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
  2123. IFS="$lt_save_ifs"
  2124. test -z "$ac_dir" && ac_dir=.
  2125. tmp_nm="$ac_dir/${ac_tool_prefix}nm"
  2126. if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
  2127. # Check to see if the nm accepts a BSD-compat flag.
  2128. # Adding the `sed 1q' prevents false positives on HP-UX, which says:
  2129. # nm: unknown option "B" ignored
  2130. # Tru64's nm complains that /dev/null is an invalid object file
  2131. case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
  2132. */dev/null* | *'Invalid file or object type'*)
  2133. lt_cv_path_NM="$tmp_nm -B"
  2134. break
  2135. ;;
  2136. *)
  2137. case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
  2138. */dev/null*)
  2139. lt_cv_path_NM="$tmp_nm -p"
  2140. break
  2141. ;;
  2142. *)
  2143. lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
  2144. continue # so that we can try to find one that supports BSD flags
  2145. ;;
  2146. esac
  2147. esac
  2148. fi
  2149. done
  2150. IFS="$lt_save_ifs"
  2151. test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
  2152. fi])
  2153. NM="$lt_cv_path_NM"
  2154. ])# AC_PROG_NM
  2155. # AC_CHECK_LIBM
  2156. # -------------
  2157. # check for math library
  2158. AC_DEFUN([AC_CHECK_LIBM],
  2159. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2160. LIBM=
  2161. case $host in
  2162. *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
  2163. # These system don't have libm, or don't need it
  2164. ;;
  2165. *-ncr-sysv4.3*)
  2166. AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
  2167. AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
  2168. ;;
  2169. *)
  2170. AC_CHECK_LIB(m, cos, LIBM="-lm")
  2171. ;;
  2172. esac
  2173. ])# AC_CHECK_LIBM
  2174. # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
  2175. # -----------------------------------
  2176. # sets LIBLTDL to the link flags for the libltdl convenience library and
  2177. # LTDLINCL to the include flags for the libltdl header and adds
  2178. # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
  2179. # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
  2180. # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
  2181. # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
  2182. # '${top_srcdir}/' (note the single quotes!). If your package is not
  2183. # flat and you're not using automake, define top_builddir and
  2184. # top_srcdir appropriately in the Makefiles.
  2185. AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
  2186. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  2187. case $enable_ltdl_convenience in
  2188. no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
  2189. "") enable_ltdl_convenience=yes
  2190. ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
  2191. esac
  2192. LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
  2193. LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
  2194. # For backwards non-gettext consistent compatibility...
  2195. INCLTDL="$LTDLINCL"
  2196. ])# AC_LIBLTDL_CONVENIENCE
  2197. # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
  2198. # -----------------------------------
  2199. # sets LIBLTDL to the link flags for the libltdl installable library and
  2200. # LTDLINCL to the include flags for the libltdl header and adds
  2201. # --enable-ltdl-install to the configure arguments. Note that LIBLTDL
  2202. # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
  2203. # DIRECTORY is not provided and an installed libltdl is not found, it is
  2204. # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
  2205. # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
  2206. # quotes!). If your package is not flat and you're not using automake,
  2207. # define top_builddir and top_srcdir appropriately in the Makefiles.
  2208. # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
  2209. AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
  2210. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  2211. AC_CHECK_LIB(ltdl, lt_dlinit,
  2212. [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
  2213. [if test x"$enable_ltdl_install" = xno; then
  2214. AC_MSG_WARN([libltdl not installed, but installation disabled])
  2215. else
  2216. enable_ltdl_install=yes
  2217. fi
  2218. ])
  2219. if test x"$enable_ltdl_install" = x"yes"; then
  2220. ac_configure_args="$ac_configure_args --enable-ltdl-install"
  2221. LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
  2222. LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
  2223. else
  2224. ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
  2225. LIBLTDL="-lltdl"
  2226. LTDLINCL=
  2227. fi
  2228. # For backwards non-gettext consistent compatibility...
  2229. INCLTDL="$LTDLINCL"
  2230. ])# AC_LIBLTDL_INSTALLABLE
  2231. # AC_LIBTOOL_CXX
  2232. # --------------
  2233. # enable support for C++ libraries
  2234. AC_DEFUN([AC_LIBTOOL_CXX],
  2235. [AC_REQUIRE([_LT_AC_LANG_CXX])
  2236. ])# AC_LIBTOOL_CXX
  2237. # _LT_AC_LANG_CXX
  2238. # ---------------
  2239. AC_DEFUN([_LT_AC_LANG_CXX],
  2240. [AC_REQUIRE([AC_PROG_CXX])
  2241. AC_REQUIRE([_LT_AC_PROG_CXXCPP])
  2242. _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
  2243. ])# _LT_AC_LANG_CXX
  2244. # _LT_AC_PROG_CXXCPP
  2245. # ---------------
  2246. AC_DEFUN([_LT_AC_PROG_CXXCPP],
  2247. [
  2248. AC_REQUIRE([AC_PROG_CXX])
  2249. if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
  2250. ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
  2251. (test "X$CXX" != "Xg++"))) ; then
  2252. AC_PROG_CXXCPP
  2253. fi
  2254. ])# _LT_AC_PROG_CXXCPP
  2255. # AC_LIBTOOL_F77
  2256. # --------------
  2257. # enable support for Fortran 77 libraries
  2258. AC_DEFUN([AC_LIBTOOL_F77],
  2259. [AC_REQUIRE([_LT_AC_LANG_F77])
  2260. ])# AC_LIBTOOL_F77
  2261. # _LT_AC_LANG_F77
  2262. # ---------------
  2263. AC_DEFUN([_LT_AC_LANG_F77],
  2264. [AC_REQUIRE([AC_PROG_F77])
  2265. _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
  2266. ])# _LT_AC_LANG_F77
  2267. # AC_LIBTOOL_GCJ
  2268. # --------------
  2269. # enable support for GCJ libraries
  2270. AC_DEFUN([AC_LIBTOOL_GCJ],
  2271. [AC_REQUIRE([_LT_AC_LANG_GCJ])
  2272. ])# AC_LIBTOOL_GCJ
  2273. # _LT_AC_LANG_GCJ
  2274. # ---------------
  2275. AC_DEFUN([_LT_AC_LANG_GCJ],
  2276. [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
  2277. [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
  2278. [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
  2279. [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
  2280. [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
  2281. [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
  2282. _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
  2283. ])# _LT_AC_LANG_GCJ
  2284. # AC_LIBTOOL_RC
  2285. # --------------
  2286. # enable support for Windows resource files
  2287. AC_DEFUN([AC_LIBTOOL_RC],
  2288. [AC_REQUIRE([LT_AC_PROG_RC])
  2289. _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
  2290. ])# AC_LIBTOOL_RC
  2291. # AC_LIBTOOL_LANG_C_CONFIG
  2292. # ------------------------
  2293. # Ensure that the configuration vars for the C compiler are
  2294. # suitably defined. Those variables are subsequently used by
  2295. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  2296. AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
  2297. AC_DEFUN([_LT_AC_LANG_C_CONFIG],
  2298. [lt_save_CC="$CC"
  2299. AC_LANG_PUSH(C)
  2300. # Source file extension for C test sources.
  2301. ac_ext=c
  2302. # Object file extension for compiled C test sources.
  2303. objext=o
  2304. _LT_AC_TAGVAR(objext, $1)=$objext
  2305. # Code to be used in simple compile tests
  2306. lt_simple_compile_test_code="int some_variable = 0;\n"
  2307. # Code to be used in simple link tests
  2308. lt_simple_link_test_code='int main(){return(0);}\n'
  2309. _LT_AC_SYS_COMPILER
  2310. # save warnings/boilerplate of simple test code
  2311. _LT_COMPILER_BOILERPLATE
  2312. _LT_LINKER_BOILERPLATE
  2313. #
  2314. # Check for any special shared library compilation flags.
  2315. #
  2316. _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
  2317. if test "$GCC" = no; then
  2318. case $host_os in
  2319. sco3.2v5*)
  2320. _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
  2321. ;;
  2322. esac
  2323. fi
  2324. if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
  2325. AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
  2326. if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
  2327. else
  2328. AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
  2329. _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
  2330. fi
  2331. fi
  2332. #
  2333. # Check to make sure the static flag actually works.
  2334. #
  2335. AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
  2336. _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
  2337. $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
  2338. [],
  2339. [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
  2340. AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
  2341. AC_LIBTOOL_PROG_COMPILER_PIC($1)
  2342. AC_LIBTOOL_PROG_CC_C_O($1)
  2343. AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
  2344. AC_LIBTOOL_PROG_LD_SHLIBS($1)
  2345. AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  2346. AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  2347. AC_LIBTOOL_SYS_LIB_STRIP
  2348. AC_LIBTOOL_DLOPEN_SELF($1)
  2349. # Report which librarie types wil actually be built
  2350. AC_MSG_CHECKING([if libtool supports shared libraries])
  2351. AC_MSG_RESULT([$can_build_shared])
  2352. AC_MSG_CHECKING([whether to build shared libraries])
  2353. test "$can_build_shared" = "no" && enable_shared=no
  2354. # On AIX, shared libraries and static libraries use the same namespace, and
  2355. # are all built from PIC.
  2356. case "$host_os" in
  2357. aix3*)
  2358. test "$enable_shared" = yes && enable_static=no
  2359. if test -n "$RANLIB"; then
  2360. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  2361. postinstall_cmds='$RANLIB $lib'
  2362. fi
  2363. ;;
  2364. aix4* | aix5*)
  2365. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  2366. test "$enable_shared" = yes && enable_static=no
  2367. fi
  2368. ;;
  2369. esac
  2370. AC_MSG_RESULT([$enable_shared])
  2371. AC_MSG_CHECKING([whether to build static libraries])
  2372. # Make sure either enable_shared or enable_static is yes.
  2373. test "$enable_shared" = yes || enable_static=yes
  2374. AC_MSG_RESULT([$enable_static])
  2375. AC_LIBTOOL_CONFIG($1)
  2376. AC_LANG_POP
  2377. CC="$lt_save_CC"
  2378. ])# AC_LIBTOOL_LANG_C_CONFIG
  2379. # AC_LIBTOOL_LANG_CXX_CONFIG
  2380. # --------------------------
  2381. # Ensure that the configuration vars for the C compiler are
  2382. # suitably defined. Those variables are subsequently used by
  2383. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  2384. AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
  2385. AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
  2386. [AC_LANG_PUSH(C++)
  2387. AC_REQUIRE([AC_PROG_CXX])
  2388. AC_REQUIRE([_LT_AC_PROG_CXXCPP])
  2389. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  2390. _LT_AC_TAGVAR(allow_undefined_flag, $1)=
  2391. _LT_AC_TAGVAR(always_export_symbols, $1)=no
  2392. _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
  2393. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
  2394. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  2395. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
  2396. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  2397. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  2398. _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
  2399. _LT_AC_TAGVAR(hardcode_automatic, $1)=no
  2400. _LT_AC_TAGVAR(module_cmds, $1)=
  2401. _LT_AC_TAGVAR(module_expsym_cmds, $1)=
  2402. _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
  2403. _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  2404. _LT_AC_TAGVAR(no_undefined_flag, $1)=
  2405. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  2406. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  2407. # Dependencies to place before and after the object being linked:
  2408. _LT_AC_TAGVAR(predep_objects, $1)=
  2409. _LT_AC_TAGVAR(postdep_objects, $1)=
  2410. _LT_AC_TAGVAR(predeps, $1)=
  2411. _LT_AC_TAGVAR(postdeps, $1)=
  2412. _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
  2413. # Source file extension for C++ test sources.
  2414. ac_ext=cc
  2415. # Object file extension for compiled C++ test sources.
  2416. objext=o
  2417. _LT_AC_TAGVAR(objext, $1)=$objext
  2418. # Code to be used in simple compile tests
  2419. lt_simple_compile_test_code="int some_variable = 0;\n"
  2420. # Code to be used in simple link tests
  2421. lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
  2422. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  2423. _LT_AC_SYS_COMPILER
  2424. # save warnings/boilerplate of simple test code
  2425. _LT_COMPILER_BOILERPLATE
  2426. _LT_LINKER_BOILERPLATE
  2427. # Allow CC to be a program name with arguments.
  2428. lt_save_CC=$CC
  2429. lt_save_LD=$LD
  2430. lt_save_GCC=$GCC
  2431. GCC=$GXX
  2432. lt_save_with_gnu_ld=$with_gnu_ld
  2433. lt_save_path_LD=$lt_cv_path_LD
  2434. if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
  2435. lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
  2436. else
  2437. unset lt_cv_prog_gnu_ld
  2438. fi
  2439. if test -n "${lt_cv_path_LDCXX+set}"; then
  2440. lt_cv_path_LD=$lt_cv_path_LDCXX
  2441. else
  2442. unset lt_cv_path_LD
  2443. fi
  2444. test -z "${LDCXX+set}" || LD=$LDCXX
  2445. CC=${CXX-"c++"}
  2446. compiler=$CC
  2447. _LT_AC_TAGVAR(compiler, $1)=$CC
  2448. _LT_CC_BASENAME([$compiler])
  2449. # We don't want -fno-exception wen compiling C++ code, so set the
  2450. # no_builtin_flag separately
  2451. if test "$GXX" = yes; then
  2452. _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  2453. else
  2454. _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  2455. fi
  2456. if test "$GXX" = yes; then
  2457. # Set up default GNU C++ configuration
  2458. AC_PROG_LD
  2459. # Check if GNU C++ uses GNU ld as the underlying linker, since the
  2460. # archiving commands below assume that GNU ld is being used.
  2461. if test "$with_gnu_ld" = yes; then
  2462. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  2463. _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'
  2464. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
  2465. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  2466. # If archive_cmds runs LD, not CC, wlarc should be empty
  2467. # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
  2468. # investigate it a little bit more. (MM)
  2469. wlarc='${wl}'
  2470. # ancient GNU ld didn't support --whole-archive et. al.
  2471. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
  2472. grep 'no-whole-archive' > /dev/null; then
  2473. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  2474. else
  2475. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  2476. fi
  2477. else
  2478. with_gnu_ld=no
  2479. wlarc=
  2480. # A generic and very simple default shared library creation
  2481. # command for GNU C++ for the case where it uses the native
  2482. # linker, instead of GNU ld. If possible, this setting should
  2483. # overridden to take advantage of the native linker features on
  2484. # the platform it is being used on.
  2485. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  2486. fi
  2487. # Commands to make compiler produce verbose output that lists
  2488. # what "hidden" libraries, object files and flags are used when
  2489. # linking a shared library.
  2490. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
  2491. else
  2492. GXX=no
  2493. with_gnu_ld=no
  2494. wlarc=
  2495. fi
  2496. # PORTME: fill in a description of your system's C++ link characteristics
  2497. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  2498. _LT_AC_TAGVAR(ld_shlibs, $1)=yes
  2499. case $host_os in
  2500. aix3*)
  2501. # FIXME: insert proper C++ library support
  2502. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2503. ;;
  2504. aix4* | aix5*)
  2505. if test "$host_cpu" = ia64; then
  2506. # On IA64, the linker does run time linking by default, so we don't
  2507. # have to do anything special.
  2508. aix_use_runtimelinking=no
  2509. exp_sym_flag='-Bexport'
  2510. no_entry_flag=""
  2511. else
  2512. aix_use_runtimelinking=no
  2513. # Test if we are trying to use run time linking or normal
  2514. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  2515. # need to do runtime linking.
  2516. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
  2517. for ld_flag in $LDFLAGS; do
  2518. case $ld_flag in
  2519. *-brtl*)
  2520. aix_use_runtimelinking=yes
  2521. break
  2522. ;;
  2523. esac
  2524. done
  2525. esac
  2526. exp_sym_flag='-bexport'
  2527. no_entry_flag='-bnoentry'
  2528. fi
  2529. # When large executables or shared objects are built, AIX ld can
  2530. # have problems creating the table of contents. If linking a library
  2531. # or program results in "error TOC overflow" add -mminimal-toc to
  2532. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  2533. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  2534. _LT_AC_TAGVAR(archive_cmds, $1)=''
  2535. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  2536. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
  2537. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  2538. if test "$GXX" = yes; then
  2539. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  2540. # We only want to do this on AIX 4.2 and lower, the check
  2541. # below for broken collect2 doesn't work under 4.3+
  2542. collect2name=`${CC} -print-prog-name=collect2`
  2543. if test -f "$collect2name" && \
  2544. strings "$collect2name" | grep resolve_lib_name >/dev/null
  2545. then
  2546. # We have reworked collect2
  2547. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  2548. else
  2549. # We have old collect2
  2550. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
  2551. # It fails to find uninstalled libraries when the uninstalled
  2552. # path is not listed in the libpath. Setting hardcode_minus_L
  2553. # to unsupported forces relinking
  2554. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  2555. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  2556. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  2557. fi
  2558. esac
  2559. shared_flag='-shared'
  2560. if test "$aix_use_runtimelinking" = yes; then
  2561. shared_flag="$shared_flag "'${wl}-G'
  2562. fi
  2563. else
  2564. # not using gcc
  2565. if test "$host_cpu" = ia64; then
  2566. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  2567. # chokes on -Wl,-G. The following line is correct:
  2568. shared_flag='-G'
  2569. else
  2570. if test "$aix_use_runtimelinking" = yes; then
  2571. shared_flag='${wl}-G'
  2572. else
  2573. shared_flag='${wl}-bM:SRE'
  2574. fi
  2575. fi
  2576. fi
  2577. # It seems that -bexpall does not export symbols beginning with
  2578. # underscore (_), so it is better to generate a list of symbols to export.
  2579. _LT_AC_TAGVAR(always_export_symbols, $1)=yes
  2580. if test "$aix_use_runtimelinking" = yes; then
  2581. # Warning - without using the other runtime loading flags (-brtl),
  2582. # -berok will link without error, but may produce a broken library.
  2583. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
  2584. # Determine the default libpath from the value encoded in an empty executable.
  2585. _LT_AC_SYS_LIBPATH_AIX
  2586. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  2587. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
  2588. else
  2589. if test "$host_cpu" = ia64; then
  2590. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  2591. _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  2592. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
  2593. else
  2594. # Determine the default libpath from the value encoded in an empty executable.
  2595. _LT_AC_SYS_LIBPATH_AIX
  2596. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  2597. # Warning - without using the other run time loading flags,
  2598. # -berok will link without error, but may produce a broken library.
  2599. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  2600. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  2601. # -bexpall does not export symbols beginning with underscore (_)
  2602. _LT_AC_TAGVAR(always_export_symbols, $1)=yes
  2603. # Exported symbols can be pulled into shared objects from archives
  2604. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
  2605. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
  2606. # This is similar to how AIX traditionally builds it's shared libraries.
  2607. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
  2608. fi
  2609. fi
  2610. ;;
  2611. chorus*)
  2612. case $cc_basename in
  2613. *)
  2614. # FIXME: insert proper C++ library support
  2615. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2616. ;;
  2617. esac
  2618. ;;
  2619. cygwin* | mingw* | pw32*)
  2620. # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  2621. # as there is no search path for DLLs.
  2622. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  2623. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  2624. _LT_AC_TAGVAR(always_export_symbols, $1)=no
  2625. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  2626. if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
  2627. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
  2628. # If the export-symbols file already is a .def file (1st line
  2629. # is EXPORTS), use it as is; otherwise, prepend...
  2630. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  2631. cp $export_symbols $output_objdir/$soname.def;
  2632. else
  2633. echo EXPORTS > $output_objdir/$soname.def;
  2634. cat $export_symbols >> $output_objdir/$soname.def;
  2635. fi~
  2636. $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
  2637. else
  2638. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2639. fi
  2640. ;;
  2641. darwin* | rhapsody*)
  2642. case "$host_os" in
  2643. rhapsody* | darwin1.[[012]])
  2644. _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
  2645. ;;
  2646. *) # Darwin 1.3 on
  2647. if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
  2648. _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
  2649. else
  2650. case ${MACOSX_DEPLOYMENT_TARGET} in
  2651. 10.[[012]])
  2652. _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
  2653. ;;
  2654. 10.*)
  2655. _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
  2656. ;;
  2657. esac
  2658. fi
  2659. ;;
  2660. esac
  2661. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  2662. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  2663. _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
  2664. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  2665. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
  2666. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  2667. if test "$GXX" = yes ; then
  2668. lt_int_apple_cc_single_mod=no
  2669. output_verbose_link_cmd='echo'
  2670. if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
  2671. lt_int_apple_cc_single_mod=yes
  2672. fi
  2673. if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
  2674. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
  2675. else
  2676. _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'
  2677. fi
  2678. _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
  2679. # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
  2680. if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
  2681. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  2682. else
  2683. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  2684. fi
  2685. _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}'
  2686. else
  2687. case $cc_basename in
  2688. xlc*)
  2689. output_verbose_link_cmd='echo'
  2690. _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` $verstring'
  2691. _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
  2692. # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
  2693. _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 $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  2694. _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}'
  2695. ;;
  2696. *)
  2697. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2698. ;;
  2699. esac
  2700. fi
  2701. ;;
  2702. dgux*)
  2703. case $cc_basename in
  2704. ec++*)
  2705. # FIXME: insert proper C++ library support
  2706. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2707. ;;
  2708. ghcx*)
  2709. # Green Hills C++ Compiler
  2710. # FIXME: insert proper C++ library support
  2711. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2712. ;;
  2713. *)
  2714. # FIXME: insert proper C++ library support
  2715. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2716. ;;
  2717. esac
  2718. ;;
  2719. freebsd[[12]]*)
  2720. # C++ shared libraries reported to be fairly broken before switch to ELF
  2721. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2722. ;;
  2723. freebsd-elf*)
  2724. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  2725. ;;
  2726. freebsd* | kfreebsd*-gnu | dragonfly*)
  2727. # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
  2728. # conventions
  2729. _LT_AC_TAGVAR(ld_shlibs, $1)=yes
  2730. ;;
  2731. gnu*)
  2732. ;;
  2733. hpux9*)
  2734. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  2735. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  2736. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  2737. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  2738. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  2739. # but as the default
  2740. # location of the library.
  2741. case $cc_basename in
  2742. CC*)
  2743. # FIXME: insert proper C++ library support
  2744. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2745. ;;
  2746. aCC*)
  2747. _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'
  2748. # Commands to make compiler produce verbose output that lists
  2749. # what "hidden" libraries, object files and flags are used when
  2750. # linking a shared library.
  2751. #
  2752. # There doesn't appear to be a way to prevent this compiler from
  2753. # explicitly linking system object files so we need to strip them
  2754. # from the output so that they don't get included in the library
  2755. # dependencies.
  2756. 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'
  2757. ;;
  2758. *)
  2759. if test "$GXX" = yes; then
  2760. _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'
  2761. else
  2762. # FIXME: insert proper C++ library support
  2763. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2764. fi
  2765. ;;
  2766. esac
  2767. ;;
  2768. hpux10*|hpux11*)
  2769. if test $with_gnu_ld = no; then
  2770. case "$host_cpu" in
  2771. hppa*64*)
  2772. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  2773. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
  2774. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  2775. ;;
  2776. ia64*)
  2777. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  2778. ;;
  2779. *)
  2780. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  2781. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  2782. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  2783. ;;
  2784. esac
  2785. fi
  2786. case "$host_cpu" in
  2787. hppa*64*)
  2788. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  2789. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  2790. ;;
  2791. ia64*)
  2792. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  2793. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  2794. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  2795. # but as the default
  2796. # location of the library.
  2797. ;;
  2798. *)
  2799. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  2800. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  2801. # but as the default
  2802. # location of the library.
  2803. ;;
  2804. esac
  2805. case $cc_basename in
  2806. CC*)
  2807. # FIXME: insert proper C++ library support
  2808. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2809. ;;
  2810. aCC*)
  2811. case "$host_cpu" in
  2812. hppa*64*|ia64*)
  2813. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
  2814. ;;
  2815. *)
  2816. _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'
  2817. ;;
  2818. esac
  2819. # Commands to make compiler produce verbose output that lists
  2820. # what "hidden" libraries, object files and flags are used when
  2821. # linking a shared library.
  2822. #
  2823. # There doesn't appear to be a way to prevent this compiler from
  2824. # explicitly linking system object files so we need to strip them
  2825. # from the output so that they don't get included in the library
  2826. # dependencies.
  2827. 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'
  2828. ;;
  2829. *)
  2830. if test "$GXX" = yes; then
  2831. if test $with_gnu_ld = no; then
  2832. case "$host_cpu" in
  2833. ia64*|hppa*64*)
  2834. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
  2835. ;;
  2836. *)
  2837. _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'
  2838. ;;
  2839. esac
  2840. fi
  2841. else
  2842. # FIXME: insert proper C++ library support
  2843. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2844. fi
  2845. ;;
  2846. esac
  2847. ;;
  2848. irix5* | irix6*)
  2849. case $cc_basename in
  2850. CC*)
  2851. # SGI C++
  2852. _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'
  2853. # Archives containing C++ object files must be created using
  2854. # "CC -ar", where "CC" is the IRIX C++ compiler. This is
  2855. # necessary to make sure instantiated templates are included
  2856. # in the archive.
  2857. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
  2858. ;;
  2859. *)
  2860. if test "$GXX" = yes; then
  2861. if test "$with_gnu_ld" = no; then
  2862. _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'
  2863. else
  2864. _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'
  2865. fi
  2866. fi
  2867. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  2868. ;;
  2869. esac
  2870. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  2871. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  2872. ;;
  2873. linux*)
  2874. case $cc_basename in
  2875. KCC*)
  2876. # Kuck and Associates, Inc. (KAI) C++ Compiler
  2877. # KCC will only create a shared library if the output file
  2878. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  2879. # to its proper name (with version) after linking.
  2880. _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'
  2881. _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'
  2882. # Commands to make compiler produce verbose output that lists
  2883. # what "hidden" libraries, object files and flags are used when
  2884. # linking a shared library.
  2885. #
  2886. # There doesn't appear to be a way to prevent this compiler from
  2887. # explicitly linking system object files so we need to strip them
  2888. # from the output so that they don't get included in the library
  2889. # dependencies.
  2890. 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'
  2891. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
  2892. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  2893. # Archives containing C++ object files must be created using
  2894. # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  2895. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  2896. ;;
  2897. icpc*)
  2898. # Intel C++
  2899. with_gnu_ld=yes
  2900. # version 8.0 and above of icpc choke on multiply defined symbols
  2901. # if we add $predep_objects and $postdep_objects, however 7.1 and
  2902. # earlier do not add the objects themselves.
  2903. case `$CC -V 2>&1` in
  2904. *"Version 7."*)
  2905. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  2906. _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'
  2907. ;;
  2908. *) # Version 8.0 or newer
  2909. tmp_idyn=
  2910. case $host_cpu in
  2911. ia64*) tmp_idyn=' -i_dynamic';;
  2912. esac
  2913. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  2914. _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'
  2915. ;;
  2916. esac
  2917. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  2918. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  2919. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  2920. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  2921. ;;
  2922. pgCC*)
  2923. # Portland Group C++ compiler
  2924. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
  2925. _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'
  2926. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
  2927. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  2928. _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'
  2929. ;;
  2930. cxx*)
  2931. # Compaq C++
  2932. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  2933. _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'
  2934. runpath_var=LD_RUN_PATH
  2935. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  2936. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  2937. # Commands to make compiler produce verbose output that lists
  2938. # what "hidden" libraries, object files and flags are used when
  2939. # linking a shared library.
  2940. #
  2941. # There doesn't appear to be a way to prevent this compiler from
  2942. # explicitly linking system object files so we need to strip them
  2943. # from the output so that they don't get included in the library
  2944. # dependencies.
  2945. 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'
  2946. ;;
  2947. esac
  2948. ;;
  2949. lynxos*)
  2950. # FIXME: insert proper C++ library support
  2951. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2952. ;;
  2953. m88k*)
  2954. # FIXME: insert proper C++ library support
  2955. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2956. ;;
  2957. mvs*)
  2958. case $cc_basename in
  2959. cxx*)
  2960. # FIXME: insert proper C++ library support
  2961. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2962. ;;
  2963. *)
  2964. # FIXME: insert proper C++ library support
  2965. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2966. ;;
  2967. esac
  2968. ;;
  2969. netbsd*)
  2970. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  2971. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
  2972. wlarc=
  2973. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  2974. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  2975. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  2976. fi
  2977. # Workaround some broken pre-1.5 toolchains
  2978. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
  2979. ;;
  2980. openbsd2*)
  2981. # C++ shared libraries are fairly broken
  2982. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2983. ;;
  2984. openbsd*)
  2985. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  2986. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  2987. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  2988. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  2989. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  2990. _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'
  2991. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  2992. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  2993. fi
  2994. output_verbose_link_cmd='echo'
  2995. ;;
  2996. osf3*)
  2997. case $cc_basename in
  2998. KCC*)
  2999. # Kuck and Associates, Inc. (KAI) C++ Compiler
  3000. # KCC will only create a shared library if the output file
  3001. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  3002. # to its proper name (with version) after linking.
  3003. _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'
  3004. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  3005. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3006. # Archives containing C++ object files must be created using
  3007. # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  3008. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  3009. ;;
  3010. RCC*)
  3011. # Rational C++ 2.4.1
  3012. # FIXME: insert proper C++ library support
  3013. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3014. ;;
  3015. cxx*)
  3016. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  3017. _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'
  3018. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  3019. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3020. # Commands to make compiler produce verbose output that lists
  3021. # what "hidden" libraries, object files and flags are used when
  3022. # linking a shared library.
  3023. #
  3024. # There doesn't appear to be a way to prevent this compiler from
  3025. # explicitly linking system object files so we need to strip them
  3026. # from the output so that they don't get included in the library
  3027. # dependencies.
  3028. 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'
  3029. ;;
  3030. *)
  3031. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  3032. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  3033. _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'
  3034. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  3035. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3036. # Commands to make compiler produce verbose output that lists
  3037. # what "hidden" libraries, object files and flags are used when
  3038. # linking a shared library.
  3039. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
  3040. else
  3041. # FIXME: insert proper C++ library support
  3042. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3043. fi
  3044. ;;
  3045. esac
  3046. ;;
  3047. osf4* | osf5*)
  3048. case $cc_basename in
  3049. KCC*)
  3050. # Kuck and Associates, Inc. (KAI) C++ Compiler
  3051. # KCC will only create a shared library if the output file
  3052. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  3053. # to its proper name (with version) after linking.
  3054. _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'
  3055. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  3056. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3057. # Archives containing C++ object files must be created using
  3058. # the KAI C++ compiler.
  3059. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
  3060. ;;
  3061. RCC*)
  3062. # Rational C++ 2.4.1
  3063. # FIXME: insert proper C++ library support
  3064. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3065. ;;
  3066. cxx*)
  3067. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  3068. _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'
  3069. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
  3070. echo "-hidden">> $lib.exp~
  3071. $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~
  3072. $rm $lib.exp'
  3073. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  3074. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3075. # Commands to make compiler produce verbose output that lists
  3076. # what "hidden" libraries, object files and flags are used when
  3077. # linking a shared library.
  3078. #
  3079. # There doesn't appear to be a way to prevent this compiler from
  3080. # explicitly linking system object files so we need to strip them
  3081. # from the output so that they don't get included in the library
  3082. # dependencies.
  3083. 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'
  3084. ;;
  3085. *)
  3086. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  3087. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  3088. _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'
  3089. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  3090. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3091. # Commands to make compiler produce verbose output that lists
  3092. # what "hidden" libraries, object files and flags are used when
  3093. # linking a shared library.
  3094. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
  3095. else
  3096. # FIXME: insert proper C++ library support
  3097. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3098. fi
  3099. ;;
  3100. esac
  3101. ;;
  3102. psos*)
  3103. # FIXME: insert proper C++ library support
  3104. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3105. ;;
  3106. sco*)
  3107. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  3108. case $cc_basename in
  3109. CC*)
  3110. # FIXME: insert proper C++ library support
  3111. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3112. ;;
  3113. *)
  3114. # FIXME: insert proper C++ library support
  3115. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3116. ;;
  3117. esac
  3118. ;;
  3119. sunos4*)
  3120. case $cc_basename in
  3121. CC*)
  3122. # Sun C++ 4.x
  3123. # FIXME: insert proper C++ library support
  3124. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3125. ;;
  3126. lcc*)
  3127. # Lucid
  3128. # FIXME: insert proper C++ library support
  3129. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3130. ;;
  3131. *)
  3132. # FIXME: insert proper C++ library support
  3133. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3134. ;;
  3135. esac
  3136. ;;
  3137. solaris*)
  3138. case $cc_basename in
  3139. CC*)
  3140. # Sun C++ 4.2, 5.x and Centerline C++
  3141. _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  3142. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  3143. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  3144. $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
  3145. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  3146. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  3147. case $host_os in
  3148. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  3149. *)
  3150. # The C++ compiler is used as linker so we must use $wl
  3151. # flag to pass the commands to the underlying system
  3152. # linker. We must also pass each convience library through
  3153. # to the system linker between allextract/defaultextract.
  3154. # The C++ compiler will combine linker options so we
  3155. # cannot just pass the convience library names through
  3156. # without $wl.
  3157. # Supported since Solaris 2.6 (maybe 2.5.1?)
  3158. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
  3159. ;;
  3160. esac
  3161. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  3162. # Commands to make compiler produce verbose output that lists
  3163. # what "hidden" libraries, object files and flags are used when
  3164. # linking a shared library.
  3165. #
  3166. # There doesn't appear to be a way to prevent this compiler from
  3167. # explicitly linking system object files so we need to strip them
  3168. # from the output so that they don't get included in the library
  3169. # dependencies.
  3170. output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
  3171. # Archives containing C++ object files must be created using
  3172. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  3173. # necessary to make sure instantiated templates are included
  3174. # in the archive.
  3175. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  3176. ;;
  3177. gcx*)
  3178. # Green Hills C++ Compiler
  3179. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  3180. # The C++ compiler must be used to create the archive.
  3181. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
  3182. ;;
  3183. *)
  3184. # GNU C++ compiler with Solaris linker
  3185. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  3186. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
  3187. if $CC --version | grep -v '^2\.7' > /dev/null; then
  3188. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  3189. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  3190. $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
  3191. # Commands to make compiler produce verbose output that lists
  3192. # what "hidden" libraries, object files and flags are used when
  3193. # linking a shared library.
  3194. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
  3195. else
  3196. # g++ 2.7 appears to require `-G' NOT `-shared' on this
  3197. # platform.
  3198. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  3199. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  3200. $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
  3201. # Commands to make compiler produce verbose output that lists
  3202. # what "hidden" libraries, object files and flags are used when
  3203. # linking a shared library.
  3204. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
  3205. fi
  3206. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
  3207. fi
  3208. ;;
  3209. esac
  3210. ;;
  3211. sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
  3212. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  3213. ;;
  3214. tandem*)
  3215. case $cc_basename in
  3216. NCC*)
  3217. # NonStop-UX NCC 3.20
  3218. # FIXME: insert proper C++ library support
  3219. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3220. ;;
  3221. *)
  3222. # FIXME: insert proper C++ library support
  3223. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3224. ;;
  3225. esac
  3226. ;;
  3227. vxworks*)
  3228. # FIXME: insert proper C++ library support
  3229. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3230. ;;
  3231. *)
  3232. # FIXME: insert proper C++ library support
  3233. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3234. ;;
  3235. esac
  3236. AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
  3237. test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  3238. _LT_AC_TAGVAR(GCC, $1)="$GXX"
  3239. _LT_AC_TAGVAR(LD, $1)="$LD"
  3240. AC_LIBTOOL_POSTDEP_PREDEP($1)
  3241. AC_LIBTOOL_PROG_COMPILER_PIC($1)
  3242. AC_LIBTOOL_PROG_CC_C_O($1)
  3243. AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
  3244. AC_LIBTOOL_PROG_LD_SHLIBS($1)
  3245. AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  3246. AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  3247. AC_LIBTOOL_SYS_LIB_STRIP
  3248. AC_LIBTOOL_DLOPEN_SELF($1)
  3249. AC_LIBTOOL_CONFIG($1)
  3250. AC_LANG_POP
  3251. CC=$lt_save_CC
  3252. LDCXX=$LD
  3253. LD=$lt_save_LD
  3254. GCC=$lt_save_GCC
  3255. with_gnu_ldcxx=$with_gnu_ld
  3256. with_gnu_ld=$lt_save_with_gnu_ld
  3257. lt_cv_path_LDCXX=$lt_cv_path_LD
  3258. lt_cv_path_LD=$lt_save_path_LD
  3259. lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
  3260. lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
  3261. ])# AC_LIBTOOL_LANG_CXX_CONFIG
  3262. # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
  3263. # ------------------------
  3264. # Figure out "hidden" library dependencies from verbose
  3265. # compiler output when linking a shared library.
  3266. # Parse the compiler output and extract the necessary
  3267. # objects, libraries and library flags.
  3268. AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
  3269. dnl we can't use the lt_simple_compile_test_code here,
  3270. dnl because it contains code intended for an executable,
  3271. dnl not a library. It's possible we should let each
  3272. dnl tag define a new lt_????_link_test_code variable,
  3273. dnl but it's only used here...
  3274. ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
  3275. int a;
  3276. void foo (void) { a = 0; }
  3277. EOF
  3278. ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
  3279. class Foo
  3280. {
  3281. public:
  3282. Foo (void) { a = 0; }
  3283. private:
  3284. int a;
  3285. };
  3286. EOF
  3287. ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
  3288. subroutine foo
  3289. implicit none
  3290. integer*4 a
  3291. a=0
  3292. return
  3293. end
  3294. EOF
  3295. ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
  3296. public class foo {
  3297. private int a;
  3298. public void bar (void) {
  3299. a = 0;
  3300. }
  3301. };
  3302. EOF
  3303. ])
  3304. dnl Parse the compiler output and extract the necessary
  3305. dnl objects, libraries and library flags.
  3306. if AC_TRY_EVAL(ac_compile); then
  3307. # Parse the compiler output and extract the necessary
  3308. # objects, libraries and library flags.
  3309. # Sentinel used to keep track of whether or not we are before
  3310. # the conftest object file.
  3311. pre_test_object_deps_done=no
  3312. # The `*' in the case matches for architectures that use `case' in
  3313. # $output_verbose_cmd can trigger glob expansion during the loop
  3314. # eval without this substitution.
  3315. output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
  3316. for p in `eval $output_verbose_link_cmd`; do
  3317. case $p in
  3318. -L* | -R* | -l*)
  3319. # Some compilers place space between "-{L,R}" and the path.
  3320. # Remove the space.
  3321. if test $p = "-L" \
  3322. || test $p = "-R"; then
  3323. prev=$p
  3324. continue
  3325. else
  3326. prev=
  3327. fi
  3328. if test "$pre_test_object_deps_done" = no; then
  3329. case $p in
  3330. -L* | -R*)
  3331. # Internal compiler library paths should come after those
  3332. # provided the user. The postdeps already come after the
  3333. # user supplied libs so there is no need to process them.
  3334. if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
  3335. _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
  3336. else
  3337. _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
  3338. fi
  3339. ;;
  3340. # The "-l" case would never come before the object being
  3341. # linked, so don't bother handling this case.
  3342. esac
  3343. else
  3344. if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
  3345. _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
  3346. else
  3347. _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
  3348. fi
  3349. fi
  3350. ;;
  3351. *.$objext)
  3352. # This assumes that the test object file only shows up
  3353. # once in the compiler output.
  3354. if test "$p" = "conftest.$objext"; then
  3355. pre_test_object_deps_done=yes
  3356. continue
  3357. fi
  3358. if test "$pre_test_object_deps_done" = no; then
  3359. if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
  3360. _LT_AC_TAGVAR(predep_objects, $1)="$p"
  3361. else
  3362. _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
  3363. fi
  3364. else
  3365. if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
  3366. _LT_AC_TAGVAR(postdep_objects, $1)="$p"
  3367. else
  3368. _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
  3369. fi
  3370. fi
  3371. ;;
  3372. *) ;; # Ignore the rest.
  3373. esac
  3374. done
  3375. # Clean up.
  3376. rm -f a.out a.exe
  3377. else
  3378. echo "libtool.m4: error: problem compiling $1 test program"
  3379. fi
  3380. $rm -f confest.$objext
  3381. case " $_LT_AC_TAGVAR(postdeps, $1) " in
  3382. *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
  3383. esac
  3384. ])# AC_LIBTOOL_POSTDEP_PREDEP
  3385. # AC_LIBTOOL_LANG_F77_CONFIG
  3386. # ------------------------
  3387. # Ensure that the configuration vars for the C compiler are
  3388. # suitably defined. Those variables are subsequently used by
  3389. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  3390. AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
  3391. AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
  3392. [AC_REQUIRE([AC_PROG_F77])
  3393. AC_LANG_PUSH(Fortran 77)
  3394. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  3395. _LT_AC_TAGVAR(allow_undefined_flag, $1)=
  3396. _LT_AC_TAGVAR(always_export_symbols, $1)=no
  3397. _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
  3398. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
  3399. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  3400. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
  3401. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  3402. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  3403. _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
  3404. _LT_AC_TAGVAR(hardcode_automatic, $1)=no
  3405. _LT_AC_TAGVAR(module_cmds, $1)=
  3406. _LT_AC_TAGVAR(module_expsym_cmds, $1)=
  3407. _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
  3408. _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  3409. _LT_AC_TAGVAR(no_undefined_flag, $1)=
  3410. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  3411. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  3412. # Source file extension for f77 test sources.
  3413. ac_ext=f
  3414. # Object file extension for compiled f77 test sources.
  3415. objext=o
  3416. _LT_AC_TAGVAR(objext, $1)=$objext
  3417. # Code to be used in simple compile tests
  3418. lt_simple_compile_test_code=" subroutine t\n return\n end\n"
  3419. # Code to be used in simple link tests
  3420. lt_simple_link_test_code=" program t\n end\n"
  3421. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  3422. _LT_AC_SYS_COMPILER
  3423. # save warnings/boilerplate of simple test code
  3424. _LT_COMPILER_BOILERPLATE
  3425. _LT_LINKER_BOILERPLATE
  3426. # Allow CC to be a program name with arguments.
  3427. lt_save_CC="$CC"
  3428. CC=${F77-"f77"}
  3429. compiler=$CC
  3430. _LT_AC_TAGVAR(compiler, $1)=$CC
  3431. _LT_CC_BASENAME([$compiler])
  3432. AC_MSG_CHECKING([if libtool supports shared libraries])
  3433. AC_MSG_RESULT([$can_build_shared])
  3434. AC_MSG_CHECKING([whether to build shared libraries])
  3435. test "$can_build_shared" = "no" && enable_shared=no
  3436. # On AIX, shared libraries and static libraries use the same namespace, and
  3437. # are all built from PIC.
  3438. case "$host_os" in
  3439. aix3*)
  3440. test "$enable_shared" = yes && enable_static=no
  3441. if test -n "$RANLIB"; then
  3442. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  3443. postinstall_cmds='$RANLIB $lib'
  3444. fi
  3445. ;;
  3446. aix4* | aix5*)
  3447. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  3448. test "$enable_shared" = yes && enable_static=no
  3449. fi
  3450. ;;
  3451. esac
  3452. AC_MSG_RESULT([$enable_shared])
  3453. AC_MSG_CHECKING([whether to build static libraries])
  3454. # Make sure either enable_shared or enable_static is yes.
  3455. test "$enable_shared" = yes || enable_static=yes
  3456. AC_MSG_RESULT([$enable_static])
  3457. test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  3458. _LT_AC_TAGVAR(GCC, $1)="$G77"
  3459. _LT_AC_TAGVAR(LD, $1)="$LD"
  3460. AC_LIBTOOL_PROG_COMPILER_PIC($1)
  3461. AC_LIBTOOL_PROG_CC_C_O($1)
  3462. AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
  3463. AC_LIBTOOL_PROG_LD_SHLIBS($1)
  3464. AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  3465. AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  3466. AC_LIBTOOL_SYS_LIB_STRIP
  3467. AC_LIBTOOL_CONFIG($1)
  3468. AC_LANG_POP
  3469. CC="$lt_save_CC"
  3470. ])# AC_LIBTOOL_LANG_F77_CONFIG
  3471. # AC_LIBTOOL_LANG_GCJ_CONFIG
  3472. # --------------------------
  3473. # Ensure that the configuration vars for the C compiler are
  3474. # suitably defined. Those variables are subsequently used by
  3475. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  3476. AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
  3477. AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
  3478. [AC_LANG_SAVE
  3479. # Source file extension for Java test sources.
  3480. ac_ext=java
  3481. # Object file extension for compiled Java test sources.
  3482. objext=o
  3483. _LT_AC_TAGVAR(objext, $1)=$objext
  3484. # Code to be used in simple compile tests
  3485. lt_simple_compile_test_code="class foo {}\n"
  3486. # Code to be used in simple link tests
  3487. lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
  3488. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  3489. _LT_AC_SYS_COMPILER
  3490. # save warnings/boilerplate of simple test code
  3491. _LT_COMPILER_BOILERPLATE
  3492. _LT_LINKER_BOILERPLATE
  3493. # Allow CC to be a program name with arguments.
  3494. lt_save_CC="$CC"
  3495. CC=${GCJ-"gcj"}
  3496. compiler=$CC
  3497. _LT_AC_TAGVAR(compiler, $1)=$CC
  3498. _LT_CC_BASENAME([$compiler])
  3499. # GCJ did not exist at the time GCC didn't implicitly link libc in.
  3500. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  3501. _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  3502. AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
  3503. AC_LIBTOOL_PROG_COMPILER_PIC($1)
  3504. AC_LIBTOOL_PROG_CC_C_O($1)
  3505. AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
  3506. AC_LIBTOOL_PROG_LD_SHLIBS($1)
  3507. AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  3508. AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  3509. AC_LIBTOOL_SYS_LIB_STRIP
  3510. AC_LIBTOOL_DLOPEN_SELF($1)
  3511. AC_LIBTOOL_CONFIG($1)
  3512. AC_LANG_RESTORE
  3513. CC="$lt_save_CC"
  3514. ])# AC_LIBTOOL_LANG_GCJ_CONFIG
  3515. # AC_LIBTOOL_LANG_RC_CONFIG
  3516. # --------------------------
  3517. # Ensure that the configuration vars for the Windows resource compiler are
  3518. # suitably defined. Those variables are subsequently used by
  3519. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  3520. AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
  3521. AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
  3522. [AC_LANG_SAVE
  3523. # Source file extension for RC test sources.
  3524. ac_ext=rc
  3525. # Object file extension for compiled RC test sources.
  3526. objext=o
  3527. _LT_AC_TAGVAR(objext, $1)=$objext
  3528. # Code to be used in simple compile tests
  3529. lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
  3530. # Code to be used in simple link tests
  3531. lt_simple_link_test_code="$lt_simple_compile_test_code"
  3532. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  3533. _LT_AC_SYS_COMPILER
  3534. # save warnings/boilerplate of simple test code
  3535. _LT_COMPILER_BOILERPLATE
  3536. _LT_LINKER_BOILERPLATE
  3537. # Allow CC to be a program name with arguments.
  3538. lt_save_CC="$CC"
  3539. CC=${RC-"windres"}
  3540. compiler=$CC
  3541. _LT_AC_TAGVAR(compiler, $1)=$CC
  3542. _LT_CC_BASENAME([$compiler])
  3543. _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  3544. AC_LIBTOOL_CONFIG($1)
  3545. AC_LANG_RESTORE
  3546. CC="$lt_save_CC"
  3547. ])# AC_LIBTOOL_LANG_RC_CONFIG
  3548. # AC_LIBTOOL_CONFIG([TAGNAME])
  3549. # ----------------------------
  3550. # If TAGNAME is not passed, then create an initial libtool script
  3551. # with a default configuration from the untagged config vars. Otherwise
  3552. # add code to config.status for appending the configuration named by
  3553. # TAGNAME from the matching tagged config vars.
  3554. AC_DEFUN([AC_LIBTOOL_CONFIG],
  3555. [# The else clause should only fire when bootstrapping the
  3556. # libtool distribution, otherwise you forgot to ship ltmain.sh
  3557. # with your package, and you will get complaints that there are
  3558. # no rules to generate ltmain.sh.
  3559. if test -f "$ltmain"; then
  3560. # See if we are running on zsh, and set the options which allow our commands through
  3561. # without removal of \ escapes.
  3562. if test -n "${ZSH_VERSION+set}" ; then
  3563. setopt NO_GLOB_SUBST
  3564. fi
  3565. # Now quote all the things that may contain metacharacters while being
  3566. # careful not to overquote the AC_SUBSTed values. We take copies of the
  3567. # variables and quote the copies for generation of the libtool script.
  3568. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
  3569. SED SHELL STRIP \
  3570. libname_spec library_names_spec soname_spec extract_expsyms_cmds \
  3571. old_striplib striplib file_magic_cmd finish_cmds finish_eval \
  3572. deplibs_check_method reload_flag reload_cmds need_locks \
  3573. lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
  3574. lt_cv_sys_global_symbol_to_c_name_address \
  3575. sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
  3576. old_postinstall_cmds old_postuninstall_cmds \
  3577. _LT_AC_TAGVAR(compiler, $1) \
  3578. _LT_AC_TAGVAR(CC, $1) \
  3579. _LT_AC_TAGVAR(LD, $1) \
  3580. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
  3581. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
  3582. _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
  3583. _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
  3584. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
  3585. _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
  3586. _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
  3587. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
  3588. _LT_AC_TAGVAR(old_archive_cmds, $1) \
  3589. _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
  3590. _LT_AC_TAGVAR(predep_objects, $1) \
  3591. _LT_AC_TAGVAR(postdep_objects, $1) \
  3592. _LT_AC_TAGVAR(predeps, $1) \
  3593. _LT_AC_TAGVAR(postdeps, $1) \
  3594. _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
  3595. _LT_AC_TAGVAR(archive_cmds, $1) \
  3596. _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
  3597. _LT_AC_TAGVAR(postinstall_cmds, $1) \
  3598. _LT_AC_TAGVAR(postuninstall_cmds, $1) \
  3599. _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
  3600. _LT_AC_TAGVAR(allow_undefined_flag, $1) \
  3601. _LT_AC_TAGVAR(no_undefined_flag, $1) \
  3602. _LT_AC_TAGVAR(export_symbols_cmds, $1) \
  3603. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
  3604. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
  3605. _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
  3606. _LT_AC_TAGVAR(hardcode_automatic, $1) \
  3607. _LT_AC_TAGVAR(module_cmds, $1) \
  3608. _LT_AC_TAGVAR(module_expsym_cmds, $1) \
  3609. _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
  3610. _LT_AC_TAGVAR(exclude_expsyms, $1) \
  3611. _LT_AC_TAGVAR(include_expsyms, $1); do
  3612. case $var in
  3613. _LT_AC_TAGVAR(old_archive_cmds, $1) | \
  3614. _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
  3615. _LT_AC_TAGVAR(archive_cmds, $1) | \
  3616. _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
  3617. _LT_AC_TAGVAR(module_cmds, $1) | \
  3618. _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
  3619. _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
  3620. _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
  3621. extract_expsyms_cmds | reload_cmds | finish_cmds | \
  3622. postinstall_cmds | postuninstall_cmds | \
  3623. old_postinstall_cmds | old_postuninstall_cmds | \
  3624. sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
  3625. # Double-quote double-evaled strings.
  3626. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
  3627. ;;
  3628. *)
  3629. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
  3630. ;;
  3631. esac
  3632. done
  3633. case $lt_echo in
  3634. *'\[$]0 --fallback-echo"')
  3635. lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
  3636. ;;
  3637. esac
  3638. ifelse([$1], [],
  3639. [cfgfile="${ofile}T"
  3640. trap "$rm \"$cfgfile\"; exit 1" 1 2 15
  3641. $rm -f "$cfgfile"
  3642. AC_MSG_NOTICE([creating $ofile])],
  3643. [cfgfile="$ofile"])
  3644. cat <<__EOF__ >> "$cfgfile"
  3645. ifelse([$1], [],
  3646. [#! $SHELL
  3647. # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
  3648. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
  3649. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  3650. #
  3651. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
  3652. # Free Software Foundation, Inc.
  3653. #
  3654. # This file is part of GNU Libtool:
  3655. # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  3656. #
  3657. # This program is free software; you can redistribute it and/or modify
  3658. # it under the terms of the GNU General Public License as published by
  3659. # the Free Software Foundation; either version 2 of the License, or
  3660. # (at your option) any later version.
  3661. #
  3662. # This program is distributed in the hope that it will be useful, but
  3663. # WITHOUT ANY WARRANTY; without even the implied warranty of
  3664. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  3665. # General Public License for more details.
  3666. #
  3667. # You should have received a copy of the GNU General Public License
  3668. # along with this program; if not, write to the Free Software
  3669. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  3670. #
  3671. # As a special exception to the GNU General Public License, if you
  3672. # distribute this file as part of a program that contains a
  3673. # configuration script generated by Autoconf, you may include it under
  3674. # the same distribution terms that you use for the rest of that program.
  3675. # A sed program that does not truncate output.
  3676. SED=$lt_SED
  3677. # Sed that helps us avoid accidentally triggering echo(1) options like -n.
  3678. Xsed="$SED -e 1s/^X//"
  3679. # The HP-UX ksh and POSIX shell print the target directory to stdout
  3680. # if CDPATH is set.
  3681. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  3682. # The names of the tagged configurations supported by this script.
  3683. available_tags=
  3684. # ### BEGIN LIBTOOL CONFIG],
  3685. [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
  3686. # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  3687. # Shell to use when invoking shell scripts.
  3688. SHELL=$lt_SHELL
  3689. # Whether or not to build shared libraries.
  3690. build_libtool_libs=$enable_shared
  3691. # Whether or not to build static libraries.
  3692. build_old_libs=$enable_static
  3693. # Whether or not to add -lc for building shared libraries.
  3694. build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
  3695. # Whether or not to disallow shared libs when runtime libs are static
  3696. allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
  3697. # Whether or not to optimize for fast installation.
  3698. fast_install=$enable_fast_install
  3699. # The host system.
  3700. host_alias=$host_alias
  3701. host=$host
  3702. host_os=$host_os
  3703. # The build system.
  3704. build_alias=$build_alias
  3705. build=$build
  3706. build_os=$build_os
  3707. # An echo program that does not interpret backslashes.
  3708. echo=$lt_echo
  3709. # The archiver.
  3710. AR=$lt_AR
  3711. AR_FLAGS=$lt_AR_FLAGS
  3712. # A C compiler.
  3713. LTCC=$lt_LTCC
  3714. # A language-specific compiler.
  3715. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
  3716. # Is the compiler the GNU C compiler?
  3717. with_gcc=$_LT_AC_TAGVAR(GCC, $1)
  3718. # An ERE matcher.
  3719. EGREP=$lt_EGREP
  3720. # The linker used to build libraries.
  3721. LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
  3722. # Whether we need hard or soft links.
  3723. LN_S=$lt_LN_S
  3724. # A BSD-compatible nm program.
  3725. NM=$lt_NM
  3726. # A symbol stripping program
  3727. STRIP=$lt_STRIP
  3728. # Used to examine libraries when file_magic_cmd begins "file"
  3729. MAGIC_CMD=$MAGIC_CMD
  3730. # Used on cygwin: DLL creation program.
  3731. DLLTOOL="$DLLTOOL"
  3732. # Used on cygwin: object dumper.
  3733. OBJDUMP="$OBJDUMP"
  3734. # Used on cygwin: assembler.
  3735. AS="$AS"
  3736. # The name of the directory that contains temporary libtool files.
  3737. objdir=$objdir
  3738. # How to create reloadable object files.
  3739. reload_flag=$lt_reload_flag
  3740. reload_cmds=$lt_reload_cmds
  3741. # How to pass a linker flag through the compiler.
  3742. wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
  3743. # Object file suffix (normally "o").
  3744. objext="$ac_objext"
  3745. # Old archive suffix (normally "a").
  3746. libext="$libext"
  3747. # Shared library suffix (normally ".so").
  3748. shrext_cmds='$shrext_cmds'
  3749. # Executable file suffix (normally "").
  3750. exeext="$exeext"
  3751. # Additional compiler flags for building library objects.
  3752. pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
  3753. pic_mode=$pic_mode
  3754. # What is the maximum length of a command?
  3755. max_cmd_len=$lt_cv_sys_max_cmd_len
  3756. # Does compiler simultaneously support -c and -o options?
  3757. compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
  3758. # Must we lock files when doing compilation?
  3759. need_locks=$lt_need_locks
  3760. # Do we need the lib prefix for modules?
  3761. need_lib_prefix=$need_lib_prefix
  3762. # Do we need a version for libraries?
  3763. need_version=$need_version
  3764. # Whether dlopen is supported.
  3765. dlopen_support=$enable_dlopen
  3766. # Whether dlopen of programs is supported.
  3767. dlopen_self=$enable_dlopen_self
  3768. # Whether dlopen of statically linked programs is supported.
  3769. dlopen_self_static=$enable_dlopen_self_static
  3770. # Compiler flag to prevent dynamic linking.
  3771. link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
  3772. # Compiler flag to turn off builtin functions.
  3773. no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
  3774. # Compiler flag to allow reflexive dlopens.
  3775. export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
  3776. # Compiler flag to generate shared objects directly from archives.
  3777. whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
  3778. # Compiler flag to generate thread-safe objects.
  3779. thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
  3780. # Library versioning type.
  3781. version_type=$version_type
  3782. # Format of library name prefix.
  3783. libname_spec=$lt_libname_spec
  3784. # List of archive names. First name is the real one, the rest are links.
  3785. # The last name is the one that the linker finds with -lNAME.
  3786. library_names_spec=$lt_library_names_spec
  3787. # The coded name of the library, if different from the real name.
  3788. soname_spec=$lt_soname_spec
  3789. # Commands used to build and install an old-style archive.
  3790. RANLIB=$lt_RANLIB
  3791. old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
  3792. old_postinstall_cmds=$lt_old_postinstall_cmds
  3793. old_postuninstall_cmds=$lt_old_postuninstall_cmds
  3794. # Create an old-style archive from a shared archive.
  3795. old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
  3796. # Create a temporary old-style archive to link instead of a shared archive.
  3797. old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
  3798. # Commands used to build and install a shared archive.
  3799. archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
  3800. archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
  3801. postinstall_cmds=$lt_postinstall_cmds
  3802. postuninstall_cmds=$lt_postuninstall_cmds
  3803. # Commands used to build a loadable module (assumed same as above if empty)
  3804. module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
  3805. module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
  3806. # Commands to strip libraries.
  3807. old_striplib=$lt_old_striplib
  3808. striplib=$lt_striplib
  3809. # Dependencies to place before the objects being linked to create a
  3810. # shared library.
  3811. predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
  3812. # Dependencies to place after the objects being linked to create a
  3813. # shared library.
  3814. postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
  3815. # Dependencies to place before the objects being linked to create a
  3816. # shared library.
  3817. predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
  3818. # Dependencies to place after the objects being linked to create a
  3819. # shared library.
  3820. postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
  3821. # The library search path used internally by the compiler when linking
  3822. # a shared library.
  3823. compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
  3824. # Method to check whether dependent libraries are shared objects.
  3825. deplibs_check_method=$lt_deplibs_check_method
  3826. # Command to use when deplibs_check_method == file_magic.
  3827. file_magic_cmd=$lt_file_magic_cmd
  3828. # Flag that allows shared libraries with undefined symbols to be built.
  3829. allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
  3830. # Flag that forces no undefined symbols.
  3831. no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
  3832. # Commands used to finish a libtool library installation in a directory.
  3833. finish_cmds=$lt_finish_cmds
  3834. # Same as above, but a single script fragment to be evaled but not shown.
  3835. finish_eval=$lt_finish_eval
  3836. # Take the output of nm and produce a listing of raw symbols and C names.
  3837. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
  3838. # Transform the output of nm in a proper C declaration
  3839. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
  3840. # Transform the output of nm in a C name address pair
  3841. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
  3842. # This is the shared library runtime path variable.
  3843. runpath_var=$runpath_var
  3844. # This is the shared library path variable.
  3845. shlibpath_var=$shlibpath_var
  3846. # Is shlibpath searched before the hard-coded library search path?
  3847. shlibpath_overrides_runpath=$shlibpath_overrides_runpath
  3848. # How to hardcode a shared library path into an executable.
  3849. hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
  3850. # Whether we should hardcode library paths into libraries.
  3851. hardcode_into_libs=$hardcode_into_libs
  3852. # Flag to hardcode \$libdir into a binary during linking.
  3853. # This must work even if \$libdir does not exist.
  3854. hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
  3855. # If ld is used when linking, flag to hardcode \$libdir into
  3856. # a binary during linking. This must work even if \$libdir does
  3857. # not exist.
  3858. hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
  3859. # Whether we need a single -rpath flag with a separated argument.
  3860. hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
  3861. # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
  3862. # resulting binary.
  3863. hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
  3864. # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
  3865. # resulting binary.
  3866. hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
  3867. # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
  3868. # the resulting binary.
  3869. hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
  3870. # Set to yes if building a shared library automatically hardcodes DIR into the library
  3871. # and all subsequent libraries and executables linked against it.
  3872. hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
  3873. # Variables whose values should be saved in libtool wrapper scripts and
  3874. # restored at relink time.
  3875. variables_saved_for_relink="$variables_saved_for_relink"
  3876. # Whether libtool must link a program against all its dependency libraries.
  3877. link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
  3878. # Compile-time system search path for libraries
  3879. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
  3880. # Run-time system search path for libraries
  3881. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
  3882. # Fix the shell variable \$srcfile for the compiler.
  3883. fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
  3884. # Set to yes if exported symbols are required.
  3885. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
  3886. # The commands to list exported symbols.
  3887. export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
  3888. # The commands to extract the exported symbol list from a shared archive.
  3889. extract_expsyms_cmds=$lt_extract_expsyms_cmds
  3890. # Symbols that should not be listed in the preloaded symbols.
  3891. exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
  3892. # Symbols that must always be exported.
  3893. include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
  3894. ifelse([$1],[],
  3895. [# ### END LIBTOOL CONFIG],
  3896. [# ### END LIBTOOL TAG CONFIG: $tagname])
  3897. __EOF__
  3898. ifelse([$1],[], [
  3899. case $host_os in
  3900. aix3*)
  3901. cat <<\EOF >> "$cfgfile"
  3902. # AIX sometimes has problems with the GCC collect2 program. For some
  3903. # reason, if we set the COLLECT_NAMES environment variable, the problems
  3904. # vanish in a puff of smoke.
  3905. if test "X${COLLECT_NAMES+set}" != Xset; then
  3906. COLLECT_NAMES=
  3907. export COLLECT_NAMES
  3908. fi
  3909. EOF
  3910. ;;
  3911. esac
  3912. # We use sed instead of cat because bash on DJGPP gets confused if
  3913. # if finds mixed CR/LF and LF-only lines. Since sed operates in
  3914. # text mode, it properly converts lines to CR/LF. This bash problem
  3915. # is reportedly fixed, but why not run on old versions too?
  3916. sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
  3917. mv -f "$cfgfile" "$ofile" || \
  3918. (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
  3919. chmod +x "$ofile"
  3920. ])
  3921. else
  3922. # If there is no Makefile yet, we rely on a make rule to execute
  3923. # `config.status --recheck' to rerun these tests and create the
  3924. # libtool script then.
  3925. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
  3926. if test -f "$ltmain_in"; then
  3927. test -f Makefile && make "$ltmain"
  3928. fi
  3929. fi
  3930. ])# AC_LIBTOOL_CONFIG
  3931. # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
  3932. # -------------------------------------------
  3933. AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
  3934. [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
  3935. _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  3936. if test "$GCC" = yes; then
  3937. _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  3938. AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
  3939. lt_cv_prog_compiler_rtti_exceptions,
  3940. [-fno-rtti -fno-exceptions], [],
  3941. [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
  3942. fi
  3943. ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
  3944. # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
  3945. # ---------------------------------
  3946. AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
  3947. [AC_REQUIRE([AC_CANONICAL_HOST])
  3948. AC_REQUIRE([AC_PROG_NM])
  3949. AC_REQUIRE([AC_OBJEXT])
  3950. # Check for command to grab the raw symbol name followed by C symbol from nm.
  3951. AC_MSG_CHECKING([command to parse $NM output from $compiler object])
  3952. AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
  3953. [
  3954. # These are sane defaults that work on at least a few old systems.
  3955. # [They come from Ultrix. What could be older than Ultrix?!! ;)]
  3956. # Character class describing NM global symbol codes.
  3957. symcode='[[BCDEGRST]]'
  3958. # Regexp to match symbols that can be accessed directly from C.
  3959. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
  3960. # Transform an extracted symbol line into a proper C declaration
  3961. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
  3962. # Transform an extracted symbol line into symbol name and symbol address
  3963. 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'"
  3964. # Define system-specific variables.
  3965. case $host_os in
  3966. aix*)
  3967. symcode='[[BCDT]]'
  3968. ;;
  3969. cygwin* | mingw* | pw32*)
  3970. symcode='[[ABCDGISTW]]'
  3971. ;;
  3972. hpux*) # Its linker distinguishes data from code symbols
  3973. if test "$host_cpu" = ia64; then
  3974. symcode='[[ABCDEGRST]]'
  3975. fi
  3976. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  3977. 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'"
  3978. ;;
  3979. linux*)
  3980. if test "$host_cpu" = ia64; then
  3981. symcode='[[ABCDGIRSTW]]'
  3982. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  3983. 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'"
  3984. fi
  3985. ;;
  3986. irix* | nonstopux*)
  3987. symcode='[[BCDEGRST]]'
  3988. ;;
  3989. osf*)
  3990. symcode='[[BCDEGQRST]]'
  3991. ;;
  3992. solaris* | sysv5*)
  3993. symcode='[[BDRT]]'
  3994. ;;
  3995. sysv4)
  3996. symcode='[[DFNSTU]]'
  3997. ;;
  3998. esac
  3999. # Handle CRLF in mingw tool chain
  4000. opt_cr=
  4001. case $build_os in
  4002. mingw*)
  4003. opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  4004. ;;
  4005. esac
  4006. # If we're using GNU nm, then use its standard symbol codes.
  4007. case `$NM -V 2>&1` in
  4008. *GNU* | *'with BFD'*)
  4009. symcode='[[ABCDGIRSTW]]' ;;
  4010. esac
  4011. # Try without a prefix undercore, then with it.
  4012. for ac_symprfx in "" "_"; do
  4013. # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
  4014. symxfrm="\\1 $ac_symprfx\\2 \\2"
  4015. # Write the raw and C identifiers.
  4016. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
  4017. # Check to see that the pipe works correctly.
  4018. pipe_works=no
  4019. rm -f conftest*
  4020. cat > conftest.$ac_ext <<EOF
  4021. #ifdef __cplusplus
  4022. extern "C" {
  4023. #endif
  4024. char nm_test_var;
  4025. void nm_test_func(){}
  4026. #ifdef __cplusplus
  4027. }
  4028. #endif
  4029. int main(){nm_test_var='a';nm_test_func();return(0);}
  4030. EOF
  4031. if AC_TRY_EVAL(ac_compile); then
  4032. # Now try to grab the symbols.
  4033. nlist=conftest.nm
  4034. if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
  4035. # Try sorting and uniquifying the output.
  4036. if sort "$nlist" | uniq > "$nlist"T; then
  4037. mv -f "$nlist"T "$nlist"
  4038. else
  4039. rm -f "$nlist"T
  4040. fi
  4041. # Make sure that we snagged all the symbols we need.
  4042. if grep ' nm_test_var$' "$nlist" >/dev/null; then
  4043. if grep ' nm_test_func$' "$nlist" >/dev/null; then
  4044. cat <<EOF > conftest.$ac_ext
  4045. #ifdef __cplusplus
  4046. extern "C" {
  4047. #endif
  4048. EOF
  4049. # Now generate the symbol file.
  4050. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
  4051. cat <<EOF >> conftest.$ac_ext
  4052. #if defined (__STDC__) && __STDC__
  4053. # define lt_ptr_t void *
  4054. #else
  4055. # define lt_ptr_t char *
  4056. # define const
  4057. #endif
  4058. /* The mapping between symbol names and symbols. */
  4059. const struct {
  4060. const char *name;
  4061. lt_ptr_t address;
  4062. }
  4063. lt_preloaded_symbols[[]] =
  4064. {
  4065. EOF
  4066. $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
  4067. cat <<\EOF >> conftest.$ac_ext
  4068. {0, (lt_ptr_t) 0}
  4069. };
  4070. #ifdef __cplusplus
  4071. }
  4072. #endif
  4073. EOF
  4074. # Now try linking the two files.
  4075. mv conftest.$ac_objext conftstm.$ac_objext
  4076. lt_save_LIBS="$LIBS"
  4077. lt_save_CFLAGS="$CFLAGS"
  4078. LIBS="conftstm.$ac_objext"
  4079. CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
  4080. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
  4081. pipe_works=yes
  4082. fi
  4083. LIBS="$lt_save_LIBS"
  4084. CFLAGS="$lt_save_CFLAGS"
  4085. else
  4086. echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
  4087. fi
  4088. else
  4089. echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
  4090. fi
  4091. else
  4092. echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
  4093. fi
  4094. else
  4095. echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
  4096. cat conftest.$ac_ext >&5
  4097. fi
  4098. rm -f conftest* conftst*
  4099. # Do not use the global_symbol_pipe unless it works.
  4100. if test "$pipe_works" = yes; then
  4101. break
  4102. else
  4103. lt_cv_sys_global_symbol_pipe=
  4104. fi
  4105. done
  4106. ])
  4107. if test -z "$lt_cv_sys_global_symbol_pipe"; then
  4108. lt_cv_sys_global_symbol_to_cdecl=
  4109. fi
  4110. if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
  4111. AC_MSG_RESULT(failed)
  4112. else
  4113. AC_MSG_RESULT(ok)
  4114. fi
  4115. ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
  4116. # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
  4117. # ---------------------------------------
  4118. AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
  4119. [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
  4120. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  4121. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
  4122. AC_MSG_CHECKING([for $compiler option to produce PIC])
  4123. ifelse([$1],[CXX],[
  4124. # C++ specific cases for pic, static, wl, etc.
  4125. if test "$GXX" = yes; then
  4126. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4127. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4128. case $host_os in
  4129. aix*)
  4130. # All AIX code is PIC.
  4131. if test "$host_cpu" = ia64; then
  4132. # AIX 5 now supports IA64 processor
  4133. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4134. fi
  4135. ;;
  4136. amigaos*)
  4137. # FIXME: we need at least 68020 code to build shared libraries, but
  4138. # adding the `-m68020' flag to GCC prevents building anything better,
  4139. # like `-m68040'.
  4140. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  4141. ;;
  4142. beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  4143. # PIC is the default for these OSes.
  4144. ;;
  4145. mingw* | os2* | pw32*)
  4146. # This hack is so that the source file can tell whether it is being
  4147. # built for inclusion in a dll (and should export symbols for example).
  4148. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
  4149. ;;
  4150. darwin* | rhapsody*)
  4151. # PIC is the default on this platform
  4152. # Common symbols not allowed in MH_DYLIB files
  4153. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  4154. ;;
  4155. *djgpp*)
  4156. # DJGPP does not support shared libraries at all
  4157. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  4158. ;;
  4159. sysv4*MP*)
  4160. if test -d /usr/nec; then
  4161. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  4162. fi
  4163. ;;
  4164. hpux*)
  4165. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  4166. # not for PA HP-UX.
  4167. case "$host_cpu" in
  4168. hppa*64*|ia64*)
  4169. ;;
  4170. *)
  4171. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4172. ;;
  4173. esac
  4174. ;;
  4175. *)
  4176. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4177. ;;
  4178. esac
  4179. else
  4180. case $host_os in
  4181. aix4* | aix5*)
  4182. # All AIX code is PIC.
  4183. if test "$host_cpu" = ia64; then
  4184. # AIX 5 now supports IA64 processor
  4185. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4186. else
  4187. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  4188. fi
  4189. ;;
  4190. chorus*)
  4191. case $cc_basename in
  4192. cxch68*)
  4193. # Green Hills C++ Compiler
  4194. # _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"
  4195. ;;
  4196. esac
  4197. ;;
  4198. darwin*)
  4199. # PIC is the default on this platform
  4200. # Common symbols not allowed in MH_DYLIB files
  4201. case $cc_basename in
  4202. xlc*)
  4203. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
  4204. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4205. ;;
  4206. esac
  4207. ;;
  4208. dgux*)
  4209. case $cc_basename in
  4210. ec++*)
  4211. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4212. ;;
  4213. ghcx*)
  4214. # Green Hills C++ Compiler
  4215. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4216. ;;
  4217. *)
  4218. ;;
  4219. esac
  4220. ;;
  4221. freebsd* | kfreebsd*-gnu | dragonfly*)
  4222. # FreeBSD uses GNU C++
  4223. ;;
  4224. hpux9* | hpux10* | hpux11*)
  4225. case $cc_basename in
  4226. CC*)
  4227. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4228. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
  4229. if test "$host_cpu" != ia64; then
  4230. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4231. fi
  4232. ;;
  4233. aCC*)
  4234. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4235. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
  4236. case "$host_cpu" in
  4237. hppa*64*|ia64*)
  4238. # +Z the default
  4239. ;;
  4240. *)
  4241. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4242. ;;
  4243. esac
  4244. ;;
  4245. *)
  4246. ;;
  4247. esac
  4248. ;;
  4249. irix5* | irix6* | nonstopux*)
  4250. case $cc_basename in
  4251. CC*)
  4252. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4253. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4254. # CC pic flag -KPIC is the default.
  4255. ;;
  4256. *)
  4257. ;;
  4258. esac
  4259. ;;
  4260. linux*)
  4261. case $cc_basename in
  4262. KCC*)
  4263. # KAI C++ Compiler
  4264. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  4265. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4266. ;;
  4267. icpc* | ecpc*)
  4268. # Intel C++
  4269. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4270. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4271. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4272. ;;
  4273. pgCC*)
  4274. # Portland Group C++ compiler.
  4275. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4276. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4277. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4278. ;;
  4279. cxx*)
  4280. # Compaq C++
  4281. # Make sure the PIC flag is empty. It appears that all Alpha
  4282. # Linux and Compaq Tru64 Unix objects are PIC.
  4283. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  4284. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4285. ;;
  4286. *)
  4287. ;;
  4288. esac
  4289. ;;
  4290. lynxos*)
  4291. ;;
  4292. m88k*)
  4293. ;;
  4294. mvs*)
  4295. case $cc_basename in
  4296. cxx*)
  4297. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
  4298. ;;
  4299. *)
  4300. ;;
  4301. esac
  4302. ;;
  4303. netbsd*)
  4304. ;;
  4305. osf3* | osf4* | osf5*)
  4306. case $cc_basename in
  4307. KCC*)
  4308. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  4309. ;;
  4310. RCC*)
  4311. # Rational C++ 2.4.1
  4312. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4313. ;;
  4314. cxx*)
  4315. # Digital/Compaq C++
  4316. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4317. # Make sure the PIC flag is empty. It appears that all Alpha
  4318. # Linux and Compaq Tru64 Unix objects are PIC.
  4319. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  4320. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4321. ;;
  4322. *)
  4323. ;;
  4324. esac
  4325. ;;
  4326. psos*)
  4327. ;;
  4328. sco*)
  4329. case $cc_basename in
  4330. CC*)
  4331. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4332. ;;
  4333. *)
  4334. ;;
  4335. esac
  4336. ;;
  4337. solaris*)
  4338. case $cc_basename in
  4339. CC*)
  4340. # Sun C++ 4.2, 5.x and Centerline C++
  4341. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4342. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4343. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4344. ;;
  4345. gcx*)
  4346. # Green Hills C++ Compiler
  4347. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4348. ;;
  4349. *)
  4350. ;;
  4351. esac
  4352. ;;
  4353. sunos4*)
  4354. case $cc_basename in
  4355. CC*)
  4356. # Sun C++ 4.x
  4357. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4358. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4359. ;;
  4360. lcc*)
  4361. # Lucid
  4362. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4363. ;;
  4364. *)
  4365. ;;
  4366. esac
  4367. ;;
  4368. tandem*)
  4369. case $cc_basename in
  4370. NCC*)
  4371. # NonStop-UX NCC 3.20
  4372. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4373. ;;
  4374. *)
  4375. ;;
  4376. esac
  4377. ;;
  4378. unixware*)
  4379. ;;
  4380. vxworks*)
  4381. ;;
  4382. *)
  4383. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4384. ;;
  4385. esac
  4386. fi
  4387. ],
  4388. [
  4389. if test "$GCC" = yes; then
  4390. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4391. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4392. case $host_os in
  4393. aix*)
  4394. # All AIX code is PIC.
  4395. if test "$host_cpu" = ia64; then
  4396. # AIX 5 now supports IA64 processor
  4397. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4398. fi
  4399. ;;
  4400. amigaos*)
  4401. # FIXME: we need at least 68020 code to build shared libraries, but
  4402. # adding the `-m68020' flag to GCC prevents building anything better,
  4403. # like `-m68040'.
  4404. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  4405. ;;
  4406. beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  4407. # PIC is the default for these OSes.
  4408. ;;
  4409. mingw* | pw32* | os2*)
  4410. # This hack is so that the source file can tell whether it is being
  4411. # built for inclusion in a dll (and should export symbols for example).
  4412. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
  4413. ;;
  4414. darwin* | rhapsody*)
  4415. # PIC is the default on this platform
  4416. # Common symbols not allowed in MH_DYLIB files
  4417. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  4418. ;;
  4419. msdosdjgpp*)
  4420. # Just because we use GCC doesn't mean we suddenly get shared libraries
  4421. # on systems that don't support them.
  4422. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4423. enable_shared=no
  4424. ;;
  4425. sysv4*MP*)
  4426. if test -d /usr/nec; then
  4427. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  4428. fi
  4429. ;;
  4430. hpux*)
  4431. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  4432. # not for PA HP-UX.
  4433. case "$host_cpu" in
  4434. hppa*64*|ia64*)
  4435. # +Z the default
  4436. ;;
  4437. *)
  4438. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4439. ;;
  4440. esac
  4441. ;;
  4442. *)
  4443. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4444. ;;
  4445. esac
  4446. else
  4447. # PORTME Check for flag to pass linker flags through the system compiler.
  4448. case $host_os in
  4449. aix*)
  4450. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4451. if test "$host_cpu" = ia64; then
  4452. # AIX 5 now supports IA64 processor
  4453. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4454. else
  4455. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  4456. fi
  4457. ;;
  4458. darwin*)
  4459. # PIC is the default on this platform
  4460. # Common symbols not allowed in MH_DYLIB files
  4461. case $cc_basename in
  4462. xlc*)
  4463. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
  4464. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4465. ;;
  4466. esac
  4467. ;;
  4468. mingw* | pw32* | os2*)
  4469. # This hack is so that the source file can tell whether it is being
  4470. # built for inclusion in a dll (and should export symbols for example).
  4471. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
  4472. ;;
  4473. hpux9* | hpux10* | hpux11*)
  4474. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4475. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  4476. # not for PA HP-UX.
  4477. case "$host_cpu" in
  4478. hppa*64*|ia64*)
  4479. # +Z the default
  4480. ;;
  4481. *)
  4482. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4483. ;;
  4484. esac
  4485. # Is there a better lt_prog_compiler_static that works with the bundled CC?
  4486. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  4487. ;;
  4488. irix5* | irix6* | nonstopux*)
  4489. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4490. # PIC (with -KPIC) is the default.
  4491. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4492. ;;
  4493. newsos6)
  4494. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4495. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4496. ;;
  4497. linux*)
  4498. case $cc_basename in
  4499. icc* | ecc*)
  4500. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4501. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4502. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4503. ;;
  4504. pgcc* | pgf77* | pgf90*)
  4505. # Portland Group compilers (*not* the Pentium gcc compiler,
  4506. # which looks to be a dead project)
  4507. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4508. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4509. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4510. ;;
  4511. ccc*)
  4512. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4513. # All Alpha code is PIC.
  4514. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4515. ;;
  4516. esac
  4517. ;;
  4518. osf3* | osf4* | osf5*)
  4519. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4520. # All OSF/1 code is PIC.
  4521. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4522. ;;
  4523. sco3.2v5*)
  4524. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
  4525. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
  4526. ;;
  4527. solaris*)
  4528. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4529. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4530. case $cc_basename in
  4531. f77* | f90* | f95*)
  4532. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
  4533. *)
  4534. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
  4535. esac
  4536. ;;
  4537. sunos4*)
  4538. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4539. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4540. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4541. ;;
  4542. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  4543. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4544. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4545. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4546. ;;
  4547. sysv4*MP*)
  4548. if test -d /usr/nec ;then
  4549. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
  4550. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4551. fi
  4552. ;;
  4553. unicos*)
  4554. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4555. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4556. ;;
  4557. uts4*)
  4558. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4559. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4560. ;;
  4561. *)
  4562. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4563. ;;
  4564. esac
  4565. fi
  4566. ])
  4567. AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
  4568. #
  4569. # Check to make sure the PIC flag actually works.
  4570. #
  4571. if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
  4572. AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
  4573. _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
  4574. [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
  4575. [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
  4576. "" | " "*) ;;
  4577. *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
  4578. esac],
  4579. [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  4580. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
  4581. fi
  4582. case "$host_os" in
  4583. # For platforms which do not support PIC, -DPIC is meaningless:
  4584. *djgpp*)
  4585. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  4586. ;;
  4587. *)
  4588. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
  4589. ;;
  4590. esac
  4591. ])
  4592. # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
  4593. # ------------------------------------
  4594. # See if the linker supports building shared libraries.
  4595. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
  4596. [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  4597. ifelse([$1],[CXX],[
  4598. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4599. case $host_os in
  4600. aix4* | aix5*)
  4601. # If we're using GNU nm, then we don't want the "-C" option.
  4602. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  4603. if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
  4604. _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'
  4605. else
  4606. _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'
  4607. fi
  4608. ;;
  4609. pw32*)
  4610. _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
  4611. ;;
  4612. cygwin* | mingw*)
  4613. _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'
  4614. ;;
  4615. *)
  4616. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4617. ;;
  4618. esac
  4619. ],[
  4620. runpath_var=
  4621. _LT_AC_TAGVAR(allow_undefined_flag, $1)=
  4622. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  4623. _LT_AC_TAGVAR(archive_cmds, $1)=
  4624. _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
  4625. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
  4626. _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
  4627. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
  4628. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  4629. _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
  4630. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4631. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  4632. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  4633. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  4634. _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
  4635. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  4636. _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
  4637. _LT_AC_TAGVAR(hardcode_automatic, $1)=no
  4638. _LT_AC_TAGVAR(module_cmds, $1)=
  4639. _LT_AC_TAGVAR(module_expsym_cmds, $1)=
  4640. _LT_AC_TAGVAR(always_export_symbols, $1)=no
  4641. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4642. # include_expsyms should be a list of space-separated symbols to be *always*
  4643. # included in the symbol list
  4644. _LT_AC_TAGVAR(include_expsyms, $1)=
  4645. # exclude_expsyms can be an extended regexp of symbols to exclude
  4646. # it will be wrapped by ` (' and `)$', so one must not match beginning or
  4647. # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
  4648. # as well as any symbol that contains `d'.
  4649. _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
  4650. # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  4651. # platforms (ab)use it in PIC code, but their linkers get confused if
  4652. # the symbol is explicitly referenced. Since portable code cannot
  4653. # rely on this symbol name, it's probably fine to never include it in
  4654. # preloaded symbol tables.
  4655. extract_expsyms_cmds=
  4656. # Just being paranoid about ensuring that cc_basename is set.
  4657. _LT_CC_BASENAME([$compiler])
  4658. case $host_os in
  4659. cygwin* | mingw* | pw32*)
  4660. # FIXME: the MSVC++ port hasn't been tested in a loooong time
  4661. # When not using gcc, we currently assume that we are using
  4662. # Microsoft Visual C++.
  4663. if test "$GCC" != yes; then
  4664. with_gnu_ld=no
  4665. fi
  4666. ;;
  4667. openbsd*)
  4668. with_gnu_ld=no
  4669. ;;
  4670. esac
  4671. _LT_AC_TAGVAR(ld_shlibs, $1)=yes
  4672. if test "$with_gnu_ld" = yes; then
  4673. # If archive_cmds runs LD, not CC, wlarc should be empty
  4674. wlarc='${wl}'
  4675. # Set some defaults for GNU ld with shared library support. These
  4676. # are reset later if shared libraries are not supported. Putting them
  4677. # here allows them to be overridden if necessary.
  4678. runpath_var=LD_RUN_PATH
  4679. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
  4680. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  4681. # ancient GNU ld didn't support --whole-archive et. al.
  4682. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
  4683. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  4684. else
  4685. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  4686. fi
  4687. supports_anon_versioning=no
  4688. case `$LD -v 2>/dev/null` in
  4689. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
  4690. *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
  4691. *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
  4692. *\ 2.11.*) ;; # other 2.11 versions
  4693. *) supports_anon_versioning=yes ;;
  4694. esac
  4695. # See if GNU ld supports shared libraries.
  4696. case $host_os in
  4697. aix3* | aix4* | aix5*)
  4698. # On AIX/PPC, the GNU linker is very broken
  4699. if test "$host_cpu" != ia64; then
  4700. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4701. cat <<EOF 1>&2
  4702. *** Warning: the GNU linker, at least up to release 2.9.1, is reported
  4703. *** to be unable to reliably create shared libraries on AIX.
  4704. *** Therefore, libtool is disabling shared libraries support. If you
  4705. *** really care for shared libraries, you may want to modify your PATH
  4706. *** so that a non-GNU linker is found, and then restart.
  4707. EOF
  4708. fi
  4709. ;;
  4710. amigaos*)
  4711. _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)'
  4712. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4713. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  4714. # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
  4715. # that the semantics of dynamic libraries on AmigaOS, at least up
  4716. # to version 4, is to share data among multiple programs linked
  4717. # with the same dynamic library. Since this doesn't match the
  4718. # behavior of shared libraries on other platforms, we can't use
  4719. # them.
  4720. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4721. ;;
  4722. beos*)
  4723. if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  4724. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  4725. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  4726. # support --undefined. This deserves some investigation. FIXME
  4727. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4728. else
  4729. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4730. fi
  4731. ;;
  4732. cygwin* | mingw* | pw32*)
  4733. # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  4734. # as there is no search path for DLLs.
  4735. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4736. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  4737. _LT_AC_TAGVAR(always_export_symbols, $1)=no
  4738. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4739. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
  4740. if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
  4741. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
  4742. # If the export-symbols file already is a .def file (1st line
  4743. # is EXPORTS), use it as is; otherwise, prepend...
  4744. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  4745. cp $export_symbols $output_objdir/$soname.def;
  4746. else
  4747. echo EXPORTS > $output_objdir/$soname.def;
  4748. cat $export_symbols >> $output_objdir/$soname.def;
  4749. fi~
  4750. $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
  4751. else
  4752. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4753. fi
  4754. ;;
  4755. linux*)
  4756. if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  4757. tmp_addflag=
  4758. case $cc_basename,$host_cpu in
  4759. pgcc*) # Portland Group C compiler
  4760. _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'
  4761. tmp_addflag=' $pic_flag'
  4762. ;;
  4763. pgf77* | pgf90* ) # Portland Group f77 and f90 compilers
  4764. _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'
  4765. tmp_addflag=' $pic_flag -Mnomain' ;;
  4766. ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
  4767. tmp_addflag=' -i_dynamic' ;;
  4768. efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
  4769. tmp_addflag=' -i_dynamic -nofor_main' ;;
  4770. ifc* | ifort*) # Intel Fortran compiler
  4771. tmp_addflag=' -nofor_main' ;;
  4772. esac
  4773. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4774. if test $supports_anon_versioning = yes; then
  4775. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
  4776. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4777. $echo "local: *; };" >> $output_objdir/$libname.ver~
  4778. $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  4779. fi
  4780. else
  4781. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4782. fi
  4783. ;;
  4784. netbsd*)
  4785. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  4786. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  4787. wlarc=
  4788. else
  4789. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4790. _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'
  4791. fi
  4792. ;;
  4793. solaris* | sysv5*)
  4794. if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
  4795. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4796. cat <<EOF 1>&2
  4797. *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  4798. *** create shared libraries on Solaris systems. Therefore, libtool
  4799. *** is disabling shared libraries support. We urge you to upgrade GNU
  4800. *** binutils to release 2.9.1 or newer. Another option is to modify
  4801. *** your PATH or compiler configuration so that the native linker is
  4802. *** used, and then restart.
  4803. EOF
  4804. elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  4805. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4806. _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'
  4807. else
  4808. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4809. fi
  4810. ;;
  4811. sunos4*)
  4812. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4813. wlarc=
  4814. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  4815. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  4816. ;;
  4817. *)
  4818. if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  4819. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4820. _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'
  4821. else
  4822. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4823. fi
  4824. ;;
  4825. esac
  4826. if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
  4827. runpath_var=
  4828. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4829. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
  4830. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  4831. fi
  4832. else
  4833. # PORTME fill in a description of your system's linker (not GNU ld)
  4834. case $host_os in
  4835. aix3*)
  4836. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  4837. _LT_AC_TAGVAR(always_export_symbols, $1)=yes
  4838. _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'
  4839. # Note: this linker hardcodes the directories in LIBPATH if there
  4840. # are no directories specified by -L.
  4841. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  4842. if test "$GCC" = yes && test -z "$link_static_flag"; then
  4843. # Neither direct hardcoding nor static linking is supported with a
  4844. # broken collect2.
  4845. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
  4846. fi
  4847. ;;
  4848. aix4* | aix5*)
  4849. if test "$host_cpu" = ia64; then
  4850. # On IA64, the linker does run time linking by default, so we don't
  4851. # have to do anything special.
  4852. aix_use_runtimelinking=no
  4853. exp_sym_flag='-Bexport'
  4854. no_entry_flag=""
  4855. else
  4856. # If we're using GNU nm, then we don't want the "-C" option.
  4857. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  4858. if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
  4859. _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'
  4860. else
  4861. _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'
  4862. fi
  4863. aix_use_runtimelinking=no
  4864. # Test if we are trying to use run time linking or normal
  4865. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  4866. # need to do runtime linking.
  4867. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
  4868. for ld_flag in $LDFLAGS; do
  4869. if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
  4870. aix_use_runtimelinking=yes
  4871. break
  4872. fi
  4873. done
  4874. esac
  4875. exp_sym_flag='-bexport'
  4876. no_entry_flag='-bnoentry'
  4877. fi
  4878. # When large executables or shared objects are built, AIX ld can
  4879. # have problems creating the table of contents. If linking a library
  4880. # or program results in "error TOC overflow" add -mminimal-toc to
  4881. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  4882. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  4883. _LT_AC_TAGVAR(archive_cmds, $1)=''
  4884. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  4885. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
  4886. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  4887. if test "$GCC" = yes; then
  4888. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  4889. # We only want to do this on AIX 4.2 and lower, the check
  4890. # below for broken collect2 doesn't work under 4.3+
  4891. collect2name=`${CC} -print-prog-name=collect2`
  4892. if test -f "$collect2name" && \
  4893. strings "$collect2name" | grep resolve_lib_name >/dev/null
  4894. then
  4895. # We have reworked collect2
  4896. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  4897. else
  4898. # We have old collect2
  4899. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
  4900. # It fails to find uninstalled libraries when the uninstalled
  4901. # path is not listed in the libpath. Setting hardcode_minus_L
  4902. # to unsupported forces relinking
  4903. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  4904. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4905. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  4906. fi
  4907. esac
  4908. shared_flag='-shared'
  4909. if test "$aix_use_runtimelinking" = yes; then
  4910. shared_flag="$shared_flag "'${wl}-G'
  4911. fi
  4912. else
  4913. # not using gcc
  4914. if test "$host_cpu" = ia64; then
  4915. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  4916. # chokes on -Wl,-G. The following line is correct:
  4917. shared_flag='-G'
  4918. else
  4919. if test "$aix_use_runtimelinking" = yes; then
  4920. shared_flag='${wl}-G'
  4921. else
  4922. shared_flag='${wl}-bM:SRE'
  4923. fi
  4924. fi
  4925. fi
  4926. # It seems that -bexpall does not export symbols beginning with
  4927. # underscore (_), so it is better to generate a list of symbols to export.
  4928. _LT_AC_TAGVAR(always_export_symbols, $1)=yes
  4929. if test "$aix_use_runtimelinking" = yes; then
  4930. # Warning - without using the other runtime loading flags (-brtl),
  4931. # -berok will link without error, but may produce a broken library.
  4932. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
  4933. # Determine the default libpath from the value encoded in an empty executable.
  4934. _LT_AC_SYS_LIBPATH_AIX
  4935. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  4936. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
  4937. else
  4938. if test "$host_cpu" = ia64; then
  4939. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  4940. _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  4941. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
  4942. else
  4943. # Determine the default libpath from the value encoded in an empty executable.
  4944. _LT_AC_SYS_LIBPATH_AIX
  4945. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  4946. # Warning - without using the other run time loading flags,
  4947. # -berok will link without error, but may produce a broken library.
  4948. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  4949. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  4950. # -bexpall does not export symbols beginning with underscore (_)
  4951. _LT_AC_TAGVAR(always_export_symbols, $1)=yes
  4952. # Exported symbols can be pulled into shared objects from archives
  4953. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
  4954. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
  4955. # This is similar to how AIX traditionally builds it's shared libraries.
  4956. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
  4957. fi
  4958. fi
  4959. ;;
  4960. amigaos*)
  4961. _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)'
  4962. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4963. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  4964. # see comment about different semantics on the GNU ld section
  4965. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4966. ;;
  4967. bsdi[[45]]*)
  4968. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
  4969. ;;
  4970. cygwin* | mingw* | pw32*)
  4971. # When not using gcc, we currently assume that we are using
  4972. # Microsoft Visual C++.
  4973. # hardcode_libdir_flag_spec is actually meaningless, as there is
  4974. # no search path for DLLs.
  4975. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  4976. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  4977. # Tell ltmain to make .lib files, not .a files.
  4978. libext=lib
  4979. # Tell ltmain to make .dll files, not .so files.
  4980. shrext_cmds=".dll"
  4981. # FIXME: Setting linknames here is a bad hack.
  4982. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
  4983. # The linker will automatically build a .lib file if we build a DLL.
  4984. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
  4985. # FIXME: Should let the user specify the lib program.
  4986. _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
  4987. _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
  4988. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4989. ;;
  4990. darwin* | rhapsody*)
  4991. case "$host_os" in
  4992. rhapsody* | darwin1.[[012]])
  4993. _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
  4994. ;;
  4995. *) # Darwin 1.3 on
  4996. if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
  4997. _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
  4998. else
  4999. case ${MACOSX_DEPLOYMENT_TARGET} in
  5000. 10.[[012]])
  5001. _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
  5002. ;;
  5003. 10.*)
  5004. _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
  5005. ;;
  5006. esac
  5007. fi
  5008. ;;
  5009. esac
  5010. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  5011. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  5012. _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
  5013. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  5014. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
  5015. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  5016. if test "$GCC" = yes ; then
  5017. output_verbose_link_cmd='echo'
  5018. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
  5019. _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
  5020. # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
  5021. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  5022. _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}'
  5023. else
  5024. case $cc_basename in
  5025. xlc*)
  5026. output_verbose_link_cmd='echo'
  5027. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
  5028. _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
  5029. # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
  5030. _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 $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  5031. _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}'
  5032. ;;
  5033. *)
  5034. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5035. ;;
  5036. esac
  5037. fi
  5038. ;;
  5039. dgux*)
  5040. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5041. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5042. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5043. ;;
  5044. freebsd1*)
  5045. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5046. ;;
  5047. # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  5048. # support. Future versions do this automatically, but an explicit c++rt0.o
  5049. # does not break anything, and helps significantly (at the cost of a little
  5050. # extra space).
  5051. freebsd2.2*)
  5052. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
  5053. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5054. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5055. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5056. ;;
  5057. # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  5058. freebsd2*)
  5059. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  5060. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5061. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5062. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5063. ;;
  5064. # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  5065. freebsd* | kfreebsd*-gnu | dragonfly*)
  5066. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
  5067. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5068. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5069. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5070. ;;
  5071. hpux9*)
  5072. if test "$GCC" = yes; then
  5073. _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'
  5074. else
  5075. _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'
  5076. fi
  5077. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5078. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5079. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5080. # hardcode_minus_L: Not really in the search PATH,
  5081. # but as the default location of the library.
  5082. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5083. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5084. ;;
  5085. hpux10* | hpux11*)
  5086. if test "$GCC" = yes -a "$with_gnu_ld" = no; then
  5087. case "$host_cpu" in
  5088. hppa*64*|ia64*)
  5089. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  5090. ;;
  5091. *)
  5092. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  5093. ;;
  5094. esac
  5095. else
  5096. case "$host_cpu" in
  5097. hppa*64*|ia64*)
  5098. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
  5099. ;;
  5100. *)
  5101. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
  5102. ;;
  5103. esac
  5104. fi
  5105. if test "$with_gnu_ld" = no; then
  5106. case "$host_cpu" in
  5107. hppa*64*)
  5108. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5109. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
  5110. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5111. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  5112. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5113. ;;
  5114. ia64*)
  5115. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5116. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  5117. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5118. # hardcode_minus_L: Not really in the search PATH,
  5119. # but as the default location of the library.
  5120. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5121. ;;
  5122. *)
  5123. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5124. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5125. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5126. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5127. # hardcode_minus_L: Not really in the search PATH,
  5128. # but as the default location of the library.
  5129. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5130. ;;
  5131. esac
  5132. fi
  5133. ;;
  5134. irix5* | irix6* | nonstopux*)
  5135. if test "$GCC" = yes; then
  5136. _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'
  5137. else
  5138. _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'
  5139. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
  5140. fi
  5141. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5142. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5143. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  5144. ;;
  5145. netbsd*)
  5146. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  5147. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
  5148. else
  5149. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
  5150. fi
  5151. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5152. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5153. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5154. ;;
  5155. newsos6)
  5156. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5157. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5158. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5159. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5160. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5161. ;;
  5162. openbsd*)
  5163. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5164. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5165. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  5166. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5167. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
  5168. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5169. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5170. else
  5171. case $host_os in
  5172. openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
  5173. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  5174. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5175. ;;
  5176. *)
  5177. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5178. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5179. ;;
  5180. esac
  5181. fi
  5182. ;;
  5183. os2*)
  5184. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5185. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5186. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  5187. _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'
  5188. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
  5189. ;;
  5190. osf3*)
  5191. if test "$GCC" = yes; then
  5192. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  5193. _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'
  5194. else
  5195. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  5196. _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'
  5197. fi
  5198. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5199. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5200. ;;
  5201. osf4* | osf5*) # as osf3* with the addition of -msym flag
  5202. if test "$GCC" = yes; then
  5203. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  5204. _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'
  5205. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5206. else
  5207. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  5208. _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'
  5209. _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~
  5210. $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'
  5211. # Both c and cxx compiler support -rpath directly
  5212. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  5213. fi
  5214. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5215. ;;
  5216. sco3.2v5*)
  5217. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5218. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5219. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  5220. runpath_var=LD_RUN_PATH
  5221. hardcode_runpath_var=yes
  5222. ;;
  5223. solaris*)
  5224. _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
  5225. if test "$GCC" = yes; then
  5226. wlarc='${wl}'
  5227. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  5228. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  5229. $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
  5230. else
  5231. wlarc=''
  5232. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5233. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  5234. $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
  5235. fi
  5236. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5237. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5238. case $host_os in
  5239. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  5240. *)
  5241. # The compiler driver will combine linker options so we
  5242. # cannot just pass the convience library names through
  5243. # without $wl, iff we do not link with $LD.
  5244. # Luckily, gcc supports the same syntax we need for Sun Studio.
  5245. # Supported since Solaris 2.6 (maybe 2.5.1?)
  5246. case $wlarc in
  5247. '')
  5248. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
  5249. *)
  5250. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
  5251. esac ;;
  5252. esac
  5253. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  5254. ;;
  5255. sunos4*)
  5256. if test "x$host_vendor" = xsequent; then
  5257. # Use $CC to link under sequent, because it throws in some extra .o
  5258. # files that make .init and .fini sections work.
  5259. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
  5260. else
  5261. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
  5262. fi
  5263. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5264. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5265. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5266. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5267. ;;
  5268. sysv4)
  5269. case $host_vendor in
  5270. sni)
  5271. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5272. _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
  5273. ;;
  5274. siemens)
  5275. ## LD is ld it makes a PLAMLIB
  5276. ## CC just makes a GrossModule.
  5277. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  5278. _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
  5279. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  5280. ;;
  5281. motorola)
  5282. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5283. _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
  5284. ;;
  5285. esac
  5286. runpath_var='LD_RUN_PATH'
  5287. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5288. ;;
  5289. sysv4.3*)
  5290. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5291. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5292. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
  5293. ;;
  5294. sysv4*MP*)
  5295. if test -d /usr/nec; then
  5296. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5297. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5298. runpath_var=LD_RUN_PATH
  5299. hardcode_runpath_var=yes
  5300. _LT_AC_TAGVAR(ld_shlibs, $1)=yes
  5301. fi
  5302. ;;
  5303. sysv4.2uw2*)
  5304. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  5305. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5306. _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
  5307. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5308. hardcode_runpath_var=yes
  5309. runpath_var=LD_RUN_PATH
  5310. ;;
  5311. sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
  5312. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
  5313. if test "$GCC" = yes; then
  5314. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  5315. else
  5316. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  5317. fi
  5318. runpath_var='LD_RUN_PATH'
  5319. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5320. ;;
  5321. sysv5*)
  5322. _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
  5323. # $CC -shared without GNU ld will not create a library from C++
  5324. # object files and a static libstdc++, better avoid it by now
  5325. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5326. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  5327. $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
  5328. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
  5329. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5330. runpath_var='LD_RUN_PATH'
  5331. ;;
  5332. uts4*)
  5333. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5334. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5335. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5336. ;;
  5337. *)
  5338. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5339. ;;
  5340. esac
  5341. fi
  5342. ])
  5343. AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
  5344. test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  5345. variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  5346. if test "$GCC" = yes; then
  5347. variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  5348. fi
  5349. #
  5350. # Do we need to explicitly link libc?
  5351. #
  5352. case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
  5353. x|xyes)
  5354. # Assume -lc should be added
  5355. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
  5356. if test "$enable_shared" = yes && test "$GCC" = yes; then
  5357. case $_LT_AC_TAGVAR(archive_cmds, $1) in
  5358. *'~'*)
  5359. # FIXME: we may have to deal with multi-command sequences.
  5360. ;;
  5361. '$CC '*)
  5362. # Test whether the compiler implicitly links with -lc since on some
  5363. # systems, -lgcc has to come before -lc. If gcc already passes -lc
  5364. # to ld, don't add -lc before -lgcc.
  5365. AC_MSG_CHECKING([whether -lc should be explicitly linked in])
  5366. $rm conftest*
  5367. printf "$lt_simple_compile_test_code" > conftest.$ac_ext
  5368. if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
  5369. soname=conftest
  5370. lib=conftest
  5371. libobjs=conftest.$ac_objext
  5372. deplibs=
  5373. wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
  5374. compiler_flags=-v
  5375. linker_flags=-v
  5376. verstring=
  5377. output_objdir=.
  5378. libname=conftest
  5379. lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
  5380. _LT_AC_TAGVAR(allow_undefined_flag, $1)=
  5381. if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
  5382. then
  5383. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  5384. else
  5385. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
  5386. fi
  5387. _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
  5388. else
  5389. cat conftest.err 1>&5
  5390. fi
  5391. $rm conftest*
  5392. AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
  5393. ;;
  5394. esac
  5395. fi
  5396. ;;
  5397. esac
  5398. ])# AC_LIBTOOL_PROG_LD_SHLIBS
  5399. # _LT_AC_FILE_LTDLL_C
  5400. # -------------------
  5401. # Be careful that the start marker always follows a newline.
  5402. AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
  5403. # /* ltdll.c starts here */
  5404. # #define WIN32_LEAN_AND_MEAN
  5405. # #include <windows.h>
  5406. # #undef WIN32_LEAN_AND_MEAN
  5407. # #include <stdio.h>
  5408. #
  5409. # #ifndef __CYGWIN__
  5410. # # ifdef __CYGWIN32__
  5411. # # define __CYGWIN__ __CYGWIN32__
  5412. # # endif
  5413. # #endif
  5414. #
  5415. # #ifdef __cplusplus
  5416. # extern "C" {
  5417. # #endif
  5418. # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
  5419. # #ifdef __cplusplus
  5420. # }
  5421. # #endif
  5422. #
  5423. # #ifdef __CYGWIN__
  5424. # #include <cygwin/cygwin_dll.h>
  5425. # DECLARE_CYGWIN_DLL( DllMain );
  5426. # #endif
  5427. # HINSTANCE __hDllInstance_base;
  5428. #
  5429. # BOOL APIENTRY
  5430. # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
  5431. # {
  5432. # __hDllInstance_base = hInst;
  5433. # return TRUE;
  5434. # }
  5435. # /* ltdll.c ends here */
  5436. ])# _LT_AC_FILE_LTDLL_C
  5437. # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
  5438. # ---------------------------------
  5439. AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
  5440. # old names
  5441. AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
  5442. AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
  5443. AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
  5444. AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
  5445. AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
  5446. AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
  5447. AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
  5448. # This is just to silence aclocal about the macro not being used
  5449. ifelse([AC_DISABLE_FAST_INSTALL])
  5450. AC_DEFUN([LT_AC_PROG_GCJ],
  5451. [AC_CHECK_TOOL(GCJ, gcj, no)
  5452. test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
  5453. AC_SUBST(GCJFLAGS)
  5454. ])
  5455. AC_DEFUN([LT_AC_PROG_RC],
  5456. [AC_CHECK_TOOL(RC, windres, no)
  5457. ])
  5458. # NOTE: This macro has been submitted for inclusion into #
  5459. # GNU Autoconf as AC_PROG_SED. When it is available in #
  5460. # a released version of Autoconf we should remove this #
  5461. # macro and use it instead. #
  5462. # LT_AC_PROG_SED
  5463. # --------------
  5464. # Check for a fully-functional sed program, that truncates
  5465. # as few characters as possible. Prefer GNU sed if found.
  5466. AC_DEFUN([LT_AC_PROG_SED],
  5467. [AC_MSG_CHECKING([for a sed that does not truncate output])
  5468. AC_CACHE_VAL(lt_cv_path_SED,
  5469. [# Loop through the user's path and test for sed and gsed.
  5470. # Then use that list of sed's as ones to test for truncation.
  5471. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  5472. for as_dir in $PATH
  5473. do
  5474. IFS=$as_save_IFS
  5475. test -z "$as_dir" && as_dir=.
  5476. for lt_ac_prog in sed gsed; do
  5477. for ac_exec_ext in '' $ac_executable_extensions; do
  5478. if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
  5479. lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
  5480. fi
  5481. done
  5482. done
  5483. done
  5484. lt_ac_max=0
  5485. lt_ac_count=0
  5486. # Add /usr/xpg4/bin/sed as it is typically found on Solaris
  5487. # along with /bin/sed that truncates output.
  5488. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
  5489. test ! -f $lt_ac_sed && continue
  5490. cat /dev/null > conftest.in
  5491. lt_ac_count=0
  5492. echo $ECHO_N "0123456789$ECHO_C" >conftest.in
  5493. # Check for GNU sed and select it if it is found.
  5494. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
  5495. lt_cv_path_SED=$lt_ac_sed
  5496. break
  5497. fi
  5498. while true; do
  5499. cat conftest.in conftest.in >conftest.tmp
  5500. mv conftest.tmp conftest.in
  5501. cp conftest.in conftest.nl
  5502. echo >>conftest.nl
  5503. $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
  5504. cmp -s conftest.out conftest.nl || break
  5505. # 10000 chars as input seems more than enough
  5506. test $lt_ac_count -gt 10 && break
  5507. lt_ac_count=`expr $lt_ac_count + 1`
  5508. if test $lt_ac_count -gt $lt_ac_max; then
  5509. lt_ac_max=$lt_ac_count
  5510. lt_cv_path_SED=$lt_ac_sed
  5511. fi
  5512. done
  5513. done
  5514. ])
  5515. SED=$lt_cv_path_SED
  5516. AC_MSG_RESULT([$SED])
  5517. ])
  5518. # Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
  5519. #
  5520. # This file is free software; the Free Software Foundation
  5521. # gives unlimited permission to copy and/or distribute it,
  5522. # with or without modifications, as long as this notice is preserved.
  5523. # AM_AUTOMAKE_VERSION(VERSION)
  5524. # ----------------------------
  5525. # Automake X.Y traces this macro to ensure aclocal.m4 has been
  5526. # generated from the m4 files accompanying Automake X.Y.
  5527. AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
  5528. # AM_SET_CURRENT_AUTOMAKE_VERSION
  5529. # -------------------------------
  5530. # Call AM_AUTOMAKE_VERSION so it can be traced.
  5531. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
  5532. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
  5533. [AM_AUTOMAKE_VERSION([1.9.6])])
  5534. # AM_AUX_DIR_EXPAND -*- Autoconf -*-
  5535. # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
  5536. #
  5537. # This file is free software; the Free Software Foundation
  5538. # gives unlimited permission to copy and/or distribute it,
  5539. # with or without modifications, as long as this notice is preserved.
  5540. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
  5541. # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
  5542. # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
  5543. #
  5544. # Of course, Automake must honor this variable whenever it calls a
  5545. # tool from the auxiliary directory. The problem is that $srcdir (and
  5546. # therefore $ac_aux_dir as well) can be either absolute or relative,
  5547. # depending on how configure is run. This is pretty annoying, since
  5548. # it makes $ac_aux_dir quite unusable in subdirectories: in the top
  5549. # source directory, any form will work fine, but in subdirectories a
  5550. # relative path needs to be adjusted first.
  5551. #
  5552. # $ac_aux_dir/missing
  5553. # fails when called from a subdirectory if $ac_aux_dir is relative
  5554. # $top_srcdir/$ac_aux_dir/missing
  5555. # fails if $ac_aux_dir is absolute,
  5556. # fails when called from a subdirectory in a VPATH build with
  5557. # a relative $ac_aux_dir
  5558. #
  5559. # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
  5560. # are both prefixed by $srcdir. In an in-source build this is usually
  5561. # harmless because $srcdir is `.', but things will broke when you
  5562. # start a VPATH build or use an absolute $srcdir.
  5563. #
  5564. # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
  5565. # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
  5566. # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
  5567. # and then we would define $MISSING as
  5568. # MISSING="\${SHELL} $am_aux_dir/missing"
  5569. # This will work as long as MISSING is not called from configure, because
  5570. # unfortunately $(top_srcdir) has no meaning in configure.
  5571. # However there are other variables, like CC, which are often used in
  5572. # configure, and could therefore not use this "fixed" $ac_aux_dir.
  5573. #
  5574. # Another solution, used here, is to always expand $ac_aux_dir to an
  5575. # absolute PATH. The drawback is that using absolute paths prevent a
  5576. # configured tree to be moved without reconfiguration.
  5577. AC_DEFUN([AM_AUX_DIR_EXPAND],
  5578. [dnl Rely on autoconf to set up CDPATH properly.
  5579. AC_PREREQ([2.50])dnl
  5580. # expand $ac_aux_dir to an absolute path
  5581. am_aux_dir=`cd $ac_aux_dir && pwd`
  5582. ])
  5583. # AM_CONDITIONAL -*- Autoconf -*-
  5584. # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
  5585. # Free Software Foundation, Inc.
  5586. #
  5587. # This file is free software; the Free Software Foundation
  5588. # gives unlimited permission to copy and/or distribute it,
  5589. # with or without modifications, as long as this notice is preserved.
  5590. # serial 7
  5591. # AM_CONDITIONAL(NAME, SHELL-CONDITION)
  5592. # -------------------------------------
  5593. # Define a conditional.
  5594. AC_DEFUN([AM_CONDITIONAL],
  5595. [AC_PREREQ(2.52)dnl
  5596. ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
  5597. [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
  5598. AC_SUBST([$1_TRUE])
  5599. AC_SUBST([$1_FALSE])
  5600. if $2; then
  5601. $1_TRUE=
  5602. $1_FALSE='#'
  5603. else
  5604. $1_TRUE='#'
  5605. $1_FALSE=
  5606. fi
  5607. AC_CONFIG_COMMANDS_PRE(
  5608. [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
  5609. AC_MSG_ERROR([[conditional "$1" was never defined.
  5610. Usually this means the macro was only invoked conditionally.]])
  5611. fi])])
  5612. # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
  5613. # Free Software Foundation, Inc.
  5614. #
  5615. # This file is free software; the Free Software Foundation
  5616. # gives unlimited permission to copy and/or distribute it,
  5617. # with or without modifications, as long as this notice is preserved.
  5618. # serial 8
  5619. # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
  5620. # written in clear, in which case automake, when reading aclocal.m4,
  5621. # will think it sees a *use*, and therefore will trigger all it's
  5622. # C support machinery. Also note that it means that autoscan, seeing
  5623. # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
  5624. # _AM_DEPENDENCIES(NAME)
  5625. # ----------------------
  5626. # See how the compiler implements dependency checking.
  5627. # NAME is "CC", "CXX", "GCJ", or "OBJC".
  5628. # We try a few techniques and use that to set a single cache variable.
  5629. #
  5630. # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
  5631. # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
  5632. # dependency, and given that the user is not expected to run this macro,
  5633. # just rely on AC_PROG_CC.
  5634. AC_DEFUN([_AM_DEPENDENCIES],
  5635. [AC_REQUIRE([AM_SET_DEPDIR])dnl
  5636. AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
  5637. AC_REQUIRE([AM_MAKE_INCLUDE])dnl
  5638. AC_REQUIRE([AM_DEP_TRACK])dnl
  5639. ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
  5640. [$1], CXX, [depcc="$CXX" am_compiler_list=],
  5641. [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
  5642. [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
  5643. [depcc="$$1" am_compiler_list=])
  5644. AC_CACHE_CHECK([dependency style of $depcc],
  5645. [am_cv_$1_dependencies_compiler_type],
  5646. [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  5647. # We make a subdir and do the tests there. Otherwise we can end up
  5648. # making bogus files that we don't know about and never remove. For
  5649. # instance it was reported that on HP-UX the gcc test will end up
  5650. # making a dummy file named `D' -- because `-MD' means `put the output
  5651. # in D'.
  5652. mkdir conftest.dir
  5653. # Copy depcomp to subdir because otherwise we won't find it if we're
  5654. # using a relative directory.
  5655. cp "$am_depcomp" conftest.dir
  5656. cd conftest.dir
  5657. # We will build objects and dependencies in a subdirectory because
  5658. # it helps to detect inapplicable dependency modes. For instance
  5659. # both Tru64's cc and ICC support -MD to output dependencies as a
  5660. # side effect of compilation, but ICC will put the dependencies in
  5661. # the current directory while Tru64 will put them in the object
  5662. # directory.
  5663. mkdir sub
  5664. am_cv_$1_dependencies_compiler_type=none
  5665. if test "$am_compiler_list" = ""; then
  5666. am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
  5667. fi
  5668. for depmode in $am_compiler_list; do
  5669. # Setup a source with many dependencies, because some compilers
  5670. # like to wrap large dependency lists on column 80 (with \), and
  5671. # we should not choose a depcomp mode which is confused by this.
  5672. #
  5673. # We need to recreate these files for each test, as the compiler may
  5674. # overwrite some of them when testing with obscure command lines.
  5675. # This happens at least with the AIX C compiler.
  5676. : > sub/conftest.c
  5677. for i in 1 2 3 4 5 6; do
  5678. echo '#include "conftst'$i'.h"' >> sub/conftest.c
  5679. # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
  5680. # Solaris 8's {/usr,}/bin/sh.
  5681. touch sub/conftst$i.h
  5682. done
  5683. echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
  5684. case $depmode in
  5685. nosideeffect)
  5686. # after this tag, mechanisms are not by side-effect, so they'll
  5687. # only be used when explicitly requested
  5688. if test "x$enable_dependency_tracking" = xyes; then
  5689. continue
  5690. else
  5691. break
  5692. fi
  5693. ;;
  5694. none) break ;;
  5695. esac
  5696. # We check with `-c' and `-o' for the sake of the "dashmstdout"
  5697. # mode. It turns out that the SunPro C++ compiler does not properly
  5698. # handle `-M -o', and we need to detect this.
  5699. if depmode=$depmode \
  5700. source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
  5701. depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
  5702. $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
  5703. >/dev/null 2>conftest.err &&
  5704. grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
  5705. grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
  5706. ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
  5707. # icc doesn't choke on unknown options, it will just issue warnings
  5708. # or remarks (even with -Werror). So we grep stderr for any message
  5709. # that says an option was ignored or not supported.
  5710. # When given -MP, icc 7.0 and 7.1 complain thusly:
  5711. # icc: Command line warning: ignoring option '-M'; no argument required
  5712. # The diagnosis changed in icc 8.0:
  5713. # icc: Command line remark: option '-MP' not supported
  5714. if (grep 'ignoring option' conftest.err ||
  5715. grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
  5716. am_cv_$1_dependencies_compiler_type=$depmode
  5717. break
  5718. fi
  5719. fi
  5720. done
  5721. cd ..
  5722. rm -rf conftest.dir
  5723. else
  5724. am_cv_$1_dependencies_compiler_type=none
  5725. fi
  5726. ])
  5727. AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
  5728. AM_CONDITIONAL([am__fastdep$1], [
  5729. test "x$enable_dependency_tracking" != xno \
  5730. && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
  5731. ])
  5732. # AM_SET_DEPDIR
  5733. # -------------
  5734. # Choose a directory name for dependency files.
  5735. # This macro is AC_REQUIREd in _AM_DEPENDENCIES
  5736. AC_DEFUN([AM_SET_DEPDIR],
  5737. [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  5738. AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
  5739. ])
  5740. # AM_DEP_TRACK
  5741. # ------------
  5742. AC_DEFUN([AM_DEP_TRACK],
  5743. [AC_ARG_ENABLE(dependency-tracking,
  5744. [ --disable-dependency-tracking speeds up one-time build
  5745. --enable-dependency-tracking do not reject slow dependency extractors])
  5746. if test "x$enable_dependency_tracking" != xno; then
  5747. am_depcomp="$ac_aux_dir/depcomp"
  5748. AMDEPBACKSLASH='\'
  5749. fi
  5750. AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
  5751. AC_SUBST([AMDEPBACKSLASH])
  5752. ])
  5753. # Generate code to set up dependency tracking. -*- Autoconf -*-
  5754. # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
  5755. # Free Software Foundation, Inc.
  5756. #
  5757. # This file is free software; the Free Software Foundation
  5758. # gives unlimited permission to copy and/or distribute it,
  5759. # with or without modifications, as long as this notice is preserved.
  5760. #serial 3
  5761. # _AM_OUTPUT_DEPENDENCY_COMMANDS
  5762. # ------------------------------
  5763. AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
  5764. [for mf in $CONFIG_FILES; do
  5765. # Strip MF so we end up with the name of the file.
  5766. mf=`echo "$mf" | sed -e 's/:.*$//'`
  5767. # Check whether this is an Automake generated Makefile or not.
  5768. # We used to match only the files named `Makefile.in', but
  5769. # some people rename them; so instead we look at the file content.
  5770. # Grep'ing the first line is not enough: some people post-process
  5771. # each Makefile.in and add a new line on top of each file to say so.
  5772. # So let's grep whole file.
  5773. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
  5774. dirpart=`AS_DIRNAME("$mf")`
  5775. else
  5776. continue
  5777. fi
  5778. # Extract the definition of DEPDIR, am__include, and am__quote
  5779. # from the Makefile without running `make'.
  5780. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
  5781. test -z "$DEPDIR" && continue
  5782. am__include=`sed -n 's/^am__include = //p' < "$mf"`
  5783. test -z "am__include" && continue
  5784. am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
  5785. # When using ansi2knr, U may be empty or an underscore; expand it
  5786. U=`sed -n 's/^U = //p' < "$mf"`
  5787. # Find all dependency output files, they are included files with
  5788. # $(DEPDIR) in their names. We invoke sed twice because it is the
  5789. # simplest approach to changing $(DEPDIR) to its actual value in the
  5790. # expansion.
  5791. for file in `sed -n "
  5792. s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
  5793. sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
  5794. # Make sure the directory exists.
  5795. test -f "$dirpart/$file" && continue
  5796. fdir=`AS_DIRNAME(["$file"])`
  5797. AS_MKDIR_P([$dirpart/$fdir])
  5798. # echo "creating $dirpart/$file"
  5799. echo '# dummy' > "$dirpart/$file"
  5800. done
  5801. done
  5802. ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
  5803. # AM_OUTPUT_DEPENDENCY_COMMANDS
  5804. # -----------------------------
  5805. # This macro should only be invoked once -- use via AC_REQUIRE.
  5806. #
  5807. # This code is only required when automatic dependency tracking
  5808. # is enabled. FIXME. This creates each `.P' file that we will
  5809. # need in order to bootstrap the dependency handling code.
  5810. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
  5811. [AC_CONFIG_COMMANDS([depfiles],
  5812. [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
  5813. [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
  5814. ])
  5815. # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
  5816. # Free Software Foundation, Inc.
  5817. #
  5818. # This file is free software; the Free Software Foundation
  5819. # gives unlimited permission to copy and/or distribute it,
  5820. # with or without modifications, as long as this notice is preserved.
  5821. # serial 8
  5822. # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
  5823. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
  5824. # Do all the work for Automake. -*- Autoconf -*-
  5825. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
  5826. # Free Software Foundation, Inc.
  5827. #
  5828. # This file is free software; the Free Software Foundation
  5829. # gives unlimited permission to copy and/or distribute it,
  5830. # with or without modifications, as long as this notice is preserved.
  5831. # serial 12
  5832. # This macro actually does too much. Some checks are only needed if
  5833. # your package does certain things. But this isn't really a big deal.
  5834. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
  5835. # AM_INIT_AUTOMAKE([OPTIONS])
  5836. # -----------------------------------------------
  5837. # The call with PACKAGE and VERSION arguments is the old style
  5838. # call (pre autoconf-2.50), which is being phased out. PACKAGE
  5839. # and VERSION should now be passed to AC_INIT and removed from
  5840. # the call to AM_INIT_AUTOMAKE.
  5841. # We support both call styles for the transition. After
  5842. # the next Automake release, Autoconf can make the AC_INIT
  5843. # arguments mandatory, and then we can depend on a new Autoconf
  5844. # release and drop the old call support.
  5845. AC_DEFUN([AM_INIT_AUTOMAKE],
  5846. [AC_PREREQ([2.58])dnl
  5847. dnl Autoconf wants to disallow AM_ names. We explicitly allow
  5848. dnl the ones we care about.
  5849. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
  5850. AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
  5851. AC_REQUIRE([AC_PROG_INSTALL])dnl
  5852. # test to see if srcdir already configured
  5853. if test "`cd $srcdir && pwd`" != "`pwd`" &&
  5854. test -f $srcdir/config.status; then
  5855. AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  5856. fi
  5857. # test whether we have cygpath
  5858. if test -z "$CYGPATH_W"; then
  5859. if (cygpath --version) >/dev/null 2>/dev/null; then
  5860. CYGPATH_W='cygpath -w'
  5861. else
  5862. CYGPATH_W=echo
  5863. fi
  5864. fi
  5865. AC_SUBST([CYGPATH_W])
  5866. # Define the identity of the package.
  5867. dnl Distinguish between old-style and new-style calls.
  5868. m4_ifval([$2],
  5869. [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  5870. AC_SUBST([PACKAGE], [$1])dnl
  5871. AC_SUBST([VERSION], [$2])],
  5872. [_AM_SET_OPTIONS([$1])dnl
  5873. AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  5874. AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
  5875. _AM_IF_OPTION([no-define],,
  5876. [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
  5877. AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
  5878. # Some tools Automake needs.
  5879. AC_REQUIRE([AM_SANITY_CHECK])dnl
  5880. AC_REQUIRE([AC_ARG_PROGRAM])dnl
  5881. AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
  5882. AM_MISSING_PROG(AUTOCONF, autoconf)
  5883. AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
  5884. AM_MISSING_PROG(AUTOHEADER, autoheader)
  5885. AM_MISSING_PROG(MAKEINFO, makeinfo)
  5886. AM_PROG_INSTALL_SH
  5887. AM_PROG_INSTALL_STRIP
  5888. AC_REQUIRE([AM_PROG_MKDIR_P])dnl
  5889. # We need awk for the "check" target. The system "awk" is bad on
  5890. # some platforms.
  5891. AC_REQUIRE([AC_PROG_AWK])dnl
  5892. AC_REQUIRE([AC_PROG_MAKE_SET])dnl
  5893. AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  5894. _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
  5895. [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
  5896. [_AM_PROG_TAR([v7])])])
  5897. _AM_IF_OPTION([no-dependencies],,
  5898. [AC_PROVIDE_IFELSE([AC_PROG_CC],
  5899. [_AM_DEPENDENCIES(CC)],
  5900. [define([AC_PROG_CC],
  5901. defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
  5902. AC_PROVIDE_IFELSE([AC_PROG_CXX],
  5903. [_AM_DEPENDENCIES(CXX)],
  5904. [define([AC_PROG_CXX],
  5905. defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
  5906. ])
  5907. ])
  5908. # When config.status generates a header, we must update the stamp-h file.
  5909. # This file resides in the same directory as the config header
  5910. # that is generated. The stamp files are numbered to have different names.
  5911. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
  5912. # loop where config.status creates the headers, so we can generate
  5913. # our stamp files there.
  5914. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
  5915. [# Compute $1's index in $config_headers.
  5916. _am_stamp_count=1
  5917. for _am_header in $config_headers :; do
  5918. case $_am_header in
  5919. $1 | $1:* )
  5920. break ;;
  5921. * )
  5922. _am_stamp_count=`expr $_am_stamp_count + 1` ;;
  5923. esac
  5924. done
  5925. echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
  5926. # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
  5927. #
  5928. # This file is free software; the Free Software Foundation
  5929. # gives unlimited permission to copy and/or distribute it,
  5930. # with or without modifications, as long as this notice is preserved.
  5931. # AM_PROG_INSTALL_SH
  5932. # ------------------
  5933. # Define $install_sh.
  5934. AC_DEFUN([AM_PROG_INSTALL_SH],
  5935. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  5936. install_sh=${install_sh-"$am_aux_dir/install-sh"}
  5937. AC_SUBST(install_sh)])
  5938. # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
  5939. #
  5940. # This file is free software; the Free Software Foundation
  5941. # gives unlimited permission to copy and/or distribute it,
  5942. # with or without modifications, as long as this notice is preserved.
  5943. # serial 2
  5944. # Check whether the underlying file-system supports filenames
  5945. # with a leading dot. For instance MS-DOS doesn't.
  5946. AC_DEFUN([AM_SET_LEADING_DOT],
  5947. [rm -rf .tst 2>/dev/null
  5948. mkdir .tst 2>/dev/null
  5949. if test -d .tst; then
  5950. am__leading_dot=.
  5951. else
  5952. am__leading_dot=_
  5953. fi
  5954. rmdir .tst 2>/dev/null
  5955. AC_SUBST([am__leading_dot])])
  5956. # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
  5957. # From Jim Meyering
  5958. # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
  5959. # Free Software Foundation, Inc.
  5960. #
  5961. # This file is free software; the Free Software Foundation
  5962. # gives unlimited permission to copy and/or distribute it,
  5963. # with or without modifications, as long as this notice is preserved.
  5964. # serial 4
  5965. AC_DEFUN([AM_MAINTAINER_MODE],
  5966. [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
  5967. dnl maintainer-mode is disabled by default
  5968. AC_ARG_ENABLE(maintainer-mode,
  5969. [ --enable-maintainer-mode enable make rules and dependencies not useful
  5970. (and sometimes confusing) to the casual installer],
  5971. USE_MAINTAINER_MODE=$enableval,
  5972. USE_MAINTAINER_MODE=no)
  5973. AC_MSG_RESULT([$USE_MAINTAINER_MODE])
  5974. AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
  5975. MAINT=$MAINTAINER_MODE_TRUE
  5976. AC_SUBST(MAINT)dnl
  5977. ]
  5978. )
  5979. AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
  5980. # Check to see how 'make' treats includes. -*- Autoconf -*-
  5981. # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
  5982. #
  5983. # This file is free software; the Free Software Foundation
  5984. # gives unlimited permission to copy and/or distribute it,
  5985. # with or without modifications, as long as this notice is preserved.
  5986. # serial 3
  5987. # AM_MAKE_INCLUDE()
  5988. # -----------------
  5989. # Check to see how make treats includes.
  5990. AC_DEFUN([AM_MAKE_INCLUDE],
  5991. [am_make=${MAKE-make}
  5992. cat > confinc << 'END'
  5993. am__doit:
  5994. @echo done
  5995. .PHONY: am__doit
  5996. END
  5997. # If we don't find an include directive, just comment out the code.
  5998. AC_MSG_CHECKING([for style of include used by $am_make])
  5999. am__include="#"
  6000. am__quote=
  6001. _am_result=none
  6002. # First try GNU make style include.
  6003. echo "include confinc" > confmf
  6004. # We grep out `Entering directory' and `Leaving directory'
  6005. # messages which can occur if `w' ends up in MAKEFLAGS.
  6006. # In particular we don't look at `^make:' because GNU make might
  6007. # be invoked under some other name (usually "gmake"), in which
  6008. # case it prints its new name instead of `make'.
  6009. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
  6010. am__include=include
  6011. am__quote=
  6012. _am_result=GNU
  6013. fi
  6014. # Now try BSD make style include.
  6015. if test "$am__include" = "#"; then
  6016. echo '.include "confinc"' > confmf
  6017. if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
  6018. am__include=.include
  6019. am__quote="\""
  6020. _am_result=BSD
  6021. fi
  6022. fi
  6023. AC_SUBST([am__include])
  6024. AC_SUBST([am__quote])
  6025. AC_MSG_RESULT([$_am_result])
  6026. rm -f confinc confmf
  6027. ])
  6028. # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
  6029. # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
  6030. # Free Software Foundation, Inc.
  6031. #
  6032. # This file is free software; the Free Software Foundation
  6033. # gives unlimited permission to copy and/or distribute it,
  6034. # with or without modifications, as long as this notice is preserved.
  6035. # serial 4
  6036. # AM_MISSING_PROG(NAME, PROGRAM)
  6037. # ------------------------------
  6038. AC_DEFUN([AM_MISSING_PROG],
  6039. [AC_REQUIRE([AM_MISSING_HAS_RUN])
  6040. $1=${$1-"${am_missing_run}$2"}
  6041. AC_SUBST($1)])
  6042. # AM_MISSING_HAS_RUN
  6043. # ------------------
  6044. # Define MISSING if not defined so far and test if it supports --run.
  6045. # If it does, set am_missing_run to use it, otherwise, to nothing.
  6046. AC_DEFUN([AM_MISSING_HAS_RUN],
  6047. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  6048. test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
  6049. # Use eval to expand $SHELL
  6050. if eval "$MISSING --run true"; then
  6051. am_missing_run="$MISSING --run "
  6052. else
  6053. am_missing_run=
  6054. AC_MSG_WARN([`missing' script is too old or missing])
  6055. fi
  6056. ])
  6057. # Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
  6058. #
  6059. # This file is free software; the Free Software Foundation
  6060. # gives unlimited permission to copy and/or distribute it,
  6061. # with or without modifications, as long as this notice is preserved.
  6062. # AM_PROG_MKDIR_P
  6063. # ---------------
  6064. # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
  6065. #
  6066. # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
  6067. # created by `make install' are always world readable, even if the
  6068. # installer happens to have an overly restrictive umask (e.g. 077).
  6069. # This was a mistake. There are at least two reasons why we must not
  6070. # use `-m 0755':
  6071. # - it causes special bits like SGID to be ignored,
  6072. # - it may be too restrictive (some setups expect 775 directories).
  6073. #
  6074. # Do not use -m 0755 and let people choose whatever they expect by
  6075. # setting umask.
  6076. #
  6077. # We cannot accept any implementation of `mkdir' that recognizes `-p'.
  6078. # Some implementations (such as Solaris 8's) are not thread-safe: if a
  6079. # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
  6080. # concurrently, both version can detect that a/ is missing, but only
  6081. # one can create it and the other will error out. Consequently we
  6082. # restrict ourselves to GNU make (using the --version option ensures
  6083. # this.)
  6084. AC_DEFUN([AM_PROG_MKDIR_P],
  6085. [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
  6086. # We used to keeping the `.' as first argument, in order to
  6087. # allow $(mkdir_p) to be used without argument. As in
  6088. # $(mkdir_p) $(somedir)
  6089. # where $(somedir) is conditionally defined. However this is wrong
  6090. # for two reasons:
  6091. # 1. if the package is installed by a user who cannot write `.'
  6092. # make install will fail,
  6093. # 2. the above comment should most certainly read
  6094. # $(mkdir_p) $(DESTDIR)$(somedir)
  6095. # so it does not work when $(somedir) is undefined and
  6096. # $(DESTDIR) is not.
  6097. # To support the latter case, we have to write
  6098. # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
  6099. # so the `.' trick is pointless.
  6100. mkdir_p='mkdir -p --'
  6101. else
  6102. # On NextStep and OpenStep, the `mkdir' command does not
  6103. # recognize any option. It will interpret all options as
  6104. # directories to create, and then abort because `.' already
  6105. # exists.
  6106. for d in ./-p ./--version;
  6107. do
  6108. test -d $d && rmdir $d
  6109. done
  6110. # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
  6111. if test -f "$ac_aux_dir/mkinstalldirs"; then
  6112. mkdir_p='$(mkinstalldirs)'
  6113. else
  6114. mkdir_p='$(install_sh) -d'
  6115. fi
  6116. fi
  6117. AC_SUBST([mkdir_p])])
  6118. # Helper functions for option handling. -*- Autoconf -*-
  6119. # Copyright (C) 2001, 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. # serial 3
  6125. # _AM_MANGLE_OPTION(NAME)
  6126. # -----------------------
  6127. AC_DEFUN([_AM_MANGLE_OPTION],
  6128. [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
  6129. # _AM_SET_OPTION(NAME)
  6130. # ------------------------------
  6131. # Set option NAME. Presently that only means defining a flag for this option.
  6132. AC_DEFUN([_AM_SET_OPTION],
  6133. [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
  6134. # _AM_SET_OPTIONS(OPTIONS)
  6135. # ----------------------------------
  6136. # OPTIONS is a space-separated list of Automake options.
  6137. AC_DEFUN([_AM_SET_OPTIONS],
  6138. [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
  6139. # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
  6140. # -------------------------------------------
  6141. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  6142. AC_DEFUN([_AM_IF_OPTION],
  6143. [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
  6144. # Check to make sure that the build environment is sane. -*- Autoconf -*-
  6145. # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
  6146. # Free Software Foundation, Inc.
  6147. #
  6148. # This file is free software; the Free Software Foundation
  6149. # gives unlimited permission to copy and/or distribute it,
  6150. # with or without modifications, as long as this notice is preserved.
  6151. # serial 4
  6152. # AM_SANITY_CHECK
  6153. # ---------------
  6154. AC_DEFUN([AM_SANITY_CHECK],
  6155. [AC_MSG_CHECKING([whether build environment is sane])
  6156. # Just in case
  6157. sleep 1
  6158. echo timestamp > conftest.file
  6159. # Do `set' in a subshell so we don't clobber the current shell's
  6160. # arguments. Must try -L first in case configure is actually a
  6161. # symlink; some systems play weird games with the mod time of symlinks
  6162. # (eg FreeBSD returns the mod time of the symlink's containing
  6163. # directory).
  6164. if (
  6165. set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
  6166. if test "$[*]" = "X"; then
  6167. # -L didn't work.
  6168. set X `ls -t $srcdir/configure conftest.file`
  6169. fi
  6170. rm -f conftest.file
  6171. if test "$[*]" != "X $srcdir/configure conftest.file" \
  6172. && test "$[*]" != "X conftest.file $srcdir/configure"; then
  6173. # If neither matched, then we have a broken ls. This can happen
  6174. # if, for instance, CONFIG_SHELL is bash and it inherits a
  6175. # broken ls alias from the environment. This has actually
  6176. # happened. Such a system could not be considered "sane".
  6177. AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
  6178. alias in your environment])
  6179. fi
  6180. test "$[2]" = conftest.file
  6181. )
  6182. then
  6183. # Ok.
  6184. :
  6185. else
  6186. AC_MSG_ERROR([newly created file is older than distributed files!
  6187. Check your system clock])
  6188. fi
  6189. AC_MSG_RESULT(yes)])
  6190. # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
  6191. #
  6192. # This file is free software; the Free Software Foundation
  6193. # gives unlimited permission to copy and/or distribute it,
  6194. # with or without modifications, as long as this notice is preserved.
  6195. # AM_PROG_INSTALL_STRIP
  6196. # ---------------------
  6197. # One issue with vendor `install' (even GNU) is that you can't
  6198. # specify the program used to strip binaries. This is especially
  6199. # annoying in cross-compiling environments, where the build's strip
  6200. # is unlikely to handle the host's binaries.
  6201. # Fortunately install-sh will honor a STRIPPROG variable, so we
  6202. # always use install-sh in `make install-strip', and initialize
  6203. # STRIPPROG with the value of the STRIP variable (set by the user).
  6204. AC_DEFUN([AM_PROG_INSTALL_STRIP],
  6205. [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  6206. # Installed binaries are usually stripped using `strip' when the user
  6207. # run `make install-strip'. However `strip' might not be the right
  6208. # tool to use in cross-compilation environments, therefore Automake
  6209. # will honor the `STRIP' environment variable to overrule this program.
  6210. dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
  6211. if test "$cross_compiling" != no; then
  6212. AC_CHECK_TOOL([STRIP], [strip], :)
  6213. fi
  6214. INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
  6215. AC_SUBST([INSTALL_STRIP_PROGRAM])])
  6216. # Check how to create a tarball. -*- Autoconf -*-
  6217. # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
  6218. #
  6219. # This file is free software; the Free Software Foundation
  6220. # gives unlimited permission to copy and/or distribute it,
  6221. # with or without modifications, as long as this notice is preserved.
  6222. # serial 2
  6223. # _AM_PROG_TAR(FORMAT)
  6224. # --------------------
  6225. # Check how to create a tarball in format FORMAT.
  6226. # FORMAT should be one of `v7', `ustar', or `pax'.
  6227. #
  6228. # Substitute a variable $(am__tar) that is a command
  6229. # writing to stdout a FORMAT-tarball containing the directory
  6230. # $tardir.
  6231. # tardir=directory && $(am__tar) > result.tar
  6232. #
  6233. # Substitute a variable $(am__untar) that extract such
  6234. # a tarball read from stdin.
  6235. # $(am__untar) < result.tar
  6236. AC_DEFUN([_AM_PROG_TAR],
  6237. [# Always define AMTAR for backward compatibility.
  6238. AM_MISSING_PROG([AMTAR], [tar])
  6239. m4_if([$1], [v7],
  6240. [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
  6241. [m4_case([$1], [ustar],, [pax],,
  6242. [m4_fatal([Unknown tar format])])
  6243. AC_MSG_CHECKING([how to create a $1 tar archive])
  6244. # Loop over all known methods to create a tar archive until one works.
  6245. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
  6246. _am_tools=${am_cv_prog_tar_$1-$_am_tools}
  6247. # Do not fold the above two line into one, because Tru64 sh and
  6248. # Solaris sh will not grok spaces in the rhs of `-'.
  6249. for _am_tool in $_am_tools
  6250. do
  6251. case $_am_tool in
  6252. gnutar)
  6253. for _am_tar in tar gnutar gtar;
  6254. do
  6255. AM_RUN_LOG([$_am_tar --version]) && break
  6256. done
  6257. am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
  6258. am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
  6259. am__untar="$_am_tar -xf -"
  6260. ;;
  6261. plaintar)
  6262. # Must skip GNU tar: if it does not support --format= it doesn't create
  6263. # ustar tarball either.
  6264. (tar --version) >/dev/null 2>&1 && continue
  6265. am__tar='tar chf - "$$tardir"'
  6266. am__tar_='tar chf - "$tardir"'
  6267. am__untar='tar xf -'
  6268. ;;
  6269. pax)
  6270. am__tar='pax -L -x $1 -w "$$tardir"'
  6271. am__tar_='pax -L -x $1 -w "$tardir"'
  6272. am__untar='pax -r'
  6273. ;;
  6274. cpio)
  6275. am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
  6276. am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
  6277. am__untar='cpio -i -H $1 -d'
  6278. ;;
  6279. none)
  6280. am__tar=false
  6281. am__tar_=false
  6282. am__untar=false
  6283. ;;
  6284. esac
  6285. # If the value was cached, stop now. We just wanted to have am__tar
  6286. # and am__untar set.
  6287. test -n "${am_cv_prog_tar_$1}" && break
  6288. # tar/untar a dummy directory, and stop if the command works
  6289. rm -rf conftest.dir
  6290. mkdir conftest.dir
  6291. echo GrepMe > conftest.dir/file
  6292. AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
  6293. rm -rf conftest.dir
  6294. if test -s conftest.tar; then
  6295. AM_RUN_LOG([$am__untar <conftest.tar])
  6296. grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
  6297. fi
  6298. done
  6299. rm -rf conftest.dir
  6300. AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
  6301. AC_MSG_RESULT([$am_cv_prog_tar_$1])])
  6302. AC_SUBST([am__tar])
  6303. AC_SUBST([am__untar])
  6304. ]) # _AM_PROG_TAR
  6305. m4_include([acinclude.m4])