KKBSwitch – keyboard layout indicator
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

aclocal.m4 374KB

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