Dolphin file manager
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

acinclude.m4 365KB

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