KVirc – next generation IRC client
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

acinclude.m4 353KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195
  1. dnl # // ##################################################################################################################
  2. dnl # // ## Initialization
  3. dnl # // ##################################################################################################################
  4. AC_DEFUN([AC_SS_INIT_VARIABLES],
  5. [
  6. SS_BUILD_FLAGS=""
  7. SS_BUILD_NUMBER=""
  8. dnl # // X Stuff
  9. SS_X_INCDIR=""
  10. SS_X_LIBDIR=""
  11. SS_X_LDFLAGS=""
  12. SS_X_CPPFLAGS=""
  13. dnl # // Qt Stuff
  14. SS_QT3_GENERAL_DIR=""
  15. SS_QT3_INCDIR=""
  16. SS_QT3_LIBDIR=""
  17. SS_QT3_MOC=""
  18. dnl # // KDE Stuff
  19. SS_KDE_REQUESTED="no"
  20. SS_KDE_GENERAL_DIR=""
  21. SS_KDE_INCDIR=""
  22. SS_KDE_LIBDIR=""
  23. SS_KDE_SERVICESDIR=""
  24. SS_KDE_ICONS32DIR=""
  25. dnl # // Perl stuff
  26. SS_PERL_ENABLE="no"
  27. SS_PERL_CCFLAGS=""
  28. SS_PERL_LDFLAGS=""
  29. SS_PERL_BINARY="true"
  30. dnl # // CXXFLAGS, will be set by AC_SS_CXXFLAGS
  31. dnl # CXXFLAGS=""
  32. dnl Build flags:
  33. dnl g - Debug version
  34. dnl h - Memory checks
  35. dnl m - Memory profiling
  36. dnl s - System memmove
  37. dnl S - splash screen
  38. dnl o = openssl support
  39. dnl b - Big channels
  40. dnl x - ix86 asm
  41. dnl T - tips
  42. dnl c - crypt
  43. dnl I - IPC
  44. dnl G - GSM codec
  45. dnl 8 - local 8 bit
  46. dnl A - dcc sound audio support
  47. dnl a - ignore sigalarm
  48. dnl i - ipv6
  49. dnl B - big endian
  50. dnl k - KDE
  51. dnl p - pseudo transparency
  52. dnl e - Esound daemon support
  53. dnl r - Arts daemon support
  54. dnl f - Audiofile support
  55. dnl P - profiling support
  56. dnl p - perl scripting support
  57. ])
  58. dnl # // ##################################################################################################################
  59. dnl # // ## OUTPUT MACROS
  60. dnl # // ##################################################################################################################
  61. AC_DEFUN([AC_CROSS_COLOR],
  62. [
  63. TPUT=0
  64. PRINTF=0
  65. COLOR=0
  66. IFS_OLD=$IFS
  67. IFS=":"
  68. for i in $PATH; do
  69. if test -x "$i/tput"; then
  70. TPUT=1
  71. fi
  72. done
  73. type printf >/dev/null 2>&1 && PRINTF=1
  74. for i in $PATH; do
  75. if test -x "$i/printf"; then
  76. PRINTF=1
  77. fi
  78. done
  79. if test "$TPUT" = "1" -o "$PRINTF" = "1"; then
  80. COLOR=1
  81. fi
  82. if test "$COLOR" = 1; then
  83. if test "$TPUT" = "1"; then
  84. if test "$1" = "1"; then
  85. tput bold
  86. else
  87. tput sgr0
  88. fi
  89. if test "$2" != ""; then
  90. tput setaf $2
  91. fi
  92. elif test "$PRINTF" = "1"; then
  93. if test "$2" != ""; then
  94. printf "\033\1330$1;3$2m"
  95. fi
  96. fi
  97. fi
  98. IFS=$IFS_OLD
  99. ])
  100. AC_DEFUN([AC_SS_HEADER],
  101. [
  102. AC_CROSS_COLOR([1],[2])
  103. echo "################################################################################"
  104. echo "### $1"
  105. echo "################################################################################"
  106. AC_CROSS_COLOR([0],[9])
  107. ])
  108. AC_DEFUN([AC_SS_SECTION],
  109. [
  110. AC_CROSS_COLOR([1],[3])
  111. echo "### $1"
  112. AC_CROSS_COLOR([0],[9])
  113. ])
  114. AC_DEFUN([AC_SS_SET_REDINK],
  115. [
  116. AC_CROSS_COLOR([1],[1])
  117. ])
  118. AC_DEFUN([AC_SS_SET_GREENINK],
  119. [
  120. AC_CROSS_COLOR([1],[2])
  121. ])
  122. AC_DEFUN([AC_SS_SET_NORMALINK],
  123. [
  124. AC_CROSS_COLOR([0],[9])
  125. ])
  126. dnl # // ##################################################################################################################
  127. dnl # // ## FILE LOOKUP MACROS
  128. dnl # // ##################################################################################################################
  129. AC_DEFUN([AC_SS_FIND_FILE_PATH],
  130. [
  131. $3="FAILED"
  132. for a_dir in $2; do
  133. for a_file in $1; do
  134. if test -r "$a_dir/$a_file"; then
  135. $3=$(echo "$a_dir" | sed -e 's/\/\.\//\//g' | sed -e 's/\/\//\//g' | sed -e 's/\/\.\//\//g' | sed -e 's/\/\//\//g')
  136. break 2
  137. fi
  138. done
  139. done
  140. ])
  141. AC_DEFUN([AC_SS_FIND_FILE_PATH_EXT],
  142. [
  143. $4="FAILED"
  144. for a_dir in $2; do
  145. for a_semidir in $3; do
  146. for a_file in $1; do
  147. if test -r "$a_dir/$a_semidir/$a_file"; then
  148. $4=$(echo "$a_dir/$a_semidir" | sed -e 's/\/\.\//\//g' | sed -e 's/\/\//\//g' | sed -e 's/\/\.\//\//g' | sed -e 's/\/\//\//g')
  149. break 3
  150. fi
  151. done
  152. done
  153. done
  154. ])
  155. dnl # // ##################################################################################################################
  156. dnl # // ## BASIC COMPILER FLAGS
  157. dnl # // ##################################################################################################################
  158. AC_DEFUN([AC_SS_CXXFLAGS_DEBUG_SYMBOLS],
  159. [
  160. dnl # // Checks if the --with-debug-symbols option has been passed to configure
  161. dnl # // adds -g to SS_CXXFLAGS
  162. dnl # // adds g to SS_BUILD_FLAGS
  163. AC_MSG_CHECKING([if you want the debug symbols])
  164. SS_LOCAL_ADD_DEBUG_SYMBOLS=""
  165. AC_ARG_ENABLE(debug,
  166. AC_HELP_STRING([--enable-debug],[Compile an executable suitable for debugging]),
  167. [SS_LOCAL_ADD_DEBUG_SYMBOLS="true"])
  168. if test -n "$SS_LOCAL_ADD_DEBUG_SYMBOLS"; then
  169. AC_MSG_RESULT([yes])
  170. if test -n "$SS_CXXFLAGS"; then
  171. SS_CXXFLAGS="$SS_CXXFLAGS -g"
  172. else
  173. SS_CXXFLAGS="-g"
  174. fi
  175. SS_BUILD_FLAGS="g$SS_BUILD_FLAGS"
  176. else
  177. AC_MSG_RESULT([no])
  178. fi
  179. ])
  180. AC_DEFUN([AC_SS_CXXFLAGS_PIPES],
  181. [
  182. dnl # // Checks if the --with-pipes option has been passed to configure
  183. dnl # // adds -pipe to CXXFLAGS
  184. AC_MSG_CHECKING([if you want to use pipes for compilation])
  185. SS_LOCAL_USE_PIPES=""
  186. AC_ARG_ENABLE(pipes,
  187. AC_HELP_STRING([--enable-pipes],[Use pipes instead of files for the compilation]),
  188. [SS_LOCAL_USE_PIPES="true"])
  189. if test -n "$SS_LOCAL_USE_PIPES"; then
  190. AC_MSG_RESULT([yes])
  191. if test -n "$SS_CXXFLAGS"; then
  192. SS_CXXFLAGS="$SS_CXXFLAGS -pipe"
  193. else
  194. SS_CXXFLAGS="-pipe"
  195. fi
  196. else
  197. AC_MSG_RESULT([no])
  198. fi
  199. ])
  200. AC_DEFUN([AC_SS_CXXFLAGS_PROFILING],
  201. [
  202. AC_MSG_CHECKING([if you want the profiling information])
  203. SS_LOCAL_ADD_PROFILING=""
  204. AC_ARG_ENABLE(profiling,
  205. AC_HELP_STRING([--enable-profiling],[Compile an executable suitable for profiling]),
  206. [SS_LOCAL_ADD_PROFILING="true"])
  207. if test -n "$SS_LOCAL_ADD_PROFILING"; then
  208. AC_MSG_RESULT([yes])
  209. if test -n "$SS_CXXFLAGS"; then
  210. SS_CXXFLAGS="$SS_CXXFLAGS -pg"
  211. else
  212. SS_CXXFLAGS="-pg"
  213. fi
  214. if test -n "$SS_LDFLAGS"; then
  215. SS_LDFLAGS="$SS_LDFLAGS -pg"
  216. else
  217. SS_LDFLAGS="-pg"
  218. fi
  219. SS_BUILD_FLAGS="P$SS_BUILD_FLAGS"
  220. else
  221. AC_MSG_RESULT([no])
  222. fi
  223. ])
  224. AC_DEFUN([AC_SS_CXXFLAGS_FNORTTI],
  225. [
  226. AC_MSG_CHECKING([if you want to use -fno-rtti])
  227. SS_LOCAL_FNORTTI=""
  228. AC_ARG_ENABLE(fno-rtti,
  229. AC_HELP_STRING([--enable-fno-rtti],[Disable runtime type information (dangerous)]),
  230. SS_LOCAL_FNORTTI="true")
  231. if test -n "$SS_LOCAL_FNORTTI"; then
  232. AC_MSG_RESULT([yes])
  233. if test -n "$SS_CXXFLAGS"; then
  234. SS_CXXFLAGS="$SS_CXXFLAGS -fno-rtti"
  235. else
  236. SS_CXXFLAGS="-fno-rtti"
  237. fi
  238. else
  239. AC_MSG_RESULT([no])
  240. fi
  241. ])
  242. AC_DEFUN([AC_SS_CXXFLAGS_ANSI],
  243. [
  244. SS_ANSI_COMPILATION=""
  245. AC_MSG_CHECKING([if you want a strict ansi compilation])
  246. AC_ARG_ENABLE(ansi,
  247. AC_HELP_STRING([--enable-ansi],[Strict ansi compilation (might not compile)]),
  248. SS_ANSI_COMPILATION="true")
  249. if test -n "$SS_ANSI_COMPILATION"; then
  250. AC_MSG_RESULT([yes])
  251. if test -n "$SS_CXXFLAGS"; then
  252. SS_CXXFLAGS="$SS_CXXFLAGS -ansi"
  253. else
  254. SS_CXXFLAGS="-ansi"
  255. fi
  256. else
  257. AC_MSG_RESULT([no])
  258. fi
  259. ])
  260. AC_DEFUN([AC_SS_CXXFLAGS_WALL],
  261. [
  262. SS_WALL_COMPILATION=""
  263. AC_MSG_CHECKING([if you want gcc to be paranoic])
  264. AC_ARG_ENABLE(wall,
  265. AC_HELP_STRING([--enable-wall],[Make gcc be paranoic (might not compile)]),
  266. SS_WALL_COMPILATION="true")
  267. if test -n "$SS_WALL_COMPILATION"; then
  268. AC_MSG_RESULT([yes])
  269. if test -n "$SS_CXXFLAGS"; then
  270. SS_CXXFLAGS="$SS_CXXFLAGS -Wall"
  271. else
  272. SS_CXXFLAGS="-Wall"
  273. fi
  274. else
  275. AC_MSG_RESULT([no])
  276. fi
  277. ])
  278. AC_DEFUN([AC_SS_CXXFLAGS_PEDANTIC],
  279. [
  280. SS_PEDANTIC_COMPILATION=""
  281. AC_MSG_CHECKING([if you want a strict ansi compilation])
  282. AC_ARG_ENABLE(pedantic,
  283. AC_HELP_STRING([--enable-pedantic],[Pedantic compilation (might not compile)]),
  284. SS_PEDANTIC_COMPILATION="true")
  285. if test -n "$SS_PEDANTIC_COMPILATION"; then
  286. AC_MSG_RESULT([yes])
  287. if test -n "$SS_CXXFLAGS"; then
  288. SS_CXXFLAGS="$SS_CXXFLAGS -pedantic"
  289. else
  290. SS_CXXFLAGS="-pedantic"
  291. fi
  292. else
  293. AC_MSG_RESULT([no])
  294. fi
  295. ])
  296. AC_DEFUN([AC_SS_CXXFLAGS_OPTIMISATION],
  297. [
  298. AC_MSG_CHECKING([for the optimisation level])
  299. SS_LOCAL_OPTIMISATION=""
  300. AC_ARG_ENABLE(optimisation,
  301. AC_HELP_STRING([--enable-optimisation=N],[Use optimisation level N when compiling]),
  302. SS_LOCAL_OPTIMISATION="$enableval")
  303. if test -n "$SS_LOCAL_OPTIMISATION"; then
  304. AC_MSG_RESULT([using -O$SS_LOCAL_OPTIMISATION])
  305. if test -n "$SS_CXXFLAGS"; then
  306. SS_CXXFLAGS="$SS_CXXFLAGS -O$SS_LOCAL_OPTIMISATION"
  307. else
  308. SS_CXXFLAGS="-O$SS_LOCAL_OPTIMISATION"
  309. fi
  310. SS_BUILD_FLAGS="$SS_LOCAL_OPTIMISATION$SS_BUILD_FLAGS"
  311. else
  312. AC_MSG_RESULT([using no optimisation flag])
  313. fi
  314. ])
  315. AC_DEFUN([AC_SS_CXXFLAGS],
  316. [
  317. SS_CXXFLAGS=""
  318. AC_SS_CXXFLAGS_DEBUG_SYMBOLS
  319. AC_SS_CXXFLAGS_PROFILING
  320. AC_SS_CXXFLAGS_PIPES
  321. AC_SS_CXXFLAGS_OPTIMISATION
  322. AC_SS_CXXFLAGS_FNORTTI
  323. AC_SS_CXXFLAGS_ANSI
  324. AC_SS_CXXFLAGS_PEDANTIC
  325. AC_SS_CXXFLAGS_WALL
  326. if test -n "$SS_CXXFLAGS"; then
  327. if test -n "$CXXFLAGS"; then
  328. CXXFLAGS="$CXXFLAGS $SS_CXXFLAGS"
  329. else
  330. CXXFLAGS="$SS_CXXFLAGS"
  331. fi
  332. fi
  333. ])
  334. dnl ###################################################################################################################
  335. dnl ### HEADERS AND FUNCTIONS
  336. dnl ###################################################################################################################
  337. AC_DEFUN([AC_SS_HEADER_CHECKS],
  338. [
  339. SS_HAS_OSS_SUPPORT="false"
  340. AC_CHECK_HEADER(strings.h)
  341. AC_CHECK_HEADERS(linux/soundcard.h sys/soundcard.h soundcard.h,SS_HAS_OSS_SUPPORT="true")
  342. if test "$SS_HAS_OSS_SUPPORT" = "true"; then
  343. AC_DEFINE([COMPILE_OSS_SUPPORT], 1, [define if you want to enable OSS sound support])
  344. fi
  345. ])
  346. AC_DEFUN([AC_SS_FUNCTION_CHECKS],
  347. [
  348. SS_HAVE_IPV6_FUNCTIONS="true"
  349. AC_CHECK_FUNCS(getenv strerror)
  350. AC_CHECK_FUNCS(inet_ntoa inet_aton)
  351. AC_CHECK_FUNCS(setenv unsetenv putenv)
  352. AC_CHECK_FUNCS(gmtime_r localtime_r)
  353. AC_CHECK_FUNC(inet_ntop,SS_HAVE_IPV6_FUNCTIONS="true",SS_HAVE_IPV6_FUNCTIONS="false")
  354. AC_CHECK_FUNC(inet_pton,SS_HAVE_IPV6_FUNCTIONS="true",SS_HAVE_IPV6_FUNCTIONS="false")
  355. AC_CHECK_FUNC(getaddrinfo,SS_HAVE_IPV6_FUNCTIONS="true",SS_HAVE_IPV6_FUNCTIONS="false")
  356. AC_CHECK_FUNCS(getnameinfo)
  357. ])
  358. dnl ###################################################################################################################
  359. dnl ### MISC OPTIONS
  360. dnl ###################################################################################################################
  361. AC_DEFUN([AC_SS_MISC_OPTIONS],
  362. [
  363. AC_MSG_CHECKING([if you want the memory profiling])
  364. AC_ARG_WITH(memory-profile, [ --with-memory-profile Compile the memory profile],SS_COMPILE_MEMORY_PROFILE="true")
  365. if test "$SS_COMPILE_MEMORY_PROFILE" = "true"; then
  366. AC_MSG_RESULT(yes)
  367. AC_DEFINE([COMPILE_MEMORY_PROFILE], 1, [define if you want the gcc memory profile])
  368. SS_BUILD_FLAGS="m$SS_BUILD_FLAGS"
  369. else
  370. AC_MSG_RESULT(no)
  371. fi
  372. AC_MSG_CHECKING([how to waste your time])
  373. AC_MSG_RESULT(by performing senseless checks)
  374. AC_MSG_CHECKING([if you want memory checking in malloc])
  375. AC_ARG_WITH(memory-checks, [ --with-memory-checks Enable malloc memory checks],SS_COMPILE_MEMORY_CHECKS="true")
  376. if test "$SS_COMPILE_MEMORY_CHECKS" = "true"; then
  377. AC_MSG_RESULT(yes)
  378. AC_DEFINE([COMPILE_MEMORY_CHECKS], 1, [define if you want the memory checks])
  379. SS_BUILD_FLAGS="h$SS_BUILD_FLAGS"
  380. else
  381. AC_MSG_RESULT(no)
  382. fi
  383. AC_MSG_CHECKING([if you want to use system memmove])
  384. AC_ARG_WITH(system-memmove, [ --without-system-memmove Do not use system memmove and memcpy],SS_DO_NOT_USE_SYSTEM_MEMMOVE="true")
  385. if test "$SS_DO_NOT_USE_SYSTEM_MEMMOVE" = "true"; then
  386. AC_MSG_RESULT(no)
  387. else
  388. AC_DEFINE([COMPILE_WITH_SYSTEM_MEMMOVE], 1, [define if you trust your memmove() function])
  389. AC_MSG_RESULT(yes)
  390. SS_BUILD_FLAGS="s$SS_BUILD_FLAGS"
  391. fi
  392. AC_MSG_CHECKING([if you want to optimize for big channels])
  393. AC_ARG_WITH(big-channels, [ --with-big-channels Optimize for big irc channels],SS_OPTIMIZE_BIG_CHANNELS="true")
  394. if test "$SS_OPTIMIZE_BIG_CHANNELS" = "true"; then
  395. AC_MSG_RESULT(yes: using 349 as dict size)
  396. AC_DEFINE_UNQUOTED([AVERAGE_CHANNEL_USERS],349, [define this to the number of average channel users])
  397. SS_BUILD_FLAGS="b$SS_BUILD_FLAGS"
  398. else
  399. AC_MSG_RESULT(no: using 101 as dict size)
  400. AC_DEFINE_UNQUOTED([AVERAGE_CHANNEL_USERS],101, [define this to the number of average channel users])
  401. fi
  402. AC_MSG_CHECKING([if you want ix86 assembly optimisations])
  403. AC_ARG_WITH(ix86-asm, [ --with-ix86-asm Compile ix86 assembly optimisations],SS_COMPILE_ix86_ASM="true")
  404. if test "$SS_COMPILE_ix86_ASM" = "true"; then
  405. AC_MSG_RESULT(yes)
  406. AC_MSG_CHECKING(target system CPU)
  407. if test "$target_cpu" = "i386"; then
  408. AC_MSG_RESULT(i386 : compiling asm code)
  409. else
  410. if test "$target_cpu" = "i486"; then
  411. AC_MSG_RESULT(i486 : compiling asm code)
  412. else
  413. if test "$target_cpu" = "i586"; then
  414. AC_MSG_RESULT(i586 : compiling asm code)
  415. else
  416. if test "$target_cpu" = "i686"; then
  417. AC_MSG_RESULT(i686 : compiling asm code)
  418. else
  419. AC_MSG_RESULT($target_cpu , no i386 optimisations)
  420. unset SS_COMPILE_ix86_ASM
  421. fi
  422. fi
  423. fi
  424. fi
  425. if test "$SS_COMPILE_ix86_ASM" = "true"; then
  426. AC_DEFINE([COMPILE_ix86_ASM], 1, [define if you want the i386 asm code])
  427. SS_BUILD_FLAGS="x$SS_BUILD_FLAGS"
  428. fi
  429. else
  430. AC_MSG_RESULT(no)
  431. fi
  432. AC_PATH_PROG(SS_MSGFMT,msgfmt,":",$PATH:/bin:/usr/bin:/bin:/usr/local/bin:/usr/X11R6/bin:/usr/lib/qt/bin:/usr/local/qt/bin:/usr/X11R6/qt/bin:/usr/qt/bin:/usr/build/qt/bin)
  433. if test -z "SS_MSGFMT"; then
  434. SS_MSGFMT=":"
  435. fi
  436. AC_SUBST(SS_MSGFMT)
  437. AC_MSG_CHECKING([if you want the DCC VOICE sound support])
  438. AC_ARG_WITH(dcc-sound,[ --without-dcc-sound Do not compile the DCC VOICE sound support],SS_NO_SOUND="true")
  439. if test "$SS_NO_SOUND" = "true"; then
  440. AC_MSG_RESULT(no)
  441. AC_DEFINE([COMPILE_DISABLE_DCC_VOICE], 1, [define if you want to disable DCC VOICE sound support])
  442. else
  443. AC_MSG_RESULT(yes)
  444. SS_BUILD_FLAGS="A$SS_BUILD_FLAGS"
  445. fi
  446. SS_BUILD_FLAGS="T$SS_BUILD_FLAGS"
  447. AC_DEFINE([COMPILE_INFO_TIPS], 1, [define if you want the info tips to be compiled in])
  448. AC_MSG_CHECKING([if you want to disable the ipV6 support])
  449. AC_ARG_WITH(ipv6-support,[ --without-ipv6-support Do not compile the IpV6 support],SS_NOIPV6_SUPPORT="true")
  450. if test "$SS_NOIPV6_SUPPORT" = "true"; then
  451. AC_MSG_RESULT(yes)
  452. else
  453. AC_MSG_RESULT(no)
  454. fi
  455. AC_MSG_CHECKING([if you want to disable the cryptography support])
  456. AC_ARG_WITH(crypt-support,[ --without-crypt-support Do not compile the cryptography support],SS_NOCRYPT_SUPPORT="true")
  457. if test "$SS_NOCRYPT_SUPPORT" = "true"; then
  458. AC_MSG_RESULT(yes)
  459. else
  460. AC_MSG_RESULT(no)
  461. AC_DEFINE([COMPILE_CRYPT_SUPPORT], 1, [define if you want to compile the crypt support])
  462. SS_BUILD_FLAGS="c$SS_BUILD_FLAGS"
  463. fi
  464. AC_MSG_CHECKING([if you want to disable the X bell support])
  465. AC_ARG_WITH(x-bell,[ --without-x-bell Disable the X bell support],SS_NO_X_BELL="true")
  466. if test "$SS_NO_X_BELL" = "true"; then
  467. AC_MSG_RESULT(yes)
  468. AC_DEFINE([COMPILE_NO_X_BELL], 1, [define if you want to disable the X bell support])
  469. else
  470. AC_MSG_RESULT(no)
  471. fi
  472. AC_DEFINE([COMPILE_NEW_KVS], 1, [define if you want to enable the new KVS parser])
  473. AC_DEFINE([COMPILE_ONLY_NEW_KVS], 1, [define if you want to use only the new KVS parser])
  474. AC_MSG_CHECKING([if you want to link to the embedded version of qt])
  475. AC_ARG_WITH(qt-embedded,[ --with-qt-embedded Link to qt-embedded (see INSTALL)],SS_QT3_EMBEDDED="true")
  476. if test "$SS_QT3_EMBEDDED" = "true"; then
  477. AC_MSG_RESULT(yes)
  478. SS_BUILD_FLAGS="E$SS_BUILD_FLAGS"
  479. else
  480. AC_MSG_RESULT(no)
  481. fi
  482. AC_MSG_CHECKING([if you want to disable inter-process communication])
  483. AC_ARG_WITH(ipc,[ --without-ipc Disable inter-process communication support],SS_NO_IPC="true")
  484. if test "$SS_NO_IPC" = "true"; then
  485. AC_MSG_RESULT(yes)
  486. SS_BUILD_FLAGS="I$SS_BUILD_FLAGS"
  487. AC_DEFINE([COMPILE_NO_IPC], 1, [define this if you want to disable the inter-process communication support])
  488. else
  489. AC_MSG_RESULT(no)
  490. fi
  491. AC_MSG_CHECKING([if you want to explicitly disable the gsm codec support])
  492. AC_ARG_WITH(gsm,[ --without-gsm Disable gsm codec support],SS_NO_GSM="true")
  493. if test "$SS_NO_GSM" = "true"; then
  494. AC_MSG_RESULT(yes)
  495. else
  496. AC_DEFINE([COMPILE_USE_GSM], 1, [define if you have libgsm and want the GSM code to be compiled])
  497. SS_BUILD_FLAGS="G$SS_BUILD_FLAGS"
  498. AC_MSG_RESULT(no)
  499. fi
  500. AC_MSG_CHECKING([if you want to ignore SIGALARM])
  501. AC_ARG_WITH(ignore-sigalarm, [ --with-ignore-sigalarm Ignore SIGALARM in all threads],SS_IGNORE_SIGALARM="true")
  502. if test "$SS_IGNORE_SIGALARM" = "true"; then
  503. AC_MSG_RESULT(yes)
  504. AC_DEFINE([COMPILE_IGNORE_SIGALARM], 1, [define this if you want to ignore the SIGALARM signal])
  505. SS_BUILD_FLAGS="a$SS_BUILD_FLAGS"
  506. else
  507. AC_MSG_RESULT(no)
  508. fi
  509. AC_MSG_CHECKING([if you want the pseudo-transparency support])
  510. AC_ARG_WITH(transparency, [ --without-transparency Do NOT compile the pseudo-transparency support],SS_NO_PSEUDO_TRANSPARENCY="true")
  511. if test "$SS_NO_PSEUDO_TRANSPARENCY" = "true"; then
  512. AC_MSG_RESULT(no)
  513. else
  514. AC_MSG_RESULT(yes)
  515. AC_DEFINE([COMPILE_PSEUDO_TRANSPARENCY], 1, [define if you have the KDE support and want the pseudo transparency])
  516. SS_BUILD_FLAGS="p$SS_BUILD_FLAGS"
  517. fi
  518. AC_ARG_WITH(pizza,[ --with-pizza Use this when hungry],SS_PIZZA="true")
  519. ])
  520. dnl ###################################################################################################################
  521. dnl ### DYNAMIC LABELS
  522. dnl ###################################################################################################################
  523. AC_DEFUN([AC_SS_CHECK_DYNAMIC_LABELS],
  524. [
  525. AC_MSG_CHECKING([if the compiler supports dynamic labels])
  526. AC_ARG_WITH(dyn-labels, [ --without-dyn-labels Disable usage of the dynamic label jumps],SS_DISABLE_DYNAMIC_LABELS="true")
  527. if test "$SS_DISABLE_DYNAMIC_LABELS" = "true"; then
  528. AC_MSG_RESULT("no: trusting you")
  529. else
  530. AC_TRY_RUN([
  531. int main(int argc,char ** argv)
  532. {
  533. int retVal = 10;
  534. void * label = &&action4;
  535. goto action2;
  536. action1:
  537. retVal -= 4;
  538. label = &&endofcode;
  539. goto *label;
  540. action2:
  541. retVal -= 5;
  542. goto *label;
  543. action3:
  544. retVal += 40;
  545. action4:
  546. retVal -= 1;
  547. label = &&action1;
  548. goto *label;
  549. endofcode:
  550. return retVal;
  551. }
  552. ],SS_DISABLE_DYNAMIC_LABELS="false",SS_DISABLE_DYNAMIC_LABELS="true",SS_DISABLE_DYNAMIC_LABELS="true")
  553. if test "$SS_DISABLE_DYNAMIC_LABELS" = "true"; then
  554. AC_MSG_RESULT("no")
  555. else
  556. AC_MSG_RESULT("yes")
  557. AC_DEFINE([COMPILE_USE_DYNAMIC_LABELS], 1, [define if your compiler supports gotos do dynamic labels])
  558. fi
  559. fi
  560. ])
  561. dnl ###################################################################################################################
  562. dnl ### BIG_ENDIAN
  563. dnl ###################################################################################################################
  564. AC_DEFUN([AC_SS_CHECK_BIG_ENDIAN],
  565. [
  566. AC_MSG_CHECKING([if this system is big endian])
  567. AC_TRY_RUN([
  568. int main(int argc,char ** argv)
  569. {
  570. int nl;
  571. unsigned char * nlc;
  572. nl = 0x12CAFE34;
  573. nlc = (unsigned char *)(&nl);
  574. if((nlc[0] == 0x12) && (nlc[1] == 0xCA) && (nlc[2] == 0xFE) && (nlc[3] == 0x34))return 0;
  575. return 1;
  576. }
  577. ],SS_BIG_ENDIAN_MACHINE="true",SS_BIG_ENDIAN_MACHINE="false",SS_BIG_ENDIAN_MACHINE="false")
  578. dnl # This will fail if we're cross compiling...
  579. if test "$SS_BIG_ENDIAN_MACHINE" = "true"; then
  580. AC_MSG_RESULT([yes])
  581. SS_BUILD_FLAGS="B$SS_BUILD_FLAGS"
  582. AC_DEFINE([BIG_ENDIAN_MACHINE_BYTE_ORDER], 1, [define this if you are on a big endian machine])
  583. else
  584. AC_MSG_RESULT([no])
  585. fi
  586. ])
  587. dnl ###################################################################################################################
  588. dnl ### DLOPEN
  589. dnl ###################################################################################################################
  590. AC_DEFUN([AC_SS_CHECK_DL],
  591. [
  592. AC_MSG_CHECKING([for dlopen capabilities])
  593. SS_LINK_TO_LIBDL="no"
  594. SS_SAVE_LIBS="$LIBS"
  595. LIBS="-rdynamic"
  596. AC_TRY_LINK([
  597. #include <dlfcn.h>
  598. ],[
  599. /* sparc-unknown-openbsd3.0 hack */
  600. #ifndef RTLD_NOW
  601. #define RTLD_NOW RTLD_LAZY
  602. #endif
  603. dlopen("/lib/libc.so.6",RTLD_NOW);
  604. ],
  605. eval "SS_DLOPEN_OK=yes"
  606. ,
  607. eval "SS_DLOPEN_OK=no"
  608. )
  609. LIBS="$SS_SAVE_LIBS"
  610. if test "$SS_DLOPEN_OK" = "yes"; then
  611. AC_MSG_RESULT([builtin in libc])
  612. else
  613. SS_SAVE_LIBS="$LIBS"
  614. LIBS="-rdynamic -ldl"
  615. AC_TRY_LINK([
  616. #include <dlfcn.h>
  617. ],[
  618. /* sparc-unknown-openbsd3.0 hack */
  619. #ifndef RTLD_NOW
  620. #define RTLD_NOW RTLD_LAZY
  621. #endif
  622. dlopen("/usr/lib/libdl.so",RTLD_NOW);
  623. ],
  624. eval "SS_DLOPEN_OK=yes",
  625. eval "SS_DLOPEN_OK=no"
  626. )
  627. LIBS="$SS_SAVE_LIBS"
  628. if test "$SS_DLOPEN_OK" = "yes"; then
  629. SS_LINK_TO_LIBDL="yes"
  630. AC_MSG_RESULT([external in libdl])
  631. else
  632. AC_MSG_RESULT([FAILED])
  633. AC_SS_SET_REDINK
  634. echo "################################################################################"
  635. echo "### CONFIGURE ERROR:"
  636. echo "### No dlopen capabilities found."
  637. echo "### It looks that your system has no interface to the dynamic linker ?"
  638. echo "### If you're on linux, you either miss libdl , or the linker is not"
  639. echo "### able to find it. Make sure that libdl is in /lib or /usr/lib."
  640. echo "### If you're sure you have libdl, make sure you have also g++ installed."
  641. echo "### If you're not on linux, please drop a mail to pragma at kvirc dot net"
  642. echo "### describing your system and I'll try to fix it."
  643. echo "################################################################################"
  644. AC_SS_SET_NORMALINK
  645. AC_MSG_ERROR(["This was fatal...aborting"])
  646. fi
  647. fi
  648. ])
  649. dnl ###################################################################################################################
  650. dnl ### PERL
  651. dnl ###################################################################################################################
  652. AC_DEFUN([AC_SS_CHECK_PERL],
  653. [
  654. SS_PERL_ENABLE="yes"
  655. SS_PERL_CCFLAGS=""
  656. SS_PERL_LDFLAGS=""
  657. SS_PERL_BINARY="true"
  658. SS_PERL_RESULT_MESSAGE=""
  659. AC_ARG_ENABLE(perl,AC_HELP_STRING([--enable-perl],[Enable perl scripting support (default=detect)]),eval "SS_PERL_ENABLE=$enableval")
  660. if test "$SS_PERL_ENABLE" = "yes"; then
  661. AC_PATH_PROG(SS_PERL_BINARY,perl,":",$PATH:/bin:/usr/bin:/bin:/usr/local/bin:/usr/X11R6/bin:/usr/lib/qt/bin:/usr/local/qt/bin:/usr/X11R6/qt/bin:/usr/qt/bin:/usr/build/qt/bin)
  662. if test -z "SS_PERL_BINARY"; then
  663. SS_PERL_RESULT_MESSAGE="disabled: can't find the perl binary"
  664. SS_PERL_ENABLE="no"
  665. SS_PERL_BINARY="true"
  666. fi
  667. else
  668. SS_PERL_RESULT_MESSAGE="disabled by user"
  669. fi
  670. if test "$SS_PERL_ENABLE" = "yes"; then
  671. AC_MSG_CHECKING([if perl il compiled with MULTIPLICITY option])
  672. SS_PERL_TEMP=$($SS_PERL_BINARY -V | grep MULTIPLICITY)
  673. if test -z "$SS_PERL_TEMP"; then
  674. AC_MSG_RESULT([no])
  675. SS_PERL_ENABLE="no"
  676. SS_PERL_BINARY="true"
  677. SS_PERL_RESULT_MESSAGE="disabled: MULTIPLICITY not defined"
  678. fi
  679. fi
  680. if test "$SS_PERL_ENABLE" = "yes"; then
  681. AC_MSG_CHECKING([for the system perl directory])
  682. SS_PERL_DIR=$($SS_PERL_BINARY -MConfig -e 'print $Config{archlib}')
  683. SS_PERL_DIR="$SS_PERL_DIR/CORE"
  684. AC_MSG_RESULT([got $SS_PERL_DIR])
  685. AC_MSG_CHECKING([for the perl ccflags])
  686. SS_PERL_CCFLAGS=$($SS_PERL_BINARY -MConfig -e 'print $Config{ccflags}')
  687. AC_MSG_RESULT([got $SS_PERL_CCFLAGS])
  688. AC_MSG_CHECKING([for the perl ldflags])
  689. SS_PERL_LDFLAGS=$($SS_PERL_BINARY -MExtUtils::Embed -e ldopts)
  690. AC_MSG_RESULT([got $SS_PERL_LDFLAGS])
  691. AC_MSG_CHECKING([if we can compile a perl application])
  692. SS_SAVED_LIBS="$LIBS"
  693. SS_SAVED_CFLAGS="$CFLAGS"
  694. SS_SAVED_CCFLAGS="$CCFLAGS"
  695. SS_SAVED_LDFLAGS="$LDFLAGS"
  696. SS_SAVED_CXXFLAGS="$CXXFLAGS"
  697. SS_SAVED_CPPFLAGS="$CPPFLAGS"
  698. LIBS="$SS_PERL_LDFLAGS"
  699. LDFLAGS="$LIBS"
  700. CFLAGS="$SS_PERL_CCFLAGS -I$SS_PERL_DIR"
  701. CCFLAGS="$CFLAGS"
  702. CXXFLAGS="$CFLAGS"
  703. CPPFLAGS="$CFLAGS"
  704. AC_TRY_LINK([
  705. #include <EXTERN.h>
  706. #include <perl.h>
  707. #include <XSUB.h>
  708. extern "C" void boot_DynaLoader(pTHX_ CV* cv);
  709. extern "C" void xs_init(pTHX)
  710. {
  711. char * file = __FILE__;
  712. newXS("DynaLoader::boot_DynaLoader",boot_DynaLoader,file);
  713. }
  714. ],[
  715. PerlInterpreter *my_perl;
  716. my_perl = perl_alloc();
  717. perl_construct(my_perl);
  718. perl_parse(my_perl,xs_init, 0, 0, (char **)NULL);
  719. perl_run(my_perl);
  720. perl_destruct(my_perl);
  721. perl_free(my_perl);
  722. ],
  723. eval "SS_PERL_ENABLE=yes",
  724. eval "SS_PERL_ENABLE=no"
  725. )
  726. SS_PERL_LDFLAGS="$LDFLAGS"
  727. SS_PERL_CCFLAGS="$CCFLAGS"
  728. LIBS="$SS_SAVED_LIBS"
  729. CFLAGS="$SS_SAVED_CFLAGS"
  730. LDFLAGS="$SS_SAVED_LDFLAGS"
  731. CXXFLAGS="$SS_SAVED_CXXFLAGS"
  732. CPPFLAGS="$SS_SAVED_CPPFLAGS"
  733. CCFLAGS="$SS_SAVED_CCFLAGS"
  734. if test "$SS_PERL_ENABLE" = "yes"; then
  735. AC_MSG_RESULT([seems ok])
  736. AC_DEFINE([COMPILE_PERL_SUPPORT], 1, [define if you have perl and want the perl scripting support in kvirc])
  737. SS_BUILD_FLAGS="p$SS_BUILD_FLAGS"
  738. SS_PERL_RESULT_MESSAGE="enabled"
  739. else
  740. AC_MSG_RESULT([seems broken])
  741. SS_PERL_RESULT_MESSAGE="disabled: failed to compile the test program"
  742. SS_PERL_LDFLAGS=""
  743. SS_PERL_CCFLAGS=""
  744. fi
  745. fi
  746. AC_SUBST(SS_PERL_CCFLAGS)
  747. AC_SUBST(SS_PERL_LDFLAGS)
  748. AC_SUBST(SS_PERL_BINARY)
  749. AC_MSG_CHECKING([for perl scripting support])
  750. AC_MSG_RESULT([$SS_PERL_RESULT_MESSAGE])
  751. ])
  752. dnl ###################################################################################################################
  753. dnl ### OPENSSL
  754. dnl ###################################################################################################################
  755. AC_DEFUN([AC_SS_CHECK_OPENSSL],
  756. [
  757. SS_LINK_TO_LIBSSL="false"
  758. SS_SSL_RESULT_MESSAGE=""
  759. SS_ENABLE_SSL_SUPPORT="yes"
  760. AC_ARG_ENABLE(ssl,AC_HELP_STRING([--disable-ssl],[Disable OpenSSL support]),eval "SS_ENABLE_SSL_SUPPORT=$enableval")
  761. if test "$SS_ENABLE_SSL_SUPPORT" = "yes"; then
  762. AC_MSG_CHECKING([If we can compile and link a small SSL test application])
  763. SS_SAVED_LIBS="$LIBS"
  764. LIBS="-lcrypto -lssl"
  765. AC_TRY_LINK([
  766. #include <openssl/ssl.h>
  767. ],[
  768. SSL_new(0);
  769. ],
  770. eval "SS_ENABLE_SSL_SUPPORT=yes",
  771. eval "SS_ENABLE_SSL_SUPPORT=no"
  772. )
  773. LIBS="$SS_SAVED_LIBS"
  774. if test "$SS_ENABLE_SSL_SUPPORT" = "yes"; then
  775. AC_MSG_RESULT([yes])
  776. AC_CHECK_HEADER(openssl/ssl.h,SS_DUMMY="yes",SS_ENABLE_SSL_SUPPORT="no")
  777. AC_CHECK_HEADER(openssl/err.h,SS_DUMMY="yes",SS_ENABLE_SSL_SUPPORT="no")
  778. AC_CHECK_HEADER(openssl/asn1.h,SS_DUMMY="yes",SS_ENABLE_SSL_SUPPORT="no")
  779. AC_CHECK_HEADER(openssl/evp.h,SS_DUMMY="yes",SS_ENABLE_SSL_SUPPORT="no")
  780. if test "$SS_ENABLE_SSL_SUPPORT" = "yes"; then
  781. AC_DEFINE([COMPILE_SSL_SUPPORT], 1, [define if you have openssl and want the ssl support in kvirc])
  782. SS_LINK_TO_LIBSSL="true"
  783. SS_BUILD_FLAGS="o$SS_BUILD_FLAGS"
  784. SS_SSL_RESULT_MESSAGE="enabled"
  785. else
  786. SS_SSL_RESULT_MESSAGE="disabled: missing header files"
  787. fi
  788. else
  789. AC_MSG_RESULT([no])
  790. SS_SSL_RESULT_MESSAGE="disabled: failed to compile the test program"
  791. fi
  792. else
  793. SS_SSL_RESULT_MESSAGE="disabled by user"
  794. fi
  795. AC_MSG_CHECKING([for secure connections support])
  796. AC_MSG_RESULT([$SS_SSL_RESULT_MESSAGE])
  797. ])
  798. dnl ###################################################################################################################
  799. dnl ### ESD
  800. dnl ###################################################################################################################
  801. AC_DEFUN([AC_SS_CHECK_ESD],
  802. [
  803. SS_LINK_TO_LIBESD="false"
  804. SS_DISABLE_ESD_SUPPORT="true"
  805. SS_SAVED_LIBS=$LIBS
  806. LIBS="$LIBS -lesd"
  807. AC_CHECK_LIB(esd,esd_play_file,SS_DISABLE_ESD_SUPPORT="false")
  808. LIBS="$SS_SAVED_LIBS"
  809. if test "$SS_DISABLE_ESD_SUPPORT" = "false"; then
  810. SS_DISABLE_ESD_SUPPORT="true"
  811. AC_CHECK_HEADER(esd.h,SS_DISABLE_ESD_SUPPORT="false")
  812. fi
  813. AC_MSG_CHECKING([for Esound daemon support])
  814. AC_ARG_WITH(esd-support, [ --without-esd-support Disable Esound daemon support],SS_DISABLE_ESD_SUPPORT="true")
  815. if test "$SS_DISABLE_ESD_SUPPORT" = "true"; then
  816. AC_MSG_RESULT(disabled by user)
  817. else
  818. AC_MSG_RESULT(yes: have libs and headers)
  819. AC_DEFINE([COMPILE_ESD_SUPPORT], 1, [define if you want to enable the Esound daemon support])
  820. SS_LINK_TO_LIBESD="true"
  821. SS_BUILD_FLAGS="e$SS_BUILD_FLAGS"
  822. fi
  823. ])
  824. dnl ###################################################################################################################
  825. dnl ### ZLIB
  826. dnl ###################################################################################################################
  827. AC_DEFUN([AC_SS_CHECK_ZLIB],
  828. [
  829. SS_LINK_TO_LIBZLIB="no"
  830. SS_DISABLE_ZLIB_SUPPORT="true"
  831. SS_SAVED_LIBS=$LIBS
  832. LIBS="$LIBS -lz"
  833. AC_CHECK_LIB(z,gzopen,SS_DISABLE_ZLIB_SUPPORT="false")
  834. LIBS="$SS_SAVED_LIBS"
  835. if test "$SS_DISABLE_ZLIB_SUPPORT" = "false"; then
  836. SS_DISABLE_ZLIB_SUPPORT="true"
  837. AC_CHECK_HEADER(zlib.h,SS_DISABLE_ZLIB_SUPPORT="false")
  838. fi
  839. AC_MSG_CHECKING([for GZip support])
  840. AC_ARG_WITH(zlib-support, [ --without-zlib-support Disable ZLIB support],SS_DISABLE_ZLIB_SUPPORT="true")
  841. if test "$SS_DISABLE_ZLIB_SUPPORT" = "true"; then
  842. AC_MSG_RESULT(disabled by user)
  843. else
  844. AC_MSG_RESULT(yes: have libs and headers)
  845. AC_DEFINE([COMPILE_ZLIB_SUPPORT], 1, [define if you want to enable the ZLib library support])
  846. SS_LINK_TO_LIBZ="yes"
  847. SS_BUILD_FLAGS="Z$SS_BUILD_FLAGS"
  848. fi
  849. ])
  850. dnl ###################################################################################################################
  851. dnl ### XSS
  852. dnl ###################################################################################################################
  853. AC_DEFUN([AC_SS_CHECK_XSS],
  854. [
  855. SS_LINK_TO_XSS="no"
  856. SS_COMPILE_XSS_SUPPORT="false"
  857. SS_SAVED_LIBS=$LIBS
  858. LIBS="$LIBS -lXss"
  859. AC_CHECK_LIB(Xss,XScreenSaverAllocInfo,SS_COMPILE_XSS_SUPPORT="true")
  860. LIBS="$SS_SAVED_LIBS"
  861. AC_MSG_CHECKING([for Xss support])
  862. if test "$SS_COMPILE_XSS_SUPPORT" = "false"; then
  863. AC_MSG_RESULT(disabled)
  864. else
  865. AC_MSG_RESULT(yes: lib is ok)
  866. AC_DEFINE([COMPILE_XSS_SUPPORT], 1, [define if you want to enable the ZLib library support])
  867. SS_LINK_TO_XSS="yes"
  868. SS_BUILD_FLAGS="$SS_BUILD_FLAGS"
  869. fi
  870. ])
  871. dnl ###################################################################################################################
  872. dnl ### Audiofile library
  873. dnl ###################################################################################################################
  874. AC_DEFUN([AC_SS_CHECK_AUDIOFILE],
  875. [
  876. SS_LINK_TO_LIBAUDIOFILE="false"
  877. SS_DISABLE_AUDIOFILE_SUPPORT="true"
  878. SS_SAVED_LIBS=$LIBS
  879. LIBS="$LIBS -laudiofile"
  880. AC_CHECK_LIB(audiofile,afOpenFile,SS_DISABLE_AUDIOFILE_SUPPORT="false")
  881. if test "$SS_DISABLE_AUDIOFILE_SUPPORT" = "false"; then
  882. SS_DISABLE_AUDIOFILE_SUPPORT="true"
  883. AC_CHECK_LIB(audiofile,afGetVirtualFrameSize,SS_DISABLE_AUDIOFILE_SUPPORT="false")
  884. fi
  885. LIBS="$SS_SAVED_LIBS"
  886. if test "$SS_DISABLE_AUDIOFILE_SUPPORT" = "false"; then
  887. SS_DISABLE_AUDIOFILE_SUPPORT="true"
  888. AC_CHECK_HEADER(audiofile.h,SS_DISABLE_AUDIOFILE_SUPPORT="false")
  889. fi
  890. AC_MSG_CHECKING([for audiofile support])
  891. if test "$SS_DISABLE_AUDIOFILE_SUPPORT" = "true"; then
  892. AC_MSG_RESULT(missing header or libs or wrong version)
  893. else
  894. if test "$SS_HAS_OSS_SUPPORT" = "false"; then
  895. SS_DISABLE_AUDIOFILE_SUPPORT="true"
  896. AC_MSG_RESULT(no oss support at all)
  897. else
  898. AC_ARG_WITH(af-support, [ --without-af-support Disable Audiofile library for playing files to OSS support], SS_DISABLE_AUDIOFILE_SUPPORT="true")
  899. if test "$SS_DISABLE_AUDIOFILE_SUPPORT" = "true"; then
  900. AC_MSG_RESULT(disabled by user)
  901. else
  902. AC_MSG_RESULT(yes: have libs and headers)
  903. AC_DEFINE([COMPILE_AUDIOFILE_SUPPORT], 1, [define if you want to enable the Audiofile library support])
  904. SS_LINK_TO_LIBAUDIOFILE="true"
  905. SS_BUILD_FLAGS="f$SS_BUILD_FLAGS"
  906. fi
  907. fi
  908. fi
  909. ])
  910. dnl ###################################################################################################################
  911. dnl ### ARTS
  912. dnl ###################################################################################################################
  913. AC_DEFUN([AC_SS_CHECK_ARTS],
  914. [
  915. SS_LINK_TO_LIBARTS="false"
  916. SS_DISABLE_ARTS_SUPPORT="false"
  917. AC_MSG_CHECKING([if Arts support is requested])
  918. AC_ARG_WITH(arts-support, [ --without-arts-support Disable Arts daemon support],SS_DISABLE_ARTS_SUPPORT="true")
  919. if test "$SS_KDE_REQUESTED" = "yes"; then
  920. if test "$SS_DISABLE_ARTS_SUPPORT" = "true"; then
  921. AC_MSG_RESULT(disabled by user)
  922. else
  923. AC_MSG_RESULT([yes])
  924. AC_MSG_CHECKING(if we can compile a simple Arts application)
  925. AC_LANG_CPLUSPLUS
  926. ss_save_CPPFLAGS="$CPPFLAGS"
  927. ss_save_CXXFLAGS="$CXXFLAGS"
  928. ss_save_LDFLAGS="$LDFLAGS"
  929. ss_save_LIBS="$LIBS"
  930. CPPFLAGS="-I$SS_X_INCDIR -I$SS_QT3_INCDIR -I$SS_KDE_INCDIR $CPPFLAGS $X_CFLAGS"
  931. CXXFLAGS="-O2 -Wall $CXXFLAGS"
  932. LIBS="-L$SS_KDE_LIBDIR -L$SS_X_LIBDIR $SS_X_LDFLAGS $SS_X_LIBLINK -L$SS_QT3_LIBDIR $LIBS -lsoundserver_idl -ltdecore -l$SS_TQTLIB_NAME -Wl,-rpath $SS_KDE_LIBDIR"
  933. if test "$SS_LINK_TO_LIBDL" = "yes"; then
  934. LIBS="$LIBS -ldl";
  935. fi
  936. LDFLAGS="-s $LDFLAGS"
  937. AC_TRY_LINK([
  938. #include <arts/soundserver.h>
  939. ],[
  940. Arts::Dispatcher * d = new Arts::Dispatcher();
  941. Arts::SimpleSoundServer *server = new Arts::SimpleSoundServer(Arts::Reference("global:Arts_SimpleSoundServer"));
  942. ],
  943. SS_ARTS_LINKED_OK="TRUE",
  944. SS_ARTS_LINKED_OK="FALSE"
  945. )
  946. if test "$SS_ARTS_LINKED_OK" = "FALSE"; then
  947. AC_MSG_RESULT(failed)
  948. else
  949. AC_MSG_RESULT(success)
  950. AC_DEFINE([COMPILE_ARTS_SUPPORT], 1, [define if you want to enable the Arts daemon support])
  951. SS_LINK_TO_LIBARTS="true"
  952. SS_BUILD_FLAGS="r$SS_BUILD_FLAGS"
  953. fi
  954. LIBS="$ss_save_LIBS"
  955. LDFLAGS="$ss_save_LDFLAGS"
  956. CXXFLAGS="$ss_save_CXXFLAGS"
  957. CPPFLAGS="$ss_save_CPPFLAGS"
  958. fi
  959. else
  960. SS_DISABLE_ARTS_SUPPORT="true"
  961. AC_MSG_RESULT([no KDE so no Arts])
  962. fi
  963. ])
  964. dnl ###################################################################################################################
  965. dnl ### INTERFACE ADDRESS STUFF
  966. dnl ###################################################################################################################
  967. AC_DEFUN([AC_SS_CHECK_IFADDR_STUFF],
  968. [
  969. AC_MSG_CHECKING([if we can get interface addresses])
  970. AC_TRY_LINK([
  971. #include <stdio.h>
  972. #include <sys/ioctl.h>
  973. #include <net/if.h>
  974. #include <netinet/in.h>
  975. #include <arpa/inet.h>
  976. #include <string.h>
  977. ],[
  978. struct ifreq ifr;
  979. int ret;
  980. struct sockaddr * sa;
  981. ret = IFNAMSIZ;
  982. ret = ioctl(ret,SIOCGIFADDR,&ifr);
  983. if(ifr.ifr_name != 0)sa = (struct sockaddr *)&(ifr.ifr_addr);
  984. ],
  985. eval "SS_DISABLE_IFADDR=false"
  986. ,
  987. eval "SS_DISABLE_IFADDR=true"
  988. )
  989. if test "$SS_DISABLE_IFADDR" = "true"; then
  990. AC_MSG_RESULT("no")
  991. else
  992. AC_MSG_RESULT("yes")
  993. AC_DEFINE([COMPILE_GET_INTERFACE_ADDRESS], 1, [define if you have the SIOCGIFADDR ioctl and the related headers])
  994. fi
  995. ])
  996. dnl ###################################################################################################################
  997. dnl ### PTHREAD
  998. dnl ###################################################################################################################
  999. AC_DEFUN([AC_SS_CHECK_THREAD_STUFF],
  1000. [
  1001. SS_THREAD_LIBLINK=""
  1002. AC_MSG_CHECKING([if you want to use the solaris lthread])
  1003. SS_DO_IT="false"
  1004. AC_ARG_WITH(solaris-lthread, [ --with-solaris-lthread Use the Solaris native libthread],SS_DO_IT="true")
  1005. if test "$SS_DO_IT" = "true"; then
  1006. AC_MSG_RESULT(yes)
  1007. SS_THREAD_LIBLINK="-lthread"
  1008. AC_DEFINE([COMPILE_THREADS_USE_SOLARIS_LIBTHREAD], 1, [define if you want to use the solaris libthread])
  1009. else
  1010. AC_MSG_RESULT(no)
  1011. AC_MSG_CHECKING([if you want to use freebsd native pthread support])
  1012. SS_DO_IT="false"
  1013. AC_ARG_WITH(freebsd-pthread, [ --with-freebsd-pthread Use the FreeBSD native libc_r for threading],SS_DO_IT="true")
  1014. if test "$SS_DO_IT" = "true"; then
  1015. AC_MSG_RESULT(yes)
  1016. SS_THREAD_LIBLINK="-pthread"
  1017. AC_DEFINE([COMPILE_THREADS_USE_POSIX], 1, [define if you want to use the pthreads library])
  1018. else
  1019. AC_MSG_RESULT(no..using lpthread)
  1020. SS_THREAD_LIBLINK="-lpthread"
  1021. AC_DEFINE([COMPILE_THREADS_USE_POSIX], 1, [define if you want to use the pthreads library])
  1022. fi
  1023. AC_MSG_CHECKING([if your pthread implementation works])
  1024. SS_DO_IT="false"
  1025. AC_ARG_WITH(no-pthread-check, [ --with-no-pthread-check Do not check if pthreads stuff compiles],SS_DO_IT="true")
  1026. if test "$SS_DO_IT" = "true"; then
  1027. AC_MSG_RESULT(yes, trusting you)
  1028. else
  1029. SS_SAVE_LIBS="$LIBS"
  1030. LIBS="$SS_THREAD_LIBLINK"
  1031. AC_TRY_LINK([
  1032. #include <pthread.h>
  1033. ],[
  1034. pthread_mutex_lock(0);
  1035. ],
  1036. eval "SS_PTHREAD_OK=yes"
  1037. ,
  1038. eval "SS_PTHREAD_OK=no"
  1039. )
  1040. LIBS="$SS_SAVE_LIBS"
  1041. if test "$SS_PTHREAD_OK" = "yes"; then
  1042. AC_MSG_RESULT(yes, it seems to)
  1043. else
  1044. AC_MSG_RESULT(["FAILED"])
  1045. AC_SS_SET_REDINK
  1046. if test "$SS_THREAD_LIBLINK" = "-pthread"; then
  1047. echo "################################################################################"
  1048. echo "### CONFIGURE ERROR:"
  1049. echo "### Failed to compile the pthread test program."
  1050. echo "### You have specified to use the native FreeBSD libc_r for threading"
  1051. echo "### but it looks that this does not work."
  1052. echo "### Make sure that you have libc_r floating around your system"
  1053. echo "### and that the -pthread special gcc flag works."
  1054. echo "### (You need to use the native FreeBSD gcc compiler for this to work)"
  1055. echo "################################################################################"
  1056. else
  1057. echo "################################################################################"
  1058. echo "### CONFIGURE ERROR:"
  1059. echo "### Failed to compile the pthread test program."
  1060. echo "### It looks that you either don't have libpthread installed or"
  1061. echo "### it is not reachable by the linker."
  1062. echo "### Make sure that libpthread is in /lib or /usr/lib."
  1063. echo "### If you're on solaris you might try the --with-solaris-lthread"
  1064. echo "### configure option. If you're on FreeBSD you should use"
  1065. echo "### --with-freebsd-pthread."
  1066. echo "### Good luck :)"
  1067. echo "################################################################################"
  1068. fi
  1069. AC_SS_SET_NORMALINK
  1070. AC_MSG_ERROR(["This was fatal...aborting"])
  1071. fi
  1072. fi
  1073. fi
  1074. ])
  1075. dnl ###################################################################################################################
  1076. dnl ### X
  1077. dnl ###################################################################################################################
  1078. AC_DEFUN([AC_SS_FIND_X],
  1079. [
  1080. SS_DISABLE_X_SUPPORT="false"
  1081. AC_MSG_CHECKING([if you want to ignore X at all])
  1082. AC_ARG_ENABLE(x-support, [ --disable-x-support Ignore X Windows completely],SS_DISABLE_X_SUPPORT="true")
  1083. if test $SS_DISABLE_X_SUPPORT = "true"; then
  1084. AC_DEFINE([COMPILE_NO_X], 1, [define if you want to ignore X Windows completely])
  1085. SS_X_INCDIR="/usr/include"
  1086. SS_X_LIBDIR="/usr/lib"
  1087. SS_X_LDFLAGS=""
  1088. SS_X_CPPFLAGS=""
  1089. SS_X_LIBLINK=""
  1090. AC_MSG_RESULT(yes)
  1091. else
  1092. AC_MSG_RESULT(no, proceeding with checks)
  1093. AC_PATH_XTRA
  1094. if test -n "$no_x"; then
  1095. AC_SS_SET_REDINK
  1096. echo "################################################################################"
  1097. echo "### CONFIGURE ERROR:"
  1098. echo "### Can not find the X libraries."
  1099. echo "### Make sure that X is installed on your system and try to run configure again,"
  1100. echo "### this time passing the --x-includes and --x-libraries options."
  1101. echo "### You may also take a look at the config.log file in this directory,"
  1102. echo "### that will tell you which checks have failed and maybe more about the"
  1103. echo "### reason of the failure."
  1104. echo "###"
  1105. echo "### If you use an environment that does not require X support such as Qt-Mac"
  1106. echo "### you may try to rerun configure with --disable-x-support"
  1107. echo "################################################################################"
  1108. AC_SS_SET_NORMALINK
  1109. AC_MSG_ERROR([This was a fatal one...aborting])
  1110. else
  1111. # Set the X include and lib dir
  1112. SS_X_INCDIR="$x_includes"
  1113. SS_X_LIBDIR="$x_libraries"
  1114. SS_X_LIBLINK="-lX11 -lXext"
  1115. if test -z "$SS_X_INCDIR"; then
  1116. # Ops... X headers not found ?
  1117. AC_TRY_COMPILE([
  1118. #include <X11/Xlib.h>
  1119. ],[
  1120. Display * d = XOpenDisplay(0);
  1121. XCloseDisplay(d);
  1122. ],
  1123. eval "ss_x_incdir_found=yes"
  1124. ,
  1125. eval "ss_x_incdir_found=no"
  1126. )
  1127. if test "$ss_x_incdir_found" = "no"; then
  1128. AC_SS_SET_REDINK
  1129. echo "################################################################################"
  1130. echo "### CONFIGURE ERROR:"
  1131. echo "### Can not find the X headers."
  1132. echo "### Possible reasons:"
  1133. echo "### 1) You miss the X server development files (Xlib.h for example)"
  1134. echo "###"
  1135. echo "### 2) Autoconf/Automake wasn't able to find the headers"
  1136. echo "### for some ugly reason."
  1137. echo "###"
  1138. echo "### You might try looking for a file named Xlib.h in your hard-drive"
  1139. echo "### and try passing the --x-includes option to ./configure"
  1140. echo "### Remember that if you find Xlib.h in /somepath/include/X11/Xlib.h"
  1141. echo "### Then you must pass --x-includes=/somepath/include to ./configure"
  1142. echo "### For example, my Xlib.h is in /usr/X11R6/include/X11/Xlib.h"
  1143. echo "### then i would try: ./configure --x-includes=/usr/X11R6/include"
  1144. echo "### If you can't find Xlib.h on your hard drive then install the X-devel"
  1145. echo "### package from your distribution."
  1146. echo "### If Xlib.h is there and --x-includes doesn't help, well , there is something"
  1147. echo "### wrong with X , autoconf or automake."
  1148. echo "### You may also take a look at the config.log file in this directory,"
  1149. echo "### that will tell you which checks have failed and maybe more about the"
  1150. echo "### reason of the failure."
  1151. echo "###"
  1152. echo "### If you use an environment that does not require X support such as Qt-Mac"
  1153. echo "### you may try to rerun configure with --disable-x-support"
  1154. echo "################################################################################"
  1155. AC_SS_SET_NORMALINK
  1156. AC_MSG_ERROR([This was a fatal one...aborting])
  1157. else
  1158. # We can compile X programs without any additional path... use a dummy include path then
  1159. # Should we print a warning ?
  1160. SS_X_INCDIR="/usr/include"
  1161. fi
  1162. fi
  1163. if test -z "$SS_X_LIBDIR"; then
  1164. # Ops... X libs not found ?
  1165. SS_SAVE_LIBS="$LIBS"
  1166. SS_SAVE_CFLAGS="$CFLAGS"
  1167. SS_SAVE_CPPFLAGS="$CPPFLAGS"
  1168. SS_SAVE_CXXFLAGS="$CXXFLAGS"
  1169. CFLAGS="-I$SS_X_INCDIR"
  1170. CPPFLAGS="$CFLAGS"
  1171. CXXFLAGS="$CFLAGS"
  1172. LIBS="$SS_X_LIBLINK"
  1173. AC_TRY_LINK([
  1174. #include <X11/Xlib.h>
  1175. ],[
  1176. Display * d = XOpenDisplay(0);
  1177. XCloseDisplay(d);
  1178. ],
  1179. eval "ss_x_libdir_found=yes"
  1180. ,
  1181. eval "ss_x_libdir_found=no"
  1182. )
  1183. LIBS="$SS_SAVE_LIBS"
  1184. CFLAGS="$SS_SAVE_CFLAGS"
  1185. CPPFLAGS="$SS_SAVE_CPPFLAGS"
  1186. CXXFLAGS="$SS_SAVE_CXXFLAGS"
  1187. if test "$ss_x_libdir_found" = "no"; then
  1188. AC_SS_SET_REDINK
  1189. echo "################################################################################"
  1190. echo "### CONFIGURE ERROR:"
  1191. echo "### Can not find the X libraries."
  1192. echo "### Possible reasons:"
  1193. echo "### 1) You have no X server : KVIrc can't run on this system"
  1194. echo "###"
  1195. echo "### 2) Autoconf/Automake wasn't able to find the libraries"
  1196. echo "### for some ugly reason."
  1197. echo "###"
  1198. echo "### You might try looking for a file named libX11.so in your hard-drive"
  1199. echo "### and try passing the --x-libraries option to ./configure"
  1200. echo "### Remember that if you find libX11.so in /somepath/lib/libX11.so"
  1201. echo "### Then you must pass --x-libraries=/somepath/lib to ./configure"
  1202. echo "### For example, my libX11.so is in /usr/X11R6/lib/libX11.so"
  1203. echo "### then i would try: ./configure --x-libraries=/usr/X11R6/lib"
  1204. echo "### If you can't find libX11.so on your hard drive then install the X server"
  1205. echo "### package from your distribution."
  1206. echo "### If libX11.so is there and --x-libraries doesn't help, well , there is something"
  1207. echo "### wrong with X , autoconf or automake."
  1208. echo "### You may also take a look at the config.log file in this directory,"
  1209. echo "### that will tell you which checks have failed and maybe more about the"
  1210. echo "### reason of the failure."
  1211. echo "###"
  1212. echo "### If you use an environment that does not require X support such as Qt-Mac"
  1213. echo "### you may try to rerun configure with --disable-x-support"
  1214. echo "################################################################################"
  1215. AC_SS_SET_NORMALINK
  1216. AC_MSG_ERROR([This was a fatal one...aborting])
  1217. else
  1218. # We can link X programs without any additional path... use a dummy lib path then
  1219. # Should we print a warning ?
  1220. SS_X_LIBDIR="/usr/lib"
  1221. fi
  1222. fi
  1223. # Add any extra libs needed
  1224. SS_X_LDFLAGS=""
  1225. if test -n "$X_PRE_LIBS"; then
  1226. SS_X_LDFLAGS="$X_PRE_LIBS $SS_X_LDFLAGS"
  1227. fi
  1228. if test -n "$X_EXTRA_LIBS"; then
  1229. SS_X_LDFLAGS="$SS_X_LDFLAGS $X_EXTRA_LIBS"
  1230. fi
  1231. if test -n "$X_LIBS"; then
  1232. SS_X_LDFLAGS="$SS_X_LDFLAGS $X_LIBS"
  1233. fi
  1234. # Add any extra gcc flags
  1235. SS_X_CPPFLAGS=$X_CFLAGS
  1236. fi
  1237. fi
  1238. ])
  1239. dnl ###################################################################################################################
  1240. dnl ### QT
  1241. dnl ###################################################################################################################
  1242. AC_DEFUN([AC_SS_FIND_QT],
  1243. [
  1244. AC_ARG_ENABLE(qt-check,
  1245. AC_HELP_STRING([--disable-qt-check],[Do not check if Qt and X compile]),
  1246. SS_CHECK_QTX_COMPILE="$withval",SS_CHECK_QTX_COMPILE="NOTGIVEN")
  1247. AC_ARG_ENABLE(qt4,
  1248. AC_HELP_STRING([--enable-qt4],[Enable WORK IN PROGRESS Qt4 support]),
  1249. SS_USE_QT4="$withval",SS_USE_QT4="no")
  1250. if test "$SS_USE_QT4" = "no"; then
  1251. AC_SS_FIND_QT3_NAME
  1252. AC_SS_FIND_QT3_GENERAL_DIR
  1253. AC_SS_FIND_QT3_LIBRARY_DIR
  1254. AC_SS_FIND_QT3_INCLUDE_DIR
  1255. AC_SS_FIND_QT3_MOC
  1256. AC_SS_FIND_QT3_MT
  1257. if test "$SS_CHECK_QTX_COMPILE" = "NOTGIVEN"; then
  1258. AC_SS_ENSURE_CAN_COMPILE_X_AND_QT3
  1259. fi
  1260. else
  1261. AC_SS_FIND_QT4_GENERAL_DIR
  1262. AC_SS_FIND_QT4_LIBRARY_DIR
  1263. AC_SS_FIND_QT4_INCLUDE_DIR
  1264. AC_SS_FIND_QT4_MOC
  1265. if test "$SS_CHECK_QTX_COMPILE" = "NOTGIVEN"; then
  1266. AC_SS_ENSURE_CAN_COMPILE_X_AND_QT4
  1267. fi
  1268. fi
  1269. ])
  1270. AC_DEFUN([AC_SS_FIND_QT3_NAME],
  1271. [
  1272. AC_MSG_CHECKING([for the TQt library name])
  1273. AC_ARG_WITH(qt-name,[ --with-tqt-name=NAME Use NAME instead of \"tqt\" as TQt library name],SS_TQTLIB_NAME="$withval",SS_TQTLIB_NAME="tqt")
  1274. AC_MSG_RESULT("$SS_TQTLIB_NAME")
  1275. ])
  1276. AC_DEFUN([AC_SS_FIND_QT3_GENERAL_DIR],
  1277. [
  1278. AC_MSG_CHECKING([for the general Qt3.x directory])
  1279. lib_multiarch="`gcc -print-multiarch 2>/dev/null`"
  1280. ss_qt_general_test_dirs="/usr/local /usr /usr/X11R6 /usr/lib/$lib_multiarch /usr/lib /opt /opt/kde /kde /usr/kde /usr/build /usr/src /usr/local/lib /"
  1281. ss_qt_general_test_dirs="$ss_qt_general_test_dirs /usr/local/kde /usr/opt/kde"
  1282. if test -n "$HOME"; then
  1283. ss_qt_general_test_dirs="$ss_qt_general_test_dirs $HOME $HOME/lib"
  1284. fi
  1285. if test -n "$TQTDIR"; then
  1286. ss_qt_general_test_dirs="$TQTDIR $ss_qt_general_test_dirs"
  1287. fi
  1288. ss_qt_general_test_path_suffix="qt$SS_QT3_MAJOR_VERSION_REQUIRED.$SS_QT3_MINOR_VERSION_REQUIRED.$SS_QT3_PATCH_LEVEL_REQUIRED"
  1289. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt.$SS_QT3_MAJOR_VERSION_REQUIRED.$SS_QT3_MINOR_VERSION_REQUIRED.$SS_QT3_PATCH_LEVEL_REQUIRED"
  1290. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt.$SS_QT3_MAJOR_VERSION_REQUIRED$SS_QT3_MINOR_VERSION_REQUIRED$SS_QT3_PATCH_LEVEL_REQUIRED"
  1291. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt-$SS_QT3_MAJOR_VERSION_REQUIRED.$SS_QT3_MINOR_VERSION_REQUIRED.$SS_QT3_PATCH_LEVEL_REQUIRED"
  1292. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt-$SS_QT3_MAJOR_VERSION_REQUIRED$SS_QT3_MINOR_VERSION_REQUIRED$SS_QT3_PATCH_LEVEL_REQUIRED"
  1293. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt$SS_QT3_MAJOR_VERSION_REQUIRED.$SS_QT3_MINOR_VERSION_REQUIRED"
  1294. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt.$SS_QT3_MAJOR_VERSION_REQUIRED.$SS_QT3_MINOR_VERSION_REQUIRED"
  1295. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt.$SS_QT3_MAJOR_VERSION_REQUIRED$SS_QT3_MINOR_VERSION_REQUIRED"
  1296. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt-$SS_QT3_MAJOR_VERSION_REQUIRED.$SS_QT3_MINOR_VERSION_REQUIRED"
  1297. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt-$SS_QT3_MAJOR_VERSION_REQUIRED$SS_QT3_MINOR_VERSION_REQUIRED"
  1298. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt$SS_QT3_MAJOR_VERSION_REQUIRED"
  1299. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt.$SS_QT3_MAJOR_VERSION_REQUIRED"
  1300. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt-$SS_QT3_MAJOR_VERSION_REQUIRED"
  1301. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix lib"
  1302. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt ."
  1303. AC_SS_FIND_FILE_PATH_EXT($SS_TQT3_GENERAL_FILE_TO_SEARCH,$ss_qt_general_test_dirs,$ss_qt_general_test_path_suffix,SS_QT3_GENERAL_DIR)
  1304. if test "$SS_QT3_GENERAL_DIR" = "FAILED"; then
  1305. AC_SS_FIND_FILE_PATH_EXT($SS_QT3_GENERAL_FILE_TO_SEARCH,$ss_qt_general_test_dirs,$ss_qt_general_test_path_suffix,SS_QT3_GENERAL_DIR)
  1306. if test "$SS_QT3_GENERAL_DIR" = "FAILED"; then
  1307. AC_MSG_RESULT([failed...continuing with normal checks])
  1308. unset SS_QT3_GENERAL_DIR
  1309. else
  1310. AC_MSG_RESULT([Seems to be $SS_QT3_GENERAL_DIR])
  1311. fi
  1312. else
  1313. AC_MSG_RESULT([Seems to be $SS_QT3_GENERAL_DIR])
  1314. fi
  1315. ])
  1316. AC_DEFUN([AC_SS_FIND_QT4_GENERAL_DIR],
  1317. [
  1318. AC_MSG_CHECKING([for the general Qt4.x directory])
  1319. ss_qt_general_test_dirs="/usr/local /usr /usr/X11R6 /usr/lib /opt /opt/kde /kde /usr/kde /usr/build /usr/src /usr/local/lib /"
  1320. ss_qt_general_test_dirs="$ss_qt_general_test_dirs /usr/local/kde /usr/opt/kde /usr/lib/qt4 /usr/local/lib/qt4"
  1321. if test -n "$HOME"; then
  1322. ss_qt_general_test_dirs="$ss_qt_general_test_dirs $HOME $HOME/lib"
  1323. fi
  1324. if test -n "$TQTDIR"; then
  1325. ss_qt_general_test_dirs="$TQTDIR $ss_qt_general_test_dirs"
  1326. fi
  1327. ss_qt_general_test_path_suffix="qt$SS_QT4_MAJOR_VERSION_REQUIRED.$SS_QT4_MINOR_VERSION_REQUIRED.$SS_QT4_PATCH_LEVEL_REQUIRED"
  1328. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt.$SS_QT4_MAJOR_VERSION_REQUIRED.$SS_QT4_MINOR_VERSION_REQUIRED.$SS_QT4_PATCH_LEVEL_REQUIRED"
  1329. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt.$SS_QT4_MAJOR_VERSION_REQUIRED$SS_QT4_MINOR_VERSION_REQUIRED$SS_QT4_PATCH_LEVEL_REQUIRED"
  1330. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt-$SS_QT4_MAJOR_VERSION_REQUIRED.$SS_QT4_MINOR_VERSION_REQUIRED.$SS_QT4_PATCH_LEVEL_REQUIRED"
  1331. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt-$SS_QT4_MAJOR_VERSION_REQUIRED$SS_QT4_MINOR_VERSION_REQUIRED$SS_QT4_PATCH_LEVEL_REQUIRED"
  1332. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt$SS_QT4_MAJOR_VERSION_REQUIRED.$SS_QT4_MINOR_VERSION_REQUIRED"
  1333. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt.$SS_QT4_MAJOR_VERSION_REQUIRED.$SS_QT4_MINOR_VERSION_REQUIRED"
  1334. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt.$SS_QT4_MAJOR_VERSION_REQUIRED$SS_QT4_MINOR_VERSION_REQUIRED"
  1335. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt-$SS_QT4_MAJOR_VERSION_REQUIRED.$SS_QT4_MINOR_VERSION_REQUIRED"
  1336. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt-$SS_QT4_MAJOR_VERSION_REQUIRED$SS_QT4_MINOR_VERSION_REQUIRED"
  1337. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt$SS_QT4_MAJOR_VERSION_REQUIRED"
  1338. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt.$SS_QT4_MAJOR_VERSION_REQUIRED"
  1339. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt-$SS_QT4_MAJOR_VERSION_REQUIRED"
  1340. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix lib"
  1341. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt ."
  1342. AC_SS_FIND_FILE_PATH_EXT($SS_QT4_GENERAL_FILE_TO_SEARCH,$ss_qt_general_test_dirs,$ss_qt_general_test_path_suffix,SS_QT4_GENERAL_DIR)
  1343. if test "$SS_QT4_GENERAL_DIR" = "FAILED"; then
  1344. AC_MSG_RESULT([failed...continuing with normal checks])
  1345. unset SS_QT4_GENERAL_DIR
  1346. else
  1347. AC_MSG_RESULT([Seems to be $SS_QT4_GENERAL_DIR])
  1348. fi
  1349. ])
  1350. AC_DEFUN([AC_SS_FIND_QT3_INCLUDE_DIR],
  1351. [
  1352. AC_ARG_WITH(qt-include-dir,[ --with-qt-include-dir path to the Qt 3.x headers ],SS_QT3_INCDIR="$withval",SS_QT3_INCDIR="NOTGIVEN")
  1353. if test "$SS_QT3_INCDIR" = "NOTGIVEN"; then
  1354. AC_MSG_CHECKING([for the Qt 3.x header files])
  1355. ss_qt_include_test_dirs="$SS_QT3_GENERAL_DIR/include /include /usr/include /usr/local/include /usr/qt/include /usr/local/qt/include /usr/X11R6/include /usr/lib/qt/include /usr/lib/qt /usr/include/X11"
  1356. test -n "$TQTDIR" && ss_qt_include_test_dirs="$TQTDIR/include $TQTDIR $ss_qt_include_test_dirs"
  1357. ss_qt_include_test_dirs="$ss_qt_include_test_dirs /usr/include/qt /usr/include/tqt3 /usr/include/qt3 /usr/local/include/qt /include/qt /usr/X11R6/include/qt /usr/build/qt/include"
  1358. ss_qt_include_test_dirs="$ss_qt_include_test_dirs /usr/include/tqt$SS_QT3_MAJOR_VERSION_REQUIRED /usr/include/qt$SS_QT3_MAJOR_VERSION_REQUIRED /usr/include/qt-$SS_QT3_MAJOR_VERSION_REQUIRED /usr/local/include/qt$SS_QT3_MAJOR_VERSION_REQUIRED"
  1359. ss_qt_include_test_dirs="$ss_qt_include_test_dirs /include/tqt$SS_QT3_MAJOR_VERSION_REQUIRED /include/qt$SS_QT3_MAJOR_VERSION_REQUIRED /usr/X11R6/include/qt$SS_QT3_MAJOR_VERSION_REQUIRED"
  1360. ss_qt_include_test_dirs="$ss_qt_include_test_dirs /usr/include/X11/qt$SS_QT3_MAJOR_VERSION_REQUIRED /opt/qt /opt/kde/qt"
  1361. AC_SS_FIND_FILE_PATH($SS_TQT3_INCLUDE_FILE_TO_SEARCH,$ss_qt_include_test_dirs,SS_QT3_INCDIR)
  1362. if test "$SS_QT3_INCDIR" = "FAILED"; then
  1363. AC_SS_FIND_FILE_PATH($SS_QT3_INCLUDE_FILE_TO_SEARCH,$ss_qt_include_test_dirs,SS_QT3_INCDIR)
  1364. fi
  1365. if test "$SS_QT3_INCDIR" = "FAILED"; then
  1366. dnl HACK HACK HACK
  1367. ss_qt_include_test_dirs="$SS_QT4_GENERAL_DIR/include /include /usr/include /usr/local/include /usr/qt/include /usr/include/qt4 /usr/qt4/include /usr/local/qt/include /usr/X11R6/include /usr/lib/qt/include /usr/lib/qt /usr/include/X11"
  1368. test -n "$TQTDIR" && ss_qt_include_test_dirs="$TQTDIR/include $TQTDIR $ss_qt_include_test_dirs"
  1369. ss_qt_include_test_dirs="$ss_qt_include_test_dirs /usr/include/qt /usr/include/qt4 /usr/local/include/qt /include/qt /usr/X11R6/include/qt /usr/build/qt/include"
  1370. ss_qt_include_test_dirs="$ss_qt_include_test_dirs /usr/include/qt$SS_QT4_MAJOR_VERSION_REQUIRED /usr/include/qt-$SS_QT4_MAJOR_VERSION_REQUIRED /usr/local/include/qt$SS_QT4_MAJOR_VERSION_REQUIRED"
  1371. ss_qt_include_test_dirs="$ss_qt_include_test_dirs /include/qt$SS_QT4_MAJOR_VERSION_REQUIRED /usr/X11R6/include/qt$SS_QT4_MAJOR_VERSION_REQUIRED"
  1372. ss_qt_include_test_dirs="$ss_qt_include_test_dirs /usr/include/X11/qt$SS_QT4_MAJOR_VERSION_REQUIRED /opt/qt /opt/kde/qt"
  1373. AC_SS_FIND_FILE_PATH($SS_QT4_INCLUDE_FILE_TO_SEARCH,$ss_qt_include_test_dirs,SS_QT4_INCDIR)
  1374. SS_QT3_INCDIR="$SS_QT4_INCDIR -I/usr/include/tqt -include tqt.h"
  1375. AC_MSG_RESULT([TQt4 detected--Qt4 found in $SS_QT3_INCDIR])
  1376. dnl AC_MSG_RESULT([FAILED])
  1377. dnl AC_SS_SET_REDINK
  1378. dnl echo "################################################################################"
  1379. dnl echo "### CONFIGURE ERROR:"
  1380. dnl echo "### Can not find the qt 3.x header files."
  1381. dnl echo "### Make sure that qt is correctly installed on your system,"
  1382. dnl echo "### and the qt version is the one requested by this version of kvirc."
  1383. dnl echo "### Try to run configure again, this time passing the --with-qt-include-dir"
  1384. dnl echo "### option (see ./configure --help)."
  1385. dnl echo "### You may also take a look at the config.log file in this directory,"
  1386. dnl echo "### that will tell you which check has failed and maybe more about the reason"
  1387. dnl echo "### of the failure."
  1388. dnl echo "### If you're feeling that this may be a bug in this configure script"
  1389. dnl echo "### and want to report this to me , please include your configure script,"
  1390. dnl echo "### the config.log file as well as the complete configure output."
  1391. dnl echo "################################################################################"
  1392. dnl AC_SS_SET_NORMALINK
  1393. dnl AC_MSG_ERROR([This was a fatal one...aborting])
  1394. else
  1395. SS_QT3_INCDIR="$SS_QT3_INCDIR -I/usr/include/tqt -include tqt.h"
  1396. AC_MSG_RESULT([found in $SS_QT3_INCDIR])
  1397. fi
  1398. else
  1399. AC_MSG_RESULT([using user supplied path for the Qt 3.x include files $SS_QT3_INCDIR])
  1400. SS_QT3_INCDIR="$SS_QT3_INCDIR -I/usr/include/tqt -include tqt.h"
  1401. fi
  1402. ])
  1403. AC_DEFUN([AC_SS_FIND_QT4_INCLUDE_DIR],
  1404. [
  1405. AC_ARG_WITH(qt4-include-dir,[ --with-qt4-include-dir path to the Qt 4.x headers ],SS_QT4_INCDIR="$withval",SS_QT4_INCDIR="NOTGIVEN")
  1406. if test "$SS_QT4_INCDIR" = "NOTGIVEN"; then
  1407. AC_MSG_CHECKING([for the Qt 4.x header files])
  1408. ss_qt_include_test_dirs="$SS_QT4_GENERAL_DIR/include /include /usr/include /usr/local/include /usr/qt/include /usr/include/qt4 /usr/qt4/include /usr/local/qt/include /usr/X11R6/include /usr/lib/qt/include /usr/lib/qt /usr/include/X11"
  1409. test -n "$TQTDIR" && ss_qt_include_test_dirs="$TQTDIR/include $TQTDIR $ss_qt_include_test_dirs"
  1410. ss_qt_include_test_dirs="$ss_qt_include_test_dirs /usr/include/qt /usr/include/qt4 /usr/local/include/qt /include/qt /usr/X11R6/include/qt /usr/build/qt/include"
  1411. ss_qt_include_test_dirs="$ss_qt_include_test_dirs /usr/include/qt$SS_QT4_MAJOR_VERSION_REQUIRED /usr/include/qt-$SS_QT4_MAJOR_VERSION_REQUIRED /usr/local/include/qt$SS_QT4_MAJOR_VERSION_REQUIRED"
  1412. ss_qt_include_test_dirs="$ss_qt_include_test_dirs /include/qt$SS_QT4_MAJOR_VERSION_REQUIRED /usr/X11R6/include/qt$SS_QT4_MAJOR_VERSION_REQUIRED"
  1413. ss_qt_include_test_dirs="$ss_qt_include_test_dirs /usr/include/X11/qt$SS_QT4_MAJOR_VERSION_REQUIRED /opt/qt /opt/kde/qt"
  1414. AC_SS_FIND_FILE_PATH($SS_QT4_INCLUDE_FILE_TO_SEARCH,$ss_qt_include_test_dirs,SS_QT4_INCDIR)
  1415. if test "$SS_QT4_INCDIR" = "FAILED"; then
  1416. AC_MSG_RESULT([FAILED])
  1417. AC_SS_SET_REDINK
  1418. echo "################################################################################"
  1419. echo "### CONFIGURE ERROR:"
  1420. echo "### Can not find the qt 4.x header files."
  1421. echo "### Make sure that qt is correctly installed on your system,"
  1422. echo "### and the qt version is the one requested by this version of kvirc."
  1423. echo "### Try to run configure again, this time passing the --with-qt4-include-dir"
  1424. echo "### option (see ./configure --help)."
  1425. echo "### You may also take a look at the config.log file in this directory,"
  1426. echo "### that will tell you which check has failed and maybe more about the reason"
  1427. echo "### of the failure."
  1428. echo "### If you're feeling that this may be a bug in this configure script"
  1429. echo "### and want to report this to me , please include your configure script,"
  1430. echo "### the config.log file as well as the complete configure output."
  1431. echo "################################################################################"
  1432. AC_SS_SET_NORMALINK
  1433. AC_MSG_ERROR([This was a fatal one...aborting])
  1434. else
  1435. AC_MSG_RESULT([found in $SS_QT4_INCDIR])
  1436. fi
  1437. else
  1438. AC_MSG_RESULT([using user supplied path for the Qt 4.x include files $SS_QT4_INCDIR])
  1439. fi
  1440. SS_QT4_INCDIRECTORIES="-I$SS_QT4_INCDIR -I$SS_QT4_INCDIR/Qt/ -I$SS_QT4_INCDIR/QtCore/ -I$SS_QT4_INCDIR/QtGui/";
  1441. ])
  1442. AC_DEFUN([AC_SS_FIND_QT3_LIBRARY_DIR],
  1443. [
  1444. AC_ARG_WITH(qt-library-dir,[ --with-qt-library-dir path to the Qt 3.x library ],SS_QT3_LIBDIR="$withval",SS_QT3_LIBDIR="NOTGIVEN")
  1445. if test "$SS_QT3_LIBDIR" = "NOTGIVEN"; then
  1446. AC_MSG_CHECKING([for the TQt library])
  1447. lib_multiarch="`gcc -print-multiarch 2>/dev/null`"
  1448. ss_qt_library_test_dirs="$SS_QT3_GENERAL_DIR/lib /lib/$lib_multiarch /usr/lib/$lib_multiarch /usr/local/lib/$lib_multiarch /lib /usr/lib /usr/local/lib /usr/qt/lib /usr/local/qt/lib /usr/X11R6/lib /usr/lib/qt/lib /usr/lib/qt /usr/local/lib/qt/lib"
  1449. test -n "$TQTDIR" && ss_qt_library_test_dirs="$TQTDIR/lib $TQTDIR $ss_qt_library_test_dirs"
  1450. ss_qt_library_test_dirs="$ss_qt_library_test_dirs /usr/local/lib/qt /usr/X11R6/lib/qt /usr/build/qt/lib /opt/lib /opt/qt/lib"
  1451. ss_qt_libs_to_find="lib$SS_TQTLIB_NAME-mt.so.$SS_QT3_MAJOR_VERSION_REQUIRED.$SS_QT3_MINOR_VERSION_REQUIRED.$SS_QT3_PATCH_LEVEL_REQUIRED"
  1452. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_TQTLIB_NAME-mt.so.$SS_QT3_MAJOR_VERSION_REQUIRED.$SS_QT3_MINOR_VERSION_REQUIRED"
  1453. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_TQTLIB_NAME-mt.so.$SS_QT3_MAJOR_VERSION_REQUIRED"
  1454. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_TQTLIB_NAME-mt.so"
  1455. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_TQTLIB_NAME.so.$SS_QT3_MAJOR_VERSION_REQUIRED.$SS_QT3_MINOR_VERSION_REQUIRED.$SS_QT3_PATCH_LEVEL_REQUIRED"
  1456. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_TQTLIB_NAME.so.$SS_QT3_MAJOR_VERSION_REQUIRED.$SS_QT3_MINOR_VERSION_REQUIRED"
  1457. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_TQTLIB_NAME.so.$SS_QT3_MAJOR_VERSION_REQUIRED"
  1458. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_TQTLIB_NAME.so"
  1459. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_TQTLIB_NAME-mt.$SS_QT3_MAJOR_VERSION_REQUIRED.$SS_QT3_MINOR_VERSION_REQUIRED.$SS_QT3_PATCH_LEVEL_REQUIRED.dylib"
  1460. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_TQTLIB_NAME-mt.$SS_QT3_MAJOR_VERSION_REQUIRED.$SS_QT3_MINOR_VERSION_REQUIRED.dylib"
  1461. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_TQTLIB_NAME-mt.$SS_QT3_MAJOR_VERSION_REQUIRED.dylib"
  1462. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_TQTLIB_NAME-mt.dylib"
  1463. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_TQTLIB_NAME.$SS_QT3_MAJOR_VERSION_REQUIRED.$SS_QT3_MINOR_VERSION_REQUIRED.$SS_QT3_PATCH_LEVEL_REQUIRED.dylib"
  1464. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_TQTLIB_NAME.$SS_QT3_MAJOR_VERSION_REQUIRED.$SS_QT3_MINOR_VERSION_REQUIRED.dylib"
  1465. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_TQTLIB_NAME.$SS_QT3_MAJOR_VERSION_REQUIRED.dylib"
  1466. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_TQTLIB_NAME.dylib"
  1467. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_TQTLIB_NAME-mt.a"
  1468. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_TQTLIB_NAME.a"
  1469. AC_SS_FIND_FILE_PATH($ss_qt_libs_to_find,$ss_qt_library_test_dirs,SS_QT3_LIBDIR)
  1470. if test "$SS_QT3_LIBDIR" = "FAILED"; then
  1471. dnl HACK HACK HACK
  1472. AC_MSG_CHECKING([for the Qt 4.x libraries])
  1473. ss_qt_library_test_dirs="$SS_QT4_GENERAL_DIR/lib /lib /usr/lib /usr/local/lib /usr/qt/lib /usr/local/qt/lib /usr/X11R6/lib /usr/lib/qt/lib /usr/lib/qt /usr/local/lib/qt/lib"
  1474. test -n "$TQTDIR" && ss_qt_library_test_dirs="$TQTDIR/lib $TQTDIR $ss_qt_library_test_dirs"
  1475. ss_qt_library_test_dirs="$ss_qt_library_test_dirs /usr/local/lib/qt /usr/X11R6/lib/qt /usr/build/qt/lib /opt/lib /opt/qt/lib"
  1476. ss_qt_library_test_dirs="$ss_qt_library_test_dirs /usr/lib/qt4 /usr/local/lib/qt4 /usr/X11R6/lib/qt4"
  1477. ss_qt_library_test_dirs="$ss_qt_library_test_dirs /usr/build/qt4/lib /opt/qt4/lib"
  1478. ss_qt_libs_to_find="libQtCore.so.$SS_QT4_MAJOR_VERSION_REQUIRED.$SS_QT4_MINOR_VERSION_REQUIRED.$SS_QT4_PATCH_LEVEL_REQUIRED"
  1479. ss_qt_libs_to_find="$ss_qt_libs_to_find libQtCore.so.$SS_QT4_MAJOR_VERSION_REQUIRED.$SS_QT4_MINOR_VERSION_REQUIRED"
  1480. ss_qt_libs_to_find="$ss_qt_libs_to_find libQtCore.so.$SS_QT4_MAJOR_VERSION_REQUIRED"
  1481. ss_qt_libs_to_find="$ss_qt_libs_to_find libQtCore.so"
  1482. ss_qt_libs_to_find="$ss_qt_libs_to_find libQtCore.so.$SS_QT4_MAJOR_VERSION_REQUIRED.$SS_QT4_MINOR_VERSION_REQUIRED.dylib"
  1483. ss_qt_libs_to_find="$ss_qt_libs_to_find libQtCore.so.$SS_QT4_MAJOR_VERSION_REQUIRED.dylib"
  1484. ss_qt_libs_to_find="$ss_qt_libs_to_find libQtCore.so.dylib"
  1485. ss_qt_libs_to_find="$ss_qt_libs_to_find libQtCore.so.a"
  1486. AC_SS_FIND_FILE_PATH($ss_qt_libs_to_find,$ss_qt_library_test_dirs,SS_QT4_LIBDIR)
  1487. SS_QT3_LIBDIR="$SS_QT4_LIBDIR"
  1488. SS_TQTLIB_NAME="tqt"
  1489. AC_MSG_RESULT([TQt4 detected--Qt4 found in $SS_QT3_LIBDIR])
  1490. dnl AC_MSG_RESULT([FAILED])
  1491. dnl AC_SS_SET_REDINK
  1492. dnl echo "################################################################################"
  1493. dnl echo "### CONFIGURE ERROR:"
  1494. dnl echo "### Can not find the qt 3.x library file."
  1495. dnl echo "### Make sure that qt is correctly installed on your system,"
  1496. dnl echo "### and the qt version is the one requested by this version of kvirc."
  1497. dnl echo "### (Usually a greater version is OK too)"
  1498. dnl echo "### Try to run configure again, this time passing the --with-qt-library-dir"
  1499. dnl echo "### option (see ./configure --help)."
  1500. dnl echo "### You may also take a look at the config.log file in this directory,"
  1501. dnl echo "### that will tell you which check has failed and maybe more about the reason"
  1502. dnl echo "### of the failure."
  1503. dnl echo "### If you're feeling that this may be a bug in this configure script"
  1504. dnl echo "### and want to report this to me , please include your configure script,"
  1505. dnl echo "### the config.log file as well as the complete configure output."
  1506. dnl echo "################################################################################"
  1507. dnl AC_SS_SET_NORMALINK
  1508. dnl AC_MSG_ERROR([This was a fatal one...aborting])
  1509. else
  1510. AC_MSG_RESULT([TQt3 found in $SS_QT3_LIBDIR])
  1511. fi
  1512. else
  1513. AC_MSG_RESULT([using user supplied path for the Qt library $SS_QT3_LIBDIR])
  1514. fi
  1515. ])
  1516. AC_DEFUN([AC_SS_FIND_QT4_LIBRARY_DIR],
  1517. [
  1518. AC_ARG_WITH(qt4-library-dir,[ --with-qt4-library-dir path to the Qt 4.x library ],SS_QT4_LIBDIR="$withval",SS_QT4_LIBDIR="NOTGIVEN")
  1519. if test "$SS_QT4_LIBDIR" = "NOTGIVEN"; then
  1520. AC_MSG_CHECKING([for the Qt 4.x libraries])
  1521. ss_qt_library_test_dirs="$SS_QT4_GENERAL_DIR/lib /lib /usr/lib /usr/local/lib /usr/qt/lib /usr/local/qt/lib /usr/X11R6/lib /usr/lib/qt/lib /usr/lib/qt /usr/local/lib/qt/lib"
  1522. test -n "$TQTDIR" && ss_qt_library_test_dirs="$TQTDIR/lib $TQTDIR $ss_qt_library_test_dirs"
  1523. ss_qt_library_test_dirs="$ss_qt_library_test_dirs /usr/local/lib/qt /usr/X11R6/lib/qt /usr/build/qt/lib /opt/lib /opt/qt/lib"
  1524. ss_qt_library_test_dirs="$ss_qt_library_test_dirs /usr/lib/qt4 /usr/local/lib/qt4 /usr/X11R6/lib/qt4"
  1525. ss_qt_library_test_dirs="$ss_qt_library_test_dirs /usr/build/qt4/lib /opt/qt4/lib"
  1526. ss_qt_libs_to_find="libQtCore.so.$SS_QT4_MAJOR_VERSION_REQUIRED.$SS_QT4_MINOR_VERSION_REQUIRED.$SS_QT4_PATCH_LEVEL_REQUIRED"
  1527. ss_qt_libs_to_find="$ss_qt_libs_to_find libQtCore.so.$SS_QT4_MAJOR_VERSION_REQUIRED.$SS_QT4_MINOR_VERSION_REQUIRED"
  1528. ss_qt_libs_to_find="$ss_qt_libs_to_find libQtCore.so.$SS_QT4_MAJOR_VERSION_REQUIRED"
  1529. ss_qt_libs_to_find="$ss_qt_libs_to_find libQtCore.so"
  1530. ss_qt_libs_to_find="$ss_qt_libs_to_find libQtCore.so.$SS_QT4_MAJOR_VERSION_REQUIRED.$SS_QT4_MINOR_VERSION_REQUIRED.dylib"
  1531. ss_qt_libs_to_find="$ss_qt_libs_to_find libQtCore.so.$SS_QT4_MAJOR_VERSION_REQUIRED.dylib"
  1532. ss_qt_libs_to_find="$ss_qt_libs_to_find libQtCore.so.dylib"
  1533. ss_qt_libs_to_find="$ss_qt_libs_to_find libQtCore.so.a"
  1534. AC_SS_FIND_FILE_PATH($ss_qt_libs_to_find,$ss_qt_library_test_dirs,SS_QT4_LIBDIR)
  1535. if test "$SS_QT4_LIBDIR" = "FAILED"; then
  1536. AC_MSG_RESULT([FAILED])
  1537. AC_SS_SET_REDINK
  1538. echo "################################################################################"
  1539. echo "### CONFIGURE ERROR:"
  1540. echo "### Can not find the qt 4.x library files."
  1541. echo "### Make sure that qt is correctly installed on your system,"
  1542. echo "### and the qt version is the one requested by this version of kvirc."
  1543. echo "### (Usually a greater version is OK too)"
  1544. echo "### Try to run configure again, this time passing the --with-qt4-library-dir"
  1545. echo "### option (see ./configure --help)."
  1546. echo "### You may also take a look at the config.log file in this directory,"
  1547. echo "### that will tell you which check has failed and maybe more about the reason"
  1548. echo "### of the failure."
  1549. echo "### If you're feeling that this may be a bug in this configure script"
  1550. echo "### and want to report this to me , please include your configure script,"
  1551. echo "### the config.log file as well as the complete configure output."
  1552. echo "################################################################################"
  1553. AC_SS_SET_NORMALINK
  1554. AC_MSG_ERROR([This was a fatal one...aborting])
  1555. else
  1556. AC_MSG_RESULT([found in $SS_QT4_LIBDIR])
  1557. fi
  1558. else
  1559. AC_MSG_RESULT([using user supplied path for the Qt 4.x library $SS_QT4_LIBDIR])
  1560. fi
  1561. ])
  1562. AC_DEFUN([AC_SS_FIND_QT3_MOC],
  1563. [
  1564. AC_ARG_WITH(qt-moc,[ --with-qt-moc filename of the Qt 3.x meta object compiler ],SS_QT3_MOC="$withval",SS_QT3_MOC="NOTGIVEN")
  1565. if test "$SS_QT3_MOC" = "NOTGIVEN"; then
  1566. AC_MSG_CHECKING([for the Qt 3.x tmoc])
  1567. unset SS_QT3_MOC
  1568. ss_moc_test_dirs="$TQTDIR/bin $PATH /usr/bin /bin /usr/local/bin /usr/X11R6/bin /usr/lib/qt/bin /usr/local/qt/bin /usr/X11R6/qt/bin /usr/qt/bin /usr/build/qt/bin"
  1569. if test -n "$SS_QT3_GENERAL_DIR"; then
  1570. ss_moc_test_dirs="$SS_QT3_GENERAL_DIR/bin $ss_moc_test_dirs"
  1571. fi
  1572. AC_SS_FIND_FILE_PATH(tmoc,$ss_moc_test_dirs,SS_QT3_MOC)
  1573. if test "$SS_QT3_MOC" = "FAILED"; then
  1574. AC_MSG_RESULT([FAILED])
  1575. AC_SS_SET_REDINK
  1576. echo "################################################################################"
  1577. echo "### CONFIGURE ERROR:"
  1578. echo "### The Qt meta object compiler can not be found."
  1579. echo "### Make sure that qt is correctly installed on your system, it is on your path,"
  1580. echo "### and the qt version is the one requested by this version of kvirc."
  1581. echo "### Try to run configure again, this time passing the --with-qt-moc"
  1582. echo "### option (see ./configure --help)."
  1583. echo "### You may also take a look at the config.log file in this directory,"
  1584. echo "### that will tell you which check has failed and maybe more about the reason"
  1585. echo "### of the failure."
  1586. echo "### If you're feeling that this may be a bug in this configure script"
  1587. echo "### and want to report this to me , please include your configure script,"
  1588. echo "### the config.log file as well as the complete configure output."
  1589. echo "################################################################################"
  1590. AC_SS_SET_NORMALINK
  1591. AC_MSG_ERROR([This was a fatal one...aborting])
  1592. else
  1593. SS_QT3_MOC="$SS_QT3_MOC/tmoc"
  1594. AC_MSG_RESULT([found as $SS_QT3_MOC])
  1595. fi
  1596. else
  1597. AC_MSG_RESULT([trusting you: using $SS_QT3_MOC])
  1598. fi
  1599. ])
  1600. AC_DEFUN([AC_SS_FIND_QT4_MOC],
  1601. [
  1602. AC_ARG_WITH(qt4-moc,[ --with-qt4-moc filename of the Qt 4.x meta object compiler ],SS_QT4_MOC="$withval",SS_QT4_MOC="NOTGIVEN")
  1603. if test "$SS_QT4_MOC" = "NOTGIVEN"; then
  1604. AC_MSG_CHECKING([for the Qt 4.x moc])
  1605. unset SS_QT4_MOC
  1606. ss_moc_test_dirs="$TQTDIR/bin $PATH /usr/bin /bin /usr/local/bin /usr/X11R6/bin /usr/lib/qt/bin /usr/local/qt/bin /usr/X11R6/qt/bin /usr/qt/bin /usr/build/qt/bin"
  1607. if test -n "$SS_QT4_GENERAL_DIR"; then
  1608. ss_moc_test_dirs="$SS_QT4_GENERAL_DIR/bin $ss_moc_test_dirs"
  1609. fi
  1610. AC_SS_FIND_FILE_PATH(moc,$ss_moc_test_dirs,SS_QT4_MOC)
  1611. if test "$SS_QT4_MOC" = "FAILED"; then
  1612. AC_MSG_RESULT([FAILED])
  1613. AC_SS_SET_REDINK
  1614. echo "################################################################################"
  1615. echo "### CONFIGURE ERROR:"
  1616. echo "### The Qt 4.x meta object compiler can not be found."
  1617. echo "### Make sure that qt is correctly installed on your system, it is on your path,"
  1618. echo "### and the qt version is the one requested by this version of kvirc."
  1619. echo "### In particular you should make sure that the moc compiler is NOT the one"
  1620. echo "### shipped with Qt 3.x."
  1621. echo "### Try to run configure again, this time passing the --with-qt4-moc"
  1622. echo "### option (see ./configure --help)."
  1623. echo "### You may also take a look at the config.log file in this directory,"
  1624. echo "### that will tell you which check has failed and maybe more about the reason"
  1625. echo "### of the failure."
  1626. echo "### If you're feeling that this may be a bug in this configure script"
  1627. echo "### and want to report this to me , please include your configure script,"
  1628. echo "### the config.log file as well as the complete configure output."
  1629. echo "################################################################################"
  1630. AC_SS_SET_NORMALINK
  1631. AC_MSG_ERROR([This was a fatal one...aborting])
  1632. else
  1633. SS_QT4_MOC="$SS_QT4_MOC/moc"
  1634. AC_MSG_RESULT([found as $SS_QT4_MOC])
  1635. fi
  1636. else
  1637. AC_MSG_RESULT([trusting you: using $SS_QT4_MOC])
  1638. fi
  1639. ])
  1640. AC_DEFUN([AC_SS_FIND_QT3_MT],
  1641. [
  1642. AC_ARG_ENABLE(qt-mt,[ --disable-qt-mt ignore the threaded version of Qt],SS_QT3_NOMT="$withval",SS_QT3_NOMT="NOTGIVEN")
  1643. AC_MSG_CHECKING([for the multithreaded version of Qt])
  1644. if test "$SS_QT3_NOMT" = "NOTGIVEN"; then
  1645. ss_qt_libs_to_find="lib$SS_TQTLIB_NAME-mt.so.$SS_QT3_MAJOR_VERSION_REQUIRED.$SS_QT3_MINOR_VERSION_REQUIRED.$SS_QT3_PATCH_LEVEL_REQUIRED"
  1646. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_TQTLIB_NAME-mt.so.$SS_QT3_MAJOR_VERSION_REQUIRED.$SS_QT3_MINOR_VERSION_REQUIRED"
  1647. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_TQTLIB_NAME-mt.so.$SS_QT3_MAJOR_VERSION_REQUIRED"
  1648. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_TQTLIB_NAME-mt.so"
  1649. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_TQTLIB_NAME-mt.$SS_QT3_MAJOR_VERSION_REQUIRED.$SS_QT3_MINOR_VERSION_REQUIRED.$SS_QT3_PATCH_LEVEL_REQUIRED.dylib"
  1650. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_TQTLIB_NAME-mt.$SS_QT3_MAJOR_VERSION_REQUIRED.$SS_QT3_MINOR_VERSION_REQUIRED.dylib"
  1651. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_TQTLIB_NAME-mt.$SS_QT3_MAJOR_VERSION_REQUIRED.dylib"
  1652. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_TQTLIB_NAME-mt.dylib"
  1653. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_TQTLIB_NAME-mt.a"
  1654. AC_SS_FIND_FILE_PATH($ss_qt_libs_to_find,$SS_QT3_LIBDIR,SS_QTMTLIBDIR)
  1655. if test "$SS_QTMTLIBDIR" = "FAILED"; then
  1656. AC_MSG_RESULT([not found])
  1657. else
  1658. AC_MSG_RESULT([seems to be available])
  1659. SS_TQTLIB_NAME="$SS_TQTLIB_NAME-mt"
  1660. fi
  1661. else
  1662. AC_MSG_RESULT([disabled by user])
  1663. fi
  1664. ])
  1665. AC_DEFUN([AC_SS_ENSURE_CAN_COMPILE_X_AND_QT3],
  1666. [
  1667. AC_MSG_CHECKING([if we can compile an X-Qt 3.x application])
  1668. AC_LANG_CPLUSPLUS
  1669. ss_save_CPPFLAGS="$CPPFLAGS"
  1670. ss_save_CXXFLAGS="$CXXFLAGS"
  1671. ss_save_LDFLAGS="$LDFLAGS"
  1672. ss_save_LIBS="$LIBS"
  1673. if test -n "$SS_X_INCDIR"; then
  1674. CPPFLAGS="-I$SS_X_INCDIR"
  1675. else
  1676. CPPFLAGS=""
  1677. fi
  1678. CPPFLAGS="$CPPFLAGS -I$SS_QT3_INCDIR"
  1679. CXXFLAGS="-O2 -Wall -I/usr/include/tqt -include tqt.h $CXXFLAGS"
  1680. if test -n "$SS_X_LIBDIR"; then
  1681. LIBS="-L$SS_X_LIBDIR"
  1682. else
  1683. LIBS=""
  1684. fi
  1685. LIBS="$LIBS -L$SS_QT3_LIBDIR -l$SS_TQTLIB_NAME"
  1686. if test -n "$SS_X_LDFLAGS"; then
  1687. LIBS="$LIBS $SS_X_LDFLAGS"
  1688. fi
  1689. if test -n "$SS_X_LIBLINK"; then
  1690. LIBS="$LIBS $SS_X_LIBLINK"
  1691. fi
  1692. LDFLAGS="-s $LDFLAGS"
  1693. AC_TRY_LINK([
  1694. #include <tqglobal.h>
  1695. ],[return 0; ],SS_QTX_LINKED_OK="TRUE",SS_QTX_LINKED_OK="FALSE")
  1696. if test "$SS_QTX_LINKED_OK" = "FALSE"; then
  1697. AC_MSG_RESULT([FAILED]);
  1698. AC_SS_SET_REDINK
  1699. echo "################################################################################"
  1700. echo "### CONFIGURE ERROR:"
  1701. echo "### Failed to compile the Qt library test program."
  1702. echo "### This may be a bad sign :)"
  1703. echo "### First of all, make sure that qt is correctly installed on your system,"
  1704. echo "### and the qt version is the one requested by this version of kvirc."
  1705. echo "### Ensure that you have only one copy of qt visible at a time."
  1706. echo "### You may also take a look at the config.log file in this directory,"
  1707. echo "### that will tell you which check has failed and maybe more about the reason"
  1708. echo "### of the failure."
  1709. echo "### The CPPFLAGS used were:"
  1710. for a_flag in $CPPFLAGS ; do
  1711. echo "### $a_flag"
  1712. done
  1713. echo "### The CXXFLAGS used were:"
  1714. for a_flag in $CXXFLAGS ; do
  1715. echo "### $a_flag"
  1716. done
  1717. echo "### The LIBS used were:"
  1718. for a_flag in $LIBS ; do
  1719. echo "### $a_flag"
  1720. done
  1721. echo "### The LDFLAGS used were:"
  1722. for a_flag in $LDFLAGS ; do
  1723. echo "### $a_flag"
  1724. done
  1725. echo "### If you're sure that qt is correctly installed , you may force configure"
  1726. echo "### to skip this check and try to compile kvirc anyway."
  1727. echo "### Try using the --without-qt-check option."
  1728. echo "### If you're feeling that this may be a bug in this configure script"
  1729. echo "### and want to report this to me , please include your configure script,"
  1730. echo "### the config.log file as well as the complete configure output."
  1731. echo "################################################################################"
  1732. AC_SS_SET_NORMALINK
  1733. AC_MSG_ERROR([This was a fatal one...aborting])
  1734. fi
  1735. LIBS="$ss_save_LIBS"
  1736. LDFLAGS="$ss_save_LDFLAGS"
  1737. CXXFLAGS="$ss_save_CXXFLAGS"
  1738. CPPFLAGS="$ss_save_CPPFLAGS"
  1739. AC_MSG_RESULT([success])
  1740. ])
  1741. AC_DEFUN([AC_SS_ENSURE_CAN_COMPILE_X_AND_QT4],
  1742. [
  1743. AC_MSG_CHECKING([if we can compile an X-Qt 4.x application])
  1744. AC_LANG_CPLUSPLUS
  1745. ss_save_CPPFLAGS="$CPPFLAGS"
  1746. ss_save_CXXFLAGS="$CXXFLAGS"
  1747. ss_save_LDFLAGS="$LDFLAGS"
  1748. ss_save_LIBS="$LIBS"
  1749. if test -n "$SS_X_INCDIR"; then
  1750. CPPFLAGS="-I$SS_X_INCDIR"
  1751. else
  1752. CPPFLAGS=""
  1753. fi
  1754. CPPFLAGS="$CPPFLAGS $SS_QT4_INCDIRECTORIES"
  1755. CXXFLAGS="-O2 -Wall $CXXFLAGS"
  1756. if test -n "$SS_X_LIBDIR"; then
  1757. LIBS="-L$SS_X_LIBDIR"
  1758. else
  1759. LIBS=""
  1760. fi
  1761. LIBS="$LIBS -L$SS_QT4_LIBDIR -lQtCore"
  1762. if test -n "$SS_X_LDFLAGS"; then
  1763. LIBS="$LIBS $SS_X_LDFLAGS"
  1764. fi
  1765. if test -n "$SS_X_LIBLINK"; then
  1766. LIBS="$LIBS $SS_X_LIBLINK"
  1767. fi
  1768. LDFLAGS="-s $LDFLAGS"
  1769. AC_TRY_LINK([
  1770. #include <qglobal.h>
  1771. #if (TQT_VERSION < 0x040000)
  1772. #error "Bad qt version: too old"
  1773. #endif
  1774. ],[return 0; ],SS_QTX_LINKED_OK="TRUE",SS_QTX_LINKED_OK="FALSE")
  1775. if test "$SS_QTX_LINKED_OK" = "FALSE"; then
  1776. AC_MSG_RESULT([FAILED]);
  1777. AC_SS_SET_REDINK
  1778. echo "################################################################################"
  1779. echo "### CONFIGURE ERROR:"
  1780. echo "### Failed to compile the Qt 4.x library test program."
  1781. echo "### This may be a bad sign :)"
  1782. echo "### First of all, make sure that qt is correctly installed on your system,"
  1783. echo "### and the qt version is the one requested by this version of kvirc."
  1784. echo "### Ensure that you have only one copy of qt visible at a time."
  1785. echo "### You may also take a look at the config.log file in this directory,"
  1786. echo "### that will tell you which check has failed and maybe more about the reason"
  1787. echo "### of the failure."
  1788. echo "### The CPPFLAGS used were:"
  1789. for a_flag in $CPPFLAGS ; do
  1790. echo "### $a_flag"
  1791. done
  1792. echo "### The CXXFLAGS used were:"
  1793. for a_flag in $CXXFLAGS ; do
  1794. echo "### $a_flag"
  1795. done
  1796. echo "### The LIBS used were:"
  1797. for a_flag in $LIBS ; do
  1798. echo "### $a_flag"
  1799. done
  1800. echo "### The LDFLAGS used were:"
  1801. for a_flag in $LDFLAGS ; do
  1802. echo "### $a_flag"
  1803. done
  1804. echo "### If you're sure that qt is correctly installed , you may force configure"
  1805. echo "### to skip this check and try to compile kvirc anyway."
  1806. echo "### Try using the --without-qt-check option."
  1807. echo "### If you're feeling that this may be a bug in this configure script"
  1808. echo "### and want to report this to me , please include your configure script,"
  1809. echo "### the config.log file as well as the complete configure output."
  1810. echo "################################################################################"
  1811. AC_SS_SET_NORMALINK
  1812. AC_MSG_ERROR([This was a fatal one...aborting])
  1813. fi
  1814. LIBS="$ss_save_LIBS"
  1815. LDFLAGS="$ss_save_LDFLAGS"
  1816. CXXFLAGS="$ss_save_CXXFLAGS"
  1817. CPPFLAGS="$ss_save_CPPFLAGS"
  1818. AC_MSG_RESULT([success])
  1819. ])
  1820. dnl ###################################################################################################################
  1821. dnl ### KDE
  1822. dnl ###################################################################################################################
  1823. AC_DEFUN([AC_SS_FIND_KDE],
  1824. [
  1825. AC_SS_CHECK_IF_KDE_IS_REQUESTED
  1826. if test "$SS_KDE_REQUESTED" = "yes"; then
  1827. AC_SS_FIND_KDE_GENERAL_DIR
  1828. if test "$SS_KDE_REQUESTED" = "yes"; then
  1829. AC_SS_FIND_KDE_SERVICES_DIR
  1830. AC_SS_FIND_KDE_LIBRARY_DIR
  1831. if test "$SS_KDE_REQUESTED" = "yes"; then
  1832. AC_SS_FIND_KDE_INCLUDE_DIR
  1833. if test "$SS_KDE_REQUESTED" = "yes"; then
  1834. AC_SS_ENSURE_CAN_COMPILE_X_QT3_AND_KDE
  1835. fi
  1836. fi
  1837. fi
  1838. fi
  1839. ])
  1840. AC_DEFUN([AC_SS_CHECK_IF_KDE_IS_REQUESTED],
  1841. [
  1842. AC_MSG_CHECKING([if KDE support is requested])
  1843. if test "$SS_USE_QT4" = "no"; then
  1844. SS_KDE_REQUESTED="yes"
  1845. AC_ARG_WITH(kde-support,[ --without-kde-support Disable the KDE support even if it is detected ],SS_KDE_REQUESTED="$withval")
  1846. if test "$SS_KDE_REQUESTED" = "yes"; then
  1847. AC_MSG_RESULT([yes])
  1848. else
  1849. AC_MSG_RESULT([no])
  1850. fi
  1851. else
  1852. SS_KDE_REQUESTED="no"
  1853. AC_MSG_RESULT([unsupported with qt 4.x])
  1854. fi
  1855. ])
  1856. AC_DEFUN([AC_SS_FIND_KDE_GENERAL_DIR],
  1857. [
  1858. AC_MSG_CHECKING([for the general KDE directory])
  1859. ss_kde_general_test_dirs="/usr /usr/local /usr /usr/local /usr/build /usr/X11R6 /opt /usr/opt /usr/lib /usr/lib /usr/src /usr/lib /usr/local/lib"
  1860. if test -n "$HOME"; then
  1861. ss_kde_general_test_dirs="$ss_kde_general_test_dirs $HOME $HOME/lib"
  1862. fi
  1863. if test -n "$TDEDIR"; then
  1864. ss_kde_general_test_dirs="$TDEDIR $ss_kde_general_test_dirs"
  1865. fi
  1866. ss_kde_general_test_path_suffix="trinity tde TDE kde kde3.0 kde3 KDE Kde KDE3 kde3 ."
  1867. AC_SS_FIND_FILE_PATH_EXT($SS_KDE_GENERAL_FILE_TO_SEARCH,$ss_kde_general_test_dirs,$ss_kde_general_test_path_suffix,SS_KDE_GENERAL_DIR)
  1868. if test "$SS_KDE_GENERAL_DIR" = "FAILED"; then
  1869. AC_MSG_RESULT([failed...continuing with normal checks])
  1870. unset SS_KDE_GENERAL_DIR
  1871. else
  1872. AC_MSG_RESULT([Seems to be $SS_KDE_GENERAL_DIR])
  1873. fi
  1874. ])
  1875. AC_DEFUN([AC_SS_FIND_KDE_SERVICES_DIR],
  1876. [
  1877. AC_ARG_WITH(kde-services-dir,[ --with-kde-services-dir path to the KDE protocol services dir ],SS_KDE_SERVICESDIR="$withval",SS_KDE_SERVICESDIR="NOTGIVEN")
  1878. if test "$SS_KDE_SERVICESDIR" = "NOTGIVEN"; then
  1879. AC_MSG_CHECKING([for KDE services directory])
  1880. ss_kde_services_test_dirs="/usr/share/services /usr/local/share/services /usr/kde/share/services /usr/local/kde/share/services /usr/X11R6/share/services /opt/kde/share/services /usr/lib/kde/share/services"
  1881. test -n "$TDEDIR" && ss_kde_services_test_dirs="$TDEDIR/share/services $ss_kde_services_test_dirs"
  1882. ss_kde_services_test_dirs="$ss_kde_services_test_dirs /usr/share/kde/services"
  1883. test -n "$SS_KDE_GENERAL_DIR" && ss_kde_services_test_dirs="$SS_KDE_GENERAL_DIR/share/services $ss_kde_services_test_dirs"
  1884. AC_SS_FIND_FILE_PATH("http.protocol",$ss_kde_services_test_dirs,SS_KDE_SERVICESDIR)
  1885. if test "$SS_KDE_SERVICESDIR" = "FAILED"; then
  1886. SS_KDE_SERVICESDIR=""
  1887. AC_MSG_RESULT([unknown])
  1888. else
  1889. AC_MSG_RESULT([found in $SS_KDE_SERVICESDIR])
  1890. fi
  1891. else
  1892. AC_MSG_RESULT([using user supplied path for the KDE services dir $SS_KDE_SERVICESDIR])
  1893. fi
  1894. ])
  1895. AC_DEFUN([AC_SS_FIND_KDE_INCLUDE_DIR],
  1896. [
  1897. AC_ARG_WITH(kde-include-dir,[ --with-kde-include-dir path to the KDE headers ],SS_KDE_INCDIR="$withval",SS_KDE_INCDIR="NOTGIVEN")
  1898. if test "$SS_KDE_INCDIR" = "NOTGIVEN"; then
  1899. AC_MSG_CHECKING([for KDE header files])
  1900. ss_kde_include_test_dirs="/include /usr/include /usr/local/include /usr/kde/include /usr/local/kde/include /usr/X11R6/include /opt/kde/include /usr/lib/kde/include /usr/lib/kde /usr/include/X11"
  1901. test -n "$TDEDIR" && ss_kde_include_test_dirs="$TDEDIR/include $TDEDIR $ss_kde_include_test_dirs"
  1902. ss_kde_include_test_dirs="$ss_kde_include_test_dirs /usr/include/tde /usr/local/include/tde /include/tde /usr/X11R6/include/tde /usr/build/kde/include"
  1903. ss_kde_include_test_dirs="$ss_kde_include_test_dirs /usr/include/tde2 /usr/local/include/tde2 /include/tde2 /usr/X11R6/include/tde2 /usr/include/X11/kde2"
  1904. test -n "$SS_KDE_GENERAL_DIR" && ss_kde_include_test_dirs="$SS_KDE_GENERAL_DIR/include $ss_kde_include_test_dirs"
  1905. test -n "$SS_KDE_GENERAL_DIR" && ss_kde_include_test_dirs="`$SS_KDE_GENERAL_DIR/bin/tde-config --expandvars --install include` $ss_kde_include_test_dirs"
  1906. AC_SS_FIND_FILE_PATH($SS_KDE_INCLUDE_FILE_TO_SEARCH,$ss_kde_include_test_dirs,SS_KDE_INCDIR)
  1907. if test "$SS_KDE_INCDIR" = "FAILED"; then
  1908. AC_MSG_RESULT("FAILED")
  1909. SS_KDE_REQUESTED="no"
  1910. SS_KDE_INCDIR=""
  1911. else
  1912. AC_MSG_RESULT([found in $SS_KDE_INCDIR])
  1913. fi
  1914. else
  1915. AC_MSG_RESULT([using user supplied path for the KDE include files $SS_KDE_INCDIR])
  1916. fi
  1917. if test -z "$SS_KDE_GENERAL_DIR"; then
  1918. # Set it.... we need it :)...
  1919. SS_KDE_GENERAL_DIR=`echo $SS_KDE_INCDIR | sed -e 's/\/include\$//'`
  1920. fi
  1921. ])
  1922. AC_DEFUN([AC_SS_FIND_KDE_LIBRARY_DIR],
  1923. [
  1924. AC_ARG_WITH(kde-library-dir,[ --with-kde-library-dir path to the KDE libraries ],SS_KDE_LIBDIR="$withval",SS_KDE_LIBDIR="NOTGIVEN")
  1925. if test "$SS_KDE_LIBDIR" = "NOTGIVEN"; then
  1926. AC_MSG_CHECKING([for the KDE libraries])
  1927. ss_kde_library_test_dirs="/lib /usr/lib /usr/local/lib /usr/kde/lib /opt/kde/lib /opt/lib /usr/opt/kde/lib /usr/local/kde/lib /usr/X11R6/lib /usr/lib/kde/lib /usr/lib/kde /usr/local/lib/kde/lib"
  1928. test -n "$TDEDIR" && ss_kde_library_test_dirs="$TDEDIR/lib $TDEDIR $ss_kde_library_test_dirs"
  1929. ss_kde_library_test_dirs="$ss_kde_library_test_dirs /usr/local/lib/kde /usr/X11R6/lib/kde /usr/build/kde/lib"
  1930. if test -n "$SS_KDE_GENERAL_DIR"; then
  1931. ss_kde_library_test_dirs="$SS_KDE_GENERAL_DIR/lib $ss_kde_library_test_dirs"
  1932. fi
  1933. AC_SS_FIND_FILE_PATH(libtdecore.so.6 libtdecore.so.5 libtdecore.so.4 libtdecore.so.3 libtdecore.so,$ss_kde_library_test_dirs,SS_KDE_LIBDIR)
  1934. if test "$SS_KDE_LIBDIR" = "FAILED"; then
  1935. AC_SS_FIND_FILE_PATH(libtdecore.so.8 libtdecore.so.7 libtdecore.so.4.0.0 libtdecore.so.4.1.0 libtdecore.so.4.2.0 ,$ss_kde_library_test_dirs,SS_KDE_LIBDIR)
  1936. if test "$SS_KDE_LIBDIR" = "FAILED"; then
  1937. # Try the senseless too
  1938. AC_SS_FIND_FILE_PATH(libtdecore.so.4.0.0 libtdecore.so.4.1.0 libtdecore.so.4.2.0 libtdecore.so.4.3.0,$ss_kde_library_test_dirs,SS_KDE_LIBDIR)
  1939. if test "$SS_KDE_LIBDIR" = "FAILED"; then
  1940. AC_SS_FIND_FILE_PATH(libtdecore.so.4.4.0 libtdecore.so.4.5.0 libtdecore.so.4.6.0 libtdecore.so.4.7.0 libtdecore.a,$ss_kde_library_test_dirs,SS_KDE_LIBDIR)
  1941. fi
  1942. fi
  1943. fi
  1944. if test "$SS_KDE_LIBDIR" = "FAILED"; then
  1945. AC_MSG_RESULT("FAILED")
  1946. SS_KDE_REQUESTED="no"
  1947. SS_KDE_LIBDIR=""
  1948. else
  1949. AC_MSG_RESULT([found in $SS_KDE_LIBDIR])
  1950. fi
  1951. else
  1952. AC_MSG_RESULT([using user supplied path for the KDE libraries $SS_KDE_LIBDIR])
  1953. fi
  1954. if test -z "$SS_KDE_GENERAL_DIR"; then
  1955. # Set it.... we need it :)...
  1956. SS_KDE_GENERAL_DIR=`echo $SS_KDE_LIBDIR | sed -e 's/\/lib\$//'`
  1957. fi
  1958. ])
  1959. AC_DEFUN([AC_SS_ENSURE_CAN_COMPILE_X_QT3_AND_KDE],
  1960. [
  1961. AC_ARG_WITH(kde-check,[ --without-kde-check Do not check if Qt,KDE and X compile ],SS_CHECK_QTX_COMPILE="$withval",SS_CHECK_KQTX_COMPILE="yes")
  1962. if test "$SS_CHECK_KQTX_COMPILE" = "yes"; then
  1963. AC_MSG_CHECKING(if we can compile an X-Qt-KDE application)
  1964. AC_LANG_CPLUSPLUS
  1965. ss_save_CPPFLAGS="$CPPFLAGS"
  1966. ss_save_CXXFLAGS="$CXXFLAGS"
  1967. ss_save_LDFLAGS="$LDFLAGS"
  1968. ss_save_LIBS="$LIBS"
  1969. if test -n "$SS_X_INCDIR"; then
  1970. CPPFLAGS="-I$SS_X_INCDIR"
  1971. else
  1972. CPPFLAGS=""
  1973. fi
  1974. CPPFLAGS="$CPPFLAGS -I$SS_X_INCDIR -I$SS_QT3_INCDIR -I$SS_KDE_INCDIR"
  1975. CXXFLAGS="-O2 -Wall $CXXFLAGS"
  1976. if test -n "$SS_X_LIBDIR"; then
  1977. LIBS="-L$SS_X_LIBDIR"
  1978. else
  1979. LIBS=""
  1980. fi
  1981. if test -n "$SS_X_LDFLAGS"; then
  1982. LIBS="$SS_X_LDFLAGS $LIBS"
  1983. fi
  1984. if test -n "$SS_X_LIBLINK"; then
  1985. LIBS="$LIBS $SS_X_LIBLINK"
  1986. fi
  1987. LIBS="-L$SS_KDE_LIBDIR -L$SS_QT3_LIBDIR -ltdecore -l$SS_TQTLIB_NAME $LIBS -Wl,-rpath $SS_KDE_LIBDIR"
  1988. if test "$SS_LINK_TO_LIBDL" = "yes"; then
  1989. LIBS="$LIBS -ldl";
  1990. fi
  1991. LDFLAGS="-s $LDFLAGS"
  1992. AC_TRY_LINK([
  1993. #include "kapp.h"
  1994. #include "twin.h"
  1995. ],[
  1996. int a = KWin::currentDesktop();
  1997. TDEApplication app(a,0,"kvirc");
  1998. ],
  1999. SS_KQTX_LINKED_OK="TRUE",
  2000. SS_KQTX_LINKED_OK="FALSE"
  2001. )
  2002. if test "$SS_KQTX_LINKED_OK" = "FALSE"; then
  2003. AC_MSG_RESULT(failed)
  2004. AC_MSG_ERROR([This was a fatal one...aborting])
  2005. else
  2006. AC_MSG_RESULT(success)
  2007. fi
  2008. LIBS="$ss_save_LIBS"
  2009. LDFLAGS="$ss_save_LDFLAGS"
  2010. CXXFLAGS="$ss_save_CXXFLAGS"
  2011. CPPFLAGS="$ss_save_CPPFLAGS"
  2012. fi
  2013. ])
  2014. AC_DEFUN([AC_SS_CHECK_OTHER_LIBS],
  2015. [
  2016. SS_OTHER_LIBDIRS=""
  2017. SS_OTHER_LIBLINK=""
  2018. SS_OTHER_INCDIRS=""
  2019. AC_MSG_CHECKING([if you want to link to libresolv])
  2020. SS_DO_IT="false"
  2021. AC_ARG_WITH(libresolv, [ --with-libresolv Link to libresolv],SS_DO_IT="true")
  2022. if test "$SS_DO_IT" = "true"; then
  2023. AC_MSG_RESULT(yes)
  2024. SS_OTHER_LIBLINK="$SS_OTHER_LIBLINK -lresolv"
  2025. else
  2026. AC_MSG_RESULT(no)
  2027. fi
  2028. AC_MSG_CHECKING([if you want to link to libsocket])
  2029. SS_DO_IT="false"
  2030. AC_ARG_WITH(libsocket, [ --with-libsocket Link to libsocket],SS_DO_IT="true")
  2031. if test "$SS_DO_IT" = "true"; then
  2032. AC_MSG_RESULT(yes)
  2033. SS_OTHER_LIBLINK="$SS_OTHER_LIBLINK -lsocket"
  2034. else
  2035. AC_MSG_RESULT(no)
  2036. fi
  2037. AC_MSG_CHECKING([if you want to link to libnsl])
  2038. SS_DO_IT="false"
  2039. AC_ARG_WITH(libnsl, [ --with-libnsl Link to libnsl],SS_DO_IT="true")
  2040. if test "$SS_DO_IT" = "true"; then
  2041. AC_MSG_RESULT(yes)
  2042. SS_OTHER_LIBLINK="$SS_OTHER_LIBLINK -lnsl"
  2043. else
  2044. AC_MSG_RESULT(no)
  2045. fi
  2046. AC_MSG_CHECKING([if you want to link to libcompat])
  2047. SS_DO_IT="false"
  2048. AC_ARG_WITH(libnsl, [ --with-libcompat Link to libcompat],SS_DO_IT="true")
  2049. if test "$SS_DO_IT" = "true"; then
  2050. AC_MSG_RESULT(yes)
  2051. SS_OTHER_LIBLINK="$SS_OTHER_LIBLINK -lcompat"
  2052. else
  2053. AC_MSG_RESULT(no)
  2054. fi
  2055. AC_MSG_CHECKING([if you want to link to other libraries])
  2056. SS_DO_IT="false"
  2057. AC_ARG_WITH(other-libs, [ --with-other-libs=... Link to the specified libraries],SS_DO_IT="$withval")
  2058. if test "$SS_DO_IT" != "false"; then
  2059. AC_MSG_RESULT([yes])
  2060. SS_OTHER_LIBLINK="$SS_OTHER_LIBLINK $SS_DO_IT"
  2061. else
  2062. AC_MSG_RESULT([no])
  2063. fi
  2064. AC_MSG_CHECKING([if you want to add other library search paths])
  2065. SS_DO_IT="false"
  2066. AC_ARG_WITH(other-ldirs, [ --with-other-ldirs=... Add the specified library paths],SS_DO_IT="$withval")
  2067. if test "$SS_DO_IT" != "false"; then
  2068. AC_MSG_RESULT([yes])
  2069. SS_OTHER_LIBDIRS="$SS_OTHER_LIBDIRS $SS_DO_IT"
  2070. else
  2071. AC_MSG_RESULT([no])
  2072. fi
  2073. AC_MSG_CHECKING([if you want to add other include search paths])
  2074. SS_DO_IT="false"
  2075. AC_ARG_WITH(other-idirs, [ --with-other-idirs=... Add the specified include search paths],SS_DO_IT="$withval")
  2076. if test "$SS_DO_IT" != "false"; then
  2077. AC_MSG_RESULT([yes])
  2078. SS_OTHER_INCDIRS="$SS_OTHER_INCDIRS $SS_DO_IT"
  2079. else
  2080. AC_MSG_RESULT([no])
  2081. fi
  2082. ])
  2083. AC_DEFUN([AC_SS_FINAL_CONFIG],
  2084. [
  2085. AC_MSG_CHECKING([if we finally have to compile the IpV6 support])
  2086. if test "$SS_NOIPV6_SUPPORT" = "true"; then
  2087. AC_MSG_RESULT([no: disabled by user])
  2088. else
  2089. if test "$SS_HAVE_IPV6_FUNCTIONS" = "true"; then
  2090. AC_MSG_RESULT([yes])
  2091. AC_DEFINE([COMPILE_IPV6_SUPPORT], 1, [define if you want the IpV6 support])
  2092. SS_BUILD_FLAGS="i$SS_BUILD_FLAGS"
  2093. else
  2094. AC_MSG_RESULT([no: the system lacks support])
  2095. fi
  2096. fi
  2097. dnl # // Toplevel source directory
  2098. SS_TOPSRCDIR=`pwd`
  2099. AC_SUBST(SS_TOPSRCDIR)
  2100. SS_CPPFLAGS="-D_REENTRANT -DREENTRANT"
  2101. if test -n "$SS_X_CPPFLAGS"; then
  2102. SS_CPPFLAGS="$SS_CPPFLAGS $SS_X_CPPFLAGS"
  2103. fi
  2104. if test "$SS_USE_QT4" = "no"; then
  2105. SS_INCDIRS="-I$SS_QT3_INCDIR -I$SS_X_INCDIR"
  2106. else
  2107. AC_DEFINE([COMPILE_USE_QT4], 1, [define if you want to compile the Qt 4.x support])
  2108. SS_INCDIRS="$SS_QT4_INCDIRECTORIES -I$SS_X_INCDIR"
  2109. SS_CPPFLAGS="$SS_CPPFLAGS -DQT3_SUPPORT"
  2110. fi
  2111. if test -n "$SS_X_INCDIR"; then
  2112. SS_INCDIRS="$SS_INCDIRS -I$SS_X_INCDIR"
  2113. fi
  2114. if test -n "$SS_X_LDFLAGS"; then
  2115. SS_LDFLAGS="$SS_X_LDFLAGS"
  2116. else
  2117. SS_LDFLAGS=""
  2118. fi
  2119. if test "$SS_USE_QT4" = "no"; then
  2120. SS_RPATH="-rpath $SS_QT3_LIBDIR -rpath $libdir"
  2121. else
  2122. SS_RPATH="-rpath $SS_QT4_LIBDIR -rpath $libdir"
  2123. fi
  2124. if test -n "$SS_X_LIBDIR"; then
  2125. SS_RPATH="$SS_RPATH -rpath $SS_X_LIBDIR"
  2126. fi
  2127. if test "$SS_USE_QT4" = "no"; then
  2128. SS_LIBDIRS="-L$SS_TOPSRCDIR/src/kvilib/build/ -L$SS_QT3_LIBDIR"
  2129. else
  2130. SS_LIBDIRS="-L$SS_TOPSRCDIR/src/kvilib/build/ -L$SS_QT4_LIBDIR"
  2131. fi
  2132. if test -n "$SS_X_LIBDIR"; then
  2133. SS_LIBDIRS="$SS_LIBDIRS -L$SS_X_LIBDIR"
  2134. fi
  2135. if test "$SS_USE_QT4" = "no"; then
  2136. SS_LIBLINK="-l$SS_TQTLIB_NAME"
  2137. else
  2138. #if test -n "SS_LOCAL_ADD_DEBUG_SYMBOLS"; then
  2139. # SS_LIBLINK="-lQtCore_debug -lQtGui_debug -lQt3Support_debug"
  2140. #else
  2141. SS_LIBLINK="-lQtCore -lQtGui -lQt3Support"
  2142. #fi
  2143. fi
  2144. if test -n "$SS_X_LIBLINK"; then
  2145. SS_LIBLINK="$SS_LIBLINK $SS_X_LIBLINK"
  2146. fi
  2147. SS_LIBLINK="$SS_LIBLINK $SS_THREAD_LIBLINK"
  2148. if test "$SS_LINK_TO_LIBSSL" = "true"; then
  2149. SS_LIBLINK="$SS_LIBLINK -lssl -lcrypto"
  2150. fi
  2151. if test "$SS_LINK_TO_LIBESD" = "true"; then
  2152. SS_LIBLINK="$SS_LIBLINK -lesd"
  2153. fi
  2154. if test "$SS_LINK_TO_LIBARTS" = "true"; then
  2155. SS_LIBLINK="$SS_LIBLINK -lsoundserver_idl"
  2156. fi
  2157. if test "$SS_LINK_TO_LIBAUDIOFILE" = "true"; then
  2158. SS_LIBLINK="$SS_LIBLINK -laudiofile -lm"
  2159. fi
  2160. if test "$SS_LOCAL_8BIT" = "true"; then
  2161. SS_CPPFLAGS="$SS_CPPFLAGS -DQT3_NO_ASCII_CAST -DQT3_NO_COMPAT"
  2162. fi
  2163. if test "$SS_QT3_EMBEDDED" = "true"; then
  2164. SS_CPPFLAGS="$SS_CPPFLAGS -DQWS"
  2165. fi
  2166. if test "$SS_KDE_REQUESTED" = "yes"; then
  2167. SS_INCDIRS="$SS_INCDIRS -I$SS_KDE_INCDIR"
  2168. SS_RPATH="$SS_RPATH -rpath $SS_KDE_LIBDIR"
  2169. SS_LIBDIRS="$SS_LIBDIRS -L$SS_KDE_LIBDIR"
  2170. SS_LIBLINK="-ltdecore -ltdeui -ltdeparts -lDCOP -ltdefx -ltdeio $SS_LIBLINK"
  2171. AC_DEFINE([COMPILE_TDE_SUPPORT], 1, [define if you want to compile the TDE support])
  2172. AC_DEFINE_UNQUOTED([TDE_DIR], "$SS_KDE_GENERAL_DIR", [contain path to TDE if compiled with the TDE support])
  2173. AC_DEFINE_UNQUOTED([TDE_LIBDIR], "$SS_KDE_LIBDIR", [contain path to TDE libs if compiled with the TDE support])
  2174. SS_BUILD_FLAGS="k$SS_BUILD_FLAGS"
  2175. else
  2176. AC_DEFINE_UNQUOTED([TDE_DIR], "", [contain path to TDE if compiled with the TDE support])
  2177. AC_DEFINE_UNQUOTED([TDE_LIBDIR], "", [contain path to TDE libs if compiled with the TDE support])
  2178. fi
  2179. if test -n "$SS_OTHER_LIBLINK"; then
  2180. SS_LIBLINK="$SS_LIBLINK $SS_OTHER_LIBLINK"
  2181. fi
  2182. if test -n "$SS_OTHER_LIBDIRS"; then
  2183. SS_LIBDIRS="$SS_LIBDIRS $SS_OTHER_LIBDIRS"
  2184. SS_OTHER_LIBDIRS=`echo "$SS_OTHER_LIBDIRS" | sed -e s/-L//g`
  2185. SS_RPATH="$SS_RPATH -rpath $SS_OTHER_LIBDIRS"
  2186. fi
  2187. if test -n "$SS_OTHER_INCDIRS"; then
  2188. SS_INCDIRS="$SS_INCDIRS $SS_OTHER_INCDIRS"
  2189. fi
  2190. if test "$SS_LINK_TO_LIBDL" = "yes"; then
  2191. SS_LIBLINK="$SS_LIBLINK -ldl"
  2192. fi
  2193. if test "$SS_LINK_TO_LIBZ" = "yes"; then
  2194. SS_LIBLINK="$SS_LIBLINK -lz"
  2195. fi
  2196. if test "$SS_LINK_TO_XSS" = "yes"; then
  2197. SS_LIBLINK="$SS_LIBLINK -lXss"
  2198. fi
  2199. AC_SUBST(SS_CPPFLAGS)
  2200. AC_SUBST(SS_INCDIRS)
  2201. AC_SUBST(SS_LDFLAGS)
  2202. AC_SUBST(SS_RPATH)
  2203. AC_SUBST(SS_LIBDIRS)
  2204. AC_SUBST(SS_LIBLINK)
  2205. if test "$SS_USE_QT4" = "no"; then
  2206. SS_QT_MOC=$SS_QT3_MOC
  2207. SS_QT_MOC_FLAGS=""
  2208. else
  2209. SS_QT_MOC=$SS_QT4_MOC
  2210. SS_QT_MOC_FLAGS="-DCOMPILE_USE_QT4"
  2211. fi
  2212. AC_SUBST(SS_QT_MOC)
  2213. AC_SUBST(SS_QT_MOC_FLAGS)
  2214. build_date=`date -u`
  2215. if test -z "$build_date"; then
  2216. build_date=`date`
  2217. fi
  2218. if test -z "$build_date"; then
  2219. build_date="unknown"
  2220. fi
  2221. AC_DEFINE_UNQUOTED([BUILD_DATE],"$build_date", [this is the build date (configure date rather)])
  2222. dnl # Let's sort the build flags
  2223. SS_AUX_CHARS="a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 0 1 2 3 4 5 6 7 8 9"
  2224. buid_flags=""
  2225. for achar in $SS_AUX_CHARS; do
  2226. tmp_val=`echo "$SS_BUILD_FLAGS" | grep $achar`
  2227. if test "$tmp_val"; then
  2228. build_flags="$build_flags$achar"
  2229. fi
  2230. done
  2231. SS_DIRTAG=`echo $VERSION | cut -d . -f 1,2`
  2232. AC_DEFINE_UNQUOTED([VERSION_BRANCH], "$SS_DIRTAG", [MAJOR.MINOR part of version])
  2233. AC_DEFINE_UNQUOTED([BUILD_FLAGS],"$target_cpu-$build_flags", [these are the build flags])
  2234. globalkvircdir="\${datadir}/kvirc/$SS_DIRTAG"
  2235. AC_SUBST(globalkvircdir)
  2236. configdir="\${globalkvircdir}/config"
  2237. AC_SUBST(configdir)
  2238. picsdir="\${globalkvircdir}/pics"
  2239. AC_SUBST(picsdir)
  2240. helpdir="\${globalkvircdir}/help/en"
  2241. AC_SUBST(helpdir)
  2242. pluglibdir="\${globalkvircdir}/modules"
  2243. AC_SUBST(pluglibdir)
  2244. modulelibdir="\${globalkvircdir}/modules"
  2245. AC_SUBST(modulelibdir)
  2246. defscriptdir="\${globalkvircdir}/defscript"
  2247. AC_SUBST(defscriptdir)
  2248. themedir="\${globalkvircdir}/themes"
  2249. AC_SUBST(themedir)
  2250. msgcolorsdir="\${globalkvircdir}/msgcolors"
  2251. AC_SUBST(msgcolorsdir)
  2252. if test -z "$mandir"; then
  2253. mandir="\${exec_prefix}/man/man1"
  2254. fi
  2255. AC_SUBST(mandir)
  2256. licensedir="\${globalkvircdir}/license"
  2257. AC_SUBST(licensedir)
  2258. if test -n "$SS_KDE_SERVICESDIR"; then
  2259. kdeservicesdir="$SS_KDE_SERVICESDIR"
  2260. else
  2261. kdeservicesdir="\${exec_prefix}/share/kvirc/$SS_DIRTAG/protocols"
  2262. fi
  2263. AC_SUBST(kdeservicesdir)
  2264. if test "$SS_KDE_REQUESTED" = "yes"; then
  2265. iconapps16datadir="$SS_KDE_GENERAL_DIR/share/icons/hicolor/16x16/apps"
  2266. iconapps32datadir="$SS_KDE_GENERAL_DIR/share/icons/hicolor/32x32/apps"
  2267. iconapps48datadir="$SS_KDE_GENERAL_DIR/share/icons/hicolor/48x48/apps"
  2268. iconapps64datadir="$SS_KDE_GENERAL_DIR/share/icons/hicolor/64x64/apps"
  2269. iconapps128datadir="$SS_KDE_GENERAL_DIR/share/icons/hicolor/128x128/apps"
  2270. iconappsscalabledatadir="$SS_KDE_GENERAL_DIR/share/icons/hicolor/scalable/apps"
  2271. iconmime16datadir="$SS_KDE_GENERAL_DIR/share/icons/hicolor/16x16/mimetypes"
  2272. iconmime32datadir="$SS_KDE_GENERAL_DIR/share/icons/hicolor/32x32/mimetypes"
  2273. iconmime48datadir="$SS_KDE_GENERAL_DIR/share/icons/hicolor/48x48/mimetypes"
  2274. iconmime64datadir="$SS_KDE_GENERAL_DIR/share/icons/hicolor/64x64/mimetypes"
  2275. iconmime128datadir="$SS_KDE_GENERAL_DIR/share/icons/hicolor/128x128/mimetypes"
  2276. iconmimescalabledatadir="$SS_KDE_GENERAL_DIR/share/icons/hicolor/scalable/mimetypes"
  2277. applnkdir="$SS_KDE_GENERAL_DIR/share/applnk/Internet"
  2278. mimelnkdir="$SS_KDE_GENERAL_DIR/share/mimelnk/text"
  2279. else
  2280. iconapps16datadir="\${exec_prefix}/share/kvirc/$SS_DIRTAG/icons/16x16"
  2281. iconapps32datadir="\${exec_prefix}/share/kvirc/$SS_DIRTAG/icons/32x32"
  2282. iconapps48datadir="\${exec_prefix}/share/kvirc/$SS_DIRTAG/icons/48x48"
  2283. iconapps64datadir="\${exec_prefix}/share/kvirc/$SS_DIRTAG/icons/64x64"
  2284. iconapps128datadir="\${exec_prefix}/share/kvirc/$SS_DIRTAG/icons/128x128"
  2285. iconappsscalabledatadir="\${exec_prefix}/share/kvirc/$SS_DIRTAG/icons/scalable"
  2286. iconmime16datadir="\${exec_prefix}/share/kvirc/$SS_DIRTAG/icons/16x16"
  2287. iconmime32datadir="\${exec_prefix}/share/kvirc/$SS_DIRTAG/icons/32x32"
  2288. iconmime48datadir="\${exec_prefix}/share/kvirc/$SS_DIRTAG/icons/48x48"
  2289. iconmime64datadir="\${exec_prefix}/share/kvirc/$SS_DIRTAG/icons/64x64"
  2290. iconmime128datadir="\${exec_prefix}/share/kvirc/$SS_DIRTAG/icons/128x128"
  2291. iconmimescalabledatadir="\${exec_prefix}/share/kvirc/$SS_DIRTAG/icons/scalable"
  2292. applnkdir="\${exec_prefix}/share/kvirc/$SS_DIRTAG/applnk"
  2293. mimelnkdir="\${exec_prefix}/share/kvirc/$SS_DIRTAG/mimelnk"
  2294. fi
  2295. AC_SUBST(iconapps16datadir)
  2296. AC_SUBST(iconapps32datadir)
  2297. AC_SUBST(iconapps48datadir)
  2298. AC_SUBST(iconapps64datadir)
  2299. AC_SUBST(iconapps128datadir)
  2300. AC_SUBST(iconappsscalabledatadir)
  2301. AC_SUBST(iconmime16datadir)
  2302. AC_SUBST(iconmime32datadir)
  2303. AC_SUBST(iconmime48datadir)
  2304. AC_SUBST(iconmime64datadir)
  2305. AC_SUBST(iconmime128datadir)
  2306. AC_SUBST(iconmimescalabledatadir)
  2307. AC_SUBST(applnkdir)
  2308. AC_SUBST(mimelnkdir)
  2309. localedir="\${globalkvircdir}/locale"
  2310. AC_SUBST(localedir)
  2311. headersdir="\${exec_prefix}/include/kvirc/$VERSION"
  2312. AC_SUBST(headersdir)
  2313. configmodulesdir="\${globalkvircdir}/config/modules"
  2314. AC_SUBST(configmodulesdir)
  2315. topdir=`pwd`
  2316. AC_SUBST(topdir)
  2317. AC_SS_HEADER([Configuration status:])
  2318. AC_SS_SET_GREENINK
  2319. echo "### The kvirc binary will be installed in:"
  2320. echo "### $bindir"
  2321. echo "### The libraries will be installed in:"
  2322. echo "### $libdir"
  2323. echo "### Modules will be installed in:"
  2324. echo "### $pluglibdir"
  2325. AC_SS_SET_NORMALINK
  2326. AC_SS_HEADER([Take a look at the paths above just to be sure that they're correct])
  2327. ])
  2328. dnl just a wrapper to clean up configure.in
  2329. AC_DEFUN([KVIRC_PROG_LIBTOOL],
  2330. [
  2331. AM_PROG_LIBTOOL
  2332. LIBTOOL_SHELL="/bin/sh ./libtool"
  2333. # LIBTOOL="$LIBTOOL --silent"
  2334. AC_ARG_ENABLE(objprelink, [ --enable-objprelink prelink apps (experimental, needs objprelink in path)],
  2335. kvirc_use_objprelink=$enableval, kvirc_use_objprelink=no)
  2336. if test "x$kvirc_use_objprelink" = "xyes"; then
  2337. echo Patching libtool to run objprelink.
  2338. mv libtool libtool.orig
  2339. cat > libtool <<\EOF
  2340. #! /bin/sh
  2341. ALREADYPRELINKED=""
  2342. for n
  2343. do
  2344. case $n in
  2345. *.o) k=$n
  2346. if test -r $k; then
  2347. ISELF=`file $k | grep ELF`
  2348. if test -n "$ISELF"; then
  2349. ALREADY=`echo $ALREADYPRELINKED | grep "!!!$k"`
  2350. if test -z "$ALREADY"; then
  2351. echo objprelink $k
  2352. objprelink $k
  2353. ALREADYPRELINKED="$ALREADYPRELINKED !!!$k"
  2354. fi
  2355. fi
  2356. fi
  2357. ;;
  2358. *.lo) k=$n
  2359. if test -r $k; then
  2360. ISELF=`file $k | grep ELF`
  2361. if test -n "$ISELF"; then
  2362. ALREADY=`echo $ALREADYPRELINKED | grep "!!!$k"`
  2363. if test -z "$ALREADY"; then
  2364. echo objprelink $k
  2365. objprelink $k
  2366. ALREADYPRELINKED="$ALREADYPRELINKED !!!$k"
  2367. fi
  2368. fi
  2369. fi
  2370. ASHORTNAME=`echo $n | sed -e 's/\.lo$//'`
  2371. k=".libs/$ASHORTNAME.o"
  2372. if test -r $k; then
  2373. ISELF=`file $k | grep ELF`
  2374. if test -n "$ISELF"; then
  2375. ALREADY=`echo $ALREADYPRELINKED | grep "!!!$k"`
  2376. if test -z "$ALREADY"; then
  2377. echo objprelink $k
  2378. objprelink $k
  2379. ALREADYPRELINKED="$ALREADYPRELINKED !!!$k"
  2380. fi
  2381. fi
  2382. fi
  2383. k=".libs/$ASHORTNAME.lo"
  2384. if test -r $k; then
  2385. ISELF=`file $k | grep ELF`
  2386. if test -n "$ISELF"; then
  2387. ALREADY=`echo $ALREADYPRELINKED | grep "!!!$k"`
  2388. if test -z "$ALREADY"; then
  2389. echo objprelink $k
  2390. objprelink $k
  2391. ALREADYPRELINKED="$ALREADYPRELINKED !!!$k"
  2392. fi
  2393. fi
  2394. fi
  2395. k="$ASHORTNAME.o"
  2396. if test -r $k; then
  2397. ISELF=`file $k | grep ELF`
  2398. if test -n "$ISELF"; then
  2399. ALREADY=`echo $ALREADYPRELINKED | grep "!!!$k"`
  2400. if test -z "$ALREADY"; then
  2401. echo objprelink $k
  2402. objprelink $k
  2403. ALREADYPRELINKED="$ALREADYPRELINKED !!!$k"
  2404. fi
  2405. fi
  2406. fi
  2407. ;;
  2408. esac
  2409. done
  2410. EOF
  2411. cat >> libtool libtool.orig
  2412. rm libtool.orig
  2413. chmod a+x libtool
  2414. fi
  2415. ])
  2416. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
  2417. #
  2418. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
  2419. # 2006, 2007, 2008 Free Software Foundation, Inc.
  2420. # Written by Gordon Matzigkeit, 1996
  2421. #
  2422. # This file is free software; the Free Software Foundation gives
  2423. # unlimited permission to copy and/or distribute it, with or without
  2424. # modifications, as long as this notice is preserved.
  2425. m4_define([_LT_COPYING], [dnl
  2426. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
  2427. # 2006, 2007, 2008 Free Software Foundation, Inc.
  2428. # Written by Gordon Matzigkeit, 1996
  2429. #
  2430. # This file is part of GNU Libtool.
  2431. #
  2432. # GNU Libtool is free software; you can redistribute it and/or
  2433. # modify it under the terms of the GNU General Public License as
  2434. # published by the Free Software Foundation; either version 2 of
  2435. # the License, or (at your option) any later version.
  2436. #
  2437. # As a special exception to the GNU General Public License,
  2438. # if you distribute this file as part of a program or library that
  2439. # is built using GNU Libtool, you may include this file under the
  2440. # same distribution terms that you use for the rest of that program.
  2441. #
  2442. # GNU Libtool is distributed in the hope that it will be useful,
  2443. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  2444. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  2445. # GNU General Public License for more details.
  2446. #
  2447. # You should have received a copy of the GNU General Public License
  2448. # along with GNU Libtool; see the file COPYING. If not, a copy
  2449. # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
  2450. # obtained by writing to the Free Software Foundation, Inc.,
  2451. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  2452. ])
  2453. # serial 56 LT_INIT
  2454. # LT_PREREQ(VERSION)
  2455. # ------------------
  2456. # Complain and exit if this libtool version is less that VERSION.
  2457. m4_defun([LT_PREREQ],
  2458. [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
  2459. [m4_default([$3],
  2460. [m4_fatal([Libtool version $1 or higher is required],
  2461. 63)])],
  2462. [$2])])
  2463. # _LT_CHECK_BUILDDIR
  2464. # ------------------
  2465. # Complain if the absolute build directory name contains unusual characters
  2466. m4_defun([_LT_CHECK_BUILDDIR],
  2467. [case `pwd` in
  2468. *\ * | *\ *)
  2469. AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
  2470. esac
  2471. ])
  2472. # LT_INIT([OPTIONS])
  2473. # ------------------
  2474. AC_DEFUN([LT_INIT],
  2475. [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
  2476. AC_BEFORE([$0], [LT_LANG])dnl
  2477. AC_BEFORE([$0], [LT_OUTPUT])dnl
  2478. AC_BEFORE([$0], [LTDL_INIT])dnl
  2479. m4_require([_LT_CHECK_BUILDDIR])dnl
  2480. dnl Autoconf doesn't catch unexpanded LT_ macros by default:
  2481. m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
  2482. m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
  2483. dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
  2484. dnl unless we require an AC_DEFUNed macro:
  2485. AC_REQUIRE([LTOPTIONS_VERSION])dnl
  2486. AC_REQUIRE([LTSUGAR_VERSION])dnl
  2487. AC_REQUIRE([LTVERSION_VERSION])dnl
  2488. AC_REQUIRE([LTOBSOLETE_VERSION])dnl
  2489. m4_require([_LT_PROG_LTMAIN])dnl
  2490. dnl Parse OPTIONS
  2491. _LT_SET_OPTIONS([$0], [$1])
  2492. # This can be used to rebuild libtool when needed
  2493. LIBTOOL_DEPS="$ltmain"
  2494. # Always use our own libtool.
  2495. LIBTOOL='$(SHELL) $(top_builddir)/libtool'
  2496. AC_SUBST(LIBTOOL)dnl
  2497. _LT_SETUP
  2498. # Only expand once:
  2499. m4_define([LT_INIT])
  2500. ])# LT_INIT
  2501. # Old names:
  2502. AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
  2503. AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
  2504. dnl aclocal-1.4 backwards compatibility:
  2505. dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
  2506. dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
  2507. # _LT_CC_BASENAME(CC)
  2508. # -------------------
  2509. # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
  2510. m4_defun([_LT_CC_BASENAME],
  2511. [for cc_temp in $1""; do
  2512. case $cc_temp in
  2513. compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
  2514. distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
  2515. \-*) ;;
  2516. *) break;;
  2517. esac
  2518. done
  2519. cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
  2520. ])
  2521. # _LT_FILEUTILS_DEFAULTS
  2522. # ----------------------
  2523. # It is okay to use these file commands and assume they have been set
  2524. # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
  2525. m4_defun([_LT_FILEUTILS_DEFAULTS],
  2526. [: ${CP="cp -f"}
  2527. : ${MV="mv -f"}
  2528. : ${RM="rm -f"}
  2529. ])# _LT_FILEUTILS_DEFAULTS
  2530. # _LT_SETUP
  2531. # ---------
  2532. m4_defun([_LT_SETUP],
  2533. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2534. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  2535. _LT_DECL([], [host_alias], [0], [The host system])dnl
  2536. _LT_DECL([], [host], [0])dnl
  2537. _LT_DECL([], [host_os], [0])dnl
  2538. dnl
  2539. _LT_DECL([], [build_alias], [0], [The build system])dnl
  2540. _LT_DECL([], [build], [0])dnl
  2541. _LT_DECL([], [build_os], [0])dnl
  2542. dnl
  2543. AC_REQUIRE([AC_PROG_CC])dnl
  2544. AC_REQUIRE([LT_PATH_LD])dnl
  2545. AC_REQUIRE([LT_PATH_NM])dnl
  2546. dnl
  2547. AC_REQUIRE([AC_PROG_LN_S])dnl
  2548. test -z "$LN_S" && LN_S="ln -s"
  2549. _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
  2550. dnl
  2551. AC_REQUIRE([LT_CMD_MAX_LEN])dnl
  2552. _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
  2553. _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
  2554. dnl
  2555. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  2556. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  2557. m4_require([_LT_CMD_RELOAD])dnl
  2558. m4_require([_LT_CHECK_MAGIC_METHOD])dnl
  2559. m4_require([_LT_CMD_OLD_ARCHIVE])dnl
  2560. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  2561. _LT_CONFIG_LIBTOOL_INIT([
  2562. # See if we are running on zsh, and set the options which allow our
  2563. # commands through without removal of \ escapes INIT.
  2564. if test -n "\${ZSH_VERSION+set}" ; then
  2565. setopt NO_GLOB_SUBST
  2566. fi
  2567. ])
  2568. if test -n "${ZSH_VERSION+set}" ; then
  2569. setopt NO_GLOB_SUBST
  2570. fi
  2571. _LT_CHECK_OBJDIR
  2572. m4_require([_LT_TAG_COMPILER])dnl
  2573. _LT_PROG_ECHO_BACKSLASH
  2574. case $host_os in
  2575. aix3*)
  2576. # AIX sometimes has problems with the GCC collect2 program. For some
  2577. # reason, if we set the COLLECT_NAMES environment variable, the problems
  2578. # vanish in a puff of smoke.
  2579. if test "X${COLLECT_NAMES+set}" != Xset; then
  2580. COLLECT_NAMES=
  2581. export COLLECT_NAMES
  2582. fi
  2583. ;;
  2584. esac
  2585. # Sed substitution that helps us do robust quoting. It backslashifies
  2586. # metacharacters that are still active within double-quoted strings.
  2587. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
  2588. # Same as above, but do not quote variable references.
  2589. double_quote_subst='s/\([["`\\]]\)/\\\1/g'
  2590. # Sed substitution to delay expansion of an escaped shell variable in a
  2591. # double_quote_subst'ed string.
  2592. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
  2593. # Sed substitution to delay expansion of an escaped single quote.
  2594. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
  2595. # Sed substitution to avoid accidental globbing in evaled expressions
  2596. no_glob_subst='s/\*/\\\*/g'
  2597. # Global variables:
  2598. ofile=libtool
  2599. can_build_shared=yes
  2600. # All known linkers require a `.a' archive for static linking (except MSVC,
  2601. # which needs '.lib').
  2602. libext=a
  2603. with_gnu_ld="$lt_cv_prog_gnu_ld"
  2604. old_CC="$CC"
  2605. old_CFLAGS="$CFLAGS"
  2606. # Set sane defaults for various variables
  2607. test -z "$CC" && CC=cc
  2608. test -z "$LTCC" && LTCC=$CC
  2609. test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
  2610. test -z "$LD" && LD=ld
  2611. test -z "$ac_objext" && ac_objext=o
  2612. _LT_CC_BASENAME([$compiler])
  2613. # Only perform the check for file, if the check method requires it
  2614. test -z "$MAGIC_CMD" && MAGIC_CMD=file
  2615. case $deplibs_check_method in
  2616. file_magic*)
  2617. if test "$file_magic_cmd" = '$MAGIC_CMD'; then
  2618. _LT_PATH_MAGIC
  2619. fi
  2620. ;;
  2621. esac
  2622. # Use C for the default configuration in the libtool script
  2623. LT_SUPPORTED_TAG([CC])
  2624. _LT_LANG_C_CONFIG
  2625. _LT_LANG_DEFAULT_CONFIG
  2626. _LT_CONFIG_COMMANDS
  2627. ])# _LT_SETUP
  2628. # _LT_PROG_LTMAIN
  2629. # ---------------
  2630. # Note that this code is called both from `configure', and `config.status'
  2631. # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
  2632. # `config.status' has no value for ac_aux_dir unless we are using Automake,
  2633. # so we pass a copy along to make sure it has a sensible value anyway.
  2634. m4_defun([_LT_PROG_LTMAIN],
  2635. [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
  2636. _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
  2637. ltmain="$ac_aux_dir/ltmain.sh"
  2638. ])# _LT_PROG_LTMAIN
  2639. ## ------------------------------------- ##
  2640. ## Accumulate code for creating libtool. ##
  2641. ## ------------------------------------- ##
  2642. # So that we can recreate a full libtool script including additional
  2643. # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
  2644. # in macros and then make a single call at the end using the `libtool'
  2645. # label.
  2646. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
  2647. # ----------------------------------------
  2648. # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  2649. m4_define([_LT_CONFIG_LIBTOOL_INIT],
  2650. [m4_ifval([$1],
  2651. [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
  2652. [$1
  2653. ])])])
  2654. # Initialize.
  2655. m4_define([_LT_OUTPUT_LIBTOOL_INIT])
  2656. # _LT_CONFIG_LIBTOOL([COMMANDS])
  2657. # ------------------------------
  2658. # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  2659. m4_define([_LT_CONFIG_LIBTOOL],
  2660. [m4_ifval([$1],
  2661. [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
  2662. [$1
  2663. ])])])
  2664. # Initialize.
  2665. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
  2666. # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
  2667. # -----------------------------------------------------
  2668. m4_defun([_LT_CONFIG_SAVE_COMMANDS],
  2669. [_LT_CONFIG_LIBTOOL([$1])
  2670. _LT_CONFIG_LIBTOOL_INIT([$2])
  2671. ])
  2672. # _LT_FORMAT_COMMENT([COMMENT])
  2673. # -----------------------------
  2674. # Add leading comment marks to the start of each line, and a trailing
  2675. # full-stop to the whole comment if one is not present already.
  2676. m4_define([_LT_FORMAT_COMMENT],
  2677. [m4_ifval([$1], [
  2678. m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
  2679. [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
  2680. )])
  2681. ## ------------------------ ##
  2682. ## FIXME: Eliminate VARNAME ##
  2683. ## ------------------------ ##
  2684. # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
  2685. # -------------------------------------------------------------------
  2686. # CONFIGNAME is the name given to the value in the libtool script.
  2687. # VARNAME is the (base) name used in the configure script.
  2688. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
  2689. # VARNAME. Any other value will be used directly.
  2690. m4_define([_LT_DECL],
  2691. [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
  2692. [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
  2693. [m4_ifval([$1], [$1], [$2])])
  2694. lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
  2695. m4_ifval([$4],
  2696. [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
  2697. lt_dict_add_subkey([lt_decl_dict], [$2],
  2698. [tagged?], [m4_ifval([$5], [yes], [no])])])
  2699. ])
  2700. # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
  2701. # --------------------------------------------------------
  2702. m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
  2703. # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
  2704. # ------------------------------------------------
  2705. m4_define([lt_decl_tag_varnames],
  2706. [_lt_decl_filter([tagged?], [yes], $@)])
  2707. # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
  2708. # ---------------------------------------------------------
  2709. m4_define([_lt_decl_filter],
  2710. [m4_case([$#],
  2711. [0], [m4_fatal([$0: too few arguments: $#])],
  2712. [1], [m4_fatal([$0: too few arguments: $#: $1])],
  2713. [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
  2714. [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
  2715. [lt_dict_filter([lt_decl_dict], $@)])[]dnl
  2716. ])
  2717. # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
  2718. # --------------------------------------------------
  2719. m4_define([lt_decl_quote_varnames],
  2720. [_lt_decl_filter([value], [1], $@)])
  2721. # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
  2722. # ---------------------------------------------------
  2723. m4_define([lt_decl_dquote_varnames],
  2724. [_lt_decl_filter([value], [2], $@)])
  2725. # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
  2726. # ---------------------------------------------------
  2727. m4_define([lt_decl_varnames_tagged],
  2728. [m4_assert([$# <= 2])dnl
  2729. _$0(m4_quote(m4_default([$1], [[, ]])),
  2730. m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
  2731. m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
  2732. m4_define([_lt_decl_varnames_tagged],
  2733. [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
  2734. # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
  2735. # ------------------------------------------------
  2736. m4_define([lt_decl_all_varnames],
  2737. [_$0(m4_quote(m4_default([$1], [[, ]])),
  2738. m4_if([$2], [],
  2739. m4_quote(lt_decl_varnames),
  2740. m4_quote(m4_shift($@))))[]dnl
  2741. ])
  2742. m4_define([_lt_decl_all_varnames],
  2743. [lt_join($@, lt_decl_varnames_tagged([$1],
  2744. lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
  2745. ])
  2746. # _LT_CONFIG_STATUS_DECLARE([VARNAME])
  2747. # ------------------------------------
  2748. # Quote a variable value, and forward it to `config.status' so that its
  2749. # declaration there will have the same value as in `configure'. VARNAME
  2750. # must have a single quote delimited value for this to work.
  2751. m4_define([_LT_CONFIG_STATUS_DECLARE],
  2752. [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
  2753. # _LT_CONFIG_STATUS_DECLARATIONS
  2754. # ------------------------------
  2755. # We delimit libtool config variables with single quotes, so when
  2756. # we write them to config.status, we have to be sure to quote all
  2757. # embedded single quotes properly. In configure, this macro expands
  2758. # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
  2759. #
  2760. # <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
  2761. m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
  2762. [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
  2763. [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
  2764. # _LT_LIBTOOL_TAGS
  2765. # ----------------
  2766. # Output comment and list of tags supported by the script
  2767. m4_defun([_LT_LIBTOOL_TAGS],
  2768. [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
  2769. available_tags="_LT_TAGS"dnl
  2770. ])
  2771. # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
  2772. # -----------------------------------
  2773. # Extract the dictionary values for VARNAME (optionally with TAG) and
  2774. # expand to a commented shell variable setting:
  2775. #
  2776. # # Some comment about what VAR is for.
  2777. # visible_name=$lt_internal_name
  2778. m4_define([_LT_LIBTOOL_DECLARE],
  2779. [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
  2780. [description])))[]dnl
  2781. m4_pushdef([_libtool_name],
  2782. m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
  2783. m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
  2784. [0], [_libtool_name=[$]$1],
  2785. [1], [_libtool_name=$lt_[]$1],
  2786. [2], [_libtool_name=$lt_[]$1],
  2787. [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
  2788. m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
  2789. ])
  2790. # _LT_LIBTOOL_CONFIG_VARS
  2791. # -----------------------
  2792. # Produce commented declarations of non-tagged libtool config variables
  2793. # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
  2794. # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
  2795. # section) are produced by _LT_LIBTOOL_TAG_VARS.
  2796. m4_defun([_LT_LIBTOOL_CONFIG_VARS],
  2797. [m4_foreach([_lt_var],
  2798. m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
  2799. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
  2800. # _LT_LIBTOOL_TAG_VARS(TAG)
  2801. # -------------------------
  2802. m4_define([_LT_LIBTOOL_TAG_VARS],
  2803. [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
  2804. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
  2805. # _LT_TAGVAR(VARNAME, [TAGNAME])
  2806. # ------------------------------
  2807. m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
  2808. # _LT_CONFIG_COMMANDS
  2809. # -------------------
  2810. # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
  2811. # variables for single and double quote escaping we saved from calls
  2812. # to _LT_DECL, we can put quote escaped variables declarations
  2813. # into `config.status', and then the shell code to quote escape them in
  2814. # for loops in `config.status'. Finally, any additional code accumulated
  2815. # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
  2816. m4_defun([_LT_CONFIG_COMMANDS],
  2817. [AC_PROVIDE_IFELSE([LT_OUTPUT],
  2818. dnl If the libtool generation code has been placed in $CONFIG_LT,
  2819. dnl instead of duplicating it all over again into config.status,
  2820. dnl then we will have config.status run $CONFIG_LT later, so it
  2821. dnl needs to know what name is stored there:
  2822. [AC_CONFIG_COMMANDS([libtool],
  2823. [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
  2824. dnl If the libtool generation code is destined for config.status,
  2825. dnl expand the accumulated commands and init code now:
  2826. [AC_CONFIG_COMMANDS([libtool],
  2827. [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
  2828. ])#_LT_CONFIG_COMMANDS
  2829. # Initialize.
  2830. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
  2831. [
  2832. # The HP-UX ksh and POSIX shell print the target directory to stdout
  2833. # if CDPATH is set.
  2834. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  2835. sed_quote_subst='$sed_quote_subst'
  2836. double_quote_subst='$double_quote_subst'
  2837. delay_variable_subst='$delay_variable_subst'
  2838. _LT_CONFIG_STATUS_DECLARATIONS
  2839. LTCC='$LTCC'
  2840. LTCFLAGS='$LTCFLAGS'
  2841. compiler='$compiler_DEFAULT'
  2842. # Quote evaled strings.
  2843. for var in lt_decl_all_varnames([[ \
  2844. ]], lt_decl_quote_varnames); do
  2845. case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
  2846. *[[\\\\\\\`\\"\\\$]]*)
  2847. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
  2848. ;;
  2849. *)
  2850. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  2851. ;;
  2852. esac
  2853. done
  2854. # Double-quote double-evaled strings.
  2855. for var in lt_decl_all_varnames([[ \
  2856. ]], lt_decl_dquote_varnames); do
  2857. case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
  2858. *[[\\\\\\\`\\"\\\$]]*)
  2859. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
  2860. ;;
  2861. *)
  2862. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  2863. ;;
  2864. esac
  2865. done
  2866. # Fix-up fallback echo if it was mangled by the above quoting rules.
  2867. case \$lt_ECHO in
  2868. *'\\\[$]0 --fallback-echo"')dnl "
  2869. lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
  2870. ;;
  2871. esac
  2872. _LT_OUTPUT_LIBTOOL_INIT
  2873. ])
  2874. # LT_OUTPUT
  2875. # ---------
  2876. # This macro allows early generation of the libtool script (before
  2877. # AC_OUTPUT is called), incase it is used in configure for compilation
  2878. # tests.
  2879. AC_DEFUN([LT_OUTPUT],
  2880. [: ${CONFIG_LT=./config.lt}
  2881. AC_MSG_NOTICE([creating $CONFIG_LT])
  2882. cat >"$CONFIG_LT" <<_LTEOF
  2883. #! $SHELL
  2884. # Generated by $as_me.
  2885. # Run this file to recreate a libtool stub with the current configuration.
  2886. lt_cl_silent=false
  2887. SHELL=\${CONFIG_SHELL-$SHELL}
  2888. _LTEOF
  2889. cat >>"$CONFIG_LT" <<\_LTEOF
  2890. AS_SHELL_SANITIZE
  2891. _AS_PREPARE
  2892. exec AS_MESSAGE_FD>&1
  2893. exec AS_MESSAGE_LOG_FD>>config.log
  2894. {
  2895. echo
  2896. AS_BOX([Running $as_me.])
  2897. } >&AS_MESSAGE_LOG_FD
  2898. lt_cl_help="\
  2899. \`$as_me' creates a local libtool stub from the current configuration,
  2900. for use in further configure time tests before the real libtool is
  2901. generated.
  2902. Usage: $[0] [[OPTIONS]]
  2903. -h, --help print this help, then exit
  2904. -V, --version print version number, then exit
  2905. -q, --quiet do not print progress messages
  2906. -d, --debug don't remove temporary files
  2907. Report bugs to <bug-libtool@gnu.org>."
  2908. lt_cl_version="\
  2909. m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
  2910. m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
  2911. configured by $[0], generated by m4_PACKAGE_STRING.
  2912. Copyright (C) 2008 Free Software Foundation, Inc.
  2913. This config.lt script is free software; the Free Software Foundation
  2914. gives unlimited permision to copy, distribute and modify it."
  2915. while test $[#] != 0
  2916. do
  2917. case $[1] in
  2918. --version | --v* | -V )
  2919. echo "$lt_cl_version"; exit 0 ;;
  2920. --help | --h* | -h )
  2921. echo "$lt_cl_help"; exit 0 ;;
  2922. --debug | --d* | -d )
  2923. debug=: ;;
  2924. --quiet | --q* | --silent | --s* | -q )
  2925. lt_cl_silent=: ;;
  2926. -*) AC_MSG_ERROR([unrecognized option: $[1]
  2927. Try \`$[0] --help' for more information.]) ;;
  2928. *) AC_MSG_ERROR([unrecognized argument: $[1]
  2929. Try \`$[0] --help' for more information.]) ;;
  2930. esac
  2931. shift
  2932. done
  2933. if $lt_cl_silent; then
  2934. exec AS_MESSAGE_FD>/dev/null
  2935. fi
  2936. _LTEOF
  2937. cat >>"$CONFIG_LT" <<_LTEOF
  2938. _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
  2939. _LTEOF
  2940. cat >>"$CONFIG_LT" <<\_LTEOF
  2941. AC_MSG_NOTICE([creating $ofile])
  2942. _LT_OUTPUT_LIBTOOL_COMMANDS
  2943. AS_EXIT(0)
  2944. _LTEOF
  2945. chmod +x "$CONFIG_LT"
  2946. # configure is writing to config.log, but config.lt does its own redirection,
  2947. # appending to config.log, which fails on DOS, as config.log is still kept
  2948. # open by configure. Here we exec the FD to /dev/null, effectively closing
  2949. # config.log, so it can be properly (re)opened and appended to by config.lt.
  2950. if test "$no_create" != yes; then
  2951. lt_cl_success=:
  2952. test "$silent" = yes &&
  2953. lt_config_lt_args="$lt_config_lt_args --quiet"
  2954. exec AS_MESSAGE_LOG_FD>/dev/null
  2955. $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
  2956. exec AS_MESSAGE_LOG_FD>>config.log
  2957. $lt_cl_success || AS_EXIT(1)
  2958. fi
  2959. ])# LT_OUTPUT
  2960. # _LT_CONFIG(TAG)
  2961. # ---------------
  2962. # If TAG is the built-in tag, create an initial libtool script with a
  2963. # default configuration from the untagged config vars. Otherwise add code
  2964. # to config.status for appending the configuration named by TAG from the
  2965. # matching tagged config vars.
  2966. m4_defun([_LT_CONFIG],
  2967. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  2968. _LT_CONFIG_SAVE_COMMANDS([
  2969. m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
  2970. m4_if(_LT_TAG, [C], [
  2971. # See if we are running on zsh, and set the options which allow our
  2972. # commands through without removal of \ escapes.
  2973. if test -n "${ZSH_VERSION+set}" ; then
  2974. setopt NO_GLOB_SUBST
  2975. fi
  2976. cfgfile="${ofile}T"
  2977. trap "$RM \"$cfgfile\"; exit 1" 1 2 15
  2978. $RM "$cfgfile"
  2979. cat <<_LT_EOF >> "$cfgfile"
  2980. #! $SHELL
  2981. # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
  2982. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
  2983. # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  2984. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  2985. #
  2986. _LT_COPYING
  2987. _LT_LIBTOOL_TAGS
  2988. # ### BEGIN LIBTOOL CONFIG
  2989. _LT_LIBTOOL_CONFIG_VARS
  2990. _LT_LIBTOOL_TAG_VARS
  2991. # ### END LIBTOOL CONFIG
  2992. _LT_EOF
  2993. case $host_os in
  2994. aix3*)
  2995. cat <<\_LT_EOF >> "$cfgfile"
  2996. # AIX sometimes has problems with the GCC collect2 program. For some
  2997. # reason, if we set the COLLECT_NAMES environment variable, the problems
  2998. # vanish in a puff of smoke.
  2999. if test "X${COLLECT_NAMES+set}" != Xset; then
  3000. COLLECT_NAMES=
  3001. export COLLECT_NAMES
  3002. fi
  3003. _LT_EOF
  3004. ;;
  3005. esac
  3006. _LT_PROG_LTMAIN
  3007. # We use sed instead of cat because bash on DJGPP gets confused if
  3008. # if finds mixed CR/LF and LF-only lines. Since sed operates in
  3009. # text mode, it properly converts lines to CR/LF. This bash problem
  3010. # is reportedly fixed, but why not run on old versions too?
  3011. sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
  3012. || (rm -f "$cfgfile"; exit 1)
  3013. _LT_PROG_XSI_SHELLFNS
  3014. sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
  3015. || (rm -f "$cfgfile"; exit 1)
  3016. mv -f "$cfgfile" "$ofile" ||
  3017. (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
  3018. chmod +x "$ofile"
  3019. ],
  3020. [cat <<_LT_EOF >> "$ofile"
  3021. dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
  3022. dnl in a comment (ie after a #).
  3023. # ### BEGIN LIBTOOL TAG CONFIG: $1
  3024. _LT_LIBTOOL_TAG_VARS(_LT_TAG)
  3025. # ### END LIBTOOL TAG CONFIG: $1
  3026. _LT_EOF
  3027. ])dnl /m4_if
  3028. ],
  3029. [m4_if([$1], [], [
  3030. PACKAGE='$PACKAGE'
  3031. VERSION='$VERSION'
  3032. TIMESTAMP='$TIMESTAMP'
  3033. RM='$RM'
  3034. ofile='$ofile'], [])
  3035. ])dnl /_LT_CONFIG_SAVE_COMMANDS
  3036. ])# _LT_CONFIG
  3037. # LT_SUPPORTED_TAG(TAG)
  3038. # ---------------------
  3039. # Trace this macro to discover what tags are supported by the libtool
  3040. # --tag option, using:
  3041. # autoconf --trace 'LT_SUPPORTED_TAG:$1'
  3042. AC_DEFUN([LT_SUPPORTED_TAG], [])
  3043. # C support is built-in for now
  3044. m4_define([_LT_LANG_C_enabled], [])
  3045. m4_define([_LT_TAGS], [])
  3046. # LT_LANG(LANG)
  3047. # -------------
  3048. # Enable libtool support for the given language if not already enabled.
  3049. AC_DEFUN([LT_LANG],
  3050. [AC_BEFORE([$0], [LT_OUTPUT])dnl
  3051. m4_case([$1],
  3052. [C], [_LT_LANG(C)],
  3053. [C++], [_LT_LANG(CXX)],
  3054. [Java], [_LT_LANG(GCJ)],
  3055. [Fortran 77], [_LT_LANG(F77)],
  3056. [Fortran], [_LT_LANG(FC)],
  3057. [Windows Resource], [_LT_LANG(RC)],
  3058. [m4_ifdef([_LT_LANG_]$1[_CONFIG],
  3059. [_LT_LANG($1)],
  3060. [m4_fatal([$0: unsupported language: "$1"])])])dnl
  3061. ])# LT_LANG
  3062. # _LT_LANG(LANGNAME)
  3063. # ------------------
  3064. m4_defun([_LT_LANG],
  3065. [m4_ifdef([_LT_LANG_]$1[_enabled], [],
  3066. [LT_SUPPORTED_TAG([$1])dnl
  3067. m4_append([_LT_TAGS], [$1 ])dnl
  3068. m4_define([_LT_LANG_]$1[_enabled], [])dnl
  3069. _LT_LANG_$1_CONFIG($1)])dnl
  3070. ])# _LT_LANG
  3071. # _LT_LANG_DEFAULT_CONFIG
  3072. # -----------------------
  3073. m4_defun([_LT_LANG_DEFAULT_CONFIG],
  3074. [AC_PROVIDE_IFELSE([AC_PROG_CXX],
  3075. [LT_LANG(CXX)],
  3076. [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
  3077. AC_PROVIDE_IFELSE([AC_PROG_F77],
  3078. [LT_LANG(F77)],
  3079. [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
  3080. AC_PROVIDE_IFELSE([AC_PROG_FC],
  3081. [LT_LANG(FC)],
  3082. [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
  3083. dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
  3084. dnl pulling things in needlessly.
  3085. AC_PROVIDE_IFELSE([AC_PROG_GCJ],
  3086. [LT_LANG(GCJ)],
  3087. [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
  3088. [LT_LANG(GCJ)],
  3089. [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
  3090. [LT_LANG(GCJ)],
  3091. [m4_ifdef([AC_PROG_GCJ],
  3092. [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
  3093. m4_ifdef([A][M_PROG_GCJ],
  3094. [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
  3095. m4_ifdef([LT_PROG_GCJ],
  3096. [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
  3097. AC_PROVIDE_IFELSE([LT_PROG_RC],
  3098. [LT_LANG(RC)],
  3099. [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
  3100. ])# _LT_LANG_DEFAULT_CONFIG
  3101. # Obsolete macros:
  3102. AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
  3103. AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
  3104. AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
  3105. AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
  3106. dnl aclocal-1.4 backwards compatibility:
  3107. dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
  3108. dnl AC_DEFUN([AC_LIBTOOL_F77], [])
  3109. dnl AC_DEFUN([AC_LIBTOOL_FC], [])
  3110. dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
  3111. # _LT_TAG_COMPILER
  3112. # ----------------
  3113. m4_defun([_LT_TAG_COMPILER],
  3114. [AC_REQUIRE([AC_PROG_CC])dnl
  3115. _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
  3116. _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
  3117. _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
  3118. _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
  3119. # If no C compiler was specified, use CC.
  3120. LTCC=${LTCC-"$CC"}
  3121. # If no C compiler flags were specified, use CFLAGS.
  3122. LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
  3123. # Allow CC to be a program name with arguments.
  3124. compiler=$CC
  3125. ])# _LT_TAG_COMPILER
  3126. # _LT_COMPILER_BOILERPLATE
  3127. # ------------------------
  3128. # Check for compiler boilerplate output or warnings with
  3129. # the simple compiler test code.
  3130. m4_defun([_LT_COMPILER_BOILERPLATE],
  3131. [m4_require([_LT_DECL_SED])dnl
  3132. ac_outfile=conftest.$ac_objext
  3133. echo "$lt_simple_compile_test_code" >conftest.$ac_ext
  3134. eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  3135. _lt_compiler_boilerplate=`cat conftest.err`
  3136. $RM conftest*
  3137. ])# _LT_COMPILER_BOILERPLATE
  3138. # _LT_LINKER_BOILERPLATE
  3139. # ----------------------
  3140. # Check for linker boilerplate output or warnings with
  3141. # the simple link test code.
  3142. m4_defun([_LT_LINKER_BOILERPLATE],
  3143. [m4_require([_LT_DECL_SED])dnl
  3144. ac_outfile=conftest.$ac_objext
  3145. echo "$lt_simple_link_test_code" >conftest.$ac_ext
  3146. eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  3147. _lt_linker_boilerplate=`cat conftest.err`
  3148. $RM -r conftest*
  3149. ])# _LT_LINKER_BOILERPLATE
  3150. # _LT_REQUIRED_DARWIN_CHECKS
  3151. # -------------------------
  3152. m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
  3153. case $host_os in
  3154. rhapsody* | darwin*)
  3155. AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
  3156. AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
  3157. AC_CHECK_TOOL([LIPO], [lipo], [:])
  3158. AC_CHECK_TOOL([OTOOL], [otool], [:])
  3159. AC_CHECK_TOOL([OTOOL64], [otool64], [:])
  3160. _LT_DECL([], [DSYMUTIL], [1],
  3161. [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
  3162. _LT_DECL([], [NMEDIT], [1],
  3163. [Tool to change global to local symbols on Mac OS X])
  3164. _LT_DECL([], [LIPO], [1],
  3165. [Tool to manipulate fat objects and archives on Mac OS X])
  3166. _LT_DECL([], [OTOOL], [1],
  3167. [ldd/readelf like tool for Mach-O binaries on Mac OS X])
  3168. _LT_DECL([], [OTOOL64], [1],
  3169. [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
  3170. AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
  3171. [lt_cv_apple_cc_single_mod=no
  3172. if test -z "${LT_MULTI_MODULE}"; then
  3173. # By default we will add the -single_module flag. You can override
  3174. # by either setting the environment variable LT_MULTI_MODULE
  3175. # non-empty at configure time, or by adding -multi_module to the
  3176. # link flags.
  3177. rm -rf libconftest.dylib*
  3178. echo "int foo(void){return 1;}" > conftest.c
  3179. echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  3180. -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
  3181. $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  3182. -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
  3183. _lt_result=$?
  3184. if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
  3185. lt_cv_apple_cc_single_mod=yes
  3186. else
  3187. cat conftest.err >&AS_MESSAGE_LOG_FD
  3188. fi
  3189. rm -rf libconftest.dylib*
  3190. rm -f conftest.*
  3191. fi])
  3192. AC_CACHE_CHECK([for -exported_symbols_list linker flag],
  3193. [lt_cv_ld_exported_symbols_list],
  3194. [lt_cv_ld_exported_symbols_list=no
  3195. save_LDFLAGS=$LDFLAGS
  3196. echo "_main" > conftest.sym
  3197. LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
  3198. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  3199. [lt_cv_ld_exported_symbols_list=yes],
  3200. [lt_cv_ld_exported_symbols_list=no])
  3201. LDFLAGS="$save_LDFLAGS"
  3202. ])
  3203. case $host_os in
  3204. rhapsody* | darwin1.[[012]])
  3205. _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
  3206. darwin1.*)
  3207. _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
  3208. darwin*) # darwin 5.x on
  3209. # if running on 10.5 or later, the deployment target defaults
  3210. # to the OS version, if on x86, and 10.4, the deployment
  3211. # target defaults to 10.4. Don't you love it?
  3212. case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
  3213. 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
  3214. _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
  3215. 10.[[012]]*)
  3216. _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
  3217. 10.*)
  3218. _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
  3219. esac
  3220. ;;
  3221. esac
  3222. if test "$lt_cv_apple_cc_single_mod" = "yes"; then
  3223. _lt_dar_single_mod='$single_module'
  3224. fi
  3225. if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
  3226. _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
  3227. else
  3228. _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
  3229. fi
  3230. if test "$DSYMUTIL" != ":"; then
  3231. _lt_dsymutil='~$DSYMUTIL $lib || :'
  3232. else
  3233. _lt_dsymutil=
  3234. fi
  3235. ;;
  3236. esac
  3237. ])
  3238. # _LT_DARWIN_LINKER_FEATURES
  3239. # --------------------------
  3240. # Checks for linker and compiler features on darwin
  3241. m4_defun([_LT_DARWIN_LINKER_FEATURES],
  3242. [
  3243. m4_require([_LT_REQUIRED_DARWIN_CHECKS])
  3244. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  3245. _LT_TAGVAR(hardcode_direct, $1)=no
  3246. _LT_TAGVAR(hardcode_automatic, $1)=yes
  3247. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  3248. _LT_TAGVAR(whole_archive_flag_spec, $1)=''
  3249. _LT_TAGVAR(link_all_deplibs, $1)=yes
  3250. _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
  3251. case $cc_basename in
  3252. ifort*) _lt_dar_can_shared=yes ;;
  3253. *) _lt_dar_can_shared=$GCC ;;
  3254. esac
  3255. if test "$_lt_dar_can_shared" = "yes"; then
  3256. output_verbose_link_cmd=echo
  3257. _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
  3258. _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
  3259. _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
  3260. _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
  3261. m4_if([$1], [CXX],
  3262. [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
  3263. _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
  3264. _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
  3265. fi
  3266. ],[])
  3267. else
  3268. _LT_TAGVAR(ld_shlibs, $1)=no
  3269. fi
  3270. ])
  3271. # _LT_SYS_MODULE_PATH_AIX
  3272. # -----------------------
  3273. # Links a minimal program and checks the executable
  3274. # for the system default hardcoded library path. In most cases,
  3275. # this is /usr/lib:/lib, but when the MPI compilers are used
  3276. # the location of the communication and MPI libs are included too.
  3277. # If we don't find anything, use the default library path according
  3278. # to the aix ld manual.
  3279. m4_defun([_LT_SYS_MODULE_PATH_AIX],
  3280. [m4_require([_LT_DECL_SED])dnl
  3281. AC_LINK_IFELSE(AC_LANG_PROGRAM,[
  3282. lt_aix_libpath_sed='
  3283. /Import File Strings/,/^$/ {
  3284. /^0/ {
  3285. s/^0 *\(.*\)$/\1/
  3286. p
  3287. }
  3288. }'
  3289. aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  3290. # Check for a 64-bit object if we didn't find anything.
  3291. if test -z "$aix_libpath"; then
  3292. aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  3293. fi],[])
  3294. if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  3295. ])# _LT_SYS_MODULE_PATH_AIX
  3296. # _LT_SHELL_INIT(ARG)
  3297. # -------------------
  3298. m4_define([_LT_SHELL_INIT],
  3299. [ifdef([AC_DIVERSION_NOTICE],
  3300. [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
  3301. [AC_DIVERT_PUSH(NOTICE)])
  3302. $1
  3303. AC_DIVERT_POP
  3304. ])# _LT_SHELL_INIT
  3305. # _LT_PROG_ECHO_BACKSLASH
  3306. # -----------------------
  3307. # Add some code to the start of the generated configure script which
  3308. # will find an echo command which doesn't interpret backslashes.
  3309. m4_defun([_LT_PROG_ECHO_BACKSLASH],
  3310. [_LT_SHELL_INIT([
  3311. # Check that we are running under the correct shell.
  3312. SHELL=${CONFIG_SHELL-/bin/sh}
  3313. case X$lt_ECHO in
  3314. X*--fallback-echo)
  3315. # Remove one level of quotation (which was required for Make).
  3316. ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
  3317. ;;
  3318. esac
  3319. ECHO=${lt_ECHO-echo}
  3320. if test "X[$]1" = X--no-reexec; then
  3321. # Discard the --no-reexec flag, and continue.
  3322. shift
  3323. elif test "X[$]1" = X--fallback-echo; then
  3324. # Avoid inline document here, it may be left over
  3325. :
  3326. elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
  3327. # Yippee, $ECHO works!
  3328. :
  3329. else
  3330. # Restart under the correct shell.
  3331. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
  3332. fi
  3333. if test "X[$]1" = X--fallback-echo; then
  3334. # used as fallback echo
  3335. shift
  3336. cat <<_LT_EOF
  3337. [$]*
  3338. _LT_EOF
  3339. exit 0
  3340. fi
  3341. # The HP-UX ksh and POSIX shell print the target directory to stdout
  3342. # if CDPATH is set.
  3343. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  3344. if test -z "$lt_ECHO"; then
  3345. if test "X${echo_test_string+set}" != Xset; then
  3346. # find a string as large as possible, as long as the shell can cope with it
  3347. for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
  3348. # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
  3349. if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
  3350. { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
  3351. then
  3352. break
  3353. fi
  3354. done
  3355. fi
  3356. if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
  3357. echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
  3358. test "X$echo_testing_string" = "X$echo_test_string"; then
  3359. :
  3360. else
  3361. # The Solaris, AIX, and Digital Unix default echo programs unquote
  3362. # backslashes. This makes it impossible to quote backslashes using
  3363. # echo "$something" | sed 's/\\/\\\\/g'
  3364. #
  3365. # So, first we look for a working echo in the user's PATH.
  3366. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  3367. for dir in $PATH /usr/ucb; do
  3368. IFS="$lt_save_ifs"
  3369. if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
  3370. test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
  3371. echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
  3372. test "X$echo_testing_string" = "X$echo_test_string"; then
  3373. ECHO="$dir/echo"
  3374. break
  3375. fi
  3376. done
  3377. IFS="$lt_save_ifs"
  3378. if test "X$ECHO" = Xecho; then
  3379. # We didn't find a better echo, so look for alternatives.
  3380. if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
  3381. echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
  3382. test "X$echo_testing_string" = "X$echo_test_string"; then
  3383. # This shell has a builtin print -r that does the trick.
  3384. ECHO='print -r'
  3385. elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
  3386. test "X$CONFIG_SHELL" != X/bin/ksh; then
  3387. # If we have ksh, try running configure again with it.
  3388. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
  3389. export ORIGINAL_CONFIG_SHELL
  3390. CONFIG_SHELL=/bin/ksh
  3391. export CONFIG_SHELL
  3392. exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
  3393. else
  3394. # Try using printf.
  3395. ECHO='printf %s\n'
  3396. if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
  3397. echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
  3398. test "X$echo_testing_string" = "X$echo_test_string"; then
  3399. # Cool, printf works
  3400. :
  3401. elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
  3402. test "X$echo_testing_string" = 'X\t' &&
  3403. echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  3404. test "X$echo_testing_string" = "X$echo_test_string"; then
  3405. CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
  3406. export CONFIG_SHELL
  3407. SHELL="$CONFIG_SHELL"
  3408. export SHELL
  3409. ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
  3410. elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
  3411. test "X$echo_testing_string" = 'X\t' &&
  3412. echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  3413. test "X$echo_testing_string" = "X$echo_test_string"; then
  3414. ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
  3415. else
  3416. # maybe with a smaller string...
  3417. prev=:
  3418. for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
  3419. if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
  3420. then
  3421. break
  3422. fi
  3423. prev="$cmd"
  3424. done
  3425. if test "$prev" != 'sed 50q "[$]0"'; then
  3426. echo_test_string=`eval $prev`
  3427. export echo_test_string
  3428. exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
  3429. else
  3430. # Oops. We lost completely, so just stick with echo.
  3431. ECHO=echo
  3432. fi
  3433. fi
  3434. fi
  3435. fi
  3436. fi
  3437. fi
  3438. # Copy echo and quote the copy suitably for passing to libtool from
  3439. # the Makefile, instead of quoting the original, which is used later.
  3440. lt_ECHO=$ECHO
  3441. if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
  3442. lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
  3443. fi
  3444. AC_SUBST(lt_ECHO)
  3445. ])
  3446. _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
  3447. _LT_DECL([], [ECHO], [1],
  3448. [An echo program that does not interpret backslashes])
  3449. ])# _LT_PROG_ECHO_BACKSLASH
  3450. # _LT_ENABLE_LOCK
  3451. # ---------------
  3452. m4_defun([_LT_ENABLE_LOCK],
  3453. [AC_ARG_ENABLE([libtool-lock],
  3454. [AS_HELP_STRING([--disable-libtool-lock],
  3455. [avoid locking (might break parallel builds)])])
  3456. test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  3457. # Some flags need to be propagated to the compiler or linker for good
  3458. # libtool support.
  3459. case $host in
  3460. ia64-*-hpux*)
  3461. # Find out which ABI we are using.
  3462. echo 'int i;' > conftest.$ac_ext
  3463. if AC_TRY_EVAL(ac_compile); then
  3464. case `/usr/bin/file conftest.$ac_objext` in
  3465. *ELF-32*)
  3466. HPUX_IA64_MODE="32"
  3467. ;;
  3468. *ELF-64*)
  3469. HPUX_IA64_MODE="64"
  3470. ;;
  3471. esac
  3472. fi
  3473. rm -rf conftest*
  3474. ;;
  3475. *-*-irix6*)
  3476. # Find out which ABI we are using.
  3477. echo '[#]line __oline__ "configure"' > conftest.$ac_ext
  3478. if AC_TRY_EVAL(ac_compile); then
  3479. if test "$lt_cv_prog_gnu_ld" = yes; then
  3480. case `/usr/bin/file conftest.$ac_objext` in
  3481. *32-bit*)
  3482. LD="${LD-ld} -melf32bsmip"
  3483. ;;
  3484. *N32*)
  3485. LD="${LD-ld} -melf32bmipn32"
  3486. ;;
  3487. *64-bit*)
  3488. LD="${LD-ld} -melf64bmip"
  3489. ;;
  3490. esac
  3491. else
  3492. case `/usr/bin/file conftest.$ac_objext` in
  3493. *32-bit*)
  3494. LD="${LD-ld} -32"
  3495. ;;
  3496. *N32*)
  3497. LD="${LD-ld} -n32"
  3498. ;;
  3499. *64-bit*)
  3500. LD="${LD-ld} -64"
  3501. ;;
  3502. esac
  3503. fi
  3504. fi
  3505. rm -rf conftest*
  3506. ;;
  3507. x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
  3508. s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
  3509. # Find out which ABI we are using.
  3510. echo 'int i;' > conftest.$ac_ext
  3511. if AC_TRY_EVAL(ac_compile); then
  3512. case `/usr/bin/file conftest.o` in
  3513. *32-bit*)
  3514. case $host in
  3515. x86_64-*kfreebsd*-gnu)
  3516. LD="${LD-ld} -m elf_i386_fbsd"
  3517. ;;
  3518. x86_64-*linux*)
  3519. LD="${LD-ld} -m elf_i386"
  3520. ;;
  3521. ppc64-*linux*|powerpc64-*linux*)
  3522. LD="${LD-ld} -m elf32ppclinux"
  3523. ;;
  3524. s390x-*linux*)
  3525. LD="${LD-ld} -m elf_s390"
  3526. ;;
  3527. sparc64-*linux*)
  3528. LD="${LD-ld} -m elf32_sparc"
  3529. ;;
  3530. esac
  3531. ;;
  3532. *64-bit*)
  3533. case $host in
  3534. x86_64-*kfreebsd*-gnu)
  3535. LD="${LD-ld} -m elf_x86_64_fbsd"
  3536. ;;
  3537. x86_64-*linux*)
  3538. LD="${LD-ld} -m elf_x86_64"
  3539. ;;
  3540. ppc*-*linux*|powerpc*-*linux*)
  3541. LD="${LD-ld} -m elf64ppc"
  3542. ;;
  3543. s390*-*linux*|s390*-*tpf*)
  3544. LD="${LD-ld} -m elf64_s390"
  3545. ;;
  3546. sparc*-*linux*)
  3547. LD="${LD-ld} -m elf64_sparc"
  3548. ;;
  3549. esac
  3550. ;;
  3551. esac
  3552. fi
  3553. rm -rf conftest*
  3554. ;;
  3555. *-*-sco3.2v5*)
  3556. # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  3557. SAVE_CFLAGS="$CFLAGS"
  3558. CFLAGS="$CFLAGS -belf"
  3559. AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
  3560. [AC_LANG_PUSH(C)
  3561. AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
  3562. AC_LANG_POP])
  3563. if test x"$lt_cv_cc_needs_belf" != x"yes"; then
  3564. # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  3565. CFLAGS="$SAVE_CFLAGS"
  3566. fi
  3567. ;;
  3568. sparc*-*solaris*)
  3569. # Find out which ABI we are using.
  3570. echo 'int i;' > conftest.$ac_ext
  3571. if AC_TRY_EVAL(ac_compile); then
  3572. case `/usr/bin/file conftest.o` in
  3573. *64-bit*)
  3574. case $lt_cv_prog_gnu_ld in
  3575. yes*) LD="${LD-ld} -m elf64_sparc" ;;
  3576. *)
  3577. if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
  3578. LD="${LD-ld} -64"
  3579. fi
  3580. ;;
  3581. esac
  3582. ;;
  3583. esac
  3584. fi
  3585. rm -rf conftest*
  3586. ;;
  3587. esac
  3588. need_locks="$enable_libtool_lock"
  3589. ])# _LT_ENABLE_LOCK
  3590. # _LT_CMD_OLD_ARCHIVE
  3591. # -------------------
  3592. m4_defun([_LT_CMD_OLD_ARCHIVE],
  3593. [AC_CHECK_TOOL(AR, ar, false)
  3594. test -z "$AR" && AR=ar
  3595. test -z "$AR_FLAGS" && AR_FLAGS=cru
  3596. _LT_DECL([], [AR], [1], [The archiver])
  3597. _LT_DECL([], [AR_FLAGS], [1])
  3598. AC_CHECK_TOOL(STRIP, strip, :)
  3599. test -z "$STRIP" && STRIP=:
  3600. _LT_DECL([], [STRIP], [1], [A symbol stripping program])
  3601. AC_CHECK_TOOL(RANLIB, ranlib, :)
  3602. test -z "$RANLIB" && RANLIB=:
  3603. _LT_DECL([], [RANLIB], [1],
  3604. [Commands used to install an old-style archive])
  3605. # Determine commands to create old-style static archives.
  3606. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
  3607. old_postinstall_cmds='chmod 644 $oldlib'
  3608. old_postuninstall_cmds=
  3609. if test -n "$RANLIB"; then
  3610. case $host_os in
  3611. openbsd*)
  3612. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
  3613. ;;
  3614. *)
  3615. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
  3616. ;;
  3617. esac
  3618. old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
  3619. fi
  3620. _LT_DECL([], [old_postinstall_cmds], [2])
  3621. _LT_DECL([], [old_postuninstall_cmds], [2])
  3622. _LT_TAGDECL([], [old_archive_cmds], [2],
  3623. [Commands used to build an old-style archive])
  3624. ])# _LT_CMD_OLD_ARCHIVE
  3625. # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  3626. # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
  3627. # ----------------------------------------------------------------
  3628. # Check whether the given compiler option works
  3629. AC_DEFUN([_LT_COMPILER_OPTION],
  3630. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  3631. m4_require([_LT_DECL_SED])dnl
  3632. AC_CACHE_CHECK([$1], [$2],
  3633. [$2=no
  3634. m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
  3635. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  3636. lt_compiler_flag="$3"
  3637. # Insert the option either (1) after the last *FLAGS variable, or
  3638. # (2) before a word containing "conftest.", or (3) at the end.
  3639. # Note that $ac_compile itself does not contain backslashes and begins
  3640. # with a dollar sign (not a hyphen), so the echo should work correctly.
  3641. # The option is referenced via a variable to avoid confusing sed.
  3642. lt_compile=`echo "$ac_compile" | $SED \
  3643. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  3644. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  3645. -e 's:$: $lt_compiler_flag:'`
  3646. (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  3647. (eval "$lt_compile" 2>conftest.err)
  3648. ac_status=$?
  3649. cat conftest.err >&AS_MESSAGE_LOG_FD
  3650. echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  3651. if (exit $ac_status) && test -s "$ac_outfile"; then
  3652. # The compiler can only warn and ignore the option if not recognized
  3653. # So say no if there are warnings other than the usual output.
  3654. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
  3655. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  3656. if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
  3657. $2=yes
  3658. fi
  3659. fi
  3660. $RM conftest*
  3661. ])
  3662. if test x"[$]$2" = xyes; then
  3663. m4_if([$5], , :, [$5])
  3664. else
  3665. m4_if([$6], , :, [$6])
  3666. fi
  3667. ])# _LT_COMPILER_OPTION
  3668. # Old name:
  3669. AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
  3670. dnl aclocal-1.4 backwards compatibility:
  3671. dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
  3672. # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  3673. # [ACTION-SUCCESS], [ACTION-FAILURE])
  3674. # ----------------------------------------------------
  3675. # Check whether the given linker option works
  3676. AC_DEFUN([_LT_LINKER_OPTION],
  3677. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  3678. m4_require([_LT_DECL_SED])dnl
  3679. AC_CACHE_CHECK([$1], [$2],
  3680. [$2=no
  3681. save_LDFLAGS="$LDFLAGS"
  3682. LDFLAGS="$LDFLAGS $3"
  3683. echo "$lt_simple_link_test_code" > conftest.$ac_ext
  3684. if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
  3685. # The linker can only warn and ignore the option if not recognized
  3686. # So say no if there are warnings
  3687. if test -s conftest.err; then
  3688. # Append any errors to the config.log.
  3689. cat conftest.err 1>&AS_MESSAGE_LOG_FD
  3690. $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
  3691. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  3692. if diff conftest.exp conftest.er2 >/dev/null; then
  3693. $2=yes
  3694. fi
  3695. else
  3696. $2=yes
  3697. fi
  3698. fi
  3699. $RM -r conftest*
  3700. LDFLAGS="$save_LDFLAGS"
  3701. ])
  3702. if test x"[$]$2" = xyes; then
  3703. m4_if([$4], , :, [$4])
  3704. else
  3705. m4_if([$5], , :, [$5])
  3706. fi
  3707. ])# _LT_LINKER_OPTION
  3708. # Old name:
  3709. AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
  3710. dnl aclocal-1.4 backwards compatibility:
  3711. dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
  3712. # LT_CMD_MAX_LEN
  3713. #---------------
  3714. AC_DEFUN([LT_CMD_MAX_LEN],
  3715. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3716. # find the maximum length of command line arguments
  3717. AC_MSG_CHECKING([the maximum length of command line arguments])
  3718. AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
  3719. i=0
  3720. teststring="ABCD"
  3721. case $build_os in
  3722. msdosdjgpp*)
  3723. # On DJGPP, this test can blow up pretty badly due to problems in libc
  3724. # (any single argument exceeding 2000 bytes causes a buffer overrun
  3725. # during glob expansion). Even if it were fixed, the result of this
  3726. # check would be larger than it should be.
  3727. lt_cv_sys_max_cmd_len=12288; # 12K is about right
  3728. ;;
  3729. gnu*)
  3730. # Under GNU Hurd, this test is not required because there is
  3731. # no limit to the length of command line arguments.
  3732. # Libtool will interpret -1 as no limit whatsoever
  3733. lt_cv_sys_max_cmd_len=-1;
  3734. ;;
  3735. cygwin* | mingw* | cegcc*)
  3736. # On Win9x/ME, this test blows up -- it succeeds, but takes
  3737. # about 5 minutes as the teststring grows exponentially.
  3738. # Worse, since 9x/ME are not pre-emptively multitasking,
  3739. # you end up with a "frozen" computer, even though with patience
  3740. # the test eventually succeeds (with a max line length of 256k).
  3741. # Instead, let's just punt: use the minimum linelength reported by
  3742. # all of the supported platforms: 8192 (on NT/2K/XP).
  3743. lt_cv_sys_max_cmd_len=8192;
  3744. ;;
  3745. amigaos*)
  3746. # On AmigaOS with pdksh, this test takes hours, literally.
  3747. # So we just punt and use a minimum line length of 8192.
  3748. lt_cv_sys_max_cmd_len=8192;
  3749. ;;
  3750. netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
  3751. # This has been around since 386BSD, at least. Likely further.
  3752. if test -x /sbin/sysctl; then
  3753. lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
  3754. elif test -x /usr/sbin/sysctl; then
  3755. lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
  3756. else
  3757. lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
  3758. fi
  3759. # And add a safety zone
  3760. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  3761. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  3762. ;;
  3763. interix*)
  3764. # We know the value 262144 and hardcode it with a safety zone (like BSD)
  3765. lt_cv_sys_max_cmd_len=196608
  3766. ;;
  3767. osf*)
  3768. # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
  3769. # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
  3770. # nice to cause kernel panics so lets avoid the loop below.
  3771. # First set a reasonable default.
  3772. lt_cv_sys_max_cmd_len=16384
  3773. #
  3774. if test -x /sbin/sysconfig; then
  3775. case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
  3776. *1*) lt_cv_sys_max_cmd_len=-1 ;;
  3777. esac
  3778. fi
  3779. ;;
  3780. sco3.2v5*)
  3781. lt_cv_sys_max_cmd_len=102400
  3782. ;;
  3783. sysv5* | sco5v6* | sysv4.2uw2*)
  3784. kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
  3785. if test -n "$kargmax"; then
  3786. lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
  3787. else
  3788. lt_cv_sys_max_cmd_len=32768
  3789. fi
  3790. ;;
  3791. *)
  3792. lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
  3793. if test -n "$lt_cv_sys_max_cmd_len"; then
  3794. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  3795. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  3796. else
  3797. # Make teststring a little bigger before we do anything with it.
  3798. # a 1K string should be a reasonable start.
  3799. for i in 1 2 3 4 5 6 7 8 ; do
  3800. teststring=$teststring$teststring
  3801. done
  3802. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
  3803. # If test is not a shell built-in, we'll probably end up computing a
  3804. # maximum length that is only half of the actual maximum length, but
  3805. # we can't tell.
  3806. while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
  3807. = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
  3808. test $i != 17 # 1/2 MB should be enough
  3809. do
  3810. i=`expr $i + 1`
  3811. teststring=$teststring$teststring
  3812. done
  3813. # Only check the string length outside the loop.
  3814. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
  3815. teststring=
  3816. # Add a significant safety factor because C++ compilers can tack on
  3817. # massive amounts of additional arguments before passing them to the
  3818. # linker. It appears as though 1/2 is a usable value.
  3819. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
  3820. fi
  3821. ;;
  3822. esac
  3823. ])
  3824. if test -n $lt_cv_sys_max_cmd_len ; then
  3825. AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
  3826. else
  3827. AC_MSG_RESULT(none)
  3828. fi
  3829. max_cmd_len=$lt_cv_sys_max_cmd_len
  3830. _LT_DECL([], [max_cmd_len], [0],
  3831. [What is the maximum length of a command?])
  3832. ])# LT_CMD_MAX_LEN
  3833. # Old name:
  3834. AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
  3835. dnl aclocal-1.4 backwards compatibility:
  3836. dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
  3837. # _LT_HEADER_DLFCN
  3838. # ----------------
  3839. m4_defun([_LT_HEADER_DLFCN],
  3840. [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
  3841. ])# _LT_HEADER_DLFCN
  3842. # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
  3843. # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
  3844. # ----------------------------------------------------------------
  3845. m4_defun([_LT_TRY_DLOPEN_SELF],
  3846. [m4_require([_LT_HEADER_DLFCN])dnl
  3847. if test "$cross_compiling" = yes; then :
  3848. [$4]
  3849. else
  3850. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  3851. lt_status=$lt_dlunknown
  3852. cat > conftest.$ac_ext <<_LT_EOF
  3853. [#line __oline__ "configure"
  3854. #include "confdefs.h"
  3855. #if HAVE_DLFCN_H
  3856. #include <dlfcn.h>
  3857. #endif
  3858. #include <stdio.h>
  3859. #ifdef RTLD_GLOBAL
  3860. # define LT_DLGLOBAL RTLD_GLOBAL
  3861. #else
  3862. # ifdef DL_GLOBAL
  3863. # define LT_DLGLOBAL DL_GLOBAL
  3864. # else
  3865. # define LT_DLGLOBAL 0
  3866. # endif
  3867. #endif
  3868. /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
  3869. find out it does not work in some platform. */
  3870. #ifndef LT_DLLAZY_OR_NOW
  3871. # ifdef RTLD_LAZY
  3872. # define LT_DLLAZY_OR_NOW RTLD_LAZY
  3873. # else
  3874. # ifdef DL_LAZY
  3875. # define LT_DLLAZY_OR_NOW DL_LAZY
  3876. # else
  3877. # ifdef RTLD_NOW
  3878. # define LT_DLLAZY_OR_NOW RTLD_NOW
  3879. # else
  3880. # ifdef DL_NOW
  3881. # define LT_DLLAZY_OR_NOW DL_NOW
  3882. # else
  3883. # define LT_DLLAZY_OR_NOW 0
  3884. # endif
  3885. # endif
  3886. # endif
  3887. # endif
  3888. #endif
  3889. void fnord() { int i=42;}
  3890. int main ()
  3891. {
  3892. void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  3893. int status = $lt_dlunknown;
  3894. if (self)
  3895. {
  3896. if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
  3897. else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
  3898. /* dlclose (self); */
  3899. }
  3900. else
  3901. puts (dlerror ());
  3902. return status;
  3903. }]
  3904. _LT_EOF
  3905. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
  3906. (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
  3907. lt_status=$?
  3908. case x$lt_status in
  3909. x$lt_dlno_uscore) $1 ;;
  3910. x$lt_dlneed_uscore) $2 ;;
  3911. x$lt_dlunknown|x*) $3 ;;
  3912. esac
  3913. else :
  3914. # compilation failed
  3915. $3
  3916. fi
  3917. fi
  3918. rm -fr conftest*
  3919. ])# _LT_TRY_DLOPEN_SELF
  3920. # LT_SYS_DLOPEN_SELF
  3921. # ------------------
  3922. AC_DEFUN([LT_SYS_DLOPEN_SELF],
  3923. [m4_require([_LT_HEADER_DLFCN])dnl
  3924. if test "x$enable_dlopen" != xyes; then
  3925. enable_dlopen=unknown
  3926. enable_dlopen_self=unknown
  3927. enable_dlopen_self_static=unknown
  3928. else
  3929. lt_cv_dlopen=no
  3930. lt_cv_dlopen_libs=
  3931. case $host_os in
  3932. beos*)
  3933. lt_cv_dlopen="load_add_on"
  3934. lt_cv_dlopen_libs=
  3935. lt_cv_dlopen_self=yes
  3936. ;;
  3937. mingw* | pw32* | cegcc*)
  3938. lt_cv_dlopen="LoadLibrary"
  3939. lt_cv_dlopen_libs=
  3940. ;;
  3941. cygwin*)
  3942. lt_cv_dlopen="dlopen"
  3943. lt_cv_dlopen_libs=
  3944. ;;
  3945. darwin*)
  3946. # if libdl is installed we need to link against it
  3947. AC_CHECK_LIB([dl], [dlopen],
  3948. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
  3949. lt_cv_dlopen="dyld"
  3950. lt_cv_dlopen_libs=
  3951. lt_cv_dlopen_self=yes
  3952. ])
  3953. ;;
  3954. *)
  3955. AC_CHECK_FUNC([shl_load],
  3956. [lt_cv_dlopen="shl_load"],
  3957. [AC_CHECK_LIB([dld], [shl_load],
  3958. [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
  3959. [AC_CHECK_FUNC([dlopen],
  3960. [lt_cv_dlopen="dlopen"],
  3961. [AC_CHECK_LIB([dl], [dlopen],
  3962. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
  3963. [AC_CHECK_LIB([svld], [dlopen],
  3964. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
  3965. [AC_CHECK_LIB([dld], [dld_link],
  3966. [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
  3967. ])
  3968. ])
  3969. ])
  3970. ])
  3971. ])
  3972. ;;
  3973. esac
  3974. if test "x$lt_cv_dlopen" != xno; then
  3975. enable_dlopen=yes
  3976. else
  3977. enable_dlopen=no
  3978. fi
  3979. case $lt_cv_dlopen in
  3980. dlopen)
  3981. save_CPPFLAGS="$CPPFLAGS"
  3982. test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  3983. save_LDFLAGS="$LDFLAGS"
  3984. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  3985. save_LIBS="$LIBS"
  3986. LIBS="$lt_cv_dlopen_libs $LIBS"
  3987. AC_CACHE_CHECK([whether a program can dlopen itself],
  3988. lt_cv_dlopen_self, [dnl
  3989. _LT_TRY_DLOPEN_SELF(
  3990. lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
  3991. lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
  3992. ])
  3993. if test "x$lt_cv_dlopen_self" = xyes; then
  3994. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
  3995. AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
  3996. lt_cv_dlopen_self_static, [dnl
  3997. _LT_TRY_DLOPEN_SELF(
  3998. lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
  3999. lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
  4000. ])
  4001. fi
  4002. CPPFLAGS="$save_CPPFLAGS"
  4003. LDFLAGS="$save_LDFLAGS"
  4004. LIBS="$save_LIBS"
  4005. ;;
  4006. esac
  4007. case $lt_cv_dlopen_self in
  4008. yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  4009. *) enable_dlopen_self=unknown ;;
  4010. esac
  4011. case $lt_cv_dlopen_self_static in
  4012. yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  4013. *) enable_dlopen_self_static=unknown ;;
  4014. esac
  4015. fi
  4016. _LT_DECL([dlopen_support], [enable_dlopen], [0],
  4017. [Whether dlopen is supported])
  4018. _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
  4019. [Whether dlopen of programs is supported])
  4020. _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
  4021. [Whether dlopen of statically linked programs is supported])
  4022. ])# LT_SYS_DLOPEN_SELF
  4023. # Old name:
  4024. AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
  4025. dnl aclocal-1.4 backwards compatibility:
  4026. dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
  4027. # _LT_COMPILER_C_O([TAGNAME])
  4028. # ---------------------------
  4029. # Check to see if options -c and -o are simultaneously supported by compiler.
  4030. # This macro does not hard code the compiler like AC_PROG_CC_C_O.
  4031. m4_defun([_LT_COMPILER_C_O],
  4032. [m4_require([_LT_DECL_SED])dnl
  4033. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  4034. m4_require([_LT_TAG_COMPILER])dnl
  4035. AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
  4036. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
  4037. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
  4038. $RM -r conftest 2>/dev/null
  4039. mkdir conftest
  4040. cd conftest
  4041. mkdir out
  4042. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  4043. lt_compiler_flag="-o out/conftest2.$ac_objext"
  4044. # Insert the option either (1) after the last *FLAGS variable, or
  4045. # (2) before a word containing "conftest.", or (3) at the end.
  4046. # Note that $ac_compile itself does not contain backslashes and begins
  4047. # with a dollar sign (not a hyphen), so the echo should work correctly.
  4048. lt_compile=`echo "$ac_compile" | $SED \
  4049. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  4050. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  4051. -e 's:$: $lt_compiler_flag:'`
  4052. (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  4053. (eval "$lt_compile" 2>out/conftest.err)
  4054. ac_status=$?
  4055. cat out/conftest.err >&AS_MESSAGE_LOG_FD
  4056. echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  4057. if (exit $ac_status) && test -s out/conftest2.$ac_objext
  4058. then
  4059. # The compiler can only warn and ignore the option if not recognized
  4060. # So say no if there are warnings
  4061. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
  4062. $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
  4063. if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
  4064. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  4065. fi
  4066. fi
  4067. chmod u+w . 2>&AS_MESSAGE_LOG_FD
  4068. $RM conftest*
  4069. # SGI C++ compiler will create directory out/ii_files/ for
  4070. # template instantiation
  4071. test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
  4072. $RM out/* && rmdir out
  4073. cd ..
  4074. $RM -r conftest
  4075. $RM conftest*
  4076. ])
  4077. _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
  4078. [Does compiler simultaneously support -c and -o options?])
  4079. ])# _LT_COMPILER_C_O
  4080. # _LT_COMPILER_FILE_LOCKS([TAGNAME])
  4081. # ----------------------------------
  4082. # Check to see if we can do hard links to lock some files if needed
  4083. m4_defun([_LT_COMPILER_FILE_LOCKS],
  4084. [m4_require([_LT_ENABLE_LOCK])dnl
  4085. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  4086. _LT_COMPILER_C_O([$1])
  4087. hard_links="nottested"
  4088. if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
  4089. # do not overwrite the value of need_locks provided by the user
  4090. AC_MSG_CHECKING([if we can lock with hard links])
  4091. hard_links=yes
  4092. $RM conftest*
  4093. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  4094. touch conftest.a
  4095. ln conftest.a conftest.b 2>&5 || hard_links=no
  4096. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  4097. AC_MSG_RESULT([$hard_links])
  4098. if test "$hard_links" = no; then
  4099. AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
  4100. need_locks=warn
  4101. fi
  4102. else
  4103. need_locks=no
  4104. fi
  4105. _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
  4106. ])# _LT_COMPILER_FILE_LOCKS
  4107. # _LT_CHECK_OBJDIR
  4108. # ----------------
  4109. m4_defun([_LT_CHECK_OBJDIR],
  4110. [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
  4111. [rm -f .libs 2>/dev/null
  4112. mkdir .libs 2>/dev/null
  4113. if test -d .libs; then
  4114. lt_cv_objdir=.libs
  4115. else
  4116. # MS-DOS does not allow filenames that begin with a dot.
  4117. lt_cv_objdir=_libs
  4118. fi
  4119. rmdir .libs 2>/dev/null])
  4120. objdir=$lt_cv_objdir
  4121. _LT_DECL([], [objdir], [0],
  4122. [The name of the directory that contains temporary libtool files])dnl
  4123. m4_pattern_allow([LT_OBJDIR])dnl
  4124. AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
  4125. [Define to the sub-directory in which libtool stores uninstalled libraries.])
  4126. ])# _LT_CHECK_OBJDIR
  4127. # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
  4128. # --------------------------------------
  4129. # Check hardcoding attributes.
  4130. m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
  4131. [AC_MSG_CHECKING([how to hardcode library paths into programs])
  4132. _LT_TAGVAR(hardcode_action, $1)=
  4133. if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
  4134. test -n "$_LT_TAGVAR(runpath_var, $1)" ||
  4135. test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
  4136. # We can hardcode non-existent directories.
  4137. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
  4138. # If the only mechanism to avoid hardcoding is shlibpath_var, we
  4139. # have to relink, otherwise we might link with an installed library
  4140. # when we should be linking with a yet-to-be-installed one
  4141. ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
  4142. test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
  4143. # Linking always hardcodes the temporary library directory.
  4144. _LT_TAGVAR(hardcode_action, $1)=relink
  4145. else
  4146. # We can link without hardcoding, and we can hardcode nonexisting dirs.
  4147. _LT_TAGVAR(hardcode_action, $1)=immediate
  4148. fi
  4149. else
  4150. # We cannot hardcode anything, or else we can only hardcode existing
  4151. # directories.
  4152. _LT_TAGVAR(hardcode_action, $1)=unsupported
  4153. fi
  4154. AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
  4155. if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
  4156. test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
  4157. # Fast installation is not supported
  4158. enable_fast_install=no
  4159. elif test "$shlibpath_overrides_runpath" = yes ||
  4160. test "$enable_shared" = no; then
  4161. # Fast installation is not necessary
  4162. enable_fast_install=needless
  4163. fi
  4164. _LT_TAGDECL([], [hardcode_action], [0],
  4165. [How to hardcode a shared library path into an executable])
  4166. ])# _LT_LINKER_HARDCODE_LIBPATH
  4167. # _LT_CMD_STRIPLIB
  4168. # ----------------
  4169. m4_defun([_LT_CMD_STRIPLIB],
  4170. [m4_require([_LT_DECL_EGREP])
  4171. striplib=
  4172. old_striplib=
  4173. AC_MSG_CHECKING([whether stripping libraries is possible])
  4174. if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
  4175. test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
  4176. test -z "$striplib" && striplib="$STRIP --strip-unneeded"
  4177. AC_MSG_RESULT([yes])
  4178. else
  4179. # FIXME - insert some real tests, host_os isn't really good enough
  4180. case $host_os in
  4181. darwin*)
  4182. if test -n "$STRIP" ; then
  4183. striplib="$STRIP -x"
  4184. old_striplib="$STRIP -S"
  4185. AC_MSG_RESULT([yes])
  4186. else
  4187. AC_MSG_RESULT([no])
  4188. fi
  4189. ;;
  4190. *)
  4191. AC_MSG_RESULT([no])
  4192. ;;
  4193. esac
  4194. fi
  4195. _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
  4196. _LT_DECL([], [striplib], [1])
  4197. ])# _LT_CMD_STRIPLIB
  4198. # _LT_SYS_DYNAMIC_LINKER([TAG])
  4199. # -----------------------------
  4200. # PORTME Fill in your ld.so characteristics
  4201. m4_defun([_LT_SYS_DYNAMIC_LINKER],
  4202. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  4203. m4_require([_LT_DECL_EGREP])dnl
  4204. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  4205. m4_require([_LT_DECL_OBJDUMP])dnl
  4206. m4_require([_LT_DECL_SED])dnl
  4207. AC_MSG_CHECKING([dynamic linker characteristics])
  4208. m4_if([$1],
  4209. [], [
  4210. if test "$GCC" = yes; then
  4211. case $host_os in
  4212. darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
  4213. *) lt_awk_arg="/^libraries:/" ;;
  4214. esac
  4215. lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
  4216. if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
  4217. # if the path contains ";" then we assume it to be the separator
  4218. # otherwise default to the standard path separator (i.e. ":") - it is
  4219. # assumed that no part of a normal pathname contains ";" but that should
  4220. # okay in the real world where ";" in dirpaths is itself problematic.
  4221. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
  4222. else
  4223. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  4224. fi
  4225. # Ok, now we have the path, separated by spaces, we can step through it
  4226. # and add multilib dir if necessary.
  4227. lt_tmp_lt_search_path_spec=
  4228. lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
  4229. for lt_sys_path in $lt_search_path_spec; do
  4230. if test -d "$lt_sys_path/$lt_multi_os_dir"; then
  4231. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
  4232. else
  4233. test -d "$lt_sys_path" && \
  4234. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
  4235. fi
  4236. done
  4237. lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
  4238. BEGIN {RS=" "; FS="/|\n";} {
  4239. lt_foo="";
  4240. lt_count=0;
  4241. for (lt_i = NF; lt_i > 0; lt_i--) {
  4242. if ($lt_i != "" && $lt_i != ".") {
  4243. if ($lt_i == "..") {
  4244. lt_count++;
  4245. } else {
  4246. if (lt_count == 0) {
  4247. lt_foo="/" $lt_i lt_foo;
  4248. } else {
  4249. lt_count--;
  4250. }
  4251. }
  4252. }
  4253. }
  4254. if (lt_foo != "") { lt_freq[[lt_foo]]++; }
  4255. if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
  4256. }'`
  4257. sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
  4258. else
  4259. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  4260. fi])
  4261. library_names_spec=
  4262. libname_spec='lib$name'
  4263. soname_spec=
  4264. shrext_cmds=".so"
  4265. postinstall_cmds=
  4266. postuninstall_cmds=
  4267. finish_cmds=
  4268. finish_eval=
  4269. shlibpath_var=
  4270. shlibpath_overrides_runpath=unknown
  4271. version_type=none
  4272. dynamic_linker="$host_os ld.so"
  4273. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  4274. need_lib_prefix=unknown
  4275. hardcode_into_libs=no
  4276. # when you set need_version to no, make sure it does not cause -set_version
  4277. # flags to be left without arguments
  4278. need_version=unknown
  4279. case $host_os in
  4280. aix3*)
  4281. version_type=linux
  4282. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
  4283. shlibpath_var=LIBPATH
  4284. # AIX 3 has no versioning support, so we append a major version to the name.
  4285. soname_spec='${libname}${release}${shared_ext}$major'
  4286. ;;
  4287. aix[[4-9]]*)
  4288. version_type=linux
  4289. need_lib_prefix=no
  4290. need_version=no
  4291. hardcode_into_libs=yes
  4292. if test "$host_cpu" = ia64; then
  4293. # AIX 5 supports IA64
  4294. library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
  4295. shlibpath_var=LD_LIBRARY_PATH
  4296. else
  4297. # With GCC up to 2.95.x, collect2 would create an import file
  4298. # for dependence libraries. The import file would start with
  4299. # the line `#! .'. This would cause the generated library to
  4300. # depend on `.', always an invalid library. This was fixed in
  4301. # development snapshots of GCC prior to 3.0.
  4302. case $host_os in
  4303. aix4 | aix4.[[01]] | aix4.[[01]].*)
  4304. if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
  4305. echo ' yes '
  4306. echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
  4307. :
  4308. else
  4309. can_build_shared=no
  4310. fi
  4311. ;;
  4312. esac
  4313. # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
  4314. # soname into executable. Probably we can add versioning support to
  4315. # collect2, so additional links can be useful in future.
  4316. if test "$aix_use_runtimelinking" = yes; then
  4317. # If using run time linking (on AIX 4.2 or later) use lib<name>.so
  4318. # instead of lib<name>.a to let people know that these are not
  4319. # typical AIX shared libraries.
  4320. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4321. else
  4322. # We preserve .a as extension for shared libraries through AIX4.2
  4323. # and later when we are not doing run time linking.
  4324. library_names_spec='${libname}${release}.a $libname.a'
  4325. soname_spec='${libname}${release}${shared_ext}$major'
  4326. fi
  4327. shlibpath_var=LIBPATH
  4328. fi
  4329. ;;
  4330. amigaos*)
  4331. case $host_cpu in
  4332. powerpc)
  4333. # Since July 2007 AmigaOS4 officially supports .so libraries.
  4334. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
  4335. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4336. ;;
  4337. m68k)
  4338. library_names_spec='$libname.ixlibrary $libname.a'
  4339. # Create ${libname}_ixlibrary.a entries in /sys/libs.
  4340. 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'
  4341. ;;
  4342. esac
  4343. ;;
  4344. beos*)
  4345. library_names_spec='${libname}${shared_ext}'
  4346. dynamic_linker="$host_os ld.so"
  4347. shlibpath_var=LIBRARY_PATH
  4348. ;;
  4349. bsdi[[45]]*)
  4350. version_type=linux
  4351. need_version=no
  4352. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4353. soname_spec='${libname}${release}${shared_ext}$major'
  4354. finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  4355. shlibpath_var=LD_LIBRARY_PATH
  4356. sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  4357. sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  4358. # the default ld.so.conf also contains /usr/contrib/lib and
  4359. # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  4360. # libtool to hard-code these into programs
  4361. ;;
  4362. cygwin* | mingw* | pw32* | cegcc*)
  4363. version_type=windows
  4364. shrext_cmds=".dll"
  4365. need_version=no
  4366. need_lib_prefix=no
  4367. case $GCC,$host_os in
  4368. yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
  4369. library_names_spec='$libname.dll.a'
  4370. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  4371. postinstall_cmds='base_file=`basename \${file}`~
  4372. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
  4373. dldir=$destdir/`dirname \$dlpath`~
  4374. test -d \$dldir || mkdir -p \$dldir~
  4375. $install_prog $dir/$dlname \$dldir/$dlname~
  4376. chmod a+x \$dldir/$dlname~
  4377. if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
  4378. eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
  4379. fi'
  4380. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  4381. dlpath=$dir/\$dldll~
  4382. $RM \$dlpath'
  4383. shlibpath_overrides_runpath=yes
  4384. case $host_os in
  4385. cygwin*)
  4386. # Cygwin DLLs use 'cyg' prefix rather than 'lib'
  4387. soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  4388. sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
  4389. ;;
  4390. mingw* | cegcc*)
  4391. # MinGW DLLs use traditional 'lib' prefix
  4392. soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  4393. sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
  4394. if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
  4395. # It is most probably a Windows format PATH printed by
  4396. # mingw gcc, but we are running on Cygwin. Gcc prints its search
  4397. # path with ; separators, and with drive letters. We can handle the
  4398. # drive letters (cygwin fileutils understands them), so leave them,
  4399. # especially as we might pass files found there to a mingw objdump,
  4400. # which wouldn't understand a cygwinified path. Ahh.
  4401. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  4402. else
  4403. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  4404. fi
  4405. ;;
  4406. pw32*)
  4407. # pw32 DLLs use 'pw' prefix rather than 'lib'
  4408. library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  4409. ;;
  4410. esac
  4411. ;;
  4412. *)
  4413. library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
  4414. ;;
  4415. esac
  4416. dynamic_linker='Win32 ld.exe'
  4417. # FIXME: first we should search . and the directory the executable is in
  4418. shlibpath_var=PATH
  4419. ;;
  4420. darwin* | rhapsody*)
  4421. dynamic_linker="$host_os dyld"
  4422. version_type=darwin
  4423. need_lib_prefix=no
  4424. need_version=no
  4425. library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
  4426. soname_spec='${libname}${release}${major}$shared_ext'
  4427. shlibpath_overrides_runpath=yes
  4428. shlibpath_var=DYLD_LIBRARY_PATH
  4429. shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
  4430. m4_if([$1], [],[
  4431. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
  4432. sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
  4433. ;;
  4434. dgux*)
  4435. version_type=linux
  4436. need_lib_prefix=no
  4437. need_version=no
  4438. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
  4439. soname_spec='${libname}${release}${shared_ext}$major'
  4440. shlibpath_var=LD_LIBRARY_PATH
  4441. ;;
  4442. freebsd1*)
  4443. dynamic_linker=no
  4444. ;;
  4445. freebsd* | dragonfly*)
  4446. # DragonFly does not have aout. When/if they implement a new
  4447. # versioning mechanism, adjust this.
  4448. if test -x /usr/bin/objformat; then
  4449. objformat=`/usr/bin/objformat`
  4450. else
  4451. case $host_os in
  4452. freebsd[[123]]*) objformat=aout ;;
  4453. *) objformat=elf ;;
  4454. esac
  4455. fi
  4456. version_type=freebsd-$objformat
  4457. case $version_type in
  4458. freebsd-elf*)
  4459. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  4460. need_version=no
  4461. need_lib_prefix=no
  4462. ;;
  4463. freebsd-*)
  4464. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
  4465. need_version=yes
  4466. ;;
  4467. esac
  4468. shlibpath_var=LD_LIBRARY_PATH
  4469. case $host_os in
  4470. freebsd2*)
  4471. shlibpath_overrides_runpath=yes
  4472. ;;
  4473. freebsd3.[[01]]* | freebsdelf3.[[01]]*)
  4474. shlibpath_overrides_runpath=yes
  4475. hardcode_into_libs=yes
  4476. ;;
  4477. freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
  4478. freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
  4479. shlibpath_overrides_runpath=no
  4480. hardcode_into_libs=yes
  4481. ;;
  4482. *) # from 4.6 on, and DragonFly
  4483. shlibpath_overrides_runpath=yes
  4484. hardcode_into_libs=yes
  4485. ;;
  4486. esac
  4487. ;;
  4488. gnu*)
  4489. version_type=linux
  4490. need_lib_prefix=no
  4491. need_version=no
  4492. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  4493. soname_spec='${libname}${release}${shared_ext}$major'
  4494. shlibpath_var=LD_LIBRARY_PATH
  4495. hardcode_into_libs=yes
  4496. ;;
  4497. hpux9* | hpux10* | hpux11*)
  4498. # Give a soname corresponding to the major version so that dld.sl refuses to
  4499. # link against other versions.
  4500. version_type=sunos
  4501. need_lib_prefix=no
  4502. need_version=no
  4503. case $host_cpu in
  4504. ia64*)
  4505. shrext_cmds='.so'
  4506. hardcode_into_libs=yes
  4507. dynamic_linker="$host_os dld.so"
  4508. shlibpath_var=LD_LIBRARY_PATH
  4509. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  4510. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4511. soname_spec='${libname}${release}${shared_ext}$major'
  4512. if test "X$HPUX_IA64_MODE" = X32; then
  4513. sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
  4514. else
  4515. sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
  4516. fi
  4517. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  4518. ;;
  4519. hppa*64*)
  4520. shrext_cmds='.sl'
  4521. hardcode_into_libs=yes
  4522. dynamic_linker="$host_os dld.sl"
  4523. shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
  4524. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  4525. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4526. soname_spec='${libname}${release}${shared_ext}$major'
  4527. sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
  4528. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  4529. ;;
  4530. *)
  4531. shrext_cmds='.sl'
  4532. dynamic_linker="$host_os dld.sl"
  4533. shlibpath_var=SHLIB_PATH
  4534. shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  4535. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4536. soname_spec='${libname}${release}${shared_ext}$major'
  4537. ;;
  4538. esac
  4539. # HP-UX runs *really* slowly unless shared libraries are mode 555.
  4540. postinstall_cmds='chmod 555 $lib'
  4541. ;;
  4542. interix[[3-9]]*)
  4543. version_type=linux
  4544. need_lib_prefix=no
  4545. need_version=no
  4546. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  4547. soname_spec='${libname}${release}${shared_ext}$major'
  4548. dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
  4549. shlibpath_var=LD_LIBRARY_PATH
  4550. shlibpath_overrides_runpath=no
  4551. hardcode_into_libs=yes
  4552. ;;
  4553. irix5* | irix6* | nonstopux*)
  4554. case $host_os in
  4555. nonstopux*) version_type=nonstopux ;;
  4556. *)
  4557. if test "$lt_cv_prog_gnu_ld" = yes; then
  4558. version_type=linux
  4559. else
  4560. version_type=irix
  4561. fi ;;
  4562. esac
  4563. need_lib_prefix=no
  4564. need_version=no
  4565. soname_spec='${libname}${release}${shared_ext}$major'
  4566. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
  4567. case $host_os in
  4568. irix5* | nonstopux*)
  4569. libsuff= shlibsuff=
  4570. ;;
  4571. *)
  4572. case $LD in # libtool.m4 will add one of these switches to LD
  4573. *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
  4574. libsuff= shlibsuff= libmagic=32-bit;;
  4575. *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
  4576. libsuff=32 shlibsuff=N32 libmagic=N32;;
  4577. *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
  4578. libsuff=64 shlibsuff=64 libmagic=64-bit;;
  4579. *) libsuff= shlibsuff= libmagic=never-match;;
  4580. esac
  4581. ;;
  4582. esac
  4583. shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  4584. shlibpath_overrides_runpath=no
  4585. sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
  4586. sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
  4587. hardcode_into_libs=yes
  4588. ;;
  4589. # No shared lib support for Linux oldld, aout, or coff.
  4590. linux*oldld* | linux*aout* | linux*coff*)
  4591. dynamic_linker=no
  4592. ;;
  4593. # This must be Linux ELF.
  4594. linux* | k*bsd*-gnu | kopensolaris*-gnu)
  4595. version_type=linux
  4596. need_lib_prefix=no
  4597. need_version=no
  4598. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4599. soname_spec='${libname}${release}${shared_ext}$major'
  4600. finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  4601. shlibpath_var=LD_LIBRARY_PATH
  4602. shlibpath_overrides_runpath=no
  4603. # Some binutils ld are patched to set DT_RUNPATH
  4604. save_LDFLAGS=$LDFLAGS
  4605. save_libdir=$libdir
  4606. eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
  4607. LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
  4608. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  4609. [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
  4610. [shlibpath_overrides_runpath=yes])])
  4611. LDFLAGS=$save_LDFLAGS
  4612. libdir=$save_libdir
  4613. # This implies no fast_install, which is unacceptable.
  4614. # Some rework will be needed to allow for fast_install
  4615. # before this can be enabled.
  4616. hardcode_into_libs=yes
  4617. # Append ld.so.conf contents to the search path
  4618. if test -f /etc/ld.so.conf; then
  4619. lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
  4620. sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
  4621. fi
  4622. # We used to test for /lib/ld.so.1 and disable shared libraries on
  4623. # powerpc, because MkLinux only supported shared libraries with the
  4624. # GNU dynamic linker. Since this was broken with cross compilers,
  4625. # most powerpc-linux boxes support dynamic linking these days and
  4626. # people can always --disable-shared, the test was removed, and we
  4627. # assume the GNU/Linux dynamic linker is in use.
  4628. dynamic_linker='GNU/Linux ld.so'
  4629. ;;
  4630. netbsdelf*-gnu)
  4631. version_type=linux
  4632. need_lib_prefix=no
  4633. need_version=no
  4634. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  4635. soname_spec='${libname}${release}${shared_ext}$major'
  4636. shlibpath_var=LD_LIBRARY_PATH
  4637. shlibpath_overrides_runpath=no
  4638. hardcode_into_libs=yes
  4639. dynamic_linker='NetBSD ld.elf_so'
  4640. ;;
  4641. netbsd*)
  4642. version_type=sunos
  4643. need_lib_prefix=no
  4644. need_version=no
  4645. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  4646. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  4647. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  4648. dynamic_linker='NetBSD (a.out) ld.so'
  4649. else
  4650. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  4651. soname_spec='${libname}${release}${shared_ext}$major'
  4652. dynamic_linker='NetBSD ld.elf_so'
  4653. fi
  4654. shlibpath_var=LD_LIBRARY_PATH
  4655. shlibpath_overrides_runpath=yes
  4656. hardcode_into_libs=yes
  4657. ;;
  4658. newsos6)
  4659. version_type=linux
  4660. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4661. shlibpath_var=LD_LIBRARY_PATH
  4662. shlibpath_overrides_runpath=yes
  4663. ;;
  4664. *nto* | *qnx*)
  4665. version_type=qnx
  4666. need_lib_prefix=no
  4667. need_version=no
  4668. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4669. soname_spec='${libname}${release}${shared_ext}$major'
  4670. shlibpath_var=LD_LIBRARY_PATH
  4671. shlibpath_overrides_runpath=no
  4672. hardcode_into_libs=yes
  4673. dynamic_linker='ldqnx.so'
  4674. ;;
  4675. openbsd*)
  4676. version_type=sunos
  4677. sys_lib_dlsearch_path_spec="/usr/lib"
  4678. need_lib_prefix=no
  4679. # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
  4680. case $host_os in
  4681. openbsd3.3 | openbsd3.3.*) need_version=yes ;;
  4682. *) need_version=no ;;
  4683. esac
  4684. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  4685. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  4686. shlibpath_var=LD_LIBRARY_PATH
  4687. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  4688. case $host_os in
  4689. openbsd2.[[89]] | openbsd2.[[89]].*)
  4690. shlibpath_overrides_runpath=no
  4691. ;;
  4692. *)
  4693. shlibpath_overrides_runpath=yes
  4694. ;;
  4695. esac
  4696. else
  4697. shlibpath_overrides_runpath=yes
  4698. fi
  4699. ;;
  4700. os2*)
  4701. libname_spec='$name'
  4702. shrext_cmds=".dll"
  4703. need_lib_prefix=no
  4704. library_names_spec='$libname${shared_ext} $libname.a'
  4705. dynamic_linker='OS/2 ld.exe'
  4706. shlibpath_var=LIBPATH
  4707. ;;
  4708. osf3* | osf4* | osf5*)
  4709. version_type=osf
  4710. need_lib_prefix=no
  4711. need_version=no
  4712. soname_spec='${libname}${release}${shared_ext}$major'
  4713. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4714. shlibpath_var=LD_LIBRARY_PATH
  4715. sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  4716. sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  4717. ;;
  4718. rdos*)
  4719. dynamic_linker=no
  4720. ;;
  4721. solaris*)
  4722. version_type=linux
  4723. need_lib_prefix=no
  4724. need_version=no
  4725. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4726. soname_spec='${libname}${release}${shared_ext}$major'
  4727. shlibpath_var=LD_LIBRARY_PATH
  4728. shlibpath_overrides_runpath=yes
  4729. hardcode_into_libs=yes
  4730. # ldd complains unless libraries are executable
  4731. postinstall_cmds='chmod +x $lib'
  4732. ;;
  4733. sunos4*)
  4734. version_type=sunos
  4735. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  4736. finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  4737. shlibpath_var=LD_LIBRARY_PATH
  4738. shlibpath_overrides_runpath=yes
  4739. if test "$with_gnu_ld" = yes; then
  4740. need_lib_prefix=no
  4741. fi
  4742. need_version=yes
  4743. ;;
  4744. sysv4 | sysv4.3*)
  4745. version_type=linux
  4746. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4747. soname_spec='${libname}${release}${shared_ext}$major'
  4748. shlibpath_var=LD_LIBRARY_PATH
  4749. case $host_vendor in
  4750. sni)
  4751. shlibpath_overrides_runpath=no
  4752. need_lib_prefix=no
  4753. runpath_var=LD_RUN_PATH
  4754. ;;
  4755. siemens)
  4756. need_lib_prefix=no
  4757. ;;
  4758. motorola)
  4759. need_lib_prefix=no
  4760. need_version=no
  4761. shlibpath_overrides_runpath=no
  4762. sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  4763. ;;
  4764. esac
  4765. ;;
  4766. sysv4*MP*)
  4767. if test -d /usr/nec ;then
  4768. version_type=linux
  4769. library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
  4770. soname_spec='$libname${shared_ext}.$major'
  4771. shlibpath_var=LD_LIBRARY_PATH
  4772. fi
  4773. ;;
  4774. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  4775. version_type=freebsd-elf
  4776. need_lib_prefix=no
  4777. need_version=no
  4778. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  4779. soname_spec='${libname}${release}${shared_ext}$major'
  4780. shlibpath_var=LD_LIBRARY_PATH
  4781. shlibpath_overrides_runpath=yes
  4782. hardcode_into_libs=yes
  4783. if test "$with_gnu_ld" = yes; then
  4784. sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
  4785. else
  4786. sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
  4787. case $host_os in
  4788. sco3.2v5*)
  4789. sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
  4790. ;;
  4791. esac
  4792. fi
  4793. sys_lib_dlsearch_path_spec='/usr/lib'
  4794. ;;
  4795. tpf*)
  4796. # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
  4797. version_type=linux
  4798. need_lib_prefix=no
  4799. need_version=no
  4800. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4801. shlibpath_var=LD_LIBRARY_PATH
  4802. shlibpath_overrides_runpath=no
  4803. hardcode_into_libs=yes
  4804. ;;
  4805. uts4*)
  4806. version_type=linux
  4807. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4808. soname_spec='${libname}${release}${shared_ext}$major'
  4809. shlibpath_var=LD_LIBRARY_PATH
  4810. ;;
  4811. *)
  4812. dynamic_linker=no
  4813. ;;
  4814. esac
  4815. AC_MSG_RESULT([$dynamic_linker])
  4816. test "$dynamic_linker" = no && can_build_shared=no
  4817. variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  4818. if test "$GCC" = yes; then
  4819. variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  4820. fi
  4821. if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
  4822. sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
  4823. fi
  4824. if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
  4825. sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
  4826. fi
  4827. _LT_DECL([], [variables_saved_for_relink], [1],
  4828. [Variables whose values should be saved in libtool wrapper scripts and
  4829. restored at link time])
  4830. _LT_DECL([], [need_lib_prefix], [0],
  4831. [Do we need the "lib" prefix for modules?])
  4832. _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
  4833. _LT_DECL([], [version_type], [0], [Library versioning type])
  4834. _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
  4835. _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
  4836. _LT_DECL([], [shlibpath_overrides_runpath], [0],
  4837. [Is shlibpath searched before the hard-coded library search path?])
  4838. _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
  4839. _LT_DECL([], [library_names_spec], [1],
  4840. [[List of archive names. First name is the real one, the rest are links.
  4841. The last name is the one that the linker finds with -lNAME]])
  4842. _LT_DECL([], [soname_spec], [1],
  4843. [[The coded name of the library, if different from the real name]])
  4844. _LT_DECL([], [postinstall_cmds], [2],
  4845. [Command to use after installation of a shared archive])
  4846. _LT_DECL([], [postuninstall_cmds], [2],
  4847. [Command to use after uninstallation of a shared archive])
  4848. _LT_DECL([], [finish_cmds], [2],
  4849. [Commands used to finish a libtool library installation in a directory])
  4850. _LT_DECL([], [finish_eval], [1],
  4851. [[As "finish_cmds", except a single script fragment to be evaled but
  4852. not shown]])
  4853. _LT_DECL([], [hardcode_into_libs], [0],
  4854. [Whether we should hardcode library paths into libraries])
  4855. _LT_DECL([], [sys_lib_search_path_spec], [2],
  4856. [Compile-time system search path for libraries])
  4857. _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
  4858. [Run-time system search path for libraries])
  4859. ])# _LT_SYS_DYNAMIC_LINKER
  4860. # _LT_PATH_TOOL_PREFIX(TOOL)
  4861. # --------------------------
  4862. # find a file program which can recognize shared library
  4863. AC_DEFUN([_LT_PATH_TOOL_PREFIX],
  4864. [m4_require([_LT_DECL_EGREP])dnl
  4865. AC_MSG_CHECKING([for $1])
  4866. AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
  4867. [case $MAGIC_CMD in
  4868. [[\\/*] | ?:[\\/]*])
  4869. lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
  4870. ;;
  4871. *)
  4872. lt_save_MAGIC_CMD="$MAGIC_CMD"
  4873. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  4874. dnl $ac_dummy forces splitting on constant user-supplied paths.
  4875. dnl POSIX.2 word splitting is done only on the output of word expansions,
  4876. dnl not every word. This closes a longstanding sh security hole.
  4877. ac_dummy="m4_if([$2], , $PATH, [$2])"
  4878. for ac_dir in $ac_dummy; do
  4879. IFS="$lt_save_ifs"
  4880. test -z "$ac_dir" && ac_dir=.
  4881. if test -f $ac_dir/$1; then
  4882. lt_cv_path_MAGIC_CMD="$ac_dir/$1"
  4883. if test -n "$file_magic_test_file"; then
  4884. case $deplibs_check_method in
  4885. "file_magic "*)
  4886. file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
  4887. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  4888. if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  4889. $EGREP "$file_magic_regex" > /dev/null; then
  4890. :
  4891. else
  4892. cat <<_LT_EOF 1>&2
  4893. *** Warning: the command libtool uses to detect shared libraries,
  4894. *** $file_magic_cmd, produces output that libtool cannot recognize.
  4895. *** The result is that libtool may fail to recognize shared libraries
  4896. *** as such. This will affect the creation of libtool libraries that
  4897. *** depend on shared libraries, but programs linked with such libtool
  4898. *** libraries will work regardless of this problem. Nevertheless, you
  4899. *** may want to report the problem to your system manager and/or to
  4900. *** bug-libtool@gnu.org
  4901. _LT_EOF
  4902. fi ;;
  4903. esac
  4904. fi
  4905. break
  4906. fi
  4907. done
  4908. IFS="$lt_save_ifs"
  4909. MAGIC_CMD="$lt_save_MAGIC_CMD"
  4910. ;;
  4911. esac])
  4912. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  4913. if test -n "$MAGIC_CMD"; then
  4914. AC_MSG_RESULT($MAGIC_CMD)
  4915. else
  4916. AC_MSG_RESULT(no)
  4917. fi
  4918. _LT_DECL([], [MAGIC_CMD], [0],
  4919. [Used to examine libraries when file_magic_cmd begins with "file"])dnl
  4920. ])# _LT_PATH_TOOL_PREFIX
  4921. # Old name:
  4922. AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
  4923. dnl aclocal-1.4 backwards compatibility:
  4924. dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
  4925. # _LT_PATH_MAGIC
  4926. # --------------
  4927. # find a file program which can recognize a shared library
  4928. m4_defun([_LT_PATH_MAGIC],
  4929. [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
  4930. if test -z "$lt_cv_path_MAGIC_CMD"; then
  4931. if test -n "$ac_tool_prefix"; then
  4932. _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
  4933. else
  4934. MAGIC_CMD=:
  4935. fi
  4936. fi
  4937. ])# _LT_PATH_MAGIC
  4938. # LT_PATH_LD
  4939. # ----------
  4940. # find the pathname to the GNU or non-GNU linker
  4941. AC_DEFUN([LT_PATH_LD],
  4942. [AC_REQUIRE([AC_PROG_CC])dnl
  4943. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  4944. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  4945. m4_require([_LT_DECL_SED])dnl
  4946. m4_require([_LT_DECL_EGREP])dnl
  4947. AC_ARG_WITH([gnu-ld],
  4948. [AS_HELP_STRING([--with-gnu-ld],
  4949. [assume the C compiler uses GNU ld @<:@default=no@:>@])],
  4950. [test "$withval" = no || with_gnu_ld=yes],
  4951. [with_gnu_ld=no])dnl
  4952. ac_prog=ld
  4953. if test "$GCC" = yes; then
  4954. # Check if gcc -print-prog-name=ld gives a path.
  4955. AC_MSG_CHECKING([for ld used by $CC])
  4956. case $host in
  4957. *-*-mingw*)
  4958. # gcc leaves a trailing carriage return which upsets mingw
  4959. ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  4960. *)
  4961. ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  4962. esac
  4963. case $ac_prog in
  4964. # Accept absolute paths.
  4965. [[\\/]]* | ?:[[\\/]]*)
  4966. re_direlt='/[[^/]][[^/]]*/\.\./'
  4967. # Canonicalize the pathname of ld
  4968. ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
  4969. while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
  4970. ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
  4971. done
  4972. test -z "$LD" && LD="$ac_prog"
  4973. ;;
  4974. "")
  4975. # If it fails, then pretend we aren't using GCC.
  4976. ac_prog=ld
  4977. ;;
  4978. *)
  4979. # If it is relative, then search for the first ld in PATH.
  4980. with_gnu_ld=unknown
  4981. ;;
  4982. esac
  4983. elif test "$with_gnu_ld" = yes; then
  4984. AC_MSG_CHECKING([for GNU ld])
  4985. else
  4986. AC_MSG_CHECKING([for non-GNU ld])
  4987. fi
  4988. AC_CACHE_VAL(lt_cv_path_LD,
  4989. [if test -z "$LD"; then
  4990. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  4991. for ac_dir in $PATH; do
  4992. IFS="$lt_save_ifs"
  4993. test -z "$ac_dir" && ac_dir=.
  4994. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  4995. lt_cv_path_LD="$ac_dir/$ac_prog"
  4996. # Check to see if the program is GNU ld. I'd rather use --version,
  4997. # but apparently some variants of GNU ld only accept -v.
  4998. # Break only if it was the GNU/non-GNU ld that we prefer.
  4999. case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
  5000. *GNU* | *'with BFD'*)
  5001. test "$with_gnu_ld" != no && break
  5002. ;;
  5003. *)
  5004. test "$with_gnu_ld" != yes && break
  5005. ;;
  5006. esac
  5007. fi
  5008. done
  5009. IFS="$lt_save_ifs"
  5010. else
  5011. lt_cv_path_LD="$LD" # Let the user override the test with a path.
  5012. fi])
  5013. LD="$lt_cv_path_LD"
  5014. if test -n "$LD"; then
  5015. AC_MSG_RESULT($LD)
  5016. else
  5017. AC_MSG_RESULT(no)
  5018. fi
  5019. test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  5020. _LT_PATH_LD_GNU
  5021. AC_SUBST([LD])
  5022. _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
  5023. ])# LT_PATH_LD
  5024. # Old names:
  5025. AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
  5026. AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
  5027. dnl aclocal-1.4 backwards compatibility:
  5028. dnl AC_DEFUN([AM_PROG_LD], [])
  5029. dnl AC_DEFUN([AC_PROG_LD], [])
  5030. # _LT_PATH_LD_GNU
  5031. #- --------------
  5032. m4_defun([_LT_PATH_LD_GNU],
  5033. [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
  5034. [# I'd rather use --version here, but apparently some GNU lds only accept -v.
  5035. case `$LD -v 2>&1 </dev/null` in
  5036. *GNU* | *'with BFD'*)
  5037. lt_cv_prog_gnu_ld=yes
  5038. ;;
  5039. *)
  5040. lt_cv_prog_gnu_ld=no
  5041. ;;
  5042. esac])
  5043. with_gnu_ld=$lt_cv_prog_gnu_ld
  5044. ])# _LT_PATH_LD_GNU
  5045. # _LT_CMD_RELOAD
  5046. # --------------
  5047. # find reload flag for linker
  5048. # -- PORTME Some linkers may need a different reload flag.
  5049. m4_defun([_LT_CMD_RELOAD],
  5050. [AC_CACHE_CHECK([for $LD option to reload object files],
  5051. lt_cv_ld_reload_flag,
  5052. [lt_cv_ld_reload_flag='-r'])
  5053. reload_flag=$lt_cv_ld_reload_flag
  5054. case $reload_flag in
  5055. "" | " "*) ;;
  5056. *) reload_flag=" $reload_flag" ;;
  5057. esac
  5058. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  5059. case $host_os in
  5060. darwin*)
  5061. if test "$GCC" = yes; then
  5062. reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
  5063. else
  5064. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  5065. fi
  5066. ;;
  5067. esac
  5068. _LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
  5069. _LT_DECL([], [reload_cmds], [2])dnl
  5070. ])# _LT_CMD_RELOAD
  5071. # _LT_CHECK_MAGIC_METHOD
  5072. # ----------------------
  5073. # how to check for library dependencies
  5074. # -- PORTME fill in with the dynamic library characteristics
  5075. m4_defun([_LT_CHECK_MAGIC_METHOD],
  5076. [m4_require([_LT_DECL_EGREP])
  5077. m4_require([_LT_DECL_OBJDUMP])
  5078. AC_CACHE_CHECK([how to recognize dependent libraries],
  5079. lt_cv_deplibs_check_method,
  5080. [lt_cv_file_magic_cmd='$MAGIC_CMD'
  5081. lt_cv_file_magic_test_file=
  5082. lt_cv_deplibs_check_method='unknown'
  5083. # Need to set the preceding variable on all platforms that support
  5084. # interlibrary dependencies.
  5085. # 'none' -- dependencies not supported.
  5086. # `unknown' -- same as none, but documents that we really don't know.
  5087. # 'pass_all' -- all dependencies passed with no checks.
  5088. # 'test_compile' -- check by making test program.
  5089. # 'file_magic [[regex]]' -- check by looking for files in library path
  5090. # which responds to the $file_magic_cmd with a given extended regex.
  5091. # If you have `file' or equivalent on your system and you're not sure
  5092. # whether `pass_all' will *always* work, you probably want this one.
  5093. case $host_os in
  5094. aix[[4-9]]*)
  5095. lt_cv_deplibs_check_method=pass_all
  5096. ;;
  5097. beos*)
  5098. lt_cv_deplibs_check_method=pass_all
  5099. ;;
  5100. bsdi[[45]]*)
  5101. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
  5102. lt_cv_file_magic_cmd='/usr/bin/file -L'
  5103. lt_cv_file_magic_test_file=/shlib/libc.so
  5104. ;;
  5105. cygwin*)
  5106. # func_win32_libid is a shell function defined in ltmain.sh
  5107. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  5108. lt_cv_file_magic_cmd='func_win32_libid'
  5109. ;;
  5110. mingw* | pw32*)
  5111. # Base MSYS/MinGW do not provide the 'file' command needed by
  5112. # func_win32_libid shell function, so use a weaker test based on 'objdump',
  5113. # unless we find 'file', for example because we are cross-compiling.
  5114. if ( file / ) >/dev/null 2>&1; then
  5115. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  5116. lt_cv_file_magic_cmd='func_win32_libid'
  5117. else
  5118. lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
  5119. lt_cv_file_magic_cmd='$OBJDUMP -f'
  5120. fi
  5121. ;;
  5122. cegcc)
  5123. # use the weaker test based on 'objdump'. See mingw*.
  5124. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
  5125. lt_cv_file_magic_cmd='$OBJDUMP -f'
  5126. ;;
  5127. darwin* | rhapsody*)
  5128. lt_cv_deplibs_check_method=pass_all
  5129. ;;
  5130. freebsd* | dragonfly*)
  5131. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  5132. case $host_cpu in
  5133. i*86 )
  5134. # Not sure whether the presence of OpenBSD here was a mistake.
  5135. # Let's accept both of them until this is cleared up.
  5136. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
  5137. lt_cv_file_magic_cmd=/usr/bin/file
  5138. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  5139. ;;
  5140. esac
  5141. else
  5142. lt_cv_deplibs_check_method=pass_all
  5143. fi
  5144. ;;
  5145. gnu*)
  5146. lt_cv_deplibs_check_method=pass_all
  5147. ;;
  5148. hpux10.20* | hpux11*)
  5149. lt_cv_file_magic_cmd=/usr/bin/file
  5150. case $host_cpu in
  5151. ia64*)
  5152. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
  5153. lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
  5154. ;;
  5155. hppa*64*)
  5156. [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]']
  5157. lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
  5158. ;;
  5159. *)
  5160. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
  5161. lt_cv_file_magic_test_file=/usr/lib/libc.sl
  5162. ;;
  5163. esac
  5164. ;;
  5165. interix[[3-9]]*)
  5166. # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
  5167. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
  5168. ;;
  5169. irix5* | irix6* | nonstopux*)
  5170. case $LD in
  5171. *-32|*"-32 ") libmagic=32-bit;;
  5172. *-n32|*"-n32 ") libmagic=N32;;
  5173. *-64|*"-64 ") libmagic=64-bit;;
  5174. *) libmagic=never-match;;
  5175. esac
  5176. lt_cv_deplibs_check_method=pass_all
  5177. ;;
  5178. # This must be Linux ELF.
  5179. linux* | k*bsd*-gnu | kopensolaris*-gnu)
  5180. lt_cv_deplibs_check_method=pass_all
  5181. ;;
  5182. netbsd* | netbsdelf*-gnu)
  5183. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  5184. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  5185. else
  5186. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
  5187. fi
  5188. ;;
  5189. newos6*)
  5190. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
  5191. lt_cv_file_magic_cmd=/usr/bin/file
  5192. lt_cv_file_magic_test_file=/usr/lib/libnls.so
  5193. ;;
  5194. *nto* | *qnx*)
  5195. lt_cv_deplibs_check_method=pass_all
  5196. ;;
  5197. openbsd*)
  5198. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  5199. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
  5200. else
  5201. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  5202. fi
  5203. ;;
  5204. osf3* | osf4* | osf5*)
  5205. lt_cv_deplibs_check_method=pass_all
  5206. ;;
  5207. rdos*)
  5208. lt_cv_deplibs_check_method=pass_all
  5209. ;;
  5210. solaris*)
  5211. lt_cv_deplibs_check_method=pass_all
  5212. ;;
  5213. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  5214. lt_cv_deplibs_check_method=pass_all
  5215. ;;
  5216. sysv4 | sysv4.3*)
  5217. case $host_vendor in
  5218. motorola)
  5219. 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]]'
  5220. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  5221. ;;
  5222. ncr)
  5223. lt_cv_deplibs_check_method=pass_all
  5224. ;;
  5225. sequent)
  5226. lt_cv_file_magic_cmd='/bin/file'
  5227. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
  5228. ;;
  5229. sni)
  5230. lt_cv_file_magic_cmd='/bin/file'
  5231. lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
  5232. lt_cv_file_magic_test_file=/lib/libc.so
  5233. ;;
  5234. siemens)
  5235. lt_cv_deplibs_check_method=pass_all
  5236. ;;
  5237. pc)
  5238. lt_cv_deplibs_check_method=pass_all
  5239. ;;
  5240. esac
  5241. ;;
  5242. tpf*)
  5243. lt_cv_deplibs_check_method=pass_all
  5244. ;;
  5245. esac
  5246. ])
  5247. file_magic_cmd=$lt_cv_file_magic_cmd
  5248. deplibs_check_method=$lt_cv_deplibs_check_method
  5249. test -z "$deplibs_check_method" && deplibs_check_method=unknown
  5250. _LT_DECL([], [deplibs_check_method], [1],
  5251. [Method to check whether dependent libraries are shared objects])
  5252. _LT_DECL([], [file_magic_cmd], [1],
  5253. [Command to use when deplibs_check_method == "file_magic"])
  5254. ])# _LT_CHECK_MAGIC_METHOD
  5255. # LT_PATH_NM
  5256. # ----------
  5257. # find the pathname to a BSD- or MS-compatible name lister
  5258. AC_DEFUN([LT_PATH_NM],
  5259. [AC_REQUIRE([AC_PROG_CC])dnl
  5260. AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
  5261. [if test -n "$NM"; then
  5262. # Let the user override the test.
  5263. lt_cv_path_NM="$NM"
  5264. else
  5265. lt_nm_to_check="${ac_tool_prefix}nm"
  5266. if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
  5267. lt_nm_to_check="$lt_nm_to_check nm"
  5268. fi
  5269. for lt_tmp_nm in $lt_nm_to_check; do
  5270. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  5271. for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
  5272. IFS="$lt_save_ifs"
  5273. test -z "$ac_dir" && ac_dir=.
  5274. tmp_nm="$ac_dir/$lt_tmp_nm"
  5275. if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
  5276. # Check to see if the nm accepts a BSD-compat flag.
  5277. # Adding the `sed 1q' prevents false positives on HP-UX, which says:
  5278. # nm: unknown option "B" ignored
  5279. # Tru64's nm complains that /dev/null is an invalid object file
  5280. case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
  5281. */dev/null* | *'Invalid file or object type'*)
  5282. lt_cv_path_NM="$tmp_nm -B"
  5283. break
  5284. ;;
  5285. *)
  5286. case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
  5287. */dev/null*)
  5288. lt_cv_path_NM="$tmp_nm -p"
  5289. break
  5290. ;;
  5291. *)
  5292. lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
  5293. continue # so that we can try to find one that supports BSD flags
  5294. ;;
  5295. esac
  5296. ;;
  5297. esac
  5298. fi
  5299. done
  5300. IFS="$lt_save_ifs"
  5301. done
  5302. : ${lt_cv_path_NM=no}
  5303. fi])
  5304. if test "$lt_cv_path_NM" != "no"; then
  5305. NM="$lt_cv_path_NM"
  5306. else
  5307. # Didn't find any BSD compatible name lister, look for dumpbin.
  5308. AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
  5309. AC_SUBST([DUMPBIN])
  5310. if test "$DUMPBIN" != ":"; then
  5311. NM="$DUMPBIN"
  5312. fi
  5313. fi
  5314. test -z "$NM" && NM=nm
  5315. AC_SUBST([NM])
  5316. _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
  5317. AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
  5318. [lt_cv_nm_interface="BSD nm"
  5319. echo "int some_variable = 0;" > conftest.$ac_ext
  5320. (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
  5321. (eval "$ac_compile" 2>conftest.err)
  5322. cat conftest.err >&AS_MESSAGE_LOG_FD
  5323. (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
  5324. (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
  5325. cat conftest.err >&AS_MESSAGE_LOG_FD
  5326. (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
  5327. cat conftest.out >&AS_MESSAGE_LOG_FD
  5328. if $GREP 'External.*some_variable' conftest.out > /dev/null; then
  5329. lt_cv_nm_interface="MS dumpbin"
  5330. fi
  5331. rm -f conftest*])
  5332. ])# LT_PATH_NM
  5333. # Old names:
  5334. AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
  5335. AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
  5336. dnl aclocal-1.4 backwards compatibility:
  5337. dnl AC_DEFUN([AM_PROG_NM], [])
  5338. dnl AC_DEFUN([AC_PROG_NM], [])
  5339. # LT_LIB_M
  5340. # --------
  5341. # check for math library
  5342. AC_DEFUN([LT_LIB_M],
  5343. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  5344. LIBM=
  5345. case $host in
  5346. *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
  5347. # These system don't have libm, or don't need it
  5348. ;;
  5349. *-ncr-sysv4.3*)
  5350. AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
  5351. AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
  5352. ;;
  5353. *)
  5354. AC_CHECK_LIB(m, cos, LIBM="-lm")
  5355. ;;
  5356. esac
  5357. AC_SUBST([LIBM])
  5358. ])# LT_LIB_M
  5359. # Old name:
  5360. AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
  5361. dnl aclocal-1.4 backwards compatibility:
  5362. dnl AC_DEFUN([AC_CHECK_LIBM], [])
  5363. # _LT_COMPILER_NO_RTTI([TAGNAME])
  5364. # -------------------------------
  5365. m4_defun([_LT_COMPILER_NO_RTTI],
  5366. [m4_require([_LT_TAG_COMPILER])dnl
  5367. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  5368. if test "$GCC" = yes; then
  5369. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  5370. _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
  5371. lt_cv_prog_compiler_rtti_exceptions,
  5372. [-fno-rtti -fno-exceptions], [],
  5373. [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
  5374. fi
  5375. _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
  5376. [Compiler flag to turn off builtin functions])
  5377. ])# _LT_COMPILER_NO_RTTI
  5378. # _LT_CMD_GLOBAL_SYMBOLS
  5379. # ----------------------
  5380. m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
  5381. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  5382. AC_REQUIRE([AC_PROG_CC])dnl
  5383. AC_REQUIRE([LT_PATH_NM])dnl
  5384. AC_REQUIRE([LT_PATH_LD])dnl
  5385. m4_require([_LT_DECL_SED])dnl
  5386. m4_require([_LT_DECL_EGREP])dnl
  5387. m4_require([_LT_TAG_COMPILER])dnl
  5388. # Check for command to grab the raw symbol name followed by C symbol from nm.
  5389. AC_MSG_CHECKING([command to parse $NM output from $compiler object])
  5390. AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
  5391. [
  5392. # These are sane defaults that work on at least a few old systems.
  5393. # [They come from Ultrix. What could be older than Ultrix?!! ;)]
  5394. # Character class describing NM global symbol codes.
  5395. symcode='[[BCDEGRST]]'
  5396. # Regexp to match symbols that can be accessed directly from C.
  5397. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
  5398. # Define system-specific variables.
  5399. case $host_os in
  5400. aix*)
  5401. symcode='[[BCDT]]'
  5402. ;;
  5403. cygwin* | mingw* | pw32* | cegcc*)
  5404. symcode='[[ABCDGISTW]]'
  5405. ;;
  5406. hpux*)
  5407. if test "$host_cpu" = ia64; then
  5408. symcode='[[ABCDEGRST]]'
  5409. fi
  5410. ;;
  5411. irix* | nonstopux*)
  5412. symcode='[[BCDEGRST]]'
  5413. ;;
  5414. osf*)
  5415. symcode='[[BCDEGQRST]]'
  5416. ;;
  5417. solaris*)
  5418. symcode='[[BDRT]]'
  5419. ;;
  5420. sco3.2v5*)
  5421. symcode='[[DT]]'
  5422. ;;
  5423. sysv4.2uw2*)
  5424. symcode='[[DT]]'
  5425. ;;
  5426. sysv5* | sco5v6* | unixware* | OpenUNIX*)
  5427. symcode='[[ABDT]]'
  5428. ;;
  5429. sysv4)
  5430. symcode='[[DFNSTU]]'
  5431. ;;
  5432. esac
  5433. # If we're using GNU nm, then use its standard symbol codes.
  5434. case `$NM -V 2>&1` in
  5435. *GNU* | *'with BFD'*)
  5436. symcode='[[ABCDGIRSTW]]' ;;
  5437. esac
  5438. # Transform an extracted symbol line into a proper C declaration.
  5439. # Some systems (esp. on ia64) link data and code symbols differently,
  5440. # so use this general approach.
  5441. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  5442. # Transform an extracted symbol line into symbol name and symbol address
  5443. lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
  5444. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
  5445. # Handle CRLF in mingw tool chain
  5446. opt_cr=
  5447. case $build_os in
  5448. mingw*)
  5449. opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  5450. ;;
  5451. esac
  5452. # Try without a prefix underscore, then with it.
  5453. for ac_symprfx in "" "_"; do
  5454. # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
  5455. symxfrm="\\1 $ac_symprfx\\2 \\2"
  5456. # Write the raw and C identifiers.
  5457. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  5458. # Fake it for dumpbin and say T for any non-static function
  5459. # and D for any global variable.
  5460. # Also find C++ and __fastcall symbols from MSVC++,
  5461. # which start with @ or ?.
  5462. lt_cv_sys_global_symbol_pipe="$AWK ['"\
  5463. " {last_section=section; section=\$ 3};"\
  5464. " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
  5465. " \$ 0!~/External *\|/{next};"\
  5466. " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
  5467. " {if(hide[section]) next};"\
  5468. " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
  5469. " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
  5470. " s[1]~/^[@?]/{print s[1], s[1]; next};"\
  5471. " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
  5472. " ' prfx=^$ac_symprfx]"
  5473. else
  5474. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
  5475. fi
  5476. # Check to see that the pipe works correctly.
  5477. pipe_works=no
  5478. rm -f conftest*
  5479. cat > conftest.$ac_ext <<_LT_EOF
  5480. #ifdef __cplusplus
  5481. extern "C" {
  5482. #endif
  5483. char nm_test_var;
  5484. void nm_test_func(void);
  5485. void nm_test_func(void){}
  5486. #ifdef __cplusplus
  5487. }
  5488. #endif
  5489. int main(){nm_test_var='a';nm_test_func();return(0);}
  5490. _LT_EOF
  5491. if AC_TRY_EVAL(ac_compile); then
  5492. # Now try to grab the symbols.
  5493. nlist=conftest.nm
  5494. if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
  5495. # Try sorting and uniquifying the output.
  5496. if sort "$nlist" | uniq > "$nlist"T; then
  5497. mv -f "$nlist"T "$nlist"
  5498. else
  5499. rm -f "$nlist"T
  5500. fi
  5501. # Make sure that we snagged all the symbols we need.
  5502. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
  5503. if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
  5504. cat <<_LT_EOF > conftest.$ac_ext
  5505. #ifdef __cplusplus
  5506. extern "C" {
  5507. #endif
  5508. _LT_EOF
  5509. # Now generate the symbol file.
  5510. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
  5511. cat <<_LT_EOF >> conftest.$ac_ext
  5512. /* The mapping between symbol names and symbols. */
  5513. const struct {
  5514. const char *name;
  5515. void *address;
  5516. }
  5517. lt__PROGRAM__LTX_preloaded_symbols[[]] =
  5518. {
  5519. { "@PROGRAM@", (void *) 0 },
  5520. _LT_EOF
  5521. $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
  5522. cat <<\_LT_EOF >> conftest.$ac_ext
  5523. {0, (void *) 0}
  5524. };
  5525. /* This works around a problem in FreeBSD linker */
  5526. #ifdef FREEBSD_WORKAROUND
  5527. static const void *lt_preloaded_setup() {
  5528. return lt__PROGRAM__LTX_preloaded_symbols;
  5529. }
  5530. #endif
  5531. #ifdef __cplusplus
  5532. }
  5533. #endif
  5534. _LT_EOF
  5535. # Now try linking the two files.
  5536. mv conftest.$ac_objext conftstm.$ac_objext
  5537. lt_save_LIBS="$LIBS"
  5538. lt_save_CFLAGS="$CFLAGS"
  5539. LIBS="conftstm.$ac_objext"
  5540. CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
  5541. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
  5542. pipe_works=yes
  5543. fi
  5544. LIBS="$lt_save_LIBS"
  5545. CFLAGS="$lt_save_CFLAGS"
  5546. else
  5547. echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
  5548. fi
  5549. else
  5550. echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
  5551. fi
  5552. else
  5553. echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
  5554. fi
  5555. else
  5556. echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
  5557. cat conftest.$ac_ext >&5
  5558. fi
  5559. rm -rf conftest* conftst*
  5560. # Do not use the global_symbol_pipe unless it works.
  5561. if test "$pipe_works" = yes; then
  5562. break
  5563. else
  5564. lt_cv_sys_global_symbol_pipe=
  5565. fi
  5566. done
  5567. ])
  5568. if test -z "$lt_cv_sys_global_symbol_pipe"; then
  5569. lt_cv_sys_global_symbol_to_cdecl=
  5570. fi
  5571. if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
  5572. AC_MSG_RESULT(failed)
  5573. else
  5574. AC_MSG_RESULT(ok)
  5575. fi
  5576. _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
  5577. [Take the output of nm and produce a listing of raw symbols and C names])
  5578. _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
  5579. [Transform the output of nm in a proper C declaration])
  5580. _LT_DECL([global_symbol_to_c_name_address],
  5581. [lt_cv_sys_global_symbol_to_c_name_address], [1],
  5582. [Transform the output of nm in a C name address pair])
  5583. _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
  5584. [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
  5585. [Transform the output of nm in a C name address pair when lib prefix is needed])
  5586. ]) # _LT_CMD_GLOBAL_SYMBOLS
  5587. # _LT_COMPILER_PIC([TAGNAME])
  5588. # ---------------------------
  5589. m4_defun([_LT_COMPILER_PIC],
  5590. [m4_require([_LT_TAG_COMPILER])dnl
  5591. _LT_TAGVAR(lt_prog_compiler_wl, $1)=
  5592. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  5593. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  5594. AC_MSG_CHECKING([for $compiler option to produce PIC])
  5595. m4_if([$1], [CXX], [
  5596. # C++ specific cases for pic, static, wl, etc.
  5597. if test "$GXX" = yes; then
  5598. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5599. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  5600. case $host_os in
  5601. aix*)
  5602. # All AIX code is PIC.
  5603. if test "$host_cpu" = ia64; then
  5604. # AIX 5 now supports IA64 processor
  5605. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5606. fi
  5607. ;;
  5608. amigaos*)
  5609. case $host_cpu in
  5610. powerpc)
  5611. # see comment about AmigaOS4 .so support
  5612. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  5613. ;;
  5614. m68k)
  5615. # FIXME: we need at least 68020 code to build shared libraries, but
  5616. # adding the `-m68020' flag to GCC prevents building anything better,
  5617. # like `-m68040'.
  5618. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  5619. ;;
  5620. esac
  5621. ;;
  5622. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  5623. # PIC is the default for these OSes.
  5624. ;;
  5625. mingw* | cygwin* | os2* | pw32* | cegcc*)
  5626. # This hack is so that the source file can tell whether it is being
  5627. # built for inclusion in a dll (and should export symbols for example).
  5628. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  5629. # (--disable-auto-import) libraries
  5630. m4_if([$1], [GCJ], [],
  5631. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  5632. ;;
  5633. darwin* | rhapsody*)
  5634. # PIC is the default on this platform
  5635. # Common symbols not allowed in MH_DYLIB files
  5636. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  5637. ;;
  5638. *djgpp*)
  5639. # DJGPP does not support shared libraries at all
  5640. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  5641. ;;
  5642. interix[[3-9]]*)
  5643. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  5644. # Instead, we relocate shared libraries at runtime.
  5645. ;;
  5646. sysv4*MP*)
  5647. if test -d /usr/nec; then
  5648. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  5649. fi
  5650. ;;
  5651. hpux*)
  5652. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  5653. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  5654. # sets the default TLS model and affects inlining.
  5655. case $host_cpu in
  5656. hppa*64*)
  5657. ;;
  5658. *)
  5659. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  5660. ;;
  5661. esac
  5662. ;;
  5663. *qnx* | *nto*)
  5664. # QNX uses GNU C++, but need to define -shared option too, otherwise
  5665. # it will coredump.
  5666. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  5667. ;;
  5668. *)
  5669. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  5670. ;;
  5671. esac
  5672. else
  5673. case $host_os in
  5674. aix[[4-9]]*)
  5675. # All AIX code is PIC.
  5676. if test "$host_cpu" = ia64; then
  5677. # AIX 5 now supports IA64 processor
  5678. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5679. else
  5680. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  5681. fi
  5682. ;;
  5683. chorus*)
  5684. case $cc_basename in
  5685. cxch68*)
  5686. # Green Hills C++ Compiler
  5687. # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
  5688. ;;
  5689. esac
  5690. ;;
  5691. dgux*)
  5692. case $cc_basename in
  5693. ec++*)
  5694. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5695. ;;
  5696. ghcx*)
  5697. # Green Hills C++ Compiler
  5698. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  5699. ;;
  5700. *)
  5701. ;;
  5702. esac
  5703. ;;
  5704. freebsd* | dragonfly*)
  5705. # FreeBSD uses GNU C++
  5706. ;;
  5707. hpux9* | hpux10* | hpux11*)
  5708. case $cc_basename in
  5709. CC*)
  5710. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5711. _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  5712. if test "$host_cpu" != ia64; then
  5713. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  5714. fi
  5715. ;;
  5716. aCC*)
  5717. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5718. _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  5719. case $host_cpu in
  5720. hppa*64*|ia64*)
  5721. # +Z the default
  5722. ;;
  5723. *)
  5724. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  5725. ;;
  5726. esac
  5727. ;;
  5728. *)
  5729. ;;
  5730. esac
  5731. ;;
  5732. interix*)
  5733. # This is c89, which is MS Visual C++ (no shared libs)
  5734. # Anyone wants to do a port?
  5735. ;;
  5736. irix5* | irix6* | nonstopux*)
  5737. case $cc_basename in
  5738. CC*)
  5739. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5740. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  5741. # CC pic flag -KPIC is the default.
  5742. ;;
  5743. *)
  5744. ;;
  5745. esac
  5746. ;;
  5747. linux* | k*bsd*-gnu | kopensolaris*-gnu)
  5748. case $cc_basename in
  5749. KCC*)
  5750. # KAI C++ Compiler
  5751. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  5752. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  5753. ;;
  5754. ecpc* )
  5755. # old Intel C++ for x86_64 which still supported -KPIC.
  5756. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5757. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5758. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  5759. ;;
  5760. icpc* )
  5761. # Intel C++, used to be incompatible with GCC.
  5762. # ICC 10 doesn't accept -KPIC any more.
  5763. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5764. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  5765. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  5766. ;;
  5767. pgCC* | pgcpp*)
  5768. # Portland Group C++ compiler
  5769. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5770. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  5771. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5772. ;;
  5773. cxx*)
  5774. # Compaq C++
  5775. # Make sure the PIC flag is empty. It appears that all Alpha
  5776. # Linux and Compaq Tru64 Unix objects are PIC.
  5777. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  5778. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  5779. ;;
  5780. xlc* | xlC*)
  5781. # IBM XL 8.0 on PPC
  5782. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5783. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  5784. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  5785. ;;
  5786. *)
  5787. case `$CC -V 2>&1 | sed 5q` in
  5788. *Sun\ C*)
  5789. # Sun C++ 5.9
  5790. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5791. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5792. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  5793. ;;
  5794. esac
  5795. ;;
  5796. esac
  5797. ;;
  5798. lynxos*)
  5799. ;;
  5800. m88k*)
  5801. ;;
  5802. mvs*)
  5803. case $cc_basename in
  5804. cxx*)
  5805. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
  5806. ;;
  5807. *)
  5808. ;;
  5809. esac
  5810. ;;
  5811. netbsd* | netbsdelf*-gnu)
  5812. ;;
  5813. *qnx* | *nto*)
  5814. # QNX uses GNU C++, but need to define -shared option too, otherwise
  5815. # it will coredump.
  5816. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  5817. ;;
  5818. osf3* | osf4* | osf5*)
  5819. case $cc_basename in
  5820. KCC*)
  5821. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  5822. ;;
  5823. RCC*)
  5824. # Rational C++ 2.4.1
  5825. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  5826. ;;
  5827. cxx*)
  5828. # Digital/Compaq C++
  5829. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5830. # Make sure the PIC flag is empty. It appears that all Alpha
  5831. # Linux and Compaq Tru64 Unix objects are PIC.
  5832. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  5833. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  5834. ;;
  5835. *)
  5836. ;;
  5837. esac
  5838. ;;
  5839. psos*)
  5840. ;;
  5841. solaris*)
  5842. case $cc_basename in
  5843. CC*)
  5844. # Sun C++ 4.2, 5.x and Centerline C++
  5845. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5846. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5847. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  5848. ;;
  5849. gcx*)
  5850. # Green Hills C++ Compiler
  5851. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  5852. ;;
  5853. *)
  5854. ;;
  5855. esac
  5856. ;;
  5857. sunos4*)
  5858. case $cc_basename in
  5859. CC*)
  5860. # Sun C++ 4.x
  5861. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  5862. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5863. ;;
  5864. lcc*)
  5865. # Lucid
  5866. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  5867. ;;
  5868. *)
  5869. ;;
  5870. esac
  5871. ;;
  5872. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  5873. case $cc_basename in
  5874. CC*)
  5875. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5876. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5877. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5878. ;;
  5879. esac
  5880. ;;
  5881. tandem*)
  5882. case $cc_basename in
  5883. NCC*)
  5884. # NonStop-UX NCC 3.20
  5885. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5886. ;;
  5887. *)
  5888. ;;
  5889. esac
  5890. ;;
  5891. vxworks*)
  5892. ;;
  5893. *)
  5894. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  5895. ;;
  5896. esac
  5897. fi
  5898. ],
  5899. [
  5900. if test "$GCC" = yes; then
  5901. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5902. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  5903. case $host_os in
  5904. aix*)
  5905. # All AIX code is PIC.
  5906. if test "$host_cpu" = ia64; then
  5907. # AIX 5 now supports IA64 processor
  5908. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5909. fi
  5910. ;;
  5911. amigaos*)
  5912. case $host_cpu in
  5913. powerpc)
  5914. # see comment about AmigaOS4 .so support
  5915. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  5916. ;;
  5917. m68k)
  5918. # FIXME: we need at least 68020 code to build shared libraries, but
  5919. # adding the `-m68020' flag to GCC prevents building anything better,
  5920. # like `-m68040'.
  5921. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  5922. ;;
  5923. esac
  5924. ;;
  5925. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  5926. # PIC is the default for these OSes.
  5927. ;;
  5928. mingw* | cygwin* | pw32* | os2* | cegcc*)
  5929. # This hack is so that the source file can tell whether it is being
  5930. # built for inclusion in a dll (and should export symbols for example).
  5931. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  5932. # (--disable-auto-import) libraries
  5933. m4_if([$1], [GCJ], [],
  5934. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  5935. ;;
  5936. darwin* | rhapsody*)
  5937. # PIC is the default on this platform
  5938. # Common symbols not allowed in MH_DYLIB files
  5939. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  5940. ;;
  5941. hpux*)
  5942. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  5943. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  5944. # sets the default TLS model and affects inlining.
  5945. case $host_cpu in
  5946. hppa*64*)
  5947. # +Z the default
  5948. ;;
  5949. *)
  5950. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  5951. ;;
  5952. esac
  5953. ;;
  5954. interix[[3-9]]*)
  5955. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  5956. # Instead, we relocate shared libraries at runtime.
  5957. ;;
  5958. msdosdjgpp*)
  5959. # Just because we use GCC doesn't mean we suddenly get shared libraries
  5960. # on systems that don't support them.
  5961. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  5962. enable_shared=no
  5963. ;;
  5964. *nto* | *qnx*)
  5965. # QNX uses GNU C++, but need to define -shared option too, otherwise
  5966. # it will coredump.
  5967. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  5968. ;;
  5969. sysv4*MP*)
  5970. if test -d /usr/nec; then
  5971. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  5972. fi
  5973. ;;
  5974. *)
  5975. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  5976. ;;
  5977. esac
  5978. else
  5979. # PORTME Check for flag to pass linker flags through the system compiler.
  5980. case $host_os in
  5981. aix*)
  5982. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5983. if test "$host_cpu" = ia64; then
  5984. # AIX 5 now supports IA64 processor
  5985. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5986. else
  5987. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  5988. fi
  5989. ;;
  5990. mingw* | cygwin* | pw32* | os2* | cegcc*)
  5991. # This hack is so that the source file can tell whether it is being
  5992. # built for inclusion in a dll (and should export symbols for example).
  5993. m4_if([$1], [GCJ], [],
  5994. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  5995. ;;
  5996. hpux9* | hpux10* | hpux11*)
  5997. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5998. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  5999. # not for PA HP-UX.
  6000. case $host_cpu in
  6001. hppa*64*|ia64*)
  6002. # +Z the default
  6003. ;;
  6004. *)
  6005. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  6006. ;;
  6007. esac
  6008. # Is there a better lt_prog_compiler_static that works with the bundled CC?
  6009. _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  6010. ;;
  6011. irix5* | irix6* | nonstopux*)
  6012. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  6013. # PIC (with -KPIC) is the default.
  6014. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  6015. ;;
  6016. linux* | k*bsd*-gnu | kopensolaris*-gnu)
  6017. case $cc_basename in
  6018. # old Intel for x86_64 which still supported -KPIC.
  6019. ecc*)
  6020. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  6021. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  6022. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  6023. ;;
  6024. # icc used to be incompatible with GCC.
  6025. # ICC 10 doesn't accept -KPIC any more.
  6026. icc* | ifort*)
  6027. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  6028. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  6029. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  6030. ;;
  6031. # Lahey Fortran 8.1.
  6032. lf95*)
  6033. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  6034. _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
  6035. _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
  6036. ;;
  6037. pgcc* | pgf77* | pgf90* | pgf95*)
  6038. # Portland Group compilers (*not* the Pentium gcc compiler,
  6039. # which looks to be a dead project)
  6040. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  6041. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  6042. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  6043. ;;
  6044. ccc*)
  6045. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  6046. # All Alpha code is PIC.
  6047. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  6048. ;;
  6049. xl*)
  6050. # IBM XL C 8.0/Fortran 10.1 on PPC
  6051. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  6052. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  6053. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  6054. ;;
  6055. *)
  6056. case `$CC -V 2>&1 | sed 5q` in
  6057. *Sun\ C*)
  6058. # Sun C 5.9
  6059. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  6060. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  6061. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  6062. ;;
  6063. *Sun\ F*)
  6064. # Sun Fortran 8.3 passes all unrecognized flags to the linker
  6065. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  6066. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  6067. _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
  6068. ;;
  6069. esac
  6070. ;;
  6071. esac
  6072. ;;
  6073. newsos6)
  6074. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  6075. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  6076. ;;
  6077. *nto* | *qnx*)
  6078. # QNX uses GNU C++, but need to define -shared option too, otherwise
  6079. # it will coredump.
  6080. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  6081. ;;
  6082. osf3* | osf4* | osf5*)
  6083. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  6084. # All OSF/1 code is PIC.
  6085. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  6086. ;;
  6087. rdos*)
  6088. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  6089. ;;
  6090. solaris*)
  6091. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  6092. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  6093. case $cc_basename in
  6094. f77* | f90* | f95*)
  6095. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
  6096. *)
  6097. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
  6098. esac
  6099. ;;
  6100. sunos4*)
  6101. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  6102. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  6103. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  6104. ;;
  6105. sysv4 | sysv4.2uw2* | sysv4.3*)
  6106. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  6107. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  6108. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  6109. ;;
  6110. sysv4*MP*)
  6111. if test -d /usr/nec ;then
  6112. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
  6113. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  6114. fi
  6115. ;;
  6116. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  6117. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  6118. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  6119. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  6120. ;;
  6121. unicos*)
  6122. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  6123. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  6124. ;;
  6125. uts4*)
  6126. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  6127. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  6128. ;;
  6129. *)
  6130. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  6131. ;;
  6132. esac
  6133. fi
  6134. ])
  6135. case $host_os in
  6136. # For platforms which do not support PIC, -DPIC is meaningless:
  6137. *djgpp*)
  6138. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  6139. ;;
  6140. *)
  6141. _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
  6142. ;;
  6143. esac
  6144. AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
  6145. _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
  6146. [How to pass a linker flag through the compiler])
  6147. #
  6148. # Check to make sure the PIC flag actually works.
  6149. #
  6150. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  6151. _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
  6152. [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
  6153. [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
  6154. [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
  6155. "" | " "*) ;;
  6156. *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
  6157. esac],
  6158. [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
  6159. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
  6160. fi
  6161. _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
  6162. [Additional compiler flags for building library objects])
  6163. #
  6164. # Check to make sure the static flag actually works.
  6165. #
  6166. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
  6167. _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
  6168. _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
  6169. $lt_tmp_static_flag,
  6170. [],
  6171. [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
  6172. _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
  6173. [Compiler flag to prevent dynamic linking])
  6174. ])# _LT_COMPILER_PIC
  6175. # _LT_LINKER_SHLIBS([TAGNAME])
  6176. # ----------------------------
  6177. # See if the linker supports building shared libraries.
  6178. m4_defun([_LT_LINKER_SHLIBS],
  6179. [AC_REQUIRE([LT_PATH_LD])dnl
  6180. AC_REQUIRE([LT_PATH_NM])dnl
  6181. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  6182. m4_require([_LT_DECL_EGREP])dnl
  6183. m4_require([_LT_DECL_SED])dnl
  6184. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  6185. m4_require([_LT_TAG_COMPILER])dnl
  6186. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  6187. m4_if([$1], [CXX], [
  6188. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  6189. case $host_os in
  6190. aix[[4-9]]*)
  6191. # If we're using GNU nm, then we don't want the "-C" option.
  6192. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  6193. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  6194. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  6195. else
  6196. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  6197. fi
  6198. ;;
  6199. pw32*)
  6200. _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
  6201. ;;
  6202. cygwin* | mingw* | cegcc*)
  6203. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
  6204. ;;
  6205. linux* | k*bsd*-gnu)
  6206. _LT_TAGVAR(link_all_deplibs, $1)=no
  6207. ;;
  6208. *)
  6209. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  6210. ;;
  6211. esac
  6212. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  6213. ], [
  6214. runpath_var=
  6215. _LT_TAGVAR(allow_undefined_flag, $1)=
  6216. _LT_TAGVAR(always_export_symbols, $1)=no
  6217. _LT_TAGVAR(archive_cmds, $1)=
  6218. _LT_TAGVAR(archive_expsym_cmds, $1)=
  6219. _LT_TAGVAR(compiler_needs_object, $1)=no
  6220. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  6221. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  6222. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  6223. _LT_TAGVAR(hardcode_automatic, $1)=no
  6224. _LT_TAGVAR(hardcode_direct, $1)=no
  6225. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  6226. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  6227. _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  6228. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  6229. _LT_TAGVAR(hardcode_minus_L, $1)=no
  6230. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  6231. _LT_TAGVAR(inherit_rpath, $1)=no
  6232. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  6233. _LT_TAGVAR(module_cmds, $1)=
  6234. _LT_TAGVAR(module_expsym_cmds, $1)=
  6235. _LT_TAGVAR(old_archive_from_new_cmds, $1)=
  6236. _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
  6237. _LT_TAGVAR(thread_safe_flag_spec, $1)=
  6238. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  6239. # include_expsyms should be a list of space-separated symbols to be *always*
  6240. # included in the symbol list
  6241. _LT_TAGVAR(include_expsyms, $1)=
  6242. # exclude_expsyms can be an extended regexp of symbols to exclude
  6243. # it will be wrapped by ` (' and `)$', so one must not match beginning or
  6244. # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
  6245. # as well as any symbol that contains `d'.
  6246. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  6247. # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  6248. # platforms (ab)use it in PIC code, but their linkers get confused if
  6249. # the symbol is explicitly referenced. Since portable code cannot
  6250. # rely on this symbol name, it's probably fine to never include it in
  6251. # preloaded symbol tables.
  6252. # Exclude shared library initialization/finalization symbols.
  6253. dnl Note also adjust exclude_expsyms for C++ above.
  6254. extract_expsyms_cmds=
  6255. case $host_os in
  6256. cygwin* | mingw* | pw32* | cegcc*)
  6257. # FIXME: the MSVC++ port hasn't been tested in a loooong time
  6258. # When not using gcc, we currently assume that we are using
  6259. # Microsoft Visual C++.
  6260. if test "$GCC" != yes; then
  6261. with_gnu_ld=no
  6262. fi
  6263. ;;
  6264. interix*)
  6265. # we just hope/assume this is gcc and not c89 (= MSVC++)
  6266. with_gnu_ld=yes
  6267. ;;
  6268. openbsd*)
  6269. with_gnu_ld=no
  6270. ;;
  6271. linux* | k*bsd*-gnu)
  6272. _LT_TAGVAR(link_all_deplibs, $1)=no
  6273. ;;
  6274. esac
  6275. _LT_TAGVAR(ld_shlibs, $1)=yes
  6276. if test "$with_gnu_ld" = yes; then
  6277. # If archive_cmds runs LD, not CC, wlarc should be empty
  6278. wlarc='${wl}'
  6279. # Set some defaults for GNU ld with shared library support. These
  6280. # are reset later if shared libraries are not supported. Putting them
  6281. # here allows them to be overridden if necessary.
  6282. runpath_var=LD_RUN_PATH
  6283. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6284. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  6285. # ancient GNU ld didn't support --whole-archive et. al.
  6286. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
  6287. _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  6288. else
  6289. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  6290. fi
  6291. supports_anon_versioning=no
  6292. case `$LD -v 2>&1` in
  6293. *GNU\ gold*) supports_anon_versioning=yes ;;
  6294. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
  6295. *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
  6296. *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
  6297. *\ 2.11.*) ;; # other 2.11 versions
  6298. *) supports_anon_versioning=yes ;;
  6299. esac
  6300. # See if GNU ld supports shared libraries.
  6301. case $host_os in
  6302. aix[[3-9]]*)
  6303. # On AIX/PPC, the GNU linker is very broken
  6304. if test "$host_cpu" != ia64; then
  6305. _LT_TAGVAR(ld_shlibs, $1)=no
  6306. cat <<_LT_EOF 1>&2
  6307. *** Warning: the GNU linker, at least up to release 2.9.1, is reported
  6308. *** to be unable to reliably create shared libraries on AIX.
  6309. *** Therefore, libtool is disabling shared libraries support. If you
  6310. *** really care for shared libraries, you may want to modify your PATH
  6311. *** so that a non-GNU linker is found, and then restart.
  6312. _LT_EOF
  6313. fi
  6314. ;;
  6315. amigaos*)
  6316. case $host_cpu in
  6317. powerpc)
  6318. # see comment about AmigaOS4 .so support
  6319. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  6320. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  6321. ;;
  6322. m68k)
  6323. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
  6324. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6325. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  6326. ;;
  6327. esac
  6328. ;;
  6329. beos*)
  6330. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  6331. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6332. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  6333. # support --undefined. This deserves some investigation. FIXME
  6334. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  6335. else
  6336. _LT_TAGVAR(ld_shlibs, $1)=no
  6337. fi
  6338. ;;
  6339. cygwin* | mingw* | pw32* | cegcc*)
  6340. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  6341. # as there is no search path for DLLs.
  6342. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6343. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6344. _LT_TAGVAR(always_export_symbols, $1)=no
  6345. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  6346. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
  6347. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  6348. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  6349. # If the export-symbols file already is a .def file (1st line
  6350. # is EXPORTS), use it as is; otherwise, prepend...
  6351. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  6352. cp $export_symbols $output_objdir/$soname.def;
  6353. else
  6354. echo EXPORTS > $output_objdir/$soname.def;
  6355. cat $export_symbols >> $output_objdir/$soname.def;
  6356. fi~
  6357. $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  6358. else
  6359. _LT_TAGVAR(ld_shlibs, $1)=no
  6360. fi
  6361. ;;
  6362. interix[[3-9]]*)
  6363. _LT_TAGVAR(hardcode_direct, $1)=no
  6364. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6365. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  6366. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  6367. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  6368. # Instead, shared libraries are loaded at an image base (0x10000000 by
  6369. # default) and relocated if they conflict, which is a slow very memory
  6370. # consuming and fragmenting process. To avoid this, we pick a random,
  6371. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  6372. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  6373. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
  6374. _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
  6375. ;;
  6376. gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
  6377. tmp_diet=no
  6378. if test "$host_os" = linux-dietlibc; then
  6379. case $cc_basename in
  6380. diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
  6381. esac
  6382. fi
  6383. if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
  6384. && test "$tmp_diet" = no
  6385. then
  6386. tmp_addflag=
  6387. tmp_sharedflag='-shared'
  6388. case $cc_basename,$host_cpu in
  6389. pgcc*) # Portland Group C compiler
  6390. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
  6391. tmp_addflag=' $pic_flag'
  6392. ;;
  6393. pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
  6394. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
  6395. tmp_addflag=' $pic_flag -Mnomain' ;;
  6396. ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
  6397. tmp_addflag=' -i_dynamic' ;;
  6398. efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
  6399. tmp_addflag=' -i_dynamic -nofor_main' ;;
  6400. ifc* | ifort*) # Intel Fortran compiler
  6401. tmp_addflag=' -nofor_main' ;;
  6402. lf95*) # Lahey Fortran 8.1
  6403. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  6404. tmp_sharedflag='--shared' ;;
  6405. xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
  6406. tmp_sharedflag='-qmkshrobj'
  6407. tmp_addflag= ;;
  6408. esac
  6409. case `$CC -V 2>&1 | sed 5q` in
  6410. *Sun\ C*) # Sun C 5.9
  6411. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
  6412. _LT_TAGVAR(compiler_needs_object, $1)=yes
  6413. tmp_sharedflag='-G' ;;
  6414. *Sun\ F*) # Sun Fortran 8.3
  6415. tmp_sharedflag='-G' ;;
  6416. esac
  6417. _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  6418. if test "x$supports_anon_versioning" = xyes; then
  6419. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  6420. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  6421. echo "local: *; };" >> $output_objdir/$libname.ver~
  6422. $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  6423. fi
  6424. case $cc_basename in
  6425. xlf*)
  6426. # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
  6427. _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
  6428. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  6429. _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
  6430. _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
  6431. if test "x$supports_anon_versioning" = xyes; then
  6432. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  6433. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  6434. echo "local: *; };" >> $output_objdir/$libname.ver~
  6435. $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
  6436. fi
  6437. ;;
  6438. esac
  6439. else
  6440. _LT_TAGVAR(ld_shlibs, $1)=no
  6441. fi
  6442. ;;
  6443. netbsd* | netbsdelf*-gnu)
  6444. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  6445. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  6446. wlarc=
  6447. else
  6448. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  6449. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  6450. fi
  6451. ;;
  6452. solaris*)
  6453. if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
  6454. _LT_TAGVAR(ld_shlibs, $1)=no
  6455. cat <<_LT_EOF 1>&2
  6456. *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  6457. *** create shared libraries on Solaris systems. Therefore, libtool
  6458. *** is disabling shared libraries support. We urge you to upgrade GNU
  6459. *** binutils to release 2.9.1 or newer. Another option is to modify
  6460. *** your PATH or compiler configuration so that the native linker is
  6461. *** used, and then restart.
  6462. _LT_EOF
  6463. elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  6464. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  6465. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  6466. else
  6467. _LT_TAGVAR(ld_shlibs, $1)=no
  6468. fi
  6469. ;;
  6470. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
  6471. case `$LD -v 2>&1` in
  6472. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
  6473. _LT_TAGVAR(ld_shlibs, $1)=no
  6474. cat <<_LT_EOF 1>&2
  6475. *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
  6476. *** reliably create shared libraries on SCO systems. Therefore, libtool
  6477. *** is disabling shared libraries support. We urge you to upgrade GNU
  6478. *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
  6479. *** your PATH or compiler configuration so that the native linker is
  6480. *** used, and then restart.
  6481. _LT_EOF
  6482. ;;
  6483. *)
  6484. # For security reasons, it is highly recommended that you always
  6485. # use absolute paths for naming shared libraries, and exclude the
  6486. # DT_RUNPATH tag from executables and libraries. But doing so
  6487. # requires that you compile everything twice, which is a pain.
  6488. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  6489. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6490. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  6491. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  6492. else
  6493. _LT_TAGVAR(ld_shlibs, $1)=no
  6494. fi
  6495. ;;
  6496. esac
  6497. ;;
  6498. sunos4*)
  6499. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  6500. wlarc=
  6501. _LT_TAGVAR(hardcode_direct, $1)=yes
  6502. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6503. ;;
  6504. *)
  6505. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  6506. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  6507. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  6508. else
  6509. _LT_TAGVAR(ld_shlibs, $1)=no
  6510. fi
  6511. ;;
  6512. esac
  6513. if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
  6514. runpath_var=
  6515. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  6516. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  6517. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  6518. fi
  6519. else
  6520. # PORTME fill in a description of your system's linker (not GNU ld)
  6521. case $host_os in
  6522. aix3*)
  6523. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6524. _LT_TAGVAR(always_export_symbols, $1)=yes
  6525. _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
  6526. # Note: this linker hardcodes the directories in LIBPATH if there
  6527. # are no directories specified by -L.
  6528. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  6529. if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
  6530. # Neither direct hardcoding nor static linking is supported with a
  6531. # broken collect2.
  6532. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  6533. fi
  6534. ;;
  6535. aix[[4-9]]*)
  6536. if test "$host_cpu" = ia64; then
  6537. # On IA64, the linker does run time linking by default, so we don't
  6538. # have to do anything special.
  6539. aix_use_runtimelinking=no
  6540. exp_sym_flag='-Bexport'
  6541. no_entry_flag=""
  6542. else
  6543. # If we're using GNU nm, then we don't want the "-C" option.
  6544. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  6545. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  6546. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  6547. else
  6548. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  6549. fi
  6550. aix_use_runtimelinking=no
  6551. # Test if we are trying to use run time linking or normal
  6552. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  6553. # need to do runtime linking.
  6554. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  6555. for ld_flag in $LDFLAGS; do
  6556. if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
  6557. aix_use_runtimelinking=yes
  6558. break
  6559. fi
  6560. done
  6561. ;;
  6562. esac
  6563. exp_sym_flag='-bexport'
  6564. no_entry_flag='-bnoentry'
  6565. fi
  6566. # When large executables or shared objects are built, AIX ld can
  6567. # have problems creating the table of contents. If linking a library
  6568. # or program results in "error TOC overflow" add -mminimal-toc to
  6569. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  6570. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  6571. _LT_TAGVAR(archive_cmds, $1)=''
  6572. _LT_TAGVAR(hardcode_direct, $1)=yes
  6573. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6574. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  6575. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6576. _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
  6577. if test "$GCC" = yes; then
  6578. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  6579. # We only want to do this on AIX 4.2 and lower, the check
  6580. # below for broken collect2 doesn't work under 4.3+
  6581. collect2name=`${CC} -print-prog-name=collect2`
  6582. if test -f "$collect2name" &&
  6583. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  6584. then
  6585. # We have reworked collect2
  6586. :
  6587. else
  6588. # We have old collect2
  6589. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  6590. # It fails to find uninstalled libraries when the uninstalled
  6591. # path is not listed in the libpath. Setting hardcode_minus_L
  6592. # to unsupported forces relinking
  6593. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  6594. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6595. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  6596. fi
  6597. ;;
  6598. esac
  6599. shared_flag='-shared'
  6600. if test "$aix_use_runtimelinking" = yes; then
  6601. shared_flag="$shared_flag "'${wl}-G'
  6602. fi
  6603. _LT_TAGVAR(link_all_deplibs, $1)=no
  6604. else
  6605. # not using gcc
  6606. if test "$host_cpu" = ia64; then
  6607. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  6608. # chokes on -Wl,-G. The following line is correct:
  6609. shared_flag='-G'
  6610. else
  6611. if test "$aix_use_runtimelinking" = yes; then
  6612. shared_flag='${wl}-G'
  6613. else
  6614. shared_flag='${wl}-bM:SRE'
  6615. fi
  6616. fi
  6617. fi
  6618. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
  6619. # It seems that -bexpall does not export symbols beginning with
  6620. # underscore (_), so it is better to generate a list of symbols to export.
  6621. _LT_TAGVAR(always_export_symbols, $1)=yes
  6622. if test "$aix_use_runtimelinking" = yes; then
  6623. # Warning - without using the other runtime loading flags (-brtl),
  6624. # -berok will link without error, but may produce a broken library.
  6625. _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
  6626. # Determine the default libpath from the value encoded in an
  6627. # empty executable.
  6628. _LT_SYS_MODULE_PATH_AIX
  6629. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  6630. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
  6631. else
  6632. if test "$host_cpu" = ia64; then
  6633. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  6634. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  6635. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
  6636. else
  6637. # Determine the default libpath from the value encoded in an
  6638. # empty executable.
  6639. _LT_SYS_MODULE_PATH_AIX
  6640. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  6641. # Warning - without using the other run time loading flags,
  6642. # -berok will link without error, but may produce a broken library.
  6643. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  6644. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  6645. # Exported symbols can be pulled into shared objects from archives
  6646. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  6647. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  6648. # This is similar to how AIX traditionally builds its shared libraries.
  6649. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
  6650. fi
  6651. fi
  6652. ;;
  6653. amigaos*)
  6654. case $host_cpu in
  6655. powerpc)
  6656. # see comment about AmigaOS4 .so support
  6657. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  6658. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  6659. ;;
  6660. m68k)
  6661. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
  6662. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6663. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  6664. ;;
  6665. esac
  6666. ;;
  6667. bsdi[[45]]*)
  6668. _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
  6669. ;;
  6670. cygwin* | mingw* | pw32* | cegcc*)
  6671. # When not using gcc, we currently assume that we are using
  6672. # Microsoft Visual C++.
  6673. # hardcode_libdir_flag_spec is actually meaningless, as there is
  6674. # no search path for DLLs.
  6675. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  6676. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6677. # Tell ltmain to make .lib files, not .a files.
  6678. libext=lib
  6679. # Tell ltmain to make .dll files, not .so files.
  6680. shrext_cmds=".dll"
  6681. # FIXME: Setting linknames here is a bad hack.
  6682. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
  6683. # The linker will automatically build a .lib file if we build a DLL.
  6684. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  6685. # FIXME: Should let the user specify the lib program.
  6686. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
  6687. _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
  6688. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  6689. ;;
  6690. darwin* | rhapsody*)
  6691. _LT_DARWIN_LINKER_FEATURES($1)
  6692. ;;
  6693. dgux*)
  6694. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  6695. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6696. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6697. ;;
  6698. freebsd1*)
  6699. _LT_TAGVAR(ld_shlibs, $1)=no
  6700. ;;
  6701. # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  6702. # support. Future versions do this automatically, but an explicit c++rt0.o
  6703. # does not break anything, and helps significantly (at the cost of a little
  6704. # extra space).
  6705. freebsd2.2*)
  6706. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
  6707. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6708. _LT_TAGVAR(hardcode_direct, $1)=yes
  6709. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6710. ;;
  6711. # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  6712. freebsd2*)
  6713. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  6714. _LT_TAGVAR(hardcode_direct, $1)=yes
  6715. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  6716. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6717. ;;
  6718. # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  6719. freebsd* | dragonfly*)
  6720. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
  6721. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6722. _LT_TAGVAR(hardcode_direct, $1)=yes
  6723. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6724. ;;
  6725. hpux9*)
  6726. if test "$GCC" = yes; then
  6727. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  6728. else
  6729. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  6730. fi
  6731. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  6732. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6733. _LT_TAGVAR(hardcode_direct, $1)=yes
  6734. # hardcode_minus_L: Not really in the search PATH,
  6735. # but as the default location of the library.
  6736. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  6737. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  6738. ;;
  6739. hpux10*)
  6740. if test "$GCC" = yes -a "$with_gnu_ld" = no; then
  6741. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  6742. else
  6743. _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
  6744. fi
  6745. if test "$with_gnu_ld" = no; then
  6746. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  6747. _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
  6748. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6749. _LT_TAGVAR(hardcode_direct, $1)=yes
  6750. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6751. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  6752. # hardcode_minus_L: Not really in the search PATH,
  6753. # but as the default location of the library.
  6754. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  6755. fi
  6756. ;;
  6757. hpux11*)
  6758. if test "$GCC" = yes -a "$with_gnu_ld" = no; then
  6759. case $host_cpu in
  6760. hppa*64*)
  6761. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  6762. ;;
  6763. ia64*)
  6764. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  6765. ;;
  6766. *)
  6767. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  6768. ;;
  6769. esac
  6770. else
  6771. case $host_cpu in
  6772. hppa*64*)
  6773. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  6774. ;;
  6775. ia64*)
  6776. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  6777. ;;
  6778. *)
  6779. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  6780. ;;
  6781. esac
  6782. fi
  6783. if test "$with_gnu_ld" = no; then
  6784. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  6785. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6786. case $host_cpu in
  6787. hppa*64*|ia64*)
  6788. _LT_TAGVAR(hardcode_direct, $1)=no
  6789. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6790. ;;
  6791. *)
  6792. _LT_TAGVAR(hardcode_direct, $1)=yes
  6793. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6794. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  6795. # hardcode_minus_L: Not really in the search PATH,
  6796. # but as the default location of the library.
  6797. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  6798. ;;
  6799. esac
  6800. fi
  6801. ;;
  6802. irix5* | irix6* | nonstopux*)
  6803. if test "$GCC" = yes; then
  6804. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  6805. # Try to use the -exported_symbol ld option, if it does not
  6806. # work, assume that -exports_file does not work either and
  6807. # implicitly export all symbols.
  6808. save_LDFLAGS="$LDFLAGS"
  6809. LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
  6810. AC_LINK_IFELSE(int foo(void) {},
  6811. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
  6812. )
  6813. LDFLAGS="$save_LDFLAGS"
  6814. else
  6815. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
  6816. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
  6817. fi
  6818. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  6819. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6820. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6821. _LT_TAGVAR(inherit_rpath, $1)=yes
  6822. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6823. ;;
  6824. netbsd* | netbsdelf*-gnu)
  6825. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  6826. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
  6827. else
  6828. _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
  6829. fi
  6830. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6831. _LT_TAGVAR(hardcode_direct, $1)=yes
  6832. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6833. ;;
  6834. newsos6)
  6835. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  6836. _LT_TAGVAR(hardcode_direct, $1)=yes
  6837. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6838. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6839. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6840. ;;
  6841. *nto* | *qnx*)
  6842. ;;
  6843. openbsd*)
  6844. if test -f /usr/libexec/ld.so; then
  6845. _LT_TAGVAR(hardcode_direct, $1)=yes
  6846. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6847. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6848. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  6849. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  6850. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
  6851. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  6852. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  6853. else
  6854. case $host_os in
  6855. openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
  6856. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  6857. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6858. ;;
  6859. *)
  6860. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  6861. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  6862. ;;
  6863. esac
  6864. fi
  6865. else
  6866. _LT_TAGVAR(ld_shlibs, $1)=no
  6867. fi
  6868. ;;
  6869. os2*)
  6870. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6871. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  6872. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6873. _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
  6874. _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
  6875. ;;
  6876. osf3*)
  6877. if test "$GCC" = yes; then
  6878. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  6879. _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  6880. else
  6881. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  6882. _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
  6883. fi
  6884. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  6885. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6886. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6887. ;;
  6888. osf4* | osf5*) # as osf3* with the addition of -msym flag
  6889. if test "$GCC" = yes; then
  6890. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  6891. _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  6892. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6893. else
  6894. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  6895. _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
  6896. _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
  6897. $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
  6898. # Both c and cxx compiler support -rpath directly
  6899. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  6900. fi
  6901. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  6902. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6903. ;;
  6904. solaris*)
  6905. _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
  6906. if test "$GCC" = yes; then
  6907. wlarc='${wl}'
  6908. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  6909. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6910. $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
  6911. else
  6912. case `$CC -V 2>&1` in
  6913. *"Compilers 5.0"*)
  6914. wlarc=''
  6915. _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
  6916. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6917. $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
  6918. ;;
  6919. *)
  6920. wlarc='${wl}'
  6921. _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
  6922. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6923. $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
  6924. ;;
  6925. esac
  6926. fi
  6927. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6928. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6929. case $host_os in
  6930. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6931. *)
  6932. # The compiler driver will combine and reorder linker options,
  6933. # but understands `-z linker_flag'. GCC discards it without `$wl',
  6934. # but is careful enough not to reorder.
  6935. # Supported since Solaris 2.6 (maybe 2.5.1?)
  6936. if test "$GCC" = yes; then
  6937. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
  6938. else
  6939. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  6940. fi
  6941. ;;
  6942. esac
  6943. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6944. ;;
  6945. sunos4*)
  6946. if test "x$host_vendor" = xsequent; then
  6947. # Use $CC to link under sequent, because it throws in some extra .o
  6948. # files that make .init and .fini sections work.
  6949. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
  6950. else
  6951. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
  6952. fi
  6953. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6954. _LT_TAGVAR(hardcode_direct, $1)=yes
  6955. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  6956. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6957. ;;
  6958. sysv4)
  6959. case $host_vendor in
  6960. sni)
  6961. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  6962. _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
  6963. ;;
  6964. siemens)
  6965. ## LD is ld it makes a PLAMLIB
  6966. ## CC just makes a GrossModule.
  6967. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  6968. _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
  6969. _LT_TAGVAR(hardcode_direct, $1)=no
  6970. ;;
  6971. motorola)
  6972. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  6973. _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
  6974. ;;
  6975. esac
  6976. runpath_var='LD_RUN_PATH'
  6977. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6978. ;;
  6979. sysv4.3*)
  6980. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  6981. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6982. _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
  6983. ;;
  6984. sysv4*MP*)
  6985. if test -d /usr/nec; then
  6986. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  6987. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6988. runpath_var=LD_RUN_PATH
  6989. hardcode_runpath_var=yes
  6990. _LT_TAGVAR(ld_shlibs, $1)=yes
  6991. fi
  6992. ;;
  6993. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  6994. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  6995. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6996. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6997. runpath_var='LD_RUN_PATH'
  6998. if test "$GCC" = yes; then
  6999. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  7000. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  7001. else
  7002. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  7003. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  7004. fi
  7005. ;;
  7006. sysv5* | sco3.2v5* | sco5v6*)
  7007. # Note: We can NOT use -z defs as we might desire, because we do not
  7008. # link with -lc, and that would cause any symbols used from libc to
  7009. # always be unresolved, which means just about no library would
  7010. # ever link correctly. If we're not using GNU ld we use -z text
  7011. # though, which does catch some bad symbols but isn't as heavy-handed
  7012. # as -z defs.
  7013. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  7014. _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
  7015. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7016. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  7017. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
  7018. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  7019. _LT_TAGVAR(link_all_deplibs, $1)=yes
  7020. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  7021. runpath_var='LD_RUN_PATH'
  7022. if test "$GCC" = yes; then
  7023. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  7024. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  7025. else
  7026. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  7027. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  7028. fi
  7029. ;;
  7030. uts4*)
  7031. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  7032. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  7033. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  7034. ;;
  7035. *)
  7036. _LT_TAGVAR(ld_shlibs, $1)=no
  7037. ;;
  7038. esac
  7039. if test x$host_vendor = xsni; then
  7040. case $host in
  7041. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  7042. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
  7043. ;;
  7044. esac
  7045. fi
  7046. fi
  7047. ])
  7048. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  7049. test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  7050. _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
  7051. _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
  7052. _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
  7053. _LT_DECL([], [extract_expsyms_cmds], [2],
  7054. [The commands to extract the exported symbol list from a shared archive])
  7055. #
  7056. # Do we need to explicitly link libc?
  7057. #
  7058. case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
  7059. x|xyes)
  7060. # Assume -lc should be added
  7061. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  7062. if test "$enable_shared" = yes && test "$GCC" = yes; then
  7063. case $_LT_TAGVAR(archive_cmds, $1) in
  7064. *'~'*)
  7065. # FIXME: we may have to deal with multi-command sequences.
  7066. ;;
  7067. '$CC '*)
  7068. # Test whether the compiler implicitly links with -lc since on some
  7069. # systems, -lgcc has to come before -lc. If gcc already passes -lc
  7070. # to ld, don't add -lc before -lgcc.
  7071. AC_MSG_CHECKING([whether -lc should be explicitly linked in])
  7072. $RM conftest*
  7073. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  7074. if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
  7075. soname=conftest
  7076. lib=conftest
  7077. libobjs=conftest.$ac_objext
  7078. deplibs=
  7079. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
  7080. pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
  7081. compiler_flags=-v
  7082. linker_flags=-v
  7083. verstring=
  7084. output_objdir=.
  7085. libname=conftest
  7086. lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
  7087. _LT_TAGVAR(allow_undefined_flag, $1)=
  7088. if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
  7089. then
  7090. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7091. else
  7092. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  7093. fi
  7094. _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
  7095. else
  7096. cat conftest.err 1>&5
  7097. fi
  7098. $RM conftest*
  7099. AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
  7100. ;;
  7101. esac
  7102. fi
  7103. ;;
  7104. esac
  7105. _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
  7106. [Whether or not to add -lc for building shared libraries])
  7107. _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
  7108. [enable_shared_with_static_runtimes], [0],
  7109. [Whether or not to disallow shared libs when runtime libs are static])
  7110. _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
  7111. [Compiler flag to allow reflexive dlopens])
  7112. _LT_TAGDECL([], [whole_archive_flag_spec], [1],
  7113. [Compiler flag to generate shared objects directly from archives])
  7114. _LT_TAGDECL([], [compiler_needs_object], [1],
  7115. [Whether the compiler copes with passing no objects directly])
  7116. _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
  7117. [Create an old-style archive from a shared archive])
  7118. _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
  7119. [Create a temporary old-style archive to link instead of a shared archive])
  7120. _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
  7121. _LT_TAGDECL([], [archive_expsym_cmds], [2])
  7122. _LT_TAGDECL([], [module_cmds], [2],
  7123. [Commands used to build a loadable module if different from building
  7124. a shared archive.])
  7125. _LT_TAGDECL([], [module_expsym_cmds], [2])
  7126. _LT_TAGDECL([], [with_gnu_ld], [1],
  7127. [Whether we are building with GNU ld or not])
  7128. _LT_TAGDECL([], [allow_undefined_flag], [1],
  7129. [Flag that allows shared libraries with undefined symbols to be built])
  7130. _LT_TAGDECL([], [no_undefined_flag], [1],
  7131. [Flag that enforces no undefined symbols])
  7132. _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
  7133. [Flag to hardcode $libdir into a binary during linking.
  7134. This must work even if $libdir does not exist])
  7135. _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
  7136. [[If ld is used when linking, flag to hardcode $libdir into a binary
  7137. during linking. This must work even if $libdir does not exist]])
  7138. _LT_TAGDECL([], [hardcode_libdir_separator], [1],
  7139. [Whether we need a single "-rpath" flag with a separated argument])
  7140. _LT_TAGDECL([], [hardcode_direct], [0],
  7141. [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
  7142. DIR into the resulting binary])
  7143. _LT_TAGDECL([], [hardcode_direct_absolute], [0],
  7144. [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
  7145. DIR into the resulting binary and the resulting library dependency is
  7146. "absolute", i.e impossible to change by setting ${shlibpath_var} if the
  7147. library is relocated])
  7148. _LT_TAGDECL([], [hardcode_minus_L], [0],
  7149. [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
  7150. into the resulting binary])
  7151. _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
  7152. [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
  7153. into the resulting binary])
  7154. _LT_TAGDECL([], [hardcode_automatic], [0],
  7155. [Set to "yes" if building a shared library automatically hardcodes DIR
  7156. into the library and all subsequent libraries and executables linked
  7157. against it])
  7158. _LT_TAGDECL([], [inherit_rpath], [0],
  7159. [Set to yes if linker adds runtime paths of dependent libraries
  7160. to runtime path list])
  7161. _LT_TAGDECL([], [link_all_deplibs], [0],
  7162. [Whether libtool must link a program against all its dependency libraries])
  7163. _LT_TAGDECL([], [fix_srcfile_path], [1],
  7164. [Fix the shell variable $srcfile for the compiler])
  7165. _LT_TAGDECL([], [always_export_symbols], [0],
  7166. [Set to "yes" if exported symbols are required])
  7167. _LT_TAGDECL([], [export_symbols_cmds], [2],
  7168. [The commands to list exported symbols])
  7169. _LT_TAGDECL([], [exclude_expsyms], [1],
  7170. [Symbols that should not be listed in the preloaded symbols])
  7171. _LT_TAGDECL([], [include_expsyms], [1],
  7172. [Symbols that must always be exported])
  7173. _LT_TAGDECL([], [prelink_cmds], [2],
  7174. [Commands necessary for linking programs (against libraries) with templates])
  7175. _LT_TAGDECL([], [file_list_spec], [1],
  7176. [Specify filename containing input files])
  7177. dnl FIXME: Not yet implemented
  7178. dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
  7179. dnl [Compiler flag to generate thread safe objects])
  7180. ])# _LT_LINKER_SHLIBS
  7181. # _LT_LANG_C_CONFIG([TAG])
  7182. # ------------------------
  7183. # Ensure that the configuration variables for a C compiler are suitably
  7184. # defined. These variables are subsequently used by _LT_CONFIG to write
  7185. # the compiler configuration to `libtool'.
  7186. m4_defun([_LT_LANG_C_CONFIG],
  7187. [m4_require([_LT_DECL_EGREP])dnl
  7188. lt_save_CC="$CC"
  7189. AC_LANG_PUSH(C)
  7190. # Source file extension for C test sources.
  7191. ac_ext=c
  7192. # Object file extension for compiled C test sources.
  7193. objext=o
  7194. _LT_TAGVAR(objext, $1)=$objext
  7195. # Code to be used in simple compile tests
  7196. lt_simple_compile_test_code="int some_variable = 0;"
  7197. # Code to be used in simple link tests
  7198. lt_simple_link_test_code='int main(){return(0);}'
  7199. _LT_TAG_COMPILER
  7200. # Save the default compiler, since it gets overwritten when the other
  7201. # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
  7202. compiler_DEFAULT=$CC
  7203. # save warnings/boilerplate of simple test code
  7204. _LT_COMPILER_BOILERPLATE
  7205. _LT_LINKER_BOILERPLATE
  7206. ## CAVEAT EMPTOR:
  7207. ## There is no encapsulation within the following macros, do not change
  7208. ## the running order or otherwise move them around unless you know exactly
  7209. ## what you are doing...
  7210. if test -n "$compiler"; then
  7211. _LT_COMPILER_NO_RTTI($1)
  7212. _LT_COMPILER_PIC($1)
  7213. _LT_COMPILER_C_O($1)
  7214. _LT_COMPILER_FILE_LOCKS($1)
  7215. _LT_LINKER_SHLIBS($1)
  7216. _LT_SYS_DYNAMIC_LINKER($1)
  7217. _LT_LINKER_HARDCODE_LIBPATH($1)
  7218. LT_SYS_DLOPEN_SELF
  7219. _LT_CMD_STRIPLIB
  7220. # Report which library types will actually be built
  7221. AC_MSG_CHECKING([if libtool supports shared libraries])
  7222. AC_MSG_RESULT([$can_build_shared])
  7223. AC_MSG_CHECKING([whether to build shared libraries])
  7224. test "$can_build_shared" = "no" && enable_shared=no
  7225. # On AIX, shared libraries and static libraries use the same namespace, and
  7226. # are all built from PIC.
  7227. case $host_os in
  7228. aix3*)
  7229. test "$enable_shared" = yes && enable_static=no
  7230. if test -n "$RANLIB"; then
  7231. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  7232. postinstall_cmds='$RANLIB $lib'
  7233. fi
  7234. ;;
  7235. aix[[4-9]]*)
  7236. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  7237. test "$enable_shared" = yes && enable_static=no
  7238. fi
  7239. ;;
  7240. esac
  7241. AC_MSG_RESULT([$enable_shared])
  7242. AC_MSG_CHECKING([whether to build static libraries])
  7243. # Make sure either enable_shared or enable_static is yes.
  7244. test "$enable_shared" = yes || enable_static=yes
  7245. AC_MSG_RESULT([$enable_static])
  7246. _LT_CONFIG($1)
  7247. fi
  7248. AC_LANG_POP
  7249. CC="$lt_save_CC"
  7250. ])# _LT_LANG_C_CONFIG
  7251. # _LT_PROG_CXX
  7252. # ------------
  7253. # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
  7254. # compiler, we have our own version here.
  7255. m4_defun([_LT_PROG_CXX],
  7256. [
  7257. pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
  7258. AC_PROG_CXX
  7259. if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
  7260. ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
  7261. (test "X$CXX" != "Xg++"))) ; then
  7262. AC_PROG_CXXCPP
  7263. else
  7264. _lt_caught_CXX_error=yes
  7265. fi
  7266. popdef([AC_MSG_ERROR])
  7267. ])# _LT_PROG_CXX
  7268. dnl aclocal-1.4 backwards compatibility:
  7269. dnl AC_DEFUN([_LT_PROG_CXX], [])
  7270. # _LT_LANG_CXX_CONFIG([TAG])
  7271. # --------------------------
  7272. # Ensure that the configuration variables for a C++ compiler are suitably
  7273. # defined. These variables are subsequently used by _LT_CONFIG to write
  7274. # the compiler configuration to `libtool'.
  7275. m4_defun([_LT_LANG_CXX_CONFIG],
  7276. [AC_REQUIRE([_LT_PROG_CXX])dnl
  7277. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  7278. m4_require([_LT_DECL_EGREP])dnl
  7279. AC_LANG_PUSH(C++)
  7280. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7281. _LT_TAGVAR(allow_undefined_flag, $1)=
  7282. _LT_TAGVAR(always_export_symbols, $1)=no
  7283. _LT_TAGVAR(archive_expsym_cmds, $1)=
  7284. _LT_TAGVAR(compiler_needs_object, $1)=no
  7285. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  7286. _LT_TAGVAR(hardcode_direct, $1)=no
  7287. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  7288. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  7289. _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  7290. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  7291. _LT_TAGVAR(hardcode_minus_L, $1)=no
  7292. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  7293. _LT_TAGVAR(hardcode_automatic, $1)=no
  7294. _LT_TAGVAR(inherit_rpath, $1)=no
  7295. _LT_TAGVAR(module_cmds, $1)=
  7296. _LT_TAGVAR(module_expsym_cmds, $1)=
  7297. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  7298. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7299. _LT_TAGVAR(no_undefined_flag, $1)=
  7300. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  7301. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  7302. # Source file extension for C++ test sources.
  7303. ac_ext=cpp
  7304. # Object file extension for compiled C++ test sources.
  7305. objext=o
  7306. _LT_TAGVAR(objext, $1)=$objext
  7307. # No sense in running all these tests if we already determined that
  7308. # the CXX compiler isn't working. Some variables (like enable_shared)
  7309. # are currently assumed to apply to all compilers on this platform,
  7310. # and will be corrupted by setting them based on a non-working compiler.
  7311. if test "$_lt_caught_CXX_error" != yes; then
  7312. # Code to be used in simple compile tests
  7313. lt_simple_compile_test_code="int some_variable = 0;"
  7314. # Code to be used in simple link tests
  7315. lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
  7316. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7317. _LT_TAG_COMPILER
  7318. # save warnings/boilerplate of simple test code
  7319. _LT_COMPILER_BOILERPLATE
  7320. _LT_LINKER_BOILERPLATE
  7321. # Allow CC to be a program name with arguments.
  7322. lt_save_CC=$CC
  7323. lt_save_LD=$LD
  7324. lt_save_GCC=$GCC
  7325. GCC=$GXX
  7326. lt_save_with_gnu_ld=$with_gnu_ld
  7327. lt_save_path_LD=$lt_cv_path_LD
  7328. if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
  7329. lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
  7330. else
  7331. $as_unset lt_cv_prog_gnu_ld
  7332. fi
  7333. if test -n "${lt_cv_path_LDCXX+set}"; then
  7334. lt_cv_path_LD=$lt_cv_path_LDCXX
  7335. else
  7336. $as_unset lt_cv_path_LD
  7337. fi
  7338. test -z "${LDCXX+set}" || LD=$LDCXX
  7339. CC=${CXX-"c++"}
  7340. compiler=$CC
  7341. _LT_TAGVAR(compiler, $1)=$CC
  7342. _LT_CC_BASENAME([$compiler])
  7343. if test -n "$compiler"; then
  7344. # We don't want -fno-exception when compiling C++ code, so set the
  7345. # no_builtin_flag separately
  7346. if test "$GXX" = yes; then
  7347. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  7348. else
  7349. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  7350. fi
  7351. if test "$GXX" = yes; then
  7352. # Set up default GNU C++ configuration
  7353. LT_PATH_LD
  7354. # Check if GNU C++ uses GNU ld as the underlying linker, since the
  7355. # archiving commands below assume that GNU ld is being used.
  7356. if test "$with_gnu_ld" = yes; then
  7357. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  7358. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  7359. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  7360. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  7361. # If archive_cmds runs LD, not CC, wlarc should be empty
  7362. # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
  7363. # investigate it a little bit more. (MM)
  7364. wlarc='${wl}'
  7365. # ancient GNU ld didn't support --whole-archive et. al.
  7366. if eval "`$CC -print-prog-name=ld` --help 2>&1" |
  7367. $GREP 'no-whole-archive' > /dev/null; then
  7368. _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  7369. else
  7370. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  7371. fi
  7372. else
  7373. with_gnu_ld=no
  7374. wlarc=
  7375. # A generic and very simple default shared library creation
  7376. # command for GNU C++ for the case where it uses the native
  7377. # linker, instead of GNU ld. If possible, this setting should
  7378. # overridden to take advantage of the native linker features on
  7379. # the platform it is being used on.
  7380. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  7381. fi
  7382. # Commands to make compiler produce verbose output that lists
  7383. # what "hidden" libraries, object files and flags are used when
  7384. # linking a shared library.
  7385. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
  7386. else
  7387. GXX=no
  7388. with_gnu_ld=no
  7389. wlarc=
  7390. fi
  7391. # PORTME: fill in a description of your system's C++ link characteristics
  7392. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  7393. _LT_TAGVAR(ld_shlibs, $1)=yes
  7394. case $host_os in
  7395. aix3*)
  7396. # FIXME: insert proper C++ library support
  7397. _LT_TAGVAR(ld_shlibs, $1)=no
  7398. ;;
  7399. aix[[4-9]]*)
  7400. if test "$host_cpu" = ia64; then
  7401. # On IA64, the linker does run time linking by default, so we don't
  7402. # have to do anything special.
  7403. aix_use_runtimelinking=no
  7404. exp_sym_flag='-Bexport'
  7405. no_entry_flag=""
  7406. else
  7407. aix_use_runtimelinking=no
  7408. # Test if we are trying to use run time linking or normal
  7409. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  7410. # need to do runtime linking.
  7411. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  7412. for ld_flag in $LDFLAGS; do
  7413. case $ld_flag in
  7414. *-brtl*)
  7415. aix_use_runtimelinking=yes
  7416. break
  7417. ;;
  7418. esac
  7419. done
  7420. ;;
  7421. esac
  7422. exp_sym_flag='-bexport'
  7423. no_entry_flag='-bnoentry'
  7424. fi
  7425. # When large executables or shared objects are built, AIX ld can
  7426. # have problems creating the table of contents. If linking a library
  7427. # or program results in "error TOC overflow" add -mminimal-toc to
  7428. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  7429. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  7430. _LT_TAGVAR(archive_cmds, $1)=''
  7431. _LT_TAGVAR(hardcode_direct, $1)=yes
  7432. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  7433. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  7434. _LT_TAGVAR(link_all_deplibs, $1)=yes
  7435. _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
  7436. if test "$GXX" = yes; then
  7437. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  7438. # We only want to do this on AIX 4.2 and lower, the check
  7439. # below for broken collect2 doesn't work under 4.3+
  7440. collect2name=`${CC} -print-prog-name=collect2`
  7441. if test -f "$collect2name" &&
  7442. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  7443. then
  7444. # We have reworked collect2
  7445. :
  7446. else
  7447. # We have old collect2
  7448. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  7449. # It fails to find uninstalled libraries when the uninstalled
  7450. # path is not listed in the libpath. Setting hardcode_minus_L
  7451. # to unsupported forces relinking
  7452. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  7453. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  7454. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  7455. fi
  7456. esac
  7457. shared_flag='-shared'
  7458. if test "$aix_use_runtimelinking" = yes; then
  7459. shared_flag="$shared_flag "'${wl}-G'
  7460. fi
  7461. else
  7462. # not using gcc
  7463. if test "$host_cpu" = ia64; then
  7464. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  7465. # chokes on -Wl,-G. The following line is correct:
  7466. shared_flag='-G'
  7467. else
  7468. if test "$aix_use_runtimelinking" = yes; then
  7469. shared_flag='${wl}-G'
  7470. else
  7471. shared_flag='${wl}-bM:SRE'
  7472. fi
  7473. fi
  7474. fi
  7475. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
  7476. # It seems that -bexpall does not export symbols beginning with
  7477. # underscore (_), so it is better to generate a list of symbols to
  7478. # export.
  7479. _LT_TAGVAR(always_export_symbols, $1)=yes
  7480. if test "$aix_use_runtimelinking" = yes; then
  7481. # Warning - without using the other runtime loading flags (-brtl),
  7482. # -berok will link without error, but may produce a broken library.
  7483. _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
  7484. # Determine the default libpath from the value encoded in an empty
  7485. # executable.
  7486. _LT_SYS_MODULE_PATH_AIX
  7487. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  7488. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
  7489. else
  7490. if test "$host_cpu" = ia64; then
  7491. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  7492. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  7493. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
  7494. else
  7495. # Determine the default libpath from the value encoded in an
  7496. # empty executable.
  7497. _LT_SYS_MODULE_PATH_AIX
  7498. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  7499. # Warning - without using the other run time loading flags,
  7500. # -berok will link without error, but may produce a broken library.
  7501. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  7502. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  7503. # Exported symbols can be pulled into shared objects from archives
  7504. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  7505. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  7506. # This is similar to how AIX traditionally builds its shared
  7507. # libraries.
  7508. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
  7509. fi
  7510. fi
  7511. ;;
  7512. beos*)
  7513. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  7514. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  7515. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  7516. # support --undefined. This deserves some investigation. FIXME
  7517. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  7518. else
  7519. _LT_TAGVAR(ld_shlibs, $1)=no
  7520. fi
  7521. ;;
  7522. chorus*)
  7523. case $cc_basename in
  7524. *)
  7525. # FIXME: insert proper C++ library support
  7526. _LT_TAGVAR(ld_shlibs, $1)=no
  7527. ;;
  7528. esac
  7529. ;;
  7530. cygwin* | mingw* | pw32* | cegcc*)
  7531. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  7532. # as there is no search path for DLLs.
  7533. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  7534. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  7535. _LT_TAGVAR(always_export_symbols, $1)=no
  7536. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  7537. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  7538. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  7539. # If the export-symbols file already is a .def file (1st line
  7540. # is EXPORTS), use it as is; otherwise, prepend...
  7541. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  7542. cp $export_symbols $output_objdir/$soname.def;
  7543. else
  7544. echo EXPORTS > $output_objdir/$soname.def;
  7545. cat $export_symbols >> $output_objdir/$soname.def;
  7546. fi~
  7547. $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  7548. else
  7549. _LT_TAGVAR(ld_shlibs, $1)=no
  7550. fi
  7551. ;;
  7552. darwin* | rhapsody*)
  7553. _LT_DARWIN_LINKER_FEATURES($1)
  7554. ;;
  7555. dgux*)
  7556. case $cc_basename in
  7557. ec++*)
  7558. # FIXME: insert proper C++ library support
  7559. _LT_TAGVAR(ld_shlibs, $1)=no
  7560. ;;
  7561. ghcx*)
  7562. # Green Hills C++ Compiler
  7563. # FIXME: insert proper C++ library support
  7564. _LT_TAGVAR(ld_shlibs, $1)=no
  7565. ;;
  7566. *)
  7567. # FIXME: insert proper C++ library support
  7568. _LT_TAGVAR(ld_shlibs, $1)=no
  7569. ;;
  7570. esac
  7571. ;;
  7572. freebsd[[12]]*)
  7573. # C++ shared libraries reported to be fairly broken before
  7574. # switch to ELF
  7575. _LT_TAGVAR(ld_shlibs, $1)=no
  7576. ;;
  7577. freebsd-elf*)
  7578. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7579. ;;
  7580. freebsd* | dragonfly*)
  7581. # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
  7582. # conventions
  7583. _LT_TAGVAR(ld_shlibs, $1)=yes
  7584. ;;
  7585. gnu*)
  7586. ;;
  7587. hpux9*)
  7588. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  7589. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  7590. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  7591. _LT_TAGVAR(hardcode_direct, $1)=yes
  7592. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  7593. # but as the default
  7594. # location of the library.
  7595. case $cc_basename in
  7596. CC*)
  7597. # FIXME: insert proper C++ library support
  7598. _LT_TAGVAR(ld_shlibs, $1)=no
  7599. ;;
  7600. aCC*)
  7601. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  7602. # Commands to make compiler produce verbose output that lists
  7603. # what "hidden" libraries, object files and flags are used when
  7604. # linking a shared library.
  7605. #
  7606. # There doesn't appear to be a way to prevent this compiler from
  7607. # explicitly linking system object files so we need to strip them
  7608. # from the output so that they don't get included in the library
  7609. # dependencies.
  7610. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
  7611. ;;
  7612. *)
  7613. if test "$GXX" = yes; then
  7614. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  7615. else
  7616. # FIXME: insert proper C++ library support
  7617. _LT_TAGVAR(ld_shlibs, $1)=no
  7618. fi
  7619. ;;
  7620. esac
  7621. ;;
  7622. hpux10*|hpux11*)
  7623. if test $with_gnu_ld = no; then
  7624. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  7625. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  7626. case $host_cpu in
  7627. hppa*64*|ia64*)
  7628. ;;
  7629. *)
  7630. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  7631. ;;
  7632. esac
  7633. fi
  7634. case $host_cpu in
  7635. hppa*64*|ia64*)
  7636. _LT_TAGVAR(hardcode_direct, $1)=no
  7637. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  7638. ;;
  7639. *)
  7640. _LT_TAGVAR(hardcode_direct, $1)=yes
  7641. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  7642. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  7643. # but as the default
  7644. # location of the library.
  7645. ;;
  7646. esac
  7647. case $cc_basename in
  7648. CC*)
  7649. # FIXME: insert proper C++ library support
  7650. _LT_TAGVAR(ld_shlibs, $1)=no
  7651. ;;
  7652. aCC*)
  7653. case $host_cpu in
  7654. hppa*64*)
  7655. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  7656. ;;
  7657. ia64*)
  7658. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  7659. ;;
  7660. *)
  7661. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  7662. ;;
  7663. esac
  7664. # Commands to make compiler produce verbose output that lists
  7665. # what "hidden" libraries, object files and flags are used when
  7666. # linking a shared library.
  7667. #
  7668. # There doesn't appear to be a way to prevent this compiler from
  7669. # explicitly linking system object files so we need to strip them
  7670. # from the output so that they don't get included in the library
  7671. # dependencies.
  7672. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
  7673. ;;
  7674. *)
  7675. if test "$GXX" = yes; then
  7676. if test $with_gnu_ld = no; then
  7677. case $host_cpu in
  7678. hppa*64*)
  7679. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  7680. ;;
  7681. ia64*)
  7682. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  7683. ;;
  7684. *)
  7685. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  7686. ;;
  7687. esac
  7688. fi
  7689. else
  7690. # FIXME: insert proper C++ library support
  7691. _LT_TAGVAR(ld_shlibs, $1)=no
  7692. fi
  7693. ;;
  7694. esac
  7695. ;;
  7696. interix[[3-9]]*)
  7697. _LT_TAGVAR(hardcode_direct, $1)=no
  7698. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  7699. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  7700. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  7701. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  7702. # Instead, shared libraries are loaded at an image base (0x10000000 by
  7703. # default) and relocated if they conflict, which is a slow very memory
  7704. # consuming and fragmenting process. To avoid this, we pick a random,
  7705. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  7706. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  7707. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
  7708. _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
  7709. ;;
  7710. irix5* | irix6*)
  7711. case $cc_basename in
  7712. CC*)
  7713. # SGI C++
  7714. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
  7715. # Archives containing C++ object files must be created using
  7716. # "CC -ar", where "CC" is the IRIX C++ compiler. This is
  7717. # necessary to make sure instantiated templates are included
  7718. # in the archive.
  7719. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
  7720. ;;
  7721. *)
  7722. if test "$GXX" = yes; then
  7723. if test "$with_gnu_ld" = no; then
  7724. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  7725. else
  7726. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
  7727. fi
  7728. fi
  7729. _LT_TAGVAR(link_all_deplibs, $1)=yes
  7730. ;;
  7731. esac
  7732. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  7733. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  7734. _LT_TAGVAR(inherit_rpath, $1)=yes
  7735. ;;
  7736. linux* | k*bsd*-gnu | kopensolaris*-gnu)
  7737. case $cc_basename in
  7738. KCC*)
  7739. # Kuck and Associates, Inc. (KAI) C++ Compiler
  7740. # KCC will only create a shared library if the output file
  7741. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  7742. # to its proper name (with version) after linking.
  7743. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
  7744. _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
  7745. # Commands to make compiler produce verbose output that lists
  7746. # what "hidden" libraries, object files and flags are used when
  7747. # linking a shared library.
  7748. #
  7749. # There doesn't appear to be a way to prevent this compiler from
  7750. # explicitly linking system object files so we need to strip them
  7751. # from the output so that they don't get included in the library
  7752. # dependencies.
  7753. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
  7754. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  7755. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  7756. # Archives containing C++ object files must be created using
  7757. # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  7758. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  7759. ;;
  7760. icpc* | ecpc* )
  7761. # Intel C++
  7762. with_gnu_ld=yes
  7763. # version 8.0 and above of icpc choke on multiply defined symbols
  7764. # if we add $predep_objects and $postdep_objects, however 7.1 and
  7765. # earlier do not add the objects themselves.
  7766. case `$CC -V 2>&1` in
  7767. *"Version 7."*)
  7768. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  7769. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  7770. ;;
  7771. *) # Version 8.0 or newer
  7772. tmp_idyn=
  7773. case $host_cpu in
  7774. ia64*) tmp_idyn=' -i_dynamic';;
  7775. esac
  7776. _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  7777. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  7778. ;;
  7779. esac
  7780. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7781. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  7782. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  7783. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  7784. ;;
  7785. pgCC* | pgcpp*)
  7786. # Portland Group C++ compiler
  7787. case `$CC -V` in
  7788. *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
  7789. _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
  7790. rm -rf $tpldir~
  7791. $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
  7792. compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
  7793. _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
  7794. rm -rf $tpldir~
  7795. $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
  7796. $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
  7797. $RANLIB $oldlib'
  7798. _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
  7799. rm -rf $tpldir~
  7800. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  7801. $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
  7802. _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
  7803. rm -rf $tpldir~
  7804. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  7805. $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
  7806. ;;
  7807. *) # Version 6 will use weak symbols
  7808. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
  7809. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
  7810. ;;
  7811. esac
  7812. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
  7813. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  7814. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
  7815. ;;
  7816. cxx*)
  7817. # Compaq C++
  7818. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  7819. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
  7820. runpath_var=LD_RUN_PATH
  7821. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  7822. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  7823. # Commands to make compiler produce verbose output that lists
  7824. # what "hidden" libraries, object files and flags are used when
  7825. # linking a shared library.
  7826. #
  7827. # There doesn't appear to be a way to prevent this compiler from
  7828. # explicitly linking system object files so we need to strip them
  7829. # from the output so that they don't get included in the library
  7830. # dependencies.
  7831. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
  7832. ;;
  7833. xl*)
  7834. # IBM XL 8.0 on PPC, with GNU ld
  7835. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  7836. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  7837. _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  7838. if test "x$supports_anon_versioning" = xyes; then
  7839. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  7840. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  7841. echo "local: *; };" >> $output_objdir/$libname.ver~
  7842. $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  7843. fi
  7844. ;;
  7845. *)
  7846. case `$CC -V 2>&1 | sed 5q` in
  7847. *Sun\ C*)
  7848. # Sun C++ 5.9
  7849. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  7850. _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  7851. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
  7852. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  7853. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
  7854. _LT_TAGVAR(compiler_needs_object, $1)=yes
  7855. # Not sure whether something based on
  7856. # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
  7857. # would be better.
  7858. output_verbose_link_cmd='echo'
  7859. # Archives containing C++ object files must be created using
  7860. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  7861. # necessary to make sure instantiated templates are included
  7862. # in the archive.
  7863. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  7864. ;;
  7865. esac
  7866. ;;
  7867. esac
  7868. ;;
  7869. lynxos*)
  7870. # FIXME: insert proper C++ library support
  7871. _LT_TAGVAR(ld_shlibs, $1)=no
  7872. ;;
  7873. m88k*)
  7874. # FIXME: insert proper C++ library support
  7875. _LT_TAGVAR(ld_shlibs, $1)=no
  7876. ;;
  7877. mvs*)
  7878. case $cc_basename in
  7879. cxx*)
  7880. # FIXME: insert proper C++ library support
  7881. _LT_TAGVAR(ld_shlibs, $1)=no
  7882. ;;
  7883. *)
  7884. # FIXME: insert proper C++ library support
  7885. _LT_TAGVAR(ld_shlibs, $1)=no
  7886. ;;
  7887. esac
  7888. ;;
  7889. netbsd*)
  7890. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  7891. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
  7892. wlarc=
  7893. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  7894. _LT_TAGVAR(hardcode_direct, $1)=yes
  7895. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  7896. fi
  7897. # Workaround some broken pre-1.5 toolchains
  7898. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
  7899. ;;
  7900. *nto* | *qnx*)
  7901. _LT_TAGVAR(ld_shlibs, $1)=yes
  7902. ;;
  7903. openbsd2*)
  7904. # C++ shared libraries are fairly broken
  7905. _LT_TAGVAR(ld_shlibs, $1)=no
  7906. ;;
  7907. openbsd*)
  7908. if test -f /usr/libexec/ld.so; then
  7909. _LT_TAGVAR(hardcode_direct, $1)=yes
  7910. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  7911. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  7912. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  7913. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  7914. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  7915. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
  7916. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  7917. _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  7918. fi
  7919. output_verbose_link_cmd=echo
  7920. else
  7921. _LT_TAGVAR(ld_shlibs, $1)=no
  7922. fi
  7923. ;;
  7924. osf3* | osf4* | osf5*)
  7925. case $cc_basename in
  7926. KCC*)
  7927. # Kuck and Associates, Inc. (KAI) C++ Compiler
  7928. # KCC will only create a shared library if the output file
  7929. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  7930. # to its proper name (with version) after linking.
  7931. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
  7932. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  7933. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  7934. # Archives containing C++ object files must be created using
  7935. # the KAI C++ compiler.
  7936. case $host in
  7937. osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
  7938. *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
  7939. esac
  7940. ;;
  7941. RCC*)
  7942. # Rational C++ 2.4.1
  7943. # FIXME: insert proper C++ library support
  7944. _LT_TAGVAR(ld_shlibs, $1)=no
  7945. ;;
  7946. cxx*)
  7947. case $host in
  7948. osf3*)
  7949. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  7950. _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
  7951. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  7952. ;;
  7953. *)
  7954. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  7955. _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
  7956. _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
  7957. echo "-hidden">> $lib.exp~
  7958. $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
  7959. $RM $lib.exp'
  7960. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  7961. ;;
  7962. esac
  7963. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  7964. # Commands to make compiler produce verbose output that lists
  7965. # what "hidden" libraries, object files and flags are used when
  7966. # linking a shared library.
  7967. #
  7968. # There doesn't appear to be a way to prevent this compiler from
  7969. # explicitly linking system object files so we need to strip them
  7970. # from the output so that they don't get included in the library
  7971. # dependencies.
  7972. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
  7973. ;;
  7974. *)
  7975. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  7976. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  7977. case $host in
  7978. osf3*)
  7979. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  7980. ;;
  7981. *)
  7982. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  7983. ;;
  7984. esac
  7985. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  7986. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  7987. # Commands to make compiler produce verbose output that lists
  7988. # what "hidden" libraries, object files and flags are used when
  7989. # linking a shared library.
  7990. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
  7991. else
  7992. # FIXME: insert proper C++ library support
  7993. _LT_TAGVAR(ld_shlibs, $1)=no
  7994. fi
  7995. ;;
  7996. esac
  7997. ;;
  7998. psos*)
  7999. # FIXME: insert proper C++ library support
  8000. _LT_TAGVAR(ld_shlibs, $1)=no
  8001. ;;
  8002. sunos4*)
  8003. case $cc_basename in
  8004. CC*)
  8005. # Sun C++ 4.x
  8006. # FIXME: insert proper C++ library support
  8007. _LT_TAGVAR(ld_shlibs, $1)=no
  8008. ;;
  8009. lcc*)
  8010. # Lucid
  8011. # FIXME: insert proper C++ library support
  8012. _LT_TAGVAR(ld_shlibs, $1)=no
  8013. ;;
  8014. *)
  8015. # FIXME: insert proper C++ library support
  8016. _LT_TAGVAR(ld_shlibs, $1)=no
  8017. ;;
  8018. esac
  8019. ;;
  8020. solaris*)
  8021. case $cc_basename in
  8022. CC*)
  8023. # Sun C++ 4.2, 5.x and Centerline C++
  8024. _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
  8025. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  8026. _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  8027. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  8028. $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  8029. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  8030. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  8031. case $host_os in
  8032. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  8033. *)
  8034. # The compiler driver will combine and reorder linker options,
  8035. # but understands `-z linker_flag'.
  8036. # Supported since Solaris 2.6 (maybe 2.5.1?)
  8037. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  8038. ;;
  8039. esac
  8040. _LT_TAGVAR(link_all_deplibs, $1)=yes
  8041. output_verbose_link_cmd='echo'
  8042. # Archives containing C++ object files must be created using
  8043. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  8044. # necessary to make sure instantiated templates are included
  8045. # in the archive.
  8046. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  8047. ;;
  8048. gcx*)
  8049. # Green Hills C++ Compiler
  8050. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  8051. # The C++ compiler must be used to create the archive.
  8052. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
  8053. ;;
  8054. *)
  8055. # GNU C++ compiler with Solaris linker
  8056. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  8057. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
  8058. if $CC --version | $GREP -v '^2\.7' > /dev/null; then
  8059. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  8060. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  8061. $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  8062. # Commands to make compiler produce verbose output that lists
  8063. # what "hidden" libraries, object files and flags are used when
  8064. # linking a shared library.
  8065. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
  8066. else
  8067. # g++ 2.7 appears to require `-G' NOT `-shared' on this
  8068. # platform.
  8069. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  8070. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  8071. $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  8072. # Commands to make compiler produce verbose output that lists
  8073. # what "hidden" libraries, object files and flags are used when
  8074. # linking a shared library.
  8075. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
  8076. fi
  8077. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
  8078. case $host_os in
  8079. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  8080. *)
  8081. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
  8082. ;;
  8083. esac
  8084. fi
  8085. ;;
  8086. esac
  8087. ;;
  8088. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  8089. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  8090. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  8091. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  8092. runpath_var='LD_RUN_PATH'
  8093. case $cc_basename in
  8094. CC*)
  8095. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  8096. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  8097. ;;
  8098. *)
  8099. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  8100. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  8101. ;;
  8102. esac
  8103. ;;
  8104. sysv5* | sco3.2v5* | sco5v6*)
  8105. # Note: We can NOT use -z defs as we might desire, because we do not
  8106. # link with -lc, and that would cause any symbols used from libc to
  8107. # always be unresolved, which means just about no library would
  8108. # ever link correctly. If we're not using GNU ld we use -z text
  8109. # though, which does catch some bad symbols but isn't as heavy-handed
  8110. # as -z defs.
  8111. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  8112. _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
  8113. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  8114. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  8115. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
  8116. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  8117. _LT_TAGVAR(link_all_deplibs, $1)=yes
  8118. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  8119. runpath_var='LD_RUN_PATH'
  8120. case $cc_basename in
  8121. CC*)
  8122. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  8123. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  8124. ;;
  8125. *)
  8126. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  8127. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  8128. ;;
  8129. esac
  8130. ;;
  8131. tandem*)
  8132. case $cc_basename in
  8133. NCC*)
  8134. # NonStop-UX NCC 3.20
  8135. # FIXME: insert proper C++ library support
  8136. _LT_TAGVAR(ld_shlibs, $1)=no
  8137. ;;
  8138. *)
  8139. # FIXME: insert proper C++ library support
  8140. _LT_TAGVAR(ld_shlibs, $1)=no
  8141. ;;
  8142. esac
  8143. ;;
  8144. vxworks*)
  8145. # FIXME: insert proper C++ library support
  8146. _LT_TAGVAR(ld_shlibs, $1)=no
  8147. ;;
  8148. *)
  8149. # FIXME: insert proper C++ library support
  8150. _LT_TAGVAR(ld_shlibs, $1)=no
  8151. ;;
  8152. esac
  8153. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  8154. test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  8155. _LT_TAGVAR(GCC, $1)="$GXX"
  8156. _LT_TAGVAR(LD, $1)="$LD"
  8157. ## CAVEAT EMPTOR:
  8158. ## There is no encapsulation within the following macros, do not change
  8159. ## the running order or otherwise move them around unless you know exactly
  8160. ## what you are doing...
  8161. _LT_SYS_HIDDEN_LIBDEPS($1)
  8162. _LT_COMPILER_PIC($1)
  8163. _LT_COMPILER_C_O($1)
  8164. _LT_COMPILER_FILE_LOCKS($1)
  8165. _LT_LINKER_SHLIBS($1)
  8166. _LT_SYS_DYNAMIC_LINKER($1)
  8167. _LT_LINKER_HARDCODE_LIBPATH($1)
  8168. _LT_CONFIG($1)
  8169. fi # test -n "$compiler"
  8170. CC=$lt_save_CC
  8171. LDCXX=$LD
  8172. LD=$lt_save_LD
  8173. GCC=$lt_save_GCC
  8174. with_gnu_ld=$lt_save_with_gnu_ld
  8175. lt_cv_path_LDCXX=$lt_cv_path_LD
  8176. lt_cv_path_LD=$lt_save_path_LD
  8177. lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
  8178. lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
  8179. fi # test "$_lt_caught_CXX_error" != yes
  8180. AC_LANG_POP
  8181. ])# _LT_LANG_CXX_CONFIG
  8182. # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
  8183. # ---------------------------------
  8184. # Figure out "hidden" library dependencies from verbose
  8185. # compiler output when linking a shared library.
  8186. # Parse the compiler output and extract the necessary
  8187. # objects, libraries and library flags.
  8188. m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
  8189. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  8190. # Dependencies to place before and after the object being linked:
  8191. _LT_TAGVAR(predep_objects, $1)=
  8192. _LT_TAGVAR(postdep_objects, $1)=
  8193. _LT_TAGVAR(predeps, $1)=
  8194. _LT_TAGVAR(postdeps, $1)=
  8195. _LT_TAGVAR(compiler_lib_search_path, $1)=
  8196. dnl we can't use the lt_simple_compile_test_code here,
  8197. dnl because it contains code intended for an executable,
  8198. dnl not a library. It's possible we should let each
  8199. dnl tag define a new lt_????_link_test_code variable,
  8200. dnl but it's only used here...
  8201. m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
  8202. int a;
  8203. void foo (void) { a = 0; }
  8204. _LT_EOF
  8205. ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
  8206. class Foo
  8207. {
  8208. public:
  8209. Foo (void) { a = 0; }
  8210. private:
  8211. int a;
  8212. };
  8213. _LT_EOF
  8214. ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
  8215. subroutine foo
  8216. implicit none
  8217. integer*4 a
  8218. a=0
  8219. return
  8220. end
  8221. _LT_EOF
  8222. ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
  8223. subroutine foo
  8224. implicit none
  8225. integer a
  8226. a=0
  8227. return
  8228. end
  8229. _LT_EOF
  8230. ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
  8231. public class foo {
  8232. private int a;
  8233. public void bar (void) {
  8234. a = 0;
  8235. }
  8236. };
  8237. _LT_EOF
  8238. ])
  8239. dnl Parse the compiler output and extract the necessary
  8240. dnl objects, libraries and library flags.
  8241. if AC_TRY_EVAL(ac_compile); then
  8242. # Parse the compiler output and extract the necessary
  8243. # objects, libraries and library flags.
  8244. # Sentinel used to keep track of whether or not we are before
  8245. # the conftest object file.
  8246. pre_test_object_deps_done=no
  8247. for p in `eval "$output_verbose_link_cmd"`; do
  8248. case $p in
  8249. -L* | -R* | -l*)
  8250. # Some compilers place space between "-{L,R}" and the path.
  8251. # Remove the space.
  8252. if test $p = "-L" ||
  8253. test $p = "-R"; then
  8254. prev=$p
  8255. continue
  8256. else
  8257. prev=
  8258. fi
  8259. if test "$pre_test_object_deps_done" = no; then
  8260. case $p in
  8261. -L* | -R*)
  8262. # Internal compiler library paths should come after those
  8263. # provided the user. The postdeps already come after the
  8264. # user supplied libs so there is no need to process them.
  8265. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
  8266. _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
  8267. else
  8268. _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
  8269. fi
  8270. ;;
  8271. # The "-l" case would never come before the object being
  8272. # linked, so don't bother handling this case.
  8273. esac
  8274. else
  8275. if test -z "$_LT_TAGVAR(postdeps, $1)"; then
  8276. _LT_TAGVAR(postdeps, $1)="${prev}${p}"
  8277. else
  8278. _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
  8279. fi
  8280. fi
  8281. ;;
  8282. *.$objext)
  8283. # This assumes that the test object file only shows up
  8284. # once in the compiler output.
  8285. if test "$p" = "conftest.$objext"; then
  8286. pre_test_object_deps_done=yes
  8287. continue
  8288. fi
  8289. if test "$pre_test_object_deps_done" = no; then
  8290. if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
  8291. _LT_TAGVAR(predep_objects, $1)="$p"
  8292. else
  8293. _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
  8294. fi
  8295. else
  8296. if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
  8297. _LT_TAGVAR(postdep_objects, $1)="$p"
  8298. else
  8299. _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
  8300. fi
  8301. fi
  8302. ;;
  8303. *) ;; # Ignore the rest.
  8304. esac
  8305. done
  8306. # Clean up.
  8307. rm -f a.out a.exe
  8308. else
  8309. echo "libtool.m4: error: problem compiling $1 test program"
  8310. fi
  8311. $RM -f confest.$objext
  8312. # PORTME: override above test on systems where it is broken
  8313. m4_if([$1], [CXX],
  8314. [case $host_os in
  8315. interix[[3-9]]*)
  8316. # Interix 3.5 installs completely hosed .la files for C++, so rather than
  8317. # hack all around it, let's just trust "g++" to DTRT.
  8318. _LT_TAGVAR(predep_objects,$1)=
  8319. _LT_TAGVAR(postdep_objects,$1)=
  8320. _LT_TAGVAR(postdeps,$1)=
  8321. ;;
  8322. linux*)
  8323. case `$CC -V 2>&1 | sed 5q` in
  8324. *Sun\ C*)
  8325. # Sun C++ 5.9
  8326. # The more standards-conforming stlport4 library is
  8327. # incompatible with the Cstd library. Avoid specifying
  8328. # it if it's in CXXFLAGS. Ignore libCrun as
  8329. # -library=stlport4 depends on it.
  8330. case " $CXX $CXXFLAGS " in
  8331. *" -library=stlport4 "*)
  8332. solaris_use_stlport4=yes
  8333. ;;
  8334. esac
  8335. if test "$solaris_use_stlport4" != yes; then
  8336. _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
  8337. fi
  8338. ;;
  8339. esac
  8340. ;;
  8341. solaris*)
  8342. case $cc_basename in
  8343. CC*)
  8344. # The more standards-conforming stlport4 library is
  8345. # incompatible with the Cstd library. Avoid specifying
  8346. # it if it's in CXXFLAGS. Ignore libCrun as
  8347. # -library=stlport4 depends on it.
  8348. case " $CXX $CXXFLAGS " in
  8349. *" -library=stlport4 "*)
  8350. solaris_use_stlport4=yes
  8351. ;;
  8352. esac
  8353. # Adding this requires a known-good setup of shared libraries for
  8354. # Sun compiler versions before 5.6, else PIC objects from an old
  8355. # archive will be linked into the output, leading to subtle bugs.
  8356. if test "$solaris_use_stlport4" != yes; then
  8357. _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
  8358. fi
  8359. ;;
  8360. esac
  8361. ;;
  8362. esac
  8363. ])
  8364. case " $_LT_TAGVAR(postdeps, $1) " in
  8365. *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
  8366. esac
  8367. _LT_TAGVAR(compiler_lib_search_dirs, $1)=
  8368. if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
  8369. _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
  8370. fi
  8371. _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
  8372. [The directories searched by this compiler when creating a shared library])
  8373. _LT_TAGDECL([], [predep_objects], [1],
  8374. [Dependencies to place before and after the objects being linked to
  8375. create a shared library])
  8376. _LT_TAGDECL([], [postdep_objects], [1])
  8377. _LT_TAGDECL([], [predeps], [1])
  8378. _LT_TAGDECL([], [postdeps], [1])
  8379. _LT_TAGDECL([], [compiler_lib_search_path], [1],
  8380. [The library search path used internally by the compiler when linking
  8381. a shared library])
  8382. ])# _LT_SYS_HIDDEN_LIBDEPS
  8383. # _LT_PROG_F77
  8384. # ------------
  8385. # Since AC_PROG_F77 is broken, in that it returns the empty string
  8386. # if there is no fortran compiler, we have our own version here.
  8387. m4_defun([_LT_PROG_F77],
  8388. [
  8389. pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
  8390. AC_PROG_F77
  8391. if test -z "$F77" || test "X$F77" = "Xno"; then
  8392. _lt_disable_F77=yes
  8393. fi
  8394. popdef([AC_MSG_ERROR])
  8395. ])# _LT_PROG_F77
  8396. dnl aclocal-1.4 backwards compatibility:
  8397. dnl AC_DEFUN([_LT_PROG_F77], [])
  8398. # _LT_LANG_F77_CONFIG([TAG])
  8399. # --------------------------
  8400. # Ensure that the configuration variables for a Fortran 77 compiler are
  8401. # suitably defined. These variables are subsequently used by _LT_CONFIG
  8402. # to write the compiler configuration to `libtool'.
  8403. m4_defun([_LT_LANG_F77_CONFIG],
  8404. [AC_REQUIRE([_LT_PROG_F77])dnl
  8405. AC_LANG_PUSH(Fortran 77)
  8406. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  8407. _LT_TAGVAR(allow_undefined_flag, $1)=
  8408. _LT_TAGVAR(always_export_symbols, $1)=no
  8409. _LT_TAGVAR(archive_expsym_cmds, $1)=
  8410. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  8411. _LT_TAGVAR(hardcode_direct, $1)=no
  8412. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  8413. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  8414. _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  8415. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  8416. _LT_TAGVAR(hardcode_minus_L, $1)=no
  8417. _LT_TAGVAR(hardcode_automatic, $1)=no
  8418. _LT_TAGVAR(inherit_rpath, $1)=no
  8419. _LT_TAGVAR(module_cmds, $1)=
  8420. _LT_TAGVAR(module_expsym_cmds, $1)=
  8421. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  8422. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  8423. _LT_TAGVAR(no_undefined_flag, $1)=
  8424. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  8425. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  8426. # Source file extension for f77 test sources.
  8427. ac_ext=f
  8428. # Object file extension for compiled f77 test sources.
  8429. objext=o
  8430. _LT_TAGVAR(objext, $1)=$objext
  8431. # No sense in running all these tests if we already determined that
  8432. # the F77 compiler isn't working. Some variables (like enable_shared)
  8433. # are currently assumed to apply to all compilers on this platform,
  8434. # and will be corrupted by setting them based on a non-working compiler.
  8435. if test "$_lt_disable_F77" != yes; then
  8436. # Code to be used in simple compile tests
  8437. lt_simple_compile_test_code="\
  8438. subroutine t
  8439. return
  8440. end
  8441. "
  8442. # Code to be used in simple link tests
  8443. lt_simple_link_test_code="\
  8444. program t
  8445. end
  8446. "
  8447. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  8448. _LT_TAG_COMPILER
  8449. # save warnings/boilerplate of simple test code
  8450. _LT_COMPILER_BOILERPLATE
  8451. _LT_LINKER_BOILERPLATE
  8452. # Allow CC to be a program name with arguments.
  8453. lt_save_CC="$CC"
  8454. lt_save_GCC=$GCC
  8455. CC=${F77-"f77"}
  8456. compiler=$CC
  8457. _LT_TAGVAR(compiler, $1)=$CC
  8458. _LT_CC_BASENAME([$compiler])
  8459. GCC=$G77
  8460. if test -n "$compiler"; then
  8461. AC_MSG_CHECKING([if libtool supports shared libraries])
  8462. AC_MSG_RESULT([$can_build_shared])
  8463. AC_MSG_CHECKING([whether to build shared libraries])
  8464. test "$can_build_shared" = "no" && enable_shared=no
  8465. # On AIX, shared libraries and static libraries use the same namespace, and
  8466. # are all built from PIC.
  8467. case $host_os in
  8468. aix3*)
  8469. test "$enable_shared" = yes && enable_static=no
  8470. if test -n "$RANLIB"; then
  8471. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  8472. postinstall_cmds='$RANLIB $lib'
  8473. fi
  8474. ;;
  8475. aix[[4-9]]*)
  8476. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  8477. test "$enable_shared" = yes && enable_static=no
  8478. fi
  8479. ;;
  8480. esac
  8481. AC_MSG_RESULT([$enable_shared])
  8482. AC_MSG_CHECKING([whether to build static libraries])
  8483. # Make sure either enable_shared or enable_static is yes.
  8484. test "$enable_shared" = yes || enable_static=yes
  8485. AC_MSG_RESULT([$enable_static])
  8486. _LT_TAGVAR(GCC, $1)="$G77"
  8487. _LT_TAGVAR(LD, $1)="$LD"
  8488. ## CAVEAT EMPTOR:
  8489. ## There is no encapsulation within the following macros, do not change
  8490. ## the running order or otherwise move them around unless you know exactly
  8491. ## what you are doing...
  8492. _LT_COMPILER_PIC($1)
  8493. _LT_COMPILER_C_O($1)
  8494. _LT_COMPILER_FILE_LOCKS($1)
  8495. _LT_LINKER_SHLIBS($1)
  8496. _LT_SYS_DYNAMIC_LINKER($1)
  8497. _LT_LINKER_HARDCODE_LIBPATH($1)
  8498. _LT_CONFIG($1)
  8499. fi # test -n "$compiler"
  8500. GCC=$lt_save_GCC
  8501. CC="$lt_save_CC"
  8502. fi # test "$_lt_disable_F77" != yes
  8503. AC_LANG_POP
  8504. ])# _LT_LANG_F77_CONFIG
  8505. # _LT_PROG_FC
  8506. # -----------
  8507. # Since AC_PROG_FC is broken, in that it returns the empty string
  8508. # if there is no fortran compiler, we have our own version here.
  8509. m4_defun([_LT_PROG_FC],
  8510. [
  8511. pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
  8512. AC_PROG_FC
  8513. if test -z "$FC" || test "X$FC" = "Xno"; then
  8514. _lt_disable_FC=yes
  8515. fi
  8516. popdef([AC_MSG_ERROR])
  8517. ])# _LT_PROG_FC
  8518. dnl aclocal-1.4 backwards compatibility:
  8519. dnl AC_DEFUN([_LT_PROG_FC], [])
  8520. # _LT_LANG_FC_CONFIG([TAG])
  8521. # -------------------------
  8522. # Ensure that the configuration variables for a Fortran compiler are
  8523. # suitably defined. These variables are subsequently used by _LT_CONFIG
  8524. # to write the compiler configuration to `libtool'.
  8525. m4_defun([_LT_LANG_FC_CONFIG],
  8526. [AC_REQUIRE([_LT_PROG_FC])dnl
  8527. AC_LANG_PUSH(Fortran)
  8528. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  8529. _LT_TAGVAR(allow_undefined_flag, $1)=
  8530. _LT_TAGVAR(always_export_symbols, $1)=no
  8531. _LT_TAGVAR(archive_expsym_cmds, $1)=
  8532. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  8533. _LT_TAGVAR(hardcode_direct, $1)=no
  8534. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  8535. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  8536. _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  8537. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  8538. _LT_TAGVAR(hardcode_minus_L, $1)=no
  8539. _LT_TAGVAR(hardcode_automatic, $1)=no
  8540. _LT_TAGVAR(inherit_rpath, $1)=no
  8541. _LT_TAGVAR(module_cmds, $1)=
  8542. _LT_TAGVAR(module_expsym_cmds, $1)=
  8543. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  8544. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  8545. _LT_TAGVAR(no_undefined_flag, $1)=
  8546. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  8547. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  8548. # Source file extension for fc test sources.
  8549. ac_ext=${ac_fc_srcext-f}
  8550. # Object file extension for compiled fc test sources.
  8551. objext=o
  8552. _LT_TAGVAR(objext, $1)=$objext
  8553. # No sense in running all these tests if we already determined that
  8554. # the FC compiler isn't working. Some variables (like enable_shared)
  8555. # are currently assumed to apply to all compilers on this platform,
  8556. # and will be corrupted by setting them based on a non-working compiler.
  8557. if test "$_lt_disable_FC" != yes; then
  8558. # Code to be used in simple compile tests
  8559. lt_simple_compile_test_code="\
  8560. subroutine t
  8561. return
  8562. end
  8563. "
  8564. # Code to be used in simple link tests
  8565. lt_simple_link_test_code="\
  8566. program t
  8567. end
  8568. "
  8569. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  8570. _LT_TAG_COMPILER
  8571. # save warnings/boilerplate of simple test code
  8572. _LT_COMPILER_BOILERPLATE
  8573. _LT_LINKER_BOILERPLATE
  8574. # Allow CC to be a program name with arguments.
  8575. lt_save_CC="$CC"
  8576. lt_save_GCC=$GCC
  8577. CC=${FC-"f95"}
  8578. compiler=$CC
  8579. GCC=$ac_cv_fc_compiler_gnu
  8580. _LT_TAGVAR(compiler, $1)=$CC
  8581. _LT_CC_BASENAME([$compiler])
  8582. if test -n "$compiler"; then
  8583. AC_MSG_CHECKING([if libtool supports shared libraries])
  8584. AC_MSG_RESULT([$can_build_shared])
  8585. AC_MSG_CHECKING([whether to build shared libraries])
  8586. test "$can_build_shared" = "no" && enable_shared=no
  8587. # On AIX, shared libraries and static libraries use the same namespace, and
  8588. # are all built from PIC.
  8589. case $host_os in
  8590. aix3*)
  8591. test "$enable_shared" = yes && enable_static=no
  8592. if test -n "$RANLIB"; then
  8593. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  8594. postinstall_cmds='$RANLIB $lib'
  8595. fi
  8596. ;;
  8597. aix[[4-9]]*)
  8598. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  8599. test "$enable_shared" = yes && enable_static=no
  8600. fi
  8601. ;;
  8602. esac
  8603. AC_MSG_RESULT([$enable_shared])
  8604. AC_MSG_CHECKING([whether to build static libraries])
  8605. # Make sure either enable_shared or enable_static is yes.
  8606. test "$enable_shared" = yes || enable_static=yes
  8607. AC_MSG_RESULT([$enable_static])
  8608. _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
  8609. _LT_TAGVAR(LD, $1)="$LD"
  8610. ## CAVEAT EMPTOR:
  8611. ## There is no encapsulation within the following macros, do not change
  8612. ## the running order or otherwise move them around unless you know exactly
  8613. ## what you are doing...
  8614. _LT_SYS_HIDDEN_LIBDEPS($1)
  8615. _LT_COMPILER_PIC($1)
  8616. _LT_COMPILER_C_O($1)
  8617. _LT_COMPILER_FILE_LOCKS($1)
  8618. _LT_LINKER_SHLIBS($1)
  8619. _LT_SYS_DYNAMIC_LINKER($1)
  8620. _LT_LINKER_HARDCODE_LIBPATH($1)
  8621. _LT_CONFIG($1)
  8622. fi # test -n "$compiler"
  8623. GCC=$lt_save_GCC
  8624. CC="$lt_save_CC"
  8625. fi # test "$_lt_disable_FC" != yes
  8626. AC_LANG_POP
  8627. ])# _LT_LANG_FC_CONFIG
  8628. # _LT_LANG_GCJ_CONFIG([TAG])
  8629. # --------------------------
  8630. # Ensure that the configuration variables for the GNU Java Compiler compiler
  8631. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  8632. # to write the compiler configuration to `libtool'.
  8633. m4_defun([_LT_LANG_GCJ_CONFIG],
  8634. [AC_REQUIRE([LT_PROG_GCJ])dnl
  8635. AC_LANG_SAVE
  8636. # Source file extension for Java test sources.
  8637. ac_ext=java
  8638. # Object file extension for compiled Java test sources.
  8639. objext=o
  8640. _LT_TAGVAR(objext, $1)=$objext
  8641. # Code to be used in simple compile tests
  8642. lt_simple_compile_test_code="class foo {}"
  8643. # Code to be used in simple link tests
  8644. lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
  8645. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  8646. _LT_TAG_COMPILER
  8647. # save warnings/boilerplate of simple test code
  8648. _LT_COMPILER_BOILERPLATE
  8649. _LT_LINKER_BOILERPLATE
  8650. # Allow CC to be a program name with arguments.
  8651. lt_save_CC="$CC"
  8652. lt_save_GCC=$GCC
  8653. GCC=yes
  8654. CC=${GCJ-"gcj"}
  8655. compiler=$CC
  8656. _LT_TAGVAR(compiler, $1)=$CC
  8657. _LT_TAGVAR(LD, $1)="$LD"
  8658. _LT_CC_BASENAME([$compiler])
  8659. # GCJ did not exist at the time GCC didn't implicitly link libc in.
  8660. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  8661. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  8662. ## CAVEAT EMPTOR:
  8663. ## There is no encapsulation within the following macros, do not change
  8664. ## the running order or otherwise move them around unless you know exactly
  8665. ## what you are doing...
  8666. if test -n "$compiler"; then
  8667. _LT_COMPILER_NO_RTTI($1)
  8668. _LT_COMPILER_PIC($1)
  8669. _LT_COMPILER_C_O($1)
  8670. _LT_COMPILER_FILE_LOCKS($1)
  8671. _LT_LINKER_SHLIBS($1)
  8672. _LT_LINKER_HARDCODE_LIBPATH($1)
  8673. _LT_CONFIG($1)
  8674. fi
  8675. AC_LANG_RESTORE
  8676. GCC=$lt_save_GCC
  8677. CC="$lt_save_CC"
  8678. ])# _LT_LANG_GCJ_CONFIG
  8679. # _LT_LANG_RC_CONFIG([TAG])
  8680. # -------------------------
  8681. # Ensure that the configuration variables for the Windows resource compiler
  8682. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  8683. # to write the compiler configuration to `libtool'.
  8684. m4_defun([_LT_LANG_RC_CONFIG],
  8685. [AC_REQUIRE([LT_PROG_RC])dnl
  8686. AC_LANG_SAVE
  8687. # Source file extension for RC test sources.
  8688. ac_ext=rc
  8689. # Object file extension for compiled RC test sources.
  8690. objext=o
  8691. _LT_TAGVAR(objext, $1)=$objext
  8692. # Code to be used in simple compile tests
  8693. lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
  8694. # Code to be used in simple link tests
  8695. lt_simple_link_test_code="$lt_simple_compile_test_code"
  8696. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  8697. _LT_TAG_COMPILER
  8698. # save warnings/boilerplate of simple test code
  8699. _LT_COMPILER_BOILERPLATE
  8700. _LT_LINKER_BOILERPLATE
  8701. # Allow CC to be a program name with arguments.
  8702. lt_save_CC="$CC"
  8703. lt_save_GCC=$GCC
  8704. GCC=
  8705. CC=${RC-"windres"}
  8706. compiler=$CC
  8707. _LT_TAGVAR(compiler, $1)=$CC
  8708. _LT_CC_BASENAME([$compiler])
  8709. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  8710. if test -n "$compiler"; then
  8711. :
  8712. _LT_CONFIG($1)
  8713. fi
  8714. GCC=$lt_save_GCC
  8715. AC_LANG_RESTORE
  8716. CC="$lt_save_CC"
  8717. ])# _LT_LANG_RC_CONFIG
  8718. # LT_PROG_GCJ
  8719. # -----------
  8720. AC_DEFUN([LT_PROG_GCJ],
  8721. [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
  8722. [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
  8723. [AC_CHECK_TOOL(GCJ, gcj,)
  8724. test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
  8725. AC_SUBST(GCJFLAGS)])])[]dnl
  8726. ])
  8727. # Old name:
  8728. AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
  8729. dnl aclocal-1.4 backwards compatibility:
  8730. dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
  8731. # LT_PROG_RC
  8732. # ----------
  8733. AC_DEFUN([LT_PROG_RC],
  8734. [AC_CHECK_TOOL(RC, windres,)
  8735. ])
  8736. # Old name:
  8737. AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
  8738. dnl aclocal-1.4 backwards compatibility:
  8739. dnl AC_DEFUN([LT_AC_PROG_RC], [])
  8740. # _LT_DECL_EGREP
  8741. # --------------
  8742. # If we don't have a new enough Autoconf to choose the best grep
  8743. # available, choose the one first in the user's PATH.
  8744. m4_defun([_LT_DECL_EGREP],
  8745. [AC_REQUIRE([AC_PROG_EGREP])dnl
  8746. AC_REQUIRE([AC_PROG_FGREP])dnl
  8747. test -z "$GREP" && GREP=grep
  8748. _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
  8749. _LT_DECL([], [EGREP], [1], [An ERE matcher])
  8750. _LT_DECL([], [FGREP], [1], [A literal string matcher])
  8751. dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
  8752. AC_SUBST([GREP])
  8753. ])
  8754. # _LT_DECL_OBJDUMP
  8755. # --------------
  8756. # If we don't have a new enough Autoconf to choose the best objdump
  8757. # available, choose the one first in the user's PATH.
  8758. m4_defun([_LT_DECL_OBJDUMP],
  8759. [AC_CHECK_TOOL(OBJDUMP, objdump, false)
  8760. test -z "$OBJDUMP" && OBJDUMP=objdump
  8761. _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
  8762. AC_SUBST([OBJDUMP])
  8763. ])
  8764. # _LT_DECL_SED
  8765. # ------------
  8766. # Check for a fully-functional sed program, that truncates
  8767. # as few characters as possible. Prefer GNU sed if found.
  8768. m4_defun([_LT_DECL_SED],
  8769. [AC_PROG_SED
  8770. test -z "$SED" && SED=sed
  8771. Xsed="$SED -e 1s/^X//"
  8772. _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
  8773. _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
  8774. [Sed that helps us avoid accidentally triggering echo(1) options like -n])
  8775. ])# _LT_DECL_SED
  8776. m4_ifndef([AC_PROG_SED], [
  8777. ############################################################
  8778. # NOTE: This macro has been submitted for inclusion into #
  8779. # GNU Autoconf as AC_PROG_SED. When it is available in #
  8780. # a released version of Autoconf we should remove this #
  8781. # macro and use it instead. #
  8782. ############################################################
  8783. m4_defun([AC_PROG_SED],
  8784. [AC_MSG_CHECKING([for a sed that does not truncate output])
  8785. AC_CACHE_VAL(lt_cv_path_SED,
  8786. [# Loop through the user's path and test for sed and gsed.
  8787. # Then use that list of sed's as ones to test for truncation.
  8788. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  8789. for as_dir in $PATH
  8790. do
  8791. IFS=$as_save_IFS
  8792. test -z "$as_dir" && as_dir=.
  8793. for lt_ac_prog in sed gsed; do
  8794. for ac_exec_ext in '' $ac_executable_extensions; do
  8795. if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
  8796. lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
  8797. fi
  8798. done
  8799. done
  8800. done
  8801. IFS=$as_save_IFS
  8802. lt_ac_max=0
  8803. lt_ac_count=0
  8804. # Add /usr/xpg4/bin/sed as it is typically found on Solaris
  8805. # along with /bin/sed that truncates output.
  8806. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
  8807. test ! -f $lt_ac_sed && continue
  8808. cat /dev/null > conftest.in
  8809. lt_ac_count=0
  8810. echo $ECHO_N "0123456789$ECHO_C" >conftest.in
  8811. # Check for GNU sed and select it if it is found.
  8812. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
  8813. lt_cv_path_SED=$lt_ac_sed
  8814. break
  8815. fi
  8816. while true; do
  8817. cat conftest.in conftest.in >conftest.tmp
  8818. mv conftest.tmp conftest.in
  8819. cp conftest.in conftest.nl
  8820. echo >>conftest.nl
  8821. $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
  8822. cmp -s conftest.out conftest.nl || break
  8823. # 10000 chars as input seems more than enough
  8824. test $lt_ac_count -gt 10 && break
  8825. lt_ac_count=`expr $lt_ac_count + 1`
  8826. if test $lt_ac_count -gt $lt_ac_max; then
  8827. lt_ac_max=$lt_ac_count
  8828. lt_cv_path_SED=$lt_ac_sed
  8829. fi
  8830. done
  8831. done
  8832. ])
  8833. SED=$lt_cv_path_SED
  8834. AC_SUBST([SED])
  8835. AC_MSG_RESULT([$SED])
  8836. ])#AC_PROG_SED
  8837. ])#m4_ifndef
  8838. # Old name:
  8839. AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
  8840. dnl aclocal-1.4 backwards compatibility:
  8841. dnl AC_DEFUN([LT_AC_PROG_SED], [])
  8842. # _LT_CHECK_SHELL_FEATURES
  8843. # ------------------------
  8844. # Find out whether the shell is Bourne or XSI compatible,
  8845. # or has some other useful features.
  8846. m4_defun([_LT_CHECK_SHELL_FEATURES],
  8847. [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
  8848. # Try some XSI features
  8849. xsi_shell=no
  8850. ( _lt_dummy="a/b/c"
  8851. test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
  8852. = c,a/b,, \
  8853. && eval 'test $(( 1 + 1 )) -eq 2 \
  8854. && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
  8855. && xsi_shell=yes
  8856. AC_MSG_RESULT([$xsi_shell])
  8857. _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
  8858. AC_MSG_CHECKING([whether the shell understands "+="])
  8859. lt_shell_append=no
  8860. ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
  8861. >/dev/null 2>&1 \
  8862. && lt_shell_append=yes
  8863. AC_MSG_RESULT([$lt_shell_append])
  8864. _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
  8865. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
  8866. lt_unset=unset
  8867. else
  8868. lt_unset=false
  8869. fi
  8870. _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
  8871. # test EBCDIC or ASCII
  8872. case `echo X|tr X '\101'` in
  8873. A) # ASCII based system
  8874. # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
  8875. lt_SP2NL='tr \040 \012'
  8876. lt_NL2SP='tr \015\012 \040\040'
  8877. ;;
  8878. *) # EBCDIC based system
  8879. lt_SP2NL='tr \100 \n'
  8880. lt_NL2SP='tr \r\n \100\100'
  8881. ;;
  8882. esac
  8883. _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
  8884. _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
  8885. ])# _LT_CHECK_SHELL_FEATURES
  8886. # _LT_PROG_XSI_SHELLFNS
  8887. # ---------------------
  8888. # Bourne and XSI compatible variants of some useful shell functions.
  8889. m4_defun([_LT_PROG_XSI_SHELLFNS],
  8890. [case $xsi_shell in
  8891. yes)
  8892. cat << \_LT_EOF >> "$cfgfile"
  8893. # func_dirname file append nondir_replacement
  8894. # Compute the dirname of FILE. If nonempty, add APPEND to the result,
  8895. # otherwise set result to NONDIR_REPLACEMENT.
  8896. func_dirname ()
  8897. {
  8898. case ${1} in
  8899. */*) func_dirname_result="${1%/*}${2}" ;;
  8900. * ) func_dirname_result="${3}" ;;
  8901. esac
  8902. }
  8903. # func_basename file
  8904. func_basename ()
  8905. {
  8906. func_basename_result="${1##*/}"
  8907. }
  8908. # func_dirname_and_basename file append nondir_replacement
  8909. # perform func_basename and func_dirname in a single function
  8910. # call:
  8911. # dirname: Compute the dirname of FILE. If nonempty,
  8912. # add APPEND to the result, otherwise set result
  8913. # to NONDIR_REPLACEMENT.
  8914. # value returned in "$func_dirname_result"
  8915. # basename: Compute filename of FILE.
  8916. # value retuned in "$func_basename_result"
  8917. # Implementation must be kept synchronized with func_dirname
  8918. # and func_basename. For efficiency, we do not delegate to
  8919. # those functions but instead duplicate the functionality here.
  8920. func_dirname_and_basename ()
  8921. {
  8922. case ${1} in
  8923. */*) func_dirname_result="${1%/*}${2}" ;;
  8924. * ) func_dirname_result="${3}" ;;
  8925. esac
  8926. func_basename_result="${1##*/}"
  8927. }
  8928. # func_stripname prefix suffix name
  8929. # strip PREFIX and SUFFIX off of NAME.
  8930. # PREFIX and SUFFIX must not contain globbing or regex special
  8931. # characters, hashes, percent signs, but SUFFIX may contain a leading
  8932. # dot (in which case that matches only a dot).
  8933. func_stripname ()
  8934. {
  8935. # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
  8936. # positional parameters, so assign one to ordinary parameter first.
  8937. func_stripname_result=${3}
  8938. func_stripname_result=${func_stripname_result#"${1}"}
  8939. func_stripname_result=${func_stripname_result%"${2}"}
  8940. }
  8941. # func_opt_split
  8942. func_opt_split ()
  8943. {
  8944. func_opt_split_opt=${1%%=*}
  8945. func_opt_split_arg=${1#*=}
  8946. }
  8947. # func_lo2o object
  8948. func_lo2o ()
  8949. {
  8950. case ${1} in
  8951. *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
  8952. *) func_lo2o_result=${1} ;;
  8953. esac
  8954. }
  8955. # func_xform libobj-or-source
  8956. func_xform ()
  8957. {
  8958. func_xform_result=${1%.*}.lo
  8959. }
  8960. # func_arith arithmetic-term...
  8961. func_arith ()
  8962. {
  8963. func_arith_result=$(( $[*] ))
  8964. }
  8965. # func_len string
  8966. # STRING may not start with a hyphen.
  8967. func_len ()
  8968. {
  8969. func_len_result=${#1}
  8970. }
  8971. _LT_EOF
  8972. ;;
  8973. *) # Bourne compatible functions.
  8974. cat << \_LT_EOF >> "$cfgfile"
  8975. # func_dirname file append nondir_replacement
  8976. # Compute the dirname of FILE. If nonempty, add APPEND to the result,
  8977. # otherwise set result to NONDIR_REPLACEMENT.
  8978. func_dirname ()
  8979. {
  8980. # Extract subdirectory from the argument.
  8981. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
  8982. if test "X$func_dirname_result" = "X${1}"; then
  8983. func_dirname_result="${3}"
  8984. else
  8985. func_dirname_result="$func_dirname_result${2}"
  8986. fi
  8987. }
  8988. # func_basename file
  8989. func_basename ()
  8990. {
  8991. func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
  8992. }
  8993. dnl func_dirname_and_basename
  8994. dnl A portable version of this function is already defined in general.m4sh
  8995. dnl so there is no need for it here.
  8996. # func_stripname prefix suffix name
  8997. # strip PREFIX and SUFFIX off of NAME.
  8998. # PREFIX and SUFFIX must not contain globbing or regex special
  8999. # characters, hashes, percent signs, but SUFFIX may contain a leading
  9000. # dot (in which case that matches only a dot).
  9001. # func_strip_suffix prefix name
  9002. func_stripname ()
  9003. {
  9004. case ${2} in
  9005. .*) func_stripname_result=`$ECHO "X${3}" \
  9006. | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
  9007. *) func_stripname_result=`$ECHO "X${3}" \
  9008. | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
  9009. esac
  9010. }
  9011. # sed scripts:
  9012. my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
  9013. my_sed_long_arg='1s/^-[[^=]]*=//'
  9014. # func_opt_split
  9015. func_opt_split ()
  9016. {
  9017. func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
  9018. func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
  9019. }
  9020. # func_lo2o object
  9021. func_lo2o ()
  9022. {
  9023. func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
  9024. }
  9025. # func_xform libobj-or-source
  9026. func_xform ()
  9027. {
  9028. func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
  9029. }
  9030. # func_arith arithmetic-term...
  9031. func_arith ()
  9032. {
  9033. func_arith_result=`expr "$[@]"`
  9034. }
  9035. # func_len string
  9036. # STRING may not start with a hyphen.
  9037. func_len ()
  9038. {
  9039. func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
  9040. }
  9041. _LT_EOF
  9042. esac
  9043. case $lt_shell_append in
  9044. yes)
  9045. cat << \_LT_EOF >> "$cfgfile"
  9046. # func_append var value
  9047. # Append VALUE to the end of shell variable VAR.
  9048. func_append ()
  9049. {
  9050. eval "$[1]+=\$[2]"
  9051. }
  9052. _LT_EOF
  9053. ;;
  9054. *)
  9055. cat << \_LT_EOF >> "$cfgfile"
  9056. # func_append var value
  9057. # Append VALUE to the end of shell variable VAR.
  9058. func_append ()
  9059. {
  9060. eval "$[1]=\$$[1]\$[2]"
  9061. }
  9062. _LT_EOF
  9063. ;;
  9064. esac
  9065. ])