soundkonverter
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 362KB

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