KnowIt – tool for managing notes
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 345KB

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