KBookReader – eBook reader
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 344KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179
  1. ## -*- autoconf -*-
  2. dnl This file is part of the KDE libraries/packages
  3. dnl Copyright (C) 1997 Janos Farkas (chexum@shadow.banki.hu)
  4. dnl (C) 1997,98,99 Stephan Kulow (coolo@kde.org)
  5. dnl This file is free software; you can redistribute it and/or
  6. dnl modify it under the terms of the GNU Library General Public
  7. dnl License as published by the Free Software Foundation; either
  8. dnl version 2 of the License, or (at your option) any later version.
  9. dnl This library is distributed in the hope that it will be useful,
  10. dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. dnl Library General Public License for more details.
  13. dnl You should have received a copy of the GNU Library General Public License
  14. dnl along with this library; see the file COPYING.LIB. If not, write to
  15. dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  16. dnl Boston, MA 02111-1307, USA.
  17. dnl IMPORTANT NOTE:
  18. dnl Please do not modify this file unless you expect your modifications to be
  19. dnl carried into every other module in the repository.
  20. dnl
  21. dnl Single-module modifications are best placed in configure.in for tdelibs
  22. dnl and tdebase or configure.in.in if present.
  23. # KDE_PATH_X_DIRECT
  24. dnl Internal subroutine of AC_PATH_X.
  25. dnl Set ac_x_includes and/or ac_x_libraries.
  26. AC_DEFUN([KDE_PATH_X_DIRECT],
  27. [
  28. AC_REQUIRE([KDE_CHECK_LIB64])
  29. if test "$ac_x_includes" = NO; then
  30. # Guess where to find include files, by looking for this one X11 .h file.
  31. test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
  32. # First, try using that file with no special directory specified.
  33. AC_TRY_CPP([#include <$x_direct_test_include>],
  34. [# We can compile using X headers with no special include directory.
  35. ac_x_includes=],
  36. [# Look for the header file in a standard set of common directories.
  37. # Check X11 before X11Rn because it is often a symlink to the current release.
  38. for ac_dir in \
  39. /usr/X11/include \
  40. /usr/X11R6/include \
  41. /usr/X11R5/include \
  42. /usr/X11R4/include \
  43. \
  44. /usr/include/X11 \
  45. /usr/include/X11R6 \
  46. /usr/include/X11R5 \
  47. /usr/include/X11R4 \
  48. \
  49. /usr/local/X11/include \
  50. /usr/local/X11R6/include \
  51. /usr/local/X11R5/include \
  52. /usr/local/X11R4/include \
  53. \
  54. /usr/local/include/X11 \
  55. /usr/local/include/X11R6 \
  56. /usr/local/include/X11R5 \
  57. /usr/local/include/X11R4 \
  58. \
  59. /usr/X386/include \
  60. /usr/x386/include \
  61. /usr/XFree86/include/X11 \
  62. \
  63. /usr/include \
  64. /usr/local/include \
  65. /usr/unsupported/include \
  66. /usr/athena/include \
  67. /usr/local/x11r5/include \
  68. /usr/lpp/Xamples/include \
  69. \
  70. /usr/openwin/include \
  71. /usr/openwin/share/include \
  72. ; \
  73. do
  74. if test -r "$ac_dir/$x_direct_test_include"; then
  75. ac_x_includes=$ac_dir
  76. break
  77. fi
  78. done])
  79. fi # $ac_x_includes = NO
  80. if test "$ac_x_libraries" = NO; then
  81. # Check for the libraries.
  82. test -z "$x_direct_test_library" && x_direct_test_library=Xt
  83. test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
  84. # See if we find them without any special options.
  85. # Don't add to $LIBS permanently.
  86. ac_save_LIBS="$LIBS"
  87. LIBS="-l$x_direct_test_library $LIBS"
  88. AC_TRY_LINK(, [${x_direct_test_function}()],
  89. [LIBS="$ac_save_LIBS"
  90. # We can link X programs with no special library path.
  91. ac_x_libraries=],
  92. [LIBS="$ac_save_LIBS"
  93. # First see if replacing the include by lib works.
  94. # Check X11 before X11Rn because it is often a symlink to the current release.
  95. for ac_dir in `echo "$ac_x_includes" | sed s/include/lib${tdelibsuff}/` \
  96. /usr/X11/lib${tdelibsuff} \
  97. /usr/X11R6/lib${tdelibsuff} \
  98. /usr/X11R5/lib${tdelibsuff} \
  99. /usr/X11R4/lib${tdelibsuff} \
  100. \
  101. /usr/lib${tdelibsuff}/X11 \
  102. /usr/lib${tdelibsuff}/X11R6 \
  103. /usr/lib${tdelibsuff}/X11R5 \
  104. /usr/lib${tdelibsuff}/X11R4 \
  105. \
  106. /usr/local/X11/lib${tdelibsuff} \
  107. /usr/local/X11R6/lib${tdelibsuff} \
  108. /usr/local/X11R5/lib${tdelibsuff} \
  109. /usr/local/X11R4/lib${tdelibsuff} \
  110. \
  111. /usr/local/lib${tdelibsuff}/X11 \
  112. /usr/local/lib${tdelibsuff}/X11R6 \
  113. /usr/local/lib${tdelibsuff}/X11R5 \
  114. /usr/local/lib${tdelibsuff}/X11R4 \
  115. \
  116. /usr/X386/lib${tdelibsuff} \
  117. /usr/x386/lib${tdelibsuff} \
  118. /usr/XFree86/lib${tdelibsuff}/X11 \
  119. \
  120. /usr/lib${tdelibsuff} \
  121. /usr/local/lib${tdelibsuff} \
  122. /usr/unsupported/lib${tdelibsuff} \
  123. /usr/athena/lib${tdelibsuff} \
  124. /usr/local/x11r5/lib${tdelibsuff} \
  125. /usr/lpp/Xamples/lib${tdelibsuff} \
  126. /lib/usr/lib${tdelibsuff}/X11 \
  127. \
  128. /usr/openwin/lib${tdelibsuff} \
  129. /usr/openwin/share/lib${tdelibsuff} \
  130. ; \
  131. do
  132. dnl Don't even attempt the hair of trying to link an X program!
  133. for ac_extension in a so sl; do
  134. if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
  135. ac_x_libraries=$ac_dir
  136. break 2
  137. fi
  138. done
  139. done])
  140. fi # $ac_x_libraries = NO
  141. ])
  142. dnl ------------------------------------------------------------------------
  143. dnl Find a file (or one of more files in a list of dirs)
  144. dnl ------------------------------------------------------------------------
  145. dnl
  146. AC_DEFUN([AC_FIND_FILE],
  147. [
  148. $3=NO
  149. for i in $2;
  150. do
  151. for j in $1;
  152. do
  153. echo "configure: __oline__: $i/$j" >&AC_FD_CC
  154. if test -r "$i/$j"; then
  155. echo "taking that" >&AC_FD_CC
  156. $3=$i
  157. break 2
  158. fi
  159. done
  160. done
  161. ])
  162. dnl KDE_FIND_PATH(programm-name, variable-name, list of directories,
  163. dnl if-not-found, test-parameter)
  164. AC_DEFUN([KDE_FIND_PATH],
  165. [
  166. AC_MSG_CHECKING([for $1])
  167. if test -n "$$2"; then
  168. kde_cv_path="$$2";
  169. else
  170. kde_cache=`echo $1 | sed 'y%./+-%__p_%'`
  171. AC_CACHE_VAL(kde_cv_path_$kde_cache,
  172. [
  173. kde_cv_path="NONE"
  174. dirs="$3"
  175. kde_save_IFS=$IFS
  176. IFS=':'
  177. for dir in $PATH; do
  178. dirs="$dirs $dir"
  179. done
  180. IFS=$kde_save_IFS
  181. for dir in $dirs; do
  182. if test -x "$dir/$1"; then
  183. if test -n "$5"
  184. then
  185. evalstr="$dir/$1 $5 2>&1 "
  186. if eval $evalstr; then
  187. kde_cv_path="$dir/$1"
  188. break
  189. fi
  190. else
  191. kde_cv_path="$dir/$1"
  192. break
  193. fi
  194. fi
  195. done
  196. eval "kde_cv_path_$kde_cache=$kde_cv_path"
  197. ])
  198. eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
  199. fi
  200. if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
  201. AC_MSG_RESULT(not found)
  202. $4
  203. else
  204. AC_MSG_RESULT($kde_cv_path)
  205. $2=$kde_cv_path
  206. fi
  207. ])
  208. AC_DEFUN([KDE_MOC_ERROR_MESSAGE],
  209. [
  210. AC_MSG_ERROR([No Qt meta object compiler (moc) found!
  211. Please check whether you installed Qt correctly.
  212. You need to have a running moc binary.
  213. configure tried to run $ac_cv_path_moc and the test didn't
  214. succeed. If configure shouldn't have tried this one, set
  215. the environment variable MOC to the right one before running
  216. configure.
  217. ])
  218. ])
  219. AC_DEFUN([KDE_UIC_ERROR_MESSAGE],
  220. [
  221. AC_MSG_WARN([No Qt ui compiler (uic) found!
  222. Please check whether you installed Qt correctly.
  223. You need to have a running uic binary.
  224. configure tried to run $ac_cv_path_uic and the test didn't
  225. succeed. If configure shouldn't have tried this one, set
  226. the environment variable UIC to the right one before running
  227. configure.
  228. ])
  229. ])
  230. AC_DEFUN([KDE_CHECK_UIC_FLAG],
  231. [
  232. AC_MSG_CHECKING([whether uic supports -$1 ])
  233. kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
  234. AC_CACHE_VAL(kde_cv_prog_uic_$kde_cache,
  235. [
  236. cat >conftest.ui <<EOT
  237. <!DOCTYPE UI><UI version="3" stdsetdef="1"></UI>
  238. EOT
  239. ac_uic_testrun="$UIC_PATH -$1 $2 conftest.ui >/dev/null"
  240. if AC_TRY_EVAL(ac_uic_testrun); then
  241. eval "kde_cv_prog_uic_$kde_cache=yes"
  242. else
  243. eval "kde_cv_prog_uic_$kde_cache=no"
  244. fi
  245. rm -f conftest*
  246. ])
  247. if eval "test \"`echo '$kde_cv_prog_uic_'$kde_cache`\" = yes"; then
  248. AC_MSG_RESULT([yes])
  249. :
  250. $3
  251. else
  252. AC_MSG_RESULT([no])
  253. :
  254. $4
  255. fi
  256. ])
  257. dnl ------------------------------------------------------------------------
  258. dnl Find the meta object compiler and the ui compiler in the PATH,
  259. dnl in $TQTDIR/bin, and some more usual places
  260. dnl ------------------------------------------------------------------------
  261. dnl
  262. AC_DEFUN([AC_PATH_TQT_MOC_UIC],
  263. [
  264. AC_REQUIRE([KDE_CHECK_PERL])
  265. qt_bindirs=""
  266. for dir in $kde_qt_dirs; do
  267. qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc"
  268. done
  269. qt_bindirs="$qt_bindirs /usr/bin /usr/X11R6/bin /usr/local/qt/bin"
  270. if test ! "$ac_qt_bindir" = "NO"; then
  271. qt_bindirs="$ac_qt_bindir $qt_bindirs"
  272. fi
  273. KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE])
  274. if test -z "$UIC_NOT_NEEDED"; then
  275. KDE_FIND_PATH(uic, UIC_PATH, [$qt_bindirs], [UIC_PATH=""])
  276. if test -z "$UIC_PATH" ; then
  277. KDE_UIC_ERROR_MESSAGE
  278. exit 1
  279. else
  280. UIC=$UIC_PATH
  281. if test $kde_qtver = 3; then
  282. KDE_CHECK_UIC_FLAG(L,[/nonexistent],ac_uic_supports_libpath=yes,ac_uic_supports_libpath=no)
  283. KDE_CHECK_UIC_FLAG(nounload,,ac_uic_supports_nounload=yes,ac_uic_supports_nounload=no)
  284. if test x$ac_uic_supports_libpath = xyes; then
  285. UIC="$UIC -L \$(kde_widgetdir)"
  286. fi
  287. if test x$ac_uic_supports_nounload = xyes; then
  288. UIC="$UIC -nounload"
  289. fi
  290. fi
  291. fi
  292. else
  293. UIC="echo uic not available: "
  294. fi
  295. AC_SUBST(MOC)
  296. AC_SUBST(UIC)
  297. UIC_TR="i18n"
  298. if test $kde_qtver = 3; then
  299. UIC_TR="tr2i18n"
  300. fi
  301. AC_SUBST(UIC_TR)
  302. ])
  303. AC_DEFUN([KDE_1_CHECK_PATHS],
  304. [
  305. KDE_1_CHECK_PATH_HEADERS
  306. KDE_TEST_RPATH=
  307. if test -n "$USE_RPATH"; then
  308. if test -n "$kde_libraries"; then
  309. KDE_TEST_RPATH="-R $kde_libraries"
  310. fi
  311. if test -n "$qt_libraries"; then
  312. KDE_TEST_RPATH="$KDE_TEST_RPATH -R $qt_libraries"
  313. fi
  314. if test -n "$x_libraries"; then
  315. KDE_TEST_RPATH="$KDE_TEST_RPATH -R $x_libraries"
  316. fi
  317. KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH"
  318. fi
  319. AC_MSG_CHECKING([for KDE libraries installed])
  320. ac_link='$LIBTOOL_SHELL --silent --mode=link ${CXX-g++} -o conftest $CXXFLAGS $all_includes $CPPFLAGS $LDFLAGS $all_libraries conftest.$ac_ext $LIBS -ltdecore $LIBTQT $KDE_TEST_RPATH 1>&5'
  321. if AC_TRY_EVAL(ac_link) && test -s conftest; then
  322. AC_MSG_RESULT(yes)
  323. else
  324. AC_MSG_ERROR([your system fails at linking a small KDE application!
  325. Check, if your compiler is installed correctly and if you have used the
  326. same compiler to compile Qt and tdelibs as you did use now.
  327. For more details about this problem, look at the end of config.log.])
  328. fi
  329. if eval `TDEDIR= ./conftest 2>&5`; then
  330. kde_result=done
  331. else
  332. kde_result=problems
  333. fi
  334. TDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log
  335. kde_have_all_paths=yes
  336. KDE_SET_PATHS($kde_result)
  337. ])
  338. AC_DEFUN([KDE_SET_PATHS],
  339. [
  340. kde_cv_all_paths="kde_have_all_paths=\"yes\" \
  341. kde_htmldir=\"$kde_htmldir\" \
  342. kde_appsdir=\"$kde_appsdir\" \
  343. kde_icondir=\"$kde_icondir\" \
  344. kde_sounddir=\"$kde_sounddir\" \
  345. kde_datadir=\"$kde_datadir\" \
  346. kde_locale=\"$kde_locale\" \
  347. kde_cgidir=\"$kde_cgidir\" \
  348. kde_confdir=\"$kde_confdir\" \
  349. kde_kcfgdir=\"$kde_kcfgdir\" \
  350. kde_mimedir=\"$kde_mimedir\" \
  351. kde_toolbardir=\"$kde_toolbardir\" \
  352. kde_wallpaperdir=\"$kde_wallpaperdir\" \
  353. kde_templatesdir=\"$kde_templatesdir\" \
  354. kde_bindir=\"$kde_bindir\" \
  355. kde_servicesdir=\"$kde_servicesdir\" \
  356. kde_servicetypesdir=\"$kde_servicetypesdir\" \
  357. kde_moduledir=\"$kde_moduledir\" \
  358. kde_styledir=\"$kde_styledir\" \
  359. kde_widgetdir=\"$kde_widgetdir\" \
  360. xdg_appsdir=\"$xdg_appsdir\" \
  361. xdg_menudir=\"$xdg_menudir\" \
  362. xdg_directorydir=\"$xdg_directorydir\" \
  363. kde_result=$1"
  364. ])
  365. AC_DEFUN([KDE_SET_DEFAULT_PATHS],
  366. [
  367. if test "$1" = "default"; then
  368. if test -z "$kde_htmldir"; then
  369. kde_htmldir='\${datadir}/doc/tde/HTML'
  370. fi
  371. if test -z "$kde_appsdir"; then
  372. kde_appsdir='\${datadir}/applnk'
  373. fi
  374. if test -z "$kde_icondir"; then
  375. kde_icondir='\${datadir}/icons'
  376. fi
  377. if test -z "$kde_sounddir"; then
  378. kde_sounddir='\${datadir}/sounds'
  379. fi
  380. if test -z "$kde_datadir"; then
  381. kde_datadir='\${datadir}/apps'
  382. fi
  383. if test -z "$kde_locale"; then
  384. kde_locale='\${datadir}/locale'
  385. fi
  386. if test -z "$kde_cgidir"; then
  387. kde_cgidir='\${exec_prefix}/cgi-bin'
  388. fi
  389. if test -z "$kde_confdir"; then
  390. kde_confdir='\${datadir}/config'
  391. fi
  392. if test -z "$kde_kcfgdir"; then
  393. kde_kcfgdir='\${datadir}/config.kcfg'
  394. fi
  395. if test -z "$kde_mimedir"; then
  396. kde_mimedir='\${datadir}/mimelnk'
  397. fi
  398. if test -z "$kde_toolbardir"; then
  399. kde_toolbardir='\${datadir}/toolbar'
  400. fi
  401. if test -z "$kde_wallpaperdir"; then
  402. kde_wallpaperdir='\${datadir}/wallpapers'
  403. fi
  404. if test -z "$kde_templatesdir"; then
  405. kde_templatesdir='\${datadir}/templates'
  406. fi
  407. if test -z "$kde_bindir"; then
  408. kde_bindir='\${exec_prefix}/bin'
  409. fi
  410. if test -z "$kde_servicesdir"; then
  411. kde_servicesdir='\${datadir}/services'
  412. fi
  413. if test -z "$kde_servicetypesdir"; then
  414. kde_servicetypesdir='\${datadir}/servicetypes'
  415. fi
  416. if test -z "$kde_moduledir"; then
  417. if test "$kde_qtver" = "2"; then
  418. kde_moduledir='\${libdir}/kde2'
  419. else
  420. kde_moduledir='\${libdir}/trinity'
  421. fi
  422. fi
  423. if test -z "$kde_styledir"; then
  424. kde_styledir='\${libdir}/trinity/plugins/styles'
  425. fi
  426. if test -z "$kde_widgetdir"; then
  427. kde_widgetdir='\${libdir}/trinity/plugins/designer'
  428. fi
  429. if test -z "$xdg_appsdir"; then
  430. xdg_appsdir='\${datadir}/applications/tde'
  431. fi
  432. if test -z "$xdg_menudir"; then
  433. xdg_menudir='\${sysconfdir}/xdg/menus'
  434. fi
  435. if test -z "$xdg_directorydir"; then
  436. xdg_directorydir='\${datadir}/desktop-directories'
  437. fi
  438. KDE_SET_PATHS(defaults)
  439. else
  440. if test $kde_qtver = 1; then
  441. AC_MSG_RESULT([compiling])
  442. KDE_1_CHECK_PATHS
  443. else
  444. AC_MSG_ERROR([path checking not yet supported for KDE 2])
  445. fi
  446. fi
  447. ])
  448. AC_DEFUN([KDE_CHECK_PATHS_FOR_COMPLETENESS],
  449. [ if test -z "$kde_htmldir" || test -z "$kde_appsdir" ||
  450. test -z "$kde_icondir" || test -z "$kde_sounddir" ||
  451. test -z "$kde_datadir" || test -z "$kde_locale" ||
  452. test -z "$kde_cgidir" || test -z "$kde_confdir" ||
  453. test -z "$kde_kcfgdir" ||
  454. test -z "$kde_mimedir" || test -z "$kde_toolbardir" ||
  455. test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
  456. test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
  457. test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
  458. test -z "$kde_styledir" || test -z "kde_widgetdir" ||
  459. test -z "$xdg_appsdir" || test -z "$xdg_menudir" || test -z "$xdg_directorydir" ||
  460. test "x$kde_have_all_paths" != "xyes"; then
  461. kde_have_all_paths=no
  462. fi
  463. ])
  464. AC_DEFUN([KDE_MISSING_PROG_ERROR],
  465. [
  466. AC_MSG_ERROR([The important program $1 was not found!
  467. Please check whether you installed KDE correctly.
  468. ])
  469. ])
  470. AC_DEFUN([KDE_MISSING_ARTS_ERROR],
  471. [
  472. AC_MSG_ERROR([The important program $1 was not found!
  473. Please check whether you installed aRts correctly or use
  474. --without-arts to compile without aRts support (this will remove functionality).
  475. ])
  476. ])
  477. AC_DEFUN([KDE_SUBST_PROGRAMS],
  478. [
  479. AC_ARG_WITH(arts,
  480. AC_HELP_STRING([--without-arts],[build without aRts [default=yes]]),
  481. [build_arts=$withval],
  482. [build_arts=yes]
  483. )
  484. AM_CONDITIONAL(include_ARTS, test "$build_arts" != "no")
  485. kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/trinity/bin /usr/kde/bin /usr/local/kde/bin"
  486. test -n "$TDEDIR" && kde_default_bindirs="$TDEDIR/bin $kde_default_bindirs"
  487. if test -n "$TDEDIRS"; then
  488. kde_save_IFS=$IFS
  489. IFS=:
  490. for dir in $TDEDIRS; do
  491. kde_default_bindirs="$dir/bin $kde_default_bindirs "
  492. done
  493. IFS=$kde_save_IFS
  494. fi
  495. kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_default_bindirs"
  496. KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
  497. KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
  498. if test "$build_arts" != "no"; then
  499. KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(mcopidl)])
  500. KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(artsc-config)])
  501. fi
  502. KDE_FIND_PATH(tde-config, KDECONFIG, [$kde_default_bindirs])
  503. KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
  504. trinity2ornewer=1
  505. if test -n "$kde_qtver" && test "$kde_qtver" -lt 3; then
  506. trinity2ornewer=
  507. else
  508. if test "$kde_qtver" = "3" && test "$kde_qtsubver" -le 1; then
  509. trinity2ornewer=
  510. fi
  511. fi
  512. if test -n "$trinity2ornewer"; then
  513. KDE_FIND_PATH(tdeconfig_compiler, KCONFIG_COMPILER, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(tdeconfig_compiler)])
  514. KDE_FIND_PATH(dcopidlng, DCOPIDLNG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidlng)])
  515. fi
  516. KDE_FIND_PATH(xmllint, XMLLINT, [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin], [XMLLINT=""])
  517. if test -n "$MEINPROC" && test ! "$MEINPROC" = "compiled"; then
  518. kde_sharedirs="$prefix/share /opt/trinity/share /opt/trinity/share /opt/kde/share /usr/share/kde /usr/local/share /usr/share"
  519. test -n "$TDEDIR" && kde_sharedirs="$TDEDIR/share $kde_sharedirs"
  520. AC_FIND_FILE(apps/ksgmltools2/customization/tde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET)
  521. if test "$KDE_XSL_STYLESHEET" = "NO"; then
  522. KDE_XSL_STYLESHEET=""
  523. else
  524. KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/tde-chunk.xsl"
  525. fi
  526. fi
  527. DCOP_DEPENDENCIES='$(DCOPIDL)'
  528. if test -n "$trinity2ornewer"; then
  529. KCFG_DEPENDENCIES='$(KCONFIG_COMPILER)'
  530. DCOP_DEPENDENCIES='$(DCOPIDL) $(DCOPIDLNG)'
  531. AC_SUBST(KCONFIG_COMPILER)
  532. AC_SUBST(KCFG_DEPENDENCIES)
  533. AC_SUBST(DCOPIDLNG)
  534. fi
  535. AC_SUBST(DCOPIDL)
  536. AC_SUBST(DCOPIDL2CPP)
  537. AC_SUBST(DCOP_DEPENDENCIES)
  538. AC_SUBST(MCOPIDL)
  539. AC_SUBST(ARTSCCONFIG)
  540. AC_SUBST(KDECONFIG)
  541. AC_SUBST(MEINPROC)
  542. AC_SUBST(KDE_XSL_STYLESHEET)
  543. AC_SUBST(XMLLINT)
  544. if test -x "$KDECONFIG"; then # it can be "compiled"
  545. kde_libs_prefix=`$KDECONFIG --prefix`
  546. if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
  547. AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for tdelibs.
  548. This means it has been moved since you installed it.
  549. This won't work. Please recompile tdelibs for the new prefix.
  550. ])
  551. fi
  552. kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
  553. else
  554. kde_libs_prefix='$(prefix)'
  555. kde_libs_htmldir='$(kde_htmldir)'
  556. fi
  557. AC_SUBST(kde_libs_prefix)
  558. AC_SUBST(kde_libs_htmldir)
  559. ])dnl
  560. AC_DEFUN([AC_CREATE_KFSSTND],
  561. [
  562. AC_REQUIRE([AC_CHECK_RPATH])
  563. AC_MSG_CHECKING([for KDE paths])
  564. kde_result=""
  565. kde_cached_paths=yes
  566. AC_CACHE_VAL(kde_cv_all_paths,
  567. [
  568. KDE_SET_DEFAULT_PATHS($1)
  569. kde_cached_paths=no
  570. ])
  571. eval "$kde_cv_all_paths"
  572. KDE_CHECK_PATHS_FOR_COMPLETENESS
  573. if test "$kde_have_all_paths" = "no" && test "$kde_cached_paths" = "yes"; then
  574. # wrong values were cached, may be, we can set better ones
  575. kde_result=
  576. kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir=
  577. kde_datadir= kde_locale= kde_cgidir= kde_confdir= kde_kcfgdir=
  578. kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
  579. kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
  580. kde_have_all_paths=
  581. kde_styledir=
  582. kde_widgetdir=
  583. xdg_appsdir = xdg_menudir= xdg_directorydir=
  584. KDE_SET_DEFAULT_PATHS($1)
  585. eval "$kde_cv_all_paths"
  586. KDE_CHECK_PATHS_FOR_COMPLETENESS
  587. kde_result="$kde_result (cache overridden)"
  588. fi
  589. if test "$kde_have_all_paths" = "no"; then
  590. AC_MSG_ERROR([configure could not run a little KDE program to test the environment.
  591. Since it had compiled and linked before, it must be a strange problem on your system.
  592. Look at config.log for details. If you are not able to fix this, look at
  593. http://www.kde.org/faq/installation.html or any www.kde.org mirror.
  594. (If you're using an egcs version on Linux, you may update binutils!)
  595. ])
  596. else
  597. rm -f conftest*
  598. AC_MSG_RESULT($kde_result)
  599. fi
  600. bindir=$kde_bindir
  601. KDE_SUBST_PROGRAMS
  602. ])
  603. AC_DEFUN([AC_SUBST_KFSSTND],
  604. [
  605. AC_SUBST(kde_htmldir)
  606. AC_SUBST(kde_appsdir)
  607. AC_SUBST(kde_icondir)
  608. AC_SUBST(kde_sounddir)
  609. AC_SUBST(kde_datadir)
  610. AC_SUBST(kde_locale)
  611. AC_SUBST(kde_confdir)
  612. AC_SUBST(kde_kcfgdir)
  613. AC_SUBST(kde_mimedir)
  614. AC_SUBST(kde_wallpaperdir)
  615. AC_SUBST(kde_bindir)
  616. dnl X Desktop Group standards
  617. AC_SUBST(xdg_appsdir)
  618. AC_SUBST(xdg_menudir)
  619. AC_SUBST(xdg_directorydir)
  620. dnl for KDE 2
  621. AC_SUBST(kde_templatesdir)
  622. AC_SUBST(kde_servicesdir)
  623. AC_SUBST(kde_servicetypesdir)
  624. AC_SUBST(kde_moduledir)
  625. AC_SUBST(tdeinitdir, '$(kde_moduledir)')
  626. AC_SUBST(kde_styledir)
  627. AC_SUBST(kde_widgetdir)
  628. if test "$kde_qtver" = 1; then
  629. kde_minidir="$kde_icondir/mini"
  630. else
  631. # for KDE 1 - this breaks KDE2 apps using minidir, but
  632. # that's the plan ;-/
  633. kde_minidir="/dev/null"
  634. fi
  635. dnl AC_SUBST(kde_minidir)
  636. dnl AC_SUBST(kde_cgidir)
  637. dnl AC_SUBST(kde_toolbardir)
  638. ])
  639. AC_DEFUN([KDE_MISC_TESTS],
  640. [
  641. dnl Checks for libraries.
  642. AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD
  643. AC_SUBST(LIBUTIL)
  644. AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for *BSD
  645. AC_SUBST(LIBCOMPAT)
  646. kde_have_crypt=
  647. AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes],
  648. AC_CHECK_LIB(c, crypt, [kde_have_crypt=yes], [
  649. AC_MSG_WARN([you have no crypt in either libcrypt or libc.
  650. You should install libcrypt from another source or configure with PAM
  651. support])
  652. kde_have_crypt=no
  653. ]))
  654. AC_SUBST(LIBCRYPT)
  655. if test $kde_have_crypt = yes; then
  656. AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function])
  657. fi
  658. AC_CHECK_SOCKLEN_T
  659. AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
  660. if test $ac_cv_lib_dnet_dnet_ntoa = no; then
  661. AC_CHECK_LIB(dnet_stub, dnet_ntoa,
  662. [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"])
  663. fi
  664. AC_CHECK_FUNC(inet_ntoa)
  665. if test $ac_cv_func_inet_ntoa = no; then
  666. AC_CHECK_LIB(nsl, inet_ntoa, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl")
  667. fi
  668. AC_CHECK_FUNC(connect)
  669. if test $ac_cv_func_connect = no; then
  670. AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", ,
  671. $X_EXTRA_LIBS)
  672. fi
  673. AC_CHECK_FUNC(remove)
  674. if test $ac_cv_func_remove = no; then
  675. AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix")
  676. fi
  677. # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
  678. AC_CHECK_FUNC(shmat, ,
  679. AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"))
  680. # more headers that need to be explicitly included on darwin
  681. AC_CHECK_HEADERS(sys/types.h stdint.h)
  682. # darwin requires a poll emulation library
  683. AC_CHECK_LIB(poll, poll, LIB_POLL="-lpoll")
  684. # CoreAudio framework
  685. AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [
  686. AC_DEFINE(HAVE_COREAUDIO, 1, [Define if you have the CoreAudio API])
  687. FRAMEWORK_COREAUDIO="-Xlinker -framework -Xlinker CoreAudio"
  688. ])
  689. AC_CHECK_RES_INIT
  690. AC_SUBST(LIB_POLL)
  691. AC_SUBST(FRAMEWORK_COREAUDIO)
  692. LIBSOCKET="$X_EXTRA_LIBS"
  693. AC_SUBST(LIBSOCKET)
  694. AC_SUBST(X_EXTRA_LIBS)
  695. AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4
  696. AC_SUBST(LIBUCB)
  697. case $host in dnl this *is* LynxOS specific
  698. *-*-lynxos* )
  699. AC_MSG_CHECKING([LynxOS header file wrappers])
  700. [CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"]
  701. AC_MSG_RESULT(disabled)
  702. AC_CHECK_LIB(bsd, gethostbyname, [LIBSOCKET="-lbsd"]) dnl for LynxOS
  703. ;;
  704. esac
  705. KDE_CHECK_TYPES
  706. KDE_CHECK_LIBDL
  707. KDE_CHECK_STRLCPY
  708. # darwin needs this to initialize the environment
  709. AC_CHECK_HEADERS(crt_externs.h)
  710. AC_CHECK_FUNC(_NSGetEnviron, [AC_DEFINE(HAVE_NSGETENVIRON, 1, [Define if your system needs _NSGetEnviron to set up the environment])])
  711. AH_VERBATIM(_DARWIN_ENVIRON,
  712. [
  713. #if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
  714. # include <sys/time.h>
  715. # include <crt_externs.h>
  716. # define environ (*_NSGetEnviron())
  717. #endif
  718. ])
  719. AH_VERBATIM(_AIX_STRINGS_H_BZERO,
  720. [
  721. /*
  722. * AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
  723. * that defines bzero.
  724. */
  725. #if defined(_AIX)
  726. #include <strings.h>
  727. #endif
  728. ])
  729. AC_CHECK_FUNCS([vsnprintf snprintf])
  730. AH_VERBATIM(_TRU64,[
  731. /*
  732. * On HP-UX, the declaration of vsnprintf() is needed every time !
  733. */
  734. #if !defined(HAVE_VSNPRINTF) || defined(hpux)
  735. #if __STDC__
  736. #include <stdarg.h>
  737. #include <stdlib.h>
  738. #else
  739. #include <varargs.h>
  740. #endif
  741. #ifdef __cplusplus
  742. extern "C"
  743. #endif
  744. int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
  745. #ifdef __cplusplus
  746. extern "C"
  747. #endif
  748. int snprintf(char *str, size_t n, char const *fmt, ...);
  749. #endif
  750. ])
  751. ])
  752. dnl ------------------------------------------------------------------------
  753. dnl Find the header files and libraries for X-Windows. Extended the
  754. dnl macro AC_PATH_X
  755. dnl ------------------------------------------------------------------------
  756. dnl
  757. AC_DEFUN([K_PATH_X],
  758. [
  759. AC_REQUIRE([KDE_MISC_TESTS])dnl
  760. AC_REQUIRE([KDE_CHECK_LIB64])
  761. AC_ARG_ENABLE(
  762. embedded,
  763. AC_HELP_STRING([--enable-embedded],[link to Qt-embedded, don't use X]),
  764. kde_use_qt_emb=$enableval,
  765. kde_use_qt_emb=no
  766. )
  767. AC_ARG_ENABLE(
  768. qtopia,
  769. AC_HELP_STRING([--enable-qtopia],[link to Qt-embedded, link to the Qtopia Environment]),
  770. kde_use_qt_emb_palm=$enableval,
  771. kde_use_qt_emb_palm=no
  772. )
  773. AC_ARG_ENABLE(
  774. mac,
  775. AC_HELP_STRING([--enable-mac],[link to Qt/Mac (don't use X)]),
  776. kde_use_qt_mac=$enableval,
  777. kde_use_qt_mac=no
  778. )
  779. if test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no"; then
  780. AC_MSG_CHECKING(for X)
  781. AC_CACHE_VAL(kde_cv_have_x,
  782. [# One or both of the vars are not set, and there is no cached value.
  783. if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then
  784. kde_x_includes=NO
  785. else
  786. kde_x_includes=$x_includes
  787. fi
  788. if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then
  789. kde_x_libraries=NO
  790. else
  791. kde_x_libraries=$x_libraries
  792. fi
  793. # below we use the standard autoconf calls
  794. ac_x_libraries=$kde_x_libraries
  795. ac_x_includes=$kde_x_includes
  796. KDE_PATH_X_DIRECT
  797. dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries.
  798. dnl Unfortunately, if compiling with the N32 ABI, this is not the correct
  799. dnl location. The correct location is /usr/lib32 or an undefined value
  800. dnl (the linker is smart enough to pick the correct default library).
  801. dnl Things work just fine if you use just AC_PATH_X_DIRECT.
  802. dnl Solaris has a similar problem. AC_PATH_X_XMKMF forces x_includes to
  803. dnl /usr/openwin/include, which doesn't work. /usr/include does work, so
  804. dnl x_includes should be left alone.
  805. case "$host" in
  806. mips-sgi-irix6*)
  807. ;;
  808. *-*-solaris*)
  809. ;;
  810. *)
  811. _AC_PATH_X_XMKMF
  812. if test -z "$ac_x_includes"; then
  813. ac_x_includes="."
  814. fi
  815. if test -z "$ac_x_libraries"; then
  816. ac_x_libraries="/usr/lib${tdelibsuff}"
  817. fi
  818. esac
  819. #from now on we use our own again
  820. # when the user already gave --x-includes, we ignore
  821. # what the standard autoconf macros told us.
  822. if test "$kde_x_includes" = NO; then
  823. kde_x_includes=$ac_x_includes
  824. fi
  825. # for --x-libraries too
  826. if test "$kde_x_libraries" = NO; then
  827. kde_x_libraries=$ac_x_libraries
  828. fi
  829. if test "$kde_x_includes" = NO; then
  830. AC_MSG_ERROR([Can't find X includes. Please check your installation and add the correct paths!])
  831. fi
  832. if test "$kde_x_libraries" = NO; then
  833. AC_MSG_ERROR([Can't find X libraries. Please check your installation and add the correct paths!])
  834. fi
  835. # Record where we found X for the cache.
  836. kde_cv_have_x="have_x=yes \
  837. kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
  838. ])dnl
  839. eval "$kde_cv_have_x"
  840. if test "$have_x" != yes; then
  841. AC_MSG_RESULT($have_x)
  842. no_x=yes
  843. else
  844. AC_MSG_RESULT([libraries $kde_x_libraries, headers $kde_x_includes])
  845. fi
  846. if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then
  847. X_INCLUDES=""
  848. x_includes="."; dnl better than nothing :-
  849. else
  850. x_includes=$kde_x_includes
  851. X_INCLUDES="-I$x_includes"
  852. fi
  853. if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE; then
  854. X_LDFLAGS=""
  855. x_libraries="/usr/lib"; dnl better than nothing :-
  856. else
  857. x_libraries=$kde_x_libraries
  858. X_LDFLAGS="-L$x_libraries"
  859. fi
  860. all_includes="$X_INCLUDES"
  861. all_libraries="$X_LDFLAGS"
  862. # Check for libraries that X11R6 Xt/Xaw programs need.
  863. ac_save_LDFLAGS="$LDFLAGS"
  864. LDFLAGS="$LDFLAGS $X_LDFLAGS"
  865. # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
  866. # check for ICE first), but we must link in the order -lSM -lICE or
  867. # we get undefined symbols. So assume we have SM if we have ICE.
  868. # These have to be linked with before -lX11, unlike the other
  869. # libraries we check for below, so use a different variable.
  870. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
  871. AC_CHECK_LIB(ICE, IceConnectionNumber,
  872. [LIBSM="-lSM -lICE"], , $X_EXTRA_LIBS)
  873. LDFLAGS="$ac_save_LDFLAGS"
  874. LIB_X11='-lX11 $(LIBSOCKET)'
  875. AC_MSG_CHECKING(for libXext)
  876. AC_CACHE_VAL(kde_cv_have_libXext,
  877. [
  878. kde_ldflags_safe="$LDFLAGS"
  879. kde_libs_safe="$LIBS"
  880. LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
  881. LIBS="-lXext -lX11 $LIBSOCKET"
  882. AC_TRY_LINK([
  883. #include <stdio.h>
  884. #ifdef STDC_HEADERS
  885. # include <stdlib.h>
  886. #endif
  887. ],
  888. [
  889. printf("hello Xext\n");
  890. ],
  891. kde_cv_have_libXext=yes,
  892. kde_cv_have_libXext=no
  893. )
  894. LDFLAGS=$kde_ldflags_safe
  895. LIBS=$kde_libs_safe
  896. ])
  897. AC_MSG_RESULT($kde_cv_have_libXext)
  898. if test "$kde_cv_have_libXext" = "no"; then
  899. AC_MSG_ERROR([We need a working libXext to proceed. Since configure
  900. can't find it itself, we stop here assuming that make wouldn't find
  901. them either.])
  902. fi
  903. LIB_XEXT="-lXext"
  904. QTE_NORTTI=""
  905. elif test "$kde_use_qt_emb" = "yes"; then
  906. dnl We're using QT Embedded
  907. CPPFLAGS=-DQWS
  908. CXXFLAGS="$CXXFLAGS -fno-rtti"
  909. QTE_NORTTI="-fno-rtti -DQWS"
  910. X_PRE_LIBS=""
  911. LIB_X11=""
  912. LIB_XEXT=""
  913. LIB_XRENDER=""
  914. LIBSM=""
  915. X_INCLUDES=""
  916. X_LDFLAGS=""
  917. x_includes=""
  918. x_libraries=""
  919. elif test "$kde_use_qt_mac" = "yes"; then
  920. dnl We're using QT/Mac (I use QT_MAC so that qglobal.h doesn't *have* to
  921. dnl be included to get the information) --Sam
  922. CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp"
  923. CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp"
  924. X_PRE_LIBS=""
  925. LIB_X11=""
  926. LIB_XEXT=""
  927. LIB_XRENDER=""
  928. LIBSM=""
  929. X_INCLUDES=""
  930. X_LDFLAGS=""
  931. x_includes=""
  932. x_libraries=""
  933. fi
  934. AC_SUBST(X_PRE_LIBS)
  935. AC_SUBST(LIB_X11)
  936. AC_SUBST(LIB_XRENDER)
  937. AC_SUBST(LIBSM)
  938. AC_SUBST(X_INCLUDES)
  939. AC_SUBST(X_LDFLAGS)
  940. AC_SUBST(x_includes)
  941. AC_SUBST(x_libraries)
  942. AC_SUBST(QTE_NORTTI)
  943. AC_SUBST(LIB_XEXT)
  944. ])
  945. AC_DEFUN([KDE_PRINT_QT_PROGRAM],
  946. [
  947. AC_REQUIRE([KDE_USE_TQT])
  948. cat > conftest.$ac_ext <<EOF
  949. #include "confdefs.h"
  950. #include <qglobal.h>
  951. #include <qapplication.h>
  952. EOF
  953. if test "$kde_qtver" = "2"; then
  954. cat >> conftest.$ac_ext <<EOF
  955. #include <qevent.h>
  956. #include <qstring.h>
  957. #include <qstyle.h>
  958. EOF
  959. if test $kde_qtsubver -gt 0; then
  960. cat >> conftest.$ac_ext <<EOF
  961. #if TQT_VERSION < 210
  962. #error 1
  963. #endif
  964. EOF
  965. fi
  966. fi
  967. if test "$kde_qtver" = "3"; then
  968. cat >> conftest.$ac_ext <<EOF
  969. #include <qcursor.h>
  970. #include <qstylefactory.h>
  971. #include <private/qucomextra_p.h>
  972. EOF
  973. fi
  974. echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
  975. cat >> conftest.$ac_ext <<EOF
  976. #error 1
  977. #endif
  978. int main() {
  979. EOF
  980. if test "$kde_qtver" = "2"; then
  981. cat >> conftest.$ac_ext <<EOF
  982. QStringList *t = new QStringList();
  983. Q_UNUSED(t);
  984. EOF
  985. if test $kde_qtsubver -gt 0; then
  986. cat >> conftest.$ac_ext <<EOF
  987. QString s;
  988. s.setLatin1("Elvis is alive", 14);
  989. EOF
  990. fi
  991. fi
  992. if test "$kde_qtver" = "3"; then
  993. cat >> conftest.$ac_ext <<EOF
  994. (void)QStyleFactory::create(QString::null);
  995. QCursor c(Qt::WhatsThisCursor);
  996. EOF
  997. fi
  998. cat >> conftest.$ac_ext <<EOF
  999. return 0;
  1000. }
  1001. EOF
  1002. ])
  1003. AC_DEFUN([KDE_USE_TQT],
  1004. [
  1005. if test -z "$1"; then
  1006. # Current default Qt version: 3.2
  1007. kde_qtver=3
  1008. kde_qtsubver=2
  1009. else
  1010. kde_qtsubver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
  1011. # following is the check if subversion isnt found in passed argument
  1012. if test "$kde_qtsubver" = "$1"; then
  1013. kde_qtsubver=1
  1014. fi
  1015. kde_qtver=`echo "$1" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
  1016. if test "$kde_qtver" = "1"; then
  1017. kde_qtsubver=42
  1018. fi
  1019. fi
  1020. if test -z "$2"; then
  1021. if test "$kde_qtver" = "2"; then
  1022. if test $kde_qtsubver -gt 0; then
  1023. kde_qt_minversion=">= Qt 2.2.2"
  1024. else
  1025. kde_qt_minversion=">= Qt 2.0.2"
  1026. fi
  1027. fi
  1028. if test "$kde_qtver" = "3"; then
  1029. if test $kde_qtsubver -gt 0; then
  1030. if test $kde_qtsubver -gt 1; then
  1031. kde_qt_minversion=">= Qt 3.2"
  1032. else
  1033. kde_qt_minversion=">= Qt 3.1 (20021021)"
  1034. fi
  1035. else
  1036. kde_qt_minversion=">= Qt 3.0"
  1037. fi
  1038. fi
  1039. if test "$kde_qtver" = "1"; then
  1040. kde_qt_minversion=">= 1.42 and < 2.0"
  1041. fi
  1042. else
  1043. kde_qt_minversion="$2"
  1044. fi
  1045. if test -z "$3"; then
  1046. if test $kde_qtver = 3; then
  1047. if test $kde_qtsubver -gt 0; then
  1048. kde_qt_verstring="TQT_VERSION >= 0x03@VER@00"
  1049. qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'`
  1050. kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"`
  1051. else
  1052. kde_qt_verstring="TQT_VERSION >= 300"
  1053. fi
  1054. fi
  1055. if test $kde_qtver = 2; then
  1056. if test $kde_qtsubver -gt 0; then
  1057. kde_qt_verstring="TQT_VERSION >= 222"
  1058. else
  1059. kde_qt_verstring="TQT_VERSION >= 200"
  1060. fi
  1061. fi
  1062. if test $kde_qtver = 1; then
  1063. kde_qt_verstring="TQT_VERSION >= 142 && TQT_VERSION < 200"
  1064. fi
  1065. else
  1066. kde_qt_verstring="$3"
  1067. fi
  1068. if test $kde_qtver = 3; then
  1069. kde_qt_dirs="$TQTDIR /usr/lib/qt3 /usr/lib/qt /usr/share/qt3"
  1070. fi
  1071. if test $kde_qtver = 2; then
  1072. kde_qt_dirs="$TQTDIR /usr/lib/qt2 /usr/lib/qt"
  1073. fi
  1074. if test $kde_qtver = 1; then
  1075. kde_qt_dirs="$TQTDIR /usr/lib/qt"
  1076. fi
  1077. ])
  1078. AC_DEFUN([KDE_CHECK_QT_DIRECT],
  1079. [
  1080. AC_REQUIRE([KDE_USE_TQT])
  1081. AC_MSG_CHECKING([if Qt compiles without flags])
  1082. AC_CACHE_VAL(kde_cv_qt_direct,
  1083. [
  1084. AC_LANG_SAVE
  1085. AC_LANG_CPLUSPLUS
  1086. ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH
  1087. ac_LIBRARY_PATH="$LIBRARY_PATH"
  1088. ac_cxxflags_safe="$CXXFLAGS"
  1089. ac_ldflags_safe="$LDFLAGS"
  1090. ac_libs_safe="$LIBS"
  1091. CXXFLAGS="$CXXFLAGS -I$tqt_includes"
  1092. LDFLAGS="$LDFLAGS $X_LDFLAGS"
  1093. if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
  1094. LIBS="$LIBTQT -lXext -lX11 $LIBSOCKET"
  1095. else
  1096. LIBS="$LIBTQT $LIBSOCKET"
  1097. fi
  1098. LD_LIBRARY_PATH=
  1099. export LD_LIBRARY_PATH
  1100. LIBRARY_PATH=
  1101. export LIBRARY_PATH
  1102. KDE_PRINT_QT_PROGRAM
  1103. if AC_TRY_EVAL(ac_link) && test -s conftest; then
  1104. kde_cv_qt_direct="yes"
  1105. else
  1106. kde_cv_qt_direct="no"
  1107. echo "configure: failed program was:" >&AC_FD_CC
  1108. cat conftest.$ac_ext >&AC_FD_CC
  1109. fi
  1110. rm -f conftest*
  1111. CXXFLAGS="$ac_cxxflags_safe"
  1112. LDFLAGS="$ac_ldflags_safe"
  1113. LIBS="$ac_libs_safe"
  1114. LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe"
  1115. export LD_LIBRARY_PATH
  1116. LIBRARY_PATH="$ac_LIBRARY_PATH"
  1117. export LIBRARY_PATH
  1118. AC_LANG_RESTORE
  1119. ])
  1120. if test "$kde_cv_qt_direct" = "yes"; then
  1121. AC_MSG_RESULT(yes)
  1122. $1
  1123. else
  1124. AC_MSG_RESULT(no)
  1125. $2
  1126. fi
  1127. ])
  1128. dnl ------------------------------------------------------------------------
  1129. dnl Try to find the Qt headers and libraries.
  1130. dnl $(QT_LDFLAGS) will be -Ltqtliblocation (if needed)
  1131. dnl and $(TQT_INCLUDES) will be -Iqthdrlocation (if needed)
  1132. dnl ------------------------------------------------------------------------
  1133. dnl
  1134. AC_DEFUN([AC_PATH_TQT_1_3],
  1135. [
  1136. AC_REQUIRE([K_PATH_X])
  1137. AC_REQUIRE([KDE_USE_TQT])
  1138. AC_REQUIRE([KDE_CHECK_LIB64])
  1139. dnl ------------------------------------------------------------------------
  1140. dnl Add configure flag to enable linking to MT version of Qt library.
  1141. dnl ------------------------------------------------------------------------
  1142. AC_ARG_ENABLE(
  1143. mt,
  1144. AC_HELP_STRING([--disable-mt],[link to non-threaded Qt (deprecated)]),
  1145. kde_use_qt_mt=$enableval,
  1146. [
  1147. if test $kde_qtver = 3; then
  1148. kde_use_qt_mt=yes
  1149. else
  1150. kde_use_qt_mt=no
  1151. fi
  1152. ]
  1153. )
  1154. USING_QT_MT=""
  1155. dnl ------------------------------------------------------------------------
  1156. dnl If we not get --disable-qt-mt then adjust some vars for the host.
  1157. dnl ------------------------------------------------------------------------
  1158. KDE_MT_LDFLAGS=
  1159. KDE_MT_LIBS=
  1160. if test "x$kde_use_qt_mt" = "xyes"; then
  1161. KDE_CHECK_THREADING
  1162. if test "x$kde_use_threading" = "xyes"; then
  1163. CPPFLAGS="$USE_THREADS -DTQT_THREAD_SUPPORT $CPPFLAGS"
  1164. KDE_MT_LDFLAGS="$USE_THREADS"
  1165. KDE_MT_LIBS="$LIBPTHREAD"
  1166. else
  1167. kde_use_qt_mt=no
  1168. fi
  1169. fi
  1170. AC_SUBST(KDE_MT_LDFLAGS)
  1171. AC_SUBST(KDE_MT_LIBS)
  1172. kde_qt_was_given=yes
  1173. dnl ------------------------------------------------------------------------
  1174. dnl If we haven't been told how to link to Qt, we work it out for ourselves.
  1175. dnl ------------------------------------------------------------------------
  1176. if test -z "$LIBTQT_GLOB"; then
  1177. if test "x$kde_use_qt_emb" = "xyes"; then
  1178. LIBTQT_GLOB="libtqte.*"
  1179. else
  1180. LIBTQT_GLOB="libtqt.*"
  1181. fi
  1182. fi
  1183. if test -z "$LIBTQT"; then
  1184. dnl ------------------------------------------------------------
  1185. dnl If we got --enable-embedded then adjust the Qt library name.
  1186. dnl ------------------------------------------------------------
  1187. if test "x$kde_use_qt_emb" = "xyes"; then
  1188. tqtlib="qte"
  1189. else
  1190. tqtlib="qt"
  1191. fi
  1192. kde_int_qt="-l$tqtlib"
  1193. else
  1194. kde_int_qt="$LIBTQT"
  1195. kde_lib_qt_set=yes
  1196. fi
  1197. if test -z "$LIBQPE"; then
  1198. dnl ------------------------------------------------------------
  1199. dnl If we got --enable-palmtop then add -lqpe to the link line
  1200. dnl ------------------------------------------------------------
  1201. if test "x$kde_use_qt_emb" = "xyes"; then
  1202. if test "x$kde_use_qt_emb_palm" = "xyes"; then
  1203. LIB_QPE="-lqpe"
  1204. else
  1205. LIB_QPE=""
  1206. fi
  1207. else
  1208. LIB_QPE=""
  1209. fi
  1210. fi
  1211. dnl ------------------------------------------------------------------------
  1212. dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
  1213. dnl ------------------------------------------------------------------------
  1214. if test "x$kde_use_qt_mt" = "xyes"; then
  1215. if test -z "$LIBTQT"; then
  1216. LIBTQT="-l$tqtlib-mt"
  1217. kde_int_qt="-l$tqtlib-mt"
  1218. else
  1219. LIBTQT="$tqtlib-mt"
  1220. kde_int_qt="$tqtlib-mt"
  1221. fi
  1222. LIBTQT_GLOB="lib$tqtlib-mt.*"
  1223. USING_QT_MT="using -mt"
  1224. else
  1225. LIBTQT="-l$tqtlib"
  1226. fi
  1227. if test $kde_qtver != 1; then
  1228. AC_REQUIRE([AC_FIND_PNG])
  1229. AC_REQUIRE([AC_FIND_JPEG])
  1230. LIBTQT="$LIBTQT $LIBPNG $LIBJPEG"
  1231. fi
  1232. if test $kde_qtver = 3; then
  1233. AC_REQUIRE([KDE_CHECK_LIBDL])
  1234. LIBTQT="$LIBTQT $LIBDL"
  1235. fi
  1236. AC_MSG_CHECKING([for Qt])
  1237. if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
  1238. LIBTQT="$LIBTQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
  1239. fi
  1240. ac_tqt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
  1241. qt_libraries=""
  1242. tqt_includes=""
  1243. AC_ARG_WITH(qt-dir,
  1244. AC_HELP_STRING([--with-qt-dir=DIR],[where the root of Qt is installed ]),
  1245. [ ac_tqt_includes="$withval"/include
  1246. ac_qt_libraries="$withval"/lib${tdelibsuff}
  1247. ac_qt_bindir="$withval"/bin
  1248. ])
  1249. AC_ARG_WITH(qt-includes,
  1250. AC_HELP_STRING([--with-qt-includes=DIR],[where the Qt includes are. ]),
  1251. [
  1252. ac_tqt_includes="$withval"
  1253. ])
  1254. kde_qt_libs_given=no
  1255. AC_ARG_WITH(qt-libraries,
  1256. AC_HELP_STRING([--with-qt-libraries=DIR],[where the Qt library is installed.]),
  1257. [ ac_qt_libraries="$withval"
  1258. kde_qt_libs_given=yes
  1259. ])
  1260. AC_CACHE_VAL(ac_cv_have_qt,
  1261. [#try to guess Qt locations
  1262. qt_incdirs=""
  1263. for dir in $kde_qt_dirs; do
  1264. qt_incdirs="$qt_incdirs $dir/include $dir"
  1265. done
  1266. qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/X11R6/include/qt2 /usr/include/qt3 $x_includes"
  1267. if test ! "$ac_tqt_includes" = "NO"; then
  1268. qt_incdirs="$ac_tqt_includes $qt_incdirs"
  1269. fi
  1270. if test "$kde_qtver" != "1"; then
  1271. kde_qt_header=qstyle.h
  1272. else
  1273. kde_qt_header=qglobal.h
  1274. fi
  1275. AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
  1276. ac_tqt_includes="$qt_incdir"
  1277. qt_libdirs=""
  1278. for dir in $kde_qt_dirs; do
  1279. qt_libdirs="$qt_libdirs $dir/lib${tdelibsuff} $dir"
  1280. done
  1281. qt_libdirs="$TQTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
  1282. if test ! "$ac_qt_libraries" = "NO"; then
  1283. qt_libdir=$ac_qt_libraries
  1284. else
  1285. qt_libdirs="$ac_qt_libraries $qt_libdirs"
  1286. # if the Qt was given, the chance is too big that libtqt.* doesn't exist
  1287. qt_libdir=NONE
  1288. for dir in $qt_libdirs; do
  1289. try="ls -1 $dir/${LIBTQT_GLOB}"
  1290. if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
  1291. done
  1292. fi
  1293. for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
  1294. if test -e "$a"; then
  1295. LIBTQT="$LIBTQT ${kde_int_qt}_incremental"
  1296. break
  1297. fi
  1298. done
  1299. ac_qt_libraries="$qt_libdir"
  1300. AC_LANG_SAVE
  1301. AC_LANG_CPLUSPLUS
  1302. ac_cxxflags_safe="$CXXFLAGS"
  1303. ac_ldflags_safe="$LDFLAGS"
  1304. ac_libs_safe="$LIBS"
  1305. CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
  1306. LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
  1307. LIBS="$LIBS $LIBTQT $KDE_MT_LIBS"
  1308. KDE_PRINT_QT_PROGRAM
  1309. if AC_TRY_EVAL(ac_link) && test -s conftest; then
  1310. rm -f conftest*
  1311. else
  1312. echo "configure: failed program was:" >&AC_FD_CC
  1313. cat conftest.$ac_ext >&AC_FD_CC
  1314. ac_qt_libraries="NO"
  1315. fi
  1316. rm -f conftest*
  1317. CXXFLAGS="$ac_cxxflags_safe"
  1318. LDFLAGS="$ac_ldflags_safe"
  1319. LIBS="$ac_libs_safe"
  1320. AC_LANG_RESTORE
  1321. if test "$ac_tqt_includes" = NO || test "$ac_qt_libraries" = NO; then
  1322. ac_cv_have_qt="have_qt=no"
  1323. ac_qt_notfound=""
  1324. missing_qt_mt=""
  1325. if test "$ac_tqt_includes" = NO; then
  1326. if test "$ac_qt_libraries" = NO; then
  1327. ac_qt_notfound="(headers and libraries)";
  1328. else
  1329. ac_qt_notfound="(headers)";
  1330. fi
  1331. else
  1332. if test "x$kde_use_qt_mt" = "xyes"; then
  1333. missing_qt_mt="
  1334. Make sure that you have compiled Qt with thread support!"
  1335. ac_qt_notfound="(library $tqtlib-mt)";
  1336. else
  1337. ac_qt_notfound="(library $tqtlib)";
  1338. fi
  1339. fi
  1340. AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
  1341. For more details about this problem, look at the end of config.log.$missing_qt_mt])
  1342. else
  1343. have_qt="yes"
  1344. fi
  1345. ])
  1346. eval "$ac_cv_have_qt"
  1347. if test "$have_qt" != yes; then
  1348. AC_MSG_RESULT([$have_qt]);
  1349. else
  1350. ac_cv_have_qt="have_qt=yes \
  1351. ac_tqt_includes=$ac_tqt_includes ac_qt_libraries=$ac_qt_libraries"
  1352. AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_tqt_includes $USING_QT_MT])
  1353. qt_libraries="$ac_qt_libraries"
  1354. tqt_includes="$ac_tqt_includes"
  1355. fi
  1356. if test ! "$kde_qt_libs_given" = "yes" && test ! "$kde_qtver" = 3; then
  1357. KDE_CHECK_QT_DIRECT(qt_libraries= ,[])
  1358. fi
  1359. AC_SUBST(qt_libraries)
  1360. AC_SUBST(tqt_includes)
  1361. if test "$tqt_includes" = "$x_includes" || test -z "$tqt_includes"; then
  1362. TQT_INCLUDES=""
  1363. else
  1364. TQT_INCLUDES="-I$tqt_includes"
  1365. all_includes="$TQT_INCLUDES $all_includes"
  1366. fi
  1367. if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then
  1368. QT_LDFLAGS=""
  1369. else
  1370. QT_LDFLAGS="-L$qt_libraries"
  1371. all_libraries="$all_libraries $QT_LDFLAGS"
  1372. fi
  1373. test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
  1374. AC_SUBST(TQT_INCLUDES)
  1375. AC_SUBST(QT_LDFLAGS)
  1376. AC_PATH_TQT_MOC_UIC
  1377. KDE_CHECK_QT_JPEG
  1378. if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
  1379. LIB_TQT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG) -lXext $(LIB_X11) $(LIBSM)'
  1380. else
  1381. LIB_TQT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG)'
  1382. fi
  1383. test -z "$KDE_MT_LIBS" || LIB_TQT="$LIB_TQT $KDE_MT_LIBS"
  1384. for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
  1385. if test -e "$a"; then
  1386. LIB_TQT="$LIB_TQT ${kde_int_qt}_incremental"
  1387. break
  1388. fi
  1389. done
  1390. AC_SUBST(LIB_TQT)
  1391. AC_SUBST(LIB_QPE)
  1392. AC_SUBST(kde_qtver)
  1393. ])
  1394. AC_DEFUN([AC_PATH_TQT],
  1395. [
  1396. AC_PATH_TQT_1_3
  1397. ])
  1398. AC_DEFUN([KDE_CHECK_UIC_PLUGINS],
  1399. [
  1400. AC_REQUIRE([AC_PATH_TQT_MOC_UIC])
  1401. if test x$ac_uic_supports_libpath = xyes; then
  1402. AC_MSG_CHECKING([if UIC has KDE plugins available])
  1403. AC_CACHE_VAL(kde_cv_uic_plugins,
  1404. [
  1405. cat > actest.ui << EOF
  1406. <!DOCTYPE UI><UI version="3.0" stdsetdef="1">
  1407. <class>NewConnectionDialog</class>
  1408. <widget class="QDialog">
  1409. <widget class="KLineEdit">
  1410. <property name="name">
  1411. <cstring>testInput</cstring>
  1412. </property>
  1413. </widget>
  1414. </widget>
  1415. </UI>
  1416. EOF
  1417. kde_cv_uic_plugins=no
  1418. kde_line="$UIC_PATH -L $kde_widgetdir"
  1419. if test x$ac_uic_supports_nounload = xyes; then
  1420. kde_line="$kde_line -nounload"
  1421. fi
  1422. kde_line="$kde_line -impl actest.h actest.ui > actest.cpp"
  1423. if AC_TRY_EVAL(kde_line); then
  1424. # if you're trying to debug this check and think it's incorrect,
  1425. # better check your installation. The check _is_ correct - your
  1426. # installation is not.
  1427. if test -f actest.cpp && grep klineedit actest.cpp > /dev/null; then
  1428. kde_cv_uic_plugins=yes
  1429. fi
  1430. fi
  1431. rm -f actest.ui actest.cpp
  1432. ])
  1433. AC_MSG_RESULT([$kde_cv_uic_plugins])
  1434. if test "$kde_cv_uic_plugins" != yes; then
  1435. AC_MSG_ERROR([you need to install tdelibs first.])
  1436. fi
  1437. fi
  1438. ])
  1439. AC_DEFUN([KDE_CHECK_FINAL],
  1440. [
  1441. AC_ARG_ENABLE(final,
  1442. AC_HELP_STRING([--enable-final],
  1443. [build size optimized apps (experimental - needs lots of memory)]),
  1444. kde_use_final=$enableval, kde_use_final=no)
  1445. if test "x$kde_use_final" = "xyes"; then
  1446. KDE_USE_FINAL_TRUE=""
  1447. KDE_USE_FINAL_FALSE="#"
  1448. else
  1449. KDE_USE_FINAL_TRUE="#"
  1450. KDE_USE_FINAL_FALSE=""
  1451. fi
  1452. AC_SUBST(KDE_USE_FINAL_TRUE)
  1453. AC_SUBST(KDE_USE_FINAL_FALSE)
  1454. ])
  1455. AC_DEFUN([KDE_CHECK_CLOSURE],
  1456. [
  1457. AC_ARG_ENABLE(closure,
  1458. AC_HELP_STRING([--enable-closure],[delay template instantiation]),
  1459. kde_use_closure=$enableval, kde_use_closure=no)
  1460. KDE_NO_UNDEFINED=""
  1461. if test "x$kde_use_closure" = "xyes"; then
  1462. KDE_USE_CLOSURE_TRUE=""
  1463. KDE_USE_CLOSURE_FALSE="#"
  1464. # CXXFLAGS="$CXXFLAGS $REPO"
  1465. else
  1466. KDE_USE_CLOSURE_TRUE="#"
  1467. KDE_USE_CLOSURE_FALSE=""
  1468. KDE_NO_UNDEFINED=""
  1469. case $host in
  1470. *-*-linux-gnu)
  1471. KDE_CHECK_COMPILER_FLAG([Wl,--no-undefined],
  1472. [KDE_CHECK_COMPILER_FLAG([Wl,--allow-shlib-undefined],
  1473. [KDE_NO_UNDEFINED="-Wl,--no-undefined -Wl,--allow-shlib-undefined"],
  1474. [KDE_NO_UNDEFINED=""])],
  1475. [KDE_NO_UNDEFINED=""])
  1476. ;;
  1477. esac
  1478. fi
  1479. AC_SUBST(KDE_USE_CLOSURE_TRUE)
  1480. AC_SUBST(KDE_USE_CLOSURE_FALSE)
  1481. AC_SUBST(KDE_NO_UNDEFINED)
  1482. ])
  1483. AC_DEFUN([KDE_CHECK_NMCHECK],
  1484. [
  1485. AC_ARG_ENABLE(nmcheck,AC_HELP_STRING([--enable-nmcheck],[enable automatic namespace cleanness check]),
  1486. kde_use_nmcheck=$enableval, kde_use_nmcheck=no)
  1487. if test "$kde_use_nmcheck" = "yes"; then
  1488. KDE_USE_NMCHECK_TRUE=""
  1489. KDE_USE_NMCHECK_FALSE="#"
  1490. else
  1491. KDE_USE_NMCHECK_TRUE="#"
  1492. KDE_USE_NMCHECK_FALSE=""
  1493. fi
  1494. AC_SUBST(KDE_USE_NMCHECK_TRUE)
  1495. AC_SUBST(KDE_USE_NMCHECK_FALSE)
  1496. ])
  1497. AC_DEFUN([KDE_EXPAND_MAKEVAR], [
  1498. savex=$exec_prefix
  1499. test "x$exec_prefix" = xNONE && exec_prefix=$prefix
  1500. tmp=$$2
  1501. while $1=`eval echo "$tmp"`; test "x$$1" != "x$tmp"; do tmp=$$1; done
  1502. exec_prefix=$savex
  1503. ])
  1504. dnl ------------------------------------------------------------------------
  1505. dnl Now, the same with KDE
  1506. dnl $(KDE_LDFLAGS) will be the kdeliblocation (if needed)
  1507. dnl and $(kde_includes) will be the kdehdrlocation (if needed)
  1508. dnl ------------------------------------------------------------------------
  1509. dnl
  1510. AC_DEFUN([AC_BASE_PATH_KDE],
  1511. [
  1512. AC_REQUIRE([KDE_CHECK_STL])
  1513. AC_REQUIRE([AC_PATH_TQT])dnl
  1514. AC_REQUIRE([KDE_CHECK_LIB64])
  1515. AC_CHECK_RPATH
  1516. AC_MSG_CHECKING([for KDE])
  1517. if test "${prefix}" != NONE; then
  1518. kde_includes=${includedir}
  1519. KDE_EXPAND_MAKEVAR(ac_kde_includes, includedir)
  1520. kde_libraries=${libdir}
  1521. KDE_EXPAND_MAKEVAR(ac_kde_libraries, libdir)
  1522. else
  1523. ac_kde_includes=
  1524. ac_kde_libraries=
  1525. kde_libraries=""
  1526. kde_includes=""
  1527. fi
  1528. AC_CACHE_VAL(ac_cv_have_kde,
  1529. [#try to guess kde locations
  1530. if test "$kde_qtver" = 1; then
  1531. kde_check_header="ksock.h"
  1532. kde_check_lib="libtdecore.la"
  1533. else
  1534. kde_check_header="ksharedptr.h"
  1535. kde_check_lib="libtdeio.la"
  1536. fi
  1537. if test -z "$1"; then
  1538. kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/tde /usr/include /opt/trinity/include /opt/kde/include $x_includes $tqt_includes"
  1539. test -n "$TDEDIR" && kde_incdirs="$TDEDIR/include $TDEDIR/include/tde $TDEDIR $kde_incdirs"
  1540. kde_incdirs="$ac_kde_includes $kde_incdirs"
  1541. AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
  1542. ac_kde_includes="$kde_incdir"
  1543. if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then
  1544. AC_MSG_ERROR([
  1545. in the prefix, you've chosen, are no KDE headers installed. This will fail.
  1546. So, check this please and use another prefix!])
  1547. fi
  1548. kde_libdirs="/usr/lib/kde/lib${tdelibsuff} /usr/local/kde/lib${tdelibsuff} /usr/kde/lib${tdelibsuff} /usr/lib${tdelibsuff}/kde /usr/lib${tdelibsuff}/trinity /usr/lib${tdelibsuff} /usr/X11R6/lib${tdelibsuff} /usr/local/lib${tdelibsuff} /opt/trinity/lib${tdelibsuff} /opt/kde/lib${tdelibsuff} /usr/X11R6/kde/lib${tdelibsuff}"
  1549. test -n "$TDEDIR" && kde_libdirs="$TDEDIR/lib${tdelibsuff} $TDEDIR $kde_libdirs"
  1550. kde_libdirs="$ac_kde_libraries $libdir $kde_libdirs"
  1551. AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
  1552. ac_kde_libraries="$kde_libdir"
  1553. kde_widgetdir=NO
  1554. dnl this might be somewhere else
  1555. AC_FIND_FILE("trinity/plugins/designer/tdewidgets.la", $kde_libdirs, kde_widgetdir)
  1556. if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then
  1557. AC_MSG_ERROR([
  1558. in the prefix, you've chosen, are no KDE libraries installed. This will fail.
  1559. So, check this please and use another prefix!])
  1560. fi
  1561. if test -n "$kde_widgetdir" && test ! -r "$kde_widgetdir/trinity/plugins/designer/tdewidgets.la"; then
  1562. AC_MSG_ERROR([
  1563. I can't find the designer plugins. These are required and should have been installed
  1564. by tdelibs])
  1565. fi
  1566. if test -n "$kde_widgetdir"; then
  1567. kde_widgetdir="$kde_widgetdir/trinity/plugins/designer"
  1568. fi
  1569. if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO || test "$kde_widgetdir" = NO; then
  1570. ac_cv_have_kde="have_kde=no"
  1571. else
  1572. ac_cv_have_kde="have_kde=yes \
  1573. ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
  1574. fi
  1575. else dnl test -z $1
  1576. ac_cv_have_kde="have_kde=no"
  1577. fi
  1578. ])dnl
  1579. eval "$ac_cv_have_kde"
  1580. if test "$have_kde" != "yes"; then
  1581. if test "${prefix}" = NONE; then
  1582. ac_kde_prefix="$ac_default_prefix"
  1583. else
  1584. ac_kde_prefix="$prefix"
  1585. fi
  1586. if test "$exec_prefix" = NONE; then
  1587. ac_kde_exec_prefix="$ac_kde_prefix"
  1588. AC_MSG_RESULT([will be installed in $ac_kde_prefix])
  1589. else
  1590. ac_kde_exec_prefix="$exec_prefix"
  1591. AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix])
  1592. fi
  1593. kde_libraries="${libdir}"
  1594. kde_includes="${includedir}"
  1595. else
  1596. ac_cv_have_kde="have_kde=yes \
  1597. ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
  1598. AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes])
  1599. kde_libraries="$ac_kde_libraries"
  1600. kde_includes="$ac_kde_includes"
  1601. fi
  1602. AC_SUBST(kde_libraries)
  1603. AC_SUBST(kde_includes)
  1604. if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$tqt_includes" || test "$kde_includes" = "/usr/include"; then
  1605. KDE_INCLUDES=""
  1606. else
  1607. KDE_INCLUDES="-I$kde_includes"
  1608. all_includes="$KDE_INCLUDES $all_includes"
  1609. fi
  1610. KDE_DEFAULT_CXXFLAGS="-DTQT_NO_ASCII_CAST -DTQT_NO_STL -DTQT_NO_COMPAT -DTQT_NO_TRANSLATION"
  1611. KDE_LDFLAGS="-L$kde_libraries"
  1612. if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then
  1613. all_libraries="$all_libraries $KDE_LDFLAGS"
  1614. fi
  1615. AC_SUBST(KDE_LDFLAGS)
  1616. AC_SUBST(KDE_INCLUDES)
  1617. AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
  1618. all_libraries="$all_libraries $USER_LDFLAGS"
  1619. all_includes="$all_includes $USER_INCLUDES"
  1620. AC_SUBST(all_includes)
  1621. AC_SUBST(all_libraries)
  1622. if test -z "$1"; then
  1623. KDE_CHECK_UIC_PLUGINS
  1624. fi
  1625. ac_kde_libraries="$kde_libdir"
  1626. AC_SUBST(AUTODIRS)
  1627. ])
  1628. AC_DEFUN([KDE_CHECK_EXTRA_LIBS],
  1629. [
  1630. AC_MSG_CHECKING(for extra includes)
  1631. AC_ARG_WITH(extra-includes,AC_HELP_STRING([--with-extra-includes=DIR],[adds non standard include paths]),
  1632. kde_use_extra_includes="$withval",
  1633. kde_use_extra_includes=NONE
  1634. )
  1635. kde_extra_includes=
  1636. if test -n "$kde_use_extra_includes" && \
  1637. test "$kde_use_extra_includes" != "NONE"; then
  1638. ac_save_ifs=$IFS
  1639. IFS=':'
  1640. for dir in $kde_use_extra_includes; do
  1641. kde_extra_includes="$kde_extra_includes $dir"
  1642. USER_INCLUDES="$USER_INCLUDES -I$dir"
  1643. done
  1644. IFS=$ac_save_ifs
  1645. kde_use_extra_includes="added"
  1646. else
  1647. kde_use_extra_includes="no"
  1648. fi
  1649. AC_SUBST(USER_INCLUDES)
  1650. AC_MSG_RESULT($kde_use_extra_includes)
  1651. kde_extra_libs=
  1652. AC_MSG_CHECKING(for extra libs)
  1653. AC_ARG_WITH(extra-libs,AC_HELP_STRING([--with-extra-libs=DIR],[adds non standard library paths]),
  1654. kde_use_extra_libs=$withval,
  1655. kde_use_extra_libs=NONE
  1656. )
  1657. if test -n "$kde_use_extra_libs" && \
  1658. test "$kde_use_extra_libs" != "NONE"; then
  1659. ac_save_ifs=$IFS
  1660. IFS=':'
  1661. for dir in $kde_use_extra_libs; do
  1662. kde_extra_libs="$kde_extra_libs $dir"
  1663. KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir"
  1664. USER_LDFLAGS="$USER_LDFLAGS -L$dir"
  1665. done
  1666. IFS=$ac_save_ifs
  1667. kde_use_extra_libs="added"
  1668. else
  1669. kde_use_extra_libs="no"
  1670. fi
  1671. AC_SUBST(USER_LDFLAGS)
  1672. AC_MSG_RESULT($kde_use_extra_libs)
  1673. ])
  1674. AC_DEFUN([KDE_1_CHECK_PATH_HEADERS],
  1675. [
  1676. AC_MSG_CHECKING([for KDE headers installed])
  1677. AC_LANG_SAVE
  1678. AC_LANG_CPLUSPLUS
  1679. cat > conftest.$ac_ext <<EOF
  1680. #ifdef STDC_HEADERS
  1681. # include <stdlib.h>
  1682. #endif
  1683. #include <stdio.h>
  1684. #include "confdefs.h"
  1685. #include <kapp.h>
  1686. int main() {
  1687. printf("kde_htmldir=\\"%s\\"\n", TDEApplication::kde_htmldir().data());
  1688. printf("kde_appsdir=\\"%s\\"\n", TDEApplication::kde_appsdir().data());
  1689. printf("kde_icondir=\\"%s\\"\n", TDEApplication::kde_icondir().data());
  1690. printf("kde_sounddir=\\"%s\\"\n", TDEApplication::kde_sounddir().data());
  1691. printf("kde_datadir=\\"%s\\"\n", TDEApplication::kde_datadir().data());
  1692. printf("kde_locale=\\"%s\\"\n", TDEApplication::kde_localedir().data());
  1693. printf("kde_cgidir=\\"%s\\"\n", TDEApplication::kde_cgidir().data());
  1694. printf("kde_confdir=\\"%s\\"\n", TDEApplication::kde_configdir().data());
  1695. printf("kde_mimedir=\\"%s\\"\n", TDEApplication::kde_mimedir().data());
  1696. printf("kde_toolbardir=\\"%s\\"\n", TDEApplication::kde_toolbardir().data());
  1697. printf("kde_wallpaperdir=\\"%s\\"\n",
  1698. TDEApplication::kde_wallpaperdir().data());
  1699. printf("kde_bindir=\\"%s\\"\n", TDEApplication::kde_bindir().data());
  1700. printf("kde_partsdir=\\"%s\\"\n", TDEApplication::kde_partsdir().data());
  1701. printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
  1702. printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
  1703. printf("kde_moduledir=\\"/tmp/dummy\\"\n");
  1704. printf("kde_styledir=\\"/tmp/dummy\\"\n");
  1705. printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
  1706. printf("xdg_appsdir=\\"/tmp/dummy\\"\n");
  1707. printf("xdg_menudir=\\"/tmp/dummy\\"\n");
  1708. printf("xdg_directorydir=\\"/tmp/dummy\\"\n");
  1709. printf("kde_kcfgdir=\\"/tmp/dummy\\"\n");
  1710. return 0;
  1711. }
  1712. EOF
  1713. ac_save_CPPFLAGS=$CPPFLAGS
  1714. CPPFLAGS="$all_includes $CPPFLAGS"
  1715. if AC_TRY_EVAL(ac_compile); then
  1716. AC_MSG_RESULT(yes)
  1717. else
  1718. AC_MSG_ERROR([your system is not able to compile a small KDE application!
  1719. Check, if you installed the KDE header files correctly.
  1720. For more details about this problem, look at the end of config.log.])
  1721. fi
  1722. CPPFLAGS=$ac_save_CPPFLAGS
  1723. AC_LANG_RESTORE
  1724. ])
  1725. AC_DEFUN([KDE_CHECK_KDEQTADDON],
  1726. [
  1727. AC_MSG_CHECKING(for kde-qt-addon)
  1728. AC_CACHE_VAL(kde_cv_have_kdetqtaddon,
  1729. [
  1730. kde_ldflags_safe="$LDFLAGS"
  1731. kde_libs_safe="$LIBS"
  1732. kde_cxxflags_safe="$CXXFLAGS"
  1733. LIBS="-lkde-qt-addon $LIBTQT $LIBS"
  1734. CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/tde $all_includes"
  1735. LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
  1736. AC_TRY_LINK([
  1737. #include <qdom.h>
  1738. ],
  1739. [
  1740. QDomDocument doc;
  1741. ],
  1742. kde_cv_have_kdetqtaddon=yes,
  1743. kde_cv_have_kdetqtaddon=no
  1744. )
  1745. LDFLAGS=$kde_ldflags_safe
  1746. LIBS=$kde_libs_safe
  1747. CXXFLAGS=$kde_cxxflags_safe
  1748. ])
  1749. AC_MSG_RESULT($kde_cv_have_kdetqtaddon)
  1750. if test "$kde_cv_have_kdetqtaddon" = "no"; then
  1751. AC_MSG_ERROR([Can't find libkde-qt-addon. You need to install it first.
  1752. It is a separate package (and CVS module) named kde-qt-addon.])
  1753. fi
  1754. ])
  1755. AC_DEFUN([KDE_CREATE_LIBS_ALIASES],
  1756. [
  1757. AC_REQUIRE([KDE_MISC_TESTS])
  1758. AC_REQUIRE([KDE_CHECK_LIBDL])
  1759. AC_REQUIRE([K_PATH_X])
  1760. if test $kde_qtver = 3; then
  1761. AC_SUBST(LIB_TDECORE, "-ltdecore")
  1762. AC_SUBST(LIB_TDEUI, "-ltdeui")
  1763. AC_SUBST(LIB_TDEIO, "-ltdeio")
  1764. AC_SUBST(LIB_SMB, "-lsmb")
  1765. AC_SUBST(LIB_KAB, "-lkab")
  1766. AC_SUBST(LIB_TDEABC, "-ltdeabc")
  1767. AC_SUBST(LIB_TDEHTML, "-ltdehtml")
  1768. AC_SUBST(LIB_TDESPELL, "-ltdespell")
  1769. AC_SUBST(LIB_TDEPARTS, "-ltdeparts")
  1770. AC_SUBST(LIB_TDEPRINT, "-ltdeprint")
  1771. AC_SUBST(LIB_TDEUTILS, "-ltdeutils")
  1772. AC_SUBST(LIB_TDEPIM, "-ltdepim")
  1773. # these are for backward compatibility
  1774. AC_SUBST(LIB_TDESYCOCA, "-ltdeio")
  1775. AC_SUBST(LIB_TDEFILE, "-ltdeio")
  1776. elif test $kde_qtver = 2; then
  1777. AC_SUBST(LIB_TDECORE, "-ltdecore")
  1778. AC_SUBST(LIB_TDEUI, "-ltdeui")
  1779. AC_SUBST(LIB_TDEIO, "-ltdeio")
  1780. AC_SUBST(LIB_TDESYCOCA, "-ltdesycoca")
  1781. AC_SUBST(LIB_SMB, "-lsmb")
  1782. AC_SUBST(LIB_TDEFILE, "-ltdefile")
  1783. AC_SUBST(LIB_KAB, "-lkab")
  1784. AC_SUBST(LIB_TDEHTML, "-ltdehtml")
  1785. AC_SUBST(LIB_TDESPELL, "-ltdespell")
  1786. AC_SUBST(LIB_TDEPARTS, "-ltdeparts")
  1787. AC_SUBST(LIB_TDEPRINT, "-ltdeprint")
  1788. else
  1789. AC_SUBST(LIB_TDECORE, "-ltdecore -lXext $(LIB_TQT)")
  1790. AC_SUBST(LIB_TDEUI, "-ltdeui $(LIB_TDECORE)")
  1791. AC_SUBST(LIB_KFM, "-lkfm $(LIB_TDECORE)")
  1792. AC_SUBST(LIB_TDEFILE, "-ltdefile $(LIB_KFM) $(LIB_TDEUI)")
  1793. AC_SUBST(LIB_KAB, "-lkab $(LIB_KIMGIO) $(LIB_TDECORE)")
  1794. fi
  1795. ])
  1796. AC_DEFUN([AC_PATH_KDE],
  1797. [
  1798. AC_BASE_PATH_KDE
  1799. AC_ARG_ENABLE(path-check,AC_HELP_STRING([--disable-path-check],[don't try to find out, where to install]),
  1800. [
  1801. if test "$enableval" = "no";
  1802. then ac_use_path_checking="default"
  1803. else ac_use_path_checking=""
  1804. fi
  1805. ],
  1806. [
  1807. if test "$kde_qtver" = 1;
  1808. then ac_use_path_checking=""
  1809. else ac_use_path_checking="default"
  1810. fi
  1811. ]
  1812. )
  1813. AC_CREATE_KFSSTND($ac_use_path_checking)
  1814. AC_SUBST_KFSSTND
  1815. KDE_CREATE_LIBS_ALIASES
  1816. ])
  1817. dnl KDE_CHECK_FUNC_EXT(<func>, [headers], [sample-use], [C prototype], [autoheader define], [call if found])
  1818. AC_DEFUN([KDE_CHECK_FUNC_EXT],
  1819. [
  1820. AC_MSG_CHECKING(for $1)
  1821. AC_CACHE_VAL(kde_cv_func_$1,
  1822. [
  1823. AC_LANG_SAVE
  1824. AC_LANG_CPLUSPLUS
  1825. save_CXXFLAGS="$CXXFLAGS"
  1826. kde_safe_LIBS="$LIBS"
  1827. LIBS="$LIBS $X_EXTRA_LIBS"
  1828. if test "$GXX" = "yes"; then
  1829. CXXFLAGS="$CXXFLAGS -pedantic-errors"
  1830. fi
  1831. AC_TRY_COMPILE([
  1832. $2
  1833. ],
  1834. [
  1835. $3
  1836. ],
  1837. kde_cv_func_$1=yes,
  1838. kde_cv_func_$1=no)
  1839. CXXFLAGS="$save_CXXFLAGS"
  1840. LIBS="$kde_safe_LIBS"
  1841. AC_LANG_RESTORE
  1842. ])
  1843. AC_MSG_RESULT($kde_cv_func_$1)
  1844. AC_MSG_CHECKING([if $1 needs custom prototype])
  1845. AC_CACHE_VAL(kde_cv_proto_$1,
  1846. [
  1847. if test "x$kde_cv_func_$1" = xyes; then
  1848. kde_cv_proto_$1=no
  1849. else
  1850. case "$1" in
  1851. setenv|unsetenv|usleep|random|srandom|seteuid|mkstemps|mkstemp|revoke|vsnprintf|strlcpy|strlcat)
  1852. kde_cv_proto_$1="yes - in libtdefakes"
  1853. ;;
  1854. *)
  1855. kde_cv_proto_$1=unknown
  1856. ;;
  1857. esac
  1858. fi
  1859. if test "x$kde_cv_proto_$1" = xunknown; then
  1860. AC_LANG_SAVE
  1861. AC_LANG_CPLUSPLUS
  1862. kde_safe_libs=$LIBS
  1863. LIBS="$LIBS $X_EXTRA_LIBS"
  1864. AC_TRY_LINK([
  1865. $2
  1866. extern "C" $4;
  1867. ],
  1868. [
  1869. $3
  1870. ],
  1871. [ kde_cv_func_$1=yes
  1872. kde_cv_proto_$1=yes ],
  1873. [kde_cv_proto_$1="$1 unavailable"]
  1874. )
  1875. LIBS=$kde_safe_libs
  1876. AC_LANG_RESTORE
  1877. fi
  1878. ])
  1879. AC_MSG_RESULT($kde_cv_proto_$1)
  1880. if test "x$kde_cv_func_$1" = xyes; then
  1881. AC_DEFINE(HAVE_$5, 1, [Define if you have $1])
  1882. $6
  1883. fi
  1884. if test "x$kde_cv_proto_$1" = xno; then
  1885. AC_DEFINE(HAVE_$5_PROTO, 1,
  1886. [Define if you have the $1 prototype])
  1887. fi
  1888. AH_VERBATIM([_HAVE_$5_PROTO],
  1889. [
  1890. #if !defined(HAVE_$5_PROTO)
  1891. #ifdef __cplusplus
  1892. extern "C" {
  1893. #endif
  1894. $4;
  1895. #ifdef __cplusplus
  1896. }
  1897. #endif
  1898. #endif
  1899. ])
  1900. ])
  1901. AC_DEFUN([AC_CHECK_SETENV],
  1902. [
  1903. KDE_CHECK_FUNC_EXT(setenv, [
  1904. #include <stdlib.h>
  1905. ],
  1906. [setenv("VAR", "VALUE", 1);],
  1907. [int setenv (const char *, const char *, int)],
  1908. [SETENV])
  1909. ])
  1910. AC_DEFUN([AC_CHECK_UNSETENV],
  1911. [
  1912. KDE_CHECK_FUNC_EXT(unsetenv, [
  1913. #include <stdlib.h>
  1914. ],
  1915. [unsetenv("VAR");],
  1916. [void unsetenv (const char *)],
  1917. [UNSETENV])
  1918. ])
  1919. AC_DEFUN([AC_CHECK_GETDOMAINNAME],
  1920. [
  1921. KDE_CHECK_FUNC_EXT(getdomainname, [
  1922. #include <stdlib.h>
  1923. #include <unistd.h>
  1924. #include <netdb.h>
  1925. ],
  1926. [
  1927. char buffer[200];
  1928. getdomainname(buffer, 200);
  1929. ],
  1930. [#include <sys/types.h>
  1931. int getdomainname (char *, size_t)],
  1932. [GETDOMAINNAME])
  1933. ])
  1934. AC_DEFUN([AC_CHECK_GETHOSTNAME],
  1935. [
  1936. KDE_CHECK_FUNC_EXT(gethostname, [
  1937. #include <stdlib.h>
  1938. #include <unistd.h>
  1939. ],
  1940. [
  1941. char buffer[200];
  1942. gethostname(buffer, 200);
  1943. ],
  1944. [int gethostname (char *, unsigned int)],
  1945. [GETHOSTNAME])
  1946. ])
  1947. AC_DEFUN([AC_CHECK_USLEEP],
  1948. [
  1949. KDE_CHECK_FUNC_EXT(usleep, [
  1950. #include <unistd.h>
  1951. ],
  1952. [
  1953. usleep(200);
  1954. ],
  1955. [int usleep (unsigned int)],
  1956. [USLEEP])
  1957. ])
  1958. AC_DEFUN([AC_CHECK_RANDOM],
  1959. [
  1960. KDE_CHECK_FUNC_EXT(random, [
  1961. #include <stdlib.h>
  1962. ],
  1963. [
  1964. random();
  1965. ],
  1966. [long int random(void)],
  1967. [RANDOM])
  1968. KDE_CHECK_FUNC_EXT(srandom, [
  1969. #include <stdlib.h>
  1970. ],
  1971. [
  1972. srandom(27);
  1973. ],
  1974. [void srandom(unsigned int)],
  1975. [SRANDOM])
  1976. ])
  1977. AC_DEFUN([AC_CHECK_INITGROUPS],
  1978. [
  1979. KDE_CHECK_FUNC_EXT(initgroups, [
  1980. #include <sys/types.h>
  1981. #include <unistd.h>
  1982. #include <grp.h>
  1983. ],
  1984. [
  1985. char buffer[200];
  1986. initgroups(buffer, 27);
  1987. ],
  1988. [int initgroups(const char *, gid_t)],
  1989. [INITGROUPS])
  1990. ])
  1991. AC_DEFUN([AC_CHECK_MKSTEMPS],
  1992. [
  1993. KDE_CHECK_FUNC_EXT(mkstemps, [
  1994. #include <stdlib.h>
  1995. #include <unistd.h>
  1996. ],
  1997. [
  1998. mkstemps("/tmp/aaaXXXXXX", 6);
  1999. ],
  2000. [int mkstemps(char *, int)],
  2001. [MKSTEMPS])
  2002. ])
  2003. AC_DEFUN([AC_CHECK_MKDTEMP],
  2004. [
  2005. KDE_CHECK_FUNC_EXT(mkdtemp, [
  2006. #include <stdlib.h>
  2007. #include <unistd.h>
  2008. ],
  2009. [
  2010. mkdtemp("/tmp/aaaXXXXXX");
  2011. ],
  2012. [char *mkdtemp(char *)],
  2013. [MKDTEMP])
  2014. ])
  2015. AC_DEFUN([AC_CHECK_RES_INIT],
  2016. [
  2017. AC_MSG_CHECKING([if res_init needs -lresolv])
  2018. kde_libs_safe="$LIBS"
  2019. LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
  2020. AC_TRY_LINK(
  2021. [
  2022. #include <sys/types.h>
  2023. #include <netinet/in.h>
  2024. #include <arpa/nameser.h>
  2025. #include <resolv.h>
  2026. ],
  2027. [
  2028. res_init();
  2029. ],
  2030. [
  2031. LIBRESOLV="-lresolv"
  2032. AC_MSG_RESULT(yes)
  2033. AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
  2034. ],
  2035. [ AC_MSG_RESULT(no) ]
  2036. )
  2037. LIBS=$kde_libs_safe
  2038. AC_SUBST(LIBRESOLV)
  2039. AC_MSG_CHECKING([if res_init is available])
  2040. AC_TRY_COMPILE(
  2041. [
  2042. #include <sys/types.h>
  2043. #include <netinet/in.h>
  2044. #include <arpa/nameser.h>
  2045. #include <resolv.h>
  2046. ],
  2047. [
  2048. res_init();
  2049. ],
  2050. [
  2051. AC_MSG_RESULT(yes)
  2052. AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
  2053. ],
  2054. [ AC_MSG_RESULT(no) ]
  2055. )
  2056. ])
  2057. AC_DEFUN([AC_CHECK_STRLCPY],
  2058. [
  2059. KDE_CHECK_FUNC_EXT(strlcpy, [
  2060. #include <string.h>
  2061. ],
  2062. [ char buf[20];
  2063. strlcpy(buf, "KDE function test", sizeof(buf));
  2064. ],
  2065. [unsigned long strlcpy(char*, const char*, unsigned long)],
  2066. [STRLCPY])
  2067. ])
  2068. AC_DEFUN([AC_CHECK_STRLCAT],
  2069. [
  2070. KDE_CHECK_FUNC_EXT(strlcat, [
  2071. #include <string.h>
  2072. ],
  2073. [ char buf[20];
  2074. buf[0]='\0';
  2075. strlcat(buf, "KDE function test", sizeof(buf));
  2076. ],
  2077. [unsigned long strlcat(char*, const char*, unsigned long)],
  2078. [STRLCAT])
  2079. ])
  2080. AC_DEFUN([AC_FIND_GIF],
  2081. [AC_MSG_CHECKING([for giflib])
  2082. AC_CACHE_VAL(ac_cv_lib_gif,
  2083. [ac_save_LIBS="$LIBS"
  2084. if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
  2085. LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
  2086. else
  2087. LIBS="$all_libraries -lgif"
  2088. fi
  2089. AC_TRY_LINK(dnl
  2090. [
  2091. #ifdef __cplusplus
  2092. extern "C" {
  2093. #endif
  2094. int GifLastError(void);
  2095. #ifdef __cplusplus
  2096. }
  2097. #endif
  2098. /* We use char because int might match the return type of a gcc2
  2099. builtin and then its argument prototype would still apply. */
  2100. ],
  2101. [return GifLastError();],
  2102. eval "ac_cv_lib_gif=yes",
  2103. eval "ac_cv_lib_gif=no")
  2104. LIBS="$ac_save_LIBS"
  2105. ])dnl
  2106. if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then
  2107. AC_MSG_RESULT(yes)
  2108. AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif])
  2109. else
  2110. AC_MSG_ERROR(You need giflib30. Please install the tdesupport package)
  2111. fi
  2112. ])
  2113. AC_DEFUN([KDE_FIND_JPEG_HELPER],
  2114. [
  2115. AC_MSG_CHECKING([for libjpeg$2])
  2116. AC_CACHE_VAL(ac_cv_lib_jpeg_$1,
  2117. [
  2118. ac_save_LIBS="$LIBS"
  2119. LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"
  2120. ac_save_CFLAGS="$CFLAGS"
  2121. CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
  2122. AC_TRY_LINK(
  2123. [/* Override any gcc2 internal prototype to avoid an error. */
  2124. struct jpeg_decompress_struct;
  2125. typedef struct jpeg_decompress_struct * j_decompress_ptr;
  2126. typedef int size_t;
  2127. #ifdef __cplusplus
  2128. extern "C" {
  2129. #endif
  2130. void jpeg_CreateDecompress(j_decompress_ptr cinfo,
  2131. int version, size_t structsize);
  2132. #ifdef __cplusplus
  2133. }
  2134. #endif
  2135. /* We use char because int might match the return type of a gcc2
  2136. builtin and then its argument prototype would still apply. */
  2137. ],
  2138. [jpeg_CreateDecompress(0L, 0, 0);],
  2139. eval "ac_cv_lib_jpeg_$1=-ljpeg$2",
  2140. eval "ac_cv_lib_jpeg_$1=no")
  2141. LIBS="$ac_save_LIBS"
  2142. CFLAGS="$ac_save_CFLAGS"
  2143. ])
  2144. if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then
  2145. LIBJPEG="$ac_cv_lib_jpeg_$1"
  2146. AC_MSG_RESULT($ac_cv_lib_jpeg_$1)
  2147. else
  2148. AC_MSG_RESULT(no)
  2149. $3
  2150. fi
  2151. ])
  2152. AC_DEFUN([AC_FIND_JPEG],
  2153. [
  2154. dnl first look for libraries
  2155. KDE_FIND_JPEG_HELPER(6b, 6b,
  2156. KDE_FIND_JPEG_HELPER(normal, [],
  2157. [
  2158. LIBJPEG=
  2159. ]
  2160. )
  2161. )
  2162. dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
  2163. dnl requires system dependent includes loaded before it)
  2164. jpeg_incdirs="$includedir /usr/include /usr/local/include $kde_extra_includes"
  2165. AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir)
  2166. test "x$jpeg_incdir" = xNO && jpeg_incdir=
  2167. dnl if headers _and_ libraries are missing, this is no error, and we
  2168. dnl continue with a warning (the user will get no jpeg support in tdehtml)
  2169. dnl if only one is missing, it means a configuration error, but we still
  2170. dnl only warn
  2171. if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then
  2172. AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg])
  2173. else
  2174. if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then
  2175. AC_MSG_WARN([
  2176. There is an installation error in jpeg support. You seem to have only one
  2177. of either the headers _or_ the libraries installed. You may need to either
  2178. provide correct --with-extra-... options, or the development package of
  2179. libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
  2180. Disabling JPEG support.
  2181. ])
  2182. else
  2183. AC_MSG_WARN([libjpeg not found. disable JPEG support.])
  2184. fi
  2185. jpeg_incdir=
  2186. LIBJPEG=
  2187. fi
  2188. AC_SUBST(LIBJPEG)
  2189. AH_VERBATIM(_AC_CHECK_JPEG,
  2190. [/*
  2191. * jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
  2192. * headers and I'm too lazy to write a configure test as long as only
  2193. * unixware is related
  2194. */
  2195. #ifdef _UNIXWARE
  2196. #define HAVE_BOOLEAN
  2197. #endif
  2198. ])
  2199. ])
  2200. AC_DEFUN([KDE_CHECK_QT_JPEG],
  2201. [
  2202. if test -n "$LIBJPEG"; then
  2203. AC_MSG_CHECKING([if Qt needs $LIBJPEG])
  2204. AC_CACHE_VAL(kde_cv_qt_jpeg,
  2205. [
  2206. AC_LANG_SAVE
  2207. AC_LANG_CPLUSPLUS
  2208. ac_save_LIBS="$LIBS"
  2209. LIBS="$all_libraries $USER_LDFLAGS $LIBTQT"
  2210. LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
  2211. ac_save_CXXFLAGS="$CXXFLAGS"
  2212. CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
  2213. AC_TRY_LINK(
  2214. [#include <qapplication.h>],
  2215. [
  2216. int argc;
  2217. char** argv;
  2218. QApplication app(argc, argv);],
  2219. eval "kde_cv_qt_jpeg=no",
  2220. eval "kde_cv_qt_jpeg=yes")
  2221. LIBS="$ac_save_LIBS"
  2222. CXXFLAGS="$ac_save_CXXFLAGS"
  2223. AC_LANG_RESTORE
  2224. fi
  2225. ])
  2226. if eval "test ! \"`echo $kde_cv_qt_jpeg`\" = no"; then
  2227. AC_MSG_RESULT(yes)
  2228. LIBJPEG_QT='$(LIBJPEG)'
  2229. else
  2230. AC_MSG_RESULT(no)
  2231. LIBJPEG_QT=
  2232. fi
  2233. ])
  2234. AC_DEFUN([AC_FIND_ZLIB],
  2235. [
  2236. AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
  2237. AC_MSG_CHECKING([for libz])
  2238. AC_CACHE_VAL(ac_cv_lib_z,
  2239. [
  2240. kde_save_LIBS="$LIBS"
  2241. LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
  2242. kde_save_CFLAGS="$CFLAGS"
  2243. CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
  2244. AC_TRY_LINK(dnl
  2245. [
  2246. #include<zlib.h>
  2247. ],
  2248. [
  2249. char buf[42];
  2250. gzFile f = (gzFile) 0;
  2251. /* this would segfault.. but we only link, don't run */
  2252. (void) gzgets(f, buf, sizeof(buf));
  2253. return (zlibVersion() == ZLIB_VERSION);
  2254. ],
  2255. eval "ac_cv_lib_z='-lz'",
  2256. eval "ac_cv_lib_z=no")
  2257. LIBS="$kde_save_LIBS"
  2258. CFLAGS="$kde_save_CFLAGS"
  2259. ])dnl
  2260. if test ! "$ac_cv_lib_z" = no; then
  2261. AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz])
  2262. LIBZ="$ac_cv_lib_z"
  2263. AC_MSG_RESULT($ac_cv_lib_z)
  2264. else
  2265. AC_MSG_ERROR(not found.
  2266. Possibly configure picks up an outdated version
  2267. installed by XFree86. Remove it from your system.
  2268. Check your installation and look into config.log)
  2269. LIBZ=""
  2270. fi
  2271. AC_SUBST(LIBZ)
  2272. ])
  2273. AC_DEFUN([KDE_TRY_TIFFLIB],
  2274. [
  2275. AC_MSG_CHECKING([for libtiff $1])
  2276. AC_CACHE_VAL(kde_cv_libtiff_$1,
  2277. [
  2278. AC_LANG_SAVE
  2279. AC_LANG_CPLUSPLUS
  2280. kde_save_LIBS="$LIBS"
  2281. if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
  2282. LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
  2283. else
  2284. LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
  2285. fi
  2286. kde_save_CXXFLAGS="$CXXFLAGS"
  2287. CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
  2288. AC_TRY_LINK(dnl
  2289. [
  2290. #include<tiffio.h>
  2291. ],
  2292. [return (TIFFOpen( "", "r") == 0); ],
  2293. [
  2294. kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ"
  2295. ], [
  2296. kde_cv_libtiff_$1=no
  2297. ])
  2298. LIBS="$kde_save_LIBS"
  2299. CXXFLAGS="$kde_save_CXXFLAGS"
  2300. AC_LANG_RESTORE
  2301. ])
  2302. if test "$kde_cv_libtiff_$1" = "no"; then
  2303. AC_MSG_RESULT(no)
  2304. LIBTIFF=""
  2305. $3
  2306. else
  2307. LIBTIFF="$kde_cv_libtiff_$1"
  2308. AC_MSG_RESULT(yes)
  2309. AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff])
  2310. $2
  2311. fi
  2312. ])
  2313. AC_DEFUN([AC_FIND_TIFF],
  2314. [
  2315. AC_REQUIRE([K_PATH_X])
  2316. AC_REQUIRE([AC_FIND_ZLIB])
  2317. AC_REQUIRE([AC_FIND_JPEG])
  2318. AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
  2319. KDE_TRY_TIFFLIB(tiff, [],
  2320. KDE_TRY_TIFFLIB(tiff34))
  2321. AC_SUBST(LIBTIFF)
  2322. ])
  2323. AC_DEFUN([AC_FIND_PNG],
  2324. [
  2325. AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
  2326. AC_REQUIRE([AC_FIND_ZLIB])
  2327. AC_MSG_CHECKING([for libpng])
  2328. AC_CACHE_VAL(ac_cv_lib_png,
  2329. [
  2330. kde_save_LIBS="$LIBS"
  2331. if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
  2332. LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
  2333. else
  2334. LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
  2335. fi
  2336. kde_save_CFLAGS="$CFLAGS"
  2337. CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
  2338. AC_TRY_LINK(dnl
  2339. [
  2340. #include<png.h>
  2341. ],
  2342. [
  2343. png_structp png_ptr = png_create_read_struct( /* image ptr */
  2344. PNG_LIBPNG_VER_STRING, 0, 0, 0 );
  2345. return( png_ptr != 0 );
  2346. ],
  2347. eval "ac_cv_lib_png='-lpng $LIBZ -lm'",
  2348. eval "ac_cv_lib_png=no"
  2349. )
  2350. LIBS="$kde_save_LIBS"
  2351. CFLAGS="$kde_save_CFLAGS"
  2352. ])dnl
  2353. if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
  2354. AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng])
  2355. LIBPNG="$ac_cv_lib_png"
  2356. AC_SUBST(LIBPNG)
  2357. AC_MSG_RESULT($ac_cv_lib_png)
  2358. else
  2359. AC_MSG_RESULT(no)
  2360. LIBPNG=""
  2361. AC_SUBST(LIBPNG)
  2362. fi
  2363. ])
  2364. AC_DEFUN([AC_FIND_JASPER],
  2365. [
  2366. AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
  2367. AC_REQUIRE([AC_FIND_JPEG])
  2368. AC_MSG_CHECKING([for jasper])
  2369. AC_CACHE_VAL(ac_cv_jasper,
  2370. [
  2371. kde_save_LIBS="$LIBS"
  2372. LIBS="$LIBS $all_libraries $USER_LDFLAGS -ljasper $LIBJPEG -lm"
  2373. kde_save_CFLAGS="$CFLAGS"
  2374. CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
  2375. AC_TRY_LINK(dnl
  2376. [
  2377. #include<jasper/jasper.h>
  2378. ],
  2379. [
  2380. return( jas_init() );
  2381. ],
  2382. eval "ac_cv_jasper='-ljasper $LIBJPEG -lm'",
  2383. eval "ac_cv_jasper=no"
  2384. )
  2385. LIBS="$kde_save_LIBS"
  2386. CFLAGS="$kde_save_CFLAGS"
  2387. ])dnl
  2388. if eval "test ! \"`echo $ac_cv_jasper`\" = no"; then
  2389. AC_DEFINE_UNQUOTED(HAVE_JASPER, 1, [Define if you have jasper])
  2390. LIB_JASPER="$ac_cv_jasper"
  2391. AC_MSG_RESULT($ac_cv_jasper)
  2392. else
  2393. AC_MSG_RESULT(no)
  2394. LIB_JASPER=""
  2395. fi
  2396. AC_SUBST(LIB_JASPER)
  2397. ])
  2398. AC_DEFUN([AC_CHECK_BOOL],
  2399. [
  2400. AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool])
  2401. ])
  2402. AC_DEFUN([KDE_CHECK_COMPILER_FLAG],
  2403. [
  2404. AC_MSG_CHECKING([whether $CXX supports -$1])
  2405. kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'`
  2406. AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
  2407. [
  2408. AC_LANG_SAVE
  2409. AC_LANG_CPLUSPLUS
  2410. save_CXXFLAGS="$CXXFLAGS"
  2411. CXXFLAGS="$CXXFLAGS -$1"
  2412. AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], [])
  2413. CXXFLAGS="$save_CXXFLAGS"
  2414. AC_LANG_RESTORE
  2415. ])
  2416. if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
  2417. AC_MSG_RESULT(yes)
  2418. :
  2419. $2
  2420. else
  2421. AC_MSG_RESULT(no)
  2422. :
  2423. $3
  2424. fi
  2425. ])
  2426. dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
  2427. dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
  2428. dnl it's all white-space separated
  2429. AC_DEFUN([AC_REMOVE_FORBIDDEN],
  2430. [ __val=$$1
  2431. __forbid=" $2 "
  2432. if test -n "$__val"; then
  2433. __new=""
  2434. ac_save_IFS=$IFS
  2435. IFS=" "
  2436. for i in $__val; do
  2437. case "$__forbid" in
  2438. *" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;;
  2439. *) # Careful to not add spaces, where there were none, because otherwise
  2440. # libtool gets confused, if we change e.g. CXX
  2441. if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
  2442. esac
  2443. done
  2444. IFS=$ac_save_IFS
  2445. $1=$__new
  2446. fi
  2447. ])
  2448. dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
  2449. AC_DEFUN([AC_VALIDIFY_CXXFLAGS],
  2450. [dnl
  2451. if test "x$kde_use_qt_emb" != "xyes"; then
  2452. AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
  2453. AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
  2454. else
  2455. AC_REMOVE_FORBIDDEN(CXX, [-rpath])
  2456. AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath])
  2457. fi
  2458. ])
  2459. AC_DEFUN([AC_CHECK_COMPILERS],
  2460. [
  2461. AC_ARG_ENABLE(debug,
  2462. AC_HELP_STRING([--enable-debug=ARG],[enables debug symbols (yes|no|full) [default=no]]),
  2463. [
  2464. case $enableval in
  2465. yes)
  2466. kde_use_debug_code="yes"
  2467. kde_use_debug_define=no
  2468. ;;
  2469. full)
  2470. kde_use_debug_code="full"
  2471. kde_use_debug_define=no
  2472. ;;
  2473. *)
  2474. kde_use_debug_code="no"
  2475. kde_use_debug_define=yes
  2476. ;;
  2477. esac
  2478. ],
  2479. [kde_use_debug_code="no"
  2480. kde_use_debug_define=no
  2481. ])
  2482. dnl Just for configure --help
  2483. AC_ARG_ENABLE(dummyoption,
  2484. AC_HELP_STRING([--disable-debug],
  2485. [disables debug output and debug symbols [default=no]]),
  2486. [],[])
  2487. AC_ARG_ENABLE(strict,
  2488. AC_HELP_STRING([--enable-strict],
  2489. [compiles with strict compiler options (may not work!)]),
  2490. [
  2491. if test $enableval = "no"; then
  2492. kde_use_strict_options="no"
  2493. else
  2494. kde_use_strict_options="yes"
  2495. fi
  2496. ], [kde_use_strict_options="no"])
  2497. AC_ARG_ENABLE(warnings,AC_HELP_STRING([--disable-warnings],[disables compilation with -Wall and similiar]),
  2498. [
  2499. if test $enableval = "no"; then
  2500. kde_use_warnings="no"
  2501. else
  2502. kde_use_warnings="yes"
  2503. fi
  2504. ], [kde_use_warnings="yes"])
  2505. dnl enable warnings for debug build
  2506. if test "$kde_use_debug_code" != "no"; then
  2507. kde_use_warnings=yes
  2508. fi
  2509. AC_ARG_ENABLE(profile,AC_HELP_STRING([--enable-profile],[creates profiling infos [default=no]]),
  2510. [kde_use_profiling=$enableval],
  2511. [kde_use_profiling="no"]
  2512. )
  2513. dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
  2514. CFLAGS=" $CFLAGS"
  2515. AC_PROG_CC
  2516. AC_PROG_CPP
  2517. if test "$GCC" = "yes"; then
  2518. if test "$kde_use_debug_code" != "no"; then
  2519. if test $kde_use_debug_code = "full"; then
  2520. CFLAGS="-g3 -fno-inline $CFLAGS"
  2521. else
  2522. CFLAGS="-g -O2 $CFLAGS"
  2523. fi
  2524. else
  2525. CFLAGS="-O2 $CFLAGS"
  2526. fi
  2527. fi
  2528. if test "$kde_use_debug_define" = "yes"; then
  2529. CFLAGS="-DNDEBUG $CFLAGS"
  2530. fi
  2531. case "$host" in
  2532. *-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
  2533. *-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
  2534. esac
  2535. if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
  2536. LDFLAGS=""
  2537. fi
  2538. CXXFLAGS=" $CXXFLAGS"
  2539. AC_PROG_CXX
  2540. if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
  2541. if test "$kde_use_debug_code" != "no"; then
  2542. if test "$CXX" = "KCC"; then
  2543. CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wwrite-strings $CXXFLAGS"
  2544. else
  2545. if test "$kde_use_debug_code" = "full"; then
  2546. CXXFLAGS="-g3 -fno-inline $CXXFLAGS"
  2547. else
  2548. CXXFLAGS="-g -O2 $CXXFLAGS"
  2549. fi
  2550. fi
  2551. KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"])
  2552. dnl convenience compiler flags
  2553. KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""])
  2554. AC_SUBST(WOVERLOADED_VIRTUAL)
  2555. else
  2556. if test "$CXX" = "KCC"; then
  2557. CXXFLAGS="+K3 $CXXFLAGS"
  2558. else
  2559. CXXFLAGS="-O2 $CXXFLAGS"
  2560. fi
  2561. fi
  2562. fi
  2563. if test "$kde_use_debug_define" = "yes"; then
  2564. CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
  2565. fi
  2566. if test "$kde_use_profiling" = "yes"; then
  2567. KDE_CHECK_COMPILER_FLAG(pg,
  2568. [
  2569. CFLAGS="-pg $CFLAGS"
  2570. CXXFLAGS="-pg $CXXFLAGS"
  2571. ])
  2572. fi
  2573. if test "$kde_use_warnings" = "yes"; then
  2574. if test "$GCC" = "yes"; then
  2575. case $host in
  2576. *-*-linux-gnu)
  2577. CFLAGS="-ansi -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_DEFAULT_SOURCE $CFLAGS"
  2578. CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_DEFAULT_SOURCE -Wcast-align -Wconversion -Wchar-subscripts $CXXFLAGS"
  2579. KDE_CHECK_COMPILER_FLAG(Wmissing-format-attribute, [CXXFLAGS="$CXXFLAGS -Wformat-security -Wmissing-format-attribute"; CFLAGS="$CFLAGS -Wformat-security -Wmissing-format-attribute"])
  2580. ;;
  2581. esac
  2582. CXXFLAGS="-Wall -W -Wpointer-arith -Wwrite-strings $CXXFLAGS"
  2583. KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
  2584. KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
  2585. KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,[CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"])
  2586. fi
  2587. fi
  2588. if test "$GXX" = "yes" && test "$kde_use_strict_options" = "yes"; then
  2589. CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
  2590. fi
  2591. if test "$GXX" = "yes"; then
  2592. KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
  2593. KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
  2594. KDE_CHECK_COMPILER_FLAG(fno-common, [CXXFLAGS="$CXXFLAGS -fno-common"])
  2595. KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS= )
  2596. fi
  2597. if test "$CXX" = "KCC"; then
  2598. dnl unfortunately we currently cannot disable exception support in KCC
  2599. dnl because doing so is binary incompatible and Qt by default links with exceptions :-(
  2600. dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"])
  2601. dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS= )
  2602. AC_ARG_ENABLE(pch,
  2603. AC_HELP_STRING([--enable-pch],
  2604. [enables precompiled header support (currently only KCC) [default=no]]),
  2605. [
  2606. kde_use_pch=$enableval
  2607. ],[kde_use_pch=no])
  2608. if test "$kde_use_pch" = "yes"; then
  2609. dnl TODO: support --pch-dir!
  2610. KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"])
  2611. dnl the below works (but the dir must exist), but it's
  2612. dnl useless for a whole package.
  2613. dnl The are precompiled headers for each source file, so when compiling
  2614. dnl from scratch, it doesn't make a difference, and they take up
  2615. dnl around ~5Mb _per_ sourcefile.
  2616. dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp,
  2617. dnl [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"])
  2618. fi
  2619. dnl this flag controls inlining. by default KCC inlines in optimisation mode
  2620. dnl all implementations that are defined inside the class {} declaration.
  2621. dnl because of templates-compatibility with broken gcc compilers, this
  2622. dnl can cause excessive inlining. This flag limits it to a sane level
  2623. KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"])
  2624. KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"])
  2625. KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"])
  2626. KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"])
  2627. dnl Some source files are shared between multiple executables
  2628. dnl (or libraries) and some of those need template instantiations.
  2629. dnl In that case KCC needs to compile those sources with
  2630. dnl --one_instantiation_per_object. To make it easy for us we compile
  2631. dnl _all_ objects with that flag (--one_per is a shorthand).
  2632. KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"])
  2633. fi
  2634. AC_SUBST(USE_EXCEPTIONS)
  2635. dnl obsolete macro - provided to keep things going
  2636. USE_RTTI=
  2637. AC_SUBST(USE_RTTI)
  2638. case "$host" in
  2639. *-*-irix*) test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
  2640. *-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
  2641. *-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
  2642. *-*-solaris*)
  2643. if test "$GXX" = yes; then
  2644. libstdcpp=`$CXX -print-file-name=libstdc++.so`
  2645. if test ! -f $libstdcpp; then
  2646. AC_MSG_ERROR([You've compiled gcc without --enable-shared. This doesn't work with KDE. Please recompile gcc with --enable-shared to receive a libstdc++.so])
  2647. fi
  2648. fi
  2649. ;;
  2650. esac
  2651. AC_VALIDIFY_CXXFLAGS
  2652. AC_PROG_CXXCPP
  2653. if test "$GCC" = yes; then
  2654. NOOPT_CFLAGS=-O0
  2655. fi
  2656. KDE_CHECK_COMPILER_FLAG(O0,[NOOPT_CXXFLAGS=-O0])
  2657. AC_SUBST(NOOPT_CXXFLAGS)
  2658. AC_SUBST(NOOPT_CFLAGS)
  2659. KDE_CHECK_FINAL
  2660. KDE_CHECK_CLOSURE
  2661. KDE_CHECK_NMCHECK
  2662. ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
  2663. ])
  2664. AC_DEFUN([KDE_ADD_DEPENDENCIES],
  2665. [
  2666. [A]M_DEPENDENCIES(CC)
  2667. [A]M_DEPENDENCIES(CXX)
  2668. ])
  2669. dnl just a wrapper to clean up configure.in
  2670. AC_DEFUN([KDE_PROG_LIBTOOL],
  2671. [
  2672. AC_REQUIRE([AC_CHECK_COMPILERS])
  2673. AC_REQUIRE([AC_ENABLE_SHARED])
  2674. AC_REQUIRE([AC_ENABLE_STATIC])
  2675. AC_REQUIRE([AC_LIBTOOL_DLOPEN])
  2676. AC_REQUIRE([KDE_CHECK_LIB64])
  2677. AC_OBJEXT
  2678. AC_EXEEXT
  2679. AM_PROG_LIBTOOL
  2680. AC_LIBTOOL_CXX
  2681. LIBTOOL_SHELL="/bin/sh ./libtool"
  2682. # LIBTOOL="$LIBTOOL --silent"
  2683. KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_NO_UNDEFINED) \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
  2684. AC_SUBST(KDE_PLUGIN)
  2685. # we patch configure quite some so we better keep that consistent for incremental runs
  2686. AC_SUBST(AUTOCONF,'$(SHELL) $(top_srcdir)/admin/cvs.sh configure || touch configure')
  2687. ])
  2688. AC_DEFUN([KDE_CHECK_LIB64],
  2689. [
  2690. tdelibsuff=no
  2691. AC_ARG_ENABLE(libsuffix,
  2692. AC_HELP_STRING([--enable-libsuffix],
  2693. [/lib directory suffix (64,32,none[=default])]),
  2694. tdelibsuff=$enableval)
  2695. # TODO: add an auto case that compiles a little C app to check
  2696. # where the glibc is
  2697. if test "$tdelibsuff" = "no"; then
  2698. tdelibsuff=
  2699. fi
  2700. if test -z "$tdelibsuff"; then
  2701. AC_MSG_RESULT([not using lib directory suffix])
  2702. AC_DEFINE(KDELIBSUFF, [""], Suffix for lib directories)
  2703. else
  2704. if test "$libdir" = '${exec_prefix}/lib'; then
  2705. libdir="$libdir${tdelibsuff}"
  2706. AC_SUBST([libdir], ["$libdir"]) dnl ugly hack for lib64 platforms
  2707. fi
  2708. AC_DEFINE_UNQUOTED(KDELIBSUFF, ["\"${tdelibsuff}\""], Suffix for lib directories)
  2709. AC_MSG_RESULT([using lib directory suffix $tdelibsuff])
  2710. fi
  2711. ])
  2712. AC_DEFUN([KDE_CHECK_TYPES],
  2713. [ AC_CHECK_SIZEOF(int, 4)dnl
  2714. AC_CHECK_SIZEOF(short)dnl
  2715. AC_CHECK_SIZEOF(long, 4)dnl
  2716. AC_CHECK_SIZEOF(char *, 4)dnl
  2717. ])dnl
  2718. AC_DEFUN([KDE_DO_IT_ALL],
  2719. [
  2720. AC_CANONICAL_SYSTEM
  2721. AC_ARG_PROGRAM
  2722. AM_INIT_AUTOMAKE($1, $2)
  2723. AM_DISABLE_LIBRARIES
  2724. AC_PREFIX_DEFAULT(${TDEDIR:-/usr/local/kde})
  2725. AC_CHECK_COMPILERS
  2726. KDE_PROG_LIBTOOL
  2727. AM_KDE_WITH_NLS
  2728. AC_PATH_KDE
  2729. ])
  2730. AC_DEFUN([AC_CHECK_RPATH],
  2731. [
  2732. AC_MSG_CHECKING(for rpath)
  2733. AC_ARG_ENABLE(rpath,
  2734. AC_HELP_STRING([--disable-rpath],[do not use the rpath feature of ld]),
  2735. USE_RPATH=$enableval, USE_RPATH=yes)
  2736. if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then
  2737. KDE_RPATH="-R \$(kde_libraries)"
  2738. if test -n "$qt_libraries"; then
  2739. KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)"
  2740. fi
  2741. dnl $x_libraries is set to /usr/lib in case
  2742. if test -n "$X_LDFLAGS"; then
  2743. X_RPATH="-R \$(x_libraries)"
  2744. KDE_RPATH="$KDE_RPATH $X_RPATH"
  2745. fi
  2746. if test -n "$KDE_EXTRA_RPATH"; then
  2747. KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)"
  2748. fi
  2749. fi
  2750. AC_SUBST(KDE_EXTRA_RPATH)
  2751. AC_SUBST(KDE_RPATH)
  2752. AC_SUBST(X_RPATH)
  2753. AC_MSG_RESULT($USE_RPATH)
  2754. ])
  2755. dnl Check for the type of the third argument of getsockname
  2756. AC_DEFUN([AC_CHECK_SOCKLEN_T], [
  2757. AC_MSG_CHECKING(for socklen_t)
  2758. AC_CACHE_VAL(ac_cv_socklen_t, [
  2759. AC_LANG_SAVE
  2760. AC_LANG_CPLUSPLUS
  2761. AC_TRY_COMPILE([
  2762. #include <sys/types.h>
  2763. #include <sys/socket.h>
  2764. ],[
  2765. socklen_t a=0;
  2766. getsockname(0,(struct sockaddr*)0, &a);
  2767. ],
  2768. ac_cv_socklen_t=socklen_t,
  2769. AC_TRY_COMPILE([
  2770. #include <sys/types.h>
  2771. #include <sys/socket.h>
  2772. ],[
  2773. int a=0;
  2774. getsockname(0,(struct sockaddr*)0, &a);
  2775. ],
  2776. ac_cv_socklen_t=int,
  2777. ac_cv_socklen_t=size_t
  2778. )
  2779. )
  2780. AC_LANG_RESTORE
  2781. ])
  2782. AC_MSG_RESULT($ac_cv_socklen_t)
  2783. if test "$ac_cv_socklen_t" != "socklen_t"; then
  2784. AC_DEFINE_UNQUOTED(socklen_t, $ac_cv_socklen_t,
  2785. [Define the real type of socklen_t])
  2786. fi
  2787. AC_DEFINE_UNQUOTED(ksize_t, socklen_t, [Compatibility define])
  2788. ])
  2789. dnl This is a merge of some macros out of the gettext aclocal.m4
  2790. dnl since we don't need anything, I took the things we need
  2791. dnl the copyright for them is:
  2792. dnl >
  2793. dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
  2794. dnl This Makefile.in is free software; the Free Software Foundation
  2795. dnl gives unlimited permission to copy and/or distribute it,
  2796. dnl with or without modifications, as long as this notice is preserved.
  2797. dnl This program is distributed in the hope that it will be useful,
  2798. dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  2799. dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  2800. dnl PARTICULAR PURPOSE.
  2801. dnl >
  2802. dnl for this file it is relicensed under LGPL
  2803. AC_DEFUN([AM_KDE_WITH_NLS],
  2804. [
  2805. dnl If we use NLS figure out what method
  2806. AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt,
  2807. [test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt)
  2808. AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
  2809. if test -z "`$GMSGFMT --version 2>&1 | grep 'GNU gettext'`"; then
  2810. AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it])
  2811. GMSGFMT=":"
  2812. fi
  2813. MSGFMT=$GMSGFMT
  2814. AC_SUBST(GMSGFMT)
  2815. AC_SUBST(MSGFMT)
  2816. AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext,
  2817. [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
  2818. dnl Test whether we really found GNU xgettext.
  2819. if test "$XGETTEXT" != ":"; then
  2820. dnl If it is no GNU xgettext we define it as : so that the
  2821. dnl Makefiles still can work.
  2822. if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
  2823. : ;
  2824. else
  2825. AC_MSG_RESULT(
  2826. [found xgettext programs is not GNU xgettext; ignore it])
  2827. XGETTEXT=":"
  2828. fi
  2829. fi
  2830. AC_SUBST(XGETTEXT)
  2831. ])
  2832. # Search path for a program which passes the given test.
  2833. # Ulrich Drepper <drepper@cygnus.com>, 1996.
  2834. # serial 1
  2835. # Stephan Kulow: I appended a _KDE against name conflicts
  2836. dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR,
  2837. dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
  2838. AC_DEFUN([AM_PATH_PROG_WITH_TEST_KDE],
  2839. [# Extract the first word of "$2", so it can be a program name with args.
  2840. set dummy $2; ac_word=[$]2
  2841. AC_MSG_CHECKING([for $ac_word])
  2842. AC_CACHE_VAL(ac_cv_path_$1,
  2843. [case "[$]$1" in
  2844. /*)
  2845. ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
  2846. ;;
  2847. *)
  2848. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  2849. for ac_dir in ifelse([$5], , $PATH, [$5]); do
  2850. test -z "$ac_dir" && ac_dir=.
  2851. if test -f $ac_dir/$ac_word; then
  2852. if [$3]; then
  2853. ac_cv_path_$1="$ac_dir/$ac_word"
  2854. break
  2855. fi
  2856. fi
  2857. done
  2858. IFS="$ac_save_ifs"
  2859. dnl If no 4th arg is given, leave the cache variable unset,
  2860. dnl so AC_PATH_PROGS will keep looking.
  2861. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
  2862. ])dnl
  2863. ;;
  2864. esac])dnl
  2865. $1="$ac_cv_path_$1"
  2866. if test -n "[$]$1"; then
  2867. AC_MSG_RESULT([$]$1)
  2868. else
  2869. AC_MSG_RESULT(no)
  2870. fi
  2871. AC_SUBST($1)dnl
  2872. ])
  2873. # Check whether LC_MESSAGES is available in <locale.h>.
  2874. # Ulrich Drepper <drepper@cygnus.com>, 1995.
  2875. # serial 1
  2876. AC_DEFUN([AM_LC_MESSAGES],
  2877. [if test $ac_cv_header_locale_h = yes; then
  2878. AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
  2879. [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
  2880. am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
  2881. if test $am_cv_val_LC_MESSAGES = yes; then
  2882. AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your locale.h file contains LC_MESSAGES])
  2883. fi
  2884. fi])
  2885. dnl From Jim Meyering.
  2886. dnl FIXME: migrate into libit.
  2887. AC_DEFUN([AM_FUNC_OBSTACK],
  2888. [AC_CACHE_CHECK([for obstacks], am_cv_func_obstack,
  2889. [AC_TRY_LINK([#include "obstack.h"],
  2890. [struct obstack *mem;obstack_free(mem,(char *) 0)],
  2891. am_cv_func_obstack=yes,
  2892. am_cv_func_obstack=no)])
  2893. if test $am_cv_func_obstack = yes; then
  2894. AC_DEFINE(HAVE_OBSTACK)
  2895. else
  2896. LIBOBJS="$LIBOBJS obstack.o"
  2897. fi
  2898. ])
  2899. dnl From Jim Meyering. Use this if you use the GNU error.[ch].
  2900. dnl FIXME: Migrate into libit
  2901. AC_DEFUN([AM_FUNC_ERROR_AT_LINE],
  2902. [AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
  2903. [AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
  2904. am_cv_lib_error_at_line=yes,
  2905. am_cv_lib_error_at_line=no)])
  2906. if test $am_cv_lib_error_at_line = no; then
  2907. LIBOBJS="$LIBOBJS error.o"
  2908. fi
  2909. AC_SUBST(LIBOBJS)dnl
  2910. ])
  2911. # Macro to add for using GNU gettext.
  2912. # Ulrich Drepper <drepper@cygnus.com>, 1995.
  2913. # serial 1
  2914. # Stephan Kulow: I put a KDE in it to avoid name conflicts
  2915. AC_DEFUN([AM_KDE_GNU_GETTEXT],
  2916. [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
  2917. AC_REQUIRE([AC_PROG_RANLIB])dnl
  2918. AC_REQUIRE([AC_HEADER_STDC])dnl
  2919. AC_REQUIRE([AC_TYPE_OFF_T])dnl
  2920. AC_REQUIRE([AC_TYPE_SIZE_T])dnl
  2921. AC_REQUIRE([AC_FUNC_ALLOCA])dnl
  2922. AC_REQUIRE([AC_FUNC_MMAP])dnl
  2923. AC_REQUIRE([AM_KDE_WITH_NLS])dnl
  2924. AC_CHECK_HEADERS([limits.h locale.h nl_types.h string.h values.h alloca.h])
  2925. AC_CHECK_FUNCS([getcwd munmap putenv setlocale strchr strcasecmp \
  2926. __argz_count __argz_stringify __argz_next])
  2927. AC_MSG_CHECKING(for stpcpy)
  2928. AC_CACHE_VAL(kde_cv_func_stpcpy,
  2929. [
  2930. kde_safe_cxxflags=$CXXFLAGS
  2931. CXXFLAGS="-Werror"
  2932. AC_LANG_SAVE
  2933. AC_LANG_CPLUSPLUS
  2934. AC_TRY_COMPILE([
  2935. #include <string.h>
  2936. ],
  2937. [
  2938. char buffer[200];
  2939. stpcpy(buffer, buffer);
  2940. ],
  2941. kde_cv_func_stpcpy=yes,
  2942. kde_cv_func_stpcpy=no)
  2943. AC_LANG_RESTORE
  2944. CXXFLAGS=$kde_safe_cxxflags
  2945. ])
  2946. AC_MSG_RESULT($kde_cv_func_stpcpy)
  2947. if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then
  2948. AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy])
  2949. fi
  2950. AM_LC_MESSAGES
  2951. if test "x$CATOBJEXT" != "x"; then
  2952. if test "x$ALL_LINGUAS" = "x"; then
  2953. LINGUAS=
  2954. else
  2955. AC_MSG_CHECKING(for catalogs to be installed)
  2956. NEW_LINGUAS=
  2957. for lang in ${LINGUAS=$ALL_LINGUAS}; do
  2958. case "$ALL_LINGUAS" in
  2959. *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
  2960. esac
  2961. done
  2962. LINGUAS=$NEW_LINGUAS
  2963. AC_MSG_RESULT($LINGUAS)
  2964. fi
  2965. dnl Construct list of names of catalog files to be constructed.
  2966. if test -n "$LINGUAS"; then
  2967. for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
  2968. fi
  2969. fi
  2970. ])
  2971. AC_DEFUN([AC_HAVE_XPM],
  2972. [AC_REQUIRE_CPP()dnl
  2973. AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
  2974. test -z "$XPM_LDFLAGS" && XPM_LDFLAGS=
  2975. test -z "$XPM_INCLUDE" && XPM_INCLUDE=
  2976. AC_ARG_WITH(xpm,AC_HELP_STRING([--without-xpm],[disable color pixmap XPM tests]),
  2977. xpm_test=$withval, xpm_test="yes")
  2978. if test "x$xpm_test" = xno; then
  2979. ac_cv_have_xpm=no
  2980. else
  2981. AC_MSG_CHECKING(for XPM)
  2982. AC_CACHE_VAL(ac_cv_have_xpm,
  2983. [
  2984. ac_save_ldflags="$LDFLAGS"
  2985. ac_save_cflags="$CFLAGS"
  2986. if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
  2987. LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
  2988. else
  2989. LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
  2990. fi
  2991. CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES"
  2992. test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS"
  2993. AC_TRY_LINK([#include <X11/xpm.h>],[],
  2994. ac_cv_have_xpm="yes",ac_cv_have_xpm="no")
  2995. LDFLAGS="$ac_save_ldflags"
  2996. CFLAGS="$ac_save_cflags"
  2997. ])dnl
  2998. if test "$ac_cv_have_xpm" = no; then
  2999. AC_MSG_RESULT(no)
  3000. XPM_LDFLAGS=""
  3001. XPMINC=""
  3002. $2
  3003. else
  3004. AC_DEFINE(HAVE_XPM, 1, [Define if you have XPM support])
  3005. if test "$XPM_LDFLAGS" = ""; then
  3006. XPMLIB='-lXpm $(LIB_X11)'
  3007. else
  3008. XPMLIB="-L$XPM_LDFLAGS -lXpm "'$(LIB_X11)'
  3009. fi
  3010. if test "$XPM_INCLUDE" = ""; then
  3011. XPMINC=""
  3012. else
  3013. XPMINC="-I$XPM_INCLUDE"
  3014. fi
  3015. AC_MSG_RESULT(yes)
  3016. $1
  3017. fi
  3018. fi
  3019. AC_SUBST(XPMINC)
  3020. AC_SUBST(XPMLIB)
  3021. ])
  3022. AC_DEFUN([AC_HAVE_DPMS],
  3023. [AC_REQUIRE_CPP()dnl
  3024. AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
  3025. test -z "$DPMS_LDFLAGS" && DPMS_LDFLAGS=
  3026. test -z "$DPMS_INCLUDE" && DPMS_INCLUDE=
  3027. DPMS_LIB=
  3028. AC_ARG_WITH(dpms,AC_HELP_STRING([--without-dpms],[disable DPMS power saving]),
  3029. dpms_test=$withval, dpms_test="yes")
  3030. if test "x$dpms_test" = xno; then
  3031. ac_cv_have_dpms=no
  3032. else
  3033. AC_MSG_CHECKING(for DPMS)
  3034. dnl Note: ac_cv_have_dpms can be no, yes, or -lXdpms.
  3035. dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
  3036. AC_CACHE_VAL(ac_cv_have_dpms,
  3037. [
  3038. if test "x$kde_use_qt_emb" = "xyes" || test "x$kde_use_qt_mac" = "xyes"; then
  3039. AC_MSG_RESULT(no)
  3040. ac_cv_have_dpms="no"
  3041. else
  3042. ac_save_ldflags="$LDFLAGS"
  3043. ac_save_cflags="$CFLAGS"
  3044. ac_save_libs="$LIBS"
  3045. LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
  3046. CFLAGS="$CFLAGS $X_INCLUDES"
  3047. test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
  3048. AC_TRY_LINK([
  3049. #include <X11/Xproto.h>
  3050. #include <X11/X.h>
  3051. #include <X11/Xlib.h>
  3052. #include <X11/extensions/dpms.h>
  3053. int foo_test_dpms()
  3054. { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
  3055. ac_cv_have_dpms="yes", [
  3056. LDFLAGS="$ac_save_ldflags"
  3057. CFLAGS="$ac_save_cflags"
  3058. LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
  3059. LIBS="$LIBS -lXdpms"
  3060. CFLAGS="$CFLAGS $X_INCLUDES"
  3061. test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
  3062. AC_TRY_LINK([
  3063. #include <X11/Xproto.h>
  3064. #include <X11/X.h>
  3065. #include <X11/Xlib.h>
  3066. #include <X11/extensions/dpms.h>
  3067. int foo_test_dpms()
  3068. { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
  3069. [
  3070. ac_cv_have_dpms="-lXdpms"
  3071. ],ac_cv_have_dpms="no")
  3072. ])
  3073. LDFLAGS="$ac_save_ldflags"
  3074. CFLAGS="$ac_save_cflags"
  3075. LIBS="$ac_save_libs"
  3076. fi
  3077. ])dnl
  3078. if test "$ac_cv_have_dpms" = no; then
  3079. AC_MSG_RESULT(no)
  3080. DPMS_LDFLAGS=""
  3081. DPMSINC=""
  3082. $2
  3083. else
  3084. AC_DEFINE(HAVE_DPMS, 1, [Define if you have DPMS support])
  3085. if test "$ac_cv_have_dpms" = "-lXdpms"; then
  3086. DPMS_LIB="-lXdpms"
  3087. fi
  3088. if test "$DPMS_LDFLAGS" = ""; then
  3089. DPMSLIB="$DPMS_LIB "'$(LIB_X11)'
  3090. else
  3091. DPMSLIB="$DPMS_LDFLAGS $DPMS_LIB "'$(LIB_X11)'
  3092. fi
  3093. if test "$DPMS_INCLUDE" = ""; then
  3094. DPMSINC=""
  3095. else
  3096. DPMSINC="-I$DPMS_INCLUDE"
  3097. fi
  3098. AC_MSG_RESULT(yes)
  3099. $1
  3100. fi
  3101. fi
  3102. ac_save_cflags="$CFLAGS"
  3103. CFLAGS="$CFLAGS $X_INCLUDES"
  3104. test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
  3105. AH_TEMPLATE(HAVE_DPMSCAPABLE_PROTO,
  3106. [Define if you have the DPMSCapable prototype in <X11/extensions/dpms.h>])
  3107. AC_CHECK_DECL(DPMSCapable,
  3108. AC_DEFINE(HAVE_DPMSCAPABLE_PROTO),,
  3109. [#include <X11/extensions/dpms.h>])
  3110. AH_TEMPLATE(HAVE_DPMSINFO_PROTO,
  3111. [Define if you have the DPMSInfo prototype in <X11/extensions/dpms.h>])
  3112. AC_CHECK_DECL(DPMSInfo,
  3113. AC_DEFINE(HAVE_DPMSINFO_PROTO),,
  3114. [#include <X11/extensions/dpms.h>])
  3115. CFLAGS="$ac_save_cflags"
  3116. AC_SUBST(DPMSINC)
  3117. AC_SUBST(DPMSLIB)
  3118. ])
  3119. AC_DEFUN([AC_HAVE_GL],
  3120. [AC_REQUIRE_CPP()dnl
  3121. AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
  3122. test -z "$GL_LDFLAGS" && GL_LDFLAGS=
  3123. test -z "$GL_INCLUDE" && GL_INCLUDE=
  3124. AC_ARG_WITH(gl,AC_HELP_STRING([--without-gl],[disable 3D GL modes]),
  3125. gl_test=$withval, gl_test="yes")
  3126. if test "x$kde_use_qt_emb" = "xyes"; then
  3127. # GL and Qt Embedded is a no-go for now.
  3128. ac_cv_have_gl=no
  3129. elif test "x$gl_test" = xno; then
  3130. ac_cv_have_gl=no
  3131. else
  3132. AC_MSG_CHECKING(for GL)
  3133. AC_CACHE_VAL(ac_cv_have_gl,
  3134. [
  3135. AC_LANG_SAVE
  3136. AC_LANG_CPLUSPLUS
  3137. ac_save_ldflags="$LDFLAGS"
  3138. ac_save_cxxflags="$CXXFLAGS"
  3139. LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU"
  3140. test "x$kde_use_qt_mac" != xyes && test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
  3141. LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
  3142. CXXFLAGS="$CFLAGS $X_INCLUDES"
  3143. test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
  3144. AC_TRY_LINK([#include <GL/gl.h>
  3145. #include <GL/glu.h>
  3146. ], [],
  3147. ac_cv_have_gl="mesa", ac_cv_have_gl="no")
  3148. if test "x$ac_cv_have_gl" = "xno"; then
  3149. LDFLAGS="$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGLU -lGL"
  3150. test "x$kde_use_qt_mac" != xyes && test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
  3151. LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
  3152. CXXFLAGS="$ac_save_cflags $X_INCLUDES"
  3153. test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
  3154. AC_TRY_LINK([#include <GL/gl.h>
  3155. #include <GL/glu.h>
  3156. ], [],
  3157. ac_cv_have_gl="yes", ac_cv_have_gl="no")
  3158. fi
  3159. AC_LANG_RESTORE
  3160. LDFLAGS="$ac_save_ldflags"
  3161. CXXFLAGS="$ac_save_cxxflags"
  3162. ])dnl
  3163. if test "$ac_cv_have_gl" = "no"; then
  3164. AC_MSG_RESULT(no)
  3165. GL_LDFLAGS=""
  3166. GLINC=""
  3167. $2
  3168. else
  3169. AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)])
  3170. if test "$GL_LDFLAGS" = ""; then
  3171. if test "$ac_cv_have_gl" = "mesa"; then
  3172. GLLIB='-lMesaGLU -lMesaGL $(LIB_X11)'
  3173. else
  3174. GLLIB='-lGLU -lGL $(LIB_X11)'
  3175. fi
  3176. else
  3177. if test "$ac_cv_have_gl" = "mesa"; then
  3178. GLLIB="$GL_LDFLAGS -lMesaGLU -lMesaGL "'$(LIB_X11)'
  3179. else
  3180. GLLIB="$GL_LDFLAGS -lGLU -lGL "'$(LIB_X11)'
  3181. fi
  3182. fi
  3183. if test "$GL_INCLUDE" = ""; then
  3184. GLINC=""
  3185. else
  3186. GLINC="-I$GL_INCLUDE"
  3187. fi
  3188. AC_MSG_RESULT($ac_cv_have_gl)
  3189. $1
  3190. fi
  3191. fi
  3192. AC_SUBST(GLINC)
  3193. AC_SUBST(GLLIB)
  3194. ])
  3195. dnl shadow password and PAM magic - maintained by ossi@kde.org
  3196. AC_DEFUN([KDE_PAM], [
  3197. AC_REQUIRE([KDE_CHECK_LIBDL])
  3198. want_pam=
  3199. AC_ARG_WITH(pam,
  3200. AC_HELP_STRING([--with-pam[=ARG]],[enable support for PAM: ARG=[yes|no|service name]]),
  3201. [ if test "x$withval" = "xyes"; then
  3202. want_pam=yes
  3203. pam_service=kde
  3204. elif test "x$withval" = "xno"; then
  3205. want_pam=no
  3206. else
  3207. want_pam=yes
  3208. pam_service=$withval
  3209. fi
  3210. ], [ pam_service=kde ])
  3211. use_pam=
  3212. PAMLIBS=
  3213. if test "x$want_pam" != xno; then
  3214. AC_CHECK_LIB(pam, pam_start, [
  3215. AC_CHECK_HEADER(security/pam_appl.h,
  3216. [ pam_header=security/pam_appl.h ],
  3217. [ AC_CHECK_HEADER(pam/pam_appl.h,
  3218. [ pam_header=pam/pam_appl.h ],
  3219. [
  3220. AC_MSG_WARN([PAM detected, but no headers found!
  3221. Make sure you have the necessary development packages installed.])
  3222. ]
  3223. )
  3224. ]
  3225. )
  3226. ], , $LIBDL)
  3227. if test -z "$pam_header"; then
  3228. if test "x$want_pam" = xyes; then
  3229. AC_MSG_ERROR([--with-pam was specified, but cannot compile with PAM!])
  3230. fi
  3231. else
  3232. AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
  3233. PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
  3234. use_pam=yes
  3235. dnl darwin claims to be something special
  3236. if test "$pam_header" = "pam/pam_appl.h"; then
  3237. AC_DEFINE(HAVE_PAM_PAM_APPL_H, 1, [Define if your PAM headers are in pam/ instead of security/])
  3238. fi
  3239. dnl test whether struct pam_message is const (Linux) or not (Sun)
  3240. AC_MSG_CHECKING(for const pam_message)
  3241. AC_EGREP_HEADER([struct pam_message], $pam_header,
  3242. [ AC_EGREP_HEADER([const struct pam_message], $pam_header,
  3243. [AC_MSG_RESULT([const: Linux-type PAM])],
  3244. [AC_MSG_RESULT([nonconst: Sun-type PAM])
  3245. AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
  3246. )],
  3247. [AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
  3248. fi
  3249. fi
  3250. AC_SUBST(PAMLIBS)
  3251. ])
  3252. dnl DEF_PAM_SERVICE(arg name, full name, define name)
  3253. AC_DEFUN([DEF_PAM_SERVICE], [
  3254. AC_ARG_WITH($1-pam,
  3255. AC_HELP_STRING([--with-$1-pam=[val]],[override PAM service from --with-pam for $2]),
  3256. [ if test "x$use_pam" = xyes; then
  3257. $3_PAM_SERVICE=$withval
  3258. else
  3259. AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected.
  3260. You may want to enforce it by using --with-pam.])
  3261. fi
  3262. ],
  3263. [ if test "x$use_pam" = xyes; then
  3264. $3_PAM_SERVICE="$pam_service"
  3265. fi
  3266. ])
  3267. if test -n "$$3_PAM_SERVICE"; then
  3268. AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE])
  3269. AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2])
  3270. fi
  3271. AC_SUBST($3_PAM_SERVICE)
  3272. ])
  3273. AC_DEFUN([KDE_SHADOWPASSWD], [
  3274. AC_REQUIRE([KDE_PAM])
  3275. AC_CHECK_LIB(shadow, getspent,
  3276. [ LIBSHADOW="-lshadow"
  3277. ac_use_shadow=yes
  3278. ],
  3279. [ dnl for UnixWare
  3280. AC_CHECK_LIB(gen, getspent,
  3281. [ LIBGEN="-lgen"
  3282. ac_use_shadow=yes
  3283. ],
  3284. [ AC_CHECK_FUNC(getspent,
  3285. [ ac_use_shadow=yes ],
  3286. [ ac_use_shadow=no ])
  3287. ])
  3288. ])
  3289. AC_SUBST(LIBSHADOW)
  3290. AC_SUBST(LIBGEN)
  3291. AC_MSG_CHECKING([for shadow passwords])
  3292. AC_ARG_WITH(shadow,
  3293. AC_HELP_STRING([--with-shadow],[If you want shadow password support]),
  3294. [ if test "x$withval" != "xno"; then
  3295. use_shadow=yes
  3296. else
  3297. use_shadow=no
  3298. fi
  3299. ], [
  3300. use_shadow="$ac_use_shadow"
  3301. ])
  3302. if test "x$use_shadow" = xyes; then
  3303. AC_MSG_RESULT(yes)
  3304. AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords])
  3305. else
  3306. AC_MSG_RESULT(no)
  3307. LIBSHADOW=
  3308. LIBGEN=
  3309. fi
  3310. dnl finally make the relevant binaries setuid root, if we have shadow passwds.
  3311. dnl this still applies, if we could use it indirectly through pam.
  3312. if test "x$use_shadow" = xyes ||
  3313. ( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then
  3314. case $host in
  3315. *-*-freebsd* | *-*-netbsd* | *-*-openbsd*)
  3316. SETUIDFLAGS="-m 4755 -o root";;
  3317. *)
  3318. SETUIDFLAGS="-m 4755";;
  3319. esac
  3320. fi
  3321. AC_SUBST(SETUIDFLAGS)
  3322. ])
  3323. AC_DEFUN([KDE_PASSWDLIBS], [
  3324. AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT
  3325. AC_REQUIRE([KDE_PAM])
  3326. AC_REQUIRE([KDE_SHADOWPASSWD])
  3327. if test "x$use_pam" = "xyes"; then
  3328. PASSWDLIBS="$PAMLIBS"
  3329. else
  3330. PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN"
  3331. fi
  3332. dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but
  3333. dnl /etc/master.passwd holds the actual passwords. /etc/master.passwd requires
  3334. dnl root to read, so kcheckpass needs to be root (even when using pam, since pam
  3335. dnl may need to read /etc/master.passwd).
  3336. case $host in
  3337. *-*-freebsd*)
  3338. SETUIDFLAGS="-m 4755 -o root"
  3339. ;;
  3340. *)
  3341. ;;
  3342. esac
  3343. AC_SUBST(PASSWDLIBS)
  3344. ])
  3345. AC_DEFUN([KDE_CHECK_LIBDL],
  3346. [
  3347. AC_CHECK_LIB(dl, dlopen, [
  3348. LIBDL="-ldl"
  3349. ac_cv_have_dlfcn=yes
  3350. ])
  3351. AC_CHECK_LIB(dld, shl_unload, [
  3352. LIBDL="-ldld"
  3353. ac_cv_have_shload=yes
  3354. ])
  3355. AC_SUBST(LIBDL)
  3356. ])
  3357. AC_DEFUN([KDE_CHECK_DLOPEN],
  3358. [
  3359. KDE_CHECK_LIBDL
  3360. AC_CHECK_HEADERS(dlfcn.h dl.h)
  3361. if test "$ac_cv_header_dlfcn_h" = "no"; then
  3362. ac_cv_have_dlfcn=no
  3363. fi
  3364. if test "$ac_cv_header_dl_h" = "no"; then
  3365. ac_cv_have_shload=no
  3366. fi
  3367. dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE
  3368. dnl (MM)
  3369. AC_ARG_ENABLE(dlopen,
  3370. AC_HELP_STRING([--disable-dlopen],[link statically [default=no]]),
  3371. enable_dlopen=$enableval,
  3372. enable_dlopen=yes)
  3373. # override the user's opinion, if we know it better ;)
  3374. if test "$ac_cv_have_dlfcn" = "no" && test "$ac_cv_have_shload" = "no"; then
  3375. enable_dlopen=no
  3376. fi
  3377. if test "$ac_cv_have_dlfcn" = "yes"; then
  3378. AC_DEFINE_UNQUOTED(HAVE_DLFCN, 1, [Define if you have dlfcn])
  3379. fi
  3380. if test "$ac_cv_have_shload" = "yes"; then
  3381. AC_DEFINE_UNQUOTED(HAVE_SHLOAD, 1, [Define if you have shload])
  3382. fi
  3383. if test "$enable_dlopen" = no ; then
  3384. test -n "$1" && eval $1
  3385. else
  3386. test -n "$2" && eval $2
  3387. fi
  3388. ])
  3389. AC_DEFUN([KDE_CHECK_DYNAMIC_LOADING],
  3390. [
  3391. KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no)
  3392. KDE_PROG_LIBTOOL
  3393. AC_MSG_CHECKING([dynamic loading])
  3394. eval "`egrep '^build_libtool_libs=' libtool`"
  3395. if test "$build_libtool_libs" = "yes" && test "$enable_dlopen" = "yes"; then
  3396. dynamic_loading=yes
  3397. AC_DEFINE_UNQUOTED(HAVE_DYNAMIC_LOADING)
  3398. else
  3399. dynamic_loading=no
  3400. fi
  3401. AC_MSG_RESULT($dynamic_loading)
  3402. if test "$dynamic_loading" = "yes"; then
  3403. $1
  3404. else
  3405. $2
  3406. fi
  3407. ])
  3408. AC_DEFUN([KDE_ADD_INCLUDES],
  3409. [
  3410. if test -z "$1"; then
  3411. test_include="Pix.h"
  3412. else
  3413. test_include="$1"
  3414. fi
  3415. AC_MSG_CHECKING([for libg++ ($test_include)])
  3416. AC_CACHE_VAL(kde_cv_libgpp_includes,
  3417. [
  3418. kde_cv_libgpp_includes=no
  3419. for ac_dir in \
  3420. \
  3421. /usr/include/g++ \
  3422. /usr/include \
  3423. /usr/unsupported/include \
  3424. /opt/include \
  3425. $extra_include \
  3426. ; \
  3427. do
  3428. if test -r "$ac_dir/$test_include"; then
  3429. kde_cv_libgpp_includes=$ac_dir
  3430. break
  3431. fi
  3432. done
  3433. ])
  3434. AC_MSG_RESULT($kde_cv_libgpp_includes)
  3435. if test "$kde_cv_libgpp_includes" != "no"; then
  3436. all_includes="-I$kde_cv_libgpp_includes $all_includes $USER_INCLUDES"
  3437. fi
  3438. ])
  3439. ])
  3440. AC_DEFUN([KDE_CHECK_LIBPTHREAD],
  3441. [
  3442. LIBPTHREAD=""
  3443. if test -n "$PTHREAD_LIBS"; then
  3444. PTHREAD_LIBS_save="$PTHREAD_LIBS"
  3445. PTHREAD_LIBS=`echo "$PTHREAD_LIBS_save" | sed -e 's,^-l,,g'`
  3446. KDE_CHECK_LIB($PTHREAD_LIBS, pthread_create, [LIBPTHREAD="$PTHREAD_LIBS_save"] )
  3447. PTHREAD_LIBS="$PTHREAD_LIBS_save"
  3448. fi
  3449. if test -z "$LIBPTHREAD"; then
  3450. AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"] )
  3451. fi
  3452. AC_SUBST(LIBPTHREAD)
  3453. ])
  3454. AC_DEFUN([KDE_CHECK_PTHREAD_OPTION],
  3455. [
  3456. USE_THREADS=""
  3457. if test -z "$LIBPTHREAD"; then
  3458. KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-D_THREAD_SAFE -pthread"])
  3459. fi
  3460. AH_VERBATIM(__svr_define, [
  3461. #if defined(__SVR4) && !defined(__svr4__)
  3462. #define __svr4__ 1
  3463. #endif
  3464. ])
  3465. case $host_os in
  3466. solaris*)
  3467. KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
  3468. CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
  3469. ;;
  3470. freebsd*)
  3471. CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE $PTHREAD_CFLAGS"
  3472. ;;
  3473. aix*)
  3474. CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
  3475. LIBPTHREAD="$LIBPTHREAD -lc_r"
  3476. ;;
  3477. linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
  3478. if test "$CXX" = "KCC"; then
  3479. CXXFLAGS="$CXXFLAGS --thread_safe"
  3480. NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
  3481. fi
  3482. ;;
  3483. *)
  3484. ;;
  3485. esac
  3486. AC_SUBST(USE_THREADS)
  3487. AC_SUBST(LIBPTHREAD)
  3488. ])
  3489. AC_DEFUN([KDE_CHECK_THREADING],
  3490. [
  3491. AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
  3492. AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION])
  3493. dnl default is yes if libpthread is found and no if no libpthread is available
  3494. if test -z "$LIBPTHREAD"; then
  3495. if test -z "$USE_THREADS"; then
  3496. kde_check_threading_default=no
  3497. else
  3498. kde_check_threading_default=yes
  3499. fi
  3500. else
  3501. kde_check_threading_default=yes
  3502. fi
  3503. AC_ARG_ENABLE(threading,AC_HELP_STRING([--disable-threading],[disables threading even if libpthread found]),
  3504. kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default)
  3505. if test "x$kde_use_threading" = "xyes"; then
  3506. AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
  3507. fi
  3508. ])
  3509. AC_DEFUN([KDE_TRY_LINK_PYTHON],
  3510. [
  3511. if test "$kde_python_link_found" = no; then
  3512. if test "$1" = normal; then
  3513. AC_MSG_CHECKING(if a Python application links)
  3514. else
  3515. AC_MSG_CHECKING(if Python depends on $2)
  3516. fi
  3517. AC_CACHE_VAL(kde_cv_try_link_python_$1,
  3518. [
  3519. kde_save_cflags="$CFLAGS"
  3520. CFLAGS="$CFLAGS $PYTHONINC"
  3521. kde_save_libs="$LIBS"
  3522. LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET"
  3523. kde_save_ldflags="$LDFLAGS"
  3524. LDFLAGS="$LDFLAGS $PYTHONLIB"
  3525. AC_TRY_LINK(
  3526. [
  3527. #include <Python.h>
  3528. ],[
  3529. PySys_SetArgv(1, 0);
  3530. ],
  3531. [kde_cv_try_link_python_$1=yes],
  3532. [kde_cv_try_link_python_$1=no]
  3533. )
  3534. CFLAGS="$kde_save_cflags"
  3535. LIBS="$kde_save_libs"
  3536. LDFLAGS="$kde_save_ldflags"
  3537. ])
  3538. if test "$kde_cv_try_link_python_$1" = "yes"; then
  3539. AC_MSG_RESULT(yes)
  3540. kde_python_link_found=yes
  3541. if test ! "$1" = normal; then
  3542. LIBPYTHON="$LIBPYTHON $2"
  3543. fi
  3544. $3
  3545. else
  3546. AC_MSG_RESULT(no)
  3547. $4
  3548. fi
  3549. fi
  3550. ])
  3551. AC_DEFUN([KDE_CHECK_PYTHON_DIR],
  3552. [
  3553. AC_MSG_CHECKING([for Python directory])
  3554. AC_CACHE_VAL(kde_cv_pythondir,
  3555. [
  3556. if test -z "$PYTHONDIR"; then
  3557. kde_cv_pythondir=/usr/local
  3558. else
  3559. kde_cv_pythondir="$PYTHONDIR"
  3560. fi
  3561. ])
  3562. AC_ARG_WITH(pythondir,
  3563. AC_HELP_STRING([--with-pythondir=pythondir],[use python installed in pythondir]),
  3564. [
  3565. ac_python_dir=$withval
  3566. ], ac_python_dir=$kde_cv_pythondir
  3567. )
  3568. AC_MSG_RESULT($ac_python_dir)
  3569. ])
  3570. AC_DEFUN([KDE_CHECK_PYTHON_INTERN],
  3571. [
  3572. AC_REQUIRE([KDE_CHECK_LIBDL])
  3573. AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
  3574. AC_REQUIRE([KDE_CHECK_PYTHON_DIR])
  3575. if test -z "$1"; then
  3576. version="1.5"
  3577. else
  3578. version="$1"
  3579. fi
  3580. AC_MSG_CHECKING([for Python$version])
  3581. python_incdirs="$ac_python_dir/include /usr/include /usr/local/include/ $kde_extra_includes"
  3582. AC_FIND_FILE(Python.h, $python_incdirs, python_incdir)
  3583. if test ! -r $python_incdir/Python.h; then
  3584. AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir)
  3585. python_incdir=$python_incdir/python$version
  3586. if test ! -r $python_incdir/Python.h; then
  3587. python_incdir=no
  3588. fi
  3589. fi
  3590. PYTHONINC=-I$python_incdir
  3591. python_libdirs="$ac_python_dir/lib$tdelibsuff /usr/lib$tdelibsuff /usr/local /usr/lib$tdelibsuff $kde_extra_libs"
  3592. AC_FIND_FILE(libpython$version.so, $python_libdirs, python_libdir)
  3593. if test ! -r $python_libdir/libpython$version.so; then
  3594. AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
  3595. if test ! -r $python_libdir/libpython$version.a; then
  3596. AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
  3597. python_libdir=$python_libdir/python$version/config
  3598. if test ! -r $python_libdir/libpython$version.a; then
  3599. python_libdir=no
  3600. fi
  3601. fi
  3602. fi
  3603. PYTHONLIB=-L$python_libdir
  3604. kde_orig_LIBPYTHON=$LIBPYTHON
  3605. if test -z "$LIBPYTHON"; then
  3606. LIBPYTHON=-lpython$version
  3607. fi
  3608. AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
  3609. python_moddir=$python_moddir/python$version
  3610. if test ! -r $python_moddir/copy.py; then
  3611. python_moddir=no
  3612. fi
  3613. PYTHONMODDIR=$python_moddir
  3614. AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir)
  3615. if test x$python_incdir = xno || test x$python_libdir = xno || test x$python_moddir = xno; then
  3616. LIBPYTHON=$kde_orig_LIBPYTHON
  3617. test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB=""
  3618. test "x$PYTHONINC" = "x-Ino" && PYTHONINC=""
  3619. $2
  3620. else
  3621. dnl Note: this test is very weak
  3622. kde_python_link_found=no
  3623. KDE_TRY_LINK_PYTHON(normal)
  3624. KDE_TRY_LINK_PYTHON(m, -lm)
  3625. KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
  3626. KDE_TRY_LINK_PYTHON(tcl, -ltcl)
  3627. KDE_TRY_LINK_PYTHON(db2, -ldb2)
  3628. KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm])
  3629. KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil])
  3630. KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil])
  3631. KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3])
  3632. KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil])
  3633. KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm])
  3634. KDE_TRY_LINK_PYTHON(pthread_and_panel_curses, [$LIBPTHREAD $LIBDL -lm -lpanel -lcurses])
  3635. KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
  3636. [AC_MSG_WARN([it seems, Python depends on another library.
  3637. Please set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this
  3638. and contact the authors to let them know about this problem])
  3639. ])
  3640. LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
  3641. AC_SUBST(PYTHONINC)
  3642. AC_SUBST(PYTHONLIB)
  3643. AC_SUBST(LIBPYTHON)
  3644. AC_SUBST(PYTHONMODDIR)
  3645. AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python])
  3646. fi
  3647. ])
  3648. AC_DEFUN([KDE_CHECK_PYTHON],
  3649. [
  3650. KDE_CHECK_PYTHON_INTERN("2.3",
  3651. [KDE_CHECK_PYTHON_INTERN("2.2",
  3652. [KDE_CHECK_PYTHON_INTERN("2.1",
  3653. [KDE_CHECK_PYTHON_INTERN("2.0",
  3654. [KDE_CHECK_PYTHON_INTERN($1, $2) ])
  3655. ])
  3656. ])
  3657. ])
  3658. ])
  3659. AC_DEFUN([KDE_CHECK_STL],
  3660. [
  3661. AC_LANG_SAVE
  3662. AC_LANG_CPLUSPLUS
  3663. ac_save_CXXFLAGS="$CXXFLAGS"
  3664. CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
  3665. AC_MSG_CHECKING([if C++ programs can be compiled])
  3666. AC_CACHE_VAL(kde_cv_stl_works,
  3667. [
  3668. AC_TRY_COMPILE([
  3669. #include <string>
  3670. using namespace std;
  3671. ],[
  3672. string astring="Hallo Welt.";
  3673. astring.erase(0, 6); // now astring is "Welt"
  3674. return 0;
  3675. ], kde_cv_stl_works=yes,
  3676. kde_cv_stl_works=no)
  3677. ])
  3678. AC_MSG_RESULT($kde_cv_stl_works)
  3679. if test "$kde_cv_stl_works" = "yes"; then
  3680. # back compatible
  3681. AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
  3682. else
  3683. AC_MSG_ERROR([Your Installation isn't able to compile simple C++ programs.
  3684. Check config.log for details - if you're using a Linux distribution you might miss
  3685. a package named similiar to libstd++-dev.])
  3686. fi
  3687. CXXFLAGS="$ac_save_CXXFLAGS"
  3688. AC_LANG_RESTORE
  3689. ])
  3690. AC_DEFUN([AC_FIND_QIMGIO],
  3691. [AC_REQUIRE([AC_FIND_JPEG])
  3692. AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
  3693. AC_MSG_CHECKING([for qimgio])
  3694. AC_CACHE_VAL(ac_cv_lib_qimgio,
  3695. [
  3696. AC_LANG_SAVE
  3697. AC_LANG_CPLUSPLUS
  3698. ac_save_LIBS="$LIBS"
  3699. ac_save_CXXFLAGS="$CXXFLAGS"
  3700. LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBTQT"
  3701. CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
  3702. AC_TRY_RUN(dnl
  3703. [
  3704. #include <qimageio.h>
  3705. #include <qstring.h>
  3706. int main() {
  3707. QString t = "hallo";
  3708. t.fill('t');
  3709. qInitImageIO();
  3710. }
  3711. ],
  3712. ac_cv_lib_qimgio=yes,
  3713. ac_cv_lib_qimgio=no,
  3714. ac_cv_lib_qimgio=no)
  3715. LIBS="$ac_save_LIBS"
  3716. CXXFLAGS="$ac_save_CXXFLAGS"
  3717. AC_LANG_RESTORE
  3718. ])dnl
  3719. if eval "test \"`echo $ac_cv_lib_qimgio`\" = yes"; then
  3720. LIBQIMGIO="-lqimgio -lpng -lz $LIBJPEG"
  3721. AC_MSG_RESULT(yes)
  3722. AC_DEFINE_UNQUOTED(HAVE_QIMGIO, 1, [Define if you have the Qt extension qimgio available])
  3723. AC_SUBST(LIBQIMGIO)
  3724. else
  3725. AC_MSG_RESULT(not found)
  3726. fi
  3727. ])
  3728. AC_DEFUN([AM_DISABLE_LIBRARIES],
  3729. [
  3730. AC_PROVIDE([AM_ENABLE_STATIC])
  3731. AC_PROVIDE([AM_ENABLE_SHARED])
  3732. enable_static=no
  3733. enable_shared=yes
  3734. ])
  3735. AC_DEFUN([AC_CHECK_UTMP_FILE],
  3736. [
  3737. AC_MSG_CHECKING([for utmp file])
  3738. AC_CACHE_VAL(kde_cv_utmp_file,
  3739. [
  3740. kde_cv_utmp_file=no
  3741. for ac_file in \
  3742. \
  3743. /var/run/utmp \
  3744. /var/adm/utmp \
  3745. /etc/utmp \
  3746. ; \
  3747. do
  3748. if test -r "$ac_file"; then
  3749. kde_cv_utmp_file=$ac_file
  3750. break
  3751. fi
  3752. done
  3753. ])
  3754. if test "$kde_cv_utmp_file" != "no"; then
  3755. AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries])
  3756. $1
  3757. AC_MSG_RESULT($kde_cv_utmp_file)
  3758. else
  3759. $2
  3760. AC_MSG_RESULT([non found])
  3761. fi
  3762. ])
  3763. AC_DEFUN([KDE_CREATE_SUBDIRSLIST],
  3764. [
  3765. DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
  3766. if test ! -s $srcdir/subdirs; then
  3767. dnl Note: Makefile.common creates subdirs, so this is just a fallback
  3768. TOPSUBDIRS=""
  3769. files=`cd $srcdir && ls -1`
  3770. dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
  3771. for i in $dirs; do
  3772. echo $i >> $srcdir/subdirs
  3773. done
  3774. fi
  3775. ac_topsubdirs=
  3776. if test -s $srcdir/inst-apps; then
  3777. ac_topsubdirs="`cat $srcdir/inst-apps`"
  3778. elif test -s $srcdir/subdirs; then
  3779. ac_topsubdirs="`cat $srcdir/subdirs`"
  3780. fi
  3781. for i in $ac_topsubdirs; do
  3782. AC_MSG_CHECKING([if $i should be compiled])
  3783. if test -d $srcdir/$i; then
  3784. install_it="yes"
  3785. for j in $DO_NOT_COMPILE; do
  3786. if test $i = $j; then
  3787. install_it="no"
  3788. fi
  3789. done
  3790. else
  3791. install_it="no"
  3792. fi
  3793. AC_MSG_RESULT($install_it)
  3794. vari=`echo $i | sed -e 's,[[-+.]],_,g'`
  3795. if test $install_it = "yes"; then
  3796. TOPSUBDIRS="$TOPSUBDIRS $i"
  3797. eval "$vari""_SUBDIR_included=yes"
  3798. else
  3799. eval "$vari""_SUBDIR_included=no"
  3800. fi
  3801. done
  3802. AC_SUBST(TOPSUBDIRS)
  3803. ])
  3804. AC_DEFUN([KDE_CHECK_NAMESPACES],
  3805. [
  3806. AC_MSG_CHECKING(whether C++ compiler supports namespaces)
  3807. AC_LANG_SAVE
  3808. AC_LANG_CPLUSPLUS
  3809. AC_TRY_COMPILE([
  3810. ],
  3811. [
  3812. namespace Foo {
  3813. extern int i;
  3814. namespace Bar {
  3815. extern int i;
  3816. }
  3817. }
  3818. int Foo::i = 0;
  3819. int Foo::Bar::i = 1;
  3820. ],[
  3821. AC_MSG_RESULT(yes)
  3822. AC_DEFINE(HAVE_NAMESPACES)
  3823. ], [
  3824. AC_MSG_RESULT(no)
  3825. ])
  3826. AC_LANG_RESTORE
  3827. ])
  3828. dnl ------------------------------------------------------------------------
  3829. dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure@kde.org
  3830. dnl ------------------------------------------------------------------------
  3831. dnl
  3832. AC_DEFUN([AC_CHECK_S_ISSOCK],
  3833. [
  3834. AC_MSG_CHECKING(for S_ISSOCK)
  3835. AC_CACHE_VAL(ac_cv_have_s_issock,
  3836. [
  3837. AC_TRY_LINK(
  3838. [
  3839. #include <sys/stat.h>
  3840. ],
  3841. [
  3842. struct stat buff;
  3843. int b = S_ISSOCK( buff.st_mode );
  3844. ],
  3845. ac_cv_have_s_issock=yes,
  3846. ac_cv_have_s_issock=no)
  3847. ])
  3848. AC_MSG_RESULT($ac_cv_have_s_issock)
  3849. if test "$ac_cv_have_s_issock" = "yes"; then
  3850. AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.])
  3851. fi
  3852. AH_VERBATIM(_ISSOCK,
  3853. [
  3854. #ifndef HAVE_S_ISSOCK
  3855. #define HAVE_S_ISSOCK
  3856. #define S_ISSOCK(mode) (1==0)
  3857. #endif
  3858. ])
  3859. ])
  3860. dnl ------------------------------------------------------------------------
  3861. dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure@kde.org
  3862. dnl ------------------------------------------------------------------------
  3863. dnl
  3864. AC_DEFUN([AC_CHECK_KDEMAXPATHLEN],
  3865. [
  3866. AC_MSG_CHECKING(for MAXPATHLEN)
  3867. AC_CACHE_VAL(ac_cv_maxpathlen,
  3868. [
  3869. cat > conftest.$ac_ext <<EOF
  3870. #ifdef STDC_HEADERS
  3871. # include <stdlib.h>
  3872. #endif
  3873. #include <stdio.h>
  3874. #include <sys/param.h>
  3875. #ifndef MAXPATHLEN
  3876. #define MAXPATHLEN 1024
  3877. #endif
  3878. KDE_HELLO MAXPATHLEN
  3879. EOF
  3880. ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep '^KDE_HELLO' >conftest.out"
  3881. if AC_TRY_EVAL(ac_try) && test -s conftest.out; then
  3882. ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out`
  3883. else
  3884. ac_cv_maxpathlen=1024
  3885. fi
  3886. rm conftest.*
  3887. ])
  3888. AC_MSG_RESULT($ac_cv_maxpathlen)
  3889. AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] )
  3890. ])
  3891. AC_DEFUN([KDE_CHECK_HEADER],
  3892. [
  3893. AC_LANG_SAVE
  3894. kde_safe_cppflags=$CPPFLAGS
  3895. CPPFLAGS="$CPPFLAGS $all_includes"
  3896. AC_LANG_CPLUSPLUS
  3897. AC_CHECK_HEADER([$1], [$2], [$3], [$4])
  3898. CPPFLAGS=$kde_safe_cppflags
  3899. AC_LANG_RESTORE
  3900. ])
  3901. AC_DEFUN([KDE_CHECK_HEADERS],
  3902. [
  3903. AH_CHECK_HEADERS([$1])
  3904. AC_LANG_SAVE
  3905. kde_safe_cppflags=$CPPFLAGS
  3906. CPPFLAGS="$CPPFLAGS $all_includes"
  3907. AC_LANG_CPLUSPLUS
  3908. AC_CHECK_HEADERS([$1], [$2], [$3], [$4])
  3909. CPPFLAGS=$kde_safe_cppflags
  3910. AC_LANG_RESTORE
  3911. ])
  3912. AC_DEFUN([KDE_FAST_CONFIGURE],
  3913. [
  3914. dnl makes configure fast (needs perl)
  3915. AC_ARG_ENABLE(fast-perl, AC_HELP_STRING([--disable-fast-perl],[disable fast Makefile generation (needs perl)]),
  3916. with_fast_perl=$enableval, with_fast_perl=yes)
  3917. ])
  3918. AC_DEFUN([KDE_CONF_FILES],
  3919. [
  3920. val=
  3921. if test -f $srcdir/configure.files ; then
  3922. val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files`
  3923. fi
  3924. CONF_FILES=
  3925. if test -n "$val" ; then
  3926. for i in $val ; do
  3927. CONF_FILES="$CONF_FILES $i"
  3928. done
  3929. fi
  3930. AC_SUBST(CONF_FILES)
  3931. ])dnl
  3932. AC_DEFUN([KDE_SET_PREFIX],
  3933. [
  3934. unset CDPATH
  3935. dnl make $TDEDIR the default for the installation
  3936. AC_PREFIX_DEFAULT(${TDEDIR:-/usr/local/kde})
  3937. if test "x$prefix" = "xNONE"; then
  3938. prefix=$ac_default_prefix
  3939. ac_configure_args="$ac_configure_args --prefix=$prefix"
  3940. fi
  3941. # And delete superfluous '/' to make compares easier
  3942. prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
  3943. exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
  3944. KDE_FAST_CONFIGURE
  3945. KDE_CONF_FILES
  3946. ])
  3947. pushdef([AC_PROG_INSTALL],
  3948. [
  3949. dnl our own version, testing for a -p flag
  3950. popdef([AC_PROG_INSTALL])
  3951. dnl as AC_PROG_INSTALL works as it works we first have
  3952. dnl to save if the user didn't specify INSTALL, as the
  3953. dnl autoconf one overwrites INSTALL and we have no chance to find
  3954. dnl out afterwards
  3955. test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL
  3956. test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM
  3957. test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT
  3958. AC_PROG_INSTALL
  3959. if test -z "$kde_save_INSTALL_given" ; then
  3960. # OK, user hasn't given any INSTALL, autoconf found one for us
  3961. # now we test, if it supports the -p flag
  3962. AC_MSG_CHECKING(for -p flag to install)
  3963. rm -f confinst.$$.* > /dev/null 2>&1
  3964. echo "Testtest" > confinst.$$.orig
  3965. ac_res=no
  3966. if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then
  3967. if test -f confinst.$$.new ; then
  3968. # OK, -p seems to do no harm to install
  3969. INSTALL="${INSTALL} -p"
  3970. ac_res=yes
  3971. fi
  3972. fi
  3973. rm -f confinst.$$.*
  3974. AC_MSG_RESULT($ac_res)
  3975. fi
  3976. dnl the following tries to resolve some signs and wonders coming up
  3977. dnl with different autoconf/automake versions
  3978. dnl e.g.:
  3979. dnl *automake 1.4 install-strip sets A_M_INSTALL_PROGRAM_FLAGS to -s
  3980. dnl and has INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(A_M_INSTALL_PROGRAM_FLAGS)
  3981. dnl it header-vars.am, so there the actual INSTALL_PROGRAM gets the -s
  3982. dnl *automake 1.4a (and above) use INSTALL_STRIP_FLAG and only has
  3983. dnl INSTALL_PROGRAM = @INSTALL_PROGRAM@ there, but changes the
  3984. dnl install-@DIR@PROGRAMS targets to explicitly use that flag
  3985. dnl *autoconf 2.13 is dumb, and thinks it can use INSTALL_PROGRAM as
  3986. dnl INSTALL_SCRIPT, which breaks with automake <= 1.4
  3987. dnl *autoconf >2.13 (since 10.Apr 1999) has not that failure
  3988. dnl *sometimes KDE does not use the install-@DIR@PROGRAM targets from
  3989. dnl automake (due to broken Makefile.am or whatever) to install programs,
  3990. dnl and so does not see the -s flag in automake > 1.4
  3991. dnl to clean up that mess we:
  3992. dnl +set INSTALL_PROGRAM to use INSTALL_STRIP_FLAG
  3993. dnl which cleans KDE's program with automake > 1.4;
  3994. dnl +set INSTALL_SCRIPT to only use INSTALL, to clean up autoconf's problems
  3995. dnl with automake<=1.4
  3996. dnl note that dues to this sometimes two '-s' flags are used (if KDE
  3997. dnl properly uses install-@DIR@PROGRAMS, but I don't care
  3998. dnl
  3999. dnl And to all this comes, that I even can't write in comments variable
  4000. dnl names used by automake, because it is so stupid to think I wanted to
  4001. dnl _use_ them, therefor I have written A_M_... instead of AM_
  4002. dnl hmm, I wanted to say something ... ahh yes: Arghhh.
  4003. if test -z "$kde_save_INSTALL_PROGRAM_given" ; then
  4004. INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
  4005. fi
  4006. if test -z "$kde_save_INSTALL_SCRIPT_given" ; then
  4007. INSTALL_SCRIPT='${INSTALL}'
  4008. fi
  4009. ])dnl
  4010. AC_DEFUN([KDE_LANG_CPLUSPLUS],
  4011. [AC_LANG_CPLUSPLUS
  4012. ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
  4013. pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS])
  4014. ])
  4015. pushdef([AC_LANG_CPLUSPLUS],
  4016. [popdef([AC_LANG_CPLUSPLUS])
  4017. KDE_LANG_CPLUSPLUS
  4018. ])
  4019. AC_DEFUN([KDE_CHECK_LONG_LONG],
  4020. [
  4021. AC_MSG_CHECKING(for long long)
  4022. AC_CACHE_VAL(kde_cv_c_long_long,
  4023. [
  4024. AC_LANG_SAVE
  4025. AC_LANG_CPLUSPLUS
  4026. AC_TRY_LINK([], [
  4027. long long foo = 0;
  4028. foo = foo+1;
  4029. ],
  4030. kde_cv_c_long_long=yes, kde_cv_c_long_long=no)
  4031. AC_LANG_RESTORE
  4032. ])
  4033. AC_MSG_RESULT($kde_cv_c_long_long)
  4034. if test "$kde_cv_c_long_long" = yes; then
  4035. AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long as datatype])
  4036. fi
  4037. ])
  4038. AC_DEFUN([KDE_CHECK_LIB],
  4039. [
  4040. kde_save_LDFLAGS="$LDFLAGS"
  4041. dnl AC_CHECK_LIB modifies LIBS, so save it here
  4042. kde_save_LIBS="$LIBS"
  4043. LDFLAGS="$LDFLAGS $all_libraries"
  4044. case $host_os in
  4045. aix*) LDFLAGS="-brtl $LDFLAGS"
  4046. test "$GCC" = yes && LDFLAGS="-Wl,$LDFLAGS"
  4047. ;;
  4048. esac
  4049. AC_CHECK_LIB($1, $2, $3, $4, $5)
  4050. LDFLAGS="$kde_save_LDFLAGS"
  4051. LIBS="$kde_save_LIBS"
  4052. ])
  4053. AC_DEFUN([KDE_JAVA_PREFIX],
  4054. [
  4055. dir=`dirname "$1"`
  4056. base=`basename "$1"`
  4057. list=`ls -1 $dir 2> /dev/null`
  4058. for entry in $list; do
  4059. if test -d $dir/$entry/bin; then
  4060. case $entry in
  4061. $base)
  4062. javadirs="$javadirs $dir/$entry/bin"
  4063. ;;
  4064. esac
  4065. elif test -d $dir/$entry/jre/bin; then
  4066. case $entry in
  4067. $base)
  4068. javadirs="$javadirs $dir/$entry/jre/bin"
  4069. ;;
  4070. esac
  4071. fi
  4072. done
  4073. ])
  4074. dnl KDE_CHEC_JAVA_DIR(onlyjre)
  4075. AC_DEFUN([KDE_CHECK_JAVA_DIR],
  4076. [
  4077. AC_ARG_WITH(java,
  4078. AC_HELP_STRING([--with-java=javadir],[use java installed in javadir, --without-java disables]),
  4079. [ ac_java_dir=$withval
  4080. ], ac_java_dir=""
  4081. )
  4082. AC_MSG_CHECKING([for Java])
  4083. dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH
  4084. if test "x$ac_java_dir" = "xno"; then
  4085. kde_java_bindir=no
  4086. kde_java_includedir=no
  4087. kde_java_libjvmdir=no
  4088. kde_java_libgcjdir=no
  4089. kde_java_libhpidir=no
  4090. else
  4091. if test "x$ac_java_dir" = "x"; then
  4092. dnl No option set -> collect list of candidate paths
  4093. if test -n "$JAVA_HOME"; then
  4094. KDE_JAVA_PREFIX($JAVA_HOME)
  4095. fi
  4096. KDE_JAVA_PREFIX(/usr/j2se)
  4097. KDE_JAVA_PREFIX(/usr/lib/j2se)
  4098. KDE_JAVA_PREFIX(/usr/j*dk*)
  4099. KDE_JAVA_PREFIX(/usr/lib/j*dk*)
  4100. KDE_JAVA_PREFIX(/opt/j*sdk*)
  4101. KDE_JAVA_PREFIX(/usr/lib/java*)
  4102. KDE_JAVA_PREFIX(/usr/java*)
  4103. KDE_JAVA_PREFIX(/usr/java/j*dk*)
  4104. KDE_JAVA_PREFIX(/usr/java/j*re*)
  4105. KDE_JAVA_PREFIX(/usr/lib/SunJava2*)
  4106. KDE_JAVA_PREFIX(/usr/lib/SunJava*)
  4107. KDE_JAVA_PREFIX(/usr/lib/IBMJava2*)
  4108. KDE_JAVA_PREFIX(/usr/lib/IBMJava*)
  4109. KDE_JAVA_PREFIX(/opt/java*)
  4110. kde_cv_path="NONE"
  4111. kde_save_IFS=$IFS
  4112. IFS=':'
  4113. for dir in $PATH; do
  4114. if test -d "$dir"; then
  4115. javadirs="$javadirs $dir"
  4116. fi
  4117. done
  4118. IFS=$kde_save_IFS
  4119. jredirs=
  4120. dnl Now javadirs contains a list of paths that exist, all ending with bin/
  4121. for dir in $javadirs; do
  4122. dnl Check for the java executable
  4123. if test -x "$dir/java"; then
  4124. dnl And also check for a libjvm.so somewhere under there
  4125. dnl Since we have to go to the parent dir, /usr/bin is excluded, /usr is too big.
  4126. if test "$dir" != "/usr/bin"; then
  4127. libjvmdir=`find $dir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
  4128. if test ! -f $libjvmdir/libjvm.so; then continue; fi
  4129. jredirs="$jredirs $dir"
  4130. fi
  4131. fi
  4132. done
  4133. dnl Now jredirs contains a reduced list, of paths where both java and ../**/libjvm.so was found
  4134. JAVAC=
  4135. JAVA=
  4136. kde_java_bindir=no
  4137. for dir in $jredirs; do
  4138. JAVA="$dir/java"
  4139. kde_java_bindir=$dir
  4140. if test -x "$dir/javac"; then
  4141. JAVAC="$dir/javac"
  4142. break
  4143. fi
  4144. done
  4145. if test -n "$JAVAC"; then
  4146. dnl this substitution might not work - well, we test for jni.h below
  4147. kde_java_includedir=`echo $JAVAC | sed -e 's,bin/javac$,include/,'`
  4148. else
  4149. kde_java_includedir=no
  4150. fi
  4151. else
  4152. dnl config option set
  4153. kde_java_bindir=$ac_java_dir/bin
  4154. if test -x $ac_java_dir/bin/java && test ! -x $ac_java_dir/bin/javac; then
  4155. kde_java_includedir=no
  4156. else
  4157. kde_java_includedir=$ac_java_dir/include
  4158. fi
  4159. fi
  4160. fi
  4161. dnl At this point kde_java_bindir and kde_java_includedir are either set or "no"
  4162. if test "x$kde_java_bindir" != "xno"; then
  4163. dnl Look for libjvm.so
  4164. kde_java_libjvmdir=`find $kde_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
  4165. dnl Look for libgcj.so
  4166. kde_java_libgcjdir=`find $kde_java_bindir/.. -name libgcj.so | sed 's,libgcj.so,,'|head -n 1`
  4167. dnl Look for libhpi.so and avoid green threads
  4168. kde_java_libhpidir=`find $kde_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,' | head -n 1`
  4169. dnl Now check everything's fine under there
  4170. dnl the include dir is our flag for having the JDK
  4171. if test -d "$kde_java_includedir"; then
  4172. if test ! -x "$kde_java_bindir/javac"; then
  4173. AC_MSG_ERROR([javac not found under $kde_java_bindir - it seems you passed a wrong --with-java.])
  4174. fi
  4175. if test ! -x "$kde_java_bindir/javah"; then
  4176. AC_MSG_ERROR([javah not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
  4177. fi
  4178. if test ! -x "$kde_java_bindir/jar"; then
  4179. AC_MSG_ERROR([jar not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
  4180. fi
  4181. if test ! -r "$kde_java_includedir/jni.h"; then
  4182. AC_MSG_ERROR([jni.h not found under $kde_java_includedir. Use --with-java or --without-java.])
  4183. fi
  4184. jni_includes="-I$kde_java_includedir"
  4185. dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
  4186. dnl and under linux here..
  4187. dnl not needed for gcj
  4188. if test "x$kde_java_libgcjdir" = "x"; then
  4189. test -d "$kde_java_includedir/linux" && jni_includes="$jni_includes -I$kde_java_includedir/linux"
  4190. test -d "$kde_java_includedir/solaris" && jni_includes="$jni_includes -I$kde_java_includedir/solaris"
  4191. test -d "$kde_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_java_includedir/genunix"
  4192. fi
  4193. else
  4194. JAVAC=
  4195. jni_includes=
  4196. fi
  4197. if test "x$kde_java_libgcjdir" = "x"; then
  4198. if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
  4199. AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
  4200. fi
  4201. else
  4202. if test ! -r "$kde_java_libgcjdir/libgcj.so"; then
  4203. AC_MSG_ERROR([libgcj.so not found under $kde_java_libgcjdir. Use --without-java.])
  4204. fi
  4205. fi
  4206. if test ! -x "$kde_java_bindir/java"; then
  4207. AC_MSG_ERROR([java not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
  4208. fi
  4209. dnl not needed for gcj compile
  4210. if test "x$kde_java_libgcjdir" = "x"; then
  4211. if test ! -r "$kde_java_libhpidir/libhpi.so"; then
  4212. AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
  4213. fi
  4214. fi
  4215. if test -n "$jni_includes"; then
  4216. dnl Check for JNI version
  4217. AC_LANG_SAVE
  4218. AC_LANG_CPLUSPLUS
  4219. ac_cxxflags_safe="$CXXFLAGS"
  4220. CXXFLAGS="$CXXFLAGS $all_includes $jni_includes"
  4221. AC_TRY_COMPILE([
  4222. #include <jni.h>
  4223. ],
  4224. [
  4225. #ifndef JNI_VERSION_1_2
  4226. Syntax Error
  4227. #endif
  4228. ],[ kde_jni_works=yes ],
  4229. [ kde_jni_works=no ])
  4230. if test $kde_jni_works = no; then
  4231. AC_MSG_ERROR([Incorrect version of $kde_java_includedir/jni.h.
  4232. You need to have Java Development Kit (JDK) version 1.2.
  4233. Use --with-java to specify another location.
  4234. Use --without-java to configure without java support.
  4235. Or download a newer JDK and try again.
  4236. See e.g. http://java.sun.com/products/jdk/1.2 ])
  4237. fi
  4238. CXXFLAGS="$ac_cxxflags_safe"
  4239. AC_LANG_RESTORE
  4240. dnl All tests ok, inform and subst the variables
  4241. JAVAC=$kde_java_bindir/javac
  4242. JAVAH=$kde_java_bindir/javah
  4243. JAR=$kde_java_bindir/jar
  4244. AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
  4245. if test "x$kde_java_libgcjdir" = "x"; then
  4246. JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi"
  4247. else
  4248. JVMLIBS="-L$kde_java_libgcjdir -lgcj"
  4249. fi
  4250. AC_MSG_RESULT([java JDK in $kde_java_bindir])
  4251. else
  4252. AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
  4253. AC_MSG_RESULT([java JRE in $kde_java_bindir])
  4254. fi
  4255. elif test -d "/Library/Java/Home"; then
  4256. kde_java_bindir="/Library/Java/Home/bin"
  4257. jni_includes="-I/Library/Java/Home/include"
  4258. JAVAC=$kde_java_bindir/javac
  4259. JAVAH=$kde_java_bindir/javah
  4260. JAR=$kde_java_bindir/jar
  4261. JVMLIBS="-Xlinker -framework -Xlinker JavaVM"
  4262. AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
  4263. AC_MSG_RESULT([Apple Java Framework])
  4264. else
  4265. AC_MSG_RESULT([none found])
  4266. fi
  4267. AC_SUBST(JAVAC)
  4268. AC_SUBST(JAVAH)
  4269. AC_SUBST(JAR)
  4270. AC_SUBST(JVMLIBS)
  4271. AC_SUBST(jni_includes)
  4272. # for backward compat
  4273. kde_cv_java_includedir=$kde_java_includedir
  4274. kde_cv_java_bindir=$kde_java_bindir
  4275. ])
  4276. dnl this is a redefinition of autoconf 2.5x's AC_FOREACH.
  4277. dnl When the argument list becomes big, as in KDE for AC_OUTPUT in
  4278. dnl big packages, m4_foreach is dog-slow. So use our own version of
  4279. dnl it. (matz@kde.org)
  4280. m4_define([mm_foreach],
  4281. [m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])])
  4282. m4_define([mm_car], [[$1]])
  4283. m4_define([mm_car2], [[$@]])
  4284. m4_define([_mm_foreach],
  4285. [m4_if(m4_quote($2), [], [],
  4286. [m4_define([$1], mm_car($2))$3[]_mm_foreach([$1],
  4287. mm_car2(m4_shift($2)),
  4288. [$3])])])
  4289. m4_define([AC_FOREACH],
  4290. [mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
  4291. AC_DEFUN([KDE_NEED_FLEX],
  4292. [
  4293. kde_libs_safe=$LIBS
  4294. LIBS="$LIBS $USER_LDFLAGS"
  4295. AM_PROG_LEX
  4296. LIBS=$kde_libs_safe
  4297. if test -z "$LEXLIB"; then
  4298. AC_MSG_ERROR([You need to have flex installed.])
  4299. fi
  4300. AC_SUBST(LEXLIB)
  4301. ])
  4302. AC_DEFUN([AC_PATH_TQTOPIA],
  4303. [
  4304. dnl TODO: use AC_CACHE_VAL
  4305. if test -z "$1"; then
  4306. qtopia_minver_maj=1
  4307. qtopia_minver_min=5
  4308. qtopia_minver_pat=0
  4309. else
  4310. qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"`
  4311. qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"`
  4312. qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"`
  4313. fi
  4314. qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat"
  4315. qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat"
  4316. AC_REQUIRE([AC_PATH_TQT])
  4317. AC_MSG_CHECKING([for Qtopia])
  4318. LIB_TQTOPIA="-lqpe"
  4319. AC_SUBST(LIB_TQTOPIA)
  4320. kde_qtopia_dirs="$QPEDIR /opt/Qtopia"
  4321. ac_qtopia_incdir=NO
  4322. AC_ARG_WITH(qtopia-dir,
  4323. AC_HELP_STRING([--with-qtopia-dir=DIR],[where the root of Qtopia is installed]),
  4324. [ ac_qtopia_incdir="$withval"/include] )
  4325. qtopia_incdirs=""
  4326. for dir in $kde_qtopia_dirs; do
  4327. qtopia_incdirs="$qtopia_incdirs $dir/include"
  4328. done
  4329. if test ! "$ac_qtopia_incdir" = "NO"; then
  4330. qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs"
  4331. fi
  4332. qtopia_incdir=""
  4333. AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir)
  4334. ac_qtopia_incdir="$qtopia_incdir"
  4335. if test -z "$qtopia_incdir"; then
  4336. AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.])
  4337. fi
  4338. qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`;
  4339. qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`;
  4340. qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`;
  4341. qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat"
  4342. qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat"
  4343. if test "$qtopia_ver" -lt "$qtopia_minver"; then
  4344. AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr
  4345. is required.])
  4346. fi
  4347. AC_LANG_SAVE
  4348. AC_LANG_CPLUSPLUS
  4349. ac_cxxflags_safe="$CXXFLAGS"
  4350. ac_ldflags_safe="$LDFLAGS"
  4351. ac_libs_safe="$LIBS"
  4352. CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes"
  4353. LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
  4354. LIBS="$LIBS $LIB_TQTOPIA $LIBTQT"
  4355. cat > conftest.$ac_ext <<EOF
  4356. #include "confdefs.h"
  4357. #include <qpe/qpeapplication.h>
  4358. #include <qpe/version.h>
  4359. int main( int argc, char **argv )
  4360. {
  4361. QPEApplication app( argc, argv );
  4362. return 0;
  4363. }
  4364. EOF
  4365. if AC_TRY_EVAL(ac_link) && test -s conftest; then
  4366. rm -f conftest*
  4367. else
  4368. rm -f conftest*
  4369. AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at
  4370. the end of config.log])
  4371. fi
  4372. CXXFLAGS="$ac_cxxflags_safe"
  4373. LDFLAGS="$ac_ldflags_safe"
  4374. LIBS="$ac_libs_safe"
  4375. AC_LANG_RESTORE
  4376. QTOPIA_INCLUDES="-I$qtopia_incdir"
  4377. AC_SUBST(QTOPIA_INCLUDES)
  4378. AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir])
  4379. ])
  4380. AC_DEFUN([KDE_INIT_DOXYGEN],
  4381. [
  4382. AC_MSG_CHECKING([for Qt docs])
  4383. kde_qtdir=
  4384. if test "${with_qt_dir+set}" = set; then
  4385. kde_qtdir="$with_qt_dir"
  4386. fi
  4387. AC_FIND_FILE(qsql.html, [ $kde_qtdir/doc/html $TQTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc /usr/share/qt3/doc/html /usr/X11R6/share/doc/qt/html ], TQTDOCDIR)
  4388. AC_MSG_RESULT($TQTDOCDIR)
  4389. AC_SUBST(TQTDOCDIR)
  4390. KDE_FIND_PATH(dot, DOT, [], [])
  4391. if test -n "$DOT"; then
  4392. KDE_HAVE_DOT="YES"
  4393. else
  4394. KDE_HAVE_DOT="NO"
  4395. fi
  4396. AC_SUBST(KDE_HAVE_DOT)
  4397. KDE_FIND_PATH(doxygen, DOXYGEN, [], [])
  4398. AC_SUBST(DOXYGEN)
  4399. DOXYGEN_PROJECT_NAME="$1"
  4400. DOXYGEN_PROJECT_NUMBER="$2"
  4401. AC_SUBST(DOXYGEN_PROJECT_NAME)
  4402. AC_SUBST(DOXYGEN_PROJECT_NUMBER)
  4403. KDE_HAS_DOXYGEN=no
  4404. if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $TQTDOCDIR/qsql.html; then
  4405. KDE_HAS_DOXYGEN=yes
  4406. fi
  4407. AC_SUBST(KDE_HAS_DOXYGEN)
  4408. ])
  4409. AC_DEFUN([AC_FIND_BZIP2],
  4410. [
  4411. AC_MSG_CHECKING([for bzDecompress in libbz2])
  4412. AC_CACHE_VAL(ac_cv_lib_bzip2,
  4413. [
  4414. AC_LANG_SAVE
  4415. AC_LANG_CPLUSPLUS
  4416. kde_save_LIBS="$LIBS"
  4417. LIBS="$all_libraries $USER_LDFLAGS -lbz2 $LIBSOCKET"
  4418. kde_save_CXXFLAGS="$CXXFLAGS"
  4419. CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
  4420. AC_TRY_LINK(dnl
  4421. [
  4422. #define BZ_NO_STDIO
  4423. #include<bzlib.h>
  4424. ],
  4425. [ bz_stream s; (void) bzDecompress(&s); ],
  4426. eval "ac_cv_lib_bzip2='-lbz2'",
  4427. eval "ac_cv_lib_bzip2=no")
  4428. LIBS="$kde_save_LIBS"
  4429. CXXFLAGS="$kde_save_CXXFLAGS"
  4430. AC_LANG_RESTORE
  4431. ])dnl
  4432. AC_MSG_RESULT($ac_cv_lib_bzip2)
  4433. if test ! "$ac_cv_lib_bzip2" = no; then
  4434. BZIP2DIR=bzip2
  4435. LIBBZ2="$ac_cv_lib_bzip2"
  4436. AC_SUBST(LIBBZ2)
  4437. else
  4438. cxx_shared_flag=
  4439. ld_shared_flag=
  4440. KDE_CHECK_COMPILER_FLAG(shared, [
  4441. ld_shared_flag="-shared"
  4442. ])
  4443. KDE_CHECK_COMPILER_FLAG(fPIC, [
  4444. cxx_shared_flag="-fPIC"
  4445. ])
  4446. AC_MSG_CHECKING([for BZ2_bzDecompress in (shared) libbz2])
  4447. AC_CACHE_VAL(ac_cv_lib_bzip2_prefix,
  4448. [
  4449. AC_LANG_SAVE
  4450. AC_LANG_CPLUSPLUS
  4451. kde_save_LIBS="$LIBS"
  4452. LIBS="$all_libraries $USER_LDFLAGS $ld_shared_flag -lbz2 $LIBSOCKET"
  4453. kde_save_CXXFLAGS="$CXXFLAGS"
  4454. CXXFLAGS="$CFLAGS $cxx_shared_flag $all_includes $USER_INCLUDES"
  4455. AC_TRY_LINK(dnl
  4456. [
  4457. #define BZ_NO_STDIO
  4458. #include<bzlib.h>
  4459. ],
  4460. [ bz_stream s; (void) BZ2_bzDecompress(&s); ],
  4461. eval "ac_cv_lib_bzip2_prefix='-lbz2'",
  4462. eval "ac_cv_lib_bzip2_prefix=no")
  4463. LIBS="$kde_save_LIBS"
  4464. CXXFLAGS="$kde_save_CXXFLAGS"
  4465. AC_LANG_RESTORE
  4466. ])dnl
  4467. AC_MSG_RESULT($ac_cv_lib_bzip2_prefix)
  4468. if test ! "$ac_cv_lib_bzip2_prefix" = no; then
  4469. BZIP2DIR=bzip2
  4470. LIBBZ2="$ac_cv_lib_bzip2_prefix"
  4471. AC_SUBST(LIBBZ2)
  4472. AC_DEFINE(NEED_BZ2_PREFIX, 1, [Define if the libbz2 functions need the BZ2_ prefix])
  4473. dnl else, we just ignore this
  4474. fi
  4475. fi
  4476. AM_CONDITIONAL(include_BZIP2, test -n "$BZIP2DIR")
  4477. ])
  4478. dnl ------------------------------------------------------------------------
  4479. dnl Try to find the SSL headers and libraries.
  4480. dnl $(SSL_LDFLAGS) will be -Lsslliblocation (if needed)
  4481. dnl and $(SSL_INCLUDES) will be -Isslhdrlocation (if needed)
  4482. dnl ------------------------------------------------------------------------
  4483. dnl
  4484. AC_DEFUN([KDE_CHECK_SSL],
  4485. [
  4486. LIBSSL="-lssl -lcrypto"
  4487. AC_REQUIRE([KDE_CHECK_LIB64])
  4488. ac_ssl_includes=NO ac_ssl_libraries=NO
  4489. ssl_libraries=""
  4490. ssl_includes=""
  4491. AC_ARG_WITH(ssl-dir,
  4492. AC_HELP_STRING([--with-ssl-dir=DIR],[where the root of OpenSSL is installed]),
  4493. [ ac_ssl_includes="$withval"/include
  4494. ac_ssl_libraries="$withval"/lib$tdelibsuff
  4495. ])
  4496. want_ssl=yes
  4497. AC_ARG_WITH(ssl,
  4498. AC_HELP_STRING([--without-ssl],[disable SSL checks]),
  4499. [want_ssl=$withval])
  4500. if test $want_ssl = yes; then
  4501. AC_MSG_CHECKING(for OpenSSL)
  4502. AC_CACHE_VAL(ac_cv_have_ssl,
  4503. [#try to guess OpenSSL locations
  4504. ssl_incdirs="/usr/include /usr/local/include /usr/ssl/include /usr/local/ssl/include $prefix/include $kde_extra_includes"
  4505. ssl_incdirs="$ac_ssl_includes $ssl_incdirs"
  4506. AC_FIND_FILE(openssl/ssl.h, $ssl_incdirs, ssl_incdir)
  4507. ac_ssl_includes="$ssl_incdir"
  4508. ssl_libdirs="/usr/lib$tdelibsuff /usr/local/lib$tdelibsuff /usr/ssl/lib$tdelibsuff /usr/local/ssl/lib$tdelibsuff $libdir $prefix/lib$tdelibsuff $exec_prefix/lib$tdelibsuff $kde_extra_libs"
  4509. if test ! "$ac_ssl_libraries" = "NO"; then
  4510. ssl_libdirs="$ac_ssl_libraries $ssl_libdirs"
  4511. fi
  4512. test=NONE
  4513. ssl_libdir=NONE
  4514. for dir in $ssl_libdirs; do
  4515. try="ls -1 $dir/libssl*"
  4516. if test=`eval $try 2> /dev/null`; then ssl_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
  4517. done
  4518. ac_ssl_libraries="$ssl_libdir"
  4519. ac_ldflags_safe="$LDFLAGS"
  4520. ac_libs_safe="$LIBS"
  4521. LDFLAGS="$LDFLAGS -L$ssl_libdir $all_libraries"
  4522. LIBS="$LIBS $LIBSSL -lRSAglue -lrsaref"
  4523. AC_TRY_LINK(,void RSAPrivateEncrypt(void);RSAPrivateEncrypt();,
  4524. ac_ssl_rsaref="yes"
  4525. ,
  4526. ac_ssl_rsaref="no"
  4527. )
  4528. LDFLAGS="$ac_ldflags_safe"
  4529. LIBS="$ac_libs_safe"
  4530. if test "$ac_ssl_includes" = NO || test "$ac_ssl_libraries" = NO; then
  4531. have_ssl=no
  4532. else
  4533. have_ssl=yes;
  4534. fi
  4535. ])
  4536. eval "$ac_cv_have_ssl"
  4537. AC_MSG_RESULT([libraries $ac_ssl_libraries, headers $ac_ssl_includes])
  4538. AC_MSG_CHECKING([whether OpenSSL uses rsaref])
  4539. AC_MSG_RESULT($ac_ssl_rsaref)
  4540. AC_MSG_CHECKING([for easter eggs])
  4541. AC_MSG_RESULT([none found])
  4542. else
  4543. have_ssl=no
  4544. fi
  4545. if test "$have_ssl" = yes; then
  4546. AC_MSG_CHECKING(for OpenSSL version)
  4547. dnl Check for SSL version
  4548. AC_CACHE_VAL(ac_cv_ssl_version,
  4549. [
  4550. cat >conftest.$ac_ext <<EOF
  4551. #include <openssl/opensslv.h>
  4552. #include <stdio.h>
  4553. int main() {
  4554. #ifndef OPENSSL_VERSION_NUMBER
  4555. printf("ssl_version=\\"error\\"\n");
  4556. #else
  4557. if (OPENSSL_VERSION_NUMBER < 0x00906000)
  4558. printf("ssl_version=\\"old\\"\n");
  4559. else
  4560. printf("ssl_version=\\"ok\\"\n");
  4561. #endif
  4562. return (0);
  4563. }
  4564. EOF
  4565. ac_save_CPPFLAGS=$CPPFLAGS
  4566. if test "$ac_ssl_includes" != "/usr/include"; then
  4567. CPPFLAGS="$CPPFLAGS -I$ac_ssl_includes"
  4568. fi
  4569. if AC_TRY_EVAL(ac_link); then
  4570. if eval `./conftest 2>&5`; then
  4571. if test $ssl_version = error; then
  4572. AC_MSG_ERROR([$ssl_incdir/openssl/opensslv.h doesn't define OPENSSL_VERSION_NUMBER !])
  4573. else
  4574. if test $ssl_version = old; then
  4575. AC_MSG_WARN([OpenSSL version too old. Upgrade to 0.9.6 at least, see http://www.openssl.org. SSL support disabled.])
  4576. have_ssl=no
  4577. fi
  4578. fi
  4579. ac_cv_ssl_version="ssl_version=$ssl_version"
  4580. else
  4581. AC_MSG_ERROR([Your system couldn't run a small SSL test program.
  4582. Check config.log, and if you can't figure it out, send a mail to
  4583. David Faure <faure@kde.org>, attaching your config.log])
  4584. fi
  4585. else
  4586. AC_MSG_ERROR([Your system couldn't link a small SSL test program.
  4587. Check config.log, and if you can't figure it out, send a mail to
  4588. David Faure <faure@kde.org>, attaching your config.log])
  4589. fi
  4590. CPPFLAGS=$ac_save_CPPFLAGS
  4591. ])
  4592. eval "$ac_cv_ssl_version"
  4593. AC_MSG_RESULT($ssl_version)
  4594. fi
  4595. if test "$have_ssl" != yes; then
  4596. LIBSSL="";
  4597. else
  4598. AC_DEFINE(HAVE_SSL, 1, [If we are going to use OpenSSL])
  4599. ac_cv_have_ssl="have_ssl=yes \
  4600. ac_ssl_includes=$ac_ssl_includes ac_ssl_libraries=$ac_ssl_libraries ac_ssl_rsaref=$ac_ssl_rsaref"
  4601. ssl_libraries="$ac_ssl_libraries"
  4602. ssl_includes="$ac_ssl_includes"
  4603. if test "$ac_ssl_rsaref" = yes; then
  4604. LIBSSL="-lssl -lcrypto -lRSAglue -lrsaref"
  4605. fi
  4606. if test $ssl_version = "old"; then
  4607. AC_DEFINE(HAVE_OLD_SSL_API, 1, [Define if you have OpenSSL < 0.9.6])
  4608. fi
  4609. fi
  4610. SSL_INCLUDES=
  4611. if test "$ssl_includes" = "/usr/include"; then
  4612. if test -f /usr/kerberos/include/krb5.h; then
  4613. SSL_INCLUDES="-I/usr/kerberos/include"
  4614. fi
  4615. elif test "$ssl_includes" != "/usr/local/include" && test -n "$ssl_includes"; then
  4616. SSL_INCLUDES="-I$ssl_includes"
  4617. fi
  4618. if test "$ssl_libraries" = "/usr/lib" || test "$ssl_libraries" = "/usr/local/lib" || test -z "$ssl_libraries" || test "$ssl_libraries" = "NONE"; then
  4619. SSL_LDFLAGS=""
  4620. else
  4621. SSL_LDFLAGS="-L$ssl_libraries -R$ssl_libraries"
  4622. fi
  4623. AC_SUBST(SSL_INCLUDES)
  4624. AC_SUBST(SSL_LDFLAGS)
  4625. AC_SUBST(LIBSSL)
  4626. ])
  4627. AC_DEFUN([KDE_CHECK_STRLCPY],
  4628. [
  4629. AC_REQUIRE([AC_CHECK_STRLCAT])
  4630. AC_REQUIRE([AC_CHECK_STRLCPY])
  4631. AC_CHECK_SIZEOF(size_t)
  4632. AC_CHECK_SIZEOF(unsigned long)
  4633. AC_MSG_CHECKING([sizeof size_t == sizeof unsigned long])
  4634. AC_TRY_COMPILE(,[
  4635. #if SIZEOF_SIZE_T != SIZEOF_UNSIGNED_LONG
  4636. choke me
  4637. #endif
  4638. ],AC_MSG_RESULT([yes]),[
  4639. AC_MSG_RESULT(no)
  4640. AC_MSG_ERROR([
  4641. Apparently on your system our assumption sizeof size_t == sizeof unsigned long
  4642. does not apply. Please mail kde-devel@kde.org with a description of your system!
  4643. ])
  4644. ])
  4645. ])
  4646. AC_DEFUN([KDE_CHECK_BINUTILS],
  4647. [
  4648. AC_MSG_CHECKING([if ld supports unversioned version maps])
  4649. kde_save_LDFLAGS="$LDFLAGS"
  4650. LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
  4651. echo "{ local: extern \"C++\" { foo }; };" > conftest.map
  4652. AC_TRY_LINK([int foo;],
  4653. [
  4654. #ifdef __INTEL_COMPILER
  4655. icc apparently does not support libtools version-info and version-script
  4656. at the same time. Dunno where the bug is, but until somebody figured out,
  4657. better disable the optional version scripts.
  4658. #endif
  4659. foo = 42;
  4660. ], kde_supports_versionmaps=yes, kde_supports_versionmaps=no)
  4661. LDFLAGS="$kde_save_LDFLAGS"
  4662. rm -f conftest.map
  4663. AM_CONDITIONAL(include_VERSION_SCRIPT,
  4664. [test "$kde_supports_versionmaps" = "yes" && test "$kde_use_debug_code" = "no"])
  4665. AC_MSG_RESULT($kde_supports_versionmaps)
  4666. ])
  4667. AC_DEFUN([AM_PROG_OBJC],[
  4668. AC_CHECK_PROGS(OBJC, gcc, gcc)
  4669. test -z "$OBJC" && AC_MSG_ERROR([no acceptable objective-c gcc found in \$PATH])
  4670. if test "x${OBJCFLAGS-unset}" = xunset; then
  4671. OBJCFLAGS="-g -O2"
  4672. fi
  4673. AC_SUBST(OBJCFLAGS)
  4674. _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES(OBJC)])
  4675. ])
  4676. AC_DEFUN([KDE_CHECK_PERL],
  4677. [
  4678. KDE_FIND_PATH(perl, PERL, [$bindir $exec_prefix/bin $prefix/bin], [
  4679. AC_MSG_ERROR([No Perl found in your $PATH.
  4680. We need perl to generate some code.])
  4681. ])
  4682. AC_SUBST(PERL)
  4683. ])
  4684. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
  4685. ## Copyright 1996, 1997, 1998, 1999, 2000, 2001
  4686. ## Free Software Foundation, Inc.
  4687. ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  4688. ##
  4689. ## This program is free software; you can redistribute it and/or modify
  4690. ## it under the terms of the GNU General Public License as published by
  4691. ## the Free Software Foundation; either version 2 of the License, or
  4692. ## (at your option) any later version.
  4693. ##
  4694. ## This program is distributed in the hope that it will be useful, but
  4695. ## WITHOUT ANY WARRANTY; without even the implied warranty of
  4696. ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  4697. ## General Public License for more details.
  4698. ##
  4699. ## You should have received a copy of the GNU General Public License
  4700. ## along with this program; if not, write to the Free Software
  4701. ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  4702. ##
  4703. ## As a special exception to the GNU General Public License, if you
  4704. ## distribute this file as part of a program that contains a
  4705. ## configuration script generated by Autoconf, you may include it under
  4706. ## the same distribution terms that you use for the rest of that program.
  4707. # serial 47 AC_PROG_LIBTOOL
  4708. # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
  4709. # -----------------------------------------------------------
  4710. # If this macro is not defined by Autoconf, define it here.
  4711. m4_ifdef([AC_PROVIDE_IFELSE],
  4712. [],
  4713. [m4_define([AC_PROVIDE_IFELSE],
  4714. [m4_ifdef([AC_PROVIDE_$1],
  4715. [$2], [$3])])])
  4716. # AC_PROG_LIBTOOL
  4717. # ---------------
  4718. AC_DEFUN([AC_PROG_LIBTOOL],
  4719. [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
  4720. dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
  4721. dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
  4722. AC_PROVIDE_IFELSE([AC_PROG_CXX],
  4723. [AC_LIBTOOL_CXX],
  4724. [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
  4725. ])])
  4726. dnl And a similar setup for Fortran 77 support
  4727. AC_PROVIDE_IFELSE([AC_PROG_F77],
  4728. [AC_LIBTOOL_F77],
  4729. [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
  4730. ])])
  4731. dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
  4732. dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
  4733. dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
  4734. AC_PROVIDE_IFELSE([AC_PROG_GCJ],
  4735. [AC_LIBTOOL_GCJ],
  4736. [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
  4737. [AC_LIBTOOL_GCJ],
  4738. [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
  4739. [AC_LIBTOOL_GCJ],
  4740. [ifdef([AC_PROG_GCJ],
  4741. [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
  4742. ifdef([A][M_PROG_GCJ],
  4743. [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
  4744. ifdef([LT_AC_PROG_GCJ],
  4745. [define([LT_AC_PROG_GCJ],
  4746. defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
  4747. ])])# AC_PROG_LIBTOOL
  4748. # _AC_PROG_LIBTOOL
  4749. # ----------------
  4750. AC_DEFUN([_AC_PROG_LIBTOOL],
  4751. [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
  4752. AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
  4753. AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
  4754. AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
  4755. # This can be used to rebuild libtool when needed
  4756. LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
  4757. # Always use our own libtool.
  4758. LIBTOOL='$(SHELL) $(top_builddir)/libtool --silent'
  4759. AC_SUBST(LIBTOOL)dnl
  4760. # Prevent multiple expansion
  4761. define([AC_PROG_LIBTOOL], [])
  4762. ])# _AC_PROG_LIBTOOL
  4763. # AC_LIBTOOL_SETUP
  4764. # ----------------
  4765. AC_DEFUN([AC_LIBTOOL_SETUP],
  4766. [AC_PREREQ(2.50)dnl
  4767. AC_REQUIRE([AC_ENABLE_SHARED])dnl
  4768. AC_REQUIRE([AC_ENABLE_STATIC])dnl
  4769. AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
  4770. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  4771. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  4772. AC_REQUIRE([AC_PROG_CC])dnl
  4773. AC_REQUIRE([AC_PROG_LD])dnl
  4774. AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
  4775. AC_REQUIRE([AC_PROG_NM])dnl
  4776. AC_REQUIRE([AC_PROG_LN_S])dnl
  4777. AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
  4778. # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
  4779. AC_REQUIRE([AC_OBJEXT])dnl
  4780. AC_REQUIRE([AC_EXEEXT])dnl
  4781. dnl
  4782. AC_LIBTOOL_SYS_MAX_CMD_LEN
  4783. AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
  4784. AC_LIBTOOL_OBJDIR
  4785. AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
  4786. _LT_AC_PROG_ECHO_BACKSLASH
  4787. case $host_os in
  4788. aix3*)
  4789. # AIX sometimes has problems with the GCC collect2 program. For some
  4790. # reason, if we set the COLLECT_NAMES environment variable, the problems
  4791. # vanish in a puff of smoke.
  4792. if test "X${COLLECT_NAMES+set}" != Xset; then
  4793. COLLECT_NAMES=
  4794. export COLLECT_NAMES
  4795. fi
  4796. ;;
  4797. esac
  4798. # Sed substitution that helps us do robust quoting. It backslashifies
  4799. # metacharacters that are still active within double-quoted strings.
  4800. Xsed='sed -e s/^X//'
  4801. [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
  4802. # Same as above, but do not quote variable references.
  4803. [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
  4804. # Sed substitution to delay expansion of an escaped shell variable in a
  4805. # double_quote_subst'ed string.
  4806. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
  4807. # Sed substitution to avoid accidental globbing in evaled expressions
  4808. no_glob_subst='s/\*/\\\*/g'
  4809. # Constants:
  4810. rm="rm -f"
  4811. # Global variables:
  4812. default_ofile=libtool
  4813. can_build_shared=yes
  4814. # All known linkers require a `.a' archive for static linking (except M$VC,
  4815. # which needs '.lib').
  4816. libext=a
  4817. ltmain="$ac_aux_dir/ltmain.sh"
  4818. ofile="$default_ofile"
  4819. with_gnu_ld="$lt_cv_prog_gnu_ld"
  4820. AC_CHECK_TOOL(AR, ar, false)
  4821. AC_CHECK_TOOL(RANLIB, ranlib, :)
  4822. AC_CHECK_TOOL(STRIP, strip, :)
  4823. old_CC="$CC"
  4824. old_CFLAGS="$CFLAGS"
  4825. # Set sane defaults for various variables
  4826. test -z "$AR" && AR=ar
  4827. test -z "$AR_FLAGS" && AR_FLAGS=cru
  4828. test -z "$AS" && AS=as
  4829. test -z "$CC" && CC=cc
  4830. test -z "$LTCC" && LTCC=$CC
  4831. test -z "$DLLTOOL" && DLLTOOL=dlltool
  4832. test -z "$LD" && LD=ld
  4833. test -z "$LN_S" && LN_S="ln -s"
  4834. test -z "$MAGIC_CMD" && MAGIC_CMD=file
  4835. test -z "$NM" && NM=nm
  4836. test -z "$SED" && SED=sed
  4837. test -z "$OBJDUMP" && OBJDUMP=objdump
  4838. test -z "$RANLIB" && RANLIB=:
  4839. test -z "$STRIP" && STRIP=:
  4840. test -z "$ac_objext" && ac_objext=o
  4841. # Determine commands to create old-style static archives.
  4842. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
  4843. old_postinstall_cmds='chmod 644 $oldlib'
  4844. old_postuninstall_cmds=
  4845. if test -n "$RANLIB"; then
  4846. case $host_os in
  4847. openbsd*)
  4848. old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
  4849. ;;
  4850. *)
  4851. old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
  4852. ;;
  4853. esac
  4854. old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
  4855. fi
  4856. # Only perform the check for file, if the check method requires it
  4857. case $deplibs_check_method in
  4858. file_magic*)
  4859. if test "$file_magic_cmd" = '$MAGIC_CMD'; then
  4860. AC_PATH_MAGIC
  4861. fi
  4862. ;;
  4863. esac
  4864. AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
  4865. AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
  4866. enable_win32_dll=yes, enable_win32_dll=no)
  4867. AC_ARG_ENABLE([libtool-lock],
  4868. [AC_HELP_STRING([--disable-libtool-lock],
  4869. [avoid locking (might break parallel builds)])])
  4870. test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  4871. AC_ARG_WITH([pic],
  4872. [AC_HELP_STRING([--with-pic],
  4873. [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
  4874. [pic_mode="$withval"],
  4875. [pic_mode=default])
  4876. test -z "$pic_mode" && pic_mode=default
  4877. # Use C for the default configuration in the libtool script
  4878. tagname=
  4879. AC_LIBTOOL_LANG_C_CONFIG
  4880. _LT_AC_TAGCONFIG
  4881. ])# AC_LIBTOOL_SETUP
  4882. # _LT_AC_SYS_COMPILER
  4883. # -------------------
  4884. AC_DEFUN([_LT_AC_SYS_COMPILER],
  4885. [AC_REQUIRE([AC_PROG_CC])dnl
  4886. # If no C compiler was specified, use CC.
  4887. LTCC=${LTCC-"$CC"}
  4888. # Allow CC to be a program name with arguments.
  4889. compiler=$CC
  4890. ])# _LT_AC_SYS_COMPILER
  4891. # _LT_AC_SYS_LIBPATH_AIX
  4892. # ----------------------
  4893. # Links a minimal program and checks the executable
  4894. # for the system default hardcoded library path. In most cases,
  4895. # this is /usr/lib:/lib, but when the MPI compilers are used
  4896. # the location of the communication and MPI libs are included too.
  4897. # If we don't find anything, use the default library path according
  4898. # to the aix ld manual.
  4899. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
  4900. [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
  4901. aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
  4902. }'`
  4903. # Check for a 64-bit object if we didn't find anything.
  4904. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
  4905. }'`; fi],[])
  4906. if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  4907. ])# _LT_AC_SYS_LIBPATH_AIX
  4908. # _LT_AC_SHELL_INIT(ARG)
  4909. # ----------------------
  4910. AC_DEFUN([_LT_AC_SHELL_INIT],
  4911. [ifdef([AC_DIVERSION_NOTICE],
  4912. [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
  4913. [AC_DIVERT_PUSH(NOTICE)])
  4914. $1
  4915. AC_DIVERT_POP
  4916. ])# _LT_AC_SHELL_INIT
  4917. # _LT_AC_PROG_ECHO_BACKSLASH
  4918. # --------------------------
  4919. # Add some code to the start of the generated configure script which
  4920. # will find an echo command which doesn't interpret backslashes.
  4921. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
  4922. [_LT_AC_SHELL_INIT([
  4923. # Check that we are running under the correct shell.
  4924. SHELL=${CONFIG_SHELL-/bin/sh}
  4925. case X$ECHO in
  4926. X*--fallback-echo)
  4927. # Remove one level of quotation (which was required for Make).
  4928. ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
  4929. ;;
  4930. esac
  4931. echo=${ECHO-echo}
  4932. if test "X[$]1" = X--no-reexec; then
  4933. # Discard the --no-reexec flag, and continue.
  4934. shift
  4935. elif test "X[$]1" = X--fallback-echo; then
  4936. # Avoid inline document here, it may be left over
  4937. :
  4938. elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
  4939. # Yippee, $echo works!
  4940. :
  4941. else
  4942. # Restart under the correct shell.
  4943. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
  4944. fi
  4945. if test "X[$]1" = X--fallback-echo; then
  4946. # used as fallback echo
  4947. shift
  4948. cat <<EOF
  4949. [$]*
  4950. EOF
  4951. exit 0
  4952. fi
  4953. # The HP-UX ksh and POSIX shell print the target directory to stdout
  4954. # if CDPATH is set.
  4955. if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
  4956. if test -z "$ECHO"; then
  4957. if test "X${echo_test_string+set}" != Xset; then
  4958. # find a string as large as possible, as long as the shell can cope with it
  4959. for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
  4960. # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
  4961. if (echo_test_string="`eval $cmd`") 2>/dev/null &&
  4962. echo_test_string="`eval $cmd`" &&
  4963. (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
  4964. then
  4965. break
  4966. fi
  4967. done
  4968. fi
  4969. if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
  4970. echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
  4971. test "X$echo_testing_string" = "X$echo_test_string"; then
  4972. :
  4973. else
  4974. # The Solaris, AIX, and Digital Unix default echo programs unquote
  4975. # backslashes. This makes it impossible to quote backslashes using
  4976. # echo "$something" | sed 's/\\/\\\\/g'
  4977. #
  4978. # So, first we look for a working echo in the user's PATH.
  4979. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  4980. for dir in $PATH /usr/ucb; do
  4981. IFS="$lt_save_ifs"
  4982. if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
  4983. test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
  4984. echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
  4985. test "X$echo_testing_string" = "X$echo_test_string"; then
  4986. echo="$dir/echo"
  4987. break
  4988. fi
  4989. done
  4990. IFS="$lt_save_ifs"
  4991. if test "X$echo" = Xecho; then
  4992. # We didn't find a better echo, so look for alternatives.
  4993. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
  4994. echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
  4995. test "X$echo_testing_string" = "X$echo_test_string"; then
  4996. # This shell has a builtin print -r that does the trick.
  4997. echo='print -r'
  4998. elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
  4999. test "X$CONFIG_SHELL" != X/bin/ksh; then
  5000. # If we have ksh, try running configure again with it.
  5001. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
  5002. export ORIGINAL_CONFIG_SHELL
  5003. CONFIG_SHELL=/bin/ksh
  5004. export CONFIG_SHELL
  5005. exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
  5006. else
  5007. # Try using printf.
  5008. echo='printf %s\n'
  5009. if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
  5010. echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
  5011. test "X$echo_testing_string" = "X$echo_test_string"; then
  5012. # Cool, printf works
  5013. :
  5014. elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
  5015. test "X$echo_testing_string" = 'X\t' &&
  5016. echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  5017. test "X$echo_testing_string" = "X$echo_test_string"; then
  5018. CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
  5019. export CONFIG_SHELL
  5020. SHELL="$CONFIG_SHELL"
  5021. export SHELL
  5022. echo="$CONFIG_SHELL [$]0 --fallback-echo"
  5023. elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
  5024. test "X$echo_testing_string" = 'X\t' &&
  5025. echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  5026. test "X$echo_testing_string" = "X$echo_test_string"; then
  5027. echo="$CONFIG_SHELL [$]0 --fallback-echo"
  5028. else
  5029. # maybe with a smaller string...
  5030. prev=:
  5031. for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
  5032. if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
  5033. then
  5034. break
  5035. fi
  5036. prev="$cmd"
  5037. done
  5038. if test "$prev" != 'sed 50q "[$]0"'; then
  5039. echo_test_string=`eval $prev`
  5040. export echo_test_string
  5041. exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
  5042. else
  5043. # Oops. We lost completely, so just stick with echo.
  5044. echo=echo
  5045. fi
  5046. fi
  5047. fi
  5048. fi
  5049. fi
  5050. fi
  5051. # Copy echo and quote the copy suitably for passing to libtool from
  5052. # the Makefile, instead of quoting the original, which is used later.
  5053. ECHO=$echo
  5054. if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
  5055. ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
  5056. fi
  5057. AC_SUBST(ECHO)
  5058. ])])# _LT_AC_PROG_ECHO_BACKSLASH
  5059. # _LT_AC_LOCK
  5060. # -----------
  5061. AC_DEFUN([_LT_AC_LOCK],
  5062. [AC_ARG_ENABLE([libtool-lock],
  5063. [AC_HELP_STRING([--disable-libtool-lock],
  5064. [avoid locking (might break parallel builds)])])
  5065. test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  5066. # Some flags need to be propagated to the compiler or linker for good
  5067. # libtool support.
  5068. case $host in
  5069. ia64-*-hpux*)
  5070. # Find out which ABI we are using.
  5071. echo 'int i;' > conftest.$ac_ext
  5072. if AC_TRY_EVAL(ac_compile); then
  5073. case `/usr/bin/file conftest.$ac_objext` in
  5074. *ELF-32*)
  5075. HPUX_IA64_MODE="32"
  5076. ;;
  5077. *ELF-64*)
  5078. HPUX_IA64_MODE="64"
  5079. ;;
  5080. esac
  5081. fi
  5082. rm -rf conftest*
  5083. ;;
  5084. *-*-irix6*)
  5085. # Find out which ABI we are using.
  5086. echo '[#]line __oline__ "configure"' > conftest.$ac_ext
  5087. if AC_TRY_EVAL(ac_compile); then
  5088. if test "$lt_cv_prog_gnu_ld" = yes; then
  5089. case `/usr/bin/file conftest.$ac_objext` in
  5090. *32-bit*)
  5091. LD="${LD-ld} -melf32bsmip"
  5092. ;;
  5093. *N32*)
  5094. LD="${LD-ld} -melf32bmipn32"
  5095. ;;
  5096. *64-bit*)
  5097. LD="${LD-ld} -melf64bmip"
  5098. ;;
  5099. esac
  5100. else
  5101. case `/usr/bin/file conftest.$ac_objext` in
  5102. *32-bit*)
  5103. LD="${LD-ld} -32"
  5104. ;;
  5105. *N32*)
  5106. LD="${LD-ld} -n32"
  5107. ;;
  5108. *64-bit*)
  5109. LD="${LD-ld} -64"
  5110. ;;
  5111. esac
  5112. fi
  5113. fi
  5114. rm -rf conftest*
  5115. ;;
  5116. x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
  5117. # Find out which ABI we are using.
  5118. echo 'int i;' > conftest.$ac_ext
  5119. if AC_TRY_EVAL(ac_compile); then
  5120. case "`/usr/bin/file conftest.o`" in
  5121. *32-bit*)
  5122. LINUX_64_MODE="32"
  5123. case $host in
  5124. x86_64-*linux*)
  5125. LD="${LD-ld} -m elf_i386"
  5126. ;;
  5127. ppc64-*linux*)
  5128. LD="${LD-ld} -m elf32ppclinux"
  5129. ;;
  5130. s390x-*linux*)
  5131. LD="${LD-ld} -m elf_s390"
  5132. ;;
  5133. sparc64-*linux*)
  5134. LD="${LD-ld} -m elf32_sparc"
  5135. ;;
  5136. esac
  5137. ;;
  5138. *64-bit*)
  5139. LINUX_64_MODE="64"
  5140. case $host in
  5141. x86_64-*linux*)
  5142. LD="${LD-ld} -m elf_x86_64"
  5143. ;;
  5144. ppc*-*linux*|powerpc*-*linux*)
  5145. LD="${LD-ld} -m elf64ppc"
  5146. ;;
  5147. s390*-*linux*)
  5148. LD="${LD-ld} -m elf64_s390"
  5149. ;;
  5150. sparc*-*linux*)
  5151. LD="${LD-ld} -m elf64_sparc"
  5152. ;;
  5153. esac
  5154. ;;
  5155. esac
  5156. fi
  5157. rm -rf conftest*
  5158. ;;
  5159. *-*-sco3.2v5*)
  5160. # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  5161. SAVE_CFLAGS="$CFLAGS"
  5162. CFLAGS="$CFLAGS -belf"
  5163. AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
  5164. [AC_LANG_PUSH(C)
  5165. AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
  5166. AC_LANG_POP])
  5167. if test x"$lt_cv_cc_needs_belf" != x"yes"; then
  5168. # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  5169. CFLAGS="$SAVE_CFLAGS"
  5170. fi
  5171. ;;
  5172. AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
  5173. [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
  5174. AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  5175. AC_CHECK_TOOL(AS, as, false)
  5176. AC_CHECK_TOOL(OBJDUMP, objdump, false)
  5177. ;;
  5178. ])
  5179. esac
  5180. need_locks="$enable_libtool_lock"
  5181. ])# _LT_AC_LOCK
  5182. # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  5183. # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
  5184. # ----------------------------------------------------------------
  5185. # Check whether the given compiler option works
  5186. AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
  5187. [AC_REQUIRE([LT_AC_PROG_SED])
  5188. AC_CACHE_CHECK([$1], [$2],
  5189. [$2=no
  5190. ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
  5191. printf "$lt_simple_compile_test_code" > conftest.$ac_ext
  5192. lt_compiler_flag="$3"
  5193. # Insert the option either (1) after the last *FLAGS variable, or
  5194. # (2) before a word containing "conftest.", or (3) at the end.
  5195. # Note that $ac_compile itself does not contain backslashes and begins
  5196. # with a dollar sign (not a hyphen), so the echo should work correctly.
  5197. # The option is referenced via a variable to avoid confusing sed.
  5198. lt_compile=`echo "$ac_compile" | $SED \
  5199. -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
  5200. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  5201. -e 's:$: $lt_compiler_flag:'`
  5202. (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  5203. (eval "$lt_compile" 2>conftest.err)
  5204. ac_status=$?
  5205. cat conftest.err >&AS_MESSAGE_LOG_FD
  5206. echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  5207. if (exit $ac_status) && test -s "$ac_outfile"; then
  5208. # The compiler can only warn and ignore the option if not recognized
  5209. # So say no if there are warnings
  5210. if test ! -s conftest.err; then
  5211. $2=yes
  5212. fi
  5213. fi
  5214. $rm conftest*
  5215. ])
  5216. if test x"[$]$2" = xyes; then
  5217. ifelse([$5], , :, [$5])
  5218. else
  5219. ifelse([$6], , :, [$6])
  5220. fi
  5221. ])# AC_LIBTOOL_COMPILER_OPTION
  5222. # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  5223. # [ACTION-SUCCESS], [ACTION-FAILURE])
  5224. # ------------------------------------------------------------
  5225. # Check whether the given compiler option works
  5226. AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
  5227. [AC_CACHE_CHECK([$1], [$2],
  5228. [$2=no
  5229. save_LDFLAGS="$LDFLAGS"
  5230. LDFLAGS="$LDFLAGS $3"
  5231. printf "$lt_simple_link_test_code" > conftest.$ac_ext
  5232. if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
  5233. # The compiler can only warn and ignore the option if not recognized
  5234. # So say no if there are warnings
  5235. if test -s conftest.err; then
  5236. # Append any errors to the config.log.
  5237. cat conftest.err 1>&AS_MESSAGE_LOG_FD
  5238. else
  5239. $2=yes
  5240. fi
  5241. fi
  5242. $rm conftest*
  5243. LDFLAGS="$save_LDFLAGS"
  5244. ])
  5245. if test x"[$]$2" = xyes; then
  5246. ifelse([$4], , :, [$4])
  5247. else
  5248. ifelse([$5], , :, [$5])
  5249. fi
  5250. ])# AC_LIBTOOL_LINKER_OPTION
  5251. # AC_LIBTOOL_SYS_MAX_CMD_LEN
  5252. # --------------------------
  5253. AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
  5254. [# find the maximum length of command line arguments
  5255. AC_MSG_CHECKING([the maximum length of command line arguments])
  5256. AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
  5257. i=0
  5258. testring="ABCD"
  5259. case $build_os in
  5260. msdosdjgpp*)
  5261. # On DJGPP, this test can blow up pretty badly due to problems in libc
  5262. # (any single argument exceeding 2000 bytes causes a buffer overrun
  5263. # during glob expansion). Even if it were fixed, the result of this
  5264. # check would be larger than it should be.
  5265. lt_cv_sys_max_cmd_len=12288; # 12K is about right
  5266. ;;
  5267. gnu*)
  5268. # Under GNU Hurd, this test is not required because there is
  5269. # no limit to the length of command line arguments.
  5270. # Libtool will interpret -1 as no limit whatsoever
  5271. lt_cv_sys_max_cmd_len=-1;
  5272. ;;
  5273. cygwin* | mingw*)
  5274. # On Win9x/ME, this test blows up -- it succeeds, but takes
  5275. # about 5 minutes as the teststring grows exponentially.
  5276. # Worse, since 9x/ME are not pre-emptively multitasking,
  5277. # you end up with a "frozen" computer, even though with patience
  5278. # the test eventually succeeds (with a max line length of 256k).
  5279. # Instead, let's just punt: use the minimum linelength reported by
  5280. # all of the supported platforms: 8192 (on NT/2K/XP).
  5281. lt_cv_sys_max_cmd_len=8192;
  5282. ;;
  5283. *)
  5284. # If test is not a shell built-in, we'll probably end up computing a
  5285. # maximum length that is only half of the actual maximum length, but
  5286. # we can't tell.
  5287. while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
  5288. = "XX$testring") >/dev/null 2>&1 &&
  5289. new_result=`expr "X$testring" : ".*" 2>&1` &&
  5290. lt_cv_sys_max_cmd_len=$new_result &&
  5291. test $i != 17 # 1/2 MB should be enough
  5292. do
  5293. i=`expr $i + 1`
  5294. testring=$testring$testring
  5295. done
  5296. testring=
  5297. # Add a significant safety factor because C++ compilers can tack on massive
  5298. # amounts of additional arguments before passing them to the linker.
  5299. # It appears as though 1/2 is a usable value.
  5300. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
  5301. ;;
  5302. esac
  5303. ])
  5304. if test -n $lt_cv_sys_max_cmd_len ; then
  5305. AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
  5306. else
  5307. AC_MSG_RESULT(none)
  5308. fi
  5309. ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
  5310. # _LT_AC_CHECK_DLFCN
  5311. # --------------------
  5312. AC_DEFUN([_LT_AC_CHECK_DLFCN],
  5313. [AC_CHECK_HEADERS(dlfcn.h)dnl
  5314. ])# _LT_AC_CHECK_DLFCN
  5315. # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
  5316. # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
  5317. # ------------------------------------------------------------------
  5318. AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
  5319. [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
  5320. if test "$cross_compiling" = yes; then :
  5321. [$4]
  5322. else
  5323. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  5324. lt_status=$lt_dlunknown
  5325. cat > conftest.$ac_ext <<EOF
  5326. [#line __oline__ "configure"
  5327. #include "confdefs.h"
  5328. #if HAVE_DLFCN_H
  5329. #include <dlfcn.h>
  5330. #endif
  5331. #include <stdio.h>
  5332. #ifdef RTLD_GLOBAL
  5333. # define LT_DLGLOBAL RTLD_GLOBAL
  5334. #else
  5335. # ifdef DL_GLOBAL
  5336. # define LT_DLGLOBAL DL_GLOBAL
  5337. # else
  5338. # define LT_DLGLOBAL 0
  5339. # endif
  5340. #endif
  5341. /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
  5342. find out it does not work in some platform. */
  5343. #ifndef LT_DLLAZY_OR_NOW
  5344. # ifdef RTLD_LAZY
  5345. # define LT_DLLAZY_OR_NOW RTLD_LAZY
  5346. # else
  5347. # ifdef DL_LAZY
  5348. # define LT_DLLAZY_OR_NOW DL_LAZY
  5349. # else
  5350. # ifdef RTLD_NOW
  5351. # define LT_DLLAZY_OR_NOW RTLD_NOW
  5352. # else
  5353. # ifdef DL_NOW
  5354. # define LT_DLLAZY_OR_NOW DL_NOW
  5355. # else
  5356. # define LT_DLLAZY_OR_NOW 0
  5357. # endif
  5358. # endif
  5359. # endif
  5360. # endif
  5361. #endif
  5362. #ifdef __cplusplus
  5363. extern "C" void exit (int);
  5364. #endif
  5365. void fnord() { int i=42;}
  5366. int main ()
  5367. {
  5368. void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  5369. int status = $lt_dlunknown;
  5370. if (self)
  5371. {
  5372. if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
  5373. else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
  5374. /* dlclose (self); */
  5375. }
  5376. exit (status);
  5377. }]
  5378. EOF
  5379. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
  5380. (./conftest; exit; ) 2>/dev/null
  5381. lt_status=$?
  5382. case x$lt_status in
  5383. x$lt_dlno_uscore) $1 ;;
  5384. x$lt_dlneed_uscore) $2 ;;
  5385. x$lt_unknown|x*) $3 ;;
  5386. esac
  5387. else :
  5388. # compilation failed
  5389. $3
  5390. fi
  5391. fi
  5392. rm -fr conftest*
  5393. ])# _LT_AC_TRY_DLOPEN_SELF
  5394. # AC_LIBTOOL_DLOPEN_SELF
  5395. # -------------------
  5396. AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
  5397. [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
  5398. if test "x$enable_dlopen" != xyes; then
  5399. enable_dlopen=unknown
  5400. enable_dlopen_self=unknown
  5401. enable_dlopen_self_static=unknown
  5402. else
  5403. lt_cv_dlopen=no
  5404. lt_cv_dlopen_libs=
  5405. case $host_os in
  5406. beos*)
  5407. lt_cv_dlopen="load_add_on"
  5408. lt_cv_dlopen_libs=
  5409. lt_cv_dlopen_self=yes
  5410. ;;
  5411. mingw* | pw32*)
  5412. lt_cv_dlopen="LoadLibrary"
  5413. lt_cv_dlopen_libs=
  5414. ;;
  5415. cygwin*)
  5416. lt_cv_dlopen="dlopen"
  5417. lt_cv_dlopen_libs=
  5418. ;;
  5419. darwin*)
  5420. # if libdl is installed we need to link against it
  5421. AC_CHECK_LIB([dl], [dlopen],
  5422. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
  5423. lt_cv_dlopen="dyld"
  5424. lt_cv_dlopen_libs=
  5425. lt_cv_dlopen_self=yes
  5426. ])
  5427. ;;
  5428. *)
  5429. AC_CHECK_FUNC([shl_load],
  5430. [lt_cv_dlopen="shl_load"],
  5431. [AC_CHECK_LIB([dld], [shl_load],
  5432. [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
  5433. [AC_CHECK_FUNC([dlopen],
  5434. [lt_cv_dlopen="dlopen"],
  5435. [AC_CHECK_LIB([dl], [dlopen],
  5436. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
  5437. [AC_CHECK_LIB([svld], [dlopen],
  5438. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
  5439. [AC_CHECK_LIB([dld], [dld_link],
  5440. [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
  5441. ])
  5442. ])
  5443. ])
  5444. ])
  5445. ])
  5446. ;;
  5447. esac
  5448. if test "x$lt_cv_dlopen" != xno; then
  5449. enable_dlopen=yes
  5450. else
  5451. enable_dlopen=no
  5452. fi
  5453. case $lt_cv_dlopen in
  5454. dlopen)
  5455. save_CPPFLAGS="$CPPFLAGS"
  5456. test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  5457. save_LDFLAGS="$LDFLAGS"
  5458. eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  5459. save_LIBS="$LIBS"
  5460. LIBS="$lt_cv_dlopen_libs $LIBS"
  5461. AC_CACHE_CHECK([whether a program can dlopen itself],
  5462. lt_cv_dlopen_self, [dnl
  5463. _LT_AC_TRY_DLOPEN_SELF(
  5464. lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
  5465. lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
  5466. ])
  5467. if test "x$lt_cv_dlopen_self" = xyes; then
  5468. LDFLAGS="$LDFLAGS $link_static_flag"
  5469. AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
  5470. lt_cv_dlopen_self_static, [dnl
  5471. _LT_AC_TRY_DLOPEN_SELF(
  5472. lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
  5473. lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
  5474. ])
  5475. fi
  5476. CPPFLAGS="$save_CPPFLAGS"
  5477. LDFLAGS="$save_LDFLAGS"
  5478. LIBS="$save_LIBS"
  5479. ;;
  5480. esac
  5481. case $lt_cv_dlopen_self in
  5482. yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  5483. *) enable_dlopen_self=unknown ;;
  5484. esac
  5485. case $lt_cv_dlopen_self_static in
  5486. yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  5487. *) enable_dlopen_self_static=unknown ;;
  5488. esac
  5489. fi
  5490. ])# AC_LIBTOOL_DLOPEN_SELF
  5491. # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
  5492. # ---------------------------------
  5493. # Check to see if options -c and -o are simultaneously supported by compiler
  5494. AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
  5495. [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
  5496. AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
  5497. [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
  5498. [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
  5499. $rm -r conftest 2>/dev/null
  5500. mkdir conftest
  5501. cd conftest
  5502. mkdir out
  5503. printf "$lt_simple_compile_test_code" > conftest.$ac_ext
  5504. # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
  5505. # that will create temporary files in the current directory regardless of
  5506. # the output directory. Thus, making CWD read-only will cause this test
  5507. # to fail, enabling locking or at least warning the user not to do parallel
  5508. # builds.
  5509. chmod -w .
  5510. lt_compiler_flag="-o out/conftest2.$ac_objext"
  5511. # Insert the option either (1) after the last *FLAGS variable, or
  5512. # (2) before a word containing "conftest.", or (3) at the end.
  5513. # Note that $ac_compile itself does not contain backslashes and begins
  5514. # with a dollar sign (not a hyphen), so the echo should work correctly.
  5515. lt_compile=`echo "$ac_compile" | $SED \
  5516. -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
  5517. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  5518. -e 's:$: $lt_compiler_flag:'`
  5519. (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  5520. (eval "$lt_compile" 2>out/conftest.err)
  5521. ac_status=$?
  5522. cat out/conftest.err >&AS_MESSAGE_LOG_FD
  5523. echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  5524. if (exit $ac_status) && test -s out/conftest2.$ac_objext
  5525. then
  5526. # The compiler can only warn and ignore the option if not recognized
  5527. # So say no if there are warnings
  5528. if test ! -s out/conftest.err; then
  5529. _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  5530. fi
  5531. fi
  5532. chmod u+w .
  5533. $rm conftest* out/*
  5534. rmdir out
  5535. cd ..
  5536. rmdir conftest
  5537. $rm conftest*
  5538. ])
  5539. ])# AC_LIBTOOL_PROG_CC_C_O
  5540. # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
  5541. # -----------------------------------------
  5542. # Check to see if we can do hard links to lock some files if needed
  5543. AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
  5544. [AC_REQUIRE([_LT_AC_LOCK])dnl
  5545. hard_links="nottested"
  5546. if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
  5547. # do not overwrite the value of need_locks provided by the user
  5548. AC_MSG_CHECKING([if we can lock with hard links])
  5549. hard_links=yes
  5550. $rm conftest*
  5551. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  5552. touch conftest.a
  5553. ln conftest.a conftest.b 2>&5 || hard_links=no
  5554. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  5555. AC_MSG_RESULT([$hard_links])
  5556. if test "$hard_links" = no; then
  5557. AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
  5558. need_locks=warn
  5559. fi
  5560. else
  5561. need_locks=no
  5562. fi
  5563. ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
  5564. # AC_LIBTOOL_OBJDIR
  5565. # -----------------
  5566. AC_DEFUN([AC_LIBTOOL_OBJDIR],
  5567. [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
  5568. [rm -f .libs 2>/dev/null
  5569. mkdir .libs 2>/dev/null
  5570. if test -d .libs; then
  5571. lt_cv_objdir=.libs
  5572. else
  5573. # MS-DOS does not allow filenames that begin with a dot.
  5574. lt_cv_objdir=_libs
  5575. fi
  5576. rmdir .libs 2>/dev/null])
  5577. objdir=$lt_cv_objdir
  5578. ])# AC_LIBTOOL_OBJDIR
  5579. # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
  5580. # ----------------------------------------------
  5581. # Check hardcoding attributes.
  5582. AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
  5583. [AC_MSG_CHECKING([how to hardcode library paths into programs])
  5584. _LT_AC_TAGVAR(hardcode_action, $1)=
  5585. if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
  5586. test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
  5587. test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
  5588. # We can hardcode non-existant directories.
  5589. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
  5590. # If the only mechanism to avoid hardcoding is shlibpath_var, we
  5591. # have to relink, otherwise we might link with an installed library
  5592. # when we should be linking with a yet-to-be-installed one
  5593. ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
  5594. test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
  5595. # Linking always hardcodes the temporary library directory.
  5596. _LT_AC_TAGVAR(hardcode_action, $1)=relink
  5597. else
  5598. # We can link without hardcoding, and we can hardcode nonexisting dirs.
  5599. _LT_AC_TAGVAR(hardcode_action, $1)=immediate
  5600. fi
  5601. else
  5602. # We cannot hardcode anything, or else we can only hardcode existing
  5603. # directories.
  5604. _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
  5605. fi
  5606. AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
  5607. if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
  5608. # Fast installation is not supported
  5609. enable_fast_install=no
  5610. elif test "$shlibpath_overrides_runpath" = yes ||
  5611. test "$enable_shared" = no; then
  5612. # Fast installation is not necessary
  5613. enable_fast_install=needless
  5614. fi
  5615. ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
  5616. # AC_LIBTOOL_SYS_LIB_STRIP
  5617. # ------------------------
  5618. AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
  5619. [striplib=
  5620. old_striplib=
  5621. AC_MSG_CHECKING([whether stripping libraries is possible])
  5622. if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
  5623. test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
  5624. test -z "$striplib" && striplib="$STRIP --strip-unneeded"
  5625. AC_MSG_RESULT([yes])
  5626. else
  5627. # FIXME - insert some real tests, host_os isn't really good enough
  5628. case $host_os in
  5629. darwin*)
  5630. if test -n "$STRIP" ; then
  5631. striplib="$STRIP -x"
  5632. AC_MSG_RESULT([yes])
  5633. else
  5634. AC_MSG_RESULT([no])
  5635. fi
  5636. ;;
  5637. *)
  5638. AC_MSG_RESULT([no])
  5639. ;;
  5640. esac
  5641. fi
  5642. ])# AC_LIBTOOL_SYS_LIB_STRIP
  5643. # AC_LIBTOOL_SYS_DYNAMIC_LINKER
  5644. # -----------------------------
  5645. # PORTME Fill in your ld.so characteristics
  5646. AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
  5647. [AC_MSG_CHECKING([dynamic linker characteristics])
  5648. library_names_spec=
  5649. libname_spec='lib$name'
  5650. soname_spec=
  5651. shrext=".so"
  5652. postinstall_cmds=
  5653. postuninstall_cmds=
  5654. finish_cmds=
  5655. finish_eval=
  5656. shlibpath_var=
  5657. shlibpath_overrides_runpath=unknown
  5658. version_type=none
  5659. dynamic_linker="$host_os ld.so"
  5660. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  5661. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  5662. need_lib_prefix=unknown
  5663. hardcode_into_libs=no
  5664. # when you set need_version to no, make sure it does not cause -set_version
  5665. # flags to be left without arguments
  5666. need_version=unknown
  5667. case $host_os in
  5668. aix3*)
  5669. version_type=linux
  5670. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
  5671. shlibpath_var=LIBPATH
  5672. # AIX 3 has no versioning support, so we append a major version to the name.
  5673. soname_spec='${libname}${release}${shared_ext}$major'
  5674. ;;
  5675. aix4* | aix5*)
  5676. version_type=linux
  5677. need_lib_prefix=no
  5678. need_version=no
  5679. hardcode_into_libs=yes
  5680. if test "$host_cpu" = ia64; then
  5681. # AIX 5 supports IA64
  5682. library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
  5683. shlibpath_var=LD_LIBRARY_PATH
  5684. else
  5685. # With GCC up to 2.95.x, collect2 would create an import file
  5686. # for dependence libraries. The import file would start with
  5687. # the line `#! .'. This would cause the generated library to
  5688. # depend on `.', always an invalid library. This was fixed in
  5689. # development snapshots of GCC prior to 3.0.
  5690. case $host_os in
  5691. aix4 | aix4.[[01]] | aix4.[[01]].*)
  5692. if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
  5693. echo ' yes '
  5694. echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
  5695. :
  5696. else
  5697. can_build_shared=no
  5698. fi
  5699. ;;
  5700. esac
  5701. # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
  5702. # soname into executable. Probably we can add versioning support to
  5703. # collect2, so additional links can be useful in future.
  5704. if test "$aix_use_runtimelinking" = yes; then
  5705. # If using run time linking (on AIX 4.2 or later) use lib<name>.so
  5706. # instead of lib<name>.a to let people know that these are not
  5707. # typical AIX shared libraries.
  5708. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  5709. else
  5710. # We preserve .a as extension for shared libraries through AIX4.2
  5711. # and later when we are not doing run time linking.
  5712. library_names_spec='${libname}${release}.a $libname.a'
  5713. soname_spec='${libname}${release}${shared_ext}$major'
  5714. fi
  5715. shlibpath_var=LIBPATH
  5716. fi
  5717. ;;
  5718. amigaos*)
  5719. library_names_spec='$libname.ixlibrary $libname.a'
  5720. # Create ${libname}_ixlibrary.a entries in /sys/libs.
  5721. 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'
  5722. ;;
  5723. beos*)
  5724. library_names_spec='${libname}${shared_ext}'
  5725. dynamic_linker="$host_os ld.so"
  5726. shlibpath_var=LIBRARY_PATH
  5727. ;;
  5728. bsdi4*)
  5729. version_type=linux
  5730. need_version=no
  5731. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  5732. soname_spec='${libname}${release}${shared_ext}$major'
  5733. finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  5734. shlibpath_var=LD_LIBRARY_PATH
  5735. sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  5736. sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  5737. # the default ld.so.conf also contains /usr/contrib/lib and
  5738. # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  5739. # libtool to hard-code these into programs
  5740. ;;
  5741. cygwin* | mingw* | pw32*)
  5742. version_type=windows
  5743. shrext=".dll"
  5744. need_version=no
  5745. need_lib_prefix=no
  5746. case $GCC,$host_os in
  5747. yes,cygwin* | yes,mingw* | yes,pw32*)
  5748. library_names_spec='$libname.dll.a'
  5749. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  5750. postinstall_cmds='base_file=`basename \${file}`~
  5751. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
  5752. dldir=$destdir/`dirname \$dlpath`~
  5753. test -d \$dldir || mkdir -p \$dldir~
  5754. $install_prog $dir/$dlname \$dldir/$dlname'
  5755. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  5756. dlpath=$dir/\$dldll~
  5757. $rm \$dlpath'
  5758. shlibpath_overrides_runpath=yes
  5759. case $host_os in
  5760. cygwin*)
  5761. # Cygwin DLLs use 'cyg' prefix rather than 'lib'
  5762. soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  5763. sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
  5764. ;;
  5765. mingw*)
  5766. # MinGW DLLs use traditional 'lib' prefix
  5767. soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  5768. sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
  5769. if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
  5770. # It is most probably a Windows format PATH printed by
  5771. # mingw gcc, but we are running on Cygwin. Gcc prints its search
  5772. # path with ; separators, and with drive letters. We can handle the
  5773. # drive letters (cygwin fileutils understands them), so leave them,
  5774. # especially as we might pass files found there to a mingw objdump,
  5775. # which wouldn't understand a cygwinified path. Ahh.
  5776. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  5777. else
  5778. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  5779. fi
  5780. ;;
  5781. pw32*)
  5782. # pw32 DLLs use 'pw' prefix rather than 'lib'
  5783. library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
  5784. ;;
  5785. esac
  5786. ;;
  5787. *)
  5788. library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
  5789. ;;
  5790. esac
  5791. dynamic_linker='Win32 ld.exe'
  5792. # FIXME: first we should search . and the directory the executable is in
  5793. shlibpath_var=PATH
  5794. ;;
  5795. darwin* | rhapsody*)
  5796. dynamic_linker="$host_os dyld"
  5797. version_type=darwin
  5798. need_lib_prefix=no
  5799. need_version=no
  5800. library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
  5801. soname_spec='${libname}${release}${major}$shared_ext'
  5802. shlibpath_overrides_runpath=yes
  5803. shlibpath_var=DYLD_LIBRARY_PATH
  5804. shrext='$(test .$module = .yes && echo .so || echo .dylib)'
  5805. # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
  5806. if test "$GCC" = yes; then
  5807. sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
  5808. else
  5809. sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
  5810. fi
  5811. sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
  5812. ;;
  5813. dgux*)
  5814. version_type=linux
  5815. need_lib_prefix=no
  5816. need_version=no
  5817. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
  5818. soname_spec='${libname}${release}${shared_ext}$major'
  5819. shlibpath_var=LD_LIBRARY_PATH
  5820. ;;
  5821. freebsd1*)
  5822. dynamic_linker=no
  5823. ;;
  5824. freebsd*-gnu*)
  5825. version_type=linux
  5826. need_lib_prefix=no
  5827. need_version=no
  5828. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  5829. soname_spec='${libname}${release}${shared_ext}$major'
  5830. shlibpath_var=LD_LIBRARY_PATH
  5831. shlibpath_overrides_runpath=no
  5832. hardcode_into_libs=yes
  5833. dynamic_linker='GNU ld.so'
  5834. ;;
  5835. freebsd*)
  5836. objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
  5837. version_type=freebsd-$objformat
  5838. case $version_type in
  5839. freebsd-elf*)
  5840. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  5841. need_version=no
  5842. need_lib_prefix=no
  5843. ;;
  5844. freebsd-*)
  5845. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
  5846. need_version=yes
  5847. ;;
  5848. esac
  5849. shlibpath_var=LD_LIBRARY_PATH
  5850. case $host_os in
  5851. freebsd2*)
  5852. shlibpath_overrides_runpath=yes
  5853. ;;
  5854. freebsd3.[01]* | freebsdelf3.[01]*)
  5855. shlibpath_overrides_runpath=yes
  5856. hardcode_into_libs=yes
  5857. ;;
  5858. *) # from 3.2 on
  5859. shlibpath_overrides_runpath=no
  5860. hardcode_into_libs=yes
  5861. ;;
  5862. esac
  5863. ;;
  5864. gnu*)
  5865. version_type=linux
  5866. need_lib_prefix=no
  5867. need_version=no
  5868. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  5869. soname_spec='${libname}${release}${shared_ext}$major'
  5870. shlibpath_var=LD_LIBRARY_PATH
  5871. hardcode_into_libs=yes
  5872. ;;
  5873. hpux9* | hpux10* | hpux11*)
  5874. # Give a soname corresponding to the major version so that dld.sl refuses to
  5875. # link against other versions.
  5876. version_type=sunos
  5877. need_lib_prefix=no
  5878. need_version=no
  5879. case "$host_cpu" in
  5880. ia64*)
  5881. shrext='.so'
  5882. hardcode_into_libs=yes
  5883. dynamic_linker="$host_os dld.so"
  5884. shlibpath_var=LD_LIBRARY_PATH
  5885. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  5886. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  5887. soname_spec='${libname}${release}${shared_ext}$major'
  5888. if test "X$HPUX_IA64_MODE" = X32; then
  5889. sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
  5890. else
  5891. sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
  5892. fi
  5893. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  5894. ;;
  5895. hppa*64*)
  5896. shrext='.sl'
  5897. hardcode_into_libs=yes
  5898. dynamic_linker="$host_os dld.sl"
  5899. shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
  5900. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  5901. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  5902. soname_spec='${libname}${release}${shared_ext}$major'
  5903. sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
  5904. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  5905. ;;
  5906. *)
  5907. shrext='.sl'
  5908. dynamic_linker="$host_os dld.sl"
  5909. shlibpath_var=SHLIB_PATH
  5910. shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  5911. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  5912. soname_spec='${libname}${release}${shared_ext}$major'
  5913. ;;
  5914. esac
  5915. # HP-UX runs *really* slowly unless shared libraries are mode 555.
  5916. postinstall_cmds='chmod 555 $lib'
  5917. ;;
  5918. irix5* | irix6* | nonstopux*)
  5919. case $host_os in
  5920. nonstopux*) version_type=nonstopux ;;
  5921. *)
  5922. if test "$lt_cv_prog_gnu_ld" = yes; then
  5923. version_type=linux
  5924. else
  5925. version_type=irix
  5926. fi ;;
  5927. esac
  5928. need_lib_prefix=no
  5929. need_version=no
  5930. soname_spec='${libname}${release}${shared_ext}$major'
  5931. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
  5932. case $host_os in
  5933. irix5* | nonstopux*)
  5934. libsuff= shlibsuff=
  5935. ;;
  5936. *)
  5937. case $LD in # libtool.m4 will add one of these switches to LD
  5938. *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
  5939. libsuff= shlibsuff= libmagic=32-bit;;
  5940. *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
  5941. libsuff=32 shlibsuff=N32 libmagic=N32;;
  5942. *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
  5943. libsuff=64 shlibsuff=64 libmagic=64-bit;;
  5944. *) libsuff= shlibsuff= libmagic=never-match;;
  5945. esac
  5946. ;;
  5947. esac
  5948. shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  5949. shlibpath_overrides_runpath=no
  5950. sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
  5951. sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
  5952. hardcode_into_libs=yes
  5953. ;;
  5954. # No shared lib support for Linux oldld, aout, or coff.
  5955. linux*oldld* | linux*aout* | linux*coff*)
  5956. dynamic_linker=no
  5957. ;;
  5958. # This must be Linux ELF.
  5959. linux*)
  5960. version_type=linux
  5961. need_lib_prefix=no
  5962. need_version=no
  5963. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  5964. soname_spec='${libname}${release}${shared_ext}$major'
  5965. finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  5966. libsuff=
  5967. if test "x$LINUX_64_MODE" = x64; then
  5968. # Some platforms are per default 64-bit, so there's no /lib64
  5969. if test -d /lib64; then
  5970. libsuff=64
  5971. fi
  5972. fi
  5973. shlibpath_var=LD_LIBRARY_PATH
  5974. shlibpath_overrides_runpath=no
  5975. sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
  5976. sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
  5977. # This implies no fast_install, which is unacceptable.
  5978. # Some rework will be needed to allow for fast_install
  5979. # before this can be enabled.
  5980. hardcode_into_libs=yes
  5981. # We used to test for /lib/ld.so.1 and disable shared libraries on
  5982. # powerpc, because MkLinux only supported shared libraries with the
  5983. # GNU dynamic linker. Since this was broken with cross compilers,
  5984. # most powerpc-linux boxes support dynamic linking these days and
  5985. # people can always --disable-shared, the test was removed, and we
  5986. # assume the GNU/Linux dynamic linker is in use.
  5987. dynamic_linker='GNU/Linux ld.so'
  5988. ;;
  5989. netbsd*)
  5990. version_type=sunos
  5991. need_lib_prefix=no
  5992. need_version=no
  5993. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  5994. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  5995. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  5996. dynamic_linker='NetBSD (a.out) ld.so'
  5997. else
  5998. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}'
  5999. soname_spec='${libname}${release}${shared_ext}$major'
  6000. dynamic_linker='NetBSD ld.elf_so'
  6001. fi
  6002. shlibpath_var=LD_LIBRARY_PATH
  6003. shlibpath_overrides_runpath=yes
  6004. hardcode_into_libs=yes
  6005. ;;
  6006. newsos6)
  6007. version_type=linux
  6008. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  6009. shlibpath_var=LD_LIBRARY_PATH
  6010. shlibpath_overrides_runpath=yes
  6011. ;;
  6012. nto-qnx*)
  6013. version_type=linux
  6014. need_lib_prefix=no
  6015. need_version=no
  6016. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  6017. soname_spec='${libname}${release}${shared_ext}$major'
  6018. shlibpath_var=LD_LIBRARY_PATH
  6019. shlibpath_overrides_runpath=yes
  6020. ;;
  6021. openbsd*)
  6022. version_type=sunos
  6023. need_lib_prefix=no
  6024. need_version=no
  6025. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  6026. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  6027. shlibpath_var=LD_LIBRARY_PATH
  6028. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  6029. case $host_os in
  6030. openbsd2.[[89]] | openbsd2.[[89]].*)
  6031. shlibpath_overrides_runpath=no
  6032. ;;
  6033. *)
  6034. shlibpath_overrides_runpath=yes
  6035. ;;
  6036. esac
  6037. else
  6038. shlibpath_overrides_runpath=yes
  6039. fi
  6040. ;;
  6041. os2*)
  6042. libname_spec='$name'
  6043. shrext=".dll"
  6044. need_lib_prefix=no
  6045. library_names_spec='$libname${shared_ext} $libname.a'
  6046. dynamic_linker='OS/2 ld.exe'
  6047. shlibpath_var=LIBPATH
  6048. ;;
  6049. osf3* | osf4* | osf5*)
  6050. version_type=osf
  6051. need_lib_prefix=no
  6052. need_version=no
  6053. soname_spec='${libname}${release}${shared_ext}$major'
  6054. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  6055. shlibpath_var=LD_LIBRARY_PATH
  6056. sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  6057. sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  6058. ;;
  6059. sco3.2v5*)
  6060. version_type=osf
  6061. soname_spec='${libname}${release}${shared_ext}$major'
  6062. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  6063. shlibpath_var=LD_LIBRARY_PATH
  6064. ;;
  6065. solaris*)
  6066. version_type=linux
  6067. need_lib_prefix=no
  6068. need_version=no
  6069. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  6070. soname_spec='${libname}${release}${shared_ext}$major'
  6071. shlibpath_var=LD_LIBRARY_PATH
  6072. shlibpath_overrides_runpath=yes
  6073. hardcode_into_libs=yes
  6074. # ldd complains unless libraries are executable
  6075. postinstall_cmds='chmod +x $lib'
  6076. ;;
  6077. sunos4*)
  6078. version_type=sunos
  6079. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  6080. finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  6081. shlibpath_var=LD_LIBRARY_PATH
  6082. shlibpath_overrides_runpath=yes
  6083. if test "$with_gnu_ld" = yes; then
  6084. need_lib_prefix=no
  6085. fi
  6086. need_version=yes
  6087. ;;
  6088. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  6089. version_type=linux
  6090. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  6091. soname_spec='${libname}${release}${shared_ext}$major'
  6092. shlibpath_var=LD_LIBRARY_PATH
  6093. case $host_vendor in
  6094. sni)
  6095. shlibpath_overrides_runpath=no
  6096. need_lib_prefix=no
  6097. export_dynamic_flag_spec='${wl}-Blargedynsym'
  6098. runpath_var=LD_RUN_PATH
  6099. ;;
  6100. siemens)
  6101. need_lib_prefix=no
  6102. ;;
  6103. motorola)
  6104. need_lib_prefix=no
  6105. need_version=no
  6106. shlibpath_overrides_runpath=no
  6107. sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  6108. ;;
  6109. esac
  6110. ;;
  6111. sysv4*MP*)
  6112. if test -d /usr/nec ;then
  6113. version_type=linux
  6114. library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
  6115. soname_spec='$libname${shared_ext}.$major'
  6116. shlibpath_var=LD_LIBRARY_PATH
  6117. fi
  6118. ;;
  6119. uts4*)
  6120. version_type=linux
  6121. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  6122. soname_spec='${libname}${release}${shared_ext}$major'
  6123. shlibpath_var=LD_LIBRARY_PATH
  6124. ;;
  6125. *)
  6126. dynamic_linker=no
  6127. ;;
  6128. esac
  6129. AC_MSG_RESULT([$dynamic_linker])
  6130. test "$dynamic_linker" = no && can_build_shared=no
  6131. ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
  6132. # _LT_AC_TAGCONFIG
  6133. # ----------------
  6134. AC_DEFUN([_LT_AC_TAGCONFIG],
  6135. [AC_ARG_WITH([tags],
  6136. [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
  6137. [include additional configurations @<:@automatic@:>@])],
  6138. [tagnames="$withval"])
  6139. if test -f "$ltmain" && test -n "$tagnames"; then
  6140. if test ! -f "${ofile}"; then
  6141. AC_MSG_WARN([output file `$ofile' does not exist])
  6142. fi
  6143. if test -z "$LTCC"; then
  6144. eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
  6145. if test -z "$LTCC"; then
  6146. AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
  6147. else
  6148. AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
  6149. fi
  6150. fi
  6151. # Extract list of available tagged configurations in $ofile.
  6152. # Note that this assumes the entire list is on one line.
  6153. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
  6154. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  6155. for tagname in $tagnames; do
  6156. IFS="$lt_save_ifs"
  6157. # Check whether tagname contains only valid characters
  6158. case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
  6159. "") ;;
  6160. *) AC_MSG_ERROR([invalid tag name: $tagname])
  6161. ;;
  6162. esac
  6163. if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
  6164. then
  6165. AC_MSG_ERROR([tag name \"$tagname\" already exists])
  6166. fi
  6167. # Update the list of available tags.
  6168. if test -n "$tagname"; then
  6169. echo appending configuration tag \"$tagname\" to $ofile
  6170. case $tagname in
  6171. CXX)
  6172. if test -n "$CXX" && test "X$CXX" != "Xno"; then
  6173. AC_LIBTOOL_LANG_CXX_CONFIG
  6174. else
  6175. tagname=""
  6176. fi
  6177. ;;
  6178. F77)
  6179. if test -n "$F77" && test "X$F77" != "Xno"; then
  6180. AC_LIBTOOL_LANG_F77_CONFIG
  6181. else
  6182. tagname=""
  6183. fi
  6184. ;;
  6185. GCJ)
  6186. if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
  6187. AC_LIBTOOL_LANG_GCJ_CONFIG
  6188. else
  6189. tagname=""
  6190. fi
  6191. ;;
  6192. RC)
  6193. AC_LIBTOOL_LANG_RC_CONFIG
  6194. ;;
  6195. *)
  6196. AC_MSG_ERROR([Unsupported tag name: $tagname])
  6197. ;;
  6198. esac
  6199. # Append the new tag name to the list of available tags.
  6200. if test -n "$tagname" ; then
  6201. available_tags="$available_tags $tagname"
  6202. fi
  6203. fi
  6204. done
  6205. IFS="$lt_save_ifs"
  6206. # Now substitute the updated list of available tags.
  6207. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
  6208. mv "${ofile}T" "$ofile"
  6209. chmod +x "$ofile"
  6210. else
  6211. rm -f "${ofile}T"
  6212. AC_MSG_ERROR([unable to update list of available tagged configurations.])
  6213. fi
  6214. fi
  6215. ])# _LT_AC_TAGCONFIG
  6216. # AC_LIBTOOL_DLOPEN
  6217. # -----------------
  6218. # enable checks for dlopen support
  6219. AC_DEFUN([AC_LIBTOOL_DLOPEN],
  6220. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
  6221. ])# AC_LIBTOOL_DLOPEN
  6222. # AC_LIBTOOL_WIN32_DLL
  6223. # --------------------
  6224. # declare package support for building win32 dll's
  6225. AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
  6226. [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
  6227. ])# AC_LIBTOOL_WIN32_DLL
  6228. # AC_ENABLE_SHARED([DEFAULT])
  6229. # ---------------------------
  6230. # implement the --enable-shared flag
  6231. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  6232. AC_DEFUN([AC_ENABLE_SHARED],
  6233. [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
  6234. AC_ARG_ENABLE([shared],
  6235. [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
  6236. [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
  6237. [p=${PACKAGE-default}
  6238. case $enableval in
  6239. yes) enable_shared=yes ;;
  6240. no) enable_shared=no ;;
  6241. *)
  6242. enable_shared=no
  6243. # Look at the argument we got. We use all the common list separators.
  6244. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  6245. for pkg in $enableval; do
  6246. IFS="$lt_save_ifs"
  6247. if test "X$pkg" = "X$p"; then
  6248. enable_shared=yes
  6249. fi
  6250. done
  6251. IFS="$lt_save_ifs"
  6252. ;;
  6253. esac],
  6254. [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
  6255. ])# AC_ENABLE_SHARED
  6256. # AC_DISABLE_SHARED
  6257. # -----------------
  6258. #- set the default shared flag to --disable-shared
  6259. AC_DEFUN([AC_DISABLE_SHARED],
  6260. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  6261. AC_ENABLE_SHARED(no)
  6262. ])# AC_DISABLE_SHARED
  6263. # AC_ENABLE_STATIC([DEFAULT])
  6264. # ---------------------------
  6265. # implement the --enable-static flag
  6266. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  6267. AC_DEFUN([AC_ENABLE_STATIC],
  6268. [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
  6269. AC_ARG_ENABLE([static],
  6270. [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
  6271. [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
  6272. [p=${PACKAGE-default}
  6273. case $enableval in
  6274. yes) enable_static=yes ;;
  6275. no) enable_static=no ;;
  6276. *)
  6277. enable_static=no
  6278. # Look at the argument we got. We use all the common list separators.
  6279. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  6280. for pkg in $enableval; do
  6281. IFS="$lt_save_ifs"
  6282. if test "X$pkg" = "X$p"; then
  6283. enable_static=yes
  6284. fi
  6285. done
  6286. IFS="$lt_save_ifs"
  6287. ;;
  6288. esac],
  6289. [enable_static=]AC_ENABLE_STATIC_DEFAULT)
  6290. ])# AC_ENABLE_STATIC
  6291. # AC_DISABLE_STATIC
  6292. # -----------------
  6293. # set the default static flag to --disable-static
  6294. AC_DEFUN([AC_DISABLE_STATIC],
  6295. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  6296. AC_ENABLE_STATIC(no)
  6297. ])# AC_DISABLE_STATIC
  6298. # AC_ENABLE_FAST_INSTALL([DEFAULT])
  6299. # ---------------------------------
  6300. # implement the --enable-fast-install flag
  6301. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  6302. AC_DEFUN([AC_ENABLE_FAST_INSTALL],
  6303. [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
  6304. AC_ARG_ENABLE([fast-install],
  6305. [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
  6306. [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
  6307. [p=${PACKAGE-default}
  6308. case $enableval in
  6309. yes) enable_fast_install=yes ;;
  6310. no) enable_fast_install=no ;;
  6311. *)
  6312. enable_fast_install=no
  6313. # Look at the argument we got. We use all the common list separators.
  6314. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  6315. for pkg in $enableval; do
  6316. IFS="$lt_save_ifs"
  6317. if test "X$pkg" = "X$p"; then
  6318. enable_fast_install=yes
  6319. fi
  6320. done
  6321. IFS="$lt_save_ifs"
  6322. ;;
  6323. esac],
  6324. [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
  6325. ])# AC_ENABLE_FAST_INSTALL
  6326. # AC_DISABLE_FAST_INSTALL
  6327. # -----------------------
  6328. # set the default to --disable-fast-install
  6329. AC_DEFUN([AC_DISABLE_FAST_INSTALL],
  6330. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  6331. AC_ENABLE_FAST_INSTALL(no)
  6332. ])# AC_DISABLE_FAST_INSTALL
  6333. # AC_LIBTOOL_PICMODE([MODE])
  6334. # --------------------------
  6335. # implement the --with-pic flag
  6336. # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
  6337. AC_DEFUN([AC_LIBTOOL_PICMODE],
  6338. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  6339. pic_mode=ifelse($#,1,$1,default)
  6340. ])# AC_LIBTOOL_PICMODE
  6341. # AC_PROG_EGREP
  6342. # -------------
  6343. # This is predefined starting with Autoconf 2.54, so this conditional
  6344. # definition can be removed once we require Autoconf 2.54 or later.
  6345. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
  6346. [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
  6347. [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
  6348. then ac_cv_prog_egrep='grep -E'
  6349. else ac_cv_prog_egrep='egrep'
  6350. fi])
  6351. EGREP=$ac_cv_prog_egrep
  6352. AC_SUBST([EGREP])
  6353. ])])
  6354. # AC_PATH_TOOL_PREFIX
  6355. # -------------------
  6356. # find a file program which can recognise shared library
  6357. AC_DEFUN([AC_PATH_TOOL_PREFIX],
  6358. [AC_REQUIRE([AC_PROG_EGREP])dnl
  6359. AC_MSG_CHECKING([for $1])
  6360. AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
  6361. [case $MAGIC_CMD in
  6362. [[\\/*] | ?:[\\/]*])
  6363. lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
  6364. ;;
  6365. *)
  6366. lt_save_MAGIC_CMD="$MAGIC_CMD"
  6367. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  6368. dnl $ac_dummy forces splitting on constant user-supplied paths.
  6369. dnl POSIX.2 word splitting is done only on the output of word expansions,
  6370. dnl not every word. This closes a longstanding sh security hole.
  6371. ac_dummy="ifelse([$2], , $PATH, [$2])"
  6372. for ac_dir in $ac_dummy; do
  6373. IFS="$lt_save_ifs"
  6374. test -z "$ac_dir" && ac_dir=.
  6375. if test -f $ac_dir/$1; then
  6376. lt_cv_path_MAGIC_CMD="$ac_dir/$1"
  6377. if test -n "$file_magic_test_file"; then
  6378. case $deplibs_check_method in
  6379. "file_magic "*)
  6380. file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
  6381. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  6382. if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  6383. $EGREP "$file_magic_regex" > /dev/null; then
  6384. :
  6385. else
  6386. cat <<EOF 1>&2
  6387. *** Warning: the command libtool uses to detect shared libraries,
  6388. *** $file_magic_cmd, produces output that libtool cannot recognize.
  6389. *** The result is that libtool may fail to recognize shared libraries
  6390. *** as such. This will affect the creation of libtool libraries that
  6391. *** depend on shared libraries, but programs linked with such libtool
  6392. *** libraries will work regardless of this problem. Nevertheless, you
  6393. *** may want to report the problem to your system manager and/or to
  6394. *** bug-libtool@gnu.org
  6395. EOF
  6396. fi ;;
  6397. esac
  6398. fi
  6399. break
  6400. fi
  6401. done
  6402. IFS="$lt_save_ifs"
  6403. MAGIC_CMD="$lt_save_MAGIC_CMD"
  6404. ;;
  6405. esac])
  6406. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  6407. if test -n "$MAGIC_CMD"; then
  6408. AC_MSG_RESULT($MAGIC_CMD)
  6409. else
  6410. AC_MSG_RESULT(no)
  6411. fi
  6412. ])# AC_PATH_TOOL_PREFIX
  6413. # AC_PATH_MAGIC
  6414. # -------------
  6415. # find a file program which can recognise a shared library
  6416. AC_DEFUN([AC_PATH_MAGIC],
  6417. [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
  6418. if test -z "$lt_cv_path_MAGIC_CMD"; then
  6419. if test -n "$ac_tool_prefix"; then
  6420. AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
  6421. else
  6422. MAGIC_CMD=:
  6423. fi
  6424. fi
  6425. ])# AC_PATH_MAGIC
  6426. # AC_PROG_LD
  6427. # ----------
  6428. # find the pathname to the GNU or non-GNU linker
  6429. AC_DEFUN([AC_PROG_LD],
  6430. [AC_ARG_WITH([gnu-ld],
  6431. [AC_HELP_STRING([--with-gnu-ld],
  6432. [assume the C compiler uses GNU ld @<:@default=no@:>@])],
  6433. [test "$withval" = no || with_gnu_ld=yes],
  6434. [with_gnu_ld=no])
  6435. AC_REQUIRE([LT_AC_PROG_SED])dnl
  6436. AC_REQUIRE([AC_PROG_CC])dnl
  6437. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  6438. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  6439. ac_prog=ld
  6440. if test "$GCC" = yes; then
  6441. # Check if gcc -print-prog-name=ld gives a path.
  6442. AC_MSG_CHECKING([for ld used by $CC])
  6443. case $host in
  6444. *-*-mingw*)
  6445. # gcc leaves a trailing carriage return which upsets mingw
  6446. ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  6447. *)
  6448. ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  6449. esac
  6450. case $ac_prog in
  6451. # Accept absolute paths.
  6452. [[\\/]]* | ?:[[\\/]]*)
  6453. re_direlt='/[[^/]][[^/]]*/\.\./'
  6454. # Canonicalize the pathname of ld
  6455. ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
  6456. while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
  6457. ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
  6458. done
  6459. test -z "$LD" && LD="$ac_prog"
  6460. ;;
  6461. "")
  6462. # If it fails, then pretend we aren't using GCC.
  6463. ac_prog=ld
  6464. ;;
  6465. *)
  6466. # If it is relative, then search for the first ld in PATH.
  6467. with_gnu_ld=unknown
  6468. ;;
  6469. esac
  6470. elif test "$with_gnu_ld" = yes; then
  6471. AC_MSG_CHECKING([for GNU ld])
  6472. else
  6473. AC_MSG_CHECKING([for non-GNU ld])
  6474. fi
  6475. AC_CACHE_VAL(lt_cv_path_LD,
  6476. [if test -z "$LD"; then
  6477. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  6478. for ac_dir in $PATH; do
  6479. IFS="$lt_save_ifs"
  6480. test -z "$ac_dir" && ac_dir=.
  6481. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  6482. lt_cv_path_LD="$ac_dir/$ac_prog"
  6483. # Check to see if the program is GNU ld. I'd rather use --version,
  6484. # but apparently some GNU ld's only accept -v.
  6485. # Break only if it was the GNU/non-GNU ld that we prefer.
  6486. case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
  6487. *GNU* | *'with BFD'*)
  6488. test "$with_gnu_ld" != no && break
  6489. ;;
  6490. *)
  6491. test "$with_gnu_ld" != yes && break
  6492. ;;
  6493. esac
  6494. fi
  6495. done
  6496. IFS="$lt_save_ifs"
  6497. else
  6498. lt_cv_path_LD="$LD" # Let the user override the test with a path.
  6499. fi])
  6500. LD="$lt_cv_path_LD"
  6501. if test -n "$LD"; then
  6502. AC_MSG_RESULT($LD)
  6503. else
  6504. AC_MSG_RESULT(no)
  6505. fi
  6506. test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  6507. AC_PROG_LD_GNU
  6508. ])# AC_PROG_LD
  6509. # AC_PROG_LD_GNU
  6510. # --------------
  6511. AC_DEFUN([AC_PROG_LD_GNU],
  6512. [AC_REQUIRE([AC_PROG_EGREP])dnl
  6513. AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
  6514. [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
  6515. case `$LD -v 2>&1 </dev/null` in
  6516. *GNU* | *'with BFD'*)
  6517. lt_cv_prog_gnu_ld=yes
  6518. ;;
  6519. *)
  6520. lt_cv_prog_gnu_ld=no
  6521. ;;
  6522. esac])
  6523. with_gnu_ld=$lt_cv_prog_gnu_ld
  6524. ])# AC_PROG_LD_GNU
  6525. # AC_PROG_LD_RELOAD_FLAG
  6526. # ----------------------
  6527. # find reload flag for linker
  6528. # -- PORTME Some linkers may need a different reload flag.
  6529. AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
  6530. [AC_CACHE_CHECK([for $LD option to reload object files],
  6531. lt_cv_ld_reload_flag,
  6532. [lt_cv_ld_reload_flag='-r'])
  6533. reload_flag=$lt_cv_ld_reload_flag
  6534. case $reload_flag in
  6535. "" | " "*) ;;
  6536. *) reload_flag=" $reload_flag" ;;
  6537. esac
  6538. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  6539. ])# AC_PROG_LD_RELOAD_FLAG
  6540. # AC_DEPLIBS_CHECK_METHOD
  6541. # -----------------------
  6542. # how to check for library dependencies
  6543. # -- PORTME fill in with the dynamic library characteristics
  6544. AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
  6545. [AC_CACHE_CHECK([how to recognise dependent libraries],
  6546. lt_cv_deplibs_check_method,
  6547. [lt_cv_file_magic_cmd='$MAGIC_CMD'
  6548. lt_cv_file_magic_test_file=
  6549. lt_cv_deplibs_check_method='unknown'
  6550. # Need to set the preceding variable on all platforms that support
  6551. # interlibrary dependencies.
  6552. # 'none' -- dependencies not supported.
  6553. # `unknown' -- same as none, but documents that we really don't know.
  6554. # 'pass_all' -- all dependencies passed with no checks.
  6555. # 'test_compile' -- check by making test program.
  6556. # 'file_magic [[regex]]' -- check by looking for files in library path
  6557. # which responds to the $file_magic_cmd with a given extended regex.
  6558. # If you have `file' or equivalent on your system and you're not sure
  6559. # whether `pass_all' will *always* work, you probably want this one.
  6560. case $host_os in
  6561. aix4* | aix5*)
  6562. lt_cv_deplibs_check_method=pass_all
  6563. ;;
  6564. beos*)
  6565. lt_cv_deplibs_check_method=pass_all
  6566. ;;
  6567. bsdi4*)
  6568. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
  6569. lt_cv_file_magic_cmd='/usr/bin/file -L'
  6570. lt_cv_file_magic_test_file=/shlib/libc.so
  6571. ;;
  6572. cygwin* | mingw* | pw32*)
  6573. # win32_libid is a shell function defined in ltmain.sh
  6574. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  6575. lt_cv_file_magic_cmd='win32_libid'
  6576. ;;
  6577. darwin* | rhapsody*)
  6578. # this will be overwritten by pass_all, but leave it in just in case
  6579. lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
  6580. lt_cv_file_magic_cmd='/usr/bin/file -L'
  6581. case "$host_os" in
  6582. rhapsody* | darwin1.[[012]])
  6583. lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
  6584. ;;
  6585. *) # Darwin 1.3 on
  6586. lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
  6587. ;;
  6588. esac
  6589. lt_cv_deplibs_check_method=pass_all
  6590. ;;
  6591. freebsd*)
  6592. if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  6593. case $host_cpu in
  6594. i*86 )
  6595. # Not sure whether the presence of OpenBSD here was a mistake.
  6596. # Let's accept both of them until this is cleared up.
  6597. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
  6598. lt_cv_file_magic_cmd=/usr/bin/file
  6599. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  6600. ;;
  6601. esac
  6602. else
  6603. lt_cv_deplibs_check_method=pass_all
  6604. fi
  6605. ;;
  6606. gnu*)
  6607. lt_cv_deplibs_check_method=pass_all
  6608. ;;
  6609. hpux10.20* | hpux11*)
  6610. lt_cv_file_magic_cmd=/usr/bin/file
  6611. case "$host_cpu" in
  6612. ia64*)
  6613. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
  6614. lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
  6615. ;;
  6616. hppa*64*)
  6617. [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]']
  6618. lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
  6619. ;;
  6620. *)
  6621. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
  6622. lt_cv_file_magic_test_file=/usr/lib/libc.sl
  6623. ;;
  6624. esac
  6625. ;;
  6626. irix5* | irix6* | nonstopux*)
  6627. case $host_os in
  6628. irix5* | nonstopux*)
  6629. # this will be overridden with pass_all, but let us keep it just in case
  6630. lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
  6631. ;;
  6632. *)
  6633. case $LD in
  6634. *-32|*"-32 ") libmagic=32-bit;;
  6635. *-n32|*"-n32 ") libmagic=N32;;
  6636. *-64|*"-64 ") libmagic=64-bit;;
  6637. *) libmagic=never-match;;
  6638. esac
  6639. # this will be overridden with pass_all, but let us keep it just in case
  6640. lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
  6641. ;;
  6642. esac
  6643. lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
  6644. lt_cv_deplibs_check_method=pass_all
  6645. ;;
  6646. # This must be Linux ELF.
  6647. linux*)
  6648. case $host_cpu in
  6649. alpha* | hppa* | i*86 | ia64* | m68* | mips* | powerpc* | sparc* | s390* | sh* | x86_64* )
  6650. lt_cv_deplibs_check_method=pass_all ;;
  6651. # the debian people say, arm and glibc 2.3.1 works for them with pass_all
  6652. arm* )
  6653. lt_cv_deplibs_check_method=pass_all ;;
  6654. *)
  6655. # glibc up to 2.1.1 does not perform some relocations on ARM
  6656. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
  6657. esac
  6658. lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
  6659. ;;
  6660. netbsd*)
  6661. if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  6662. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  6663. else
  6664. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
  6665. fi
  6666. ;;
  6667. newos6*)
  6668. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
  6669. lt_cv_file_magic_cmd=/usr/bin/file
  6670. lt_cv_file_magic_test_file=/usr/lib/libnls.so
  6671. ;;
  6672. nto-qnx*)
  6673. lt_cv_deplibs_check_method=unknown
  6674. ;;
  6675. openbsd*)
  6676. lt_cv_file_magic_cmd=/usr/bin/file
  6677. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  6678. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  6679. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
  6680. else
  6681. lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
  6682. fi
  6683. ;;
  6684. osf3* | osf4* | osf5*)
  6685. # this will be overridden with pass_all, but let us keep it just in case
  6686. lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
  6687. lt_cv_file_magic_test_file=/shlib/libc.so
  6688. lt_cv_deplibs_check_method=pass_all
  6689. ;;
  6690. sco3.2v5*)
  6691. lt_cv_deplibs_check_method=pass_all
  6692. ;;
  6693. solaris*)
  6694. lt_cv_deplibs_check_method=pass_all
  6695. lt_cv_file_magic_test_file=/lib/libc.so
  6696. ;;
  6697. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  6698. case $host_vendor in
  6699. motorola)
  6700. 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]]'
  6701. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  6702. ;;
  6703. ncr)
  6704. lt_cv_deplibs_check_method=pass_all
  6705. ;;
  6706. sequent)
  6707. lt_cv_file_magic_cmd='/bin/file'
  6708. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
  6709. ;;
  6710. sni)
  6711. lt_cv_file_magic_cmd='/bin/file'
  6712. lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
  6713. lt_cv_file_magic_test_file=/lib/libc.so
  6714. ;;
  6715. siemens)
  6716. lt_cv_deplibs_check_method=pass_all
  6717. ;;
  6718. esac
  6719. ;;
  6720. sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
  6721. lt_cv_deplibs_check_method=pass_all
  6722. ;;
  6723. esac
  6724. ])
  6725. file_magic_cmd=$lt_cv_file_magic_cmd
  6726. deplibs_check_method=$lt_cv_deplibs_check_method
  6727. test -z "$deplibs_check_method" && deplibs_check_method=unknown
  6728. ])# AC_DEPLIBS_CHECK_METHOD
  6729. # AC_PROG_NM
  6730. # ----------
  6731. # find the pathname to a BSD-compatible name lister
  6732. AC_DEFUN([AC_PROG_NM],
  6733. [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
  6734. [if test -n "$NM"; then
  6735. # Let the user override the test.
  6736. lt_cv_path_NM="$NM"
  6737. else
  6738. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  6739. for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
  6740. IFS="$lt_save_ifs"
  6741. test -z "$ac_dir" && ac_dir=.
  6742. tmp_nm="$ac_dir/${ac_tool_prefix}nm"
  6743. if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
  6744. # Check to see if the nm accepts a BSD-compat flag.
  6745. # Adding the `sed 1q' prevents false positives on HP-UX, which says:
  6746. # nm: unknown option "B" ignored
  6747. # Tru64's nm complains that /dev/null is an invalid object file
  6748. case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
  6749. */dev/null* | *'Invalid file or object type'*)
  6750. lt_cv_path_NM="$tmp_nm -B"
  6751. break
  6752. ;;
  6753. *)
  6754. case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
  6755. */dev/null*)
  6756. lt_cv_path_NM="$tmp_nm -p"
  6757. break
  6758. ;;
  6759. *)
  6760. lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
  6761. continue # so that we can try to find one that supports BSD flags
  6762. ;;
  6763. esac
  6764. esac
  6765. fi
  6766. done
  6767. IFS="$lt_save_ifs"
  6768. test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
  6769. fi])
  6770. NM="$lt_cv_path_NM"
  6771. ])# AC_PROG_NM
  6772. # AC_CHECK_LIBM
  6773. # -------------
  6774. # check for math library
  6775. AC_DEFUN([AC_CHECK_LIBM],
  6776. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  6777. LIBM=
  6778. case $host in
  6779. *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
  6780. # These system don't have libm, or don't need it
  6781. ;;
  6782. *-ncr-sysv4.3*)
  6783. AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
  6784. AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
  6785. ;;
  6786. *)
  6787. AC_CHECK_LIB(m, cos, LIBM="-lm")
  6788. ;;
  6789. esac
  6790. ])# AC_CHECK_LIBM
  6791. # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
  6792. # -----------------------------------
  6793. # sets LIBLTDL to the link flags for the libltdl convenience library and
  6794. # LTDLINCL to the include flags for the libltdl header and adds
  6795. # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
  6796. # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
  6797. # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
  6798. # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
  6799. # '${top_srcdir}/' (note the single quotes!). If your package is not
  6800. # flat and you're not using automake, define top_builddir and
  6801. # top_srcdir appropriately in the Makefiles.
  6802. AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
  6803. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  6804. case $enable_ltdl_convenience in
  6805. no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
  6806. "") enable_ltdl_convenience=yes
  6807. ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
  6808. esac
  6809. LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
  6810. LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
  6811. # For backwards non-gettext consistent compatibility...
  6812. INCLTDL="$LTDLINCL"
  6813. ])# AC_LIBLTDL_CONVENIENCE
  6814. # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
  6815. # -----------------------------------
  6816. # sets LIBLTDL to the link flags for the libltdl installable library and
  6817. # LTDLINCL to the include flags for the libltdl header and adds
  6818. # --enable-ltdl-install to the configure arguments. Note that LIBLTDL
  6819. # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
  6820. # DIRECTORY is not provided and an installed libltdl is not found, it is
  6821. # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
  6822. # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
  6823. # quotes!). If your package is not flat and you're not using automake,
  6824. # define top_builddir and top_srcdir appropriately in the Makefiles.
  6825. # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
  6826. AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
  6827. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  6828. AC_CHECK_LIB(ltdl, lt_dlinit,
  6829. [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
  6830. [if test x"$enable_ltdl_install" = xno; then
  6831. AC_MSG_WARN([libltdl not installed, but installation disabled])
  6832. else
  6833. enable_ltdl_install=yes
  6834. fi
  6835. ])
  6836. if test x"$enable_ltdl_install" = x"yes"; then
  6837. ac_configure_args="$ac_configure_args --enable-ltdl-install"
  6838. LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
  6839. LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
  6840. else
  6841. ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
  6842. LIBLTDL="-lltdl"
  6843. LTDLINCL=
  6844. fi
  6845. # For backwards non-gettext consistent compatibility...
  6846. INCLTDL="$LTDLINCL"
  6847. ])# AC_LIBLTDL_INSTALLABLE
  6848. # AC_LIBTOOL_CXX
  6849. # --------------
  6850. # enable support for C++ libraries
  6851. AC_DEFUN([AC_LIBTOOL_CXX],
  6852. [AC_REQUIRE([_LT_AC_LANG_CXX])
  6853. ])# AC_LIBTOOL_CXX
  6854. # _LT_AC_LANG_CXX
  6855. # ---------------
  6856. AC_DEFUN([_LT_AC_LANG_CXX],
  6857. [AC_REQUIRE([AC_PROG_CXX])
  6858. AC_REQUIRE([AC_PROG_CXXCPP])
  6859. _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
  6860. ])# _LT_AC_LANG_CXX
  6861. # AC_LIBTOOL_F77
  6862. # --------------
  6863. # enable support for Fortran 77 libraries
  6864. AC_DEFUN([AC_LIBTOOL_F77],
  6865. [AC_REQUIRE([_LT_AC_LANG_F77])
  6866. ])# AC_LIBTOOL_F77
  6867. # _LT_AC_LANG_F77
  6868. # ---------------
  6869. AC_DEFUN([_LT_AC_LANG_F77],
  6870. [AC_REQUIRE([AC_PROG_F77])
  6871. _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
  6872. ])# _LT_AC_LANG_F77
  6873. # AC_LIBTOOL_GCJ
  6874. # --------------
  6875. # enable support for GCJ libraries
  6876. AC_DEFUN([AC_LIBTOOL_GCJ],
  6877. [AC_REQUIRE([_LT_AC_LANG_GCJ])
  6878. ])# AC_LIBTOOL_GCJ
  6879. # _LT_AC_LANG_GCJ
  6880. # ---------------
  6881. AC_DEFUN([_LT_AC_LANG_GCJ],
  6882. [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
  6883. [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
  6884. [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
  6885. [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
  6886. [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
  6887. [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
  6888. _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
  6889. ])# _LT_AC_LANG_GCJ
  6890. # AC_LIBTOOL_RC
  6891. # --------------
  6892. # enable support for Windows resource files
  6893. AC_DEFUN([AC_LIBTOOL_RC],
  6894. [AC_REQUIRE([LT_AC_PROG_RC])
  6895. _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
  6896. ])# AC_LIBTOOL_RC
  6897. # AC_LIBTOOL_LANG_C_CONFIG
  6898. # ------------------------
  6899. # Ensure that the configuration vars for the C compiler are
  6900. # suitably defined. Those variables are subsequently used by
  6901. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  6902. AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
  6903. AC_DEFUN([_LT_AC_LANG_C_CONFIG],
  6904. [lt_save_CC="$CC"
  6905. AC_LANG_PUSH(C)
  6906. # Source file extension for C test sources.
  6907. ac_ext=c
  6908. # Object file extension for compiled C test sources.
  6909. objext=o
  6910. _LT_AC_TAGVAR(objext, $1)=$objext
  6911. # Code to be used in simple compile tests
  6912. lt_simple_compile_test_code="int some_variable = 0;\n"
  6913. # Code to be used in simple link tests
  6914. lt_simple_link_test_code='int main(){return(0);}\n'
  6915. _LT_AC_SYS_COMPILER
  6916. #
  6917. # Check for any special shared library compilation flags.
  6918. #
  6919. _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
  6920. if test "$GCC" = no; then
  6921. case $host_os in
  6922. sco3.2v5*)
  6923. _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
  6924. ;;
  6925. esac
  6926. fi
  6927. if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
  6928. AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
  6929. if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ ]]" >/dev/null; then :
  6930. else
  6931. AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
  6932. _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
  6933. fi
  6934. fi
  6935. #
  6936. # Check to make sure the static flag actually works.
  6937. #
  6938. AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
  6939. _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
  6940. $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
  6941. [],
  6942. [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
  6943. ## CAVEAT EMPTOR:
  6944. ## There is no encapsulation within the following macros, do not change
  6945. ## the running order or otherwise move them around unless you know exactly
  6946. ## what you are doing...
  6947. AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
  6948. AC_LIBTOOL_PROG_COMPILER_PIC($1)
  6949. AC_LIBTOOL_PROG_CC_C_O($1)
  6950. AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
  6951. AC_LIBTOOL_PROG_LD_SHLIBS($1)
  6952. AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  6953. AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  6954. AC_LIBTOOL_SYS_LIB_STRIP
  6955. AC_LIBTOOL_DLOPEN_SELF($1)
  6956. # Report which librarie types wil actually be built
  6957. AC_MSG_CHECKING([if libtool supports shared libraries])
  6958. AC_MSG_RESULT([$can_build_shared])
  6959. AC_MSG_CHECKING([whether to build shared libraries])
  6960. test "$can_build_shared" = "no" && enable_shared=no
  6961. # On AIX, shared libraries and static libraries use the same namespace, and
  6962. # are all built from PIC.
  6963. case "$host_os" in
  6964. aix3*)
  6965. test "$enable_shared" = yes && enable_static=no
  6966. if test -n "$RANLIB"; then
  6967. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  6968. postinstall_cmds='$RANLIB $lib'
  6969. fi
  6970. ;;
  6971. aix4*)
  6972. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  6973. test "$enable_shared" = yes && enable_static=no
  6974. fi
  6975. ;;
  6976. darwin* | rhapsody*)
  6977. if test "$GCC" = yes; then
  6978. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  6979. case "$host_os" in
  6980. rhapsody* | darwin1.[[012]])
  6981. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
  6982. ;;
  6983. *) # Darwin 1.3 on
  6984. test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
  6985. ;;
  6986. esac
  6987. output_verbose_link_cmd='echo'
  6988. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
  6989. _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
  6990. # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
  6991. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  6992. _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  6993. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  6994. _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
  6995. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  6996. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
  6997. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  6998. else
  6999. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7000. fi
  7001. ;;
  7002. esac
  7003. AC_MSG_RESULT([$enable_shared])
  7004. AC_MSG_CHECKING([whether to build static libraries])
  7005. # Make sure either enable_shared or enable_static is yes.
  7006. test "$enable_shared" = yes || enable_static=yes
  7007. AC_MSG_RESULT([$enable_static])
  7008. AC_LIBTOOL_CONFIG($1)
  7009. AC_LANG_POP
  7010. CC="$lt_save_CC"
  7011. ])# AC_LIBTOOL_LANG_C_CONFIG
  7012. # AC_LIBTOOL_LANG_CXX_CONFIG
  7013. # --------------------------
  7014. # Ensure that the configuration vars for the C compiler are
  7015. # suitably defined. Those variables are subsequently used by
  7016. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  7017. AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
  7018. AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
  7019. [AC_LANG_PUSH(C++)
  7020. AC_REQUIRE([AC_PROG_CXX])
  7021. AC_REQUIRE([AC_PROG_CXXCPP])
  7022. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  7023. _LT_AC_TAGVAR(allow_undefined_flag, $1)=
  7024. _LT_AC_TAGVAR(always_export_symbols, $1)=no
  7025. _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
  7026. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
  7027. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  7028. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
  7029. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  7030. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  7031. _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
  7032. _LT_AC_TAGVAR(hardcode_automatic, $1)=no
  7033. _LT_AC_TAGVAR(module_cmds, $1)=
  7034. _LT_AC_TAGVAR(module_expsym_cmds, $1)=
  7035. _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
  7036. _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7037. _LT_AC_TAGVAR(no_undefined_flag, $1)=
  7038. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  7039. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  7040. # Dependencies to place before and after the object being linked:
  7041. _LT_AC_TAGVAR(predep_objects, $1)=
  7042. _LT_AC_TAGVAR(postdep_objects, $1)=
  7043. _LT_AC_TAGVAR(predeps, $1)=
  7044. _LT_AC_TAGVAR(postdeps, $1)=
  7045. _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
  7046. # Source file extension for C++ test sources.
  7047. ac_ext=cc
  7048. # Object file extension for compiled C++ test sources.
  7049. objext=o
  7050. _LT_AC_TAGVAR(objext, $1)=$objext
  7051. # Code to be used in simple compile tests
  7052. lt_simple_compile_test_code="int some_variable = 0;\n"
  7053. # Code to be used in simple link tests
  7054. lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
  7055. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7056. _LT_AC_SYS_COMPILER
  7057. # Allow CC to be a program name with arguments.
  7058. lt_save_CC=$CC
  7059. lt_save_LD=$LD
  7060. lt_save_GCC=$GCC
  7061. GCC=$GXX
  7062. lt_save_with_gnu_ld=$with_gnu_ld
  7063. lt_save_path_LD=$lt_cv_path_LD
  7064. if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
  7065. lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
  7066. else
  7067. unset lt_cv_prog_gnu_ld
  7068. fi
  7069. if test -n "${lt_cv_path_LDCXX+set}"; then
  7070. lt_cv_path_LD=$lt_cv_path_LDCXX
  7071. else
  7072. unset lt_cv_path_LD
  7073. fi
  7074. test -z "${LDCXX+set}" || LD=$LDCXX
  7075. CC=${CXX-"c++"}
  7076. compiler=$CC
  7077. _LT_AC_TAGVAR(compiler, $1)=$CC
  7078. cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
  7079. # We don't want -fno-exception wen compiling C++ code, so set the
  7080. # no_builtin_flag separately
  7081. if test "$GXX" = yes; then
  7082. _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  7083. else
  7084. _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  7085. fi
  7086. if test "$GXX" = yes; then
  7087. # Set up default GNU C++ configuration
  7088. AC_PROG_LD
  7089. # Check if GNU C++ uses GNU ld as the underlying linker, since the
  7090. # archiving commands below assume that GNU ld is being used.
  7091. if test "$with_gnu_ld" = yes; then
  7092. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  7093. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  7094. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
  7095. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  7096. # If archive_cmds runs LD, not CC, wlarc should be empty
  7097. # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
  7098. # investigate it a little bit more. (MM)
  7099. wlarc='${wl}'
  7100. # ancient GNU ld didn't support --whole-archive et. al.
  7101. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
  7102. grep 'no-whole-archive' > /dev/null; then
  7103. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  7104. else
  7105. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  7106. fi
  7107. else
  7108. with_gnu_ld=no
  7109. wlarc=
  7110. # A generic and very simple default shared library creation
  7111. # command for GNU C++ for the case where it uses the native
  7112. # linker, instead of GNU ld. If possible, this setting should
  7113. # overridden to take advantage of the native linker features on
  7114. # the platform it is being used on.
  7115. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  7116. fi
  7117. # Commands to make compiler produce verbose output that lists
  7118. # what "hidden" libraries, object files and flags are used when
  7119. # linking a shared library.
  7120. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
  7121. else
  7122. GXX=no
  7123. with_gnu_ld=no
  7124. wlarc=
  7125. fi
  7126. # PORTME: fill in a description of your system's C++ link characteristics
  7127. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  7128. _LT_AC_TAGVAR(ld_shlibs, $1)=yes
  7129. case $host_os in
  7130. aix3*)
  7131. # FIXME: insert proper C++ library support
  7132. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7133. ;;
  7134. aix4* | aix5*)
  7135. if test "$host_cpu" = ia64; then
  7136. # On IA64, the linker does run time linking by default, so we don't
  7137. # have to do anything special.
  7138. aix_use_runtimelinking=no
  7139. exp_sym_flag='-Bexport'
  7140. no_entry_flag=""
  7141. else
  7142. # KDE requires run time linking. Make it the default.
  7143. aix_use_runtimelinking=yes
  7144. exp_sym_flag='-bexport'
  7145. no_entry_flag='-bnoentry'
  7146. fi
  7147. # When large executables or shared objects are built, AIX ld can
  7148. # have problems creating the table of contents. If linking a library
  7149. # or program results in "error TOC overflow" add -mminimal-toc to
  7150. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  7151. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  7152. _LT_AC_TAGVAR(archive_cmds, $1)=''
  7153. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  7154. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
  7155. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  7156. if test "$GXX" = yes; then
  7157. case $host_os in aix4.[012]|aix4.[012].*)
  7158. # We only want to do this on AIX 4.2 and lower, the check
  7159. # below for broken collect2 doesn't work under 4.3+
  7160. collect2name=`${CC} -print-prog-name=collect2`
  7161. if test -f "$collect2name" && \
  7162. strings "$collect2name" | grep resolve_lib_name >/dev/null
  7163. then
  7164. # We have reworked collect2
  7165. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  7166. else
  7167. # We have old collect2
  7168. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
  7169. # It fails to find uninstalled libraries when the uninstalled
  7170. # path is not listed in the libpath. Setting hardcode_minus_L
  7171. # to unsupported forces relinking
  7172. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  7173. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  7174. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  7175. fi
  7176. esac
  7177. shared_flag='-shared'
  7178. else
  7179. # not using gcc
  7180. if test "$host_cpu" = ia64; then
  7181. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  7182. # chokes on -Wl,-G. The following line is correct:
  7183. shared_flag='-G'
  7184. else
  7185. if test "$aix_use_runtimelinking" = yes; then
  7186. shared_flag='-qmkshrobj ${wl}-G'
  7187. else
  7188. shared_flag='-qmkshrobj'
  7189. fi
  7190. fi
  7191. fi
  7192. # Let the compiler handle the export list.
  7193. _LT_AC_TAGVAR(always_export_symbols, $1)=no
  7194. if test "$aix_use_runtimelinking" = yes; then
  7195. # Warning - without using the other runtime loading flags (-brtl),
  7196. # -berok will link without error, but may produce a broken library.
  7197. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
  7198. # Determine the default libpath from the value encoded in an empty executable.
  7199. _LT_AC_SYS_LIBPATH_AIX
  7200. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  7201. _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
  7202. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
  7203. else
  7204. if test "$host_cpu" = ia64; then
  7205. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  7206. _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  7207. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
  7208. else
  7209. # Determine the default libpath from the value encoded in an empty executable.
  7210. _LT_AC_SYS_LIBPATH_AIX
  7211. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  7212. # Warning - without using the other run time loading flags,
  7213. # -berok will link without error, but may produce a broken library.
  7214. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  7215. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  7216. # -bexpall does not export symbols beginning with underscore (_)
  7217. _LT_AC_TAGVAR(always_export_symbols, $1)=yes
  7218. # Exported symbols can be pulled into shared objects from archives
  7219. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
  7220. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
  7221. # This is similar to how AIX traditionally builds it's shared libraries.
  7222. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
  7223. fi
  7224. fi
  7225. ;;
  7226. chorus*)
  7227. case $cc_basename in
  7228. *)
  7229. # FIXME: insert proper C++ library support
  7230. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7231. ;;
  7232. esac
  7233. ;;
  7234. cygwin* | mingw* | pw32*)
  7235. # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  7236. # as there is no search path for DLLs.
  7237. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  7238. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  7239. _LT_AC_TAGVAR(always_export_symbols, $1)=no
  7240. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  7241. if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
  7242. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
  7243. # If the export-symbols file already is a .def file (1st line
  7244. # is EXPORTS), use it as is; otherwise, prepend...
  7245. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  7246. cp $export_symbols $output_objdir/$soname.def;
  7247. else
  7248. echo EXPORTS > $output_objdir/$soname.def;
  7249. cat $export_symbols >> $output_objdir/$soname.def;
  7250. fi~
  7251. $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
  7252. else
  7253. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7254. fi
  7255. ;;
  7256. darwin* | rhapsody*)
  7257. if test "$GXX" = yes; then
  7258. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  7259. case "$host_os" in
  7260. rhapsody* | darwin1.[[012]])
  7261. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
  7262. ;;
  7263. *) # Darwin 1.3 on
  7264. test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
  7265. ;;
  7266. esac
  7267. lt_int_apple_cc_single_mod=no
  7268. output_verbose_link_cmd='echo'
  7269. if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
  7270. lt_int_apple_cc_single_mod=yes
  7271. fi
  7272. if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
  7273. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
  7274. else
  7275. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -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'
  7276. fi
  7277. _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
  7278. # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
  7279. if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
  7280. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  7281. else
  7282. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  7283. fi
  7284. _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  7285. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  7286. _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
  7287. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  7288. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
  7289. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  7290. else
  7291. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7292. fi
  7293. ;;
  7294. dgux*)
  7295. case $cc_basename in
  7296. ec++)
  7297. # FIXME: insert proper C++ library support
  7298. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7299. ;;
  7300. ghcx)
  7301. # Green Hills C++ Compiler
  7302. # FIXME: insert proper C++ library support
  7303. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7304. ;;
  7305. *)
  7306. # FIXME: insert proper C++ library support
  7307. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7308. ;;
  7309. esac
  7310. ;;
  7311. freebsd[12]*)
  7312. # C++ shared libraries reported to be fairly broken before switch to ELF
  7313. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7314. ;;
  7315. freebsd-elf*)
  7316. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  7317. ;;
  7318. freebsd*)
  7319. # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
  7320. # conventions
  7321. _LT_AC_TAGVAR(ld_shlibs, $1)=yes
  7322. ;;
  7323. gnu*)
  7324. ;;
  7325. hpux9*)
  7326. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  7327. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  7328. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  7329. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  7330. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  7331. # but as the default
  7332. # location of the library.
  7333. case $cc_basename in
  7334. CC)
  7335. # FIXME: insert proper C++ library support
  7336. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7337. ;;
  7338. aCC)
  7339. _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  7340. # Commands to make compiler produce verbose output that lists
  7341. # what "hidden" libraries, object files and flags are used when
  7342. # linking a shared library.
  7343. #
  7344. # There doesn't appear to be a way to prevent this compiler from
  7345. # explicitly linking system object files so we need to strip them
  7346. # from the output so that they don't get included in the library
  7347. # dependencies.
  7348. 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 $list'
  7349. ;;
  7350. *)
  7351. if test "$GXX" = yes; then
  7352. _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  7353. else
  7354. # FIXME: insert proper C++ library support
  7355. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7356. fi
  7357. ;;
  7358. esac
  7359. ;;
  7360. hpux10*|hpux11*)
  7361. if test $with_gnu_ld = no; then
  7362. case "$host_cpu" in
  7363. hppa*64*)
  7364. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  7365. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
  7366. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  7367. ;;
  7368. ia64*)
  7369. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  7370. ;;
  7371. *)
  7372. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  7373. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  7374. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  7375. ;;
  7376. esac
  7377. fi
  7378. case "$host_cpu" in
  7379. hppa*64*)
  7380. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  7381. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  7382. ;;
  7383. ia64*)
  7384. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  7385. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  7386. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  7387. # but as the default
  7388. # location of the library.
  7389. ;;
  7390. *)
  7391. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  7392. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  7393. # but as the default
  7394. # location of the library.
  7395. ;;
  7396. esac
  7397. case $cc_basename in
  7398. CC)
  7399. # FIXME: insert proper C++ library support
  7400. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7401. ;;
  7402. aCC)
  7403. case "$host_cpu" in
  7404. hppa*64*|ia64*)
  7405. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
  7406. ;;
  7407. *)
  7408. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  7409. ;;
  7410. esac
  7411. # Commands to make compiler produce verbose output that lists
  7412. # what "hidden" libraries, object files and flags are used when
  7413. # linking a shared library.
  7414. #
  7415. # There doesn't appear to be a way to prevent this compiler from
  7416. # explicitly linking system object files so we need to strip them
  7417. # from the output so that they don't get included in the library
  7418. # dependencies.
  7419. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
  7420. ;;
  7421. *)
  7422. if test "$GXX" = yes; then
  7423. if test $with_gnu_ld = no; then
  7424. case "$host_cpu" in
  7425. ia64*|hppa*64*)
  7426. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
  7427. ;;
  7428. *)
  7429. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  7430. ;;
  7431. esac
  7432. fi
  7433. else
  7434. # FIXME: insert proper C++ library support
  7435. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7436. fi
  7437. ;;
  7438. esac
  7439. ;;
  7440. irix5* | irix6*)
  7441. case $cc_basename in
  7442. CC)
  7443. # SGI C++
  7444. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
  7445. # Archives containing C++ object files must be created using
  7446. # "CC -ar", where "CC" is the IRIX C++ compiler. This is
  7447. # necessary to make sure instantiated templates are included
  7448. # in the archive.
  7449. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
  7450. ;;
  7451. *)
  7452. if test "$GXX" = yes; then
  7453. if test "$with_gnu_ld" = no; then
  7454. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
  7455. else
  7456. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
  7457. fi
  7458. fi
  7459. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  7460. ;;
  7461. esac
  7462. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  7463. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  7464. ;;
  7465. linux*)
  7466. case $cc_basename in
  7467. KCC)
  7468. # Kuck and Associates, Inc. (KAI) C++ Compiler
  7469. # KCC will only create a shared library if the output file
  7470. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  7471. # to its proper name (with version) after linking.
  7472. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
  7473. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
  7474. # Commands to make compiler produce verbose output that lists
  7475. # what "hidden" libraries, object files and flags are used when
  7476. # linking a shared library.
  7477. #
  7478. # There doesn't appear to be a way to prevent this compiler from
  7479. # explicitly linking system object files so we need to strip them
  7480. # from the output so that they don't get included in the library
  7481. # dependencies.
  7482. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
  7483. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
  7484. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  7485. # Archives containing C++ object files must be created using
  7486. # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  7487. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  7488. ;;
  7489. icpc)
  7490. # Intel C++
  7491. with_gnu_ld=yes
  7492. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  7493. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  7494. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  7495. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  7496. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  7497. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  7498. ;;
  7499. cxx)
  7500. # Compaq C++
  7501. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  7502. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
  7503. runpath_var=LD_RUN_PATH
  7504. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  7505. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  7506. # Commands to make compiler produce verbose output that lists
  7507. # what "hidden" libraries, object files and flags are used when
  7508. # linking a shared library.
  7509. #
  7510. # There doesn't appear to be a way to prevent this compiler from
  7511. # explicitly linking system object files so we need to strip them
  7512. # from the output so that they don't get included in the library
  7513. # dependencies.
  7514. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
  7515. ;;
  7516. esac
  7517. ;;
  7518. lynxos*)
  7519. # FIXME: insert proper C++ library support
  7520. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7521. ;;
  7522. m88k*)
  7523. # FIXME: insert proper C++ library support
  7524. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7525. ;;
  7526. mvs*)
  7527. case $cc_basename in
  7528. cxx)
  7529. # FIXME: insert proper C++ library support
  7530. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7531. ;;
  7532. *)
  7533. # FIXME: insert proper C++ library support
  7534. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7535. ;;
  7536. esac
  7537. ;;
  7538. netbsd*)
  7539. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  7540. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
  7541. wlarc=
  7542. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  7543. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  7544. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  7545. fi
  7546. # Workaround some broken pre-1.5 toolchains
  7547. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
  7548. ;;
  7549. osf3*)
  7550. case $cc_basename in
  7551. KCC)
  7552. # Kuck and Associates, Inc. (KAI) C++ Compiler
  7553. # KCC will only create a shared library if the output file
  7554. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  7555. # to its proper name (with version) after linking.
  7556. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
  7557. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  7558. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  7559. # Archives containing C++ object files must be created using
  7560. # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  7561. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  7562. ;;
  7563. RCC)
  7564. # Rational C++ 2.4.1
  7565. # FIXME: insert proper C++ library support
  7566. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7567. ;;
  7568. cxx)
  7569. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  7570. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
  7571. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  7572. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  7573. # Commands to make compiler produce verbose output that lists
  7574. # what "hidden" libraries, object files and flags are used when
  7575. # linking a shared library.
  7576. #
  7577. # There doesn't appear to be a way to prevent this compiler from
  7578. # explicitly linking system object files so we need to strip them
  7579. # from the output so that they don't get included in the library
  7580. # dependencies.
  7581. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
  7582. ;;
  7583. *)
  7584. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  7585. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  7586. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
  7587. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  7588. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  7589. # Commands to make compiler produce verbose output that lists
  7590. # what "hidden" libraries, object files and flags are used when
  7591. # linking a shared library.
  7592. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
  7593. else
  7594. # FIXME: insert proper C++ library support
  7595. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7596. fi
  7597. ;;
  7598. esac
  7599. ;;
  7600. osf4* | osf5*)
  7601. case $cc_basename in
  7602. KCC)
  7603. # Kuck and Associates, Inc. (KAI) C++ Compiler
  7604. # KCC will only create a shared library if the output file
  7605. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  7606. # to its proper name (with version) after linking.
  7607. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
  7608. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  7609. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  7610. # Archives containing C++ object files must be created using
  7611. # the KAI C++ compiler.
  7612. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
  7613. ;;
  7614. RCC)
  7615. # Rational C++ 2.4.1
  7616. # FIXME: insert proper C++ library support
  7617. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7618. ;;
  7619. cxx)
  7620. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  7621. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
  7622. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
  7623. echo "-hidden">> $lib.exp~
  7624. $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
  7625. $rm $lib.exp'
  7626. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  7627. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  7628. # Commands to make compiler produce verbose output that lists
  7629. # what "hidden" libraries, object files and flags are used when
  7630. # linking a shared library.
  7631. #
  7632. # There doesn't appear to be a way to prevent this compiler from
  7633. # explicitly linking system object files so we need to strip them
  7634. # from the output so that they don't get included in the library
  7635. # dependencies.
  7636. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
  7637. ;;
  7638. *)
  7639. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  7640. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  7641. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
  7642. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  7643. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  7644. # Commands to make compiler produce verbose output that lists
  7645. # what "hidden" libraries, object files and flags are used when
  7646. # linking a shared library.
  7647. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
  7648. else
  7649. # FIXME: insert proper C++ library support
  7650. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7651. fi
  7652. ;;
  7653. esac
  7654. ;;
  7655. psos*)
  7656. # FIXME: insert proper C++ library support
  7657. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7658. ;;
  7659. sco*)
  7660. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  7661. case $cc_basename in
  7662. CC)
  7663. # FIXME: insert proper C++ library support
  7664. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7665. ;;
  7666. *)
  7667. # FIXME: insert proper C++ library support
  7668. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7669. ;;
  7670. esac
  7671. ;;
  7672. sunos4*)
  7673. case $cc_basename in
  7674. CC)
  7675. # Sun C++ 4.x
  7676. # FIXME: insert proper C++ library support
  7677. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7678. ;;
  7679. lcc)
  7680. # Lucid
  7681. # FIXME: insert proper C++ library support
  7682. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7683. ;;
  7684. *)
  7685. # FIXME: insert proper C++ library support
  7686. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7687. ;;
  7688. esac
  7689. ;;
  7690. solaris*)
  7691. case $cc_basename in
  7692. CC)
  7693. # Sun C++ 4.2, 5.x and Centerline C++
  7694. _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  7695. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  7696. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  7697. $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
  7698. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  7699. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  7700. case $host_os in
  7701. solaris2.[0-5] | solaris2.[0-5].*) ;;
  7702. *)
  7703. # The C++ compiler is used as linker so we must use $wl
  7704. # flag to pass the commands to the underlying system
  7705. # linker.
  7706. # Supported since Solaris 2.6 (maybe 2.5.1?)
  7707. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
  7708. ;;
  7709. esac
  7710. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  7711. # Commands to make compiler produce verbose output that lists
  7712. # what "hidden" libraries, object files and flags are used when
  7713. # linking a shared library.
  7714. #
  7715. # There doesn't appear to be a way to prevent this compiler from
  7716. # explicitly linking system object files so we need to strip them
  7717. # from the output so that they don't get included in the library
  7718. # dependencies.
  7719. output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
  7720. # Archives containing C++ object files must be created using
  7721. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  7722. # necessary to make sure instantiated templates are included
  7723. # in the archive.
  7724. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  7725. ;;
  7726. gcx)
  7727. # Green Hills C++ Compiler
  7728. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  7729. # The C++ compiler must be used to create the archive.
  7730. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
  7731. ;;
  7732. *)
  7733. # GNU C++ compiler with Solaris linker
  7734. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  7735. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
  7736. if $CC --version | grep -v '^2\.7' > /dev/null; then
  7737. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  7738. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  7739. $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
  7740. # Commands to make compiler produce verbose output that lists
  7741. # what "hidden" libraries, object files and flags are used when
  7742. # linking a shared library.
  7743. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
  7744. else
  7745. # g++ 2.7 appears to require `-G' NOT `-shared' on this
  7746. # platform.
  7747. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  7748. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  7749. $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
  7750. # Commands to make compiler produce verbose output that lists
  7751. # what "hidden" libraries, object files and flags are used when
  7752. # linking a shared library.
  7753. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
  7754. fi
  7755. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
  7756. fi
  7757. ;;
  7758. esac
  7759. ;;
  7760. sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
  7761. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  7762. ;;
  7763. tandem*)
  7764. case $cc_basename in
  7765. NCC)
  7766. # NonStop-UX NCC 3.20
  7767. # FIXME: insert proper C++ library support
  7768. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7769. ;;
  7770. *)
  7771. # FIXME: insert proper C++ library support
  7772. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7773. ;;
  7774. esac
  7775. ;;
  7776. vxworks*)
  7777. # FIXME: insert proper C++ library support
  7778. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7779. ;;
  7780. *)
  7781. # FIXME: insert proper C++ library support
  7782. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7783. ;;
  7784. esac
  7785. AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
  7786. test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  7787. _LT_AC_TAGVAR(GCC, $1)="$GXX"
  7788. _LT_AC_TAGVAR(LD, $1)="$LD"
  7789. ## CAVEAT EMPTOR:
  7790. ## There is no encapsulation within the following macros, do not change
  7791. ## the running order or otherwise move them around unless you know exactly
  7792. ## what you are doing...
  7793. AC_LIBTOOL_POSTDEP_PREDEP($1)
  7794. AC_LIBTOOL_PROG_COMPILER_PIC($1)
  7795. AC_LIBTOOL_PROG_CC_C_O($1)
  7796. AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
  7797. AC_LIBTOOL_PROG_LD_SHLIBS($1)
  7798. AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  7799. AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  7800. AC_LIBTOOL_SYS_LIB_STRIP
  7801. AC_LIBTOOL_DLOPEN_SELF($1)
  7802. AC_LIBTOOL_CONFIG($1)
  7803. AC_LANG_POP
  7804. CC=$lt_save_CC
  7805. LDCXX=$LD
  7806. LD=$lt_save_LD
  7807. GCC=$lt_save_GCC
  7808. with_gnu_ldcxx=$with_gnu_ld
  7809. with_gnu_ld=$lt_save_with_gnu_ld
  7810. lt_cv_path_LDCXX=$lt_cv_path_LD
  7811. lt_cv_path_LD=$lt_save_path_LD
  7812. lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
  7813. lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
  7814. ])# AC_LIBTOOL_LANG_CXX_CONFIG
  7815. # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
  7816. # ------------------------
  7817. # Figure out "hidden" library dependencies from verbose
  7818. # compiler output when linking a shared library.
  7819. # Parse the compiler output and extract the necessary
  7820. # objects, libraries and library flags.
  7821. AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
  7822. dnl we can't use the lt_simple_compile_test_code here,
  7823. dnl because it contains code intended for an executable,
  7824. dnl not a library. It's possible we should let each
  7825. dnl tag define a new lt_????_link_test_code variable,
  7826. dnl but it's only used here...
  7827. ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
  7828. int a;
  7829. void foo (void) { a = 0; }
  7830. EOF
  7831. ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
  7832. class Foo
  7833. {
  7834. public:
  7835. Foo (void) { a = 0; }
  7836. private:
  7837. int a;
  7838. };
  7839. EOF
  7840. ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
  7841. subroutine foo
  7842. implicit none
  7843. integer*4 a
  7844. a=0
  7845. return
  7846. end
  7847. EOF
  7848. ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
  7849. public class foo {
  7850. private int a;
  7851. public void bar (void) {
  7852. a = 0;
  7853. }
  7854. };
  7855. EOF
  7856. ])
  7857. dnl Parse the compiler output and extract the necessary
  7858. dnl objects, libraries and library flags.
  7859. if AC_TRY_EVAL(ac_compile); then
  7860. # Parse the compiler output and extract the necessary
  7861. # objects, libraries and library flags.
  7862. # Sentinel used to keep track of whether or not we are before
  7863. # the conftest object file.
  7864. pre_test_object_deps_done=no
  7865. # The `*' in the case matches for architectures that use `case' in
  7866. # $output_verbose_cmd can trigger glob expansion during the loop
  7867. # eval without this substitution.
  7868. output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
  7869. for p in `eval $output_verbose_link_cmd`; do
  7870. case $p in
  7871. -L* | -R* | -l*)
  7872. # Some compilers place space between "-{L,R}" and the path.
  7873. # Remove the space.
  7874. if test $p = "-L" \
  7875. || test $p = "-R"; then
  7876. prev=$p
  7877. continue
  7878. else
  7879. prev=
  7880. fi
  7881. if test "$pre_test_object_deps_done" = no; then
  7882. case $p in
  7883. -L* | -R*)
  7884. # Internal compiler library paths should come after those
  7885. # provided the user. The postdeps already come after the
  7886. # user supplied libs so there is no need to process them.
  7887. if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
  7888. _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
  7889. else
  7890. _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
  7891. fi
  7892. ;;
  7893. # The "-l" case would never come before the object being
  7894. # linked, so don't bother handling this case.
  7895. esac
  7896. else
  7897. if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
  7898. _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
  7899. else
  7900. _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
  7901. fi
  7902. fi
  7903. ;;
  7904. *.$objext|*.$libext)
  7905. # This assumes that the test object file only shows up
  7906. # once in the compiler output.
  7907. if test "$p" = "conftest.$objext"; then
  7908. pre_test_object_deps_done=yes
  7909. continue
  7910. fi
  7911. if test "$pre_test_object_deps_done" = no; then
  7912. if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
  7913. _LT_AC_TAGVAR(predep_objects, $1)="$p"
  7914. else
  7915. _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
  7916. fi
  7917. else
  7918. if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
  7919. _LT_AC_TAGVAR(postdep_objects, $1)="$p"
  7920. else
  7921. _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
  7922. fi
  7923. fi
  7924. ;;
  7925. *) ;; # Ignore the rest.
  7926. esac
  7927. done
  7928. # Clean up.
  7929. rm -f a.out a.exe
  7930. else
  7931. echo "libtool.m4: error: problem compiling $1 test program"
  7932. fi
  7933. $rm -f confest.$objext
  7934. case " $_LT_AC_TAGVAR(postdeps, $1) " in
  7935. *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
  7936. esac
  7937. ])# AC_LIBTOOL_POSTDEP_PREDEP
  7938. # AC_LIBTOOL_LANG_F77_CONFIG
  7939. # ------------------------
  7940. # Ensure that the configuration vars for the C compiler are
  7941. # suitably defined. Those variables are subsequently used by
  7942. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  7943. AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
  7944. AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
  7945. [AC_REQUIRE([AC_PROG_F77])
  7946. AC_LANG_PUSH(Fortran 77)
  7947. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  7948. _LT_AC_TAGVAR(allow_undefined_flag, $1)=
  7949. _LT_AC_TAGVAR(always_export_symbols, $1)=no
  7950. _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
  7951. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
  7952. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  7953. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
  7954. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  7955. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  7956. _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
  7957. _LT_AC_TAGVAR(hardcode_automatic, $1)=no
  7958. _LT_AC_TAGVAR(module_cmds, $1)=
  7959. _LT_AC_TAGVAR(module_expsym_cmds, $1)=
  7960. _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
  7961. _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7962. _LT_AC_TAGVAR(no_undefined_flag, $1)=
  7963. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  7964. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  7965. # Source file extension for f77 test sources.
  7966. ac_ext=f
  7967. # Object file extension for compiled f77 test sources.
  7968. objext=o
  7969. _LT_AC_TAGVAR(objext, $1)=$objext
  7970. # Code to be used in simple compile tests
  7971. lt_simple_compile_test_code=" subroutine t\n return\n end\n"
  7972. # Code to be used in simple link tests
  7973. lt_simple_link_test_code=" program t\n end\n"
  7974. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7975. _LT_AC_SYS_COMPILER
  7976. # Allow CC to be a program name with arguments.
  7977. lt_save_CC="$CC"
  7978. CC=${F77-"f77"}
  7979. compiler=$CC
  7980. _LT_AC_TAGVAR(compiler, $1)=$CC
  7981. cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
  7982. AC_MSG_CHECKING([if libtool supports shared libraries])
  7983. AC_MSG_RESULT([$can_build_shared])
  7984. AC_MSG_CHECKING([whether to build shared libraries])
  7985. test "$can_build_shared" = "no" && enable_shared=no
  7986. # On AIX, shared libraries and static libraries use the same namespace, and
  7987. # are all built from PIC.
  7988. case "$host_os" in
  7989. aix3*)
  7990. test "$enable_shared" = yes && enable_static=no
  7991. if test -n "$RANLIB"; then
  7992. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  7993. postinstall_cmds='$RANLIB $lib'
  7994. fi
  7995. ;;
  7996. aix4*)
  7997. test "$enable_shared" = yes && enable_static=no
  7998. ;;
  7999. esac
  8000. AC_MSG_RESULT([$enable_shared])
  8001. AC_MSG_CHECKING([whether to build static libraries])
  8002. # Make sure either enable_shared or enable_static is yes.
  8003. test "$enable_shared" = yes || enable_static=yes
  8004. AC_MSG_RESULT([$enable_static])
  8005. test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  8006. _LT_AC_TAGVAR(GCC, $1)="$G77"
  8007. _LT_AC_TAGVAR(LD, $1)="$LD"
  8008. AC_LIBTOOL_PROG_COMPILER_PIC($1)
  8009. AC_LIBTOOL_PROG_CC_C_O($1)
  8010. AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
  8011. AC_LIBTOOL_PROG_LD_SHLIBS($1)
  8012. AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  8013. AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  8014. AC_LIBTOOL_SYS_LIB_STRIP
  8015. AC_LIBTOOL_CONFIG($1)
  8016. AC_LANG_POP
  8017. CC="$lt_save_CC"
  8018. ])# AC_LIBTOOL_LANG_F77_CONFIG
  8019. # AC_LIBTOOL_LANG_GCJ_CONFIG
  8020. # --------------------------
  8021. # Ensure that the configuration vars for the C compiler are
  8022. # suitably defined. Those variables are subsequently used by
  8023. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  8024. AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
  8025. AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
  8026. [AC_LANG_SAVE
  8027. # Source file extension for Java test sources.
  8028. ac_ext=java
  8029. # Object file extension for compiled Java test sources.
  8030. objext=o
  8031. _LT_AC_TAGVAR(objext, $1)=$objext
  8032. # Code to be used in simple compile tests
  8033. lt_simple_compile_test_code="class foo {}\n"
  8034. # Code to be used in simple link tests
  8035. lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
  8036. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  8037. _LT_AC_SYS_COMPILER
  8038. # Allow CC to be a program name with arguments.
  8039. lt_save_CC="$CC"
  8040. CC=${GCJ-"gcj"}
  8041. compiler=$CC
  8042. _LT_AC_TAGVAR(compiler, $1)=$CC
  8043. # GCJ did not exist at the time GCC didn't implicitly link libc in.
  8044. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  8045. ## CAVEAT EMPTOR:
  8046. ## There is no encapsulation within the following macros, do not change
  8047. ## the running order or otherwise move them around unless you know exactly
  8048. ## what you are doing...
  8049. AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
  8050. AC_LIBTOOL_PROG_COMPILER_PIC($1)
  8051. AC_LIBTOOL_PROG_CC_C_O($1)
  8052. AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
  8053. AC_LIBTOOL_PROG_LD_SHLIBS($1)
  8054. AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  8055. AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  8056. AC_LIBTOOL_SYS_LIB_STRIP
  8057. AC_LIBTOOL_DLOPEN_SELF($1)
  8058. AC_LIBTOOL_CONFIG($1)
  8059. AC_LANG_RESTORE
  8060. CC="$lt_save_CC"
  8061. ])# AC_LIBTOOL_LANG_GCJ_CONFIG
  8062. # AC_LIBTOOL_LANG_RC_CONFIG
  8063. # --------------------------
  8064. # Ensure that the configuration vars for the Windows resource compiler are
  8065. # suitably defined. Those variables are subsequently used by
  8066. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  8067. AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
  8068. AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
  8069. [AC_LANG_SAVE
  8070. # Source file extension for RC test sources.
  8071. ac_ext=rc
  8072. # Object file extension for compiled RC test sources.
  8073. objext=o
  8074. _LT_AC_TAGVAR(objext, $1)=$objext
  8075. # Code to be used in simple compile tests
  8076. lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
  8077. # Code to be used in simple link tests
  8078. lt_simple_link_test_code="$lt_simple_compile_test_code"
  8079. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  8080. _LT_AC_SYS_COMPILER
  8081. # Allow CC to be a program name with arguments.
  8082. lt_save_CC="$CC"
  8083. CC=${RC-"windres"}
  8084. compiler=$CC
  8085. _LT_AC_TAGVAR(compiler, $1)=$CC
  8086. _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  8087. AC_LIBTOOL_CONFIG($1)
  8088. AC_LANG_RESTORE
  8089. CC="$lt_save_CC"
  8090. ])# AC_LIBTOOL_LANG_RC_CONFIG
  8091. # AC_LIBTOOL_CONFIG([TAGNAME])
  8092. # ----------------------------
  8093. # If TAGNAME is not passed, then create an initial libtool script
  8094. # with a default configuration from the untagged config vars. Otherwise
  8095. # add code to config.status for appending the configuration named by
  8096. # TAGNAME from the matching tagged config vars.
  8097. AC_DEFUN([AC_LIBTOOL_CONFIG],
  8098. [# The else clause should only fire when bootstrapping the
  8099. # libtool distribution, otherwise you forgot to ship ltmain.sh
  8100. # with your package, and you will get complaints that there are
  8101. # no rules to generate ltmain.sh.
  8102. if test -f "$ltmain"; then
  8103. # See if we are running on zsh, and set the options which allow our commands through
  8104. # without removal of \ escapes.
  8105. if test -n "${ZSH_VERSION+set}" ; then
  8106. setopt NO_GLOB_SUBST
  8107. fi
  8108. # Now quote all the things that may contain metacharacters while being
  8109. # careful not to overquote the AC_SUBSTed values. We take copies of the
  8110. # variables and quote the copies for generation of the libtool script.
  8111. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \
  8112. libname_spec library_names_spec soname_spec extract_expsyms_cmds \
  8113. old_striplib striplib file_magic_cmd finish_cmds finish_eval \
  8114. deplibs_check_method reload_flag reload_cmds need_locks \
  8115. lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
  8116. lt_cv_sys_global_symbol_to_c_name_address \
  8117. sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
  8118. old_postinstall_cmds old_postuninstall_cmds \
  8119. _LT_AC_TAGVAR(compiler, $1) \
  8120. _LT_AC_TAGVAR(CC, $1) \
  8121. _LT_AC_TAGVAR(LD, $1) \
  8122. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
  8123. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
  8124. _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
  8125. _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
  8126. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
  8127. _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
  8128. _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
  8129. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
  8130. _LT_AC_TAGVAR(old_archive_cmds, $1) \
  8131. _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
  8132. _LT_AC_TAGVAR(predep_objects, $1) \
  8133. _LT_AC_TAGVAR(postdep_objects, $1) \
  8134. _LT_AC_TAGVAR(predeps, $1) \
  8135. _LT_AC_TAGVAR(postdeps, $1) \
  8136. _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
  8137. _LT_AC_TAGVAR(archive_cmds, $1) \
  8138. _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
  8139. _LT_AC_TAGVAR(postinstall_cmds, $1) \
  8140. _LT_AC_TAGVAR(postuninstall_cmds, $1) \
  8141. _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
  8142. _LT_AC_TAGVAR(allow_undefined_flag, $1) \
  8143. _LT_AC_TAGVAR(no_undefined_flag, $1) \
  8144. _LT_AC_TAGVAR(export_symbols_cmds, $1) \
  8145. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
  8146. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
  8147. _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
  8148. _LT_AC_TAGVAR(hardcode_automatic, $1) \
  8149. _LT_AC_TAGVAR(module_cmds, $1) \
  8150. _LT_AC_TAGVAR(module_expsym_cmds, $1) \
  8151. _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
  8152. _LT_AC_TAGVAR(exclude_expsyms, $1) \
  8153. _LT_AC_TAGVAR(include_expsyms, $1); do
  8154. case $var in
  8155. _LT_AC_TAGVAR(old_archive_cmds, $1) | \
  8156. _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
  8157. _LT_AC_TAGVAR(archive_cmds, $1) | \
  8158. _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
  8159. _LT_AC_TAGVAR(module_cmds, $1) | \
  8160. _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
  8161. _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
  8162. _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
  8163. extract_expsyms_cmds | reload_cmds | finish_cmds | \
  8164. postinstall_cmds | postuninstall_cmds | \
  8165. old_postinstall_cmds | old_postuninstall_cmds | \
  8166. sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
  8167. # Double-quote double-evaled strings.
  8168. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
  8169. ;;
  8170. *)
  8171. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
  8172. ;;
  8173. esac
  8174. done
  8175. case $lt_echo in
  8176. *'\[$]0 --fallback-echo"')
  8177. lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
  8178. ;;
  8179. esac
  8180. ifelse([$1], [],
  8181. [cfgfile="${ofile}T"
  8182. trap "$rm \"$cfgfile\"; exit 1" 1 2 15
  8183. $rm -f "$cfgfile"
  8184. AC_MSG_NOTICE([creating $ofile])],
  8185. [cfgfile="$ofile"])
  8186. cat <<__EOF__ >> "$cfgfile"
  8187. ifelse([$1], [],
  8188. [#! $SHELL
  8189. # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
  8190. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
  8191. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  8192. #
  8193. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
  8194. # Free Software Foundation, Inc.
  8195. #
  8196. # This file is part of GNU Libtool:
  8197. # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  8198. #
  8199. # This program is free software; you can redistribute it and/or modify
  8200. # it under the terms of the GNU General Public License as published by
  8201. # the Free Software Foundation; either version 2 of the License, or
  8202. # (at your option) any later version.
  8203. #
  8204. # This program is distributed in the hope that it will be useful, but
  8205. # WITHOUT ANY WARRANTY; without even the implied warranty of
  8206. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  8207. # General Public License for more details.
  8208. #
  8209. # You should have received a copy of the GNU General Public License
  8210. # along with this program; if not, write to the Free Software
  8211. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  8212. #
  8213. # As a special exception to the GNU General Public License, if you
  8214. # distribute this file as part of a program that contains a
  8215. # configuration script generated by Autoconf, you may include it under
  8216. # the same distribution terms that you use for the rest of that program.
  8217. # A sed program that does not truncate output.
  8218. SED=$lt_SED
  8219. # Sed that helps us avoid accidentally triggering echo(1) options like -n.
  8220. Xsed="$SED -e s/^X//"
  8221. # The HP-UX ksh and POSIX shell print the target directory to stdout
  8222. # if CDPATH is set.
  8223. if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
  8224. # The names of the tagged configurations supported by this script.
  8225. available_tags=
  8226. # ### BEGIN LIBTOOL CONFIG],
  8227. [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
  8228. # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  8229. # Shell to use when invoking shell scripts.
  8230. SHELL=$lt_SHELL
  8231. # Whether or not to build shared libraries.
  8232. build_libtool_libs=$enable_shared
  8233. # Whether or not to build static libraries.
  8234. build_old_libs=$enable_static
  8235. # Whether or not to add -lc for building shared libraries.
  8236. build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
  8237. # Whether or not to disallow shared libs when runtime libs are static
  8238. allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
  8239. # Whether or not to optimize for fast installation.
  8240. fast_install=$enable_fast_install
  8241. # The host system.
  8242. host_alias=$host_alias
  8243. host=$host
  8244. # An echo program that does not interpret backslashes.
  8245. echo=$lt_echo
  8246. # The archiver.
  8247. AR=$lt_AR
  8248. AR_FLAGS=$lt_AR_FLAGS
  8249. # A C compiler.
  8250. LTCC=$lt_LTCC
  8251. # A language-specific compiler.
  8252. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
  8253. # Is the compiler the GNU C compiler?
  8254. with_gcc=$_LT_AC_TAGVAR(GCC, $1)
  8255. # An ERE matcher.
  8256. EGREP=$lt_EGREP
  8257. # The linker used to build libraries.
  8258. LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
  8259. # Whether we need hard or soft links.
  8260. LN_S=$lt_LN_S
  8261. # A BSD-compatible nm program.
  8262. NM=$lt_NM
  8263. # A symbol stripping program
  8264. STRIP=$STRIP
  8265. # Used to examine libraries when file_magic_cmd begins "file"
  8266. MAGIC_CMD=$MAGIC_CMD
  8267. # Used on cygwin: DLL creation program.
  8268. DLLTOOL="$DLLTOOL"
  8269. # Used on cygwin: object dumper.
  8270. OBJDUMP="$OBJDUMP"
  8271. # Used on cygwin: assembler.
  8272. AS="$AS"
  8273. # The name of the directory that contains temporary libtool files.
  8274. objdir=$objdir
  8275. # How to create reloadable object files.
  8276. reload_flag=$lt_reload_flag
  8277. reload_cmds=$lt_reload_cmds
  8278. # How to pass a linker flag through the compiler.
  8279. wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
  8280. # Object file suffix (normally "o").
  8281. objext="$ac_objext"
  8282. # Old archive suffix (normally "a").
  8283. libext="$libext"
  8284. # Shared library suffix (normally ".so").
  8285. shrext='$shrext'
  8286. # Executable file suffix (normally "").
  8287. exeext="$exeext"
  8288. # Additional compiler flags for building library objects.
  8289. pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
  8290. pic_mode=$pic_mode
  8291. # What is the maximum length of a command?
  8292. max_cmd_len=$lt_cv_sys_max_cmd_len
  8293. # Does compiler simultaneously support -c and -o options?
  8294. compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
  8295. # Must we lock files when doing compilation ?
  8296. need_locks=$lt_need_locks
  8297. # Do we need the lib prefix for modules?
  8298. need_lib_prefix=$need_lib_prefix
  8299. # Do we need a version for libraries?
  8300. need_version=$need_version
  8301. # Whether dlopen is supported.
  8302. dlopen_support=$enable_dlopen
  8303. # Whether dlopen of programs is supported.
  8304. dlopen_self=$enable_dlopen_self
  8305. # Whether dlopen of statically linked programs is supported.
  8306. dlopen_self_static=$enable_dlopen_self_static
  8307. # Compiler flag to prevent dynamic linking.
  8308. link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
  8309. # Compiler flag to turn off builtin functions.
  8310. no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
  8311. # Compiler flag to allow reflexive dlopens.
  8312. export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
  8313. # Compiler flag to generate shared objects directly from archives.
  8314. whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
  8315. # Compiler flag to generate thread-safe objects.
  8316. thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
  8317. # Library versioning type.
  8318. version_type=$version_type
  8319. # Format of library name prefix.
  8320. libname_spec=$lt_libname_spec
  8321. # List of archive names. First name is the real one, the rest are links.
  8322. # The last name is the one that the linker finds with -lNAME.
  8323. library_names_spec=$lt_library_names_spec
  8324. # The coded name of the library, if different from the real name.
  8325. soname_spec=$lt_soname_spec
  8326. # Commands used to build and install an old-style archive.
  8327. RANLIB=$lt_RANLIB
  8328. old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
  8329. old_postinstall_cmds=$lt_old_postinstall_cmds
  8330. old_postuninstall_cmds=$lt_old_postuninstall_cmds
  8331. # Create an old-style archive from a shared archive.
  8332. old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
  8333. # Create a temporary old-style archive to link instead of a shared archive.
  8334. old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
  8335. # Commands used to build and install a shared archive.
  8336. archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
  8337. archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
  8338. postinstall_cmds=$lt_postinstall_cmds
  8339. postuninstall_cmds=$lt_postuninstall_cmds
  8340. # Commands used to build a loadable module (assumed same as above if empty)
  8341. module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
  8342. module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
  8343. # Commands to strip libraries.
  8344. old_striplib=$lt_old_striplib
  8345. striplib=$lt_striplib
  8346. # Dependencies to place before the objects being linked to create a
  8347. # shared library.
  8348. predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
  8349. # Dependencies to place after the objects being linked to create a
  8350. # shared library.
  8351. postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
  8352. # Dependencies to place before the objects being linked to create a
  8353. # shared library.
  8354. predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
  8355. # Dependencies to place after the objects being linked to create a
  8356. # shared library.
  8357. postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
  8358. # The library search path used internally by the compiler when linking
  8359. # a shared library.
  8360. compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
  8361. # Method to check whether dependent libraries are shared objects.
  8362. deplibs_check_method=$lt_deplibs_check_method
  8363. # Command to use when deplibs_check_method == file_magic.
  8364. file_magic_cmd=$lt_file_magic_cmd
  8365. # Flag that allows shared libraries with undefined symbols to be built.
  8366. allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
  8367. # Flag that forces no undefined symbols.
  8368. no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
  8369. # Commands used to finish a libtool library installation in a directory.
  8370. finish_cmds=$lt_finish_cmds
  8371. # Same as above, but a single script fragment to be evaled but not shown.
  8372. finish_eval=$lt_finish_eval
  8373. # Take the output of nm and produce a listing of raw symbols and C names.
  8374. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
  8375. # Transform the output of nm in a proper C declaration
  8376. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
  8377. # Transform the output of nm in a C name address pair
  8378. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
  8379. # This is the shared library runtime path variable.
  8380. runpath_var=$runpath_var
  8381. # This is the shared library path variable.
  8382. shlibpath_var=$shlibpath_var
  8383. # Is shlibpath searched before the hard-coded library search path?
  8384. shlibpath_overrides_runpath=$shlibpath_overrides_runpath
  8385. # How to hardcode a shared library path into an executable.
  8386. hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
  8387. # Whether we should hardcode library paths into libraries.
  8388. hardcode_into_libs=$hardcode_into_libs
  8389. # Flag to hardcode \$libdir into a binary during linking.
  8390. # This must work even if \$libdir does not exist.
  8391. hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
  8392. # If ld is used when linking, flag to hardcode \$libdir into
  8393. # a binary during linking. This must work even if \$libdir does
  8394. # not exist.
  8395. hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
  8396. # Whether we need a single -rpath flag with a separated argument.
  8397. hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
  8398. # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
  8399. # resulting binary.
  8400. hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
  8401. # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
  8402. # resulting binary.
  8403. hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
  8404. # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
  8405. # the resulting binary.
  8406. hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
  8407. # Set to yes if building a shared library automatically hardcodes DIR into the library
  8408. # and all subsequent libraries and executables linked against it.
  8409. hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
  8410. # Variables whose values should be saved in libtool wrapper scripts and
  8411. # restored at relink time.
  8412. variables_saved_for_relink="$variables_saved_for_relink"
  8413. # Whether libtool must link a program against all its dependency libraries.
  8414. link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
  8415. # Compile-time system search path for libraries
  8416. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
  8417. # Run-time system search path for libraries
  8418. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
  8419. # Fix the shell variable \$srcfile for the compiler.
  8420. fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
  8421. # Set to yes if exported symbols are required.
  8422. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
  8423. # The commands to list exported symbols.
  8424. export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
  8425. # The commands to extract the exported symbol list from a shared archive.
  8426. extract_expsyms_cmds=$lt_extract_expsyms_cmds
  8427. # Symbols that should not be listed in the preloaded symbols.
  8428. exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
  8429. # Symbols that must always be exported.
  8430. include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
  8431. ifelse([$1],[],
  8432. [# ### END LIBTOOL CONFIG],
  8433. [# ### END LIBTOOL TAG CONFIG: $tagname])
  8434. __EOF__
  8435. ifelse([$1],[], [
  8436. case $host_os in
  8437. aix3*)
  8438. cat <<\EOF >> "$cfgfile"
  8439. # AIX sometimes has problems with the GCC collect2 program. For some
  8440. # reason, if we set the COLLECT_NAMES environment variable, the problems
  8441. # vanish in a puff of smoke.
  8442. if test "X${COLLECT_NAMES+set}" != Xset; then
  8443. COLLECT_NAMES=
  8444. export COLLECT_NAMES
  8445. fi
  8446. EOF
  8447. ;;
  8448. esac
  8449. # We use sed instead of cat because bash on DJGPP gets confused if
  8450. # if finds mixed CR/LF and LF-only lines. Since sed operates in
  8451. # text mode, it properly converts lines to CR/LF. This bash problem
  8452. # is reportedly fixed, but why not run on old versions too?
  8453. sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
  8454. mv -f "$cfgfile" "$ofile" || \
  8455. (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
  8456. chmod +x "$ofile"
  8457. ])
  8458. else
  8459. # If there is no Makefile yet, we rely on a make rule to execute
  8460. # `config.status --recheck' to rerun these tests and create the
  8461. # libtool script then.
  8462. test -f Makefile && make "$ltmain"
  8463. fi
  8464. ])# AC_LIBTOOL_CONFIG
  8465. # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
  8466. # -------------------------------------------
  8467. AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
  8468. [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
  8469. _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  8470. if test "$GCC" = yes; then
  8471. _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  8472. AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
  8473. lt_cv_prog_compiler_rtti_exceptions,
  8474. [-fno-rtti -fno-exceptions], [],
  8475. [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
  8476. fi
  8477. ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
  8478. # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
  8479. # ---------------------------------
  8480. AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
  8481. [AC_REQUIRE([AC_CANONICAL_HOST])
  8482. AC_REQUIRE([AC_PROG_NM])
  8483. AC_REQUIRE([AC_OBJEXT])
  8484. # Check for command to grab the raw symbol name followed by C symbol from nm.
  8485. AC_MSG_CHECKING([command to parse $NM output from $compiler object])
  8486. AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
  8487. [
  8488. # These are sane defaults that work on at least a few old systems.
  8489. # [They come from Ultrix. What could be older than Ultrix?!! ;)]
  8490. # Character class describing NM global symbol codes.
  8491. symcode='[[BCDEGRST]]'
  8492. # Regexp to match symbols that can be accessed directly from C.
  8493. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
  8494. # Transform the above into a raw symbol and a C symbol.
  8495. symxfrm='\1 \2\3 \3'
  8496. # Transform an extracted symbol line into a proper C declaration
  8497. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
  8498. # Transform an extracted symbol line into symbol name and symbol address
  8499. lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
  8500. # Define system-specific variables.
  8501. case $host_os in
  8502. aix*)
  8503. symcode='[[BCDT]]'
  8504. ;;
  8505. cygwin* | mingw* | pw32*)
  8506. symcode='[[ABCDGISTW]]'
  8507. ;;
  8508. hpux*) # Its linker distinguishes data from code symbols
  8509. if test "$host_cpu" = ia64; then
  8510. symcode='[[ABCDEGRST]]'
  8511. fi
  8512. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  8513. lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
  8514. ;;
  8515. irix* | nonstopux*)
  8516. symcode='[[BCDEGRST]]'
  8517. ;;
  8518. osf*)
  8519. symcode='[[BCDEGQRST]]'
  8520. ;;
  8521. solaris* | sysv5*)
  8522. symcode='[[BDT]]'
  8523. ;;
  8524. sysv4)
  8525. symcode='[[DFNSTU]]'
  8526. ;;
  8527. esac
  8528. # Handle CRLF in mingw tool chain
  8529. opt_cr=
  8530. case $build_os in
  8531. mingw*)
  8532. opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  8533. ;;
  8534. esac
  8535. # If we're using GNU nm, then use its standard symbol codes.
  8536. case `$NM -V 2>&1` in
  8537. *GNU* | *'with BFD'*)
  8538. symcode='[[ABCDGISTW]]' ;;
  8539. esac
  8540. # Try without a prefix undercore, then with it.
  8541. for ac_symprfx in "" "_"; do
  8542. # Write the raw and C identifiers.
  8543. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
  8544. # Check to see that the pipe works correctly.
  8545. pipe_works=no
  8546. rm -f conftest*
  8547. cat > conftest.$ac_ext <<EOF
  8548. #ifdef __cplusplus
  8549. extern "C" {
  8550. #endif
  8551. char nm_test_var;
  8552. void nm_test_func(){}
  8553. #ifdef __cplusplus
  8554. }
  8555. #endif
  8556. int main(){nm_test_var='a';nm_test_func();return(0);}
  8557. EOF
  8558. if AC_TRY_EVAL(ac_compile); then
  8559. # Now try to grab the symbols.
  8560. nlist=conftest.nm
  8561. if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
  8562. # Try sorting and uniquifying the output.
  8563. if sort "$nlist" | uniq > "$nlist"T; then
  8564. mv -f "$nlist"T "$nlist"
  8565. else
  8566. rm -f "$nlist"T
  8567. fi
  8568. # Make sure that we snagged all the symbols we need.
  8569. if grep ' nm_test_var$' "$nlist" >/dev/null; then
  8570. if grep ' nm_test_func$' "$nlist" >/dev/null; then
  8571. cat <<EOF > conftest.$ac_ext
  8572. #ifdef __cplusplus
  8573. extern "C" {
  8574. #endif
  8575. EOF
  8576. # Now generate the symbol file.
  8577. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
  8578. cat <<EOF >> conftest.$ac_ext
  8579. #if defined (__STDC__) && __STDC__
  8580. # define lt_ptr_t void *
  8581. #else
  8582. # define lt_ptr_t char *
  8583. # define const
  8584. #endif
  8585. /* The mapping between symbol names and symbols. */
  8586. const struct {
  8587. const char *name;
  8588. lt_ptr_t address;
  8589. }
  8590. lt_preloaded_symbols[[]] =
  8591. {
  8592. EOF
  8593. $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
  8594. cat <<\EOF >> conftest.$ac_ext
  8595. {0, (lt_ptr_t) 0}
  8596. };
  8597. #ifdef __cplusplus
  8598. }
  8599. #endif
  8600. EOF
  8601. # Now try linking the two files.
  8602. mv conftest.$ac_objext conftstm.$ac_objext
  8603. lt_save_LIBS="$LIBS"
  8604. lt_save_CFLAGS="$CFLAGS"
  8605. LIBS="conftstm.$ac_objext"
  8606. CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
  8607. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
  8608. pipe_works=yes
  8609. fi
  8610. LIBS="$lt_save_LIBS"
  8611. CFLAGS="$lt_save_CFLAGS"
  8612. else
  8613. echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
  8614. fi
  8615. else
  8616. echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
  8617. fi
  8618. else
  8619. echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
  8620. fi
  8621. else
  8622. echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
  8623. cat conftest.$ac_ext >&5
  8624. fi
  8625. rm -f conftest* conftst*
  8626. # Do not use the global_symbol_pipe unless it works.
  8627. if test "$pipe_works" = yes; then
  8628. break
  8629. else
  8630. lt_cv_sys_global_symbol_pipe=
  8631. fi
  8632. done
  8633. ])
  8634. if test -z "$lt_cv_sys_global_symbol_pipe"; then
  8635. lt_cv_sys_global_symbol_to_cdecl=
  8636. fi
  8637. if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
  8638. AC_MSG_RESULT(failed)
  8639. else
  8640. AC_MSG_RESULT(ok)
  8641. fi
  8642. ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
  8643. # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
  8644. # ---------------------------------------
  8645. AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
  8646. [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
  8647. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  8648. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
  8649. AC_MSG_CHECKING([for $compiler option to produce PIC])
  8650. ifelse([$1],[CXX],[
  8651. # C++ specific cases for pic, static, wl, etc.
  8652. if test "$GXX" = yes; then
  8653. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  8654. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  8655. case $host_os in
  8656. aix*)
  8657. # All AIX code is PIC.
  8658. if test "$host_cpu" = ia64; then
  8659. # AIX 5 now supports IA64 processor
  8660. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  8661. fi
  8662. ;;
  8663. amigaos*)
  8664. # FIXME: we need at least 68020 code to build shared libraries, but
  8665. # adding the `-m68020' flag to GCC prevents building anything better,
  8666. # like `-m68040'.
  8667. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  8668. ;;
  8669. beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  8670. # PIC is the default for these OSes.
  8671. ;;
  8672. mingw* | os2* | pw32*)
  8673. # This hack is so that the source file can tell whether it is being
  8674. # built for inclusion in a dll (and should export symbols for example).
  8675. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
  8676. ;;
  8677. darwin* | rhapsody*)
  8678. # PIC is the default on this platform
  8679. # Common symbols not allowed in MH_DYLIB files
  8680. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  8681. ;;
  8682. *djgpp*)
  8683. # DJGPP does not support shared libraries at all
  8684. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  8685. ;;
  8686. sysv4*MP*)
  8687. if test -d /usr/nec; then
  8688. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  8689. fi
  8690. ;;
  8691. hpux*)
  8692. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  8693. # not for PA HP-UX.
  8694. case "$host_cpu" in
  8695. hppa*64*|ia64*)
  8696. ;;
  8697. *)
  8698. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  8699. ;;
  8700. esac
  8701. ;;
  8702. *)
  8703. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  8704. ;;
  8705. esac
  8706. else
  8707. case $host_os in
  8708. aix4* | aix5*)
  8709. # All AIX code is PIC.
  8710. if test "$host_cpu" = ia64; then
  8711. # AIX 5 now supports IA64 processor
  8712. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  8713. else
  8714. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  8715. fi
  8716. ;;
  8717. chorus*)
  8718. case $cc_basename in
  8719. cxch68)
  8720. # Green Hills C++ Compiler
  8721. # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
  8722. ;;
  8723. esac
  8724. ;;
  8725. dgux*)
  8726. case $cc_basename in
  8727. ec++)
  8728. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  8729. ;;
  8730. ghcx)
  8731. # Green Hills C++ Compiler
  8732. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  8733. ;;
  8734. *)
  8735. ;;
  8736. esac
  8737. ;;
  8738. freebsd*)
  8739. # FreeBSD uses GNU C++
  8740. ;;
  8741. hpux9* | hpux10* | hpux11*)
  8742. case $cc_basename in
  8743. CC)
  8744. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  8745. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
  8746. if test "$host_cpu" != ia64; then
  8747. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  8748. fi
  8749. ;;
  8750. aCC)
  8751. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  8752. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
  8753. case "$host_cpu" in
  8754. hppa*64*|ia64*)
  8755. # +Z the default
  8756. ;;
  8757. *)
  8758. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  8759. ;;
  8760. esac
  8761. ;;
  8762. *)
  8763. ;;
  8764. esac
  8765. ;;
  8766. irix5* | irix6* | nonstopux*)
  8767. case $cc_basename in
  8768. CC)
  8769. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  8770. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  8771. # CC pic flag -KPIC is the default.
  8772. ;;
  8773. *)
  8774. ;;
  8775. esac
  8776. ;;
  8777. linux*)
  8778. case $cc_basename in
  8779. KCC)
  8780. # KAI C++ Compiler
  8781. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  8782. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  8783. ;;
  8784. icpc)
  8785. # Intel C++
  8786. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  8787. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  8788. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  8789. ;;
  8790. cxx)
  8791. # Compaq C++
  8792. # Make sure the PIC flag is empty. It appears that all Alpha
  8793. # Linux and Compaq Tru64 Unix objects are PIC.
  8794. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  8795. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  8796. ;;
  8797. *)
  8798. ;;
  8799. esac
  8800. ;;
  8801. lynxos*)
  8802. ;;
  8803. m88k*)
  8804. ;;
  8805. mvs*)
  8806. case $cc_basename in
  8807. cxx)
  8808. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
  8809. ;;
  8810. *)
  8811. ;;
  8812. esac
  8813. ;;
  8814. netbsd*)
  8815. ;;
  8816. osf3* | osf4* | osf5*)
  8817. case $cc_basename in
  8818. KCC)
  8819. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  8820. ;;
  8821. RCC)
  8822. # Rational C++ 2.4.1
  8823. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  8824. ;;
  8825. cxx)
  8826. # Digital/Compaq C++
  8827. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  8828. # Make sure the PIC flag is empty. It appears that all Alpha
  8829. # Linux and Compaq Tru64 Unix objects are PIC.
  8830. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  8831. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  8832. ;;
  8833. *)
  8834. ;;
  8835. esac
  8836. ;;
  8837. psos*)
  8838. ;;
  8839. sco*)
  8840. case $cc_basename in
  8841. CC)
  8842. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  8843. ;;
  8844. *)
  8845. ;;
  8846. esac
  8847. ;;
  8848. solaris*)
  8849. case $cc_basename in
  8850. CC)
  8851. # Sun C++ 4.2, 5.x and Centerline C++
  8852. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  8853. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  8854. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  8855. ;;
  8856. gcx)
  8857. # Green Hills C++ Compiler
  8858. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  8859. ;;
  8860. *)
  8861. ;;
  8862. esac
  8863. ;;
  8864. sunos4*)
  8865. case $cc_basename in
  8866. CC)
  8867. # Sun C++ 4.x
  8868. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  8869. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  8870. ;;
  8871. lcc)
  8872. # Lucid
  8873. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  8874. ;;
  8875. *)
  8876. ;;
  8877. esac
  8878. ;;
  8879. tandem*)
  8880. case $cc_basename in
  8881. NCC)
  8882. # NonStop-UX NCC 3.20
  8883. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  8884. ;;
  8885. *)
  8886. ;;
  8887. esac
  8888. ;;
  8889. unixware*)
  8890. ;;
  8891. vxworks*)
  8892. ;;
  8893. *)
  8894. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  8895. ;;
  8896. esac
  8897. fi
  8898. ],
  8899. [
  8900. if test "$GCC" = yes; then
  8901. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  8902. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  8903. case $host_os in
  8904. aix*)
  8905. # All AIX code is PIC.
  8906. if test "$host_cpu" = ia64; then
  8907. # AIX 5 now supports IA64 processor
  8908. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  8909. fi
  8910. ;;
  8911. amigaos*)
  8912. # FIXME: we need at least 68020 code to build shared libraries, but
  8913. # adding the `-m68020' flag to GCC prevents building anything better,
  8914. # like `-m68040'.
  8915. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  8916. ;;
  8917. beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  8918. # PIC is the default for these OSes.
  8919. ;;
  8920. mingw* | pw32* | os2*)
  8921. # This hack is so that the source file can tell whether it is being
  8922. # built for inclusion in a dll (and should export symbols for example).
  8923. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
  8924. ;;
  8925. darwin* | rhapsody*)
  8926. # PIC is the default on this platform
  8927. # Common symbols not allowed in MH_DYLIB files
  8928. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  8929. ;;
  8930. msdosdjgpp*)
  8931. # Just because we use GCC doesn't mean we suddenly get shared libraries
  8932. # on systems that don't support them.
  8933. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  8934. enable_shared=no
  8935. ;;
  8936. sysv4*MP*)
  8937. if test -d /usr/nec; then
  8938. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  8939. fi
  8940. ;;
  8941. hpux*)
  8942. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  8943. # not for PA HP-UX.
  8944. case "$host_cpu" in
  8945. hppa*64*|ia64*)
  8946. # +Z the default
  8947. ;;
  8948. *)
  8949. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  8950. ;;
  8951. esac
  8952. ;;
  8953. *)
  8954. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  8955. ;;
  8956. esac
  8957. else
  8958. # PORTME Check for flag to pass linker flags through the system compiler.
  8959. case $host_os in
  8960. aix*)
  8961. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  8962. if test "$host_cpu" = ia64; then
  8963. # AIX 5 now supports IA64 processor
  8964. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  8965. else
  8966. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  8967. fi
  8968. ;;
  8969. mingw* | pw32* | os2*)
  8970. # This hack is so that the source file can tell whether it is being
  8971. # built for inclusion in a dll (and should export symbols for example).
  8972. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
  8973. ;;
  8974. hpux9* | hpux10* | hpux11*)
  8975. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  8976. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  8977. # not for PA HP-UX.
  8978. case "$host_cpu" in
  8979. hppa*64*|ia64*)
  8980. # +Z the default
  8981. ;;
  8982. *)
  8983. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  8984. ;;
  8985. esac
  8986. # Is there a better lt_prog_compiler_static that works with the bundled CC?
  8987. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  8988. ;;
  8989. irix5* | irix6* | nonstopux*)
  8990. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  8991. # PIC (with -KPIC) is the default.
  8992. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  8993. ;;
  8994. newsos6)
  8995. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  8996. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  8997. ;;
  8998. linux*)
  8999. case $CC in
  9000. icc* | ecc*)
  9001. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  9002. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  9003. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  9004. ;;
  9005. ccc*)
  9006. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  9007. # All Alpha code is PIC.
  9008. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  9009. ;;
  9010. esac
  9011. ;;
  9012. osf3* | osf4* | osf5*)
  9013. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  9014. # All OSF/1 code is PIC.
  9015. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  9016. ;;
  9017. sco3.2v5*)
  9018. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
  9019. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
  9020. ;;
  9021. solaris*)
  9022. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  9023. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  9024. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  9025. ;;
  9026. sunos4*)
  9027. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  9028. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  9029. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  9030. ;;
  9031. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  9032. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  9033. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  9034. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  9035. ;;
  9036. sysv4*MP*)
  9037. if test -d /usr/nec ;then
  9038. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
  9039. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  9040. fi
  9041. ;;
  9042. uts4*)
  9043. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  9044. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  9045. ;;
  9046. *)
  9047. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  9048. ;;
  9049. esac
  9050. fi
  9051. ])
  9052. AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
  9053. #
  9054. # Check to make sure the PIC flag actually works.
  9055. #
  9056. if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
  9057. AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
  9058. _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
  9059. [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
  9060. [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
  9061. "" | " "*) ;;
  9062. *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
  9063. esac],
  9064. [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  9065. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
  9066. fi
  9067. case "$host_os" in
  9068. # For platforms which do not support PIC, -DPIC is meaningless:
  9069. *djgpp*)
  9070. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  9071. ;;
  9072. *)
  9073. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
  9074. ;;
  9075. esac
  9076. ])
  9077. # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
  9078. # ------------------------------------
  9079. # See if the linker supports building shared libraries.
  9080. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
  9081. [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  9082. ifelse([$1],[CXX],[
  9083. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  9084. case $host_os in
  9085. aix4* | aix5*)
  9086. # If we're using GNU nm, then we don't want the "-C" option.
  9087. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  9088. if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
  9089. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
  9090. else
  9091. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
  9092. fi
  9093. ;;
  9094. pw32*)
  9095. _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
  9096. ;;
  9097. cygwin* | mingw*)
  9098. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
  9099. ;;
  9100. *)
  9101. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  9102. ;;
  9103. esac
  9104. ],[
  9105. runpath_var=
  9106. _LT_AC_TAGVAR(allow_undefined_flag, $1)=
  9107. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  9108. _LT_AC_TAGVAR(archive_cmds, $1)=
  9109. _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
  9110. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
  9111. _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
  9112. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
  9113. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  9114. _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
  9115. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
  9116. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  9117. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  9118. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  9119. _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
  9120. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  9121. _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
  9122. _LT_AC_TAGVAR(hardcode_automatic, $1)=no
  9123. _LT_AC_TAGVAR(module_cmds, $1)=
  9124. _LT_AC_TAGVAR(module_expsym_cmds, $1)=
  9125. _LT_AC_TAGVAR(always_export_symbols, $1)=no
  9126. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  9127. # include_expsyms should be a list of space-separated symbols to be *always*
  9128. # included in the symbol list
  9129. _LT_AC_TAGVAR(include_expsyms, $1)=
  9130. # exclude_expsyms can be an extended regexp of symbols to exclude
  9131. # it will be wrapped by ` (' and `)$', so one must not match beginning or
  9132. # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
  9133. # as well as any symbol that contains `d'.
  9134. _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
  9135. # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  9136. # platforms (ab)use it in PIC code, but their linkers get confused if
  9137. # the symbol is explicitly referenced. Since portable code cannot
  9138. # rely on this symbol name, it's probably fine to never include it in
  9139. # preloaded symbol tables.
  9140. extract_expsyms_cmds=
  9141. case $host_os in
  9142. cygwin* | mingw* | pw32*)
  9143. # FIXME: the MSVC++ port hasn't been tested in a loooong time
  9144. # When not using gcc, we currently assume that we are using
  9145. # Microsoft Visual C++.
  9146. if test "$GCC" != yes; then
  9147. with_gnu_ld=no
  9148. fi
  9149. ;;
  9150. openbsd*)
  9151. with_gnu_ld=no
  9152. ;;
  9153. esac
  9154. _LT_AC_TAGVAR(ld_shlibs, $1)=yes
  9155. if test "$with_gnu_ld" = yes; then
  9156. # If archive_cmds runs LD, not CC, wlarc should be empty
  9157. wlarc='${wl}'
  9158. # See if GNU ld supports shared libraries.
  9159. case $host_os in
  9160. aix3* | aix4* | aix5*)
  9161. # On AIX/PPC, the GNU linker is very broken
  9162. if test "$host_cpu" != ia64; then
  9163. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  9164. cat <<EOF 1>&2
  9165. *** Warning: the GNU linker, at least up to release 2.9.1, is reported
  9166. *** to be unable to reliably create shared libraries on AIX.
  9167. *** Therefore, libtool is disabling shared libraries support. If you
  9168. *** really care for shared libraries, you may want to modify your PATH
  9169. *** so that a non-GNU linker is found, and then restart.
  9170. EOF
  9171. fi
  9172. ;;
  9173. amigaos*)
  9174. _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
  9175. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  9176. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  9177. # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
  9178. # that the semantics of dynamic libraries on AmigaOS, at least up
  9179. # to version 4, is to share data among multiple programs linked
  9180. # with the same dynamic library. Since this doesn't match the
  9181. # behavior of shared libraries on other platforms, we can't use
  9182. # them.
  9183. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  9184. ;;
  9185. beos*)
  9186. if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  9187. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  9188. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  9189. # support --undefined. This deserves some investigation. FIXME
  9190. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  9191. else
  9192. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  9193. fi
  9194. ;;
  9195. cygwin* | mingw* | pw32*)
  9196. # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  9197. # as there is no search path for DLLs.
  9198. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  9199. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  9200. _LT_AC_TAGVAR(always_export_symbols, $1)=no
  9201. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  9202. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
  9203. if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
  9204. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
  9205. # If the export-symbols file already is a .def file (1st line
  9206. # is EXPORTS), use it as is; otherwise, prepend...
  9207. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  9208. cp $export_symbols $output_objdir/$soname.def;
  9209. else
  9210. echo EXPORTS > $output_objdir/$soname.def;
  9211. cat $export_symbols >> $output_objdir/$soname.def;
  9212. fi~
  9213. $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
  9214. else
  9215. ld_shlibs=no
  9216. fi
  9217. ;;
  9218. netbsd*)
  9219. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  9220. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  9221. wlarc=
  9222. else
  9223. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  9224. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  9225. fi
  9226. ;;
  9227. solaris* | sysv5*)
  9228. if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
  9229. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  9230. cat <<EOF 1>&2
  9231. *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  9232. *** create shared libraries on Solaris systems. Therefore, libtool
  9233. *** is disabling shared libraries support. We urge you to upgrade GNU
  9234. *** binutils to release 2.9.1 or newer. Another option is to modify
  9235. *** your PATH or compiler configuration so that the native linker is
  9236. *** used, and then restart.
  9237. EOF
  9238. elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  9239. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  9240. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  9241. else
  9242. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  9243. fi
  9244. ;;
  9245. sunos4*)
  9246. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  9247. wlarc=
  9248. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  9249. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  9250. ;;
  9251. *)
  9252. if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  9253. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  9254. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  9255. else
  9256. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  9257. fi
  9258. ;;
  9259. esac
  9260. if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
  9261. runpath_var=LD_RUN_PATH
  9262. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
  9263. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  9264. # ancient GNU ld didn't support --whole-archive et. al.
  9265. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
  9266. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  9267. else
  9268. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  9269. fi
  9270. fi
  9271. else
  9272. # PORTME fill in a description of your system's linker (not GNU ld)
  9273. case $host_os in
  9274. aix3*)
  9275. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  9276. _LT_AC_TAGVAR(always_export_symbols, $1)=yes
  9277. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
  9278. # Note: this linker hardcodes the directories in LIBPATH if there
  9279. # are no directories specified by -L.
  9280. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  9281. if test "$GCC" = yes && test -z "$link_static_flag"; then
  9282. # Neither direct hardcoding nor static linking is supported with a
  9283. # broken collect2.
  9284. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
  9285. fi
  9286. ;;
  9287. aix4* | aix5*)
  9288. if test "$host_cpu" = ia64; then
  9289. # On IA64, the linker does run time linking by default, so we don't
  9290. # have to do anything special.
  9291. aix_use_runtimelinking=no
  9292. exp_sym_flag='-Bexport'
  9293. no_entry_flag=""
  9294. else
  9295. # If we're using GNU nm, then we don't want the "-C" option.
  9296. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  9297. if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
  9298. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
  9299. else
  9300. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
  9301. fi
  9302. # KDE requires run time linking. Make it the default.
  9303. aix_use_runtimelinking=yes
  9304. exp_sym_flag='-bexport'
  9305. no_entry_flag='-bnoentry'
  9306. fi
  9307. # When large executables or shared objects are built, AIX ld can
  9308. # have problems creating the table of contents. If linking a library
  9309. # or program results in "error TOC overflow" add -mminimal-toc to
  9310. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  9311. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  9312. _LT_AC_TAGVAR(archive_cmds, $1)=''
  9313. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  9314. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
  9315. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  9316. if test "$GCC" = yes; then
  9317. case $host_os in aix4.[012]|aix4.[012].*)
  9318. # We only want to do this on AIX 4.2 and lower, the check
  9319. # below for broken collect2 doesn't work under 4.3+
  9320. collect2name=`${CC} -print-prog-name=collect2`
  9321. if test -f "$collect2name" && \
  9322. strings "$collect2name" | grep resolve_lib_name >/dev/null
  9323. then
  9324. # We have reworked collect2
  9325. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  9326. else
  9327. # We have old collect2
  9328. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
  9329. # It fails to find uninstalled libraries when the uninstalled
  9330. # path is not listed in the li