KSplash engine Moodin - splash screen engine
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

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