KnowIt – tool for managing notes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

aclocal.m4 374KB

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