KTechlab – circuit simulator for microcontrollers and electronics
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

acinclude.m4 357KB

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