tde-systemsettings
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 419KB

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