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.

acinclude.m4 388KB

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