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

acinclude.m4 372KB

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