KDirStat – a graphical disk usage utility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

acinclude.m4 349KB

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