aclocal.m4 413 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723
  1. # generated automatically by aclocal 1.12.2 -*- Autoconf -*-
  2. # Copyright (C) 1996-2012 Free Software Foundation, Inc.
  3. # This file is free software; the Free Software Foundation
  4. # gives unlimited permission to copy and/or distribute it,
  5. # with or without modifications, as long as this notice is preserved.
  6. # This program is distributed in the hope that it will be useful,
  7. # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  8. # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  9. # PARTICULAR PURPOSE.
  10. m4_ifndef([AC_AUTOCONF_VERSION],
  11. [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
  12. m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
  13. [m4_warning([this file was generated for autoconf 2.69.
  14. You have another version of autoconf. It may work, but is not guaranteed to.
  15. If you have problems, you may need to regenerate the build system entirely.
  16. To do so, use the procedure documented by the package, typically 'autoreconf'.])])
  17. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
  18. #
  19. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
  20. # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
  21. # Foundation, Inc.
  22. # Written by Gordon Matzigkeit, 1996
  23. #
  24. # This file is free software; the Free Software Foundation gives
  25. # unlimited permission to copy and/or distribute it, with or without
  26. # modifications, as long as this notice is preserved.
  27. m4_define([_LT_COPYING], [dnl
  28. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
  29. # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
  30. # Foundation, Inc.
  31. # Written by Gordon Matzigkeit, 1996
  32. #
  33. # This file is part of GNU Libtool.
  34. #
  35. # GNU Libtool is free software; you can redistribute it and/or
  36. # modify it under the terms of the GNU General Public License as
  37. # published by the Free Software Foundation; either version 2 of
  38. # the License, or (at your option) any later version.
  39. #
  40. # As a special exception to the GNU General Public License,
  41. # if you distribute this file as part of a program or library that
  42. # is built using GNU Libtool, you may include this file under the
  43. # same distribution terms that you use for the rest of that program.
  44. #
  45. # GNU Libtool is distributed in the hope that it will be useful,
  46. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  47. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  48. # GNU General Public License for more details.
  49. #
  50. # You should have received a copy of the GNU General Public License
  51. # along with GNU Libtool; see the file COPYING. If not, a copy
  52. # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
  53. # obtained by writing to the Free Software Foundation, Inc.,
  54. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  55. ])
  56. # serial 57 LT_INIT
  57. # LT_PREREQ(VERSION)
  58. # ------------------
  59. # Complain and exit if this libtool version is less that VERSION.
  60. m4_defun([LT_PREREQ],
  61. [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
  62. [m4_default([$3],
  63. [m4_fatal([Libtool version $1 or higher is required],
  64. 63)])],
  65. [$2])])
  66. # _LT_CHECK_BUILDDIR
  67. # ------------------
  68. # Complain if the absolute build directory name contains unusual characters
  69. m4_defun([_LT_CHECK_BUILDDIR],
  70. [case `pwd` in
  71. *\ * | *\ *)
  72. AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
  73. esac
  74. ])
  75. # LT_INIT([OPTIONS])
  76. # ------------------
  77. AC_DEFUN([LT_INIT],
  78. [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
  79. AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  80. AC_BEFORE([$0], [LT_LANG])dnl
  81. AC_BEFORE([$0], [LT_OUTPUT])dnl
  82. AC_BEFORE([$0], [LTDL_INIT])dnl
  83. m4_require([_LT_CHECK_BUILDDIR])dnl
  84. dnl Autoconf doesn't catch unexpanded LT_ macros by default:
  85. m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
  86. m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
  87. dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
  88. dnl unless we require an AC_DEFUNed macro:
  89. AC_REQUIRE([LTOPTIONS_VERSION])dnl
  90. AC_REQUIRE([LTSUGAR_VERSION])dnl
  91. AC_REQUIRE([LTVERSION_VERSION])dnl
  92. AC_REQUIRE([LTOBSOLETE_VERSION])dnl
  93. m4_require([_LT_PROG_LTMAIN])dnl
  94. _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
  95. dnl Parse OPTIONS
  96. _LT_SET_OPTIONS([$0], [$1])
  97. # This can be used to rebuild libtool when needed
  98. LIBTOOL_DEPS="$ltmain"
  99. # Always use our own libtool.
  100. LIBTOOL='$(SHELL) $(top_builddir)/libtool'
  101. AC_SUBST(LIBTOOL)dnl
  102. _LT_SETUP
  103. # Only expand once:
  104. m4_define([LT_INIT])
  105. ])# LT_INIT
  106. # Old names:
  107. AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
  108. AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
  109. dnl aclocal-1.4 backwards compatibility:
  110. dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
  111. dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
  112. # _LT_CC_BASENAME(CC)
  113. # -------------------
  114. # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
  115. m4_defun([_LT_CC_BASENAME],
  116. [for cc_temp in $1""; do
  117. case $cc_temp in
  118. compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
  119. distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
  120. \-*) ;;
  121. *) break;;
  122. esac
  123. done
  124. cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
  125. ])
  126. # _LT_FILEUTILS_DEFAULTS
  127. # ----------------------
  128. # It is okay to use these file commands and assume they have been set
  129. # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
  130. m4_defun([_LT_FILEUTILS_DEFAULTS],
  131. [: ${CP="cp -f"}
  132. : ${MV="mv -f"}
  133. : ${RM="rm -f"}
  134. ])# _LT_FILEUTILS_DEFAULTS
  135. # _LT_SETUP
  136. # ---------
  137. m4_defun([_LT_SETUP],
  138. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  139. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  140. AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
  141. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
  142. _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
  143. dnl
  144. _LT_DECL([], [host_alias], [0], [The host system])dnl
  145. _LT_DECL([], [host], [0])dnl
  146. _LT_DECL([], [host_os], [0])dnl
  147. dnl
  148. _LT_DECL([], [build_alias], [0], [The build system])dnl
  149. _LT_DECL([], [build], [0])dnl
  150. _LT_DECL([], [build_os], [0])dnl
  151. dnl
  152. AC_REQUIRE([AC_PROG_CC])dnl
  153. AC_REQUIRE([LT_PATH_LD])dnl
  154. AC_REQUIRE([LT_PATH_NM])dnl
  155. dnl
  156. AC_REQUIRE([AC_PROG_LN_S])dnl
  157. test -z "$LN_S" && LN_S="ln -s"
  158. _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
  159. dnl
  160. AC_REQUIRE([LT_CMD_MAX_LEN])dnl
  161. _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
  162. _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
  163. dnl
  164. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  165. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  166. m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
  167. m4_require([_LT_CMD_RELOAD])dnl
  168. m4_require([_LT_CHECK_MAGIC_METHOD])dnl
  169. m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
  170. m4_require([_LT_CMD_OLD_ARCHIVE])dnl
  171. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  172. m4_require([_LT_WITH_SYSROOT])dnl
  173. _LT_CONFIG_LIBTOOL_INIT([
  174. # See if we are running on zsh, and set the options which allow our
  175. # commands through without removal of \ escapes INIT.
  176. if test -n "\${ZSH_VERSION+set}" ; then
  177. setopt NO_GLOB_SUBST
  178. fi
  179. ])
  180. if test -n "${ZSH_VERSION+set}" ; then
  181. setopt NO_GLOB_SUBST
  182. fi
  183. _LT_CHECK_OBJDIR
  184. m4_require([_LT_TAG_COMPILER])dnl
  185. case $host_os in
  186. aix3*)
  187. # AIX sometimes has problems with the GCC collect2 program. For some
  188. # reason, if we set the COLLECT_NAMES environment variable, the problems
  189. # vanish in a puff of smoke.
  190. if test "X${COLLECT_NAMES+set}" != Xset; then
  191. COLLECT_NAMES=
  192. export COLLECT_NAMES
  193. fi
  194. ;;
  195. esac
  196. # Global variables:
  197. ofile=libtool
  198. can_build_shared=yes
  199. # All known linkers require a `.a' archive for static linking (except MSVC,
  200. # which needs '.lib').
  201. libext=a
  202. with_gnu_ld="$lt_cv_prog_gnu_ld"
  203. old_CC="$CC"
  204. old_CFLAGS="$CFLAGS"
  205. # Set sane defaults for various variables
  206. test -z "$CC" && CC=cc
  207. test -z "$LTCC" && LTCC=$CC
  208. test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
  209. test -z "$LD" && LD=ld
  210. test -z "$ac_objext" && ac_objext=o
  211. _LT_CC_BASENAME([$compiler])
  212. # Only perform the check for file, if the check method requires it
  213. test -z "$MAGIC_CMD" && MAGIC_CMD=file
  214. case $deplibs_check_method in
  215. file_magic*)
  216. if test "$file_magic_cmd" = '$MAGIC_CMD'; then
  217. _LT_PATH_MAGIC
  218. fi
  219. ;;
  220. esac
  221. # Use C for the default configuration in the libtool script
  222. LT_SUPPORTED_TAG([CC])
  223. _LT_LANG_C_CONFIG
  224. _LT_LANG_DEFAULT_CONFIG
  225. _LT_CONFIG_COMMANDS
  226. ])# _LT_SETUP
  227. # _LT_PREPARE_SED_QUOTE_VARS
  228. # --------------------------
  229. # Define a few sed substitution that help us do robust quoting.
  230. m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
  231. [# Backslashify metacharacters that are still active within
  232. # double-quoted strings.
  233. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
  234. # Same as above, but do not quote variable references.
  235. double_quote_subst='s/\([["`\\]]\)/\\\1/g'
  236. # Sed substitution to delay expansion of an escaped shell variable in a
  237. # double_quote_subst'ed string.
  238. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
  239. # Sed substitution to delay expansion of an escaped single quote.
  240. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
  241. # Sed substitution to avoid accidental globbing in evaled expressions
  242. no_glob_subst='s/\*/\\\*/g'
  243. ])
  244. # _LT_PROG_LTMAIN
  245. # ---------------
  246. # Note that this code is called both from `configure', and `config.status'
  247. # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
  248. # `config.status' has no value for ac_aux_dir unless we are using Automake,
  249. # so we pass a copy along to make sure it has a sensible value anyway.
  250. m4_defun([_LT_PROG_LTMAIN],
  251. [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
  252. _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
  253. ltmain="$ac_aux_dir/ltmain.sh"
  254. ])# _LT_PROG_LTMAIN
  255. # So that we can recreate a full libtool script including additional
  256. # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
  257. # in macros and then make a single call at the end using the `libtool'
  258. # label.
  259. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
  260. # ----------------------------------------
  261. # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  262. m4_define([_LT_CONFIG_LIBTOOL_INIT],
  263. [m4_ifval([$1],
  264. [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
  265. [$1
  266. ])])])
  267. # Initialize.
  268. m4_define([_LT_OUTPUT_LIBTOOL_INIT])
  269. # _LT_CONFIG_LIBTOOL([COMMANDS])
  270. # ------------------------------
  271. # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  272. m4_define([_LT_CONFIG_LIBTOOL],
  273. [m4_ifval([$1],
  274. [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
  275. [$1
  276. ])])])
  277. # Initialize.
  278. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
  279. # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
  280. # -----------------------------------------------------
  281. m4_defun([_LT_CONFIG_SAVE_COMMANDS],
  282. [_LT_CONFIG_LIBTOOL([$1])
  283. _LT_CONFIG_LIBTOOL_INIT([$2])
  284. ])
  285. # _LT_FORMAT_COMMENT([COMMENT])
  286. # -----------------------------
  287. # Add leading comment marks to the start of each line, and a trailing
  288. # full-stop to the whole comment if one is not present already.
  289. m4_define([_LT_FORMAT_COMMENT],
  290. [m4_ifval([$1], [
  291. m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
  292. [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
  293. )])
  294. # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
  295. # -------------------------------------------------------------------
  296. # CONFIGNAME is the name given to the value in the libtool script.
  297. # VARNAME is the (base) name used in the configure script.
  298. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
  299. # VARNAME. Any other value will be used directly.
  300. m4_define([_LT_DECL],
  301. [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
  302. [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
  303. [m4_ifval([$1], [$1], [$2])])
  304. lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
  305. m4_ifval([$4],
  306. [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
  307. lt_dict_add_subkey([lt_decl_dict], [$2],
  308. [tagged?], [m4_ifval([$5], [yes], [no])])])
  309. ])
  310. # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
  311. # --------------------------------------------------------
  312. m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
  313. # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
  314. # ------------------------------------------------
  315. m4_define([lt_decl_tag_varnames],
  316. [_lt_decl_filter([tagged?], [yes], $@)])
  317. # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
  318. # ---------------------------------------------------------
  319. m4_define([_lt_decl_filter],
  320. [m4_case([$#],
  321. [0], [m4_fatal([$0: too few arguments: $#])],
  322. [1], [m4_fatal([$0: too few arguments: $#: $1])],
  323. [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
  324. [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
  325. [lt_dict_filter([lt_decl_dict], $@)])[]dnl
  326. ])
  327. # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
  328. # --------------------------------------------------
  329. m4_define([lt_decl_quote_varnames],
  330. [_lt_decl_filter([value], [1], $@)])
  331. # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
  332. # ---------------------------------------------------
  333. m4_define([lt_decl_dquote_varnames],
  334. [_lt_decl_filter([value], [2], $@)])
  335. # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
  336. # ---------------------------------------------------
  337. m4_define([lt_decl_varnames_tagged],
  338. [m4_assert([$# <= 2])dnl
  339. _$0(m4_quote(m4_default([$1], [[, ]])),
  340. m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
  341. m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
  342. m4_define([_lt_decl_varnames_tagged],
  343. [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
  344. # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
  345. # ------------------------------------------------
  346. m4_define([lt_decl_all_varnames],
  347. [_$0(m4_quote(m4_default([$1], [[, ]])),
  348. m4_if([$2], [],
  349. m4_quote(lt_decl_varnames),
  350. m4_quote(m4_shift($@))))[]dnl
  351. ])
  352. m4_define([_lt_decl_all_varnames],
  353. [lt_join($@, lt_decl_varnames_tagged([$1],
  354. lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
  355. ])
  356. # _LT_CONFIG_STATUS_DECLARE([VARNAME])
  357. # ------------------------------------
  358. # Quote a variable value, and forward it to `config.status' so that its
  359. # declaration there will have the same value as in `configure'. VARNAME
  360. # must have a single quote delimited value for this to work.
  361. m4_define([_LT_CONFIG_STATUS_DECLARE],
  362. [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
  363. # _LT_CONFIG_STATUS_DECLARATIONS
  364. # ------------------------------
  365. # We delimit libtool config variables with single quotes, so when
  366. # we write them to config.status, we have to be sure to quote all
  367. # embedded single quotes properly. In configure, this macro expands
  368. # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
  369. #
  370. # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
  371. m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
  372. [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
  373. [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
  374. # _LT_LIBTOOL_TAGS
  375. # ----------------
  376. # Output comment and list of tags supported by the script
  377. m4_defun([_LT_LIBTOOL_TAGS],
  378. [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
  379. available_tags="_LT_TAGS"dnl
  380. ])
  381. # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
  382. # -----------------------------------
  383. # Extract the dictionary values for VARNAME (optionally with TAG) and
  384. # expand to a commented shell variable setting:
  385. #
  386. # # Some comment about what VAR is for.
  387. # visible_name=$lt_internal_name
  388. m4_define([_LT_LIBTOOL_DECLARE],
  389. [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
  390. [description])))[]dnl
  391. m4_pushdef([_libtool_name],
  392. m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
  393. m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
  394. [0], [_libtool_name=[$]$1],
  395. [1], [_libtool_name=$lt_[]$1],
  396. [2], [_libtool_name=$lt_[]$1],
  397. [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
  398. m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
  399. ])
  400. # _LT_LIBTOOL_CONFIG_VARS
  401. # -----------------------
  402. # Produce commented declarations of non-tagged libtool config variables
  403. # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
  404. # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
  405. # section) are produced by _LT_LIBTOOL_TAG_VARS.
  406. m4_defun([_LT_LIBTOOL_CONFIG_VARS],
  407. [m4_foreach([_lt_var],
  408. m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
  409. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
  410. # _LT_LIBTOOL_TAG_VARS(TAG)
  411. # -------------------------
  412. m4_define([_LT_LIBTOOL_TAG_VARS],
  413. [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
  414. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
  415. # _LT_TAGVAR(VARNAME, [TAGNAME])
  416. # ------------------------------
  417. m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
  418. # _LT_CONFIG_COMMANDS
  419. # -------------------
  420. # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
  421. # variables for single and double quote escaping we saved from calls
  422. # to _LT_DECL, we can put quote escaped variables declarations
  423. # into `config.status', and then the shell code to quote escape them in
  424. # for loops in `config.status'. Finally, any additional code accumulated
  425. # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
  426. m4_defun([_LT_CONFIG_COMMANDS],
  427. [AC_PROVIDE_IFELSE([LT_OUTPUT],
  428. dnl If the libtool generation code has been placed in $CONFIG_LT,
  429. dnl instead of duplicating it all over again into config.status,
  430. dnl then we will have config.status run $CONFIG_LT later, so it
  431. dnl needs to know what name is stored there:
  432. [AC_CONFIG_COMMANDS([libtool],
  433. [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
  434. dnl If the libtool generation code is destined for config.status,
  435. dnl expand the accumulated commands and init code now:
  436. [AC_CONFIG_COMMANDS([libtool],
  437. [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
  438. ])#_LT_CONFIG_COMMANDS
  439. # Initialize.
  440. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
  441. [
  442. # The HP-UX ksh and POSIX shell print the target directory to stdout
  443. # if CDPATH is set.
  444. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  445. sed_quote_subst='$sed_quote_subst'
  446. double_quote_subst='$double_quote_subst'
  447. delay_variable_subst='$delay_variable_subst'
  448. _LT_CONFIG_STATUS_DECLARATIONS
  449. LTCC='$LTCC'
  450. LTCFLAGS='$LTCFLAGS'
  451. compiler='$compiler_DEFAULT'
  452. # A function that is used when there is no print builtin or printf.
  453. func_fallback_echo ()
  454. {
  455. eval 'cat <<_LTECHO_EOF
  456. \$[]1
  457. _LTECHO_EOF'
  458. }
  459. # Quote evaled strings.
  460. for var in lt_decl_all_varnames([[ \
  461. ]], lt_decl_quote_varnames); do
  462. case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  463. *[[\\\\\\\`\\"\\\$]]*)
  464. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
  465. ;;
  466. *)
  467. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  468. ;;
  469. esac
  470. done
  471. # Double-quote double-evaled strings.
  472. for var in lt_decl_all_varnames([[ \
  473. ]], lt_decl_dquote_varnames); do
  474. case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  475. *[[\\\\\\\`\\"\\\$]]*)
  476. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
  477. ;;
  478. *)
  479. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  480. ;;
  481. esac
  482. done
  483. _LT_OUTPUT_LIBTOOL_INIT
  484. ])
  485. # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
  486. # ------------------------------------
  487. # Generate a child script FILE with all initialization necessary to
  488. # reuse the environment learned by the parent script, and make the
  489. # file executable. If COMMENT is supplied, it is inserted after the
  490. # `#!' sequence but before initialization text begins. After this
  491. # macro, additional text can be appended to FILE to form the body of
  492. # the child script. The macro ends with non-zero status if the
  493. # file could not be fully written (such as if the disk is full).
  494. m4_ifdef([AS_INIT_GENERATED],
  495. [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
  496. [m4_defun([_LT_GENERATED_FILE_INIT],
  497. [m4_require([AS_PREPARE])]dnl
  498. [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
  499. [lt_write_fail=0
  500. cat >$1 <<_ASEOF || lt_write_fail=1
  501. #! $SHELL
  502. # Generated by $as_me.
  503. $2
  504. SHELL=\${CONFIG_SHELL-$SHELL}
  505. export SHELL
  506. _ASEOF
  507. cat >>$1 <<\_ASEOF || lt_write_fail=1
  508. AS_SHELL_SANITIZE
  509. _AS_PREPARE
  510. exec AS_MESSAGE_FD>&1
  511. _ASEOF
  512. test $lt_write_fail = 0 && chmod +x $1[]dnl
  513. m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
  514. # LT_OUTPUT
  515. # ---------
  516. # This macro allows early generation of the libtool script (before
  517. # AC_OUTPUT is called), incase it is used in configure for compilation
  518. # tests.
  519. AC_DEFUN([LT_OUTPUT],
  520. [: ${CONFIG_LT=./config.lt}
  521. AC_MSG_NOTICE([creating $CONFIG_LT])
  522. _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
  523. [# Run this file to recreate a libtool stub with the current configuration.])
  524. cat >>"$CONFIG_LT" <<\_LTEOF
  525. lt_cl_silent=false
  526. exec AS_MESSAGE_LOG_FD>>config.log
  527. {
  528. echo
  529. AS_BOX([Running $as_me.])
  530. } >&AS_MESSAGE_LOG_FD
  531. lt_cl_help="\
  532. \`$as_me' creates a local libtool stub from the current configuration,
  533. for use in further configure time tests before the real libtool is
  534. generated.
  535. Usage: $[0] [[OPTIONS]]
  536. -h, --help print this help, then exit
  537. -V, --version print version number, then exit
  538. -q, --quiet do not print progress messages
  539. -d, --debug don't remove temporary files
  540. Report bugs to <bug-libtool@gnu.org>."
  541. lt_cl_version="\
  542. m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
  543. m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
  544. configured by $[0], generated by m4_PACKAGE_STRING.
  545. Copyright (C) 2011 Free Software Foundation, Inc.
  546. This config.lt script is free software; the Free Software Foundation
  547. gives unlimited permision to copy, distribute and modify it."
  548. while test $[#] != 0
  549. do
  550. case $[1] in
  551. --version | --v* | -V )
  552. echo "$lt_cl_version"; exit 0 ;;
  553. --help | --h* | -h )
  554. echo "$lt_cl_help"; exit 0 ;;
  555. --debug | --d* | -d )
  556. debug=: ;;
  557. --quiet | --q* | --silent | --s* | -q )
  558. lt_cl_silent=: ;;
  559. -*) AC_MSG_ERROR([unrecognized option: $[1]
  560. Try \`$[0] --help' for more information.]) ;;
  561. *) AC_MSG_ERROR([unrecognized argument: $[1]
  562. Try \`$[0] --help' for more information.]) ;;
  563. esac
  564. shift
  565. done
  566. if $lt_cl_silent; then
  567. exec AS_MESSAGE_FD>/dev/null
  568. fi
  569. _LTEOF
  570. cat >>"$CONFIG_LT" <<_LTEOF
  571. _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
  572. _LTEOF
  573. cat >>"$CONFIG_LT" <<\_LTEOF
  574. AC_MSG_NOTICE([creating $ofile])
  575. _LT_OUTPUT_LIBTOOL_COMMANDS
  576. AS_EXIT(0)
  577. _LTEOF
  578. chmod +x "$CONFIG_LT"
  579. # configure is writing to config.log, but config.lt does its own redirection,
  580. # appending to config.log, which fails on DOS, as config.log is still kept
  581. # open by configure. Here we exec the FD to /dev/null, effectively closing
  582. # config.log, so it can be properly (re)opened and appended to by config.lt.
  583. lt_cl_success=:
  584. test "$silent" = yes &&
  585. lt_config_lt_args="$lt_config_lt_args --quiet"
  586. exec AS_MESSAGE_LOG_FD>/dev/null
  587. $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
  588. exec AS_MESSAGE_LOG_FD>>config.log
  589. $lt_cl_success || AS_EXIT(1)
  590. ])# LT_OUTPUT
  591. # _LT_CONFIG(TAG)
  592. # ---------------
  593. # If TAG is the built-in tag, create an initial libtool script with a
  594. # default configuration from the untagged config vars. Otherwise add code
  595. # to config.status for appending the configuration named by TAG from the
  596. # matching tagged config vars.
  597. m4_defun([_LT_CONFIG],
  598. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  599. _LT_CONFIG_SAVE_COMMANDS([
  600. m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
  601. m4_if(_LT_TAG, [C], [
  602. # See if we are running on zsh, and set the options which allow our
  603. # commands through without removal of \ escapes.
  604. if test -n "${ZSH_VERSION+set}" ; then
  605. setopt NO_GLOB_SUBST
  606. fi
  607. cfgfile="${ofile}T"
  608. trap "$RM \"$cfgfile\"; exit 1" 1 2 15
  609. $RM "$cfgfile"
  610. cat <<_LT_EOF >> "$cfgfile"
  611. #! $SHELL
  612. # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
  613. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
  614. # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  615. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  616. #
  617. _LT_COPYING
  618. _LT_LIBTOOL_TAGS
  619. # ### BEGIN LIBTOOL CONFIG
  620. _LT_LIBTOOL_CONFIG_VARS
  621. _LT_LIBTOOL_TAG_VARS
  622. # ### END LIBTOOL CONFIG
  623. _LT_EOF
  624. case $host_os in
  625. aix3*)
  626. cat <<\_LT_EOF >> "$cfgfile"
  627. # AIX sometimes has problems with the GCC collect2 program. For some
  628. # reason, if we set the COLLECT_NAMES environment variable, the problems
  629. # vanish in a puff of smoke.
  630. if test "X${COLLECT_NAMES+set}" != Xset; then
  631. COLLECT_NAMES=
  632. export COLLECT_NAMES
  633. fi
  634. _LT_EOF
  635. ;;
  636. esac
  637. _LT_PROG_LTMAIN
  638. # We use sed instead of cat because bash on DJGPP gets confused if
  639. # if finds mixed CR/LF and LF-only lines. Since sed operates in
  640. # text mode, it properly converts lines to CR/LF. This bash problem
  641. # is reportedly fixed, but why not run on old versions too?
  642. sed '$q' "$ltmain" >> "$cfgfile" \
  643. || (rm -f "$cfgfile"; exit 1)
  644. _LT_PROG_REPLACE_SHELLFNS
  645. mv -f "$cfgfile" "$ofile" ||
  646. (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
  647. chmod +x "$ofile"
  648. ],
  649. [cat <<_LT_EOF >> "$ofile"
  650. dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
  651. dnl in a comment (ie after a #).
  652. # ### BEGIN LIBTOOL TAG CONFIG: $1
  653. _LT_LIBTOOL_TAG_VARS(_LT_TAG)
  654. # ### END LIBTOOL TAG CONFIG: $1
  655. _LT_EOF
  656. ])dnl /m4_if
  657. ],
  658. [m4_if([$1], [], [
  659. PACKAGE='$PACKAGE'
  660. VERSION='$VERSION'
  661. TIMESTAMP='$TIMESTAMP'
  662. RM='$RM'
  663. ofile='$ofile'], [])
  664. ])dnl /_LT_CONFIG_SAVE_COMMANDS
  665. ])# _LT_CONFIG
  666. # LT_SUPPORTED_TAG(TAG)
  667. # ---------------------
  668. # Trace this macro to discover what tags are supported by the libtool
  669. # --tag option, using:
  670. # autoconf --trace 'LT_SUPPORTED_TAG:$1'
  671. AC_DEFUN([LT_SUPPORTED_TAG], [])
  672. # C support is built-in for now
  673. m4_define([_LT_LANG_C_enabled], [])
  674. m4_define([_LT_TAGS], [])
  675. # LT_LANG(LANG)
  676. # -------------
  677. # Enable libtool support for the given language if not already enabled.
  678. AC_DEFUN([LT_LANG],
  679. [AC_BEFORE([$0], [LT_OUTPUT])dnl
  680. m4_case([$1],
  681. [C], [_LT_LANG(C)],
  682. [C++], [_LT_LANG(CXX)],
  683. [Go], [_LT_LANG(GO)],
  684. [Java], [_LT_LANG(GCJ)],
  685. [Fortran 77], [_LT_LANG(F77)],
  686. [Fortran], [_LT_LANG(FC)],
  687. [Windows Resource], [_LT_LANG(RC)],
  688. [m4_ifdef([_LT_LANG_]$1[_CONFIG],
  689. [_LT_LANG($1)],
  690. [m4_fatal([$0: unsupported language: "$1"])])])dnl
  691. ])# LT_LANG
  692. # _LT_LANG(LANGNAME)
  693. # ------------------
  694. m4_defun([_LT_LANG],
  695. [m4_ifdef([_LT_LANG_]$1[_enabled], [],
  696. [LT_SUPPORTED_TAG([$1])dnl
  697. m4_append([_LT_TAGS], [$1 ])dnl
  698. m4_define([_LT_LANG_]$1[_enabled], [])dnl
  699. _LT_LANG_$1_CONFIG($1)])dnl
  700. ])# _LT_LANG
  701. m4_ifndef([AC_PROG_GO], [
  702. # NOTE: This macro has been submitted for inclusion into #
  703. # GNU Autoconf as AC_PROG_GO. When it is available in #
  704. # a released version of Autoconf we should remove this #
  705. # macro and use it instead. #
  706. m4_defun([AC_PROG_GO],
  707. [AC_LANG_PUSH(Go)dnl
  708. AC_ARG_VAR([GOC], [Go compiler command])dnl
  709. AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
  710. _AC_ARG_VAR_LDFLAGS()dnl
  711. AC_CHECK_TOOL(GOC, gccgo)
  712. if test -z "$GOC"; then
  713. if test -n "$ac_tool_prefix"; then
  714. AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
  715. fi
  716. fi
  717. if test -z "$GOC"; then
  718. AC_CHECK_PROG(GOC, gccgo, gccgo, false)
  719. fi
  720. ])#m4_defun
  721. ])#m4_ifndef
  722. # _LT_LANG_DEFAULT_CONFIG
  723. # -----------------------
  724. m4_defun([_LT_LANG_DEFAULT_CONFIG],
  725. [AC_PROVIDE_IFELSE([AC_PROG_CXX],
  726. [LT_LANG(CXX)],
  727. [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
  728. AC_PROVIDE_IFELSE([AC_PROG_F77],
  729. [LT_LANG(F77)],
  730. [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
  731. AC_PROVIDE_IFELSE([AC_PROG_FC],
  732. [LT_LANG(FC)],
  733. [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
  734. dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
  735. dnl pulling things in needlessly.
  736. AC_PROVIDE_IFELSE([AC_PROG_GCJ],
  737. [LT_LANG(GCJ)],
  738. [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
  739. [LT_LANG(GCJ)],
  740. [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
  741. [LT_LANG(GCJ)],
  742. [m4_ifdef([AC_PROG_GCJ],
  743. [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
  744. m4_ifdef([A][M_PROG_GCJ],
  745. [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
  746. m4_ifdef([LT_PROG_GCJ],
  747. [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
  748. AC_PROVIDE_IFELSE([AC_PROG_GO],
  749. [LT_LANG(GO)],
  750. [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
  751. AC_PROVIDE_IFELSE([LT_PROG_RC],
  752. [LT_LANG(RC)],
  753. [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
  754. ])# _LT_LANG_DEFAULT_CONFIG
  755. # Obsolete macros:
  756. AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
  757. AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
  758. AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
  759. AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
  760. AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
  761. dnl aclocal-1.4 backwards compatibility:
  762. dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
  763. dnl AC_DEFUN([AC_LIBTOOL_F77], [])
  764. dnl AC_DEFUN([AC_LIBTOOL_FC], [])
  765. dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
  766. dnl AC_DEFUN([AC_LIBTOOL_RC], [])
  767. # _LT_TAG_COMPILER
  768. # ----------------
  769. m4_defun([_LT_TAG_COMPILER],
  770. [AC_REQUIRE([AC_PROG_CC])dnl
  771. _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
  772. _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
  773. _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
  774. _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
  775. # If no C compiler was specified, use CC.
  776. LTCC=${LTCC-"$CC"}
  777. # If no C compiler flags were specified, use CFLAGS.
  778. LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
  779. # Allow CC to be a program name with arguments.
  780. compiler=$CC
  781. ])# _LT_TAG_COMPILER
  782. # _LT_COMPILER_BOILERPLATE
  783. # ------------------------
  784. # Check for compiler boilerplate output or warnings with
  785. # the simple compiler test code.
  786. m4_defun([_LT_COMPILER_BOILERPLATE],
  787. [m4_require([_LT_DECL_SED])dnl
  788. ac_outfile=conftest.$ac_objext
  789. echo "$lt_simple_compile_test_code" >conftest.$ac_ext
  790. eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  791. _lt_compiler_boilerplate=`cat conftest.err`
  792. $RM conftest*
  793. ])# _LT_COMPILER_BOILERPLATE
  794. # _LT_LINKER_BOILERPLATE
  795. # ----------------------
  796. # Check for linker boilerplate output or warnings with
  797. # the simple link test code.
  798. m4_defun([_LT_LINKER_BOILERPLATE],
  799. [m4_require([_LT_DECL_SED])dnl
  800. ac_outfile=conftest.$ac_objext
  801. echo "$lt_simple_link_test_code" >conftest.$ac_ext
  802. eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  803. _lt_linker_boilerplate=`cat conftest.err`
  804. $RM -r conftest*
  805. ])# _LT_LINKER_BOILERPLATE
  806. # _LT_REQUIRED_DARWIN_CHECKS
  807. # -------------------------
  808. m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
  809. case $host_os in
  810. rhapsody* | darwin*)
  811. AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
  812. AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
  813. AC_CHECK_TOOL([LIPO], [lipo], [:])
  814. AC_CHECK_TOOL([OTOOL], [otool], [:])
  815. AC_CHECK_TOOL([OTOOL64], [otool64], [:])
  816. _LT_DECL([], [DSYMUTIL], [1],
  817. [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
  818. _LT_DECL([], [NMEDIT], [1],
  819. [Tool to change global to local symbols on Mac OS X])
  820. _LT_DECL([], [LIPO], [1],
  821. [Tool to manipulate fat objects and archives on Mac OS X])
  822. _LT_DECL([], [OTOOL], [1],
  823. [ldd/readelf like tool for Mach-O binaries on Mac OS X])
  824. _LT_DECL([], [OTOOL64], [1],
  825. [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
  826. AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
  827. [lt_cv_apple_cc_single_mod=no
  828. if test -z "${LT_MULTI_MODULE}"; then
  829. # By default we will add the -single_module flag. You can override
  830. # by either setting the environment variable LT_MULTI_MODULE
  831. # non-empty at configure time, or by adding -multi_module to the
  832. # link flags.
  833. rm -rf libconftest.dylib*
  834. echo "int foo(void){return 1;}" > conftest.c
  835. echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  836. -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
  837. $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  838. -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
  839. _lt_result=$?
  840. # If there is a non-empty error log, and "single_module"
  841. # appears in it, assume the flag caused a linker warning
  842. if test -s conftest.err && $GREP single_module conftest.err; then
  843. cat conftest.err >&AS_MESSAGE_LOG_FD
  844. # Otherwise, if the output was created with a 0 exit code from
  845. # the compiler, it worked.
  846. elif test -f libconftest.dylib && test $_lt_result -eq 0; then
  847. lt_cv_apple_cc_single_mod=yes
  848. else
  849. cat conftest.err >&AS_MESSAGE_LOG_FD
  850. fi
  851. rm -rf libconftest.dylib*
  852. rm -f conftest.*
  853. fi])
  854. AC_CACHE_CHECK([for -exported_symbols_list linker flag],
  855. [lt_cv_ld_exported_symbols_list],
  856. [lt_cv_ld_exported_symbols_list=no
  857. save_LDFLAGS=$LDFLAGS
  858. echo "_main" > conftest.sym
  859. LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
  860. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  861. [lt_cv_ld_exported_symbols_list=yes],
  862. [lt_cv_ld_exported_symbols_list=no])
  863. LDFLAGS="$save_LDFLAGS"
  864. ])
  865. AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
  866. [lt_cv_ld_force_load=no
  867. cat > conftest.c << _LT_EOF
  868. int forced_loaded() { return 2;}
  869. _LT_EOF
  870. echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
  871. $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
  872. echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
  873. $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
  874. echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
  875. $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
  876. cat > conftest.c << _LT_EOF
  877. int main() { return 0;}
  878. _LT_EOF
  879. echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
  880. $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
  881. _lt_result=$?
  882. if test -s conftest.err && $GREP force_load conftest.err; then
  883. cat conftest.err >&AS_MESSAGE_LOG_FD
  884. elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
  885. lt_cv_ld_force_load=yes
  886. else
  887. cat conftest.err >&AS_MESSAGE_LOG_FD
  888. fi
  889. rm -f conftest.err libconftest.a conftest conftest.c
  890. rm -rf conftest.dSYM
  891. ])
  892. case $host_os in
  893. rhapsody* | darwin1.[[012]])
  894. _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
  895. darwin1.*)
  896. _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
  897. darwin*) # darwin 5.x on
  898. # if running on 10.5 or later, the deployment target defaults
  899. # to the OS version, if on x86, and 10.4, the deployment
  900. # target defaults to 10.4. Don't you love it?
  901. case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
  902. 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
  903. _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
  904. 10.[[012]]*)
  905. _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
  906. 10.*)
  907. _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
  908. esac
  909. ;;
  910. esac
  911. if test "$lt_cv_apple_cc_single_mod" = "yes"; then
  912. _lt_dar_single_mod='$single_module'
  913. fi
  914. if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
  915. _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
  916. else
  917. _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
  918. fi
  919. if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
  920. _lt_dsymutil='~$DSYMUTIL $lib || :'
  921. else
  922. _lt_dsymutil=
  923. fi
  924. ;;
  925. esac
  926. ])
  927. # _LT_DARWIN_LINKER_FEATURES([TAG])
  928. # ---------------------------------
  929. # Checks for linker and compiler features on darwin
  930. m4_defun([_LT_DARWIN_LINKER_FEATURES],
  931. [
  932. m4_require([_LT_REQUIRED_DARWIN_CHECKS])
  933. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  934. _LT_TAGVAR(hardcode_direct, $1)=no
  935. _LT_TAGVAR(hardcode_automatic, $1)=yes
  936. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  937. if test "$lt_cv_ld_force_load" = "yes"; then
  938. _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
  939. m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
  940. [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
  941. else
  942. _LT_TAGVAR(whole_archive_flag_spec, $1)=''
  943. fi
  944. _LT_TAGVAR(link_all_deplibs, $1)=yes
  945. _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
  946. case $cc_basename in
  947. ifort*) _lt_dar_can_shared=yes ;;
  948. *) _lt_dar_can_shared=$GCC ;;
  949. esac
  950. if test "$_lt_dar_can_shared" = "yes"; then
  951. output_verbose_link_cmd=func_echo_all
  952. _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
  953. _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
  954. _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
  955. _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
  956. m4_if([$1], [CXX],
  957. [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
  958. _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
  959. _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
  960. fi
  961. ],[])
  962. else
  963. _LT_TAGVAR(ld_shlibs, $1)=no
  964. fi
  965. ])
  966. # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
  967. # ----------------------------------
  968. # Links a minimal program and checks the executable
  969. # for the system default hardcoded library path. In most cases,
  970. # this is /usr/lib:/lib, but when the MPI compilers are used
  971. # the location of the communication and MPI libs are included too.
  972. # If we don't find anything, use the default library path according
  973. # to the aix ld manual.
  974. # Store the results from the different compilers for each TAGNAME.
  975. # Allow to override them for all tags through lt_cv_aix_libpath.
  976. m4_defun([_LT_SYS_MODULE_PATH_AIX],
  977. [m4_require([_LT_DECL_SED])dnl
  978. if test "${lt_cv_aix_libpath+set}" = set; then
  979. aix_libpath=$lt_cv_aix_libpath
  980. else
  981. AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
  982. [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
  983. lt_aix_libpath_sed='[
  984. /Import File Strings/,/^$/ {
  985. /^0/ {
  986. s/^0 *\([^ ]*\) *$/\1/
  987. p
  988. }
  989. }]'
  990. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  991. # Check for a 64-bit object if we didn't find anything.
  992. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
  993. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  994. fi],[])
  995. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
  996. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
  997. fi
  998. ])
  999. aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
  1000. fi
  1001. ])# _LT_SYS_MODULE_PATH_AIX
  1002. # _LT_SHELL_INIT(ARG)
  1003. # -------------------
  1004. m4_define([_LT_SHELL_INIT],
  1005. [m4_divert_text([M4SH-INIT], [$1
  1006. ])])# _LT_SHELL_INIT
  1007. # _LT_PROG_ECHO_BACKSLASH
  1008. # -----------------------
  1009. # Find how we can fake an echo command that does not interpret backslash.
  1010. # In particular, with Autoconf 2.60 or later we add some code to the start
  1011. # of the generated configure script which will find a shell with a builtin
  1012. # printf (which we can use as an echo command).
  1013. m4_defun([_LT_PROG_ECHO_BACKSLASH],
  1014. [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  1015. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  1016. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  1017. AC_MSG_CHECKING([how to print strings])
  1018. # Test print first, because it will be a builtin if present.
  1019. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
  1020. test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
  1021. ECHO='print -r --'
  1022. elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
  1023. ECHO='printf %s\n'
  1024. else
  1025. # Use this function as a fallback that always works.
  1026. func_fallback_echo ()
  1027. {
  1028. eval 'cat <<_LTECHO_EOF
  1029. $[]1
  1030. _LTECHO_EOF'
  1031. }
  1032. ECHO='func_fallback_echo'
  1033. fi
  1034. # func_echo_all arg...
  1035. # Invoke $ECHO with all args, space-separated.
  1036. func_echo_all ()
  1037. {
  1038. $ECHO "$*"
  1039. }
  1040. case "$ECHO" in
  1041. printf*) AC_MSG_RESULT([printf]) ;;
  1042. print*) AC_MSG_RESULT([print -r]) ;;
  1043. *) AC_MSG_RESULT([cat]) ;;
  1044. esac
  1045. m4_ifdef([_AS_DETECT_SUGGESTED],
  1046. [_AS_DETECT_SUGGESTED([
  1047. test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
  1048. ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  1049. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  1050. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  1051. PATH=/empty FPATH=/empty; export PATH FPATH
  1052. test "X`printf %s $ECHO`" = "X$ECHO" \
  1053. || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
  1054. _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
  1055. _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
  1056. ])# _LT_PROG_ECHO_BACKSLASH
  1057. # _LT_WITH_SYSROOT
  1058. # ----------------
  1059. AC_DEFUN([_LT_WITH_SYSROOT],
  1060. [AC_MSG_CHECKING([for sysroot])
  1061. AC_ARG_WITH([sysroot],
  1062. [ --with-sysroot[=DIR] Search for dependent libraries within DIR
  1063. (or the compiler's sysroot if not specified).],
  1064. [], [with_sysroot=no])
  1065. dnl lt_sysroot will always be passed unquoted. We quote it here
  1066. dnl in case the user passed a directory name.
  1067. lt_sysroot=
  1068. case ${with_sysroot} in #(
  1069. yes)
  1070. if test "$GCC" = yes; then
  1071. lt_sysroot=`$CC --print-sysroot 2>/dev/null`
  1072. fi
  1073. ;; #(
  1074. /*)
  1075. lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
  1076. ;; #(
  1077. no|'')
  1078. ;; #(
  1079. *)
  1080. AC_MSG_RESULT([${with_sysroot}])
  1081. AC_MSG_ERROR([The sysroot must be an absolute path.])
  1082. ;;
  1083. esac
  1084. AC_MSG_RESULT([${lt_sysroot:-no}])
  1085. _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
  1086. [dependent libraries, and in which our libraries should be installed.])])
  1087. # _LT_ENABLE_LOCK
  1088. # ---------------
  1089. m4_defun([_LT_ENABLE_LOCK],
  1090. [AC_ARG_ENABLE([libtool-lock],
  1091. [AS_HELP_STRING([--disable-libtool-lock],
  1092. [avoid locking (might break parallel builds)])])
  1093. test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  1094. # Some flags need to be propagated to the compiler or linker for good
  1095. # libtool support.
  1096. case $host in
  1097. ia64-*-hpux*)
  1098. # Find out which ABI we are using.
  1099. echo 'int i;' > conftest.$ac_ext
  1100. if AC_TRY_EVAL(ac_compile); then
  1101. case `/usr/bin/file conftest.$ac_objext` in
  1102. *ELF-32*)
  1103. HPUX_IA64_MODE="32"
  1104. ;;
  1105. *ELF-64*)
  1106. HPUX_IA64_MODE="64"
  1107. ;;
  1108. esac
  1109. fi
  1110. rm -rf conftest*
  1111. ;;
  1112. *-*-irix6*)
  1113. # Find out which ABI we are using.
  1114. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
  1115. if AC_TRY_EVAL(ac_compile); then
  1116. if test "$lt_cv_prog_gnu_ld" = yes; then
  1117. case `/usr/bin/file conftest.$ac_objext` in
  1118. *32-bit*)
  1119. LD="${LD-ld} -melf32bsmip"
  1120. ;;
  1121. *N32*)
  1122. LD="${LD-ld} -melf32bmipn32"
  1123. ;;
  1124. *64-bit*)
  1125. LD="${LD-ld} -melf64bmip"
  1126. ;;
  1127. esac
  1128. else
  1129. case `/usr/bin/file conftest.$ac_objext` in
  1130. *32-bit*)
  1131. LD="${LD-ld} -32"
  1132. ;;
  1133. *N32*)
  1134. LD="${LD-ld} -n32"
  1135. ;;
  1136. *64-bit*)
  1137. LD="${LD-ld} -64"
  1138. ;;
  1139. esac
  1140. fi
  1141. fi
  1142. rm -rf conftest*
  1143. ;;
  1144. x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
  1145. s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
  1146. # Find out which ABI we are using.
  1147. echo 'int i;' > conftest.$ac_ext
  1148. if AC_TRY_EVAL(ac_compile); then
  1149. case `/usr/bin/file conftest.o` in
  1150. *32-bit*)
  1151. case $host in
  1152. x86_64-*kfreebsd*-gnu)
  1153. LD="${LD-ld} -m elf_i386_fbsd"
  1154. ;;
  1155. x86_64-*linux*)
  1156. LD="${LD-ld} -m elf_i386"
  1157. ;;
  1158. ppc64-*linux*|powerpc64-*linux*)
  1159. LD="${LD-ld} -m elf32ppclinux"
  1160. ;;
  1161. s390x-*linux*)
  1162. LD="${LD-ld} -m elf_s390"
  1163. ;;
  1164. sparc64-*linux*)
  1165. LD="${LD-ld} -m elf32_sparc"
  1166. ;;
  1167. esac
  1168. ;;
  1169. *64-bit*)
  1170. case $host in
  1171. x86_64-*kfreebsd*-gnu)
  1172. LD="${LD-ld} -m elf_x86_64_fbsd"
  1173. ;;
  1174. x86_64-*linux*)
  1175. LD="${LD-ld} -m elf_x86_64"
  1176. ;;
  1177. ppc*-*linux*|powerpc*-*linux*)
  1178. LD="${LD-ld} -m elf64ppc"
  1179. ;;
  1180. s390*-*linux*|s390*-*tpf*)
  1181. LD="${LD-ld} -m elf64_s390"
  1182. ;;
  1183. sparc*-*linux*)
  1184. LD="${LD-ld} -m elf64_sparc"
  1185. ;;
  1186. esac
  1187. ;;
  1188. esac
  1189. fi
  1190. rm -rf conftest*
  1191. ;;
  1192. *-*-sco3.2v5*)
  1193. # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  1194. SAVE_CFLAGS="$CFLAGS"
  1195. CFLAGS="$CFLAGS -belf"
  1196. AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
  1197. [AC_LANG_PUSH(C)
  1198. AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
  1199. AC_LANG_POP])
  1200. if test x"$lt_cv_cc_needs_belf" != x"yes"; then
  1201. # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  1202. CFLAGS="$SAVE_CFLAGS"
  1203. fi
  1204. ;;
  1205. *-*solaris*)
  1206. # Find out which ABI we are using.
  1207. echo 'int i;' > conftest.$ac_ext
  1208. if AC_TRY_EVAL(ac_compile); then
  1209. case `/usr/bin/file conftest.o` in
  1210. *64-bit*)
  1211. case $lt_cv_prog_gnu_ld in
  1212. yes*)
  1213. case $host in
  1214. i?86-*-solaris*)
  1215. LD="${LD-ld} -m elf_x86_64"
  1216. ;;
  1217. sparc*-*-solaris*)
  1218. LD="${LD-ld} -m elf64_sparc"
  1219. ;;
  1220. esac
  1221. # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
  1222. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
  1223. LD="${LD-ld}_sol2"
  1224. fi
  1225. ;;
  1226. *)
  1227. if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
  1228. LD="${LD-ld} -64"
  1229. fi
  1230. ;;
  1231. esac
  1232. ;;
  1233. esac
  1234. fi
  1235. rm -rf conftest*
  1236. ;;
  1237. esac
  1238. need_locks="$enable_libtool_lock"
  1239. ])# _LT_ENABLE_LOCK
  1240. # _LT_PROG_AR
  1241. # -----------
  1242. m4_defun([_LT_PROG_AR],
  1243. [AC_CHECK_TOOLS(AR, [ar], false)
  1244. : ${AR=ar}
  1245. : ${AR_FLAGS=cru}
  1246. _LT_DECL([], [AR], [1], [The archiver])
  1247. _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
  1248. AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
  1249. [lt_cv_ar_at_file=no
  1250. AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
  1251. [echo conftest.$ac_objext > conftest.lst
  1252. lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
  1253. AC_TRY_EVAL([lt_ar_try])
  1254. if test "$ac_status" -eq 0; then
  1255. # Ensure the archiver fails upon bogus file names.
  1256. rm -f conftest.$ac_objext libconftest.a
  1257. AC_TRY_EVAL([lt_ar_try])
  1258. if test "$ac_status" -ne 0; then
  1259. lt_cv_ar_at_file=@
  1260. fi
  1261. fi
  1262. rm -f conftest.* libconftest.a
  1263. ])
  1264. ])
  1265. if test "x$lt_cv_ar_at_file" = xno; then
  1266. archiver_list_spec=
  1267. else
  1268. archiver_list_spec=$lt_cv_ar_at_file
  1269. fi
  1270. _LT_DECL([], [archiver_list_spec], [1],
  1271. [How to feed a file listing to the archiver])
  1272. ])# _LT_PROG_AR
  1273. # _LT_CMD_OLD_ARCHIVE
  1274. # -------------------
  1275. m4_defun([_LT_CMD_OLD_ARCHIVE],
  1276. [_LT_PROG_AR
  1277. AC_CHECK_TOOL(STRIP, strip, :)
  1278. test -z "$STRIP" && STRIP=:
  1279. _LT_DECL([], [STRIP], [1], [A symbol stripping program])
  1280. AC_CHECK_TOOL(RANLIB, ranlib, :)
  1281. test -z "$RANLIB" && RANLIB=:
  1282. _LT_DECL([], [RANLIB], [1],
  1283. [Commands used to install an old-style archive])
  1284. # Determine commands to create old-style static archives.
  1285. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
  1286. old_postinstall_cmds='chmod 644 $oldlib'
  1287. old_postuninstall_cmds=
  1288. if test -n "$RANLIB"; then
  1289. case $host_os in
  1290. openbsd*)
  1291. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
  1292. ;;
  1293. *)
  1294. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
  1295. ;;
  1296. esac
  1297. old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
  1298. fi
  1299. case $host_os in
  1300. darwin*)
  1301. lock_old_archive_extraction=yes ;;
  1302. *)
  1303. lock_old_archive_extraction=no ;;
  1304. esac
  1305. _LT_DECL([], [old_postinstall_cmds], [2])
  1306. _LT_DECL([], [old_postuninstall_cmds], [2])
  1307. _LT_TAGDECL([], [old_archive_cmds], [2],
  1308. [Commands used to build an old-style archive])
  1309. _LT_DECL([], [lock_old_archive_extraction], [0],
  1310. [Whether to use a lock for old archive extraction])
  1311. ])# _LT_CMD_OLD_ARCHIVE
  1312. # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  1313. # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
  1314. # ----------------------------------------------------------------
  1315. # Check whether the given compiler option works
  1316. AC_DEFUN([_LT_COMPILER_OPTION],
  1317. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1318. m4_require([_LT_DECL_SED])dnl
  1319. AC_CACHE_CHECK([$1], [$2],
  1320. [$2=no
  1321. m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
  1322. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  1323. lt_compiler_flag="$3"
  1324. # Insert the option either (1) after the last *FLAGS variable, or
  1325. # (2) before a word containing "conftest.", or (3) at the end.
  1326. # Note that $ac_compile itself does not contain backslashes and begins
  1327. # with a dollar sign (not a hyphen), so the echo should work correctly.
  1328. # The option is referenced via a variable to avoid confusing sed.
  1329. lt_compile=`echo "$ac_compile" | $SED \
  1330. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  1331. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  1332. -e 's:$: $lt_compiler_flag:'`
  1333. (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  1334. (eval "$lt_compile" 2>conftest.err)
  1335. ac_status=$?
  1336. cat conftest.err >&AS_MESSAGE_LOG_FD
  1337. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  1338. if (exit $ac_status) && test -s "$ac_outfile"; then
  1339. # The compiler can only warn and ignore the option if not recognized
  1340. # So say no if there are warnings other than the usual output.
  1341. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
  1342. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  1343. if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
  1344. $2=yes
  1345. fi
  1346. fi
  1347. $RM conftest*
  1348. ])
  1349. if test x"[$]$2" = xyes; then
  1350. m4_if([$5], , :, [$5])
  1351. else
  1352. m4_if([$6], , :, [$6])
  1353. fi
  1354. ])# _LT_COMPILER_OPTION
  1355. # Old name:
  1356. AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
  1357. dnl aclocal-1.4 backwards compatibility:
  1358. dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
  1359. # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  1360. # [ACTION-SUCCESS], [ACTION-FAILURE])
  1361. # ----------------------------------------------------
  1362. # Check whether the given linker option works
  1363. AC_DEFUN([_LT_LINKER_OPTION],
  1364. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1365. m4_require([_LT_DECL_SED])dnl
  1366. AC_CACHE_CHECK([$1], [$2],
  1367. [$2=no
  1368. save_LDFLAGS="$LDFLAGS"
  1369. LDFLAGS="$LDFLAGS $3"
  1370. echo "$lt_simple_link_test_code" > conftest.$ac_ext
  1371. if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
  1372. # The linker can only warn and ignore the option if not recognized
  1373. # So say no if there are warnings
  1374. if test -s conftest.err; then
  1375. # Append any errors to the config.log.
  1376. cat conftest.err 1>&AS_MESSAGE_LOG_FD
  1377. $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
  1378. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  1379. if diff conftest.exp conftest.er2 >/dev/null; then
  1380. $2=yes
  1381. fi
  1382. else
  1383. $2=yes
  1384. fi
  1385. fi
  1386. $RM -r conftest*
  1387. LDFLAGS="$save_LDFLAGS"
  1388. ])
  1389. if test x"[$]$2" = xyes; then
  1390. m4_if([$4], , :, [$4])
  1391. else
  1392. m4_if([$5], , :, [$5])
  1393. fi
  1394. ])# _LT_LINKER_OPTION
  1395. # Old name:
  1396. AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
  1397. dnl aclocal-1.4 backwards compatibility:
  1398. dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
  1399. # LT_CMD_MAX_LEN
  1400. #---------------
  1401. AC_DEFUN([LT_CMD_MAX_LEN],
  1402. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  1403. # find the maximum length of command line arguments
  1404. AC_MSG_CHECKING([the maximum length of command line arguments])
  1405. AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
  1406. i=0
  1407. teststring="ABCD"
  1408. case $build_os in
  1409. msdosdjgpp*)
  1410. # On DJGPP, this test can blow up pretty badly due to problems in libc
  1411. # (any single argument exceeding 2000 bytes causes a buffer overrun
  1412. # during glob expansion). Even if it were fixed, the result of this
  1413. # check would be larger than it should be.
  1414. lt_cv_sys_max_cmd_len=12288; # 12K is about right
  1415. ;;
  1416. gnu*)
  1417. # Under GNU Hurd, this test is not required because there is
  1418. # no limit to the length of command line arguments.
  1419. # Libtool will interpret -1 as no limit whatsoever
  1420. lt_cv_sys_max_cmd_len=-1;
  1421. ;;
  1422. cygwin* | mingw* | cegcc*)
  1423. # On Win9x/ME, this test blows up -- it succeeds, but takes
  1424. # about 5 minutes as the teststring grows exponentially.
  1425. # Worse, since 9x/ME are not pre-emptively multitasking,
  1426. # you end up with a "frozen" computer, even though with patience
  1427. # the test eventually succeeds (with a max line length of 256k).
  1428. # Instead, let's just punt: use the minimum linelength reported by
  1429. # all of the supported platforms: 8192 (on NT/2K/XP).
  1430. lt_cv_sys_max_cmd_len=8192;
  1431. ;;
  1432. mint*)
  1433. # On MiNT this can take a long time and run out of memory.
  1434. lt_cv_sys_max_cmd_len=8192;
  1435. ;;
  1436. amigaos*)
  1437. # On AmigaOS with pdksh, this test takes hours, literally.
  1438. # So we just punt and use a minimum line length of 8192.
  1439. lt_cv_sys_max_cmd_len=8192;
  1440. ;;
  1441. netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
  1442. # This has been around since 386BSD, at least. Likely further.
  1443. if test -x /sbin/sysctl; then
  1444. lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
  1445. elif test -x /usr/sbin/sysctl; then
  1446. lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
  1447. else
  1448. lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
  1449. fi
  1450. # And add a safety zone
  1451. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  1452. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  1453. ;;
  1454. interix*)
  1455. # We know the value 262144 and hardcode it with a safety zone (like BSD)
  1456. lt_cv_sys_max_cmd_len=196608
  1457. ;;
  1458. os2*)
  1459. # The test takes a long time on OS/2.
  1460. lt_cv_sys_max_cmd_len=8192
  1461. ;;
  1462. osf*)
  1463. # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
  1464. # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
  1465. # nice to cause kernel panics so lets avoid the loop below.
  1466. # First set a reasonable default.
  1467. lt_cv_sys_max_cmd_len=16384
  1468. #
  1469. if test -x /sbin/sysconfig; then
  1470. case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
  1471. *1*) lt_cv_sys_max_cmd_len=-1 ;;
  1472. esac
  1473. fi
  1474. ;;
  1475. sco3.2v5*)
  1476. lt_cv_sys_max_cmd_len=102400
  1477. ;;
  1478. sysv5* | sco5v6* | sysv4.2uw2*)
  1479. kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
  1480. if test -n "$kargmax"; then
  1481. lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
  1482. else
  1483. lt_cv_sys_max_cmd_len=32768
  1484. fi
  1485. ;;
  1486. *)
  1487. lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
  1488. if test -n "$lt_cv_sys_max_cmd_len"; then
  1489. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  1490. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  1491. else
  1492. # Make teststring a little bigger before we do anything with it.
  1493. # a 1K string should be a reasonable start.
  1494. for i in 1 2 3 4 5 6 7 8 ; do
  1495. teststring=$teststring$teststring
  1496. done
  1497. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
  1498. # If test is not a shell built-in, we'll probably end up computing a
  1499. # maximum length that is only half of the actual maximum length, but
  1500. # we can't tell.
  1501. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
  1502. = "X$teststring$teststring"; } >/dev/null 2>&1 &&
  1503. test $i != 17 # 1/2 MB should be enough
  1504. do
  1505. i=`expr $i + 1`
  1506. teststring=$teststring$teststring
  1507. done
  1508. # Only check the string length outside the loop.
  1509. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
  1510. teststring=
  1511. # Add a significant safety factor because C++ compilers can tack on
  1512. # massive amounts of additional arguments before passing them to the
  1513. # linker. It appears as though 1/2 is a usable value.
  1514. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
  1515. fi
  1516. ;;
  1517. esac
  1518. ])
  1519. if test -n $lt_cv_sys_max_cmd_len ; then
  1520. AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
  1521. else
  1522. AC_MSG_RESULT(none)
  1523. fi
  1524. max_cmd_len=$lt_cv_sys_max_cmd_len
  1525. _LT_DECL([], [max_cmd_len], [0],
  1526. [What is the maximum length of a command?])
  1527. ])# LT_CMD_MAX_LEN
  1528. # Old name:
  1529. AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
  1530. dnl aclocal-1.4 backwards compatibility:
  1531. dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
  1532. # _LT_HEADER_DLFCN
  1533. # ----------------
  1534. m4_defun([_LT_HEADER_DLFCN],
  1535. [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
  1536. ])# _LT_HEADER_DLFCN
  1537. # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
  1538. # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
  1539. # ----------------------------------------------------------------
  1540. m4_defun([_LT_TRY_DLOPEN_SELF],
  1541. [m4_require([_LT_HEADER_DLFCN])dnl
  1542. if test "$cross_compiling" = yes; then :
  1543. [$4]
  1544. else
  1545. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  1546. lt_status=$lt_dlunknown
  1547. cat > conftest.$ac_ext <<_LT_EOF
  1548. [#line $LINENO "configure"
  1549. #include "confdefs.h"
  1550. #if HAVE_DLFCN_H
  1551. #include <dlfcn.h>
  1552. #endif
  1553. #include <stdio.h>
  1554. #ifdef RTLD_GLOBAL
  1555. # define LT_DLGLOBAL RTLD_GLOBAL
  1556. #else
  1557. # ifdef DL_GLOBAL
  1558. # define LT_DLGLOBAL DL_GLOBAL
  1559. # else
  1560. # define LT_DLGLOBAL 0
  1561. # endif
  1562. #endif
  1563. /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
  1564. find out it does not work in some platform. */
  1565. #ifndef LT_DLLAZY_OR_NOW
  1566. # ifdef RTLD_LAZY
  1567. # define LT_DLLAZY_OR_NOW RTLD_LAZY
  1568. # else
  1569. # ifdef DL_LAZY
  1570. # define LT_DLLAZY_OR_NOW DL_LAZY
  1571. # else
  1572. # ifdef RTLD_NOW
  1573. # define LT_DLLAZY_OR_NOW RTLD_NOW
  1574. # else
  1575. # ifdef DL_NOW
  1576. # define LT_DLLAZY_OR_NOW DL_NOW
  1577. # else
  1578. # define LT_DLLAZY_OR_NOW 0
  1579. # endif
  1580. # endif
  1581. # endif
  1582. # endif
  1583. #endif
  1584. /* When -fvisbility=hidden is used, assume the code has been annotated
  1585. correspondingly for the symbols needed. */
  1586. #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
  1587. int fnord () __attribute__((visibility("default")));
  1588. #endif
  1589. int fnord () { return 42; }
  1590. int main ()
  1591. {
  1592. void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  1593. int status = $lt_dlunknown;
  1594. if (self)
  1595. {
  1596. if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
  1597. else
  1598. {
  1599. if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
  1600. else puts (dlerror ());
  1601. }
  1602. /* dlclose (self); */
  1603. }
  1604. else
  1605. puts (dlerror ());
  1606. return status;
  1607. }]
  1608. _LT_EOF
  1609. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
  1610. (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
  1611. lt_status=$?
  1612. case x$lt_status in
  1613. x$lt_dlno_uscore) $1 ;;
  1614. x$lt_dlneed_uscore) $2 ;;
  1615. x$lt_dlunknown|x*) $3 ;;
  1616. esac
  1617. else :
  1618. # compilation failed
  1619. $3
  1620. fi
  1621. fi
  1622. rm -fr conftest*
  1623. ])# _LT_TRY_DLOPEN_SELF
  1624. # LT_SYS_DLOPEN_SELF
  1625. # ------------------
  1626. AC_DEFUN([LT_SYS_DLOPEN_SELF],
  1627. [m4_require([_LT_HEADER_DLFCN])dnl
  1628. if test "x$enable_dlopen" != xyes; then
  1629. enable_dlopen=unknown
  1630. enable_dlopen_self=unknown
  1631. enable_dlopen_self_static=unknown
  1632. else
  1633. lt_cv_dlopen=no
  1634. lt_cv_dlopen_libs=
  1635. case $host_os in
  1636. beos*)
  1637. lt_cv_dlopen="load_add_on"
  1638. lt_cv_dlopen_libs=
  1639. lt_cv_dlopen_self=yes
  1640. ;;
  1641. mingw* | pw32* | cegcc*)
  1642. lt_cv_dlopen="LoadLibrary"
  1643. lt_cv_dlopen_libs=
  1644. ;;
  1645. cygwin*)
  1646. lt_cv_dlopen="dlopen"
  1647. lt_cv_dlopen_libs=
  1648. ;;
  1649. darwin*)
  1650. # if libdl is installed we need to link against it
  1651. AC_CHECK_LIB([dl], [dlopen],
  1652. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
  1653. lt_cv_dlopen="dyld"
  1654. lt_cv_dlopen_libs=
  1655. lt_cv_dlopen_self=yes
  1656. ])
  1657. ;;
  1658. *)
  1659. AC_CHECK_FUNC([shl_load],
  1660. [lt_cv_dlopen="shl_load"],
  1661. [AC_CHECK_LIB([dld], [shl_load],
  1662. [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
  1663. [AC_CHECK_FUNC([dlopen],
  1664. [lt_cv_dlopen="dlopen"],
  1665. [AC_CHECK_LIB([dl], [dlopen],
  1666. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
  1667. [AC_CHECK_LIB([svld], [dlopen],
  1668. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
  1669. [AC_CHECK_LIB([dld], [dld_link],
  1670. [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
  1671. ])
  1672. ])
  1673. ])
  1674. ])
  1675. ])
  1676. ;;
  1677. esac
  1678. if test "x$lt_cv_dlopen" != xno; then
  1679. enable_dlopen=yes
  1680. else
  1681. enable_dlopen=no
  1682. fi
  1683. case $lt_cv_dlopen in
  1684. dlopen)
  1685. save_CPPFLAGS="$CPPFLAGS"
  1686. test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  1687. save_LDFLAGS="$LDFLAGS"
  1688. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  1689. save_LIBS="$LIBS"
  1690. LIBS="$lt_cv_dlopen_libs $LIBS"
  1691. AC_CACHE_CHECK([whether a program can dlopen itself],
  1692. lt_cv_dlopen_self, [dnl
  1693. _LT_TRY_DLOPEN_SELF(
  1694. lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
  1695. lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
  1696. ])
  1697. if test "x$lt_cv_dlopen_self" = xyes; then
  1698. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
  1699. AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
  1700. lt_cv_dlopen_self_static, [dnl
  1701. _LT_TRY_DLOPEN_SELF(
  1702. lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
  1703. lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
  1704. ])
  1705. fi
  1706. CPPFLAGS="$save_CPPFLAGS"
  1707. LDFLAGS="$save_LDFLAGS"
  1708. LIBS="$save_LIBS"
  1709. ;;
  1710. esac
  1711. case $lt_cv_dlopen_self in
  1712. yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  1713. *) enable_dlopen_self=unknown ;;
  1714. esac
  1715. case $lt_cv_dlopen_self_static in
  1716. yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  1717. *) enable_dlopen_self_static=unknown ;;
  1718. esac
  1719. fi
  1720. _LT_DECL([dlopen_support], [enable_dlopen], [0],
  1721. [Whether dlopen is supported])
  1722. _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
  1723. [Whether dlopen of programs is supported])
  1724. _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
  1725. [Whether dlopen of statically linked programs is supported])
  1726. ])# LT_SYS_DLOPEN_SELF
  1727. # Old name:
  1728. AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
  1729. dnl aclocal-1.4 backwards compatibility:
  1730. dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
  1731. # _LT_COMPILER_C_O([TAGNAME])
  1732. # ---------------------------
  1733. # Check to see if options -c and -o are simultaneously supported by compiler.
  1734. # This macro does not hard code the compiler like AC_PROG_CC_C_O.
  1735. m4_defun([_LT_COMPILER_C_O],
  1736. [m4_require([_LT_DECL_SED])dnl
  1737. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1738. m4_require([_LT_TAG_COMPILER])dnl
  1739. AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
  1740. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
  1741. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
  1742. $RM -r conftest 2>/dev/null
  1743. mkdir conftest
  1744. cd conftest
  1745. mkdir out
  1746. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  1747. lt_compiler_flag="-o out/conftest2.$ac_objext"
  1748. # Insert the option either (1) after the last *FLAGS variable, or
  1749. # (2) before a word containing "conftest.", or (3) at the end.
  1750. # Note that $ac_compile itself does not contain backslashes and begins
  1751. # with a dollar sign (not a hyphen), so the echo should work correctly.
  1752. lt_compile=`echo "$ac_compile" | $SED \
  1753. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  1754. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  1755. -e 's:$: $lt_compiler_flag:'`
  1756. (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  1757. (eval "$lt_compile" 2>out/conftest.err)
  1758. ac_status=$?
  1759. cat out/conftest.err >&AS_MESSAGE_LOG_FD
  1760. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  1761. if (exit $ac_status) && test -s out/conftest2.$ac_objext
  1762. then
  1763. # The compiler can only warn and ignore the option if not recognized
  1764. # So say no if there are warnings
  1765. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
  1766. $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
  1767. if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
  1768. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  1769. fi
  1770. fi
  1771. chmod u+w . 2>&AS_MESSAGE_LOG_FD
  1772. $RM conftest*
  1773. # SGI C++ compiler will create directory out/ii_files/ for
  1774. # template instantiation
  1775. test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
  1776. $RM out/* && rmdir out
  1777. cd ..
  1778. $RM -r conftest
  1779. $RM conftest*
  1780. ])
  1781. _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
  1782. [Does compiler simultaneously support -c and -o options?])
  1783. ])# _LT_COMPILER_C_O
  1784. # _LT_COMPILER_FILE_LOCKS([TAGNAME])
  1785. # ----------------------------------
  1786. # Check to see if we can do hard links to lock some files if needed
  1787. m4_defun([_LT_COMPILER_FILE_LOCKS],
  1788. [m4_require([_LT_ENABLE_LOCK])dnl
  1789. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1790. _LT_COMPILER_C_O([$1])
  1791. hard_links="nottested"
  1792. if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
  1793. # do not overwrite the value of need_locks provided by the user
  1794. AC_MSG_CHECKING([if we can lock with hard links])
  1795. hard_links=yes
  1796. $RM conftest*
  1797. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1798. touch conftest.a
  1799. ln conftest.a conftest.b 2>&5 || hard_links=no
  1800. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1801. AC_MSG_RESULT([$hard_links])
  1802. if test "$hard_links" = no; then
  1803. AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
  1804. need_locks=warn
  1805. fi
  1806. else
  1807. need_locks=no
  1808. fi
  1809. _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
  1810. ])# _LT_COMPILER_FILE_LOCKS
  1811. # _LT_CHECK_OBJDIR
  1812. # ----------------
  1813. m4_defun([_LT_CHECK_OBJDIR],
  1814. [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
  1815. [rm -f .libs 2>/dev/null
  1816. mkdir .libs 2>/dev/null
  1817. if test -d .libs; then
  1818. lt_cv_objdir=.libs
  1819. else
  1820. # MS-DOS does not allow filenames that begin with a dot.
  1821. lt_cv_objdir=_libs
  1822. fi
  1823. rmdir .libs 2>/dev/null])
  1824. objdir=$lt_cv_objdir
  1825. _LT_DECL([], [objdir], [0],
  1826. [The name of the directory that contains temporary libtool files])dnl
  1827. m4_pattern_allow([LT_OBJDIR])dnl
  1828. AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
  1829. [Define to the sub-directory in which libtool stores uninstalled libraries.])
  1830. ])# _LT_CHECK_OBJDIR
  1831. # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
  1832. # --------------------------------------
  1833. # Check hardcoding attributes.
  1834. m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
  1835. [AC_MSG_CHECKING([how to hardcode library paths into programs])
  1836. _LT_TAGVAR(hardcode_action, $1)=
  1837. if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
  1838. test -n "$_LT_TAGVAR(runpath_var, $1)" ||
  1839. test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
  1840. # We can hardcode non-existent directories.
  1841. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
  1842. # If the only mechanism to avoid hardcoding is shlibpath_var, we
  1843. # have to relink, otherwise we might link with an installed library
  1844. # when we should be linking with a yet-to-be-installed one
  1845. ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
  1846. test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
  1847. # Linking always hardcodes the temporary library directory.
  1848. _LT_TAGVAR(hardcode_action, $1)=relink
  1849. else
  1850. # We can link without hardcoding, and we can hardcode nonexisting dirs.
  1851. _LT_TAGVAR(hardcode_action, $1)=immediate
  1852. fi
  1853. else
  1854. # We cannot hardcode anything, or else we can only hardcode existing
  1855. # directories.
  1856. _LT_TAGVAR(hardcode_action, $1)=unsupported
  1857. fi
  1858. AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
  1859. if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
  1860. test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
  1861. # Fast installation is not supported
  1862. enable_fast_install=no
  1863. elif test "$shlibpath_overrides_runpath" = yes ||
  1864. test "$enable_shared" = no; then
  1865. # Fast installation is not necessary
  1866. enable_fast_install=needless
  1867. fi
  1868. _LT_TAGDECL([], [hardcode_action], [0],
  1869. [How to hardcode a shared library path into an executable])
  1870. ])# _LT_LINKER_HARDCODE_LIBPATH
  1871. # _LT_CMD_STRIPLIB
  1872. # ----------------
  1873. m4_defun([_LT_CMD_STRIPLIB],
  1874. [m4_require([_LT_DECL_EGREP])
  1875. striplib=
  1876. old_striplib=
  1877. AC_MSG_CHECKING([whether stripping libraries is possible])
  1878. if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
  1879. test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
  1880. test -z "$striplib" && striplib="$STRIP --strip-unneeded"
  1881. AC_MSG_RESULT([yes])
  1882. else
  1883. # FIXME - insert some real tests, host_os isn't really good enough
  1884. case $host_os in
  1885. darwin*)
  1886. if test -n "$STRIP" ; then
  1887. striplib="$STRIP -x"
  1888. old_striplib="$STRIP -S"
  1889. AC_MSG_RESULT([yes])
  1890. else
  1891. AC_MSG_RESULT([no])
  1892. fi
  1893. ;;
  1894. *)
  1895. AC_MSG_RESULT([no])
  1896. ;;
  1897. esac
  1898. fi
  1899. _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
  1900. _LT_DECL([], [striplib], [1])
  1901. ])# _LT_CMD_STRIPLIB
  1902. # _LT_SYS_DYNAMIC_LINKER([TAG])
  1903. # -----------------------------
  1904. # PORTME Fill in your ld.so characteristics
  1905. m4_defun([_LT_SYS_DYNAMIC_LINKER],
  1906. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  1907. m4_require([_LT_DECL_EGREP])dnl
  1908. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1909. m4_require([_LT_DECL_OBJDUMP])dnl
  1910. m4_require([_LT_DECL_SED])dnl
  1911. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  1912. AC_MSG_CHECKING([dynamic linker characteristics])
  1913. m4_if([$1],
  1914. [], [
  1915. if test "$GCC" = yes; then
  1916. case $host_os in
  1917. darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
  1918. *) lt_awk_arg="/^libraries:/" ;;
  1919. esac
  1920. case $host_os in
  1921. mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
  1922. *) lt_sed_strip_eq="s,=/,/,g" ;;
  1923. esac
  1924. lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
  1925. case $lt_search_path_spec in
  1926. *\;*)
  1927. # if the path contains ";" then we assume it to be the separator
  1928. # otherwise default to the standard path separator (i.e. ":") - it is
  1929. # assumed that no part of a normal pathname contains ";" but that should
  1930. # okay in the real world where ";" in dirpaths is itself problematic.
  1931. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
  1932. ;;
  1933. *)
  1934. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
  1935. ;;
  1936. esac
  1937. # Ok, now we have the path, separated by spaces, we can step through it
  1938. # and add multilib dir if necessary.
  1939. lt_tmp_lt_search_path_spec=
  1940. lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
  1941. for lt_sys_path in $lt_search_path_spec; do
  1942. if test -d "$lt_sys_path/$lt_multi_os_dir"; then
  1943. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
  1944. else
  1945. test -d "$lt_sys_path" && \
  1946. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
  1947. fi
  1948. done
  1949. lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
  1950. BEGIN {RS=" "; FS="/|\n";} {
  1951. lt_foo="";
  1952. lt_count=0;
  1953. for (lt_i = NF; lt_i > 0; lt_i--) {
  1954. if ($lt_i != "" && $lt_i != ".") {
  1955. if ($lt_i == "..") {
  1956. lt_count++;
  1957. } else {
  1958. if (lt_count == 0) {
  1959. lt_foo="/" $lt_i lt_foo;
  1960. } else {
  1961. lt_count--;
  1962. }
  1963. }
  1964. }
  1965. }
  1966. if (lt_foo != "") { lt_freq[[lt_foo]]++; }
  1967. if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
  1968. }'`
  1969. # AWK program above erroneously prepends '/' to C:/dos/paths
  1970. # for these hosts.
  1971. case $host_os in
  1972. mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
  1973. $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
  1974. esac
  1975. sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
  1976. else
  1977. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  1978. fi])
  1979. library_names_spec=
  1980. libname_spec='lib$name'
  1981. soname_spec=
  1982. shrext_cmds=".so"
  1983. postinstall_cmds=
  1984. postuninstall_cmds=
  1985. finish_cmds=
  1986. finish_eval=
  1987. shlibpath_var=
  1988. shlibpath_overrides_runpath=unknown
  1989. version_type=none
  1990. dynamic_linker="$host_os ld.so"
  1991. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  1992. need_lib_prefix=unknown
  1993. hardcode_into_libs=no
  1994. # when you set need_version to no, make sure it does not cause -set_version
  1995. # flags to be left without arguments
  1996. need_version=unknown
  1997. case $host_os in
  1998. aix3*)
  1999. version_type=linux # correct to gnu/linux during the next big refactor
  2000. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
  2001. shlibpath_var=LIBPATH
  2002. # AIX 3 has no versioning support, so we append a major version to the name.
  2003. soname_spec='${libname}${release}${shared_ext}$major'
  2004. ;;
  2005. aix[[4-9]]*)
  2006. version_type=linux # correct to gnu/linux during the next big refactor
  2007. need_lib_prefix=no
  2008. need_version=no
  2009. hardcode_into_libs=yes
  2010. if test "$host_cpu" = ia64; then
  2011. # AIX 5 supports IA64
  2012. library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
  2013. shlibpath_var=LD_LIBRARY_PATH
  2014. else
  2015. # With GCC up to 2.95.x, collect2 would create an import file
  2016. # for dependence libraries. The import file would start with
  2017. # the line `#! .'. This would cause the generated library to
  2018. # depend on `.', always an invalid library. This was fixed in
  2019. # development snapshots of GCC prior to 3.0.
  2020. case $host_os in
  2021. aix4 | aix4.[[01]] | aix4.[[01]].*)
  2022. if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
  2023. echo ' yes '
  2024. echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
  2025. :
  2026. else
  2027. can_build_shared=no
  2028. fi
  2029. ;;
  2030. esac
  2031. # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
  2032. # soname into executable. Probably we can add versioning support to
  2033. # collect2, so additional links can be useful in future.
  2034. if test "$aix_use_runtimelinking" = yes; then
  2035. # If using run time linking (on AIX 4.2 or later) use lib<name>.so
  2036. # instead of lib<name>.a to let people know that these are not
  2037. # typical AIX shared libraries.
  2038. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2039. else
  2040. # We preserve .a as extension for shared libraries through AIX4.2
  2041. # and later when we are not doing run time linking.
  2042. library_names_spec='${libname}${release}.a $libname.a'
  2043. soname_spec='${libname}${release}${shared_ext}$major'
  2044. fi
  2045. shlibpath_var=LIBPATH
  2046. fi
  2047. ;;
  2048. amigaos*)
  2049. case $host_cpu in
  2050. powerpc)
  2051. # Since July 2007 AmigaOS4 officially supports .so libraries.
  2052. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
  2053. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2054. ;;
  2055. m68k)
  2056. library_names_spec='$libname.ixlibrary $libname.a'
  2057. # Create ${libname}_ixlibrary.a entries in /sys/libs.
  2058. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''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'
  2059. ;;
  2060. esac
  2061. ;;
  2062. beos*)
  2063. library_names_spec='${libname}${shared_ext}'
  2064. dynamic_linker="$host_os ld.so"
  2065. shlibpath_var=LIBRARY_PATH
  2066. ;;
  2067. bsdi[[45]]*)
  2068. version_type=linux # correct to gnu/linux during the next big refactor
  2069. need_version=no
  2070. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2071. soname_spec='${libname}${release}${shared_ext}$major'
  2072. finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  2073. shlibpath_var=LD_LIBRARY_PATH
  2074. sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  2075. sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  2076. # the default ld.so.conf also contains /usr/contrib/lib and
  2077. # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  2078. # libtool to hard-code these into programs
  2079. ;;
  2080. cygwin* | mingw* | pw32* | cegcc*)
  2081. version_type=windows
  2082. shrext_cmds=".dll"
  2083. need_version=no
  2084. need_lib_prefix=no
  2085. case $GCC,$cc_basename in
  2086. yes,*)
  2087. # gcc
  2088. library_names_spec='$libname.dll.a'
  2089. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  2090. postinstall_cmds='base_file=`basename \${file}`~
  2091. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
  2092. dldir=$destdir/`dirname \$dlpath`~
  2093. test -d \$dldir || mkdir -p \$dldir~
  2094. $install_prog $dir/$dlname \$dldir/$dlname~
  2095. chmod a+x \$dldir/$dlname~
  2096. if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
  2097. eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
  2098. fi'
  2099. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  2100. dlpath=$dir/\$dldll~
  2101. $RM \$dlpath'
  2102. shlibpath_overrides_runpath=yes
  2103. case $host_os in
  2104. cygwin*)
  2105. # Cygwin DLLs use 'cyg' prefix rather than 'lib'
  2106. soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  2107. m4_if([$1], [],[
  2108. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
  2109. ;;
  2110. mingw* | cegcc*)
  2111. # MinGW DLLs use traditional 'lib' prefix
  2112. soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  2113. ;;
  2114. pw32*)
  2115. # pw32 DLLs use 'pw' prefix rather than 'lib'
  2116. library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  2117. ;;
  2118. esac
  2119. dynamic_linker='Win32 ld.exe'
  2120. ;;
  2121. *,cl*)
  2122. # Native MSVC
  2123. libname_spec='$name'
  2124. soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  2125. library_names_spec='${libname}.dll.lib'
  2126. case $build_os in
  2127. mingw*)
  2128. sys_lib_search_path_spec=
  2129. lt_save_ifs=$IFS
  2130. IFS=';'
  2131. for lt_path in $LIB
  2132. do
  2133. IFS=$lt_save_ifs
  2134. # Let DOS variable expansion print the short 8.3 style file name.
  2135. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
  2136. sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
  2137. done
  2138. IFS=$lt_save_ifs
  2139. # Convert to MSYS style.
  2140. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
  2141. ;;
  2142. cygwin*)
  2143. # Convert to unix form, then to dos form, then back to unix form
  2144. # but this time dos style (no spaces!) so that the unix form looks
  2145. # like /cygdrive/c/PROGRA~1:/cygdr...
  2146. sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
  2147. sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
  2148. sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  2149. ;;
  2150. *)
  2151. sys_lib_search_path_spec="$LIB"
  2152. if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
  2153. # It is most probably a Windows format PATH.
  2154. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  2155. else
  2156. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  2157. fi
  2158. # FIXME: find the short name or the path components, as spaces are
  2159. # common. (e.g. "Program Files" -> "PROGRA~1")
  2160. ;;
  2161. esac
  2162. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  2163. postinstall_cmds='base_file=`basename \${file}`~
  2164. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
  2165. dldir=$destdir/`dirname \$dlpath`~
  2166. test -d \$dldir || mkdir -p \$dldir~
  2167. $install_prog $dir/$dlname \$dldir/$dlname'
  2168. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  2169. dlpath=$dir/\$dldll~
  2170. $RM \$dlpath'
  2171. shlibpath_overrides_runpath=yes
  2172. dynamic_linker='Win32 link.exe'
  2173. ;;
  2174. *)
  2175. # Assume MSVC wrapper
  2176. library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
  2177. dynamic_linker='Win32 ld.exe'
  2178. ;;
  2179. esac
  2180. # FIXME: first we should search . and the directory the executable is in
  2181. shlibpath_var=PATH
  2182. ;;
  2183. darwin* | rhapsody*)
  2184. dynamic_linker="$host_os dyld"
  2185. version_type=darwin
  2186. need_lib_prefix=no
  2187. need_version=no
  2188. library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
  2189. soname_spec='${libname}${release}${major}$shared_ext'
  2190. shlibpath_overrides_runpath=yes
  2191. shlibpath_var=DYLD_LIBRARY_PATH
  2192. shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
  2193. m4_if([$1], [],[
  2194. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
  2195. sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
  2196. ;;
  2197. dgux*)
  2198. version_type=linux # correct to gnu/linux during the next big refactor
  2199. need_lib_prefix=no
  2200. need_version=no
  2201. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
  2202. soname_spec='${libname}${release}${shared_ext}$major'
  2203. shlibpath_var=LD_LIBRARY_PATH
  2204. ;;
  2205. freebsd* | dragonfly*)
  2206. # DragonFly does not have aout. When/if they implement a new
  2207. # versioning mechanism, adjust this.
  2208. if test -x /usr/bin/objformat; then
  2209. objformat=`/usr/bin/objformat`
  2210. else
  2211. case $host_os in
  2212. freebsd[[23]].*) objformat=aout ;;
  2213. *) objformat=elf ;;
  2214. esac
  2215. fi
  2216. version_type=freebsd-$objformat
  2217. case $version_type in
  2218. freebsd-elf*)
  2219. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  2220. need_version=no
  2221. need_lib_prefix=no
  2222. ;;
  2223. freebsd-*)
  2224. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
  2225. need_version=yes
  2226. ;;
  2227. esac
  2228. shlibpath_var=LD_LIBRARY_PATH
  2229. case $host_os in
  2230. freebsd2.*)
  2231. shlibpath_overrides_runpath=yes
  2232. ;;
  2233. freebsd3.[[01]]* | freebsdelf3.[[01]]*)
  2234. shlibpath_overrides_runpath=yes
  2235. hardcode_into_libs=yes
  2236. ;;
  2237. freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
  2238. freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
  2239. shlibpath_overrides_runpath=no
  2240. hardcode_into_libs=yes
  2241. ;;
  2242. *) # from 4.6 on, and DragonFly
  2243. shlibpath_overrides_runpath=yes
  2244. hardcode_into_libs=yes
  2245. ;;
  2246. esac
  2247. ;;
  2248. gnu*)
  2249. version_type=linux # correct to gnu/linux during the next big refactor
  2250. need_lib_prefix=no
  2251. need_version=no
  2252. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  2253. soname_spec='${libname}${release}${shared_ext}$major'
  2254. shlibpath_var=LD_LIBRARY_PATH
  2255. shlibpath_overrides_runpath=no
  2256. hardcode_into_libs=yes
  2257. ;;
  2258. haiku*)
  2259. version_type=linux # correct to gnu/linux during the next big refactor
  2260. need_lib_prefix=no
  2261. need_version=no
  2262. dynamic_linker="$host_os runtime_loader"
  2263. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  2264. soname_spec='${libname}${release}${shared_ext}$major'
  2265. shlibpath_var=LIBRARY_PATH
  2266. shlibpath_overrides_runpath=yes
  2267. sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
  2268. hardcode_into_libs=yes
  2269. ;;
  2270. hpux9* | hpux10* | hpux11*)
  2271. # Give a soname corresponding to the major version so that dld.sl refuses to
  2272. # link against other versions.
  2273. version_type=sunos
  2274. need_lib_prefix=no
  2275. need_version=no
  2276. case $host_cpu in
  2277. ia64*)
  2278. shrext_cmds='.so'
  2279. hardcode_into_libs=yes
  2280. dynamic_linker="$host_os dld.so"
  2281. shlibpath_var=LD_LIBRARY_PATH
  2282. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  2283. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2284. soname_spec='${libname}${release}${shared_ext}$major'
  2285. if test "X$HPUX_IA64_MODE" = X32; then
  2286. sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
  2287. else
  2288. sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
  2289. fi
  2290. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2291. ;;
  2292. hppa*64*)
  2293. shrext_cmds='.sl'
  2294. hardcode_into_libs=yes
  2295. dynamic_linker="$host_os dld.sl"
  2296. shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
  2297. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  2298. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2299. soname_spec='${libname}${release}${shared_ext}$major'
  2300. sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
  2301. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2302. ;;
  2303. *)
  2304. shrext_cmds='.sl'
  2305. dynamic_linker="$host_os dld.sl"
  2306. shlibpath_var=SHLIB_PATH
  2307. shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  2308. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2309. soname_spec='${libname}${release}${shared_ext}$major'
  2310. ;;
  2311. esac
  2312. # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
  2313. postinstall_cmds='chmod 555 $lib'
  2314. # or fails outright, so override atomically:
  2315. install_override_mode=555
  2316. ;;
  2317. interix[[3-9]]*)
  2318. version_type=linux # correct to gnu/linux during the next big refactor
  2319. need_lib_prefix=no
  2320. need_version=no
  2321. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  2322. soname_spec='${libname}${release}${shared_ext}$major'
  2323. dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
  2324. shlibpath_var=LD_LIBRARY_PATH
  2325. shlibpath_overrides_runpath=no
  2326. hardcode_into_libs=yes
  2327. ;;
  2328. irix5* | irix6* | nonstopux*)
  2329. case $host_os in
  2330. nonstopux*) version_type=nonstopux ;;
  2331. *)
  2332. if test "$lt_cv_prog_gnu_ld" = yes; then
  2333. version_type=linux # correct to gnu/linux during the next big refactor
  2334. else
  2335. version_type=irix
  2336. fi ;;
  2337. esac
  2338. need_lib_prefix=no
  2339. need_version=no
  2340. soname_spec='${libname}${release}${shared_ext}$major'
  2341. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
  2342. case $host_os in
  2343. irix5* | nonstopux*)
  2344. libsuff= shlibsuff=
  2345. ;;
  2346. *)
  2347. case $LD in # libtool.m4 will add one of these switches to LD
  2348. *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
  2349. libsuff= shlibsuff= libmagic=32-bit;;
  2350. *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
  2351. libsuff=32 shlibsuff=N32 libmagic=N32;;
  2352. *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
  2353. libsuff=64 shlibsuff=64 libmagic=64-bit;;
  2354. *) libsuff= shlibsuff= libmagic=never-match;;
  2355. esac
  2356. ;;
  2357. esac
  2358. shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  2359. shlibpath_overrides_runpath=no
  2360. sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
  2361. sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
  2362. hardcode_into_libs=yes
  2363. ;;
  2364. # No shared lib support for Linux oldld, aout, or coff.
  2365. linux*oldld* | linux*aout* | linux*coff*)
  2366. dynamic_linker=no
  2367. ;;
  2368. # This must be glibc/ELF.
  2369. linux* | k*bsd*-gnu | kopensolaris*-gnu)
  2370. version_type=linux # correct to gnu/linux during the next big refactor
  2371. need_lib_prefix=no
  2372. need_version=no
  2373. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2374. soname_spec='${libname}${release}${shared_ext}$major'
  2375. finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  2376. shlibpath_var=LD_LIBRARY_PATH
  2377. shlibpath_overrides_runpath=no
  2378. # Some binutils ld are patched to set DT_RUNPATH
  2379. AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
  2380. [lt_cv_shlibpath_overrides_runpath=no
  2381. save_LDFLAGS=$LDFLAGS
  2382. save_libdir=$libdir
  2383. eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
  2384. LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
  2385. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  2386. [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
  2387. [lt_cv_shlibpath_overrides_runpath=yes])])
  2388. LDFLAGS=$save_LDFLAGS
  2389. libdir=$save_libdir
  2390. ])
  2391. shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
  2392. # This implies no fast_install, which is unacceptable.
  2393. # Some rework will be needed to allow for fast_install
  2394. # before this can be enabled.
  2395. hardcode_into_libs=yes
  2396. # Append ld.so.conf contents to the search path
  2397. if test -f /etc/ld.so.conf; then
  2398. lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
  2399. sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
  2400. fi
  2401. # We used to test for /lib/ld.so.1 and disable shared libraries on
  2402. # powerpc, because MkLinux only supported shared libraries with the
  2403. # GNU dynamic linker. Since this was broken with cross compilers,
  2404. # most powerpc-linux boxes support dynamic linking these days and
  2405. # people can always --disable-shared, the test was removed, and we
  2406. # assume the GNU/Linux dynamic linker is in use.
  2407. dynamic_linker='GNU/Linux ld.so'
  2408. ;;
  2409. netbsd*)
  2410. version_type=sunos
  2411. need_lib_prefix=no
  2412. need_version=no
  2413. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  2414. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  2415. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2416. dynamic_linker='NetBSD (a.out) ld.so'
  2417. else
  2418. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  2419. soname_spec='${libname}${release}${shared_ext}$major'
  2420. dynamic_linker='NetBSD ld.elf_so'
  2421. fi
  2422. shlibpath_var=LD_LIBRARY_PATH
  2423. shlibpath_overrides_runpath=yes
  2424. hardcode_into_libs=yes
  2425. ;;
  2426. newsos6)
  2427. version_type=linux # correct to gnu/linux during the next big refactor
  2428. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2429. shlibpath_var=LD_LIBRARY_PATH
  2430. shlibpath_overrides_runpath=yes
  2431. ;;
  2432. *nto* | *qnx*)
  2433. version_type=qnx
  2434. need_lib_prefix=no
  2435. need_version=no
  2436. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2437. soname_spec='${libname}${release}${shared_ext}$major'
  2438. shlibpath_var=LD_LIBRARY_PATH
  2439. shlibpath_overrides_runpath=no
  2440. hardcode_into_libs=yes
  2441. dynamic_linker='ldqnx.so'
  2442. ;;
  2443. openbsd*)
  2444. version_type=sunos
  2445. sys_lib_dlsearch_path_spec="/usr/lib"
  2446. need_lib_prefix=no
  2447. # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
  2448. case $host_os in
  2449. openbsd3.3 | openbsd3.3.*) need_version=yes ;;
  2450. *) need_version=no ;;
  2451. esac
  2452. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  2453. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2454. shlibpath_var=LD_LIBRARY_PATH
  2455. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  2456. case $host_os in
  2457. openbsd2.[[89]] | openbsd2.[[89]].*)
  2458. shlibpath_overrides_runpath=no
  2459. ;;
  2460. *)
  2461. shlibpath_overrides_runpath=yes
  2462. ;;
  2463. esac
  2464. else
  2465. shlibpath_overrides_runpath=yes
  2466. fi
  2467. ;;
  2468. os2*)
  2469. libname_spec='$name'
  2470. shrext_cmds=".dll"
  2471. need_lib_prefix=no
  2472. library_names_spec='$libname${shared_ext} $libname.a'
  2473. dynamic_linker='OS/2 ld.exe'
  2474. shlibpath_var=LIBPATH
  2475. ;;
  2476. osf3* | osf4* | osf5*)
  2477. version_type=osf
  2478. need_lib_prefix=no
  2479. need_version=no
  2480. soname_spec='${libname}${release}${shared_ext}$major'
  2481. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2482. shlibpath_var=LD_LIBRARY_PATH
  2483. sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  2484. sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  2485. ;;
  2486. rdos*)
  2487. dynamic_linker=no
  2488. ;;
  2489. solaris*)
  2490. version_type=linux # correct to gnu/linux during the next big refactor
  2491. need_lib_prefix=no
  2492. need_version=no
  2493. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2494. soname_spec='${libname}${release}${shared_ext}$major'
  2495. shlibpath_var=LD_LIBRARY_PATH
  2496. shlibpath_overrides_runpath=yes
  2497. hardcode_into_libs=yes
  2498. # ldd complains unless libraries are executable
  2499. postinstall_cmds='chmod +x $lib'
  2500. ;;
  2501. sunos4*)
  2502. version_type=sunos
  2503. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  2504. finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  2505. shlibpath_var=LD_LIBRARY_PATH
  2506. shlibpath_overrides_runpath=yes
  2507. if test "$with_gnu_ld" = yes; then
  2508. need_lib_prefix=no
  2509. fi
  2510. need_version=yes
  2511. ;;
  2512. sysv4 | sysv4.3*)
  2513. version_type=linux # correct to gnu/linux during the next big refactor
  2514. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2515. soname_spec='${libname}${release}${shared_ext}$major'
  2516. shlibpath_var=LD_LIBRARY_PATH
  2517. case $host_vendor in
  2518. sni)
  2519. shlibpath_overrides_runpath=no
  2520. need_lib_prefix=no
  2521. runpath_var=LD_RUN_PATH
  2522. ;;
  2523. siemens)
  2524. need_lib_prefix=no
  2525. ;;
  2526. motorola)
  2527. need_lib_prefix=no
  2528. need_version=no
  2529. shlibpath_overrides_runpath=no
  2530. sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  2531. ;;
  2532. esac
  2533. ;;
  2534. sysv4*MP*)
  2535. if test -d /usr/nec ;then
  2536. version_type=linux # correct to gnu/linux during the next big refactor
  2537. library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
  2538. soname_spec='$libname${shared_ext}.$major'
  2539. shlibpath_var=LD_LIBRARY_PATH
  2540. fi
  2541. ;;
  2542. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  2543. version_type=freebsd-elf
  2544. need_lib_prefix=no
  2545. need_version=no
  2546. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  2547. soname_spec='${libname}${release}${shared_ext}$major'
  2548. shlibpath_var=LD_LIBRARY_PATH
  2549. shlibpath_overrides_runpath=yes
  2550. hardcode_into_libs=yes
  2551. if test "$with_gnu_ld" = yes; then
  2552. sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
  2553. else
  2554. sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
  2555. case $host_os in
  2556. sco3.2v5*)
  2557. sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
  2558. ;;
  2559. esac
  2560. fi
  2561. sys_lib_dlsearch_path_spec='/usr/lib'
  2562. ;;
  2563. tpf*)
  2564. # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
  2565. version_type=linux # correct to gnu/linux during the next big refactor
  2566. need_lib_prefix=no
  2567. need_version=no
  2568. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2569. shlibpath_var=LD_LIBRARY_PATH
  2570. shlibpath_overrides_runpath=no
  2571. hardcode_into_libs=yes
  2572. ;;
  2573. uts4*)
  2574. version_type=linux # correct to gnu/linux during the next big refactor
  2575. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2576. soname_spec='${libname}${release}${shared_ext}$major'
  2577. shlibpath_var=LD_LIBRARY_PATH
  2578. ;;
  2579. *)
  2580. dynamic_linker=no
  2581. ;;
  2582. esac
  2583. AC_MSG_RESULT([$dynamic_linker])
  2584. test "$dynamic_linker" = no && can_build_shared=no
  2585. variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  2586. if test "$GCC" = yes; then
  2587. variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  2588. fi
  2589. if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
  2590. sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
  2591. fi
  2592. if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
  2593. sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
  2594. fi
  2595. _LT_DECL([], [variables_saved_for_relink], [1],
  2596. [Variables whose values should be saved in libtool wrapper scripts and
  2597. restored at link time])
  2598. _LT_DECL([], [need_lib_prefix], [0],
  2599. [Do we need the "lib" prefix for modules?])
  2600. _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
  2601. _LT_DECL([], [version_type], [0], [Library versioning type])
  2602. _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
  2603. _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
  2604. _LT_DECL([], [shlibpath_overrides_runpath], [0],
  2605. [Is shlibpath searched before the hard-coded library search path?])
  2606. _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
  2607. _LT_DECL([], [library_names_spec], [1],
  2608. [[List of archive names. First name is the real one, the rest are links.
  2609. The last name is the one that the linker finds with -lNAME]])
  2610. _LT_DECL([], [soname_spec], [1],
  2611. [[The coded name of the library, if different from the real name]])
  2612. _LT_DECL([], [install_override_mode], [1],
  2613. [Permission mode override for installation of shared libraries])
  2614. _LT_DECL([], [postinstall_cmds], [2],
  2615. [Command to use after installation of a shared archive])
  2616. _LT_DECL([], [postuninstall_cmds], [2],
  2617. [Command to use after uninstallation of a shared archive])
  2618. _LT_DECL([], [finish_cmds], [2],
  2619. [Commands used to finish a libtool library installation in a directory])
  2620. _LT_DECL([], [finish_eval], [1],
  2621. [[As "finish_cmds", except a single script fragment to be evaled but
  2622. not shown]])
  2623. _LT_DECL([], [hardcode_into_libs], [0],
  2624. [Whether we should hardcode library paths into libraries])
  2625. _LT_DECL([], [sys_lib_search_path_spec], [2],
  2626. [Compile-time system search path for libraries])
  2627. _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
  2628. [Run-time system search path for libraries])
  2629. ])# _LT_SYS_DYNAMIC_LINKER
  2630. # _LT_PATH_TOOL_PREFIX(TOOL)
  2631. # --------------------------
  2632. # find a file program which can recognize shared library
  2633. AC_DEFUN([_LT_PATH_TOOL_PREFIX],
  2634. [m4_require([_LT_DECL_EGREP])dnl
  2635. AC_MSG_CHECKING([for $1])
  2636. AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
  2637. [case $MAGIC_CMD in
  2638. [[\\/*] | ?:[\\/]*])
  2639. lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
  2640. ;;
  2641. *)
  2642. lt_save_MAGIC_CMD="$MAGIC_CMD"
  2643. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  2644. dnl $ac_dummy forces splitting on constant user-supplied paths.
  2645. dnl POSIX.2 word splitting is done only on the output of word expansions,
  2646. dnl not every word. This closes a longstanding sh security hole.
  2647. ac_dummy="m4_if([$2], , $PATH, [$2])"
  2648. for ac_dir in $ac_dummy; do
  2649. IFS="$lt_save_ifs"
  2650. test -z "$ac_dir" && ac_dir=.
  2651. if test -f $ac_dir/$1; then
  2652. lt_cv_path_MAGIC_CMD="$ac_dir/$1"
  2653. if test -n "$file_magic_test_file"; then
  2654. case $deplibs_check_method in
  2655. "file_magic "*)
  2656. file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
  2657. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  2658. if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  2659. $EGREP "$file_magic_regex" > /dev/null; then
  2660. :
  2661. else
  2662. cat <<_LT_EOF 1>&2
  2663. *** Warning: the command libtool uses to detect shared libraries,
  2664. *** $file_magic_cmd, produces output that libtool cannot recognize.
  2665. *** The result is that libtool may fail to recognize shared libraries
  2666. *** as such. This will affect the creation of libtool libraries that
  2667. *** depend on shared libraries, but programs linked with such libtool
  2668. *** libraries will work regardless of this problem. Nevertheless, you
  2669. *** may want to report the problem to your system manager and/or to
  2670. *** bug-libtool@gnu.org
  2671. _LT_EOF
  2672. fi ;;
  2673. esac
  2674. fi
  2675. break
  2676. fi
  2677. done
  2678. IFS="$lt_save_ifs"
  2679. MAGIC_CMD="$lt_save_MAGIC_CMD"
  2680. ;;
  2681. esac])
  2682. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  2683. if test -n "$MAGIC_CMD"; then
  2684. AC_MSG_RESULT($MAGIC_CMD)
  2685. else
  2686. AC_MSG_RESULT(no)
  2687. fi
  2688. _LT_DECL([], [MAGIC_CMD], [0],
  2689. [Used to examine libraries when file_magic_cmd begins with "file"])dnl
  2690. ])# _LT_PATH_TOOL_PREFIX
  2691. # Old name:
  2692. AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
  2693. dnl aclocal-1.4 backwards compatibility:
  2694. dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
  2695. # _LT_PATH_MAGIC
  2696. # --------------
  2697. # find a file program which can recognize a shared library
  2698. m4_defun([_LT_PATH_MAGIC],
  2699. [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
  2700. if test -z "$lt_cv_path_MAGIC_CMD"; then
  2701. if test -n "$ac_tool_prefix"; then
  2702. _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
  2703. else
  2704. MAGIC_CMD=:
  2705. fi
  2706. fi
  2707. ])# _LT_PATH_MAGIC
  2708. # LT_PATH_LD
  2709. # ----------
  2710. # find the pathname to the GNU or non-GNU linker
  2711. AC_DEFUN([LT_PATH_LD],
  2712. [AC_REQUIRE([AC_PROG_CC])dnl
  2713. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2714. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  2715. m4_require([_LT_DECL_SED])dnl
  2716. m4_require([_LT_DECL_EGREP])dnl
  2717. m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
  2718. AC_ARG_WITH([gnu-ld],
  2719. [AS_HELP_STRING([--with-gnu-ld],
  2720. [assume the C compiler uses GNU ld @<:@default=no@:>@])],
  2721. [test "$withval" = no || with_gnu_ld=yes],
  2722. [with_gnu_ld=no])dnl
  2723. ac_prog=ld
  2724. if test "$GCC" = yes; then
  2725. # Check if gcc -print-prog-name=ld gives a path.
  2726. AC_MSG_CHECKING([for ld used by $CC])
  2727. case $host in
  2728. *-*-mingw*)
  2729. # gcc leaves a trailing carriage return which upsets mingw
  2730. ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  2731. *)
  2732. ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  2733. esac
  2734. case $ac_prog in
  2735. # Accept absolute paths.
  2736. [[\\/]]* | ?:[[\\/]]*)
  2737. re_direlt='/[[^/]][[^/]]*/\.\./'
  2738. # Canonicalize the pathname of ld
  2739. ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
  2740. while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
  2741. ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
  2742. done
  2743. test -z "$LD" && LD="$ac_prog"
  2744. ;;
  2745. "")
  2746. # If it fails, then pretend we aren't using GCC.
  2747. ac_prog=ld
  2748. ;;
  2749. *)
  2750. # If it is relative, then search for the first ld in PATH.
  2751. with_gnu_ld=unknown
  2752. ;;
  2753. esac
  2754. elif test "$with_gnu_ld" = yes; then
  2755. AC_MSG_CHECKING([for GNU ld])
  2756. else
  2757. AC_MSG_CHECKING([for non-GNU ld])
  2758. fi
  2759. AC_CACHE_VAL(lt_cv_path_LD,
  2760. [if test -z "$LD"; then
  2761. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  2762. for ac_dir in $PATH; do
  2763. IFS="$lt_save_ifs"
  2764. test -z "$ac_dir" && ac_dir=.
  2765. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  2766. lt_cv_path_LD="$ac_dir/$ac_prog"
  2767. # Check to see if the program is GNU ld. I'd rather use --version,
  2768. # but apparently some variants of GNU ld only accept -v.
  2769. # Break only if it was the GNU/non-GNU ld that we prefer.
  2770. case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
  2771. *GNU* | *'with BFD'*)
  2772. test "$with_gnu_ld" != no && break
  2773. ;;
  2774. *)
  2775. test "$with_gnu_ld" != yes && break
  2776. ;;
  2777. esac
  2778. fi
  2779. done
  2780. IFS="$lt_save_ifs"
  2781. else
  2782. lt_cv_path_LD="$LD" # Let the user override the test with a path.
  2783. fi])
  2784. LD="$lt_cv_path_LD"
  2785. if test -n "$LD"; then
  2786. AC_MSG_RESULT($LD)
  2787. else
  2788. AC_MSG_RESULT(no)
  2789. fi
  2790. test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  2791. _LT_PATH_LD_GNU
  2792. AC_SUBST([LD])
  2793. _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
  2794. ])# LT_PATH_LD
  2795. # Old names:
  2796. AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
  2797. AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
  2798. dnl aclocal-1.4 backwards compatibility:
  2799. dnl AC_DEFUN([AM_PROG_LD], [])
  2800. dnl AC_DEFUN([AC_PROG_LD], [])
  2801. # _LT_PATH_LD_GNU
  2802. #- --------------
  2803. m4_defun([_LT_PATH_LD_GNU],
  2804. [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
  2805. [# I'd rather use --version here, but apparently some GNU lds only accept -v.
  2806. case `$LD -v 2>&1 </dev/null` in
  2807. *GNU* | *'with BFD'*)
  2808. lt_cv_prog_gnu_ld=yes
  2809. ;;
  2810. *)
  2811. lt_cv_prog_gnu_ld=no
  2812. ;;
  2813. esac])
  2814. with_gnu_ld=$lt_cv_prog_gnu_ld
  2815. ])# _LT_PATH_LD_GNU
  2816. # _LT_CMD_RELOAD
  2817. # --------------
  2818. # find reload flag for linker
  2819. # -- PORTME Some linkers may need a different reload flag.
  2820. m4_defun([_LT_CMD_RELOAD],
  2821. [AC_CACHE_CHECK([for $LD option to reload object files],
  2822. lt_cv_ld_reload_flag,
  2823. [lt_cv_ld_reload_flag='-r'])
  2824. reload_flag=$lt_cv_ld_reload_flag
  2825. case $reload_flag in
  2826. "" | " "*) ;;
  2827. *) reload_flag=" $reload_flag" ;;
  2828. esac
  2829. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  2830. case $host_os in
  2831. cygwin* | mingw* | pw32* | cegcc*)
  2832. if test "$GCC" != yes; then
  2833. reload_cmds=false
  2834. fi
  2835. ;;
  2836. darwin*)
  2837. if test "$GCC" = yes; then
  2838. reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
  2839. else
  2840. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  2841. fi
  2842. ;;
  2843. esac
  2844. _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
  2845. _LT_TAGDECL([], [reload_cmds], [2])dnl
  2846. ])# _LT_CMD_RELOAD
  2847. # _LT_CHECK_MAGIC_METHOD
  2848. # ----------------------
  2849. # how to check for library dependencies
  2850. # -- PORTME fill in with the dynamic library characteristics
  2851. m4_defun([_LT_CHECK_MAGIC_METHOD],
  2852. [m4_require([_LT_DECL_EGREP])
  2853. m4_require([_LT_DECL_OBJDUMP])
  2854. AC_CACHE_CHECK([how to recognize dependent libraries],
  2855. lt_cv_deplibs_check_method,
  2856. [lt_cv_file_magic_cmd='$MAGIC_CMD'
  2857. lt_cv_file_magic_test_file=
  2858. lt_cv_deplibs_check_method='unknown'
  2859. # Need to set the preceding variable on all platforms that support
  2860. # interlibrary dependencies.
  2861. # 'none' -- dependencies not supported.
  2862. # `unknown' -- same as none, but documents that we really don't know.
  2863. # 'pass_all' -- all dependencies passed with no checks.
  2864. # 'test_compile' -- check by making test program.
  2865. # 'file_magic [[regex]]' -- check by looking for files in library path
  2866. # which responds to the $file_magic_cmd with a given extended regex.
  2867. # If you have `file' or equivalent on your system and you're not sure
  2868. # whether `pass_all' will *always* work, you probably want this one.
  2869. case $host_os in
  2870. aix[[4-9]]*)
  2871. lt_cv_deplibs_check_method=pass_all
  2872. ;;
  2873. beos*)
  2874. lt_cv_deplibs_check_method=pass_all
  2875. ;;
  2876. bsdi[[45]]*)
  2877. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
  2878. lt_cv_file_magic_cmd='/usr/bin/file -L'
  2879. lt_cv_file_magic_test_file=/shlib/libc.so
  2880. ;;
  2881. cygwin*)
  2882. # func_win32_libid is a shell function defined in ltmain.sh
  2883. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  2884. lt_cv_file_magic_cmd='func_win32_libid'
  2885. ;;
  2886. mingw* | pw32*)
  2887. # Base MSYS/MinGW do not provide the 'file' command needed by
  2888. # func_win32_libid shell function, so use a weaker test based on 'objdump',
  2889. # unless we find 'file', for example because we are cross-compiling.
  2890. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
  2891. if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
  2892. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  2893. lt_cv_file_magic_cmd='func_win32_libid'
  2894. else
  2895. # Keep this pattern in sync with the one in func_win32_libid.
  2896. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
  2897. lt_cv_file_magic_cmd='$OBJDUMP -f'
  2898. fi
  2899. ;;
  2900. cegcc*)
  2901. # use the weaker test based on 'objdump'. See mingw*.
  2902. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
  2903. lt_cv_file_magic_cmd='$OBJDUMP -f'
  2904. ;;
  2905. darwin* | rhapsody*)
  2906. lt_cv_deplibs_check_method=pass_all
  2907. ;;
  2908. freebsd* | dragonfly*)
  2909. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  2910. case $host_cpu in
  2911. i*86 )
  2912. # Not sure whether the presence of OpenBSD here was a mistake.
  2913. # Let's accept both of them until this is cleared up.
  2914. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
  2915. lt_cv_file_magic_cmd=/usr/bin/file
  2916. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  2917. ;;
  2918. esac
  2919. else
  2920. lt_cv_deplibs_check_method=pass_all
  2921. fi
  2922. ;;
  2923. gnu*)
  2924. lt_cv_deplibs_check_method=pass_all
  2925. ;;
  2926. haiku*)
  2927. lt_cv_deplibs_check_method=pass_all
  2928. ;;
  2929. hpux10.20* | hpux11*)
  2930. lt_cv_file_magic_cmd=/usr/bin/file
  2931. case $host_cpu in
  2932. ia64*)
  2933. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
  2934. lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
  2935. ;;
  2936. hppa*64*)
  2937. [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
  2938. lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
  2939. ;;
  2940. *)
  2941. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
  2942. lt_cv_file_magic_test_file=/usr/lib/libc.sl
  2943. ;;
  2944. esac
  2945. ;;
  2946. interix[[3-9]]*)
  2947. # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
  2948. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
  2949. ;;
  2950. irix5* | irix6* | nonstopux*)
  2951. case $LD in
  2952. *-32|*"-32 ") libmagic=32-bit;;
  2953. *-n32|*"-n32 ") libmagic=N32;;
  2954. *-64|*"-64 ") libmagic=64-bit;;
  2955. *) libmagic=never-match;;
  2956. esac
  2957. lt_cv_deplibs_check_method=pass_all
  2958. ;;
  2959. # This must be glibc/ELF.
  2960. linux* | k*bsd*-gnu | kopensolaris*-gnu)
  2961. lt_cv_deplibs_check_method=pass_all
  2962. ;;
  2963. netbsd*)
  2964. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  2965. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  2966. else
  2967. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
  2968. fi
  2969. ;;
  2970. newos6*)
  2971. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
  2972. lt_cv_file_magic_cmd=/usr/bin/file
  2973. lt_cv_file_magic_test_file=/usr/lib/libnls.so
  2974. ;;
  2975. *nto* | *qnx*)
  2976. lt_cv_deplibs_check_method=pass_all
  2977. ;;
  2978. openbsd*)
  2979. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  2980. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
  2981. else
  2982. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  2983. fi
  2984. ;;
  2985. osf3* | osf4* | osf5*)
  2986. lt_cv_deplibs_check_method=pass_all
  2987. ;;
  2988. rdos*)
  2989. lt_cv_deplibs_check_method=pass_all
  2990. ;;
  2991. solaris*)
  2992. lt_cv_deplibs_check_method=pass_all
  2993. ;;
  2994. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  2995. lt_cv_deplibs_check_method=pass_all
  2996. ;;
  2997. sysv4 | sysv4.3*)
  2998. case $host_vendor in
  2999. motorola)
  3000. 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]]'
  3001. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  3002. ;;
  3003. ncr)
  3004. lt_cv_deplibs_check_method=pass_all
  3005. ;;
  3006. sequent)
  3007. lt_cv_file_magic_cmd='/bin/file'
  3008. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
  3009. ;;
  3010. sni)
  3011. lt_cv_file_magic_cmd='/bin/file'
  3012. lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
  3013. lt_cv_file_magic_test_file=/lib/libc.so
  3014. ;;
  3015. siemens)
  3016. lt_cv_deplibs_check_method=pass_all
  3017. ;;
  3018. pc)
  3019. lt_cv_deplibs_check_method=pass_all
  3020. ;;
  3021. esac
  3022. ;;
  3023. tpf*)
  3024. lt_cv_deplibs_check_method=pass_all
  3025. ;;
  3026. esac
  3027. ])
  3028. file_magic_glob=
  3029. want_nocaseglob=no
  3030. if test "$build" = "$host"; then
  3031. case $host_os in
  3032. mingw* | pw32*)
  3033. if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
  3034. want_nocaseglob=yes
  3035. else
  3036. file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
  3037. fi
  3038. ;;
  3039. esac
  3040. fi
  3041. file_magic_cmd=$lt_cv_file_magic_cmd
  3042. deplibs_check_method=$lt_cv_deplibs_check_method
  3043. test -z "$deplibs_check_method" && deplibs_check_method=unknown
  3044. _LT_DECL([], [deplibs_check_method], [1],
  3045. [Method to check whether dependent libraries are shared objects])
  3046. _LT_DECL([], [file_magic_cmd], [1],
  3047. [Command to use when deplibs_check_method = "file_magic"])
  3048. _LT_DECL([], [file_magic_glob], [1],
  3049. [How to find potential files when deplibs_check_method = "file_magic"])
  3050. _LT_DECL([], [want_nocaseglob], [1],
  3051. [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
  3052. ])# _LT_CHECK_MAGIC_METHOD
  3053. # LT_PATH_NM
  3054. # ----------
  3055. # find the pathname to a BSD- or MS-compatible name lister
  3056. AC_DEFUN([LT_PATH_NM],
  3057. [AC_REQUIRE([AC_PROG_CC])dnl
  3058. AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
  3059. [if test -n "$NM"; then
  3060. # Let the user override the test.
  3061. lt_cv_path_NM="$NM"
  3062. else
  3063. lt_nm_to_check="${ac_tool_prefix}nm"
  3064. if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
  3065. lt_nm_to_check="$lt_nm_to_check nm"
  3066. fi
  3067. for lt_tmp_nm in $lt_nm_to_check; do
  3068. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  3069. for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
  3070. IFS="$lt_save_ifs"
  3071. test -z "$ac_dir" && ac_dir=.
  3072. tmp_nm="$ac_dir/$lt_tmp_nm"
  3073. if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
  3074. # Check to see if the nm accepts a BSD-compat flag.
  3075. # Adding the `sed 1q' prevents false positives on HP-UX, which says:
  3076. # nm: unknown option "B" ignored
  3077. # Tru64's nm complains that /dev/null is an invalid object file
  3078. case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
  3079. */dev/null* | *'Invalid file or object type'*)
  3080. lt_cv_path_NM="$tmp_nm -B"
  3081. break
  3082. ;;
  3083. *)
  3084. case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
  3085. */dev/null*)
  3086. lt_cv_path_NM="$tmp_nm -p"
  3087. break
  3088. ;;
  3089. *)
  3090. lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
  3091. continue # so that we can try to find one that supports BSD flags
  3092. ;;
  3093. esac
  3094. ;;
  3095. esac
  3096. fi
  3097. done
  3098. IFS="$lt_save_ifs"
  3099. done
  3100. : ${lt_cv_path_NM=no}
  3101. fi])
  3102. if test "$lt_cv_path_NM" != "no"; then
  3103. NM="$lt_cv_path_NM"
  3104. else
  3105. # Didn't find any BSD compatible name lister, look for dumpbin.
  3106. if test -n "$DUMPBIN"; then :
  3107. # Let the user override the test.
  3108. else
  3109. AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
  3110. case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
  3111. *COFF*)
  3112. DUMPBIN="$DUMPBIN -symbols"
  3113. ;;
  3114. *)
  3115. DUMPBIN=:
  3116. ;;
  3117. esac
  3118. fi
  3119. AC_SUBST([DUMPBIN])
  3120. if test "$DUMPBIN" != ":"; then
  3121. NM="$DUMPBIN"
  3122. fi
  3123. fi
  3124. test -z "$NM" && NM=nm
  3125. AC_SUBST([NM])
  3126. _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
  3127. AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
  3128. [lt_cv_nm_interface="BSD nm"
  3129. echo "int some_variable = 0;" > conftest.$ac_ext
  3130. (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
  3131. (eval "$ac_compile" 2>conftest.err)
  3132. cat conftest.err >&AS_MESSAGE_LOG_FD
  3133. (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
  3134. (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
  3135. cat conftest.err >&AS_MESSAGE_LOG_FD
  3136. (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
  3137. cat conftest.out >&AS_MESSAGE_LOG_FD
  3138. if $GREP 'External.*some_variable' conftest.out > /dev/null; then
  3139. lt_cv_nm_interface="MS dumpbin"
  3140. fi
  3141. rm -f conftest*])
  3142. ])# LT_PATH_NM
  3143. # Old names:
  3144. AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
  3145. AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
  3146. dnl aclocal-1.4 backwards compatibility:
  3147. dnl AC_DEFUN([AM_PROG_NM], [])
  3148. dnl AC_DEFUN([AC_PROG_NM], [])
  3149. # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  3150. # --------------------------------
  3151. # how to determine the name of the shared library
  3152. # associated with a specific link library.
  3153. # -- PORTME fill in with the dynamic library characteristics
  3154. m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
  3155. [m4_require([_LT_DECL_EGREP])
  3156. m4_require([_LT_DECL_OBJDUMP])
  3157. m4_require([_LT_DECL_DLLTOOL])
  3158. AC_CACHE_CHECK([how to associate runtime and link libraries],
  3159. lt_cv_sharedlib_from_linklib_cmd,
  3160. [lt_cv_sharedlib_from_linklib_cmd='unknown'
  3161. case $host_os in
  3162. cygwin* | mingw* | pw32* | cegcc*)
  3163. # two different shell functions defined in ltmain.sh
  3164. # decide which to use based on capabilities of $DLLTOOL
  3165. case `$DLLTOOL --help 2>&1` in
  3166. *--identify-strict*)
  3167. lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
  3168. ;;
  3169. *)
  3170. lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
  3171. ;;
  3172. esac
  3173. ;;
  3174. *)
  3175. # fallback: assume linklib IS sharedlib
  3176. lt_cv_sharedlib_from_linklib_cmd="$ECHO"
  3177. ;;
  3178. esac
  3179. ])
  3180. sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
  3181. test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
  3182. _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
  3183. [Command to associate shared and link libraries])
  3184. ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  3185. # _LT_PATH_MANIFEST_TOOL
  3186. # ----------------------
  3187. # locate the manifest tool
  3188. m4_defun([_LT_PATH_MANIFEST_TOOL],
  3189. [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
  3190. test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
  3191. AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
  3192. [lt_cv_path_mainfest_tool=no
  3193. echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
  3194. $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
  3195. cat conftest.err >&AS_MESSAGE_LOG_FD
  3196. if $GREP 'Manifest Tool' conftest.out > /dev/null; then
  3197. lt_cv_path_mainfest_tool=yes
  3198. fi
  3199. rm -f conftest*])
  3200. if test "x$lt_cv_path_mainfest_tool" != xyes; then
  3201. MANIFEST_TOOL=:
  3202. fi
  3203. _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
  3204. ])# _LT_PATH_MANIFEST_TOOL
  3205. # LT_LIB_M
  3206. # --------
  3207. # check for math library
  3208. AC_DEFUN([LT_LIB_M],
  3209. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3210. LIBM=
  3211. case $host in
  3212. *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
  3213. # These system don't have libm, or don't need it
  3214. ;;
  3215. *-ncr-sysv4.3*)
  3216. AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
  3217. AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
  3218. ;;
  3219. *)
  3220. AC_CHECK_LIB(m, cos, LIBM="-lm")
  3221. ;;
  3222. esac
  3223. AC_SUBST([LIBM])
  3224. ])# LT_LIB_M
  3225. # Old name:
  3226. AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
  3227. dnl aclocal-1.4 backwards compatibility:
  3228. dnl AC_DEFUN([AC_CHECK_LIBM], [])
  3229. # _LT_COMPILER_NO_RTTI([TAGNAME])
  3230. # -------------------------------
  3231. m4_defun([_LT_COMPILER_NO_RTTI],
  3232. [m4_require([_LT_TAG_COMPILER])dnl
  3233. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  3234. if test "$GCC" = yes; then
  3235. case $cc_basename in
  3236. nvcc*)
  3237. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
  3238. *)
  3239. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
  3240. esac
  3241. _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
  3242. lt_cv_prog_compiler_rtti_exceptions,
  3243. [-fno-rtti -fno-exceptions], [],
  3244. [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
  3245. fi
  3246. _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
  3247. [Compiler flag to turn off builtin functions])
  3248. ])# _LT_COMPILER_NO_RTTI
  3249. # _LT_CMD_GLOBAL_SYMBOLS
  3250. # ----------------------
  3251. m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
  3252. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3253. AC_REQUIRE([AC_PROG_CC])dnl
  3254. AC_REQUIRE([AC_PROG_AWK])dnl
  3255. AC_REQUIRE([LT_PATH_NM])dnl
  3256. AC_REQUIRE([LT_PATH_LD])dnl
  3257. m4_require([_LT_DECL_SED])dnl
  3258. m4_require([_LT_DECL_EGREP])dnl
  3259. m4_require([_LT_TAG_COMPILER])dnl
  3260. # Check for command to grab the raw symbol name followed by C symbol from nm.
  3261. AC_MSG_CHECKING([command to parse $NM output from $compiler object])
  3262. AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
  3263. [
  3264. # These are sane defaults that work on at least a few old systems.
  3265. # [They come from Ultrix. What could be older than Ultrix?!! ;)]
  3266. # Character class describing NM global symbol codes.
  3267. symcode='[[BCDEGRST]]'
  3268. # Regexp to match symbols that can be accessed directly from C.
  3269. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
  3270. # Define system-specific variables.
  3271. case $host_os in
  3272. aix*)
  3273. symcode='[[BCDT]]'
  3274. ;;
  3275. cygwin* | mingw* | pw32* | cegcc*)
  3276. symcode='[[ABCDGISTW]]'
  3277. ;;
  3278. hpux*)
  3279. if test "$host_cpu" = ia64; then
  3280. symcode='[[ABCDEGRST]]'
  3281. fi
  3282. ;;
  3283. irix* | nonstopux*)
  3284. symcode='[[BCDEGRST]]'
  3285. ;;
  3286. osf*)
  3287. symcode='[[BCDEGQRST]]'
  3288. ;;
  3289. solaris*)
  3290. symcode='[[BDRT]]'
  3291. ;;
  3292. sco3.2v5*)
  3293. symcode='[[DT]]'
  3294. ;;
  3295. sysv4.2uw2*)
  3296. symcode='[[DT]]'
  3297. ;;
  3298. sysv5* | sco5v6* | unixware* | OpenUNIX*)
  3299. symcode='[[ABDT]]'
  3300. ;;
  3301. sysv4)
  3302. symcode='[[DFNSTU]]'
  3303. ;;
  3304. esac
  3305. # If we're using GNU nm, then use its standard symbol codes.
  3306. case `$NM -V 2>&1` in
  3307. *GNU* | *'with BFD'*)
  3308. symcode='[[ABCDGIRSTW]]' ;;
  3309. esac
  3310. # Transform an extracted symbol line into a proper C declaration.
  3311. # Some systems (esp. on ia64) link data and code symbols differently,
  3312. # so use this general approach.
  3313. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  3314. # Transform an extracted symbol line into symbol name and symbol address
  3315. lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
  3316. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
  3317. # Handle CRLF in mingw tool chain
  3318. opt_cr=
  3319. case $build_os in
  3320. mingw*)
  3321. opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  3322. ;;
  3323. esac
  3324. # Try without a prefix underscore, then with it.
  3325. for ac_symprfx in "" "_"; do
  3326. # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
  3327. symxfrm="\\1 $ac_symprfx\\2 \\2"
  3328. # Write the raw and C identifiers.
  3329. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3330. # Fake it for dumpbin and say T for any non-static function
  3331. # and D for any global variable.
  3332. # Also find C++ and __fastcall symbols from MSVC++,
  3333. # which start with @ or ?.
  3334. lt_cv_sys_global_symbol_pipe="$AWK ['"\
  3335. " {last_section=section; section=\$ 3};"\
  3336. " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
  3337. " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
  3338. " \$ 0!~/External *\|/{next};"\
  3339. " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
  3340. " {if(hide[section]) next};"\
  3341. " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
  3342. " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
  3343. " s[1]~/^[@?]/{print s[1], s[1]; next};"\
  3344. " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
  3345. " ' prfx=^$ac_symprfx]"
  3346. else
  3347. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
  3348. fi
  3349. lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
  3350. # Check to see that the pipe works correctly.
  3351. pipe_works=no
  3352. rm -f conftest*
  3353. cat > conftest.$ac_ext <<_LT_EOF
  3354. #ifdef __cplusplus
  3355. extern "C" {
  3356. #endif
  3357. char nm_test_var;
  3358. void nm_test_func(void);
  3359. void nm_test_func(void){}
  3360. #ifdef __cplusplus
  3361. }
  3362. #endif
  3363. int main(){nm_test_var='a';nm_test_func();return(0);}
  3364. _LT_EOF
  3365. if AC_TRY_EVAL(ac_compile); then
  3366. # Now try to grab the symbols.
  3367. nlist=conftest.nm
  3368. if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
  3369. # Try sorting and uniquifying the output.
  3370. if sort "$nlist" | uniq > "$nlist"T; then
  3371. mv -f "$nlist"T "$nlist"
  3372. else
  3373. rm -f "$nlist"T
  3374. fi
  3375. # Make sure that we snagged all the symbols we need.
  3376. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
  3377. if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
  3378. cat <<_LT_EOF > conftest.$ac_ext
  3379. /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
  3380. #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
  3381. /* DATA imports from DLLs on WIN32 con't be const, because runtime
  3382. relocations are performed -- see ld's documentation on pseudo-relocs. */
  3383. # define LT@&t@_DLSYM_CONST
  3384. #elif defined(__osf__)
  3385. /* This system does not cope well with relocations in const data. */
  3386. # define LT@&t@_DLSYM_CONST
  3387. #else
  3388. # define LT@&t@_DLSYM_CONST const
  3389. #endif
  3390. #ifdef __cplusplus
  3391. extern "C" {
  3392. #endif
  3393. _LT_EOF
  3394. # Now generate the symbol file.
  3395. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
  3396. cat <<_LT_EOF >> conftest.$ac_ext
  3397. /* The mapping between symbol names and symbols. */
  3398. LT@&t@_DLSYM_CONST struct {
  3399. const char *name;
  3400. void *address;
  3401. }
  3402. lt__PROGRAM__LTX_preloaded_symbols[[]] =
  3403. {
  3404. { "@PROGRAM@", (void *) 0 },
  3405. _LT_EOF
  3406. $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
  3407. cat <<\_LT_EOF >> conftest.$ac_ext
  3408. {0, (void *) 0}
  3409. };
  3410. /* This works around a problem in FreeBSD linker */
  3411. #ifdef FREEBSD_WORKAROUND
  3412. static const void *lt_preloaded_setup() {
  3413. return lt__PROGRAM__LTX_preloaded_symbols;
  3414. }
  3415. #endif
  3416. #ifdef __cplusplus
  3417. }
  3418. #endif
  3419. _LT_EOF
  3420. # Now try linking the two files.
  3421. mv conftest.$ac_objext conftstm.$ac_objext
  3422. lt_globsym_save_LIBS=$LIBS
  3423. lt_globsym_save_CFLAGS=$CFLAGS
  3424. LIBS="conftstm.$ac_objext"
  3425. CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
  3426. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
  3427. pipe_works=yes
  3428. fi
  3429. LIBS=$lt_globsym_save_LIBS
  3430. CFLAGS=$lt_globsym_save_CFLAGS
  3431. else
  3432. echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
  3433. fi
  3434. else
  3435. echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
  3436. fi
  3437. else
  3438. echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
  3439. fi
  3440. else
  3441. echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
  3442. cat conftest.$ac_ext >&5
  3443. fi
  3444. rm -rf conftest* conftst*
  3445. # Do not use the global_symbol_pipe unless it works.
  3446. if test "$pipe_works" = yes; then
  3447. break
  3448. else
  3449. lt_cv_sys_global_symbol_pipe=
  3450. fi
  3451. done
  3452. ])
  3453. if test -z "$lt_cv_sys_global_symbol_pipe"; then
  3454. lt_cv_sys_global_symbol_to_cdecl=
  3455. fi
  3456. if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
  3457. AC_MSG_RESULT(failed)
  3458. else
  3459. AC_MSG_RESULT(ok)
  3460. fi
  3461. # Response file support.
  3462. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3463. nm_file_list_spec='@'
  3464. elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
  3465. nm_file_list_spec='@'
  3466. fi
  3467. _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
  3468. [Take the output of nm and produce a listing of raw symbols and C names])
  3469. _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
  3470. [Transform the output of nm in a proper C declaration])
  3471. _LT_DECL([global_symbol_to_c_name_address],
  3472. [lt_cv_sys_global_symbol_to_c_name_address], [1],
  3473. [Transform the output of nm in a C name address pair])
  3474. _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
  3475. [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
  3476. [Transform the output of nm in a C name address pair when lib prefix is needed])
  3477. _LT_DECL([], [nm_file_list_spec], [1],
  3478. [Specify filename containing input files for $NM])
  3479. ]) # _LT_CMD_GLOBAL_SYMBOLS
  3480. # _LT_COMPILER_PIC([TAGNAME])
  3481. # ---------------------------
  3482. m4_defun([_LT_COMPILER_PIC],
  3483. [m4_require([_LT_TAG_COMPILER])dnl
  3484. _LT_TAGVAR(lt_prog_compiler_wl, $1)=
  3485. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3486. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3487. m4_if([$1], [CXX], [
  3488. # C++ specific cases for pic, static, wl, etc.
  3489. if test "$GXX" = yes; then
  3490. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3491. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3492. case $host_os in
  3493. aix*)
  3494. # All AIX code is PIC.
  3495. if test "$host_cpu" = ia64; then
  3496. # AIX 5 now supports IA64 processor
  3497. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3498. fi
  3499. ;;
  3500. amigaos*)
  3501. case $host_cpu in
  3502. powerpc)
  3503. # see comment about AmigaOS4 .so support
  3504. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3505. ;;
  3506. m68k)
  3507. # FIXME: we need at least 68020 code to build shared libraries, but
  3508. # adding the `-m68020' flag to GCC prevents building anything better,
  3509. # like `-m68040'.
  3510. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  3511. ;;
  3512. esac
  3513. ;;
  3514. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  3515. # PIC is the default for these OSes.
  3516. ;;
  3517. mingw* | cygwin* | os2* | pw32* | cegcc*)
  3518. # This hack is so that the source file can tell whether it is being
  3519. # built for inclusion in a dll (and should export symbols for example).
  3520. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  3521. # (--disable-auto-import) libraries
  3522. m4_if([$1], [GCJ], [],
  3523. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3524. ;;
  3525. darwin* | rhapsody*)
  3526. # PIC is the default on this platform
  3527. # Common symbols not allowed in MH_DYLIB files
  3528. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  3529. ;;
  3530. *djgpp*)
  3531. # DJGPP does not support shared libraries at all
  3532. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3533. ;;
  3534. haiku*)
  3535. # PIC is the default for Haiku.
  3536. # The "-static" flag exists, but is broken.
  3537. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3538. ;;
  3539. interix[[3-9]]*)
  3540. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  3541. # Instead, we relocate shared libraries at runtime.
  3542. ;;
  3543. sysv4*MP*)
  3544. if test -d /usr/nec; then
  3545. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  3546. fi
  3547. ;;
  3548. hpux*)
  3549. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  3550. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  3551. # sets the default TLS model and affects inlining.
  3552. case $host_cpu in
  3553. hppa*64*)
  3554. ;;
  3555. *)
  3556. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3557. ;;
  3558. esac
  3559. ;;
  3560. *qnx* | *nto*)
  3561. # QNX uses GNU C++, but need to define -shared option too, otherwise
  3562. # it will coredump.
  3563. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  3564. ;;
  3565. *)
  3566. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3567. ;;
  3568. esac
  3569. else
  3570. case $host_os in
  3571. aix[[4-9]]*)
  3572. # All AIX code is PIC.
  3573. if test "$host_cpu" = ia64; then
  3574. # AIX 5 now supports IA64 processor
  3575. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3576. else
  3577. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  3578. fi
  3579. ;;
  3580. chorus*)
  3581. case $cc_basename in
  3582. cxch68*)
  3583. # Green Hills C++ Compiler
  3584. # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
  3585. ;;
  3586. esac
  3587. ;;
  3588. mingw* | cygwin* | os2* | pw32* | cegcc*)
  3589. # This hack is so that the source file can tell whether it is being
  3590. # built for inclusion in a dll (and should export symbols for example).
  3591. m4_if([$1], [GCJ], [],
  3592. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3593. ;;
  3594. dgux*)
  3595. case $cc_basename in
  3596. ec++*)
  3597. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3598. ;;
  3599. ghcx*)
  3600. # Green Hills C++ Compiler
  3601. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3602. ;;
  3603. *)
  3604. ;;
  3605. esac
  3606. ;;
  3607. freebsd* | dragonfly*)
  3608. # FreeBSD uses GNU C++
  3609. ;;
  3610. hpux9* | hpux10* | hpux11*)
  3611. case $cc_basename in
  3612. CC*)
  3613. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3614. _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  3615. if test "$host_cpu" != ia64; then
  3616. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  3617. fi
  3618. ;;
  3619. aCC*)
  3620. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3621. _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  3622. case $host_cpu in
  3623. hppa*64*|ia64*)
  3624. # +Z the default
  3625. ;;
  3626. *)
  3627. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  3628. ;;
  3629. esac
  3630. ;;
  3631. *)
  3632. ;;
  3633. esac
  3634. ;;
  3635. interix*)
  3636. # This is c89, which is MS Visual C++ (no shared libs)
  3637. # Anyone wants to do a port?
  3638. ;;
  3639. irix5* | irix6* | nonstopux*)
  3640. case $cc_basename in
  3641. CC*)
  3642. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3643. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3644. # CC pic flag -KPIC is the default.
  3645. ;;
  3646. *)
  3647. ;;
  3648. esac
  3649. ;;
  3650. linux* | k*bsd*-gnu | kopensolaris*-gnu)
  3651. case $cc_basename in
  3652. KCC*)
  3653. # KAI C++ Compiler
  3654. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  3655. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3656. ;;
  3657. ecpc* )
  3658. # old Intel C++ for x86_64 which still supported -KPIC.
  3659. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3660. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3661. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3662. ;;
  3663. icpc* )
  3664. # Intel C++, used to be incompatible with GCC.
  3665. # ICC 10 doesn't accept -KPIC any more.
  3666. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3667. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3668. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3669. ;;
  3670. pgCC* | pgcpp*)
  3671. # Portland Group C++ compiler
  3672. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3673. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  3674. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3675. ;;
  3676. cxx*)
  3677. # Compaq C++
  3678. # Make sure the PIC flag is empty. It appears that all Alpha
  3679. # Linux and Compaq Tru64 Unix objects are PIC.
  3680. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3681. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3682. ;;
  3683. xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
  3684. # IBM XL 8.0, 9.0 on PPC and BlueGene
  3685. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3686. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  3687. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  3688. ;;
  3689. *)
  3690. case `$CC -V 2>&1 | sed 5q` in
  3691. *Sun\ C*)
  3692. # Sun C++ 5.9
  3693. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3694. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3695. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  3696. ;;
  3697. esac
  3698. ;;
  3699. esac
  3700. ;;
  3701. lynxos*)
  3702. ;;
  3703. m88k*)
  3704. ;;
  3705. mvs*)
  3706. case $cc_basename in
  3707. cxx*)
  3708. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
  3709. ;;
  3710. *)
  3711. ;;
  3712. esac
  3713. ;;
  3714. netbsd*)
  3715. ;;
  3716. *qnx* | *nto*)
  3717. # QNX uses GNU C++, but need to define -shared option too, otherwise
  3718. # it will coredump.
  3719. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  3720. ;;
  3721. osf3* | osf4* | osf5*)
  3722. case $cc_basename in
  3723. KCC*)
  3724. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  3725. ;;
  3726. RCC*)
  3727. # Rational C++ 2.4.1
  3728. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3729. ;;
  3730. cxx*)
  3731. # Digital/Compaq C++
  3732. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3733. # Make sure the PIC flag is empty. It appears that all Alpha
  3734. # Linux and Compaq Tru64 Unix objects are PIC.
  3735. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3736. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3737. ;;
  3738. *)
  3739. ;;
  3740. esac
  3741. ;;
  3742. psos*)
  3743. ;;
  3744. solaris*)
  3745. case $cc_basename in
  3746. CC* | sunCC*)
  3747. # Sun C++ 4.2, 5.x and Centerline C++
  3748. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3749. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3750. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  3751. ;;
  3752. gcx*)
  3753. # Green Hills C++ Compiler
  3754. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  3755. ;;
  3756. *)
  3757. ;;
  3758. esac
  3759. ;;
  3760. sunos4*)
  3761. case $cc_basename in
  3762. CC*)
  3763. # Sun C++ 4.x
  3764. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3765. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3766. ;;
  3767. lcc*)
  3768. # Lucid
  3769. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3770. ;;
  3771. *)
  3772. ;;
  3773. esac
  3774. ;;
  3775. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  3776. case $cc_basename in
  3777. CC*)
  3778. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3779. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3780. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3781. ;;
  3782. esac
  3783. ;;
  3784. tandem*)
  3785. case $cc_basename in
  3786. NCC*)
  3787. # NonStop-UX NCC 3.20
  3788. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3789. ;;
  3790. *)
  3791. ;;
  3792. esac
  3793. ;;
  3794. vxworks*)
  3795. ;;
  3796. *)
  3797. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  3798. ;;
  3799. esac
  3800. fi
  3801. ],
  3802. [
  3803. if test "$GCC" = yes; then
  3804. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3805. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3806. case $host_os in
  3807. aix*)
  3808. # All AIX code is PIC.
  3809. if test "$host_cpu" = ia64; then
  3810. # AIX 5 now supports IA64 processor
  3811. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3812. fi
  3813. ;;
  3814. amigaos*)
  3815. case $host_cpu in
  3816. powerpc)
  3817. # see comment about AmigaOS4 .so support
  3818. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3819. ;;
  3820. m68k)
  3821. # FIXME: we need at least 68020 code to build shared libraries, but
  3822. # adding the `-m68020' flag to GCC prevents building anything better,
  3823. # like `-m68040'.
  3824. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  3825. ;;
  3826. esac
  3827. ;;
  3828. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  3829. # PIC is the default for these OSes.
  3830. ;;
  3831. mingw* | cygwin* | pw32* | os2* | cegcc*)
  3832. # This hack is so that the source file can tell whether it is being
  3833. # built for inclusion in a dll (and should export symbols for example).
  3834. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  3835. # (--disable-auto-import) libraries
  3836. m4_if([$1], [GCJ], [],
  3837. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3838. ;;
  3839. darwin* | rhapsody*)
  3840. # PIC is the default on this platform
  3841. # Common symbols not allowed in MH_DYLIB files
  3842. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  3843. ;;
  3844. haiku*)
  3845. # PIC is the default for Haiku.
  3846. # The "-static" flag exists, but is broken.
  3847. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3848. ;;
  3849. hpux*)
  3850. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  3851. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  3852. # sets the default TLS model and affects inlining.
  3853. case $host_cpu in
  3854. hppa*64*)
  3855. # +Z the default
  3856. ;;
  3857. *)
  3858. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3859. ;;
  3860. esac
  3861. ;;
  3862. interix[[3-9]]*)
  3863. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  3864. # Instead, we relocate shared libraries at runtime.
  3865. ;;
  3866. msdosdjgpp*)
  3867. # Just because we use GCC doesn't mean we suddenly get shared libraries
  3868. # on systems that don't support them.
  3869. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  3870. enable_shared=no
  3871. ;;
  3872. *nto* | *qnx*)
  3873. # QNX uses GNU C++, but need to define -shared option too, otherwise
  3874. # it will coredump.
  3875. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  3876. ;;
  3877. sysv4*MP*)
  3878. if test -d /usr/nec; then
  3879. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  3880. fi
  3881. ;;
  3882. *)
  3883. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3884. ;;
  3885. esac
  3886. case $cc_basename in
  3887. nvcc*) # Cuda Compiler Driver 2.2
  3888. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
  3889. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  3890. _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
  3891. fi
  3892. ;;
  3893. esac
  3894. else
  3895. # PORTME Check for flag to pass linker flags through the system compiler.
  3896. case $host_os in
  3897. aix*)
  3898. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3899. if test "$host_cpu" = ia64; then
  3900. # AIX 5 now supports IA64 processor
  3901. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3902. else
  3903. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  3904. fi
  3905. ;;
  3906. mingw* | cygwin* | pw32* | os2* | cegcc*)
  3907. # This hack is so that the source file can tell whether it is being
  3908. # built for inclusion in a dll (and should export symbols for example).
  3909. m4_if([$1], [GCJ], [],
  3910. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3911. ;;
  3912. hpux9* | hpux10* | hpux11*)
  3913. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3914. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  3915. # not for PA HP-UX.
  3916. case $host_cpu in
  3917. hppa*64*|ia64*)
  3918. # +Z the default
  3919. ;;
  3920. *)
  3921. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  3922. ;;
  3923. esac
  3924. # Is there a better lt_prog_compiler_static that works with the bundled CC?
  3925. _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  3926. ;;
  3927. irix5* | irix6* | nonstopux*)
  3928. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3929. # PIC (with -KPIC) is the default.
  3930. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3931. ;;
  3932. linux* | k*bsd*-gnu | kopensolaris*-gnu)
  3933. case $cc_basename in
  3934. # old Intel for x86_64 which still supported -KPIC.
  3935. ecc*)
  3936. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3937. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3938. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3939. ;;
  3940. # icc used to be incompatible with GCC.
  3941. # ICC 10 doesn't accept -KPIC any more.
  3942. icc* | ifort*)
  3943. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3944. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3945. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3946. ;;
  3947. # Lahey Fortran 8.1.
  3948. lf95*)
  3949. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3950. _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
  3951. _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
  3952. ;;
  3953. nagfor*)
  3954. # NAG Fortran compiler
  3955. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
  3956. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  3957. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3958. ;;
  3959. pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
  3960. # Portland Group compilers (*not* the Pentium gcc compiler,
  3961. # which looks to be a dead project)
  3962. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3963. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  3964. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3965. ;;
  3966. ccc*)
  3967. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3968. # All Alpha code is PIC.
  3969. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3970. ;;
  3971. xl* | bgxl* | bgf* | mpixl*)
  3972. # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
  3973. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3974. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  3975. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  3976. ;;
  3977. *)
  3978. case `$CC -V 2>&1 | sed 5q` in
  3979. *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
  3980. # Sun Fortran 8.3 passes all unrecognized flags to the linker
  3981. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3982. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3983. _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
  3984. ;;
  3985. *Sun\ F* | *Sun*Fortran*)
  3986. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3987. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3988. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  3989. ;;
  3990. *Sun\ C*)
  3991. # Sun C 5.9
  3992. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3993. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3994. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3995. ;;
  3996. *Intel*\ [[CF]]*Compiler*)
  3997. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3998. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3999. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4000. ;;
  4001. *Portland\ Group*)
  4002. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4003. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4004. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4005. ;;
  4006. esac
  4007. ;;
  4008. esac
  4009. ;;
  4010. newsos6)
  4011. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4012. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4013. ;;
  4014. *nto* | *qnx*)
  4015. # QNX uses GNU C++, but need to define -shared option too, otherwise
  4016. # it will coredump.
  4017. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4018. ;;
  4019. osf3* | osf4* | osf5*)
  4020. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4021. # All OSF/1 code is PIC.
  4022. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4023. ;;
  4024. rdos*)
  4025. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4026. ;;
  4027. solaris*)
  4028. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4029. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4030. case $cc_basename in
  4031. f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
  4032. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
  4033. *)
  4034. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
  4035. esac
  4036. ;;
  4037. sunos4*)
  4038. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4039. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4040. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4041. ;;
  4042. sysv4 | sysv4.2uw2* | sysv4.3*)
  4043. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4044. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4045. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4046. ;;
  4047. sysv4*MP*)
  4048. if test -d /usr/nec ;then
  4049. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
  4050. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4051. fi
  4052. ;;
  4053. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  4054. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4055. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4056. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4057. ;;
  4058. unicos*)
  4059. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4060. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4061. ;;
  4062. uts4*)
  4063. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4064. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4065. ;;
  4066. *)
  4067. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4068. ;;
  4069. esac
  4070. fi
  4071. ])
  4072. case $host_os in
  4073. # For platforms which do not support PIC, -DPIC is meaningless:
  4074. *djgpp*)
  4075. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4076. ;;
  4077. *)
  4078. _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
  4079. ;;
  4080. esac
  4081. AC_CACHE_CHECK([for $compiler option to produce PIC],
  4082. [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
  4083. [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
  4084. _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
  4085. #
  4086. # Check to make sure the PIC flag actually works.
  4087. #
  4088. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  4089. _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
  4090. [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
  4091. [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
  4092. [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
  4093. "" | " "*) ;;
  4094. *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
  4095. esac],
  4096. [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4097. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
  4098. fi
  4099. _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
  4100. [Additional compiler flags for building library objects])
  4101. _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
  4102. [How to pass a linker flag through the compiler])
  4103. #
  4104. # Check to make sure the static flag actually works.
  4105. #
  4106. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
  4107. _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
  4108. _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
  4109. $lt_tmp_static_flag,
  4110. [],
  4111. [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
  4112. _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
  4113. [Compiler flag to prevent dynamic linking])
  4114. ])# _LT_COMPILER_PIC
  4115. # _LT_LINKER_SHLIBS([TAGNAME])
  4116. # ----------------------------
  4117. # See if the linker supports building shared libraries.
  4118. m4_defun([_LT_LINKER_SHLIBS],
  4119. [AC_REQUIRE([LT_PATH_LD])dnl
  4120. AC_REQUIRE([LT_PATH_NM])dnl
  4121. m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  4122. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  4123. m4_require([_LT_DECL_EGREP])dnl
  4124. m4_require([_LT_DECL_SED])dnl
  4125. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  4126. m4_require([_LT_TAG_COMPILER])dnl
  4127. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  4128. m4_if([$1], [CXX], [
  4129. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4130. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  4131. case $host_os in
  4132. aix[[4-9]]*)
  4133. # If we're using GNU nm, then we don't want the "-C" option.
  4134. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  4135. # Also, AIX nm treats weak defined symbols like other global defined
  4136. # symbols, whereas GNU nm marks them as "W".
  4137. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  4138. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  4139. else
  4140. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  4141. fi
  4142. ;;
  4143. pw32*)
  4144. _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
  4145. ;;
  4146. cygwin* | mingw* | cegcc*)
  4147. case $cc_basename in
  4148. cl*)
  4149. _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  4150. ;;
  4151. *)
  4152. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
  4153. _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  4154. ;;
  4155. esac
  4156. ;;
  4157. *)
  4158. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4159. ;;
  4160. esac
  4161. ], [
  4162. runpath_var=
  4163. _LT_TAGVAR(allow_undefined_flag, $1)=
  4164. _LT_TAGVAR(always_export_symbols, $1)=no
  4165. _LT_TAGVAR(archive_cmds, $1)=
  4166. _LT_TAGVAR(archive_expsym_cmds, $1)=
  4167. _LT_TAGVAR(compiler_needs_object, $1)=no
  4168. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  4169. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  4170. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4171. _LT_TAGVAR(hardcode_automatic, $1)=no
  4172. _LT_TAGVAR(hardcode_direct, $1)=no
  4173. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  4174. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4175. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  4176. _LT_TAGVAR(hardcode_minus_L, $1)=no
  4177. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  4178. _LT_TAGVAR(inherit_rpath, $1)=no
  4179. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  4180. _LT_TAGVAR(module_cmds, $1)=
  4181. _LT_TAGVAR(module_expsym_cmds, $1)=
  4182. _LT_TAGVAR(old_archive_from_new_cmds, $1)=
  4183. _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
  4184. _LT_TAGVAR(thread_safe_flag_spec, $1)=
  4185. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4186. # include_expsyms should be a list of space-separated symbols to be *always*
  4187. # included in the symbol list
  4188. _LT_TAGVAR(include_expsyms, $1)=
  4189. # exclude_expsyms can be an extended regexp of symbols to exclude
  4190. # it will be wrapped by ` (' and `)$', so one must not match beginning or
  4191. # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
  4192. # as well as any symbol that contains `d'.
  4193. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  4194. # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  4195. # platforms (ab)use it in PIC code, but their linkers get confused if
  4196. # the symbol is explicitly referenced. Since portable code cannot
  4197. # rely on this symbol name, it's probably fine to never include it in
  4198. # preloaded symbol tables.
  4199. # Exclude shared library initialization/finalization symbols.
  4200. dnl Note also adjust exclude_expsyms for C++ above.
  4201. extract_expsyms_cmds=
  4202. case $host_os in
  4203. cygwin* | mingw* | pw32* | cegcc*)
  4204. # FIXME: the MSVC++ port hasn't been tested in a loooong time
  4205. # When not using gcc, we currently assume that we are using
  4206. # Microsoft Visual C++.
  4207. if test "$GCC" != yes; then
  4208. with_gnu_ld=no
  4209. fi
  4210. ;;
  4211. interix*)
  4212. # we just hope/assume this is gcc and not c89 (= MSVC++)
  4213. with_gnu_ld=yes
  4214. ;;
  4215. openbsd*)
  4216. with_gnu_ld=no
  4217. ;;
  4218. esac
  4219. _LT_TAGVAR(ld_shlibs, $1)=yes
  4220. # On some targets, GNU ld is compatible enough with the native linker
  4221. # that we're better off using the native interface for both.
  4222. lt_use_gnu_ld_interface=no
  4223. if test "$with_gnu_ld" = yes; then
  4224. case $host_os in
  4225. aix*)
  4226. # The AIX port of GNU ld has always aspired to compatibility
  4227. # with the native linker. However, as the warning in the GNU ld
  4228. # block says, versions before 2.19.5* couldn't really create working
  4229. # shared libraries, regardless of the interface used.
  4230. case `$LD -v 2>&1` in
  4231. *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
  4232. *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
  4233. *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
  4234. *)
  4235. lt_use_gnu_ld_interface=yes
  4236. ;;
  4237. esac
  4238. ;;
  4239. *)
  4240. lt_use_gnu_ld_interface=yes
  4241. ;;
  4242. esac
  4243. fi
  4244. if test "$lt_use_gnu_ld_interface" = yes; then
  4245. # If archive_cmds runs LD, not CC, wlarc should be empty
  4246. wlarc='${wl}'
  4247. # Set some defaults for GNU ld with shared library support. These
  4248. # are reset later if shared libraries are not supported. Putting them
  4249. # here allows them to be overridden if necessary.
  4250. runpath_var=LD_RUN_PATH
  4251. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4252. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  4253. # ancient GNU ld didn't support --whole-archive et. al.
  4254. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
  4255. _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  4256. else
  4257. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4258. fi
  4259. supports_anon_versioning=no
  4260. case `$LD -v 2>&1` in
  4261. *GNU\ gold*) supports_anon_versioning=yes ;;
  4262. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
  4263. *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
  4264. *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
  4265. *\ 2.11.*) ;; # other 2.11 versions
  4266. *) supports_anon_versioning=yes ;;
  4267. esac
  4268. # See if GNU ld supports shared libraries.
  4269. case $host_os in
  4270. aix[[3-9]]*)
  4271. # On AIX/PPC, the GNU linker is very broken
  4272. if test "$host_cpu" != ia64; then
  4273. _LT_TAGVAR(ld_shlibs, $1)=no
  4274. cat <<_LT_EOF 1>&2
  4275. *** Warning: the GNU linker, at least up to release 2.19, is reported
  4276. *** to be unable to reliably create shared libraries on AIX.
  4277. *** Therefore, libtool is disabling shared libraries support. If you
  4278. *** really care for shared libraries, you may want to install binutils
  4279. *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
  4280. *** You will then need to restart the configuration process.
  4281. _LT_EOF
  4282. fi
  4283. ;;
  4284. amigaos*)
  4285. case $host_cpu in
  4286. powerpc)
  4287. # see comment about AmigaOS4 .so support
  4288. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4289. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  4290. ;;
  4291. m68k)
  4292. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
  4293. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4294. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4295. ;;
  4296. esac
  4297. ;;
  4298. beos*)
  4299. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4300. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4301. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  4302. # support --undefined. This deserves some investigation. FIXME
  4303. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4304. else
  4305. _LT_TAGVAR(ld_shlibs, $1)=no
  4306. fi
  4307. ;;
  4308. cygwin* | mingw* | pw32* | cegcc*)
  4309. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  4310. # as there is no search path for DLLs.
  4311. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4312. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
  4313. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4314. _LT_TAGVAR(always_export_symbols, $1)=no
  4315. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4316. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
  4317. _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  4318. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  4319. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  4320. # If the export-symbols file already is a .def file (1st line
  4321. # is EXPORTS), use it as is; otherwise, prepend...
  4322. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  4323. cp $export_symbols $output_objdir/$soname.def;
  4324. else
  4325. echo EXPORTS > $output_objdir/$soname.def;
  4326. cat $export_symbols >> $output_objdir/$soname.def;
  4327. fi~
  4328. $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  4329. else
  4330. _LT_TAGVAR(ld_shlibs, $1)=no
  4331. fi
  4332. ;;
  4333. haiku*)
  4334. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4335. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4336. ;;
  4337. interix[[3-9]]*)
  4338. _LT_TAGVAR(hardcode_direct, $1)=no
  4339. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4340. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  4341. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4342. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  4343. # Instead, shared libraries are loaded at an image base (0x10000000 by
  4344. # default) and relocated if they conflict, which is a slow very memory
  4345. # consuming and fragmenting process. To avoid this, we pick a random,
  4346. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  4347. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  4348. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
  4349. _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
  4350. ;;
  4351. gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
  4352. tmp_diet=no
  4353. if test "$host_os" = linux-dietlibc; then
  4354. case $cc_basename in
  4355. diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
  4356. esac
  4357. fi
  4358. if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
  4359. && test "$tmp_diet" = no
  4360. then
  4361. tmp_addflag=' $pic_flag'
  4362. tmp_sharedflag='-shared'
  4363. case $cc_basename,$host_cpu in
  4364. pgcc*) # Portland Group C compiler
  4365. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
  4366. tmp_addflag=' $pic_flag'
  4367. ;;
  4368. pgf77* | pgf90* | pgf95* | pgfortran*)
  4369. # Portland Group f77 and f90 compilers
  4370. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
  4371. tmp_addflag=' $pic_flag -Mnomain' ;;
  4372. ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
  4373. tmp_addflag=' -i_dynamic' ;;
  4374. efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
  4375. tmp_addflag=' -i_dynamic -nofor_main' ;;
  4376. ifc* | ifort*) # Intel Fortran compiler
  4377. tmp_addflag=' -nofor_main' ;;
  4378. lf95*) # Lahey Fortran 8.1
  4379. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4380. tmp_sharedflag='--shared' ;;
  4381. xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
  4382. tmp_sharedflag='-qmkshrobj'
  4383. tmp_addflag= ;;
  4384. nvcc*) # Cuda Compiler Driver 2.2
  4385. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
  4386. _LT_TAGVAR(compiler_needs_object, $1)=yes
  4387. ;;
  4388. esac
  4389. case `$CC -V 2>&1 | sed 5q` in
  4390. *Sun\ C*) # Sun C 5.9
  4391. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
  4392. _LT_TAGVAR(compiler_needs_object, $1)=yes
  4393. tmp_sharedflag='-G' ;;
  4394. *Sun\ F*) # Sun Fortran 8.3
  4395. tmp_sharedflag='-G' ;;
  4396. esac
  4397. _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4398. if test "x$supports_anon_versioning" = xyes; then
  4399. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  4400. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4401. echo "local: *; };" >> $output_objdir/$libname.ver~
  4402. $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  4403. fi
  4404. case $cc_basename in
  4405. xlf* | bgf* | bgxlf* | mpixlf*)
  4406. # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
  4407. _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
  4408. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4409. _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
  4410. if test "x$supports_anon_versioning" = xyes; then
  4411. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  4412. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4413. echo "local: *; };" >> $output_objdir/$libname.ver~
  4414. $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
  4415. fi
  4416. ;;
  4417. esac
  4418. else
  4419. _LT_TAGVAR(ld_shlibs, $1)=no
  4420. fi
  4421. ;;
  4422. netbsd*)
  4423. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  4424. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  4425. wlarc=
  4426. else
  4427. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4428. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  4429. fi
  4430. ;;
  4431. solaris*)
  4432. if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
  4433. _LT_TAGVAR(ld_shlibs, $1)=no
  4434. cat <<_LT_EOF 1>&2
  4435. *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  4436. *** create shared libraries on Solaris systems. Therefore, libtool
  4437. *** is disabling shared libraries support. We urge you to upgrade GNU
  4438. *** binutils to release 2.9.1 or newer. Another option is to modify
  4439. *** your PATH or compiler configuration so that the native linker is
  4440. *** used, and then restart.
  4441. _LT_EOF
  4442. elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4443. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4444. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  4445. else
  4446. _LT_TAGVAR(ld_shlibs, $1)=no
  4447. fi
  4448. ;;
  4449. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
  4450. case `$LD -v 2>&1` in
  4451. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
  4452. _LT_TAGVAR(ld_shlibs, $1)=no
  4453. cat <<_LT_EOF 1>&2
  4454. *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
  4455. *** reliably create shared libraries on SCO systems. Therefore, libtool
  4456. *** is disabling shared libraries support. We urge you to upgrade GNU
  4457. *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
  4458. *** your PATH or compiler configuration so that the native linker is
  4459. *** used, and then restart.
  4460. _LT_EOF
  4461. ;;
  4462. *)
  4463. # For security reasons, it is highly recommended that you always
  4464. # use absolute paths for naming shared libraries, and exclude the
  4465. # DT_RUNPATH tag from executables and libraries. But doing so
  4466. # requires that you compile everything twice, which is a pain.
  4467. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4468. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4469. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4470. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  4471. else
  4472. _LT_TAGVAR(ld_shlibs, $1)=no
  4473. fi
  4474. ;;
  4475. esac
  4476. ;;
  4477. sunos4*)
  4478. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4479. wlarc=
  4480. _LT_TAGVAR(hardcode_direct, $1)=yes
  4481. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4482. ;;
  4483. *)
  4484. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4485. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4486. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  4487. else
  4488. _LT_TAGVAR(ld_shlibs, $1)=no
  4489. fi
  4490. ;;
  4491. esac
  4492. if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
  4493. runpath_var=
  4494. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4495. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  4496. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4497. fi
  4498. else
  4499. # PORTME fill in a description of your system's linker (not GNU ld)
  4500. case $host_os in
  4501. aix3*)
  4502. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4503. _LT_TAGVAR(always_export_symbols, $1)=yes
  4504. _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
  4505. # Note: this linker hardcodes the directories in LIBPATH if there
  4506. # are no directories specified by -L.
  4507. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4508. if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
  4509. # Neither direct hardcoding nor static linking is supported with a
  4510. # broken collect2.
  4511. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  4512. fi
  4513. ;;
  4514. aix[[4-9]]*)
  4515. if test "$host_cpu" = ia64; then
  4516. # On IA64, the linker does run time linking by default, so we don't
  4517. # have to do anything special.
  4518. aix_use_runtimelinking=no
  4519. exp_sym_flag='-Bexport'
  4520. no_entry_flag=""
  4521. else
  4522. # If we're using GNU nm, then we don't want the "-C" option.
  4523. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  4524. # Also, AIX nm treats weak defined symbols like other global
  4525. # defined symbols, whereas GNU nm marks them as "W".
  4526. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  4527. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  4528. else
  4529. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  4530. fi
  4531. aix_use_runtimelinking=no
  4532. # Test if we are trying to use run time linking or normal
  4533. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  4534. # need to do runtime linking.
  4535. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  4536. for ld_flag in $LDFLAGS; do
  4537. if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
  4538. aix_use_runtimelinking=yes
  4539. break
  4540. fi
  4541. done
  4542. ;;
  4543. esac
  4544. exp_sym_flag='-bexport'
  4545. no_entry_flag='-bnoentry'
  4546. fi
  4547. # When large executables or shared objects are built, AIX ld can
  4548. # have problems creating the table of contents. If linking a library
  4549. # or program results in "error TOC overflow" add -mminimal-toc to
  4550. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  4551. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  4552. _LT_TAGVAR(archive_cmds, $1)=''
  4553. _LT_TAGVAR(hardcode_direct, $1)=yes
  4554. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4555. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  4556. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4557. _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
  4558. if test "$GCC" = yes; then
  4559. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  4560. # We only want to do this on AIX 4.2 and lower, the check
  4561. # below for broken collect2 doesn't work under 4.3+
  4562. collect2name=`${CC} -print-prog-name=collect2`
  4563. if test -f "$collect2name" &&
  4564. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  4565. then
  4566. # We have reworked collect2
  4567. :
  4568. else
  4569. # We have old collect2
  4570. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  4571. # It fails to find uninstalled libraries when the uninstalled
  4572. # path is not listed in the libpath. Setting hardcode_minus_L
  4573. # to unsupported forces relinking
  4574. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4575. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4576. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  4577. fi
  4578. ;;
  4579. esac
  4580. shared_flag='-shared'
  4581. if test "$aix_use_runtimelinking" = yes; then
  4582. shared_flag="$shared_flag "'${wl}-G'
  4583. fi
  4584. else
  4585. # not using gcc
  4586. if test "$host_cpu" = ia64; then
  4587. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  4588. # chokes on -Wl,-G. The following line is correct:
  4589. shared_flag='-G'
  4590. else
  4591. if test "$aix_use_runtimelinking" = yes; then
  4592. shared_flag='${wl}-G'
  4593. else
  4594. shared_flag='${wl}-bM:SRE'
  4595. fi
  4596. fi
  4597. fi
  4598. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
  4599. # It seems that -bexpall does not export symbols beginning with
  4600. # underscore (_), so it is better to generate a list of symbols to export.
  4601. _LT_TAGVAR(always_export_symbols, $1)=yes
  4602. if test "$aix_use_runtimelinking" = yes; then
  4603. # Warning - without using the other runtime loading flags (-brtl),
  4604. # -berok will link without error, but may produce a broken library.
  4605. _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
  4606. # Determine the default libpath from the value encoded in an
  4607. # empty executable.
  4608. _LT_SYS_MODULE_PATH_AIX([$1])
  4609. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  4610. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
  4611. else
  4612. if test "$host_cpu" = ia64; then
  4613. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  4614. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  4615. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
  4616. else
  4617. # Determine the default libpath from the value encoded in an
  4618. # empty executable.
  4619. _LT_SYS_MODULE_PATH_AIX([$1])
  4620. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  4621. # Warning - without using the other run time loading flags,
  4622. # -berok will link without error, but may produce a broken library.
  4623. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  4624. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  4625. if test "$with_gnu_ld" = yes; then
  4626. # We only use this code for GNU lds that support --whole-archive.
  4627. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  4628. else
  4629. # Exported symbols can be pulled into shared objects from archives
  4630. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  4631. fi
  4632. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  4633. # This is similar to how AIX traditionally builds its shared libraries.
  4634. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
  4635. fi
  4636. fi
  4637. ;;
  4638. amigaos*)
  4639. case $host_cpu in
  4640. powerpc)
  4641. # see comment about AmigaOS4 .so support
  4642. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4643. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  4644. ;;
  4645. m68k)
  4646. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
  4647. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4648. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4649. ;;
  4650. esac
  4651. ;;
  4652. bsdi[[45]]*)
  4653. _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
  4654. ;;
  4655. cygwin* | mingw* | pw32* | cegcc*)
  4656. # When not using gcc, we currently assume that we are using
  4657. # Microsoft Visual C++.
  4658. # hardcode_libdir_flag_spec is actually meaningless, as there is
  4659. # no search path for DLLs.
  4660. case $cc_basename in
  4661. cl*)
  4662. # Native MSVC
  4663. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  4664. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4665. _LT_TAGVAR(always_export_symbols, $1)=yes
  4666. _LT_TAGVAR(file_list_spec, $1)='@'
  4667. # Tell ltmain to make .lib files, not .a files.
  4668. libext=lib
  4669. # Tell ltmain to make .dll files, not .so files.
  4670. shrext_cmds=".dll"
  4671. # FIXME: Setting linknames here is a bad hack.
  4672. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
  4673. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  4674. sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
  4675. else
  4676. sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
  4677. fi~
  4678. $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  4679. linknames='
  4680. # The linker will not automatically build a static lib if we build a DLL.
  4681. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  4682. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4683. _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  4684. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
  4685. # Don't use ranlib
  4686. _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  4687. _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  4688. lt_tool_outputfile="@TOOL_OUTPUT@"~
  4689. case $lt_outputfile in
  4690. *.exe|*.EXE) ;;
  4691. *)
  4692. lt_outputfile="$lt_outputfile.exe"
  4693. lt_tool_outputfile="$lt_tool_outputfile.exe"
  4694. ;;
  4695. esac~
  4696. if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
  4697. $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  4698. $RM "$lt_outputfile.manifest";
  4699. fi'
  4700. ;;
  4701. *)
  4702. # Assume MSVC wrapper
  4703. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  4704. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4705. # Tell ltmain to make .lib files, not .a files.
  4706. libext=lib
  4707. # Tell ltmain to make .dll files, not .so files.
  4708. shrext_cmds=".dll"
  4709. # FIXME: Setting linknames here is a bad hack.
  4710. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
  4711. # The linker will automatically build a .lib file if we build a DLL.
  4712. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  4713. # FIXME: Should let the user specify the lib program.
  4714. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
  4715. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4716. ;;
  4717. esac
  4718. ;;
  4719. darwin* | rhapsody*)
  4720. _LT_DARWIN_LINKER_FEATURES($1)
  4721. ;;
  4722. dgux*)
  4723. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  4724. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4725. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4726. ;;
  4727. # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  4728. # support. Future versions do this automatically, but an explicit c++rt0.o
  4729. # does not break anything, and helps significantly (at the cost of a little
  4730. # extra space).
  4731. freebsd2.2*)
  4732. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
  4733. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4734. _LT_TAGVAR(hardcode_direct, $1)=yes
  4735. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4736. ;;
  4737. # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  4738. freebsd2.*)
  4739. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4740. _LT_TAGVAR(hardcode_direct, $1)=yes
  4741. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4742. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4743. ;;
  4744. # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  4745. freebsd* | dragonfly*)
  4746. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  4747. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4748. _LT_TAGVAR(hardcode_direct, $1)=yes
  4749. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4750. ;;
  4751. hpux9*)
  4752. if test "$GCC" = yes; then
  4753. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  4754. else
  4755. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  4756. fi
  4757. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  4758. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4759. _LT_TAGVAR(hardcode_direct, $1)=yes
  4760. # hardcode_minus_L: Not really in the search PATH,
  4761. # but as the default location of the library.
  4762. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4763. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4764. ;;
  4765. hpux10*)
  4766. if test "$GCC" = yes && test "$with_gnu_ld" = no; then
  4767. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  4768. else
  4769. _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
  4770. fi
  4771. if test "$with_gnu_ld" = no; then
  4772. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  4773. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4774. _LT_TAGVAR(hardcode_direct, $1)=yes
  4775. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4776. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4777. # hardcode_minus_L: Not really in the search PATH,
  4778. # but as the default location of the library.
  4779. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4780. fi
  4781. ;;
  4782. hpux11*)
  4783. if test "$GCC" = yes && test "$with_gnu_ld" = no; then
  4784. case $host_cpu in
  4785. hppa*64*)
  4786. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  4787. ;;
  4788. ia64*)
  4789. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  4790. ;;
  4791. *)
  4792. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  4793. ;;
  4794. esac
  4795. else
  4796. case $host_cpu in
  4797. hppa*64*)
  4798. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  4799. ;;
  4800. ia64*)
  4801. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  4802. ;;
  4803. *)
  4804. m4_if($1, [], [
  4805. # Older versions of the 11.00 compiler do not understand -b yet
  4806. # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
  4807. _LT_LINKER_OPTION([if $CC understands -b],
  4808. _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
  4809. [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
  4810. [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
  4811. [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
  4812. ;;
  4813. esac
  4814. fi
  4815. if test "$with_gnu_ld" = no; then
  4816. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  4817. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4818. case $host_cpu in
  4819. hppa*64*|ia64*)
  4820. _LT_TAGVAR(hardcode_direct, $1)=no
  4821. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4822. ;;
  4823. *)
  4824. _LT_TAGVAR(hardcode_direct, $1)=yes
  4825. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4826. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4827. # hardcode_minus_L: Not really in the search PATH,
  4828. # but as the default location of the library.
  4829. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4830. ;;
  4831. esac
  4832. fi
  4833. ;;
  4834. irix5* | irix6* | nonstopux*)
  4835. if test "$GCC" = yes; then
  4836. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  4837. # Try to use the -exported_symbol ld option, if it does not
  4838. # work, assume that -exports_file does not work either and
  4839. # implicitly export all symbols.
  4840. # This should be the same for all languages, so no per-tag cache variable.
  4841. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
  4842. [lt_cv_irix_exported_symbol],
  4843. [save_LDFLAGS="$LDFLAGS"
  4844. LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
  4845. AC_LINK_IFELSE(
  4846. [AC_LANG_SOURCE(
  4847. [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
  4848. [C++], [[int foo (void) { return 0; }]],
  4849. [Fortran 77], [[
  4850. subroutine foo
  4851. end]],
  4852. [Fortran], [[
  4853. subroutine foo
  4854. end]])])],
  4855. [lt_cv_irix_exported_symbol=yes],
  4856. [lt_cv_irix_exported_symbol=no])
  4857. LDFLAGS="$save_LDFLAGS"])
  4858. if test "$lt_cv_irix_exported_symbol" = yes; then
  4859. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
  4860. fi
  4861. else
  4862. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
  4863. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
  4864. fi
  4865. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  4866. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4867. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4868. _LT_TAGVAR(inherit_rpath, $1)=yes
  4869. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4870. ;;
  4871. netbsd*)
  4872. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  4873. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
  4874. else
  4875. _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
  4876. fi
  4877. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4878. _LT_TAGVAR(hardcode_direct, $1)=yes
  4879. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4880. ;;
  4881. newsos6)
  4882. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  4883. _LT_TAGVAR(hardcode_direct, $1)=yes
  4884. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4885. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4886. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4887. ;;
  4888. *nto* | *qnx*)
  4889. ;;
  4890. openbsd*)
  4891. if test -f /usr/libexec/ld.so; then
  4892. _LT_TAGVAR(hardcode_direct, $1)=yes
  4893. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4894. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4895. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  4896. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  4897. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
  4898. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  4899. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4900. else
  4901. case $host_os in
  4902. openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
  4903. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4904. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4905. ;;
  4906. *)
  4907. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  4908. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  4909. ;;
  4910. esac
  4911. fi
  4912. else
  4913. _LT_TAGVAR(ld_shlibs, $1)=no
  4914. fi
  4915. ;;
  4916. os2*)
  4917. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4918. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4919. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4920. _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
  4921. _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
  4922. ;;
  4923. osf3*)
  4924. if test "$GCC" = yes; then
  4925. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  4926. _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  4927. else
  4928. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  4929. _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
  4930. fi
  4931. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  4932. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4933. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4934. ;;
  4935. osf4* | osf5*) # as osf3* with the addition of -msym flag
  4936. if test "$GCC" = yes; then
  4937. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  4938. _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  4939. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4940. else
  4941. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  4942. _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
  4943. _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
  4944. $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
  4945. # Both c and cxx compiler support -rpath directly
  4946. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  4947. fi
  4948. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  4949. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4950. ;;
  4951. solaris*)
  4952. _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
  4953. if test "$GCC" = yes; then
  4954. wlarc='${wl}'
  4955. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  4956. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  4957. $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
  4958. else
  4959. case `$CC -V 2>&1` in
  4960. *"Compilers 5.0"*)
  4961. wlarc=''
  4962. _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
  4963. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  4964. $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
  4965. ;;
  4966. *)
  4967. wlarc='${wl}'
  4968. _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
  4969. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  4970. $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
  4971. ;;
  4972. esac
  4973. fi
  4974. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4975. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4976. case $host_os in
  4977. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  4978. *)
  4979. # The compiler driver will combine and reorder linker options,
  4980. # but understands `-z linker_flag'. GCC discards it without `$wl',
  4981. # but is careful enough not to reorder.
  4982. # Supported since Solaris 2.6 (maybe 2.5.1?)
  4983. if test "$GCC" = yes; then
  4984. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
  4985. else
  4986. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  4987. fi
  4988. ;;
  4989. esac
  4990. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4991. ;;
  4992. sunos4*)
  4993. if test "x$host_vendor" = xsequent; then
  4994. # Use $CC to link under sequent, because it throws in some extra .o
  4995. # files that make .init and .fini sections work.
  4996. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
  4997. else
  4998. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
  4999. fi
  5000. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5001. _LT_TAGVAR(hardcode_direct, $1)=yes
  5002. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5003. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5004. ;;
  5005. sysv4)
  5006. case $host_vendor in
  5007. sni)
  5008. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5009. _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
  5010. ;;
  5011. siemens)
  5012. ## LD is ld it makes a PLAMLIB
  5013. ## CC just makes a GrossModule.
  5014. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  5015. _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
  5016. _LT_TAGVAR(hardcode_direct, $1)=no
  5017. ;;
  5018. motorola)
  5019. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5020. _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
  5021. ;;
  5022. esac
  5023. runpath_var='LD_RUN_PATH'
  5024. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5025. ;;
  5026. sysv4.3*)
  5027. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5028. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5029. _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
  5030. ;;
  5031. sysv4*MP*)
  5032. if test -d /usr/nec; then
  5033. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5034. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5035. runpath_var=LD_RUN_PATH
  5036. hardcode_runpath_var=yes
  5037. _LT_TAGVAR(ld_shlibs, $1)=yes
  5038. fi
  5039. ;;
  5040. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  5041. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  5042. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5043. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5044. runpath_var='LD_RUN_PATH'
  5045. if test "$GCC" = yes; then
  5046. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5047. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5048. else
  5049. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5050. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5051. fi
  5052. ;;
  5053. sysv5* | sco3.2v5* | sco5v6*)
  5054. # Note: We can NOT use -z defs as we might desire, because we do not
  5055. # link with -lc, and that would cause any symbols used from libc to
  5056. # always be unresolved, which means just about no library would
  5057. # ever link correctly. If we're not using GNU ld we use -z text
  5058. # though, which does catch some bad symbols but isn't as heavy-handed
  5059. # as -z defs.
  5060. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  5061. _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
  5062. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5063. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5064. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
  5065. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5066. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5067. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  5068. runpath_var='LD_RUN_PATH'
  5069. if test "$GCC" = yes; then
  5070. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5071. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5072. else
  5073. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5074. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5075. fi
  5076. ;;
  5077. uts4*)
  5078. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5079. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5080. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5081. ;;
  5082. *)
  5083. _LT_TAGVAR(ld_shlibs, $1)=no
  5084. ;;
  5085. esac
  5086. if test x$host_vendor = xsni; then
  5087. case $host in
  5088. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  5089. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
  5090. ;;
  5091. esac
  5092. fi
  5093. fi
  5094. ])
  5095. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  5096. test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  5097. _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
  5098. _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
  5099. _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
  5100. _LT_DECL([], [extract_expsyms_cmds], [2],
  5101. [The commands to extract the exported symbol list from a shared archive])
  5102. #
  5103. # Do we need to explicitly link libc?
  5104. #
  5105. case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
  5106. x|xyes)
  5107. # Assume -lc should be added
  5108. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5109. if test "$enable_shared" = yes && test "$GCC" = yes; then
  5110. case $_LT_TAGVAR(archive_cmds, $1) in
  5111. *'~'*)
  5112. # FIXME: we may have to deal with multi-command sequences.
  5113. ;;
  5114. '$CC '*)
  5115. # Test whether the compiler implicitly links with -lc since on some
  5116. # systems, -lgcc has to come before -lc. If gcc already passes -lc
  5117. # to ld, don't add -lc before -lgcc.
  5118. AC_CACHE_CHECK([whether -lc should be explicitly linked in],
  5119. [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
  5120. [$RM conftest*
  5121. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  5122. if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
  5123. soname=conftest
  5124. lib=conftest
  5125. libobjs=conftest.$ac_objext
  5126. deplibs=
  5127. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
  5128. pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
  5129. compiler_flags=-v
  5130. linker_flags=-v
  5131. verstring=
  5132. output_objdir=.
  5133. libname=conftest
  5134. lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
  5135. _LT_TAGVAR(allow_undefined_flag, $1)=
  5136. if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
  5137. then
  5138. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5139. else
  5140. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5141. fi
  5142. _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
  5143. else
  5144. cat conftest.err 1>&5
  5145. fi
  5146. $RM conftest*
  5147. ])
  5148. _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
  5149. ;;
  5150. esac
  5151. fi
  5152. ;;
  5153. esac
  5154. _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
  5155. [Whether or not to add -lc for building shared libraries])
  5156. _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
  5157. [enable_shared_with_static_runtimes], [0],
  5158. [Whether or not to disallow shared libs when runtime libs are static])
  5159. _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
  5160. [Compiler flag to allow reflexive dlopens])
  5161. _LT_TAGDECL([], [whole_archive_flag_spec], [1],
  5162. [Compiler flag to generate shared objects directly from archives])
  5163. _LT_TAGDECL([], [compiler_needs_object], [1],
  5164. [Whether the compiler copes with passing no objects directly])
  5165. _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
  5166. [Create an old-style archive from a shared archive])
  5167. _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
  5168. [Create a temporary old-style archive to link instead of a shared archive])
  5169. _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
  5170. _LT_TAGDECL([], [archive_expsym_cmds], [2])
  5171. _LT_TAGDECL([], [module_cmds], [2],
  5172. [Commands used to build a loadable module if different from building
  5173. a shared archive.])
  5174. _LT_TAGDECL([], [module_expsym_cmds], [2])
  5175. _LT_TAGDECL([], [with_gnu_ld], [1],
  5176. [Whether we are building with GNU ld or not])
  5177. _LT_TAGDECL([], [allow_undefined_flag], [1],
  5178. [Flag that allows shared libraries with undefined symbols to be built])
  5179. _LT_TAGDECL([], [no_undefined_flag], [1],
  5180. [Flag that enforces no undefined symbols])
  5181. _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
  5182. [Flag to hardcode $libdir into a binary during linking.
  5183. This must work even if $libdir does not exist])
  5184. _LT_TAGDECL([], [hardcode_libdir_separator], [1],
  5185. [Whether we need a single "-rpath" flag with a separated argument])
  5186. _LT_TAGDECL([], [hardcode_direct], [0],
  5187. [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
  5188. DIR into the resulting binary])
  5189. _LT_TAGDECL([], [hardcode_direct_absolute], [0],
  5190. [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
  5191. DIR into the resulting binary and the resulting library dependency is
  5192. "absolute", i.e impossible to change by setting ${shlibpath_var} if the
  5193. library is relocated])
  5194. _LT_TAGDECL([], [hardcode_minus_L], [0],
  5195. [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
  5196. into the resulting binary])
  5197. _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
  5198. [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
  5199. into the resulting binary])
  5200. _LT_TAGDECL([], [hardcode_automatic], [0],
  5201. [Set to "yes" if building a shared library automatically hardcodes DIR
  5202. into the library and all subsequent libraries and executables linked
  5203. against it])
  5204. _LT_TAGDECL([], [inherit_rpath], [0],
  5205. [Set to yes if linker adds runtime paths of dependent libraries
  5206. to runtime path list])
  5207. _LT_TAGDECL([], [link_all_deplibs], [0],
  5208. [Whether libtool must link a program against all its dependency libraries])
  5209. _LT_TAGDECL([], [always_export_symbols], [0],
  5210. [Set to "yes" if exported symbols are required])
  5211. _LT_TAGDECL([], [export_symbols_cmds], [2],
  5212. [The commands to list exported symbols])
  5213. _LT_TAGDECL([], [exclude_expsyms], [1],
  5214. [Symbols that should not be listed in the preloaded symbols])
  5215. _LT_TAGDECL([], [include_expsyms], [1],
  5216. [Symbols that must always be exported])
  5217. _LT_TAGDECL([], [prelink_cmds], [2],
  5218. [Commands necessary for linking programs (against libraries) with templates])
  5219. _LT_TAGDECL([], [postlink_cmds], [2],
  5220. [Commands necessary for finishing linking programs])
  5221. _LT_TAGDECL([], [file_list_spec], [1],
  5222. [Specify filename containing input files])
  5223. dnl FIXME: Not yet implemented
  5224. dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
  5225. dnl [Compiler flag to generate thread safe objects])
  5226. ])# _LT_LINKER_SHLIBS
  5227. # _LT_LANG_C_CONFIG([TAG])
  5228. # ------------------------
  5229. # Ensure that the configuration variables for a C compiler are suitably
  5230. # defined. These variables are subsequently used by _LT_CONFIG to write
  5231. # the compiler configuration to `libtool'.
  5232. m4_defun([_LT_LANG_C_CONFIG],
  5233. [m4_require([_LT_DECL_EGREP])dnl
  5234. lt_save_CC="$CC"
  5235. AC_LANG_PUSH(C)
  5236. # Source file extension for C test sources.
  5237. ac_ext=c
  5238. # Object file extension for compiled C test sources.
  5239. objext=o
  5240. _LT_TAGVAR(objext, $1)=$objext
  5241. # Code to be used in simple compile tests
  5242. lt_simple_compile_test_code="int some_variable = 0;"
  5243. # Code to be used in simple link tests
  5244. lt_simple_link_test_code='int main(){return(0);}'
  5245. _LT_TAG_COMPILER
  5246. # Save the default compiler, since it gets overwritten when the other
  5247. # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
  5248. compiler_DEFAULT=$CC
  5249. # save warnings/boilerplate of simple test code
  5250. _LT_COMPILER_BOILERPLATE
  5251. _LT_LINKER_BOILERPLATE
  5252. if test -n "$compiler"; then
  5253. _LT_COMPILER_NO_RTTI($1)
  5254. _LT_COMPILER_PIC($1)
  5255. _LT_COMPILER_C_O($1)
  5256. _LT_COMPILER_FILE_LOCKS($1)
  5257. _LT_LINKER_SHLIBS($1)
  5258. _LT_SYS_DYNAMIC_LINKER($1)
  5259. _LT_LINKER_HARDCODE_LIBPATH($1)
  5260. LT_SYS_DLOPEN_SELF
  5261. _LT_CMD_STRIPLIB
  5262. # Report which library types will actually be built
  5263. AC_MSG_CHECKING([if libtool supports shared libraries])
  5264. AC_MSG_RESULT([$can_build_shared])
  5265. AC_MSG_CHECKING([whether to build shared libraries])
  5266. test "$can_build_shared" = "no" && enable_shared=no
  5267. # On AIX, shared libraries and static libraries use the same namespace, and
  5268. # are all built from PIC.
  5269. case $host_os in
  5270. aix3*)
  5271. test "$enable_shared" = yes && enable_static=no
  5272. if test -n "$RANLIB"; then
  5273. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  5274. postinstall_cmds='$RANLIB $lib'
  5275. fi
  5276. ;;
  5277. aix[[4-9]]*)
  5278. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  5279. test "$enable_shared" = yes && enable_static=no
  5280. fi
  5281. ;;
  5282. esac
  5283. AC_MSG_RESULT([$enable_shared])
  5284. AC_MSG_CHECKING([whether to build static libraries])
  5285. # Make sure either enable_shared or enable_static is yes.
  5286. test "$enable_shared" = yes || enable_static=yes
  5287. AC_MSG_RESULT([$enable_static])
  5288. _LT_CONFIG($1)
  5289. fi
  5290. AC_LANG_POP
  5291. CC="$lt_save_CC"
  5292. ])# _LT_LANG_C_CONFIG
  5293. # _LT_LANG_CXX_CONFIG([TAG])
  5294. # --------------------------
  5295. # Ensure that the configuration variables for a C++ compiler are suitably
  5296. # defined. These variables are subsequently used by _LT_CONFIG to write
  5297. # the compiler configuration to `libtool'.
  5298. m4_defun([_LT_LANG_CXX_CONFIG],
  5299. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  5300. m4_require([_LT_DECL_EGREP])dnl
  5301. m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  5302. if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
  5303. ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
  5304. (test "X$CXX" != "Xg++"))) ; then
  5305. AC_PROG_CXXCPP
  5306. else
  5307. _lt_caught_CXX_error=yes
  5308. fi
  5309. AC_LANG_PUSH(C++)
  5310. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5311. _LT_TAGVAR(allow_undefined_flag, $1)=
  5312. _LT_TAGVAR(always_export_symbols, $1)=no
  5313. _LT_TAGVAR(archive_expsym_cmds, $1)=
  5314. _LT_TAGVAR(compiler_needs_object, $1)=no
  5315. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  5316. _LT_TAGVAR(hardcode_direct, $1)=no
  5317. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  5318. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  5319. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5320. _LT_TAGVAR(hardcode_minus_L, $1)=no
  5321. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  5322. _LT_TAGVAR(hardcode_automatic, $1)=no
  5323. _LT_TAGVAR(inherit_rpath, $1)=no
  5324. _LT_TAGVAR(module_cmds, $1)=
  5325. _LT_TAGVAR(module_expsym_cmds, $1)=
  5326. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  5327. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  5328. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  5329. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  5330. _LT_TAGVAR(no_undefined_flag, $1)=
  5331. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5332. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  5333. # Source file extension for C++ test sources.
  5334. ac_ext=cpp
  5335. # Object file extension for compiled C++ test sources.
  5336. objext=o
  5337. _LT_TAGVAR(objext, $1)=$objext
  5338. # No sense in running all these tests if we already determined that
  5339. # the CXX compiler isn't working. Some variables (like enable_shared)
  5340. # are currently assumed to apply to all compilers on this platform,
  5341. # and will be corrupted by setting them based on a non-working compiler.
  5342. if test "$_lt_caught_CXX_error" != yes; then
  5343. # Code to be used in simple compile tests
  5344. lt_simple_compile_test_code="int some_variable = 0;"
  5345. # Code to be used in simple link tests
  5346. lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
  5347. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  5348. _LT_TAG_COMPILER
  5349. # save warnings/boilerplate of simple test code
  5350. _LT_COMPILER_BOILERPLATE
  5351. _LT_LINKER_BOILERPLATE
  5352. # Allow CC to be a program name with arguments.
  5353. lt_save_CC=$CC
  5354. lt_save_CFLAGS=$CFLAGS
  5355. lt_save_LD=$LD
  5356. lt_save_GCC=$GCC
  5357. GCC=$GXX
  5358. lt_save_with_gnu_ld=$with_gnu_ld
  5359. lt_save_path_LD=$lt_cv_path_LD
  5360. if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
  5361. lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
  5362. else
  5363. $as_unset lt_cv_prog_gnu_ld
  5364. fi
  5365. if test -n "${lt_cv_path_LDCXX+set}"; then
  5366. lt_cv_path_LD=$lt_cv_path_LDCXX
  5367. else
  5368. $as_unset lt_cv_path_LD
  5369. fi
  5370. test -z "${LDCXX+set}" || LD=$LDCXX
  5371. CC=${CXX-"c++"}
  5372. CFLAGS=$CXXFLAGS
  5373. compiler=$CC
  5374. _LT_TAGVAR(compiler, $1)=$CC
  5375. _LT_CC_BASENAME([$compiler])
  5376. if test -n "$compiler"; then
  5377. # We don't want -fno-exception when compiling C++ code, so set the
  5378. # no_builtin_flag separately
  5379. if test "$GXX" = yes; then
  5380. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  5381. else
  5382. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  5383. fi
  5384. if test "$GXX" = yes; then
  5385. # Set up default GNU C++ configuration
  5386. LT_PATH_LD
  5387. # Check if GNU C++ uses GNU ld as the underlying linker, since the
  5388. # archiving commands below assume that GNU ld is being used.
  5389. if test "$with_gnu_ld" = yes; then
  5390. _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5391. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  5392. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5393. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5394. # If archive_cmds runs LD, not CC, wlarc should be empty
  5395. # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
  5396. # investigate it a little bit more. (MM)
  5397. wlarc='${wl}'
  5398. # ancient GNU ld didn't support --whole-archive et. al.
  5399. if eval "`$CC -print-prog-name=ld` --help 2>&1" |
  5400. $GREP 'no-whole-archive' > /dev/null; then
  5401. _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  5402. else
  5403. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5404. fi
  5405. else
  5406. with_gnu_ld=no
  5407. wlarc=
  5408. # A generic and very simple default shared library creation
  5409. # command for GNU C++ for the case where it uses the native
  5410. # linker, instead of GNU ld. If possible, this setting should
  5411. # overridden to take advantage of the native linker features on
  5412. # the platform it is being used on.
  5413. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  5414. fi
  5415. # Commands to make compiler produce verbose output that lists
  5416. # what "hidden" libraries, object files and flags are used when
  5417. # linking a shared library.
  5418. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  5419. else
  5420. GXX=no
  5421. with_gnu_ld=no
  5422. wlarc=
  5423. fi
  5424. # PORTME: fill in a description of your system's C++ link characteristics
  5425. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  5426. _LT_TAGVAR(ld_shlibs, $1)=yes
  5427. case $host_os in
  5428. aix3*)
  5429. # FIXME: insert proper C++ library support
  5430. _LT_TAGVAR(ld_shlibs, $1)=no
  5431. ;;
  5432. aix[[4-9]]*)
  5433. if test "$host_cpu" = ia64; then
  5434. # On IA64, the linker does run time linking by default, so we don't
  5435. # have to do anything special.
  5436. aix_use_runtimelinking=no
  5437. exp_sym_flag='-Bexport'
  5438. no_entry_flag=""
  5439. else
  5440. aix_use_runtimelinking=no
  5441. # Test if we are trying to use run time linking or normal
  5442. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  5443. # need to do runtime linking.
  5444. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  5445. for ld_flag in $LDFLAGS; do
  5446. case $ld_flag in
  5447. *-brtl*)
  5448. aix_use_runtimelinking=yes
  5449. break
  5450. ;;
  5451. esac
  5452. done
  5453. ;;
  5454. esac
  5455. exp_sym_flag='-bexport'
  5456. no_entry_flag='-bnoentry'
  5457. fi
  5458. # When large executables or shared objects are built, AIX ld can
  5459. # have problems creating the table of contents. If linking a library
  5460. # or program results in "error TOC overflow" add -mminimal-toc to
  5461. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  5462. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  5463. _LT_TAGVAR(archive_cmds, $1)=''
  5464. _LT_TAGVAR(hardcode_direct, $1)=yes
  5465. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5466. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5467. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5468. _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
  5469. if test "$GXX" = yes; then
  5470. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  5471. # We only want to do this on AIX 4.2 and lower, the check
  5472. # below for broken collect2 doesn't work under 4.3+
  5473. collect2name=`${CC} -print-prog-name=collect2`
  5474. if test -f "$collect2name" &&
  5475. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  5476. then
  5477. # We have reworked collect2
  5478. :
  5479. else
  5480. # We have old collect2
  5481. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  5482. # It fails to find uninstalled libraries when the uninstalled
  5483. # path is not listed in the libpath. Setting hardcode_minus_L
  5484. # to unsupported forces relinking
  5485. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5486. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5487. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5488. fi
  5489. esac
  5490. shared_flag='-shared'
  5491. if test "$aix_use_runtimelinking" = yes; then
  5492. shared_flag="$shared_flag "'${wl}-G'
  5493. fi
  5494. else
  5495. # not using gcc
  5496. if test "$host_cpu" = ia64; then
  5497. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  5498. # chokes on -Wl,-G. The following line is correct:
  5499. shared_flag='-G'
  5500. else
  5501. if test "$aix_use_runtimelinking" = yes; then
  5502. shared_flag='${wl}-G'
  5503. else
  5504. shared_flag='${wl}-bM:SRE'
  5505. fi
  5506. fi
  5507. fi
  5508. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
  5509. # It seems that -bexpall does not export symbols beginning with
  5510. # underscore (_), so it is better to generate a list of symbols to
  5511. # export.
  5512. _LT_TAGVAR(always_export_symbols, $1)=yes
  5513. if test "$aix_use_runtimelinking" = yes; then
  5514. # Warning - without using the other runtime loading flags (-brtl),
  5515. # -berok will link without error, but may produce a broken library.
  5516. _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
  5517. # Determine the default libpath from the value encoded in an empty
  5518. # executable.
  5519. _LT_SYS_MODULE_PATH_AIX([$1])
  5520. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  5521. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
  5522. else
  5523. if test "$host_cpu" = ia64; then
  5524. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  5525. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  5526. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
  5527. else
  5528. # Determine the default libpath from the value encoded in an
  5529. # empty executable.
  5530. _LT_SYS_MODULE_PATH_AIX([$1])
  5531. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  5532. # Warning - without using the other run time loading flags,
  5533. # -berok will link without error, but may produce a broken library.
  5534. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  5535. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  5536. if test "$with_gnu_ld" = yes; then
  5537. # We only use this code for GNU lds that support --whole-archive.
  5538. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  5539. else
  5540. # Exported symbols can be pulled into shared objects from archives
  5541. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  5542. fi
  5543. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5544. # This is similar to how AIX traditionally builds its shared
  5545. # libraries.
  5546. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
  5547. fi
  5548. fi
  5549. ;;
  5550. beos*)
  5551. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  5552. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5553. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  5554. # support --undefined. This deserves some investigation. FIXME
  5555. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5556. else
  5557. _LT_TAGVAR(ld_shlibs, $1)=no
  5558. fi
  5559. ;;
  5560. chorus*)
  5561. case $cc_basename in
  5562. *)
  5563. # FIXME: insert proper C++ library support
  5564. _LT_TAGVAR(ld_shlibs, $1)=no
  5565. ;;
  5566. esac
  5567. ;;
  5568. cygwin* | mingw* | pw32* | cegcc*)
  5569. case $GXX,$cc_basename in
  5570. ,cl* | no,cl*)
  5571. # Native MSVC
  5572. # hardcode_libdir_flag_spec is actually meaningless, as there is
  5573. # no search path for DLLs.
  5574. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  5575. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5576. _LT_TAGVAR(always_export_symbols, $1)=yes
  5577. _LT_TAGVAR(file_list_spec, $1)='@'
  5578. # Tell ltmain to make .lib files, not .a files.
  5579. libext=lib
  5580. # Tell ltmain to make .dll files, not .so files.
  5581. shrext_cmds=".dll"
  5582. # FIXME: Setting linknames here is a bad hack.
  5583. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
  5584. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  5585. $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
  5586. else
  5587. $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
  5588. fi~
  5589. $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  5590. linknames='
  5591. # The linker will not automatically build a static lib if we build a DLL.
  5592. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  5593. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5594. # Don't use ranlib
  5595. _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  5596. _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  5597. lt_tool_outputfile="@TOOL_OUTPUT@"~
  5598. case $lt_outputfile in
  5599. *.exe|*.EXE) ;;
  5600. *)
  5601. lt_outputfile="$lt_outputfile.exe"
  5602. lt_tool_outputfile="$lt_tool_outputfile.exe"
  5603. ;;
  5604. esac~
  5605. func_to_tool_file "$lt_outputfile"~
  5606. if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
  5607. $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  5608. $RM "$lt_outputfile.manifest";
  5609. fi'
  5610. ;;
  5611. *)
  5612. # g++
  5613. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  5614. # as there is no search path for DLLs.
  5615. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5616. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
  5617. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5618. _LT_TAGVAR(always_export_symbols, $1)=no
  5619. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5620. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  5621. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  5622. # If the export-symbols file already is a .def file (1st line
  5623. # is EXPORTS), use it as is; otherwise, prepend...
  5624. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  5625. cp $export_symbols $output_objdir/$soname.def;
  5626. else
  5627. echo EXPORTS > $output_objdir/$soname.def;
  5628. cat $export_symbols >> $output_objdir/$soname.def;
  5629. fi~
  5630. $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  5631. else
  5632. _LT_TAGVAR(ld_shlibs, $1)=no
  5633. fi
  5634. ;;
  5635. esac
  5636. ;;
  5637. darwin* | rhapsody*)
  5638. _LT_DARWIN_LINKER_FEATURES($1)
  5639. ;;
  5640. dgux*)
  5641. case $cc_basename in
  5642. ec++*)
  5643. # FIXME: insert proper C++ library support
  5644. _LT_TAGVAR(ld_shlibs, $1)=no
  5645. ;;
  5646. ghcx*)
  5647. # Green Hills C++ Compiler
  5648. # FIXME: insert proper C++ library support
  5649. _LT_TAGVAR(ld_shlibs, $1)=no
  5650. ;;
  5651. *)
  5652. # FIXME: insert proper C++ library support
  5653. _LT_TAGVAR(ld_shlibs, $1)=no
  5654. ;;
  5655. esac
  5656. ;;
  5657. freebsd2.*)
  5658. # C++ shared libraries reported to be fairly broken before
  5659. # switch to ELF
  5660. _LT_TAGVAR(ld_shlibs, $1)=no
  5661. ;;
  5662. freebsd-elf*)
  5663. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5664. ;;
  5665. freebsd* | dragonfly*)
  5666. # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
  5667. # conventions
  5668. _LT_TAGVAR(ld_shlibs, $1)=yes
  5669. ;;
  5670. gnu*)
  5671. ;;
  5672. haiku*)
  5673. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5674. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5675. ;;
  5676. hpux9*)
  5677. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5678. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5679. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5680. _LT_TAGVAR(hardcode_direct, $1)=yes
  5681. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  5682. # but as the default
  5683. # location of the library.
  5684. case $cc_basename in
  5685. CC*)
  5686. # FIXME: insert proper C++ library support
  5687. _LT_TAGVAR(ld_shlibs, $1)=no
  5688. ;;
  5689. aCC*)
  5690. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  5691. # Commands to make compiler produce verbose output that lists
  5692. # what "hidden" libraries, object files and flags are used when
  5693. # linking a shared library.
  5694. #
  5695. # There doesn't appear to be a way to prevent this compiler from
  5696. # explicitly linking system object files so we need to strip them
  5697. # from the output so that they don't get included in the library
  5698. # dependencies.
  5699. 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; func_echo_all "$list"'
  5700. ;;
  5701. *)
  5702. if test "$GXX" = yes; then
  5703. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  5704. else
  5705. # FIXME: insert proper C++ library support
  5706. _LT_TAGVAR(ld_shlibs, $1)=no
  5707. fi
  5708. ;;
  5709. esac
  5710. ;;
  5711. hpux10*|hpux11*)
  5712. if test $with_gnu_ld = no; then
  5713. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5714. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5715. case $host_cpu in
  5716. hppa*64*|ia64*)
  5717. ;;
  5718. *)
  5719. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5720. ;;
  5721. esac
  5722. fi
  5723. case $host_cpu in
  5724. hppa*64*|ia64*)
  5725. _LT_TAGVAR(hardcode_direct, $1)=no
  5726. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5727. ;;
  5728. *)
  5729. _LT_TAGVAR(hardcode_direct, $1)=yes
  5730. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5731. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  5732. # but as the default
  5733. # location of the library.
  5734. ;;
  5735. esac
  5736. case $cc_basename in
  5737. CC*)
  5738. # FIXME: insert proper C++ library support
  5739. _LT_TAGVAR(ld_shlibs, $1)=no
  5740. ;;
  5741. aCC*)
  5742. case $host_cpu in
  5743. hppa*64*)
  5744. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5745. ;;
  5746. ia64*)
  5747. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5748. ;;
  5749. *)
  5750. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5751. ;;
  5752. esac
  5753. # Commands to make compiler produce verbose output that lists
  5754. # what "hidden" libraries, object files and flags are used when
  5755. # linking a shared library.
  5756. #
  5757. # There doesn't appear to be a way to prevent this compiler from
  5758. # explicitly linking system object files so we need to strip them
  5759. # from the output so that they don't get included in the library
  5760. # dependencies.
  5761. 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; func_echo_all "$list"'
  5762. ;;
  5763. *)
  5764. if test "$GXX" = yes; then
  5765. if test $with_gnu_ld = no; then
  5766. case $host_cpu in
  5767. hppa*64*)
  5768. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5769. ;;
  5770. ia64*)
  5771. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5772. ;;
  5773. *)
  5774. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5775. ;;
  5776. esac
  5777. fi
  5778. else
  5779. # FIXME: insert proper C++ library support
  5780. _LT_TAGVAR(ld_shlibs, $1)=no
  5781. fi
  5782. ;;
  5783. esac
  5784. ;;
  5785. interix[[3-9]]*)
  5786. _LT_TAGVAR(hardcode_direct, $1)=no
  5787. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5788. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5789. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5790. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  5791. # Instead, shared libraries are loaded at an image base (0x10000000 by
  5792. # default) and relocated if they conflict, which is a slow very memory
  5793. # consuming and fragmenting process. To avoid this, we pick a random,
  5794. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  5795. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  5796. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
  5797. _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
  5798. ;;
  5799. irix5* | irix6*)
  5800. case $cc_basename in
  5801. CC*)
  5802. # SGI C++
  5803. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
  5804. # Archives containing C++ object files must be created using
  5805. # "CC -ar", where "CC" is the IRIX C++ compiler. This is
  5806. # necessary to make sure instantiated templates are included
  5807. # in the archive.
  5808. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
  5809. ;;
  5810. *)
  5811. if test "$GXX" = yes; then
  5812. if test "$with_gnu_ld" = no; then
  5813. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  5814. else
  5815. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
  5816. fi
  5817. fi
  5818. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5819. ;;
  5820. esac
  5821. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5822. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5823. _LT_TAGVAR(inherit_rpath, $1)=yes
  5824. ;;
  5825. linux* | k*bsd*-gnu | kopensolaris*-gnu)
  5826. case $cc_basename in
  5827. KCC*)
  5828. # Kuck and Associates, Inc. (KAI) C++ Compiler
  5829. # KCC will only create a shared library if the output file
  5830. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  5831. # to its proper name (with version) after linking.
  5832. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
  5833. _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
  5834. # Commands to make compiler produce verbose output that lists
  5835. # what "hidden" libraries, object files and flags are used when
  5836. # linking a shared library.
  5837. #
  5838. # There doesn't appear to be a way to prevent this compiler from
  5839. # explicitly linking system object files so we need to strip them
  5840. # from the output so that they don't get included in the library
  5841. # dependencies.
  5842. 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; func_echo_all "$list"'
  5843. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5844. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5845. # Archives containing C++ object files must be created using
  5846. # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  5847. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  5848. ;;
  5849. icpc* | ecpc* )
  5850. # Intel C++
  5851. with_gnu_ld=yes
  5852. # version 8.0 and above of icpc choke on multiply defined symbols
  5853. # if we add $predep_objects and $postdep_objects, however 7.1 and
  5854. # earlier do not add the objects themselves.
  5855. case `$CC -V 2>&1` in
  5856. *"Version 7."*)
  5857. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5858. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  5859. ;;
  5860. *) # Version 8.0 or newer
  5861. tmp_idyn=
  5862. case $host_cpu in
  5863. ia64*) tmp_idyn=' -i_dynamic';;
  5864. esac
  5865. _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5866. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  5867. ;;
  5868. esac
  5869. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5870. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5871. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5872. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  5873. ;;
  5874. pgCC* | pgcpp*)
  5875. # Portland Group C++ compiler
  5876. case `$CC -V` in
  5877. *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
  5878. _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
  5879. rm -rf $tpldir~
  5880. $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
  5881. compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
  5882. _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
  5883. rm -rf $tpldir~
  5884. $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
  5885. $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
  5886. $RANLIB $oldlib'
  5887. _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
  5888. rm -rf $tpldir~
  5889. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  5890. $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
  5891. _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
  5892. rm -rf $tpldir~
  5893. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  5894. $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
  5895. ;;
  5896. *) # Version 6 and above use weak symbols
  5897. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
  5898. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
  5899. ;;
  5900. esac
  5901. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
  5902. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5903. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
  5904. ;;
  5905. cxx*)
  5906. # Compaq C++
  5907. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5908. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
  5909. runpath_var=LD_RUN_PATH
  5910. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  5911. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5912. # Commands to make compiler produce verbose output that lists
  5913. # what "hidden" libraries, object files and flags are used when
  5914. # linking a shared library.
  5915. #
  5916. # There doesn't appear to be a way to prevent this compiler from
  5917. # explicitly linking system object files so we need to strip them
  5918. # from the output so that they don't get included in the library
  5919. # dependencies.
  5920. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$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; func_echo_all "X$list" | $Xsed'
  5921. ;;
  5922. xl* | mpixl* | bgxl*)
  5923. # IBM XL 8.0 on PPC, with GNU ld
  5924. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5925. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5926. _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5927. if test "x$supports_anon_versioning" = xyes; then
  5928. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  5929. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  5930. echo "local: *; };" >> $output_objdir/$libname.ver~
  5931. $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  5932. fi
  5933. ;;
  5934. *)
  5935. case `$CC -V 2>&1 | sed 5q` in
  5936. *Sun\ C*)
  5937. # Sun C++ 5.9
  5938. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  5939. _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5940. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
  5941. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5942. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
  5943. _LT_TAGVAR(compiler_needs_object, $1)=yes
  5944. # Not sure whether something based on
  5945. # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
  5946. # would be better.
  5947. output_verbose_link_cmd='func_echo_all'
  5948. # Archives containing C++ object files must be created using
  5949. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  5950. # necessary to make sure instantiated templates are included
  5951. # in the archive.
  5952. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  5953. ;;
  5954. esac
  5955. ;;
  5956. esac
  5957. ;;
  5958. lynxos*)
  5959. # FIXME: insert proper C++ library support
  5960. _LT_TAGVAR(ld_shlibs, $1)=no
  5961. ;;
  5962. m88k*)
  5963. # FIXME: insert proper C++ library support
  5964. _LT_TAGVAR(ld_shlibs, $1)=no
  5965. ;;
  5966. mvs*)
  5967. case $cc_basename in
  5968. cxx*)
  5969. # FIXME: insert proper C++ library support
  5970. _LT_TAGVAR(ld_shlibs, $1)=no
  5971. ;;
  5972. *)
  5973. # FIXME: insert proper C++ library support
  5974. _LT_TAGVAR(ld_shlibs, $1)=no
  5975. ;;
  5976. esac
  5977. ;;
  5978. netbsd*)
  5979. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  5980. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
  5981. wlarc=
  5982. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5983. _LT_TAGVAR(hardcode_direct, $1)=yes
  5984. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5985. fi
  5986. # Workaround some broken pre-1.5 toolchains
  5987. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
  5988. ;;
  5989. *nto* | *qnx*)
  5990. _LT_TAGVAR(ld_shlibs, $1)=yes
  5991. ;;
  5992. openbsd2*)
  5993. # C++ shared libraries are fairly broken
  5994. _LT_TAGVAR(ld_shlibs, $1)=no
  5995. ;;
  5996. openbsd*)
  5997. if test -f /usr/libexec/ld.so; then
  5998. _LT_TAGVAR(hardcode_direct, $1)=yes
  5999. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6000. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6001. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  6002. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  6003. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  6004. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
  6005. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  6006. _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  6007. fi
  6008. output_verbose_link_cmd=func_echo_all
  6009. else
  6010. _LT_TAGVAR(ld_shlibs, $1)=no
  6011. fi
  6012. ;;
  6013. osf3* | osf4* | osf5*)
  6014. case $cc_basename in
  6015. KCC*)
  6016. # Kuck and Associates, Inc. (KAI) C++ Compiler
  6017. # KCC will only create a shared library if the output file
  6018. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  6019. # to its proper name (with version) after linking.
  6020. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
  6021. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  6022. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6023. # Archives containing C++ object files must be created using
  6024. # the KAI C++ compiler.
  6025. case $host in
  6026. osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
  6027. *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
  6028. esac
  6029. ;;
  6030. RCC*)
  6031. # Rational C++ 2.4.1
  6032. # FIXME: insert proper C++ library support
  6033. _LT_TAGVAR(ld_shlibs, $1)=no
  6034. ;;
  6035. cxx*)
  6036. case $host in
  6037. osf3*)
  6038. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  6039. _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
  6040. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6041. ;;
  6042. *)
  6043. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  6044. _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
  6045. _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
  6046. echo "-hidden">> $lib.exp~
  6047. $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
  6048. $RM $lib.exp'
  6049. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  6050. ;;
  6051. esac
  6052. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6053. # Commands to make compiler produce verbose output that lists
  6054. # what "hidden" libraries, object files and flags are used when
  6055. # linking a shared library.
  6056. #
  6057. # There doesn't appear to be a way to prevent this compiler from
  6058. # explicitly linking system object files so we need to strip them
  6059. # from the output so that they don't get included in the library
  6060. # dependencies.
  6061. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$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; func_echo_all "$list"'
  6062. ;;
  6063. *)
  6064. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  6065. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  6066. case $host in
  6067. osf3*)
  6068. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  6069. ;;
  6070. *)
  6071. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  6072. ;;
  6073. esac
  6074. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6075. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6076. # Commands to make compiler produce verbose output that lists
  6077. # what "hidden" libraries, object files and flags are used when
  6078. # linking a shared library.
  6079. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  6080. else
  6081. # FIXME: insert proper C++ library support
  6082. _LT_TAGVAR(ld_shlibs, $1)=no
  6083. fi
  6084. ;;
  6085. esac
  6086. ;;
  6087. psos*)
  6088. # FIXME: insert proper C++ library support
  6089. _LT_TAGVAR(ld_shlibs, $1)=no
  6090. ;;
  6091. sunos4*)
  6092. case $cc_basename in
  6093. CC*)
  6094. # Sun C++ 4.x
  6095. # FIXME: insert proper C++ library support
  6096. _LT_TAGVAR(ld_shlibs, $1)=no
  6097. ;;
  6098. lcc*)
  6099. # Lucid
  6100. # FIXME: insert proper C++ library support
  6101. _LT_TAGVAR(ld_shlibs, $1)=no
  6102. ;;
  6103. *)
  6104. # FIXME: insert proper C++ library support
  6105. _LT_TAGVAR(ld_shlibs, $1)=no
  6106. ;;
  6107. esac
  6108. ;;
  6109. solaris*)
  6110. case $cc_basename in
  6111. CC* | sunCC*)
  6112. # Sun C++ 4.2, 5.x and Centerline C++
  6113. _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
  6114. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  6115. _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6116. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6117. $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  6118. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6119. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6120. case $host_os in
  6121. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6122. *)
  6123. # The compiler driver will combine and reorder linker options,
  6124. # but understands `-z linker_flag'.
  6125. # Supported since Solaris 2.6 (maybe 2.5.1?)
  6126. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  6127. ;;
  6128. esac
  6129. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6130. output_verbose_link_cmd='func_echo_all'
  6131. # Archives containing C++ object files must be created using
  6132. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  6133. # necessary to make sure instantiated templates are included
  6134. # in the archive.
  6135. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  6136. ;;
  6137. gcx*)
  6138. # Green Hills C++ Compiler
  6139. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  6140. # The C++ compiler must be used to create the archive.
  6141. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
  6142. ;;
  6143. *)
  6144. # GNU C++ compiler with Solaris linker
  6145. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  6146. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
  6147. if $CC --version | $GREP -v '^2\.7' > /dev/null; then
  6148. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  6149. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6150. $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  6151. # Commands to make compiler produce verbose output that lists
  6152. # what "hidden" libraries, object files and flags are used when
  6153. # linking a shared library.
  6154. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  6155. else
  6156. # g++ 2.7 appears to require `-G' NOT `-shared' on this
  6157. # platform.
  6158. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  6159. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6160. $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  6161. # Commands to make compiler produce verbose output that lists
  6162. # what "hidden" libraries, object files and flags are used when
  6163. # linking a shared library.
  6164. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  6165. fi
  6166. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
  6167. case $host_os in
  6168. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6169. *)
  6170. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
  6171. ;;
  6172. esac
  6173. fi
  6174. ;;
  6175. esac
  6176. ;;
  6177. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  6178. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  6179. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6180. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6181. runpath_var='LD_RUN_PATH'
  6182. case $cc_basename in
  6183. CC*)
  6184. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6185. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6186. ;;
  6187. *)
  6188. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6189. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6190. ;;
  6191. esac
  6192. ;;
  6193. sysv5* | sco3.2v5* | sco5v6*)
  6194. # Note: We can NOT use -z defs as we might desire, because we do not
  6195. # link with -lc, and that would cause any symbols used from libc to
  6196. # always be unresolved, which means just about no library would
  6197. # ever link correctly. If we're not using GNU ld we use -z text
  6198. # though, which does catch some bad symbols but isn't as heavy-handed
  6199. # as -z defs.
  6200. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  6201. _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
  6202. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6203. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6204. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
  6205. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  6206. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6207. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  6208. runpath_var='LD_RUN_PATH'
  6209. case $cc_basename in
  6210. CC*)
  6211. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6212. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6213. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
  6214. '"$_LT_TAGVAR(old_archive_cmds, $1)"
  6215. _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
  6216. '"$_LT_TAGVAR(reload_cmds, $1)"
  6217. ;;
  6218. *)
  6219. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6220. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6221. ;;
  6222. esac
  6223. ;;
  6224. tandem*)
  6225. case $cc_basename in
  6226. NCC*)
  6227. # NonStop-UX NCC 3.20
  6228. # FIXME: insert proper C++ library support
  6229. _LT_TAGVAR(ld_shlibs, $1)=no
  6230. ;;
  6231. *)
  6232. # FIXME: insert proper C++ library support
  6233. _LT_TAGVAR(ld_shlibs, $1)=no
  6234. ;;
  6235. esac
  6236. ;;
  6237. vxworks*)
  6238. # FIXME: insert proper C++ library support
  6239. _LT_TAGVAR(ld_shlibs, $1)=no
  6240. ;;
  6241. *)
  6242. # FIXME: insert proper C++ library support
  6243. _LT_TAGVAR(ld_shlibs, $1)=no
  6244. ;;
  6245. esac
  6246. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  6247. test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  6248. _LT_TAGVAR(GCC, $1)="$GXX"
  6249. _LT_TAGVAR(LD, $1)="$LD"
  6250. ## CAVEAT EMPTOR:
  6251. ## There is no encapsulation within the following macros, do not change
  6252. ## the running order or otherwise move them around unless you know exactly
  6253. ## what you are doing...
  6254. _LT_SYS_HIDDEN_LIBDEPS($1)
  6255. _LT_COMPILER_PIC($1)
  6256. _LT_COMPILER_C_O($1)
  6257. _LT_COMPILER_FILE_LOCKS($1)
  6258. _LT_LINKER_SHLIBS($1)
  6259. _LT_SYS_DYNAMIC_LINKER($1)
  6260. _LT_LINKER_HARDCODE_LIBPATH($1)
  6261. _LT_CONFIG($1)
  6262. fi # test -n "$compiler"
  6263. CC=$lt_save_CC
  6264. CFLAGS=$lt_save_CFLAGS
  6265. LDCXX=$LD
  6266. LD=$lt_save_LD
  6267. GCC=$lt_save_GCC
  6268. with_gnu_ld=$lt_save_with_gnu_ld
  6269. lt_cv_path_LDCXX=$lt_cv_path_LD
  6270. lt_cv_path_LD=$lt_save_path_LD
  6271. lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
  6272. lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
  6273. fi # test "$_lt_caught_CXX_error" != yes
  6274. AC_LANG_POP
  6275. ])# _LT_LANG_CXX_CONFIG
  6276. # _LT_FUNC_STRIPNAME_CNF
  6277. # ----------------------
  6278. # func_stripname_cnf prefix suffix name
  6279. # strip PREFIX and SUFFIX off of NAME.
  6280. # PREFIX and SUFFIX must not contain globbing or regex special
  6281. # characters, hashes, percent signs, but SUFFIX may contain a leading
  6282. # dot (in which case that matches only a dot).
  6283. #
  6284. # This function is identical to the (non-XSI) version of func_stripname,
  6285. # except this one can be used by m4 code that may be executed by configure,
  6286. # rather than the libtool script.
  6287. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
  6288. AC_REQUIRE([_LT_DECL_SED])
  6289. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
  6290. func_stripname_cnf ()
  6291. {
  6292. case ${2} in
  6293. .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
  6294. *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
  6295. esac
  6296. } # func_stripname_cnf
  6297. ])# _LT_FUNC_STRIPNAME_CNF
  6298. # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
  6299. # ---------------------------------
  6300. # Figure out "hidden" library dependencies from verbose
  6301. # compiler output when linking a shared library.
  6302. # Parse the compiler output and extract the necessary
  6303. # objects, libraries and library flags.
  6304. m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
  6305. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  6306. AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
  6307. # Dependencies to place before and after the object being linked:
  6308. _LT_TAGVAR(predep_objects, $1)=
  6309. _LT_TAGVAR(postdep_objects, $1)=
  6310. _LT_TAGVAR(predeps, $1)=
  6311. _LT_TAGVAR(postdeps, $1)=
  6312. _LT_TAGVAR(compiler_lib_search_path, $1)=
  6313. dnl we can't use the lt_simple_compile_test_code here,
  6314. dnl because it contains code intended for an executable,
  6315. dnl not a library. It's possible we should let each
  6316. dnl tag define a new lt_????_link_test_code variable,
  6317. dnl but it's only used here...
  6318. m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
  6319. int a;
  6320. void foo (void) { a = 0; }
  6321. _LT_EOF
  6322. ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
  6323. class Foo
  6324. {
  6325. public:
  6326. Foo (void) { a = 0; }
  6327. private:
  6328. int a;
  6329. };
  6330. _LT_EOF
  6331. ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
  6332. subroutine foo
  6333. implicit none
  6334. integer*4 a
  6335. a=0
  6336. return
  6337. end
  6338. _LT_EOF
  6339. ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
  6340. subroutine foo
  6341. implicit none
  6342. integer a
  6343. a=0
  6344. return
  6345. end
  6346. _LT_EOF
  6347. ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
  6348. public class foo {
  6349. private int a;
  6350. public void bar (void) {
  6351. a = 0;
  6352. }
  6353. };
  6354. _LT_EOF
  6355. ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
  6356. package foo
  6357. func foo() {
  6358. }
  6359. _LT_EOF
  6360. ])
  6361. _lt_libdeps_save_CFLAGS=$CFLAGS
  6362. case "$CC $CFLAGS " in #(
  6363. *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
  6364. *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
  6365. *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
  6366. esac
  6367. dnl Parse the compiler output and extract the necessary
  6368. dnl objects, libraries and library flags.
  6369. if AC_TRY_EVAL(ac_compile); then
  6370. # Parse the compiler output and extract the necessary
  6371. # objects, libraries and library flags.
  6372. # Sentinel used to keep track of whether or not we are before
  6373. # the conftest object file.
  6374. pre_test_object_deps_done=no
  6375. for p in `eval "$output_verbose_link_cmd"`; do
  6376. case ${prev}${p} in
  6377. -L* | -R* | -l*)
  6378. # Some compilers place space between "-{L,R}" and the path.
  6379. # Remove the space.
  6380. if test $p = "-L" ||
  6381. test $p = "-R"; then
  6382. prev=$p
  6383. continue
  6384. fi
  6385. # Expand the sysroot to ease extracting the directories later.
  6386. if test -z "$prev"; then
  6387. case $p in
  6388. -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
  6389. -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
  6390. -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
  6391. esac
  6392. fi
  6393. case $p in
  6394. =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
  6395. esac
  6396. if test "$pre_test_object_deps_done" = no; then
  6397. case ${prev} in
  6398. -L | -R)
  6399. # Internal compiler library paths should come after those
  6400. # provided the user. The postdeps already come after the
  6401. # user supplied libs so there is no need to process them.
  6402. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
  6403. _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
  6404. else
  6405. _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
  6406. fi
  6407. ;;
  6408. # The "-l" case would never come before the object being
  6409. # linked, so don't bother handling this case.
  6410. esac
  6411. else
  6412. if test -z "$_LT_TAGVAR(postdeps, $1)"; then
  6413. _LT_TAGVAR(postdeps, $1)="${prev}${p}"
  6414. else
  6415. _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
  6416. fi
  6417. fi
  6418. prev=
  6419. ;;
  6420. *.lto.$objext) ;; # Ignore GCC LTO objects
  6421. *.$objext)
  6422. # This assumes that the test object file only shows up
  6423. # once in the compiler output.
  6424. if test "$p" = "conftest.$objext"; then
  6425. pre_test_object_deps_done=yes
  6426. continue
  6427. fi
  6428. if test "$pre_test_object_deps_done" = no; then
  6429. if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
  6430. _LT_TAGVAR(predep_objects, $1)="$p"
  6431. else
  6432. _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
  6433. fi
  6434. else
  6435. if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
  6436. _LT_TAGVAR(postdep_objects, $1)="$p"
  6437. else
  6438. _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
  6439. fi
  6440. fi
  6441. ;;
  6442. *) ;; # Ignore the rest.
  6443. esac
  6444. done
  6445. # Clean up.
  6446. rm -f a.out a.exe
  6447. else
  6448. echo "libtool.m4: error: problem compiling $1 test program"
  6449. fi
  6450. $RM -f confest.$objext
  6451. CFLAGS=$_lt_libdeps_save_CFLAGS
  6452. # PORTME: override above test on systems where it is broken
  6453. m4_if([$1], [CXX],
  6454. [case $host_os in
  6455. interix[[3-9]]*)
  6456. # Interix 3.5 installs completely hosed .la files for C++, so rather than
  6457. # hack all around it, let's just trust "g++" to DTRT.
  6458. _LT_TAGVAR(predep_objects,$1)=
  6459. _LT_TAGVAR(postdep_objects,$1)=
  6460. _LT_TAGVAR(postdeps,$1)=
  6461. ;;
  6462. linux*)
  6463. case `$CC -V 2>&1 | sed 5q` in
  6464. *Sun\ C*)
  6465. # Sun C++ 5.9
  6466. # The more standards-conforming stlport4 library is
  6467. # incompatible with the Cstd library. Avoid specifying
  6468. # it if it's in CXXFLAGS. Ignore libCrun as
  6469. # -library=stlport4 depends on it.
  6470. case " $CXX $CXXFLAGS " in
  6471. *" -library=stlport4 "*)
  6472. solaris_use_stlport4=yes
  6473. ;;
  6474. esac
  6475. if test "$solaris_use_stlport4" != yes; then
  6476. _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
  6477. fi
  6478. ;;
  6479. esac
  6480. ;;
  6481. solaris*)
  6482. case $cc_basename in
  6483. CC* | sunCC*)
  6484. # The more standards-conforming stlport4 library is
  6485. # incompatible with the Cstd library. Avoid specifying
  6486. # it if it's in CXXFLAGS. Ignore libCrun as
  6487. # -library=stlport4 depends on it.
  6488. case " $CXX $CXXFLAGS " in
  6489. *" -library=stlport4 "*)
  6490. solaris_use_stlport4=yes
  6491. ;;
  6492. esac
  6493. # Adding this requires a known-good setup of shared libraries for
  6494. # Sun compiler versions before 5.6, else PIC objects from an old
  6495. # archive will be linked into the output, leading to subtle bugs.
  6496. if test "$solaris_use_stlport4" != yes; then
  6497. _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
  6498. fi
  6499. ;;
  6500. esac
  6501. ;;
  6502. esac
  6503. ])
  6504. case " $_LT_TAGVAR(postdeps, $1) " in
  6505. *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
  6506. esac
  6507. _LT_TAGVAR(compiler_lib_search_dirs, $1)=
  6508. if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
  6509. _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
  6510. fi
  6511. _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
  6512. [The directories searched by this compiler when creating a shared library])
  6513. _LT_TAGDECL([], [predep_objects], [1],
  6514. [Dependencies to place before and after the objects being linked to
  6515. create a shared library])
  6516. _LT_TAGDECL([], [postdep_objects], [1])
  6517. _LT_TAGDECL([], [predeps], [1])
  6518. _LT_TAGDECL([], [postdeps], [1])
  6519. _LT_TAGDECL([], [compiler_lib_search_path], [1],
  6520. [The library search path used internally by the compiler when linking
  6521. a shared library])
  6522. ])# _LT_SYS_HIDDEN_LIBDEPS
  6523. # _LT_LANG_F77_CONFIG([TAG])
  6524. # --------------------------
  6525. # Ensure that the configuration variables for a Fortran 77 compiler are
  6526. # suitably defined. These variables are subsequently used by _LT_CONFIG
  6527. # to write the compiler configuration to `libtool'.
  6528. m4_defun([_LT_LANG_F77_CONFIG],
  6529. [AC_LANG_PUSH(Fortran 77)
  6530. if test -z "$F77" || test "X$F77" = "Xno"; then
  6531. _lt_disable_F77=yes
  6532. fi
  6533. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6534. _LT_TAGVAR(allow_undefined_flag, $1)=
  6535. _LT_TAGVAR(always_export_symbols, $1)=no
  6536. _LT_TAGVAR(archive_expsym_cmds, $1)=
  6537. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  6538. _LT_TAGVAR(hardcode_direct, $1)=no
  6539. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  6540. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  6541. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  6542. _LT_TAGVAR(hardcode_minus_L, $1)=no
  6543. _LT_TAGVAR(hardcode_automatic, $1)=no
  6544. _LT_TAGVAR(inherit_rpath, $1)=no
  6545. _LT_TAGVAR(module_cmds, $1)=
  6546. _LT_TAGVAR(module_expsym_cmds, $1)=
  6547. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  6548. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  6549. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  6550. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  6551. _LT_TAGVAR(no_undefined_flag, $1)=
  6552. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  6553. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  6554. # Source file extension for f77 test sources.
  6555. ac_ext=f
  6556. # Object file extension for compiled f77 test sources.
  6557. objext=o
  6558. _LT_TAGVAR(objext, $1)=$objext
  6559. # No sense in running all these tests if we already determined that
  6560. # the F77 compiler isn't working. Some variables (like enable_shared)
  6561. # are currently assumed to apply to all compilers on this platform,
  6562. # and will be corrupted by setting them based on a non-working compiler.
  6563. if test "$_lt_disable_F77" != yes; then
  6564. # Code to be used in simple compile tests
  6565. lt_simple_compile_test_code="\
  6566. subroutine t
  6567. return
  6568. end
  6569. "
  6570. # Code to be used in simple link tests
  6571. lt_simple_link_test_code="\
  6572. program t
  6573. end
  6574. "
  6575. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6576. _LT_TAG_COMPILER
  6577. # save warnings/boilerplate of simple test code
  6578. _LT_COMPILER_BOILERPLATE
  6579. _LT_LINKER_BOILERPLATE
  6580. # Allow CC to be a program name with arguments.
  6581. lt_save_CC="$CC"
  6582. lt_save_GCC=$GCC
  6583. lt_save_CFLAGS=$CFLAGS
  6584. CC=${F77-"f77"}
  6585. CFLAGS=$FFLAGS
  6586. compiler=$CC
  6587. _LT_TAGVAR(compiler, $1)=$CC
  6588. _LT_CC_BASENAME([$compiler])
  6589. GCC=$G77
  6590. if test -n "$compiler"; then
  6591. AC_MSG_CHECKING([if libtool supports shared libraries])
  6592. AC_MSG_RESULT([$can_build_shared])
  6593. AC_MSG_CHECKING([whether to build shared libraries])
  6594. test "$can_build_shared" = "no" && enable_shared=no
  6595. # On AIX, shared libraries and static libraries use the same namespace, and
  6596. # are all built from PIC.
  6597. case $host_os in
  6598. aix3*)
  6599. test "$enable_shared" = yes && enable_static=no
  6600. if test -n "$RANLIB"; then
  6601. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  6602. postinstall_cmds='$RANLIB $lib'
  6603. fi
  6604. ;;
  6605. aix[[4-9]]*)
  6606. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  6607. test "$enable_shared" = yes && enable_static=no
  6608. fi
  6609. ;;
  6610. esac
  6611. AC_MSG_RESULT([$enable_shared])
  6612. AC_MSG_CHECKING([whether to build static libraries])
  6613. # Make sure either enable_shared or enable_static is yes.
  6614. test "$enable_shared" = yes || enable_static=yes
  6615. AC_MSG_RESULT([$enable_static])
  6616. _LT_TAGVAR(GCC, $1)="$G77"
  6617. _LT_TAGVAR(LD, $1)="$LD"
  6618. ## CAVEAT EMPTOR:
  6619. ## There is no encapsulation within the following macros, do not change
  6620. ## the running order or otherwise move them around unless you know exactly
  6621. ## what you are doing...
  6622. _LT_COMPILER_PIC($1)
  6623. _LT_COMPILER_C_O($1)
  6624. _LT_COMPILER_FILE_LOCKS($1)
  6625. _LT_LINKER_SHLIBS($1)
  6626. _LT_SYS_DYNAMIC_LINKER($1)
  6627. _LT_LINKER_HARDCODE_LIBPATH($1)
  6628. _LT_CONFIG($1)
  6629. fi # test -n "$compiler"
  6630. GCC=$lt_save_GCC
  6631. CC="$lt_save_CC"
  6632. CFLAGS="$lt_save_CFLAGS"
  6633. fi # test "$_lt_disable_F77" != yes
  6634. AC_LANG_POP
  6635. ])# _LT_LANG_F77_CONFIG
  6636. # _LT_LANG_FC_CONFIG([TAG])
  6637. # -------------------------
  6638. # Ensure that the configuration variables for a Fortran compiler are
  6639. # suitably defined. These variables are subsequently used by _LT_CONFIG
  6640. # to write the compiler configuration to `libtool'.
  6641. m4_defun([_LT_LANG_FC_CONFIG],
  6642. [AC_LANG_PUSH(Fortran)
  6643. if test -z "$FC" || test "X$FC" = "Xno"; then
  6644. _lt_disable_FC=yes
  6645. fi
  6646. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6647. _LT_TAGVAR(allow_undefined_flag, $1)=
  6648. _LT_TAGVAR(always_export_symbols, $1)=no
  6649. _LT_TAGVAR(archive_expsym_cmds, $1)=
  6650. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  6651. _LT_TAGVAR(hardcode_direct, $1)=no
  6652. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  6653. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  6654. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  6655. _LT_TAGVAR(hardcode_minus_L, $1)=no
  6656. _LT_TAGVAR(hardcode_automatic, $1)=no
  6657. _LT_TAGVAR(inherit_rpath, $1)=no
  6658. _LT_TAGVAR(module_cmds, $1)=
  6659. _LT_TAGVAR(module_expsym_cmds, $1)=
  6660. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  6661. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  6662. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  6663. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  6664. _LT_TAGVAR(no_undefined_flag, $1)=
  6665. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  6666. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  6667. # Source file extension for fc test sources.
  6668. ac_ext=${ac_fc_srcext-f}
  6669. # Object file extension for compiled fc test sources.
  6670. objext=o
  6671. _LT_TAGVAR(objext, $1)=$objext
  6672. # No sense in running all these tests if we already determined that
  6673. # the FC compiler isn't working. Some variables (like enable_shared)
  6674. # are currently assumed to apply to all compilers on this platform,
  6675. # and will be corrupted by setting them based on a non-working compiler.
  6676. if test "$_lt_disable_FC" != yes; then
  6677. # Code to be used in simple compile tests
  6678. lt_simple_compile_test_code="\
  6679. subroutine t
  6680. return
  6681. end
  6682. "
  6683. # Code to be used in simple link tests
  6684. lt_simple_link_test_code="\
  6685. program t
  6686. end
  6687. "
  6688. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6689. _LT_TAG_COMPILER
  6690. # save warnings/boilerplate of simple test code
  6691. _LT_COMPILER_BOILERPLATE
  6692. _LT_LINKER_BOILERPLATE
  6693. # Allow CC to be a program name with arguments.
  6694. lt_save_CC="$CC"
  6695. lt_save_GCC=$GCC
  6696. lt_save_CFLAGS=$CFLAGS
  6697. CC=${FC-"f95"}
  6698. CFLAGS=$FCFLAGS
  6699. compiler=$CC
  6700. GCC=$ac_cv_fc_compiler_gnu
  6701. _LT_TAGVAR(compiler, $1)=$CC
  6702. _LT_CC_BASENAME([$compiler])
  6703. if test -n "$compiler"; then
  6704. AC_MSG_CHECKING([if libtool supports shared libraries])
  6705. AC_MSG_RESULT([$can_build_shared])
  6706. AC_MSG_CHECKING([whether to build shared libraries])
  6707. test "$can_build_shared" = "no" && enable_shared=no
  6708. # On AIX, shared libraries and static libraries use the same namespace, and
  6709. # are all built from PIC.
  6710. case $host_os in
  6711. aix3*)
  6712. test "$enable_shared" = yes && enable_static=no
  6713. if test -n "$RANLIB"; then
  6714. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  6715. postinstall_cmds='$RANLIB $lib'
  6716. fi
  6717. ;;
  6718. aix[[4-9]]*)
  6719. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  6720. test "$enable_shared" = yes && enable_static=no
  6721. fi
  6722. ;;
  6723. esac
  6724. AC_MSG_RESULT([$enable_shared])
  6725. AC_MSG_CHECKING([whether to build static libraries])
  6726. # Make sure either enable_shared or enable_static is yes.
  6727. test "$enable_shared" = yes || enable_static=yes
  6728. AC_MSG_RESULT([$enable_static])
  6729. _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
  6730. _LT_TAGVAR(LD, $1)="$LD"
  6731. ## CAVEAT EMPTOR:
  6732. ## There is no encapsulation within the following macros, do not change
  6733. ## the running order or otherwise move them around unless you know exactly
  6734. ## what you are doing...
  6735. _LT_SYS_HIDDEN_LIBDEPS($1)
  6736. _LT_COMPILER_PIC($1)
  6737. _LT_COMPILER_C_O($1)
  6738. _LT_COMPILER_FILE_LOCKS($1)
  6739. _LT_LINKER_SHLIBS($1)
  6740. _LT_SYS_DYNAMIC_LINKER($1)
  6741. _LT_LINKER_HARDCODE_LIBPATH($1)
  6742. _LT_CONFIG($1)
  6743. fi # test -n "$compiler"
  6744. GCC=$lt_save_GCC
  6745. CC=$lt_save_CC
  6746. CFLAGS=$lt_save_CFLAGS
  6747. fi # test "$_lt_disable_FC" != yes
  6748. AC_LANG_POP
  6749. ])# _LT_LANG_FC_CONFIG
  6750. # _LT_LANG_GCJ_CONFIG([TAG])
  6751. # --------------------------
  6752. # Ensure that the configuration variables for the GNU Java Compiler compiler
  6753. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  6754. # to write the compiler configuration to `libtool'.
  6755. m4_defun([_LT_LANG_GCJ_CONFIG],
  6756. [AC_REQUIRE([LT_PROG_GCJ])dnl
  6757. AC_LANG_SAVE
  6758. # Source file extension for Java test sources.
  6759. ac_ext=java
  6760. # Object file extension for compiled Java test sources.
  6761. objext=o
  6762. _LT_TAGVAR(objext, $1)=$objext
  6763. # Code to be used in simple compile tests
  6764. lt_simple_compile_test_code="class foo {}"
  6765. # Code to be used in simple link tests
  6766. lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
  6767. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6768. _LT_TAG_COMPILER
  6769. # save warnings/boilerplate of simple test code
  6770. _LT_COMPILER_BOILERPLATE
  6771. _LT_LINKER_BOILERPLATE
  6772. # Allow CC to be a program name with arguments.
  6773. lt_save_CC=$CC
  6774. lt_save_CFLAGS=$CFLAGS
  6775. lt_save_GCC=$GCC
  6776. GCC=yes
  6777. CC=${GCJ-"gcj"}
  6778. CFLAGS=$GCJFLAGS
  6779. compiler=$CC
  6780. _LT_TAGVAR(compiler, $1)=$CC
  6781. _LT_TAGVAR(LD, $1)="$LD"
  6782. _LT_CC_BASENAME([$compiler])
  6783. # GCJ did not exist at the time GCC didn't implicitly link libc in.
  6784. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6785. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  6786. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  6787. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  6788. if test -n "$compiler"; then
  6789. _LT_COMPILER_NO_RTTI($1)
  6790. _LT_COMPILER_PIC($1)
  6791. _LT_COMPILER_C_O($1)
  6792. _LT_COMPILER_FILE_LOCKS($1)
  6793. _LT_LINKER_SHLIBS($1)
  6794. _LT_LINKER_HARDCODE_LIBPATH($1)
  6795. _LT_CONFIG($1)
  6796. fi
  6797. AC_LANG_RESTORE
  6798. GCC=$lt_save_GCC
  6799. CC=$lt_save_CC
  6800. CFLAGS=$lt_save_CFLAGS
  6801. ])# _LT_LANG_GCJ_CONFIG
  6802. # _LT_LANG_GO_CONFIG([TAG])
  6803. # --------------------------
  6804. # Ensure that the configuration variables for the GNU Go compiler
  6805. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  6806. # to write the compiler configuration to `libtool'.
  6807. m4_defun([_LT_LANG_GO_CONFIG],
  6808. [AC_REQUIRE([LT_PROG_GO])dnl
  6809. AC_LANG_SAVE
  6810. # Source file extension for Go test sources.
  6811. ac_ext=go
  6812. # Object file extension for compiled Go test sources.
  6813. objext=o
  6814. _LT_TAGVAR(objext, $1)=$objext
  6815. # Code to be used in simple compile tests
  6816. lt_simple_compile_test_code="package main; func main() { }"
  6817. # Code to be used in simple link tests
  6818. lt_simple_link_test_code='package main; func main() { }'
  6819. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6820. _LT_TAG_COMPILER
  6821. # save warnings/boilerplate of simple test code
  6822. _LT_COMPILER_BOILERPLATE
  6823. _LT_LINKER_BOILERPLATE
  6824. # Allow CC to be a program name with arguments.
  6825. lt_save_CC=$CC
  6826. lt_save_CFLAGS=$CFLAGS
  6827. lt_save_GCC=$GCC
  6828. GCC=yes
  6829. CC=${GOC-"gccgo"}
  6830. CFLAGS=$GOFLAGS
  6831. compiler=$CC
  6832. _LT_TAGVAR(compiler, $1)=$CC
  6833. _LT_TAGVAR(LD, $1)="$LD"
  6834. _LT_CC_BASENAME([$compiler])
  6835. # Go did not exist at the time GCC didn't implicitly link libc in.
  6836. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6837. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  6838. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  6839. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  6840. if test -n "$compiler"; then
  6841. _LT_COMPILER_NO_RTTI($1)
  6842. _LT_COMPILER_PIC($1)
  6843. _LT_COMPILER_C_O($1)
  6844. _LT_COMPILER_FILE_LOCKS($1)
  6845. _LT_LINKER_SHLIBS($1)
  6846. _LT_LINKER_HARDCODE_LIBPATH($1)
  6847. _LT_CONFIG($1)
  6848. fi
  6849. AC_LANG_RESTORE
  6850. GCC=$lt_save_GCC
  6851. CC=$lt_save_CC
  6852. CFLAGS=$lt_save_CFLAGS
  6853. ])# _LT_LANG_GO_CONFIG
  6854. # _LT_LANG_RC_CONFIG([TAG])
  6855. # -------------------------
  6856. # Ensure that the configuration variables for the Windows resource compiler
  6857. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  6858. # to write the compiler configuration to `libtool'.
  6859. m4_defun([_LT_LANG_RC_CONFIG],
  6860. [AC_REQUIRE([LT_PROG_RC])dnl
  6861. AC_LANG_SAVE
  6862. # Source file extension for RC test sources.
  6863. ac_ext=rc
  6864. # Object file extension for compiled RC test sources.
  6865. objext=o
  6866. _LT_TAGVAR(objext, $1)=$objext
  6867. # Code to be used in simple compile tests
  6868. lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
  6869. # Code to be used in simple link tests
  6870. lt_simple_link_test_code="$lt_simple_compile_test_code"
  6871. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6872. _LT_TAG_COMPILER
  6873. # save warnings/boilerplate of simple test code
  6874. _LT_COMPILER_BOILERPLATE
  6875. _LT_LINKER_BOILERPLATE
  6876. # Allow CC to be a program name with arguments.
  6877. lt_save_CC="$CC"
  6878. lt_save_CFLAGS=$CFLAGS
  6879. lt_save_GCC=$GCC
  6880. GCC=
  6881. CC=${RC-"windres"}
  6882. CFLAGS=
  6883. compiler=$CC
  6884. _LT_TAGVAR(compiler, $1)=$CC
  6885. _LT_CC_BASENAME([$compiler])
  6886. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  6887. if test -n "$compiler"; then
  6888. :
  6889. _LT_CONFIG($1)
  6890. fi
  6891. GCC=$lt_save_GCC
  6892. AC_LANG_RESTORE
  6893. CC=$lt_save_CC
  6894. CFLAGS=$lt_save_CFLAGS
  6895. ])# _LT_LANG_RC_CONFIG
  6896. # LT_PROG_GCJ
  6897. # -----------
  6898. AC_DEFUN([LT_PROG_GCJ],
  6899. [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
  6900. [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
  6901. [AC_CHECK_TOOL(GCJ, gcj,)
  6902. test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
  6903. AC_SUBST(GCJFLAGS)])])[]dnl
  6904. ])
  6905. # Old name:
  6906. AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
  6907. dnl aclocal-1.4 backwards compatibility:
  6908. dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
  6909. # LT_PROG_GO
  6910. # ----------
  6911. AC_DEFUN([LT_PROG_GO],
  6912. [AC_CHECK_TOOL(GOC, gccgo,)
  6913. ])
  6914. # LT_PROG_RC
  6915. # ----------
  6916. AC_DEFUN([LT_PROG_RC],
  6917. [AC_CHECK_TOOL(RC, windres,)
  6918. ])
  6919. # Old name:
  6920. AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
  6921. dnl aclocal-1.4 backwards compatibility:
  6922. dnl AC_DEFUN([LT_AC_PROG_RC], [])
  6923. # _LT_DECL_EGREP
  6924. # --------------
  6925. # If we don't have a new enough Autoconf to choose the best grep
  6926. # available, choose the one first in the user's PATH.
  6927. m4_defun([_LT_DECL_EGREP],
  6928. [AC_REQUIRE([AC_PROG_EGREP])dnl
  6929. AC_REQUIRE([AC_PROG_FGREP])dnl
  6930. test -z "$GREP" && GREP=grep
  6931. _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
  6932. _LT_DECL([], [EGREP], [1], [An ERE matcher])
  6933. _LT_DECL([], [FGREP], [1], [A literal string matcher])
  6934. dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
  6935. AC_SUBST([GREP])
  6936. ])
  6937. # _LT_DECL_OBJDUMP
  6938. # --------------
  6939. # If we don't have a new enough Autoconf to choose the best objdump
  6940. # available, choose the one first in the user's PATH.
  6941. m4_defun([_LT_DECL_OBJDUMP],
  6942. [AC_CHECK_TOOL(OBJDUMP, objdump, false)
  6943. test -z "$OBJDUMP" && OBJDUMP=objdump
  6944. _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
  6945. AC_SUBST([OBJDUMP])
  6946. ])
  6947. # _LT_DECL_DLLTOOL
  6948. # ----------------
  6949. # Ensure DLLTOOL variable is set.
  6950. m4_defun([_LT_DECL_DLLTOOL],
  6951. [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  6952. test -z "$DLLTOOL" && DLLTOOL=dlltool
  6953. _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
  6954. AC_SUBST([DLLTOOL])
  6955. ])
  6956. # _LT_DECL_SED
  6957. # ------------
  6958. # Check for a fully-functional sed program, that truncates
  6959. # as few characters as possible. Prefer GNU sed if found.
  6960. m4_defun([_LT_DECL_SED],
  6961. [AC_PROG_SED
  6962. test -z "$SED" && SED=sed
  6963. Xsed="$SED -e 1s/^X//"
  6964. _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
  6965. _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
  6966. [Sed that helps us avoid accidentally triggering echo(1) options like -n])
  6967. ])# _LT_DECL_SED
  6968. m4_ifndef([AC_PROG_SED], [
  6969. # NOTE: This macro has been submitted for inclusion into #
  6970. # GNU Autoconf as AC_PROG_SED. When it is available in #
  6971. # a released version of Autoconf we should remove this #
  6972. # macro and use it instead. #
  6973. m4_defun([AC_PROG_SED],
  6974. [AC_MSG_CHECKING([for a sed that does not truncate output])
  6975. AC_CACHE_VAL(lt_cv_path_SED,
  6976. [# Loop through the user's path and test for sed and gsed.
  6977. # Then use that list of sed's as ones to test for truncation.
  6978. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6979. for as_dir in $PATH
  6980. do
  6981. IFS=$as_save_IFS
  6982. test -z "$as_dir" && as_dir=.
  6983. for lt_ac_prog in sed gsed; do
  6984. for ac_exec_ext in '' $ac_executable_extensions; do
  6985. if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
  6986. lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
  6987. fi
  6988. done
  6989. done
  6990. done
  6991. IFS=$as_save_IFS
  6992. lt_ac_max=0
  6993. lt_ac_count=0
  6994. # Add /usr/xpg4/bin/sed as it is typically found on Solaris
  6995. # along with /bin/sed that truncates output.
  6996. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
  6997. test ! -f $lt_ac_sed && continue
  6998. cat /dev/null > conftest.in
  6999. lt_ac_count=0
  7000. echo $ECHO_N "0123456789$ECHO_C" >conftest.in
  7001. # Check for GNU sed and select it if it is found.
  7002. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
  7003. lt_cv_path_SED=$lt_ac_sed
  7004. break
  7005. fi
  7006. while true; do
  7007. cat conftest.in conftest.in >conftest.tmp
  7008. mv conftest.tmp conftest.in
  7009. cp conftest.in conftest.nl
  7010. echo >>conftest.nl
  7011. $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
  7012. cmp -s conftest.out conftest.nl || break
  7013. # 10000 chars as input seems more than enough
  7014. test $lt_ac_count -gt 10 && break
  7015. lt_ac_count=`expr $lt_ac_count + 1`
  7016. if test $lt_ac_count -gt $lt_ac_max; then
  7017. lt_ac_max=$lt_ac_count
  7018. lt_cv_path_SED=$lt_ac_sed
  7019. fi
  7020. done
  7021. done
  7022. ])
  7023. SED=$lt_cv_path_SED
  7024. AC_SUBST([SED])
  7025. AC_MSG_RESULT([$SED])
  7026. ])#AC_PROG_SED
  7027. ])#m4_ifndef
  7028. # Old name:
  7029. AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
  7030. dnl aclocal-1.4 backwards compatibility:
  7031. dnl AC_DEFUN([LT_AC_PROG_SED], [])
  7032. # _LT_CHECK_SHELL_FEATURES
  7033. # ------------------------
  7034. # Find out whether the shell is Bourne or XSI compatible,
  7035. # or has some other useful features.
  7036. m4_defun([_LT_CHECK_SHELL_FEATURES],
  7037. [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
  7038. # Try some XSI features
  7039. xsi_shell=no
  7040. ( _lt_dummy="a/b/c"
  7041. test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
  7042. = c,a/b,b/c, \
  7043. && eval 'test $(( 1 + 1 )) -eq 2 \
  7044. && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
  7045. && xsi_shell=yes
  7046. AC_MSG_RESULT([$xsi_shell])
  7047. _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
  7048. AC_MSG_CHECKING([whether the shell understands "+="])
  7049. lt_shell_append=no
  7050. ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
  7051. >/dev/null 2>&1 \
  7052. && lt_shell_append=yes
  7053. AC_MSG_RESULT([$lt_shell_append])
  7054. _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
  7055. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
  7056. lt_unset=unset
  7057. else
  7058. lt_unset=false
  7059. fi
  7060. _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
  7061. # test EBCDIC or ASCII
  7062. case `echo X|tr X '\101'` in
  7063. A) # ASCII based system
  7064. # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
  7065. lt_SP2NL='tr \040 \012'
  7066. lt_NL2SP='tr \015\012 \040\040'
  7067. ;;
  7068. *) # EBCDIC based system
  7069. lt_SP2NL='tr \100 \n'
  7070. lt_NL2SP='tr \r\n \100\100'
  7071. ;;
  7072. esac
  7073. _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
  7074. _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
  7075. ])# _LT_CHECK_SHELL_FEATURES
  7076. # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
  7077. # ------------------------------------------------------
  7078. # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
  7079. # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
  7080. m4_defun([_LT_PROG_FUNCTION_REPLACE],
  7081. [dnl {
  7082. sed -e '/^$1 ()$/,/^} # $1 /c\
  7083. $1 ()\
  7084. {\
  7085. m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
  7086. } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
  7087. && mv -f "$cfgfile.tmp" "$cfgfile" \
  7088. || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
  7089. test 0 -eq $? || _lt_function_replace_fail=:
  7090. ])
  7091. # _LT_PROG_REPLACE_SHELLFNS
  7092. # -------------------------
  7093. # Replace existing portable implementations of several shell functions with
  7094. # equivalent extended shell implementations where those features are available..
  7095. m4_defun([_LT_PROG_REPLACE_SHELLFNS],
  7096. [if test x"$xsi_shell" = xyes; then
  7097. _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
  7098. case ${1} in
  7099. */*) func_dirname_result="${1%/*}${2}" ;;
  7100. * ) func_dirname_result="${3}" ;;
  7101. esac])
  7102. _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
  7103. func_basename_result="${1##*/}"])
  7104. _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
  7105. case ${1} in
  7106. */*) func_dirname_result="${1%/*}${2}" ;;
  7107. * ) func_dirname_result="${3}" ;;
  7108. esac
  7109. func_basename_result="${1##*/}"])
  7110. _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
  7111. # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
  7112. # positional parameters, so assign one to ordinary parameter first.
  7113. func_stripname_result=${3}
  7114. func_stripname_result=${func_stripname_result#"${1}"}
  7115. func_stripname_result=${func_stripname_result%"${2}"}])
  7116. _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
  7117. func_split_long_opt_name=${1%%=*}
  7118. func_split_long_opt_arg=${1#*=}])
  7119. _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
  7120. func_split_short_opt_arg=${1#??}
  7121. func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
  7122. _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
  7123. case ${1} in
  7124. *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
  7125. *) func_lo2o_result=${1} ;;
  7126. esac])
  7127. _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
  7128. _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
  7129. _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
  7130. fi
  7131. if test x"$lt_shell_append" = xyes; then
  7132. _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
  7133. _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
  7134. func_quote_for_eval "${2}"
  7135. dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
  7136. eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
  7137. # Save a `func_append' function call where possible by direct use of '+='
  7138. sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
  7139. && mv -f "$cfgfile.tmp" "$cfgfile" \
  7140. || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
  7141. test 0 -eq $? || _lt_function_replace_fail=:
  7142. else
  7143. # Save a `func_append' function call even when '+=' is not available
  7144. sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
  7145. && mv -f "$cfgfile.tmp" "$cfgfile" \
  7146. || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
  7147. test 0 -eq $? || _lt_function_replace_fail=:
  7148. fi
  7149. if test x"$_lt_function_replace_fail" = x":"; then
  7150. AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
  7151. fi
  7152. ])
  7153. # _LT_PATH_CONVERSION_FUNCTIONS
  7154. # -----------------------------
  7155. # Determine which file name conversion functions should be used by
  7156. # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
  7157. # for certain cross-compile configurations and native mingw.
  7158. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
  7159. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  7160. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  7161. AC_MSG_CHECKING([how to convert $build file names to $host format])
  7162. AC_CACHE_VAL(lt_cv_to_host_file_cmd,
  7163. [case $host in
  7164. *-*-mingw* )
  7165. case $build in
  7166. *-*-mingw* ) # actually msys
  7167. lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
  7168. ;;
  7169. *-*-cygwin* )
  7170. lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
  7171. ;;
  7172. * ) # otherwise, assume *nix
  7173. lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
  7174. ;;
  7175. esac
  7176. ;;
  7177. *-*-cygwin* )
  7178. case $build in
  7179. *-*-mingw* ) # actually msys
  7180. lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
  7181. ;;
  7182. *-*-cygwin* )
  7183. lt_cv_to_host_file_cmd=func_convert_file_noop
  7184. ;;
  7185. * ) # otherwise, assume *nix
  7186. lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
  7187. ;;
  7188. esac
  7189. ;;
  7190. * ) # unhandled hosts (and "normal" native builds)
  7191. lt_cv_to_host_file_cmd=func_convert_file_noop
  7192. ;;
  7193. esac
  7194. ])
  7195. to_host_file_cmd=$lt_cv_to_host_file_cmd
  7196. AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
  7197. _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
  7198. [0], [convert $build file names to $host format])dnl
  7199. AC_MSG_CHECKING([how to convert $build file names to toolchain format])
  7200. AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
  7201. [#assume ordinary cross tools, or native build.
  7202. lt_cv_to_tool_file_cmd=func_convert_file_noop
  7203. case $host in
  7204. *-*-mingw* )
  7205. case $build in
  7206. *-*-mingw* ) # actually msys
  7207. lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
  7208. ;;
  7209. esac
  7210. ;;
  7211. esac
  7212. ])
  7213. to_tool_file_cmd=$lt_cv_to_tool_file_cmd
  7214. AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
  7215. _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
  7216. [0], [convert $build files to toolchain format])dnl
  7217. ])# _LT_PATH_CONVERSION_FUNCTIONS
  7218. # Helper functions for option handling. -*- Autoconf -*-
  7219. #
  7220. # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
  7221. # Inc.
  7222. # Written by Gary V. Vaughan, 2004
  7223. #
  7224. # This file is free software; the Free Software Foundation gives
  7225. # unlimited permission to copy and/or distribute it, with or without
  7226. # modifications, as long as this notice is preserved.
  7227. # serial 7 ltoptions.m4
  7228. # This is to help aclocal find these macros, as it can't see m4_define.
  7229. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
  7230. # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
  7231. # ------------------------------------------
  7232. m4_define([_LT_MANGLE_OPTION],
  7233. [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
  7234. # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
  7235. # ---------------------------------------
  7236. # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
  7237. # matching handler defined, dispatch to it. Other OPTION-NAMEs are
  7238. # saved as a flag.
  7239. m4_define([_LT_SET_OPTION],
  7240. [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
  7241. m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
  7242. _LT_MANGLE_DEFUN([$1], [$2]),
  7243. [m4_warning([Unknown $1 option `$2'])])[]dnl
  7244. ])
  7245. # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
  7246. # ------------------------------------------------------------
  7247. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  7248. m4_define([_LT_IF_OPTION],
  7249. [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
  7250. # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
  7251. # -------------------------------------------------------
  7252. # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
  7253. # are set.
  7254. m4_define([_LT_UNLESS_OPTIONS],
  7255. [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
  7256. [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
  7257. [m4_define([$0_found])])])[]dnl
  7258. m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
  7259. ])[]dnl
  7260. ])
  7261. # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
  7262. # ----------------------------------------
  7263. # OPTION-LIST is a space-separated list of Libtool options associated
  7264. # with MACRO-NAME. If any OPTION has a matching handler declared with
  7265. # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
  7266. # the unknown option and exit.
  7267. m4_defun([_LT_SET_OPTIONS],
  7268. [# Set options
  7269. m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
  7270. [_LT_SET_OPTION([$1], _LT_Option)])
  7271. m4_if([$1],[LT_INIT],[
  7272. dnl
  7273. dnl Simply set some default values (i.e off) if boolean options were not
  7274. dnl specified:
  7275. _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
  7276. ])
  7277. _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
  7278. ])
  7279. dnl
  7280. dnl If no reference was made to various pairs of opposing options, then
  7281. dnl we run the default mode handler for the pair. For example, if neither
  7282. dnl `shared' nor `disable-shared' was passed, we enable building of shared
  7283. dnl archives by default:
  7284. _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
  7285. _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
  7286. _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
  7287. _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
  7288. [_LT_ENABLE_FAST_INSTALL])
  7289. ])
  7290. ])# _LT_SET_OPTIONS
  7291. # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
  7292. # -----------------------------------------
  7293. m4_define([_LT_MANGLE_DEFUN],
  7294. [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
  7295. # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
  7296. # -----------------------------------------------
  7297. m4_define([LT_OPTION_DEFINE],
  7298. [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
  7299. ])# LT_OPTION_DEFINE
  7300. # dlopen
  7301. # ------
  7302. LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
  7303. ])
  7304. AU_DEFUN([AC_LIBTOOL_DLOPEN],
  7305. [_LT_SET_OPTION([LT_INIT], [dlopen])
  7306. AC_DIAGNOSE([obsolete],
  7307. [$0: Remove this warning and the call to _LT_SET_OPTION when you
  7308. put the `dlopen' option into LT_INIT's first parameter.])
  7309. ])
  7310. dnl aclocal-1.4 backwards compatibility:
  7311. dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
  7312. # win32-dll
  7313. # ---------
  7314. # Declare package support for building win32 dll's.
  7315. LT_OPTION_DEFINE([LT_INIT], [win32-dll],
  7316. [enable_win32_dll=yes
  7317. case $host in
  7318. *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
  7319. AC_CHECK_TOOL(AS, as, false)
  7320. AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  7321. AC_CHECK_TOOL(OBJDUMP, objdump, false)
  7322. ;;
  7323. esac
  7324. test -z "$AS" && AS=as
  7325. _LT_DECL([], [AS], [1], [Assembler program])dnl
  7326. test -z "$DLLTOOL" && DLLTOOL=dlltool
  7327. _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
  7328. test -z "$OBJDUMP" && OBJDUMP=objdump
  7329. _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
  7330. ])# win32-dll
  7331. AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
  7332. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  7333. _LT_SET_OPTION([LT_INIT], [win32-dll])
  7334. AC_DIAGNOSE([obsolete],
  7335. [$0: Remove this warning and the call to _LT_SET_OPTION when you
  7336. put the `win32-dll' option into LT_INIT's first parameter.])
  7337. ])
  7338. dnl aclocal-1.4 backwards compatibility:
  7339. dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
  7340. # _LT_ENABLE_SHARED([DEFAULT])
  7341. # ----------------------------
  7342. # implement the --enable-shared flag, and supports the `shared' and
  7343. # `disable-shared' LT_INIT options.
  7344. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  7345. m4_define([_LT_ENABLE_SHARED],
  7346. [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
  7347. AC_ARG_ENABLE([shared],
  7348. [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
  7349. [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
  7350. [p=${PACKAGE-default}
  7351. case $enableval in
  7352. yes) enable_shared=yes ;;
  7353. no) enable_shared=no ;;
  7354. *)
  7355. enable_shared=no
  7356. # Look at the argument we got. We use all the common list separators.
  7357. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  7358. for pkg in $enableval; do
  7359. IFS="$lt_save_ifs"
  7360. if test "X$pkg" = "X$p"; then
  7361. enable_shared=yes
  7362. fi
  7363. done
  7364. IFS="$lt_save_ifs"
  7365. ;;
  7366. esac],
  7367. [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
  7368. _LT_DECL([build_libtool_libs], [enable_shared], [0],
  7369. [Whether or not to build shared libraries])
  7370. ])# _LT_ENABLE_SHARED
  7371. LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
  7372. LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
  7373. # Old names:
  7374. AC_DEFUN([AC_ENABLE_SHARED],
  7375. [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
  7376. ])
  7377. AC_DEFUN([AC_DISABLE_SHARED],
  7378. [_LT_SET_OPTION([LT_INIT], [disable-shared])
  7379. ])
  7380. AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
  7381. AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
  7382. dnl aclocal-1.4 backwards compatibility:
  7383. dnl AC_DEFUN([AM_ENABLE_SHARED], [])
  7384. dnl AC_DEFUN([AM_DISABLE_SHARED], [])
  7385. # _LT_ENABLE_STATIC([DEFAULT])
  7386. # ----------------------------
  7387. # implement the --enable-static flag, and support the `static' and
  7388. # `disable-static' LT_INIT options.
  7389. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  7390. m4_define([_LT_ENABLE_STATIC],
  7391. [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
  7392. AC_ARG_ENABLE([static],
  7393. [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
  7394. [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
  7395. [p=${PACKAGE-default}
  7396. case $enableval in
  7397. yes) enable_static=yes ;;
  7398. no) enable_static=no ;;
  7399. *)
  7400. enable_static=no
  7401. # Look at the argument we got. We use all the common list separators.
  7402. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  7403. for pkg in $enableval; do
  7404. IFS="$lt_save_ifs"
  7405. if test "X$pkg" = "X$p"; then
  7406. enable_static=yes
  7407. fi
  7408. done
  7409. IFS="$lt_save_ifs"
  7410. ;;
  7411. esac],
  7412. [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
  7413. _LT_DECL([build_old_libs], [enable_static], [0],
  7414. [Whether or not to build static libraries])
  7415. ])# _LT_ENABLE_STATIC
  7416. LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
  7417. LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
  7418. # Old names:
  7419. AC_DEFUN([AC_ENABLE_STATIC],
  7420. [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
  7421. ])
  7422. AC_DEFUN([AC_DISABLE_STATIC],
  7423. [_LT_SET_OPTION([LT_INIT], [disable-static])
  7424. ])
  7425. AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
  7426. AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
  7427. dnl aclocal-1.4 backwards compatibility:
  7428. dnl AC_DEFUN([AM_ENABLE_STATIC], [])
  7429. dnl AC_DEFUN([AM_DISABLE_STATIC], [])
  7430. # _LT_ENABLE_FAST_INSTALL([DEFAULT])
  7431. # ----------------------------------
  7432. # implement the --enable-fast-install flag, and support the `fast-install'
  7433. # and `disable-fast-install' LT_INIT options.
  7434. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  7435. m4_define([_LT_ENABLE_FAST_INSTALL],
  7436. [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
  7437. AC_ARG_ENABLE([fast-install],
  7438. [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
  7439. [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
  7440. [p=${PACKAGE-default}
  7441. case $enableval in
  7442. yes) enable_fast_install=yes ;;
  7443. no) enable_fast_install=no ;;
  7444. *)
  7445. enable_fast_install=no
  7446. # Look at the argument we got. We use all the common list separators.
  7447. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  7448. for pkg in $enableval; do
  7449. IFS="$lt_save_ifs"
  7450. if test "X$pkg" = "X$p"; then
  7451. enable_fast_install=yes
  7452. fi
  7453. done
  7454. IFS="$lt_save_ifs"
  7455. ;;
  7456. esac],
  7457. [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
  7458. _LT_DECL([fast_install], [enable_fast_install], [0],
  7459. [Whether or not to optimize for fast installation])dnl
  7460. ])# _LT_ENABLE_FAST_INSTALL
  7461. LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
  7462. LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
  7463. # Old names:
  7464. AU_DEFUN([AC_ENABLE_FAST_INSTALL],
  7465. [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
  7466. AC_DIAGNOSE([obsolete],
  7467. [$0: Remove this warning and the call to _LT_SET_OPTION when you put
  7468. the `fast-install' option into LT_INIT's first parameter.])
  7469. ])
  7470. AU_DEFUN([AC_DISABLE_FAST_INSTALL],
  7471. [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
  7472. AC_DIAGNOSE([obsolete],
  7473. [$0: Remove this warning and the call to _LT_SET_OPTION when you put
  7474. the `disable-fast-install' option into LT_INIT's first parameter.])
  7475. ])
  7476. dnl aclocal-1.4 backwards compatibility:
  7477. dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
  7478. dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
  7479. # _LT_WITH_PIC([MODE])
  7480. # --------------------
  7481. # implement the --with-pic flag, and support the `pic-only' and `no-pic'
  7482. # LT_INIT options.
  7483. # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
  7484. m4_define([_LT_WITH_PIC],
  7485. [AC_ARG_WITH([pic],
  7486. [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
  7487. [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
  7488. [lt_p=${PACKAGE-default}
  7489. case $withval in
  7490. yes|no) pic_mode=$withval ;;
  7491. *)
  7492. pic_mode=default
  7493. # Look at the argument we got. We use all the common list separators.
  7494. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  7495. for lt_pkg in $withval; do
  7496. IFS="$lt_save_ifs"
  7497. if test "X$lt_pkg" = "X$lt_p"; then
  7498. pic_mode=yes
  7499. fi
  7500. done
  7501. IFS="$lt_save_ifs"
  7502. ;;
  7503. esac],
  7504. [pic_mode=default])
  7505. test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
  7506. _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
  7507. ])# _LT_WITH_PIC
  7508. LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
  7509. LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
  7510. # Old name:
  7511. AU_DEFUN([AC_LIBTOOL_PICMODE],
  7512. [_LT_SET_OPTION([LT_INIT], [pic-only])
  7513. AC_DIAGNOSE([obsolete],
  7514. [$0: Remove this warning and the call to _LT_SET_OPTION when you
  7515. put the `pic-only' option into LT_INIT's first parameter.])
  7516. ])
  7517. dnl aclocal-1.4 backwards compatibility:
  7518. dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
  7519. m4_define([_LTDL_MODE], [])
  7520. LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
  7521. [m4_define([_LTDL_MODE], [nonrecursive])])
  7522. LT_OPTION_DEFINE([LTDL_INIT], [recursive],
  7523. [m4_define([_LTDL_MODE], [recursive])])
  7524. LT_OPTION_DEFINE([LTDL_INIT], [subproject],
  7525. [m4_define([_LTDL_MODE], [subproject])])
  7526. m4_define([_LTDL_TYPE], [])
  7527. LT_OPTION_DEFINE([LTDL_INIT], [installable],
  7528. [m4_define([_LTDL_TYPE], [installable])])
  7529. LT_OPTION_DEFINE([LTDL_INIT], [convenience],
  7530. [m4_define([_LTDL_TYPE], [convenience])])
  7531. # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
  7532. #
  7533. # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
  7534. # Written by Gary V. Vaughan, 2004
  7535. #
  7536. # This file is free software; the Free Software Foundation gives
  7537. # unlimited permission to copy and/or distribute it, with or without
  7538. # modifications, as long as this notice is preserved.
  7539. # serial 6 ltsugar.m4
  7540. # This is to help aclocal find these macros, as it can't see m4_define.
  7541. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
  7542. # lt_join(SEP, ARG1, [ARG2...])
  7543. # -----------------------------
  7544. # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
  7545. # associated separator.
  7546. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
  7547. # versions in m4sugar had bugs.
  7548. m4_define([lt_join],
  7549. [m4_if([$#], [1], [],
  7550. [$#], [2], [[$2]],
  7551. [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
  7552. m4_define([_lt_join],
  7553. [m4_if([$#$2], [2], [],
  7554. [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
  7555. # lt_car(LIST)
  7556. # lt_cdr(LIST)
  7557. # ------------
  7558. # Manipulate m4 lists.
  7559. # These macros are necessary as long as will still need to support
  7560. # Autoconf-2.59 which quotes differently.
  7561. m4_define([lt_car], [[$1]])
  7562. m4_define([lt_cdr],
  7563. [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
  7564. [$#], 1, [],
  7565. [m4_dquote(m4_shift($@))])])
  7566. m4_define([lt_unquote], $1)
  7567. # lt_append(MACRO-NAME, STRING, [SEPARATOR])
  7568. # ------------------------------------------
  7569. # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
  7570. # Note that neither SEPARATOR nor STRING are expanded; they are appended
  7571. # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
  7572. # No SEPARATOR is output if MACRO-NAME was previously undefined (different
  7573. # than defined and empty).
  7574. #
  7575. # This macro is needed until we can rely on Autoconf 2.62, since earlier
  7576. # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
  7577. m4_define([lt_append],
  7578. [m4_define([$1],
  7579. m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
  7580. # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
  7581. # ----------------------------------------------------------
  7582. # Produce a SEP delimited list of all paired combinations of elements of
  7583. # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
  7584. # has the form PREFIXmINFIXSUFFIXn.
  7585. # Needed until we can rely on m4_combine added in Autoconf 2.62.
  7586. m4_define([lt_combine],
  7587. [m4_if(m4_eval([$# > 3]), [1],
  7588. [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
  7589. [[m4_foreach([_Lt_prefix], [$2],
  7590. [m4_foreach([_Lt_suffix],
  7591. ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
  7592. [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
  7593. # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
  7594. # -----------------------------------------------------------------------
  7595. # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
  7596. # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
  7597. m4_define([lt_if_append_uniq],
  7598. [m4_ifdef([$1],
  7599. [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
  7600. [lt_append([$1], [$2], [$3])$4],
  7601. [$5])],
  7602. [lt_append([$1], [$2], [$3])$4])])
  7603. # lt_dict_add(DICT, KEY, VALUE)
  7604. # -----------------------------
  7605. m4_define([lt_dict_add],
  7606. [m4_define([$1($2)], [$3])])
  7607. # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
  7608. # --------------------------------------------
  7609. m4_define([lt_dict_add_subkey],
  7610. [m4_define([$1($2:$3)], [$4])])
  7611. # lt_dict_fetch(DICT, KEY, [SUBKEY])
  7612. # ----------------------------------
  7613. m4_define([lt_dict_fetch],
  7614. [m4_ifval([$3],
  7615. m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
  7616. m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
  7617. # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
  7618. # -----------------------------------------------------------------
  7619. m4_define([lt_if_dict_fetch],
  7620. [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
  7621. [$5],
  7622. [$6])])
  7623. # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
  7624. # --------------------------------------------------------------
  7625. m4_define([lt_dict_filter],
  7626. [m4_if([$5], [], [],
  7627. [lt_join(m4_quote(m4_default([$4], [[, ]])),
  7628. lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
  7629. [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
  7630. ])
  7631. # ltversion.m4 -- version numbers -*- Autoconf -*-
  7632. #
  7633. # Copyright (C) 2004 Free Software Foundation, Inc.
  7634. # Written by Scott James Remnant, 2004
  7635. #
  7636. # This file is free software; the Free Software Foundation gives
  7637. # unlimited permission to copy and/or distribute it, with or without
  7638. # modifications, as long as this notice is preserved.
  7639. # @configure_input@
  7640. # serial 3337 ltversion.m4
  7641. # This file is part of GNU Libtool
  7642. m4_define([LT_PACKAGE_VERSION], [2.4.2])
  7643. m4_define([LT_PACKAGE_REVISION], [1.3337])
  7644. AC_DEFUN([LTVERSION_VERSION],
  7645. [macro_version='2.4.2'
  7646. macro_revision='1.3337'
  7647. _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
  7648. _LT_DECL(, macro_revision, 0)
  7649. ])
  7650. # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
  7651. #
  7652. # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
  7653. # Written by Scott James Remnant, 2004.
  7654. #
  7655. # This file is free software; the Free Software Foundation gives
  7656. # unlimited permission to copy and/or distribute it, with or without
  7657. # modifications, as long as this notice is preserved.
  7658. # serial 5 lt~obsolete.m4
  7659. # These exist entirely to fool aclocal when bootstrapping libtool.
  7660. #
  7661. # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
  7662. # which have later been changed to m4_define as they aren't part of the
  7663. # exported API, or moved to Autoconf or Automake where they belong.
  7664. #
  7665. # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
  7666. # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
  7667. # using a macro with the same name in our local m4/libtool.m4 it'll
  7668. # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
  7669. # and doesn't know about Autoconf macros at all.)
  7670. #
  7671. # So we provide this file, which has a silly filename so it's always
  7672. # included after everything else. This provides aclocal with the
  7673. # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
  7674. # because those macros already exist, or will be overwritten later.
  7675. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
  7676. #
  7677. # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
  7678. # Yes, that means every name once taken will need to remain here until
  7679. # we give up compatibility with versions before 1.7, at which point
  7680. # we need to keep only those names which we still refer to.
  7681. # This is to help aclocal find these macros, as it can't see m4_define.
  7682. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
  7683. m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
  7684. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
  7685. m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
  7686. m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
  7687. m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
  7688. m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
  7689. m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
  7690. m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
  7691. m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
  7692. m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
  7693. m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
  7694. m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
  7695. m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
  7696. m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
  7697. m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
  7698. m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
  7699. m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
  7700. m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
  7701. m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
  7702. m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
  7703. m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
  7704. m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
  7705. m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
  7706. m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
  7707. m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
  7708. m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
  7709. m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
  7710. m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
  7711. m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
  7712. m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
  7713. m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
  7714. m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
  7715. m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
  7716. m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
  7717. m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
  7718. m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
  7719. m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
  7720. m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
  7721. m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
  7722. m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
  7723. m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
  7724. m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
  7725. m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
  7726. m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
  7727. m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
  7728. m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
  7729. m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
  7730. m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
  7731. m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
  7732. m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
  7733. m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
  7734. m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
  7735. m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
  7736. m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
  7737. m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
  7738. m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
  7739. m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
  7740. m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
  7741. m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
  7742. m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
  7743. m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
  7744. # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
  7745. #
  7746. # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
  7747. #
  7748. # This program is free software; you can redistribute it and/or modify
  7749. # it under the terms of the GNU General Public License as published by
  7750. # the Free Software Foundation; either version 2 of the License, or
  7751. # (at your option) any later version.
  7752. #
  7753. # This program is distributed in the hope that it will be useful, but
  7754. # WITHOUT ANY WARRANTY; without even the implied warranty of
  7755. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  7756. # General Public License for more details.
  7757. #
  7758. # You should have received a copy of the GNU General Public License
  7759. # along with this program; if not, write to the Free Software
  7760. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  7761. #
  7762. # As a special exception to the GNU General Public License, if you
  7763. # distribute this file as part of a program that contains a
  7764. # configuration script generated by Autoconf, you may include it under
  7765. # the same distribution terms that you use for the rest of that program.
  7766. # PKG_PROG_PKG_CONFIG([MIN-VERSION])
  7767. # ----------------------------------
  7768. AC_DEFUN([PKG_PROG_PKG_CONFIG],
  7769. [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
  7770. m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
  7771. AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
  7772. if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
  7773. AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
  7774. fi
  7775. if test -n "$PKG_CONFIG"; then
  7776. _pkg_min_version=m4_default([$1], [0.9.0])
  7777. AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
  7778. if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
  7779. AC_MSG_RESULT([yes])
  7780. else
  7781. AC_MSG_RESULT([no])
  7782. PKG_CONFIG=""
  7783. fi
  7784. fi[]dnl
  7785. ])# PKG_PROG_PKG_CONFIG
  7786. # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
  7787. #
  7788. # Check to see whether a particular set of modules exists. Similar
  7789. # to PKG_CHECK_MODULES(), but does not set variables or print errors.
  7790. #
  7791. #
  7792. # Similar to PKG_CHECK_MODULES, make sure that the first instance of
  7793. # this or PKG_CHECK_MODULES is called, or make sure to call
  7794. # PKG_CHECK_EXISTS manually
  7795. # --------------------------------------------------------------
  7796. AC_DEFUN([PKG_CHECK_EXISTS],
  7797. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  7798. if test -n "$PKG_CONFIG" && \
  7799. AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
  7800. m4_ifval([$2], [$2], [:])
  7801. m4_ifvaln([$3], [else
  7802. $3])dnl
  7803. fi])
  7804. # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
  7805. # ---------------------------------------------
  7806. m4_define([_PKG_CONFIG],
  7807. [if test -n "$PKG_CONFIG"; then
  7808. if test -n "$$1"; then
  7809. pkg_cv_[]$1="$$1"
  7810. else
  7811. PKG_CHECK_EXISTS([$3],
  7812. [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
  7813. [pkg_failed=yes])
  7814. fi
  7815. else
  7816. pkg_failed=untried
  7817. fi[]dnl
  7818. ])# _PKG_CONFIG
  7819. # _PKG_SHORT_ERRORS_SUPPORTED
  7820. # -----------------------------
  7821. AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
  7822. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
  7823. if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  7824. _pkg_short_errors_supported=yes
  7825. else
  7826. _pkg_short_errors_supported=no
  7827. fi[]dnl
  7828. ])# _PKG_SHORT_ERRORS_SUPPORTED
  7829. # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
  7830. # [ACTION-IF-NOT-FOUND])
  7831. #
  7832. #
  7833. # Note that if there is a possibility the first call to
  7834. # PKG_CHECK_MODULES might not happen, you should be sure to include an
  7835. # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
  7836. #
  7837. #
  7838. # --------------------------------------------------------------
  7839. AC_DEFUN([PKG_CHECK_MODULES],
  7840. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  7841. AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
  7842. AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
  7843. pkg_failed=no
  7844. AC_MSG_CHECKING([for $1])
  7845. _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
  7846. _PKG_CONFIG([$1][_LIBS], [libs], [$2])
  7847. m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
  7848. and $1[]_LIBS to avoid the need to call pkg-config.
  7849. See the pkg-config man page for more details.])
  7850. if test $pkg_failed = yes; then
  7851. _PKG_SHORT_ERRORS_SUPPORTED
  7852. if test $_pkg_short_errors_supported = yes; then
  7853. $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
  7854. else
  7855. $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
  7856. fi
  7857. # Put the nasty error message in config.log where it belongs
  7858. echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
  7859. ifelse([$4], , [AC_MSG_ERROR(dnl
  7860. [Package requirements ($2) were not met:
  7861. $$1_PKG_ERRORS
  7862. Consider adjusting the PKG_CONFIG_PATH environment variable if you
  7863. installed software in a non-standard prefix.
  7864. _PKG_TEXT
  7865. ])],
  7866. [AC_MSG_RESULT([no])
  7867. $4])
  7868. elif test $pkg_failed = untried; then
  7869. ifelse([$4], , [AC_MSG_FAILURE(dnl
  7870. [The pkg-config script could not be found or is too old. Make sure it
  7871. is in your PATH or set the PKG_CONFIG environment variable to the full
  7872. path to pkg-config.
  7873. _PKG_TEXT
  7874. To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
  7875. [$4])
  7876. else
  7877. $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
  7878. $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
  7879. AC_MSG_RESULT([yes])
  7880. ifelse([$3], , :, [$3])
  7881. fi[]dnl
  7882. ])# PKG_CHECK_MODULES
  7883. # Copyright (C) 2002-2012 Free Software Foundation, Inc.
  7884. #
  7885. # This file is free software; the Free Software Foundation
  7886. # gives unlimited permission to copy and/or distribute it,
  7887. # with or without modifications, as long as this notice is preserved.
  7888. # serial 8
  7889. # AM_AUTOMAKE_VERSION(VERSION)
  7890. # ----------------------------
  7891. # Automake X.Y traces this macro to ensure aclocal.m4 has been
  7892. # generated from the m4 files accompanying Automake X.Y.
  7893. # (This private macro should not be called outside this file.)
  7894. AC_DEFUN([AM_AUTOMAKE_VERSION],
  7895. [am__api_version='1.12'
  7896. dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
  7897. dnl require some minimum version. Point them to the right macro.
  7898. m4_if([$1], [1.12.2], [],
  7899. [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
  7900. ])
  7901. # _AM_AUTOCONF_VERSION(VERSION)
  7902. # -----------------------------
  7903. # aclocal traces this macro to find the Autoconf version.
  7904. # This is a private macro too. Using m4_define simplifies
  7905. # the logic in aclocal, which can simply ignore this definition.
  7906. m4_define([_AM_AUTOCONF_VERSION], [])
  7907. # AM_SET_CURRENT_AUTOMAKE_VERSION
  7908. # -------------------------------
  7909. # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
  7910. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
  7911. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
  7912. [AM_AUTOMAKE_VERSION([1.12.2])dnl
  7913. m4_ifndef([AC_AUTOCONF_VERSION],
  7914. [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
  7915. _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
  7916. # AM_AUX_DIR_EXPAND -*- Autoconf -*-
  7917. # Copyright (C) 2001-2012 Free Software Foundation, Inc.
  7918. #
  7919. # This file is free software; the Free Software Foundation
  7920. # gives unlimited permission to copy and/or distribute it,
  7921. # with or without modifications, as long as this notice is preserved.
  7922. # serial 2
  7923. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
  7924. # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
  7925. # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
  7926. #
  7927. # Of course, Automake must honor this variable whenever it calls a
  7928. # tool from the auxiliary directory. The problem is that $srcdir (and
  7929. # therefore $ac_aux_dir as well) can be either absolute or relative,
  7930. # depending on how configure is run. This is pretty annoying, since
  7931. # it makes $ac_aux_dir quite unusable in subdirectories: in the top
  7932. # source directory, any form will work fine, but in subdirectories a
  7933. # relative path needs to be adjusted first.
  7934. #
  7935. # $ac_aux_dir/missing
  7936. # fails when called from a subdirectory if $ac_aux_dir is relative
  7937. # $top_srcdir/$ac_aux_dir/missing
  7938. # fails if $ac_aux_dir is absolute,
  7939. # fails when called from a subdirectory in a VPATH build with
  7940. # a relative $ac_aux_dir
  7941. #
  7942. # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
  7943. # are both prefixed by $srcdir. In an in-source build this is usually
  7944. # harmless because $srcdir is '.', but things will broke when you
  7945. # start a VPATH build or use an absolute $srcdir.
  7946. #
  7947. # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
  7948. # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
  7949. # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
  7950. # and then we would define $MISSING as
  7951. # MISSING="\${SHELL} $am_aux_dir/missing"
  7952. # This will work as long as MISSING is not called from configure, because
  7953. # unfortunately $(top_srcdir) has no meaning in configure.
  7954. # However there are other variables, like CC, which are often used in
  7955. # configure, and could therefore not use this "fixed" $ac_aux_dir.
  7956. #
  7957. # Another solution, used here, is to always expand $ac_aux_dir to an
  7958. # absolute PATH. The drawback is that using absolute paths prevent a
  7959. # configured tree to be moved without reconfiguration.
  7960. AC_DEFUN([AM_AUX_DIR_EXPAND],
  7961. [dnl Rely on autoconf to set up CDPATH properly.
  7962. AC_PREREQ([2.50])dnl
  7963. # expand $ac_aux_dir to an absolute path
  7964. am_aux_dir=`cd $ac_aux_dir && pwd`
  7965. ])
  7966. # AM_CONDITIONAL -*- Autoconf -*-
  7967. # Copyright (C) 1997-2012 Free Software Foundation, Inc.
  7968. #
  7969. # This file is free software; the Free Software Foundation
  7970. # gives unlimited permission to copy and/or distribute it,
  7971. # with or without modifications, as long as this notice is preserved.
  7972. # serial 10
  7973. # AM_CONDITIONAL(NAME, SHELL-CONDITION)
  7974. # -------------------------------------
  7975. # Define a conditional.
  7976. AC_DEFUN([AM_CONDITIONAL],
  7977. [AC_PREREQ([2.52])dnl
  7978. m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
  7979. [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
  7980. AC_SUBST([$1_TRUE])dnl
  7981. AC_SUBST([$1_FALSE])dnl
  7982. _AM_SUBST_NOTMAKE([$1_TRUE])dnl
  7983. _AM_SUBST_NOTMAKE([$1_FALSE])dnl
  7984. m4_define([_AM_COND_VALUE_$1], [$2])dnl
  7985. if $2; then
  7986. $1_TRUE=
  7987. $1_FALSE='#'
  7988. else
  7989. $1_TRUE='#'
  7990. $1_FALSE=
  7991. fi
  7992. AC_CONFIG_COMMANDS_PRE(
  7993. [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
  7994. AC_MSG_ERROR([[conditional "$1" was never defined.
  7995. Usually this means the macro was only invoked conditionally.]])
  7996. fi])])
  7997. # Copyright (C) 1999-2012 Free Software Foundation, Inc.
  7998. #
  7999. # This file is free software; the Free Software Foundation
  8000. # gives unlimited permission to copy and/or distribute it,
  8001. # with or without modifications, as long as this notice is preserved.
  8002. # serial 17
  8003. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
  8004. # written in clear, in which case automake, when reading aclocal.m4,
  8005. # will think it sees a *use*, and therefore will trigger all it's
  8006. # C support machinery. Also note that it means that autoscan, seeing
  8007. # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
  8008. # _AM_DEPENDENCIES(NAME)
  8009. # ----------------------
  8010. # See how the compiler implements dependency checking.
  8011. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
  8012. # We try a few techniques and use that to set a single cache variable.
  8013. #
  8014. # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
  8015. # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
  8016. # dependency, and given that the user is not expected to run this macro,
  8017. # just rely on AC_PROG_CC.
  8018. AC_DEFUN([_AM_DEPENDENCIES],
  8019. [AC_REQUIRE([AM_SET_DEPDIR])dnl
  8020. AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
  8021. AC_REQUIRE([AM_MAKE_INCLUDE])dnl
  8022. AC_REQUIRE([AM_DEP_TRACK])dnl
  8023. m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
  8024. [$1], [CXX], [depcc="$CXX" am_compiler_list=],
  8025. [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
  8026. [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
  8027. [$1], [UPC], [depcc="$UPC" am_compiler_list=],
  8028. [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
  8029. [depcc="$$1" am_compiler_list=])
  8030. AC_CACHE_CHECK([dependency style of $depcc],
  8031. [am_cv_$1_dependencies_compiler_type],
  8032. [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  8033. # We make a subdir and do the tests there. Otherwise we can end up
  8034. # making bogus files that we don't know about and never remove. For
  8035. # instance it was reported that on HP-UX the gcc test will end up
  8036. # making a dummy file named 'D' -- because '-MD' means "put the output
  8037. # in D".
  8038. rm -rf conftest.dir
  8039. mkdir conftest.dir
  8040. # Copy depcomp to subdir because otherwise we won't find it if we're
  8041. # using a relative directory.
  8042. cp "$am_depcomp" conftest.dir
  8043. cd conftest.dir
  8044. # We will build objects and dependencies in a subdirectory because
  8045. # it helps to detect inapplicable dependency modes. For instance
  8046. # both Tru64's cc and ICC support -MD to output dependencies as a
  8047. # side effect of compilation, but ICC will put the dependencies in
  8048. # the current directory while Tru64 will put them in the object
  8049. # directory.
  8050. mkdir sub
  8051. am_cv_$1_dependencies_compiler_type=none
  8052. if test "$am_compiler_list" = ""; then
  8053. am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
  8054. fi
  8055. am__universal=false
  8056. m4_case([$1], [CC],
  8057. [case " $depcc " in #(
  8058. *\ -arch\ *\ -arch\ *) am__universal=true ;;
  8059. esac],
  8060. [CXX],
  8061. [case " $depcc " in #(
  8062. *\ -arch\ *\ -arch\ *) am__universal=true ;;
  8063. esac])
  8064. for depmode in $am_compiler_list; do
  8065. # Setup a source with many dependencies, because some compilers
  8066. # like to wrap large dependency lists on column 80 (with \), and
  8067. # we should not choose a depcomp mode which is confused by this.
  8068. #
  8069. # We need to recreate these files for each test, as the compiler may
  8070. # overwrite some of them when testing with obscure command lines.
  8071. # This happens at least with the AIX C compiler.
  8072. : > sub/conftest.c
  8073. for i in 1 2 3 4 5 6; do
  8074. echo '#include "conftst'$i'.h"' >> sub/conftest.c
  8075. # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
  8076. # Solaris 10 /bin/sh.
  8077. echo '/* dummy */' > sub/conftst$i.h
  8078. done
  8079. echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
  8080. # We check with '-c' and '-o' for the sake of the "dashmstdout"
  8081. # mode. It turns out that the SunPro C++ compiler does not properly
  8082. # handle '-M -o', and we need to detect this. Also, some Intel
  8083. # versions had trouble with output in subdirs.
  8084. am__obj=sub/conftest.${OBJEXT-o}
  8085. am__minus_obj="-o $am__obj"
  8086. case $depmode in
  8087. gcc)
  8088. # This depmode causes a compiler race in universal mode.
  8089. test "$am__universal" = false || continue
  8090. ;;
  8091. nosideeffect)
  8092. # After this tag, mechanisms are not by side-effect, so they'll
  8093. # only be used when explicitly requested.
  8094. if test "x$enable_dependency_tracking" = xyes; then
  8095. continue
  8096. else
  8097. break
  8098. fi
  8099. ;;
  8100. msvc7 | msvc7msys | msvisualcpp | msvcmsys)
  8101. # This compiler won't grok '-c -o', but also, the minuso test has
  8102. # not run yet. These depmodes are late enough in the game, and
  8103. # so weak that their functioning should not be impacted.
  8104. am__obj=conftest.${OBJEXT-o}
  8105. am__minus_obj=
  8106. ;;
  8107. none) break ;;
  8108. esac
  8109. if depmode=$depmode \
  8110. source=sub/conftest.c object=$am__obj \
  8111. depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
  8112. $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
  8113. >/dev/null 2>conftest.err &&
  8114. grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
  8115. grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
  8116. grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
  8117. ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
  8118. # icc doesn't choke on unknown options, it will just issue warnings
  8119. # or remarks (even with -Werror). So we grep stderr for any message
  8120. # that says an option was ignored or not supported.
  8121. # When given -MP, icc 7.0 and 7.1 complain thusly:
  8122. # icc: Command line warning: ignoring option '-M'; no argument required
  8123. # The diagnosis changed in icc 8.0:
  8124. # icc: Command line remark: option '-MP' not supported
  8125. if (grep 'ignoring option' conftest.err ||
  8126. grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
  8127. am_cv_$1_dependencies_compiler_type=$depmode
  8128. break
  8129. fi
  8130. fi
  8131. done
  8132. cd ..
  8133. rm -rf conftest.dir
  8134. else
  8135. am_cv_$1_dependencies_compiler_type=none
  8136. fi
  8137. ])
  8138. AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
  8139. AM_CONDITIONAL([am__fastdep$1], [
  8140. test "x$enable_dependency_tracking" != xno \
  8141. && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
  8142. ])
  8143. # AM_SET_DEPDIR
  8144. # -------------
  8145. # Choose a directory name for dependency files.
  8146. # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
  8147. AC_DEFUN([AM_SET_DEPDIR],
  8148. [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  8149. AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
  8150. ])
  8151. # AM_DEP_TRACK
  8152. # ------------
  8153. AC_DEFUN([AM_DEP_TRACK],
  8154. [AC_ARG_ENABLE([dependency-tracking], [dnl
  8155. AS_HELP_STRING(
  8156. [--enable-dependency-tracking],
  8157. [do not reject slow dependency extractors])
  8158. AS_HELP_STRING(
  8159. [--disable-dependency-tracking],
  8160. [speeds up one-time build])])
  8161. if test "x$enable_dependency_tracking" != xno; then
  8162. am_depcomp="$ac_aux_dir/depcomp"
  8163. AMDEPBACKSLASH='\'
  8164. am__nodep='_no'
  8165. fi
  8166. AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
  8167. AC_SUBST([AMDEPBACKSLASH])dnl
  8168. _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
  8169. AC_SUBST([am__nodep])dnl
  8170. _AM_SUBST_NOTMAKE([am__nodep])dnl
  8171. ])
  8172. # Generate code to set up dependency tracking. -*- Autoconf -*-
  8173. # Copyright (C) 1999-2012 Free Software Foundation, Inc.
  8174. #
  8175. # This file is free software; the Free Software Foundation
  8176. # gives unlimited permission to copy and/or distribute it,
  8177. # with or without modifications, as long as this notice is preserved.
  8178. # serial 6
  8179. # _AM_OUTPUT_DEPENDENCY_COMMANDS
  8180. # ------------------------------
  8181. AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
  8182. [{
  8183. # Autoconf 2.62 quotes --file arguments for eval, but not when files
  8184. # are listed without --file. Let's play safe and only enable the eval
  8185. # if we detect the quoting.
  8186. case $CONFIG_FILES in
  8187. *\'*) eval set x "$CONFIG_FILES" ;;
  8188. *) set x $CONFIG_FILES ;;
  8189. esac
  8190. shift
  8191. for mf
  8192. do
  8193. # Strip MF so we end up with the name of the file.
  8194. mf=`echo "$mf" | sed -e 's/:.*$//'`
  8195. # Check whether this is an Automake generated Makefile or not.
  8196. # We used to match only the files named 'Makefile.in', but
  8197. # some people rename them; so instead we look at the file content.
  8198. # Grep'ing the first line is not enough: some people post-process
  8199. # each Makefile.in and add a new line on top of each file to say so.
  8200. # Grep'ing the whole file is not good either: AIX grep has a line
  8201. # limit of 2048, but all sed's we know have understand at least 4000.
  8202. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
  8203. dirpart=`AS_DIRNAME("$mf")`
  8204. else
  8205. continue
  8206. fi
  8207. # Extract the definition of DEPDIR, am__include, and am__quote
  8208. # from the Makefile without running 'make'.
  8209. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
  8210. test -z "$DEPDIR" && continue
  8211. am__include=`sed -n 's/^am__include = //p' < "$mf"`
  8212. test -z "am__include" && continue
  8213. am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
  8214. # Find all dependency output files, they are included files with
  8215. # $(DEPDIR) in their names. We invoke sed twice because it is the
  8216. # simplest approach to changing $(DEPDIR) to its actual value in the
  8217. # expansion.
  8218. for file in `sed -n "
  8219. s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
  8220. sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
  8221. # Make sure the directory exists.
  8222. test -f "$dirpart/$file" && continue
  8223. fdir=`AS_DIRNAME(["$file"])`
  8224. AS_MKDIR_P([$dirpart/$fdir])
  8225. # echo "creating $dirpart/$file"
  8226. echo '# dummy' > "$dirpart/$file"
  8227. done
  8228. done
  8229. }
  8230. ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
  8231. # AM_OUTPUT_DEPENDENCY_COMMANDS
  8232. # -----------------------------
  8233. # This macro should only be invoked once -- use via AC_REQUIRE.
  8234. #
  8235. # This code is only required when automatic dependency tracking
  8236. # is enabled. FIXME. This creates each '.P' file that we will
  8237. # need in order to bootstrap the dependency handling code.
  8238. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
  8239. [AC_CONFIG_COMMANDS([depfiles],
  8240. [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
  8241. [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
  8242. ])
  8243. # Do all the work for Automake. -*- Autoconf -*-
  8244. # Copyright (C) 1996-2012 Free Software Foundation, Inc.
  8245. #
  8246. # This file is free software; the Free Software Foundation
  8247. # gives unlimited permission to copy and/or distribute it,
  8248. # with or without modifications, as long as this notice is preserved.
  8249. # serial 19
  8250. # This macro actually does too much. Some checks are only needed if
  8251. # your package does certain things. But this isn't really a big deal.
  8252. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
  8253. # AM_INIT_AUTOMAKE([OPTIONS])
  8254. # -----------------------------------------------
  8255. # The call with PACKAGE and VERSION arguments is the old style
  8256. # call (pre autoconf-2.50), which is being phased out. PACKAGE
  8257. # and VERSION should now be passed to AC_INIT and removed from
  8258. # the call to AM_INIT_AUTOMAKE.
  8259. # We support both call styles for the transition. After
  8260. # the next Automake release, Autoconf can make the AC_INIT
  8261. # arguments mandatory, and then we can depend on a new Autoconf
  8262. # release and drop the old call support.
  8263. AC_DEFUN([AM_INIT_AUTOMAKE],
  8264. [AC_PREREQ([2.62])dnl
  8265. dnl Autoconf wants to disallow AM_ names. We explicitly allow
  8266. dnl the ones we care about.
  8267. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
  8268. AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
  8269. AC_REQUIRE([AC_PROG_INSTALL])dnl
  8270. if test "`cd $srcdir && pwd`" != "`pwd`"; then
  8271. # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
  8272. # is not polluted with repeated "-I."
  8273. AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
  8274. # test to see if srcdir already configured
  8275. if test -f $srcdir/config.status; then
  8276. AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  8277. fi
  8278. fi
  8279. # test whether we have cygpath
  8280. if test -z "$CYGPATH_W"; then
  8281. if (cygpath --version) >/dev/null 2>/dev/null; then
  8282. CYGPATH_W='cygpath -w'
  8283. else
  8284. CYGPATH_W=echo
  8285. fi
  8286. fi
  8287. AC_SUBST([CYGPATH_W])
  8288. # Define the identity of the package.
  8289. dnl Distinguish between old-style and new-style calls.
  8290. m4_ifval([$2],
  8291. [AC_DIAGNOSE([obsolete],
  8292. [$0: two- and three-arguments forms are deprecated. For more info, see:
  8293. http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation])
  8294. m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  8295. AC_SUBST([PACKAGE], [$1])dnl
  8296. AC_SUBST([VERSION], [$2])],
  8297. [_AM_SET_OPTIONS([$1])dnl
  8298. dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
  8299. m4_if(
  8300. m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
  8301. [ok:ok],,
  8302. [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
  8303. AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  8304. AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
  8305. _AM_IF_OPTION([no-define],,
  8306. [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
  8307. AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
  8308. # Some tools Automake needs.
  8309. AC_REQUIRE([AM_SANITY_CHECK])dnl
  8310. AC_REQUIRE([AC_ARG_PROGRAM])dnl
  8311. AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
  8312. AM_MISSING_PROG([AUTOCONF], [autoconf])
  8313. AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
  8314. AM_MISSING_PROG([AUTOHEADER], [autoheader])
  8315. AM_MISSING_PROG([MAKEINFO], [makeinfo])
  8316. AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  8317. AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
  8318. AC_REQUIRE([AC_PROG_MKDIR_P])dnl
  8319. # For better backward compatibility. To be removed once Automake 1.9.x
  8320. # dies out for good. For more background, see:
  8321. # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
  8322. # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
  8323. AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
  8324. # We need awk for the "check" target. The system "awk" is bad on
  8325. # some platforms.
  8326. AC_REQUIRE([AC_PROG_AWK])dnl
  8327. AC_REQUIRE([AC_PROG_MAKE_SET])dnl
  8328. AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  8329. _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
  8330. [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
  8331. [_AM_PROG_TAR([v7])])])
  8332. _AM_IF_OPTION([no-dependencies],,
  8333. [AC_PROVIDE_IFELSE([AC_PROG_CC],
  8334. [_AM_DEPENDENCIES([CC])],
  8335. [m4_define([AC_PROG_CC],
  8336. m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
  8337. AC_PROVIDE_IFELSE([AC_PROG_CXX],
  8338. [_AM_DEPENDENCIES([CXX])],
  8339. [m4_define([AC_PROG_CXX],
  8340. m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
  8341. AC_PROVIDE_IFELSE([AC_PROG_OBJC],
  8342. [_AM_DEPENDENCIES([OBJC])],
  8343. [m4_define([AC_PROG_OBJC],
  8344. m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
  8345. dnl Support for Objective C++ was only introduced in Autoconf 2.65,
  8346. dnl but we still cater to Autoconf 2.62.
  8347. m4_ifdef([AC_PROG_OBJCXX],
  8348. [AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
  8349. [_AM_DEPENDENCIES([OBJCXX])],
  8350. [m4_define([AC_PROG_OBJCXX],
  8351. m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl
  8352. ])
  8353. _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
  8354. dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the
  8355. dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
  8356. dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
  8357. AC_CONFIG_COMMANDS_PRE(dnl
  8358. [m4_provide_if([_AM_COMPILER_EXEEXT],
  8359. [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
  8360. ])
  8361. dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
  8362. dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
  8363. dnl mangled by Autoconf and run in a shell conditional statement.
  8364. m4_define([_AC_COMPILER_EXEEXT],
  8365. m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
  8366. # When config.status generates a header, we must update the stamp-h file.
  8367. # This file resides in the same directory as the config header
  8368. # that is generated. The stamp files are numbered to have different names.
  8369. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
  8370. # loop where config.status creates the headers, so we can generate
  8371. # our stamp files there.
  8372. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
  8373. [# Compute $1's index in $config_headers.
  8374. _am_arg=$1
  8375. _am_stamp_count=1
  8376. for _am_header in $config_headers :; do
  8377. case $_am_header in
  8378. $_am_arg | $_am_arg:* )
  8379. break ;;
  8380. * )
  8381. _am_stamp_count=`expr $_am_stamp_count + 1` ;;
  8382. esac
  8383. done
  8384. echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
  8385. # Copyright (C) 2001-2012 Free Software Foundation, Inc.
  8386. #
  8387. # This file is free software; the Free Software Foundation
  8388. # gives unlimited permission to copy and/or distribute it,
  8389. # with or without modifications, as long as this notice is preserved.
  8390. # serial 8
  8391. # AM_PROG_INSTALL_SH
  8392. # ------------------
  8393. # Define $install_sh.
  8394. AC_DEFUN([AM_PROG_INSTALL_SH],
  8395. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  8396. if test x"${install_sh}" != xset; then
  8397. case $am_aux_dir in
  8398. *\ * | *\ *)
  8399. install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
  8400. *)
  8401. install_sh="\${SHELL} $am_aux_dir/install-sh"
  8402. esac
  8403. fi
  8404. AC_SUBST([install_sh])])
  8405. # Copyright (C) 2003-2012 Free Software Foundation, Inc.
  8406. #
  8407. # This file is free software; the Free Software Foundation
  8408. # gives unlimited permission to copy and/or distribute it,
  8409. # with or without modifications, as long as this notice is preserved.
  8410. # serial 2
  8411. # Check whether the underlying file-system supports filenames
  8412. # with a leading dot. For instance MS-DOS doesn't.
  8413. AC_DEFUN([AM_SET_LEADING_DOT],
  8414. [rm -rf .tst 2>/dev/null
  8415. mkdir .tst 2>/dev/null
  8416. if test -d .tst; then
  8417. am__leading_dot=.
  8418. else
  8419. am__leading_dot=_
  8420. fi
  8421. rmdir .tst 2>/dev/null
  8422. AC_SUBST([am__leading_dot])])
  8423. # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
  8424. # From Jim Meyering
  8425. # Copyright (C) 1996-2012 Free Software Foundation, Inc.
  8426. #
  8427. # This file is free software; the Free Software Foundation
  8428. # gives unlimited permission to copy and/or distribute it,
  8429. # with or without modifications, as long as this notice is preserved.
  8430. # serial 7
  8431. # AM_MAINTAINER_MODE([DEFAULT-MODE])
  8432. # ----------------------------------
  8433. # Control maintainer-specific portions of Makefiles.
  8434. # Default is to disable them, unless 'enable' is passed literally.
  8435. # For symmetry, 'disable' may be passed as well. Anyway, the user
  8436. # can override the default with the --enable/--disable switch.
  8437. AC_DEFUN([AM_MAINTAINER_MODE],
  8438. [m4_case(m4_default([$1], [disable]),
  8439. [enable], [m4_define([am_maintainer_other], [disable])],
  8440. [disable], [m4_define([am_maintainer_other], [enable])],
  8441. [m4_define([am_maintainer_other], [enable])
  8442. m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
  8443. AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
  8444. dnl maintainer-mode's default is 'disable' unless 'enable' is passed
  8445. AC_ARG_ENABLE([maintainer-mode],
  8446. [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
  8447. am_maintainer_other[ make rules and dependencies not useful
  8448. (and sometimes confusing) to the casual installer])],
  8449. [USE_MAINTAINER_MODE=$enableval],
  8450. [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
  8451. AC_MSG_RESULT([$USE_MAINTAINER_MODE])
  8452. AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
  8453. MAINT=$MAINTAINER_MODE_TRUE
  8454. AC_SUBST([MAINT])dnl
  8455. ]
  8456. )
  8457. AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
  8458. # Check to see how 'make' treats includes. -*- Autoconf -*-
  8459. # Copyright (C) 2001-2012 Free Software Foundation, Inc.
  8460. #
  8461. # This file is free software; the Free Software Foundation
  8462. # gives unlimited permission to copy and/or distribute it,
  8463. # with or without modifications, as long as this notice is preserved.
  8464. # serial 5
  8465. # AM_MAKE_INCLUDE()
  8466. # -----------------
  8467. # Check to see how make treats includes.
  8468. AC_DEFUN([AM_MAKE_INCLUDE],
  8469. [am_make=${MAKE-make}
  8470. cat > confinc << 'END'
  8471. am__doit:
  8472. @echo this is the am__doit target
  8473. .PHONY: am__doit
  8474. END
  8475. # If we don't find an include directive, just comment out the code.
  8476. AC_MSG_CHECKING([for style of include used by $am_make])
  8477. am__include="#"
  8478. am__quote=
  8479. _am_result=none
  8480. # First try GNU make style include.
  8481. echo "include confinc" > confmf
  8482. # Ignore all kinds of additional output from 'make'.
  8483. case `$am_make -s -f confmf 2> /dev/null` in #(
  8484. *the\ am__doit\ target*)
  8485. am__include=include
  8486. am__quote=
  8487. _am_result=GNU
  8488. ;;
  8489. esac
  8490. # Now try BSD make style include.
  8491. if test "$am__include" = "#"; then
  8492. echo '.include "confinc"' > confmf
  8493. case `$am_make -s -f confmf 2> /dev/null` in #(
  8494. *the\ am__doit\ target*)
  8495. am__include=.include
  8496. am__quote="\""
  8497. _am_result=BSD
  8498. ;;
  8499. esac
  8500. fi
  8501. AC_SUBST([am__include])
  8502. AC_SUBST([am__quote])
  8503. AC_MSG_RESULT([$_am_result])
  8504. rm -f confinc confmf
  8505. ])
  8506. # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
  8507. # Copyright (C) 1997-2012 Free Software Foundation, Inc.
  8508. #
  8509. # This file is free software; the Free Software Foundation
  8510. # gives unlimited permission to copy and/or distribute it,
  8511. # with or without modifications, as long as this notice is preserved.
  8512. # serial 7
  8513. # AM_MISSING_PROG(NAME, PROGRAM)
  8514. # ------------------------------
  8515. AC_DEFUN([AM_MISSING_PROG],
  8516. [AC_REQUIRE([AM_MISSING_HAS_RUN])
  8517. $1=${$1-"${am_missing_run}$2"}
  8518. AC_SUBST($1)])
  8519. # AM_MISSING_HAS_RUN
  8520. # ------------------
  8521. # Define MISSING if not defined so far and test if it supports --run.
  8522. # If it does, set am_missing_run to use it, otherwise, to nothing.
  8523. AC_DEFUN([AM_MISSING_HAS_RUN],
  8524. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  8525. AC_REQUIRE_AUX_FILE([missing])dnl
  8526. if test x"${MISSING+set}" != xset; then
  8527. case $am_aux_dir in
  8528. *\ * | *\ *)
  8529. MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
  8530. *)
  8531. MISSING="\${SHELL} $am_aux_dir/missing" ;;
  8532. esac
  8533. fi
  8534. # Use eval to expand $SHELL
  8535. if eval "$MISSING --run true"; then
  8536. am_missing_run="$MISSING --run "
  8537. else
  8538. am_missing_run=
  8539. AC_MSG_WARN(['missing' script is too old or missing])
  8540. fi
  8541. ])
  8542. # Helper functions for option handling. -*- Autoconf -*-
  8543. # Copyright (C) 2001-2012 Free Software Foundation, Inc.
  8544. #
  8545. # This file is free software; the Free Software Foundation
  8546. # gives unlimited permission to copy and/or distribute it,
  8547. # with or without modifications, as long as this notice is preserved.
  8548. # serial 6
  8549. # _AM_MANGLE_OPTION(NAME)
  8550. # -----------------------
  8551. AC_DEFUN([_AM_MANGLE_OPTION],
  8552. [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
  8553. # _AM_SET_OPTION(NAME)
  8554. # --------------------
  8555. # Set option NAME. Presently that only means defining a flag for this option.
  8556. AC_DEFUN([_AM_SET_OPTION],
  8557. [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
  8558. # _AM_SET_OPTIONS(OPTIONS)
  8559. # ------------------------
  8560. # OPTIONS is a space-separated list of Automake options.
  8561. AC_DEFUN([_AM_SET_OPTIONS],
  8562. [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
  8563. # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
  8564. # -------------------------------------------
  8565. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  8566. AC_DEFUN([_AM_IF_OPTION],
  8567. [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
  8568. # Check to make sure that the build environment is sane. -*- Autoconf -*-
  8569. # Copyright (C) 1996-2012 Free Software Foundation, Inc.
  8570. #
  8571. # This file is free software; the Free Software Foundation
  8572. # gives unlimited permission to copy and/or distribute it,
  8573. # with or without modifications, as long as this notice is preserved.
  8574. # serial 9
  8575. # AM_SANITY_CHECK
  8576. # ---------------
  8577. AC_DEFUN([AM_SANITY_CHECK],
  8578. [AC_MSG_CHECKING([whether build environment is sane])
  8579. # Reject unsafe characters in $srcdir or the absolute working directory
  8580. # name. Accept space and tab only in the latter.
  8581. am_lf='
  8582. '
  8583. case `pwd` in
  8584. *[[\\\"\#\$\&\'\`$am_lf]]*)
  8585. AC_MSG_ERROR([unsafe absolute working directory name]);;
  8586. esac
  8587. case $srcdir in
  8588. *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
  8589. AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
  8590. esac
  8591. # Do 'set' in a subshell so we don't clobber the current shell's
  8592. # arguments. Must try -L first in case configure is actually a
  8593. # symlink; some systems play weird games with the mod time of symlinks
  8594. # (eg FreeBSD returns the mod time of the symlink's containing
  8595. # directory).
  8596. if (
  8597. am_has_slept=no
  8598. for am_try in 1 2; do
  8599. echo "timestamp, slept: $am_has_slept" > conftest.file
  8600. set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
  8601. if test "$[*]" = "X"; then
  8602. # -L didn't work.
  8603. set X `ls -t "$srcdir/configure" conftest.file`
  8604. fi
  8605. if test "$[*]" != "X $srcdir/configure conftest.file" \
  8606. && test "$[*]" != "X conftest.file $srcdir/configure"; then
  8607. # If neither matched, then we have a broken ls. This can happen
  8608. # if, for instance, CONFIG_SHELL is bash and it inherits a
  8609. # broken ls alias from the environment. This has actually
  8610. # happened. Such a system could not be considered "sane".
  8611. AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
  8612. alias in your environment])
  8613. fi
  8614. if test "$[2]" = conftest.file || test $am_try -eq 2; then
  8615. break
  8616. fi
  8617. # Just in case.
  8618. sleep 1
  8619. am_has_slept=yes
  8620. done
  8621. test "$[2]" = conftest.file
  8622. )
  8623. then
  8624. # Ok.
  8625. :
  8626. else
  8627. AC_MSG_ERROR([newly created file is older than distributed files!
  8628. Check your system clock])
  8629. fi
  8630. AC_MSG_RESULT([yes])
  8631. # If we didn't sleep, we still need to ensure time stamps of config.status and
  8632. # generated files are strictly newer.
  8633. am_sleep_pid=
  8634. if grep 'slept: no' conftest.file >/dev/null 2>&1; then
  8635. ( sleep 1 ) &
  8636. am_sleep_pid=$!
  8637. fi
  8638. AC_CONFIG_COMMANDS_PRE(
  8639. [AC_MSG_CHECKING([that generated files are newer than configure])
  8640. if test -n "$am_sleep_pid"; then
  8641. # Hide warnings about reused PIDs.
  8642. wait $am_sleep_pid 2>/dev/null
  8643. fi
  8644. AC_MSG_RESULT([done])])
  8645. rm -f conftest.file
  8646. ])
  8647. # Copyright (C) 2009-2012 Free Software Foundation, Inc.
  8648. #
  8649. # This file is free software; the Free Software Foundation
  8650. # gives unlimited permission to copy and/or distribute it,
  8651. # with or without modifications, as long as this notice is preserved.
  8652. # serial 3
  8653. # AM_SILENT_RULES([DEFAULT])
  8654. # --------------------------
  8655. # Enable less verbose build rules; with the default set to DEFAULT
  8656. # ("yes" being less verbose, "no" or empty being verbose).
  8657. AC_DEFUN([AM_SILENT_RULES],
  8658. [AC_ARG_ENABLE([silent-rules], [dnl
  8659. AS_HELP_STRING(
  8660. [--enable-silent-rules],
  8661. [less verbose build output (undo: "make V=1")])
  8662. AS_HELP_STRING(
  8663. [--disable-silent-rules],
  8664. [verbose build output (undo: "make V=0")])dnl
  8665. ])
  8666. case $enable_silent_rules in @%:@ (((
  8667. yes) AM_DEFAULT_VERBOSITY=0;;
  8668. no) AM_DEFAULT_VERBOSITY=1;;
  8669. *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
  8670. esac
  8671. dnl
  8672. dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
  8673. dnl do not support nested variable expansions.
  8674. dnl See automake bug#9928 and bug#10237.
  8675. am_make=${MAKE-make}
  8676. AC_CACHE_CHECK([whether $am_make supports nested variables],
  8677. [am_cv_make_support_nested_variables],
  8678. [if AS_ECHO([['TRUE=$(BAR$(V))
  8679. BAR0=false
  8680. BAR1=true
  8681. V=1
  8682. am__doit:
  8683. @$(TRUE)
  8684. .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
  8685. am_cv_make_support_nested_variables=yes
  8686. else
  8687. am_cv_make_support_nested_variables=no
  8688. fi])
  8689. if test $am_cv_make_support_nested_variables = yes; then
  8690. dnl Using '$V' instead of '$(V)' breaks IRIX make.
  8691. AM_V='$(V)'
  8692. AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
  8693. else
  8694. AM_V=$AM_DEFAULT_VERBOSITY
  8695. AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
  8696. fi
  8697. AC_SUBST([AM_V])dnl
  8698. AM_SUBST_NOTMAKE([AM_V])dnl
  8699. AC_SUBST([AM_DEFAULT_V])dnl
  8700. AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
  8701. AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
  8702. AM_BACKSLASH='\'
  8703. AC_SUBST([AM_BACKSLASH])dnl
  8704. _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
  8705. ])
  8706. # Copyright (C) 2001-2012 Free Software Foundation, Inc.
  8707. #
  8708. # This file is free software; the Free Software Foundation
  8709. # gives unlimited permission to copy and/or distribute it,
  8710. # with or without modifications, as long as this notice is preserved.
  8711. # serial 2
  8712. # AM_PROG_INSTALL_STRIP
  8713. # ---------------------
  8714. # One issue with vendor 'install' (even GNU) is that you can't
  8715. # specify the program used to strip binaries. This is especially
  8716. # annoying in cross-compiling environments, where the build's strip
  8717. # is unlikely to handle the host's binaries.
  8718. # Fortunately install-sh will honor a STRIPPROG variable, so we
  8719. # always use install-sh in "make install-strip", and initialize
  8720. # STRIPPROG with the value of the STRIP variable (set by the user).
  8721. AC_DEFUN([AM_PROG_INSTALL_STRIP],
  8722. [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  8723. # Installed binaries are usually stripped using 'strip' when the user
  8724. # run "make install-strip". However 'strip' might not be the right
  8725. # tool to use in cross-compilation environments, therefore Automake
  8726. # will honor the 'STRIP' environment variable to overrule this program.
  8727. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
  8728. if test "$cross_compiling" != no; then
  8729. AC_CHECK_TOOL([STRIP], [strip], :)
  8730. fi
  8731. INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
  8732. AC_SUBST([INSTALL_STRIP_PROGRAM])])
  8733. # Copyright (C) 2006-2012 Free Software Foundation, Inc.
  8734. #
  8735. # This file is free software; the Free Software Foundation
  8736. # gives unlimited permission to copy and/or distribute it,
  8737. # with or without modifications, as long as this notice is preserved.
  8738. # serial 3
  8739. # _AM_SUBST_NOTMAKE(VARIABLE)
  8740. # ---------------------------
  8741. # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
  8742. # This macro is traced by Automake.
  8743. AC_DEFUN([_AM_SUBST_NOTMAKE])
  8744. # AM_SUBST_NOTMAKE(VARIABLE)
  8745. # --------------------------
  8746. # Public sister of _AM_SUBST_NOTMAKE.
  8747. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
  8748. # Check how to create a tarball. -*- Autoconf -*-
  8749. # Copyright (C) 2004-2012 Free Software Foundation, Inc.
  8750. #
  8751. # This file is free software; the Free Software Foundation
  8752. # gives unlimited permission to copy and/or distribute it,
  8753. # with or without modifications, as long as this notice is preserved.
  8754. # serial 3
  8755. # _AM_PROG_TAR(FORMAT)
  8756. # --------------------
  8757. # Check how to create a tarball in format FORMAT.
  8758. # FORMAT should be one of 'v7', 'ustar', or 'pax'.
  8759. #
  8760. # Substitute a variable $(am__tar) that is a command
  8761. # writing to stdout a FORMAT-tarball containing the directory
  8762. # $tardir.
  8763. # tardir=directory && $(am__tar) > result.tar
  8764. #
  8765. # Substitute a variable $(am__untar) that extract such
  8766. # a tarball read from stdin.
  8767. # $(am__untar) < result.tar
  8768. AC_DEFUN([_AM_PROG_TAR],
  8769. [# Always define AMTAR for backward compatibility. Yes, it's still used
  8770. # in the wild :-( We should find a proper way to deprecate it ...
  8771. AC_SUBST([AMTAR], ['$${TAR-tar}'])
  8772. m4_if([$1], [v7],
  8773. [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
  8774. [m4_case([$1], [ustar],, [pax],,
  8775. [m4_fatal([Unknown tar format])])
  8776. AC_MSG_CHECKING([how to create a $1 tar archive])
  8777. # Loop over all known methods to create a tar archive until one works.
  8778. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
  8779. _am_tools=${am_cv_prog_tar_$1-$_am_tools}
  8780. # Do not fold the above two line into one, because Tru64 sh and
  8781. # Solaris sh will not grok spaces in the rhs of '-'.
  8782. for _am_tool in $_am_tools
  8783. do
  8784. case $_am_tool in
  8785. gnutar)
  8786. for _am_tar in tar gnutar gtar;
  8787. do
  8788. AM_RUN_LOG([$_am_tar --version]) && break
  8789. done
  8790. am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
  8791. am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
  8792. am__untar="$_am_tar -xf -"
  8793. ;;
  8794. plaintar)
  8795. # Must skip GNU tar: if it does not support --format= it doesn't create
  8796. # ustar tarball either.
  8797. (tar --version) >/dev/null 2>&1 && continue
  8798. am__tar='tar chf - "$$tardir"'
  8799. am__tar_='tar chf - "$tardir"'
  8800. am__untar='tar xf -'
  8801. ;;
  8802. pax)
  8803. am__tar='pax -L -x $1 -w "$$tardir"'
  8804. am__tar_='pax -L -x $1 -w "$tardir"'
  8805. am__untar='pax -r'
  8806. ;;
  8807. cpio)
  8808. am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
  8809. am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
  8810. am__untar='cpio -i -H $1 -d'
  8811. ;;
  8812. none)
  8813. am__tar=false
  8814. am__tar_=false
  8815. am__untar=false
  8816. ;;
  8817. esac
  8818. # If the value was cached, stop now. We just wanted to have am__tar
  8819. # and am__untar set.
  8820. test -n "${am_cv_prog_tar_$1}" && break
  8821. # tar/untar a dummy directory, and stop if the command works
  8822. rm -rf conftest.dir
  8823. mkdir conftest.dir
  8824. echo GrepMe > conftest.dir/file
  8825. AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
  8826. rm -rf conftest.dir
  8827. if test -s conftest.tar; then
  8828. AM_RUN_LOG([$am__untar <conftest.tar])
  8829. grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
  8830. fi
  8831. done
  8832. rm -rf conftest.dir
  8833. AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
  8834. AC_MSG_RESULT([$am_cv_prog_tar_$1])])
  8835. AC_SUBST([am__tar])
  8836. AC_SUBST([am__untar])
  8837. ]) # _AM_PROG_TAR
  8838. dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
  8839. dnl
  8840. dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
  8841. dnl
  8842. dnl Permission is hereby granted, free of charge, to any person obtaining a
  8843. dnl copy of this software and associated documentation files (the "Software"),
  8844. dnl to deal in the Software without restriction, including without limitation
  8845. dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8846. dnl and/or sell copies of the Software, and to permit persons to whom the
  8847. dnl Software is furnished to do so, subject to the following conditions:
  8848. dnl
  8849. dnl The above copyright notice and this permission notice (including the next
  8850. dnl paragraph) shall be included in all copies or substantial portions of the
  8851. dnl Software.
  8852. dnl
  8853. dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  8854. dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  8855. dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  8856. dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  8857. dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  8858. dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  8859. dnl DEALINGS IN THE SOFTWARE.
  8860. # XORG_MACROS_VERSION(required-version)
  8861. # -------------------------------------
  8862. # Minimum version: 1.1.0
  8863. #
  8864. # If you're using a macro added in Version 1.1 or newer, include this in
  8865. # your configure.ac with the minimum required version, such as:
  8866. # XORG_MACROS_VERSION(1.1)
  8867. #
  8868. # To ensure that this macro is defined, also add:
  8869. # m4_ifndef([XORG_MACROS_VERSION],
  8870. # [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
  8871. #
  8872. #
  8873. # See the "minimum version" comment for each macro you use to see what
  8874. # version you require.
  8875. m4_defun([XORG_MACROS_VERSION],[
  8876. m4_define([vers_have], [1.16.2])
  8877. m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
  8878. m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
  8879. m4_if(m4_cmp(maj_have, maj_needed), 0,,
  8880. [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
  8881. m4_if(m4_version_compare(vers_have, [$1]), -1,
  8882. [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
  8883. m4_undefine([vers_have])
  8884. m4_undefine([maj_have])
  8885. m4_undefine([maj_needed])
  8886. ]) # XORG_MACROS_VERSION
  8887. # XORG_PROG_RAWCPP()
  8888. # ------------------
  8889. # Minimum version: 1.0.0
  8890. #
  8891. # Find cpp program and necessary flags for use in pre-processing text files
  8892. # such as man pages and config files
  8893. AC_DEFUN([XORG_PROG_RAWCPP],[
  8894. AC_REQUIRE([AC_PROG_CPP])
  8895. AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}],
  8896. [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
  8897. # Check for flag to avoid builtin definitions - assumes unix is predefined,
  8898. # which is not the best choice for supporting other OS'es, but covers most
  8899. # of the ones we need for now.
  8900. AC_MSG_CHECKING([if $RAWCPP requires -undef])
  8901. AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])])
  8902. if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
  8903. AC_MSG_RESULT([no])
  8904. else
  8905. if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
  8906. RAWCPPFLAGS=-undef
  8907. AC_MSG_RESULT([yes])
  8908. # under Cygwin unix is still defined even with -undef
  8909. elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
  8910. RAWCPPFLAGS="-undef -ansi"
  8911. AC_MSG_RESULT([yes, with -ansi])
  8912. else
  8913. AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.])
  8914. fi
  8915. fi
  8916. rm -f conftest.$ac_ext
  8917. AC_MSG_CHECKING([if $RAWCPP requires -traditional])
  8918. AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])])
  8919. if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
  8920. AC_MSG_RESULT([no])
  8921. else
  8922. if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
  8923. RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
  8924. AC_MSG_RESULT([yes])
  8925. else
  8926. AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.])
  8927. fi
  8928. fi
  8929. rm -f conftest.$ac_ext
  8930. AC_SUBST(RAWCPPFLAGS)
  8931. ]) # XORG_PROG_RAWCPP
  8932. # XORG_MANPAGE_SECTIONS()
  8933. # -----------------------
  8934. # Minimum version: 1.0.0
  8935. #
  8936. # Determine which sections man pages go in for the different man page types
  8937. # on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
  8938. # Not sure if there's any better way than just hardcoding by OS name.
  8939. # Override default settings by setting environment variables
  8940. # Added MAN_SUBSTS in version 1.8
  8941. # Added AC_PROG_SED in version 1.8
  8942. AC_DEFUN([XORG_MANPAGE_SECTIONS],[
  8943. AC_REQUIRE([AC_CANONICAL_HOST])
  8944. AC_REQUIRE([AC_PROG_SED])
  8945. if test x$APP_MAN_SUFFIX = x ; then
  8946. APP_MAN_SUFFIX=1
  8947. fi
  8948. if test x$APP_MAN_DIR = x ; then
  8949. APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
  8950. fi
  8951. if test x$LIB_MAN_SUFFIX = x ; then
  8952. LIB_MAN_SUFFIX=3
  8953. fi
  8954. if test x$LIB_MAN_DIR = x ; then
  8955. LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
  8956. fi
  8957. if test x$FILE_MAN_SUFFIX = x ; then
  8958. case $host_os in
  8959. solaris*) FILE_MAN_SUFFIX=4 ;;
  8960. *) FILE_MAN_SUFFIX=5 ;;
  8961. esac
  8962. fi
  8963. if test x$FILE_MAN_DIR = x ; then
  8964. FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
  8965. fi
  8966. if test x$MISC_MAN_SUFFIX = x ; then
  8967. case $host_os in
  8968. solaris*) MISC_MAN_SUFFIX=5 ;;
  8969. *) MISC_MAN_SUFFIX=7 ;;
  8970. esac
  8971. fi
  8972. if test x$MISC_MAN_DIR = x ; then
  8973. MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
  8974. fi
  8975. if test x$DRIVER_MAN_SUFFIX = x ; then
  8976. case $host_os in
  8977. solaris*) DRIVER_MAN_SUFFIX=7 ;;
  8978. *) DRIVER_MAN_SUFFIX=4 ;;
  8979. esac
  8980. fi
  8981. if test x$DRIVER_MAN_DIR = x ; then
  8982. DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
  8983. fi
  8984. if test x$ADMIN_MAN_SUFFIX = x ; then
  8985. case $host_os in
  8986. solaris*) ADMIN_MAN_SUFFIX=1m ;;
  8987. *) ADMIN_MAN_SUFFIX=8 ;;
  8988. esac
  8989. fi
  8990. if test x$ADMIN_MAN_DIR = x ; then
  8991. ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
  8992. fi
  8993. AC_SUBST([APP_MAN_SUFFIX])
  8994. AC_SUBST([LIB_MAN_SUFFIX])
  8995. AC_SUBST([FILE_MAN_SUFFIX])
  8996. AC_SUBST([MISC_MAN_SUFFIX])
  8997. AC_SUBST([DRIVER_MAN_SUFFIX])
  8998. AC_SUBST([ADMIN_MAN_SUFFIX])
  8999. AC_SUBST([APP_MAN_DIR])
  9000. AC_SUBST([LIB_MAN_DIR])
  9001. AC_SUBST([FILE_MAN_DIR])
  9002. AC_SUBST([MISC_MAN_DIR])
  9003. AC_SUBST([DRIVER_MAN_DIR])
  9004. AC_SUBST([ADMIN_MAN_DIR])
  9005. XORG_MAN_PAGE="X Version 11"
  9006. AC_SUBST([XORG_MAN_PAGE])
  9007. MAN_SUBSTS="\
  9008. -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
  9009. -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
  9010. -e 's|__xservername__|Xorg|g' \
  9011. -e 's|__xconfigfile__|xorg.conf|g' \
  9012. -e 's|__projectroot__|\$(prefix)|g' \
  9013. -e 's|__apploaddir__|\$(appdefaultdir)|g' \
  9014. -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
  9015. -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
  9016. -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
  9017. -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
  9018. -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
  9019. -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
  9020. AC_SUBST([MAN_SUBSTS])
  9021. ]) # XORG_MANPAGE_SECTIONS
  9022. # XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
  9023. # ------------------------
  9024. # Minimum version: 1.7.0
  9025. #
  9026. # Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
  9027. # provided by xorg-sgml-doctools, if installed.
  9028. AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
  9029. AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
  9030. XORG_SGML_PATH=
  9031. PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
  9032. [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
  9033. [m4_ifval([$1],[:],
  9034. [if test x"$cross_compiling" != x"yes" ; then
  9035. AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
  9036. [XORG_SGML_PATH=$prefix/share/sgml])
  9037. fi])
  9038. ])
  9039. # Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
  9040. # the path and the name of the doc stylesheet
  9041. if test "x$XORG_SGML_PATH" != "x" ; then
  9042. AC_MSG_RESULT([$XORG_SGML_PATH])
  9043. STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
  9044. XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
  9045. else
  9046. AC_MSG_RESULT([no])
  9047. fi
  9048. AC_SUBST(XORG_SGML_PATH)
  9049. AC_SUBST(STYLESHEET_SRCDIR)
  9050. AC_SUBST(XSL_STYLESHEET)
  9051. AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
  9052. ]) # XORG_CHECK_SGML_DOCTOOLS
  9053. # XORG_CHECK_LINUXDOC
  9054. # -------------------
  9055. # Minimum version: 1.0.0
  9056. #
  9057. # Defines the variable MAKE_TEXT if the necessary tools and
  9058. # files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
  9059. # Whether or not the necessary tools and files are found can be checked
  9060. # with the AM_CONDITIONAL "BUILD_LINUXDOC"
  9061. AC_DEFUN([XORG_CHECK_LINUXDOC],[
  9062. AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
  9063. AC_REQUIRE([XORG_WITH_PS2PDF])
  9064. AC_PATH_PROG(LINUXDOC, linuxdoc)
  9065. AC_MSG_CHECKING([whether to build documentation])
  9066. if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
  9067. BUILDDOC=yes
  9068. else
  9069. BUILDDOC=no
  9070. fi
  9071. AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
  9072. AC_MSG_RESULT([$BUILDDOC])
  9073. AC_MSG_CHECKING([whether to build pdf documentation])
  9074. if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
  9075. BUILDPDFDOC=yes
  9076. else
  9077. BUILDPDFDOC=no
  9078. fi
  9079. AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
  9080. AC_MSG_RESULT([$BUILDPDFDOC])
  9081. MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
  9082. MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
  9083. MAKE_PDF="$PS2PDF"
  9084. MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0"
  9085. AC_SUBST(MAKE_TEXT)
  9086. AC_SUBST(MAKE_PS)
  9087. AC_SUBST(MAKE_PDF)
  9088. AC_SUBST(MAKE_HTML)
  9089. ]) # XORG_CHECK_LINUXDOC
  9090. # XORG_CHECK_DOCBOOK
  9091. # -------------------
  9092. # Minimum version: 1.0.0
  9093. #
  9094. # Checks for the ability to build output formats from SGML DocBook source.
  9095. # For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
  9096. # indicates whether the necessary tools and files are found and, if set,
  9097. # $(MAKE_XXX) blah.sgml will produce blah.xxx.
  9098. AC_DEFUN([XORG_CHECK_DOCBOOK],[
  9099. AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
  9100. BUILDTXTDOC=no
  9101. BUILDPDFDOC=no
  9102. BUILDPSDOC=no
  9103. BUILDHTMLDOC=no
  9104. AC_PATH_PROG(DOCBOOKPS, docbook2ps)
  9105. AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
  9106. AC_PATH_PROG(DOCBOOKHTML, docbook2html)
  9107. AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
  9108. AC_MSG_CHECKING([whether to build text documentation])
  9109. if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
  9110. test x$BUILD_TXTDOC != xno; then
  9111. BUILDTXTDOC=yes
  9112. fi
  9113. AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
  9114. AC_MSG_RESULT([$BUILDTXTDOC])
  9115. AC_MSG_CHECKING([whether to build PDF documentation])
  9116. if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
  9117. test x$BUILD_PDFDOC != xno; then
  9118. BUILDPDFDOC=yes
  9119. fi
  9120. AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
  9121. AC_MSG_RESULT([$BUILDPDFDOC])
  9122. AC_MSG_CHECKING([whether to build PostScript documentation])
  9123. if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
  9124. test x$BUILD_PSDOC != xno; then
  9125. BUILDPSDOC=yes
  9126. fi
  9127. AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
  9128. AC_MSG_RESULT([$BUILDPSDOC])
  9129. AC_MSG_CHECKING([whether to build HTML documentation])
  9130. if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
  9131. test x$BUILD_HTMLDOC != xno; then
  9132. BUILDHTMLDOC=yes
  9133. fi
  9134. AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
  9135. AC_MSG_RESULT([$BUILDHTMLDOC])
  9136. MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
  9137. MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
  9138. MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
  9139. MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
  9140. AC_SUBST(MAKE_TEXT)
  9141. AC_SUBST(MAKE_PS)
  9142. AC_SUBST(MAKE_PDF)
  9143. AC_SUBST(MAKE_HTML)
  9144. ]) # XORG_CHECK_DOCBOOK
  9145. # XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
  9146. # ----------------
  9147. # Minimum version: 1.5.0
  9148. # Minimum version for optional DEFAULT argument: 1.11.0
  9149. #
  9150. # Documentation tools are not always available on all platforms and sometimes
  9151. # not at the appropriate level. This macro enables a module to test for the
  9152. # presence of the tool and obtain it's path in separate variables. Coupled with
  9153. # the --with-xmlto option, it allows maximum flexibilty in making decisions
  9154. # as whether or not to use the xmlto package. When DEFAULT is not specified,
  9155. # --with-xmlto assumes 'auto'.
  9156. #
  9157. # Interface to module:
  9158. # HAVE_XMLTO: used in makefiles to conditionally generate documentation
  9159. # XMLTO: returns the path of the xmlto program found
  9160. # returns the path set by the user in the environment
  9161. # --with-xmlto: 'yes' user instructs the module to use xmlto
  9162. # 'no' user instructs the module not to use xmlto
  9163. #
  9164. # Added in version 1.10.0
  9165. # HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
  9166. # xmlto for text output requires either lynx, links, or w3m browsers
  9167. #
  9168. # If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
  9169. #
  9170. AC_DEFUN([XORG_WITH_XMLTO],[
  9171. AC_ARG_VAR([XMLTO], [Path to xmlto command])
  9172. m4_define([_defopt], m4_default([$2], [auto]))
  9173. AC_ARG_WITH(xmlto,
  9174. AS_HELP_STRING([--with-xmlto],
  9175. [Use xmlto to regenerate documentation (default: ]_defopt[)]),
  9176. [use_xmlto=$withval], [use_xmlto=]_defopt)
  9177. m4_undefine([_defopt])
  9178. if test "x$use_xmlto" = x"auto"; then
  9179. AC_PATH_PROG([XMLTO], [xmlto])
  9180. if test "x$XMLTO" = "x"; then
  9181. AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
  9182. have_xmlto=no
  9183. else
  9184. have_xmlto=yes
  9185. fi
  9186. elif test "x$use_xmlto" = x"yes" ; then
  9187. AC_PATH_PROG([XMLTO], [xmlto])
  9188. if test "x$XMLTO" = "x"; then
  9189. AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
  9190. fi
  9191. have_xmlto=yes
  9192. elif test "x$use_xmlto" = x"no" ; then
  9193. if test "x$XMLTO" != "x"; then
  9194. AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
  9195. fi
  9196. have_xmlto=no
  9197. else
  9198. AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
  9199. fi
  9200. # Test for a minimum version of xmlto, if provided.
  9201. m4_ifval([$1],
  9202. [if test "$have_xmlto" = yes; then
  9203. # scrape the xmlto version
  9204. AC_MSG_CHECKING([the xmlto version])
  9205. xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
  9206. AC_MSG_RESULT([$xmlto_version])
  9207. AS_VERSION_COMPARE([$xmlto_version], [$1],
  9208. [if test "x$use_xmlto" = xauto; then
  9209. AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
  9210. have_xmlto=no
  9211. else
  9212. AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
  9213. fi])
  9214. fi])
  9215. # Test for the ability of xmlto to generate a text target
  9216. have_xmlto_text=no
  9217. cat > conftest.xml << "EOF"
  9218. EOF
  9219. AS_IF([test "$have_xmlto" = yes],
  9220. [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
  9221. [have_xmlto_text=yes],
  9222. [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
  9223. rm -f conftest.xml
  9224. AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
  9225. AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
  9226. ]) # XORG_WITH_XMLTO
  9227. # XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT])
  9228. # --------------------------------------------
  9229. # Minimum version: 1.12.0
  9230. # Minimum version for optional DEFAULT argument: 1.12.0
  9231. #
  9232. # XSLT (Extensible Stylesheet Language Transformations) is a declarative,
  9233. # XML-based language used for the transformation of XML documents.
  9234. # The xsltproc command line tool is for applying XSLT stylesheets to XML documents.
  9235. # It is used under the cover by xmlto to generate html files from DocBook/XML.
  9236. # The XSLT processor is often used as a standalone tool for transformations.
  9237. # It should not be assumed that this tool is used only to work with documnetation.
  9238. # When DEFAULT is not specified, --with-xsltproc assumes 'auto'.
  9239. #
  9240. # Interface to module:
  9241. # HAVE_XSLTPROC: used in makefiles to conditionally generate documentation
  9242. # XSLTPROC: returns the path of the xsltproc program found
  9243. # returns the path set by the user in the environment
  9244. # --with-xsltproc: 'yes' user instructs the module to use xsltproc
  9245. # 'no' user instructs the module not to use xsltproc
  9246. # have_xsltproc: returns yes if xsltproc found in PATH or no
  9247. #
  9248. # If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path.
  9249. #
  9250. AC_DEFUN([XORG_WITH_XSLTPROC],[
  9251. AC_ARG_VAR([XSLTPROC], [Path to xsltproc command])
  9252. # Preserves the interface, should it be implemented later
  9253. m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])])
  9254. m4_define([_defopt], m4_default([$2], [auto]))
  9255. AC_ARG_WITH(xsltproc,
  9256. AS_HELP_STRING([--with-xsltproc],
  9257. [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]),
  9258. [use_xsltproc=$withval], [use_xsltproc=]_defopt)
  9259. m4_undefine([_defopt])
  9260. if test "x$use_xsltproc" = x"auto"; then
  9261. AC_PATH_PROG([XSLTPROC], [xsltproc])
  9262. if test "x$XSLTPROC" = "x"; then
  9263. AC_MSG_WARN([xsltproc not found - cannot transform XML documents])
  9264. have_xsltproc=no
  9265. else
  9266. have_xsltproc=yes
  9267. fi
  9268. elif test "x$use_xsltproc" = x"yes" ; then
  9269. AC_PATH_PROG([XSLTPROC], [xsltproc])
  9270. if test "x$XSLTPROC" = "x"; then
  9271. AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH])
  9272. fi
  9273. have_xsltproc=yes
  9274. elif test "x$use_xsltproc" = x"no" ; then
  9275. if test "x$XSLTPROC" != "x"; then
  9276. AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified])
  9277. fi
  9278. have_xsltproc=no
  9279. else
  9280. AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no'])
  9281. fi
  9282. AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes])
  9283. ]) # XORG_WITH_XSLTPROC
  9284. # XORG_WITH_PERL([MIN-VERSION], [DEFAULT])
  9285. # ----------------------------------------
  9286. # Minimum version: 1.15.0
  9287. #
  9288. # PERL (Practical Extraction and Report Language) is a language optimized for
  9289. # scanning arbitrary text files, extracting information from those text files,
  9290. # and printing reports based on that information.
  9291. #
  9292. # When DEFAULT is not specified, --with-perl assumes 'auto'.
  9293. #
  9294. # Interface to module:
  9295. # HAVE_PERL: used in makefiles to conditionally scan text files
  9296. # PERL: returns the path of the perl program found
  9297. # returns the path set by the user in the environment
  9298. # --with-perl: 'yes' user instructs the module to use perl
  9299. # 'no' user instructs the module not to use perl
  9300. # have_perl: returns yes if perl found in PATH or no
  9301. #
  9302. # If the user sets the value of PERL, AC_PATH_PROG skips testing the path.
  9303. #
  9304. AC_DEFUN([XORG_WITH_PERL],[
  9305. AC_ARG_VAR([PERL], [Path to perl command])
  9306. # Preserves the interface, should it be implemented later
  9307. m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])])
  9308. m4_define([_defopt], m4_default([$2], [auto]))
  9309. AC_ARG_WITH(perl,
  9310. AS_HELP_STRING([--with-perl],
  9311. [Use perl for extracting information from files (default: ]_defopt[)]),
  9312. [use_perl=$withval], [use_perl=]_defopt)
  9313. m4_undefine([_defopt])
  9314. if test "x$use_perl" = x"auto"; then
  9315. AC_PATH_PROG([PERL], [perl])
  9316. if test "x$PERL" = "x"; then
  9317. AC_MSG_WARN([perl not found - cannot extract information and report])
  9318. have_perl=no
  9319. else
  9320. have_perl=yes
  9321. fi
  9322. elif test "x$use_perl" = x"yes" ; then
  9323. AC_PATH_PROG([PERL], [perl])
  9324. if test "x$PERL" = "x"; then
  9325. AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH])
  9326. fi
  9327. have_perl=yes
  9328. elif test "x$use_perl" = x"no" ; then
  9329. if test "x$PERL" != "x"; then
  9330. AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified])
  9331. fi
  9332. have_perl=no
  9333. else
  9334. AC_MSG_ERROR([--with-perl expects 'yes' or 'no'])
  9335. fi
  9336. AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes])
  9337. ]) # XORG_WITH_PERL
  9338. # XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
  9339. # ----------------
  9340. # Minimum version: 1.5.0
  9341. # Minimum version for optional DEFAULT argument: 1.11.0
  9342. #
  9343. # Documentation tools are not always available on all platforms and sometimes
  9344. # not at the appropriate level. This macro enables a module to test for the
  9345. # presence of the tool and obtain it's path in separate variables. Coupled with
  9346. # the --with-asciidoc option, it allows maximum flexibilty in making decisions
  9347. # as whether or not to use the asciidoc package. When DEFAULT is not specified,
  9348. # --with-asciidoc assumes 'auto'.
  9349. #
  9350. # Interface to module:
  9351. # HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
  9352. # ASCIIDOC: returns the path of the asciidoc program found
  9353. # returns the path set by the user in the environment
  9354. # --with-asciidoc: 'yes' user instructs the module to use asciidoc
  9355. # 'no' user instructs the module not to use asciidoc
  9356. #
  9357. # If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
  9358. #
  9359. AC_DEFUN([XORG_WITH_ASCIIDOC],[
  9360. AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
  9361. m4_define([_defopt], m4_default([$2], [auto]))
  9362. AC_ARG_WITH(asciidoc,
  9363. AS_HELP_STRING([--with-asciidoc],
  9364. [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
  9365. [use_asciidoc=$withval], [use_asciidoc=]_defopt)
  9366. m4_undefine([_defopt])
  9367. if test "x$use_asciidoc" = x"auto"; then
  9368. AC_PATH_PROG([ASCIIDOC], [asciidoc])
  9369. if test "x$ASCIIDOC" = "x"; then
  9370. AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
  9371. have_asciidoc=no
  9372. else
  9373. have_asciidoc=yes
  9374. fi
  9375. elif test "x$use_asciidoc" = x"yes" ; then
  9376. AC_PATH_PROG([ASCIIDOC], [asciidoc])
  9377. if test "x$ASCIIDOC" = "x"; then
  9378. AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
  9379. fi
  9380. have_asciidoc=yes
  9381. elif test "x$use_asciidoc" = x"no" ; then
  9382. if test "x$ASCIIDOC" != "x"; then
  9383. AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
  9384. fi
  9385. have_asciidoc=no
  9386. else
  9387. AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
  9388. fi
  9389. m4_ifval([$1],
  9390. [if test "$have_asciidoc" = yes; then
  9391. # scrape the asciidoc version
  9392. AC_MSG_CHECKING([the asciidoc version])
  9393. asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
  9394. AC_MSG_RESULT([$asciidoc_version])
  9395. AS_VERSION_COMPARE([$asciidoc_version], [$1],
  9396. [if test "x$use_asciidoc" = xauto; then
  9397. AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
  9398. have_asciidoc=no
  9399. else
  9400. AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
  9401. fi])
  9402. fi])
  9403. AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
  9404. ]) # XORG_WITH_ASCIIDOC
  9405. # XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
  9406. # --------------------------------
  9407. # Minimum version: 1.5.0
  9408. # Minimum version for optional DEFAULT argument: 1.11.0
  9409. #
  9410. # Documentation tools are not always available on all platforms and sometimes
  9411. # not at the appropriate level. This macro enables a module to test for the
  9412. # presence of the tool and obtain it's path in separate variables. Coupled with
  9413. # the --with-doxygen option, it allows maximum flexibilty in making decisions
  9414. # as whether or not to use the doxygen package. When DEFAULT is not specified,
  9415. # --with-doxygen assumes 'auto'.
  9416. #
  9417. # Interface to module:
  9418. # HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
  9419. # DOXYGEN: returns the path of the doxygen program found
  9420. # returns the path set by the user in the environment
  9421. # --with-doxygen: 'yes' user instructs the module to use doxygen
  9422. # 'no' user instructs the module not to use doxygen
  9423. #
  9424. # If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
  9425. #
  9426. AC_DEFUN([XORG_WITH_DOXYGEN],[
  9427. AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
  9428. m4_define([_defopt], m4_default([$2], [auto]))
  9429. AC_ARG_WITH(doxygen,
  9430. AS_HELP_STRING([--with-doxygen],
  9431. [Use doxygen to regenerate documentation (default: ]_defopt[)]),
  9432. [use_doxygen=$withval], [use_doxygen=]_defopt)
  9433. m4_undefine([_defopt])
  9434. if test "x$use_doxygen" = x"auto"; then
  9435. AC_PATH_PROG([DOXYGEN], [doxygen])
  9436. if test "x$DOXYGEN" = "x"; then
  9437. AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
  9438. have_doxygen=no
  9439. else
  9440. have_doxygen=yes
  9441. fi
  9442. elif test "x$use_doxygen" = x"yes" ; then
  9443. AC_PATH_PROG([DOXYGEN], [doxygen])
  9444. if test "x$DOXYGEN" = "x"; then
  9445. AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
  9446. fi
  9447. have_doxygen=yes
  9448. elif test "x$use_doxygen" = x"no" ; then
  9449. if test "x$DOXYGEN" != "x"; then
  9450. AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
  9451. fi
  9452. have_doxygen=no
  9453. else
  9454. AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
  9455. fi
  9456. m4_ifval([$1],
  9457. [if test "$have_doxygen" = yes; then
  9458. # scrape the doxygen version
  9459. AC_MSG_CHECKING([the doxygen version])
  9460. doxygen_version=`$DOXYGEN --version 2>/dev/null`
  9461. AC_MSG_RESULT([$doxygen_version])
  9462. AS_VERSION_COMPARE([$doxygen_version], [$1],
  9463. [if test "x$use_doxygen" = xauto; then
  9464. AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
  9465. have_doxygen=no
  9466. else
  9467. AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
  9468. fi])
  9469. fi])
  9470. AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
  9471. ]) # XORG_WITH_DOXYGEN
  9472. # XORG_WITH_GROFF([DEFAULT])
  9473. # ----------------
  9474. # Minimum version: 1.6.0
  9475. # Minimum version for optional DEFAULT argument: 1.11.0
  9476. #
  9477. # Documentation tools are not always available on all platforms and sometimes
  9478. # not at the appropriate level. This macro enables a module to test for the
  9479. # presence of the tool and obtain it's path in separate variables. Coupled with
  9480. # the --with-groff option, it allows maximum flexibilty in making decisions
  9481. # as whether or not to use the groff package. When DEFAULT is not specified,
  9482. # --with-groff assumes 'auto'.
  9483. #
  9484. # Interface to module:
  9485. # HAVE_GROFF: used in makefiles to conditionally generate documentation
  9486. # HAVE_GROFF_MM: the memorandum macros (-mm) package
  9487. # HAVE_GROFF_MS: the -ms macros package
  9488. # GROFF: returns the path of the groff program found
  9489. # returns the path set by the user in the environment
  9490. # --with-groff: 'yes' user instructs the module to use groff
  9491. # 'no' user instructs the module not to use groff
  9492. #
  9493. # Added in version 1.9.0:
  9494. # HAVE_GROFF_HTML: groff has dependencies to output HTML format:
  9495. # pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
  9496. # psselect from the psutils package.
  9497. # the ghostcript package. Refer to the grohtml man pages
  9498. #
  9499. # If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
  9500. #
  9501. # OS and distros often splits groff in a basic and full package, the former
  9502. # having the groff program and the later having devices, fonts and macros
  9503. # Checking for the groff executable is not enough.
  9504. #
  9505. # If macros are missing, we cannot assume that groff is useless, so we don't
  9506. # unset HAVE_GROFF or GROFF env variables.
  9507. # HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
  9508. #
  9509. AC_DEFUN([XORG_WITH_GROFF],[
  9510. AC_ARG_VAR([GROFF], [Path to groff command])
  9511. m4_define([_defopt], m4_default([$1], [auto]))
  9512. AC_ARG_WITH(groff,
  9513. AS_HELP_STRING([--with-groff],
  9514. [Use groff to regenerate documentation (default: ]_defopt[)]),
  9515. [use_groff=$withval], [use_groff=]_defopt)
  9516. m4_undefine([_defopt])
  9517. if test "x$use_groff" = x"auto"; then
  9518. AC_PATH_PROG([GROFF], [groff])
  9519. if test "x$GROFF" = "x"; then
  9520. AC_MSG_WARN([groff not found - documentation targets will be skipped])
  9521. have_groff=no
  9522. else
  9523. have_groff=yes
  9524. fi
  9525. elif test "x$use_groff" = x"yes" ; then
  9526. AC_PATH_PROG([GROFF], [groff])
  9527. if test "x$GROFF" = "x"; then
  9528. AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
  9529. fi
  9530. have_groff=yes
  9531. elif test "x$use_groff" = x"no" ; then
  9532. if test "x$GROFF" != "x"; then
  9533. AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
  9534. fi
  9535. have_groff=no
  9536. else
  9537. AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
  9538. fi
  9539. # We have groff, test for the presence of the macro packages
  9540. if test "x$have_groff" = x"yes"; then
  9541. AC_MSG_CHECKING([for ${GROFF} -ms macros])
  9542. if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
  9543. groff_ms_works=yes
  9544. else
  9545. groff_ms_works=no
  9546. fi
  9547. AC_MSG_RESULT([$groff_ms_works])
  9548. AC_MSG_CHECKING([for ${GROFF} -mm macros])
  9549. if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
  9550. groff_mm_works=yes
  9551. else
  9552. groff_mm_works=no
  9553. fi
  9554. AC_MSG_RESULT([$groff_mm_works])
  9555. fi
  9556. # We have groff, test for HTML dependencies, one command per package
  9557. if test "x$have_groff" = x"yes"; then
  9558. AC_PATH_PROGS(GS_PATH, [gs gswin32c])
  9559. AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
  9560. AC_PATH_PROG(PSSELECT_PATH, [psselect])
  9561. if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
  9562. have_groff_html=yes
  9563. else
  9564. have_groff_html=no
  9565. AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
  9566. fi
  9567. fi
  9568. # Set Automake conditionals for Makefiles
  9569. AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
  9570. AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
  9571. AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
  9572. AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
  9573. ]) # XORG_WITH_GROFF
  9574. # XORG_WITH_FOP([MIN-VERSION], [DEFAULT])
  9575. # ---------------------------------------
  9576. # Minimum version: 1.6.0
  9577. # Minimum version for optional DEFAULT argument: 1.11.0
  9578. # Minimum version for optional MIN-VERSION argument: 1.15.0
  9579. #
  9580. # Documentation tools are not always available on all platforms and sometimes
  9581. # not at the appropriate level. This macro enables a module to test for the
  9582. # presence of the tool and obtain it's path in separate variables. Coupled with
  9583. # the --with-fop option, it allows maximum flexibilty in making decisions
  9584. # as whether or not to use the fop package. When DEFAULT is not specified,
  9585. # --with-fop assumes 'auto'.
  9586. #
  9587. # Interface to module:
  9588. # HAVE_FOP: used in makefiles to conditionally generate documentation
  9589. # FOP: returns the path of the fop program found
  9590. # returns the path set by the user in the environment
  9591. # --with-fop: 'yes' user instructs the module to use fop
  9592. # 'no' user instructs the module not to use fop
  9593. #
  9594. # If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
  9595. #
  9596. AC_DEFUN([XORG_WITH_FOP],[
  9597. AC_ARG_VAR([FOP], [Path to fop command])
  9598. m4_define([_defopt], m4_default([$2], [auto]))
  9599. AC_ARG_WITH(fop,
  9600. AS_HELP_STRING([--with-fop],
  9601. [Use fop to regenerate documentation (default: ]_defopt[)]),
  9602. [use_fop=$withval], [use_fop=]_defopt)
  9603. m4_undefine([_defopt])
  9604. if test "x$use_fop" = x"auto"; then
  9605. AC_PATH_PROG([FOP], [fop])
  9606. if test "x$FOP" = "x"; then
  9607. AC_MSG_WARN([fop not found - documentation targets will be skipped])
  9608. have_fop=no
  9609. else
  9610. have_fop=yes
  9611. fi
  9612. elif test "x$use_fop" = x"yes" ; then
  9613. AC_PATH_PROG([FOP], [fop])
  9614. if test "x$FOP" = "x"; then
  9615. AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
  9616. fi
  9617. have_fop=yes
  9618. elif test "x$use_fop" = x"no" ; then
  9619. if test "x$FOP" != "x"; then
  9620. AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
  9621. fi
  9622. have_fop=no
  9623. else
  9624. AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
  9625. fi
  9626. # Test for a minimum version of fop, if provided.
  9627. m4_ifval([$1],
  9628. [if test "$have_fop" = yes; then
  9629. # scrape the fop version
  9630. AC_MSG_CHECKING([for fop minimum version])
  9631. fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3`
  9632. AC_MSG_RESULT([$fop_version])
  9633. AS_VERSION_COMPARE([$fop_version], [$1],
  9634. [if test "x$use_fop" = xauto; then
  9635. AC_MSG_WARN([fop version $fop_version found, but $1 needed])
  9636. have_fop=no
  9637. else
  9638. AC_MSG_ERROR([fop version $fop_version found, but $1 needed])
  9639. fi])
  9640. fi])
  9641. AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
  9642. ]) # XORG_WITH_FOP
  9643. # XORG_WITH_PS2PDF([DEFAULT])
  9644. # ----------------
  9645. # Minimum version: 1.6.0
  9646. # Minimum version for optional DEFAULT argument: 1.11.0
  9647. #
  9648. # Documentation tools are not always available on all platforms and sometimes
  9649. # not at the appropriate level. This macro enables a module to test for the
  9650. # presence of the tool and obtain it's path in separate variables. Coupled with
  9651. # the --with-ps2pdf option, it allows maximum flexibilty in making decisions
  9652. # as whether or not to use the ps2pdf package. When DEFAULT is not specified,
  9653. # --with-ps2pdf assumes 'auto'.
  9654. #
  9655. # Interface to module:
  9656. # HAVE_PS2PDF: used in makefiles to conditionally generate documentation
  9657. # PS2PDF: returns the path of the ps2pdf program found
  9658. # returns the path set by the user in the environment
  9659. # --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
  9660. # 'no' user instructs the module not to use ps2pdf
  9661. #
  9662. # If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
  9663. #
  9664. AC_DEFUN([XORG_WITH_PS2PDF],[
  9665. AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
  9666. m4_define([_defopt], m4_default([$1], [auto]))
  9667. AC_ARG_WITH(ps2pdf,
  9668. AS_HELP_STRING([--with-ps2pdf],
  9669. [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
  9670. [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
  9671. m4_undefine([_defopt])
  9672. if test "x$use_ps2pdf" = x"auto"; then
  9673. AC_PATH_PROG([PS2PDF], [ps2pdf])
  9674. if test "x$PS2PDF" = "x"; then
  9675. AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
  9676. have_ps2pdf=no
  9677. else
  9678. have_ps2pdf=yes
  9679. fi
  9680. elif test "x$use_ps2pdf" = x"yes" ; then
  9681. AC_PATH_PROG([PS2PDF], [ps2pdf])
  9682. if test "x$PS2PDF" = "x"; then
  9683. AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
  9684. fi
  9685. have_ps2pdf=yes
  9686. elif test "x$use_ps2pdf" = x"no" ; then
  9687. if test "x$PS2PDF" != "x"; then
  9688. AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
  9689. fi
  9690. have_ps2pdf=no
  9691. else
  9692. AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
  9693. fi
  9694. AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
  9695. ]) # XORG_WITH_PS2PDF
  9696. # XORG_ENABLE_DOCS (enable_docs=yes)
  9697. # ----------------
  9698. # Minimum version: 1.6.0
  9699. #
  9700. # Documentation tools are not always available on all platforms and sometimes
  9701. # not at the appropriate level. This macro enables a builder to skip all
  9702. # documentation targets except traditional man pages.
  9703. # Combined with the specific tool checking macros XORG_WITH_*, it provides
  9704. # maximum flexibilty in controlling documentation building.
  9705. # Refer to:
  9706. # XORG_WITH_XMLTO --with-xmlto
  9707. # XORG_WITH_ASCIIDOC --with-asciidoc
  9708. # XORG_WITH_DOXYGEN --with-doxygen
  9709. # XORG_WITH_FOP --with-fop
  9710. # XORG_WITH_GROFF --with-groff
  9711. # XORG_WITH_PS2PDF --with-ps2pdf
  9712. #
  9713. # Interface to module:
  9714. # ENABLE_DOCS: used in makefiles to conditionally generate documentation
  9715. # --enable-docs: 'yes' user instructs the module to generate docs
  9716. # 'no' user instructs the module not to generate docs
  9717. # parm1: specify the default value, yes or no.
  9718. #
  9719. AC_DEFUN([XORG_ENABLE_DOCS],[
  9720. m4_define([docs_default], m4_default([$1], [yes]))
  9721. AC_ARG_ENABLE(docs,
  9722. AS_HELP_STRING([--enable-docs],
  9723. [Enable building the documentation (default: ]docs_default[)]),
  9724. [build_docs=$enableval], [build_docs=]docs_default)
  9725. m4_undefine([docs_default])
  9726. AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
  9727. AC_MSG_CHECKING([whether to build documentation])
  9728. AC_MSG_RESULT([$build_docs])
  9729. ]) # XORG_ENABLE_DOCS
  9730. # XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
  9731. # ----------------
  9732. # Minimum version: 1.6.0
  9733. #
  9734. # This macro enables a builder to skip all developer documentation.
  9735. # Combined with the specific tool checking macros XORG_WITH_*, it provides
  9736. # maximum flexibilty in controlling documentation building.
  9737. # Refer to:
  9738. # XORG_WITH_XMLTO --with-xmlto
  9739. # XORG_WITH_ASCIIDOC --with-asciidoc
  9740. # XORG_WITH_DOXYGEN --with-doxygen
  9741. # XORG_WITH_FOP --with-fop
  9742. # XORG_WITH_GROFF --with-groff
  9743. # XORG_WITH_PS2PDF --with-ps2pdf
  9744. #
  9745. # Interface to module:
  9746. # ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs
  9747. # --enable-devel-docs: 'yes' user instructs the module to generate developer docs
  9748. # 'no' user instructs the module not to generate developer docs
  9749. # parm1: specify the default value, yes or no.
  9750. #
  9751. AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
  9752. m4_define([devel_default], m4_default([$1], [yes]))
  9753. AC_ARG_ENABLE(devel-docs,
  9754. AS_HELP_STRING([--enable-devel-docs],
  9755. [Enable building the developer documentation (default: ]devel_default[)]),
  9756. [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
  9757. m4_undefine([devel_default])
  9758. AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
  9759. AC_MSG_CHECKING([whether to build developer documentation])
  9760. AC_MSG_RESULT([$build_devel_docs])
  9761. ]) # XORG_ENABLE_DEVEL_DOCS
  9762. # XORG_ENABLE_SPECS (enable_specs=yes)
  9763. # ----------------
  9764. # Minimum version: 1.6.0
  9765. #
  9766. # This macro enables a builder to skip all functional specification targets.
  9767. # Combined with the specific tool checking macros XORG_WITH_*, it provides
  9768. # maximum flexibilty in controlling documentation building.
  9769. # Refer to:
  9770. # XORG_WITH_XMLTO --with-xmlto
  9771. # XORG_WITH_ASCIIDOC --with-asciidoc
  9772. # XORG_WITH_DOXYGEN --with-doxygen
  9773. # XORG_WITH_FOP --with-fop
  9774. # XORG_WITH_GROFF --with-groff
  9775. # XORG_WITH_PS2PDF --with-ps2pdf
  9776. #
  9777. # Interface to module:
  9778. # ENABLE_SPECS: used in makefiles to conditionally generate specs
  9779. # --enable-specs: 'yes' user instructs the module to generate specs
  9780. # 'no' user instructs the module not to generate specs
  9781. # parm1: specify the default value, yes or no.
  9782. #
  9783. AC_DEFUN([XORG_ENABLE_SPECS],[
  9784. m4_define([spec_default], m4_default([$1], [yes]))
  9785. AC_ARG_ENABLE(specs,
  9786. AS_HELP_STRING([--enable-specs],
  9787. [Enable building the specs (default: ]spec_default[)]),
  9788. [build_specs=$enableval], [build_specs=]spec_default)
  9789. m4_undefine([spec_default])
  9790. AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
  9791. AC_MSG_CHECKING([whether to build functional specifications])
  9792. AC_MSG_RESULT([$build_specs])
  9793. ]) # XORG_ENABLE_SPECS
  9794. # XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto)
  9795. # ----------------------------------------------
  9796. # Minimum version: 1.13.0
  9797. #
  9798. # This macro enables a builder to enable/disable unit testing
  9799. # It makes no assumption about the test cases implementation
  9800. # Test cases may or may not use Automake "Support for test suites"
  9801. # They may or may not use the software utility library GLib
  9802. #
  9803. # When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL
  9804. # ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib.
  9805. # The variable enable_unit_tests is used by other macros in this file.
  9806. #
  9807. # Interface to module:
  9808. # ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests
  9809. # enable_unit_tests: used in configure.ac for additional configuration
  9810. # --enable-unit-tests: 'yes' user instructs the module to build tests
  9811. # 'no' user instructs the module not to build tests
  9812. # parm1: specify the default value, yes or no.
  9813. #
  9814. AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[
  9815. AC_BEFORE([$0], [XORG_WITH_GLIB])
  9816. AC_BEFORE([$0], [XORG_LD_WRAP])
  9817. AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
  9818. m4_define([_defopt], m4_default([$1], [auto]))
  9819. AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests],
  9820. [Enable building unit test cases (default: ]_defopt[)]),
  9821. [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt)
  9822. m4_undefine([_defopt])
  9823. AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno])
  9824. AC_MSG_CHECKING([whether to build unit test cases])
  9825. AC_MSG_RESULT([$enable_unit_tests])
  9826. ]) # XORG_ENABLE_UNIT_TESTS
  9827. # XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto)
  9828. # ------------------------------------------------------
  9829. # Minimum version: 1.17.0
  9830. #
  9831. # This macro enables a builder to enable/disable integration testing
  9832. # It makes no assumption about the test cases' implementation
  9833. # Test cases may or may not use Automake "Support for test suites"
  9834. #
  9835. # Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support
  9836. # usually requires less dependencies and may be built and run under less
  9837. # stringent environments than integration tests.
  9838. #
  9839. # Interface to module:
  9840. # ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests
  9841. # enable_integration_tests: used in configure.ac for additional configuration
  9842. # --enable-integration-tests: 'yes' user instructs the module to build tests
  9843. # 'no' user instructs the module not to build tests
  9844. # parm1: specify the default value, yes or no.
  9845. #
  9846. AC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[
  9847. AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
  9848. m4_define([_defopt], m4_default([$1], [auto]))
  9849. AC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests],
  9850. [Enable building integration test cases (default: ]_defopt[)]),
  9851. [enable_integration_tests=$enableval],
  9852. [enable_integration_tests=]_defopt)
  9853. m4_undefine([_defopt])
  9854. AM_CONDITIONAL([ENABLE_INTEGRATION_TESTS],
  9855. [test "x$enable_integration_tests" != xno])
  9856. AC_MSG_CHECKING([whether to build unit test cases])
  9857. AC_MSG_RESULT([$enable_integration_tests])
  9858. ]) # XORG_ENABLE_INTEGRATION_TESTS
  9859. # XORG_WITH_GLIB([MIN-VERSION], [DEFAULT])
  9860. # ----------------------------------------
  9861. # Minimum version: 1.13.0
  9862. #
  9863. # GLib is a library which provides advanced data structures and functions.
  9864. # This macro enables a module to test for the presence of Glib.
  9865. #
  9866. # When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing.
  9867. # Otherwise the value of $enable_unit_tests is blank.
  9868. #
  9869. # Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit
  9870. # test support usually requires less dependencies and may be built and run under
  9871. # less stringent environments than integration tests.
  9872. #
  9873. # Interface to module:
  9874. # HAVE_GLIB: used in makefiles to conditionally build targets
  9875. # with_glib: used in configure.ac to know if GLib has been found
  9876. # --with-glib: 'yes' user instructs the module to use glib
  9877. # 'no' user instructs the module not to use glib
  9878. #
  9879. AC_DEFUN([XORG_WITH_GLIB],[
  9880. AC_REQUIRE([PKG_PROG_PKG_CONFIG])
  9881. m4_define([_defopt], m4_default([$2], [auto]))
  9882. AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib],
  9883. [Use GLib library for unit testing (default: ]_defopt[)]),
  9884. [with_glib=$withval], [with_glib=]_defopt)
  9885. m4_undefine([_defopt])
  9886. have_glib=no
  9887. # Do not probe GLib if user explicitly disabled unit testing
  9888. if test "x$enable_unit_tests" != x"no"; then
  9889. # Do not probe GLib if user explicitly disabled it
  9890. if test "x$with_glib" != x"no"; then
  9891. m4_ifval(
  9892. [$1],
  9893. [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])],
  9894. [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])]
  9895. )
  9896. fi
  9897. fi
  9898. # Not having GLib when unit testing has been explicitly requested is an error
  9899. if test "x$enable_unit_tests" = x"yes"; then
  9900. if test "x$have_glib" = x"no"; then
  9901. AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
  9902. fi
  9903. fi
  9904. # Having unit testing disabled when GLib has been explicitly requested is an error
  9905. if test "x$enable_unit_tests" = x"no"; then
  9906. if test "x$with_glib" = x"yes"; then
  9907. AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
  9908. fi
  9909. fi
  9910. # Not having GLib when it has been explicitly requested is an error
  9911. if test "x$with_glib" = x"yes"; then
  9912. if test "x$have_glib" = x"no"; then
  9913. AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found])
  9914. fi
  9915. fi
  9916. AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes])
  9917. ]) # XORG_WITH_GLIB
  9918. # XORG_LD_WRAP([required|optional])
  9919. # ---------------------------------
  9920. # Minimum version: 1.13.0
  9921. #
  9922. # Check if linker supports -wrap, passed via compiler flags
  9923. #
  9924. # When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing.
  9925. # Otherwise the value of $enable_unit_tests is blank.
  9926. #
  9927. # Argument added in 1.16.0 - default is "required", to match existing behavior
  9928. # of returning an error if enable_unit_tests is yes, and ld -wrap is not
  9929. # available, an argument of "optional" allows use when some unit tests require
  9930. # ld -wrap and others do not.
  9931. #
  9932. AC_DEFUN([XORG_LD_WRAP],[
  9933. XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no],
  9934. [AC_LANG_PROGRAM([#include <stdlib.h>
  9935. void __wrap_exit(int status) { return; }],
  9936. [exit(0);])])
  9937. # Not having ld wrap when unit testing has been explicitly requested is an error
  9938. if test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then
  9939. if test "x$have_ld_wrap" = x"no"; then
  9940. AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available])
  9941. fi
  9942. fi
  9943. AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes])
  9944. #
  9945. ]) # XORG_LD_WRAP
  9946. # XORG_CHECK_LINKER_FLAGS
  9947. # -----------------------
  9948. # SYNOPSIS
  9949. #
  9950. # XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE])
  9951. #
  9952. # DESCRIPTION
  9953. #
  9954. # Check whether the given linker FLAGS work with the current language's
  9955. # linker, or whether they give an error.
  9956. #
  9957. # ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
  9958. # success/failure.
  9959. #
  9960. # PROGRAM-SOURCE is the program source to link with, if needed
  9961. #
  9962. # NOTE: Based on AX_CHECK_COMPILER_FLAGS.
  9963. #
  9964. # LICENSE
  9965. #
  9966. # Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org>
  9967. # Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu>
  9968. # Copyright (c) 2009 Matteo Frigo
  9969. #
  9970. # This program is free software: you can redistribute it and/or modify it
  9971. # under the terms of the GNU General Public License as published by the
  9972. # Free Software Foundation, either version 3 of the License, or (at your
  9973. # option) any later version.
  9974. #
  9975. # This program is distributed in the hope that it will be useful, but
  9976. # WITHOUT ANY WARRANTY; without even the implied warranty of
  9977. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
  9978. # Public License for more details.
  9979. #
  9980. # You should have received a copy of the GNU General Public License along
  9981. # with this program. If not, see <http://www.gnu.org/licenses/>.
  9982. #
  9983. # As a special exception, the respective Autoconf Macro's copyright owner
  9984. # gives unlimited permission to copy, distribute and modify the configure
  9985. # scripts that are the output of Autoconf when processing the Macro. You
  9986. # need not follow the terms of the GNU General Public License when using
  9987. # or distributing such scripts, even though portions of the text of the
  9988. # Macro appear in them. The GNU General Public License (GPL) does govern
  9989. # all other use of the material that constitutes the Autoconf Macro.
  9990. #
  9991. # This special exception to the GPL applies to versions of the Autoconf
  9992. # Macro released by the Autoconf Archive. When you make and distribute a
  9993. # modified version of the Autoconf Macro, you may extend this special
  9994. # exception to the GPL to apply to your modified version as well.#
  9995. AC_DEFUN([XORG_CHECK_LINKER_FLAGS],
  9996. [AC_MSG_CHECKING([whether the linker accepts $1])
  9997. dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
  9998. AS_LITERAL_IF([$1],
  9999. [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [
  10000. ax_save_FLAGS=$LDFLAGS
  10001. LDFLAGS="$1"
  10002. AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])],
  10003. AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
  10004. AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
  10005. LDFLAGS=$ax_save_FLAGS])],
  10006. [ax_save_FLAGS=$LDFLAGS
  10007. LDFLAGS="$1"
  10008. AC_LINK_IFELSE([AC_LANG_PROGRAM()],
  10009. eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
  10010. eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
  10011. LDFLAGS=$ax_save_FLAGS])
  10012. eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1])
  10013. AC_MSG_RESULT($xorg_check_linker_flags)
  10014. if test "x$xorg_check_linker_flags" = xyes; then
  10015. m4_default([$2], :)
  10016. else
  10017. m4_default([$3], :)
  10018. fi
  10019. ]) # XORG_CHECK_LINKER_FLAGS
  10020. # XORG_MEMORY_CHECK_FLAGS
  10021. # -----------------------
  10022. # Minimum version: 1.16.0
  10023. #
  10024. # This macro attempts to find appropriate memory checking functionality
  10025. # for various platforms which unit testing code may use to catch various
  10026. # forms of memory allocation and access errors in testing.
  10027. #
  10028. # Interface to module:
  10029. # XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging
  10030. # Usually added to TESTS_ENVIRONMENT in Makefile.am
  10031. #
  10032. # If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim.
  10033. #
  10034. AC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[
  10035. AC_REQUIRE([AC_CANONICAL_HOST])
  10036. AC_ARG_VAR([XORG_MALLOC_DEBUG_ENV],
  10037. [Environment variables to enable memory checking in tests])
  10038. # Check for different types of support on different platforms
  10039. case $host_os in
  10040. solaris*)
  10041. AC_CHECK_LIB([umem], [umem_alloc],
  10042. [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default'])
  10043. ;;
  10044. *-gnu*) # GNU libc - Value is used as a single byte bit pattern,
  10045. # both directly and inverted, so should not be 0 or 255.
  10046. malloc_debug_env='MALLOC_PERTURB_=15'
  10047. ;;
  10048. darwin*)
  10049. malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib'
  10050. ;;
  10051. *bsd*)
  10052. malloc_debug_env='MallocPreScribble=1 MallocScribble=1'
  10053. ;;
  10054. esac
  10055. # User supplied flags override default flags
  10056. if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then
  10057. malloc_debug_env="$XORG_MALLOC_DEBUG_ENV"
  10058. fi
  10059. AC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env])
  10060. ]) # XORG_WITH_LINT
  10061. # XORG_CHECK_MALLOC_ZERO
  10062. # ----------------------
  10063. # Minimum version: 1.0.0
  10064. #
  10065. # Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
  10066. # malloc(0) returns NULL. Packages should add one of these cflags to
  10067. # their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
  10068. AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
  10069. AC_ARG_ENABLE(malloc0returnsnull,
  10070. AS_HELP_STRING([--enable-malloc0returnsnull],
  10071. [malloc(0) returns NULL (default: auto)]),
  10072. [MALLOC_ZERO_RETURNS_NULL=$enableval],
  10073. [MALLOC_ZERO_RETURNS_NULL=auto])
  10074. AC_MSG_CHECKING([whether malloc(0) returns NULL])
  10075. if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
  10076. AC_RUN_IFELSE([AC_LANG_PROGRAM([
  10077. #include <stdlib.h>
  10078. ],[
  10079. char *m0, *r0, *c0, *p;
  10080. m0 = malloc(0);
  10081. p = malloc(10);
  10082. r0 = realloc(p,0);
  10083. c0 = calloc(0,10);
  10084. exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1);
  10085. ])],
  10086. [MALLOC_ZERO_RETURNS_NULL=yes],
  10087. [MALLOC_ZERO_RETURNS_NULL=no],
  10088. [MALLOC_ZERO_RETURNS_NULL=yes])
  10089. fi
  10090. AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
  10091. if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
  10092. MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
  10093. XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
  10094. XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
  10095. else
  10096. MALLOC_ZERO_CFLAGS=""
  10097. XMALLOC_ZERO_CFLAGS=""
  10098. XTMALLOC_ZERO_CFLAGS=""
  10099. fi
  10100. AC_SUBST([MALLOC_ZERO_CFLAGS])
  10101. AC_SUBST([XMALLOC_ZERO_CFLAGS])
  10102. AC_SUBST([XTMALLOC_ZERO_CFLAGS])
  10103. ]) # XORG_CHECK_MALLOC_ZERO
  10104. # XORG_WITH_LINT()
  10105. # ----------------
  10106. # Minimum version: 1.1.0
  10107. #
  10108. # This macro enables the use of a tool that flags some suspicious and
  10109. # non-portable constructs (likely to be bugs) in C language source code.
  10110. # It will attempt to locate the tool and use appropriate options.
  10111. # There are various lint type tools on different platforms.
  10112. #
  10113. # Interface to module:
  10114. # LINT: returns the path to the tool found on the platform
  10115. # or the value set to LINT on the configure cmd line
  10116. # also an Automake conditional
  10117. # LINT_FLAGS: an Automake variable with appropriate flags
  10118. #
  10119. # --with-lint: 'yes' user instructs the module to use lint
  10120. # 'no' user instructs the module not to use lint (default)
  10121. #
  10122. # If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
  10123. # If the user sets the value of LINT_FLAGS, they are used verbatim.
  10124. #
  10125. AC_DEFUN([XORG_WITH_LINT],[
  10126. AC_ARG_VAR([LINT], [Path to a lint-style command])
  10127. AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
  10128. AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
  10129. [Use a lint-style source code checker (default: disabled)])],
  10130. [use_lint=$withval], [use_lint=no])
  10131. # Obtain platform specific info like program name and options
  10132. # The lint program on FreeBSD and NetBSD is different from the one on Solaris
  10133. case $host_os in
  10134. *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
  10135. lint_name=splint
  10136. lint_options="-badflag"
  10137. ;;
  10138. *freebsd* | *netbsd*)
  10139. lint_name=lint
  10140. lint_options="-u -b"
  10141. ;;
  10142. *solaris*)
  10143. lint_name=lint
  10144. lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
  10145. ;;
  10146. esac
  10147. # Test for the presence of the program (either guessed by the code or spelled out by the user)
  10148. if test "x$use_lint" = x"yes" ; then
  10149. AC_PATH_PROG([LINT], [$lint_name])
  10150. if test "x$LINT" = "x"; then
  10151. AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
  10152. fi
  10153. elif test "x$use_lint" = x"no" ; then
  10154. if test "x$LINT" != "x"; then
  10155. AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
  10156. fi
  10157. else
  10158. AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
  10159. fi
  10160. # User supplied flags override default flags
  10161. if test "x$LINT_FLAGS" != "x"; then
  10162. lint_options=$LINT_FLAGS
  10163. fi
  10164. AC_SUBST([LINT_FLAGS],[$lint_options])
  10165. AM_CONDITIONAL(LINT, [test "x$LINT" != x])
  10166. ]) # XORG_WITH_LINT
  10167. # XORG_LINT_LIBRARY(LIBNAME)
  10168. # --------------------------
  10169. # Minimum version: 1.1.0
  10170. #
  10171. # Sets up flags for building lint libraries for checking programs that call
  10172. # functions in the library.
  10173. #
  10174. # Interface to module:
  10175. # LINTLIB - Automake variable with the name of lint library file to make
  10176. # MAKE_LINT_LIB - Automake conditional
  10177. #
  10178. # --enable-lint-library: - 'yes' user instructs the module to created a lint library
  10179. # - 'no' user instructs the module not to create a lint library (default)
  10180. AC_DEFUN([XORG_LINT_LIBRARY],[
  10181. AC_REQUIRE([XORG_WITH_LINT])
  10182. AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
  10183. [Create lint library (default: disabled)])],
  10184. [make_lint_lib=$enableval], [make_lint_lib=no])
  10185. if test "x$make_lint_lib" = x"yes" ; then
  10186. LINTLIB=llib-l$1.ln
  10187. if test "x$LINT" = "x"; then
  10188. AC_MSG_ERROR([Cannot make lint library without --with-lint])
  10189. fi
  10190. elif test "x$make_lint_lib" != x"no" ; then
  10191. AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
  10192. fi
  10193. AC_SUBST(LINTLIB)
  10194. AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
  10195. ]) # XORG_LINT_LIBRARY
  10196. # XORG_COMPILER_BRAND
  10197. # -------------------
  10198. # Minimum version: 1.14.0
  10199. #
  10200. # Checks for various brands of compilers and sets flags as appropriate:
  10201. # GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes"
  10202. # GNU g++ - relies on AC_PROG_CXX to set GXX to "yes"
  10203. # clang compiler - sets CLANGCC to "yes"
  10204. # Intel compiler - sets INTELCC to "yes"
  10205. # Sun/Oracle Solaris Studio cc - sets SUNCC to "yes"
  10206. #
  10207. AC_DEFUN([XORG_COMPILER_BRAND], [
  10208. AC_LANG_CASE(
  10209. [C], [
  10210. AC_REQUIRE([AC_PROG_CC_C99])
  10211. ],
  10212. [C++], [
  10213. AC_REQUIRE([AC_PROG_CXX])
  10214. ]
  10215. )
  10216. AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"])
  10217. AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
  10218. AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
  10219. ]) # XORG_COMPILER_BRAND
  10220. # XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...])
  10221. # ---------------
  10222. # Minimum version: 1.16.0
  10223. #
  10224. # Test if the compiler works when passed the given flag as a command line argument.
  10225. # If it succeeds, the flag is appeneded to the given variable. If not, it tries the
  10226. # next flag in the list until there are no more options.
  10227. #
  10228. # Note that this does not guarantee that the compiler supports the flag as some
  10229. # compilers will simply ignore arguments that they do not understand, but we do
  10230. # attempt to weed out false positives by using -Werror=unknown-warning-option and
  10231. # -Werror=unused-command-line-argument
  10232. #
  10233. AC_DEFUN([XORG_TESTSET_CFLAG], [
  10234. m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
  10235. m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
  10236. AC_LANG_COMPILER_REQUIRE
  10237. AC_LANG_CASE(
  10238. [C], [
  10239. AC_REQUIRE([AC_PROG_CC_C99])
  10240. define([PREFIX], [C])
  10241. define([CACHE_PREFIX], [cc])
  10242. define([COMPILER], [$CC])
  10243. ],
  10244. [C++], [
  10245. define([PREFIX], [CXX])
  10246. define([CACHE_PREFIX], [cxx])
  10247. define([COMPILER], [$CXX])
  10248. ]
  10249. )
  10250. [xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]"
  10251. if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then
  10252. PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
  10253. AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option],
  10254. [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option],
  10255. AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
  10256. [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes],
  10257. [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no]))
  10258. [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option]
  10259. PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
  10260. fi
  10261. if test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then
  10262. if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then
  10263. PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
  10264. fi
  10265. PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
  10266. AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument],
  10267. [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument],
  10268. AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
  10269. [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes],
  10270. [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no]))
  10271. [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument]
  10272. PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
  10273. fi
  10274. found="no"
  10275. m4_foreach([flag], m4_cdr($@), [
  10276. if test $found = "no" ; then
  10277. if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
  10278. PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
  10279. fi
  10280. if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
  10281. PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
  10282. fi
  10283. PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag["
  10284. dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname
  10285. AC_MSG_CHECKING([if ]COMPILER[ supports]flag[])
  10286. cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[])
  10287. AC_CACHE_VAL($cacheid,
  10288. [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])],
  10289. [eval $cacheid=yes],
  10290. [eval $cacheid=no])])
  10291. PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
  10292. eval supported=\$$cacheid
  10293. AC_MSG_RESULT([$supported])
  10294. if test "$supported" = "yes" ; then
  10295. $1="$$1 ]flag["
  10296. found="yes"
  10297. fi
  10298. fi
  10299. ])
  10300. ]) # XORG_TESTSET_CFLAG
  10301. # XORG_COMPILER_FLAGS
  10302. # ---------------
  10303. # Minimum version: 1.16.0
  10304. #
  10305. # Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line
  10306. # arguments supported by the selected compiler which do NOT alter the generated
  10307. # code. These arguments will cause the compiler to print various warnings
  10308. # during compilation AND turn a conservative set of warnings into errors.
  10309. #
  10310. # The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in
  10311. # future versions of util-macros as options are added to new compilers.
  10312. #
  10313. AC_DEFUN([XORG_COMPILER_FLAGS], [
  10314. AC_REQUIRE([XORG_COMPILER_BRAND])
  10315. AC_ARG_ENABLE(selective-werror,
  10316. AS_HELP_STRING([--disable-selective-werror],
  10317. [Turn off selective compiler errors. (default: enabled)]),
  10318. [SELECTIVE_WERROR=$enableval],
  10319. [SELECTIVE_WERROR=yes])
  10320. AC_LANG_CASE(
  10321. [C], [
  10322. define([PREFIX], [C])
  10323. ],
  10324. [C++], [
  10325. define([PREFIX], [CXX])
  10326. ]
  10327. )
  10328. # -v is too short to test reliably with XORG_TESTSET_CFLAG
  10329. if test "x$SUNCC" = "xyes"; then
  10330. [BASE_]PREFIX[FLAGS]="-v"
  10331. else
  10332. [BASE_]PREFIX[FLAGS]=""
  10333. fi
  10334. # This chunk of warnings were those that existed in the legacy CWARNFLAGS
  10335. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall])
  10336. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith])
  10337. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations])
  10338. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat])
  10339. AC_LANG_CASE(
  10340. [C], [
  10341. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes])
  10342. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes])
  10343. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs])
  10344. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast])
  10345. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition])
  10346. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement])
  10347. ]
  10348. )
  10349. # This chunk adds additional warnings that could catch undesired effects.
  10350. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused])
  10351. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized])
  10352. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow])
  10353. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
  10354. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn])
  10355. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute])
  10356. # These are currently disabled because they are noisy. They will be enabled
  10357. # in the future once the codebase is sufficiently modernized to silence
  10358. # them. For now, I don't want them to drown out the other warnings.
  10359. # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
  10360. # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses])
  10361. # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
  10362. # Turn some warnings into errors, so we don't accidently get successful builds
  10363. # when there are problems that should be fixed.
  10364. if test "x$SELECTIVE_WERROR" = "xyes" ; then
  10365. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED])
  10366. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull])
  10367. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self])
  10368. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main])
  10369. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces])
  10370. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point])
  10371. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT])
  10372. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs])
  10373. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds])
  10374. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings])
  10375. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address])
  10376. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION])
  10377. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION
  10378. else
  10379. AC_MSG_WARN([You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT])
  10380. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit])
  10381. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull])
  10382. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self])
  10383. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain])
  10384. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces])
  10385. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point])
  10386. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type])
  10387. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs])
  10388. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds])
  10389. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings])
  10390. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress])
  10391. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast])
  10392. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast])
  10393. fi
  10394. AC_SUBST([BASE_]PREFIX[FLAGS])
  10395. ]) # XORG_COMPILER_FLAGS
  10396. # XORG_CWARNFLAGS
  10397. # ---------------
  10398. # Minimum version: 1.2.0
  10399. # Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead)
  10400. #
  10401. # Defines CWARNFLAGS to enable C compiler warnings.
  10402. #
  10403. # This function is deprecated because it defines -fno-strict-aliasing
  10404. # which alters the code generated by the compiler. If -fno-strict-aliasing
  10405. # is needed, then it should be added explicitly in the module when
  10406. # it is updated to use BASE_CFLAGS.
  10407. #
  10408. AC_DEFUN([XORG_CWARNFLAGS], [
  10409. AC_REQUIRE([XORG_COMPILER_FLAGS])
  10410. AC_REQUIRE([XORG_COMPILER_BRAND])
  10411. AC_LANG_CASE(
  10412. [C], [
  10413. CWARNFLAGS="$BASE_CFLAGS"
  10414. if test "x$GCC" = xyes ; then
  10415. CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing"
  10416. fi
  10417. AC_SUBST(CWARNFLAGS)
  10418. ]
  10419. )
  10420. ]) # XORG_CWARNFLAGS
  10421. # XORG_STRICT_OPTION
  10422. # -----------------------
  10423. # Minimum version: 1.3.0
  10424. #
  10425. # Add configure option to enable strict compilation flags, such as treating
  10426. # warnings as fatal errors.
  10427. # If --enable-strict-compilation is passed to configure, adds strict flags to
  10428. # $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS.
  10429. #
  10430. # Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or
  10431. # when strict compilation is unconditionally desired.
  10432. AC_DEFUN([XORG_STRICT_OPTION], [
  10433. AC_REQUIRE([XORG_CWARNFLAGS])
  10434. AC_REQUIRE([XORG_COMPILER_FLAGS])
  10435. AC_ARG_ENABLE(strict-compilation,
  10436. AS_HELP_STRING([--enable-strict-compilation],
  10437. [Enable all warnings from compiler and make them errors (default: disabled)]),
  10438. [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
  10439. AC_LANG_CASE(
  10440. [C], [
  10441. define([PREFIX], [C])
  10442. ],
  10443. [C++], [
  10444. define([PREFIX], [CXX])
  10445. ]
  10446. )
  10447. [STRICT_]PREFIX[FLAGS]=""
  10448. XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic])
  10449. XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn])
  10450. # Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not
  10451. # activate it with -Werror, so we add it here explicitly.
  10452. XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes])
  10453. if test "x$STRICT_COMPILE" = "xyes"; then
  10454. [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]"
  10455. AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"])
  10456. fi
  10457. AC_SUBST([STRICT_]PREFIX[FLAGS])
  10458. AC_SUBST([BASE_]PREFIX[FLAGS])
  10459. AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS]))
  10460. ]) # XORG_STRICT_OPTION
  10461. # XORG_DEFAULT_OPTIONS
  10462. # --------------------
  10463. # Minimum version: 1.3.0
  10464. #
  10465. # Defines default options for X.Org modules.
  10466. #
  10467. AC_DEFUN([XORG_DEFAULT_OPTIONS], [
  10468. AC_REQUIRE([AC_PROG_INSTALL])
  10469. XORG_COMPILER_FLAGS
  10470. XORG_CWARNFLAGS
  10471. XORG_STRICT_OPTION
  10472. XORG_RELEASE_VERSION
  10473. XORG_CHANGELOG
  10474. XORG_INSTALL
  10475. XORG_MANPAGE_SECTIONS
  10476. m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
  10477. [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
  10478. ]) # XORG_DEFAULT_OPTIONS
  10479. # XORG_INSTALL()
  10480. # ----------------
  10481. # Minimum version: 1.4.0
  10482. #
  10483. # Defines the variable INSTALL_CMD as the command to copy
  10484. # INSTALL from $prefix/share/util-macros.
  10485. #
  10486. AC_DEFUN([XORG_INSTALL], [
  10487. AC_REQUIRE([PKG_PROG_PKG_CONFIG])
  10488. macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
  10489. INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
  10490. mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
  10491. || (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
  10492. echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
  10493. AC_SUBST([INSTALL_CMD])
  10494. ]) # XORG_INSTALL
  10495. dnl Copyright 2005 Red Hat, Inc
  10496. dnl
  10497. dnl Permission to use, copy, modify, distribute, and sell this software and its
  10498. dnl documentation for any purpose is hereby granted without fee, provided that
  10499. dnl the above copyright notice appear in all copies and that both that
  10500. dnl copyright notice and this permission notice appear in supporting
  10501. dnl documentation.
  10502. dnl
  10503. dnl The above copyright notice and this permission notice shall be included
  10504. dnl in all copies or substantial portions of the Software.
  10505. dnl
  10506. dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  10507. dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  10508. dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  10509. dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
  10510. dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  10511. dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  10512. dnl OTHER DEALINGS IN THE SOFTWARE.
  10513. dnl
  10514. dnl Except as contained in this notice, the name of the copyright holders shall
  10515. dnl not be used in advertising or otherwise to promote the sale, use or
  10516. dnl other dealings in this Software without prior written authorization
  10517. dnl from the copyright holders.
  10518. dnl
  10519. # XORG_RELEASE_VERSION
  10520. # --------------------
  10521. # Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
  10522. AC_DEFUN([XORG_RELEASE_VERSION],[
  10523. AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
  10524. [`echo $PACKAGE_VERSION | cut -d . -f 1`],
  10525. [Major version of this package])
  10526. PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
  10527. if test "x$PVM" = "x"; then
  10528. PVM="0"
  10529. fi
  10530. AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
  10531. [$PVM],
  10532. [Minor version of this package])
  10533. PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
  10534. if test "x$PVP" = "x"; then
  10535. PVP="0"
  10536. fi
  10537. AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
  10538. [$PVP],
  10539. [Patch version of this package])
  10540. ])
  10541. # XORG_CHANGELOG()
  10542. # ----------------
  10543. # Minimum version: 1.2.0
  10544. #
  10545. # Defines the variable CHANGELOG_CMD as the command to generate
  10546. # ChangeLog from git.
  10547. #
  10548. #
  10549. AC_DEFUN([XORG_CHANGELOG], [
  10550. CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
  10551. mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
  10552. || (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
  10553. echo 'git directory not found: installing possibly empty changelog.' >&2)"
  10554. AC_SUBST([CHANGELOG_CMD])
  10555. ]) # XORG_CHANGELOG
  10556. dnl Copyright 2005 Red Hat, Inc
  10557. dnl
  10558. dnl Permission to use, copy, modify, distribute, and sell this software and its
  10559. dnl documentation for any purpose is hereby granted without fee, provided that
  10560. dnl the above copyright notice appear in all copies and that both that
  10561. dnl copyright notice and this permission notice appear in supporting
  10562. dnl documentation.
  10563. dnl
  10564. dnl The above copyright notice and this permission notice shall be included
  10565. dnl in all copies or substantial portions of the Software.
  10566. dnl
  10567. dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  10568. dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  10569. dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  10570. dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
  10571. dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  10572. dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  10573. dnl OTHER DEALINGS IN THE SOFTWARE.
  10574. dnl
  10575. dnl Except as contained in this notice, the name of the copyright holders shall
  10576. dnl not be used in advertising or otherwise to promote the sale, use or
  10577. dnl other dealings in this Software without prior written authorization
  10578. dnl from the copyright holders.
  10579. dnl
  10580. # XORG_DRIVER_CHECK_EXT()
  10581. # --------------------------
  10582. # Checks for the $1 define in xorg-server.h (from the sdk). If it
  10583. # is defined, then add $1 to $REQUIRED_MODULES.
  10584. AC_DEFUN([XORG_DRIVER_CHECK_EXT],[
  10585. AC_REQUIRE([PKG_PROG_PKG_CONFIG])
  10586. SAVE_CFLAGS="$CFLAGS"
  10587. CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`"
  10588. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
  10589. #include "xorg-server.h"
  10590. #if !defined $1
  10591. #error $1 not defined
  10592. #endif
  10593. ]])],
  10594. [_EXT_CHECK=yes],
  10595. [_EXT_CHECK=no])
  10596. CFLAGS="$SAVE_CFLAGS"
  10597. AC_MSG_CHECKING([if $1 is defined])
  10598. AC_MSG_RESULT([$_EXT_CHECK])
  10599. if test "$_EXT_CHECK" != no; then
  10600. REQUIRED_MODULES="$REQUIRED_MODULES $2"
  10601. fi
  10602. ])