KTechlab – circuit simulator for microcontrollers and electronics
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

aclocal.m4 387KB

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