ktechlab
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.

aclocal.m4 387KB

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