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

aclocal.m4 340KB

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