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

acinclude.m4 373KB

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