aclocal.m4 376 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499
  1. # generated automatically by aclocal 1.16.3 -*- Autoconf -*-
  2. # Copyright (C) 1996-2020 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_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
  11. m4_ifndef([AC_AUTOCONF_VERSION],
  12. [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
  13. m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
  14. [m4_warning([this file was generated for autoconf 2.69.
  15. You have another version of autoconf. It may work, but is not guaranteed to.
  16. If you have problems, you may need to regenerate the build system entirely.
  17. To do so, use the procedure documented by the package, typically 'autoreconf'.])])
  18. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
  19. #
  20. # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
  21. # Written by Gordon Matzigkeit, 1996
  22. #
  23. # This file is free software; the Free Software Foundation gives
  24. # unlimited permission to copy and/or distribute it, with or without
  25. # modifications, as long as this notice is preserved.
  26. m4_define([_LT_COPYING], [dnl
  27. # Copyright (C) 2014 Free Software Foundation, Inc.
  28. # This is free software; see the source for copying conditions. There is NO
  29. # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  30. # GNU Libtool is free software; you can redistribute it and/or modify
  31. # it under the terms of the GNU General Public License as published by
  32. # the Free Software Foundation; either version 2 of of the License, or
  33. # (at your option) any later version.
  34. #
  35. # As a special exception to the GNU General Public License, if you
  36. # distribute this file as part of a program or library that is built
  37. # using GNU Libtool, you may include this file under the same
  38. # distribution terms that you use for the rest of that program.
  39. #
  40. # GNU Libtool is distributed in the hope that it will be useful, but
  41. # WITHOUT ANY WARRANTY; without even the implied warranty of
  42. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  43. # GNU General Public License for more details.
  44. #
  45. # You should have received a copy of the GNU General Public License
  46. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  47. ])
  48. # serial 58 LT_INIT
  49. # LT_PREREQ(VERSION)
  50. # ------------------
  51. # Complain and exit if this libtool version is less that VERSION.
  52. m4_defun([LT_PREREQ],
  53. [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
  54. [m4_default([$3],
  55. [m4_fatal([Libtool version $1 or higher is required],
  56. 63)])],
  57. [$2])])
  58. # _LT_CHECK_BUILDDIR
  59. # ------------------
  60. # Complain if the absolute build directory name contains unusual characters
  61. m4_defun([_LT_CHECK_BUILDDIR],
  62. [case `pwd` in
  63. *\ * | *\ *)
  64. AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
  65. esac
  66. ])
  67. # LT_INIT([OPTIONS])
  68. # ------------------
  69. AC_DEFUN([LT_INIT],
  70. [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
  71. AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  72. AC_BEFORE([$0], [LT_LANG])dnl
  73. AC_BEFORE([$0], [LT_OUTPUT])dnl
  74. AC_BEFORE([$0], [LTDL_INIT])dnl
  75. m4_require([_LT_CHECK_BUILDDIR])dnl
  76. dnl Autoconf doesn't catch unexpanded LT_ macros by default:
  77. m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
  78. m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
  79. dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
  80. dnl unless we require an AC_DEFUNed macro:
  81. AC_REQUIRE([LTOPTIONS_VERSION])dnl
  82. AC_REQUIRE([LTSUGAR_VERSION])dnl
  83. AC_REQUIRE([LTVERSION_VERSION])dnl
  84. AC_REQUIRE([LTOBSOLETE_VERSION])dnl
  85. m4_require([_LT_PROG_LTMAIN])dnl
  86. _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
  87. dnl Parse OPTIONS
  88. _LT_SET_OPTIONS([$0], [$1])
  89. # This can be used to rebuild libtool when needed
  90. LIBTOOL_DEPS=$ltmain
  91. # Always use our own libtool.
  92. LIBTOOL='$(SHELL) $(top_builddir)/libtool'
  93. AC_SUBST(LIBTOOL)dnl
  94. _LT_SETUP
  95. # Only expand once:
  96. m4_define([LT_INIT])
  97. ])# LT_INIT
  98. # Old names:
  99. AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
  100. AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
  101. dnl aclocal-1.4 backwards compatibility:
  102. dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
  103. dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
  104. # _LT_PREPARE_CC_BASENAME
  105. # -----------------------
  106. m4_defun([_LT_PREPARE_CC_BASENAME], [
  107. # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
  108. func_cc_basename ()
  109. {
  110. for cc_temp in @S|@*""; do
  111. case $cc_temp in
  112. compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
  113. distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
  114. \-*) ;;
  115. *) break;;
  116. esac
  117. done
  118. func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
  119. }
  120. ])# _LT_PREPARE_CC_BASENAME
  121. # _LT_CC_BASENAME(CC)
  122. # -------------------
  123. # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
  124. # but that macro is also expanded into generated libtool script, which
  125. # arranges for $SED and $ECHO to be set by different means.
  126. m4_defun([_LT_CC_BASENAME],
  127. [m4_require([_LT_PREPARE_CC_BASENAME])dnl
  128. AC_REQUIRE([_LT_DECL_SED])dnl
  129. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
  130. func_cc_basename $1
  131. cc_basename=$func_cc_basename_result
  132. ])
  133. # _LT_FILEUTILS_DEFAULTS
  134. # ----------------------
  135. # It is okay to use these file commands and assume they have been set
  136. # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
  137. m4_defun([_LT_FILEUTILS_DEFAULTS],
  138. [: ${CP="cp -f"}
  139. : ${MV="mv -f"}
  140. : ${RM="rm -f"}
  141. ])# _LT_FILEUTILS_DEFAULTS
  142. # _LT_SETUP
  143. # ---------
  144. m4_defun([_LT_SETUP],
  145. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  146. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  147. AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
  148. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
  149. _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
  150. dnl
  151. _LT_DECL([], [host_alias], [0], [The host system])dnl
  152. _LT_DECL([], [host], [0])dnl
  153. _LT_DECL([], [host_os], [0])dnl
  154. dnl
  155. _LT_DECL([], [build_alias], [0], [The build system])dnl
  156. _LT_DECL([], [build], [0])dnl
  157. _LT_DECL([], [build_os], [0])dnl
  158. dnl
  159. AC_REQUIRE([AC_PROG_CC])dnl
  160. AC_REQUIRE([LT_PATH_LD])dnl
  161. AC_REQUIRE([LT_PATH_NM])dnl
  162. dnl
  163. AC_REQUIRE([AC_PROG_LN_S])dnl
  164. test -z "$LN_S" && LN_S="ln -s"
  165. _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
  166. dnl
  167. AC_REQUIRE([LT_CMD_MAX_LEN])dnl
  168. _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
  169. _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
  170. dnl
  171. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  172. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  173. m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
  174. m4_require([_LT_CMD_RELOAD])dnl
  175. m4_require([_LT_CHECK_MAGIC_METHOD])dnl
  176. m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
  177. m4_require([_LT_CMD_OLD_ARCHIVE])dnl
  178. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  179. m4_require([_LT_WITH_SYSROOT])dnl
  180. m4_require([_LT_CMD_TRUNCATE])dnl
  181. _LT_CONFIG_LIBTOOL_INIT([
  182. # See if we are running on zsh, and set the options that allow our
  183. # commands through without removal of \ escapes INIT.
  184. if test -n "\${ZSH_VERSION+set}"; then
  185. setopt NO_GLOB_SUBST
  186. fi
  187. ])
  188. if test -n "${ZSH_VERSION+set}"; then
  189. setopt NO_GLOB_SUBST
  190. fi
  191. _LT_CHECK_OBJDIR
  192. m4_require([_LT_TAG_COMPILER])dnl
  193. case $host_os in
  194. aix3*)
  195. # AIX sometimes has problems with the GCC collect2 program. For some
  196. # reason, if we set the COLLECT_NAMES environment variable, the problems
  197. # vanish in a puff of smoke.
  198. if test set != "${COLLECT_NAMES+set}"; then
  199. COLLECT_NAMES=
  200. export COLLECT_NAMES
  201. fi
  202. ;;
  203. esac
  204. # Global variables:
  205. ofile=libtool
  206. can_build_shared=yes
  207. # All known linkers require a '.a' archive for static linking (except MSVC,
  208. # which needs '.lib').
  209. libext=a
  210. with_gnu_ld=$lt_cv_prog_gnu_ld
  211. old_CC=$CC
  212. old_CFLAGS=$CFLAGS
  213. # Set sane defaults for various variables
  214. test -z "$CC" && CC=cc
  215. test -z "$LTCC" && LTCC=$CC
  216. test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
  217. test -z "$LD" && LD=ld
  218. test -z "$ac_objext" && ac_objext=o
  219. _LT_CC_BASENAME([$compiler])
  220. # Only perform the check for file, if the check method requires it
  221. test -z "$MAGIC_CMD" && MAGIC_CMD=file
  222. case $deplibs_check_method in
  223. file_magic*)
  224. if test "$file_magic_cmd" = '$MAGIC_CMD'; then
  225. _LT_PATH_MAGIC
  226. fi
  227. ;;
  228. esac
  229. # Use C for the default configuration in the libtool script
  230. LT_SUPPORTED_TAG([CC])
  231. _LT_LANG_C_CONFIG
  232. _LT_LANG_DEFAULT_CONFIG
  233. _LT_CONFIG_COMMANDS
  234. ])# _LT_SETUP
  235. # _LT_PREPARE_SED_QUOTE_VARS
  236. # --------------------------
  237. # Define a few sed substitution that help us do robust quoting.
  238. m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
  239. [# Backslashify metacharacters that are still active within
  240. # double-quoted strings.
  241. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
  242. # Same as above, but do not quote variable references.
  243. double_quote_subst='s/\([["`\\]]\)/\\\1/g'
  244. # Sed substitution to delay expansion of an escaped shell variable in a
  245. # double_quote_subst'ed string.
  246. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
  247. # Sed substitution to delay expansion of an escaped single quote.
  248. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
  249. # Sed substitution to avoid accidental globbing in evaled expressions
  250. no_glob_subst='s/\*/\\\*/g'
  251. ])
  252. # _LT_PROG_LTMAIN
  253. # ---------------
  254. # Note that this code is called both from 'configure', and 'config.status'
  255. # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
  256. # 'config.status' has no value for ac_aux_dir unless we are using Automake,
  257. # so we pass a copy along to make sure it has a sensible value anyway.
  258. m4_defun([_LT_PROG_LTMAIN],
  259. [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
  260. _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
  261. ltmain=$ac_aux_dir/ltmain.sh
  262. ])# _LT_PROG_LTMAIN
  263. # So that we can recreate a full libtool script including additional
  264. # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
  265. # in macros and then make a single call at the end using the 'libtool'
  266. # label.
  267. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
  268. # ----------------------------------------
  269. # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  270. m4_define([_LT_CONFIG_LIBTOOL_INIT],
  271. [m4_ifval([$1],
  272. [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
  273. [$1
  274. ])])])
  275. # Initialize.
  276. m4_define([_LT_OUTPUT_LIBTOOL_INIT])
  277. # _LT_CONFIG_LIBTOOL([COMMANDS])
  278. # ------------------------------
  279. # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  280. m4_define([_LT_CONFIG_LIBTOOL],
  281. [m4_ifval([$1],
  282. [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
  283. [$1
  284. ])])])
  285. # Initialize.
  286. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
  287. # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
  288. # -----------------------------------------------------
  289. m4_defun([_LT_CONFIG_SAVE_COMMANDS],
  290. [_LT_CONFIG_LIBTOOL([$1])
  291. _LT_CONFIG_LIBTOOL_INIT([$2])
  292. ])
  293. # _LT_FORMAT_COMMENT([COMMENT])
  294. # -----------------------------
  295. # Add leading comment marks to the start of each line, and a trailing
  296. # full-stop to the whole comment if one is not present already.
  297. m4_define([_LT_FORMAT_COMMENT],
  298. [m4_ifval([$1], [
  299. m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
  300. [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
  301. )])
  302. # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
  303. # -------------------------------------------------------------------
  304. # CONFIGNAME is the name given to the value in the libtool script.
  305. # VARNAME is the (base) name used in the configure script.
  306. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
  307. # VARNAME. Any other value will be used directly.
  308. m4_define([_LT_DECL],
  309. [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
  310. [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
  311. [m4_ifval([$1], [$1], [$2])])
  312. lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
  313. m4_ifval([$4],
  314. [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
  315. lt_dict_add_subkey([lt_decl_dict], [$2],
  316. [tagged?], [m4_ifval([$5], [yes], [no])])])
  317. ])
  318. # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
  319. # --------------------------------------------------------
  320. m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
  321. # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
  322. # ------------------------------------------------
  323. m4_define([lt_decl_tag_varnames],
  324. [_lt_decl_filter([tagged?], [yes], $@)])
  325. # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
  326. # ---------------------------------------------------------
  327. m4_define([_lt_decl_filter],
  328. [m4_case([$#],
  329. [0], [m4_fatal([$0: too few arguments: $#])],
  330. [1], [m4_fatal([$0: too few arguments: $#: $1])],
  331. [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
  332. [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
  333. [lt_dict_filter([lt_decl_dict], $@)])[]dnl
  334. ])
  335. # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
  336. # --------------------------------------------------
  337. m4_define([lt_decl_quote_varnames],
  338. [_lt_decl_filter([value], [1], $@)])
  339. # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
  340. # ---------------------------------------------------
  341. m4_define([lt_decl_dquote_varnames],
  342. [_lt_decl_filter([value], [2], $@)])
  343. # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
  344. # ---------------------------------------------------
  345. m4_define([lt_decl_varnames_tagged],
  346. [m4_assert([$# <= 2])dnl
  347. _$0(m4_quote(m4_default([$1], [[, ]])),
  348. m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
  349. m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
  350. m4_define([_lt_decl_varnames_tagged],
  351. [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
  352. # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
  353. # ------------------------------------------------
  354. m4_define([lt_decl_all_varnames],
  355. [_$0(m4_quote(m4_default([$1], [[, ]])),
  356. m4_if([$2], [],
  357. m4_quote(lt_decl_varnames),
  358. m4_quote(m4_shift($@))))[]dnl
  359. ])
  360. m4_define([_lt_decl_all_varnames],
  361. [lt_join($@, lt_decl_varnames_tagged([$1],
  362. lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
  363. ])
  364. # _LT_CONFIG_STATUS_DECLARE([VARNAME])
  365. # ------------------------------------
  366. # Quote a variable value, and forward it to 'config.status' so that its
  367. # declaration there will have the same value as in 'configure'. VARNAME
  368. # must have a single quote delimited value for this to work.
  369. m4_define([_LT_CONFIG_STATUS_DECLARE],
  370. [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
  371. # _LT_CONFIG_STATUS_DECLARATIONS
  372. # ------------------------------
  373. # We delimit libtool config variables with single quotes, so when
  374. # we write them to config.status, we have to be sure to quote all
  375. # embedded single quotes properly. In configure, this macro expands
  376. # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
  377. #
  378. # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
  379. m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
  380. [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
  381. [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
  382. # _LT_LIBTOOL_TAGS
  383. # ----------------
  384. # Output comment and list of tags supported by the script
  385. m4_defun([_LT_LIBTOOL_TAGS],
  386. [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
  387. available_tags='_LT_TAGS'dnl
  388. ])
  389. # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
  390. # -----------------------------------
  391. # Extract the dictionary values for VARNAME (optionally with TAG) and
  392. # expand to a commented shell variable setting:
  393. #
  394. # # Some comment about what VAR is for.
  395. # visible_name=$lt_internal_name
  396. m4_define([_LT_LIBTOOL_DECLARE],
  397. [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
  398. [description])))[]dnl
  399. m4_pushdef([_libtool_name],
  400. m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
  401. m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
  402. [0], [_libtool_name=[$]$1],
  403. [1], [_libtool_name=$lt_[]$1],
  404. [2], [_libtool_name=$lt_[]$1],
  405. [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
  406. m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
  407. ])
  408. # _LT_LIBTOOL_CONFIG_VARS
  409. # -----------------------
  410. # Produce commented declarations of non-tagged libtool config variables
  411. # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
  412. # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
  413. # section) are produced by _LT_LIBTOOL_TAG_VARS.
  414. m4_defun([_LT_LIBTOOL_CONFIG_VARS],
  415. [m4_foreach([_lt_var],
  416. m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
  417. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
  418. # _LT_LIBTOOL_TAG_VARS(TAG)
  419. # -------------------------
  420. m4_define([_LT_LIBTOOL_TAG_VARS],
  421. [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
  422. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
  423. # _LT_TAGVAR(VARNAME, [TAGNAME])
  424. # ------------------------------
  425. m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
  426. # _LT_CONFIG_COMMANDS
  427. # -------------------
  428. # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
  429. # variables for single and double quote escaping we saved from calls
  430. # to _LT_DECL, we can put quote escaped variables declarations
  431. # into 'config.status', and then the shell code to quote escape them in
  432. # for loops in 'config.status'. Finally, any additional code accumulated
  433. # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
  434. m4_defun([_LT_CONFIG_COMMANDS],
  435. [AC_PROVIDE_IFELSE([LT_OUTPUT],
  436. dnl If the libtool generation code has been placed in $CONFIG_LT,
  437. dnl instead of duplicating it all over again into config.status,
  438. dnl then we will have config.status run $CONFIG_LT later, so it
  439. dnl needs to know what name is stored there:
  440. [AC_CONFIG_COMMANDS([libtool],
  441. [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
  442. dnl If the libtool generation code is destined for config.status,
  443. dnl expand the accumulated commands and init code now:
  444. [AC_CONFIG_COMMANDS([libtool],
  445. [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
  446. ])#_LT_CONFIG_COMMANDS
  447. # Initialize.
  448. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
  449. [
  450. # The HP-UX ksh and POSIX shell print the target directory to stdout
  451. # if CDPATH is set.
  452. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  453. sed_quote_subst='$sed_quote_subst'
  454. double_quote_subst='$double_quote_subst'
  455. delay_variable_subst='$delay_variable_subst'
  456. _LT_CONFIG_STATUS_DECLARATIONS
  457. LTCC='$LTCC'
  458. LTCFLAGS='$LTCFLAGS'
  459. compiler='$compiler_DEFAULT'
  460. # A function that is used when there is no print builtin or printf.
  461. func_fallback_echo ()
  462. {
  463. eval 'cat <<_LTECHO_EOF
  464. \$[]1
  465. _LTECHO_EOF'
  466. }
  467. # Quote evaled strings.
  468. for var in lt_decl_all_varnames([[ \
  469. ]], lt_decl_quote_varnames); do
  470. case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  471. *[[\\\\\\\`\\"\\\$]]*)
  472. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
  473. ;;
  474. *)
  475. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  476. ;;
  477. esac
  478. done
  479. # Double-quote double-evaled strings.
  480. for var in lt_decl_all_varnames([[ \
  481. ]], lt_decl_dquote_varnames); do
  482. case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  483. *[[\\\\\\\`\\"\\\$]]*)
  484. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
  485. ;;
  486. *)
  487. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  488. ;;
  489. esac
  490. done
  491. _LT_OUTPUT_LIBTOOL_INIT
  492. ])
  493. # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
  494. # ------------------------------------
  495. # Generate a child script FILE with all initialization necessary to
  496. # reuse the environment learned by the parent script, and make the
  497. # file executable. If COMMENT is supplied, it is inserted after the
  498. # '#!' sequence but before initialization text begins. After this
  499. # macro, additional text can be appended to FILE to form the body of
  500. # the child script. The macro ends with non-zero status if the
  501. # file could not be fully written (such as if the disk is full).
  502. m4_ifdef([AS_INIT_GENERATED],
  503. [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
  504. [m4_defun([_LT_GENERATED_FILE_INIT],
  505. [m4_require([AS_PREPARE])]dnl
  506. [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
  507. [lt_write_fail=0
  508. cat >$1 <<_ASEOF || lt_write_fail=1
  509. #! $SHELL
  510. # Generated by $as_me.
  511. $2
  512. SHELL=\${CONFIG_SHELL-$SHELL}
  513. export SHELL
  514. _ASEOF
  515. cat >>$1 <<\_ASEOF || lt_write_fail=1
  516. AS_SHELL_SANITIZE
  517. _AS_PREPARE
  518. exec AS_MESSAGE_FD>&1
  519. _ASEOF
  520. test 0 = "$lt_write_fail" && chmod +x $1[]dnl
  521. m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
  522. # LT_OUTPUT
  523. # ---------
  524. # This macro allows early generation of the libtool script (before
  525. # AC_OUTPUT is called), incase it is used in configure for compilation
  526. # tests.
  527. AC_DEFUN([LT_OUTPUT],
  528. [: ${CONFIG_LT=./config.lt}
  529. AC_MSG_NOTICE([creating $CONFIG_LT])
  530. _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
  531. [# Run this file to recreate a libtool stub with the current configuration.])
  532. cat >>"$CONFIG_LT" <<\_LTEOF
  533. lt_cl_silent=false
  534. exec AS_MESSAGE_LOG_FD>>config.log
  535. {
  536. echo
  537. AS_BOX([Running $as_me.])
  538. } >&AS_MESSAGE_LOG_FD
  539. lt_cl_help="\
  540. '$as_me' creates a local libtool stub from the current configuration,
  541. for use in further configure time tests before the real libtool is
  542. generated.
  543. Usage: $[0] [[OPTIONS]]
  544. -h, --help print this help, then exit
  545. -V, --version print version number, then exit
  546. -q, --quiet do not print progress messages
  547. -d, --debug don't remove temporary files
  548. Report bugs to <bug-libtool@gnu.org>."
  549. lt_cl_version="\
  550. m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
  551. m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
  552. configured by $[0], generated by m4_PACKAGE_STRING.
  553. Copyright (C) 2011 Free Software Foundation, Inc.
  554. This config.lt script is free software; the Free Software Foundation
  555. gives unlimited permision to copy, distribute and modify it."
  556. while test 0 != $[#]
  557. do
  558. case $[1] in
  559. --version | --v* | -V )
  560. echo "$lt_cl_version"; exit 0 ;;
  561. --help | --h* | -h )
  562. echo "$lt_cl_help"; exit 0 ;;
  563. --debug | --d* | -d )
  564. debug=: ;;
  565. --quiet | --q* | --silent | --s* | -q )
  566. lt_cl_silent=: ;;
  567. -*) AC_MSG_ERROR([unrecognized option: $[1]
  568. Try '$[0] --help' for more information.]) ;;
  569. *) AC_MSG_ERROR([unrecognized argument: $[1]
  570. Try '$[0] --help' for more information.]) ;;
  571. esac
  572. shift
  573. done
  574. if $lt_cl_silent; then
  575. exec AS_MESSAGE_FD>/dev/null
  576. fi
  577. _LTEOF
  578. cat >>"$CONFIG_LT" <<_LTEOF
  579. _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
  580. _LTEOF
  581. cat >>"$CONFIG_LT" <<\_LTEOF
  582. AC_MSG_NOTICE([creating $ofile])
  583. _LT_OUTPUT_LIBTOOL_COMMANDS
  584. AS_EXIT(0)
  585. _LTEOF
  586. chmod +x "$CONFIG_LT"
  587. # configure is writing to config.log, but config.lt does its own redirection,
  588. # appending to config.log, which fails on DOS, as config.log is still kept
  589. # open by configure. Here we exec the FD to /dev/null, effectively closing
  590. # config.log, so it can be properly (re)opened and appended to by config.lt.
  591. lt_cl_success=:
  592. test yes = "$silent" &&
  593. lt_config_lt_args="$lt_config_lt_args --quiet"
  594. exec AS_MESSAGE_LOG_FD>/dev/null
  595. $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
  596. exec AS_MESSAGE_LOG_FD>>config.log
  597. $lt_cl_success || AS_EXIT(1)
  598. ])# LT_OUTPUT
  599. # _LT_CONFIG(TAG)
  600. # ---------------
  601. # If TAG is the built-in tag, create an initial libtool script with a
  602. # default configuration from the untagged config vars. Otherwise add code
  603. # to config.status for appending the configuration named by TAG from the
  604. # matching tagged config vars.
  605. m4_defun([_LT_CONFIG],
  606. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  607. _LT_CONFIG_SAVE_COMMANDS([
  608. m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
  609. m4_if(_LT_TAG, [C], [
  610. # See if we are running on zsh, and set the options that allow our
  611. # commands through without removal of \ escapes.
  612. if test -n "${ZSH_VERSION+set}"; then
  613. setopt NO_GLOB_SUBST
  614. fi
  615. cfgfile=${ofile}T
  616. trap "$RM \"$cfgfile\"; exit 1" 1 2 15
  617. $RM "$cfgfile"
  618. cat <<_LT_EOF >> "$cfgfile"
  619. #! $SHELL
  620. # Generated automatically by $as_me ($PACKAGE) $VERSION
  621. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  622. # Provide generalized library-building support services.
  623. # Written by Gordon Matzigkeit, 1996
  624. _LT_COPYING
  625. _LT_LIBTOOL_TAGS
  626. # Configured defaults for sys_lib_dlsearch_path munging.
  627. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
  628. # ### BEGIN LIBTOOL CONFIG
  629. _LT_LIBTOOL_CONFIG_VARS
  630. _LT_LIBTOOL_TAG_VARS
  631. # ### END LIBTOOL CONFIG
  632. _LT_EOF
  633. cat <<'_LT_EOF' >> "$cfgfile"
  634. # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
  635. _LT_PREPARE_MUNGE_PATH_LIST
  636. _LT_PREPARE_CC_BASENAME
  637. # ### END FUNCTIONS SHARED WITH CONFIGURE
  638. _LT_EOF
  639. case $host_os in
  640. aix3*)
  641. cat <<\_LT_EOF >> "$cfgfile"
  642. # AIX sometimes has problems with the GCC collect2 program. For some
  643. # reason, if we set the COLLECT_NAMES environment variable, the problems
  644. # vanish in a puff of smoke.
  645. if test set != "${COLLECT_NAMES+set}"; then
  646. COLLECT_NAMES=
  647. export COLLECT_NAMES
  648. fi
  649. _LT_EOF
  650. ;;
  651. esac
  652. _LT_PROG_LTMAIN
  653. # We use sed instead of cat because bash on DJGPP gets confused if
  654. # if finds mixed CR/LF and LF-only lines. Since sed operates in
  655. # text mode, it properly converts lines to CR/LF. This bash problem
  656. # is reportedly fixed, but why not run on old versions too?
  657. sed '$q' "$ltmain" >> "$cfgfile" \
  658. || (rm -f "$cfgfile"; exit 1)
  659. mv -f "$cfgfile" "$ofile" ||
  660. (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
  661. chmod +x "$ofile"
  662. ],
  663. [cat <<_LT_EOF >> "$ofile"
  664. dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
  665. dnl in a comment (ie after a #).
  666. # ### BEGIN LIBTOOL TAG CONFIG: $1
  667. _LT_LIBTOOL_TAG_VARS(_LT_TAG)
  668. # ### END LIBTOOL TAG CONFIG: $1
  669. _LT_EOF
  670. ])dnl /m4_if
  671. ],
  672. [m4_if([$1], [], [
  673. PACKAGE='$PACKAGE'
  674. VERSION='$VERSION'
  675. RM='$RM'
  676. ofile='$ofile'], [])
  677. ])dnl /_LT_CONFIG_SAVE_COMMANDS
  678. ])# _LT_CONFIG
  679. # LT_SUPPORTED_TAG(TAG)
  680. # ---------------------
  681. # Trace this macro to discover what tags are supported by the libtool
  682. # --tag option, using:
  683. # autoconf --trace 'LT_SUPPORTED_TAG:$1'
  684. AC_DEFUN([LT_SUPPORTED_TAG], [])
  685. # C support is built-in for now
  686. m4_define([_LT_LANG_C_enabled], [])
  687. m4_define([_LT_TAGS], [])
  688. # LT_LANG(LANG)
  689. # -------------
  690. # Enable libtool support for the given language if not already enabled.
  691. AC_DEFUN([LT_LANG],
  692. [AC_BEFORE([$0], [LT_OUTPUT])dnl
  693. m4_case([$1],
  694. [C], [_LT_LANG(C)],
  695. [C++], [_LT_LANG(CXX)],
  696. [Go], [_LT_LANG(GO)],
  697. [Java], [_LT_LANG(GCJ)],
  698. [Fortran 77], [_LT_LANG(F77)],
  699. [Fortran], [_LT_LANG(FC)],
  700. [Windows Resource], [_LT_LANG(RC)],
  701. [m4_ifdef([_LT_LANG_]$1[_CONFIG],
  702. [_LT_LANG($1)],
  703. [m4_fatal([$0: unsupported language: "$1"])])])dnl
  704. ])# LT_LANG
  705. # _LT_LANG(LANGNAME)
  706. # ------------------
  707. m4_defun([_LT_LANG],
  708. [m4_ifdef([_LT_LANG_]$1[_enabled], [],
  709. [LT_SUPPORTED_TAG([$1])dnl
  710. m4_append([_LT_TAGS], [$1 ])dnl
  711. m4_define([_LT_LANG_]$1[_enabled], [])dnl
  712. _LT_LANG_$1_CONFIG($1)])dnl
  713. ])# _LT_LANG
  714. m4_ifndef([AC_PROG_GO], [
  715. # NOTE: This macro has been submitted for inclusion into #
  716. # GNU Autoconf as AC_PROG_GO. When it is available in #
  717. # a released version of Autoconf we should remove this #
  718. # macro and use it instead. #
  719. m4_defun([AC_PROG_GO],
  720. [AC_LANG_PUSH(Go)dnl
  721. AC_ARG_VAR([GOC], [Go compiler command])dnl
  722. AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
  723. _AC_ARG_VAR_LDFLAGS()dnl
  724. AC_CHECK_TOOL(GOC, gccgo)
  725. if test -z "$GOC"; then
  726. if test -n "$ac_tool_prefix"; then
  727. AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
  728. fi
  729. fi
  730. if test -z "$GOC"; then
  731. AC_CHECK_PROG(GOC, gccgo, gccgo, false)
  732. fi
  733. ])#m4_defun
  734. ])#m4_ifndef
  735. # _LT_LANG_DEFAULT_CONFIG
  736. # -----------------------
  737. m4_defun([_LT_LANG_DEFAULT_CONFIG],
  738. [AC_PROVIDE_IFELSE([AC_PROG_CXX],
  739. [LT_LANG(CXX)],
  740. [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
  741. AC_PROVIDE_IFELSE([AC_PROG_F77],
  742. [LT_LANG(F77)],
  743. [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
  744. AC_PROVIDE_IFELSE([AC_PROG_FC],
  745. [LT_LANG(FC)],
  746. [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
  747. dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
  748. dnl pulling things in needlessly.
  749. AC_PROVIDE_IFELSE([AC_PROG_GCJ],
  750. [LT_LANG(GCJ)],
  751. [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
  752. [LT_LANG(GCJ)],
  753. [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
  754. [LT_LANG(GCJ)],
  755. [m4_ifdef([AC_PROG_GCJ],
  756. [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
  757. m4_ifdef([A][M_PROG_GCJ],
  758. [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
  759. m4_ifdef([LT_PROG_GCJ],
  760. [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
  761. AC_PROVIDE_IFELSE([AC_PROG_GO],
  762. [LT_LANG(GO)],
  763. [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
  764. AC_PROVIDE_IFELSE([LT_PROG_RC],
  765. [LT_LANG(RC)],
  766. [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
  767. ])# _LT_LANG_DEFAULT_CONFIG
  768. # Obsolete macros:
  769. AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
  770. AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
  771. AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
  772. AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
  773. AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
  774. dnl aclocal-1.4 backwards compatibility:
  775. dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
  776. dnl AC_DEFUN([AC_LIBTOOL_F77], [])
  777. dnl AC_DEFUN([AC_LIBTOOL_FC], [])
  778. dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
  779. dnl AC_DEFUN([AC_LIBTOOL_RC], [])
  780. # _LT_TAG_COMPILER
  781. # ----------------
  782. m4_defun([_LT_TAG_COMPILER],
  783. [AC_REQUIRE([AC_PROG_CC])dnl
  784. _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
  785. _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
  786. _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
  787. _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
  788. # If no C compiler was specified, use CC.
  789. LTCC=${LTCC-"$CC"}
  790. # If no C compiler flags were specified, use CFLAGS.
  791. LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
  792. # Allow CC to be a program name with arguments.
  793. compiler=$CC
  794. ])# _LT_TAG_COMPILER
  795. # _LT_COMPILER_BOILERPLATE
  796. # ------------------------
  797. # Check for compiler boilerplate output or warnings with
  798. # the simple compiler test code.
  799. m4_defun([_LT_COMPILER_BOILERPLATE],
  800. [m4_require([_LT_DECL_SED])dnl
  801. ac_outfile=conftest.$ac_objext
  802. echo "$lt_simple_compile_test_code" >conftest.$ac_ext
  803. eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  804. _lt_compiler_boilerplate=`cat conftest.err`
  805. $RM conftest*
  806. ])# _LT_COMPILER_BOILERPLATE
  807. # _LT_LINKER_BOILERPLATE
  808. # ----------------------
  809. # Check for linker boilerplate output or warnings with
  810. # the simple link test code.
  811. m4_defun([_LT_LINKER_BOILERPLATE],
  812. [m4_require([_LT_DECL_SED])dnl
  813. ac_outfile=conftest.$ac_objext
  814. echo "$lt_simple_link_test_code" >conftest.$ac_ext
  815. eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  816. _lt_linker_boilerplate=`cat conftest.err`
  817. $RM -r conftest*
  818. ])# _LT_LINKER_BOILERPLATE
  819. # _LT_REQUIRED_DARWIN_CHECKS
  820. # -------------------------
  821. m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
  822. case $host_os in
  823. rhapsody* | darwin*)
  824. AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
  825. AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
  826. AC_CHECK_TOOL([LIPO], [lipo], [:])
  827. AC_CHECK_TOOL([OTOOL], [otool], [:])
  828. AC_CHECK_TOOL([OTOOL64], [otool64], [:])
  829. _LT_DECL([], [DSYMUTIL], [1],
  830. [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
  831. _LT_DECL([], [NMEDIT], [1],
  832. [Tool to change global to local symbols on Mac OS X])
  833. _LT_DECL([], [LIPO], [1],
  834. [Tool to manipulate fat objects and archives on Mac OS X])
  835. _LT_DECL([], [OTOOL], [1],
  836. [ldd/readelf like tool for Mach-O binaries on Mac OS X])
  837. _LT_DECL([], [OTOOL64], [1],
  838. [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
  839. AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
  840. [lt_cv_apple_cc_single_mod=no
  841. if test -z "$LT_MULTI_MODULE"; then
  842. # By default we will add the -single_module flag. You can override
  843. # by either setting the environment variable LT_MULTI_MODULE
  844. # non-empty at configure time, or by adding -multi_module to the
  845. # link flags.
  846. rm -rf libconftest.dylib*
  847. echo "int foo(void){return 1;}" > conftest.c
  848. echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  849. -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
  850. $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  851. -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
  852. _lt_result=$?
  853. # If there is a non-empty error log, and "single_module"
  854. # appears in it, assume the flag caused a linker warning
  855. if test -s conftest.err && $GREP single_module conftest.err; then
  856. cat conftest.err >&AS_MESSAGE_LOG_FD
  857. # Otherwise, if the output was created with a 0 exit code from
  858. # the compiler, it worked.
  859. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
  860. lt_cv_apple_cc_single_mod=yes
  861. else
  862. cat conftest.err >&AS_MESSAGE_LOG_FD
  863. fi
  864. rm -rf libconftest.dylib*
  865. rm -f conftest.*
  866. fi])
  867. AC_CACHE_CHECK([for -exported_symbols_list linker flag],
  868. [lt_cv_ld_exported_symbols_list],
  869. [lt_cv_ld_exported_symbols_list=no
  870. save_LDFLAGS=$LDFLAGS
  871. echo "_main" > conftest.sym
  872. LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
  873. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  874. [lt_cv_ld_exported_symbols_list=yes],
  875. [lt_cv_ld_exported_symbols_list=no])
  876. LDFLAGS=$save_LDFLAGS
  877. ])
  878. AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
  879. [lt_cv_ld_force_load=no
  880. cat > conftest.c << _LT_EOF
  881. int forced_loaded() { return 2;}
  882. _LT_EOF
  883. echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
  884. $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
  885. echo "$AR cr libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
  886. $AR cr libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
  887. echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
  888. $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
  889. cat > conftest.c << _LT_EOF
  890. int main() { return 0;}
  891. _LT_EOF
  892. echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
  893. $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
  894. _lt_result=$?
  895. if test -s conftest.err && $GREP force_load conftest.err; then
  896. cat conftest.err >&AS_MESSAGE_LOG_FD
  897. elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
  898. lt_cv_ld_force_load=yes
  899. else
  900. cat conftest.err >&AS_MESSAGE_LOG_FD
  901. fi
  902. rm -f conftest.err libconftest.a conftest conftest.c
  903. rm -rf conftest.dSYM
  904. ])
  905. case $host_os in
  906. rhapsody* | darwin1.[[012]])
  907. _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
  908. darwin1.*)
  909. _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
  910. darwin*) # darwin 5.x on
  911. # if running on 10.5 or later, the deployment target defaults
  912. # to the OS version, if on x86, and 10.4, the deployment
  913. # target defaults to 10.4. Don't you love it?
  914. case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
  915. 10.0,*86*-darwin8*|10.0,*-darwin[[912]]*)
  916. _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
  917. 10.[[012]][[,.]]*)
  918. _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
  919. 10.*|11.*)
  920. _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
  921. esac
  922. ;;
  923. esac
  924. if test yes = "$lt_cv_apple_cc_single_mod"; then
  925. _lt_dar_single_mod='$single_module'
  926. fi
  927. if test yes = "$lt_cv_ld_exported_symbols_list"; then
  928. _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
  929. else
  930. _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
  931. fi
  932. if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
  933. _lt_dsymutil='~$DSYMUTIL $lib || :'
  934. else
  935. _lt_dsymutil=
  936. fi
  937. ;;
  938. esac
  939. ])
  940. # _LT_DARWIN_LINKER_FEATURES([TAG])
  941. # ---------------------------------
  942. # Checks for linker and compiler features on darwin
  943. m4_defun([_LT_DARWIN_LINKER_FEATURES],
  944. [
  945. m4_require([_LT_REQUIRED_DARWIN_CHECKS])
  946. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  947. _LT_TAGVAR(hardcode_direct, $1)=no
  948. _LT_TAGVAR(hardcode_automatic, $1)=yes
  949. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  950. if test yes = "$lt_cv_ld_force_load"; then
  951. _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\"`'
  952. m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
  953. [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
  954. else
  955. _LT_TAGVAR(whole_archive_flag_spec, $1)=''
  956. fi
  957. _LT_TAGVAR(link_all_deplibs, $1)=yes
  958. _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
  959. case $cc_basename in
  960. ifort*|nagfor*) _lt_dar_can_shared=yes ;;
  961. *) _lt_dar_can_shared=$GCC ;;
  962. esac
  963. if test yes = "$_lt_dar_can_shared"; then
  964. output_verbose_link_cmd=func_echo_all
  965. _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"
  966. _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
  967. _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"
  968. _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"
  969. m4_if([$1], [CXX],
  970. [ if test yes != "$lt_cv_apple_cc_single_mod"; then
  971. _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"
  972. _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"
  973. fi
  974. ],[])
  975. else
  976. _LT_TAGVAR(ld_shlibs, $1)=no
  977. fi
  978. ])
  979. # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
  980. # ----------------------------------
  981. # Links a minimal program and checks the executable
  982. # for the system default hardcoded library path. In most cases,
  983. # this is /usr/lib:/lib, but when the MPI compilers are used
  984. # the location of the communication and MPI libs are included too.
  985. # If we don't find anything, use the default library path according
  986. # to the aix ld manual.
  987. # Store the results from the different compilers for each TAGNAME.
  988. # Allow to override them for all tags through lt_cv_aix_libpath.
  989. m4_defun([_LT_SYS_MODULE_PATH_AIX],
  990. [m4_require([_LT_DECL_SED])dnl
  991. if test set = "${lt_cv_aix_libpath+set}"; then
  992. aix_libpath=$lt_cv_aix_libpath
  993. else
  994. AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
  995. [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
  996. lt_aix_libpath_sed='[
  997. /Import File Strings/,/^$/ {
  998. /^0/ {
  999. s/^0 *\([^ ]*\) *$/\1/
  1000. p
  1001. }
  1002. }]'
  1003. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  1004. # Check for a 64-bit object if we didn't find anything.
  1005. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
  1006. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  1007. fi],[])
  1008. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
  1009. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
  1010. fi
  1011. ])
  1012. aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
  1013. fi
  1014. ])# _LT_SYS_MODULE_PATH_AIX
  1015. # _LT_SHELL_INIT(ARG)
  1016. # -------------------
  1017. m4_define([_LT_SHELL_INIT],
  1018. [m4_divert_text([M4SH-INIT], [$1
  1019. ])])# _LT_SHELL_INIT
  1020. # _LT_PROG_ECHO_BACKSLASH
  1021. # -----------------------
  1022. # Find how we can fake an echo command that does not interpret backslash.
  1023. # In particular, with Autoconf 2.60 or later we add some code to the start
  1024. # of the generated configure script that will find a shell with a builtin
  1025. # printf (that we can use as an echo command).
  1026. m4_defun([_LT_PROG_ECHO_BACKSLASH],
  1027. [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  1028. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  1029. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  1030. AC_MSG_CHECKING([how to print strings])
  1031. # Test print first, because it will be a builtin if present.
  1032. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
  1033. test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
  1034. ECHO='print -r --'
  1035. elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
  1036. ECHO='printf %s\n'
  1037. else
  1038. # Use this function as a fallback that always works.
  1039. func_fallback_echo ()
  1040. {
  1041. eval 'cat <<_LTECHO_EOF
  1042. $[]1
  1043. _LTECHO_EOF'
  1044. }
  1045. ECHO='func_fallback_echo'
  1046. fi
  1047. # func_echo_all arg...
  1048. # Invoke $ECHO with all args, space-separated.
  1049. func_echo_all ()
  1050. {
  1051. $ECHO "$*"
  1052. }
  1053. case $ECHO in
  1054. printf*) AC_MSG_RESULT([printf]) ;;
  1055. print*) AC_MSG_RESULT([print -r]) ;;
  1056. *) AC_MSG_RESULT([cat]) ;;
  1057. esac
  1058. m4_ifdef([_AS_DETECT_SUGGESTED],
  1059. [_AS_DETECT_SUGGESTED([
  1060. test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
  1061. ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  1062. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  1063. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  1064. PATH=/empty FPATH=/empty; export PATH FPATH
  1065. test "X`printf %s $ECHO`" = "X$ECHO" \
  1066. || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
  1067. _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
  1068. _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
  1069. ])# _LT_PROG_ECHO_BACKSLASH
  1070. # _LT_WITH_SYSROOT
  1071. # ----------------
  1072. AC_DEFUN([_LT_WITH_SYSROOT],
  1073. [AC_MSG_CHECKING([for sysroot])
  1074. AC_ARG_WITH([sysroot],
  1075. [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
  1076. [Search for dependent libraries within DIR (or the compiler's sysroot
  1077. if not specified).])],
  1078. [], [with_sysroot=no])
  1079. dnl lt_sysroot will always be passed unquoted. We quote it here
  1080. dnl in case the user passed a directory name.
  1081. lt_sysroot=
  1082. case $with_sysroot in #(
  1083. yes)
  1084. if test yes = "$GCC"; then
  1085. lt_sysroot=`$CC --print-sysroot 2>/dev/null`
  1086. fi
  1087. ;; #(
  1088. /*)
  1089. lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
  1090. ;; #(
  1091. no|'')
  1092. ;; #(
  1093. *)
  1094. AC_MSG_RESULT([$with_sysroot])
  1095. AC_MSG_ERROR([The sysroot must be an absolute path.])
  1096. ;;
  1097. esac
  1098. AC_MSG_RESULT([${lt_sysroot:-no}])
  1099. _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
  1100. [dependent libraries, and where our libraries should be installed.])])
  1101. # _LT_ENABLE_LOCK
  1102. # ---------------
  1103. m4_defun([_LT_ENABLE_LOCK],
  1104. [AC_ARG_ENABLE([libtool-lock],
  1105. [AS_HELP_STRING([--disable-libtool-lock],
  1106. [avoid locking (might break parallel builds)])])
  1107. test no = "$enable_libtool_lock" || enable_libtool_lock=yes
  1108. # Some flags need to be propagated to the compiler or linker for good
  1109. # libtool support.
  1110. case $host in
  1111. ia64-*-hpux*)
  1112. # Find out what ABI is being produced by ac_compile, and set mode
  1113. # options accordingly.
  1114. echo 'int i;' > conftest.$ac_ext
  1115. if AC_TRY_EVAL(ac_compile); then
  1116. case `/usr/bin/file conftest.$ac_objext` in
  1117. *ELF-32*)
  1118. HPUX_IA64_MODE=32
  1119. ;;
  1120. *ELF-64*)
  1121. HPUX_IA64_MODE=64
  1122. ;;
  1123. esac
  1124. fi
  1125. rm -rf conftest*
  1126. ;;
  1127. *-*-irix6*)
  1128. # Find out what ABI is being produced by ac_compile, and set linker
  1129. # options accordingly.
  1130. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
  1131. if AC_TRY_EVAL(ac_compile); then
  1132. if test yes = "$lt_cv_prog_gnu_ld"; then
  1133. case `/usr/bin/file conftest.$ac_objext` in
  1134. *32-bit*)
  1135. LD="${LD-ld} -melf32bsmip"
  1136. ;;
  1137. *N32*)
  1138. LD="${LD-ld} -melf32bmipn32"
  1139. ;;
  1140. *64-bit*)
  1141. LD="${LD-ld} -melf64bmip"
  1142. ;;
  1143. esac
  1144. else
  1145. case `/usr/bin/file conftest.$ac_objext` in
  1146. *32-bit*)
  1147. LD="${LD-ld} -32"
  1148. ;;
  1149. *N32*)
  1150. LD="${LD-ld} -n32"
  1151. ;;
  1152. *64-bit*)
  1153. LD="${LD-ld} -64"
  1154. ;;
  1155. esac
  1156. fi
  1157. fi
  1158. rm -rf conftest*
  1159. ;;
  1160. mips64*-*linux*)
  1161. # Find out what ABI is being produced by ac_compile, and set linker
  1162. # options accordingly.
  1163. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
  1164. if AC_TRY_EVAL(ac_compile); then
  1165. emul=elf
  1166. case `/usr/bin/file conftest.$ac_objext` in
  1167. *32-bit*)
  1168. emul="${emul}32"
  1169. ;;
  1170. *64-bit*)
  1171. emul="${emul}64"
  1172. ;;
  1173. esac
  1174. case `/usr/bin/file conftest.$ac_objext` in
  1175. *MSB*)
  1176. emul="${emul}btsmip"
  1177. ;;
  1178. *LSB*)
  1179. emul="${emul}ltsmip"
  1180. ;;
  1181. esac
  1182. case `/usr/bin/file conftest.$ac_objext` in
  1183. *N32*)
  1184. emul="${emul}n32"
  1185. ;;
  1186. esac
  1187. LD="${LD-ld} -m $emul"
  1188. fi
  1189. rm -rf conftest*
  1190. ;;
  1191. x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
  1192. s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
  1193. # Find out what ABI is being produced by ac_compile, and set linker
  1194. # options accordingly. Note that the listed cases only cover the
  1195. # situations where additional linker options are needed (such as when
  1196. # doing 32-bit compilation for a host where ld defaults to 64-bit, or
  1197. # vice versa); the common cases where no linker options are needed do
  1198. # not appear in the list.
  1199. echo 'int i;' > conftest.$ac_ext
  1200. if AC_TRY_EVAL(ac_compile); then
  1201. case `/usr/bin/file conftest.o` in
  1202. *32-bit*)
  1203. case $host in
  1204. x86_64-*kfreebsd*-gnu)
  1205. LD="${LD-ld} -m elf_i386_fbsd"
  1206. ;;
  1207. x86_64-*linux*)
  1208. case `/usr/bin/file conftest.o` in
  1209. *x86-64*)
  1210. LD="${LD-ld} -m elf32_x86_64"
  1211. ;;
  1212. *)
  1213. LD="${LD-ld} -m elf_i386"
  1214. ;;
  1215. esac
  1216. ;;
  1217. powerpc64le-*linux*)
  1218. LD="${LD-ld} -m elf32lppclinux"
  1219. ;;
  1220. powerpc64-*linux*)
  1221. LD="${LD-ld} -m elf32ppclinux"
  1222. ;;
  1223. s390x-*linux*)
  1224. LD="${LD-ld} -m elf_s390"
  1225. ;;
  1226. sparc64-*linux*)
  1227. LD="${LD-ld} -m elf32_sparc"
  1228. ;;
  1229. esac
  1230. ;;
  1231. *64-bit*)
  1232. case $host in
  1233. x86_64-*kfreebsd*-gnu)
  1234. LD="${LD-ld} -m elf_x86_64_fbsd"
  1235. ;;
  1236. x86_64-*linux*)
  1237. LD="${LD-ld} -m elf_x86_64"
  1238. ;;
  1239. powerpcle-*linux*)
  1240. LD="${LD-ld} -m elf64lppc"
  1241. ;;
  1242. powerpc-*linux*)
  1243. LD="${LD-ld} -m elf64ppc"
  1244. ;;
  1245. s390*-*linux*|s390*-*tpf*)
  1246. LD="${LD-ld} -m elf64_s390"
  1247. ;;
  1248. sparc*-*linux*)
  1249. LD="${LD-ld} -m elf64_sparc"
  1250. ;;
  1251. esac
  1252. ;;
  1253. esac
  1254. fi
  1255. rm -rf conftest*
  1256. ;;
  1257. *-*-sco3.2v5*)
  1258. # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  1259. SAVE_CFLAGS=$CFLAGS
  1260. CFLAGS="$CFLAGS -belf"
  1261. AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
  1262. [AC_LANG_PUSH(C)
  1263. AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
  1264. AC_LANG_POP])
  1265. if test yes != "$lt_cv_cc_needs_belf"; then
  1266. # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  1267. CFLAGS=$SAVE_CFLAGS
  1268. fi
  1269. ;;
  1270. *-*solaris*)
  1271. # Find out what ABI is being produced by ac_compile, and set linker
  1272. # options accordingly.
  1273. echo 'int i;' > conftest.$ac_ext
  1274. if AC_TRY_EVAL(ac_compile); then
  1275. case `/usr/bin/file conftest.o` in
  1276. *64-bit*)
  1277. case $lt_cv_prog_gnu_ld in
  1278. yes*)
  1279. case $host in
  1280. i?86-*-solaris*|x86_64-*-solaris*)
  1281. LD="${LD-ld} -m elf_x86_64"
  1282. ;;
  1283. sparc*-*-solaris*)
  1284. LD="${LD-ld} -m elf64_sparc"
  1285. ;;
  1286. esac
  1287. # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
  1288. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
  1289. LD=${LD-ld}_sol2
  1290. fi
  1291. ;;
  1292. *)
  1293. if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
  1294. LD="${LD-ld} -64"
  1295. fi
  1296. ;;
  1297. esac
  1298. ;;
  1299. esac
  1300. fi
  1301. rm -rf conftest*
  1302. ;;
  1303. esac
  1304. need_locks=$enable_libtool_lock
  1305. ])# _LT_ENABLE_LOCK
  1306. # _LT_PROG_AR
  1307. # -----------
  1308. m4_defun([_LT_PROG_AR],
  1309. [AC_CHECK_TOOLS(AR, [ar], false)
  1310. : ${AR=ar}
  1311. : ${AR_FLAGS=cr}
  1312. _LT_DECL([], [AR], [1], [The archiver])
  1313. _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
  1314. AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
  1315. [lt_cv_ar_at_file=no
  1316. AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
  1317. [echo conftest.$ac_objext > conftest.lst
  1318. lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
  1319. AC_TRY_EVAL([lt_ar_try])
  1320. if test 0 -eq "$ac_status"; then
  1321. # Ensure the archiver fails upon bogus file names.
  1322. rm -f conftest.$ac_objext libconftest.a
  1323. AC_TRY_EVAL([lt_ar_try])
  1324. if test 0 -ne "$ac_status"; then
  1325. lt_cv_ar_at_file=@
  1326. fi
  1327. fi
  1328. rm -f conftest.* libconftest.a
  1329. ])
  1330. ])
  1331. if test no = "$lt_cv_ar_at_file"; then
  1332. archiver_list_spec=
  1333. else
  1334. archiver_list_spec=$lt_cv_ar_at_file
  1335. fi
  1336. _LT_DECL([], [archiver_list_spec], [1],
  1337. [How to feed a file listing to the archiver])
  1338. ])# _LT_PROG_AR
  1339. # _LT_CMD_OLD_ARCHIVE
  1340. # -------------------
  1341. m4_defun([_LT_CMD_OLD_ARCHIVE],
  1342. [_LT_PROG_AR
  1343. AC_CHECK_TOOL(STRIP, strip, :)
  1344. test -z "$STRIP" && STRIP=:
  1345. _LT_DECL([], [STRIP], [1], [A symbol stripping program])
  1346. AC_CHECK_TOOL(RANLIB, ranlib, :)
  1347. test -z "$RANLIB" && RANLIB=:
  1348. _LT_DECL([], [RANLIB], [1],
  1349. [Commands used to install an old-style archive])
  1350. # Determine commands to create old-style static archives.
  1351. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
  1352. old_postinstall_cmds='chmod 644 $oldlib'
  1353. old_postuninstall_cmds=
  1354. if test -n "$RANLIB"; then
  1355. case $host_os in
  1356. bitrig* | openbsd*)
  1357. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
  1358. ;;
  1359. *)
  1360. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
  1361. ;;
  1362. esac
  1363. old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
  1364. fi
  1365. case $host_os in
  1366. darwin*)
  1367. lock_old_archive_extraction=yes ;;
  1368. *)
  1369. lock_old_archive_extraction=no ;;
  1370. esac
  1371. _LT_DECL([], [old_postinstall_cmds], [2])
  1372. _LT_DECL([], [old_postuninstall_cmds], [2])
  1373. _LT_TAGDECL([], [old_archive_cmds], [2],
  1374. [Commands used to build an old-style archive])
  1375. _LT_DECL([], [lock_old_archive_extraction], [0],
  1376. [Whether to use a lock for old archive extraction])
  1377. ])# _LT_CMD_OLD_ARCHIVE
  1378. # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  1379. # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
  1380. # ----------------------------------------------------------------
  1381. # Check whether the given compiler option works
  1382. AC_DEFUN([_LT_COMPILER_OPTION],
  1383. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1384. m4_require([_LT_DECL_SED])dnl
  1385. AC_CACHE_CHECK([$1], [$2],
  1386. [$2=no
  1387. m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
  1388. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  1389. lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment
  1390. # Insert the option either (1) after the last *FLAGS variable, or
  1391. # (2) before a word containing "conftest.", or (3) at the end.
  1392. # Note that $ac_compile itself does not contain backslashes and begins
  1393. # with a dollar sign (not a hyphen), so the echo should work correctly.
  1394. # The option is referenced via a variable to avoid confusing sed.
  1395. lt_compile=`echo "$ac_compile" | $SED \
  1396. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  1397. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  1398. -e 's:$: $lt_compiler_flag:'`
  1399. (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  1400. (eval "$lt_compile" 2>conftest.err)
  1401. ac_status=$?
  1402. cat conftest.err >&AS_MESSAGE_LOG_FD
  1403. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  1404. if (exit $ac_status) && test -s "$ac_outfile"; then
  1405. # The compiler can only warn and ignore the option if not recognized
  1406. # So say no if there are warnings other than the usual output.
  1407. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
  1408. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  1409. if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
  1410. $2=yes
  1411. fi
  1412. fi
  1413. $RM conftest*
  1414. ])
  1415. if test yes = "[$]$2"; then
  1416. m4_if([$5], , :, [$5])
  1417. else
  1418. m4_if([$6], , :, [$6])
  1419. fi
  1420. ])# _LT_COMPILER_OPTION
  1421. # Old name:
  1422. AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
  1423. dnl aclocal-1.4 backwards compatibility:
  1424. dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
  1425. # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  1426. # [ACTION-SUCCESS], [ACTION-FAILURE])
  1427. # ----------------------------------------------------
  1428. # Check whether the given linker option works
  1429. AC_DEFUN([_LT_LINKER_OPTION],
  1430. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1431. m4_require([_LT_DECL_SED])dnl
  1432. AC_CACHE_CHECK([$1], [$2],
  1433. [$2=no
  1434. save_LDFLAGS=$LDFLAGS
  1435. LDFLAGS="$LDFLAGS $3"
  1436. echo "$lt_simple_link_test_code" > conftest.$ac_ext
  1437. if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
  1438. # The linker can only warn and ignore the option if not recognized
  1439. # So say no if there are warnings
  1440. if test -s conftest.err; then
  1441. # Append any errors to the config.log.
  1442. cat conftest.err 1>&AS_MESSAGE_LOG_FD
  1443. $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
  1444. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  1445. if diff conftest.exp conftest.er2 >/dev/null; then
  1446. $2=yes
  1447. fi
  1448. else
  1449. $2=yes
  1450. fi
  1451. fi
  1452. $RM -r conftest*
  1453. LDFLAGS=$save_LDFLAGS
  1454. ])
  1455. if test yes = "[$]$2"; then
  1456. m4_if([$4], , :, [$4])
  1457. else
  1458. m4_if([$5], , :, [$5])
  1459. fi
  1460. ])# _LT_LINKER_OPTION
  1461. # Old name:
  1462. AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
  1463. dnl aclocal-1.4 backwards compatibility:
  1464. dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
  1465. # LT_CMD_MAX_LEN
  1466. #---------------
  1467. AC_DEFUN([LT_CMD_MAX_LEN],
  1468. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  1469. # find the maximum length of command line arguments
  1470. AC_MSG_CHECKING([the maximum length of command line arguments])
  1471. AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
  1472. i=0
  1473. teststring=ABCD
  1474. case $build_os in
  1475. msdosdjgpp*)
  1476. # On DJGPP, this test can blow up pretty badly due to problems in libc
  1477. # (any single argument exceeding 2000 bytes causes a buffer overrun
  1478. # during glob expansion). Even if it were fixed, the result of this
  1479. # check would be larger than it should be.
  1480. lt_cv_sys_max_cmd_len=12288; # 12K is about right
  1481. ;;
  1482. gnu*)
  1483. # Under GNU Hurd, this test is not required because there is
  1484. # no limit to the length of command line arguments.
  1485. # Libtool will interpret -1 as no limit whatsoever
  1486. lt_cv_sys_max_cmd_len=-1;
  1487. ;;
  1488. cygwin* | mingw* | cegcc*)
  1489. # On Win9x/ME, this test blows up -- it succeeds, but takes
  1490. # about 5 minutes as the teststring grows exponentially.
  1491. # Worse, since 9x/ME are not pre-emptively multitasking,
  1492. # you end up with a "frozen" computer, even though with patience
  1493. # the test eventually succeeds (with a max line length of 256k).
  1494. # Instead, let's just punt: use the minimum linelength reported by
  1495. # all of the supported platforms: 8192 (on NT/2K/XP).
  1496. lt_cv_sys_max_cmd_len=8192;
  1497. ;;
  1498. mint*)
  1499. # On MiNT this can take a long time and run out of memory.
  1500. lt_cv_sys_max_cmd_len=8192;
  1501. ;;
  1502. amigaos*)
  1503. # On AmigaOS with pdksh, this test takes hours, literally.
  1504. # So we just punt and use a minimum line length of 8192.
  1505. lt_cv_sys_max_cmd_len=8192;
  1506. ;;
  1507. bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
  1508. # This has been around since 386BSD, at least. Likely further.
  1509. if test -x /sbin/sysctl; then
  1510. lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
  1511. elif test -x /usr/sbin/sysctl; then
  1512. lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
  1513. else
  1514. lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
  1515. fi
  1516. # And add a safety zone
  1517. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  1518. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  1519. ;;
  1520. interix*)
  1521. # We know the value 262144 and hardcode it with a safety zone (like BSD)
  1522. lt_cv_sys_max_cmd_len=196608
  1523. ;;
  1524. os2*)
  1525. # The test takes a long time on OS/2.
  1526. lt_cv_sys_max_cmd_len=8192
  1527. ;;
  1528. osf*)
  1529. # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
  1530. # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
  1531. # nice to cause kernel panics so lets avoid the loop below.
  1532. # First set a reasonable default.
  1533. lt_cv_sys_max_cmd_len=16384
  1534. #
  1535. if test -x /sbin/sysconfig; then
  1536. case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
  1537. *1*) lt_cv_sys_max_cmd_len=-1 ;;
  1538. esac
  1539. fi
  1540. ;;
  1541. sco3.2v5*)
  1542. lt_cv_sys_max_cmd_len=102400
  1543. ;;
  1544. sysv5* | sco5v6* | sysv4.2uw2*)
  1545. kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
  1546. if test -n "$kargmax"; then
  1547. lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
  1548. else
  1549. lt_cv_sys_max_cmd_len=32768
  1550. fi
  1551. ;;
  1552. *)
  1553. lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
  1554. if test -n "$lt_cv_sys_max_cmd_len" && \
  1555. test undefined != "$lt_cv_sys_max_cmd_len"; then
  1556. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  1557. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  1558. else
  1559. # Make teststring a little bigger before we do anything with it.
  1560. # a 1K string should be a reasonable start.
  1561. for i in 1 2 3 4 5 6 7 8; do
  1562. teststring=$teststring$teststring
  1563. done
  1564. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
  1565. # If test is not a shell built-in, we'll probably end up computing a
  1566. # maximum length that is only half of the actual maximum length, but
  1567. # we can't tell.
  1568. while { test X`env echo "$teststring$teststring" 2>/dev/null` \
  1569. = "X$teststring$teststring"; } >/dev/null 2>&1 &&
  1570. test 17 != "$i" # 1/2 MB should be enough
  1571. do
  1572. i=`expr $i + 1`
  1573. teststring=$teststring$teststring
  1574. done
  1575. # Only check the string length outside the loop.
  1576. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
  1577. teststring=
  1578. # Add a significant safety factor because C++ compilers can tack on
  1579. # massive amounts of additional arguments before passing them to the
  1580. # linker. It appears as though 1/2 is a usable value.
  1581. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
  1582. fi
  1583. ;;
  1584. esac
  1585. ])
  1586. if test -n "$lt_cv_sys_max_cmd_len"; then
  1587. AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
  1588. else
  1589. AC_MSG_RESULT(none)
  1590. fi
  1591. max_cmd_len=$lt_cv_sys_max_cmd_len
  1592. _LT_DECL([], [max_cmd_len], [0],
  1593. [What is the maximum length of a command?])
  1594. ])# LT_CMD_MAX_LEN
  1595. # Old name:
  1596. AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
  1597. dnl aclocal-1.4 backwards compatibility:
  1598. dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
  1599. # _LT_HEADER_DLFCN
  1600. # ----------------
  1601. m4_defun([_LT_HEADER_DLFCN],
  1602. [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
  1603. ])# _LT_HEADER_DLFCN
  1604. # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
  1605. # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
  1606. # ----------------------------------------------------------------
  1607. m4_defun([_LT_TRY_DLOPEN_SELF],
  1608. [m4_require([_LT_HEADER_DLFCN])dnl
  1609. if test yes = "$cross_compiling"; then :
  1610. [$4]
  1611. else
  1612. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  1613. lt_status=$lt_dlunknown
  1614. cat > conftest.$ac_ext <<_LT_EOF
  1615. [#line $LINENO "configure"
  1616. #include "confdefs.h"
  1617. #if HAVE_DLFCN_H
  1618. #include <dlfcn.h>
  1619. #endif
  1620. #include <stdio.h>
  1621. #ifdef RTLD_GLOBAL
  1622. # define LT_DLGLOBAL RTLD_GLOBAL
  1623. #else
  1624. # ifdef DL_GLOBAL
  1625. # define LT_DLGLOBAL DL_GLOBAL
  1626. # else
  1627. # define LT_DLGLOBAL 0
  1628. # endif
  1629. #endif
  1630. /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
  1631. find out it does not work in some platform. */
  1632. #ifndef LT_DLLAZY_OR_NOW
  1633. # ifdef RTLD_LAZY
  1634. # define LT_DLLAZY_OR_NOW RTLD_LAZY
  1635. # else
  1636. # ifdef DL_LAZY
  1637. # define LT_DLLAZY_OR_NOW DL_LAZY
  1638. # else
  1639. # ifdef RTLD_NOW
  1640. # define LT_DLLAZY_OR_NOW RTLD_NOW
  1641. # else
  1642. # ifdef DL_NOW
  1643. # define LT_DLLAZY_OR_NOW DL_NOW
  1644. # else
  1645. # define LT_DLLAZY_OR_NOW 0
  1646. # endif
  1647. # endif
  1648. # endif
  1649. # endif
  1650. #endif
  1651. /* When -fvisibility=hidden is used, assume the code has been annotated
  1652. correspondingly for the symbols needed. */
  1653. #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
  1654. int fnord () __attribute__((visibility("default")));
  1655. #endif
  1656. int fnord () { return 42; }
  1657. int main ()
  1658. {
  1659. void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  1660. int status = $lt_dlunknown;
  1661. if (self)
  1662. {
  1663. if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
  1664. else
  1665. {
  1666. if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
  1667. else puts (dlerror ());
  1668. }
  1669. /* dlclose (self); */
  1670. }
  1671. else
  1672. puts (dlerror ());
  1673. return status;
  1674. }]
  1675. _LT_EOF
  1676. if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
  1677. (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
  1678. lt_status=$?
  1679. case x$lt_status in
  1680. x$lt_dlno_uscore) $1 ;;
  1681. x$lt_dlneed_uscore) $2 ;;
  1682. x$lt_dlunknown|x*) $3 ;;
  1683. esac
  1684. else :
  1685. # compilation failed
  1686. $3
  1687. fi
  1688. fi
  1689. rm -fr conftest*
  1690. ])# _LT_TRY_DLOPEN_SELF
  1691. # LT_SYS_DLOPEN_SELF
  1692. # ------------------
  1693. AC_DEFUN([LT_SYS_DLOPEN_SELF],
  1694. [m4_require([_LT_HEADER_DLFCN])dnl
  1695. if test yes != "$enable_dlopen"; then
  1696. enable_dlopen=unknown
  1697. enable_dlopen_self=unknown
  1698. enable_dlopen_self_static=unknown
  1699. else
  1700. lt_cv_dlopen=no
  1701. lt_cv_dlopen_libs=
  1702. case $host_os in
  1703. beos*)
  1704. lt_cv_dlopen=load_add_on
  1705. lt_cv_dlopen_libs=
  1706. lt_cv_dlopen_self=yes
  1707. ;;
  1708. mingw* | pw32* | cegcc*)
  1709. lt_cv_dlopen=LoadLibrary
  1710. lt_cv_dlopen_libs=
  1711. ;;
  1712. cygwin*)
  1713. lt_cv_dlopen=dlopen
  1714. lt_cv_dlopen_libs=
  1715. ;;
  1716. darwin*)
  1717. # if libdl is installed we need to link against it
  1718. AC_CHECK_LIB([dl], [dlopen],
  1719. [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
  1720. lt_cv_dlopen=dyld
  1721. lt_cv_dlopen_libs=
  1722. lt_cv_dlopen_self=yes
  1723. ])
  1724. ;;
  1725. tpf*)
  1726. # Don't try to run any link tests for TPF. We know it's impossible
  1727. # because TPF is a cross-compiler, and we know how we open DSOs.
  1728. lt_cv_dlopen=dlopen
  1729. lt_cv_dlopen_libs=
  1730. lt_cv_dlopen_self=no
  1731. ;;
  1732. *)
  1733. AC_CHECK_FUNC([shl_load],
  1734. [lt_cv_dlopen=shl_load],
  1735. [AC_CHECK_LIB([dld], [shl_load],
  1736. [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
  1737. [AC_CHECK_FUNC([dlopen],
  1738. [lt_cv_dlopen=dlopen],
  1739. [AC_CHECK_LIB([dl], [dlopen],
  1740. [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
  1741. [AC_CHECK_LIB([svld], [dlopen],
  1742. [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
  1743. [AC_CHECK_LIB([dld], [dld_link],
  1744. [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
  1745. ])
  1746. ])
  1747. ])
  1748. ])
  1749. ])
  1750. ;;
  1751. esac
  1752. if test no = "$lt_cv_dlopen"; then
  1753. enable_dlopen=no
  1754. else
  1755. enable_dlopen=yes
  1756. fi
  1757. case $lt_cv_dlopen in
  1758. dlopen)
  1759. save_CPPFLAGS=$CPPFLAGS
  1760. test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  1761. save_LDFLAGS=$LDFLAGS
  1762. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  1763. save_LIBS=$LIBS
  1764. LIBS="$lt_cv_dlopen_libs $LIBS"
  1765. AC_CACHE_CHECK([whether a program can dlopen itself],
  1766. lt_cv_dlopen_self, [dnl
  1767. _LT_TRY_DLOPEN_SELF(
  1768. lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
  1769. lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
  1770. ])
  1771. if test yes = "$lt_cv_dlopen_self"; then
  1772. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
  1773. AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
  1774. lt_cv_dlopen_self_static, [dnl
  1775. _LT_TRY_DLOPEN_SELF(
  1776. lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
  1777. lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
  1778. ])
  1779. fi
  1780. CPPFLAGS=$save_CPPFLAGS
  1781. LDFLAGS=$save_LDFLAGS
  1782. LIBS=$save_LIBS
  1783. ;;
  1784. esac
  1785. case $lt_cv_dlopen_self in
  1786. yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  1787. *) enable_dlopen_self=unknown ;;
  1788. esac
  1789. case $lt_cv_dlopen_self_static in
  1790. yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  1791. *) enable_dlopen_self_static=unknown ;;
  1792. esac
  1793. fi
  1794. _LT_DECL([dlopen_support], [enable_dlopen], [0],
  1795. [Whether dlopen is supported])
  1796. _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
  1797. [Whether dlopen of programs is supported])
  1798. _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
  1799. [Whether dlopen of statically linked programs is supported])
  1800. ])# LT_SYS_DLOPEN_SELF
  1801. # Old name:
  1802. AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
  1803. dnl aclocal-1.4 backwards compatibility:
  1804. dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
  1805. # _LT_COMPILER_C_O([TAGNAME])
  1806. # ---------------------------
  1807. # Check to see if options -c and -o are simultaneously supported by compiler.
  1808. # This macro does not hard code the compiler like AC_PROG_CC_C_O.
  1809. m4_defun([_LT_COMPILER_C_O],
  1810. [m4_require([_LT_DECL_SED])dnl
  1811. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1812. m4_require([_LT_TAG_COMPILER])dnl
  1813. AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
  1814. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
  1815. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
  1816. $RM -r conftest 2>/dev/null
  1817. mkdir conftest
  1818. cd conftest
  1819. mkdir out
  1820. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  1821. lt_compiler_flag="-o out/conftest2.$ac_objext"
  1822. # Insert the option either (1) after the last *FLAGS variable, or
  1823. # (2) before a word containing "conftest.", or (3) at the end.
  1824. # Note that $ac_compile itself does not contain backslashes and begins
  1825. # with a dollar sign (not a hyphen), so the echo should work correctly.
  1826. lt_compile=`echo "$ac_compile" | $SED \
  1827. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  1828. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  1829. -e 's:$: $lt_compiler_flag:'`
  1830. (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  1831. (eval "$lt_compile" 2>out/conftest.err)
  1832. ac_status=$?
  1833. cat out/conftest.err >&AS_MESSAGE_LOG_FD
  1834. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  1835. if (exit $ac_status) && test -s out/conftest2.$ac_objext
  1836. then
  1837. # The compiler can only warn and ignore the option if not recognized
  1838. # So say no if there are warnings
  1839. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
  1840. $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
  1841. if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
  1842. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  1843. fi
  1844. fi
  1845. chmod u+w . 2>&AS_MESSAGE_LOG_FD
  1846. $RM conftest*
  1847. # SGI C++ compiler will create directory out/ii_files/ for
  1848. # template instantiation
  1849. test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
  1850. $RM out/* && rmdir out
  1851. cd ..
  1852. $RM -r conftest
  1853. $RM conftest*
  1854. ])
  1855. _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
  1856. [Does compiler simultaneously support -c and -o options?])
  1857. ])# _LT_COMPILER_C_O
  1858. # _LT_COMPILER_FILE_LOCKS([TAGNAME])
  1859. # ----------------------------------
  1860. # Check to see if we can do hard links to lock some files if needed
  1861. m4_defun([_LT_COMPILER_FILE_LOCKS],
  1862. [m4_require([_LT_ENABLE_LOCK])dnl
  1863. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1864. _LT_COMPILER_C_O([$1])
  1865. hard_links=nottested
  1866. if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
  1867. # do not overwrite the value of need_locks provided by the user
  1868. AC_MSG_CHECKING([if we can lock with hard links])
  1869. hard_links=yes
  1870. $RM conftest*
  1871. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1872. touch conftest.a
  1873. ln conftest.a conftest.b 2>&5 || hard_links=no
  1874. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1875. AC_MSG_RESULT([$hard_links])
  1876. if test no = "$hard_links"; then
  1877. AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
  1878. need_locks=warn
  1879. fi
  1880. else
  1881. need_locks=no
  1882. fi
  1883. _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
  1884. ])# _LT_COMPILER_FILE_LOCKS
  1885. # _LT_CHECK_OBJDIR
  1886. # ----------------
  1887. m4_defun([_LT_CHECK_OBJDIR],
  1888. [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
  1889. [rm -f .libs 2>/dev/null
  1890. mkdir .libs 2>/dev/null
  1891. if test -d .libs; then
  1892. lt_cv_objdir=.libs
  1893. else
  1894. # MS-DOS does not allow filenames that begin with a dot.
  1895. lt_cv_objdir=_libs
  1896. fi
  1897. rmdir .libs 2>/dev/null])
  1898. objdir=$lt_cv_objdir
  1899. _LT_DECL([], [objdir], [0],
  1900. [The name of the directory that contains temporary libtool files])dnl
  1901. m4_pattern_allow([LT_OBJDIR])dnl
  1902. AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
  1903. [Define to the sub-directory where libtool stores uninstalled libraries.])
  1904. ])# _LT_CHECK_OBJDIR
  1905. # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
  1906. # --------------------------------------
  1907. # Check hardcoding attributes.
  1908. m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
  1909. [AC_MSG_CHECKING([how to hardcode library paths into programs])
  1910. _LT_TAGVAR(hardcode_action, $1)=
  1911. if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
  1912. test -n "$_LT_TAGVAR(runpath_var, $1)" ||
  1913. test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
  1914. # We can hardcode non-existent directories.
  1915. if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
  1916. # If the only mechanism to avoid hardcoding is shlibpath_var, we
  1917. # have to relink, otherwise we might link with an installed library
  1918. # when we should be linking with a yet-to-be-installed one
  1919. ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
  1920. test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
  1921. # Linking always hardcodes the temporary library directory.
  1922. _LT_TAGVAR(hardcode_action, $1)=relink
  1923. else
  1924. # We can link without hardcoding, and we can hardcode nonexisting dirs.
  1925. _LT_TAGVAR(hardcode_action, $1)=immediate
  1926. fi
  1927. else
  1928. # We cannot hardcode anything, or else we can only hardcode existing
  1929. # directories.
  1930. _LT_TAGVAR(hardcode_action, $1)=unsupported
  1931. fi
  1932. AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
  1933. if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
  1934. test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
  1935. # Fast installation is not supported
  1936. enable_fast_install=no
  1937. elif test yes = "$shlibpath_overrides_runpath" ||
  1938. test no = "$enable_shared"; then
  1939. # Fast installation is not necessary
  1940. enable_fast_install=needless
  1941. fi
  1942. _LT_TAGDECL([], [hardcode_action], [0],
  1943. [How to hardcode a shared library path into an executable])
  1944. ])# _LT_LINKER_HARDCODE_LIBPATH
  1945. # _LT_CMD_STRIPLIB
  1946. # ----------------
  1947. m4_defun([_LT_CMD_STRIPLIB],
  1948. [m4_require([_LT_DECL_EGREP])
  1949. striplib=
  1950. old_striplib=
  1951. AC_MSG_CHECKING([whether stripping libraries is possible])
  1952. if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
  1953. test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
  1954. test -z "$striplib" && striplib="$STRIP --strip-unneeded"
  1955. AC_MSG_RESULT([yes])
  1956. else
  1957. # FIXME - insert some real tests, host_os isn't really good enough
  1958. case $host_os in
  1959. darwin*)
  1960. if test -n "$STRIP"; then
  1961. striplib="$STRIP -x"
  1962. old_striplib="$STRIP -S"
  1963. AC_MSG_RESULT([yes])
  1964. else
  1965. AC_MSG_RESULT([no])
  1966. fi
  1967. ;;
  1968. *)
  1969. AC_MSG_RESULT([no])
  1970. ;;
  1971. esac
  1972. fi
  1973. _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
  1974. _LT_DECL([], [striplib], [1])
  1975. ])# _LT_CMD_STRIPLIB
  1976. # _LT_PREPARE_MUNGE_PATH_LIST
  1977. # ---------------------------
  1978. # Make sure func_munge_path_list() is defined correctly.
  1979. m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
  1980. [[# func_munge_path_list VARIABLE PATH
  1981. # -----------------------------------
  1982. # VARIABLE is name of variable containing _space_ separated list of
  1983. # directories to be munged by the contents of PATH, which is string
  1984. # having a format:
  1985. # "DIR[:DIR]:"
  1986. # string "DIR[ DIR]" will be prepended to VARIABLE
  1987. # ":DIR[:DIR]"
  1988. # string "DIR[ DIR]" will be appended to VARIABLE
  1989. # "DIRP[:DIRP]::[DIRA:]DIRA"
  1990. # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
  1991. # "DIRA[ DIRA]" will be appended to VARIABLE
  1992. # "DIR[:DIR]"
  1993. # VARIABLE will be replaced by "DIR[ DIR]"
  1994. func_munge_path_list ()
  1995. {
  1996. case x@S|@2 in
  1997. x)
  1998. ;;
  1999. *:)
  2000. eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
  2001. ;;
  2002. x:*)
  2003. eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
  2004. ;;
  2005. *::*)
  2006. eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
  2007. eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
  2008. ;;
  2009. *)
  2010. eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
  2011. ;;
  2012. esac
  2013. }
  2014. ]])# _LT_PREPARE_PATH_LIST
  2015. # _LT_SYS_DYNAMIC_LINKER([TAG])
  2016. # -----------------------------
  2017. # PORTME Fill in your ld.so characteristics
  2018. m4_defun([_LT_SYS_DYNAMIC_LINKER],
  2019. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2020. m4_require([_LT_DECL_EGREP])dnl
  2021. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  2022. m4_require([_LT_DECL_OBJDUMP])dnl
  2023. m4_require([_LT_DECL_SED])dnl
  2024. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  2025. m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
  2026. AC_MSG_CHECKING([dynamic linker characteristics])
  2027. m4_if([$1],
  2028. [], [
  2029. if test yes = "$GCC"; then
  2030. case $host_os in
  2031. darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
  2032. *) lt_awk_arg='/^libraries:/' ;;
  2033. esac
  2034. case $host_os in
  2035. mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
  2036. *) lt_sed_strip_eq='s|=/|/|g' ;;
  2037. esac
  2038. lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
  2039. case $lt_search_path_spec in
  2040. *\;*)
  2041. # if the path contains ";" then we assume it to be the separator
  2042. # otherwise default to the standard path separator (i.e. ":") - it is
  2043. # assumed that no part of a normal pathname contains ";" but that should
  2044. # okay in the real world where ";" in dirpaths is itself problematic.
  2045. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
  2046. ;;
  2047. *)
  2048. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
  2049. ;;
  2050. esac
  2051. # Ok, now we have the path, separated by spaces, we can step through it
  2052. # and add multilib dir if necessary...
  2053. lt_tmp_lt_search_path_spec=
  2054. lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
  2055. # ...but if some path component already ends with the multilib dir we assume
  2056. # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
  2057. case "$lt_multi_os_dir; $lt_search_path_spec " in
  2058. "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
  2059. lt_multi_os_dir=
  2060. ;;
  2061. esac
  2062. for lt_sys_path in $lt_search_path_spec; do
  2063. if test -d "$lt_sys_path$lt_multi_os_dir"; then
  2064. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
  2065. elif test -n "$lt_multi_os_dir"; then
  2066. test -d "$lt_sys_path" && \
  2067. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
  2068. fi
  2069. done
  2070. lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
  2071. BEGIN {RS = " "; FS = "/|\n";} {
  2072. lt_foo = "";
  2073. lt_count = 0;
  2074. for (lt_i = NF; lt_i > 0; lt_i--) {
  2075. if ($lt_i != "" && $lt_i != ".") {
  2076. if ($lt_i == "..") {
  2077. lt_count++;
  2078. } else {
  2079. if (lt_count == 0) {
  2080. lt_foo = "/" $lt_i lt_foo;
  2081. } else {
  2082. lt_count--;
  2083. }
  2084. }
  2085. }
  2086. }
  2087. if (lt_foo != "") { lt_freq[[lt_foo]]++; }
  2088. if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
  2089. }'`
  2090. # AWK program above erroneously prepends '/' to C:/dos/paths
  2091. # for these hosts.
  2092. case $host_os in
  2093. mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
  2094. $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
  2095. esac
  2096. sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
  2097. else
  2098. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  2099. fi])
  2100. library_names_spec=
  2101. libname_spec='lib$name'
  2102. soname_spec=
  2103. shrext_cmds=.so
  2104. postinstall_cmds=
  2105. postuninstall_cmds=
  2106. finish_cmds=
  2107. finish_eval=
  2108. shlibpath_var=
  2109. shlibpath_overrides_runpath=unknown
  2110. version_type=none
  2111. dynamic_linker="$host_os ld.so"
  2112. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  2113. need_lib_prefix=unknown
  2114. hardcode_into_libs=no
  2115. # when you set need_version to no, make sure it does not cause -set_version
  2116. # flags to be left without arguments
  2117. need_version=unknown
  2118. AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
  2119. [User-defined run-time library search path.])
  2120. case $host_os in
  2121. aix3*)
  2122. version_type=linux # correct to gnu/linux during the next big refactor
  2123. library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
  2124. shlibpath_var=LIBPATH
  2125. # AIX 3 has no versioning support, so we append a major version to the name.
  2126. soname_spec='$libname$release$shared_ext$major'
  2127. ;;
  2128. aix[[4-9]]*)
  2129. version_type=linux # correct to gnu/linux during the next big refactor
  2130. need_lib_prefix=no
  2131. need_version=no
  2132. hardcode_into_libs=yes
  2133. if test ia64 = "$host_cpu"; then
  2134. # AIX 5 supports IA64
  2135. library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
  2136. shlibpath_var=LD_LIBRARY_PATH
  2137. else
  2138. # With GCC up to 2.95.x, collect2 would create an import file
  2139. # for dependence libraries. The import file would start with
  2140. # the line '#! .'. This would cause the generated library to
  2141. # depend on '.', always an invalid library. This was fixed in
  2142. # development snapshots of GCC prior to 3.0.
  2143. case $host_os in
  2144. aix4 | aix4.[[01]] | aix4.[[01]].*)
  2145. if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
  2146. echo ' yes '
  2147. echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
  2148. :
  2149. else
  2150. can_build_shared=no
  2151. fi
  2152. ;;
  2153. esac
  2154. # Using Import Files as archive members, it is possible to support
  2155. # filename-based versioning of shared library archives on AIX. While
  2156. # this would work for both with and without runtime linking, it will
  2157. # prevent static linking of such archives. So we do filename-based
  2158. # shared library versioning with .so extension only, which is used
  2159. # when both runtime linking and shared linking is enabled.
  2160. # Unfortunately, runtime linking may impact performance, so we do
  2161. # not want this to be the default eventually. Also, we use the
  2162. # versioned .so libs for executables only if there is the -brtl
  2163. # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
  2164. # To allow for filename-based versioning support, we need to create
  2165. # libNAME.so.V as an archive file, containing:
  2166. # *) an Import File, referring to the versioned filename of the
  2167. # archive as well as the shared archive member, telling the
  2168. # bitwidth (32 or 64) of that shared object, and providing the
  2169. # list of exported symbols of that shared object, eventually
  2170. # decorated with the 'weak' keyword
  2171. # *) the shared object with the F_LOADONLY flag set, to really avoid
  2172. # it being seen by the linker.
  2173. # At run time we better use the real file rather than another symlink,
  2174. # but for link time we create the symlink libNAME.so -> libNAME.so.V
  2175. case $with_aix_soname,$aix_use_runtimelinking in
  2176. # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
  2177. # soname into executable. Probably we can add versioning support to
  2178. # collect2, so additional links can be useful in future.
  2179. aix,yes) # traditional libtool
  2180. dynamic_linker='AIX unversionable lib.so'
  2181. # If using run time linking (on AIX 4.2 or later) use lib<name>.so
  2182. # instead of lib<name>.a to let people know that these are not
  2183. # typical AIX shared libraries.
  2184. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2185. ;;
  2186. aix,no) # traditional AIX only
  2187. dynamic_linker='AIX lib.a[(]lib.so.V[)]'
  2188. # We preserve .a as extension for shared libraries through AIX4.2
  2189. # and later when we are not doing run time linking.
  2190. library_names_spec='$libname$release.a $libname.a'
  2191. soname_spec='$libname$release$shared_ext$major'
  2192. ;;
  2193. svr4,*) # full svr4 only
  2194. dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
  2195. library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
  2196. # We do not specify a path in Import Files, so LIBPATH fires.
  2197. shlibpath_overrides_runpath=yes
  2198. ;;
  2199. *,yes) # both, prefer svr4
  2200. dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
  2201. library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
  2202. # unpreferred sharedlib libNAME.a needs extra handling
  2203. postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
  2204. postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
  2205. # We do not specify a path in Import Files, so LIBPATH fires.
  2206. shlibpath_overrides_runpath=yes
  2207. ;;
  2208. *,no) # both, prefer aix
  2209. dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
  2210. library_names_spec='$libname$release.a $libname.a'
  2211. soname_spec='$libname$release$shared_ext$major'
  2212. # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
  2213. postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
  2214. postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
  2215. ;;
  2216. esac
  2217. shlibpath_var=LIBPATH
  2218. fi
  2219. ;;
  2220. amigaos*)
  2221. case $host_cpu in
  2222. powerpc)
  2223. # Since July 2007 AmigaOS4 officially supports .so libraries.
  2224. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
  2225. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2226. ;;
  2227. m68k)
  2228. library_names_spec='$libname.ixlibrary $libname.a'
  2229. # Create ${libname}_ixlibrary.a entries in /sys/libs.
  2230. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $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'
  2231. ;;
  2232. esac
  2233. ;;
  2234. beos*)
  2235. library_names_spec='$libname$shared_ext'
  2236. dynamic_linker="$host_os ld.so"
  2237. shlibpath_var=LIBRARY_PATH
  2238. ;;
  2239. bsdi[[45]]*)
  2240. version_type=linux # correct to gnu/linux during the next big refactor
  2241. need_version=no
  2242. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2243. soname_spec='$libname$release$shared_ext$major'
  2244. finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  2245. shlibpath_var=LD_LIBRARY_PATH
  2246. sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  2247. sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  2248. # the default ld.so.conf also contains /usr/contrib/lib and
  2249. # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  2250. # libtool to hard-code these into programs
  2251. ;;
  2252. cygwin* | mingw* | pw32* | cegcc*)
  2253. version_type=windows
  2254. shrext_cmds=.dll
  2255. need_version=no
  2256. need_lib_prefix=no
  2257. case $GCC,$cc_basename in
  2258. yes,*)
  2259. # gcc
  2260. library_names_spec='$libname.dll.a'
  2261. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  2262. postinstall_cmds='base_file=`basename \$file`~
  2263. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
  2264. dldir=$destdir/`dirname \$dlpath`~
  2265. test -d \$dldir || mkdir -p \$dldir~
  2266. $install_prog $dir/$dlname \$dldir/$dlname~
  2267. chmod a+x \$dldir/$dlname~
  2268. if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
  2269. eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
  2270. fi'
  2271. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  2272. dlpath=$dir/\$dldll~
  2273. $RM \$dlpath'
  2274. shlibpath_overrides_runpath=yes
  2275. case $host_os in
  2276. cygwin*)
  2277. # Cygwin DLLs use 'cyg' prefix rather than 'lib'
  2278. soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
  2279. m4_if([$1], [],[
  2280. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
  2281. ;;
  2282. mingw* | cegcc*)
  2283. # MinGW DLLs use traditional 'lib' prefix
  2284. soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
  2285. ;;
  2286. pw32*)
  2287. # pw32 DLLs use 'pw' prefix rather than 'lib'
  2288. library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
  2289. ;;
  2290. esac
  2291. dynamic_linker='Win32 ld.exe'
  2292. ;;
  2293. *,cl*)
  2294. # Native MSVC
  2295. libname_spec='$name'
  2296. soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
  2297. library_names_spec='$libname.dll.lib'
  2298. case $build_os in
  2299. mingw*)
  2300. sys_lib_search_path_spec=
  2301. lt_save_ifs=$IFS
  2302. IFS=';'
  2303. for lt_path in $LIB
  2304. do
  2305. IFS=$lt_save_ifs
  2306. # Let DOS variable expansion print the short 8.3 style file name.
  2307. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
  2308. sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
  2309. done
  2310. IFS=$lt_save_ifs
  2311. # Convert to MSYS style.
  2312. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
  2313. ;;
  2314. cygwin*)
  2315. # Convert to unix form, then to dos form, then back to unix form
  2316. # but this time dos style (no spaces!) so that the unix form looks
  2317. # like /cygdrive/c/PROGRA~1:/cygdr...
  2318. sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
  2319. sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
  2320. sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  2321. ;;
  2322. *)
  2323. sys_lib_search_path_spec=$LIB
  2324. if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
  2325. # It is most probably a Windows format PATH.
  2326. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  2327. else
  2328. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  2329. fi
  2330. # FIXME: find the short name or the path components, as spaces are
  2331. # common. (e.g. "Program Files" -> "PROGRA~1")
  2332. ;;
  2333. esac
  2334. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  2335. postinstall_cmds='base_file=`basename \$file`~
  2336. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
  2337. dldir=$destdir/`dirname \$dlpath`~
  2338. test -d \$dldir || mkdir -p \$dldir~
  2339. $install_prog $dir/$dlname \$dldir/$dlname'
  2340. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  2341. dlpath=$dir/\$dldll~
  2342. $RM \$dlpath'
  2343. shlibpath_overrides_runpath=yes
  2344. dynamic_linker='Win32 link.exe'
  2345. ;;
  2346. *)
  2347. # Assume MSVC wrapper
  2348. library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
  2349. dynamic_linker='Win32 ld.exe'
  2350. ;;
  2351. esac
  2352. # FIXME: first we should search . and the directory the executable is in
  2353. shlibpath_var=PATH
  2354. ;;
  2355. darwin* | rhapsody*)
  2356. dynamic_linker="$host_os dyld"
  2357. version_type=darwin
  2358. need_lib_prefix=no
  2359. need_version=no
  2360. library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
  2361. soname_spec='$libname$release$major$shared_ext'
  2362. shlibpath_overrides_runpath=yes
  2363. shlibpath_var=DYLD_LIBRARY_PATH
  2364. shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
  2365. m4_if([$1], [],[
  2366. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
  2367. sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
  2368. ;;
  2369. dgux*)
  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. shlibpath_var=LD_LIBRARY_PATH
  2376. ;;
  2377. freebsd* | dragonfly*)
  2378. # DragonFly does not have aout. When/if they implement a new
  2379. # versioning mechanism, adjust this.
  2380. if test -x /usr/bin/objformat; then
  2381. objformat=`/usr/bin/objformat`
  2382. else
  2383. case $host_os in
  2384. freebsd[[23]].*) objformat=aout ;;
  2385. *) objformat=elf ;;
  2386. esac
  2387. fi
  2388. version_type=freebsd-$objformat
  2389. case $version_type in
  2390. freebsd-elf*)
  2391. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2392. soname_spec='$libname$release$shared_ext$major'
  2393. need_version=no
  2394. need_lib_prefix=no
  2395. ;;
  2396. freebsd-*)
  2397. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  2398. need_version=yes
  2399. ;;
  2400. esac
  2401. shlibpath_var=LD_LIBRARY_PATH
  2402. case $host_os in
  2403. freebsd2.*)
  2404. shlibpath_overrides_runpath=yes
  2405. ;;
  2406. freebsd3.[[01]]* | freebsdelf3.[[01]]*)
  2407. shlibpath_overrides_runpath=yes
  2408. hardcode_into_libs=yes
  2409. ;;
  2410. freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
  2411. freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
  2412. shlibpath_overrides_runpath=no
  2413. hardcode_into_libs=yes
  2414. ;;
  2415. *) # from 4.6 on, and DragonFly
  2416. shlibpath_overrides_runpath=yes
  2417. hardcode_into_libs=yes
  2418. ;;
  2419. esac
  2420. ;;
  2421. haiku*)
  2422. version_type=linux # correct to gnu/linux during the next big refactor
  2423. need_lib_prefix=no
  2424. need_version=no
  2425. dynamic_linker="$host_os runtime_loader"
  2426. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2427. soname_spec='$libname$release$shared_ext$major'
  2428. shlibpath_var=LIBRARY_PATH
  2429. shlibpath_overrides_runpath=no
  2430. sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
  2431. hardcode_into_libs=yes
  2432. ;;
  2433. hpux9* | hpux10* | hpux11*)
  2434. # Give a soname corresponding to the major version so that dld.sl refuses to
  2435. # link against other versions.
  2436. version_type=sunos
  2437. need_lib_prefix=no
  2438. need_version=no
  2439. case $host_cpu in
  2440. ia64*)
  2441. shrext_cmds='.so'
  2442. hardcode_into_libs=yes
  2443. dynamic_linker="$host_os dld.so"
  2444. shlibpath_var=LD_LIBRARY_PATH
  2445. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  2446. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2447. soname_spec='$libname$release$shared_ext$major'
  2448. if test 32 = "$HPUX_IA64_MODE"; then
  2449. sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
  2450. sys_lib_dlsearch_path_spec=/usr/lib/hpux32
  2451. else
  2452. sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
  2453. sys_lib_dlsearch_path_spec=/usr/lib/hpux64
  2454. fi
  2455. ;;
  2456. hppa*64*)
  2457. shrext_cmds='.sl'
  2458. hardcode_into_libs=yes
  2459. dynamic_linker="$host_os dld.sl"
  2460. shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
  2461. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  2462. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2463. soname_spec='$libname$release$shared_ext$major'
  2464. sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
  2465. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2466. ;;
  2467. *)
  2468. shrext_cmds='.sl'
  2469. dynamic_linker="$host_os dld.sl"
  2470. shlibpath_var=SHLIB_PATH
  2471. shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  2472. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2473. soname_spec='$libname$release$shared_ext$major'
  2474. ;;
  2475. esac
  2476. # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
  2477. postinstall_cmds='chmod 555 $lib'
  2478. # or fails outright, so override atomically:
  2479. install_override_mode=555
  2480. ;;
  2481. interix[[3-9]]*)
  2482. version_type=linux # correct to gnu/linux during the next big refactor
  2483. need_lib_prefix=no
  2484. need_version=no
  2485. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2486. soname_spec='$libname$release$shared_ext$major'
  2487. dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
  2488. shlibpath_var=LD_LIBRARY_PATH
  2489. shlibpath_overrides_runpath=no
  2490. hardcode_into_libs=yes
  2491. ;;
  2492. irix5* | irix6* | nonstopux*)
  2493. case $host_os in
  2494. nonstopux*) version_type=nonstopux ;;
  2495. *)
  2496. if test yes = "$lt_cv_prog_gnu_ld"; then
  2497. version_type=linux # correct to gnu/linux during the next big refactor
  2498. else
  2499. version_type=irix
  2500. fi ;;
  2501. esac
  2502. need_lib_prefix=no
  2503. need_version=no
  2504. soname_spec='$libname$release$shared_ext$major'
  2505. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
  2506. case $host_os in
  2507. irix5* | nonstopux*)
  2508. libsuff= shlibsuff=
  2509. ;;
  2510. *)
  2511. case $LD in # libtool.m4 will add one of these switches to LD
  2512. *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
  2513. libsuff= shlibsuff= libmagic=32-bit;;
  2514. *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
  2515. libsuff=32 shlibsuff=N32 libmagic=N32;;
  2516. *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
  2517. libsuff=64 shlibsuff=64 libmagic=64-bit;;
  2518. *) libsuff= shlibsuff= libmagic=never-match;;
  2519. esac
  2520. ;;
  2521. esac
  2522. shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  2523. shlibpath_overrides_runpath=no
  2524. sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
  2525. sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
  2526. hardcode_into_libs=yes
  2527. ;;
  2528. # No shared lib support for Linux oldld, aout, or coff.
  2529. linux*oldld* | linux*aout* | linux*coff*)
  2530. dynamic_linker=no
  2531. ;;
  2532. linux*android*)
  2533. version_type=none # Android doesn't support versioned libraries.
  2534. need_lib_prefix=no
  2535. need_version=no
  2536. library_names_spec='$libname$release$shared_ext'
  2537. soname_spec='$libname$release$shared_ext'
  2538. finish_cmds=
  2539. shlibpath_var=LD_LIBRARY_PATH
  2540. shlibpath_overrides_runpath=yes
  2541. # This implies no fast_install, which is unacceptable.
  2542. # Some rework will be needed to allow for fast_install
  2543. # before this can be enabled.
  2544. hardcode_into_libs=yes
  2545. dynamic_linker='Android linker'
  2546. # Don't embed -rpath directories since the linker doesn't support them.
  2547. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  2548. ;;
  2549. # This must be glibc/ELF.
  2550. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  2551. version_type=linux # correct to gnu/linux during the next big refactor
  2552. need_lib_prefix=no
  2553. need_version=no
  2554. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2555. soname_spec='$libname$release$shared_ext$major'
  2556. finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  2557. shlibpath_var=LD_LIBRARY_PATH
  2558. shlibpath_overrides_runpath=no
  2559. # Some binutils ld are patched to set DT_RUNPATH
  2560. AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
  2561. [lt_cv_shlibpath_overrides_runpath=no
  2562. save_LDFLAGS=$LDFLAGS
  2563. save_libdir=$libdir
  2564. eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
  2565. LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
  2566. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  2567. [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
  2568. [lt_cv_shlibpath_overrides_runpath=yes])])
  2569. LDFLAGS=$save_LDFLAGS
  2570. libdir=$save_libdir
  2571. ])
  2572. shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
  2573. # This implies no fast_install, which is unacceptable.
  2574. # Some rework will be needed to allow for fast_install
  2575. # before this can be enabled.
  2576. hardcode_into_libs=yes
  2577. # Ideally, we could use ldconfig to report *all* directores which are
  2578. # searched for libraries, however this is still not possible. Aside from not
  2579. # being certain /sbin/ldconfig is available, command
  2580. # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
  2581. # even though it is searched at run-time. Try to do the best guess by
  2582. # appending ld.so.conf contents (and includes) to the search path.
  2583. if test -f /etc/ld.so.conf; then
  2584. 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' ' '`
  2585. sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
  2586. fi
  2587. # We used to test for /lib/ld.so.1 and disable shared libraries on
  2588. # powerpc, because MkLinux only supported shared libraries with the
  2589. # GNU dynamic linker. Since this was broken with cross compilers,
  2590. # most powerpc-linux boxes support dynamic linking these days and
  2591. # people can always --disable-shared, the test was removed, and we
  2592. # assume the GNU/Linux dynamic linker is in use.
  2593. dynamic_linker='GNU/Linux ld.so'
  2594. ;;
  2595. netbsdelf*-gnu)
  2596. version_type=linux
  2597. need_lib_prefix=no
  2598. need_version=no
  2599. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  2600. soname_spec='${libname}${release}${shared_ext}$major'
  2601. shlibpath_var=LD_LIBRARY_PATH
  2602. shlibpath_overrides_runpath=no
  2603. hardcode_into_libs=yes
  2604. dynamic_linker='NetBSD ld.elf_so'
  2605. ;;
  2606. netbsd*)
  2607. version_type=sunos
  2608. need_lib_prefix=no
  2609. need_version=no
  2610. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  2611. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  2612. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2613. dynamic_linker='NetBSD (a.out) ld.so'
  2614. else
  2615. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2616. soname_spec='$libname$release$shared_ext$major'
  2617. dynamic_linker='NetBSD ld.elf_so'
  2618. fi
  2619. shlibpath_var=LD_LIBRARY_PATH
  2620. shlibpath_overrides_runpath=yes
  2621. hardcode_into_libs=yes
  2622. ;;
  2623. newsos6)
  2624. version_type=linux # correct to gnu/linux during the next big refactor
  2625. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2626. shlibpath_var=LD_LIBRARY_PATH
  2627. shlibpath_overrides_runpath=yes
  2628. ;;
  2629. *nto* | *qnx*)
  2630. version_type=qnx
  2631. need_lib_prefix=no
  2632. need_version=no
  2633. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2634. soname_spec='$libname$release$shared_ext$major'
  2635. shlibpath_var=LD_LIBRARY_PATH
  2636. shlibpath_overrides_runpath=no
  2637. hardcode_into_libs=yes
  2638. dynamic_linker='ldqnx.so'
  2639. ;;
  2640. openbsd* | bitrig*)
  2641. version_type=sunos
  2642. sys_lib_dlsearch_path_spec=/usr/lib
  2643. need_lib_prefix=no
  2644. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
  2645. need_version=no
  2646. else
  2647. need_version=yes
  2648. fi
  2649. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  2650. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2651. shlibpath_var=LD_LIBRARY_PATH
  2652. shlibpath_overrides_runpath=yes
  2653. ;;
  2654. os2*)
  2655. libname_spec='$name'
  2656. version_type=windows
  2657. shrext_cmds=.dll
  2658. need_version=no
  2659. need_lib_prefix=no
  2660. # OS/2 can only load a DLL with a base name of 8 characters or less.
  2661. soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
  2662. v=$($ECHO $release$versuffix | tr -d .-);
  2663. n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
  2664. $ECHO $n$v`$shared_ext'
  2665. library_names_spec='${libname}_dll.$libext'
  2666. dynamic_linker='OS/2 ld.exe'
  2667. shlibpath_var=BEGINLIBPATH
  2668. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  2669. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2670. postinstall_cmds='base_file=`basename \$file`~
  2671. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
  2672. dldir=$destdir/`dirname \$dlpath`~
  2673. test -d \$dldir || mkdir -p \$dldir~
  2674. $install_prog $dir/$dlname \$dldir/$dlname~
  2675. chmod a+x \$dldir/$dlname~
  2676. if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
  2677. eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
  2678. fi'
  2679. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
  2680. dlpath=$dir/\$dldll~
  2681. $RM \$dlpath'
  2682. ;;
  2683. osf3* | osf4* | osf5*)
  2684. version_type=osf
  2685. need_lib_prefix=no
  2686. need_version=no
  2687. soname_spec='$libname$release$shared_ext$major'
  2688. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2689. shlibpath_var=LD_LIBRARY_PATH
  2690. sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  2691. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2692. ;;
  2693. rdos*)
  2694. dynamic_linker=no
  2695. ;;
  2696. solaris*)
  2697. version_type=linux # correct to gnu/linux during the next big refactor
  2698. need_lib_prefix=no
  2699. need_version=no
  2700. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2701. soname_spec='$libname$release$shared_ext$major'
  2702. shlibpath_var=LD_LIBRARY_PATH
  2703. shlibpath_overrides_runpath=yes
  2704. hardcode_into_libs=yes
  2705. # ldd complains unless libraries are executable
  2706. postinstall_cmds='chmod +x $lib'
  2707. ;;
  2708. sunos4*)
  2709. version_type=sunos
  2710. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  2711. finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  2712. shlibpath_var=LD_LIBRARY_PATH
  2713. shlibpath_overrides_runpath=yes
  2714. if test yes = "$with_gnu_ld"; then
  2715. need_lib_prefix=no
  2716. fi
  2717. need_version=yes
  2718. ;;
  2719. sysv4 | sysv4.3*)
  2720. version_type=linux # correct to gnu/linux during the next big refactor
  2721. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2722. soname_spec='$libname$release$shared_ext$major'
  2723. shlibpath_var=LD_LIBRARY_PATH
  2724. case $host_vendor in
  2725. sni)
  2726. shlibpath_overrides_runpath=no
  2727. need_lib_prefix=no
  2728. runpath_var=LD_RUN_PATH
  2729. ;;
  2730. siemens)
  2731. need_lib_prefix=no
  2732. ;;
  2733. motorola)
  2734. need_lib_prefix=no
  2735. need_version=no
  2736. shlibpath_overrides_runpath=no
  2737. sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  2738. ;;
  2739. esac
  2740. ;;
  2741. sysv4*MP*)
  2742. if test -d /usr/nec; then
  2743. version_type=linux # correct to gnu/linux during the next big refactor
  2744. library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
  2745. soname_spec='$libname$shared_ext.$major'
  2746. shlibpath_var=LD_LIBRARY_PATH
  2747. fi
  2748. ;;
  2749. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  2750. version_type=sco
  2751. need_lib_prefix=no
  2752. need_version=no
  2753. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
  2754. soname_spec='$libname$release$shared_ext$major'
  2755. shlibpath_var=LD_LIBRARY_PATH
  2756. shlibpath_overrides_runpath=yes
  2757. hardcode_into_libs=yes
  2758. if test yes = "$with_gnu_ld"; then
  2759. sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
  2760. else
  2761. sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
  2762. case $host_os in
  2763. sco3.2v5*)
  2764. sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
  2765. ;;
  2766. esac
  2767. fi
  2768. sys_lib_dlsearch_path_spec='/usr/lib'
  2769. ;;
  2770. tpf*)
  2771. # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
  2772. version_type=linux # correct to gnu/linux during the next big refactor
  2773. need_lib_prefix=no
  2774. need_version=no
  2775. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2776. shlibpath_var=LD_LIBRARY_PATH
  2777. shlibpath_overrides_runpath=no
  2778. hardcode_into_libs=yes
  2779. ;;
  2780. uts4*)
  2781. version_type=linux # correct to gnu/linux during the next big refactor
  2782. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2783. soname_spec='$libname$release$shared_ext$major'
  2784. shlibpath_var=LD_LIBRARY_PATH
  2785. ;;
  2786. *)
  2787. dynamic_linker=no
  2788. ;;
  2789. esac
  2790. AC_MSG_RESULT([$dynamic_linker])
  2791. test no = "$dynamic_linker" && can_build_shared=no
  2792. variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  2793. if test yes = "$GCC"; then
  2794. variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  2795. fi
  2796. if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
  2797. sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
  2798. fi
  2799. if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
  2800. sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
  2801. fi
  2802. # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
  2803. configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
  2804. # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
  2805. func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
  2806. # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
  2807. configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
  2808. _LT_DECL([], [variables_saved_for_relink], [1],
  2809. [Variables whose values should be saved in libtool wrapper scripts and
  2810. restored at link time])
  2811. _LT_DECL([], [need_lib_prefix], [0],
  2812. [Do we need the "lib" prefix for modules?])
  2813. _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
  2814. _LT_DECL([], [version_type], [0], [Library versioning type])
  2815. _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
  2816. _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
  2817. _LT_DECL([], [shlibpath_overrides_runpath], [0],
  2818. [Is shlibpath searched before the hard-coded library search path?])
  2819. _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
  2820. _LT_DECL([], [library_names_spec], [1],
  2821. [[List of archive names. First name is the real one, the rest are links.
  2822. The last name is the one that the linker finds with -lNAME]])
  2823. _LT_DECL([], [soname_spec], [1],
  2824. [[The coded name of the library, if different from the real name]])
  2825. _LT_DECL([], [install_override_mode], [1],
  2826. [Permission mode override for installation of shared libraries])
  2827. _LT_DECL([], [postinstall_cmds], [2],
  2828. [Command to use after installation of a shared archive])
  2829. _LT_DECL([], [postuninstall_cmds], [2],
  2830. [Command to use after uninstallation of a shared archive])
  2831. _LT_DECL([], [finish_cmds], [2],
  2832. [Commands used to finish a libtool library installation in a directory])
  2833. _LT_DECL([], [finish_eval], [1],
  2834. [[As "finish_cmds", except a single script fragment to be evaled but
  2835. not shown]])
  2836. _LT_DECL([], [hardcode_into_libs], [0],
  2837. [Whether we should hardcode library paths into libraries])
  2838. _LT_DECL([], [sys_lib_search_path_spec], [2],
  2839. [Compile-time system search path for libraries])
  2840. _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
  2841. [Detected run-time system search path for libraries])
  2842. _LT_DECL([], [configure_time_lt_sys_library_path], [2],
  2843. [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
  2844. ])# _LT_SYS_DYNAMIC_LINKER
  2845. # _LT_PATH_TOOL_PREFIX(TOOL)
  2846. # --------------------------
  2847. # find a file program that can recognize shared library
  2848. AC_DEFUN([_LT_PATH_TOOL_PREFIX],
  2849. [m4_require([_LT_DECL_EGREP])dnl
  2850. AC_MSG_CHECKING([for $1])
  2851. AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
  2852. [case $MAGIC_CMD in
  2853. [[\\/*] | ?:[\\/]*])
  2854. lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
  2855. ;;
  2856. *)
  2857. lt_save_MAGIC_CMD=$MAGIC_CMD
  2858. lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
  2859. dnl $ac_dummy forces splitting on constant user-supplied paths.
  2860. dnl POSIX.2 word splitting is done only on the output of word expansions,
  2861. dnl not every word. This closes a longstanding sh security hole.
  2862. ac_dummy="m4_if([$2], , $PATH, [$2])"
  2863. for ac_dir in $ac_dummy; do
  2864. IFS=$lt_save_ifs
  2865. test -z "$ac_dir" && ac_dir=.
  2866. if test -f "$ac_dir/$1"; then
  2867. lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
  2868. if test -n "$file_magic_test_file"; then
  2869. case $deplibs_check_method in
  2870. "file_magic "*)
  2871. file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
  2872. MAGIC_CMD=$lt_cv_path_MAGIC_CMD
  2873. if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  2874. $EGREP "$file_magic_regex" > /dev/null; then
  2875. :
  2876. else
  2877. cat <<_LT_EOF 1>&2
  2878. *** Warning: the command libtool uses to detect shared libraries,
  2879. *** $file_magic_cmd, produces output that libtool cannot recognize.
  2880. *** The result is that libtool may fail to recognize shared libraries
  2881. *** as such. This will affect the creation of libtool libraries that
  2882. *** depend on shared libraries, but programs linked with such libtool
  2883. *** libraries will work regardless of this problem. Nevertheless, you
  2884. *** may want to report the problem to your system manager and/or to
  2885. *** bug-libtool@gnu.org
  2886. _LT_EOF
  2887. fi ;;
  2888. esac
  2889. fi
  2890. break
  2891. fi
  2892. done
  2893. IFS=$lt_save_ifs
  2894. MAGIC_CMD=$lt_save_MAGIC_CMD
  2895. ;;
  2896. esac])
  2897. MAGIC_CMD=$lt_cv_path_MAGIC_CMD
  2898. if test -n "$MAGIC_CMD"; then
  2899. AC_MSG_RESULT($MAGIC_CMD)
  2900. else
  2901. AC_MSG_RESULT(no)
  2902. fi
  2903. _LT_DECL([], [MAGIC_CMD], [0],
  2904. [Used to examine libraries when file_magic_cmd begins with "file"])dnl
  2905. ])# _LT_PATH_TOOL_PREFIX
  2906. # Old name:
  2907. AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
  2908. dnl aclocal-1.4 backwards compatibility:
  2909. dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
  2910. # _LT_PATH_MAGIC
  2911. # --------------
  2912. # find a file program that can recognize a shared library
  2913. m4_defun([_LT_PATH_MAGIC],
  2914. [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
  2915. if test -z "$lt_cv_path_MAGIC_CMD"; then
  2916. if test -n "$ac_tool_prefix"; then
  2917. _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
  2918. else
  2919. MAGIC_CMD=:
  2920. fi
  2921. fi
  2922. ])# _LT_PATH_MAGIC
  2923. # LT_PATH_LD
  2924. # ----------
  2925. # find the pathname to the GNU or non-GNU linker
  2926. AC_DEFUN([LT_PATH_LD],
  2927. [AC_REQUIRE([AC_PROG_CC])dnl
  2928. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2929. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  2930. m4_require([_LT_DECL_SED])dnl
  2931. m4_require([_LT_DECL_EGREP])dnl
  2932. m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
  2933. AC_ARG_WITH([gnu-ld],
  2934. [AS_HELP_STRING([--with-gnu-ld],
  2935. [assume the C compiler uses GNU ld @<:@default=no@:>@])],
  2936. [test no = "$withval" || with_gnu_ld=yes],
  2937. [with_gnu_ld=no])dnl
  2938. ac_prog=ld
  2939. if test yes = "$GCC"; then
  2940. # Check if gcc -print-prog-name=ld gives a path.
  2941. AC_MSG_CHECKING([for ld used by $CC])
  2942. case $host in
  2943. *-*-mingw*)
  2944. # gcc leaves a trailing carriage return, which upsets mingw
  2945. ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  2946. *)
  2947. ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  2948. esac
  2949. case $ac_prog in
  2950. # Accept absolute paths.
  2951. [[\\/]]* | ?:[[\\/]]*)
  2952. re_direlt='/[[^/]][[^/]]*/\.\./'
  2953. # Canonicalize the pathname of ld
  2954. ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
  2955. while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
  2956. ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
  2957. done
  2958. test -z "$LD" && LD=$ac_prog
  2959. ;;
  2960. "")
  2961. # If it fails, then pretend we aren't using GCC.
  2962. ac_prog=ld
  2963. ;;
  2964. *)
  2965. # If it is relative, then search for the first ld in PATH.
  2966. with_gnu_ld=unknown
  2967. ;;
  2968. esac
  2969. elif test yes = "$with_gnu_ld"; then
  2970. AC_MSG_CHECKING([for GNU ld])
  2971. else
  2972. AC_MSG_CHECKING([for non-GNU ld])
  2973. fi
  2974. AC_CACHE_VAL(lt_cv_path_LD,
  2975. [if test -z "$LD"; then
  2976. lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
  2977. for ac_dir in $PATH; do
  2978. IFS=$lt_save_ifs
  2979. test -z "$ac_dir" && ac_dir=.
  2980. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  2981. lt_cv_path_LD=$ac_dir/$ac_prog
  2982. # Check to see if the program is GNU ld. I'd rather use --version,
  2983. # but apparently some variants of GNU ld only accept -v.
  2984. # Break only if it was the GNU/non-GNU ld that we prefer.
  2985. case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
  2986. *GNU* | *'with BFD'*)
  2987. test no != "$with_gnu_ld" && break
  2988. ;;
  2989. *)
  2990. test yes != "$with_gnu_ld" && break
  2991. ;;
  2992. esac
  2993. fi
  2994. done
  2995. IFS=$lt_save_ifs
  2996. else
  2997. lt_cv_path_LD=$LD # Let the user override the test with a path.
  2998. fi])
  2999. LD=$lt_cv_path_LD
  3000. if test -n "$LD"; then
  3001. AC_MSG_RESULT($LD)
  3002. else
  3003. AC_MSG_RESULT(no)
  3004. fi
  3005. test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  3006. _LT_PATH_LD_GNU
  3007. AC_SUBST([LD])
  3008. _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
  3009. ])# LT_PATH_LD
  3010. # Old names:
  3011. AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
  3012. AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
  3013. dnl aclocal-1.4 backwards compatibility:
  3014. dnl AC_DEFUN([AM_PROG_LD], [])
  3015. dnl AC_DEFUN([AC_PROG_LD], [])
  3016. # _LT_PATH_LD_GNU
  3017. #- --------------
  3018. m4_defun([_LT_PATH_LD_GNU],
  3019. [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
  3020. [# I'd rather use --version here, but apparently some GNU lds only accept -v.
  3021. case `$LD -v 2>&1 </dev/null` in
  3022. *GNU* | *'with BFD'*)
  3023. lt_cv_prog_gnu_ld=yes
  3024. ;;
  3025. *)
  3026. lt_cv_prog_gnu_ld=no
  3027. ;;
  3028. esac])
  3029. with_gnu_ld=$lt_cv_prog_gnu_ld
  3030. ])# _LT_PATH_LD_GNU
  3031. # _LT_CMD_RELOAD
  3032. # --------------
  3033. # find reload flag for linker
  3034. # -- PORTME Some linkers may need a different reload flag.
  3035. m4_defun([_LT_CMD_RELOAD],
  3036. [AC_CACHE_CHECK([for $LD option to reload object files],
  3037. lt_cv_ld_reload_flag,
  3038. [lt_cv_ld_reload_flag='-r'])
  3039. reload_flag=$lt_cv_ld_reload_flag
  3040. case $reload_flag in
  3041. "" | " "*) ;;
  3042. *) reload_flag=" $reload_flag" ;;
  3043. esac
  3044. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  3045. case $host_os in
  3046. cygwin* | mingw* | pw32* | cegcc*)
  3047. if test yes != "$GCC"; then
  3048. reload_cmds=false
  3049. fi
  3050. ;;
  3051. darwin*)
  3052. if test yes = "$GCC"; then
  3053. reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
  3054. else
  3055. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  3056. fi
  3057. ;;
  3058. esac
  3059. _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
  3060. _LT_TAGDECL([], [reload_cmds], [2])dnl
  3061. ])# _LT_CMD_RELOAD
  3062. # _LT_PATH_DD
  3063. # -----------
  3064. # find a working dd
  3065. m4_defun([_LT_PATH_DD],
  3066. [AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
  3067. [printf 0123456789abcdef0123456789abcdef >conftest.i
  3068. cat conftest.i conftest.i >conftest2.i
  3069. : ${lt_DD:=$DD}
  3070. AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
  3071. [if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
  3072. cmp -s conftest.i conftest.out \
  3073. && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
  3074. fi])
  3075. rm -f conftest.i conftest2.i conftest.out])
  3076. ])# _LT_PATH_DD
  3077. # _LT_CMD_TRUNCATE
  3078. # ----------------
  3079. # find command to truncate a binary pipe
  3080. m4_defun([_LT_CMD_TRUNCATE],
  3081. [m4_require([_LT_PATH_DD])
  3082. AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
  3083. [printf 0123456789abcdef0123456789abcdef >conftest.i
  3084. cat conftest.i conftest.i >conftest2.i
  3085. lt_cv_truncate_bin=
  3086. if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
  3087. cmp -s conftest.i conftest.out \
  3088. && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
  3089. fi
  3090. rm -f conftest.i conftest2.i conftest.out
  3091. test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
  3092. _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
  3093. [Command to truncate a binary pipe])
  3094. ])# _LT_CMD_TRUNCATE
  3095. # _LT_CHECK_MAGIC_METHOD
  3096. # ----------------------
  3097. # how to check for library dependencies
  3098. # -- PORTME fill in with the dynamic library characteristics
  3099. m4_defun([_LT_CHECK_MAGIC_METHOD],
  3100. [m4_require([_LT_DECL_EGREP])
  3101. m4_require([_LT_DECL_OBJDUMP])
  3102. AC_CACHE_CHECK([how to recognize dependent libraries],
  3103. lt_cv_deplibs_check_method,
  3104. [lt_cv_file_magic_cmd='$MAGIC_CMD'
  3105. lt_cv_file_magic_test_file=
  3106. lt_cv_deplibs_check_method='unknown'
  3107. # Need to set the preceding variable on all platforms that support
  3108. # interlibrary dependencies.
  3109. # 'none' -- dependencies not supported.
  3110. # 'unknown' -- same as none, but documents that we really don't know.
  3111. # 'pass_all' -- all dependencies passed with no checks.
  3112. # 'test_compile' -- check by making test program.
  3113. # 'file_magic [[regex]]' -- check by looking for files in library path
  3114. # that responds to the $file_magic_cmd with a given extended regex.
  3115. # If you have 'file' or equivalent on your system and you're not sure
  3116. # whether 'pass_all' will *always* work, you probably want this one.
  3117. case $host_os in
  3118. aix[[4-9]]*)
  3119. lt_cv_deplibs_check_method=pass_all
  3120. ;;
  3121. beos*)
  3122. lt_cv_deplibs_check_method=pass_all
  3123. ;;
  3124. bsdi[[45]]*)
  3125. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
  3126. lt_cv_file_magic_cmd='/usr/bin/file -L'
  3127. lt_cv_file_magic_test_file=/shlib/libc.so
  3128. ;;
  3129. cygwin*)
  3130. # func_win32_libid is a shell function defined in ltmain.sh
  3131. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  3132. lt_cv_file_magic_cmd='func_win32_libid'
  3133. ;;
  3134. mingw* | pw32*)
  3135. # Base MSYS/MinGW do not provide the 'file' command needed by
  3136. # func_win32_libid shell function, so use a weaker test based on 'objdump',
  3137. # unless we find 'file', for example because we are cross-compiling.
  3138. if ( file / ) >/dev/null 2>&1; then
  3139. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  3140. lt_cv_file_magic_cmd='func_win32_libid'
  3141. else
  3142. # Keep this pattern in sync with the one in func_win32_libid.
  3143. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
  3144. lt_cv_file_magic_cmd='$OBJDUMP -f'
  3145. fi
  3146. ;;
  3147. cegcc*)
  3148. # use the weaker test based on 'objdump'. See mingw*.
  3149. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
  3150. lt_cv_file_magic_cmd='$OBJDUMP -f'
  3151. ;;
  3152. darwin* | rhapsody*)
  3153. lt_cv_deplibs_check_method=pass_all
  3154. ;;
  3155. freebsd* | dragonfly*)
  3156. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  3157. case $host_cpu in
  3158. i*86 )
  3159. # Not sure whether the presence of OpenBSD here was a mistake.
  3160. # Let's accept both of them until this is cleared up.
  3161. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
  3162. lt_cv_file_magic_cmd=/usr/bin/file
  3163. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  3164. ;;
  3165. esac
  3166. else
  3167. lt_cv_deplibs_check_method=pass_all
  3168. fi
  3169. ;;
  3170. haiku*)
  3171. lt_cv_deplibs_check_method=pass_all
  3172. ;;
  3173. hpux10.20* | hpux11*)
  3174. lt_cv_file_magic_cmd=/usr/bin/file
  3175. case $host_cpu in
  3176. ia64*)
  3177. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
  3178. lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
  3179. ;;
  3180. hppa*64*)
  3181. [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]']
  3182. lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
  3183. ;;
  3184. *)
  3185. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
  3186. lt_cv_file_magic_test_file=/usr/lib/libc.sl
  3187. ;;
  3188. esac
  3189. ;;
  3190. interix[[3-9]]*)
  3191. # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
  3192. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
  3193. ;;
  3194. irix5* | irix6* | nonstopux*)
  3195. case $LD in
  3196. *-32|*"-32 ") libmagic=32-bit;;
  3197. *-n32|*"-n32 ") libmagic=N32;;
  3198. *-64|*"-64 ") libmagic=64-bit;;
  3199. *) libmagic=never-match;;
  3200. esac
  3201. lt_cv_deplibs_check_method=pass_all
  3202. ;;
  3203. # This must be glibc/ELF.
  3204. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  3205. lt_cv_deplibs_check_method=pass_all
  3206. ;;
  3207. netbsd* | netbsdelf*-gnu)
  3208. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  3209. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  3210. else
  3211. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
  3212. fi
  3213. ;;
  3214. newos6*)
  3215. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
  3216. lt_cv_file_magic_cmd=/usr/bin/file
  3217. lt_cv_file_magic_test_file=/usr/lib/libnls.so
  3218. ;;
  3219. *nto* | *qnx*)
  3220. lt_cv_deplibs_check_method=pass_all
  3221. ;;
  3222. openbsd* | bitrig*)
  3223. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
  3224. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
  3225. else
  3226. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  3227. fi
  3228. ;;
  3229. osf3* | osf4* | osf5*)
  3230. lt_cv_deplibs_check_method=pass_all
  3231. ;;
  3232. rdos*)
  3233. lt_cv_deplibs_check_method=pass_all
  3234. ;;
  3235. solaris*)
  3236. lt_cv_deplibs_check_method=pass_all
  3237. ;;
  3238. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  3239. lt_cv_deplibs_check_method=pass_all
  3240. ;;
  3241. sysv4 | sysv4.3*)
  3242. case $host_vendor in
  3243. motorola)
  3244. 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]]'
  3245. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  3246. ;;
  3247. ncr)
  3248. lt_cv_deplibs_check_method=pass_all
  3249. ;;
  3250. sequent)
  3251. lt_cv_file_magic_cmd='/bin/file'
  3252. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
  3253. ;;
  3254. sni)
  3255. lt_cv_file_magic_cmd='/bin/file'
  3256. lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
  3257. lt_cv_file_magic_test_file=/lib/libc.so
  3258. ;;
  3259. siemens)
  3260. lt_cv_deplibs_check_method=pass_all
  3261. ;;
  3262. pc)
  3263. lt_cv_deplibs_check_method=pass_all
  3264. ;;
  3265. esac
  3266. ;;
  3267. tpf*)
  3268. lt_cv_deplibs_check_method=pass_all
  3269. ;;
  3270. os2*)
  3271. lt_cv_deplibs_check_method=pass_all
  3272. ;;
  3273. esac
  3274. ])
  3275. file_magic_glob=
  3276. want_nocaseglob=no
  3277. if test "$build" = "$host"; then
  3278. case $host_os in
  3279. mingw* | pw32*)
  3280. if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
  3281. want_nocaseglob=yes
  3282. else
  3283. file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
  3284. fi
  3285. ;;
  3286. esac
  3287. fi
  3288. file_magic_cmd=$lt_cv_file_magic_cmd
  3289. deplibs_check_method=$lt_cv_deplibs_check_method
  3290. test -z "$deplibs_check_method" && deplibs_check_method=unknown
  3291. _LT_DECL([], [deplibs_check_method], [1],
  3292. [Method to check whether dependent libraries are shared objects])
  3293. _LT_DECL([], [file_magic_cmd], [1],
  3294. [Command to use when deplibs_check_method = "file_magic"])
  3295. _LT_DECL([], [file_magic_glob], [1],
  3296. [How to find potential files when deplibs_check_method = "file_magic"])
  3297. _LT_DECL([], [want_nocaseglob], [1],
  3298. [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
  3299. ])# _LT_CHECK_MAGIC_METHOD
  3300. # LT_PATH_NM
  3301. # ----------
  3302. # find the pathname to a BSD- or MS-compatible name lister
  3303. AC_DEFUN([LT_PATH_NM],
  3304. [AC_REQUIRE([AC_PROG_CC])dnl
  3305. AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
  3306. [if test -n "$NM"; then
  3307. # Let the user override the test.
  3308. lt_cv_path_NM=$NM
  3309. else
  3310. lt_nm_to_check=${ac_tool_prefix}nm
  3311. if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
  3312. lt_nm_to_check="$lt_nm_to_check nm"
  3313. fi
  3314. for lt_tmp_nm in $lt_nm_to_check; do
  3315. lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
  3316. for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
  3317. IFS=$lt_save_ifs
  3318. test -z "$ac_dir" && ac_dir=.
  3319. tmp_nm=$ac_dir/$lt_tmp_nm
  3320. if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
  3321. # Check to see if the nm accepts a BSD-compat flag.
  3322. # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
  3323. # nm: unknown option "B" ignored
  3324. # Tru64's nm complains that /dev/null is an invalid object file
  3325. # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
  3326. case $build_os in
  3327. mingw*) lt_bad_file=conftest.nm/nofile ;;
  3328. *) lt_bad_file=/dev/null ;;
  3329. esac
  3330. case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
  3331. *$lt_bad_file* | *'Invalid file or object type'*)
  3332. lt_cv_path_NM="$tmp_nm -B"
  3333. break 2
  3334. ;;
  3335. *)
  3336. case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
  3337. */dev/null*)
  3338. lt_cv_path_NM="$tmp_nm -p"
  3339. break 2
  3340. ;;
  3341. *)
  3342. lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
  3343. continue # so that we can try to find one that supports BSD flags
  3344. ;;
  3345. esac
  3346. ;;
  3347. esac
  3348. fi
  3349. done
  3350. IFS=$lt_save_ifs
  3351. done
  3352. : ${lt_cv_path_NM=no}
  3353. fi])
  3354. if test no != "$lt_cv_path_NM"; then
  3355. NM=$lt_cv_path_NM
  3356. else
  3357. # Didn't find any BSD compatible name lister, look for dumpbin.
  3358. if test -n "$DUMPBIN"; then :
  3359. # Let the user override the test.
  3360. else
  3361. AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
  3362. case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
  3363. *COFF*)
  3364. DUMPBIN="$DUMPBIN -symbols -headers"
  3365. ;;
  3366. *)
  3367. DUMPBIN=:
  3368. ;;
  3369. esac
  3370. fi
  3371. AC_SUBST([DUMPBIN])
  3372. if test : != "$DUMPBIN"; then
  3373. NM=$DUMPBIN
  3374. fi
  3375. fi
  3376. test -z "$NM" && NM=nm
  3377. AC_SUBST([NM])
  3378. _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
  3379. AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
  3380. [lt_cv_nm_interface="BSD nm"
  3381. echo "int some_variable = 0;" > conftest.$ac_ext
  3382. (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
  3383. (eval "$ac_compile" 2>conftest.err)
  3384. cat conftest.err >&AS_MESSAGE_LOG_FD
  3385. (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
  3386. (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
  3387. cat conftest.err >&AS_MESSAGE_LOG_FD
  3388. (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
  3389. cat conftest.out >&AS_MESSAGE_LOG_FD
  3390. if $GREP 'External.*some_variable' conftest.out > /dev/null; then
  3391. lt_cv_nm_interface="MS dumpbin"
  3392. fi
  3393. rm -f conftest*])
  3394. ])# LT_PATH_NM
  3395. # Old names:
  3396. AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
  3397. AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
  3398. dnl aclocal-1.4 backwards compatibility:
  3399. dnl AC_DEFUN([AM_PROG_NM], [])
  3400. dnl AC_DEFUN([AC_PROG_NM], [])
  3401. # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  3402. # --------------------------------
  3403. # how to determine the name of the shared library
  3404. # associated with a specific link library.
  3405. # -- PORTME fill in with the dynamic library characteristics
  3406. m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
  3407. [m4_require([_LT_DECL_EGREP])
  3408. m4_require([_LT_DECL_OBJDUMP])
  3409. m4_require([_LT_DECL_DLLTOOL])
  3410. AC_CACHE_CHECK([how to associate runtime and link libraries],
  3411. lt_cv_sharedlib_from_linklib_cmd,
  3412. [lt_cv_sharedlib_from_linklib_cmd='unknown'
  3413. case $host_os in
  3414. cygwin* | mingw* | pw32* | cegcc*)
  3415. # two different shell functions defined in ltmain.sh;
  3416. # decide which one to use based on capabilities of $DLLTOOL
  3417. case `$DLLTOOL --help 2>&1` in
  3418. *--identify-strict*)
  3419. lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
  3420. ;;
  3421. *)
  3422. lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
  3423. ;;
  3424. esac
  3425. ;;
  3426. *)
  3427. # fallback: assume linklib IS sharedlib
  3428. lt_cv_sharedlib_from_linklib_cmd=$ECHO
  3429. ;;
  3430. esac
  3431. ])
  3432. sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
  3433. test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
  3434. _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
  3435. [Command to associate shared and link libraries])
  3436. ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  3437. # _LT_PATH_MANIFEST_TOOL
  3438. # ----------------------
  3439. # locate the manifest tool
  3440. m4_defun([_LT_PATH_MANIFEST_TOOL],
  3441. [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
  3442. test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
  3443. AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
  3444. [lt_cv_path_mainfest_tool=no
  3445. echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
  3446. $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
  3447. cat conftest.err >&AS_MESSAGE_LOG_FD
  3448. if $GREP 'Manifest Tool' conftest.out > /dev/null; then
  3449. lt_cv_path_mainfest_tool=yes
  3450. fi
  3451. rm -f conftest*])
  3452. if test yes != "$lt_cv_path_mainfest_tool"; then
  3453. MANIFEST_TOOL=:
  3454. fi
  3455. _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
  3456. ])# _LT_PATH_MANIFEST_TOOL
  3457. # _LT_DLL_DEF_P([FILE])
  3458. # ---------------------
  3459. # True iff FILE is a Windows DLL '.def' file.
  3460. # Keep in sync with func_dll_def_p in the libtool script
  3461. AC_DEFUN([_LT_DLL_DEF_P],
  3462. [dnl
  3463. test DEF = "`$SED -n dnl
  3464. -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace
  3465. -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments
  3466. -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl
  3467. -e q dnl Only consider the first "real" line
  3468. $1`" dnl
  3469. ])# _LT_DLL_DEF_P
  3470. # LT_LIB_M
  3471. # --------
  3472. # check for math library
  3473. AC_DEFUN([LT_LIB_M],
  3474. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3475. LIBM=
  3476. case $host in
  3477. *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
  3478. # These system don't have libm, or don't need it
  3479. ;;
  3480. *-ncr-sysv4.3*)
  3481. AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
  3482. AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
  3483. ;;
  3484. *)
  3485. AC_CHECK_LIB(m, cos, LIBM=-lm)
  3486. ;;
  3487. esac
  3488. AC_SUBST([LIBM])
  3489. ])# LT_LIB_M
  3490. # Old name:
  3491. AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
  3492. dnl aclocal-1.4 backwards compatibility:
  3493. dnl AC_DEFUN([AC_CHECK_LIBM], [])
  3494. # _LT_COMPILER_NO_RTTI([TAGNAME])
  3495. # -------------------------------
  3496. m4_defun([_LT_COMPILER_NO_RTTI],
  3497. [m4_require([_LT_TAG_COMPILER])dnl
  3498. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  3499. if test yes = "$GCC"; then
  3500. case $cc_basename in
  3501. nvcc*)
  3502. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
  3503. *)
  3504. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
  3505. esac
  3506. _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
  3507. lt_cv_prog_compiler_rtti_exceptions,
  3508. [-fno-rtti -fno-exceptions], [],
  3509. [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
  3510. fi
  3511. _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
  3512. [Compiler flag to turn off builtin functions])
  3513. ])# _LT_COMPILER_NO_RTTI
  3514. # _LT_CMD_GLOBAL_SYMBOLS
  3515. # ----------------------
  3516. m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
  3517. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3518. AC_REQUIRE([AC_PROG_CC])dnl
  3519. AC_REQUIRE([AC_PROG_AWK])dnl
  3520. AC_REQUIRE([LT_PATH_NM])dnl
  3521. AC_REQUIRE([LT_PATH_LD])dnl
  3522. m4_require([_LT_DECL_SED])dnl
  3523. m4_require([_LT_DECL_EGREP])dnl
  3524. m4_require([_LT_TAG_COMPILER])dnl
  3525. # Check for command to grab the raw symbol name followed by C symbol from nm.
  3526. AC_MSG_CHECKING([command to parse $NM output from $compiler object])
  3527. AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
  3528. [
  3529. # These are sane defaults that work on at least a few old systems.
  3530. # [They come from Ultrix. What could be older than Ultrix?!! ;)]
  3531. # Character class describing NM global symbol codes.
  3532. symcode='[[BCDEGRST]]'
  3533. # Regexp to match symbols that can be accessed directly from C.
  3534. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
  3535. # Define system-specific variables.
  3536. case $host_os in
  3537. aix*)
  3538. symcode='[[BCDT]]'
  3539. ;;
  3540. cygwin* | mingw* | pw32* | cegcc*)
  3541. symcode='[[ABCDGISTW]]'
  3542. ;;
  3543. hpux*)
  3544. if test ia64 = "$host_cpu"; then
  3545. symcode='[[ABCDEGRST]]'
  3546. fi
  3547. ;;
  3548. irix* | nonstopux*)
  3549. symcode='[[BCDEGRST]]'
  3550. ;;
  3551. osf*)
  3552. symcode='[[BCDEGQRST]]'
  3553. ;;
  3554. solaris*)
  3555. symcode='[[BDRT]]'
  3556. ;;
  3557. sco3.2v5*)
  3558. symcode='[[DT]]'
  3559. ;;
  3560. sysv4.2uw2*)
  3561. symcode='[[DT]]'
  3562. ;;
  3563. sysv5* | sco5v6* | unixware* | OpenUNIX*)
  3564. symcode='[[ABDT]]'
  3565. ;;
  3566. sysv4)
  3567. symcode='[[DFNSTU]]'
  3568. ;;
  3569. esac
  3570. # If we're using GNU nm, then use its standard symbol codes.
  3571. case `$NM -V 2>&1` in
  3572. *GNU* | *'with BFD'*)
  3573. symcode='[[ABCDGIRSTW]]' ;;
  3574. esac
  3575. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3576. # Gets list of data symbols to import.
  3577. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
  3578. # Adjust the below global symbol transforms to fixup imported variables.
  3579. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
  3580. lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
  3581. lt_c_name_lib_hook="\
  3582. -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
  3583. -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
  3584. else
  3585. # Disable hooks by default.
  3586. lt_cv_sys_global_symbol_to_import=
  3587. lt_cdecl_hook=
  3588. lt_c_name_hook=
  3589. lt_c_name_lib_hook=
  3590. fi
  3591. # Transform an extracted symbol line into a proper C declaration.
  3592. # Some systems (esp. on ia64) link data and code symbols differently,
  3593. # so use this general approach.
  3594. lt_cv_sys_global_symbol_to_cdecl="sed -n"\
  3595. $lt_cdecl_hook\
  3596. " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
  3597. " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
  3598. # Transform an extracted symbol line into symbol name and symbol address
  3599. lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
  3600. $lt_c_name_hook\
  3601. " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
  3602. " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
  3603. # Transform an extracted symbol line into symbol name with lib prefix and
  3604. # symbol address.
  3605. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
  3606. $lt_c_name_lib_hook\
  3607. " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
  3608. " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
  3609. " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
  3610. # Handle CRLF in mingw tool chain
  3611. opt_cr=
  3612. case $build_os in
  3613. mingw*)
  3614. opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  3615. ;;
  3616. esac
  3617. # Try without a prefix underscore, then with it.
  3618. for ac_symprfx in "" "_"; do
  3619. # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
  3620. symxfrm="\\1 $ac_symprfx\\2 \\2"
  3621. # Write the raw and C identifiers.
  3622. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3623. # Fake it for dumpbin and say T for any non-static function,
  3624. # D for any global variable and I for any imported variable.
  3625. # Also find C++ and __fastcall symbols from MSVC++,
  3626. # which start with @ or ?.
  3627. lt_cv_sys_global_symbol_pipe="$AWK ['"\
  3628. " {last_section=section; section=\$ 3};"\
  3629. " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
  3630. " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
  3631. " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
  3632. " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
  3633. " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
  3634. " \$ 0!~/External *\|/{next};"\
  3635. " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
  3636. " {if(hide[section]) next};"\
  3637. " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
  3638. " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
  3639. " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
  3640. " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
  3641. " ' prfx=^$ac_symprfx]"
  3642. else
  3643. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
  3644. fi
  3645. lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
  3646. # Check to see that the pipe works correctly.
  3647. pipe_works=no
  3648. rm -f conftest*
  3649. cat > conftest.$ac_ext <<_LT_EOF
  3650. #ifdef __cplusplus
  3651. extern "C" {
  3652. #endif
  3653. char nm_test_var;
  3654. void nm_test_func(void);
  3655. void nm_test_func(void){}
  3656. #ifdef __cplusplus
  3657. }
  3658. #endif
  3659. int main(){nm_test_var='a';nm_test_func();return(0);}
  3660. _LT_EOF
  3661. if AC_TRY_EVAL(ac_compile); then
  3662. # Now try to grab the symbols.
  3663. nlist=conftest.nm
  3664. $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD
  3665. if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then
  3666. # Try sorting and uniquifying the output.
  3667. if sort "$nlist" | uniq > "$nlist"T; then
  3668. mv -f "$nlist"T "$nlist"
  3669. else
  3670. rm -f "$nlist"T
  3671. fi
  3672. # Make sure that we snagged all the symbols we need.
  3673. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
  3674. if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
  3675. cat <<_LT_EOF > conftest.$ac_ext
  3676. /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
  3677. #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
  3678. /* DATA imports from DLLs on WIN32 can't be const, because runtime
  3679. relocations are performed -- see ld's documentation on pseudo-relocs. */
  3680. # define LT@&t@_DLSYM_CONST
  3681. #elif defined __osf__
  3682. /* This system does not cope well with relocations in const data. */
  3683. # define LT@&t@_DLSYM_CONST
  3684. #else
  3685. # define LT@&t@_DLSYM_CONST const
  3686. #endif
  3687. #ifdef __cplusplus
  3688. extern "C" {
  3689. #endif
  3690. _LT_EOF
  3691. # Now generate the symbol file.
  3692. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
  3693. cat <<_LT_EOF >> conftest.$ac_ext
  3694. /* The mapping between symbol names and symbols. */
  3695. LT@&t@_DLSYM_CONST struct {
  3696. const char *name;
  3697. void *address;
  3698. }
  3699. lt__PROGRAM__LTX_preloaded_symbols[[]] =
  3700. {
  3701. { "@PROGRAM@", (void *) 0 },
  3702. _LT_EOF
  3703. $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
  3704. cat <<\_LT_EOF >> conftest.$ac_ext
  3705. {0, (void *) 0}
  3706. };
  3707. /* This works around a problem in FreeBSD linker */
  3708. #ifdef FREEBSD_WORKAROUND
  3709. static const void *lt_preloaded_setup() {
  3710. return lt__PROGRAM__LTX_preloaded_symbols;
  3711. }
  3712. #endif
  3713. #ifdef __cplusplus
  3714. }
  3715. #endif
  3716. _LT_EOF
  3717. # Now try linking the two files.
  3718. mv conftest.$ac_objext conftstm.$ac_objext
  3719. lt_globsym_save_LIBS=$LIBS
  3720. lt_globsym_save_CFLAGS=$CFLAGS
  3721. LIBS=conftstm.$ac_objext
  3722. CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
  3723. if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
  3724. pipe_works=yes
  3725. fi
  3726. LIBS=$lt_globsym_save_LIBS
  3727. CFLAGS=$lt_globsym_save_CFLAGS
  3728. else
  3729. echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
  3730. fi
  3731. else
  3732. echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
  3733. fi
  3734. else
  3735. echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
  3736. fi
  3737. else
  3738. echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
  3739. cat conftest.$ac_ext >&5
  3740. fi
  3741. rm -rf conftest* conftst*
  3742. # Do not use the global_symbol_pipe unless it works.
  3743. if test yes = "$pipe_works"; then
  3744. break
  3745. else
  3746. lt_cv_sys_global_symbol_pipe=
  3747. fi
  3748. done
  3749. ])
  3750. if test -z "$lt_cv_sys_global_symbol_pipe"; then
  3751. lt_cv_sys_global_symbol_to_cdecl=
  3752. fi
  3753. if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
  3754. AC_MSG_RESULT(failed)
  3755. else
  3756. AC_MSG_RESULT(ok)
  3757. fi
  3758. # Response file support.
  3759. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3760. nm_file_list_spec='@'
  3761. elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
  3762. nm_file_list_spec='@'
  3763. fi
  3764. _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
  3765. [Take the output of nm and produce a listing of raw symbols and C names])
  3766. _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
  3767. [Transform the output of nm in a proper C declaration])
  3768. _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
  3769. [Transform the output of nm into a list of symbols to manually relocate])
  3770. _LT_DECL([global_symbol_to_c_name_address],
  3771. [lt_cv_sys_global_symbol_to_c_name_address], [1],
  3772. [Transform the output of nm in a C name address pair])
  3773. _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
  3774. [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
  3775. [Transform the output of nm in a C name address pair when lib prefix is needed])
  3776. _LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
  3777. [The name lister interface])
  3778. _LT_DECL([], [nm_file_list_spec], [1],
  3779. [Specify filename containing input files for $NM])
  3780. ]) # _LT_CMD_GLOBAL_SYMBOLS
  3781. # _LT_COMPILER_PIC([TAGNAME])
  3782. # ---------------------------
  3783. m4_defun([_LT_COMPILER_PIC],
  3784. [m4_require([_LT_TAG_COMPILER])dnl
  3785. _LT_TAGVAR(lt_prog_compiler_wl, $1)=
  3786. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3787. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3788. m4_if([$1], [CXX], [
  3789. # C++ specific cases for pic, static, wl, etc.
  3790. if test yes = "$GXX"; then
  3791. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3792. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3793. case $host_os in
  3794. aix*)
  3795. # All AIX code is PIC.
  3796. if test ia64 = "$host_cpu"; then
  3797. # AIX 5 now supports IA64 processor
  3798. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3799. fi
  3800. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3801. ;;
  3802. amigaos*)
  3803. case $host_cpu in
  3804. powerpc)
  3805. # see comment about AmigaOS4 .so support
  3806. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3807. ;;
  3808. m68k)
  3809. # FIXME: we need at least 68020 code to build shared libraries, but
  3810. # adding the '-m68020' flag to GCC prevents building anything better,
  3811. # like '-m68040'.
  3812. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  3813. ;;
  3814. esac
  3815. ;;
  3816. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  3817. # PIC is the default for these OSes.
  3818. ;;
  3819. mingw* | cygwin* | os2* | pw32* | cegcc*)
  3820. # This hack is so that the source file can tell whether it is being
  3821. # built for inclusion in a dll (and should export symbols for example).
  3822. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  3823. # (--disable-auto-import) libraries
  3824. m4_if([$1], [GCJ], [],
  3825. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3826. case $host_os in
  3827. os2*)
  3828. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
  3829. ;;
  3830. esac
  3831. ;;
  3832. darwin* | rhapsody*)
  3833. # PIC is the default on this platform
  3834. # Common symbols not allowed in MH_DYLIB files
  3835. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  3836. ;;
  3837. *djgpp*)
  3838. # DJGPP does not support shared libraries at all
  3839. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3840. ;;
  3841. haiku*)
  3842. # PIC is the default for Haiku.
  3843. # The "-static" flag exists, but is broken.
  3844. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3845. ;;
  3846. interix[[3-9]]*)
  3847. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  3848. # Instead, we relocate shared libraries at runtime.
  3849. ;;
  3850. sysv4*MP*)
  3851. if test -d /usr/nec; then
  3852. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  3853. fi
  3854. ;;
  3855. hpux*)
  3856. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  3857. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  3858. # sets the default TLS model and affects inlining.
  3859. case $host_cpu in
  3860. hppa*64*)
  3861. ;;
  3862. *)
  3863. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3864. ;;
  3865. esac
  3866. ;;
  3867. *qnx* | *nto*)
  3868. # QNX uses GNU C++, but need to define -shared option too, otherwise
  3869. # it will coredump.
  3870. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  3871. ;;
  3872. *)
  3873. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3874. ;;
  3875. esac
  3876. else
  3877. case $host_os in
  3878. aix[[4-9]]*)
  3879. # All AIX code is PIC.
  3880. if test ia64 = "$host_cpu"; then
  3881. # AIX 5 now supports IA64 processor
  3882. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3883. else
  3884. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  3885. fi
  3886. ;;
  3887. chorus*)
  3888. case $cc_basename in
  3889. cxch68*)
  3890. # Green Hills C++ Compiler
  3891. # _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"
  3892. ;;
  3893. esac
  3894. ;;
  3895. mingw* | cygwin* | os2* | pw32* | cegcc*)
  3896. # This hack is so that the source file can tell whether it is being
  3897. # built for inclusion in a dll (and should export symbols for example).
  3898. m4_if([$1], [GCJ], [],
  3899. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3900. ;;
  3901. dgux*)
  3902. case $cc_basename in
  3903. ec++*)
  3904. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3905. ;;
  3906. ghcx*)
  3907. # Green Hills C++ Compiler
  3908. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3909. ;;
  3910. *)
  3911. ;;
  3912. esac
  3913. ;;
  3914. freebsd* | dragonfly*)
  3915. # FreeBSD uses GNU C++
  3916. ;;
  3917. hpux9* | hpux10* | hpux11*)
  3918. case $cc_basename in
  3919. CC*)
  3920. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3921. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
  3922. if test ia64 != "$host_cpu"; then
  3923. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  3924. fi
  3925. ;;
  3926. aCC*)
  3927. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3928. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
  3929. case $host_cpu in
  3930. hppa*64*|ia64*)
  3931. # +Z the default
  3932. ;;
  3933. *)
  3934. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  3935. ;;
  3936. esac
  3937. ;;
  3938. *)
  3939. ;;
  3940. esac
  3941. ;;
  3942. interix*)
  3943. # This is c89, which is MS Visual C++ (no shared libs)
  3944. # Anyone wants to do a port?
  3945. ;;
  3946. irix5* | irix6* | nonstopux*)
  3947. case $cc_basename in
  3948. CC*)
  3949. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3950. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3951. # CC pic flag -KPIC is the default.
  3952. ;;
  3953. *)
  3954. ;;
  3955. esac
  3956. ;;
  3957. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  3958. case $cc_basename in
  3959. KCC*)
  3960. # KAI C++ Compiler
  3961. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  3962. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3963. ;;
  3964. ecpc* )
  3965. # old Intel C++ for x86_64, which still supported -KPIC.
  3966. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3967. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3968. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3969. ;;
  3970. icpc* )
  3971. # Intel C++, used to be incompatible with GCC.
  3972. # ICC 10 doesn't accept -KPIC any more.
  3973. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3974. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3975. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3976. ;;
  3977. pgCC* | pgcpp*)
  3978. # Portland Group C++ compiler
  3979. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3980. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  3981. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3982. ;;
  3983. cxx*)
  3984. # Compaq C++
  3985. # Make sure the PIC flag is empty. It appears that all Alpha
  3986. # Linux and Compaq Tru64 Unix objects are PIC.
  3987. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3988. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3989. ;;
  3990. xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
  3991. # IBM XL 8.0, 9.0 on PPC and BlueGene
  3992. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3993. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  3994. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  3995. ;;
  3996. *)
  3997. case `$CC -V 2>&1 | sed 5q` in
  3998. *Sun\ C*)
  3999. # Sun C++ 5.9
  4000. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4001. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4002. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4003. ;;
  4004. esac
  4005. ;;
  4006. esac
  4007. ;;
  4008. lynxos*)
  4009. ;;
  4010. m88k*)
  4011. ;;
  4012. mvs*)
  4013. case $cc_basename in
  4014. cxx*)
  4015. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
  4016. ;;
  4017. *)
  4018. ;;
  4019. esac
  4020. ;;
  4021. netbsd* | netbsdelf*-gnu)
  4022. ;;
  4023. *qnx* | *nto*)
  4024. # QNX uses GNU C++, but need to define -shared option too, otherwise
  4025. # it will coredump.
  4026. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4027. ;;
  4028. osf3* | osf4* | osf5*)
  4029. case $cc_basename in
  4030. KCC*)
  4031. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  4032. ;;
  4033. RCC*)
  4034. # Rational C++ 2.4.1
  4035. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4036. ;;
  4037. cxx*)
  4038. # Digital/Compaq C++
  4039. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4040. # Make sure the PIC flag is empty. It appears that all Alpha
  4041. # Linux and Compaq Tru64 Unix objects are PIC.
  4042. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4043. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4044. ;;
  4045. *)
  4046. ;;
  4047. esac
  4048. ;;
  4049. psos*)
  4050. ;;
  4051. solaris*)
  4052. case $cc_basename in
  4053. CC* | sunCC*)
  4054. # Sun C++ 4.2, 5.x and Centerline C++
  4055. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4056. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4057. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4058. ;;
  4059. gcx*)
  4060. # Green Hills C++ Compiler
  4061. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4062. ;;
  4063. *)
  4064. ;;
  4065. esac
  4066. ;;
  4067. sunos4*)
  4068. case $cc_basename in
  4069. CC*)
  4070. # Sun C++ 4.x
  4071. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4072. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4073. ;;
  4074. lcc*)
  4075. # Lucid
  4076. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4077. ;;
  4078. *)
  4079. ;;
  4080. esac
  4081. ;;
  4082. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  4083. case $cc_basename in
  4084. CC*)
  4085. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4086. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4087. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4088. ;;
  4089. esac
  4090. ;;
  4091. tandem*)
  4092. case $cc_basename in
  4093. NCC*)
  4094. # NonStop-UX NCC 3.20
  4095. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4096. ;;
  4097. *)
  4098. ;;
  4099. esac
  4100. ;;
  4101. vxworks*)
  4102. ;;
  4103. *)
  4104. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4105. ;;
  4106. esac
  4107. fi
  4108. ],
  4109. [
  4110. if test yes = "$GCC"; then
  4111. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4112. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4113. case $host_os in
  4114. aix*)
  4115. # All AIX code is PIC.
  4116. if test ia64 = "$host_cpu"; then
  4117. # AIX 5 now supports IA64 processor
  4118. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4119. fi
  4120. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4121. ;;
  4122. amigaos*)
  4123. case $host_cpu in
  4124. powerpc)
  4125. # see comment about AmigaOS4 .so support
  4126. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4127. ;;
  4128. m68k)
  4129. # FIXME: we need at least 68020 code to build shared libraries, but
  4130. # adding the '-m68020' flag to GCC prevents building anything better,
  4131. # like '-m68040'.
  4132. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  4133. ;;
  4134. esac
  4135. ;;
  4136. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  4137. # PIC is the default for these OSes.
  4138. ;;
  4139. mingw* | cygwin* | pw32* | os2* | cegcc*)
  4140. # This hack is so that the source file can tell whether it is being
  4141. # built for inclusion in a dll (and should export symbols for example).
  4142. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  4143. # (--disable-auto-import) libraries
  4144. m4_if([$1], [GCJ], [],
  4145. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  4146. case $host_os in
  4147. os2*)
  4148. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
  4149. ;;
  4150. esac
  4151. ;;
  4152. darwin* | rhapsody*)
  4153. # PIC is the default on this platform
  4154. # Common symbols not allowed in MH_DYLIB files
  4155. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  4156. ;;
  4157. haiku*)
  4158. # PIC is the default for Haiku.
  4159. # The "-static" flag exists, but is broken.
  4160. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  4161. ;;
  4162. hpux*)
  4163. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  4164. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  4165. # sets the default TLS model and affects inlining.
  4166. case $host_cpu in
  4167. hppa*64*)
  4168. # +Z the default
  4169. ;;
  4170. *)
  4171. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4172. ;;
  4173. esac
  4174. ;;
  4175. interix[[3-9]]*)
  4176. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  4177. # Instead, we relocate shared libraries at runtime.
  4178. ;;
  4179. msdosdjgpp*)
  4180. # Just because we use GCC doesn't mean we suddenly get shared libraries
  4181. # on systems that don't support them.
  4182. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4183. enable_shared=no
  4184. ;;
  4185. *nto* | *qnx*)
  4186. # QNX uses GNU C++, but need to define -shared option too, otherwise
  4187. # it will coredump.
  4188. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4189. ;;
  4190. sysv4*MP*)
  4191. if test -d /usr/nec; then
  4192. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  4193. fi
  4194. ;;
  4195. *)
  4196. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4197. ;;
  4198. esac
  4199. case $cc_basename in
  4200. nvcc*) # Cuda Compiler Driver 2.2
  4201. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
  4202. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  4203. _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
  4204. fi
  4205. ;;
  4206. esac
  4207. else
  4208. # PORTME Check for flag to pass linker flags through the system compiler.
  4209. case $host_os in
  4210. aix*)
  4211. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4212. if test ia64 = "$host_cpu"; then
  4213. # AIX 5 now supports IA64 processor
  4214. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4215. else
  4216. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  4217. fi
  4218. ;;
  4219. darwin* | rhapsody*)
  4220. # PIC is the default on this platform
  4221. # Common symbols not allowed in MH_DYLIB files
  4222. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  4223. case $cc_basename in
  4224. nagfor*)
  4225. # NAG Fortran compiler
  4226. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
  4227. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4228. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4229. ;;
  4230. esac
  4231. ;;
  4232. mingw* | cygwin* | pw32* | os2* | cegcc*)
  4233. # This hack is so that the source file can tell whether it is being
  4234. # built for inclusion in a dll (and should export symbols for example).
  4235. m4_if([$1], [GCJ], [],
  4236. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  4237. case $host_os in
  4238. os2*)
  4239. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
  4240. ;;
  4241. esac
  4242. ;;
  4243. hpux9* | hpux10* | hpux11*)
  4244. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4245. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  4246. # not for PA HP-UX.
  4247. case $host_cpu in
  4248. hppa*64*|ia64*)
  4249. # +Z the default
  4250. ;;
  4251. *)
  4252. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4253. ;;
  4254. esac
  4255. # Is there a better lt_prog_compiler_static that works with the bundled CC?
  4256. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
  4257. ;;
  4258. irix5* | irix6* | nonstopux*)
  4259. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4260. # PIC (with -KPIC) is the default.
  4261. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4262. ;;
  4263. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  4264. case $cc_basename in
  4265. # old Intel for x86_64, which still supported -KPIC.
  4266. ecc*)
  4267. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4268. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4269. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4270. ;;
  4271. # flang / f18. f95 an alias for gfortran or flang on Debian
  4272. flang* | f18* | f95*)
  4273. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4274. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4275. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4276. ;;
  4277. # icc used to be incompatible with GCC.
  4278. # ICC 10 doesn't accept -KPIC any more.
  4279. icc* | ifort*)
  4280. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4281. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4282. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4283. ;;
  4284. # Lahey Fortran 8.1.
  4285. lf95*)
  4286. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4287. _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
  4288. _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
  4289. ;;
  4290. nagfor*)
  4291. # NAG Fortran compiler
  4292. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
  4293. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4294. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4295. ;;
  4296. tcc*)
  4297. # Fabrice Bellard et al's Tiny C Compiler
  4298. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4299. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4300. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4301. ;;
  4302. pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
  4303. # Portland Group compilers (*not* the Pentium gcc compiler,
  4304. # which looks to be a dead project)
  4305. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4306. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4307. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4308. ;;
  4309. ccc*)
  4310. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4311. # All Alpha code is PIC.
  4312. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4313. ;;
  4314. xl* | bgxl* | bgf* | mpixl*)
  4315. # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
  4316. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4317. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  4318. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  4319. ;;
  4320. *)
  4321. case `$CC -V 2>&1 | sed 5q` in
  4322. *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
  4323. # Sun Fortran 8.3 passes all unrecognized flags to the linker
  4324. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4325. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4326. _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
  4327. ;;
  4328. *Sun\ F* | *Sun*Fortran*)
  4329. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4330. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4331. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4332. ;;
  4333. *Sun\ C*)
  4334. # Sun C 5.9
  4335. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4336. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4337. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4338. ;;
  4339. *Intel*\ [[CF]]*Compiler*)
  4340. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4341. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4342. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4343. ;;
  4344. *Portland\ Group*)
  4345. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4346. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4347. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4348. ;;
  4349. esac
  4350. ;;
  4351. esac
  4352. ;;
  4353. newsos6)
  4354. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4355. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4356. ;;
  4357. *nto* | *qnx*)
  4358. # QNX uses GNU C++, but need to define -shared option too, otherwise
  4359. # it will coredump.
  4360. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4361. ;;
  4362. osf3* | osf4* | osf5*)
  4363. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4364. # All OSF/1 code is PIC.
  4365. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4366. ;;
  4367. rdos*)
  4368. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4369. ;;
  4370. solaris*)
  4371. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4372. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4373. case $cc_basename in
  4374. f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
  4375. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
  4376. *)
  4377. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
  4378. esac
  4379. ;;
  4380. sunos4*)
  4381. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4382. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4383. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4384. ;;
  4385. sysv4 | sysv4.2uw2* | sysv4.3*)
  4386. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4387. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4388. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4389. ;;
  4390. sysv4*MP*)
  4391. if test -d /usr/nec; then
  4392. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
  4393. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4394. fi
  4395. ;;
  4396. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  4397. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4398. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4399. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4400. ;;
  4401. unicos*)
  4402. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4403. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4404. ;;
  4405. uts4*)
  4406. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4407. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4408. ;;
  4409. *)
  4410. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4411. ;;
  4412. esac
  4413. fi
  4414. ])
  4415. case $host_os in
  4416. # For platforms that do not support PIC, -DPIC is meaningless:
  4417. *djgpp*)
  4418. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4419. ;;
  4420. *)
  4421. _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
  4422. ;;
  4423. esac
  4424. AC_CACHE_CHECK([for $compiler option to produce PIC],
  4425. [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
  4426. [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
  4427. _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
  4428. #
  4429. # Check to make sure the PIC flag actually works.
  4430. #
  4431. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  4432. _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
  4433. [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
  4434. [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
  4435. [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
  4436. "" | " "*) ;;
  4437. *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
  4438. esac],
  4439. [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4440. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
  4441. fi
  4442. _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
  4443. [Additional compiler flags for building library objects])
  4444. _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
  4445. [How to pass a linker flag through the compiler])
  4446. #
  4447. # Check to make sure the static flag actually works.
  4448. #
  4449. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
  4450. _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
  4451. _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
  4452. $lt_tmp_static_flag,
  4453. [],
  4454. [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
  4455. _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
  4456. [Compiler flag to prevent dynamic linking])
  4457. ])# _LT_COMPILER_PIC
  4458. # _LT_LINKER_SHLIBS([TAGNAME])
  4459. # ----------------------------
  4460. # See if the linker supports building shared libraries.
  4461. m4_defun([_LT_LINKER_SHLIBS],
  4462. [AC_REQUIRE([LT_PATH_LD])dnl
  4463. AC_REQUIRE([LT_PATH_NM])dnl
  4464. m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  4465. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  4466. m4_require([_LT_DECL_EGREP])dnl
  4467. m4_require([_LT_DECL_SED])dnl
  4468. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  4469. m4_require([_LT_TAG_COMPILER])dnl
  4470. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  4471. m4_if([$1], [CXX], [
  4472. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4473. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  4474. case $host_os in
  4475. aix[[4-9]]*)
  4476. # If we're using GNU nm, then we don't want the "-C" option.
  4477. # -C means demangle to GNU nm, but means don't demangle to AIX nm.
  4478. # Without the "-l" option, or with the "-B" option, AIX nm treats
  4479. # weak defined symbols like other global defined symbols, whereas
  4480. # GNU nm marks them as "W".
  4481. # While the 'weak' keyword is ignored in the Export File, we need
  4482. # it in the Import File for the 'aix-soname' feature, so we have
  4483. # to replace the "-B" option with "-P" for AIX nm.
  4484. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  4485. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
  4486. else
  4487. _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
  4488. fi
  4489. ;;
  4490. pw32*)
  4491. _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
  4492. ;;
  4493. cygwin* | mingw* | cegcc*)
  4494. case $cc_basename in
  4495. cl*)
  4496. _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  4497. ;;
  4498. *)
  4499. _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'
  4500. _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  4501. ;;
  4502. esac
  4503. ;;
  4504. linux* | k*bsd*-gnu | gnu*)
  4505. _LT_TAGVAR(link_all_deplibs, $1)=no
  4506. ;;
  4507. *)
  4508. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4509. ;;
  4510. esac
  4511. ], [
  4512. runpath_var=
  4513. _LT_TAGVAR(allow_undefined_flag, $1)=
  4514. _LT_TAGVAR(always_export_symbols, $1)=no
  4515. _LT_TAGVAR(archive_cmds, $1)=
  4516. _LT_TAGVAR(archive_expsym_cmds, $1)=
  4517. _LT_TAGVAR(compiler_needs_object, $1)=no
  4518. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  4519. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  4520. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4521. _LT_TAGVAR(hardcode_automatic, $1)=no
  4522. _LT_TAGVAR(hardcode_direct, $1)=no
  4523. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  4524. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4525. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  4526. _LT_TAGVAR(hardcode_minus_L, $1)=no
  4527. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  4528. _LT_TAGVAR(inherit_rpath, $1)=no
  4529. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  4530. _LT_TAGVAR(module_cmds, $1)=
  4531. _LT_TAGVAR(module_expsym_cmds, $1)=
  4532. _LT_TAGVAR(old_archive_from_new_cmds, $1)=
  4533. _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
  4534. _LT_TAGVAR(thread_safe_flag_spec, $1)=
  4535. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4536. # include_expsyms should be a list of space-separated symbols to be *always*
  4537. # included in the symbol list
  4538. _LT_TAGVAR(include_expsyms, $1)=
  4539. # exclude_expsyms can be an extended regexp of symbols to exclude
  4540. # it will be wrapped by ' (' and ')$', so one must not match beginning or
  4541. # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
  4542. # as well as any symbol that contains 'd'.
  4543. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  4544. # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  4545. # platforms (ab)use it in PIC code, but their linkers get confused if
  4546. # the symbol is explicitly referenced. Since portable code cannot
  4547. # rely on this symbol name, it's probably fine to never include it in
  4548. # preloaded symbol tables.
  4549. # Exclude shared library initialization/finalization symbols.
  4550. dnl Note also adjust exclude_expsyms for C++ above.
  4551. extract_expsyms_cmds=
  4552. case $host_os in
  4553. cygwin* | mingw* | pw32* | cegcc*)
  4554. # FIXME: the MSVC++ port hasn't been tested in a loooong time
  4555. # When not using gcc, we currently assume that we are using
  4556. # Microsoft Visual C++.
  4557. if test yes != "$GCC"; then
  4558. with_gnu_ld=no
  4559. fi
  4560. ;;
  4561. interix*)
  4562. # we just hope/assume this is gcc and not c89 (= MSVC++)
  4563. with_gnu_ld=yes
  4564. ;;
  4565. openbsd* | bitrig*)
  4566. with_gnu_ld=no
  4567. ;;
  4568. linux* | k*bsd*-gnu | gnu*)
  4569. _LT_TAGVAR(link_all_deplibs, $1)=no
  4570. ;;
  4571. esac
  4572. _LT_TAGVAR(ld_shlibs, $1)=yes
  4573. # On some targets, GNU ld is compatible enough with the native linker
  4574. # that we're better off using the native interface for both.
  4575. lt_use_gnu_ld_interface=no
  4576. if test yes = "$with_gnu_ld"; then
  4577. case $host_os in
  4578. aix*)
  4579. # The AIX port of GNU ld has always aspired to compatibility
  4580. # with the native linker. However, as the warning in the GNU ld
  4581. # block says, versions before 2.19.5* couldn't really create working
  4582. # shared libraries, regardless of the interface used.
  4583. case `$LD -v 2>&1` in
  4584. *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
  4585. *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
  4586. *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
  4587. *)
  4588. lt_use_gnu_ld_interface=yes
  4589. ;;
  4590. esac
  4591. ;;
  4592. *)
  4593. lt_use_gnu_ld_interface=yes
  4594. ;;
  4595. esac
  4596. fi
  4597. if test yes = "$lt_use_gnu_ld_interface"; then
  4598. # If archive_cmds runs LD, not CC, wlarc should be empty
  4599. wlarc='$wl'
  4600. # Set some defaults for GNU ld with shared library support. These
  4601. # are reset later if shared libraries are not supported. Putting them
  4602. # here allows them to be overridden if necessary.
  4603. runpath_var=LD_RUN_PATH
  4604. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  4605. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  4606. # ancient GNU ld didn't support --whole-archive et. al.
  4607. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
  4608. _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
  4609. else
  4610. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4611. fi
  4612. supports_anon_versioning=no
  4613. case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
  4614. *GNU\ gold*) supports_anon_versioning=yes ;;
  4615. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
  4616. *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
  4617. *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
  4618. *\ 2.11.*) ;; # other 2.11 versions
  4619. *) supports_anon_versioning=yes ;;
  4620. esac
  4621. # See if GNU ld supports shared libraries.
  4622. case $host_os in
  4623. aix[[3-9]]*)
  4624. # On AIX/PPC, the GNU linker is very broken
  4625. if test ia64 != "$host_cpu"; then
  4626. _LT_TAGVAR(ld_shlibs, $1)=no
  4627. cat <<_LT_EOF 1>&2
  4628. *** Warning: the GNU linker, at least up to release 2.19, is reported
  4629. *** to be unable to reliably create shared libraries on AIX.
  4630. *** Therefore, libtool is disabling shared libraries support. If you
  4631. *** really care for shared libraries, you may want to install binutils
  4632. *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
  4633. *** You will then need to restart the configuration process.
  4634. _LT_EOF
  4635. fi
  4636. ;;
  4637. amigaos*)
  4638. case $host_cpu in
  4639. powerpc)
  4640. # see comment about AmigaOS4 .so support
  4641. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4642. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  4643. ;;
  4644. m68k)
  4645. _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)'
  4646. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4647. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4648. ;;
  4649. esac
  4650. ;;
  4651. beos*)
  4652. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4653. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4654. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  4655. # support --undefined. This deserves some investigation. FIXME
  4656. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4657. else
  4658. _LT_TAGVAR(ld_shlibs, $1)=no
  4659. fi
  4660. ;;
  4661. cygwin* | mingw* | pw32* | cegcc*)
  4662. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  4663. # as there is no search path for DLLs.
  4664. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4665. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
  4666. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4667. _LT_TAGVAR(always_export_symbols, $1)=no
  4668. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4669. _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'
  4670. _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  4671. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  4672. _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'
  4673. # If the export-symbols file already is a .def file, use it as
  4674. # is; otherwise, prepend EXPORTS...
  4675. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  4676. cp $export_symbols $output_objdir/$soname.def;
  4677. else
  4678. echo EXPORTS > $output_objdir/$soname.def;
  4679. cat $export_symbols >> $output_objdir/$soname.def;
  4680. fi~
  4681. $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  4682. else
  4683. _LT_TAGVAR(ld_shlibs, $1)=no
  4684. fi
  4685. ;;
  4686. haiku*)
  4687. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4688. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4689. ;;
  4690. os2*)
  4691. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4692. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4693. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4694. shrext_cmds=.dll
  4695. _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  4696. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  4697. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  4698. $ECHO EXPORTS >> $output_objdir/$libname.def~
  4699. emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
  4700. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  4701. emximp -o $lib $output_objdir/$libname.def'
  4702. _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  4703. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  4704. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  4705. $ECHO EXPORTS >> $output_objdir/$libname.def~
  4706. prefix_cmds="$SED"~
  4707. if test EXPORTS = "`$SED 1q $export_symbols`"; then
  4708. prefix_cmds="$prefix_cmds -e 1d";
  4709. fi~
  4710. prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
  4711. cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
  4712. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  4713. emximp -o $lib $output_objdir/$libname.def'
  4714. _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
  4715. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4716. ;;
  4717. interix[[3-9]]*)
  4718. _LT_TAGVAR(hardcode_direct, $1)=no
  4719. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4720. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  4721. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  4722. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  4723. # Instead, shared libraries are loaded at an image base (0x10000000 by
  4724. # default) and relocated if they conflict, which is a slow very memory
  4725. # consuming and fragmenting process. To avoid this, we pick a random,
  4726. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  4727. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  4728. _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'
  4729. _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'
  4730. ;;
  4731. gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
  4732. tmp_diet=no
  4733. if test linux-dietlibc = "$host_os"; then
  4734. case $cc_basename in
  4735. diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
  4736. esac
  4737. fi
  4738. if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
  4739. && test no = "$tmp_diet"
  4740. then
  4741. tmp_addflag=' $pic_flag'
  4742. tmp_sharedflag='-shared'
  4743. case $cc_basename,$host_cpu in
  4744. pgcc*) # Portland Group C compiler
  4745. _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'
  4746. tmp_addflag=' $pic_flag'
  4747. ;;
  4748. pgf77* | pgf90* | pgf95* | pgfortran*)
  4749. # Portland Group f77 and f90 compilers
  4750. _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'
  4751. tmp_addflag=' $pic_flag -Mnomain' ;;
  4752. ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
  4753. tmp_addflag=' -i_dynamic' ;;
  4754. efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
  4755. tmp_addflag=' -i_dynamic -nofor_main' ;;
  4756. ifc* | ifort*) # Intel Fortran compiler
  4757. tmp_addflag=' -nofor_main' ;;
  4758. lf95*) # Lahey Fortran 8.1
  4759. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4760. tmp_sharedflag='--shared' ;;
  4761. nagfor*) # NAGFOR 5.3
  4762. tmp_sharedflag='-Wl,-shared' ;;
  4763. xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
  4764. tmp_sharedflag='-qmkshrobj'
  4765. tmp_addflag= ;;
  4766. nvcc*) # Cuda Compiler Driver 2.2
  4767. _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'
  4768. _LT_TAGVAR(compiler_needs_object, $1)=yes
  4769. ;;
  4770. esac
  4771. case `$CC -V 2>&1 | sed 5q` in
  4772. *Sun\ C*) # Sun C 5.9
  4773. _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'
  4774. _LT_TAGVAR(compiler_needs_object, $1)=yes
  4775. tmp_sharedflag='-G' ;;
  4776. *Sun\ F*) # Sun Fortran 8.3
  4777. tmp_sharedflag='-G' ;;
  4778. esac
  4779. _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4780. if test yes = "$supports_anon_versioning"; then
  4781. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  4782. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4783. echo "local: *; };" >> $output_objdir/$libname.ver~
  4784. $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
  4785. fi
  4786. case $cc_basename in
  4787. tcc*)
  4788. _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
  4789. ;;
  4790. xlf* | bgf* | bgxlf* | mpixlf*)
  4791. # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
  4792. _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
  4793. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  4794. _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
  4795. if test yes = "$supports_anon_versioning"; then
  4796. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  4797. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4798. echo "local: *; };" >> $output_objdir/$libname.ver~
  4799. $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
  4800. fi
  4801. ;;
  4802. esac
  4803. else
  4804. _LT_TAGVAR(ld_shlibs, $1)=no
  4805. fi
  4806. ;;
  4807. netbsd* | netbsdelf*-gnu)
  4808. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  4809. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  4810. wlarc=
  4811. else
  4812. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4813. _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'
  4814. fi
  4815. ;;
  4816. solaris*)
  4817. if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
  4818. _LT_TAGVAR(ld_shlibs, $1)=no
  4819. cat <<_LT_EOF 1>&2
  4820. *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  4821. *** create shared libraries on Solaris systems. Therefore, libtool
  4822. *** is disabling shared libraries support. We urge you to upgrade GNU
  4823. *** binutils to release 2.9.1 or newer. Another option is to modify
  4824. *** your PATH or compiler configuration so that the native linker is
  4825. *** used, and then restart.
  4826. _LT_EOF
  4827. elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4828. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4829. _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'
  4830. else
  4831. _LT_TAGVAR(ld_shlibs, $1)=no
  4832. fi
  4833. ;;
  4834. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
  4835. case `$LD -v 2>&1` in
  4836. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
  4837. _LT_TAGVAR(ld_shlibs, $1)=no
  4838. cat <<_LT_EOF 1>&2
  4839. *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
  4840. *** reliably create shared libraries on SCO systems. Therefore, libtool
  4841. *** is disabling shared libraries support. We urge you to upgrade GNU
  4842. *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
  4843. *** your PATH or compiler configuration so that the native linker is
  4844. *** used, and then restart.
  4845. _LT_EOF
  4846. ;;
  4847. *)
  4848. # For security reasons, it is highly recommended that you always
  4849. # use absolute paths for naming shared libraries, and exclude the
  4850. # DT_RUNPATH tag from executables and libraries. But doing so
  4851. # requires that you compile everything twice, which is a pain.
  4852. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4853. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  4854. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4855. _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'
  4856. else
  4857. _LT_TAGVAR(ld_shlibs, $1)=no
  4858. fi
  4859. ;;
  4860. esac
  4861. ;;
  4862. sunos4*)
  4863. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4864. wlarc=
  4865. _LT_TAGVAR(hardcode_direct, $1)=yes
  4866. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4867. ;;
  4868. *)
  4869. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4870. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4871. _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'
  4872. else
  4873. _LT_TAGVAR(ld_shlibs, $1)=no
  4874. fi
  4875. ;;
  4876. esac
  4877. if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
  4878. runpath_var=
  4879. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4880. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  4881. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4882. fi
  4883. else
  4884. # PORTME fill in a description of your system's linker (not GNU ld)
  4885. case $host_os in
  4886. aix3*)
  4887. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4888. _LT_TAGVAR(always_export_symbols, $1)=yes
  4889. _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'
  4890. # Note: this linker hardcodes the directories in LIBPATH if there
  4891. # are no directories specified by -L.
  4892. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4893. if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
  4894. # Neither direct hardcoding nor static linking is supported with a
  4895. # broken collect2.
  4896. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  4897. fi
  4898. ;;
  4899. aix[[4-9]]*)
  4900. if test ia64 = "$host_cpu"; then
  4901. # On IA64, the linker does run time linking by default, so we don't
  4902. # have to do anything special.
  4903. aix_use_runtimelinking=no
  4904. exp_sym_flag='-Bexport'
  4905. no_entry_flag=
  4906. else
  4907. # If we're using GNU nm, then we don't want the "-C" option.
  4908. # -C means demangle to GNU nm, but means don't demangle to AIX nm.
  4909. # Without the "-l" option, or with the "-B" option, AIX nm treats
  4910. # weak defined symbols like other global defined symbols, whereas
  4911. # GNU nm marks them as "W".
  4912. # While the 'weak' keyword is ignored in the Export File, we need
  4913. # it in the Import File for the 'aix-soname' feature, so we have
  4914. # to replace the "-B" option with "-P" for AIX nm.
  4915. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  4916. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
  4917. else
  4918. _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
  4919. fi
  4920. aix_use_runtimelinking=no
  4921. # Test if we are trying to use run time linking or normal
  4922. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  4923. # have runtime linking enabled, and use it for executables.
  4924. # For shared libraries, we enable/disable runtime linking
  4925. # depending on the kind of the shared library created -
  4926. # when "with_aix_soname,aix_use_runtimelinking" is:
  4927. # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
  4928. # "aix,yes" lib.so shared, rtl:yes, for executables
  4929. # lib.a static archive
  4930. # "both,no" lib.so.V(shr.o) shared, rtl:yes
  4931. # lib.a(lib.so.V) shared, rtl:no, for executables
  4932. # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
  4933. # lib.a(lib.so.V) shared, rtl:no
  4934. # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
  4935. # lib.a static archive
  4936. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  4937. for ld_flag in $LDFLAGS; do
  4938. if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
  4939. aix_use_runtimelinking=yes
  4940. break
  4941. fi
  4942. done
  4943. if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
  4944. # With aix-soname=svr4, we create the lib.so.V shared archives only,
  4945. # so we don't have lib.a shared libs to link our executables.
  4946. # We have to force runtime linking in this case.
  4947. aix_use_runtimelinking=yes
  4948. LDFLAGS="$LDFLAGS -Wl,-brtl"
  4949. fi
  4950. ;;
  4951. esac
  4952. exp_sym_flag='-bexport'
  4953. no_entry_flag='-bnoentry'
  4954. fi
  4955. # When large executables or shared objects are built, AIX ld can
  4956. # have problems creating the table of contents. If linking a library
  4957. # or program results in "error TOC overflow" add -mminimal-toc to
  4958. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  4959. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  4960. _LT_TAGVAR(archive_cmds, $1)=''
  4961. _LT_TAGVAR(hardcode_direct, $1)=yes
  4962. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4963. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  4964. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4965. _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
  4966. case $with_aix_soname,$aix_use_runtimelinking in
  4967. aix,*) ;; # traditional, no import file
  4968. svr4,* | *,yes) # use import file
  4969. # The Import File defines what to hardcode.
  4970. _LT_TAGVAR(hardcode_direct, $1)=no
  4971. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  4972. ;;
  4973. esac
  4974. if test yes = "$GCC"; then
  4975. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  4976. # We only want to do this on AIX 4.2 and lower, the check
  4977. # below for broken collect2 doesn't work under 4.3+
  4978. collect2name=`$CC -print-prog-name=collect2`
  4979. if test -f "$collect2name" &&
  4980. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  4981. then
  4982. # We have reworked collect2
  4983. :
  4984. else
  4985. # We have old collect2
  4986. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  4987. # It fails to find uninstalled libraries when the uninstalled
  4988. # path is not listed in the libpath. Setting hardcode_minus_L
  4989. # to unsupported forces relinking
  4990. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4991. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4992. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  4993. fi
  4994. ;;
  4995. esac
  4996. shared_flag='-shared'
  4997. if test yes = "$aix_use_runtimelinking"; then
  4998. shared_flag="$shared_flag "'$wl-G'
  4999. fi
  5000. # Need to ensure runtime linking is disabled for the traditional
  5001. # shared library, or the linker may eventually find shared libraries
  5002. # /with/ Import File - we do not want to mix them.
  5003. shared_flag_aix='-shared'
  5004. shared_flag_svr4='-shared $wl-G'
  5005. else
  5006. # not using gcc
  5007. if test ia64 = "$host_cpu"; then
  5008. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  5009. # chokes on -Wl,-G. The following line is correct:
  5010. shared_flag='-G'
  5011. else
  5012. if test yes = "$aix_use_runtimelinking"; then
  5013. shared_flag='$wl-G'
  5014. else
  5015. shared_flag='$wl-bM:SRE'
  5016. fi
  5017. shared_flag_aix='$wl-bM:SRE'
  5018. shared_flag_svr4='$wl-G'
  5019. fi
  5020. fi
  5021. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
  5022. # It seems that -bexpall does not export symbols beginning with
  5023. # underscore (_), so it is better to generate a list of symbols to export.
  5024. _LT_TAGVAR(always_export_symbols, $1)=yes
  5025. if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
  5026. # Warning - without using the other runtime loading flags (-brtl),
  5027. # -berok will link without error, but may produce a broken library.
  5028. _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
  5029. # Determine the default libpath from the value encoded in an
  5030. # empty executable.
  5031. _LT_SYS_MODULE_PATH_AIX([$1])
  5032. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
  5033. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
  5034. else
  5035. if test ia64 = "$host_cpu"; then
  5036. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
  5037. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  5038. _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"
  5039. else
  5040. # Determine the default libpath from the value encoded in an
  5041. # empty executable.
  5042. _LT_SYS_MODULE_PATH_AIX([$1])
  5043. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
  5044. # Warning - without using the other run time loading flags,
  5045. # -berok will link without error, but may produce a broken library.
  5046. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
  5047. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
  5048. if test yes = "$with_gnu_ld"; then
  5049. # We only use this code for GNU lds that support --whole-archive.
  5050. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
  5051. else
  5052. # Exported symbols can be pulled into shared objects from archives
  5053. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  5054. fi
  5055. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5056. _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
  5057. # -brtl affects multiple linker settings, -berok does not and is overridden later
  5058. compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
  5059. if test svr4 != "$with_aix_soname"; then
  5060. # This is similar to how AIX traditionally builds its shared libraries.
  5061. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
  5062. fi
  5063. if test aix != "$with_aix_soname"; then
  5064. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
  5065. else
  5066. # used by -dlpreopen to get the symbols
  5067. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
  5068. fi
  5069. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
  5070. fi
  5071. fi
  5072. ;;
  5073. amigaos*)
  5074. case $host_cpu in
  5075. powerpc)
  5076. # see comment about AmigaOS4 .so support
  5077. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  5078. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  5079. ;;
  5080. m68k)
  5081. _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)'
  5082. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5083. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5084. ;;
  5085. esac
  5086. ;;
  5087. bsdi[[45]]*)
  5088. _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
  5089. ;;
  5090. cygwin* | mingw* | pw32* | cegcc*)
  5091. # When not using gcc, we currently assume that we are using
  5092. # Microsoft Visual C++.
  5093. # hardcode_libdir_flag_spec is actually meaningless, as there is
  5094. # no search path for DLLs.
  5095. case $cc_basename in
  5096. cl*)
  5097. # Native MSVC
  5098. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  5099. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5100. _LT_TAGVAR(always_export_symbols, $1)=yes
  5101. _LT_TAGVAR(file_list_spec, $1)='@'
  5102. # Tell ltmain to make .lib files, not .a files.
  5103. libext=lib
  5104. # Tell ltmain to make .dll files, not .so files.
  5105. shrext_cmds=.dll
  5106. # FIXME: Setting linknames here is a bad hack.
  5107. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
  5108. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  5109. cp "$export_symbols" "$output_objdir/$soname.def";
  5110. echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
  5111. else
  5112. $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
  5113. fi~
  5114. $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  5115. linknames='
  5116. # The linker will not automatically build a static lib if we build a DLL.
  5117. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  5118. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5119. _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  5120. _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'
  5121. # Don't use ranlib
  5122. _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  5123. _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  5124. lt_tool_outputfile="@TOOL_OUTPUT@"~
  5125. case $lt_outputfile in
  5126. *.exe|*.EXE) ;;
  5127. *)
  5128. lt_outputfile=$lt_outputfile.exe
  5129. lt_tool_outputfile=$lt_tool_outputfile.exe
  5130. ;;
  5131. esac~
  5132. if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
  5133. $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  5134. $RM "$lt_outputfile.manifest";
  5135. fi'
  5136. ;;
  5137. *)
  5138. # Assume MSVC wrapper
  5139. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  5140. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5141. # Tell ltmain to make .lib files, not .a files.
  5142. libext=lib
  5143. # Tell ltmain to make .dll files, not .so files.
  5144. shrext_cmds=.dll
  5145. # FIXME: Setting linknames here is a bad hack.
  5146. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
  5147. # The linker will automatically build a .lib file if we build a DLL.
  5148. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  5149. # FIXME: Should let the user specify the lib program.
  5150. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
  5151. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5152. ;;
  5153. esac
  5154. ;;
  5155. darwin* | rhapsody*)
  5156. _LT_DARWIN_LINKER_FEATURES($1)
  5157. ;;
  5158. dgux*)
  5159. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5160. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5161. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5162. ;;
  5163. # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  5164. # support. Future versions do this automatically, but an explicit c++rt0.o
  5165. # does not break anything, and helps significantly (at the cost of a little
  5166. # extra space).
  5167. freebsd2.2*)
  5168. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
  5169. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5170. _LT_TAGVAR(hardcode_direct, $1)=yes
  5171. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5172. ;;
  5173. # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  5174. freebsd2.*)
  5175. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  5176. _LT_TAGVAR(hardcode_direct, $1)=yes
  5177. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5178. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5179. ;;
  5180. # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  5181. freebsd* | dragonfly*)
  5182. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5183. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5184. _LT_TAGVAR(hardcode_direct, $1)=yes
  5185. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5186. ;;
  5187. hpux9*)
  5188. if test yes = "$GCC"; then
  5189. _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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
  5190. else
  5191. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
  5192. fi
  5193. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  5194. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5195. _LT_TAGVAR(hardcode_direct, $1)=yes
  5196. # hardcode_minus_L: Not really in the search PATH,
  5197. # but as the default location of the library.
  5198. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5199. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  5200. ;;
  5201. hpux10*)
  5202. if test yes,no = "$GCC,$with_gnu_ld"; then
  5203. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  5204. else
  5205. _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
  5206. fi
  5207. if test no = "$with_gnu_ld"; then
  5208. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  5209. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5210. _LT_TAGVAR(hardcode_direct, $1)=yes
  5211. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5212. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  5213. # hardcode_minus_L: Not really in the search PATH,
  5214. # but as the default location of the library.
  5215. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5216. fi
  5217. ;;
  5218. hpux11*)
  5219. if test yes,no = "$GCC,$with_gnu_ld"; then
  5220. case $host_cpu in
  5221. hppa*64*)
  5222. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
  5223. ;;
  5224. ia64*)
  5225. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  5226. ;;
  5227. *)
  5228. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  5229. ;;
  5230. esac
  5231. else
  5232. case $host_cpu in
  5233. hppa*64*)
  5234. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
  5235. ;;
  5236. ia64*)
  5237. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  5238. ;;
  5239. *)
  5240. m4_if($1, [], [
  5241. # Older versions of the 11.00 compiler do not understand -b yet
  5242. # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
  5243. _LT_LINKER_OPTION([if $CC understands -b],
  5244. _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
  5245. [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
  5246. [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
  5247. [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
  5248. ;;
  5249. esac
  5250. fi
  5251. if test no = "$with_gnu_ld"; then
  5252. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  5253. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5254. case $host_cpu in
  5255. hppa*64*|ia64*)
  5256. _LT_TAGVAR(hardcode_direct, $1)=no
  5257. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5258. ;;
  5259. *)
  5260. _LT_TAGVAR(hardcode_direct, $1)=yes
  5261. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5262. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  5263. # hardcode_minus_L: Not really in the search PATH,
  5264. # but as the default location of the library.
  5265. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5266. ;;
  5267. esac
  5268. fi
  5269. ;;
  5270. irix5* | irix6* | nonstopux*)
  5271. if test yes = "$GCC"; then
  5272. _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'
  5273. # Try to use the -exported_symbol ld option, if it does not
  5274. # work, assume that -exports_file does not work either and
  5275. # implicitly export all symbols.
  5276. # This should be the same for all languages, so no per-tag cache variable.
  5277. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
  5278. [lt_cv_irix_exported_symbol],
  5279. [save_LDFLAGS=$LDFLAGS
  5280. LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
  5281. AC_LINK_IFELSE(
  5282. [AC_LANG_SOURCE(
  5283. [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
  5284. [C++], [[int foo (void) { return 0; }]],
  5285. [Fortran 77], [[
  5286. subroutine foo
  5287. end]],
  5288. [Fortran], [[
  5289. subroutine foo
  5290. end]])])],
  5291. [lt_cv_irix_exported_symbol=yes],
  5292. [lt_cv_irix_exported_symbol=no])
  5293. LDFLAGS=$save_LDFLAGS])
  5294. if test yes = "$lt_cv_irix_exported_symbol"; then
  5295. _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'
  5296. fi
  5297. _LT_TAGVAR(link_all_deplibs, $1)=no
  5298. else
  5299. _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'
  5300. _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'
  5301. fi
  5302. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  5303. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5304. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5305. _LT_TAGVAR(inherit_rpath, $1)=yes
  5306. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5307. ;;
  5308. linux*)
  5309. case $cc_basename in
  5310. tcc*)
  5311. # Fabrice Bellard et al's Tiny C Compiler
  5312. _LT_TAGVAR(ld_shlibs, $1)=yes
  5313. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5314. ;;
  5315. esac
  5316. ;;
  5317. netbsd* | netbsdelf*-gnu)
  5318. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  5319. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
  5320. else
  5321. _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
  5322. fi
  5323. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5324. _LT_TAGVAR(hardcode_direct, $1)=yes
  5325. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5326. ;;
  5327. newsos6)
  5328. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5329. _LT_TAGVAR(hardcode_direct, $1)=yes
  5330. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5331. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5332. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5333. ;;
  5334. *nto* | *qnx*)
  5335. ;;
  5336. openbsd* | bitrig*)
  5337. if test -f /usr/libexec/ld.so; then
  5338. _LT_TAGVAR(hardcode_direct, $1)=yes
  5339. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5340. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5341. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
  5342. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5343. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
  5344. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  5345. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  5346. else
  5347. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5348. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  5349. fi
  5350. else
  5351. _LT_TAGVAR(ld_shlibs, $1)=no
  5352. fi
  5353. ;;
  5354. os2*)
  5355. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5356. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5357. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5358. shrext_cmds=.dll
  5359. _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  5360. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  5361. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  5362. $ECHO EXPORTS >> $output_objdir/$libname.def~
  5363. emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
  5364. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  5365. emximp -o $lib $output_objdir/$libname.def'
  5366. _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  5367. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  5368. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  5369. $ECHO EXPORTS >> $output_objdir/$libname.def~
  5370. prefix_cmds="$SED"~
  5371. if test EXPORTS = "`$SED 1q $export_symbols`"; then
  5372. prefix_cmds="$prefix_cmds -e 1d";
  5373. fi~
  5374. prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
  5375. cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
  5376. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  5377. emximp -o $lib $output_objdir/$libname.def'
  5378. _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
  5379. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5380. ;;
  5381. osf3*)
  5382. if test yes = "$GCC"; then
  5383. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
  5384. _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'
  5385. else
  5386. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  5387. _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'
  5388. fi
  5389. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  5390. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5391. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5392. ;;
  5393. osf4* | osf5*) # as osf3* with the addition of -msym flag
  5394. if test yes = "$GCC"; then
  5395. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
  5396. _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'
  5397. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5398. else
  5399. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  5400. _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'
  5401. _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~
  5402. $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'
  5403. # Both c and cxx compiler support -rpath directly
  5404. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  5405. fi
  5406. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  5407. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5408. ;;
  5409. solaris*)
  5410. _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
  5411. if test yes = "$GCC"; then
  5412. wlarc='$wl'
  5413. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
  5414. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5415. $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'
  5416. else
  5417. case `$CC -V 2>&1` in
  5418. *"Compilers 5.0"*)
  5419. wlarc=''
  5420. _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5421. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5422. $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
  5423. ;;
  5424. *)
  5425. wlarc='$wl'
  5426. _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
  5427. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5428. $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
  5429. ;;
  5430. esac
  5431. fi
  5432. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5433. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5434. case $host_os in
  5435. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  5436. *)
  5437. # The compiler driver will combine and reorder linker options,
  5438. # but understands '-z linker_flag'. GCC discards it without '$wl',
  5439. # but is careful enough not to reorder.
  5440. # Supported since Solaris 2.6 (maybe 2.5.1?)
  5441. if test yes = "$GCC"; then
  5442. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
  5443. else
  5444. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  5445. fi
  5446. ;;
  5447. esac
  5448. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5449. ;;
  5450. sunos4*)
  5451. if test sequent = "$host_vendor"; then
  5452. # Use $CC to link under sequent, because it throws in some extra .o
  5453. # files that make .init and .fini sections work.
  5454. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
  5455. else
  5456. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
  5457. fi
  5458. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5459. _LT_TAGVAR(hardcode_direct, $1)=yes
  5460. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5461. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5462. ;;
  5463. sysv4)
  5464. case $host_vendor in
  5465. sni)
  5466. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5467. _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
  5468. ;;
  5469. siemens)
  5470. ## LD is ld it makes a PLAMLIB
  5471. ## CC just makes a GrossModule.
  5472. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  5473. _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
  5474. _LT_TAGVAR(hardcode_direct, $1)=no
  5475. ;;
  5476. motorola)
  5477. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5478. _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
  5479. ;;
  5480. esac
  5481. runpath_var='LD_RUN_PATH'
  5482. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5483. ;;
  5484. sysv4.3*)
  5485. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5486. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5487. _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
  5488. ;;
  5489. sysv4*MP*)
  5490. if test -d /usr/nec; then
  5491. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5492. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5493. runpath_var=LD_RUN_PATH
  5494. hardcode_runpath_var=yes
  5495. _LT_TAGVAR(ld_shlibs, $1)=yes
  5496. fi
  5497. ;;
  5498. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  5499. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  5500. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5501. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5502. runpath_var='LD_RUN_PATH'
  5503. if test yes = "$GCC"; then
  5504. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5505. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5506. else
  5507. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5508. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5509. fi
  5510. ;;
  5511. sysv5* | sco3.2v5* | sco5v6*)
  5512. # Note: We CANNOT use -z defs as we might desire, because we do not
  5513. # link with -lc, and that would cause any symbols used from libc to
  5514. # always be unresolved, which means just about no library would
  5515. # ever link correctly. If we're not using GNU ld we use -z text
  5516. # though, which does catch some bad symbols but isn't as heavy-handed
  5517. # as -z defs.
  5518. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  5519. _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
  5520. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5521. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5522. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
  5523. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5524. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5525. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
  5526. runpath_var='LD_RUN_PATH'
  5527. if test yes = "$GCC"; then
  5528. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5529. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5530. else
  5531. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5532. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5533. fi
  5534. ;;
  5535. uts4*)
  5536. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5537. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5538. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5539. ;;
  5540. *)
  5541. _LT_TAGVAR(ld_shlibs, $1)=no
  5542. ;;
  5543. esac
  5544. if test sni = "$host_vendor"; then
  5545. case $host in
  5546. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  5547. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
  5548. ;;
  5549. esac
  5550. fi
  5551. fi
  5552. ])
  5553. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  5554. test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
  5555. _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
  5556. _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
  5557. _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
  5558. _LT_DECL([], [extract_expsyms_cmds], [2],
  5559. [The commands to extract the exported symbol list from a shared archive])
  5560. #
  5561. # Do we need to explicitly link libc?
  5562. #
  5563. case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
  5564. x|xyes)
  5565. # Assume -lc should be added
  5566. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5567. if test yes,yes = "$GCC,$enable_shared"; then
  5568. case $_LT_TAGVAR(archive_cmds, $1) in
  5569. *'~'*)
  5570. # FIXME: we may have to deal with multi-command sequences.
  5571. ;;
  5572. '$CC '*)
  5573. # Test whether the compiler implicitly links with -lc since on some
  5574. # systems, -lgcc has to come before -lc. If gcc already passes -lc
  5575. # to ld, don't add -lc before -lgcc.
  5576. AC_CACHE_CHECK([whether -lc should be explicitly linked in],
  5577. [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
  5578. [$RM conftest*
  5579. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  5580. if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
  5581. soname=conftest
  5582. lib=conftest
  5583. libobjs=conftest.$ac_objext
  5584. deplibs=
  5585. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
  5586. pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
  5587. compiler_flags=-v
  5588. linker_flags=-v
  5589. verstring=
  5590. output_objdir=.
  5591. libname=conftest
  5592. lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
  5593. _LT_TAGVAR(allow_undefined_flag, $1)=
  5594. if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
  5595. then
  5596. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5597. else
  5598. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5599. fi
  5600. _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
  5601. else
  5602. cat conftest.err 1>&5
  5603. fi
  5604. $RM conftest*
  5605. ])
  5606. _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
  5607. ;;
  5608. esac
  5609. fi
  5610. ;;
  5611. esac
  5612. _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
  5613. [Whether or not to add -lc for building shared libraries])
  5614. _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
  5615. [enable_shared_with_static_runtimes], [0],
  5616. [Whether or not to disallow shared libs when runtime libs are static])
  5617. _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
  5618. [Compiler flag to allow reflexive dlopens])
  5619. _LT_TAGDECL([], [whole_archive_flag_spec], [1],
  5620. [Compiler flag to generate shared objects directly from archives])
  5621. _LT_TAGDECL([], [compiler_needs_object], [1],
  5622. [Whether the compiler copes with passing no objects directly])
  5623. _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
  5624. [Create an old-style archive from a shared archive])
  5625. _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
  5626. [Create a temporary old-style archive to link instead of a shared archive])
  5627. _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
  5628. _LT_TAGDECL([], [archive_expsym_cmds], [2])
  5629. _LT_TAGDECL([], [module_cmds], [2],
  5630. [Commands used to build a loadable module if different from building
  5631. a shared archive.])
  5632. _LT_TAGDECL([], [module_expsym_cmds], [2])
  5633. _LT_TAGDECL([], [with_gnu_ld], [1],
  5634. [Whether we are building with GNU ld or not])
  5635. _LT_TAGDECL([], [allow_undefined_flag], [1],
  5636. [Flag that allows shared libraries with undefined symbols to be built])
  5637. _LT_TAGDECL([], [no_undefined_flag], [1],
  5638. [Flag that enforces no undefined symbols])
  5639. _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
  5640. [Flag to hardcode $libdir into a binary during linking.
  5641. This must work even if $libdir does not exist])
  5642. _LT_TAGDECL([], [hardcode_libdir_separator], [1],
  5643. [Whether we need a single "-rpath" flag with a separated argument])
  5644. _LT_TAGDECL([], [hardcode_direct], [0],
  5645. [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
  5646. DIR into the resulting binary])
  5647. _LT_TAGDECL([], [hardcode_direct_absolute], [0],
  5648. [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
  5649. DIR into the resulting binary and the resulting library dependency is
  5650. "absolute", i.e impossible to change by setting $shlibpath_var if the
  5651. library is relocated])
  5652. _LT_TAGDECL([], [hardcode_minus_L], [0],
  5653. [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
  5654. into the resulting binary])
  5655. _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
  5656. [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
  5657. into the resulting binary])
  5658. _LT_TAGDECL([], [hardcode_automatic], [0],
  5659. [Set to "yes" if building a shared library automatically hardcodes DIR
  5660. into the library and all subsequent libraries and executables linked
  5661. against it])
  5662. _LT_TAGDECL([], [inherit_rpath], [0],
  5663. [Set to yes if linker adds runtime paths of dependent libraries
  5664. to runtime path list])
  5665. _LT_TAGDECL([], [link_all_deplibs], [0],
  5666. [Whether libtool must link a program against all its dependency libraries])
  5667. _LT_TAGDECL([], [always_export_symbols], [0],
  5668. [Set to "yes" if exported symbols are required])
  5669. _LT_TAGDECL([], [export_symbols_cmds], [2],
  5670. [The commands to list exported symbols])
  5671. _LT_TAGDECL([], [exclude_expsyms], [1],
  5672. [Symbols that should not be listed in the preloaded symbols])
  5673. _LT_TAGDECL([], [include_expsyms], [1],
  5674. [Symbols that must always be exported])
  5675. _LT_TAGDECL([], [prelink_cmds], [2],
  5676. [Commands necessary for linking programs (against libraries) with templates])
  5677. _LT_TAGDECL([], [postlink_cmds], [2],
  5678. [Commands necessary for finishing linking programs])
  5679. _LT_TAGDECL([], [file_list_spec], [1],
  5680. [Specify filename containing input files])
  5681. dnl FIXME: Not yet implemented
  5682. dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
  5683. dnl [Compiler flag to generate thread safe objects])
  5684. ])# _LT_LINKER_SHLIBS
  5685. # _LT_LANG_C_CONFIG([TAG])
  5686. # ------------------------
  5687. # Ensure that the configuration variables for a C compiler are suitably
  5688. # defined. These variables are subsequently used by _LT_CONFIG to write
  5689. # the compiler configuration to 'libtool'.
  5690. m4_defun([_LT_LANG_C_CONFIG],
  5691. [m4_require([_LT_DECL_EGREP])dnl
  5692. lt_save_CC=$CC
  5693. AC_LANG_PUSH(C)
  5694. # Source file extension for C test sources.
  5695. ac_ext=c
  5696. # Object file extension for compiled C test sources.
  5697. objext=o
  5698. _LT_TAGVAR(objext, $1)=$objext
  5699. # Code to be used in simple compile tests
  5700. lt_simple_compile_test_code="int some_variable = 0;"
  5701. # Code to be used in simple link tests
  5702. lt_simple_link_test_code='int main(){return(0);}'
  5703. _LT_TAG_COMPILER
  5704. # Save the default compiler, since it gets overwritten when the other
  5705. # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
  5706. compiler_DEFAULT=$CC
  5707. # save warnings/boilerplate of simple test code
  5708. _LT_COMPILER_BOILERPLATE
  5709. _LT_LINKER_BOILERPLATE
  5710. if test -n "$compiler"; then
  5711. _LT_COMPILER_NO_RTTI($1)
  5712. _LT_COMPILER_PIC($1)
  5713. _LT_COMPILER_C_O($1)
  5714. _LT_COMPILER_FILE_LOCKS($1)
  5715. _LT_LINKER_SHLIBS($1)
  5716. _LT_SYS_DYNAMIC_LINKER($1)
  5717. _LT_LINKER_HARDCODE_LIBPATH($1)
  5718. LT_SYS_DLOPEN_SELF
  5719. _LT_CMD_STRIPLIB
  5720. # Report what library types will actually be built
  5721. AC_MSG_CHECKING([if libtool supports shared libraries])
  5722. AC_MSG_RESULT([$can_build_shared])
  5723. AC_MSG_CHECKING([whether to build shared libraries])
  5724. test no = "$can_build_shared" && enable_shared=no
  5725. # On AIX, shared libraries and static libraries use the same namespace, and
  5726. # are all built from PIC.
  5727. case $host_os in
  5728. aix3*)
  5729. test yes = "$enable_shared" && enable_static=no
  5730. if test -n "$RANLIB"; then
  5731. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  5732. postinstall_cmds='$RANLIB $lib'
  5733. fi
  5734. ;;
  5735. aix[[4-9]]*)
  5736. if test ia64 != "$host_cpu"; then
  5737. case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
  5738. yes,aix,yes) ;; # shared object as lib.so file only
  5739. yes,svr4,*) ;; # shared object as lib.so archive member only
  5740. yes,*) enable_static=no ;; # shared object in lib.a archive as well
  5741. esac
  5742. fi
  5743. ;;
  5744. esac
  5745. AC_MSG_RESULT([$enable_shared])
  5746. AC_MSG_CHECKING([whether to build static libraries])
  5747. # Make sure either enable_shared or enable_static is yes.
  5748. test yes = "$enable_shared" || enable_static=yes
  5749. AC_MSG_RESULT([$enable_static])
  5750. _LT_CONFIG($1)
  5751. fi
  5752. AC_LANG_POP
  5753. CC=$lt_save_CC
  5754. ])# _LT_LANG_C_CONFIG
  5755. # _LT_LANG_CXX_CONFIG([TAG])
  5756. # --------------------------
  5757. # Ensure that the configuration variables for a C++ compiler are suitably
  5758. # defined. These variables are subsequently used by _LT_CONFIG to write
  5759. # the compiler configuration to 'libtool'.
  5760. m4_defun([_LT_LANG_CXX_CONFIG],
  5761. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  5762. m4_require([_LT_DECL_EGREP])dnl
  5763. m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  5764. if test -n "$CXX" && ( test no != "$CXX" &&
  5765. ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
  5766. (test g++ != "$CXX"))); then
  5767. AC_PROG_CXXCPP
  5768. else
  5769. _lt_caught_CXX_error=yes
  5770. fi
  5771. AC_LANG_PUSH(C++)
  5772. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5773. _LT_TAGVAR(allow_undefined_flag, $1)=
  5774. _LT_TAGVAR(always_export_symbols, $1)=no
  5775. _LT_TAGVAR(archive_expsym_cmds, $1)=
  5776. _LT_TAGVAR(compiler_needs_object, $1)=no
  5777. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  5778. _LT_TAGVAR(hardcode_direct, $1)=no
  5779. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  5780. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  5781. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5782. _LT_TAGVAR(hardcode_minus_L, $1)=no
  5783. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  5784. _LT_TAGVAR(hardcode_automatic, $1)=no
  5785. _LT_TAGVAR(inherit_rpath, $1)=no
  5786. _LT_TAGVAR(module_cmds, $1)=
  5787. _LT_TAGVAR(module_expsym_cmds, $1)=
  5788. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  5789. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  5790. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  5791. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  5792. _LT_TAGVAR(no_undefined_flag, $1)=
  5793. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5794. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  5795. # Source file extension for C++ test sources.
  5796. ac_ext=cpp
  5797. # Object file extension for compiled C++ test sources.
  5798. objext=o
  5799. _LT_TAGVAR(objext, $1)=$objext
  5800. # No sense in running all these tests if we already determined that
  5801. # the CXX compiler isn't working. Some variables (like enable_shared)
  5802. # are currently assumed to apply to all compilers on this platform,
  5803. # and will be corrupted by setting them based on a non-working compiler.
  5804. if test yes != "$_lt_caught_CXX_error"; then
  5805. # Code to be used in simple compile tests
  5806. lt_simple_compile_test_code="int some_variable = 0;"
  5807. # Code to be used in simple link tests
  5808. lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
  5809. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  5810. _LT_TAG_COMPILER
  5811. # save warnings/boilerplate of simple test code
  5812. _LT_COMPILER_BOILERPLATE
  5813. _LT_LINKER_BOILERPLATE
  5814. # Allow CC to be a program name with arguments.
  5815. lt_save_CC=$CC
  5816. lt_save_CFLAGS=$CFLAGS
  5817. lt_save_LD=$LD
  5818. lt_save_GCC=$GCC
  5819. GCC=$GXX
  5820. lt_save_with_gnu_ld=$with_gnu_ld
  5821. lt_save_path_LD=$lt_cv_path_LD
  5822. if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
  5823. lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
  5824. else
  5825. $as_unset lt_cv_prog_gnu_ld
  5826. fi
  5827. if test -n "${lt_cv_path_LDCXX+set}"; then
  5828. lt_cv_path_LD=$lt_cv_path_LDCXX
  5829. else
  5830. $as_unset lt_cv_path_LD
  5831. fi
  5832. test -z "${LDCXX+set}" || LD=$LDCXX
  5833. CC=${CXX-"c++"}
  5834. CFLAGS=$CXXFLAGS
  5835. compiler=$CC
  5836. _LT_TAGVAR(compiler, $1)=$CC
  5837. _LT_CC_BASENAME([$compiler])
  5838. if test -n "$compiler"; then
  5839. # We don't want -fno-exception when compiling C++ code, so set the
  5840. # no_builtin_flag separately
  5841. if test yes = "$GXX"; then
  5842. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  5843. else
  5844. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  5845. fi
  5846. if test yes = "$GXX"; then
  5847. # Set up default GNU C++ configuration
  5848. LT_PATH_LD
  5849. # Check if GNU C++ uses GNU ld as the underlying linker, since the
  5850. # archiving commands below assume that GNU ld is being used.
  5851. if test yes = "$with_gnu_ld"; then
  5852. _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  5853. _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'
  5854. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5855. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  5856. # If archive_cmds runs LD, not CC, wlarc should be empty
  5857. # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
  5858. # investigate it a little bit more. (MM)
  5859. wlarc='$wl'
  5860. # ancient GNU ld didn't support --whole-archive et. al.
  5861. if eval "`$CC -print-prog-name=ld` --help 2>&1" |
  5862. $GREP 'no-whole-archive' > /dev/null; then
  5863. _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
  5864. else
  5865. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5866. fi
  5867. else
  5868. with_gnu_ld=no
  5869. wlarc=
  5870. # A generic and very simple default shared library creation
  5871. # command for GNU C++ for the case where it uses the native
  5872. # linker, instead of GNU ld. If possible, this setting should
  5873. # overridden to take advantage of the native linker features on
  5874. # the platform it is being used on.
  5875. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  5876. fi
  5877. # Commands to make compiler produce verbose output that lists
  5878. # what "hidden" libraries, object files and flags are used when
  5879. # linking a shared library.
  5880. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
  5881. else
  5882. GXX=no
  5883. with_gnu_ld=no
  5884. wlarc=
  5885. fi
  5886. # PORTME: fill in a description of your system's C++ link characteristics
  5887. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  5888. _LT_TAGVAR(ld_shlibs, $1)=yes
  5889. case $host_os in
  5890. aix3*)
  5891. # FIXME: insert proper C++ library support
  5892. _LT_TAGVAR(ld_shlibs, $1)=no
  5893. ;;
  5894. aix[[4-9]]*)
  5895. if test ia64 = "$host_cpu"; then
  5896. # On IA64, the linker does run time linking by default, so we don't
  5897. # have to do anything special.
  5898. aix_use_runtimelinking=no
  5899. exp_sym_flag='-Bexport'
  5900. no_entry_flag=
  5901. else
  5902. aix_use_runtimelinking=no
  5903. # Test if we are trying to use run time linking or normal
  5904. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  5905. # have runtime linking enabled, and use it for executables.
  5906. # For shared libraries, we enable/disable runtime linking
  5907. # depending on the kind of the shared library created -
  5908. # when "with_aix_soname,aix_use_runtimelinking" is:
  5909. # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
  5910. # "aix,yes" lib.so shared, rtl:yes, for executables
  5911. # lib.a static archive
  5912. # "both,no" lib.so.V(shr.o) shared, rtl:yes
  5913. # lib.a(lib.so.V) shared, rtl:no, for executables
  5914. # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
  5915. # lib.a(lib.so.V) shared, rtl:no
  5916. # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
  5917. # lib.a static archive
  5918. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  5919. for ld_flag in $LDFLAGS; do
  5920. case $ld_flag in
  5921. *-brtl*)
  5922. aix_use_runtimelinking=yes
  5923. break
  5924. ;;
  5925. esac
  5926. done
  5927. if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
  5928. # With aix-soname=svr4, we create the lib.so.V shared archives only,
  5929. # so we don't have lib.a shared libs to link our executables.
  5930. # We have to force runtime linking in this case.
  5931. aix_use_runtimelinking=yes
  5932. LDFLAGS="$LDFLAGS -Wl,-brtl"
  5933. fi
  5934. ;;
  5935. esac
  5936. exp_sym_flag='-bexport'
  5937. no_entry_flag='-bnoentry'
  5938. fi
  5939. # When large executables or shared objects are built, AIX ld can
  5940. # have problems creating the table of contents. If linking a library
  5941. # or program results in "error TOC overflow" add -mminimal-toc to
  5942. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  5943. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  5944. _LT_TAGVAR(archive_cmds, $1)=''
  5945. _LT_TAGVAR(hardcode_direct, $1)=yes
  5946. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5947. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5948. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5949. _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
  5950. case $with_aix_soname,$aix_use_runtimelinking in
  5951. aix,*) ;; # no import file
  5952. svr4,* | *,yes) # use import file
  5953. # The Import File defines what to hardcode.
  5954. _LT_TAGVAR(hardcode_direct, $1)=no
  5955. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  5956. ;;
  5957. esac
  5958. if test yes = "$GXX"; then
  5959. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  5960. # We only want to do this on AIX 4.2 and lower, the check
  5961. # below for broken collect2 doesn't work under 4.3+
  5962. collect2name=`$CC -print-prog-name=collect2`
  5963. if test -f "$collect2name" &&
  5964. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  5965. then
  5966. # We have reworked collect2
  5967. :
  5968. else
  5969. # We have old collect2
  5970. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  5971. # It fails to find uninstalled libraries when the uninstalled
  5972. # path is not listed in the libpath. Setting hardcode_minus_L
  5973. # to unsupported forces relinking
  5974. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5975. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5976. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5977. fi
  5978. esac
  5979. shared_flag='-shared'
  5980. if test yes = "$aix_use_runtimelinking"; then
  5981. shared_flag=$shared_flag' $wl-G'
  5982. fi
  5983. # Need to ensure runtime linking is disabled for the traditional
  5984. # shared library, or the linker may eventually find shared libraries
  5985. # /with/ Import File - we do not want to mix them.
  5986. shared_flag_aix='-shared'
  5987. shared_flag_svr4='-shared $wl-G'
  5988. else
  5989. # not using gcc
  5990. if test ia64 = "$host_cpu"; then
  5991. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  5992. # chokes on -Wl,-G. The following line is correct:
  5993. shared_flag='-G'
  5994. else
  5995. if test yes = "$aix_use_runtimelinking"; then
  5996. shared_flag='$wl-G'
  5997. else
  5998. shared_flag='$wl-bM:SRE'
  5999. fi
  6000. shared_flag_aix='$wl-bM:SRE'
  6001. shared_flag_svr4='$wl-G'
  6002. fi
  6003. fi
  6004. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
  6005. # It seems that -bexpall does not export symbols beginning with
  6006. # underscore (_), so it is better to generate a list of symbols to
  6007. # export.
  6008. _LT_TAGVAR(always_export_symbols, $1)=yes
  6009. if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
  6010. # Warning - without using the other runtime loading flags (-brtl),
  6011. # -berok will link without error, but may produce a broken library.
  6012. # The "-G" linker flag allows undefined symbols.
  6013. _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
  6014. # Determine the default libpath from the value encoded in an empty
  6015. # executable.
  6016. _LT_SYS_MODULE_PATH_AIX([$1])
  6017. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
  6018. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
  6019. else
  6020. if test ia64 = "$host_cpu"; then
  6021. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
  6022. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  6023. _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"
  6024. else
  6025. # Determine the default libpath from the value encoded in an
  6026. # empty executable.
  6027. _LT_SYS_MODULE_PATH_AIX([$1])
  6028. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
  6029. # Warning - without using the other run time loading flags,
  6030. # -berok will link without error, but may produce a broken library.
  6031. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
  6032. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
  6033. if test yes = "$with_gnu_ld"; then
  6034. # We only use this code for GNU lds that support --whole-archive.
  6035. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
  6036. else
  6037. # Exported symbols can be pulled into shared objects from archives
  6038. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  6039. fi
  6040. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  6041. _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
  6042. # -brtl affects multiple linker settings, -berok does not and is overridden later
  6043. compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
  6044. if test svr4 != "$with_aix_soname"; then
  6045. # This is similar to how AIX traditionally builds its shared
  6046. # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
  6047. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
  6048. fi
  6049. if test aix != "$with_aix_soname"; then
  6050. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
  6051. else
  6052. # used by -dlpreopen to get the symbols
  6053. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
  6054. fi
  6055. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
  6056. fi
  6057. fi
  6058. ;;
  6059. beos*)
  6060. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  6061. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6062. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  6063. # support --undefined. This deserves some investigation. FIXME
  6064. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  6065. else
  6066. _LT_TAGVAR(ld_shlibs, $1)=no
  6067. fi
  6068. ;;
  6069. chorus*)
  6070. case $cc_basename in
  6071. *)
  6072. # FIXME: insert proper C++ library support
  6073. _LT_TAGVAR(ld_shlibs, $1)=no
  6074. ;;
  6075. esac
  6076. ;;
  6077. cygwin* | mingw* | pw32* | cegcc*)
  6078. case $GXX,$cc_basename in
  6079. ,cl* | no,cl*)
  6080. # Native MSVC
  6081. # hardcode_libdir_flag_spec is actually meaningless, as there is
  6082. # no search path for DLLs.
  6083. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  6084. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6085. _LT_TAGVAR(always_export_symbols, $1)=yes
  6086. _LT_TAGVAR(file_list_spec, $1)='@'
  6087. # Tell ltmain to make .lib files, not .a files.
  6088. libext=lib
  6089. # Tell ltmain to make .dll files, not .so files.
  6090. shrext_cmds=.dll
  6091. # FIXME: Setting linknames here is a bad hack.
  6092. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
  6093. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  6094. cp "$export_symbols" "$output_objdir/$soname.def";
  6095. echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
  6096. else
  6097. $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
  6098. fi~
  6099. $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  6100. linknames='
  6101. # The linker will not automatically build a static lib if we build a DLL.
  6102. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  6103. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  6104. # Don't use ranlib
  6105. _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  6106. _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  6107. lt_tool_outputfile="@TOOL_OUTPUT@"~
  6108. case $lt_outputfile in
  6109. *.exe|*.EXE) ;;
  6110. *)
  6111. lt_outputfile=$lt_outputfile.exe
  6112. lt_tool_outputfile=$lt_tool_outputfile.exe
  6113. ;;
  6114. esac~
  6115. func_to_tool_file "$lt_outputfile"~
  6116. if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
  6117. $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  6118. $RM "$lt_outputfile.manifest";
  6119. fi'
  6120. ;;
  6121. *)
  6122. # g++
  6123. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  6124. # as there is no search path for DLLs.
  6125. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6126. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
  6127. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6128. _LT_TAGVAR(always_export_symbols, $1)=no
  6129. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  6130. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  6131. _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'
  6132. # If the export-symbols file already is a .def file, use it as
  6133. # is; otherwise, prepend EXPORTS...
  6134. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  6135. cp $export_symbols $output_objdir/$soname.def;
  6136. else
  6137. echo EXPORTS > $output_objdir/$soname.def;
  6138. cat $export_symbols >> $output_objdir/$soname.def;
  6139. fi~
  6140. $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'
  6141. else
  6142. _LT_TAGVAR(ld_shlibs, $1)=no
  6143. fi
  6144. ;;
  6145. esac
  6146. ;;
  6147. darwin* | rhapsody*)
  6148. _LT_DARWIN_LINKER_FEATURES($1)
  6149. ;;
  6150. os2*)
  6151. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6152. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  6153. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6154. shrext_cmds=.dll
  6155. _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  6156. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  6157. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  6158. $ECHO EXPORTS >> $output_objdir/$libname.def~
  6159. emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
  6160. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  6161. emximp -o $lib $output_objdir/$libname.def'
  6162. _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  6163. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  6164. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  6165. $ECHO EXPORTS >> $output_objdir/$libname.def~
  6166. prefix_cmds="$SED"~
  6167. if test EXPORTS = "`$SED 1q $export_symbols`"; then
  6168. prefix_cmds="$prefix_cmds -e 1d";
  6169. fi~
  6170. prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
  6171. cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
  6172. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  6173. emximp -o $lib $output_objdir/$libname.def'
  6174. _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
  6175. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  6176. ;;
  6177. dgux*)
  6178. case $cc_basename in
  6179. ec++*)
  6180. # FIXME: insert proper C++ library support
  6181. _LT_TAGVAR(ld_shlibs, $1)=no
  6182. ;;
  6183. ghcx*)
  6184. # Green Hills C++ Compiler
  6185. # FIXME: insert proper C++ library support
  6186. _LT_TAGVAR(ld_shlibs, $1)=no
  6187. ;;
  6188. *)
  6189. # FIXME: insert proper C++ library support
  6190. _LT_TAGVAR(ld_shlibs, $1)=no
  6191. ;;
  6192. esac
  6193. ;;
  6194. freebsd2.*)
  6195. # C++ shared libraries reported to be fairly broken before
  6196. # switch to ELF
  6197. _LT_TAGVAR(ld_shlibs, $1)=no
  6198. ;;
  6199. freebsd-elf*)
  6200. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6201. ;;
  6202. freebsd* | dragonfly*)
  6203. # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
  6204. # conventions
  6205. _LT_TAGVAR(ld_shlibs, $1)=yes
  6206. ;;
  6207. haiku*)
  6208. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  6209. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6210. ;;
  6211. hpux9*)
  6212. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  6213. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6214. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  6215. _LT_TAGVAR(hardcode_direct, $1)=yes
  6216. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  6217. # but as the default
  6218. # location of the library.
  6219. case $cc_basename in
  6220. CC*)
  6221. # FIXME: insert proper C++ library support
  6222. _LT_TAGVAR(ld_shlibs, $1)=no
  6223. ;;
  6224. aCC*)
  6225. _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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
  6226. # Commands to make compiler produce verbose output that lists
  6227. # what "hidden" libraries, object files and flags are used when
  6228. # linking a shared library.
  6229. #
  6230. # There doesn't appear to be a way to prevent this compiler from
  6231. # explicitly linking system object files so we need to strip them
  6232. # from the output so that they don't get included in the library
  6233. # dependencies.
  6234. 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"'
  6235. ;;
  6236. *)
  6237. if test yes = "$GXX"; then
  6238. _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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
  6239. else
  6240. # FIXME: insert proper C++ library support
  6241. _LT_TAGVAR(ld_shlibs, $1)=no
  6242. fi
  6243. ;;
  6244. esac
  6245. ;;
  6246. hpux10*|hpux11*)
  6247. if test no = "$with_gnu_ld"; then
  6248. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  6249. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6250. case $host_cpu in
  6251. hppa*64*|ia64*)
  6252. ;;
  6253. *)
  6254. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  6255. ;;
  6256. esac
  6257. fi
  6258. case $host_cpu in
  6259. hppa*64*|ia64*)
  6260. _LT_TAGVAR(hardcode_direct, $1)=no
  6261. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6262. ;;
  6263. *)
  6264. _LT_TAGVAR(hardcode_direct, $1)=yes
  6265. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6266. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  6267. # but as the default
  6268. # location of the library.
  6269. ;;
  6270. esac
  6271. case $cc_basename in
  6272. CC*)
  6273. # FIXME: insert proper C++ library support
  6274. _LT_TAGVAR(ld_shlibs, $1)=no
  6275. ;;
  6276. aCC*)
  6277. case $host_cpu in
  6278. hppa*64*)
  6279. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6280. ;;
  6281. ia64*)
  6282. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6283. ;;
  6284. *)
  6285. _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'
  6286. ;;
  6287. esac
  6288. # Commands to make compiler produce verbose output that lists
  6289. # what "hidden" libraries, object files and flags are used when
  6290. # linking a shared library.
  6291. #
  6292. # There doesn't appear to be a way to prevent this compiler from
  6293. # explicitly linking system object files so we need to strip them
  6294. # from the output so that they don't get included in the library
  6295. # dependencies.
  6296. 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"'
  6297. ;;
  6298. *)
  6299. if test yes = "$GXX"; then
  6300. if test no = "$with_gnu_ld"; then
  6301. case $host_cpu in
  6302. hppa*64*)
  6303. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6304. ;;
  6305. ia64*)
  6306. _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'
  6307. ;;
  6308. *)
  6309. _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'
  6310. ;;
  6311. esac
  6312. fi
  6313. else
  6314. # FIXME: insert proper C++ library support
  6315. _LT_TAGVAR(ld_shlibs, $1)=no
  6316. fi
  6317. ;;
  6318. esac
  6319. ;;
  6320. interix[[3-9]]*)
  6321. _LT_TAGVAR(hardcode_direct, $1)=no
  6322. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6323. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6324. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  6325. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  6326. # Instead, shared libraries are loaded at an image base (0x10000000 by
  6327. # default) and relocated if they conflict, which is a slow very memory
  6328. # consuming and fragmenting process. To avoid this, we pick a random,
  6329. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  6330. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  6331. _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'
  6332. _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'
  6333. ;;
  6334. irix5* | irix6*)
  6335. case $cc_basename in
  6336. CC*)
  6337. # SGI C++
  6338. _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'
  6339. # Archives containing C++ object files must be created using
  6340. # "CC -ar", where "CC" is the IRIX C++ compiler. This is
  6341. # necessary to make sure instantiated templates are included
  6342. # in the archive.
  6343. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
  6344. ;;
  6345. *)
  6346. if test yes = "$GXX"; then
  6347. if test no = "$with_gnu_ld"; then
  6348. _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'
  6349. else
  6350. _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'
  6351. fi
  6352. fi
  6353. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6354. ;;
  6355. esac
  6356. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  6357. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6358. _LT_TAGVAR(inherit_rpath, $1)=yes
  6359. ;;
  6360. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  6361. case $cc_basename in
  6362. KCC*)
  6363. # Kuck and Associates, Inc. (KAI) C++ Compiler
  6364. # KCC will only create a shared library if the output file
  6365. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  6366. # to its proper name (with version) after linking.
  6367. _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'
  6368. _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'
  6369. # Commands to make compiler produce verbose output that lists
  6370. # what "hidden" libraries, object files and flags are used when
  6371. # linking a shared library.
  6372. #
  6373. # There doesn't appear to be a way to prevent this compiler from
  6374. # explicitly linking system object files so we need to strip them
  6375. # from the output so that they don't get included in the library
  6376. # dependencies.
  6377. 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"'
  6378. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6379. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  6380. # Archives containing C++ object files must be created using
  6381. # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  6382. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  6383. ;;
  6384. icpc* | ecpc* )
  6385. # Intel C++
  6386. with_gnu_ld=yes
  6387. # version 8.0 and above of icpc choke on multiply defined symbols
  6388. # if we add $predep_objects and $postdep_objects, however 7.1 and
  6389. # earlier do not add the objects themselves.
  6390. case `$CC -V 2>&1` in
  6391. *"Version 7."*)
  6392. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  6393. _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'
  6394. ;;
  6395. *) # Version 8.0 or newer
  6396. tmp_idyn=
  6397. case $host_cpu in
  6398. ia64*) tmp_idyn=' -i_dynamic';;
  6399. esac
  6400. _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  6401. _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'
  6402. ;;
  6403. esac
  6404. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6405. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6406. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  6407. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
  6408. ;;
  6409. pgCC* | pgcpp*)
  6410. # Portland Group C++ compiler
  6411. case `$CC -V` in
  6412. *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
  6413. _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
  6414. rm -rf $tpldir~
  6415. $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
  6416. compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
  6417. _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
  6418. rm -rf $tpldir~
  6419. $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
  6420. $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
  6421. $RANLIB $oldlib'
  6422. _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
  6423. rm -rf $tpldir~
  6424. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  6425. $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  6426. _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
  6427. rm -rf $tpldir~
  6428. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  6429. $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'
  6430. ;;
  6431. *) # Version 6 and above use weak symbols
  6432. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  6433. _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'
  6434. ;;
  6435. esac
  6436. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
  6437. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  6438. _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'
  6439. ;;
  6440. cxx*)
  6441. # Compaq C++
  6442. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  6443. _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'
  6444. runpath_var=LD_RUN_PATH
  6445. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  6446. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6447. # Commands to make compiler produce verbose output that lists
  6448. # what "hidden" libraries, object files and flags are used when
  6449. # linking a shared library.
  6450. #
  6451. # There doesn't appear to be a way to prevent this compiler from
  6452. # explicitly linking system object files so we need to strip them
  6453. # from the output so that they don't get included in the library
  6454. # dependencies.
  6455. 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'
  6456. ;;
  6457. xl* | mpixl* | bgxl*)
  6458. # IBM XL 8.0 on PPC, with GNU ld
  6459. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  6460. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  6461. _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  6462. if test yes = "$supports_anon_versioning"; then
  6463. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  6464. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  6465. echo "local: *; };" >> $output_objdir/$libname.ver~
  6466. $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
  6467. fi
  6468. ;;
  6469. *)
  6470. case `$CC -V 2>&1 | sed 5q` in
  6471. *Sun\ C*)
  6472. # Sun C++ 5.9
  6473. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  6474. _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6475. _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'
  6476. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6477. _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'
  6478. _LT_TAGVAR(compiler_needs_object, $1)=yes
  6479. # Not sure whether something based on
  6480. # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
  6481. # would be better.
  6482. output_verbose_link_cmd='func_echo_all'
  6483. # Archives containing C++ object files must be created using
  6484. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  6485. # necessary to make sure instantiated templates are included
  6486. # in the archive.
  6487. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  6488. ;;
  6489. esac
  6490. ;;
  6491. esac
  6492. ;;
  6493. lynxos*)
  6494. # FIXME: insert proper C++ library support
  6495. _LT_TAGVAR(ld_shlibs, $1)=no
  6496. ;;
  6497. m88k*)
  6498. # FIXME: insert proper C++ library support
  6499. _LT_TAGVAR(ld_shlibs, $1)=no
  6500. ;;
  6501. mvs*)
  6502. case $cc_basename in
  6503. cxx*)
  6504. # FIXME: insert proper C++ library support
  6505. _LT_TAGVAR(ld_shlibs, $1)=no
  6506. ;;
  6507. *)
  6508. # FIXME: insert proper C++ library support
  6509. _LT_TAGVAR(ld_shlibs, $1)=no
  6510. ;;
  6511. esac
  6512. ;;
  6513. netbsd*)
  6514. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  6515. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
  6516. wlarc=
  6517. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6518. _LT_TAGVAR(hardcode_direct, $1)=yes
  6519. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6520. fi
  6521. # Workaround some broken pre-1.5 toolchains
  6522. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
  6523. ;;
  6524. *nto* | *qnx*)
  6525. _LT_TAGVAR(ld_shlibs, $1)=yes
  6526. ;;
  6527. openbsd* | bitrig*)
  6528. if test -f /usr/libexec/ld.so; then
  6529. _LT_TAGVAR(hardcode_direct, $1)=yes
  6530. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6531. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6532. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  6533. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6534. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
  6535. _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'
  6536. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  6537. _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
  6538. fi
  6539. output_verbose_link_cmd=func_echo_all
  6540. else
  6541. _LT_TAGVAR(ld_shlibs, $1)=no
  6542. fi
  6543. ;;
  6544. osf3* | osf4* | osf5*)
  6545. case $cc_basename in
  6546. KCC*)
  6547. # Kuck and Associates, Inc. (KAI) C++ Compiler
  6548. # KCC will only create a shared library if the output file
  6549. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  6550. # to its proper name (with version) after linking.
  6551. _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'
  6552. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6553. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6554. # Archives containing C++ object files must be created using
  6555. # the KAI C++ compiler.
  6556. case $host in
  6557. osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
  6558. *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
  6559. esac
  6560. ;;
  6561. RCC*)
  6562. # Rational C++ 2.4.1
  6563. # FIXME: insert proper C++ library support
  6564. _LT_TAGVAR(ld_shlibs, $1)=no
  6565. ;;
  6566. cxx*)
  6567. case $host in
  6568. osf3*)
  6569. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
  6570. _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'
  6571. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  6572. ;;
  6573. *)
  6574. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  6575. _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'
  6576. _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
  6577. echo "-hidden">> $lib.exp~
  6578. $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~
  6579. $RM $lib.exp'
  6580. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  6581. ;;
  6582. esac
  6583. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6584. # Commands to make compiler produce verbose output that lists
  6585. # what "hidden" libraries, object files and flags are used when
  6586. # linking a shared library.
  6587. #
  6588. # There doesn't appear to be a way to prevent this compiler from
  6589. # explicitly linking system object files so we need to strip them
  6590. # from the output so that they don't get included in the library
  6591. # dependencies.
  6592. 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"'
  6593. ;;
  6594. *)
  6595. if test yes,no = "$GXX,$with_gnu_ld"; then
  6596. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
  6597. case $host in
  6598. osf3*)
  6599. _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'
  6600. ;;
  6601. *)
  6602. _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'
  6603. ;;
  6604. esac
  6605. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  6606. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6607. # Commands to make compiler produce verbose output that lists
  6608. # what "hidden" libraries, object files and flags are used when
  6609. # linking a shared library.
  6610. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
  6611. else
  6612. # FIXME: insert proper C++ library support
  6613. _LT_TAGVAR(ld_shlibs, $1)=no
  6614. fi
  6615. ;;
  6616. esac
  6617. ;;
  6618. psos*)
  6619. # FIXME: insert proper C++ library support
  6620. _LT_TAGVAR(ld_shlibs, $1)=no
  6621. ;;
  6622. sunos4*)
  6623. case $cc_basename in
  6624. CC*)
  6625. # Sun C++ 4.x
  6626. # FIXME: insert proper C++ library support
  6627. _LT_TAGVAR(ld_shlibs, $1)=no
  6628. ;;
  6629. lcc*)
  6630. # Lucid
  6631. # FIXME: insert proper C++ library support
  6632. _LT_TAGVAR(ld_shlibs, $1)=no
  6633. ;;
  6634. *)
  6635. # FIXME: insert proper C++ library support
  6636. _LT_TAGVAR(ld_shlibs, $1)=no
  6637. ;;
  6638. esac
  6639. ;;
  6640. solaris*)
  6641. case $cc_basename in
  6642. CC* | sunCC*)
  6643. # Sun C++ 4.2, 5.x and Centerline C++
  6644. _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
  6645. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  6646. _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6647. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6648. $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'
  6649. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6650. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6651. case $host_os in
  6652. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6653. *)
  6654. # The compiler driver will combine and reorder linker options,
  6655. # but understands '-z linker_flag'.
  6656. # Supported since Solaris 2.6 (maybe 2.5.1?)
  6657. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  6658. ;;
  6659. esac
  6660. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6661. output_verbose_link_cmd='func_echo_all'
  6662. # Archives containing C++ object files must be created using
  6663. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  6664. # necessary to make sure instantiated templates are included
  6665. # in the archive.
  6666. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  6667. ;;
  6668. gcx*)
  6669. # Green Hills C++ Compiler
  6670. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
  6671. # The C++ compiler must be used to create the archive.
  6672. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
  6673. ;;
  6674. *)
  6675. # GNU C++ compiler with Solaris linker
  6676. if test yes,no = "$GXX,$with_gnu_ld"; then
  6677. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
  6678. if $CC --version | $GREP -v '^2\.7' > /dev/null; then
  6679. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
  6680. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6681. $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  6682. # Commands to make compiler produce verbose output that lists
  6683. # what "hidden" libraries, object files and flags are used when
  6684. # linking a shared library.
  6685. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
  6686. else
  6687. # g++ 2.7 appears to require '-G' NOT '-shared' on this
  6688. # platform.
  6689. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
  6690. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6691. $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  6692. # Commands to make compiler produce verbose output that lists
  6693. # what "hidden" libraries, object files and flags are used when
  6694. # linking a shared library.
  6695. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
  6696. fi
  6697. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
  6698. case $host_os in
  6699. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6700. *)
  6701. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
  6702. ;;
  6703. esac
  6704. fi
  6705. ;;
  6706. esac
  6707. ;;
  6708. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  6709. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  6710. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6711. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6712. runpath_var='LD_RUN_PATH'
  6713. case $cc_basename in
  6714. CC*)
  6715. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6716. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6717. ;;
  6718. *)
  6719. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6720. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6721. ;;
  6722. esac
  6723. ;;
  6724. sysv5* | sco3.2v5* | sco5v6*)
  6725. # Note: We CANNOT use -z defs as we might desire, because we do not
  6726. # link with -lc, and that would cause any symbols used from libc to
  6727. # always be unresolved, which means just about no library would
  6728. # ever link correctly. If we're not using GNU ld we use -z text
  6729. # though, which does catch some bad symbols but isn't as heavy-handed
  6730. # as -z defs.
  6731. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  6732. _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
  6733. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6734. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6735. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
  6736. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  6737. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6738. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
  6739. runpath_var='LD_RUN_PATH'
  6740. case $cc_basename in
  6741. CC*)
  6742. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6743. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6744. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
  6745. '"$_LT_TAGVAR(old_archive_cmds, $1)"
  6746. _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
  6747. '"$_LT_TAGVAR(reload_cmds, $1)"
  6748. ;;
  6749. *)
  6750. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6751. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6752. ;;
  6753. esac
  6754. ;;
  6755. tandem*)
  6756. case $cc_basename in
  6757. NCC*)
  6758. # NonStop-UX NCC 3.20
  6759. # FIXME: insert proper C++ library support
  6760. _LT_TAGVAR(ld_shlibs, $1)=no
  6761. ;;
  6762. *)
  6763. # FIXME: insert proper C++ library support
  6764. _LT_TAGVAR(ld_shlibs, $1)=no
  6765. ;;
  6766. esac
  6767. ;;
  6768. vxworks*)
  6769. # FIXME: insert proper C++ library support
  6770. _LT_TAGVAR(ld_shlibs, $1)=no
  6771. ;;
  6772. *)
  6773. # FIXME: insert proper C++ library support
  6774. _LT_TAGVAR(ld_shlibs, $1)=no
  6775. ;;
  6776. esac
  6777. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  6778. test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
  6779. _LT_TAGVAR(GCC, $1)=$GXX
  6780. _LT_TAGVAR(LD, $1)=$LD
  6781. ## CAVEAT EMPTOR:
  6782. ## There is no encapsulation within the following macros, do not change
  6783. ## the running order or otherwise move them around unless you know exactly
  6784. ## what you are doing...
  6785. _LT_SYS_HIDDEN_LIBDEPS($1)
  6786. _LT_COMPILER_PIC($1)
  6787. _LT_COMPILER_C_O($1)
  6788. _LT_COMPILER_FILE_LOCKS($1)
  6789. _LT_LINKER_SHLIBS($1)
  6790. _LT_SYS_DYNAMIC_LINKER($1)
  6791. _LT_LINKER_HARDCODE_LIBPATH($1)
  6792. _LT_CONFIG($1)
  6793. fi # test -n "$compiler"
  6794. CC=$lt_save_CC
  6795. CFLAGS=$lt_save_CFLAGS
  6796. LDCXX=$LD
  6797. LD=$lt_save_LD
  6798. GCC=$lt_save_GCC
  6799. with_gnu_ld=$lt_save_with_gnu_ld
  6800. lt_cv_path_LDCXX=$lt_cv_path_LD
  6801. lt_cv_path_LD=$lt_save_path_LD
  6802. lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
  6803. lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
  6804. fi # test yes != "$_lt_caught_CXX_error"
  6805. AC_LANG_POP
  6806. ])# _LT_LANG_CXX_CONFIG
  6807. # _LT_FUNC_STRIPNAME_CNF
  6808. # ----------------------
  6809. # func_stripname_cnf prefix suffix name
  6810. # strip PREFIX and SUFFIX off of NAME.
  6811. # PREFIX and SUFFIX must not contain globbing or regex special
  6812. # characters, hashes, percent signs, but SUFFIX may contain a leading
  6813. # dot (in which case that matches only a dot).
  6814. #
  6815. # This function is identical to the (non-XSI) version of func_stripname,
  6816. # except this one can be used by m4 code that may be executed by configure,
  6817. # rather than the libtool script.
  6818. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
  6819. AC_REQUIRE([_LT_DECL_SED])
  6820. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
  6821. func_stripname_cnf ()
  6822. {
  6823. case @S|@2 in
  6824. .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
  6825. *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
  6826. esac
  6827. } # func_stripname_cnf
  6828. ])# _LT_FUNC_STRIPNAME_CNF
  6829. # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
  6830. # ---------------------------------
  6831. # Figure out "hidden" library dependencies from verbose
  6832. # compiler output when linking a shared library.
  6833. # Parse the compiler output and extract the necessary
  6834. # objects, libraries and library flags.
  6835. m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
  6836. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  6837. AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
  6838. # Dependencies to place before and after the object being linked:
  6839. _LT_TAGVAR(predep_objects, $1)=
  6840. _LT_TAGVAR(postdep_objects, $1)=
  6841. _LT_TAGVAR(predeps, $1)=
  6842. _LT_TAGVAR(postdeps, $1)=
  6843. _LT_TAGVAR(compiler_lib_search_path, $1)=
  6844. dnl we can't use the lt_simple_compile_test_code here,
  6845. dnl because it contains code intended for an executable,
  6846. dnl not a library. It's possible we should let each
  6847. dnl tag define a new lt_????_link_test_code variable,
  6848. dnl but it's only used here...
  6849. m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
  6850. int a;
  6851. void foo (void) { a = 0; }
  6852. _LT_EOF
  6853. ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
  6854. class Foo
  6855. {
  6856. public:
  6857. Foo (void) { a = 0; }
  6858. private:
  6859. int a;
  6860. };
  6861. _LT_EOF
  6862. ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
  6863. subroutine foo
  6864. implicit none
  6865. integer*4 a
  6866. a=0
  6867. return
  6868. end
  6869. _LT_EOF
  6870. ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
  6871. subroutine foo
  6872. implicit none
  6873. integer a
  6874. a=0
  6875. return
  6876. end
  6877. _LT_EOF
  6878. ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
  6879. public class foo {
  6880. private int a;
  6881. public void bar (void) {
  6882. a = 0;
  6883. }
  6884. };
  6885. _LT_EOF
  6886. ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
  6887. package foo
  6888. func foo() {
  6889. }
  6890. _LT_EOF
  6891. ])
  6892. _lt_libdeps_save_CFLAGS=$CFLAGS
  6893. case "$CC $CFLAGS " in #(
  6894. *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
  6895. *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
  6896. *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
  6897. esac
  6898. dnl Parse the compiler output and extract the necessary
  6899. dnl objects, libraries and library flags.
  6900. if AC_TRY_EVAL(ac_compile); then
  6901. # Parse the compiler output and extract the necessary
  6902. # objects, libraries and library flags.
  6903. # Sentinel used to keep track of whether or not we are before
  6904. # the conftest object file.
  6905. pre_test_object_deps_done=no
  6906. for p in `eval "$output_verbose_link_cmd"`; do
  6907. case $prev$p in
  6908. -L* | -R* | -l*)
  6909. # Some compilers place space between "-{L,R}" and the path.
  6910. # Remove the space.
  6911. if test x-L = "$p" ||
  6912. test x-R = "$p"; then
  6913. prev=$p
  6914. continue
  6915. fi
  6916. # Expand the sysroot to ease extracting the directories later.
  6917. if test -z "$prev"; then
  6918. case $p in
  6919. -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
  6920. -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
  6921. -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
  6922. esac
  6923. fi
  6924. case $p in
  6925. =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
  6926. esac
  6927. if test no = "$pre_test_object_deps_done"; then
  6928. case $prev in
  6929. -L | -R)
  6930. # Internal compiler library paths should come after those
  6931. # provided the user. The postdeps already come after the
  6932. # user supplied libs so there is no need to process them.
  6933. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
  6934. _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
  6935. else
  6936. _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
  6937. fi
  6938. ;;
  6939. # The "-l" case would never come before the object being
  6940. # linked, so don't bother handling this case.
  6941. esac
  6942. else
  6943. if test -z "$_LT_TAGVAR(postdeps, $1)"; then
  6944. _LT_TAGVAR(postdeps, $1)=$prev$p
  6945. else
  6946. _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
  6947. fi
  6948. fi
  6949. prev=
  6950. ;;
  6951. *.lto.$objext) ;; # Ignore GCC LTO objects
  6952. *.$objext)
  6953. # This assumes that the test object file only shows up
  6954. # once in the compiler output.
  6955. if test "$p" = "conftest.$objext"; then
  6956. pre_test_object_deps_done=yes
  6957. continue
  6958. fi
  6959. if test no = "$pre_test_object_deps_done"; then
  6960. if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
  6961. _LT_TAGVAR(predep_objects, $1)=$p
  6962. else
  6963. _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
  6964. fi
  6965. else
  6966. if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
  6967. _LT_TAGVAR(postdep_objects, $1)=$p
  6968. else
  6969. _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
  6970. fi
  6971. fi
  6972. ;;
  6973. *) ;; # Ignore the rest.
  6974. esac
  6975. done
  6976. # Clean up.
  6977. rm -f a.out a.exe
  6978. else
  6979. echo "libtool.m4: error: problem compiling $1 test program"
  6980. fi
  6981. $RM -f confest.$objext
  6982. CFLAGS=$_lt_libdeps_save_CFLAGS
  6983. # PORTME: override above test on systems where it is broken
  6984. m4_if([$1], [CXX],
  6985. [case $host_os in
  6986. interix[[3-9]]*)
  6987. # Interix 3.5 installs completely hosed .la files for C++, so rather than
  6988. # hack all around it, let's just trust "g++" to DTRT.
  6989. _LT_TAGVAR(predep_objects,$1)=
  6990. _LT_TAGVAR(postdep_objects,$1)=
  6991. _LT_TAGVAR(postdeps,$1)=
  6992. ;;
  6993. esac
  6994. ])
  6995. case " $_LT_TAGVAR(postdeps, $1) " in
  6996. *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
  6997. esac
  6998. _LT_TAGVAR(compiler_lib_search_dirs, $1)=
  6999. if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
  7000. _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
  7001. fi
  7002. _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
  7003. [The directories searched by this compiler when creating a shared library])
  7004. _LT_TAGDECL([], [predep_objects], [1],
  7005. [Dependencies to place before and after the objects being linked to
  7006. create a shared library])
  7007. _LT_TAGDECL([], [postdep_objects], [1])
  7008. _LT_TAGDECL([], [predeps], [1])
  7009. _LT_TAGDECL([], [postdeps], [1])
  7010. _LT_TAGDECL([], [compiler_lib_search_path], [1],
  7011. [The library search path used internally by the compiler when linking
  7012. a shared library])
  7013. ])# _LT_SYS_HIDDEN_LIBDEPS
  7014. # _LT_LANG_F77_CONFIG([TAG])
  7015. # --------------------------
  7016. # Ensure that the configuration variables for a Fortran 77 compiler are
  7017. # suitably defined. These variables are subsequently used by _LT_CONFIG
  7018. # to write the compiler configuration to 'libtool'.
  7019. m4_defun([_LT_LANG_F77_CONFIG],
  7020. [AC_LANG_PUSH(Fortran 77)
  7021. if test -z "$F77" || test no = "$F77"; then
  7022. _lt_disable_F77=yes
  7023. fi
  7024. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7025. _LT_TAGVAR(allow_undefined_flag, $1)=
  7026. _LT_TAGVAR(always_export_symbols, $1)=no
  7027. _LT_TAGVAR(archive_expsym_cmds, $1)=
  7028. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  7029. _LT_TAGVAR(hardcode_direct, $1)=no
  7030. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  7031. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  7032. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  7033. _LT_TAGVAR(hardcode_minus_L, $1)=no
  7034. _LT_TAGVAR(hardcode_automatic, $1)=no
  7035. _LT_TAGVAR(inherit_rpath, $1)=no
  7036. _LT_TAGVAR(module_cmds, $1)=
  7037. _LT_TAGVAR(module_expsym_cmds, $1)=
  7038. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  7039. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7040. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  7041. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  7042. _LT_TAGVAR(no_undefined_flag, $1)=
  7043. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  7044. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  7045. # Source file extension for f77 test sources.
  7046. ac_ext=f
  7047. # Object file extension for compiled f77 test sources.
  7048. objext=o
  7049. _LT_TAGVAR(objext, $1)=$objext
  7050. # No sense in running all these tests if we already determined that
  7051. # the F77 compiler isn't working. Some variables (like enable_shared)
  7052. # are currently assumed to apply to all compilers on this platform,
  7053. # and will be corrupted by setting them based on a non-working compiler.
  7054. if test yes != "$_lt_disable_F77"; then
  7055. # Code to be used in simple compile tests
  7056. lt_simple_compile_test_code="\
  7057. subroutine t
  7058. return
  7059. end
  7060. "
  7061. # Code to be used in simple link tests
  7062. lt_simple_link_test_code="\
  7063. program t
  7064. end
  7065. "
  7066. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7067. _LT_TAG_COMPILER
  7068. # save warnings/boilerplate of simple test code
  7069. _LT_COMPILER_BOILERPLATE
  7070. _LT_LINKER_BOILERPLATE
  7071. # Allow CC to be a program name with arguments.
  7072. lt_save_CC=$CC
  7073. lt_save_GCC=$GCC
  7074. lt_save_CFLAGS=$CFLAGS
  7075. CC=${F77-"f77"}
  7076. CFLAGS=$FFLAGS
  7077. compiler=$CC
  7078. _LT_TAGVAR(compiler, $1)=$CC
  7079. _LT_CC_BASENAME([$compiler])
  7080. GCC=$G77
  7081. if test -n "$compiler"; then
  7082. AC_MSG_CHECKING([if libtool supports shared libraries])
  7083. AC_MSG_RESULT([$can_build_shared])
  7084. AC_MSG_CHECKING([whether to build shared libraries])
  7085. test no = "$can_build_shared" && enable_shared=no
  7086. # On AIX, shared libraries and static libraries use the same namespace, and
  7087. # are all built from PIC.
  7088. case $host_os in
  7089. aix3*)
  7090. test yes = "$enable_shared" && enable_static=no
  7091. if test -n "$RANLIB"; then
  7092. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  7093. postinstall_cmds='$RANLIB $lib'
  7094. fi
  7095. ;;
  7096. aix[[4-9]]*)
  7097. if test ia64 != "$host_cpu"; then
  7098. case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
  7099. yes,aix,yes) ;; # shared object as lib.so file only
  7100. yes,svr4,*) ;; # shared object as lib.so archive member only
  7101. yes,*) enable_static=no ;; # shared object in lib.a archive as well
  7102. esac
  7103. fi
  7104. ;;
  7105. esac
  7106. AC_MSG_RESULT([$enable_shared])
  7107. AC_MSG_CHECKING([whether to build static libraries])
  7108. # Make sure either enable_shared or enable_static is yes.
  7109. test yes = "$enable_shared" || enable_static=yes
  7110. AC_MSG_RESULT([$enable_static])
  7111. _LT_TAGVAR(GCC, $1)=$G77
  7112. _LT_TAGVAR(LD, $1)=$LD
  7113. ## CAVEAT EMPTOR:
  7114. ## There is no encapsulation within the following macros, do not change
  7115. ## the running order or otherwise move them around unless you know exactly
  7116. ## what you are doing...
  7117. _LT_COMPILER_PIC($1)
  7118. _LT_COMPILER_C_O($1)
  7119. _LT_COMPILER_FILE_LOCKS($1)
  7120. _LT_LINKER_SHLIBS($1)
  7121. _LT_SYS_DYNAMIC_LINKER($1)
  7122. _LT_LINKER_HARDCODE_LIBPATH($1)
  7123. _LT_CONFIG($1)
  7124. fi # test -n "$compiler"
  7125. GCC=$lt_save_GCC
  7126. CC=$lt_save_CC
  7127. CFLAGS=$lt_save_CFLAGS
  7128. fi # test yes != "$_lt_disable_F77"
  7129. AC_LANG_POP
  7130. ])# _LT_LANG_F77_CONFIG
  7131. # _LT_LANG_FC_CONFIG([TAG])
  7132. # -------------------------
  7133. # Ensure that the configuration variables for a Fortran compiler are
  7134. # suitably defined. These variables are subsequently used by _LT_CONFIG
  7135. # to write the compiler configuration to 'libtool'.
  7136. m4_defun([_LT_LANG_FC_CONFIG],
  7137. [AC_LANG_PUSH(Fortran)
  7138. if test -z "$FC" || test no = "$FC"; then
  7139. _lt_disable_FC=yes
  7140. fi
  7141. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7142. _LT_TAGVAR(allow_undefined_flag, $1)=
  7143. _LT_TAGVAR(always_export_symbols, $1)=no
  7144. _LT_TAGVAR(archive_expsym_cmds, $1)=
  7145. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  7146. _LT_TAGVAR(hardcode_direct, $1)=no
  7147. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  7148. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  7149. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  7150. _LT_TAGVAR(hardcode_minus_L, $1)=no
  7151. _LT_TAGVAR(hardcode_automatic, $1)=no
  7152. _LT_TAGVAR(inherit_rpath, $1)=no
  7153. _LT_TAGVAR(module_cmds, $1)=
  7154. _LT_TAGVAR(module_expsym_cmds, $1)=
  7155. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  7156. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7157. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  7158. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  7159. _LT_TAGVAR(no_undefined_flag, $1)=
  7160. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  7161. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  7162. # Source file extension for fc test sources.
  7163. ac_ext=${ac_fc_srcext-f}
  7164. # Object file extension for compiled fc test sources.
  7165. objext=o
  7166. _LT_TAGVAR(objext, $1)=$objext
  7167. # No sense in running all these tests if we already determined that
  7168. # the FC compiler isn't working. Some variables (like enable_shared)
  7169. # are currently assumed to apply to all compilers on this platform,
  7170. # and will be corrupted by setting them based on a non-working compiler.
  7171. if test yes != "$_lt_disable_FC"; then
  7172. # Code to be used in simple compile tests
  7173. lt_simple_compile_test_code="\
  7174. subroutine t
  7175. return
  7176. end
  7177. "
  7178. # Code to be used in simple link tests
  7179. lt_simple_link_test_code="\
  7180. program t
  7181. end
  7182. "
  7183. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7184. _LT_TAG_COMPILER
  7185. # save warnings/boilerplate of simple test code
  7186. _LT_COMPILER_BOILERPLATE
  7187. _LT_LINKER_BOILERPLATE
  7188. # Allow CC to be a program name with arguments.
  7189. lt_save_CC=$CC
  7190. lt_save_GCC=$GCC
  7191. lt_save_CFLAGS=$CFLAGS
  7192. CC=${FC-"f95"}
  7193. CFLAGS=$FCFLAGS
  7194. compiler=$CC
  7195. GCC=$ac_cv_fc_compiler_gnu
  7196. _LT_TAGVAR(compiler, $1)=$CC
  7197. _LT_CC_BASENAME([$compiler])
  7198. if test -n "$compiler"; then
  7199. AC_MSG_CHECKING([if libtool supports shared libraries])
  7200. AC_MSG_RESULT([$can_build_shared])
  7201. AC_MSG_CHECKING([whether to build shared libraries])
  7202. test no = "$can_build_shared" && enable_shared=no
  7203. # On AIX, shared libraries and static libraries use the same namespace, and
  7204. # are all built from PIC.
  7205. case $host_os in
  7206. aix3*)
  7207. test yes = "$enable_shared" && enable_static=no
  7208. if test -n "$RANLIB"; then
  7209. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  7210. postinstall_cmds='$RANLIB $lib'
  7211. fi
  7212. ;;
  7213. aix[[4-9]]*)
  7214. if test ia64 != "$host_cpu"; then
  7215. case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
  7216. yes,aix,yes) ;; # shared object as lib.so file only
  7217. yes,svr4,*) ;; # shared object as lib.so archive member only
  7218. yes,*) enable_static=no ;; # shared object in lib.a archive as well
  7219. esac
  7220. fi
  7221. ;;
  7222. esac
  7223. AC_MSG_RESULT([$enable_shared])
  7224. AC_MSG_CHECKING([whether to build static libraries])
  7225. # Make sure either enable_shared or enable_static is yes.
  7226. test yes = "$enable_shared" || enable_static=yes
  7227. AC_MSG_RESULT([$enable_static])
  7228. _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
  7229. _LT_TAGVAR(LD, $1)=$LD
  7230. ## CAVEAT EMPTOR:
  7231. ## There is no encapsulation within the following macros, do not change
  7232. ## the running order or otherwise move them around unless you know exactly
  7233. ## what you are doing...
  7234. _LT_SYS_HIDDEN_LIBDEPS($1)
  7235. _LT_COMPILER_PIC($1)
  7236. _LT_COMPILER_C_O($1)
  7237. _LT_COMPILER_FILE_LOCKS($1)
  7238. _LT_LINKER_SHLIBS($1)
  7239. _LT_SYS_DYNAMIC_LINKER($1)
  7240. _LT_LINKER_HARDCODE_LIBPATH($1)
  7241. _LT_CONFIG($1)
  7242. fi # test -n "$compiler"
  7243. GCC=$lt_save_GCC
  7244. CC=$lt_save_CC
  7245. CFLAGS=$lt_save_CFLAGS
  7246. fi # test yes != "$_lt_disable_FC"
  7247. AC_LANG_POP
  7248. ])# _LT_LANG_FC_CONFIG
  7249. # _LT_LANG_GCJ_CONFIG([TAG])
  7250. # --------------------------
  7251. # Ensure that the configuration variables for the GNU Java Compiler compiler
  7252. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  7253. # to write the compiler configuration to 'libtool'.
  7254. m4_defun([_LT_LANG_GCJ_CONFIG],
  7255. [AC_REQUIRE([LT_PROG_GCJ])dnl
  7256. AC_LANG_SAVE
  7257. # Source file extension for Java test sources.
  7258. ac_ext=java
  7259. # Object file extension for compiled Java test sources.
  7260. objext=o
  7261. _LT_TAGVAR(objext, $1)=$objext
  7262. # Code to be used in simple compile tests
  7263. lt_simple_compile_test_code="class foo {}"
  7264. # Code to be used in simple link tests
  7265. lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
  7266. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7267. _LT_TAG_COMPILER
  7268. # save warnings/boilerplate of simple test code
  7269. _LT_COMPILER_BOILERPLATE
  7270. _LT_LINKER_BOILERPLATE
  7271. # Allow CC to be a program name with arguments.
  7272. lt_save_CC=$CC
  7273. lt_save_CFLAGS=$CFLAGS
  7274. lt_save_GCC=$GCC
  7275. GCC=yes
  7276. CC=${GCJ-"gcj"}
  7277. CFLAGS=$GCJFLAGS
  7278. compiler=$CC
  7279. _LT_TAGVAR(compiler, $1)=$CC
  7280. _LT_TAGVAR(LD, $1)=$LD
  7281. _LT_CC_BASENAME([$compiler])
  7282. # GCJ did not exist at the time GCC didn't implicitly link libc in.
  7283. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7284. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7285. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  7286. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  7287. if test -n "$compiler"; then
  7288. _LT_COMPILER_NO_RTTI($1)
  7289. _LT_COMPILER_PIC($1)
  7290. _LT_COMPILER_C_O($1)
  7291. _LT_COMPILER_FILE_LOCKS($1)
  7292. _LT_LINKER_SHLIBS($1)
  7293. _LT_LINKER_HARDCODE_LIBPATH($1)
  7294. _LT_CONFIG($1)
  7295. fi
  7296. AC_LANG_RESTORE
  7297. GCC=$lt_save_GCC
  7298. CC=$lt_save_CC
  7299. CFLAGS=$lt_save_CFLAGS
  7300. ])# _LT_LANG_GCJ_CONFIG
  7301. # _LT_LANG_GO_CONFIG([TAG])
  7302. # --------------------------
  7303. # Ensure that the configuration variables for the GNU Go compiler
  7304. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  7305. # to write the compiler configuration to 'libtool'.
  7306. m4_defun([_LT_LANG_GO_CONFIG],
  7307. [AC_REQUIRE([LT_PROG_GO])dnl
  7308. AC_LANG_SAVE
  7309. # Source file extension for Go test sources.
  7310. ac_ext=go
  7311. # Object file extension for compiled Go test sources.
  7312. objext=o
  7313. _LT_TAGVAR(objext, $1)=$objext
  7314. # Code to be used in simple compile tests
  7315. lt_simple_compile_test_code="package main; func main() { }"
  7316. # Code to be used in simple link tests
  7317. lt_simple_link_test_code='package main; func main() { }'
  7318. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7319. _LT_TAG_COMPILER
  7320. # save warnings/boilerplate of simple test code
  7321. _LT_COMPILER_BOILERPLATE
  7322. _LT_LINKER_BOILERPLATE
  7323. # Allow CC to be a program name with arguments.
  7324. lt_save_CC=$CC
  7325. lt_save_CFLAGS=$CFLAGS
  7326. lt_save_GCC=$GCC
  7327. GCC=yes
  7328. CC=${GOC-"gccgo"}
  7329. CFLAGS=$GOFLAGS
  7330. compiler=$CC
  7331. _LT_TAGVAR(compiler, $1)=$CC
  7332. _LT_TAGVAR(LD, $1)=$LD
  7333. _LT_CC_BASENAME([$compiler])
  7334. # Go did not exist at the time GCC didn't implicitly link libc in.
  7335. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7336. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7337. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  7338. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  7339. if test -n "$compiler"; then
  7340. _LT_COMPILER_NO_RTTI($1)
  7341. _LT_COMPILER_PIC($1)
  7342. _LT_COMPILER_C_O($1)
  7343. _LT_COMPILER_FILE_LOCKS($1)
  7344. _LT_LINKER_SHLIBS($1)
  7345. _LT_LINKER_HARDCODE_LIBPATH($1)
  7346. _LT_CONFIG($1)
  7347. fi
  7348. AC_LANG_RESTORE
  7349. GCC=$lt_save_GCC
  7350. CC=$lt_save_CC
  7351. CFLAGS=$lt_save_CFLAGS
  7352. ])# _LT_LANG_GO_CONFIG
  7353. # _LT_LANG_RC_CONFIG([TAG])
  7354. # -------------------------
  7355. # Ensure that the configuration variables for the Windows resource compiler
  7356. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  7357. # to write the compiler configuration to 'libtool'.
  7358. m4_defun([_LT_LANG_RC_CONFIG],
  7359. [AC_REQUIRE([LT_PROG_RC])dnl
  7360. AC_LANG_SAVE
  7361. # Source file extension for RC test sources.
  7362. ac_ext=rc
  7363. # Object file extension for compiled RC test sources.
  7364. objext=o
  7365. _LT_TAGVAR(objext, $1)=$objext
  7366. # Code to be used in simple compile tests
  7367. lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
  7368. # Code to be used in simple link tests
  7369. lt_simple_link_test_code=$lt_simple_compile_test_code
  7370. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7371. _LT_TAG_COMPILER
  7372. # save warnings/boilerplate of simple test code
  7373. _LT_COMPILER_BOILERPLATE
  7374. _LT_LINKER_BOILERPLATE
  7375. # Allow CC to be a program name with arguments.
  7376. lt_save_CC=$CC
  7377. lt_save_CFLAGS=$CFLAGS
  7378. lt_save_GCC=$GCC
  7379. GCC=
  7380. CC=${RC-"windres"}
  7381. CFLAGS=
  7382. compiler=$CC
  7383. _LT_TAGVAR(compiler, $1)=$CC
  7384. _LT_CC_BASENAME([$compiler])
  7385. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  7386. if test -n "$compiler"; then
  7387. :
  7388. _LT_CONFIG($1)
  7389. fi
  7390. GCC=$lt_save_GCC
  7391. AC_LANG_RESTORE
  7392. CC=$lt_save_CC
  7393. CFLAGS=$lt_save_CFLAGS
  7394. ])# _LT_LANG_RC_CONFIG
  7395. # LT_PROG_GCJ
  7396. # -----------
  7397. AC_DEFUN([LT_PROG_GCJ],
  7398. [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
  7399. [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
  7400. [AC_CHECK_TOOL(GCJ, gcj,)
  7401. test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
  7402. AC_SUBST(GCJFLAGS)])])[]dnl
  7403. ])
  7404. # Old name:
  7405. AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
  7406. dnl aclocal-1.4 backwards compatibility:
  7407. dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
  7408. # LT_PROG_GO
  7409. # ----------
  7410. AC_DEFUN([LT_PROG_GO],
  7411. [AC_CHECK_TOOL(GOC, gccgo,)
  7412. ])
  7413. # LT_PROG_RC
  7414. # ----------
  7415. AC_DEFUN([LT_PROG_RC],
  7416. [AC_CHECK_TOOL(RC, windres,)
  7417. ])
  7418. # Old name:
  7419. AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
  7420. dnl aclocal-1.4 backwards compatibility:
  7421. dnl AC_DEFUN([LT_AC_PROG_RC], [])
  7422. # _LT_DECL_EGREP
  7423. # --------------
  7424. # If we don't have a new enough Autoconf to choose the best grep
  7425. # available, choose the one first in the user's PATH.
  7426. m4_defun([_LT_DECL_EGREP],
  7427. [AC_REQUIRE([AC_PROG_EGREP])dnl
  7428. AC_REQUIRE([AC_PROG_FGREP])dnl
  7429. test -z "$GREP" && GREP=grep
  7430. _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
  7431. _LT_DECL([], [EGREP], [1], [An ERE matcher])
  7432. _LT_DECL([], [FGREP], [1], [A literal string matcher])
  7433. dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
  7434. AC_SUBST([GREP])
  7435. ])
  7436. # _LT_DECL_OBJDUMP
  7437. # --------------
  7438. # If we don't have a new enough Autoconf to choose the best objdump
  7439. # available, choose the one first in the user's PATH.
  7440. m4_defun([_LT_DECL_OBJDUMP],
  7441. [AC_CHECK_TOOL(OBJDUMP, objdump, false)
  7442. test -z "$OBJDUMP" && OBJDUMP=objdump
  7443. _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
  7444. AC_SUBST([OBJDUMP])
  7445. ])
  7446. # _LT_DECL_DLLTOOL
  7447. # ----------------
  7448. # Ensure DLLTOOL variable is set.
  7449. m4_defun([_LT_DECL_DLLTOOL],
  7450. [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  7451. test -z "$DLLTOOL" && DLLTOOL=dlltool
  7452. _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
  7453. AC_SUBST([DLLTOOL])
  7454. ])
  7455. # _LT_DECL_SED
  7456. # ------------
  7457. # Check for a fully-functional sed program, that truncates
  7458. # as few characters as possible. Prefer GNU sed if found.
  7459. m4_defun([_LT_DECL_SED],
  7460. [AC_PROG_SED
  7461. test -z "$SED" && SED=sed
  7462. Xsed="$SED -e 1s/^X//"
  7463. _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
  7464. _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
  7465. [Sed that helps us avoid accidentally triggering echo(1) options like -n])
  7466. ])# _LT_DECL_SED
  7467. m4_ifndef([AC_PROG_SED], [
  7468. # NOTE: This macro has been submitted for inclusion into #
  7469. # GNU Autoconf as AC_PROG_SED. When it is available in #
  7470. # a released version of Autoconf we should remove this #
  7471. # macro and use it instead. #
  7472. m4_defun([AC_PROG_SED],
  7473. [AC_MSG_CHECKING([for a sed that does not truncate output])
  7474. AC_CACHE_VAL(lt_cv_path_SED,
  7475. [# Loop through the user's path and test for sed and gsed.
  7476. # Then use that list of sed's as ones to test for truncation.
  7477. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  7478. for as_dir in $PATH
  7479. do
  7480. IFS=$as_save_IFS
  7481. test -z "$as_dir" && as_dir=.
  7482. for lt_ac_prog in sed gsed; do
  7483. for ac_exec_ext in '' $ac_executable_extensions; do
  7484. if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
  7485. lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
  7486. fi
  7487. done
  7488. done
  7489. done
  7490. IFS=$as_save_IFS
  7491. lt_ac_max=0
  7492. lt_ac_count=0
  7493. # Add /usr/xpg4/bin/sed as it is typically found on Solaris
  7494. # along with /bin/sed that truncates output.
  7495. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
  7496. test ! -f "$lt_ac_sed" && continue
  7497. cat /dev/null > conftest.in
  7498. lt_ac_count=0
  7499. echo $ECHO_N "0123456789$ECHO_C" >conftest.in
  7500. # Check for GNU sed and select it if it is found.
  7501. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
  7502. lt_cv_path_SED=$lt_ac_sed
  7503. break
  7504. fi
  7505. while true; do
  7506. cat conftest.in conftest.in >conftest.tmp
  7507. mv conftest.tmp conftest.in
  7508. cp conftest.in conftest.nl
  7509. echo >>conftest.nl
  7510. $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
  7511. cmp -s conftest.out conftest.nl || break
  7512. # 10000 chars as input seems more than enough
  7513. test 10 -lt "$lt_ac_count" && break
  7514. lt_ac_count=`expr $lt_ac_count + 1`
  7515. if test "$lt_ac_count" -gt "$lt_ac_max"; then
  7516. lt_ac_max=$lt_ac_count
  7517. lt_cv_path_SED=$lt_ac_sed
  7518. fi
  7519. done
  7520. done
  7521. ])
  7522. SED=$lt_cv_path_SED
  7523. AC_SUBST([SED])
  7524. AC_MSG_RESULT([$SED])
  7525. ])#AC_PROG_SED
  7526. ])#m4_ifndef
  7527. # Old name:
  7528. AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
  7529. dnl aclocal-1.4 backwards compatibility:
  7530. dnl AC_DEFUN([LT_AC_PROG_SED], [])
  7531. # _LT_CHECK_SHELL_FEATURES
  7532. # ------------------------
  7533. # Find out whether the shell is Bourne or XSI compatible,
  7534. # or has some other useful features.
  7535. m4_defun([_LT_CHECK_SHELL_FEATURES],
  7536. [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
  7537. lt_unset=unset
  7538. else
  7539. lt_unset=false
  7540. fi
  7541. _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
  7542. # test EBCDIC or ASCII
  7543. case `echo X|tr X '\101'` in
  7544. A) # ASCII based system
  7545. # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
  7546. lt_SP2NL='tr \040 \012'
  7547. lt_NL2SP='tr \015\012 \040\040'
  7548. ;;
  7549. *) # EBCDIC based system
  7550. lt_SP2NL='tr \100 \n'
  7551. lt_NL2SP='tr \r\n \100\100'
  7552. ;;
  7553. esac
  7554. _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
  7555. _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
  7556. ])# _LT_CHECK_SHELL_FEATURES
  7557. # _LT_PATH_CONVERSION_FUNCTIONS
  7558. # -----------------------------
  7559. # Determine what file name conversion functions should be used by
  7560. # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
  7561. # for certain cross-compile configurations and native mingw.
  7562. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
  7563. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  7564. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  7565. AC_MSG_CHECKING([how to convert $build file names to $host format])
  7566. AC_CACHE_VAL(lt_cv_to_host_file_cmd,
  7567. [case $host in
  7568. *-*-mingw* )
  7569. case $build in
  7570. *-*-mingw* ) # actually msys
  7571. lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
  7572. ;;
  7573. *-*-cygwin* )
  7574. lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
  7575. ;;
  7576. * ) # otherwise, assume *nix
  7577. lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
  7578. ;;
  7579. esac
  7580. ;;
  7581. *-*-cygwin* )
  7582. case $build in
  7583. *-*-mingw* ) # actually msys
  7584. lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
  7585. ;;
  7586. *-*-cygwin* )
  7587. lt_cv_to_host_file_cmd=func_convert_file_noop
  7588. ;;
  7589. * ) # otherwise, assume *nix
  7590. lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
  7591. ;;
  7592. esac
  7593. ;;
  7594. * ) # unhandled hosts (and "normal" native builds)
  7595. lt_cv_to_host_file_cmd=func_convert_file_noop
  7596. ;;
  7597. esac
  7598. ])
  7599. to_host_file_cmd=$lt_cv_to_host_file_cmd
  7600. AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
  7601. _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
  7602. [0], [convert $build file names to $host format])dnl
  7603. AC_MSG_CHECKING([how to convert $build file names to toolchain format])
  7604. AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
  7605. [#assume ordinary cross tools, or native build.
  7606. lt_cv_to_tool_file_cmd=func_convert_file_noop
  7607. case $host in
  7608. *-*-mingw* )
  7609. case $build in
  7610. *-*-mingw* ) # actually msys
  7611. lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
  7612. ;;
  7613. esac
  7614. ;;
  7615. esac
  7616. ])
  7617. to_tool_file_cmd=$lt_cv_to_tool_file_cmd
  7618. AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
  7619. _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
  7620. [0], [convert $build files to toolchain format])dnl
  7621. ])# _LT_PATH_CONVERSION_FUNCTIONS
  7622. # Helper functions for option handling. -*- Autoconf -*-
  7623. #
  7624. # Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
  7625. # Foundation, Inc.
  7626. # Written by Gary V. Vaughan, 2004
  7627. #
  7628. # This file is free software; the Free Software Foundation gives
  7629. # unlimited permission to copy and/or distribute it, with or without
  7630. # modifications, as long as this notice is preserved.
  7631. # serial 8 ltoptions.m4
  7632. # This is to help aclocal find these macros, as it can't see m4_define.
  7633. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
  7634. # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
  7635. # ------------------------------------------
  7636. m4_define([_LT_MANGLE_OPTION],
  7637. [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
  7638. # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
  7639. # ---------------------------------------
  7640. # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
  7641. # matching handler defined, dispatch to it. Other OPTION-NAMEs are
  7642. # saved as a flag.
  7643. m4_define([_LT_SET_OPTION],
  7644. [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
  7645. m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
  7646. _LT_MANGLE_DEFUN([$1], [$2]),
  7647. [m4_warning([Unknown $1 option '$2'])])[]dnl
  7648. ])
  7649. # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
  7650. # ------------------------------------------------------------
  7651. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  7652. m4_define([_LT_IF_OPTION],
  7653. [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
  7654. # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
  7655. # -------------------------------------------------------
  7656. # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
  7657. # are set.
  7658. m4_define([_LT_UNLESS_OPTIONS],
  7659. [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
  7660. [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
  7661. [m4_define([$0_found])])])[]dnl
  7662. m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
  7663. ])[]dnl
  7664. ])
  7665. # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
  7666. # ----------------------------------------
  7667. # OPTION-LIST is a space-separated list of Libtool options associated
  7668. # with MACRO-NAME. If any OPTION has a matching handler declared with
  7669. # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
  7670. # the unknown option and exit.
  7671. m4_defun([_LT_SET_OPTIONS],
  7672. [# Set options
  7673. m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
  7674. [_LT_SET_OPTION([$1], _LT_Option)])
  7675. m4_if([$1],[LT_INIT],[
  7676. dnl
  7677. dnl Simply set some default values (i.e off) if boolean options were not
  7678. dnl specified:
  7679. _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
  7680. ])
  7681. _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
  7682. ])
  7683. dnl
  7684. dnl If no reference was made to various pairs of opposing options, then
  7685. dnl we run the default mode handler for the pair. For example, if neither
  7686. dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
  7687. dnl archives by default:
  7688. _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
  7689. _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
  7690. _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
  7691. _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
  7692. [_LT_ENABLE_FAST_INSTALL])
  7693. _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
  7694. [_LT_WITH_AIX_SONAME([aix])])
  7695. ])
  7696. ])# _LT_SET_OPTIONS
  7697. # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
  7698. # -----------------------------------------
  7699. m4_define([_LT_MANGLE_DEFUN],
  7700. [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
  7701. # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
  7702. # -----------------------------------------------
  7703. m4_define([LT_OPTION_DEFINE],
  7704. [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
  7705. ])# LT_OPTION_DEFINE
  7706. # dlopen
  7707. # ------
  7708. LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
  7709. ])
  7710. AU_DEFUN([AC_LIBTOOL_DLOPEN],
  7711. [_LT_SET_OPTION([LT_INIT], [dlopen])
  7712. AC_DIAGNOSE([obsolete],
  7713. [$0: Remove this warning and the call to _LT_SET_OPTION when you
  7714. put the 'dlopen' option into LT_INIT's first parameter.])
  7715. ])
  7716. dnl aclocal-1.4 backwards compatibility:
  7717. dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
  7718. # win32-dll
  7719. # ---------
  7720. # Declare package support for building win32 dll's.
  7721. LT_OPTION_DEFINE([LT_INIT], [win32-dll],
  7722. [enable_win32_dll=yes
  7723. case $host in
  7724. *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
  7725. AC_CHECK_TOOL(AS, as, false)
  7726. AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  7727. AC_CHECK_TOOL(OBJDUMP, objdump, false)
  7728. ;;
  7729. esac
  7730. test -z "$AS" && AS=as
  7731. _LT_DECL([], [AS], [1], [Assembler program])dnl
  7732. test -z "$DLLTOOL" && DLLTOOL=dlltool
  7733. _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
  7734. test -z "$OBJDUMP" && OBJDUMP=objdump
  7735. _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
  7736. ])# win32-dll
  7737. AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
  7738. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  7739. _LT_SET_OPTION([LT_INIT], [win32-dll])
  7740. AC_DIAGNOSE([obsolete],
  7741. [$0: Remove this warning and the call to _LT_SET_OPTION when you
  7742. put the 'win32-dll' option into LT_INIT's first parameter.])
  7743. ])
  7744. dnl aclocal-1.4 backwards compatibility:
  7745. dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
  7746. # _LT_ENABLE_SHARED([DEFAULT])
  7747. # ----------------------------
  7748. # implement the --enable-shared flag, and supports the 'shared' and
  7749. # 'disable-shared' LT_INIT options.
  7750. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
  7751. m4_define([_LT_ENABLE_SHARED],
  7752. [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
  7753. AC_ARG_ENABLE([shared],
  7754. [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
  7755. [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
  7756. [p=${PACKAGE-default}
  7757. case $enableval in
  7758. yes) enable_shared=yes ;;
  7759. no) enable_shared=no ;;
  7760. *)
  7761. enable_shared=no
  7762. # Look at the argument we got. We use all the common list separators.
  7763. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
  7764. for pkg in $enableval; do
  7765. IFS=$lt_save_ifs
  7766. if test "X$pkg" = "X$p"; then
  7767. enable_shared=yes
  7768. fi
  7769. done
  7770. IFS=$lt_save_ifs
  7771. ;;
  7772. esac],
  7773. [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
  7774. _LT_DECL([build_libtool_libs], [enable_shared], [0],
  7775. [Whether or not to build shared libraries])
  7776. ])# _LT_ENABLE_SHARED
  7777. LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
  7778. LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
  7779. # Old names:
  7780. AC_DEFUN([AC_ENABLE_SHARED],
  7781. [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
  7782. ])
  7783. AC_DEFUN([AC_DISABLE_SHARED],
  7784. [_LT_SET_OPTION([LT_INIT], [disable-shared])
  7785. ])
  7786. AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
  7787. AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
  7788. dnl aclocal-1.4 backwards compatibility:
  7789. dnl AC_DEFUN([AM_ENABLE_SHARED], [])
  7790. dnl AC_DEFUN([AM_DISABLE_SHARED], [])
  7791. # _LT_ENABLE_STATIC([DEFAULT])
  7792. # ----------------------------
  7793. # implement the --enable-static flag, and support the 'static' and
  7794. # 'disable-static' LT_INIT options.
  7795. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
  7796. m4_define([_LT_ENABLE_STATIC],
  7797. [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
  7798. AC_ARG_ENABLE([static],
  7799. [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
  7800. [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
  7801. [p=${PACKAGE-default}
  7802. case $enableval in
  7803. yes) enable_static=yes ;;
  7804. no) enable_static=no ;;
  7805. *)
  7806. enable_static=no
  7807. # Look at the argument we got. We use all the common list separators.
  7808. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
  7809. for pkg in $enableval; do
  7810. IFS=$lt_save_ifs
  7811. if test "X$pkg" = "X$p"; then
  7812. enable_static=yes
  7813. fi
  7814. done
  7815. IFS=$lt_save_ifs
  7816. ;;
  7817. esac],
  7818. [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
  7819. _LT_DECL([build_old_libs], [enable_static], [0],
  7820. [Whether or not to build static libraries])
  7821. ])# _LT_ENABLE_STATIC
  7822. LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
  7823. LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
  7824. # Old names:
  7825. AC_DEFUN([AC_ENABLE_STATIC],
  7826. [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
  7827. ])
  7828. AC_DEFUN([AC_DISABLE_STATIC],
  7829. [_LT_SET_OPTION([LT_INIT], [disable-static])
  7830. ])
  7831. AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
  7832. AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
  7833. dnl aclocal-1.4 backwards compatibility:
  7834. dnl AC_DEFUN([AM_ENABLE_STATIC], [])
  7835. dnl AC_DEFUN([AM_DISABLE_STATIC], [])
  7836. # _LT_ENABLE_FAST_INSTALL([DEFAULT])
  7837. # ----------------------------------
  7838. # implement the --enable-fast-install flag, and support the 'fast-install'
  7839. # and 'disable-fast-install' LT_INIT options.
  7840. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
  7841. m4_define([_LT_ENABLE_FAST_INSTALL],
  7842. [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
  7843. AC_ARG_ENABLE([fast-install],
  7844. [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
  7845. [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
  7846. [p=${PACKAGE-default}
  7847. case $enableval in
  7848. yes) enable_fast_install=yes ;;
  7849. no) enable_fast_install=no ;;
  7850. *)
  7851. enable_fast_install=no
  7852. # Look at the argument we got. We use all the common list separators.
  7853. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
  7854. for pkg in $enableval; do
  7855. IFS=$lt_save_ifs
  7856. if test "X$pkg" = "X$p"; then
  7857. enable_fast_install=yes
  7858. fi
  7859. done
  7860. IFS=$lt_save_ifs
  7861. ;;
  7862. esac],
  7863. [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
  7864. _LT_DECL([fast_install], [enable_fast_install], [0],
  7865. [Whether or not to optimize for fast installation])dnl
  7866. ])# _LT_ENABLE_FAST_INSTALL
  7867. LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
  7868. LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
  7869. # Old names:
  7870. AU_DEFUN([AC_ENABLE_FAST_INSTALL],
  7871. [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
  7872. AC_DIAGNOSE([obsolete],
  7873. [$0: Remove this warning and the call to _LT_SET_OPTION when you put
  7874. the 'fast-install' option into LT_INIT's first parameter.])
  7875. ])
  7876. AU_DEFUN([AC_DISABLE_FAST_INSTALL],
  7877. [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
  7878. AC_DIAGNOSE([obsolete],
  7879. [$0: Remove this warning and the call to _LT_SET_OPTION when you put
  7880. the 'disable-fast-install' option into LT_INIT's first parameter.])
  7881. ])
  7882. dnl aclocal-1.4 backwards compatibility:
  7883. dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
  7884. dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
  7885. # _LT_WITH_AIX_SONAME([DEFAULT])
  7886. # ----------------------------------
  7887. # implement the --with-aix-soname flag, and support the `aix-soname=aix'
  7888. # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
  7889. # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
  7890. m4_define([_LT_WITH_AIX_SONAME],
  7891. [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
  7892. shared_archive_member_spec=
  7893. case $host,$enable_shared in
  7894. power*-*-aix[[5-9]]*,yes)
  7895. AC_MSG_CHECKING([which variant of shared library versioning to provide])
  7896. AC_ARG_WITH([aix-soname],
  7897. [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
  7898. [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
  7899. [case $withval in
  7900. aix|svr4|both)
  7901. ;;
  7902. *)
  7903. AC_MSG_ERROR([Unknown argument to --with-aix-soname])
  7904. ;;
  7905. esac
  7906. lt_cv_with_aix_soname=$with_aix_soname],
  7907. [AC_CACHE_VAL([lt_cv_with_aix_soname],
  7908. [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
  7909. with_aix_soname=$lt_cv_with_aix_soname])
  7910. AC_MSG_RESULT([$with_aix_soname])
  7911. if test aix != "$with_aix_soname"; then
  7912. # For the AIX way of multilib, we name the shared archive member
  7913. # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
  7914. # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
  7915. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
  7916. # the AIX toolchain works better with OBJECT_MODE set (default 32).
  7917. if test 64 = "${OBJECT_MODE-32}"; then
  7918. shared_archive_member_spec=shr_64
  7919. else
  7920. shared_archive_member_spec=shr
  7921. fi
  7922. fi
  7923. ;;
  7924. *)
  7925. with_aix_soname=aix
  7926. ;;
  7927. esac
  7928. _LT_DECL([], [shared_archive_member_spec], [0],
  7929. [Shared archive member basename, for filename based shared library versioning on AIX])dnl
  7930. ])# _LT_WITH_AIX_SONAME
  7931. LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
  7932. LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
  7933. LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
  7934. # _LT_WITH_PIC([MODE])
  7935. # --------------------
  7936. # implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
  7937. # LT_INIT options.
  7938. # MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
  7939. m4_define([_LT_WITH_PIC],
  7940. [AC_ARG_WITH([pic],
  7941. [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
  7942. [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
  7943. [lt_p=${PACKAGE-default}
  7944. case $withval in
  7945. yes|no) pic_mode=$withval ;;
  7946. *)
  7947. pic_mode=default
  7948. # Look at the argument we got. We use all the common list separators.
  7949. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
  7950. for lt_pkg in $withval; do
  7951. IFS=$lt_save_ifs
  7952. if test "X$lt_pkg" = "X$lt_p"; then
  7953. pic_mode=yes
  7954. fi
  7955. done
  7956. IFS=$lt_save_ifs
  7957. ;;
  7958. esac],
  7959. [pic_mode=m4_default([$1], [default])])
  7960. _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
  7961. ])# _LT_WITH_PIC
  7962. LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
  7963. LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
  7964. # Old name:
  7965. AU_DEFUN([AC_LIBTOOL_PICMODE],
  7966. [_LT_SET_OPTION([LT_INIT], [pic-only])
  7967. AC_DIAGNOSE([obsolete],
  7968. [$0: Remove this warning and the call to _LT_SET_OPTION when you
  7969. put the 'pic-only' option into LT_INIT's first parameter.])
  7970. ])
  7971. dnl aclocal-1.4 backwards compatibility:
  7972. dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
  7973. m4_define([_LTDL_MODE], [])
  7974. LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
  7975. [m4_define([_LTDL_MODE], [nonrecursive])])
  7976. LT_OPTION_DEFINE([LTDL_INIT], [recursive],
  7977. [m4_define([_LTDL_MODE], [recursive])])
  7978. LT_OPTION_DEFINE([LTDL_INIT], [subproject],
  7979. [m4_define([_LTDL_MODE], [subproject])])
  7980. m4_define([_LTDL_TYPE], [])
  7981. LT_OPTION_DEFINE([LTDL_INIT], [installable],
  7982. [m4_define([_LTDL_TYPE], [installable])])
  7983. LT_OPTION_DEFINE([LTDL_INIT], [convenience],
  7984. [m4_define([_LTDL_TYPE], [convenience])])
  7985. # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
  7986. #
  7987. # Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
  7988. # Foundation, Inc.
  7989. # Written by Gary V. Vaughan, 2004
  7990. #
  7991. # This file is free software; the Free Software Foundation gives
  7992. # unlimited permission to copy and/or distribute it, with or without
  7993. # modifications, as long as this notice is preserved.
  7994. # serial 6 ltsugar.m4
  7995. # This is to help aclocal find these macros, as it can't see m4_define.
  7996. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
  7997. # lt_join(SEP, ARG1, [ARG2...])
  7998. # -----------------------------
  7999. # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
  8000. # associated separator.
  8001. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
  8002. # versions in m4sugar had bugs.
  8003. m4_define([lt_join],
  8004. [m4_if([$#], [1], [],
  8005. [$#], [2], [[$2]],
  8006. [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
  8007. m4_define([_lt_join],
  8008. [m4_if([$#$2], [2], [],
  8009. [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
  8010. # lt_car(LIST)
  8011. # lt_cdr(LIST)
  8012. # ------------
  8013. # Manipulate m4 lists.
  8014. # These macros are necessary as long as will still need to support
  8015. # Autoconf-2.59, which quotes differently.
  8016. m4_define([lt_car], [[$1]])
  8017. m4_define([lt_cdr],
  8018. [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
  8019. [$#], 1, [],
  8020. [m4_dquote(m4_shift($@))])])
  8021. m4_define([lt_unquote], $1)
  8022. # lt_append(MACRO-NAME, STRING, [SEPARATOR])
  8023. # ------------------------------------------
  8024. # Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
  8025. # Note that neither SEPARATOR nor STRING are expanded; they are appended
  8026. # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
  8027. # No SEPARATOR is output if MACRO-NAME was previously undefined (different
  8028. # than defined and empty).
  8029. #
  8030. # This macro is needed until we can rely on Autoconf 2.62, since earlier
  8031. # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
  8032. m4_define([lt_append],
  8033. [m4_define([$1],
  8034. m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
  8035. # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
  8036. # ----------------------------------------------------------
  8037. # Produce a SEP delimited list of all paired combinations of elements of
  8038. # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
  8039. # has the form PREFIXmINFIXSUFFIXn.
  8040. # Needed until we can rely on m4_combine added in Autoconf 2.62.
  8041. m4_define([lt_combine],
  8042. [m4_if(m4_eval([$# > 3]), [1],
  8043. [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
  8044. [[m4_foreach([_Lt_prefix], [$2],
  8045. [m4_foreach([_Lt_suffix],
  8046. ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
  8047. [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
  8048. # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
  8049. # -----------------------------------------------------------------------
  8050. # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
  8051. # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
  8052. m4_define([lt_if_append_uniq],
  8053. [m4_ifdef([$1],
  8054. [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
  8055. [lt_append([$1], [$2], [$3])$4],
  8056. [$5])],
  8057. [lt_append([$1], [$2], [$3])$4])])
  8058. # lt_dict_add(DICT, KEY, VALUE)
  8059. # -----------------------------
  8060. m4_define([lt_dict_add],
  8061. [m4_define([$1($2)], [$3])])
  8062. # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
  8063. # --------------------------------------------
  8064. m4_define([lt_dict_add_subkey],
  8065. [m4_define([$1($2:$3)], [$4])])
  8066. # lt_dict_fetch(DICT, KEY, [SUBKEY])
  8067. # ----------------------------------
  8068. m4_define([lt_dict_fetch],
  8069. [m4_ifval([$3],
  8070. m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
  8071. m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
  8072. # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
  8073. # -----------------------------------------------------------------
  8074. m4_define([lt_if_dict_fetch],
  8075. [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
  8076. [$5],
  8077. [$6])])
  8078. # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
  8079. # --------------------------------------------------------------
  8080. m4_define([lt_dict_filter],
  8081. [m4_if([$5], [], [],
  8082. [lt_join(m4_quote(m4_default([$4], [[, ]])),
  8083. lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
  8084. [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
  8085. ])
  8086. # ltversion.m4 -- version numbers -*- Autoconf -*-
  8087. #
  8088. # Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
  8089. # Written by Scott James Remnant, 2004
  8090. #
  8091. # This file is free software; the Free Software Foundation gives
  8092. # unlimited permission to copy and/or distribute it, with or without
  8093. # modifications, as long as this notice is preserved.
  8094. # @configure_input@
  8095. # serial 4179 ltversion.m4
  8096. # This file is part of GNU Libtool
  8097. m4_define([LT_PACKAGE_VERSION], [2.4.6])
  8098. m4_define([LT_PACKAGE_REVISION], [2.4.6])
  8099. AC_DEFUN([LTVERSION_VERSION],
  8100. [macro_version='2.4.6'
  8101. macro_revision='2.4.6'
  8102. _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
  8103. _LT_DECL(, macro_revision, 0)
  8104. ])
  8105. # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
  8106. #
  8107. # Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
  8108. # Foundation, Inc.
  8109. # Written by Scott James Remnant, 2004.
  8110. #
  8111. # This file is free software; the Free Software Foundation gives
  8112. # unlimited permission to copy and/or distribute it, with or without
  8113. # modifications, as long as this notice is preserved.
  8114. # serial 5 lt~obsolete.m4
  8115. # These exist entirely to fool aclocal when bootstrapping libtool.
  8116. #
  8117. # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
  8118. # which have later been changed to m4_define as they aren't part of the
  8119. # exported API, or moved to Autoconf or Automake where they belong.
  8120. #
  8121. # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
  8122. # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
  8123. # using a macro with the same name in our local m4/libtool.m4 it'll
  8124. # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
  8125. # and doesn't know about Autoconf macros at all.)
  8126. #
  8127. # So we provide this file, which has a silly filename so it's always
  8128. # included after everything else. This provides aclocal with the
  8129. # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
  8130. # because those macros already exist, or will be overwritten later.
  8131. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
  8132. #
  8133. # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
  8134. # Yes, that means every name once taken will need to remain here until
  8135. # we give up compatibility with versions before 1.7, at which point
  8136. # we need to keep only those names which we still refer to.
  8137. # This is to help aclocal find these macros, as it can't see m4_define.
  8138. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
  8139. m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
  8140. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
  8141. m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
  8142. m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
  8143. m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
  8144. m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
  8145. m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
  8146. m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
  8147. m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
  8148. m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
  8149. m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
  8150. m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
  8151. m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
  8152. m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
  8153. m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
  8154. m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
  8155. m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
  8156. m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
  8157. m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
  8158. m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
  8159. m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
  8160. m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
  8161. m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
  8162. m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
  8163. m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
  8164. m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
  8165. m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
  8166. m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
  8167. m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
  8168. m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
  8169. m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
  8170. m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
  8171. m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
  8172. m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
  8173. m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
  8174. m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
  8175. m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
  8176. m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
  8177. m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
  8178. m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
  8179. m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
  8180. m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
  8181. m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
  8182. m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
  8183. m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
  8184. m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
  8185. m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
  8186. m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
  8187. m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
  8188. m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
  8189. m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
  8190. m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
  8191. m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
  8192. m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
  8193. m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
  8194. m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
  8195. m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
  8196. m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
  8197. m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
  8198. m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
  8199. m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
  8200. # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
  8201. # serial 12 (pkg-config-0.29.2)
  8202. dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
  8203. dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
  8204. dnl
  8205. dnl This program is free software; you can redistribute it and/or modify
  8206. dnl it under the terms of the GNU General Public License as published by
  8207. dnl the Free Software Foundation; either version 2 of the License, or
  8208. dnl (at your option) any later version.
  8209. dnl
  8210. dnl This program is distributed in the hope that it will be useful, but
  8211. dnl WITHOUT ANY WARRANTY; without even the implied warranty of
  8212. dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  8213. dnl General Public License for more details.
  8214. dnl
  8215. dnl You should have received a copy of the GNU General Public License
  8216. dnl along with this program; if not, write to the Free Software
  8217. dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  8218. dnl 02111-1307, USA.
  8219. dnl
  8220. dnl As a special exception to the GNU General Public License, if you
  8221. dnl distribute this file as part of a program that contains a
  8222. dnl configuration script generated by Autoconf, you may include it under
  8223. dnl the same distribution terms that you use for the rest of that
  8224. dnl program.
  8225. dnl PKG_PREREQ(MIN-VERSION)
  8226. dnl -----------------------
  8227. dnl Since: 0.29
  8228. dnl
  8229. dnl Verify that the version of the pkg-config macros are at least
  8230. dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
  8231. dnl installed version of pkg-config, this checks the developer's version
  8232. dnl of pkg.m4 when generating configure.
  8233. dnl
  8234. dnl To ensure that this macro is defined, also add:
  8235. dnl m4_ifndef([PKG_PREREQ],
  8236. dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
  8237. dnl
  8238. dnl See the "Since" comment for each macro you use to see what version
  8239. dnl of the macros you require.
  8240. m4_defun([PKG_PREREQ],
  8241. [m4_define([PKG_MACROS_VERSION], [0.29.2])
  8242. m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
  8243. [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
  8244. ])dnl PKG_PREREQ
  8245. dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
  8246. dnl ----------------------------------
  8247. dnl Since: 0.16
  8248. dnl
  8249. dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
  8250. dnl first found in the path. Checks that the version of pkg-config found
  8251. dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
  8252. dnl used since that's the first version where most current features of
  8253. dnl pkg-config existed.
  8254. AC_DEFUN([PKG_PROG_PKG_CONFIG],
  8255. [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
  8256. m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
  8257. m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
  8258. AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
  8259. AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
  8260. AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
  8261. if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
  8262. AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
  8263. fi
  8264. if test -n "$PKG_CONFIG"; then
  8265. _pkg_min_version=m4_default([$1], [0.9.0])
  8266. AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
  8267. if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
  8268. AC_MSG_RESULT([yes])
  8269. else
  8270. AC_MSG_RESULT([no])
  8271. PKG_CONFIG=""
  8272. fi
  8273. fi[]dnl
  8274. ])dnl PKG_PROG_PKG_CONFIG
  8275. dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
  8276. dnl -------------------------------------------------------------------
  8277. dnl Since: 0.18
  8278. dnl
  8279. dnl Check to see whether a particular set of modules exists. Similar to
  8280. dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
  8281. dnl
  8282. dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
  8283. dnl only at the first occurence in configure.ac, so if the first place
  8284. dnl it's called might be skipped (such as if it is within an "if", you
  8285. dnl have to call PKG_CHECK_EXISTS manually
  8286. AC_DEFUN([PKG_CHECK_EXISTS],
  8287. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  8288. if test -n "$PKG_CONFIG" && \
  8289. AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
  8290. m4_default([$2], [:])
  8291. m4_ifvaln([$3], [else
  8292. $3])dnl
  8293. fi])
  8294. dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
  8295. dnl ---------------------------------------------
  8296. dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
  8297. dnl pkg_failed based on the result.
  8298. m4_define([_PKG_CONFIG],
  8299. [if test -n "$$1"; then
  8300. pkg_cv_[]$1="$$1"
  8301. elif test -n "$PKG_CONFIG"; then
  8302. PKG_CHECK_EXISTS([$3],
  8303. [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
  8304. test "x$?" != "x0" && pkg_failed=yes ],
  8305. [pkg_failed=yes])
  8306. else
  8307. pkg_failed=untried
  8308. fi[]dnl
  8309. ])dnl _PKG_CONFIG
  8310. dnl _PKG_SHORT_ERRORS_SUPPORTED
  8311. dnl ---------------------------
  8312. dnl Internal check to see if pkg-config supports short errors.
  8313. AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
  8314. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
  8315. if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  8316. _pkg_short_errors_supported=yes
  8317. else
  8318. _pkg_short_errors_supported=no
  8319. fi[]dnl
  8320. ])dnl _PKG_SHORT_ERRORS_SUPPORTED
  8321. dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
  8322. dnl [ACTION-IF-NOT-FOUND])
  8323. dnl --------------------------------------------------------------
  8324. dnl Since: 0.4.0
  8325. dnl
  8326. dnl Note that if there is a possibility the first call to
  8327. dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
  8328. dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
  8329. AC_DEFUN([PKG_CHECK_MODULES],
  8330. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  8331. AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
  8332. AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
  8333. pkg_failed=no
  8334. AC_MSG_CHECKING([for $2])
  8335. _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
  8336. _PKG_CONFIG([$1][_LIBS], [libs], [$2])
  8337. m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
  8338. and $1[]_LIBS to avoid the need to call pkg-config.
  8339. See the pkg-config man page for more details.])
  8340. if test $pkg_failed = yes; then
  8341. AC_MSG_RESULT([no])
  8342. _PKG_SHORT_ERRORS_SUPPORTED
  8343. if test $_pkg_short_errors_supported = yes; then
  8344. $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
  8345. else
  8346. $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
  8347. fi
  8348. # Put the nasty error message in config.log where it belongs
  8349. echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
  8350. m4_default([$4], [AC_MSG_ERROR(
  8351. [Package requirements ($2) were not met:
  8352. $$1_PKG_ERRORS
  8353. Consider adjusting the PKG_CONFIG_PATH environment variable if you
  8354. installed software in a non-standard prefix.
  8355. _PKG_TEXT])[]dnl
  8356. ])
  8357. elif test $pkg_failed = untried; then
  8358. AC_MSG_RESULT([no])
  8359. m4_default([$4], [AC_MSG_FAILURE(
  8360. [The pkg-config script could not be found or is too old. Make sure it
  8361. is in your PATH or set the PKG_CONFIG environment variable to the full
  8362. path to pkg-config.
  8363. _PKG_TEXT
  8364. To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
  8365. ])
  8366. else
  8367. $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
  8368. $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
  8369. AC_MSG_RESULT([yes])
  8370. $3
  8371. fi[]dnl
  8372. ])dnl PKG_CHECK_MODULES
  8373. dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
  8374. dnl [ACTION-IF-NOT-FOUND])
  8375. dnl ---------------------------------------------------------------------
  8376. dnl Since: 0.29
  8377. dnl
  8378. dnl Checks for existence of MODULES and gathers its build flags with
  8379. dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
  8380. dnl and VARIABLE-PREFIX_LIBS from --libs.
  8381. dnl
  8382. dnl Note that if there is a possibility the first call to
  8383. dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
  8384. dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
  8385. dnl configure.ac.
  8386. AC_DEFUN([PKG_CHECK_MODULES_STATIC],
  8387. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  8388. _save_PKG_CONFIG=$PKG_CONFIG
  8389. PKG_CONFIG="$PKG_CONFIG --static"
  8390. PKG_CHECK_MODULES($@)
  8391. PKG_CONFIG=$_save_PKG_CONFIG[]dnl
  8392. ])dnl PKG_CHECK_MODULES_STATIC
  8393. dnl PKG_INSTALLDIR([DIRECTORY])
  8394. dnl -------------------------
  8395. dnl Since: 0.27
  8396. dnl
  8397. dnl Substitutes the variable pkgconfigdir as the location where a module
  8398. dnl should install pkg-config .pc files. By default the directory is
  8399. dnl $libdir/pkgconfig, but the default can be changed by passing
  8400. dnl DIRECTORY. The user can override through the --with-pkgconfigdir
  8401. dnl parameter.
  8402. AC_DEFUN([PKG_INSTALLDIR],
  8403. [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
  8404. m4_pushdef([pkg_description],
  8405. [pkg-config installation directory @<:@]pkg_default[@:>@])
  8406. AC_ARG_WITH([pkgconfigdir],
  8407. [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
  8408. [with_pkgconfigdir=]pkg_default)
  8409. AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
  8410. m4_popdef([pkg_default])
  8411. m4_popdef([pkg_description])
  8412. ])dnl PKG_INSTALLDIR
  8413. dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
  8414. dnl --------------------------------
  8415. dnl Since: 0.27
  8416. dnl
  8417. dnl Substitutes the variable noarch_pkgconfigdir as the location where a
  8418. dnl module should install arch-independent pkg-config .pc files. By
  8419. dnl default the directory is $datadir/pkgconfig, but the default can be
  8420. dnl changed by passing DIRECTORY. The user can override through the
  8421. dnl --with-noarch-pkgconfigdir parameter.
  8422. AC_DEFUN([PKG_NOARCH_INSTALLDIR],
  8423. [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
  8424. m4_pushdef([pkg_description],
  8425. [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
  8426. AC_ARG_WITH([noarch-pkgconfigdir],
  8427. [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
  8428. [with_noarch_pkgconfigdir=]pkg_default)
  8429. AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
  8430. m4_popdef([pkg_default])
  8431. m4_popdef([pkg_description])
  8432. ])dnl PKG_NOARCH_INSTALLDIR
  8433. dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
  8434. dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
  8435. dnl -------------------------------------------
  8436. dnl Since: 0.28
  8437. dnl
  8438. dnl Retrieves the value of the pkg-config variable for the given module.
  8439. AC_DEFUN([PKG_CHECK_VAR],
  8440. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  8441. AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
  8442. _PKG_CONFIG([$1], [variable="][$3]["], [$2])
  8443. AS_VAR_COPY([$1], [pkg_cv_][$1])
  8444. AS_VAR_IF([$1], [""], [$5], [$4])dnl
  8445. ])dnl PKG_CHECK_VAR
  8446. # Copyright (C) 2002-2020 Free Software Foundation, Inc.
  8447. #
  8448. # This file is free software; the Free Software Foundation
  8449. # gives unlimited permission to copy and/or distribute it,
  8450. # with or without modifications, as long as this notice is preserved.
  8451. # AM_AUTOMAKE_VERSION(VERSION)
  8452. # ----------------------------
  8453. # Automake X.Y traces this macro to ensure aclocal.m4 has been
  8454. # generated from the m4 files accompanying Automake X.Y.
  8455. # (This private macro should not be called outside this file.)
  8456. AC_DEFUN([AM_AUTOMAKE_VERSION],
  8457. [am__api_version='1.16'
  8458. dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
  8459. dnl require some minimum version. Point them to the right macro.
  8460. m4_if([$1], [1.16.3], [],
  8461. [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
  8462. ])
  8463. # _AM_AUTOCONF_VERSION(VERSION)
  8464. # -----------------------------
  8465. # aclocal traces this macro to find the Autoconf version.
  8466. # This is a private macro too. Using m4_define simplifies
  8467. # the logic in aclocal, which can simply ignore this definition.
  8468. m4_define([_AM_AUTOCONF_VERSION], [])
  8469. # AM_SET_CURRENT_AUTOMAKE_VERSION
  8470. # -------------------------------
  8471. # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
  8472. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
  8473. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
  8474. [AM_AUTOMAKE_VERSION([1.16.3])dnl
  8475. m4_ifndef([AC_AUTOCONF_VERSION],
  8476. [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
  8477. _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
  8478. # AM_AUX_DIR_EXPAND -*- Autoconf -*-
  8479. # Copyright (C) 2001-2020 Free Software Foundation, Inc.
  8480. #
  8481. # This file is free software; the Free Software Foundation
  8482. # gives unlimited permission to copy and/or distribute it,
  8483. # with or without modifications, as long as this notice is preserved.
  8484. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
  8485. # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
  8486. # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
  8487. #
  8488. # Of course, Automake must honor this variable whenever it calls a
  8489. # tool from the auxiliary directory. The problem is that $srcdir (and
  8490. # therefore $ac_aux_dir as well) can be either absolute or relative,
  8491. # depending on how configure is run. This is pretty annoying, since
  8492. # it makes $ac_aux_dir quite unusable in subdirectories: in the top
  8493. # source directory, any form will work fine, but in subdirectories a
  8494. # relative path needs to be adjusted first.
  8495. #
  8496. # $ac_aux_dir/missing
  8497. # fails when called from a subdirectory if $ac_aux_dir is relative
  8498. # $top_srcdir/$ac_aux_dir/missing
  8499. # fails if $ac_aux_dir is absolute,
  8500. # fails when called from a subdirectory in a VPATH build with
  8501. # a relative $ac_aux_dir
  8502. #
  8503. # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
  8504. # are both prefixed by $srcdir. In an in-source build this is usually
  8505. # harmless because $srcdir is '.', but things will broke when you
  8506. # start a VPATH build or use an absolute $srcdir.
  8507. #
  8508. # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
  8509. # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
  8510. # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
  8511. # and then we would define $MISSING as
  8512. # MISSING="\${SHELL} $am_aux_dir/missing"
  8513. # This will work as long as MISSING is not called from configure, because
  8514. # unfortunately $(top_srcdir) has no meaning in configure.
  8515. # However there are other variables, like CC, which are often used in
  8516. # configure, and could therefore not use this "fixed" $ac_aux_dir.
  8517. #
  8518. # Another solution, used here, is to always expand $ac_aux_dir to an
  8519. # absolute PATH. The drawback is that using absolute paths prevent a
  8520. # configured tree to be moved without reconfiguration.
  8521. AC_DEFUN([AM_AUX_DIR_EXPAND],
  8522. [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  8523. # Expand $ac_aux_dir to an absolute path.
  8524. am_aux_dir=`cd "$ac_aux_dir" && pwd`
  8525. ])
  8526. # AM_CONDITIONAL -*- Autoconf -*-
  8527. # Copyright (C) 1997-2020 Free Software Foundation, Inc.
  8528. #
  8529. # This file is free software; the Free Software Foundation
  8530. # gives unlimited permission to copy and/or distribute it,
  8531. # with or without modifications, as long as this notice is preserved.
  8532. # AM_CONDITIONAL(NAME, SHELL-CONDITION)
  8533. # -------------------------------------
  8534. # Define a conditional.
  8535. AC_DEFUN([AM_CONDITIONAL],
  8536. [AC_PREREQ([2.52])dnl
  8537. m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
  8538. [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
  8539. AC_SUBST([$1_TRUE])dnl
  8540. AC_SUBST([$1_FALSE])dnl
  8541. _AM_SUBST_NOTMAKE([$1_TRUE])dnl
  8542. _AM_SUBST_NOTMAKE([$1_FALSE])dnl
  8543. m4_define([_AM_COND_VALUE_$1], [$2])dnl
  8544. if $2; then
  8545. $1_TRUE=
  8546. $1_FALSE='#'
  8547. else
  8548. $1_TRUE='#'
  8549. $1_FALSE=
  8550. fi
  8551. AC_CONFIG_COMMANDS_PRE(
  8552. [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
  8553. AC_MSG_ERROR([[conditional "$1" was never defined.
  8554. Usually this means the macro was only invoked conditionally.]])
  8555. fi])])
  8556. # Copyright (C) 1999-2020 Free Software Foundation, Inc.
  8557. #
  8558. # This file is free software; the Free Software Foundation
  8559. # gives unlimited permission to copy and/or distribute it,
  8560. # with or without modifications, as long as this notice is preserved.
  8561. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
  8562. # written in clear, in which case automake, when reading aclocal.m4,
  8563. # will think it sees a *use*, and therefore will trigger all it's
  8564. # C support machinery. Also note that it means that autoscan, seeing
  8565. # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
  8566. # _AM_DEPENDENCIES(NAME)
  8567. # ----------------------
  8568. # See how the compiler implements dependency checking.
  8569. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
  8570. # We try a few techniques and use that to set a single cache variable.
  8571. #
  8572. # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
  8573. # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
  8574. # dependency, and given that the user is not expected to run this macro,
  8575. # just rely on AC_PROG_CC.
  8576. AC_DEFUN([_AM_DEPENDENCIES],
  8577. [AC_REQUIRE([AM_SET_DEPDIR])dnl
  8578. AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
  8579. AC_REQUIRE([AM_MAKE_INCLUDE])dnl
  8580. AC_REQUIRE([AM_DEP_TRACK])dnl
  8581. m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
  8582. [$1], [CXX], [depcc="$CXX" am_compiler_list=],
  8583. [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
  8584. [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
  8585. [$1], [UPC], [depcc="$UPC" am_compiler_list=],
  8586. [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
  8587. [depcc="$$1" am_compiler_list=])
  8588. AC_CACHE_CHECK([dependency style of $depcc],
  8589. [am_cv_$1_dependencies_compiler_type],
  8590. [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  8591. # We make a subdir and do the tests there. Otherwise we can end up
  8592. # making bogus files that we don't know about and never remove. For
  8593. # instance it was reported that on HP-UX the gcc test will end up
  8594. # making a dummy file named 'D' -- because '-MD' means "put the output
  8595. # in D".
  8596. rm -rf conftest.dir
  8597. mkdir conftest.dir
  8598. # Copy depcomp to subdir because otherwise we won't find it if we're
  8599. # using a relative directory.
  8600. cp "$am_depcomp" conftest.dir
  8601. cd conftest.dir
  8602. # We will build objects and dependencies in a subdirectory because
  8603. # it helps to detect inapplicable dependency modes. For instance
  8604. # both Tru64's cc and ICC support -MD to output dependencies as a
  8605. # side effect of compilation, but ICC will put the dependencies in
  8606. # the current directory while Tru64 will put them in the object
  8607. # directory.
  8608. mkdir sub
  8609. am_cv_$1_dependencies_compiler_type=none
  8610. if test "$am_compiler_list" = ""; then
  8611. am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
  8612. fi
  8613. am__universal=false
  8614. m4_case([$1], [CC],
  8615. [case " $depcc " in #(
  8616. *\ -arch\ *\ -arch\ *) am__universal=true ;;
  8617. esac],
  8618. [CXX],
  8619. [case " $depcc " in #(
  8620. *\ -arch\ *\ -arch\ *) am__universal=true ;;
  8621. esac])
  8622. for depmode in $am_compiler_list; do
  8623. # Setup a source with many dependencies, because some compilers
  8624. # like to wrap large dependency lists on column 80 (with \), and
  8625. # we should not choose a depcomp mode which is confused by this.
  8626. #
  8627. # We need to recreate these files for each test, as the compiler may
  8628. # overwrite some of them when testing with obscure command lines.
  8629. # This happens at least with the AIX C compiler.
  8630. : > sub/conftest.c
  8631. for i in 1 2 3 4 5 6; do
  8632. echo '#include "conftst'$i'.h"' >> sub/conftest.c
  8633. # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
  8634. # Solaris 10 /bin/sh.
  8635. echo '/* dummy */' > sub/conftst$i.h
  8636. done
  8637. echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
  8638. # We check with '-c' and '-o' for the sake of the "dashmstdout"
  8639. # mode. It turns out that the SunPro C++ compiler does not properly
  8640. # handle '-M -o', and we need to detect this. Also, some Intel
  8641. # versions had trouble with output in subdirs.
  8642. am__obj=sub/conftest.${OBJEXT-o}
  8643. am__minus_obj="-o $am__obj"
  8644. case $depmode in
  8645. gcc)
  8646. # This depmode causes a compiler race in universal mode.
  8647. test "$am__universal" = false || continue
  8648. ;;
  8649. nosideeffect)
  8650. # After this tag, mechanisms are not by side-effect, so they'll
  8651. # only be used when explicitly requested.
  8652. if test "x$enable_dependency_tracking" = xyes; then
  8653. continue
  8654. else
  8655. break
  8656. fi
  8657. ;;
  8658. msvc7 | msvc7msys | msvisualcpp | msvcmsys)
  8659. # This compiler won't grok '-c -o', but also, the minuso test has
  8660. # not run yet. These depmodes are late enough in the game, and
  8661. # so weak that their functioning should not be impacted.
  8662. am__obj=conftest.${OBJEXT-o}
  8663. am__minus_obj=
  8664. ;;
  8665. none) break ;;
  8666. esac
  8667. if depmode=$depmode \
  8668. source=sub/conftest.c object=$am__obj \
  8669. depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
  8670. $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
  8671. >/dev/null 2>conftest.err &&
  8672. grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
  8673. grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
  8674. grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
  8675. ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
  8676. # icc doesn't choke on unknown options, it will just issue warnings
  8677. # or remarks (even with -Werror). So we grep stderr for any message
  8678. # that says an option was ignored or not supported.
  8679. # When given -MP, icc 7.0 and 7.1 complain thusly:
  8680. # icc: Command line warning: ignoring option '-M'; no argument required
  8681. # The diagnosis changed in icc 8.0:
  8682. # icc: Command line remark: option '-MP' not supported
  8683. if (grep 'ignoring option' conftest.err ||
  8684. grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
  8685. am_cv_$1_dependencies_compiler_type=$depmode
  8686. break
  8687. fi
  8688. fi
  8689. done
  8690. cd ..
  8691. rm -rf conftest.dir
  8692. else
  8693. am_cv_$1_dependencies_compiler_type=none
  8694. fi
  8695. ])
  8696. AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
  8697. AM_CONDITIONAL([am__fastdep$1], [
  8698. test "x$enable_dependency_tracking" != xno \
  8699. && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
  8700. ])
  8701. # AM_SET_DEPDIR
  8702. # -------------
  8703. # Choose a directory name for dependency files.
  8704. # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
  8705. AC_DEFUN([AM_SET_DEPDIR],
  8706. [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  8707. AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
  8708. ])
  8709. # AM_DEP_TRACK
  8710. # ------------
  8711. AC_DEFUN([AM_DEP_TRACK],
  8712. [AC_ARG_ENABLE([dependency-tracking], [dnl
  8713. AS_HELP_STRING(
  8714. [--enable-dependency-tracking],
  8715. [do not reject slow dependency extractors])
  8716. AS_HELP_STRING(
  8717. [--disable-dependency-tracking],
  8718. [speeds up one-time build])])
  8719. if test "x$enable_dependency_tracking" != xno; then
  8720. am_depcomp="$ac_aux_dir/depcomp"
  8721. AMDEPBACKSLASH='\'
  8722. am__nodep='_no'
  8723. fi
  8724. AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
  8725. AC_SUBST([AMDEPBACKSLASH])dnl
  8726. _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
  8727. AC_SUBST([am__nodep])dnl
  8728. _AM_SUBST_NOTMAKE([am__nodep])dnl
  8729. ])
  8730. # Generate code to set up dependency tracking. -*- Autoconf -*-
  8731. # Copyright (C) 1999-2020 Free Software Foundation, Inc.
  8732. #
  8733. # This file is free software; the Free Software Foundation
  8734. # gives unlimited permission to copy and/or distribute it,
  8735. # with or without modifications, as long as this notice is preserved.
  8736. # _AM_OUTPUT_DEPENDENCY_COMMANDS
  8737. # ------------------------------
  8738. AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
  8739. [{
  8740. # Older Autoconf quotes --file arguments for eval, but not when files
  8741. # are listed without --file. Let's play safe and only enable the eval
  8742. # if we detect the quoting.
  8743. # TODO: see whether this extra hack can be removed once we start
  8744. # requiring Autoconf 2.70 or later.
  8745. AS_CASE([$CONFIG_FILES],
  8746. [*\'*], [eval set x "$CONFIG_FILES"],
  8747. [*], [set x $CONFIG_FILES])
  8748. shift
  8749. # Used to flag and report bootstrapping failures.
  8750. am_rc=0
  8751. for am_mf
  8752. do
  8753. # Strip MF so we end up with the name of the file.
  8754. am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
  8755. # Check whether this is an Automake generated Makefile which includes
  8756. # dependency-tracking related rules and includes.
  8757. # Grep'ing the whole file directly is not great: AIX grep has a line
  8758. # limit of 2048, but all sed's we know have understand at least 4000.
  8759. sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
  8760. || continue
  8761. am_dirpart=`AS_DIRNAME(["$am_mf"])`
  8762. am_filepart=`AS_BASENAME(["$am_mf"])`
  8763. AM_RUN_LOG([cd "$am_dirpart" \
  8764. && sed -e '/# am--include-marker/d' "$am_filepart" \
  8765. | $MAKE -f - am--depfiles]) || am_rc=$?
  8766. done
  8767. if test $am_rc -ne 0; then
  8768. AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
  8769. for automatic dependency tracking. If GNU make was not used, consider
  8770. re-running the configure script with MAKE="gmake" (or whatever is
  8771. necessary). You can also try re-running configure with the
  8772. '--disable-dependency-tracking' option to at least be able to build
  8773. the package (albeit without support for automatic dependency tracking).])
  8774. fi
  8775. AS_UNSET([am_dirpart])
  8776. AS_UNSET([am_filepart])
  8777. AS_UNSET([am_mf])
  8778. AS_UNSET([am_rc])
  8779. rm -f conftest-deps.mk
  8780. }
  8781. ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
  8782. # AM_OUTPUT_DEPENDENCY_COMMANDS
  8783. # -----------------------------
  8784. # This macro should only be invoked once -- use via AC_REQUIRE.
  8785. #
  8786. # This code is only required when automatic dependency tracking is enabled.
  8787. # This creates each '.Po' and '.Plo' makefile fragment that we'll need in
  8788. # order to bootstrap the dependency handling code.
  8789. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
  8790. [AC_CONFIG_COMMANDS([depfiles],
  8791. [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
  8792. [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
  8793. # Do all the work for Automake. -*- Autoconf -*-
  8794. # Copyright (C) 1996-2020 Free Software Foundation, Inc.
  8795. #
  8796. # This file is free software; the Free Software Foundation
  8797. # gives unlimited permission to copy and/or distribute it,
  8798. # with or without modifications, as long as this notice is preserved.
  8799. # This macro actually does too much. Some checks are only needed if
  8800. # your package does certain things. But this isn't really a big deal.
  8801. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
  8802. m4_define([AC_PROG_CC],
  8803. m4_defn([AC_PROG_CC])
  8804. [_AM_PROG_CC_C_O
  8805. ])
  8806. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
  8807. # AM_INIT_AUTOMAKE([OPTIONS])
  8808. # -----------------------------------------------
  8809. # The call with PACKAGE and VERSION arguments is the old style
  8810. # call (pre autoconf-2.50), which is being phased out. PACKAGE
  8811. # and VERSION should now be passed to AC_INIT and removed from
  8812. # the call to AM_INIT_AUTOMAKE.
  8813. # We support both call styles for the transition. After
  8814. # the next Automake release, Autoconf can make the AC_INIT
  8815. # arguments mandatory, and then we can depend on a new Autoconf
  8816. # release and drop the old call support.
  8817. AC_DEFUN([AM_INIT_AUTOMAKE],
  8818. [AC_PREREQ([2.65])dnl
  8819. dnl Autoconf wants to disallow AM_ names. We explicitly allow
  8820. dnl the ones we care about.
  8821. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
  8822. AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
  8823. AC_REQUIRE([AC_PROG_INSTALL])dnl
  8824. if test "`cd $srcdir && pwd`" != "`pwd`"; then
  8825. # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
  8826. # is not polluted with repeated "-I."
  8827. AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
  8828. # test to see if srcdir already configured
  8829. if test -f $srcdir/config.status; then
  8830. AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  8831. fi
  8832. fi
  8833. # test whether we have cygpath
  8834. if test -z "$CYGPATH_W"; then
  8835. if (cygpath --version) >/dev/null 2>/dev/null; then
  8836. CYGPATH_W='cygpath -w'
  8837. else
  8838. CYGPATH_W=echo
  8839. fi
  8840. fi
  8841. AC_SUBST([CYGPATH_W])
  8842. # Define the identity of the package.
  8843. dnl Distinguish between old-style and new-style calls.
  8844. m4_ifval([$2],
  8845. [AC_DIAGNOSE([obsolete],
  8846. [$0: two- and three-arguments forms are deprecated.])
  8847. m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  8848. AC_SUBST([PACKAGE], [$1])dnl
  8849. AC_SUBST([VERSION], [$2])],
  8850. [_AM_SET_OPTIONS([$1])dnl
  8851. dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
  8852. m4_if(
  8853. m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
  8854. [ok:ok],,
  8855. [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
  8856. AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  8857. AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
  8858. _AM_IF_OPTION([no-define],,
  8859. [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
  8860. AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
  8861. # Some tools Automake needs.
  8862. AC_REQUIRE([AM_SANITY_CHECK])dnl
  8863. AC_REQUIRE([AC_ARG_PROGRAM])dnl
  8864. AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
  8865. AM_MISSING_PROG([AUTOCONF], [autoconf])
  8866. AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
  8867. AM_MISSING_PROG([AUTOHEADER], [autoheader])
  8868. AM_MISSING_PROG([MAKEINFO], [makeinfo])
  8869. AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  8870. AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
  8871. AC_REQUIRE([AC_PROG_MKDIR_P])dnl
  8872. # For better backward compatibility. To be removed once Automake 1.9.x
  8873. # dies out for good. For more background, see:
  8874. # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
  8875. # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
  8876. AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
  8877. # We need awk for the "check" target (and possibly the TAP driver). The
  8878. # system "awk" is bad on some platforms.
  8879. AC_REQUIRE([AC_PROG_AWK])dnl
  8880. AC_REQUIRE([AC_PROG_MAKE_SET])dnl
  8881. AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  8882. _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
  8883. [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
  8884. [_AM_PROG_TAR([v7])])])
  8885. _AM_IF_OPTION([no-dependencies],,
  8886. [AC_PROVIDE_IFELSE([AC_PROG_CC],
  8887. [_AM_DEPENDENCIES([CC])],
  8888. [m4_define([AC_PROG_CC],
  8889. m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
  8890. AC_PROVIDE_IFELSE([AC_PROG_CXX],
  8891. [_AM_DEPENDENCIES([CXX])],
  8892. [m4_define([AC_PROG_CXX],
  8893. m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
  8894. AC_PROVIDE_IFELSE([AC_PROG_OBJC],
  8895. [_AM_DEPENDENCIES([OBJC])],
  8896. [m4_define([AC_PROG_OBJC],
  8897. m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
  8898. AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
  8899. [_AM_DEPENDENCIES([OBJCXX])],
  8900. [m4_define([AC_PROG_OBJCXX],
  8901. m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
  8902. ])
  8903. AC_REQUIRE([AM_SILENT_RULES])dnl
  8904. dnl The testsuite driver may need to know about EXEEXT, so add the
  8905. dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
  8906. dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
  8907. AC_CONFIG_COMMANDS_PRE(dnl
  8908. [m4_provide_if([_AM_COMPILER_EXEEXT],
  8909. [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
  8910. # POSIX will say in a future version that running "rm -f" with no argument
  8911. # is OK; and we want to be able to make that assumption in our Makefile
  8912. # recipes. So use an aggressive probe to check that the usage we want is
  8913. # actually supported "in the wild" to an acceptable degree.
  8914. # See automake bug#10828.
  8915. # To make any issue more visible, cause the running configure to be aborted
  8916. # by default if the 'rm' program in use doesn't match our expectations; the
  8917. # user can still override this though.
  8918. if rm -f && rm -fr && rm -rf; then : OK; else
  8919. cat >&2 <<'END'
  8920. Oops!
  8921. Your 'rm' program seems unable to run without file operands specified
  8922. on the command line, even when the '-f' option is present. This is contrary
  8923. to the behaviour of most rm programs out there, and not conforming with
  8924. the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
  8925. Please tell bug-automake@gnu.org about your system, including the value
  8926. of your $PATH and any error possibly output before this message. This
  8927. can help us improve future automake versions.
  8928. END
  8929. if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
  8930. echo 'Configuration will proceed anyway, since you have set the' >&2
  8931. echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
  8932. echo >&2
  8933. else
  8934. cat >&2 <<'END'
  8935. Aborting the configuration process, to ensure you take notice of the issue.
  8936. You can download and install GNU coreutils to get an 'rm' implementation
  8937. that behaves properly: <https://www.gnu.org/software/coreutils/>.
  8938. If you want to complete the configuration process using your problematic
  8939. 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
  8940. to "yes", and re-run configure.
  8941. END
  8942. AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
  8943. fi
  8944. fi
  8945. dnl The trailing newline in this macro's definition is deliberate, for
  8946. dnl backward compatibility and to allow trailing 'dnl'-style comments
  8947. dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
  8948. ])
  8949. dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
  8950. dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
  8951. dnl mangled by Autoconf and run in a shell conditional statement.
  8952. m4_define([_AC_COMPILER_EXEEXT],
  8953. m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
  8954. # When config.status generates a header, we must update the stamp-h file.
  8955. # This file resides in the same directory as the config header
  8956. # that is generated. The stamp files are numbered to have different names.
  8957. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
  8958. # loop where config.status creates the headers, so we can generate
  8959. # our stamp files there.
  8960. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
  8961. [# Compute $1's index in $config_headers.
  8962. _am_arg=$1
  8963. _am_stamp_count=1
  8964. for _am_header in $config_headers :; do
  8965. case $_am_header in
  8966. $_am_arg | $_am_arg:* )
  8967. break ;;
  8968. * )
  8969. _am_stamp_count=`expr $_am_stamp_count + 1` ;;
  8970. esac
  8971. done
  8972. echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
  8973. # Copyright (C) 2001-2020 Free Software Foundation, Inc.
  8974. #
  8975. # This file is free software; the Free Software Foundation
  8976. # gives unlimited permission to copy and/or distribute it,
  8977. # with or without modifications, as long as this notice is preserved.
  8978. # AM_PROG_INSTALL_SH
  8979. # ------------------
  8980. # Define $install_sh.
  8981. AC_DEFUN([AM_PROG_INSTALL_SH],
  8982. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  8983. if test x"${install_sh+set}" != xset; then
  8984. case $am_aux_dir in
  8985. *\ * | *\ *)
  8986. install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
  8987. *)
  8988. install_sh="\${SHELL} $am_aux_dir/install-sh"
  8989. esac
  8990. fi
  8991. AC_SUBST([install_sh])])
  8992. # Copyright (C) 2003-2020 Free Software Foundation, Inc.
  8993. #
  8994. # This file is free software; the Free Software Foundation
  8995. # gives unlimited permission to copy and/or distribute it,
  8996. # with or without modifications, as long as this notice is preserved.
  8997. # Check whether the underlying file-system supports filenames
  8998. # with a leading dot. For instance MS-DOS doesn't.
  8999. AC_DEFUN([AM_SET_LEADING_DOT],
  9000. [rm -rf .tst 2>/dev/null
  9001. mkdir .tst 2>/dev/null
  9002. if test -d .tst; then
  9003. am__leading_dot=.
  9004. else
  9005. am__leading_dot=_
  9006. fi
  9007. rmdir .tst 2>/dev/null
  9008. AC_SUBST([am__leading_dot])])
  9009. # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
  9010. # From Jim Meyering
  9011. # Copyright (C) 1996-2020 Free Software Foundation, Inc.
  9012. #
  9013. # This file is free software; the Free Software Foundation
  9014. # gives unlimited permission to copy and/or distribute it,
  9015. # with or without modifications, as long as this notice is preserved.
  9016. # AM_MAINTAINER_MODE([DEFAULT-MODE])
  9017. # ----------------------------------
  9018. # Control maintainer-specific portions of Makefiles.
  9019. # Default is to disable them, unless 'enable' is passed literally.
  9020. # For symmetry, 'disable' may be passed as well. Anyway, the user
  9021. # can override the default with the --enable/--disable switch.
  9022. AC_DEFUN([AM_MAINTAINER_MODE],
  9023. [m4_case(m4_default([$1], [disable]),
  9024. [enable], [m4_define([am_maintainer_other], [disable])],
  9025. [disable], [m4_define([am_maintainer_other], [enable])],
  9026. [m4_define([am_maintainer_other], [enable])
  9027. m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
  9028. AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
  9029. dnl maintainer-mode's default is 'disable' unless 'enable' is passed
  9030. AC_ARG_ENABLE([maintainer-mode],
  9031. [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
  9032. am_maintainer_other[ make rules and dependencies not useful
  9033. (and sometimes confusing) to the casual installer])],
  9034. [USE_MAINTAINER_MODE=$enableval],
  9035. [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
  9036. AC_MSG_RESULT([$USE_MAINTAINER_MODE])
  9037. AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
  9038. MAINT=$MAINTAINER_MODE_TRUE
  9039. AC_SUBST([MAINT])dnl
  9040. ]
  9041. )
  9042. # Check to see how 'make' treats includes. -*- Autoconf -*-
  9043. # Copyright (C) 2001-2020 Free Software Foundation, Inc.
  9044. #
  9045. # This file is free software; the Free Software Foundation
  9046. # gives unlimited permission to copy and/or distribute it,
  9047. # with or without modifications, as long as this notice is preserved.
  9048. # AM_MAKE_INCLUDE()
  9049. # -----------------
  9050. # Check whether make has an 'include' directive that can support all
  9051. # the idioms we need for our automatic dependency tracking code.
  9052. AC_DEFUN([AM_MAKE_INCLUDE],
  9053. [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
  9054. cat > confinc.mk << 'END'
  9055. am__doit:
  9056. @echo this is the am__doit target >confinc.out
  9057. .PHONY: am__doit
  9058. END
  9059. am__include="#"
  9060. am__quote=
  9061. # BSD make does it like this.
  9062. echo '.include "confinc.mk" # ignored' > confmf.BSD
  9063. # Other make implementations (GNU, Solaris 10, AIX) do it like this.
  9064. echo 'include confinc.mk # ignored' > confmf.GNU
  9065. _am_result=no
  9066. for s in GNU BSD; do
  9067. AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
  9068. AS_CASE([$?:`cat confinc.out 2>/dev/null`],
  9069. ['0:this is the am__doit target'],
  9070. [AS_CASE([$s],
  9071. [BSD], [am__include='.include' am__quote='"'],
  9072. [am__include='include' am__quote=''])])
  9073. if test "$am__include" != "#"; then
  9074. _am_result="yes ($s style)"
  9075. break
  9076. fi
  9077. done
  9078. rm -f confinc.* confmf.*
  9079. AC_MSG_RESULT([${_am_result}])
  9080. AC_SUBST([am__include])])
  9081. AC_SUBST([am__quote])])
  9082. # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
  9083. # Copyright (C) 1997-2020 Free Software Foundation, Inc.
  9084. #
  9085. # This file is free software; the Free Software Foundation
  9086. # gives unlimited permission to copy and/or distribute it,
  9087. # with or without modifications, as long as this notice is preserved.
  9088. # AM_MISSING_PROG(NAME, PROGRAM)
  9089. # ------------------------------
  9090. AC_DEFUN([AM_MISSING_PROG],
  9091. [AC_REQUIRE([AM_MISSING_HAS_RUN])
  9092. $1=${$1-"${am_missing_run}$2"}
  9093. AC_SUBST($1)])
  9094. # AM_MISSING_HAS_RUN
  9095. # ------------------
  9096. # Define MISSING if not defined so far and test if it is modern enough.
  9097. # If it is, set am_missing_run to use it, otherwise, to nothing.
  9098. AC_DEFUN([AM_MISSING_HAS_RUN],
  9099. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  9100. AC_REQUIRE_AUX_FILE([missing])dnl
  9101. if test x"${MISSING+set}" != xset; then
  9102. MISSING="\${SHELL} '$am_aux_dir/missing'"
  9103. fi
  9104. # Use eval to expand $SHELL
  9105. if eval "$MISSING --is-lightweight"; then
  9106. am_missing_run="$MISSING "
  9107. else
  9108. am_missing_run=
  9109. AC_MSG_WARN(['missing' script is too old or missing])
  9110. fi
  9111. ])
  9112. # Helper functions for option handling. -*- Autoconf -*-
  9113. # Copyright (C) 2001-2020 Free Software Foundation, Inc.
  9114. #
  9115. # This file is free software; the Free Software Foundation
  9116. # gives unlimited permission to copy and/or distribute it,
  9117. # with or without modifications, as long as this notice is preserved.
  9118. # _AM_MANGLE_OPTION(NAME)
  9119. # -----------------------
  9120. AC_DEFUN([_AM_MANGLE_OPTION],
  9121. [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
  9122. # _AM_SET_OPTION(NAME)
  9123. # --------------------
  9124. # Set option NAME. Presently that only means defining a flag for this option.
  9125. AC_DEFUN([_AM_SET_OPTION],
  9126. [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
  9127. # _AM_SET_OPTIONS(OPTIONS)
  9128. # ------------------------
  9129. # OPTIONS is a space-separated list of Automake options.
  9130. AC_DEFUN([_AM_SET_OPTIONS],
  9131. [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
  9132. # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
  9133. # -------------------------------------------
  9134. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  9135. AC_DEFUN([_AM_IF_OPTION],
  9136. [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
  9137. # Copyright (C) 1999-2020 Free Software Foundation, Inc.
  9138. #
  9139. # This file is free software; the Free Software Foundation
  9140. # gives unlimited permission to copy and/or distribute it,
  9141. # with or without modifications, as long as this notice is preserved.
  9142. # _AM_PROG_CC_C_O
  9143. # ---------------
  9144. # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
  9145. # to automatically call this.
  9146. AC_DEFUN([_AM_PROG_CC_C_O],
  9147. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  9148. AC_REQUIRE_AUX_FILE([compile])dnl
  9149. AC_LANG_PUSH([C])dnl
  9150. AC_CACHE_CHECK(
  9151. [whether $CC understands -c and -o together],
  9152. [am_cv_prog_cc_c_o],
  9153. [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
  9154. # Make sure it works both with $CC and with simple cc.
  9155. # Following AC_PROG_CC_C_O, we do the test twice because some
  9156. # compilers refuse to overwrite an existing .o file with -o,
  9157. # though they will create one.
  9158. am_cv_prog_cc_c_o=yes
  9159. for am_i in 1 2; do
  9160. if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
  9161. && test -f conftest2.$ac_objext; then
  9162. : OK
  9163. else
  9164. am_cv_prog_cc_c_o=no
  9165. break
  9166. fi
  9167. done
  9168. rm -f core conftest*
  9169. unset am_i])
  9170. if test "$am_cv_prog_cc_c_o" != yes; then
  9171. # Losing compiler, so override with the script.
  9172. # FIXME: It is wrong to rewrite CC.
  9173. # But if we don't then we get into trouble of one sort or another.
  9174. # A longer-term fix would be to have automake use am__CC in this case,
  9175. # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
  9176. CC="$am_aux_dir/compile $CC"
  9177. fi
  9178. AC_LANG_POP([C])])
  9179. # For backward compatibility.
  9180. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
  9181. # Copyright (C) 2001-2020 Free Software Foundation, Inc.
  9182. #
  9183. # This file is free software; the Free Software Foundation
  9184. # gives unlimited permission to copy and/or distribute it,
  9185. # with or without modifications, as long as this notice is preserved.
  9186. # AM_RUN_LOG(COMMAND)
  9187. # -------------------
  9188. # Run COMMAND, save the exit status in ac_status, and log it.
  9189. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
  9190. AC_DEFUN([AM_RUN_LOG],
  9191. [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
  9192. ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
  9193. ac_status=$?
  9194. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  9195. (exit $ac_status); }])
  9196. # Check to make sure that the build environment is sane. -*- Autoconf -*-
  9197. # Copyright (C) 1996-2020 Free Software Foundation, Inc.
  9198. #
  9199. # This file is free software; the Free Software Foundation
  9200. # gives unlimited permission to copy and/or distribute it,
  9201. # with or without modifications, as long as this notice is preserved.
  9202. # AM_SANITY_CHECK
  9203. # ---------------
  9204. AC_DEFUN([AM_SANITY_CHECK],
  9205. [AC_MSG_CHECKING([whether build environment is sane])
  9206. # Reject unsafe characters in $srcdir or the absolute working directory
  9207. # name. Accept space and tab only in the latter.
  9208. am_lf='
  9209. '
  9210. case `pwd` in
  9211. *[[\\\"\#\$\&\'\`$am_lf]]*)
  9212. AC_MSG_ERROR([unsafe absolute working directory name]);;
  9213. esac
  9214. case $srcdir in
  9215. *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
  9216. AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
  9217. esac
  9218. # Do 'set' in a subshell so we don't clobber the current shell's
  9219. # arguments. Must try -L first in case configure is actually a
  9220. # symlink; some systems play weird games with the mod time of symlinks
  9221. # (eg FreeBSD returns the mod time of the symlink's containing
  9222. # directory).
  9223. if (
  9224. am_has_slept=no
  9225. for am_try in 1 2; do
  9226. echo "timestamp, slept: $am_has_slept" > conftest.file
  9227. set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
  9228. if test "$[*]" = "X"; then
  9229. # -L didn't work.
  9230. set X `ls -t "$srcdir/configure" conftest.file`
  9231. fi
  9232. if test "$[*]" != "X $srcdir/configure conftest.file" \
  9233. && test "$[*]" != "X conftest.file $srcdir/configure"; then
  9234. # If neither matched, then we have a broken ls. This can happen
  9235. # if, for instance, CONFIG_SHELL is bash and it inherits a
  9236. # broken ls alias from the environment. This has actually
  9237. # happened. Such a system could not be considered "sane".
  9238. AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
  9239. alias in your environment])
  9240. fi
  9241. if test "$[2]" = conftest.file || test $am_try -eq 2; then
  9242. break
  9243. fi
  9244. # Just in case.
  9245. sleep 1
  9246. am_has_slept=yes
  9247. done
  9248. test "$[2]" = conftest.file
  9249. )
  9250. then
  9251. # Ok.
  9252. :
  9253. else
  9254. AC_MSG_ERROR([newly created file is older than distributed files!
  9255. Check your system clock])
  9256. fi
  9257. AC_MSG_RESULT([yes])
  9258. # If we didn't sleep, we still need to ensure time stamps of config.status and
  9259. # generated files are strictly newer.
  9260. am_sleep_pid=
  9261. if grep 'slept: no' conftest.file >/dev/null 2>&1; then
  9262. ( sleep 1 ) &
  9263. am_sleep_pid=$!
  9264. fi
  9265. AC_CONFIG_COMMANDS_PRE(
  9266. [AC_MSG_CHECKING([that generated files are newer than configure])
  9267. if test -n "$am_sleep_pid"; then
  9268. # Hide warnings about reused PIDs.
  9269. wait $am_sleep_pid 2>/dev/null
  9270. fi
  9271. AC_MSG_RESULT([done])])
  9272. rm -f conftest.file
  9273. ])
  9274. # Copyright (C) 2009-2020 Free Software Foundation, Inc.
  9275. #
  9276. # This file is free software; the Free Software Foundation
  9277. # gives unlimited permission to copy and/or distribute it,
  9278. # with or without modifications, as long as this notice is preserved.
  9279. # AM_SILENT_RULES([DEFAULT])
  9280. # --------------------------
  9281. # Enable less verbose build rules; with the default set to DEFAULT
  9282. # ("yes" being less verbose, "no" or empty being verbose).
  9283. AC_DEFUN([AM_SILENT_RULES],
  9284. [AC_ARG_ENABLE([silent-rules], [dnl
  9285. AS_HELP_STRING(
  9286. [--enable-silent-rules],
  9287. [less verbose build output (undo: "make V=1")])
  9288. AS_HELP_STRING(
  9289. [--disable-silent-rules],
  9290. [verbose build output (undo: "make V=0")])dnl
  9291. ])
  9292. case $enable_silent_rules in @%:@ (((
  9293. yes) AM_DEFAULT_VERBOSITY=0;;
  9294. no) AM_DEFAULT_VERBOSITY=1;;
  9295. *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
  9296. esac
  9297. dnl
  9298. dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
  9299. dnl do not support nested variable expansions.
  9300. dnl See automake bug#9928 and bug#10237.
  9301. am_make=${MAKE-make}
  9302. AC_CACHE_CHECK([whether $am_make supports nested variables],
  9303. [am_cv_make_support_nested_variables],
  9304. [if AS_ECHO([['TRUE=$(BAR$(V))
  9305. BAR0=false
  9306. BAR1=true
  9307. V=1
  9308. am__doit:
  9309. @$(TRUE)
  9310. .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
  9311. am_cv_make_support_nested_variables=yes
  9312. else
  9313. am_cv_make_support_nested_variables=no
  9314. fi])
  9315. if test $am_cv_make_support_nested_variables = yes; then
  9316. dnl Using '$V' instead of '$(V)' breaks IRIX make.
  9317. AM_V='$(V)'
  9318. AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
  9319. else
  9320. AM_V=$AM_DEFAULT_VERBOSITY
  9321. AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
  9322. fi
  9323. AC_SUBST([AM_V])dnl
  9324. AM_SUBST_NOTMAKE([AM_V])dnl
  9325. AC_SUBST([AM_DEFAULT_V])dnl
  9326. AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
  9327. AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
  9328. AM_BACKSLASH='\'
  9329. AC_SUBST([AM_BACKSLASH])dnl
  9330. _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
  9331. ])
  9332. # Copyright (C) 2001-2020 Free Software Foundation, Inc.
  9333. #
  9334. # This file is free software; the Free Software Foundation
  9335. # gives unlimited permission to copy and/or distribute it,
  9336. # with or without modifications, as long as this notice is preserved.
  9337. # AM_PROG_INSTALL_STRIP
  9338. # ---------------------
  9339. # One issue with vendor 'install' (even GNU) is that you can't
  9340. # specify the program used to strip binaries. This is especially
  9341. # annoying in cross-compiling environments, where the build's strip
  9342. # is unlikely to handle the host's binaries.
  9343. # Fortunately install-sh will honor a STRIPPROG variable, so we
  9344. # always use install-sh in "make install-strip", and initialize
  9345. # STRIPPROG with the value of the STRIP variable (set by the user).
  9346. AC_DEFUN([AM_PROG_INSTALL_STRIP],
  9347. [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  9348. # Installed binaries are usually stripped using 'strip' when the user
  9349. # run "make install-strip". However 'strip' might not be the right
  9350. # tool to use in cross-compilation environments, therefore Automake
  9351. # will honor the 'STRIP' environment variable to overrule this program.
  9352. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
  9353. if test "$cross_compiling" != no; then
  9354. AC_CHECK_TOOL([STRIP], [strip], :)
  9355. fi
  9356. INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
  9357. AC_SUBST([INSTALL_STRIP_PROGRAM])])
  9358. # Copyright (C) 2006-2020 Free Software Foundation, Inc.
  9359. #
  9360. # This file is free software; the Free Software Foundation
  9361. # gives unlimited permission to copy and/or distribute it,
  9362. # with or without modifications, as long as this notice is preserved.
  9363. # _AM_SUBST_NOTMAKE(VARIABLE)
  9364. # ---------------------------
  9365. # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
  9366. # This macro is traced by Automake.
  9367. AC_DEFUN([_AM_SUBST_NOTMAKE])
  9368. # AM_SUBST_NOTMAKE(VARIABLE)
  9369. # --------------------------
  9370. # Public sister of _AM_SUBST_NOTMAKE.
  9371. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
  9372. # Check how to create a tarball. -*- Autoconf -*-
  9373. # Copyright (C) 2004-2020 Free Software Foundation, Inc.
  9374. #
  9375. # This file is free software; the Free Software Foundation
  9376. # gives unlimited permission to copy and/or distribute it,
  9377. # with or without modifications, as long as this notice is preserved.
  9378. # _AM_PROG_TAR(FORMAT)
  9379. # --------------------
  9380. # Check how to create a tarball in format FORMAT.
  9381. # FORMAT should be one of 'v7', 'ustar', or 'pax'.
  9382. #
  9383. # Substitute a variable $(am__tar) that is a command
  9384. # writing to stdout a FORMAT-tarball containing the directory
  9385. # $tardir.
  9386. # tardir=directory && $(am__tar) > result.tar
  9387. #
  9388. # Substitute a variable $(am__untar) that extract such
  9389. # a tarball read from stdin.
  9390. # $(am__untar) < result.tar
  9391. #
  9392. AC_DEFUN([_AM_PROG_TAR],
  9393. [# Always define AMTAR for backward compatibility. Yes, it's still used
  9394. # in the wild :-( We should find a proper way to deprecate it ...
  9395. AC_SUBST([AMTAR], ['$${TAR-tar}'])
  9396. # We'll loop over all known methods to create a tar archive until one works.
  9397. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
  9398. m4_if([$1], [v7],
  9399. [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
  9400. [m4_case([$1],
  9401. [ustar],
  9402. [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
  9403. # There is notably a 21 bits limit for the UID and the GID. In fact,
  9404. # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
  9405. # and bug#13588).
  9406. am_max_uid=2097151 # 2^21 - 1
  9407. am_max_gid=$am_max_uid
  9408. # The $UID and $GID variables are not portable, so we need to resort
  9409. # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
  9410. # below are definitely unexpected, so allow the users to see them
  9411. # (that is, avoid stderr redirection).
  9412. am_uid=`id -u || echo unknown`
  9413. am_gid=`id -g || echo unknown`
  9414. AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
  9415. if test $am_uid -le $am_max_uid; then
  9416. AC_MSG_RESULT([yes])
  9417. else
  9418. AC_MSG_RESULT([no])
  9419. _am_tools=none
  9420. fi
  9421. AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
  9422. if test $am_gid -le $am_max_gid; then
  9423. AC_MSG_RESULT([yes])
  9424. else
  9425. AC_MSG_RESULT([no])
  9426. _am_tools=none
  9427. fi],
  9428. [pax],
  9429. [],
  9430. [m4_fatal([Unknown tar format])])
  9431. AC_MSG_CHECKING([how to create a $1 tar archive])
  9432. # Go ahead even if we have the value already cached. We do so because we
  9433. # need to set the values for the 'am__tar' and 'am__untar' variables.
  9434. _am_tools=${am_cv_prog_tar_$1-$_am_tools}
  9435. for _am_tool in $_am_tools; do
  9436. case $_am_tool in
  9437. gnutar)
  9438. for _am_tar in tar gnutar gtar; do
  9439. AM_RUN_LOG([$_am_tar --version]) && break
  9440. done
  9441. am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
  9442. am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
  9443. am__untar="$_am_tar -xf -"
  9444. ;;
  9445. plaintar)
  9446. # Must skip GNU tar: if it does not support --format= it doesn't create
  9447. # ustar tarball either.
  9448. (tar --version) >/dev/null 2>&1 && continue
  9449. am__tar='tar chf - "$$tardir"'
  9450. am__tar_='tar chf - "$tardir"'
  9451. am__untar='tar xf -'
  9452. ;;
  9453. pax)
  9454. am__tar='pax -L -x $1 -w "$$tardir"'
  9455. am__tar_='pax -L -x $1 -w "$tardir"'
  9456. am__untar='pax -r'
  9457. ;;
  9458. cpio)
  9459. am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
  9460. am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
  9461. am__untar='cpio -i -H $1 -d'
  9462. ;;
  9463. none)
  9464. am__tar=false
  9465. am__tar_=false
  9466. am__untar=false
  9467. ;;
  9468. esac
  9469. # If the value was cached, stop now. We just wanted to have am__tar
  9470. # and am__untar set.
  9471. test -n "${am_cv_prog_tar_$1}" && break
  9472. # tar/untar a dummy directory, and stop if the command works.
  9473. rm -rf conftest.dir
  9474. mkdir conftest.dir
  9475. echo GrepMe > conftest.dir/file
  9476. AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
  9477. rm -rf conftest.dir
  9478. if test -s conftest.tar; then
  9479. AM_RUN_LOG([$am__untar <conftest.tar])
  9480. AM_RUN_LOG([cat conftest.dir/file])
  9481. grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
  9482. fi
  9483. done
  9484. rm -rf conftest.dir
  9485. AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
  9486. AC_MSG_RESULT([$am_cv_prog_tar_$1])])
  9487. AC_SUBST([am__tar])
  9488. AC_SUBST([am__untar])
  9489. ]) # _AM_PROG_TAR
  9490. m4_include([acinclude.m4])