libtool.m4 304 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491
  1. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
  2. #
  3. # Copyright (C) 1996-2001, 2003-2019, 2021-2024 Free Software
  4. # Foundation, Inc.
  5. # Written by Gordon Matzigkeit, 1996
  6. #
  7. # This file is free software; the Free Software Foundation gives
  8. # unlimited permission to copy and/or distribute it, with or without
  9. # modifications, as long as this notice is preserved.
  10. m4_define([_LT_COPYING], [dnl
  11. # Copyright (C) 2024 Free Software Foundation, Inc.
  12. # This is free software; see the source for copying conditions. There is NO
  13. # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  14. # GNU Libtool is free software; you can redistribute it and/or modify
  15. # it under the terms of the GNU General Public License as published by
  16. # the Free Software Foundation; either version 2 of the License, or
  17. # (at your option) any later version.
  18. #
  19. # As a special exception to the GNU General Public License, if you
  20. # distribute this file as part of a program or library that is built
  21. # using GNU Libtool, you may include this file under the same
  22. # distribution terms that you use for the rest of that program.
  23. #
  24. # GNU Libtool is distributed in the hope that it will be useful, but
  25. # WITHOUT ANY WARRANTY; without even the implied warranty of
  26. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  27. # GNU General Public License for more details.
  28. #
  29. # You should have received a copy of the GNU General Public License
  30. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  31. ])
  32. # serial 63 LT_INIT
  33. # LT_PREREQ(VERSION)
  34. # ------------------
  35. # Complain and exit if this libtool version is less that VERSION.
  36. m4_defun([LT_PREREQ],
  37. [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
  38. [m4_default([$3],
  39. [m4_fatal([Libtool version $1 or higher is required],
  40. 63)])],
  41. [$2])])
  42. # _LT_CHECK_BUILDDIR
  43. # ------------------
  44. # Complain if the absolute build directory name contains unusual characters
  45. m4_defun([_LT_CHECK_BUILDDIR],
  46. [case `pwd` in
  47. *\ * | *\ *)
  48. AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
  49. esac
  50. ])
  51. # LT_INIT([OPTIONS])
  52. # ------------------
  53. AC_DEFUN([LT_INIT],
  54. [AC_PREREQ([2.64])dnl We use AC_PATH_PROGS_FEATURE_CHECK
  55. AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  56. AC_BEFORE([$0], [LT_LANG])dnl
  57. AC_BEFORE([$0], [LT_OUTPUT])dnl
  58. AC_BEFORE([$0], [LTDL_INIT])dnl
  59. m4_require([_LT_CHECK_BUILDDIR])dnl
  60. dnl Autoconf doesn't catch unexpanded LT_ macros by default:
  61. m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
  62. m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
  63. dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
  64. dnl unless we require an AC_DEFUNed macro:
  65. AC_REQUIRE([LTOPTIONS_VERSION])dnl
  66. AC_REQUIRE([LTSUGAR_VERSION])dnl
  67. AC_REQUIRE([LTVERSION_VERSION])dnl
  68. AC_REQUIRE([LTOBSOLETE_VERSION])dnl
  69. m4_require([_LT_PROG_LTMAIN])dnl
  70. _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
  71. dnl Parse OPTIONS
  72. _LT_SET_OPTIONS([$0], [$1])
  73. # This can be used to rebuild libtool when needed
  74. LIBTOOL_DEPS=$ltmain
  75. # Always use our own libtool.
  76. LIBTOOL='$(SHELL) $(top_builddir)/libtool'
  77. AC_SUBST(LIBTOOL)dnl
  78. _LT_SETUP
  79. # Only expand once:
  80. m4_define([LT_INIT])
  81. ])# LT_INIT
  82. # Old names:
  83. AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
  84. AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
  85. dnl aclocal-1.4 backwards compatibility:
  86. dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
  87. dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
  88. # _LT_PREPARE_CC_BASENAME
  89. # -----------------------
  90. m4_defun([_LT_PREPARE_CC_BASENAME], [
  91. # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
  92. func_cc_basename ()
  93. {
  94. for cc_temp in @S|@*""; do
  95. case $cc_temp in
  96. compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
  97. distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
  98. \-*) ;;
  99. *) break;;
  100. esac
  101. done
  102. func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
  103. }
  104. ])# _LT_PREPARE_CC_BASENAME
  105. # _LT_CC_BASENAME(CC)
  106. # -------------------
  107. # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
  108. # but that macro is also expanded into generated libtool script, which
  109. # arranges for $SED and $ECHO to be set by different means.
  110. m4_defun([_LT_CC_BASENAME],
  111. [m4_require([_LT_PREPARE_CC_BASENAME])dnl
  112. AC_REQUIRE([_LT_DECL_SED])dnl
  113. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
  114. func_cc_basename $1
  115. cc_basename=$func_cc_basename_result
  116. ])
  117. # _LT_FILEUTILS_DEFAULTS
  118. # ----------------------
  119. # It is okay to use these file commands and assume they have been set
  120. # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
  121. m4_defun([_LT_FILEUTILS_DEFAULTS],
  122. [: ${CP="cp -f"}
  123. : ${MV="mv -f"}
  124. : ${RM="rm -f"}
  125. ])# _LT_FILEUTILS_DEFAULTS
  126. # _LT_SETUP
  127. # ---------
  128. m4_defun([_LT_SETUP],
  129. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  130. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  131. AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
  132. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
  133. _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
  134. dnl
  135. _LT_DECL([], [host_alias], [0], [The host system])dnl
  136. _LT_DECL([], [host], [0])dnl
  137. _LT_DECL([], [host_os], [0])dnl
  138. dnl
  139. _LT_DECL([], [build_alias], [0], [The build system])dnl
  140. _LT_DECL([], [build], [0])dnl
  141. _LT_DECL([], [build_os], [0])dnl
  142. dnl
  143. AC_REQUIRE([AC_PROG_CC])dnl
  144. AC_REQUIRE([LT_PATH_LD])dnl
  145. AC_REQUIRE([LT_PATH_NM])dnl
  146. dnl
  147. AC_REQUIRE([AC_PROG_LN_S])dnl
  148. test -z "$LN_S" && LN_S="ln -s"
  149. _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
  150. dnl
  151. AC_REQUIRE([LT_CMD_MAX_LEN])dnl
  152. _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
  153. _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
  154. dnl
  155. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  156. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  157. m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
  158. m4_require([_LT_CMD_RELOAD])dnl
  159. m4_require([_LT_DECL_FILECMD])dnl
  160. m4_require([_LT_CHECK_MAGIC_METHOD])dnl
  161. m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
  162. m4_require([_LT_CMD_OLD_ARCHIVE])dnl
  163. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  164. m4_require([_LT_WITH_SYSROOT])dnl
  165. m4_require([_LT_CMD_TRUNCATE])dnl
  166. _LT_CONFIG_LIBTOOL_INIT([
  167. # See if we are running on zsh, and set the options that allow our
  168. # commands through without removal of \ escapes INIT.
  169. if test -n "\${ZSH_VERSION+set}"; then
  170. setopt NO_GLOB_SUBST
  171. fi
  172. ])
  173. if test -n "${ZSH_VERSION+set}"; then
  174. setopt NO_GLOB_SUBST
  175. fi
  176. _LT_CHECK_OBJDIR
  177. m4_require([_LT_TAG_COMPILER])dnl
  178. case $host_os in
  179. aix3*)
  180. # AIX sometimes has problems with the GCC collect2 program. For some
  181. # reason, if we set the COLLECT_NAMES environment variable, the problems
  182. # vanish in a puff of smoke.
  183. if test set != "${COLLECT_NAMES+set}"; then
  184. COLLECT_NAMES=
  185. export COLLECT_NAMES
  186. fi
  187. ;;
  188. esac
  189. # Global variables:
  190. ofile=libtool
  191. can_build_shared=yes
  192. # All known linkers require a '.a' archive for static linking (except MSVC and
  193. # ICC, which need '.lib').
  194. libext=a
  195. with_gnu_ld=$lt_cv_prog_gnu_ld
  196. old_CC=$CC
  197. old_CFLAGS=$CFLAGS
  198. # Set sane defaults for various variables
  199. test -z "$CC" && CC=cc
  200. test -z "$LTCC" && LTCC=$CC
  201. test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
  202. test -z "$LD" && LD=ld
  203. test -z "$ac_objext" && ac_objext=o
  204. _LT_CC_BASENAME([$compiler])
  205. # Only perform the check for file, if the check method requires it
  206. test -z "$MAGIC_CMD" && MAGIC_CMD=file
  207. case $deplibs_check_method in
  208. file_magic*)
  209. if test "$file_magic_cmd" = '$MAGIC_CMD'; then
  210. _LT_PATH_MAGIC
  211. fi
  212. ;;
  213. esac
  214. # Use C for the default configuration in the libtool script
  215. LT_SUPPORTED_TAG([CC])
  216. _LT_LANG_C_CONFIG
  217. _LT_LANG_DEFAULT_CONFIG
  218. _LT_CONFIG_COMMANDS
  219. ])# _LT_SETUP
  220. # _LT_PREPARE_SED_QUOTE_VARS
  221. # --------------------------
  222. # Define a few sed substitution that help us do robust quoting.
  223. m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
  224. [# Backslashify metacharacters that are still active within
  225. # double-quoted strings.
  226. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
  227. # Same as above, but do not quote variable references.
  228. double_quote_subst='s/\([["`\\]]\)/\\\1/g'
  229. # Sed substitution to delay expansion of an escaped shell variable in a
  230. # double_quote_subst'ed string.
  231. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
  232. # Sed substitution to delay expansion of an escaped single quote.
  233. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
  234. # Sed substitution to avoid accidental globbing in evaled expressions
  235. no_glob_subst='s/\*/\\\*/g'
  236. ])
  237. # _LT_PROG_LTMAIN
  238. # ---------------
  239. # Note that this code is called both from 'configure', and 'config.status'
  240. # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
  241. # 'config.status' has no value for ac_aux_dir unless we are using Automake,
  242. # so we pass a copy along to make sure it has a sensible value anyway.
  243. m4_defun([_LT_PROG_LTMAIN],
  244. [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
  245. _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
  246. ltmain=$ac_aux_dir/ltmain.sh
  247. ])# _LT_PROG_LTMAIN
  248. ## ------------------------------------- ##
  249. ## Accumulate code for creating libtool. ##
  250. ## ------------------------------------- ##
  251. # So that we can recreate a full libtool script including additional
  252. # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
  253. # in macros and then make a single call at the end using the 'libtool'
  254. # label.
  255. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
  256. # ----------------------------------------
  257. # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  258. m4_define([_LT_CONFIG_LIBTOOL_INIT],
  259. [m4_ifval([$1],
  260. [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
  261. [$1
  262. ])])])
  263. # Initialize.
  264. m4_define([_LT_OUTPUT_LIBTOOL_INIT])
  265. # _LT_CONFIG_LIBTOOL([COMMANDS])
  266. # ------------------------------
  267. # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  268. m4_define([_LT_CONFIG_LIBTOOL],
  269. [m4_ifval([$1],
  270. [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
  271. [$1
  272. ])])])
  273. # Initialize.
  274. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
  275. # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
  276. # -----------------------------------------------------
  277. m4_defun([_LT_CONFIG_SAVE_COMMANDS],
  278. [_LT_CONFIG_LIBTOOL([$1])
  279. _LT_CONFIG_LIBTOOL_INIT([$2])
  280. ])
  281. # _LT_FORMAT_COMMENT([COMMENT])
  282. # -----------------------------
  283. # Add leading comment marks to the start of each line, and a trailing
  284. # full-stop to the whole comment if one is not present already.
  285. m4_define([_LT_FORMAT_COMMENT],
  286. [m4_ifval([$1], [
  287. m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
  288. [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
  289. )])
  290. ## ------------------------ ##
  291. ## FIXME: Eliminate VARNAME ##
  292. ## ------------------------ ##
  293. # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
  294. # -------------------------------------------------------------------
  295. # CONFIGNAME is the name given to the value in the libtool script.
  296. # VARNAME is the (base) name used in the configure script.
  297. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
  298. # VARNAME. Any other value will be used directly.
  299. m4_define([_LT_DECL],
  300. [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
  301. [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
  302. [m4_ifval([$1], [$1], [$2])])
  303. lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
  304. m4_ifval([$4],
  305. [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
  306. lt_dict_add_subkey([lt_decl_dict], [$2],
  307. [tagged?], [m4_ifval([$5], [yes], [no])])])
  308. ])
  309. # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
  310. # --------------------------------------------------------
  311. m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
  312. # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
  313. # ------------------------------------------------
  314. m4_define([lt_decl_tag_varnames],
  315. [_lt_decl_filter([tagged?], [yes], $@)])
  316. # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
  317. # ---------------------------------------------------------
  318. m4_define([_lt_decl_filter],
  319. [m4_case([$#],
  320. [0], [m4_fatal([$0: too few arguments: $#])],
  321. [1], [m4_fatal([$0: too few arguments: $#: $1])],
  322. [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
  323. [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
  324. [lt_dict_filter([lt_decl_dict], $@)])[]dnl
  325. ])
  326. # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
  327. # --------------------------------------------------
  328. m4_define([lt_decl_quote_varnames],
  329. [_lt_decl_filter([value], [1], $@)])
  330. # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
  331. # ---------------------------------------------------
  332. m4_define([lt_decl_dquote_varnames],
  333. [_lt_decl_filter([value], [2], $@)])
  334. # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
  335. # ---------------------------------------------------
  336. m4_define([lt_decl_varnames_tagged],
  337. [m4_assert([$# <= 2])dnl
  338. _$0(m4_quote(m4_default([$1], [[, ]])),
  339. m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
  340. m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
  341. m4_define([_lt_decl_varnames_tagged],
  342. [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
  343. # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
  344. # ------------------------------------------------
  345. m4_define([lt_decl_all_varnames],
  346. [_$0(m4_quote(m4_default([$1], [[, ]])),
  347. m4_if([$2], [],
  348. m4_quote(lt_decl_varnames),
  349. m4_quote(m4_shift($@))))[]dnl
  350. ])
  351. m4_define([_lt_decl_all_varnames],
  352. [lt_join($@, lt_decl_varnames_tagged([$1],
  353. lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
  354. ])
  355. # _LT_CONFIG_STATUS_DECLARE([VARNAME])
  356. # ------------------------------------
  357. # Quote a variable value, and forward it to 'config.status' so that its
  358. # declaration there will have the same value as in 'configure'. VARNAME
  359. # must have a single quote delimited value for this to work.
  360. m4_define([_LT_CONFIG_STATUS_DECLARE],
  361. [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
  362. # _LT_CONFIG_STATUS_DECLARATIONS
  363. # ------------------------------
  364. # We delimit libtool config variables with single quotes, so when
  365. # we write them to config.status, we have to be sure to quote all
  366. # embedded single quotes properly. In configure, this macro expands
  367. # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
  368. #
  369. # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
  370. m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
  371. [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
  372. [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
  373. # _LT_LIBTOOL_TAGS
  374. # ----------------
  375. # Output comment and list of tags supported by the script
  376. m4_defun([_LT_LIBTOOL_TAGS],
  377. [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
  378. available_tags='_LT_TAGS'dnl
  379. ])
  380. # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
  381. # -----------------------------------
  382. # Extract the dictionary values for VARNAME (optionally with TAG) and
  383. # expand to a commented shell variable setting:
  384. #
  385. # # Some comment about what VAR is for.
  386. # visible_name=$lt_internal_name
  387. m4_define([_LT_LIBTOOL_DECLARE],
  388. [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
  389. [description])))[]dnl
  390. m4_pushdef([_libtool_name],
  391. m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
  392. m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
  393. [0], [_libtool_name=[$]$1],
  394. [1], [_libtool_name=$lt_[]$1],
  395. [2], [_libtool_name=$lt_[]$1],
  396. [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
  397. m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
  398. ])
  399. # _LT_LIBTOOL_CONFIG_VARS
  400. # -----------------------
  401. # Produce commented declarations of non-tagged libtool config variables
  402. # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
  403. # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
  404. # section) are produced by _LT_LIBTOOL_TAG_VARS.
  405. m4_defun([_LT_LIBTOOL_CONFIG_VARS],
  406. [m4_foreach([_lt_var],
  407. m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
  408. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
  409. # _LT_LIBTOOL_TAG_VARS(TAG)
  410. # -------------------------
  411. m4_define([_LT_LIBTOOL_TAG_VARS],
  412. [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
  413. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
  414. # _LT_TAGVAR(VARNAME, [TAGNAME])
  415. # ------------------------------
  416. m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
  417. # _LT_CONFIG_COMMANDS
  418. # -------------------
  419. # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
  420. # variables for single and double quote escaping we saved from calls
  421. # to _LT_DECL, we can put quote escaped variables declarations
  422. # into 'config.status', and then the shell code to quote escape them in
  423. # for loops in 'config.status'. Finally, any additional code accumulated
  424. # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
  425. m4_defun([_LT_CONFIG_COMMANDS],
  426. [AC_PROVIDE_IFELSE([LT_OUTPUT],
  427. dnl If the libtool generation code has been placed in $CONFIG_LT,
  428. dnl instead of duplicating it all over again into config.status,
  429. dnl then we will have config.status run $CONFIG_LT later, so it
  430. dnl needs to know what name is stored there:
  431. [AC_CONFIG_COMMANDS([libtool],
  432. [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
  433. dnl If the libtool generation code is destined for config.status,
  434. dnl expand the accumulated commands and init code now:
  435. [AC_CONFIG_COMMANDS([libtool],
  436. [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
  437. ])#_LT_CONFIG_COMMANDS
  438. # Initialize.
  439. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
  440. [
  441. # The HP-UX ksh and POSIX shell print the target directory to stdout
  442. # if CDPATH is set.
  443. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  444. sed_quote_subst='$sed_quote_subst'
  445. double_quote_subst='$double_quote_subst'
  446. delay_variable_subst='$delay_variable_subst'
  447. _LT_CONFIG_STATUS_DECLARATIONS
  448. LTCC='$LTCC'
  449. LTCFLAGS='$LTCFLAGS'
  450. compiler='$compiler_DEFAULT'
  451. # A function that is used when there is no print builtin or printf.
  452. func_fallback_echo ()
  453. {
  454. eval 'cat <<_LTECHO_EOF
  455. \$[]1
  456. _LTECHO_EOF'
  457. }
  458. # Quote evaled strings.
  459. for var in lt_decl_all_varnames([[ \
  460. ]], lt_decl_quote_varnames); do
  461. case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  462. *[[\\\\\\\`\\"\\\$]]*)
  463. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
  464. ;;
  465. *)
  466. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  467. ;;
  468. esac
  469. done
  470. # Double-quote double-evaled strings.
  471. for var in lt_decl_all_varnames([[ \
  472. ]], lt_decl_dquote_varnames); do
  473. case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  474. *[[\\\\\\\`\\"\\\$]]*)
  475. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
  476. ;;
  477. *)
  478. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  479. ;;
  480. esac
  481. done
  482. _LT_OUTPUT_LIBTOOL_INIT
  483. ])
  484. # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
  485. # ------------------------------------
  486. # Generate a child script FILE with all initialization necessary to
  487. # reuse the environment learned by the parent script, and make the
  488. # file executable. If COMMENT is supplied, it is inserted after the
  489. # '#!' sequence but before initialization text begins. After this
  490. # macro, additional text can be appended to FILE to form the body of
  491. # the child script. The macro ends with non-zero status if the
  492. # file could not be fully written (such as if the disk is full).
  493. m4_ifdef([AS_INIT_GENERATED],
  494. [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
  495. [m4_defun([_LT_GENERATED_FILE_INIT],
  496. [m4_require([AS_PREPARE])]dnl
  497. [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
  498. [lt_write_fail=0
  499. cat >$1 <<_ASEOF || lt_write_fail=1
  500. #! $SHELL
  501. # Generated by $as_me.
  502. $2
  503. SHELL=\${CONFIG_SHELL-$SHELL}
  504. export SHELL
  505. _ASEOF
  506. cat >>$1 <<\_ASEOF || lt_write_fail=1
  507. AS_SHELL_SANITIZE
  508. _AS_PREPARE
  509. exec AS_MESSAGE_FD>&1
  510. _ASEOF
  511. test 0 = "$lt_write_fail" && chmod +x $1[]dnl
  512. m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
  513. # LT_OUTPUT
  514. # ---------
  515. # This macro allows early generation of the libtool script (before
  516. # AC_OUTPUT is called), in case it is used in configure for compilation
  517. # tests.
  518. AC_DEFUN([LT_OUTPUT],
  519. [: ${CONFIG_LT=./config.lt}
  520. AC_MSG_NOTICE([creating $CONFIG_LT])
  521. _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
  522. [# Run this file to recreate a libtool stub with the current configuration.])
  523. cat >>"$CONFIG_LT" <<\_LTEOF
  524. lt_cl_silent=false
  525. exec AS_MESSAGE_LOG_FD>>config.log
  526. {
  527. echo
  528. AS_BOX([Running $as_me.])
  529. } >&AS_MESSAGE_LOG_FD
  530. lt_cl_help="\
  531. '$as_me' creates a local libtool stub from the current configuration,
  532. for use in further configure time tests before the real libtool is
  533. generated.
  534. Usage: $[0] [[OPTIONS]]
  535. -h, --help print this help, then exit
  536. -V, --version print version number, then exit
  537. -q, --quiet do not print progress messages
  538. -d, --debug don't remove temporary files
  539. Report bugs to <[email protected]>."
  540. lt_cl_version="\
  541. m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
  542. m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
  543. configured by $[0], generated by m4_PACKAGE_STRING.
  544. Copyright (C) 2024 Free Software Foundation, Inc.
  545. This config.lt script is free software; the Free Software Foundation
  546. gives unlimited permission to copy, distribute and modify it."
  547. while test 0 != $[#]
  548. do
  549. case $[1] in
  550. --version | --v* | -V )
  551. echo "$lt_cl_version"; exit 0 ;;
  552. --help | --h* | -h )
  553. echo "$lt_cl_help"; exit 0 ;;
  554. --debug | --d* | -d )
  555. debug=: ;;
  556. --quiet | --q* | --silent | --s* | -q )
  557. lt_cl_silent=: ;;
  558. -*) AC_MSG_ERROR([unrecognized option: $[1]
  559. Try '$[0] --help' for more information.]) ;;
  560. *) AC_MSG_ERROR([unrecognized argument: $[1]
  561. Try '$[0] --help' for more information.]) ;;
  562. esac
  563. shift
  564. done
  565. if $lt_cl_silent; then
  566. exec AS_MESSAGE_FD>/dev/null
  567. fi
  568. _LTEOF
  569. cat >>"$CONFIG_LT" <<_LTEOF
  570. _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
  571. _LTEOF
  572. cat >>"$CONFIG_LT" <<\_LTEOF
  573. AC_MSG_NOTICE([creating $ofile])
  574. _LT_OUTPUT_LIBTOOL_COMMANDS
  575. AS_EXIT(0)
  576. _LTEOF
  577. chmod +x "$CONFIG_LT"
  578. # configure is writing to config.log, but config.lt does its own redirection,
  579. # appending to config.log, which fails on DOS, as config.log is still kept
  580. # open by configure. Here we exec the FD to /dev/null, effectively closing
  581. # config.log, so it can be properly (re)opened and appended to by config.lt.
  582. lt_cl_success=:
  583. test yes = "$silent" &&
  584. lt_config_lt_args="$lt_config_lt_args --quiet"
  585. exec AS_MESSAGE_LOG_FD>/dev/null
  586. $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
  587. exec AS_MESSAGE_LOG_FD>>config.log
  588. $lt_cl_success || AS_EXIT(1)
  589. ])# LT_OUTPUT
  590. # _LT_CONFIG(TAG)
  591. # ---------------
  592. # If TAG is the built-in tag, create an initial libtool script with a
  593. # default configuration from the untagged config vars. Otherwise add code
  594. # to config.status for appending the configuration named by TAG from the
  595. # matching tagged config vars.
  596. m4_defun([_LT_CONFIG],
  597. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  598. _LT_CONFIG_SAVE_COMMANDS([
  599. m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
  600. m4_if(_LT_TAG, [C], [
  601. # See if we are running on zsh, and set the options that allow our
  602. # commands through without removal of \ escapes.
  603. if test -n "${ZSH_VERSION+set}"; then
  604. setopt NO_GLOB_SUBST
  605. fi
  606. cfgfile=${ofile}T
  607. trap "$RM \"$cfgfile\"; exit 1" 1 2 15
  608. $RM "$cfgfile"
  609. cat <<_LT_EOF >> "$cfgfile"
  610. #! $SHELL
  611. # Generated automatically by $as_me ($PACKAGE) $VERSION
  612. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  613. # Provide generalized library-building support services.
  614. # Written by Gordon Matzigkeit, 1996
  615. _LT_COPYING
  616. _LT_LIBTOOL_TAGS
  617. # Configured defaults for sys_lib_dlsearch_path munging.
  618. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
  619. # ### BEGIN LIBTOOL CONFIG
  620. _LT_LIBTOOL_CONFIG_VARS
  621. _LT_LIBTOOL_TAG_VARS
  622. # ### END LIBTOOL CONFIG
  623. _LT_EOF
  624. cat <<'_LT_EOF' >> "$cfgfile"
  625. # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
  626. _LT_PREPARE_MUNGE_PATH_LIST
  627. _LT_PREPARE_CC_BASENAME
  628. # ### END FUNCTIONS SHARED WITH CONFIGURE
  629. _LT_EOF
  630. case $host_os in
  631. aix3*)
  632. cat <<\_LT_EOF >> "$cfgfile"
  633. # AIX sometimes has problems with the GCC collect2 program. For some
  634. # reason, if we set the COLLECT_NAMES environment variable, the problems
  635. # vanish in a puff of smoke.
  636. if test set != "${COLLECT_NAMES+set}"; then
  637. COLLECT_NAMES=
  638. export COLLECT_NAMES
  639. fi
  640. _LT_EOF
  641. ;;
  642. esac
  643. _LT_PROG_LTMAIN
  644. # We use sed instead of cat because bash on DJGPP gets confused if
  645. # if finds mixed CR/LF and LF-only lines. Since sed operates in
  646. # text mode, it properly converts lines to CR/LF. This bash problem
  647. # is reportedly fixed, but why not run on old versions too?
  648. $SED '$q' "$ltmain" >> "$cfgfile" \
  649. || (rm -f "$cfgfile"; exit 1)
  650. mv -f "$cfgfile" "$ofile" ||
  651. (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
  652. chmod +x "$ofile"
  653. ],
  654. [cat <<_LT_EOF >> "$ofile"
  655. dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
  656. dnl in a comment (ie after a #).
  657. # ### BEGIN LIBTOOL TAG CONFIG: $1
  658. _LT_LIBTOOL_TAG_VARS(_LT_TAG)
  659. # ### END LIBTOOL TAG CONFIG: $1
  660. _LT_EOF
  661. ])dnl /m4_if
  662. ],
  663. [m4_if([$1], [], [
  664. PACKAGE='$PACKAGE'
  665. VERSION='$VERSION'
  666. RM='$RM'
  667. ofile='$ofile'], [])
  668. ])dnl /_LT_CONFIG_SAVE_COMMANDS
  669. ])# _LT_CONFIG
  670. # LT_SUPPORTED_TAG(TAG)
  671. # ---------------------
  672. # Trace this macro to discover what tags are supported by the libtool
  673. # --tag option, using:
  674. # autoconf --trace 'LT_SUPPORTED_TAG:$1'
  675. AC_DEFUN([LT_SUPPORTED_TAG], [])
  676. # C support is built-in for now
  677. m4_define([_LT_LANG_C_enabled], [])
  678. m4_define([_LT_TAGS], [])
  679. # LT_LANG(LANG)
  680. # -------------
  681. # Enable libtool support for the given language if not already enabled.
  682. AC_DEFUN([LT_LANG],
  683. [AC_BEFORE([$0], [LT_OUTPUT])dnl
  684. m4_case([$1],
  685. [C], [_LT_LANG(C)],
  686. [C++], [_LT_LANG(CXX)],
  687. [Go], [_LT_LANG(GO)],
  688. [Java], [_LT_LANG(GCJ)],
  689. [Fortran 77], [_LT_LANG(F77)],
  690. [Fortran], [_LT_LANG(FC)],
  691. [Windows Resource], [_LT_LANG(RC)],
  692. [m4_ifdef([_LT_LANG_]$1[_CONFIG],
  693. [_LT_LANG($1)],
  694. [m4_fatal([$0: unsupported language: "$1"])])])dnl
  695. ])# LT_LANG
  696. # _LT_LANG(LANGNAME)
  697. # ------------------
  698. m4_defun([_LT_LANG],
  699. [m4_ifdef([_LT_LANG_]$1[_enabled], [],
  700. [LT_SUPPORTED_TAG([$1])dnl
  701. m4_append([_LT_TAGS], [$1 ])dnl
  702. m4_define([_LT_LANG_]$1[_enabled], [])dnl
  703. _LT_LANG_$1_CONFIG($1)])dnl
  704. ])# _LT_LANG
  705. m4_ifndef([AC_PROG_GO], [
  706. ############################################################
  707. # NOTE: This macro has been submitted for inclusion into #
  708. # GNU Autoconf as AC_PROG_GO. When it is available in #
  709. # a released version of Autoconf we should remove this #
  710. # macro and use it instead. #
  711. ############################################################
  712. m4_defun([AC_PROG_GO],
  713. [AC_LANG_PUSH(Go)dnl
  714. AC_ARG_VAR([GOC], [Go compiler command])dnl
  715. AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
  716. _AC_ARG_VAR_LDFLAGS()dnl
  717. AC_CHECK_TOOL(GOC, gccgo)
  718. if test -z "$GOC"; then
  719. if test -n "$ac_tool_prefix"; then
  720. AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
  721. fi
  722. fi
  723. if test -z "$GOC"; then
  724. AC_CHECK_PROG(GOC, gccgo, gccgo, false)
  725. fi
  726. ])#m4_defun
  727. ])#m4_ifndef
  728. # _LT_LANG_DEFAULT_CONFIG
  729. # -----------------------
  730. m4_defun([_LT_LANG_DEFAULT_CONFIG],
  731. [AC_PROVIDE_IFELSE([AC_PROG_CXX],
  732. [LT_LANG(CXX)],
  733. [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
  734. AC_PROVIDE_IFELSE([AC_PROG_F77],
  735. [LT_LANG(F77)],
  736. [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
  737. AC_PROVIDE_IFELSE([AC_PROG_FC],
  738. [LT_LANG(FC)],
  739. [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
  740. dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
  741. dnl pulling things in needlessly.
  742. AC_PROVIDE_IFELSE([AC_PROG_GCJ],
  743. [LT_LANG(GCJ)],
  744. [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
  745. [LT_LANG(GCJ)],
  746. [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
  747. [LT_LANG(GCJ)],
  748. [m4_ifdef([AC_PROG_GCJ],
  749. [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
  750. m4_ifdef([A][M_PROG_GCJ],
  751. [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
  752. m4_ifdef([LT_PROG_GCJ],
  753. [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
  754. AC_PROVIDE_IFELSE([AC_PROG_GO],
  755. [LT_LANG(GO)],
  756. [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
  757. AC_PROVIDE_IFELSE([LT_PROG_RC],
  758. [LT_LANG(RC)],
  759. [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
  760. ])# _LT_LANG_DEFAULT_CONFIG
  761. # Obsolete macros:
  762. AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
  763. AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
  764. AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
  765. AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
  766. AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
  767. dnl aclocal-1.4 backwards compatibility:
  768. dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
  769. dnl AC_DEFUN([AC_LIBTOOL_F77], [])
  770. dnl AC_DEFUN([AC_LIBTOOL_FC], [])
  771. dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
  772. dnl AC_DEFUN([AC_LIBTOOL_RC], [])
  773. # _LT_TAG_COMPILER
  774. # ----------------
  775. m4_defun([_LT_TAG_COMPILER],
  776. [AC_REQUIRE([AC_PROG_CC])dnl
  777. _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
  778. _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
  779. _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
  780. _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
  781. # If no C compiler was specified, use CC.
  782. LTCC=${LTCC-"$CC"}
  783. # If no C compiler flags were specified, use CFLAGS.
  784. LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
  785. # Allow CC to be a program name with arguments.
  786. compiler=$CC
  787. ])# _LT_TAG_COMPILER
  788. # _LT_COMPILER_BOILERPLATE
  789. # ------------------------
  790. # Check for compiler boilerplate output or warnings with
  791. # the simple compiler test code.
  792. m4_defun([_LT_COMPILER_BOILERPLATE],
  793. [m4_require([_LT_DECL_SED])dnl
  794. ac_outfile=conftest.$ac_objext
  795. echo "$lt_simple_compile_test_code" >conftest.$ac_ext
  796. eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  797. _lt_compiler_boilerplate=`cat conftest.err`
  798. $RM conftest*
  799. ])# _LT_COMPILER_BOILERPLATE
  800. # _LT_LINKER_BOILERPLATE
  801. # ----------------------
  802. # Check for linker boilerplate output or warnings with
  803. # the simple link test code.
  804. m4_defun([_LT_LINKER_BOILERPLATE],
  805. [m4_require([_LT_DECL_SED])dnl
  806. ac_outfile=conftest.$ac_objext
  807. echo "$lt_simple_link_test_code" >conftest.$ac_ext
  808. eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  809. _lt_linker_boilerplate=`cat conftest.err`
  810. $RM -r conftest*
  811. ])# _LT_LINKER_BOILERPLATE
  812. # _LT_REQUIRED_DARWIN_CHECKS
  813. # -------------------------
  814. m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
  815. case $host_os in
  816. rhapsody* | darwin*)
  817. AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
  818. AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
  819. AC_CHECK_TOOL([LIPO], [lipo], [:])
  820. AC_CHECK_TOOL([OTOOL], [otool], [:])
  821. AC_CHECK_TOOL([OTOOL64], [otool64], [:])
  822. _LT_DECL([], [DSYMUTIL], [1],
  823. [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
  824. _LT_DECL([], [NMEDIT], [1],
  825. [Tool to change global to local symbols on Mac OS X])
  826. _LT_DECL([], [LIPO], [1],
  827. [Tool to manipulate fat objects and archives on Mac OS X])
  828. _LT_DECL([], [OTOOL], [1],
  829. [ldd/readelf like tool for Mach-O binaries on Mac OS X])
  830. _LT_DECL([], [OTOOL64], [1],
  831. [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
  832. AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
  833. [lt_cv_apple_cc_single_mod=no
  834. if test -z "$LT_MULTI_MODULE"; then
  835. # By default we will add the -single_module flag. You can override
  836. # by either setting the environment variable LT_MULTI_MODULE
  837. # non-empty at configure time, or by adding -multi_module to the
  838. # link flags.
  839. rm -rf libconftest.dylib*
  840. echo "int foo(void){return 1;}" > conftest.c
  841. echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  842. -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
  843. $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  844. -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
  845. _lt_result=$?
  846. # If there is a non-empty error log, and "single_module"
  847. # appears in it, assume the flag caused a linker warning
  848. if test -s conftest.err && $GREP single_module conftest.err; then
  849. cat conftest.err >&AS_MESSAGE_LOG_FD
  850. # Otherwise, if the output was created with a 0 exit code from
  851. # the compiler, it worked.
  852. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
  853. lt_cv_apple_cc_single_mod=yes
  854. else
  855. cat conftest.err >&AS_MESSAGE_LOG_FD
  856. fi
  857. rm -rf libconftest.dylib*
  858. rm -f conftest.*
  859. fi])
  860. # Feature test to disable chained fixups since it is not
  861. # compatible with '-undefined dynamic_lookup'
  862. AC_CACHE_CHECK([for -no_fixup_chains linker flag],
  863. [lt_cv_support_no_fixup_chains],
  864. [ save_LDFLAGS=$LDFLAGS
  865. LDFLAGS="$LDFLAGS -Wl,-no_fixup_chains"
  866. AC_LINK_IFELSE(
  867. [AC_LANG_PROGRAM([],[])],
  868. lt_cv_support_no_fixup_chains=yes,
  869. lt_cv_support_no_fixup_chains=no
  870. )
  871. LDFLAGS=$save_LDFLAGS
  872. ]
  873. )
  874. AC_CACHE_CHECK([for -exported_symbols_list linker flag],
  875. [lt_cv_ld_exported_symbols_list],
  876. [lt_cv_ld_exported_symbols_list=no
  877. save_LDFLAGS=$LDFLAGS
  878. echo "_main" > conftest.sym
  879. LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
  880. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  881. [lt_cv_ld_exported_symbols_list=yes],
  882. [lt_cv_ld_exported_symbols_list=no])
  883. LDFLAGS=$save_LDFLAGS
  884. ])
  885. AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
  886. [lt_cv_ld_force_load=no
  887. cat > conftest.c << _LT_EOF
  888. int forced_loaded() { return 2;}
  889. _LT_EOF
  890. echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
  891. $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
  892. echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
  893. $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
  894. echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
  895. $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
  896. cat > conftest.c << _LT_EOF
  897. int main(void) { return 0;}
  898. _LT_EOF
  899. echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
  900. $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
  901. _lt_result=$?
  902. if test -s conftest.err && $GREP force_load conftest.err; then
  903. cat conftest.err >&AS_MESSAGE_LOG_FD
  904. elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
  905. lt_cv_ld_force_load=yes
  906. else
  907. cat conftest.err >&AS_MESSAGE_LOG_FD
  908. fi
  909. rm -f conftest.err libconftest.a conftest conftest.c
  910. rm -rf conftest.dSYM
  911. ])
  912. case $host_os in
  913. rhapsody* | darwin1.[[012]])
  914. _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
  915. darwin1.*)
  916. _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
  917. darwin*)
  918. case $MACOSX_DEPLOYMENT_TARGET,$host in
  919. 10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
  920. _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
  921. *)
  922. _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup'
  923. if test yes = "$lt_cv_support_no_fixup_chains"; then
  924. AS_VAR_APPEND([_lt_dar_allow_undefined], [' $wl-no_fixup_chains'])
  925. fi
  926. ;;
  927. esac
  928. ;;
  929. esac
  930. if test yes = "$lt_cv_apple_cc_single_mod"; then
  931. _lt_dar_single_mod='$single_module'
  932. fi
  933. _lt_dar_needs_single_mod=no
  934. case $host_os in
  935. rhapsody* | darwin1.*)
  936. _lt_dar_needs_single_mod=yes ;;
  937. darwin*)
  938. # When targeting Mac OS X 10.4 (darwin 8) or later,
  939. # -single_module is the default and -multi_module is unsupported.
  940. # The toolchain on macOS 10.14 (darwin 18) and later cannot
  941. # target any OS version that needs -single_module.
  942. case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
  943. 10.0,*-darwin[[567]].*|10.[[0-3]],*-darwin[[5-9]].*|10.[[0-3]],*-darwin1[[0-7]].*)
  944. _lt_dar_needs_single_mod=yes ;;
  945. esac
  946. ;;
  947. esac
  948. if test yes = "$lt_cv_ld_exported_symbols_list"; then
  949. _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
  950. else
  951. _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
  952. fi
  953. if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
  954. _lt_dsymutil='~$DSYMUTIL $lib || :'
  955. else
  956. _lt_dsymutil=
  957. fi
  958. ;;
  959. esac
  960. ])
  961. # _LT_DARWIN_LINKER_FEATURES([TAG])
  962. # ---------------------------------
  963. # Checks for linker and compiler features on darwin
  964. m4_defun([_LT_DARWIN_LINKER_FEATURES],
  965. [
  966. m4_require([_LT_REQUIRED_DARWIN_CHECKS])
  967. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  968. _LT_TAGVAR(hardcode_direct, $1)=no
  969. _LT_TAGVAR(hardcode_automatic, $1)=yes
  970. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  971. if test yes = "$lt_cv_ld_force_load"; then
  972. _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\"`'
  973. m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
  974. [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
  975. else
  976. _LT_TAGVAR(whole_archive_flag_spec, $1)=''
  977. fi
  978. _LT_TAGVAR(link_all_deplibs, $1)=yes
  979. _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
  980. case $cc_basename in
  981. ifort*|nagfor*) _lt_dar_can_shared=yes ;;
  982. *) _lt_dar_can_shared=$GCC ;;
  983. esac
  984. if test yes = "$_lt_dar_can_shared"; then
  985. output_verbose_link_cmd=func_echo_all
  986. _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"
  987. _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
  988. _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"
  989. _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"
  990. m4_if([$1], [CXX],
  991. [ if test yes = "$_lt_dar_needs_single_mod" -a yes != "$lt_cv_apple_cc_single_mod"; then
  992. _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"
  993. _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"
  994. fi
  995. ],[])
  996. else
  997. _LT_TAGVAR(ld_shlibs, $1)=no
  998. fi
  999. ])
  1000. # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
  1001. # ----------------------------------
  1002. # Links a minimal program and checks the executable
  1003. # for the system default hardcoded library path. In most cases,
  1004. # this is /usr/lib:/lib, but when the MPI compilers are used
  1005. # the location of the communication and MPI libs are included too.
  1006. # If we don't find anything, use the default library path according
  1007. # to the aix ld manual.
  1008. # Store the results from the different compilers for each TAGNAME.
  1009. # Allow to override them for all tags through lt_cv_aix_libpath.
  1010. m4_defun([_LT_SYS_MODULE_PATH_AIX],
  1011. [m4_require([_LT_DECL_SED])dnl
  1012. if test set = "${lt_cv_aix_libpath+set}"; then
  1013. aix_libpath=$lt_cv_aix_libpath
  1014. else
  1015. AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
  1016. [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
  1017. lt_aix_libpath_sed='[
  1018. /Import File Strings/,/^$/ {
  1019. /^0/ {
  1020. s/^0 *\([^ ]*\) *$/\1/
  1021. p
  1022. }
  1023. }]'
  1024. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  1025. # Check for a 64-bit object if we didn't find anything.
  1026. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
  1027. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  1028. fi],[])
  1029. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
  1030. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
  1031. fi
  1032. ])
  1033. aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
  1034. fi
  1035. ])# _LT_SYS_MODULE_PATH_AIX
  1036. # _LT_SHELL_INIT(ARG)
  1037. # -------------------
  1038. m4_define([_LT_SHELL_INIT],
  1039. [m4_divert_text([M4SH-INIT], [$1
  1040. ])])# _LT_SHELL_INIT
  1041. # _LT_PROG_ECHO_BACKSLASH
  1042. # -----------------------
  1043. # Find how we can fake an echo command that does not interpret backslash.
  1044. # In particular, with Autoconf 2.60 or later we add some code to the start
  1045. # of the generated configure script that will find a shell with a builtin
  1046. # printf (that we can use as an echo command).
  1047. m4_defun([_LT_PROG_ECHO_BACKSLASH],
  1048. [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  1049. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  1050. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  1051. AC_MSG_CHECKING([how to print strings])
  1052. # Test print first, because it will be a builtin if present.
  1053. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
  1054. test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
  1055. ECHO='print -r --'
  1056. elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
  1057. ECHO='printf %s\n'
  1058. else
  1059. # Use this function as a fallback that always works.
  1060. func_fallback_echo ()
  1061. {
  1062. eval 'cat <<_LTECHO_EOF
  1063. $[]1
  1064. _LTECHO_EOF'
  1065. }
  1066. ECHO='func_fallback_echo'
  1067. fi
  1068. # func_echo_all arg...
  1069. # Invoke $ECHO with all args, space-separated.
  1070. func_echo_all ()
  1071. {
  1072. $ECHO "$*"
  1073. }
  1074. case $ECHO in
  1075. printf*) AC_MSG_RESULT([printf]) ;;
  1076. print*) AC_MSG_RESULT([print -r]) ;;
  1077. *) AC_MSG_RESULT([cat]) ;;
  1078. esac
  1079. m4_ifdef([_AS_DETECT_SUGGESTED],
  1080. [_AS_DETECT_SUGGESTED([
  1081. test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
  1082. ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  1083. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  1084. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  1085. PATH=/empty FPATH=/empty; export PATH FPATH
  1086. test "X`printf %s $ECHO`" = "X$ECHO" \
  1087. || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
  1088. _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
  1089. _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
  1090. ])# _LT_PROG_ECHO_BACKSLASH
  1091. # _LT_WITH_SYSROOT
  1092. # ----------------
  1093. AC_DEFUN([_LT_WITH_SYSROOT],
  1094. [m4_require([_LT_DECL_SED])dnl
  1095. AC_MSG_CHECKING([for sysroot])
  1096. AC_ARG_WITH([sysroot],
  1097. [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
  1098. [Search for dependent libraries within DIR (or the compiler's sysroot
  1099. if not specified).])],
  1100. [], [with_sysroot=no])
  1101. dnl lt_sysroot will always be passed unquoted. We quote it here
  1102. dnl in case the user passed a directory name.
  1103. lt_sysroot=
  1104. case $with_sysroot in #(
  1105. yes)
  1106. if test yes = "$GCC"; then
  1107. # Trim trailing / since we'll always append absolute paths and we want
  1108. # to avoid //, if only for less confusing output for the user.
  1109. lt_sysroot=`$CC --print-sysroot 2>/dev/null | $SED 's:/\+$::'`
  1110. fi
  1111. ;; #(
  1112. /*)
  1113. lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
  1114. ;; #(
  1115. no|'')
  1116. ;; #(
  1117. *)
  1118. AC_MSG_RESULT([$with_sysroot])
  1119. AC_MSG_ERROR([The sysroot must be an absolute path.])
  1120. ;;
  1121. esac
  1122. AC_MSG_RESULT([${lt_sysroot:-no}])
  1123. _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
  1124. [dependent libraries, and where our libraries should be installed.])])
  1125. # _LT_ENABLE_LOCK
  1126. # ---------------
  1127. m4_defun([_LT_ENABLE_LOCK],
  1128. [AC_ARG_ENABLE([libtool-lock],
  1129. [AS_HELP_STRING([--disable-libtool-lock],
  1130. [avoid locking (might break parallel builds)])])
  1131. test no = "$enable_libtool_lock" || enable_libtool_lock=yes
  1132. # Some flags need to be propagated to the compiler or linker for good
  1133. # libtool support.
  1134. case $host in
  1135. ia64-*-hpux*)
  1136. # Find out what ABI is being produced by ac_compile, and set mode
  1137. # options accordingly.
  1138. echo 'int i;' > conftest.$ac_ext
  1139. if AC_TRY_EVAL(ac_compile); then
  1140. case `$FILECMD conftest.$ac_objext` in
  1141. *ELF-32*)
  1142. HPUX_IA64_MODE=32
  1143. ;;
  1144. *ELF-64*)
  1145. HPUX_IA64_MODE=64
  1146. ;;
  1147. esac
  1148. fi
  1149. rm -rf conftest*
  1150. ;;
  1151. *-*-irix6*)
  1152. # Find out what ABI is being produced by ac_compile, and set linker
  1153. # options accordingly.
  1154. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
  1155. if AC_TRY_EVAL(ac_compile); then
  1156. if test yes = "$lt_cv_prog_gnu_ld"; then
  1157. case `$FILECMD conftest.$ac_objext` in
  1158. *32-bit*)
  1159. LD="${LD-ld} -melf32bsmip"
  1160. ;;
  1161. *N32*)
  1162. LD="${LD-ld} -melf32bmipn32"
  1163. ;;
  1164. *64-bit*)
  1165. LD="${LD-ld} -melf64bmip"
  1166. ;;
  1167. esac
  1168. else
  1169. case `$FILECMD conftest.$ac_objext` in
  1170. *32-bit*)
  1171. LD="${LD-ld} -32"
  1172. ;;
  1173. *N32*)
  1174. LD="${LD-ld} -n32"
  1175. ;;
  1176. *64-bit*)
  1177. LD="${LD-ld} -64"
  1178. ;;
  1179. esac
  1180. fi
  1181. fi
  1182. rm -rf conftest*
  1183. ;;
  1184. mips64*-*linux*)
  1185. # Find out what ABI is being produced by ac_compile, and set linker
  1186. # options accordingly.
  1187. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
  1188. if AC_TRY_EVAL(ac_compile); then
  1189. emul=elf
  1190. case `$FILECMD conftest.$ac_objext` in
  1191. *32-bit*)
  1192. emul="${emul}32"
  1193. ;;
  1194. *64-bit*)
  1195. emul="${emul}64"
  1196. ;;
  1197. esac
  1198. case `$FILECMD conftest.$ac_objext` in
  1199. *MSB*)
  1200. emul="${emul}btsmip"
  1201. ;;
  1202. *LSB*)
  1203. emul="${emul}ltsmip"
  1204. ;;
  1205. esac
  1206. case `$FILECMD conftest.$ac_objext` in
  1207. *N32*)
  1208. emul="${emul}n32"
  1209. ;;
  1210. esac
  1211. LD="${LD-ld} -m $emul"
  1212. fi
  1213. rm -rf conftest*
  1214. ;;
  1215. x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
  1216. s390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*)
  1217. # Find out what ABI is being produced by ac_compile, and set linker
  1218. # options accordingly. Note that the listed cases only cover the
  1219. # situations where additional linker options are needed (such as when
  1220. # doing 32-bit compilation for a host where ld defaults to 64-bit, or
  1221. # vice versa); the common cases where no linker options are needed do
  1222. # not appear in the list.
  1223. echo 'int i;' > conftest.$ac_ext
  1224. if AC_TRY_EVAL(ac_compile); then
  1225. case `$FILECMD conftest.o` in
  1226. *32-bit*)
  1227. case $host in
  1228. x86_64-*kfreebsd*-gnu)
  1229. LD="${LD-ld} -m elf_i386_fbsd"
  1230. ;;
  1231. x86_64-*linux*|x86_64-gnu*)
  1232. case `$FILECMD conftest.o` in
  1233. *x86-64*)
  1234. LD="${LD-ld} -m elf32_x86_64"
  1235. ;;
  1236. *)
  1237. LD="${LD-ld} -m elf_i386"
  1238. ;;
  1239. esac
  1240. ;;
  1241. powerpc64le-*linux*)
  1242. LD="${LD-ld} -m elf32lppclinux"
  1243. ;;
  1244. powerpc64-*linux*)
  1245. LD="${LD-ld} -m elf32ppclinux"
  1246. ;;
  1247. s390x-*linux*)
  1248. LD="${LD-ld} -m elf_s390"
  1249. ;;
  1250. sparc64-*linux*)
  1251. LD="${LD-ld} -m elf32_sparc"
  1252. ;;
  1253. esac
  1254. ;;
  1255. *64-bit*)
  1256. case $host in
  1257. x86_64-*kfreebsd*-gnu)
  1258. LD="${LD-ld} -m elf_x86_64_fbsd"
  1259. ;;
  1260. x86_64-*linux*|x86_64-gnu*)
  1261. LD="${LD-ld} -m elf_x86_64"
  1262. ;;
  1263. powerpcle-*linux*)
  1264. LD="${LD-ld} -m elf64lppc"
  1265. ;;
  1266. powerpc-*linux*)
  1267. LD="${LD-ld} -m elf64ppc"
  1268. ;;
  1269. s390*-*linux*|s390*-*tpf*)
  1270. LD="${LD-ld} -m elf64_s390"
  1271. ;;
  1272. sparc*-*linux*)
  1273. LD="${LD-ld} -m elf64_sparc"
  1274. ;;
  1275. esac
  1276. ;;
  1277. esac
  1278. fi
  1279. rm -rf conftest*
  1280. ;;
  1281. *-*-sco3.2v5*)
  1282. # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  1283. SAVE_CFLAGS=$CFLAGS
  1284. CFLAGS="$CFLAGS -belf"
  1285. AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
  1286. [AC_LANG_PUSH(C)
  1287. AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
  1288. AC_LANG_POP])
  1289. if test yes != "$lt_cv_cc_needs_belf"; then
  1290. # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  1291. CFLAGS=$SAVE_CFLAGS
  1292. fi
  1293. ;;
  1294. *-*solaris*)
  1295. # Find out what ABI is being produced by ac_compile, and set linker
  1296. # options accordingly.
  1297. echo 'int i;' > conftest.$ac_ext
  1298. if AC_TRY_EVAL(ac_compile); then
  1299. case `$FILECMD conftest.o` in
  1300. *64-bit*)
  1301. case $lt_cv_prog_gnu_ld in
  1302. yes*)
  1303. case $host in
  1304. i?86-*-solaris*|x86_64-*-solaris*)
  1305. LD="${LD-ld} -m elf_x86_64"
  1306. ;;
  1307. sparc*-*-solaris*)
  1308. LD="${LD-ld} -m elf64_sparc"
  1309. ;;
  1310. esac
  1311. # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
  1312. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
  1313. LD=${LD-ld}_sol2
  1314. fi
  1315. ;;
  1316. *)
  1317. if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
  1318. LD="${LD-ld} -64"
  1319. fi
  1320. ;;
  1321. esac
  1322. ;;
  1323. esac
  1324. fi
  1325. rm -rf conftest*
  1326. ;;
  1327. esac
  1328. need_locks=$enable_libtool_lock
  1329. ])# _LT_ENABLE_LOCK
  1330. # _LT_PROG_AR
  1331. # -----------
  1332. m4_defun([_LT_PROG_AR],
  1333. [AC_CHECK_TOOLS(AR, [ar], false)
  1334. : ${AR=ar}
  1335. _LT_DECL([], [AR], [1], [The archiver])
  1336. # Use ARFLAGS variable as AR's operation code to sync the variable naming with
  1337. # Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
  1338. # higher priority because that's what people were doing historically (setting
  1339. # ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS
  1340. # variable obsoleted/removed.
  1341. test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
  1342. lt_ar_flags=$AR_FLAGS
  1343. _LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)])
  1344. # Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override
  1345. # by AR_FLAGS because that was never working and AR_FLAGS is about to die.
  1346. _LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}],
  1347. [Flags to create an archive])
  1348. AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
  1349. [lt_cv_ar_at_file=no
  1350. AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
  1351. [echo conftest.$ac_objext > conftest.lst
  1352. lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
  1353. AC_TRY_EVAL([lt_ar_try])
  1354. if test 0 -eq "$ac_status"; then
  1355. # Ensure the archiver fails upon bogus file names.
  1356. rm -f conftest.$ac_objext libconftest.a
  1357. AC_TRY_EVAL([lt_ar_try])
  1358. if test 0 -ne "$ac_status"; then
  1359. lt_cv_ar_at_file=@
  1360. fi
  1361. fi
  1362. rm -f conftest.* libconftest.a
  1363. ])
  1364. ])
  1365. if test no = "$lt_cv_ar_at_file"; then
  1366. archiver_list_spec=
  1367. else
  1368. archiver_list_spec=$lt_cv_ar_at_file
  1369. fi
  1370. _LT_DECL([], [archiver_list_spec], [1],
  1371. [How to feed a file listing to the archiver])
  1372. ])# _LT_PROG_AR
  1373. # _LT_CMD_OLD_ARCHIVE
  1374. # -------------------
  1375. m4_defun([_LT_CMD_OLD_ARCHIVE],
  1376. [_LT_PROG_AR
  1377. AC_CHECK_TOOL(STRIP, strip, :)
  1378. test -z "$STRIP" && STRIP=:
  1379. _LT_DECL([], [STRIP], [1], [A symbol stripping program])
  1380. AC_REQUIRE([AC_PROG_RANLIB])
  1381. test -z "$RANLIB" && RANLIB=:
  1382. _LT_DECL([], [RANLIB], [1],
  1383. [Commands used to install an old-style archive])
  1384. # Determine commands to create old-style static archives.
  1385. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
  1386. old_postinstall_cmds='chmod 644 $oldlib'
  1387. old_postuninstall_cmds=
  1388. if test -n "$RANLIB"; then
  1389. old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
  1390. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
  1391. fi
  1392. case $host_os in
  1393. darwin*)
  1394. lock_old_archive_extraction=yes ;;
  1395. *)
  1396. lock_old_archive_extraction=no ;;
  1397. esac
  1398. _LT_DECL([], [old_postinstall_cmds], [2])
  1399. _LT_DECL([], [old_postuninstall_cmds], [2])
  1400. _LT_TAGDECL([], [old_archive_cmds], [2],
  1401. [Commands used to build an old-style archive])
  1402. _LT_DECL([], [lock_old_archive_extraction], [0],
  1403. [Whether to use a lock for old archive extraction])
  1404. ])# _LT_CMD_OLD_ARCHIVE
  1405. # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  1406. # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
  1407. # ----------------------------------------------------------------
  1408. # Check whether the given compiler option works
  1409. AC_DEFUN([_LT_COMPILER_OPTION],
  1410. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1411. m4_require([_LT_DECL_SED])dnl
  1412. AC_CACHE_CHECK([$1], [$2],
  1413. [$2=no
  1414. m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
  1415. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  1416. lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment
  1417. # Insert the option either (1) after the last *FLAGS variable, or
  1418. # (2) before a word containing "conftest.", or (3) at the end.
  1419. # Note that $ac_compile itself does not contain backslashes and begins
  1420. # with a dollar sign (not a hyphen), so the echo should work correctly.
  1421. # The option is referenced via a variable to avoid confusing sed.
  1422. lt_compile=`echo "$ac_compile" | $SED \
  1423. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  1424. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  1425. -e 's:$: $lt_compiler_flag:'`
  1426. (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  1427. (eval "$lt_compile" 2>conftest.err)
  1428. ac_status=$?
  1429. cat conftest.err >&AS_MESSAGE_LOG_FD
  1430. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  1431. if (exit $ac_status) && test -s "$ac_outfile"; then
  1432. # The compiler can only warn and ignore the option if not recognized
  1433. # So say no if there are warnings other than the usual output.
  1434. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
  1435. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  1436. if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
  1437. $2=yes
  1438. fi
  1439. fi
  1440. $RM conftest*
  1441. ])
  1442. if test yes = "[$]$2"; then
  1443. m4_if([$5], , :, [$5])
  1444. else
  1445. m4_if([$6], , :, [$6])
  1446. fi
  1447. ])# _LT_COMPILER_OPTION
  1448. # Old name:
  1449. AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
  1450. dnl aclocal-1.4 backwards compatibility:
  1451. dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
  1452. # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  1453. # [ACTION-SUCCESS], [ACTION-FAILURE])
  1454. # ----------------------------------------------------
  1455. # Check whether the given linker option works
  1456. AC_DEFUN([_LT_LINKER_OPTION],
  1457. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1458. m4_require([_LT_DECL_SED])dnl
  1459. AC_CACHE_CHECK([$1], [$2],
  1460. [$2=no
  1461. save_LDFLAGS=$LDFLAGS
  1462. LDFLAGS="$LDFLAGS $3"
  1463. echo "$lt_simple_link_test_code" > conftest.$ac_ext
  1464. if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
  1465. # The linker can only warn and ignore the option if not recognized
  1466. # So say no if there are warnings
  1467. if test -s conftest.err; then
  1468. # Append any errors to the config.log.
  1469. cat conftest.err 1>&AS_MESSAGE_LOG_FD
  1470. $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
  1471. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  1472. if diff conftest.exp conftest.er2 >/dev/null; then
  1473. $2=yes
  1474. fi
  1475. else
  1476. $2=yes
  1477. fi
  1478. fi
  1479. $RM -r conftest*
  1480. LDFLAGS=$save_LDFLAGS
  1481. ])
  1482. if test yes = "[$]$2"; then
  1483. m4_if([$4], , :, [$4])
  1484. else
  1485. m4_if([$5], , :, [$5])
  1486. fi
  1487. ])# _LT_LINKER_OPTION
  1488. # Old name:
  1489. AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
  1490. dnl aclocal-1.4 backwards compatibility:
  1491. dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
  1492. # LT_CMD_MAX_LEN
  1493. #---------------
  1494. AC_DEFUN([LT_CMD_MAX_LEN],
  1495. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  1496. # find the maximum length of command line arguments
  1497. AC_MSG_CHECKING([the maximum length of command line arguments])
  1498. AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
  1499. i=0
  1500. teststring=ABCD
  1501. case $build_os in
  1502. msdosdjgpp*)
  1503. # On DJGPP, this test can blow up pretty badly due to problems in libc
  1504. # (any single argument exceeding 2000 bytes causes a buffer overrun
  1505. # during glob expansion). Even if it were fixed, the result of this
  1506. # check would be larger than it should be.
  1507. lt_cv_sys_max_cmd_len=12288; # 12K is about right
  1508. ;;
  1509. gnu* | ironclad*)
  1510. # Under GNU Hurd and Ironclad, this test is not required because there
  1511. # is no limit to the length of command line arguments.
  1512. # Libtool will interpret -1 as no limit whatsoever
  1513. lt_cv_sys_max_cmd_len=-1;
  1514. ;;
  1515. cygwin* | mingw* | windows* | cegcc*)
  1516. # On Win9x/ME, this test blows up -- it succeeds, but takes
  1517. # about 5 minutes as the teststring grows exponentially.
  1518. # Worse, since 9x/ME are not pre-emptively multitasking,
  1519. # you end up with a "frozen" computer, even though with patience
  1520. # the test eventually succeeds (with a max line length of 256k).
  1521. # Instead, let's just punt: use the minimum linelength reported by
  1522. # all of the supported platforms: 8192 (on NT/2K/XP).
  1523. lt_cv_sys_max_cmd_len=8192;
  1524. ;;
  1525. mint*)
  1526. # On MiNT this can take a long time and run out of memory.
  1527. lt_cv_sys_max_cmd_len=8192;
  1528. ;;
  1529. amigaos*)
  1530. # On AmigaOS with pdksh, this test takes hours, literally.
  1531. # So we just punt and use a minimum line length of 8192.
  1532. lt_cv_sys_max_cmd_len=8192;
  1533. ;;
  1534. darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
  1535. # This has been around since 386BSD, at least. Likely further.
  1536. if test -x /sbin/sysctl; then
  1537. lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
  1538. elif test -x /usr/sbin/sysctl; then
  1539. lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
  1540. else
  1541. lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
  1542. fi
  1543. # And add a safety zone
  1544. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  1545. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  1546. ;;
  1547. interix*)
  1548. # We know the value 262144 and hardcode it with a safety zone (like BSD)
  1549. lt_cv_sys_max_cmd_len=196608
  1550. ;;
  1551. os2*)
  1552. # The test takes a long time on OS/2.
  1553. lt_cv_sys_max_cmd_len=8192
  1554. ;;
  1555. osf*)
  1556. # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
  1557. # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
  1558. # nice to cause kernel panics so lets avoid the loop below.
  1559. # First set a reasonable default.
  1560. lt_cv_sys_max_cmd_len=16384
  1561. #
  1562. if test -x /sbin/sysconfig; then
  1563. case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
  1564. *1*) lt_cv_sys_max_cmd_len=-1 ;;
  1565. esac
  1566. fi
  1567. ;;
  1568. sco3.2v5*)
  1569. lt_cv_sys_max_cmd_len=102400
  1570. ;;
  1571. sysv5* | sco5v6* | sysv4.2uw2*)
  1572. kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
  1573. if test -n "$kargmax"; then
  1574. lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'`
  1575. else
  1576. lt_cv_sys_max_cmd_len=32768
  1577. fi
  1578. ;;
  1579. *)
  1580. lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
  1581. if test -n "$lt_cv_sys_max_cmd_len" && \
  1582. test undefined != "$lt_cv_sys_max_cmd_len"; then
  1583. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  1584. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  1585. else
  1586. # Make teststring a little bigger before we do anything with it.
  1587. # a 1K string should be a reasonable start.
  1588. for i in 1 2 3 4 5 6 7 8; do
  1589. teststring=$teststring$teststring
  1590. done
  1591. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
  1592. # If test is not a shell built-in, we'll probably end up computing a
  1593. # maximum length that is only half of the actual maximum length, but
  1594. # we can't tell.
  1595. while { test X`env echo "$teststring$teststring" 2>/dev/null` \
  1596. = "X$teststring$teststring"; } >/dev/null 2>&1 &&
  1597. test 17 != "$i" # 1/2 MB should be enough
  1598. do
  1599. i=`expr $i + 1`
  1600. teststring=$teststring$teststring
  1601. done
  1602. # Only check the string length outside the loop.
  1603. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
  1604. teststring=
  1605. # Add a significant safety factor because C++ compilers can tack on
  1606. # massive amounts of additional arguments before passing them to the
  1607. # linker. It appears as though 1/2 is a usable value.
  1608. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
  1609. fi
  1610. ;;
  1611. esac
  1612. ])
  1613. if test -n "$lt_cv_sys_max_cmd_len"; then
  1614. AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
  1615. else
  1616. AC_MSG_RESULT(none)
  1617. fi
  1618. max_cmd_len=$lt_cv_sys_max_cmd_len
  1619. _LT_DECL([], [max_cmd_len], [0],
  1620. [What is the maximum length of a command?])
  1621. ])# LT_CMD_MAX_LEN
  1622. # Old name:
  1623. AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
  1624. dnl aclocal-1.4 backwards compatibility:
  1625. dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
  1626. # _LT_HEADER_DLFCN
  1627. # ----------------
  1628. m4_defun([_LT_HEADER_DLFCN],
  1629. [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
  1630. ])# _LT_HEADER_DLFCN
  1631. # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
  1632. # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
  1633. # ----------------------------------------------------------------
  1634. m4_defun([_LT_TRY_DLOPEN_SELF],
  1635. [m4_require([_LT_HEADER_DLFCN])dnl
  1636. if test yes = "$cross_compiling"; then :
  1637. [$4]
  1638. else
  1639. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  1640. lt_status=$lt_dlunknown
  1641. cat > conftest.$ac_ext <<_LT_EOF
  1642. [#line $LINENO "configure"
  1643. #include "confdefs.h"
  1644. #if HAVE_DLFCN_H
  1645. #include <dlfcn.h>
  1646. #endif
  1647. #include <stdio.h>
  1648. #ifdef RTLD_GLOBAL
  1649. # define LT_DLGLOBAL RTLD_GLOBAL
  1650. #else
  1651. # ifdef DL_GLOBAL
  1652. # define LT_DLGLOBAL DL_GLOBAL
  1653. # else
  1654. # define LT_DLGLOBAL 0
  1655. # endif
  1656. #endif
  1657. /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
  1658. find out it does not work in some platform. */
  1659. #ifndef LT_DLLAZY_OR_NOW
  1660. # ifdef RTLD_LAZY
  1661. # define LT_DLLAZY_OR_NOW RTLD_LAZY
  1662. # else
  1663. # ifdef DL_LAZY
  1664. # define LT_DLLAZY_OR_NOW DL_LAZY
  1665. # else
  1666. # ifdef RTLD_NOW
  1667. # define LT_DLLAZY_OR_NOW RTLD_NOW
  1668. # else
  1669. # ifdef DL_NOW
  1670. # define LT_DLLAZY_OR_NOW DL_NOW
  1671. # else
  1672. # define LT_DLLAZY_OR_NOW 0
  1673. # endif
  1674. # endif
  1675. # endif
  1676. # endif
  1677. #endif
  1678. /* When -fvisibility=hidden is used, assume the code has been annotated
  1679. correspondingly for the symbols needed. */
  1680. #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
  1681. int fnord (void) __attribute__((visibility("default")));
  1682. #endif
  1683. int fnord (void) { return 42; }
  1684. int main (void)
  1685. {
  1686. void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  1687. int status = $lt_dlunknown;
  1688. if (self)
  1689. {
  1690. if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
  1691. else
  1692. {
  1693. if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
  1694. else puts (dlerror ());
  1695. }
  1696. /* dlclose (self); */
  1697. }
  1698. else
  1699. puts (dlerror ());
  1700. return status;
  1701. }]
  1702. _LT_EOF
  1703. if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
  1704. (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
  1705. lt_status=$?
  1706. case x$lt_status in
  1707. x$lt_dlno_uscore) $1 ;;
  1708. x$lt_dlneed_uscore) $2 ;;
  1709. x$lt_dlunknown|x*) $3 ;;
  1710. esac
  1711. else :
  1712. # compilation failed
  1713. $3
  1714. fi
  1715. fi
  1716. rm -fr conftest*
  1717. ])# _LT_TRY_DLOPEN_SELF
  1718. # LT_SYS_DLOPEN_SELF
  1719. # ------------------
  1720. AC_DEFUN([LT_SYS_DLOPEN_SELF],
  1721. [m4_require([_LT_HEADER_DLFCN])dnl
  1722. if test yes != "$enable_dlopen"; then
  1723. enable_dlopen=unknown
  1724. enable_dlopen_self=unknown
  1725. enable_dlopen_self_static=unknown
  1726. else
  1727. lt_cv_dlopen=no
  1728. lt_cv_dlopen_libs=
  1729. case $host_os in
  1730. beos*)
  1731. lt_cv_dlopen=load_add_on
  1732. lt_cv_dlopen_libs=
  1733. lt_cv_dlopen_self=yes
  1734. ;;
  1735. mingw* | windows* | pw32* | cegcc*)
  1736. lt_cv_dlopen=LoadLibrary
  1737. lt_cv_dlopen_libs=
  1738. ;;
  1739. cygwin*)
  1740. lt_cv_dlopen=dlopen
  1741. lt_cv_dlopen_libs=
  1742. ;;
  1743. darwin*)
  1744. # if libdl is installed we need to link against it
  1745. AC_CHECK_LIB([dl], [dlopen],
  1746. [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
  1747. lt_cv_dlopen=dyld
  1748. lt_cv_dlopen_libs=
  1749. lt_cv_dlopen_self=yes
  1750. ])
  1751. ;;
  1752. tpf*)
  1753. # Don't try to run any link tests for TPF. We know it's impossible
  1754. # because TPF is a cross-compiler, and we know how we open DSOs.
  1755. lt_cv_dlopen=dlopen
  1756. lt_cv_dlopen_libs=
  1757. lt_cv_dlopen_self=no
  1758. ;;
  1759. *)
  1760. AC_CHECK_FUNC([shl_load],
  1761. [lt_cv_dlopen=shl_load],
  1762. [AC_CHECK_LIB([dld], [shl_load],
  1763. [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
  1764. [AC_CHECK_FUNC([dlopen],
  1765. [lt_cv_dlopen=dlopen],
  1766. [AC_CHECK_LIB([dl], [dlopen],
  1767. [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
  1768. [AC_CHECK_LIB([svld], [dlopen],
  1769. [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
  1770. [AC_CHECK_LIB([dld], [dld_link],
  1771. [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
  1772. ])
  1773. ])
  1774. ])
  1775. ])
  1776. ])
  1777. ;;
  1778. esac
  1779. if test no = "$lt_cv_dlopen"; then
  1780. enable_dlopen=no
  1781. else
  1782. enable_dlopen=yes
  1783. fi
  1784. case $lt_cv_dlopen in
  1785. dlopen)
  1786. save_CPPFLAGS=$CPPFLAGS
  1787. test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  1788. save_LDFLAGS=$LDFLAGS
  1789. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  1790. save_LIBS=$LIBS
  1791. LIBS="$lt_cv_dlopen_libs $LIBS"
  1792. AC_CACHE_CHECK([whether a program can dlopen itself],
  1793. lt_cv_dlopen_self, [dnl
  1794. _LT_TRY_DLOPEN_SELF(
  1795. lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
  1796. lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
  1797. ])
  1798. if test yes = "$lt_cv_dlopen_self"; then
  1799. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
  1800. AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
  1801. lt_cv_dlopen_self_static, [dnl
  1802. _LT_TRY_DLOPEN_SELF(
  1803. lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
  1804. lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
  1805. ])
  1806. fi
  1807. CPPFLAGS=$save_CPPFLAGS
  1808. LDFLAGS=$save_LDFLAGS
  1809. LIBS=$save_LIBS
  1810. ;;
  1811. esac
  1812. case $lt_cv_dlopen_self in
  1813. yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  1814. *) enable_dlopen_self=unknown ;;
  1815. esac
  1816. case $lt_cv_dlopen_self_static in
  1817. yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  1818. *) enable_dlopen_self_static=unknown ;;
  1819. esac
  1820. fi
  1821. _LT_DECL([dlopen_support], [enable_dlopen], [0],
  1822. [Whether dlopen is supported])
  1823. _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
  1824. [Whether dlopen of programs is supported])
  1825. _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
  1826. [Whether dlopen of statically linked programs is supported])
  1827. ])# LT_SYS_DLOPEN_SELF
  1828. # Old name:
  1829. AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
  1830. dnl aclocal-1.4 backwards compatibility:
  1831. dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
  1832. # _LT_COMPILER_C_O([TAGNAME])
  1833. # ---------------------------
  1834. # Check to see if options -c and -o are simultaneously supported by compiler.
  1835. # This macro does not hard code the compiler like AC_PROG_CC_C_O.
  1836. m4_defun([_LT_COMPILER_C_O],
  1837. [m4_require([_LT_DECL_SED])dnl
  1838. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1839. m4_require([_LT_TAG_COMPILER])dnl
  1840. AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
  1841. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
  1842. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
  1843. $RM -r conftest 2>/dev/null
  1844. mkdir conftest
  1845. cd conftest
  1846. mkdir out
  1847. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  1848. lt_compiler_flag="-o out/conftest2.$ac_objext"
  1849. # Insert the option either (1) after the last *FLAGS variable, or
  1850. # (2) before a word containing "conftest.", or (3) at the end.
  1851. # Note that $ac_compile itself does not contain backslashes and begins
  1852. # with a dollar sign (not a hyphen), so the echo should work correctly.
  1853. lt_compile=`echo "$ac_compile" | $SED \
  1854. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  1855. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  1856. -e 's:$: $lt_compiler_flag:'`
  1857. (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  1858. (eval "$lt_compile" 2>out/conftest.err)
  1859. ac_status=$?
  1860. cat out/conftest.err >&AS_MESSAGE_LOG_FD
  1861. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  1862. if (exit $ac_status) && test -s out/conftest2.$ac_objext
  1863. then
  1864. # The compiler can only warn and ignore the option if not recognized
  1865. # So say no if there are warnings
  1866. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
  1867. $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
  1868. if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
  1869. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  1870. fi
  1871. fi
  1872. chmod u+w . 2>&AS_MESSAGE_LOG_FD
  1873. $RM conftest*
  1874. # SGI C++ compiler will create directory out/ii_files/ for
  1875. # template instantiation
  1876. test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
  1877. $RM out/* && rmdir out
  1878. cd ..
  1879. $RM -r conftest
  1880. $RM conftest*
  1881. ])
  1882. _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
  1883. [Does compiler simultaneously support -c and -o options?])
  1884. ])# _LT_COMPILER_C_O
  1885. # _LT_COMPILER_FILE_LOCKS([TAGNAME])
  1886. # ----------------------------------
  1887. # Check to see if we can do hard links to lock some files if needed
  1888. m4_defun([_LT_COMPILER_FILE_LOCKS],
  1889. [m4_require([_LT_ENABLE_LOCK])dnl
  1890. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1891. _LT_COMPILER_C_O([$1])
  1892. hard_links=nottested
  1893. if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
  1894. # do not overwrite the value of need_locks provided by the user
  1895. AC_MSG_CHECKING([if we can lock with hard links])
  1896. hard_links=yes
  1897. $RM conftest*
  1898. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1899. touch conftest.a
  1900. ln conftest.a conftest.b 2>&5 || hard_links=no
  1901. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1902. AC_MSG_RESULT([$hard_links])
  1903. if test no = "$hard_links"; then
  1904. AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
  1905. need_locks=warn
  1906. fi
  1907. else
  1908. need_locks=no
  1909. fi
  1910. _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
  1911. ])# _LT_COMPILER_FILE_LOCKS
  1912. # _LT_CHECK_OBJDIR
  1913. # ----------------
  1914. m4_defun([_LT_CHECK_OBJDIR],
  1915. [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
  1916. [rm -f .libs 2>/dev/null
  1917. mkdir .libs 2>/dev/null
  1918. if test -d .libs; then
  1919. lt_cv_objdir=.libs
  1920. else
  1921. # MS-DOS does not allow filenames that begin with a dot.
  1922. lt_cv_objdir=_libs
  1923. fi
  1924. rmdir .libs 2>/dev/null])
  1925. objdir=$lt_cv_objdir
  1926. _LT_DECL([], [objdir], [0],
  1927. [The name of the directory that contains temporary libtool files])dnl
  1928. m4_pattern_allow([LT_OBJDIR])dnl
  1929. AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
  1930. [Define to the sub-directory where libtool stores uninstalled libraries.])
  1931. ])# _LT_CHECK_OBJDIR
  1932. # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
  1933. # --------------------------------------
  1934. # Check hardcoding attributes.
  1935. m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
  1936. [AC_MSG_CHECKING([how to hardcode library paths into programs])
  1937. _LT_TAGVAR(hardcode_action, $1)=
  1938. if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
  1939. test -n "$_LT_TAGVAR(runpath_var, $1)" ||
  1940. test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
  1941. # We can hardcode non-existent directories.
  1942. if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
  1943. # If the only mechanism to avoid hardcoding is shlibpath_var, we
  1944. # have to relink, otherwise we might link with an installed library
  1945. # when we should be linking with a yet-to-be-installed one
  1946. ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
  1947. test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
  1948. # Linking always hardcodes the temporary library directory.
  1949. _LT_TAGVAR(hardcode_action, $1)=relink
  1950. else
  1951. # We can link without hardcoding, and we can hardcode nonexisting dirs.
  1952. _LT_TAGVAR(hardcode_action, $1)=immediate
  1953. fi
  1954. else
  1955. # We cannot hardcode anything, or else we can only hardcode existing
  1956. # directories.
  1957. _LT_TAGVAR(hardcode_action, $1)=unsupported
  1958. fi
  1959. AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
  1960. if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
  1961. test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
  1962. # Fast installation is not supported
  1963. enable_fast_install=no
  1964. elif test yes = "$shlibpath_overrides_runpath" ||
  1965. test no = "$enable_shared"; then
  1966. # Fast installation is not necessary
  1967. enable_fast_install=needless
  1968. fi
  1969. _LT_TAGDECL([], [hardcode_action], [0],
  1970. [How to hardcode a shared library path into an executable])
  1971. ])# _LT_LINKER_HARDCODE_LIBPATH
  1972. # _LT_CMD_STRIPLIB
  1973. # ----------------
  1974. m4_defun([_LT_CMD_STRIPLIB],
  1975. [m4_require([_LT_DECL_EGREP])
  1976. striplib=
  1977. old_striplib=
  1978. AC_MSG_CHECKING([whether stripping libraries is possible])
  1979. if test -z "$STRIP"; then
  1980. AC_MSG_RESULT([no])
  1981. else
  1982. if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
  1983. old_striplib="$STRIP --strip-debug"
  1984. striplib="$STRIP --strip-unneeded"
  1985. AC_MSG_RESULT([yes])
  1986. else
  1987. case $host_os in
  1988. darwin*)
  1989. # FIXME - insert some real tests, host_os isn't really good enough
  1990. striplib="$STRIP -x"
  1991. old_striplib="$STRIP -S"
  1992. AC_MSG_RESULT([yes])
  1993. ;;
  1994. freebsd*)
  1995. if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
  1996. old_striplib="$STRIP --strip-debug"
  1997. striplib="$STRIP --strip-unneeded"
  1998. AC_MSG_RESULT([yes])
  1999. else
  2000. AC_MSG_RESULT([no])
  2001. fi
  2002. ;;
  2003. *)
  2004. AC_MSG_RESULT([no])
  2005. ;;
  2006. esac
  2007. fi
  2008. fi
  2009. _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
  2010. _LT_DECL([], [striplib], [1])
  2011. ])# _LT_CMD_STRIPLIB
  2012. # _LT_PREPARE_MUNGE_PATH_LIST
  2013. # ---------------------------
  2014. # Make sure func_munge_path_list() is defined correctly.
  2015. m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
  2016. [[# func_munge_path_list VARIABLE PATH
  2017. # -----------------------------------
  2018. # VARIABLE is name of variable containing _space_ separated list of
  2019. # directories to be munged by the contents of PATH, which is string
  2020. # having a format:
  2021. # "DIR[:DIR]:"
  2022. # string "DIR[ DIR]" will be prepended to VARIABLE
  2023. # ":DIR[:DIR]"
  2024. # string "DIR[ DIR]" will be appended to VARIABLE
  2025. # "DIRP[:DIRP]::[DIRA:]DIRA"
  2026. # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
  2027. # "DIRA[ DIRA]" will be appended to VARIABLE
  2028. # "DIR[:DIR]"
  2029. # VARIABLE will be replaced by "DIR[ DIR]"
  2030. func_munge_path_list ()
  2031. {
  2032. case x@S|@2 in
  2033. x)
  2034. ;;
  2035. *:)
  2036. eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
  2037. ;;
  2038. x:*)
  2039. eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
  2040. ;;
  2041. *::*)
  2042. eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
  2043. eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
  2044. ;;
  2045. *)
  2046. eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
  2047. ;;
  2048. esac
  2049. }
  2050. ]])# _LT_PREPARE_PATH_LIST
  2051. # _LT_SYS_DYNAMIC_LINKER([TAG])
  2052. # -----------------------------
  2053. # PORTME Fill in your ld.so characteristics
  2054. m4_defun([_LT_SYS_DYNAMIC_LINKER],
  2055. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2056. m4_require([_LT_DECL_EGREP])dnl
  2057. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  2058. m4_require([_LT_DECL_OBJDUMP])dnl
  2059. m4_require([_LT_DECL_SED])dnl
  2060. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  2061. m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
  2062. AC_MSG_CHECKING([dynamic linker characteristics])
  2063. m4_if([$1],
  2064. [], [
  2065. if test yes = "$GCC"; then
  2066. case $host_os in
  2067. darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
  2068. *) lt_awk_arg='/^libraries:/' ;;
  2069. esac
  2070. case $host_os in
  2071. mingw* | windows* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
  2072. *) lt_sed_strip_eq='s|=/|/|g' ;;
  2073. esac
  2074. lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
  2075. case $lt_search_path_spec in
  2076. *\;*)
  2077. # if the path contains ";" then we assume it to be the separator
  2078. # otherwise default to the standard path separator (i.e. ":") - it is
  2079. # assumed that no part of a normal pathname contains ";" but that should
  2080. # okay in the real world where ";" in dirpaths is itself problematic.
  2081. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
  2082. ;;
  2083. *)
  2084. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
  2085. ;;
  2086. esac
  2087. # Ok, now we have the path, separated by spaces, we can step through it
  2088. # and add multilib dir if necessary...
  2089. lt_tmp_lt_search_path_spec=
  2090. lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
  2091. # ...but if some path component already ends with the multilib dir we assume
  2092. # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
  2093. case "$lt_multi_os_dir; $lt_search_path_spec " in
  2094. "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
  2095. lt_multi_os_dir=
  2096. ;;
  2097. esac
  2098. for lt_sys_path in $lt_search_path_spec; do
  2099. if test -d "$lt_sys_path$lt_multi_os_dir"; then
  2100. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
  2101. elif test -n "$lt_multi_os_dir"; then
  2102. test -d "$lt_sys_path" && \
  2103. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
  2104. fi
  2105. done
  2106. lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
  2107. BEGIN {RS = " "; FS = "/|\n";} {
  2108. lt_foo = "";
  2109. lt_count = 0;
  2110. for (lt_i = NF; lt_i > 0; lt_i--) {
  2111. if ($lt_i != "" && $lt_i != ".") {
  2112. if ($lt_i == "..") {
  2113. lt_count++;
  2114. } else {
  2115. if (lt_count == 0) {
  2116. lt_foo = "/" $lt_i lt_foo;
  2117. } else {
  2118. lt_count--;
  2119. }
  2120. }
  2121. }
  2122. }
  2123. if (lt_foo != "") { lt_freq[[lt_foo]]++; }
  2124. if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
  2125. }'`
  2126. # AWK program above erroneously prepends '/' to C:/dos/paths
  2127. # for these hosts.
  2128. case $host_os in
  2129. mingw* | windows* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
  2130. $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
  2131. esac
  2132. sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
  2133. else
  2134. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  2135. fi])
  2136. library_names_spec=
  2137. libname_spec='lib$name'
  2138. soname_spec=
  2139. shrext_cmds=.so
  2140. postinstall_cmds=
  2141. postuninstall_cmds=
  2142. finish_cmds=
  2143. finish_eval=
  2144. shlibpath_var=
  2145. shlibpath_overrides_runpath=unknown
  2146. version_type=none
  2147. dynamic_linker="$host_os ld.so"
  2148. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  2149. need_lib_prefix=unknown
  2150. hardcode_into_libs=no
  2151. # when you set need_version to no, make sure it does not cause -set_version
  2152. # flags to be left without arguments
  2153. need_version=unknown
  2154. AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
  2155. [User-defined run-time library search path.])
  2156. case $host_os in
  2157. aix3*)
  2158. version_type=linux # correct to gnu/linux during the next big refactor
  2159. library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
  2160. shlibpath_var=LIBPATH
  2161. # AIX 3 has no versioning support, so we append a major version to the name.
  2162. soname_spec='$libname$release$shared_ext$major'
  2163. ;;
  2164. aix[[4-9]]*)
  2165. version_type=linux # correct to gnu/linux during the next big refactor
  2166. need_lib_prefix=no
  2167. need_version=no
  2168. hardcode_into_libs=yes
  2169. if test ia64 = "$host_cpu"; then
  2170. # AIX 5 supports IA64
  2171. library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
  2172. shlibpath_var=LD_LIBRARY_PATH
  2173. else
  2174. # With GCC up to 2.95.x, collect2 would create an import file
  2175. # for dependence libraries. The import file would start with
  2176. # the line '#! .'. This would cause the generated library to
  2177. # depend on '.', always an invalid library. This was fixed in
  2178. # development snapshots of GCC prior to 3.0.
  2179. case $host_os in
  2180. aix4 | aix4.[[01]] | aix4.[[01]].*)
  2181. if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
  2182. echo ' yes '
  2183. echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
  2184. :
  2185. else
  2186. can_build_shared=no
  2187. fi
  2188. ;;
  2189. esac
  2190. # Using Import Files as archive members, it is possible to support
  2191. # filename-based versioning of shared library archives on AIX. While
  2192. # this would work for both with and without runtime linking, it will
  2193. # prevent static linking of such archives. So we do filename-based
  2194. # shared library versioning with .so extension only, which is used
  2195. # when both runtime linking and shared linking is enabled.
  2196. # Unfortunately, runtime linking may impact performance, so we do
  2197. # not want this to be the default eventually. Also, we use the
  2198. # versioned .so libs for executables only if there is the -brtl
  2199. # linker flag in LDFLAGS as well, or --enable-aix-soname=svr4 only.
  2200. # To allow for filename-based versioning support, we need to create
  2201. # libNAME.so.V as an archive file, containing:
  2202. # *) an Import File, referring to the versioned filename of the
  2203. # archive as well as the shared archive member, telling the
  2204. # bitwidth (32 or 64) of that shared object, and providing the
  2205. # list of exported symbols of that shared object, eventually
  2206. # decorated with the 'weak' keyword
  2207. # *) the shared object with the F_LOADONLY flag set, to really avoid
  2208. # it being seen by the linker.
  2209. # At run time we better use the real file rather than another symlink,
  2210. # but for link time we create the symlink libNAME.so -> libNAME.so.V
  2211. case $with_aix_soname,$aix_use_runtimelinking in
  2212. # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
  2213. # soname into executable. Probably we can add versioning support to
  2214. # collect2, so additional links can be useful in future.
  2215. aix,yes) # traditional libtool
  2216. dynamic_linker='AIX unversionable lib.so'
  2217. # If using run time linking (on AIX 4.2 or later) use lib<name>.so
  2218. # instead of lib<name>.a to let people know that these are not
  2219. # typical AIX shared libraries.
  2220. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2221. ;;
  2222. aix,no) # traditional AIX only
  2223. dynamic_linker='AIX lib.a[(]lib.so.V[)]'
  2224. # We preserve .a as extension for shared libraries through AIX4.2
  2225. # and later when we are not doing run time linking.
  2226. library_names_spec='$libname$release.a $libname.a'
  2227. soname_spec='$libname$release$shared_ext$major'
  2228. ;;
  2229. svr4,*) # full svr4 only
  2230. dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
  2231. library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
  2232. # We do not specify a path in Import Files, so LIBPATH fires.
  2233. shlibpath_overrides_runpath=yes
  2234. ;;
  2235. *,yes) # both, prefer svr4
  2236. dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
  2237. library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
  2238. # unpreferred sharedlib libNAME.a needs extra handling
  2239. 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"'
  2240. 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"'
  2241. # We do not specify a path in Import Files, so LIBPATH fires.
  2242. shlibpath_overrides_runpath=yes
  2243. ;;
  2244. *,no) # both, prefer aix
  2245. dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
  2246. library_names_spec='$libname$release.a $libname.a'
  2247. soname_spec='$libname$release$shared_ext$major'
  2248. # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
  2249. 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)'
  2250. 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"'
  2251. ;;
  2252. esac
  2253. shlibpath_var=LIBPATH
  2254. fi
  2255. ;;
  2256. amigaos*)
  2257. case $host_cpu in
  2258. powerpc)
  2259. # Since July 2007 AmigaOS4 officially supports .so libraries.
  2260. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
  2261. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2262. ;;
  2263. m68k)
  2264. library_names_spec='$libname.ixlibrary $libname.a'
  2265. # Create ${libname}_ixlibrary.a entries in /sys/libs.
  2266. 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'
  2267. ;;
  2268. esac
  2269. ;;
  2270. beos*)
  2271. library_names_spec='$libname$shared_ext'
  2272. dynamic_linker="$host_os ld.so"
  2273. shlibpath_var=LIBRARY_PATH
  2274. ;;
  2275. bsdi[[45]]*)
  2276. version_type=linux # correct to gnu/linux during the next big refactor
  2277. need_version=no
  2278. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2279. soname_spec='$libname$release$shared_ext$major'
  2280. finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  2281. shlibpath_var=LD_LIBRARY_PATH
  2282. sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  2283. sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  2284. # the default ld.so.conf also contains /usr/contrib/lib and
  2285. # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  2286. # libtool to hard-code these into programs
  2287. ;;
  2288. cygwin* | mingw* | windows* | pw32* | cegcc*)
  2289. version_type=windows
  2290. shrext_cmds=.dll
  2291. need_version=no
  2292. need_lib_prefix=no
  2293. case $GCC,$cc_basename in
  2294. yes,*)
  2295. # gcc
  2296. library_names_spec='$libname.dll.a'
  2297. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  2298. # If user builds GCC with multilib enabled,
  2299. # it should just install on $(libdir)
  2300. # not on $(libdir)/../bin or 32 bits dlls would override 64 bit ones.
  2301. if test xyes = x"$multilib"; then
  2302. postinstall_cmds='base_file=`basename \$file`~
  2303. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
  2304. dldir=$destdir/`dirname \$dlpath`~
  2305. $install_prog $dir/$dlname $destdir/$dlname~
  2306. chmod a+x $destdir/$dlname~
  2307. if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
  2308. eval '\''$striplib $destdir/$dlname'\'' || exit \$?;
  2309. fi'
  2310. else
  2311. postinstall_cmds='base_file=`basename \$file`~
  2312. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
  2313. dldir=$destdir/`dirname \$dlpath`~
  2314. test -d \$dldir || mkdir -p \$dldir~
  2315. $install_prog $dir/$dlname \$dldir/$dlname~
  2316. chmod a+x \$dldir/$dlname~
  2317. if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
  2318. eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
  2319. fi'
  2320. fi
  2321. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  2322. dlpath=$dir/\$dldll~
  2323. $RM \$dlpath'
  2324. shlibpath_overrides_runpath=yes
  2325. case $host_os in
  2326. cygwin*)
  2327. # Cygwin DLLs use 'cyg' prefix rather than 'lib'
  2328. soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
  2329. m4_if([$1], [],[
  2330. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
  2331. ;;
  2332. mingw* | windows* | cegcc*)
  2333. # MinGW DLLs use traditional 'lib' prefix
  2334. soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
  2335. ;;
  2336. pw32*)
  2337. # pw32 DLLs use 'pw' prefix rather than 'lib'
  2338. library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
  2339. ;;
  2340. esac
  2341. dynamic_linker='Win32 ld.exe'
  2342. ;;
  2343. *,cl* | *,icl*)
  2344. # Native MSVC or ICC
  2345. libname_spec='$name'
  2346. soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
  2347. library_names_spec='$libname.dll.lib'
  2348. case $build_os in
  2349. mingw* | windows*)
  2350. sys_lib_search_path_spec=
  2351. lt_save_ifs=$IFS
  2352. IFS=';'
  2353. for lt_path in $LIB
  2354. do
  2355. IFS=$lt_save_ifs
  2356. # Let DOS variable expansion print the short 8.3 style file name.
  2357. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
  2358. sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
  2359. done
  2360. IFS=$lt_save_ifs
  2361. # Convert to MSYS style.
  2362. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
  2363. ;;
  2364. cygwin*)
  2365. # Convert to unix form, then to dos form, then back to unix form
  2366. # but this time dos style (no spaces!) so that the unix form looks
  2367. # like /cygdrive/c/PROGRA~1:/cygdr...
  2368. sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
  2369. sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
  2370. sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  2371. ;;
  2372. *)
  2373. sys_lib_search_path_spec=$LIB
  2374. if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
  2375. # It is most probably a Windows format PATH.
  2376. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  2377. else
  2378. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  2379. fi
  2380. # FIXME: find the short name or the path components, as spaces are
  2381. # common. (e.g. "Program Files" -> "PROGRA~1")
  2382. ;;
  2383. esac
  2384. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  2385. postinstall_cmds='base_file=`basename \$file`~
  2386. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
  2387. dldir=$destdir/`dirname \$dlpath`~
  2388. test -d \$dldir || mkdir -p \$dldir~
  2389. $install_prog $dir/$dlname \$dldir/$dlname'
  2390. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  2391. dlpath=$dir/\$dldll~
  2392. $RM \$dlpath'
  2393. shlibpath_overrides_runpath=yes
  2394. dynamic_linker='Win32 link.exe'
  2395. ;;
  2396. *)
  2397. # Assume MSVC and ICC wrapper
  2398. library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
  2399. dynamic_linker='Win32 ld.exe'
  2400. ;;
  2401. esac
  2402. # FIXME: first we should search . and the directory the executable is in
  2403. shlibpath_var=PATH
  2404. ;;
  2405. darwin* | rhapsody*)
  2406. dynamic_linker="$host_os dyld"
  2407. version_type=darwin
  2408. need_lib_prefix=no
  2409. need_version=no
  2410. library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
  2411. soname_spec='$libname$release$major$shared_ext'
  2412. shlibpath_overrides_runpath=yes
  2413. shlibpath_var=DYLD_LIBRARY_PATH
  2414. shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
  2415. m4_if([$1], [],[
  2416. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
  2417. sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
  2418. ;;
  2419. dgux*)
  2420. version_type=linux # correct to gnu/linux during the next big refactor
  2421. need_lib_prefix=no
  2422. need_version=no
  2423. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2424. soname_spec='$libname$release$shared_ext$major'
  2425. shlibpath_var=LD_LIBRARY_PATH
  2426. ;;
  2427. freebsd* | dragonfly* | midnightbsd*)
  2428. # DragonFly does not have aout. When/if they implement a new
  2429. # versioning mechanism, adjust this.
  2430. if test -x /usr/bin/objformat; then
  2431. objformat=`/usr/bin/objformat`
  2432. else
  2433. case $host_os in
  2434. freebsd[[23]].*) objformat=aout ;;
  2435. *) objformat=elf ;;
  2436. esac
  2437. fi
  2438. version_type=freebsd-$objformat
  2439. case $version_type in
  2440. freebsd-elf*)
  2441. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2442. soname_spec='$libname$release$shared_ext$major'
  2443. need_version=no
  2444. need_lib_prefix=no
  2445. ;;
  2446. freebsd-*)
  2447. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  2448. need_version=yes
  2449. ;;
  2450. esac
  2451. case $host_cpu in
  2452. powerpc64)
  2453. # On FreeBSD bi-arch platforms, a different variable is used for 32-bit
  2454. # binaries. See <https://man.freebsd.org/cgi/man.cgi?query=ld.so>.
  2455. AC_COMPILE_IFELSE(
  2456. [AC_LANG_SOURCE(
  2457. [[int test_pointer_size[sizeof (void *) - 5];
  2458. ]])],
  2459. [shlibpath_var=LD_LIBRARY_PATH],
  2460. [shlibpath_var=LD_32_LIBRARY_PATH])
  2461. ;;
  2462. *)
  2463. shlibpath_var=LD_LIBRARY_PATH
  2464. ;;
  2465. esac
  2466. case $host_os in
  2467. freebsd2.*)
  2468. shlibpath_overrides_runpath=yes
  2469. ;;
  2470. freebsd3.[[01]]* | freebsdelf3.[[01]]*)
  2471. shlibpath_overrides_runpath=yes
  2472. hardcode_into_libs=yes
  2473. ;;
  2474. freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
  2475. freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
  2476. shlibpath_overrides_runpath=no
  2477. hardcode_into_libs=yes
  2478. ;;
  2479. *) # from 4.6 on, and DragonFly
  2480. shlibpath_overrides_runpath=yes
  2481. hardcode_into_libs=yes
  2482. ;;
  2483. esac
  2484. ;;
  2485. haiku*)
  2486. version_type=linux # correct to gnu/linux during the next big refactor
  2487. need_lib_prefix=no
  2488. need_version=no
  2489. dynamic_linker="$host_os runtime_loader"
  2490. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2491. soname_spec='$libname$release$shared_ext$major'
  2492. shlibpath_var=LIBRARY_PATH
  2493. shlibpath_overrides_runpath=no
  2494. sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib'
  2495. sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib'
  2496. hardcode_into_libs=no
  2497. ;;
  2498. hpux9* | hpux10* | hpux11*)
  2499. # Give a soname corresponding to the major version so that dld.sl refuses to
  2500. # link against other versions.
  2501. version_type=sunos
  2502. need_lib_prefix=no
  2503. need_version=no
  2504. case $host_cpu in
  2505. ia64*)
  2506. shrext_cmds='.so'
  2507. hardcode_into_libs=yes
  2508. dynamic_linker="$host_os dld.so"
  2509. shlibpath_var=LD_LIBRARY_PATH
  2510. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  2511. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2512. soname_spec='$libname$release$shared_ext$major'
  2513. if test 32 = "$HPUX_IA64_MODE"; then
  2514. sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
  2515. sys_lib_dlsearch_path_spec=/usr/lib/hpux32
  2516. else
  2517. sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
  2518. sys_lib_dlsearch_path_spec=/usr/lib/hpux64
  2519. fi
  2520. ;;
  2521. hppa*64*)
  2522. shrext_cmds='.sl'
  2523. hardcode_into_libs=yes
  2524. dynamic_linker="$host_os dld.sl"
  2525. shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
  2526. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  2527. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2528. soname_spec='$libname$release$shared_ext$major'
  2529. sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
  2530. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2531. ;;
  2532. *)
  2533. shrext_cmds='.sl'
  2534. dynamic_linker="$host_os dld.sl"
  2535. shlibpath_var=SHLIB_PATH
  2536. shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  2537. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2538. soname_spec='$libname$release$shared_ext$major'
  2539. ;;
  2540. esac
  2541. # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
  2542. postinstall_cmds='chmod 555 $lib'
  2543. # or fails outright, so override atomically:
  2544. install_override_mode=555
  2545. ;;
  2546. interix[[3-9]]*)
  2547. version_type=linux # correct to gnu/linux during the next big refactor
  2548. need_lib_prefix=no
  2549. need_version=no
  2550. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2551. soname_spec='$libname$release$shared_ext$major'
  2552. dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
  2553. shlibpath_var=LD_LIBRARY_PATH
  2554. shlibpath_overrides_runpath=no
  2555. hardcode_into_libs=yes
  2556. ;;
  2557. irix5* | irix6* | nonstopux*)
  2558. case $host_os in
  2559. nonstopux*) version_type=nonstopux ;;
  2560. *)
  2561. if test yes = "$lt_cv_prog_gnu_ld"; then
  2562. version_type=linux # correct to gnu/linux during the next big refactor
  2563. else
  2564. version_type=irix
  2565. fi ;;
  2566. esac
  2567. need_lib_prefix=no
  2568. need_version=no
  2569. soname_spec='$libname$release$shared_ext$major'
  2570. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
  2571. case $host_os in
  2572. irix5* | nonstopux*)
  2573. libsuff= shlibsuff=
  2574. ;;
  2575. *)
  2576. case $LD in # libtool.m4 will add one of these switches to LD
  2577. *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
  2578. libsuff= shlibsuff= libmagic=32-bit;;
  2579. *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
  2580. libsuff=32 shlibsuff=N32 libmagic=N32;;
  2581. *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
  2582. libsuff=64 shlibsuff=64 libmagic=64-bit;;
  2583. *) libsuff= shlibsuff= libmagic=never-match;;
  2584. esac
  2585. ;;
  2586. esac
  2587. shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  2588. shlibpath_overrides_runpath=no
  2589. sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
  2590. sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
  2591. hardcode_into_libs=yes
  2592. ;;
  2593. # No shared lib support for Linux oldld, aout, or coff.
  2594. linux*oldld* | linux*aout* | linux*coff*)
  2595. dynamic_linker=no
  2596. ;;
  2597. linux*android*)
  2598. version_type=none # Android doesn't support versioned libraries.
  2599. need_lib_prefix=no
  2600. need_version=no
  2601. library_names_spec='$libname$release$shared_ext $libname$shared_ext'
  2602. soname_spec='$libname$release$shared_ext'
  2603. finish_cmds=
  2604. shlibpath_var=LD_LIBRARY_PATH
  2605. shlibpath_overrides_runpath=yes
  2606. # This implies no fast_install, which is unacceptable.
  2607. # Some rework will be needed to allow for fast_install
  2608. # before this can be enabled.
  2609. hardcode_into_libs=yes
  2610. dynamic_linker='Android linker'
  2611. # -rpath works at least for libraries that are not overridden by
  2612. # libraries installed in system locations.
  2613. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  2614. ;;
  2615. # This must be glibc/ELF.
  2616. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  2617. version_type=linux # correct to gnu/linux during the next big refactor
  2618. need_lib_prefix=no
  2619. need_version=no
  2620. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2621. soname_spec='$libname$release$shared_ext$major'
  2622. finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  2623. shlibpath_var=LD_LIBRARY_PATH
  2624. shlibpath_overrides_runpath=no
  2625. # Some binutils ld are patched to set DT_RUNPATH
  2626. AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
  2627. [lt_cv_shlibpath_overrides_runpath=no
  2628. save_LDFLAGS=$LDFLAGS
  2629. save_libdir=$libdir
  2630. eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
  2631. LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
  2632. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  2633. [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
  2634. [lt_cv_shlibpath_overrides_runpath=yes])])
  2635. LDFLAGS=$save_LDFLAGS
  2636. libdir=$save_libdir
  2637. ])
  2638. shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
  2639. # This implies no fast_install, which is unacceptable.
  2640. # Some rework will be needed to allow for fast_install
  2641. # before this can be enabled.
  2642. hardcode_into_libs=yes
  2643. # Add ABI-specific directories to the system library path.
  2644. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
  2645. # Ideally, we could use ldconfig to report *all* directories which are
  2646. # searched for libraries, however this is still not possible. Aside from not
  2647. # being certain /sbin/ldconfig is available, command
  2648. # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
  2649. # even though it is searched at run-time. Try to do the best guess by
  2650. # appending ld.so.conf contents (and includes) to the search path.
  2651. if test -f /etc/ld.so.conf; then
  2652. 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' ' '`
  2653. sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
  2654. fi
  2655. # We used to test for /lib/ld.so.1 and disable shared libraries on
  2656. # powerpc, because MkLinux only supported shared libraries with the
  2657. # GNU dynamic linker. Since this was broken with cross compilers,
  2658. # most powerpc-linux boxes support dynamic linking these days and
  2659. # people can always --disable-shared, the test was removed, and we
  2660. # assume the GNU/Linux dynamic linker is in use.
  2661. dynamic_linker='GNU/Linux ld.so'
  2662. ;;
  2663. netbsdelf*-gnu)
  2664. version_type=linux
  2665. need_lib_prefix=no
  2666. need_version=no
  2667. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2668. soname_spec='$libname$release$shared_ext$major'
  2669. shlibpath_var=LD_LIBRARY_PATH
  2670. shlibpath_overrides_runpath=no
  2671. hardcode_into_libs=yes
  2672. dynamic_linker='NetBSD ld.elf_so'
  2673. ;;
  2674. netbsd*)
  2675. version_type=sunos
  2676. need_lib_prefix=no
  2677. need_version=no
  2678. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  2679. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  2680. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2681. dynamic_linker='NetBSD (a.out) ld.so'
  2682. else
  2683. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2684. soname_spec='$libname$release$shared_ext$major'
  2685. dynamic_linker='NetBSD ld.elf_so'
  2686. fi
  2687. shlibpath_var=LD_LIBRARY_PATH
  2688. shlibpath_overrides_runpath=yes
  2689. hardcode_into_libs=yes
  2690. ;;
  2691. *-mlibc)
  2692. version_type=linux # correct to gnu/linux during the next big refactor
  2693. need_lib_prefix=no
  2694. need_version=no
  2695. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2696. soname_spec='$libname$release$shared_ext$major'
  2697. dynamic_linker='mlibc ld.so'
  2698. shlibpath_var=LD_LIBRARY_PATH
  2699. shlibpath_overrides_runpath=no
  2700. hardcode_into_libs=yes
  2701. ;;
  2702. newsos6)
  2703. version_type=linux # correct to gnu/linux during the next big refactor
  2704. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2705. shlibpath_var=LD_LIBRARY_PATH
  2706. shlibpath_overrides_runpath=yes
  2707. ;;
  2708. *nto* | *qnx*)
  2709. version_type=qnx
  2710. need_lib_prefix=no
  2711. need_version=no
  2712. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2713. soname_spec='$libname$release$shared_ext$major'
  2714. shlibpath_var=LD_LIBRARY_PATH
  2715. shlibpath_overrides_runpath=no
  2716. hardcode_into_libs=yes
  2717. dynamic_linker='ldqnx.so'
  2718. ;;
  2719. openbsd*)
  2720. version_type=sunos
  2721. sys_lib_dlsearch_path_spec=/usr/lib
  2722. need_lib_prefix=no
  2723. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
  2724. need_version=no
  2725. else
  2726. need_version=yes
  2727. fi
  2728. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  2729. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2730. shlibpath_var=LD_LIBRARY_PATH
  2731. shlibpath_overrides_runpath=yes
  2732. ;;
  2733. os2*)
  2734. libname_spec='$name'
  2735. version_type=windows
  2736. shrext_cmds=.dll
  2737. need_version=no
  2738. need_lib_prefix=no
  2739. # OS/2 can only load a DLL with a base name of 8 characters or less.
  2740. soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
  2741. v=$($ECHO $release$versuffix | tr -d .-);
  2742. n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
  2743. $ECHO $n$v`$shared_ext'
  2744. library_names_spec='${libname}_dll.$libext'
  2745. dynamic_linker='OS/2 ld.exe'
  2746. shlibpath_var=BEGINLIBPATH
  2747. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  2748. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2749. postinstall_cmds='base_file=`basename \$file`~
  2750. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
  2751. dldir=$destdir/`dirname \$dlpath`~
  2752. test -d \$dldir || mkdir -p \$dldir~
  2753. $install_prog $dir/$dlname \$dldir/$dlname~
  2754. chmod a+x \$dldir/$dlname~
  2755. if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
  2756. eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
  2757. fi'
  2758. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
  2759. dlpath=$dir/\$dldll~
  2760. $RM \$dlpath'
  2761. ;;
  2762. osf3* | osf4* | osf5*)
  2763. version_type=osf
  2764. need_lib_prefix=no
  2765. need_version=no
  2766. soname_spec='$libname$release$shared_ext$major'
  2767. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2768. shlibpath_var=LD_LIBRARY_PATH
  2769. sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  2770. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2771. ;;
  2772. rdos*)
  2773. dynamic_linker=no
  2774. ;;
  2775. serenity*)
  2776. version_type=linux # correct to gnu/linux during the next big refactor
  2777. need_lib_prefix=no
  2778. need_version=no
  2779. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2780. soname_spec='$libname$release$shared_ext$major'
  2781. shlibpath_var=LD_LIBRARY_PATH
  2782. shlibpath_overrides_runpath=no
  2783. dynamic_linker='SerenityOS LibELF'
  2784. ;;
  2785. solaris*)
  2786. version_type=linux # correct to gnu/linux during the next big refactor
  2787. need_lib_prefix=no
  2788. need_version=no
  2789. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2790. soname_spec='$libname$release$shared_ext$major'
  2791. shlibpath_var=LD_LIBRARY_PATH
  2792. shlibpath_overrides_runpath=yes
  2793. hardcode_into_libs=yes
  2794. # ldd complains unless libraries are executable
  2795. postinstall_cmds='chmod +x $lib'
  2796. ;;
  2797. sunos4*)
  2798. version_type=sunos
  2799. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  2800. finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  2801. shlibpath_var=LD_LIBRARY_PATH
  2802. shlibpath_overrides_runpath=yes
  2803. if test yes = "$with_gnu_ld"; then
  2804. need_lib_prefix=no
  2805. fi
  2806. need_version=yes
  2807. ;;
  2808. sysv4 | sysv4.3*)
  2809. version_type=linux # correct to gnu/linux during the next big refactor
  2810. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2811. soname_spec='$libname$release$shared_ext$major'
  2812. shlibpath_var=LD_LIBRARY_PATH
  2813. case $host_vendor in
  2814. sni)
  2815. shlibpath_overrides_runpath=no
  2816. need_lib_prefix=no
  2817. runpath_var=LD_RUN_PATH
  2818. ;;
  2819. siemens)
  2820. need_lib_prefix=no
  2821. ;;
  2822. motorola)
  2823. need_lib_prefix=no
  2824. need_version=no
  2825. shlibpath_overrides_runpath=no
  2826. sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  2827. ;;
  2828. esac
  2829. ;;
  2830. sysv4*MP*)
  2831. if test -d /usr/nec; then
  2832. version_type=linux # correct to gnu/linux during the next big refactor
  2833. library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
  2834. soname_spec='$libname$shared_ext.$major'
  2835. shlibpath_var=LD_LIBRARY_PATH
  2836. fi
  2837. ;;
  2838. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  2839. version_type=sco
  2840. need_lib_prefix=no
  2841. need_version=no
  2842. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
  2843. soname_spec='$libname$release$shared_ext$major'
  2844. shlibpath_var=LD_LIBRARY_PATH
  2845. shlibpath_overrides_runpath=yes
  2846. hardcode_into_libs=yes
  2847. if test yes = "$with_gnu_ld"; then
  2848. sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
  2849. else
  2850. sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
  2851. case $host_os in
  2852. sco3.2v5*)
  2853. sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
  2854. ;;
  2855. esac
  2856. fi
  2857. sys_lib_dlsearch_path_spec='/usr/lib'
  2858. ;;
  2859. tpf*)
  2860. # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
  2861. version_type=linux # correct to gnu/linux during the next big refactor
  2862. need_lib_prefix=no
  2863. need_version=no
  2864. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2865. shlibpath_var=LD_LIBRARY_PATH
  2866. shlibpath_overrides_runpath=no
  2867. hardcode_into_libs=yes
  2868. ;;
  2869. uts4*)
  2870. version_type=linux # correct to gnu/linux during the next big refactor
  2871. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2872. soname_spec='$libname$release$shared_ext$major'
  2873. shlibpath_var=LD_LIBRARY_PATH
  2874. ;;
  2875. emscripten*)
  2876. version_type=none
  2877. need_lib_prefix=no
  2878. need_version=no
  2879. library_names_spec='$libname$release$shared_ext'
  2880. soname_spec='$libname$release$shared_ext'
  2881. finish_cmds=
  2882. dynamic_linker="Emscripten linker"
  2883. _LT_COMPILER_PIC($1)='-fPIC'
  2884. _LT_TAGVAR(archive_cmds, $1)='$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib'
  2885. _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib -s EXPORTED_FUNCTIONS=@$output_objdir/$soname.expsym'
  2886. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  2887. _LT_TAGVAR(no_undefined_flag, $1)=
  2888. ;;
  2889. *)
  2890. dynamic_linker=no
  2891. ;;
  2892. esac
  2893. AC_MSG_RESULT([$dynamic_linker])
  2894. test no = "$dynamic_linker" && can_build_shared=no
  2895. variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  2896. if test yes = "$GCC"; then
  2897. variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  2898. fi
  2899. if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
  2900. sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
  2901. fi
  2902. if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
  2903. sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
  2904. fi
  2905. # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
  2906. configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
  2907. # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
  2908. func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
  2909. # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
  2910. configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
  2911. _LT_DECL([], [variables_saved_for_relink], [1],
  2912. [Variables whose values should be saved in libtool wrapper scripts and
  2913. restored at link time])
  2914. _LT_DECL([], [need_lib_prefix], [0],
  2915. [Do we need the "lib" prefix for modules?])
  2916. _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
  2917. _LT_DECL([], [version_type], [0], [Library versioning type])
  2918. _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
  2919. _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
  2920. _LT_DECL([], [shlibpath_overrides_runpath], [0],
  2921. [Is shlibpath searched before the hard-coded library search path?])
  2922. _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
  2923. _LT_DECL([], [library_names_spec], [1],
  2924. [[List of archive names. First name is the real one, the rest are links.
  2925. The last name is the one that the linker finds with -lNAME]])
  2926. _LT_DECL([], [soname_spec], [1],
  2927. [[The coded name of the library, if different from the real name]])
  2928. _LT_DECL([], [install_override_mode], [1],
  2929. [Permission mode override for installation of shared libraries])
  2930. _LT_DECL([], [postinstall_cmds], [2],
  2931. [Command to use after installation of a shared archive])
  2932. _LT_DECL([], [postuninstall_cmds], [2],
  2933. [Command to use after uninstallation of a shared archive])
  2934. _LT_DECL([], [finish_cmds], [2],
  2935. [Commands used to finish a libtool library installation in a directory])
  2936. _LT_DECL([], [finish_eval], [1],
  2937. [[As "finish_cmds", except a single script fragment to be evaled but
  2938. not shown]])
  2939. _LT_DECL([], [hardcode_into_libs], [0],
  2940. [Whether we should hardcode library paths into libraries])
  2941. _LT_DECL([], [sys_lib_search_path_spec], [2],
  2942. [Compile-time system search path for libraries])
  2943. _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
  2944. [Detected run-time system search path for libraries])
  2945. _LT_DECL([], [configure_time_lt_sys_library_path], [2],
  2946. [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
  2947. ])# _LT_SYS_DYNAMIC_LINKER
  2948. # _LT_PATH_TOOL_PREFIX(TOOL)
  2949. # --------------------------
  2950. # find a file program that can recognize shared library
  2951. AC_DEFUN([_LT_PATH_TOOL_PREFIX],
  2952. [m4_require([_LT_DECL_EGREP])dnl
  2953. AC_MSG_CHECKING([for $1])
  2954. AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
  2955. [case $MAGIC_CMD in
  2956. [[\\/*] | ?:[\\/]*])
  2957. lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
  2958. ;;
  2959. *)
  2960. lt_save_MAGIC_CMD=$MAGIC_CMD
  2961. lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
  2962. dnl $ac_dummy forces splitting on constant user-supplied paths.
  2963. dnl POSIX.2 word splitting is done only on the output of word expansions,
  2964. dnl not every word. This closes a longstanding sh security hole.
  2965. ac_dummy="m4_if([$2], , $PATH, [$2])"
  2966. for ac_dir in $ac_dummy; do
  2967. IFS=$lt_save_ifs
  2968. test -z "$ac_dir" && ac_dir=.
  2969. if test -f "$ac_dir/$1"; then
  2970. lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
  2971. if test -n "$file_magic_test_file"; then
  2972. case $deplibs_check_method in
  2973. "file_magic "*)
  2974. file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
  2975. MAGIC_CMD=$lt_cv_path_MAGIC_CMD
  2976. if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  2977. $EGREP "$file_magic_regex" > /dev/null; then
  2978. :
  2979. else
  2980. cat <<_LT_EOF 1>&2
  2981. *** Warning: the command libtool uses to detect shared libraries,
  2982. *** $file_magic_cmd, produces output that libtool cannot recognize.
  2983. *** The result is that libtool may fail to recognize shared libraries
  2984. *** as such. This will affect the creation of libtool libraries that
  2985. *** depend on shared libraries, but programs linked with such libtool
  2986. *** libraries will work regardless of this problem. Nevertheless, you
  2987. *** may want to report the problem to your system manager and/or to
  2988. *** [email protected]
  2989. _LT_EOF
  2990. fi ;;
  2991. esac
  2992. fi
  2993. break
  2994. fi
  2995. done
  2996. IFS=$lt_save_ifs
  2997. MAGIC_CMD=$lt_save_MAGIC_CMD
  2998. ;;
  2999. esac])
  3000. MAGIC_CMD=$lt_cv_path_MAGIC_CMD
  3001. if test -n "$MAGIC_CMD"; then
  3002. AC_MSG_RESULT($MAGIC_CMD)
  3003. else
  3004. AC_MSG_RESULT(no)
  3005. fi
  3006. _LT_DECL([], [MAGIC_CMD], [0],
  3007. [Used to examine libraries when file_magic_cmd begins with "file"])dnl
  3008. ])# _LT_PATH_TOOL_PREFIX
  3009. # Old name:
  3010. AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
  3011. dnl aclocal-1.4 backwards compatibility:
  3012. dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
  3013. # _LT_PATH_MAGIC
  3014. # --------------
  3015. # find a file program that can recognize a shared library
  3016. m4_defun([_LT_PATH_MAGIC],
  3017. [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
  3018. if test -z "$lt_cv_path_MAGIC_CMD"; then
  3019. if test -n "$ac_tool_prefix"; then
  3020. _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
  3021. else
  3022. MAGIC_CMD=:
  3023. fi
  3024. fi
  3025. ])# _LT_PATH_MAGIC
  3026. # LT_PATH_LD
  3027. # ----------
  3028. # find the pathname to the GNU or non-GNU linker
  3029. AC_DEFUN([LT_PATH_LD],
  3030. [AC_REQUIRE([AC_PROG_CC])dnl
  3031. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3032. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  3033. m4_require([_LT_DECL_SED])dnl
  3034. m4_require([_LT_DECL_EGREP])dnl
  3035. m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
  3036. AC_ARG_WITH([gnu-ld],
  3037. [AS_HELP_STRING([--with-gnu-ld],
  3038. [assume the C compiler uses GNU ld @<:@default=no@:>@])],
  3039. [test no = "$withval" || with_gnu_ld=yes],
  3040. [with_gnu_ld=no])dnl
  3041. ac_prog=ld
  3042. if test yes = "$GCC"; then
  3043. # Check if gcc -print-prog-name=ld gives a path.
  3044. AC_MSG_CHECKING([for ld used by $CC])
  3045. case $host in
  3046. *-*-mingw* | *-*-windows*)
  3047. # gcc leaves a trailing carriage return, which upsets mingw
  3048. ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  3049. *)
  3050. ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  3051. esac
  3052. case $ac_prog in
  3053. # Accept absolute paths.
  3054. [[\\/]]* | ?:[[\\/]]*)
  3055. re_direlt='/[[^/]][[^/]]*/\.\./'
  3056. # Canonicalize the pathname of ld
  3057. ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
  3058. while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
  3059. ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
  3060. done
  3061. test -z "$LD" && LD=$ac_prog
  3062. ;;
  3063. "")
  3064. # If it fails, then pretend we aren't using GCC.
  3065. ac_prog=ld
  3066. ;;
  3067. *)
  3068. # If it is relative, then search for the first ld in PATH.
  3069. with_gnu_ld=unknown
  3070. ;;
  3071. esac
  3072. elif test yes = "$with_gnu_ld"; then
  3073. AC_MSG_CHECKING([for GNU ld])
  3074. else
  3075. AC_MSG_CHECKING([for non-GNU ld])
  3076. fi
  3077. AC_CACHE_VAL(lt_cv_path_LD,
  3078. [if test -z "$LD"; then
  3079. lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
  3080. for ac_dir in $PATH; do
  3081. IFS=$lt_save_ifs
  3082. test -z "$ac_dir" && ac_dir=.
  3083. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  3084. lt_cv_path_LD=$ac_dir/$ac_prog
  3085. # Check to see if the program is GNU ld. I'd rather use --version,
  3086. # but apparently some variants of GNU ld only accept -v.
  3087. # Break only if it was the GNU/non-GNU ld that we prefer.
  3088. case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
  3089. *GNU* | *'with BFD'*)
  3090. test no != "$with_gnu_ld" && break
  3091. ;;
  3092. *)
  3093. test yes != "$with_gnu_ld" && break
  3094. ;;
  3095. esac
  3096. fi
  3097. done
  3098. IFS=$lt_save_ifs
  3099. else
  3100. lt_cv_path_LD=$LD # Let the user override the test with a path.
  3101. fi])
  3102. LD=$lt_cv_path_LD
  3103. if test -n "$LD"; then
  3104. AC_MSG_RESULT($LD)
  3105. else
  3106. AC_MSG_RESULT(no)
  3107. fi
  3108. test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  3109. _LT_PATH_LD_GNU
  3110. AC_SUBST([LD])
  3111. _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
  3112. ])# LT_PATH_LD
  3113. # Old names:
  3114. AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
  3115. AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
  3116. dnl aclocal-1.4 backwards compatibility:
  3117. dnl AC_DEFUN([AM_PROG_LD], [])
  3118. dnl AC_DEFUN([AC_PROG_LD], [])
  3119. # _LT_PATH_LD_GNU
  3120. #- --------------
  3121. m4_defun([_LT_PATH_LD_GNU],
  3122. [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
  3123. [# I'd rather use --version here, but apparently some GNU lds only accept -v.
  3124. case `$LD -v 2>&1 </dev/null` in
  3125. *GNU* | *'with BFD'*)
  3126. lt_cv_prog_gnu_ld=yes
  3127. ;;
  3128. *)
  3129. lt_cv_prog_gnu_ld=no
  3130. ;;
  3131. esac])
  3132. with_gnu_ld=$lt_cv_prog_gnu_ld
  3133. ])# _LT_PATH_LD_GNU
  3134. # _LT_CMD_RELOAD
  3135. # --------------
  3136. # find reload flag for linker
  3137. # -- PORTME Some linkers may need a different reload flag.
  3138. m4_defun([_LT_CMD_RELOAD],
  3139. [AC_CACHE_CHECK([for $LD option to reload object files],
  3140. lt_cv_ld_reload_flag,
  3141. [lt_cv_ld_reload_flag='-r'])
  3142. reload_flag=$lt_cv_ld_reload_flag
  3143. case $reload_flag in
  3144. "" | " "*) ;;
  3145. *) reload_flag=" $reload_flag" ;;
  3146. esac
  3147. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  3148. case $host_os in
  3149. cygwin* | mingw* | windows* | pw32* | cegcc*)
  3150. if test yes != "$GCC"; then
  3151. reload_cmds=false
  3152. fi
  3153. ;;
  3154. darwin*)
  3155. if test yes = "$GCC"; then
  3156. reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
  3157. else
  3158. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  3159. fi
  3160. ;;
  3161. esac
  3162. _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
  3163. _LT_TAGDECL([], [reload_cmds], [2])dnl
  3164. ])# _LT_CMD_RELOAD
  3165. # _LT_PATH_DD
  3166. # -----------
  3167. # find a working dd
  3168. m4_defun([_LT_PATH_DD],
  3169. [AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
  3170. [printf 0123456789abcdef0123456789abcdef >conftest.i
  3171. cat conftest.i conftest.i >conftest2.i
  3172. : ${lt_DD:=$DD}
  3173. AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
  3174. [if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
  3175. cmp -s conftest.i conftest.out \
  3176. && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
  3177. fi])
  3178. rm -f conftest.i conftest2.i conftest.out])
  3179. ])# _LT_PATH_DD
  3180. # _LT_CMD_TRUNCATE
  3181. # ----------------
  3182. # find command to truncate a binary pipe
  3183. m4_defun([_LT_CMD_TRUNCATE],
  3184. [m4_require([_LT_PATH_DD])
  3185. AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
  3186. [printf 0123456789abcdef0123456789abcdef >conftest.i
  3187. cat conftest.i conftest.i >conftest2.i
  3188. lt_cv_truncate_bin=
  3189. if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
  3190. cmp -s conftest.i conftest.out \
  3191. && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
  3192. fi
  3193. rm -f conftest.i conftest2.i conftest.out
  3194. test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
  3195. _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
  3196. [Command to truncate a binary pipe])
  3197. ])# _LT_CMD_TRUNCATE
  3198. # _LT_CHECK_MAGIC_METHOD
  3199. # ----------------------
  3200. # how to check for library dependencies
  3201. # -- PORTME fill in with the dynamic library characteristics
  3202. m4_defun([_LT_CHECK_MAGIC_METHOD],
  3203. [m4_require([_LT_DECL_EGREP])
  3204. m4_require([_LT_DECL_OBJDUMP])
  3205. AC_CACHE_CHECK([how to recognize dependent libraries],
  3206. lt_cv_deplibs_check_method,
  3207. [lt_cv_file_magic_cmd='$MAGIC_CMD'
  3208. lt_cv_file_magic_test_file=
  3209. lt_cv_deplibs_check_method='unknown'
  3210. # Need to set the preceding variable on all platforms that support
  3211. # interlibrary dependencies.
  3212. # 'none' -- dependencies not supported.
  3213. # 'unknown' -- same as none, but documents that we really don't know.
  3214. # 'pass_all' -- all dependencies passed with no checks.
  3215. # 'file_magic [[regex]]' -- check by looking for files in library path
  3216. # that responds to the $file_magic_cmd with a given extended regex.
  3217. # If you have 'file' or equivalent on your system and you're not sure
  3218. # whether 'pass_all' will *always* work, you probably want this one.
  3219. case $host_os in
  3220. aix[[4-9]]*)
  3221. lt_cv_deplibs_check_method=pass_all
  3222. ;;
  3223. beos*)
  3224. lt_cv_deplibs_check_method=pass_all
  3225. ;;
  3226. bsdi[[45]]*)
  3227. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
  3228. lt_cv_file_magic_cmd='$FILECMD -L'
  3229. lt_cv_file_magic_test_file=/shlib/libc.so
  3230. ;;
  3231. cygwin*)
  3232. # func_win32_libid is a shell function defined in ltmain.sh
  3233. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  3234. lt_cv_file_magic_cmd='func_win32_libid'
  3235. ;;
  3236. mingw* | windows* | pw32*)
  3237. # Base MSYS/MinGW do not provide the 'file' command needed by
  3238. # func_win32_libid shell function, so use a weaker test based on 'objdump',
  3239. # unless we find 'file', for example because we are cross-compiling.
  3240. if ( file / ) >/dev/null 2>&1; then
  3241. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  3242. lt_cv_file_magic_cmd='func_win32_libid'
  3243. else
  3244. # Keep this pattern in sync with the one in func_win32_libid.
  3245. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64|pe-aarch64)'
  3246. lt_cv_file_magic_cmd='$OBJDUMP -f'
  3247. fi
  3248. ;;
  3249. cegcc*)
  3250. # use the weaker test based on 'objdump'. See mingw*.
  3251. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
  3252. lt_cv_file_magic_cmd='$OBJDUMP -f'
  3253. ;;
  3254. darwin* | rhapsody*)
  3255. lt_cv_deplibs_check_method=pass_all
  3256. ;;
  3257. freebsd* | dragonfly* | midnightbsd*)
  3258. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  3259. case $host_cpu in
  3260. i*86 )
  3261. # Not sure whether the presence of OpenBSD here was a mistake.
  3262. # Let's accept both of them until this is cleared up.
  3263. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
  3264. lt_cv_file_magic_cmd=$FILECMD
  3265. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  3266. ;;
  3267. esac
  3268. else
  3269. lt_cv_deplibs_check_method=pass_all
  3270. fi
  3271. ;;
  3272. haiku*)
  3273. lt_cv_deplibs_check_method=pass_all
  3274. ;;
  3275. hpux10.20* | hpux11*)
  3276. lt_cv_file_magic_cmd=$FILECMD
  3277. case $host_cpu in
  3278. ia64*)
  3279. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
  3280. lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
  3281. ;;
  3282. hppa*64*)
  3283. [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]']
  3284. lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
  3285. ;;
  3286. *)
  3287. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
  3288. lt_cv_file_magic_test_file=/usr/lib/libc.sl
  3289. ;;
  3290. esac
  3291. ;;
  3292. interix[[3-9]]*)
  3293. # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
  3294. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
  3295. ;;
  3296. irix5* | irix6* | nonstopux*)
  3297. case $LD in
  3298. *-32|*"-32 ") libmagic=32-bit;;
  3299. *-n32|*"-n32 ") libmagic=N32;;
  3300. *-64|*"-64 ") libmagic=64-bit;;
  3301. *) libmagic=never-match;;
  3302. esac
  3303. lt_cv_deplibs_check_method=pass_all
  3304. ;;
  3305. # This must be glibc/ELF.
  3306. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  3307. lt_cv_deplibs_check_method=pass_all
  3308. ;;
  3309. *-mlibc)
  3310. lt_cv_deplibs_check_method=pass_all
  3311. ;;
  3312. netbsd* | netbsdelf*-gnu)
  3313. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  3314. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  3315. else
  3316. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
  3317. fi
  3318. ;;
  3319. newos6*)
  3320. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
  3321. lt_cv_file_magic_cmd=$FILECMD
  3322. lt_cv_file_magic_test_file=/usr/lib/libnls.so
  3323. ;;
  3324. *nto* | *qnx*)
  3325. lt_cv_deplibs_check_method=pass_all
  3326. ;;
  3327. openbsd*)
  3328. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
  3329. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
  3330. else
  3331. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  3332. fi
  3333. ;;
  3334. osf3* | osf4* | osf5*)
  3335. lt_cv_deplibs_check_method=pass_all
  3336. ;;
  3337. rdos*)
  3338. lt_cv_deplibs_check_method=pass_all
  3339. ;;
  3340. serenity*)
  3341. lt_cv_deplibs_check_method=pass_all
  3342. ;;
  3343. solaris*)
  3344. lt_cv_deplibs_check_method=pass_all
  3345. ;;
  3346. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  3347. lt_cv_deplibs_check_method=pass_all
  3348. ;;
  3349. sysv4 | sysv4.3*)
  3350. case $host_vendor in
  3351. motorola)
  3352. 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]]'
  3353. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  3354. ;;
  3355. ncr)
  3356. lt_cv_deplibs_check_method=pass_all
  3357. ;;
  3358. sequent)
  3359. lt_cv_file_magic_cmd='/bin/file'
  3360. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
  3361. ;;
  3362. sni)
  3363. lt_cv_file_magic_cmd='/bin/file'
  3364. lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
  3365. lt_cv_file_magic_test_file=/lib/libc.so
  3366. ;;
  3367. siemens)
  3368. lt_cv_deplibs_check_method=pass_all
  3369. ;;
  3370. pc)
  3371. lt_cv_deplibs_check_method=pass_all
  3372. ;;
  3373. esac
  3374. ;;
  3375. tpf*)
  3376. lt_cv_deplibs_check_method=pass_all
  3377. ;;
  3378. os2*)
  3379. lt_cv_deplibs_check_method=pass_all
  3380. ;;
  3381. esac
  3382. ])
  3383. file_magic_glob=
  3384. want_nocaseglob=no
  3385. if test "$build" = "$host"; then
  3386. case $host_os in
  3387. mingw* | windows* | pw32*)
  3388. if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
  3389. want_nocaseglob=yes
  3390. else
  3391. file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
  3392. fi
  3393. ;;
  3394. esac
  3395. fi
  3396. file_magic_cmd=$lt_cv_file_magic_cmd
  3397. deplibs_check_method=$lt_cv_deplibs_check_method
  3398. test -z "$deplibs_check_method" && deplibs_check_method=unknown
  3399. _LT_DECL([], [deplibs_check_method], [1],
  3400. [Method to check whether dependent libraries are shared objects])
  3401. _LT_DECL([], [file_magic_cmd], [1],
  3402. [Command to use when deplibs_check_method = "file_magic"])
  3403. _LT_DECL([], [file_magic_glob], [1],
  3404. [How to find potential files when deplibs_check_method = "file_magic"])
  3405. _LT_DECL([], [want_nocaseglob], [1],
  3406. [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
  3407. ])# _LT_CHECK_MAGIC_METHOD
  3408. # LT_PATH_NM
  3409. # ----------
  3410. # find the pathname to a BSD- or MS-compatible name lister
  3411. AC_DEFUN([LT_PATH_NM],
  3412. [AC_REQUIRE([AC_PROG_CC])dnl
  3413. AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
  3414. [if test -n "$NM"; then
  3415. # Let the user override the test.
  3416. lt_cv_path_NM=$NM
  3417. else
  3418. lt_nm_to_check=${ac_tool_prefix}nm
  3419. if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
  3420. lt_nm_to_check="$lt_nm_to_check nm"
  3421. fi
  3422. for lt_tmp_nm in $lt_nm_to_check; do
  3423. lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
  3424. for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
  3425. IFS=$lt_save_ifs
  3426. test -z "$ac_dir" && ac_dir=.
  3427. tmp_nm=$ac_dir/$lt_tmp_nm
  3428. if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
  3429. # Check to see if the nm accepts a BSD-compat flag.
  3430. # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
  3431. # nm: unknown option "B" ignored
  3432. # Tru64's nm complains that /dev/null is an invalid object file
  3433. # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
  3434. case $build_os in
  3435. mingw* | windows*) lt_bad_file=conftest.nm/nofile ;;
  3436. *) lt_bad_file=/dev/null ;;
  3437. esac
  3438. case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
  3439. *$lt_bad_file* | *'Invalid file or object type'*)
  3440. lt_cv_path_NM="$tmp_nm -B"
  3441. break 2
  3442. ;;
  3443. *)
  3444. case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
  3445. */dev/null*)
  3446. lt_cv_path_NM="$tmp_nm -p"
  3447. break 2
  3448. ;;
  3449. *)
  3450. lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
  3451. continue # so that we can try to find one that supports BSD flags
  3452. ;;
  3453. esac
  3454. ;;
  3455. esac
  3456. fi
  3457. done
  3458. IFS=$lt_save_ifs
  3459. done
  3460. : ${lt_cv_path_NM=no}
  3461. fi])
  3462. if test no != "$lt_cv_path_NM"; then
  3463. NM=$lt_cv_path_NM
  3464. else
  3465. # Didn't find any BSD compatible name lister, look for dumpbin.
  3466. if test -n "$DUMPBIN"; then :
  3467. # Let the user override the test.
  3468. else
  3469. AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
  3470. case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
  3471. *COFF*)
  3472. DUMPBIN="$DUMPBIN -symbols -headers"
  3473. ;;
  3474. *)
  3475. DUMPBIN=:
  3476. ;;
  3477. esac
  3478. fi
  3479. AC_SUBST([DUMPBIN])
  3480. if test : != "$DUMPBIN"; then
  3481. NM=$DUMPBIN
  3482. fi
  3483. fi
  3484. test -z "$NM" && NM=nm
  3485. AC_SUBST([NM])
  3486. _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
  3487. AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
  3488. [lt_cv_nm_interface="BSD nm"
  3489. echo "int some_variable = 0;" > conftest.$ac_ext
  3490. (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
  3491. (eval "$ac_compile" 2>conftest.err)
  3492. cat conftest.err >&AS_MESSAGE_LOG_FD
  3493. (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
  3494. (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
  3495. cat conftest.err >&AS_MESSAGE_LOG_FD
  3496. (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
  3497. cat conftest.out >&AS_MESSAGE_LOG_FD
  3498. if $GREP 'External.*some_variable' conftest.out > /dev/null; then
  3499. lt_cv_nm_interface="MS dumpbin"
  3500. fi
  3501. rm -f conftest*])
  3502. ])# LT_PATH_NM
  3503. # Old names:
  3504. AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
  3505. AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
  3506. dnl aclocal-1.4 backwards compatibility:
  3507. dnl AC_DEFUN([AM_PROG_NM], [])
  3508. dnl AC_DEFUN([AC_PROG_NM], [])
  3509. # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  3510. # --------------------------------
  3511. # how to determine the name of the shared library
  3512. # associated with a specific link library.
  3513. # -- PORTME fill in with the dynamic library characteristics
  3514. m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
  3515. [m4_require([_LT_DECL_EGREP])
  3516. m4_require([_LT_DECL_OBJDUMP])
  3517. m4_require([_LT_DECL_DLLTOOL])
  3518. AC_CACHE_CHECK([how to associate runtime and link libraries],
  3519. lt_cv_sharedlib_from_linklib_cmd,
  3520. [lt_cv_sharedlib_from_linklib_cmd='unknown'
  3521. case $host_os in
  3522. cygwin* | mingw* | windows* | pw32* | cegcc*)
  3523. # two different shell functions defined in ltmain.sh;
  3524. # decide which one to use based on capabilities of $DLLTOOL
  3525. case `$DLLTOOL --help 2>&1` in
  3526. *--identify-strict*)
  3527. lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
  3528. ;;
  3529. *)
  3530. lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
  3531. ;;
  3532. esac
  3533. ;;
  3534. *)
  3535. # fallback: assume linklib IS sharedlib
  3536. lt_cv_sharedlib_from_linklib_cmd=$ECHO
  3537. ;;
  3538. esac
  3539. ])
  3540. sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
  3541. test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
  3542. _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
  3543. [Command to associate shared and link libraries])
  3544. ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  3545. # _LT_PATH_MANIFEST_TOOL
  3546. # ----------------------
  3547. # locate the manifest tool
  3548. m4_defun([_LT_PATH_MANIFEST_TOOL],
  3549. [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
  3550. test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
  3551. AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_manifest_tool],
  3552. [lt_cv_path_manifest_tool=no
  3553. echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
  3554. $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
  3555. cat conftest.err >&AS_MESSAGE_LOG_FD
  3556. if $GREP 'Manifest Tool' conftest.out > /dev/null; then
  3557. lt_cv_path_manifest_tool=yes
  3558. fi
  3559. rm -f conftest*])
  3560. if test yes != "$lt_cv_path_manifest_tool"; then
  3561. MANIFEST_TOOL=:
  3562. fi
  3563. _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
  3564. ])# _LT_PATH_MANIFEST_TOOL
  3565. # _LT_DLL_DEF_P([FILE])
  3566. # ---------------------
  3567. # True iff FILE is a Windows DLL '.def' file.
  3568. # Keep in sync with func_dll_def_p in the libtool script
  3569. AC_DEFUN([_LT_DLL_DEF_P],
  3570. [dnl
  3571. test DEF = "`$SED -n dnl
  3572. -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace
  3573. -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments
  3574. -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl
  3575. -e q dnl Only consider the first "real" line
  3576. $1`" dnl
  3577. ])# _LT_DLL_DEF_P
  3578. # LT_LIB_M
  3579. # --------
  3580. # check for math library
  3581. AC_DEFUN([LT_LIB_M],
  3582. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3583. LIBM=
  3584. case $host in
  3585. *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-mingw* | *-*-pw32* | *-*-darwin*)
  3586. # These system don't have libm, or don't need it
  3587. ;;
  3588. *-ncr-sysv4.3*)
  3589. AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
  3590. AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
  3591. ;;
  3592. *)
  3593. AC_CHECK_LIB(m, cos, LIBM=-lm)
  3594. ;;
  3595. esac
  3596. AC_SUBST([LIBM])
  3597. ])# LT_LIB_M
  3598. # Old name:
  3599. AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
  3600. dnl aclocal-1.4 backwards compatibility:
  3601. dnl AC_DEFUN([AC_CHECK_LIBM], [])
  3602. # _LT_COMPILER_NO_RTTI([TAGNAME])
  3603. # -------------------------------
  3604. m4_defun([_LT_COMPILER_NO_RTTI],
  3605. [m4_require([_LT_TAG_COMPILER])dnl
  3606. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  3607. if test yes = "$GCC"; then
  3608. case $cc_basename in
  3609. nvcc*)
  3610. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
  3611. *)
  3612. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
  3613. esac
  3614. _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
  3615. lt_cv_prog_compiler_rtti_exceptions,
  3616. [-fno-rtti -fno-exceptions], [],
  3617. [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
  3618. fi
  3619. _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
  3620. [Compiler flag to turn off builtin functions])
  3621. ])# _LT_COMPILER_NO_RTTI
  3622. # _LT_CMD_GLOBAL_SYMBOLS
  3623. # ----------------------
  3624. m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
  3625. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3626. AC_REQUIRE([AC_PROG_CC])dnl
  3627. AC_REQUIRE([AC_PROG_AWK])dnl
  3628. AC_REQUIRE([LT_PATH_NM])dnl
  3629. AC_REQUIRE([LT_PATH_LD])dnl
  3630. m4_require([_LT_DECL_SED])dnl
  3631. m4_require([_LT_DECL_EGREP])dnl
  3632. m4_require([_LT_TAG_COMPILER])dnl
  3633. # Check for command to grab the raw symbol name followed by C symbol from nm.
  3634. AC_MSG_CHECKING([command to parse $NM output from $compiler object])
  3635. AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
  3636. [
  3637. # These are sane defaults that work on at least a few old systems.
  3638. # [They come from Ultrix. What could be older than Ultrix?!! ;)]
  3639. # Character class describing NM global symbol codes.
  3640. symcode='[[BCDEGRST]]'
  3641. # Regexp to match symbols that can be accessed directly from C.
  3642. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
  3643. # Define system-specific variables.
  3644. case $host_os in
  3645. aix*)
  3646. symcode='[[BCDT]]'
  3647. ;;
  3648. cygwin* | mingw* | windows* | pw32* | cegcc*)
  3649. symcode='[[ABCDGISTW]]'
  3650. ;;
  3651. hpux*)
  3652. if test ia64 = "$host_cpu"; then
  3653. symcode='[[ABCDEGRST]]'
  3654. fi
  3655. ;;
  3656. irix* | nonstopux*)
  3657. symcode='[[BCDEGRST]]'
  3658. ;;
  3659. osf*)
  3660. symcode='[[BCDEGQRST]]'
  3661. ;;
  3662. solaris*)
  3663. symcode='[[BCDRT]]'
  3664. ;;
  3665. sco3.2v5*)
  3666. symcode='[[DT]]'
  3667. ;;
  3668. sysv4.2uw2*)
  3669. symcode='[[DT]]'
  3670. ;;
  3671. sysv5* | sco5v6* | unixware* | OpenUNIX*)
  3672. symcode='[[ABDT]]'
  3673. ;;
  3674. sysv4)
  3675. symcode='[[DFNSTU]]'
  3676. ;;
  3677. esac
  3678. # If we're using GNU nm, then use its standard symbol codes.
  3679. case `$NM -V 2>&1` in
  3680. *GNU* | *'with BFD'*)
  3681. symcode='[[ABCDGIRSTW]]' ;;
  3682. esac
  3683. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3684. # Gets list of data symbols to import.
  3685. lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
  3686. # Adjust the below global symbol transforms to fixup imported variables.
  3687. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
  3688. lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
  3689. lt_c_name_lib_hook="\
  3690. -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
  3691. -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
  3692. else
  3693. # Disable hooks by default.
  3694. lt_cv_sys_global_symbol_to_import=
  3695. lt_cdecl_hook=
  3696. lt_c_name_hook=
  3697. lt_c_name_lib_hook=
  3698. fi
  3699. # Transform an extracted symbol line into a proper C declaration.
  3700. # Some systems (esp. on ia64) link data and code symbols differently,
  3701. # so use this general approach.
  3702. lt_cv_sys_global_symbol_to_cdecl="$SED -n"\
  3703. $lt_cdecl_hook\
  3704. " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
  3705. " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
  3706. # Transform an extracted symbol line into symbol name and symbol address
  3707. lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
  3708. $lt_c_name_hook\
  3709. " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
  3710. " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
  3711. # Transform an extracted symbol line into symbol name with lib prefix and
  3712. # symbol address.
  3713. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
  3714. $lt_c_name_lib_hook\
  3715. " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
  3716. " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
  3717. " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
  3718. # Handle CRLF in mingw tool chain
  3719. opt_cr=
  3720. case $build_os in
  3721. mingw* | windows*)
  3722. opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  3723. ;;
  3724. esac
  3725. # Try without a prefix underscore, then with it.
  3726. for ac_symprfx in "" "_"; do
  3727. # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
  3728. symxfrm="\\1 $ac_symprfx\\2 \\2"
  3729. # Write the raw and C identifiers.
  3730. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3731. # Fake it for dumpbin and say T for any non-static function,
  3732. # D for any global variable and I for any imported variable.
  3733. # Also find C++ and __fastcall symbols from MSVC++ or ICC,
  3734. # which start with @ or ?.
  3735. lt_cv_sys_global_symbol_pipe="$AWK ['"\
  3736. " {last_section=section; section=\$ 3};"\
  3737. " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
  3738. " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
  3739. " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
  3740. " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
  3741. " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
  3742. " \$ 0!~/External *\|/{next};"\
  3743. " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
  3744. " {if(hide[section]) next};"\
  3745. " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
  3746. " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
  3747. " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
  3748. " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
  3749. " ' prfx=^$ac_symprfx]"
  3750. else
  3751. lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
  3752. fi
  3753. lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
  3754. # Check to see that the pipe works correctly.
  3755. pipe_works=no
  3756. rm -f conftest*
  3757. cat > conftest.$ac_ext <<_LT_EOF
  3758. #ifdef __cplusplus
  3759. extern "C" {
  3760. #endif
  3761. char nm_test_var;
  3762. void nm_test_func(void);
  3763. void nm_test_func(void){}
  3764. #ifdef __cplusplus
  3765. }
  3766. #endif
  3767. int main(void){nm_test_var='a';nm_test_func();return(0);}
  3768. _LT_EOF
  3769. if AC_TRY_EVAL(ac_compile); then
  3770. # Now try to grab the symbols.
  3771. nlist=conftest.nm
  3772. $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD
  3773. if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then
  3774. # Try sorting and uniquifying the output.
  3775. if sort "$nlist" | uniq > "$nlist"T; then
  3776. mv -f "$nlist"T "$nlist"
  3777. else
  3778. rm -f "$nlist"T
  3779. fi
  3780. # Make sure that we snagged all the symbols we need.
  3781. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
  3782. if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
  3783. cat <<_LT_EOF > conftest.$ac_ext
  3784. /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
  3785. #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
  3786. /* DATA imports from DLLs on WIN32 can't be const, because runtime
  3787. relocations are performed -- see ld's documentation on pseudo-relocs. */
  3788. # define LT@&t@_DLSYM_CONST
  3789. #elif defined __osf__
  3790. /* This system does not cope well with relocations in const data. */
  3791. # define LT@&t@_DLSYM_CONST
  3792. #else
  3793. # define LT@&t@_DLSYM_CONST const
  3794. #endif
  3795. #ifdef __cplusplus
  3796. extern "C" {
  3797. #endif
  3798. _LT_EOF
  3799. # Now generate the symbol file.
  3800. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
  3801. cat <<_LT_EOF >> conftest.$ac_ext
  3802. /* The mapping between symbol names and symbols. */
  3803. LT@&t@_DLSYM_CONST struct {
  3804. const char *name;
  3805. void *address;
  3806. }
  3807. lt__PROGRAM__LTX_preloaded_symbols[[]] =
  3808. {
  3809. { "@PROGRAM@", (void *) 0 },
  3810. _LT_EOF
  3811. $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
  3812. cat <<\_LT_EOF >> conftest.$ac_ext
  3813. {0, (void *) 0}
  3814. };
  3815. /* This works around a problem in FreeBSD linker */
  3816. #ifdef FREEBSD_WORKAROUND
  3817. static const void *lt_preloaded_setup() {
  3818. return lt__PROGRAM__LTX_preloaded_symbols;
  3819. }
  3820. #endif
  3821. #ifdef __cplusplus
  3822. }
  3823. #endif
  3824. _LT_EOF
  3825. # Now try linking the two files.
  3826. mv conftest.$ac_objext conftstm.$ac_objext
  3827. lt_globsym_save_LIBS=$LIBS
  3828. lt_globsym_save_CFLAGS=$CFLAGS
  3829. LIBS=conftstm.$ac_objext
  3830. CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
  3831. if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
  3832. pipe_works=yes
  3833. fi
  3834. LIBS=$lt_globsym_save_LIBS
  3835. CFLAGS=$lt_globsym_save_CFLAGS
  3836. else
  3837. echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
  3838. fi
  3839. else
  3840. echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
  3841. fi
  3842. else
  3843. echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
  3844. fi
  3845. else
  3846. echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
  3847. cat conftest.$ac_ext >&5
  3848. fi
  3849. rm -rf conftest* conftst*
  3850. # Do not use the global_symbol_pipe unless it works.
  3851. if test yes = "$pipe_works"; then
  3852. break
  3853. else
  3854. lt_cv_sys_global_symbol_pipe=
  3855. fi
  3856. done
  3857. ])
  3858. if test -z "$lt_cv_sys_global_symbol_pipe"; then
  3859. lt_cv_sys_global_symbol_to_cdecl=
  3860. fi
  3861. if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
  3862. AC_MSG_RESULT(failed)
  3863. else
  3864. AC_MSG_RESULT(ok)
  3865. fi
  3866. # Response file support.
  3867. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3868. nm_file_list_spec='@'
  3869. elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
  3870. nm_file_list_spec='@'
  3871. fi
  3872. _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
  3873. [Take the output of nm and produce a listing of raw symbols and C names])
  3874. _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
  3875. [Transform the output of nm in a proper C declaration])
  3876. _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
  3877. [Transform the output of nm into a list of symbols to manually relocate])
  3878. _LT_DECL([global_symbol_to_c_name_address],
  3879. [lt_cv_sys_global_symbol_to_c_name_address], [1],
  3880. [Transform the output of nm in a C name address pair])
  3881. _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
  3882. [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
  3883. [Transform the output of nm in a C name address pair when lib prefix is needed])
  3884. _LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
  3885. [The name lister interface])
  3886. _LT_DECL([], [nm_file_list_spec], [1],
  3887. [Specify filename containing input files for $NM])
  3888. ]) # _LT_CMD_GLOBAL_SYMBOLS
  3889. # _LT_COMPILER_PIC([TAGNAME])
  3890. # ---------------------------
  3891. m4_defun([_LT_COMPILER_PIC],
  3892. [m4_require([_LT_TAG_COMPILER])dnl
  3893. _LT_TAGVAR(lt_prog_compiler_wl, $1)=
  3894. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3895. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3896. m4_if([$1], [CXX], [
  3897. # C++ specific cases for pic, static, wl, etc.
  3898. if test yes = "$GXX"; then
  3899. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3900. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3901. case $host_os in
  3902. aix*)
  3903. # All AIX code is PIC.
  3904. if test ia64 = "$host_cpu"; then
  3905. # AIX 5 now supports IA64 processor
  3906. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3907. fi
  3908. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3909. ;;
  3910. amigaos*)
  3911. case $host_cpu in
  3912. powerpc)
  3913. # see comment about AmigaOS4 .so support
  3914. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3915. ;;
  3916. m68k)
  3917. # FIXME: we need at least 68020 code to build shared libraries, but
  3918. # adding the '-m68020' flag to GCC prevents building anything better,
  3919. # like '-m68040'.
  3920. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  3921. ;;
  3922. esac
  3923. ;;
  3924. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  3925. # PIC is the default for these OSes.
  3926. ;;
  3927. mingw* | windows* | cygwin* | os2* | pw32* | cegcc*)
  3928. # This hack is so that the source file can tell whether it is being
  3929. # built for inclusion in a dll (and should export symbols for example).
  3930. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  3931. # (--disable-auto-import) libraries
  3932. m4_if([$1], [GCJ], [],
  3933. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3934. case $host_os in
  3935. os2*)
  3936. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
  3937. ;;
  3938. esac
  3939. ;;
  3940. darwin* | rhapsody*)
  3941. # PIC is the default on this platform
  3942. # Common symbols not allowed in MH_DYLIB files
  3943. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  3944. ;;
  3945. *djgpp*)
  3946. # DJGPP does not support shared libraries at all
  3947. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3948. ;;
  3949. haiku*)
  3950. # PIC is the default for Haiku.
  3951. # The "-static" flag exists, but is broken.
  3952. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3953. ;;
  3954. interix[[3-9]]*)
  3955. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  3956. # Instead, we relocate shared libraries at runtime.
  3957. ;;
  3958. sysv4*MP*)
  3959. if test -d /usr/nec; then
  3960. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  3961. fi
  3962. ;;
  3963. hpux*)
  3964. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  3965. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  3966. # sets the default TLS model and affects inlining.
  3967. case $host_cpu in
  3968. hppa*64*)
  3969. ;;
  3970. *)
  3971. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3972. ;;
  3973. esac
  3974. ;;
  3975. *qnx* | *nto*)
  3976. # QNX uses GNU C++, but need to define -shared option too, otherwise
  3977. # it will coredump.
  3978. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  3979. ;;
  3980. *)
  3981. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3982. ;;
  3983. esac
  3984. else
  3985. case $host_os in
  3986. aix[[4-9]]*)
  3987. # All AIX code is PIC.
  3988. if test ia64 = "$host_cpu"; then
  3989. # AIX 5 now supports IA64 processor
  3990. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3991. else
  3992. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  3993. fi
  3994. ;;
  3995. chorus*)
  3996. case $cc_basename in
  3997. cxch68*)
  3998. # Green Hills C++ Compiler
  3999. # _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"
  4000. ;;
  4001. esac
  4002. ;;
  4003. mingw* | windows* | cygwin* | os2* | pw32* | cegcc*)
  4004. # This hack is so that the source file can tell whether it is being
  4005. # built for inclusion in a dll (and should export symbols for example).
  4006. m4_if([$1], [GCJ], [],
  4007. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  4008. ;;
  4009. dgux*)
  4010. case $cc_basename in
  4011. ec++*)
  4012. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4013. ;;
  4014. ghcx*)
  4015. # Green Hills C++ Compiler
  4016. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4017. ;;
  4018. *)
  4019. ;;
  4020. esac
  4021. ;;
  4022. freebsd* | dragonfly* | midnightbsd*)
  4023. # FreeBSD uses GNU C++
  4024. ;;
  4025. hpux9* | hpux10* | hpux11*)
  4026. case $cc_basename in
  4027. CC*)
  4028. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4029. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
  4030. if test ia64 != "$host_cpu"; then
  4031. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4032. fi
  4033. ;;
  4034. aCC*)
  4035. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4036. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
  4037. case $host_cpu in
  4038. hppa*64*|ia64*)
  4039. # +Z the default
  4040. ;;
  4041. *)
  4042. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4043. ;;
  4044. esac
  4045. ;;
  4046. *)
  4047. ;;
  4048. esac
  4049. ;;
  4050. interix*)
  4051. # This is c89, which is MS Visual C++ (no shared libs)
  4052. # Anyone wants to do a port?
  4053. ;;
  4054. irix5* | irix6* | nonstopux*)
  4055. case $cc_basename in
  4056. CC*)
  4057. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4058. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4059. # CC pic flag -KPIC is the default.
  4060. ;;
  4061. *)
  4062. ;;
  4063. esac
  4064. ;;
  4065. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  4066. case $cc_basename in
  4067. KCC*)
  4068. # KAI C++ Compiler
  4069. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  4070. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4071. ;;
  4072. ecpc* )
  4073. # old Intel C++ for x86_64, which still supported -KPIC.
  4074. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4075. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4076. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4077. ;;
  4078. icpc* )
  4079. # Intel C++, used to be incompatible with GCC.
  4080. # ICC 10 doesn't accept -KPIC any more.
  4081. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4082. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4083. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4084. ;;
  4085. pgCC* | pgcpp*)
  4086. # Portland Group C++ compiler
  4087. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4088. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4089. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4090. ;;
  4091. cxx*)
  4092. # Compaq C++
  4093. # Make sure the PIC flag is empty. It appears that all Alpha
  4094. # Linux and Compaq Tru64 Unix objects are PIC.
  4095. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4096. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4097. ;;
  4098. xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
  4099. # IBM XL 8.0, 9.0 on PPC and BlueGene
  4100. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4101. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  4102. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  4103. ;;
  4104. *)
  4105. case `$CC -V 2>&1 | $SED 5q` in
  4106. *Sun\ C*)
  4107. # Sun C++ 5.9
  4108. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4109. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4110. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4111. ;;
  4112. esac
  4113. ;;
  4114. esac
  4115. ;;
  4116. lynxos*)
  4117. ;;
  4118. m88k*)
  4119. ;;
  4120. mvs*)
  4121. case $cc_basename in
  4122. cxx*)
  4123. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
  4124. ;;
  4125. *)
  4126. ;;
  4127. esac
  4128. ;;
  4129. netbsd* | netbsdelf*-gnu)
  4130. ;;
  4131. *-mlibc)
  4132. ;;
  4133. *qnx* | *nto*)
  4134. # QNX uses GNU C++, but need to define -shared option too, otherwise
  4135. # it will coredump.
  4136. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4137. ;;
  4138. osf3* | osf4* | osf5*)
  4139. case $cc_basename in
  4140. KCC*)
  4141. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  4142. ;;
  4143. RCC*)
  4144. # Rational C++ 2.4.1
  4145. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4146. ;;
  4147. cxx*)
  4148. # Digital/Compaq C++
  4149. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4150. # Make sure the PIC flag is empty. It appears that all Alpha
  4151. # Linux and Compaq Tru64 Unix objects are PIC.
  4152. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4153. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4154. ;;
  4155. *)
  4156. ;;
  4157. esac
  4158. ;;
  4159. psos*)
  4160. ;;
  4161. serenity*)
  4162. ;;
  4163. solaris*)
  4164. case $cc_basename in
  4165. CC* | sunCC*)
  4166. # Sun C++ 4.2, 5.x and Centerline C++
  4167. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4168. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4169. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4170. ;;
  4171. gcx*)
  4172. # Green Hills C++ Compiler
  4173. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4174. ;;
  4175. *)
  4176. ;;
  4177. esac
  4178. ;;
  4179. sunos4*)
  4180. case $cc_basename in
  4181. CC*)
  4182. # Sun C++ 4.x
  4183. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4184. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4185. ;;
  4186. lcc*)
  4187. # Lucid
  4188. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4189. ;;
  4190. *)
  4191. ;;
  4192. esac
  4193. ;;
  4194. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  4195. case $cc_basename in
  4196. CC*)
  4197. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4198. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4199. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4200. ;;
  4201. esac
  4202. ;;
  4203. tandem*)
  4204. case $cc_basename in
  4205. NCC*)
  4206. # NonStop-UX NCC 3.20
  4207. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4208. ;;
  4209. *)
  4210. ;;
  4211. esac
  4212. ;;
  4213. vxworks*)
  4214. ;;
  4215. *)
  4216. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4217. ;;
  4218. esac
  4219. fi
  4220. ],
  4221. [
  4222. if test yes = "$GCC"; then
  4223. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4224. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4225. case $host_os in
  4226. aix*)
  4227. # All AIX code is PIC.
  4228. if test ia64 = "$host_cpu"; then
  4229. # AIX 5 now supports IA64 processor
  4230. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4231. fi
  4232. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4233. ;;
  4234. amigaos*)
  4235. case $host_cpu in
  4236. powerpc)
  4237. # see comment about AmigaOS4 .so support
  4238. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4239. ;;
  4240. m68k)
  4241. # FIXME: we need at least 68020 code to build shared libraries, but
  4242. # adding the '-m68020' flag to GCC prevents building anything better,
  4243. # like '-m68040'.
  4244. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  4245. ;;
  4246. esac
  4247. ;;
  4248. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  4249. # PIC is the default for these OSes.
  4250. ;;
  4251. mingw* | windows* | cygwin* | pw32* | os2* | cegcc*)
  4252. # This hack is so that the source file can tell whether it is being
  4253. # built for inclusion in a dll (and should export symbols for example).
  4254. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  4255. # (--disable-auto-import) libraries
  4256. m4_if([$1], [GCJ], [],
  4257. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  4258. case $host_os in
  4259. os2*)
  4260. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
  4261. ;;
  4262. esac
  4263. ;;
  4264. darwin* | rhapsody*)
  4265. # PIC is the default on this platform
  4266. # Common symbols not allowed in MH_DYLIB files
  4267. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  4268. ;;
  4269. haiku*)
  4270. # PIC is the default for Haiku.
  4271. # The "-static" flag exists, but is broken.
  4272. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  4273. ;;
  4274. hpux*)
  4275. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  4276. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  4277. # sets the default TLS model and affects inlining.
  4278. case $host_cpu in
  4279. hppa*64*)
  4280. # +Z the default
  4281. ;;
  4282. *)
  4283. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4284. ;;
  4285. esac
  4286. ;;
  4287. interix[[3-9]]*)
  4288. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  4289. # Instead, we relocate shared libraries at runtime.
  4290. ;;
  4291. msdosdjgpp*)
  4292. # Just because we use GCC doesn't mean we suddenly get shared libraries
  4293. # on systems that don't support them.
  4294. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4295. enable_shared=no
  4296. ;;
  4297. *nto* | *qnx*)
  4298. # QNX uses GNU C++, but need to define -shared option too, otherwise
  4299. # it will coredump.
  4300. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4301. ;;
  4302. sysv4*MP*)
  4303. if test -d /usr/nec; then
  4304. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  4305. fi
  4306. ;;
  4307. *)
  4308. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4309. ;;
  4310. esac
  4311. case $cc_basename in
  4312. nvcc*) # Cuda Compiler Driver 2.2
  4313. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
  4314. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  4315. _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
  4316. fi
  4317. ;;
  4318. esac
  4319. else
  4320. # PORTME Check for flag to pass linker flags through the system compiler.
  4321. case $host_os in
  4322. aix*)
  4323. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4324. if test ia64 = "$host_cpu"; then
  4325. # AIX 5 now supports IA64 processor
  4326. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4327. else
  4328. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  4329. fi
  4330. ;;
  4331. darwin* | rhapsody*)
  4332. # PIC is the default on this platform
  4333. # Common symbols not allowed in MH_DYLIB files
  4334. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  4335. case $cc_basename in
  4336. nagfor*)
  4337. # NAG Fortran compiler
  4338. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
  4339. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4340. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4341. ;;
  4342. esac
  4343. ;;
  4344. mingw* | windows* | cygwin* | pw32* | os2* | cegcc*)
  4345. # This hack is so that the source file can tell whether it is being
  4346. # built for inclusion in a dll (and should export symbols for example).
  4347. m4_if([$1], [GCJ], [],
  4348. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  4349. case $host_os in
  4350. os2*)
  4351. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
  4352. ;;
  4353. esac
  4354. ;;
  4355. hpux9* | hpux10* | hpux11*)
  4356. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4357. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  4358. # not for PA HP-UX.
  4359. case $host_cpu in
  4360. hppa*64*|ia64*)
  4361. # +Z the default
  4362. ;;
  4363. *)
  4364. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4365. ;;
  4366. esac
  4367. # Is there a better lt_prog_compiler_static that works with the bundled CC?
  4368. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
  4369. ;;
  4370. irix5* | irix6* | nonstopux*)
  4371. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4372. # PIC (with -KPIC) is the default.
  4373. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4374. ;;
  4375. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  4376. case $cc_basename in
  4377. # old Intel for x86_64, which still supported -KPIC.
  4378. ecc*)
  4379. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4380. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4381. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4382. ;;
  4383. *flang* | ftn | f18* | f95*)
  4384. # Flang compiler.
  4385. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4386. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4387. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4388. ;;
  4389. # icc used to be incompatible with GCC.
  4390. # ICC 10 doesn't accept -KPIC any more.
  4391. icc* | ifort*)
  4392. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4393. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4394. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4395. ;;
  4396. # Lahey Fortran 8.1.
  4397. lf95*)
  4398. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4399. _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
  4400. _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
  4401. ;;
  4402. nagfor*)
  4403. # NAG Fortran compiler
  4404. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
  4405. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4406. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4407. ;;
  4408. tcc*)
  4409. # Fabrice Bellard et al's Tiny C Compiler
  4410. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4411. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4412. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4413. ;;
  4414. pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
  4415. # Portland Group compilers (*not* the Pentium gcc compiler,
  4416. # which looks to be a dead project)
  4417. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4418. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4419. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4420. ;;
  4421. ccc*)
  4422. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4423. # All Alpha code is PIC.
  4424. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4425. ;;
  4426. xl* | bgxl* | bgf* | mpixl*)
  4427. # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
  4428. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4429. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  4430. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  4431. ;;
  4432. *)
  4433. case `$CC -V 2>&1 | $SED 5q` in
  4434. *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
  4435. # Sun Fortran 8.3 passes all unrecognized flags to the linker
  4436. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4437. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4438. _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
  4439. ;;
  4440. *Sun\ F* | *Sun*Fortran*)
  4441. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4442. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4443. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4444. ;;
  4445. *Sun\ C*)
  4446. # Sun C 5.9
  4447. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4448. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4449. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4450. ;;
  4451. *Intel*\ [[CF]]*Compiler*)
  4452. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4453. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4454. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4455. ;;
  4456. *Portland\ Group*)
  4457. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4458. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4459. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4460. ;;
  4461. esac
  4462. ;;
  4463. esac
  4464. ;;
  4465. newsos6)
  4466. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4467. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4468. ;;
  4469. *-mlibc)
  4470. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4471. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4472. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4473. ;;
  4474. *nto* | *qnx*)
  4475. # QNX uses GNU C++, but need to define -shared option too, otherwise
  4476. # it will coredump.
  4477. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4478. ;;
  4479. osf3* | osf4* | osf5*)
  4480. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4481. # All OSF/1 code is PIC.
  4482. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4483. ;;
  4484. rdos*)
  4485. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4486. ;;
  4487. serenity*)
  4488. ;;
  4489. solaris*)
  4490. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4491. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4492. case $cc_basename in
  4493. f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
  4494. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
  4495. *)
  4496. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
  4497. esac
  4498. ;;
  4499. sunos4*)
  4500. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4501. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4502. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4503. ;;
  4504. sysv4 | sysv4.2uw2* | sysv4.3*)
  4505. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4506. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4507. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4508. ;;
  4509. sysv4*MP*)
  4510. if test -d /usr/nec; then
  4511. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
  4512. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4513. fi
  4514. ;;
  4515. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  4516. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4517. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4518. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4519. ;;
  4520. unicos*)
  4521. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4522. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4523. ;;
  4524. uts4*)
  4525. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4526. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4527. ;;
  4528. *)
  4529. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4530. ;;
  4531. esac
  4532. fi
  4533. ])
  4534. case $host_os in
  4535. # For platforms that do not support PIC, -DPIC is meaningless:
  4536. *djgpp*)
  4537. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4538. ;;
  4539. *)
  4540. _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
  4541. ;;
  4542. esac
  4543. AC_CACHE_CHECK([for $compiler option to produce PIC],
  4544. [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
  4545. [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
  4546. _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
  4547. #
  4548. # Check to make sure the PIC flag actually works.
  4549. #
  4550. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  4551. _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
  4552. [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
  4553. [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
  4554. [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
  4555. "" | " "*) ;;
  4556. *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
  4557. esac],
  4558. [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4559. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
  4560. fi
  4561. _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
  4562. [Additional compiler flags for building library objects])
  4563. _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
  4564. [How to pass a linker flag through the compiler])
  4565. #
  4566. # Check to make sure the static flag actually works.
  4567. #
  4568. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
  4569. _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
  4570. _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
  4571. $lt_tmp_static_flag,
  4572. [],
  4573. [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
  4574. _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
  4575. [Compiler flag to prevent dynamic linking])
  4576. ])# _LT_COMPILER_PIC
  4577. # _LT_LINKER_SHLIBS([TAGNAME])
  4578. # ----------------------------
  4579. # See if the linker supports building shared libraries.
  4580. m4_defun([_LT_LINKER_SHLIBS],
  4581. [AC_REQUIRE([LT_PATH_LD])dnl
  4582. AC_REQUIRE([LT_PATH_NM])dnl
  4583. m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  4584. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  4585. m4_require([_LT_DECL_EGREP])dnl
  4586. m4_require([_LT_DECL_SED])dnl
  4587. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  4588. m4_require([_LT_TAG_COMPILER])dnl
  4589. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  4590. m4_if([$1], [CXX], [
  4591. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4592. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  4593. case $host_os in
  4594. aix[[4-9]]*)
  4595. # If we're using GNU nm, then we don't want the "-C" option.
  4596. # -C means demangle to GNU nm, but means don't demangle to AIX nm.
  4597. # Without the "-l" option, or with the "-B" option, AIX nm treats
  4598. # weak defined symbols like other global defined symbols, whereas
  4599. # GNU nm marks them as "W".
  4600. # While the 'weak' keyword is ignored in the Export File, we need
  4601. # it in the Import File for the 'aix-soname' feature, so we have
  4602. # to replace the "-B" option with "-P" for AIX nm.
  4603. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  4604. _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'
  4605. else
  4606. _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 == "L") || (\$ 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'
  4607. fi
  4608. ;;
  4609. pw32*)
  4610. _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
  4611. ;;
  4612. cygwin* | mingw* | windows* | cegcc*)
  4613. case $cc_basename in
  4614. cl* | icl*)
  4615. _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  4616. ;;
  4617. *)
  4618. _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'
  4619. _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  4620. ;;
  4621. esac
  4622. ;;
  4623. *)
  4624. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4625. ;;
  4626. esac
  4627. ], [
  4628. runpath_var=
  4629. _LT_TAGVAR(allow_undefined_flag, $1)=
  4630. _LT_TAGVAR(always_export_symbols, $1)=no
  4631. _LT_TAGVAR(archive_cmds, $1)=
  4632. _LT_TAGVAR(archive_expsym_cmds, $1)=
  4633. _LT_TAGVAR(compiler_needs_object, $1)=no
  4634. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  4635. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  4636. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4637. _LT_TAGVAR(hardcode_automatic, $1)=no
  4638. _LT_TAGVAR(hardcode_direct, $1)=no
  4639. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  4640. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4641. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  4642. _LT_TAGVAR(hardcode_minus_L, $1)=no
  4643. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  4644. _LT_TAGVAR(inherit_rpath, $1)=no
  4645. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  4646. _LT_TAGVAR(module_cmds, $1)=
  4647. _LT_TAGVAR(module_expsym_cmds, $1)=
  4648. _LT_TAGVAR(old_archive_from_new_cmds, $1)=
  4649. _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
  4650. _LT_TAGVAR(thread_safe_flag_spec, $1)=
  4651. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4652. # include_expsyms should be a list of space-separated symbols to be *always*
  4653. # included in the symbol list
  4654. _LT_TAGVAR(include_expsyms, $1)=
  4655. # exclude_expsyms can be an extended regexp of symbols to exclude
  4656. # it will be wrapped by ' (' and ')$', so one must not match beginning or
  4657. # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
  4658. # as well as any symbol that contains 'd'.
  4659. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  4660. # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  4661. # platforms (ab)use it in PIC code, but their linkers get confused if
  4662. # the symbol is explicitly referenced. Since portable code cannot
  4663. # rely on this symbol name, it's probably fine to never include it in
  4664. # preloaded symbol tables.
  4665. # Exclude shared library initialization/finalization symbols.
  4666. dnl Note also adjust exclude_expsyms for C++ above.
  4667. extract_expsyms_cmds=
  4668. case $host_os in
  4669. cygwin* | mingw* | windows* | pw32* | cegcc*)
  4670. # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
  4671. # When not using gcc, we currently assume that we are using
  4672. # Microsoft Visual C++ or Intel C++ Compiler.
  4673. if test yes != "$GCC"; then
  4674. with_gnu_ld=no
  4675. fi
  4676. ;;
  4677. interix*)
  4678. # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
  4679. with_gnu_ld=yes
  4680. ;;
  4681. esac
  4682. _LT_TAGVAR(ld_shlibs, $1)=yes
  4683. # On some targets, GNU ld is compatible enough with the native linker
  4684. # that we're better off using the native interface for both.
  4685. lt_use_gnu_ld_interface=no
  4686. if test yes = "$with_gnu_ld"; then
  4687. case $host_os in
  4688. aix*)
  4689. # The AIX port of GNU ld has always aspired to compatibility
  4690. # with the native linker. However, as the warning in the GNU ld
  4691. # block says, versions before 2.19.5* couldn't really create working
  4692. # shared libraries, regardless of the interface used.
  4693. case `$LD -v 2>&1` in
  4694. *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
  4695. *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
  4696. *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
  4697. *)
  4698. lt_use_gnu_ld_interface=yes
  4699. ;;
  4700. esac
  4701. ;;
  4702. *)
  4703. lt_use_gnu_ld_interface=yes
  4704. ;;
  4705. esac
  4706. fi
  4707. if test yes = "$lt_use_gnu_ld_interface"; then
  4708. # If archive_cmds runs LD, not CC, wlarc should be empty
  4709. wlarc='$wl'
  4710. # Set some defaults for GNU ld with shared library support. These
  4711. # are reset later if shared libraries are not supported. Putting them
  4712. # here allows them to be overridden if necessary.
  4713. runpath_var=LD_RUN_PATH
  4714. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  4715. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  4716. # ancient GNU ld didn't support --whole-archive et. al.
  4717. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
  4718. _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
  4719. else
  4720. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4721. fi
  4722. supports_anon_versioning=no
  4723. case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in
  4724. *GNU\ gold*) supports_anon_versioning=yes ;;
  4725. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
  4726. *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
  4727. *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
  4728. *\ 2.11.*) ;; # other 2.11 versions
  4729. *) supports_anon_versioning=yes ;;
  4730. esac
  4731. # See if GNU ld supports shared libraries.
  4732. case $host_os in
  4733. aix[[3-9]]*)
  4734. # On AIX/PPC, the GNU linker is very broken
  4735. if test ia64 != "$host_cpu"; then
  4736. _LT_TAGVAR(ld_shlibs, $1)=no
  4737. cat <<_LT_EOF 1>&2
  4738. *** Warning: the GNU linker, at least up to release 2.19, is reported
  4739. *** to be unable to reliably create shared libraries on AIX.
  4740. *** Therefore, libtool is disabling shared libraries support. If you
  4741. *** really care for shared libraries, you may want to install binutils
  4742. *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
  4743. *** You will then need to restart the configuration process.
  4744. _LT_EOF
  4745. fi
  4746. ;;
  4747. amigaos*)
  4748. case $host_cpu in
  4749. powerpc)
  4750. # see comment about AmigaOS4 .so support
  4751. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4752. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  4753. ;;
  4754. m68k)
  4755. _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)'
  4756. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4757. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4758. ;;
  4759. esac
  4760. ;;
  4761. beos*)
  4762. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4763. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4764. # Joseph Beckenbach <[email protected]> says some releases of gcc
  4765. # support --undefined. This deserves some investigation. FIXME
  4766. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4767. else
  4768. _LT_TAGVAR(ld_shlibs, $1)=no
  4769. fi
  4770. ;;
  4771. cygwin* | mingw* | windows* | pw32* | cegcc*)
  4772. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  4773. # as there is no search path for DLLs.
  4774. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4775. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
  4776. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4777. _LT_TAGVAR(always_export_symbols, $1)=no
  4778. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4779. _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'
  4780. _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  4781. _LT_TAGVAR(file_list_spec, $1)='@'
  4782. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  4783. _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'
  4784. # If the export-symbols file already is a .def file, use it as
  4785. # is; otherwise, prepend EXPORTS...
  4786. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  4787. cp $export_symbols $output_objdir/$soname.def;
  4788. else
  4789. echo EXPORTS > $output_objdir/$soname.def;
  4790. cat $export_symbols >> $output_objdir/$soname.def;
  4791. fi~
  4792. $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  4793. else
  4794. _LT_TAGVAR(ld_shlibs, $1)=no
  4795. fi
  4796. ;;
  4797. haiku*)
  4798. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4799. _LT_TAGVAR(link_all_deplibs, $1)=no
  4800. ;;
  4801. os2*)
  4802. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4803. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4804. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4805. shrext_cmds=.dll
  4806. _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  4807. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  4808. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  4809. $ECHO EXPORTS >> $output_objdir/$libname.def~
  4810. emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
  4811. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  4812. emximp -o $lib $output_objdir/$libname.def'
  4813. _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  4814. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  4815. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  4816. $ECHO EXPORTS >> $output_objdir/$libname.def~
  4817. prefix_cmds="$SED"~
  4818. if test EXPORTS = "`$SED 1q $export_symbols`"; then
  4819. prefix_cmds="$prefix_cmds -e 1d";
  4820. fi~
  4821. prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
  4822. cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
  4823. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  4824. emximp -o $lib $output_objdir/$libname.def'
  4825. _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
  4826. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4827. _LT_TAGVAR(file_list_spec, $1)='@'
  4828. ;;
  4829. interix[[3-9]]*)
  4830. _LT_TAGVAR(hardcode_direct, $1)=no
  4831. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4832. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  4833. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  4834. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  4835. # Instead, shared libraries are loaded at an image base (0x10000000 by
  4836. # default) and relocated if they conflict, which is a slow very memory
  4837. # consuming and fragmenting process. To avoid this, we pick a random,
  4838. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  4839. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  4840. _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'
  4841. _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'
  4842. ;;
  4843. gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
  4844. tmp_diet=no
  4845. if test linux-dietlibc = "$host_os"; then
  4846. case $cc_basename in
  4847. diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
  4848. esac
  4849. fi
  4850. if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
  4851. && test no = "$tmp_diet"
  4852. then
  4853. tmp_addflag=' $pic_flag'
  4854. tmp_sharedflag='-shared'
  4855. case $cc_basename,$host_cpu in
  4856. pgcc*) # Portland Group C compiler
  4857. _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'
  4858. tmp_addflag=' $pic_flag'
  4859. ;;
  4860. pgf77* | pgf90* | pgf95* | pgfortran*)
  4861. # Portland Group f77 and f90 compilers
  4862. _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'
  4863. tmp_addflag=' $pic_flag -Mnomain' ;;
  4864. ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
  4865. tmp_addflag=' -i_dynamic' ;;
  4866. efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
  4867. tmp_addflag=' -i_dynamic -nofor_main' ;;
  4868. ifc* | ifort*) # Intel Fortran compiler
  4869. tmp_addflag=' -nofor_main' ;;
  4870. lf95*) # Lahey Fortran 8.1
  4871. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4872. tmp_sharedflag='--shared' ;;
  4873. nagfor*) # NAGFOR 5.3
  4874. tmp_sharedflag='-Wl,-shared' ;;
  4875. xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
  4876. tmp_sharedflag='-qmkshrobj'
  4877. tmp_addflag= ;;
  4878. nvcc*) # Cuda Compiler Driver 2.2
  4879. _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'
  4880. _LT_TAGVAR(compiler_needs_object, $1)=yes
  4881. ;;
  4882. esac
  4883. case `$CC -V 2>&1 | $SED 5q` in
  4884. *Sun\ C*) # Sun C 5.9
  4885. _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'
  4886. _LT_TAGVAR(compiler_needs_object, $1)=yes
  4887. tmp_sharedflag='-G' ;;
  4888. *Sun\ F*) # Sun Fortran 8.3
  4889. tmp_sharedflag='-G' ;;
  4890. esac
  4891. _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4892. if test yes = "$supports_anon_versioning"; then
  4893. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  4894. cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4895. echo "local: *; };" >> $output_objdir/$libname.ver~
  4896. $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
  4897. fi
  4898. case $cc_basename in
  4899. tcc*)
  4900. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  4901. _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
  4902. ;;
  4903. xlf* | bgf* | bgxlf* | mpixlf*)
  4904. # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
  4905. _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
  4906. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  4907. _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
  4908. if test yes = "$supports_anon_versioning"; then
  4909. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  4910. cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4911. echo "local: *; };" >> $output_objdir/$libname.ver~
  4912. $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
  4913. fi
  4914. ;;
  4915. esac
  4916. else
  4917. _LT_TAGVAR(ld_shlibs, $1)=no
  4918. fi
  4919. ;;
  4920. *-mlibc)
  4921. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4922. _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'
  4923. ;;
  4924. netbsd* | netbsdelf*-gnu)
  4925. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  4926. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  4927. wlarc=
  4928. else
  4929. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4930. _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'
  4931. fi
  4932. ;;
  4933. solaris*)
  4934. if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
  4935. _LT_TAGVAR(ld_shlibs, $1)=no
  4936. cat <<_LT_EOF 1>&2
  4937. *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  4938. *** create shared libraries on Solaris systems. Therefore, libtool
  4939. *** is disabling shared libraries support. We urge you to upgrade GNU
  4940. *** binutils to release 2.9.1 or newer. Another option is to modify
  4941. *** your PATH or compiler configuration so that the native linker is
  4942. *** used, and then restart.
  4943. _LT_EOF
  4944. elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4945. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4946. _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'
  4947. else
  4948. _LT_TAGVAR(ld_shlibs, $1)=no
  4949. fi
  4950. ;;
  4951. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
  4952. case `$LD -v 2>&1` in
  4953. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
  4954. _LT_TAGVAR(ld_shlibs, $1)=no
  4955. cat <<_LT_EOF 1>&2
  4956. *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
  4957. *** reliably create shared libraries on SCO systems. Therefore, libtool
  4958. *** is disabling shared libraries support. We urge you to upgrade GNU
  4959. *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
  4960. *** your PATH or compiler configuration so that the native linker is
  4961. *** used, and then restart.
  4962. _LT_EOF
  4963. ;;
  4964. *)
  4965. # For security reasons, it is highly recommended that you always
  4966. # use absolute paths for naming shared libraries, and exclude the
  4967. # DT_RUNPATH tag from executables and libraries. But doing so
  4968. # requires that you compile everything twice, which is a pain.
  4969. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4970. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  4971. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4972. _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'
  4973. else
  4974. _LT_TAGVAR(ld_shlibs, $1)=no
  4975. fi
  4976. ;;
  4977. esac
  4978. ;;
  4979. sunos4*)
  4980. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4981. wlarc=
  4982. _LT_TAGVAR(hardcode_direct, $1)=yes
  4983. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4984. ;;
  4985. *)
  4986. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4987. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4988. _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'
  4989. else
  4990. _LT_TAGVAR(ld_shlibs, $1)=no
  4991. fi
  4992. ;;
  4993. esac
  4994. if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
  4995. runpath_var=
  4996. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4997. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  4998. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4999. fi
  5000. else
  5001. # PORTME fill in a description of your system's linker (not GNU ld)
  5002. case $host_os in
  5003. aix3*)
  5004. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5005. _LT_TAGVAR(always_export_symbols, $1)=yes
  5006. _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'
  5007. # Note: this linker hardcodes the directories in LIBPATH if there
  5008. # are no directories specified by -L.
  5009. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5010. if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
  5011. # Neither direct hardcoding nor static linking is supported with a
  5012. # broken collect2.
  5013. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  5014. fi
  5015. ;;
  5016. aix[[4-9]]*)
  5017. if test ia64 = "$host_cpu"; then
  5018. # On IA64, the linker does run time linking by default, so we don't
  5019. # have to do anything special.
  5020. aix_use_runtimelinking=no
  5021. exp_sym_flag='-Bexport'
  5022. no_entry_flag=
  5023. else
  5024. # If we're using GNU nm, then we don't want the "-C" option.
  5025. # -C means demangle to GNU nm, but means don't demangle to AIX nm.
  5026. # Without the "-l" option, or with the "-B" option, AIX nm treats
  5027. # weak defined symbols like other global defined symbols, whereas
  5028. # GNU nm marks them as "W".
  5029. # While the 'weak' keyword is ignored in the Export File, we need
  5030. # it in the Import File for the 'aix-soname' feature, so we have
  5031. # to replace the "-B" option with "-P" for AIX nm.
  5032. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  5033. _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'
  5034. else
  5035. _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 == "L") || (\$ 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'
  5036. fi
  5037. aix_use_runtimelinking=no
  5038. # Test if we are trying to use run time linking or normal
  5039. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  5040. # have runtime linking enabled, and use it for executables.
  5041. # For shared libraries, we enable/disable runtime linking
  5042. # depending on the kind of the shared library created -
  5043. # when "with_aix_soname,aix_use_runtimelinking" is:
  5044. # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
  5045. # "aix,yes" lib.so shared, rtl:yes, for executables
  5046. # lib.a static archive
  5047. # "both,no" lib.so.V(shr.o) shared, rtl:yes
  5048. # lib.a(lib.so.V) shared, rtl:no, for executables
  5049. # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
  5050. # lib.a(lib.so.V) shared, rtl:no
  5051. # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
  5052. # lib.a static archive
  5053. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  5054. for ld_flag in $LDFLAGS; do
  5055. if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
  5056. aix_use_runtimelinking=yes
  5057. break
  5058. fi
  5059. done
  5060. if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
  5061. # With aix-soname=svr4, we create the lib.so.V shared archives only,
  5062. # so we don't have lib.a shared libs to link our executables.
  5063. # We have to force runtime linking in this case.
  5064. aix_use_runtimelinking=yes
  5065. LDFLAGS="$LDFLAGS -Wl,-brtl"
  5066. fi
  5067. ;;
  5068. esac
  5069. exp_sym_flag='-bexport'
  5070. no_entry_flag='-bnoentry'
  5071. fi
  5072. # When large executables or shared objects are built, AIX ld can
  5073. # have problems creating the table of contents. If linking a library
  5074. # or program results in "error TOC overflow" add -mminimal-toc to
  5075. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  5076. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  5077. _LT_TAGVAR(archive_cmds, $1)=''
  5078. _LT_TAGVAR(hardcode_direct, $1)=yes
  5079. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5080. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5081. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5082. _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
  5083. case $with_aix_soname,$aix_use_runtimelinking in
  5084. aix,*) ;; # traditional, no import file
  5085. svr4,* | *,yes) # use import file
  5086. # The Import File defines what to hardcode.
  5087. _LT_TAGVAR(hardcode_direct, $1)=no
  5088. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  5089. ;;
  5090. esac
  5091. if test yes = "$GCC"; then
  5092. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  5093. # We only want to do this on AIX 4.2 and lower, the check
  5094. # below for broken collect2 doesn't work under 4.3+
  5095. collect2name=`$CC -print-prog-name=collect2`
  5096. if test -f "$collect2name" &&
  5097. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  5098. then
  5099. # We have reworked collect2
  5100. :
  5101. else
  5102. # We have old collect2
  5103. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  5104. # It fails to find uninstalled libraries when the uninstalled
  5105. # path is not listed in the libpath. Setting hardcode_minus_L
  5106. # to unsupported forces relinking
  5107. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5108. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5109. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5110. fi
  5111. ;;
  5112. esac
  5113. shared_flag='-shared'
  5114. if test yes = "$aix_use_runtimelinking"; then
  5115. shared_flag="$shared_flag "'$wl-G'
  5116. fi
  5117. # Need to ensure runtime linking is disabled for the traditional
  5118. # shared library, or the linker may eventually find shared libraries
  5119. # /with/ Import File - we do not want to mix them.
  5120. shared_flag_aix='-shared'
  5121. shared_flag_svr4='-shared $wl-G'
  5122. else
  5123. # not using gcc
  5124. if test ia64 = "$host_cpu"; then
  5125. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  5126. # chokes on -Wl,-G. The following line is correct:
  5127. shared_flag='-G'
  5128. else
  5129. if test yes = "$aix_use_runtimelinking"; then
  5130. shared_flag='$wl-G'
  5131. else
  5132. shared_flag='$wl-bM:SRE'
  5133. fi
  5134. shared_flag_aix='$wl-bM:SRE'
  5135. shared_flag_svr4='$wl-G'
  5136. fi
  5137. fi
  5138. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
  5139. # It seems that -bexpall does not export symbols beginning with
  5140. # underscore (_), so it is better to generate a list of symbols to export.
  5141. _LT_TAGVAR(always_export_symbols, $1)=yes
  5142. if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
  5143. # Warning - without using the other runtime loading flags (-brtl),
  5144. # -berok will link without error, but may produce a broken library.
  5145. _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
  5146. # Determine the default libpath from the value encoded in an
  5147. # empty executable.
  5148. _LT_SYS_MODULE_PATH_AIX([$1])
  5149. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
  5150. _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
  5151. else
  5152. if test ia64 = "$host_cpu"; then
  5153. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
  5154. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  5155. _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"
  5156. else
  5157. # Determine the default libpath from the value encoded in an
  5158. # empty executable.
  5159. _LT_SYS_MODULE_PATH_AIX([$1])
  5160. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
  5161. # Warning - without using the other run time loading flags,
  5162. # -berok will link without error, but may produce a broken library.
  5163. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
  5164. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
  5165. if test yes = "$with_gnu_ld"; then
  5166. # We only use this code for GNU lds that support --whole-archive.
  5167. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
  5168. else
  5169. # Exported symbols can be pulled into shared objects from archives
  5170. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  5171. fi
  5172. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5173. _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
  5174. # -brtl affects multiple linker settings, -berok does not and is overridden later
  5175. compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
  5176. if test svr4 != "$with_aix_soname"; then
  5177. # This is similar to how AIX traditionally builds its shared libraries.
  5178. _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'
  5179. fi
  5180. if test aix != "$with_aix_soname"; then
  5181. _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'
  5182. else
  5183. # used by -dlpreopen to get the symbols
  5184. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
  5185. fi
  5186. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
  5187. fi
  5188. fi
  5189. ;;
  5190. amigaos*)
  5191. case $host_cpu in
  5192. powerpc)
  5193. # see comment about AmigaOS4 .so support
  5194. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  5195. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  5196. ;;
  5197. m68k)
  5198. _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)'
  5199. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5200. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5201. ;;
  5202. esac
  5203. ;;
  5204. bsdi[[45]]*)
  5205. _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
  5206. ;;
  5207. cygwin* | mingw* | windows* | pw32* | cegcc*)
  5208. # When not using gcc, we currently assume that we are using
  5209. # Microsoft Visual C++ or Intel C++ Compiler.
  5210. # hardcode_libdir_flag_spec is actually meaningless, as there is
  5211. # no search path for DLLs.
  5212. case $cc_basename in
  5213. cl* | icl*)
  5214. # Native MSVC or ICC
  5215. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  5216. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5217. _LT_TAGVAR(always_export_symbols, $1)=yes
  5218. _LT_TAGVAR(file_list_spec, $1)='@'
  5219. # Tell ltmain to make .lib files, not .a files.
  5220. libext=lib
  5221. # Tell ltmain to make .dll files, not .so files.
  5222. shrext_cmds=.dll
  5223. # FIXME: Setting linknames here is a bad hack.
  5224. _LT_TAGVAR(archive_cmds, $1)='$CC -Fe$output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
  5225. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  5226. cp "$export_symbols" "$output_objdir/$soname.def";
  5227. echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
  5228. else
  5229. $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
  5230. fi~
  5231. $CC -Fe$tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  5232. linknames='
  5233. # The linker will not automatically build a static lib if we build a DLL.
  5234. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  5235. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5236. _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  5237. _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'
  5238. # Don't use ranlib
  5239. _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  5240. _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  5241. lt_tool_outputfile="@TOOL_OUTPUT@"~
  5242. case $lt_outputfile in
  5243. *.exe|*.EXE) ;;
  5244. *)
  5245. lt_outputfile=$lt_outputfile.exe
  5246. lt_tool_outputfile=$lt_tool_outputfile.exe
  5247. ;;
  5248. esac~
  5249. if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
  5250. $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  5251. $RM "$lt_outputfile.manifest";
  5252. fi'
  5253. ;;
  5254. *)
  5255. # Assume MSVC and ICC wrapper
  5256. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  5257. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5258. # Tell ltmain to make .lib files, not .a files.
  5259. libext=lib
  5260. # Tell ltmain to make .dll files, not .so files.
  5261. shrext_cmds=.dll
  5262. # FIXME: Setting linknames here is a bad hack.
  5263. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
  5264. # The linker will automatically build a .lib file if we build a DLL.
  5265. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  5266. # FIXME: Should let the user specify the lib program.
  5267. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
  5268. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5269. ;;
  5270. esac
  5271. ;;
  5272. darwin* | rhapsody*)
  5273. _LT_DARWIN_LINKER_FEATURES($1)
  5274. ;;
  5275. dgux*)
  5276. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5277. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5278. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5279. ;;
  5280. # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  5281. # support. Future versions do this automatically, but an explicit c++rt0.o
  5282. # does not break anything, and helps significantly (at the cost of a little
  5283. # extra space).
  5284. freebsd2.2*)
  5285. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
  5286. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5287. _LT_TAGVAR(hardcode_direct, $1)=yes
  5288. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5289. ;;
  5290. # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  5291. freebsd2.*)
  5292. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  5293. _LT_TAGVAR(hardcode_direct, $1)=yes
  5294. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5295. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5296. ;;
  5297. # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  5298. freebsd* | dragonfly* | midnightbsd*)
  5299. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5300. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5301. _LT_TAGVAR(hardcode_direct, $1)=yes
  5302. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5303. ;;
  5304. hpux9*)
  5305. if test yes = "$GCC"; then
  5306. _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'
  5307. else
  5308. _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'
  5309. fi
  5310. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  5311. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5312. _LT_TAGVAR(hardcode_direct, $1)=yes
  5313. # hardcode_minus_L: Not really in the search PATH,
  5314. # but as the default location of the library.
  5315. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5316. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  5317. ;;
  5318. hpux10*)
  5319. if test yes,no = "$GCC,$with_gnu_ld"; then
  5320. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  5321. else
  5322. _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
  5323. fi
  5324. if test no = "$with_gnu_ld"; then
  5325. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  5326. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5327. _LT_TAGVAR(hardcode_direct, $1)=yes
  5328. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5329. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  5330. # hardcode_minus_L: Not really in the search PATH,
  5331. # but as the default location of the library.
  5332. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5333. fi
  5334. ;;
  5335. hpux11*)
  5336. if test yes,no = "$GCC,$with_gnu_ld"; then
  5337. case $host_cpu in
  5338. hppa*64*)
  5339. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
  5340. ;;
  5341. ia64*)
  5342. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  5343. ;;
  5344. *)
  5345. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  5346. ;;
  5347. esac
  5348. else
  5349. case $host_cpu in
  5350. hppa*64*)
  5351. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
  5352. ;;
  5353. ia64*)
  5354. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  5355. ;;
  5356. *)
  5357. m4_if($1, [], [
  5358. # Older versions of the 11.00 compiler do not understand -b yet
  5359. # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
  5360. _LT_LINKER_OPTION([if $CC understands -b],
  5361. _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
  5362. [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
  5363. [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
  5364. [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
  5365. ;;
  5366. esac
  5367. fi
  5368. if test no = "$with_gnu_ld"; then
  5369. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  5370. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5371. case $host_cpu in
  5372. hppa*64*|ia64*)
  5373. _LT_TAGVAR(hardcode_direct, $1)=no
  5374. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5375. ;;
  5376. *)
  5377. _LT_TAGVAR(hardcode_direct, $1)=yes
  5378. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5379. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  5380. # hardcode_minus_L: Not really in the search PATH,
  5381. # but as the default location of the library.
  5382. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5383. ;;
  5384. esac
  5385. fi
  5386. ;;
  5387. irix5* | irix6* | nonstopux*)
  5388. if test yes = "$GCC"; then
  5389. _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'
  5390. # Try to use the -exported_symbol ld option, if it does not
  5391. # work, assume that -exports_file does not work either and
  5392. # implicitly export all symbols.
  5393. # This should be the same for all languages, so no per-tag cache variable.
  5394. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
  5395. [lt_cv_irix_exported_symbol],
  5396. [save_LDFLAGS=$LDFLAGS
  5397. LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
  5398. AC_LINK_IFELSE(
  5399. [AC_LANG_SOURCE(
  5400. [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
  5401. [C++], [[int foo (void) { return 0; }]],
  5402. [Fortran 77], [[
  5403. subroutine foo
  5404. end]],
  5405. [Fortran], [[
  5406. subroutine foo
  5407. end]])])],
  5408. [lt_cv_irix_exported_symbol=yes],
  5409. [lt_cv_irix_exported_symbol=no])
  5410. LDFLAGS=$save_LDFLAGS])
  5411. if test yes = "$lt_cv_irix_exported_symbol"; then
  5412. _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'
  5413. fi
  5414. else
  5415. _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'
  5416. _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'
  5417. fi
  5418. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  5419. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5420. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5421. _LT_TAGVAR(inherit_rpath, $1)=yes
  5422. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5423. ;;
  5424. linux*)
  5425. case $cc_basename in
  5426. tcc*)
  5427. # Fabrice Bellard et al's Tiny C Compiler
  5428. _LT_TAGVAR(ld_shlibs, $1)=yes
  5429. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5430. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5431. ;;
  5432. esac
  5433. ;;
  5434. *-mlibc)
  5435. ;;
  5436. netbsd* | netbsdelf*-gnu)
  5437. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  5438. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
  5439. else
  5440. _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
  5441. fi
  5442. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5443. _LT_TAGVAR(hardcode_direct, $1)=yes
  5444. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5445. ;;
  5446. newsos6)
  5447. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5448. _LT_TAGVAR(hardcode_direct, $1)=yes
  5449. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5450. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5451. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5452. ;;
  5453. *nto* | *qnx*)
  5454. ;;
  5455. openbsd*)
  5456. if test -f /usr/libexec/ld.so; then
  5457. _LT_TAGVAR(hardcode_direct, $1)=yes
  5458. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5459. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5460. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
  5461. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5462. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
  5463. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  5464. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  5465. else
  5466. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5467. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  5468. fi
  5469. else
  5470. _LT_TAGVAR(ld_shlibs, $1)=no
  5471. fi
  5472. ;;
  5473. os2*)
  5474. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5475. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5476. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5477. shrext_cmds=.dll
  5478. _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  5479. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  5480. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  5481. $ECHO EXPORTS >> $output_objdir/$libname.def~
  5482. emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
  5483. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  5484. emximp -o $lib $output_objdir/$libname.def'
  5485. _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  5486. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  5487. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  5488. $ECHO EXPORTS >> $output_objdir/$libname.def~
  5489. prefix_cmds="$SED"~
  5490. if test EXPORTS = "`$SED 1q $export_symbols`"; then
  5491. prefix_cmds="$prefix_cmds -e 1d";
  5492. fi~
  5493. prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
  5494. cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
  5495. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  5496. emximp -o $lib $output_objdir/$libname.def'
  5497. _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
  5498. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5499. _LT_TAGVAR(file_list_spec, $1)='@'
  5500. ;;
  5501. osf3*)
  5502. if test yes = "$GCC"; then
  5503. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
  5504. _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'
  5505. else
  5506. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  5507. _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'
  5508. fi
  5509. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  5510. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5511. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5512. ;;
  5513. osf4* | osf5*) # as osf3* with the addition of -msym flag
  5514. if test yes = "$GCC"; then
  5515. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
  5516. _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'
  5517. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5518. else
  5519. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  5520. _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'
  5521. _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~
  5522. $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'
  5523. # Both c and cxx compiler support -rpath directly
  5524. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  5525. fi
  5526. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  5527. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5528. ;;
  5529. serenity*)
  5530. ;;
  5531. solaris*)
  5532. _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
  5533. if test yes = "$GCC"; then
  5534. wlarc='$wl'
  5535. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
  5536. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5537. $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'
  5538. else
  5539. case `$CC -V 2>&1` in
  5540. *"Compilers 5.0"*)
  5541. wlarc=''
  5542. _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5543. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5544. $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
  5545. ;;
  5546. *)
  5547. wlarc='$wl'
  5548. _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
  5549. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5550. $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
  5551. ;;
  5552. esac
  5553. fi
  5554. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5555. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5556. case $host_os in
  5557. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  5558. *)
  5559. # The compiler driver will combine and reorder linker options,
  5560. # but understands '-z linker_flag'. GCC discards it without '$wl',
  5561. # but is careful enough not to reorder.
  5562. # Supported since Solaris 2.6 (maybe 2.5.1?)
  5563. if test yes = "$GCC"; then
  5564. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
  5565. else
  5566. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  5567. fi
  5568. ;;
  5569. esac
  5570. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5571. ;;
  5572. sunos4*)
  5573. if test sequent = "$host_vendor"; then
  5574. # Use $CC to link under sequent, because it throws in some extra .o
  5575. # files that make .init and .fini sections work.
  5576. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
  5577. else
  5578. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
  5579. fi
  5580. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5581. _LT_TAGVAR(hardcode_direct, $1)=yes
  5582. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5583. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5584. ;;
  5585. sysv4)
  5586. case $host_vendor in
  5587. sni)
  5588. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5589. _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
  5590. ;;
  5591. siemens)
  5592. ## LD is ld it makes a PLAMLIB
  5593. ## CC just makes a GrossModule.
  5594. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  5595. _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
  5596. _LT_TAGVAR(hardcode_direct, $1)=no
  5597. ;;
  5598. motorola)
  5599. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5600. _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
  5601. ;;
  5602. esac
  5603. runpath_var='LD_RUN_PATH'
  5604. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5605. ;;
  5606. sysv4.3*)
  5607. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5608. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5609. _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
  5610. ;;
  5611. sysv4*MP*)
  5612. if test -d /usr/nec; then
  5613. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5614. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5615. runpath_var=LD_RUN_PATH
  5616. hardcode_runpath_var=yes
  5617. _LT_TAGVAR(ld_shlibs, $1)=yes
  5618. fi
  5619. ;;
  5620. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  5621. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  5622. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5623. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5624. runpath_var='LD_RUN_PATH'
  5625. if test yes = "$GCC"; then
  5626. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5627. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5628. else
  5629. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5630. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5631. fi
  5632. ;;
  5633. sysv5* | sco3.2v5* | sco5v6*)
  5634. # Note: We CANNOT use -z defs as we might desire, because we do not
  5635. # link with -lc, and that would cause any symbols used from libc to
  5636. # always be unresolved, which means just about no library would
  5637. # ever link correctly. If we're not using GNU ld we use -z text
  5638. # though, which does catch some bad symbols but isn't as heavy-handed
  5639. # as -z defs.
  5640. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  5641. _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
  5642. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5643. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5644. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
  5645. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5646. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5647. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
  5648. runpath_var='LD_RUN_PATH'
  5649. if test yes = "$GCC"; then
  5650. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5651. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5652. else
  5653. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5654. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5655. fi
  5656. ;;
  5657. uts4*)
  5658. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5659. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5660. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5661. ;;
  5662. *)
  5663. _LT_TAGVAR(ld_shlibs, $1)=no
  5664. ;;
  5665. esac
  5666. if test sni = "$host_vendor"; then
  5667. case $host in
  5668. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  5669. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
  5670. ;;
  5671. esac
  5672. fi
  5673. fi
  5674. ])
  5675. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  5676. test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
  5677. _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
  5678. _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
  5679. _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
  5680. _LT_DECL([], [extract_expsyms_cmds], [2],
  5681. [The commands to extract the exported symbol list from a shared archive])
  5682. #
  5683. # Do we need to explicitly link libc?
  5684. #
  5685. case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
  5686. x|xyes)
  5687. # Assume -lc should be added
  5688. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5689. if test yes,yes = "$GCC,$enable_shared"; then
  5690. case $_LT_TAGVAR(archive_cmds, $1) in
  5691. *'~'*)
  5692. # FIXME: we may have to deal with multi-command sequences.
  5693. ;;
  5694. '$CC '*)
  5695. # Test whether the compiler implicitly links with -lc since on some
  5696. # systems, -lgcc has to come before -lc. If gcc already passes -lc
  5697. # to ld, don't add -lc before -lgcc.
  5698. AC_CACHE_CHECK([whether -lc should be explicitly linked in],
  5699. [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
  5700. [$RM conftest*
  5701. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  5702. if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
  5703. soname=conftest
  5704. lib=conftest
  5705. libobjs=conftest.$ac_objext
  5706. deplibs=
  5707. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
  5708. pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
  5709. compiler_flags=-v
  5710. linker_flags=-v
  5711. verstring=
  5712. output_objdir=.
  5713. libname=conftest
  5714. lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
  5715. _LT_TAGVAR(allow_undefined_flag, $1)=
  5716. if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
  5717. then
  5718. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5719. else
  5720. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5721. fi
  5722. _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
  5723. else
  5724. cat conftest.err 1>&5
  5725. fi
  5726. $RM conftest*
  5727. ])
  5728. _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
  5729. ;;
  5730. esac
  5731. fi
  5732. ;;
  5733. esac
  5734. _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
  5735. [Whether or not to add -lc for building shared libraries])
  5736. _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
  5737. [enable_shared_with_static_runtimes], [0],
  5738. [Whether or not to disallow shared libs when runtime libs are static])
  5739. _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
  5740. [Compiler flag to allow reflexive dlopens])
  5741. _LT_TAGDECL([], [whole_archive_flag_spec], [1],
  5742. [Compiler flag to generate shared objects directly from archives])
  5743. _LT_TAGDECL([], [compiler_needs_object], [1],
  5744. [Whether the compiler copes with passing no objects directly])
  5745. _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
  5746. [Create an old-style archive from a shared archive])
  5747. _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
  5748. [Create a temporary old-style archive to link instead of a shared archive])
  5749. _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
  5750. _LT_TAGDECL([], [archive_expsym_cmds], [2])
  5751. _LT_TAGDECL([], [module_cmds], [2],
  5752. [Commands used to build a loadable module if different from building
  5753. a shared archive.])
  5754. _LT_TAGDECL([], [module_expsym_cmds], [2])
  5755. _LT_TAGDECL([], [with_gnu_ld], [1],
  5756. [Whether we are building with GNU ld or not])
  5757. _LT_TAGDECL([], [allow_undefined_flag], [1],
  5758. [Flag that allows shared libraries with undefined symbols to be built])
  5759. _LT_TAGDECL([], [no_undefined_flag], [1],
  5760. [Flag that enforces no undefined symbols])
  5761. _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
  5762. [Flag to hardcode $libdir into a binary during linking.
  5763. This must work even if $libdir does not exist])
  5764. _LT_TAGDECL([], [hardcode_libdir_separator], [1],
  5765. [Whether we need a single "-rpath" flag with a separated argument])
  5766. _LT_TAGDECL([], [hardcode_direct], [0],
  5767. [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
  5768. DIR into the resulting binary])
  5769. _LT_TAGDECL([], [hardcode_direct_absolute], [0],
  5770. [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
  5771. DIR into the resulting binary and the resulting library dependency is
  5772. "absolute", i.e. impossible to change by setting $shlibpath_var if the
  5773. library is relocated])
  5774. _LT_TAGDECL([], [hardcode_minus_L], [0],
  5775. [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
  5776. into the resulting binary])
  5777. _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
  5778. [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
  5779. into the resulting binary])
  5780. _LT_TAGDECL([], [hardcode_automatic], [0],
  5781. [Set to "yes" if building a shared library automatically hardcodes DIR
  5782. into the library and all subsequent libraries and executables linked
  5783. against it])
  5784. _LT_TAGDECL([], [inherit_rpath], [0],
  5785. [Set to yes if linker adds runtime paths of dependent libraries
  5786. to runtime path list])
  5787. _LT_TAGDECL([], [link_all_deplibs], [0],
  5788. [Whether libtool must link a program against all its dependency libraries])
  5789. _LT_TAGDECL([], [always_export_symbols], [0],
  5790. [Set to "yes" if exported symbols are required])
  5791. _LT_TAGDECL([], [export_symbols_cmds], [2],
  5792. [The commands to list exported symbols])
  5793. _LT_TAGDECL([], [exclude_expsyms], [1],
  5794. [Symbols that should not be listed in the preloaded symbols])
  5795. _LT_TAGDECL([], [include_expsyms], [1],
  5796. [Symbols that must always be exported])
  5797. _LT_TAGDECL([], [prelink_cmds], [2],
  5798. [Commands necessary for linking programs (against libraries) with templates])
  5799. _LT_TAGDECL([], [postlink_cmds], [2],
  5800. [Commands necessary for finishing linking programs])
  5801. _LT_TAGDECL([], [file_list_spec], [1],
  5802. [Specify filename containing input files])
  5803. dnl FIXME: Not yet implemented
  5804. dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
  5805. dnl [Compiler flag to generate thread safe objects])
  5806. ])# _LT_LINKER_SHLIBS
  5807. # _LT_LANG_C_CONFIG([TAG])
  5808. # ------------------------
  5809. # Ensure that the configuration variables for a C compiler are suitably
  5810. # defined. These variables are subsequently used by _LT_CONFIG to write
  5811. # the compiler configuration to 'libtool'.
  5812. m4_defun([_LT_LANG_C_CONFIG],
  5813. [m4_require([_LT_DECL_EGREP])dnl
  5814. lt_save_CC=$CC
  5815. AC_LANG_PUSH(C)
  5816. # Source file extension for C test sources.
  5817. ac_ext=c
  5818. # Object file extension for compiled C test sources.
  5819. objext=o
  5820. _LT_TAGVAR(objext, $1)=$objext
  5821. # Code to be used in simple compile tests
  5822. lt_simple_compile_test_code="int some_variable = 0;"
  5823. # Code to be used in simple link tests
  5824. lt_simple_link_test_code='int main(void){return(0);}'
  5825. _LT_TAG_COMPILER
  5826. # Save the default compiler, since it gets overwritten when the other
  5827. # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
  5828. compiler_DEFAULT=$CC
  5829. # save warnings/boilerplate of simple test code
  5830. _LT_COMPILER_BOILERPLATE
  5831. _LT_LINKER_BOILERPLATE
  5832. ## CAVEAT EMPTOR:
  5833. ## There is no encapsulation within the following macros, do not change
  5834. ## the running order or otherwise move them around unless you know exactly
  5835. ## what you are doing...
  5836. if test -n "$compiler"; then
  5837. _LT_COMPILER_NO_RTTI($1)
  5838. _LT_COMPILER_PIC($1)
  5839. _LT_COMPILER_C_O($1)
  5840. _LT_COMPILER_FILE_LOCKS($1)
  5841. _LT_LINKER_SHLIBS($1)
  5842. _LT_SYS_DYNAMIC_LINKER($1)
  5843. _LT_LINKER_HARDCODE_LIBPATH($1)
  5844. LT_SYS_DLOPEN_SELF
  5845. _LT_CMD_STRIPLIB
  5846. # Report what library types will actually be built
  5847. AC_MSG_CHECKING([if libtool supports shared libraries])
  5848. AC_MSG_RESULT([$can_build_shared])
  5849. AC_MSG_CHECKING([whether to build shared libraries])
  5850. test no = "$can_build_shared" && enable_shared=no
  5851. # On AIX, shared libraries and static libraries use the same namespace, and
  5852. # are all built from PIC.
  5853. case $host_os in
  5854. aix3*)
  5855. test yes = "$enable_shared" && enable_static=no
  5856. if test -n "$RANLIB"; then
  5857. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  5858. postinstall_cmds='$RANLIB $lib'
  5859. fi
  5860. ;;
  5861. aix[[4-9]]*)
  5862. if test ia64 != "$host_cpu"; then
  5863. case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
  5864. yes,aix,yes) ;; # shared object as lib.so file only
  5865. yes,svr4,*) ;; # shared object as lib.so archive member only
  5866. yes,*) enable_static=no ;; # shared object in lib.a archive as well
  5867. esac
  5868. fi
  5869. ;;
  5870. esac
  5871. AC_MSG_RESULT([$enable_shared])
  5872. AC_MSG_CHECKING([whether to build static libraries])
  5873. # Make sure either enable_shared or enable_static is yes.
  5874. test yes = "$enable_shared" || enable_static=yes
  5875. AC_MSG_RESULT([$enable_static])
  5876. _LT_CONFIG($1)
  5877. fi
  5878. AC_LANG_POP
  5879. CC=$lt_save_CC
  5880. ])# _LT_LANG_C_CONFIG
  5881. # _LT_LANG_CXX_CONFIG([TAG])
  5882. # --------------------------
  5883. # Ensure that the configuration variables for a C++ compiler are suitably
  5884. # defined. These variables are subsequently used by _LT_CONFIG to write
  5885. # the compiler configuration to 'libtool'.
  5886. m4_defun([_LT_LANG_CXX_CONFIG],
  5887. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  5888. m4_require([_LT_DECL_EGREP])dnl
  5889. m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  5890. if test -n "$CXX" && ( test no != "$CXX" &&
  5891. ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
  5892. (test g++ != "$CXX"))); then
  5893. AC_PROG_CXXCPP
  5894. else
  5895. _lt_caught_CXX_error=yes
  5896. fi
  5897. AC_LANG_PUSH(C++)
  5898. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5899. _LT_TAGVAR(allow_undefined_flag, $1)=
  5900. _LT_TAGVAR(always_export_symbols, $1)=no
  5901. _LT_TAGVAR(archive_expsym_cmds, $1)=
  5902. _LT_TAGVAR(compiler_needs_object, $1)=no
  5903. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  5904. _LT_TAGVAR(hardcode_direct, $1)=no
  5905. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  5906. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  5907. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5908. _LT_TAGVAR(hardcode_minus_L, $1)=no
  5909. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  5910. _LT_TAGVAR(hardcode_automatic, $1)=no
  5911. _LT_TAGVAR(inherit_rpath, $1)=no
  5912. _LT_TAGVAR(module_cmds, $1)=
  5913. _LT_TAGVAR(module_expsym_cmds, $1)=
  5914. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  5915. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  5916. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  5917. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  5918. _LT_TAGVAR(no_undefined_flag, $1)=
  5919. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5920. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  5921. # Source file extension for C++ test sources.
  5922. ac_ext=cpp
  5923. # Object file extension for compiled C++ test sources.
  5924. objext=o
  5925. _LT_TAGVAR(objext, $1)=$objext
  5926. # No sense in running all these tests if we already determined that
  5927. # the CXX compiler isn't working. Some variables (like enable_shared)
  5928. # are currently assumed to apply to all compilers on this platform,
  5929. # and will be corrupted by setting them based on a non-working compiler.
  5930. if test yes != "$_lt_caught_CXX_error"; then
  5931. # Code to be used in simple compile tests
  5932. lt_simple_compile_test_code="int some_variable = 0;"
  5933. # Code to be used in simple link tests
  5934. lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
  5935. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  5936. _LT_TAG_COMPILER
  5937. # save warnings/boilerplate of simple test code
  5938. _LT_COMPILER_BOILERPLATE
  5939. _LT_LINKER_BOILERPLATE
  5940. # Allow CC to be a program name with arguments.
  5941. lt_save_CC=$CC
  5942. lt_save_CFLAGS=$CFLAGS
  5943. lt_save_LD=$LD
  5944. lt_save_GCC=$GCC
  5945. GCC=$GXX
  5946. lt_save_with_gnu_ld=$with_gnu_ld
  5947. lt_save_path_LD=$lt_cv_path_LD
  5948. if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
  5949. lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
  5950. else
  5951. $as_unset lt_cv_prog_gnu_ld
  5952. fi
  5953. if test -n "${lt_cv_path_LDCXX+set}"; then
  5954. lt_cv_path_LD=$lt_cv_path_LDCXX
  5955. else
  5956. $as_unset lt_cv_path_LD
  5957. fi
  5958. test -z "${LDCXX+set}" || LD=$LDCXX
  5959. CC=${CXX-"c++"}
  5960. CFLAGS=$CXXFLAGS
  5961. compiler=$CC
  5962. _LT_TAGVAR(compiler, $1)=$CC
  5963. _LT_CC_BASENAME([$compiler])
  5964. if test -n "$compiler"; then
  5965. # We don't want -fno-exception when compiling C++ code, so set the
  5966. # no_builtin_flag separately
  5967. if test yes = "$GXX"; then
  5968. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  5969. else
  5970. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  5971. fi
  5972. if test yes = "$GXX"; then
  5973. # Set up default GNU C++ configuration
  5974. LT_PATH_LD
  5975. # Check if GNU C++ uses GNU ld as the underlying linker, since the
  5976. # archiving commands below assume that GNU ld is being used.
  5977. if test yes = "$with_gnu_ld"; then
  5978. _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  5979. _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'
  5980. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5981. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  5982. # If archive_cmds runs LD, not CC, wlarc should be empty
  5983. # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
  5984. # investigate it a little bit more. (MM)
  5985. wlarc='$wl'
  5986. # ancient GNU ld didn't support --whole-archive et. al.
  5987. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
  5988. _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
  5989. else
  5990. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5991. fi
  5992. else
  5993. with_gnu_ld=no
  5994. wlarc=
  5995. # A generic and very simple default shared library creation
  5996. # command for GNU C++ for the case where it uses the native
  5997. # linker, instead of GNU ld. If possible, this setting should
  5998. # overridden to take advantage of the native linker features on
  5999. # the platform it is being used on.
  6000. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  6001. fi
  6002. # Commands to make compiler produce verbose output that lists
  6003. # what "hidden" libraries, object files and flags are used when
  6004. # linking a shared library.
  6005. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [[-]]L"'
  6006. else
  6007. GXX=no
  6008. with_gnu_ld=no
  6009. wlarc=
  6010. fi
  6011. # PORTME: fill in a description of your system's C++ link characteristics
  6012. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  6013. _LT_TAGVAR(ld_shlibs, $1)=yes
  6014. case $host_os in
  6015. aix3*)
  6016. # FIXME: insert proper C++ library support
  6017. _LT_TAGVAR(ld_shlibs, $1)=no
  6018. ;;
  6019. aix[[4-9]]*)
  6020. if test ia64 = "$host_cpu"; then
  6021. # On IA64, the linker does run time linking by default, so we don't
  6022. # have to do anything special.
  6023. aix_use_runtimelinking=no
  6024. exp_sym_flag='-Bexport'
  6025. no_entry_flag=
  6026. else
  6027. aix_use_runtimelinking=no
  6028. # Test if we are trying to use run time linking or normal
  6029. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  6030. # have runtime linking enabled, and use it for executables.
  6031. # For shared libraries, we enable/disable runtime linking
  6032. # depending on the kind of the shared library created -
  6033. # when "with_aix_soname,aix_use_runtimelinking" is:
  6034. # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
  6035. # "aix,yes" lib.so shared, rtl:yes, for executables
  6036. # lib.a static archive
  6037. # "both,no" lib.so.V(shr.o) shared, rtl:yes
  6038. # lib.a(lib.so.V) shared, rtl:no, for executables
  6039. # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
  6040. # lib.a(lib.so.V) shared, rtl:no
  6041. # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
  6042. # lib.a static archive
  6043. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  6044. for ld_flag in $LDFLAGS; do
  6045. case $ld_flag in
  6046. *-brtl*)
  6047. aix_use_runtimelinking=yes
  6048. break
  6049. ;;
  6050. esac
  6051. done
  6052. if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
  6053. # With aix-soname=svr4, we create the lib.so.V shared archives only,
  6054. # so we don't have lib.a shared libs to link our executables.
  6055. # We have to force runtime linking in this case.
  6056. aix_use_runtimelinking=yes
  6057. LDFLAGS="$LDFLAGS -Wl,-brtl"
  6058. fi
  6059. ;;
  6060. esac
  6061. exp_sym_flag='-bexport'
  6062. no_entry_flag='-bnoentry'
  6063. fi
  6064. # When large executables or shared objects are built, AIX ld can
  6065. # have problems creating the table of contents. If linking a library
  6066. # or program results in "error TOC overflow" add -mminimal-toc to
  6067. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  6068. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  6069. _LT_TAGVAR(archive_cmds, $1)=''
  6070. _LT_TAGVAR(hardcode_direct, $1)=yes
  6071. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6072. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  6073. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6074. _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
  6075. case $with_aix_soname,$aix_use_runtimelinking in
  6076. aix,*) ;; # no import file
  6077. svr4,* | *,yes) # use import file
  6078. # The Import File defines what to hardcode.
  6079. _LT_TAGVAR(hardcode_direct, $1)=no
  6080. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  6081. ;;
  6082. esac
  6083. if test yes = "$GXX"; then
  6084. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  6085. # We only want to do this on AIX 4.2 and lower, the check
  6086. # below for broken collect2 doesn't work under 4.3+
  6087. collect2name=`$CC -print-prog-name=collect2`
  6088. if test -f "$collect2name" &&
  6089. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  6090. then
  6091. # We have reworked collect2
  6092. :
  6093. else
  6094. # We have old collect2
  6095. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  6096. # It fails to find uninstalled libraries when the uninstalled
  6097. # path is not listed in the libpath. Setting hardcode_minus_L
  6098. # to unsupported forces relinking
  6099. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  6100. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6101. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  6102. fi
  6103. esac
  6104. shared_flag='-shared'
  6105. if test yes = "$aix_use_runtimelinking"; then
  6106. shared_flag=$shared_flag' $wl-G'
  6107. fi
  6108. # Need to ensure runtime linking is disabled for the traditional
  6109. # shared library, or the linker may eventually find shared libraries
  6110. # /with/ Import File - we do not want to mix them.
  6111. shared_flag_aix='-shared'
  6112. shared_flag_svr4='-shared $wl-G'
  6113. else
  6114. # not using gcc
  6115. if test ia64 = "$host_cpu"; then
  6116. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  6117. # chokes on -Wl,-G. The following line is correct:
  6118. shared_flag='-G'
  6119. else
  6120. if test yes = "$aix_use_runtimelinking"; then
  6121. shared_flag='$wl-G'
  6122. else
  6123. shared_flag='$wl-bM:SRE'
  6124. fi
  6125. shared_flag_aix='$wl-bM:SRE'
  6126. shared_flag_svr4='$wl-G'
  6127. fi
  6128. fi
  6129. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
  6130. # It seems that -bexpall does not export symbols beginning with
  6131. # underscore (_), so it is better to generate a list of symbols to
  6132. # export.
  6133. _LT_TAGVAR(always_export_symbols, $1)=yes
  6134. if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
  6135. # Warning - without using the other runtime loading flags (-brtl),
  6136. # -berok will link without error, but may produce a broken library.
  6137. # The "-G" linker flag allows undefined symbols.
  6138. _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
  6139. # Determine the default libpath from the value encoded in an empty
  6140. # executable.
  6141. _LT_SYS_MODULE_PATH_AIX([$1])
  6142. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
  6143. _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
  6144. else
  6145. if test ia64 = "$host_cpu"; then
  6146. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
  6147. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  6148. _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"
  6149. else
  6150. # Determine the default libpath from the value encoded in an
  6151. # empty executable.
  6152. _LT_SYS_MODULE_PATH_AIX([$1])
  6153. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
  6154. # Warning - without using the other run time loading flags,
  6155. # -berok will link without error, but may produce a broken library.
  6156. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
  6157. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
  6158. if test yes = "$with_gnu_ld"; then
  6159. # We only use this code for GNU lds that support --whole-archive.
  6160. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
  6161. else
  6162. # Exported symbols can be pulled into shared objects from archives
  6163. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  6164. fi
  6165. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  6166. _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
  6167. # -brtl affects multiple linker settings, -berok does not and is overridden later
  6168. compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
  6169. if test svr4 != "$with_aix_soname"; then
  6170. # This is similar to how AIX traditionally builds its shared
  6171. # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
  6172. _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'
  6173. fi
  6174. if test aix != "$with_aix_soname"; then
  6175. _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'
  6176. else
  6177. # used by -dlpreopen to get the symbols
  6178. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
  6179. fi
  6180. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
  6181. fi
  6182. fi
  6183. ;;
  6184. beos*)
  6185. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  6186. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6187. # Joseph Beckenbach <[email protected]> says some releases of gcc
  6188. # support --undefined. This deserves some investigation. FIXME
  6189. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  6190. else
  6191. _LT_TAGVAR(ld_shlibs, $1)=no
  6192. fi
  6193. ;;
  6194. chorus*)
  6195. case $cc_basename in
  6196. *)
  6197. # FIXME: insert proper C++ library support
  6198. _LT_TAGVAR(ld_shlibs, $1)=no
  6199. ;;
  6200. esac
  6201. ;;
  6202. cygwin* | mingw* | windows* | pw32* | cegcc*)
  6203. case $GXX,$cc_basename in
  6204. ,cl* | no,cl* | ,icl* | no,icl*)
  6205. # Native MSVC or ICC
  6206. # hardcode_libdir_flag_spec is actually meaningless, as there is
  6207. # no search path for DLLs.
  6208. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  6209. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6210. _LT_TAGVAR(always_export_symbols, $1)=yes
  6211. _LT_TAGVAR(file_list_spec, $1)='@'
  6212. # Tell ltmain to make .lib files, not .a files.
  6213. libext=lib
  6214. # Tell ltmain to make .dll files, not .so files.
  6215. shrext_cmds=.dll
  6216. # FIXME: Setting linknames here is a bad hack.
  6217. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
  6218. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  6219. cp "$export_symbols" "$output_objdir/$soname.def";
  6220. echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
  6221. else
  6222. $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
  6223. fi~
  6224. $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  6225. linknames='
  6226. # The linker will not automatically build a static lib if we build a DLL.
  6227. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  6228. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  6229. # Don't use ranlib
  6230. _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  6231. _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  6232. lt_tool_outputfile="@TOOL_OUTPUT@"~
  6233. case $lt_outputfile in
  6234. *.exe|*.EXE) ;;
  6235. *)
  6236. lt_outputfile=$lt_outputfile.exe
  6237. lt_tool_outputfile=$lt_tool_outputfile.exe
  6238. ;;
  6239. esac~
  6240. func_to_tool_file "$lt_outputfile"~
  6241. if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
  6242. $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  6243. $RM "$lt_outputfile.manifest";
  6244. fi'
  6245. ;;
  6246. *)
  6247. # g++
  6248. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  6249. # as there is no search path for DLLs.
  6250. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6251. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
  6252. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6253. _LT_TAGVAR(always_export_symbols, $1)=no
  6254. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  6255. _LT_TAGVAR(file_list_spec, $1)='@'
  6256. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  6257. _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'
  6258. # If the export-symbols file already is a .def file, use it as
  6259. # is; otherwise, prepend EXPORTS...
  6260. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  6261. cp $export_symbols $output_objdir/$soname.def;
  6262. else
  6263. echo EXPORTS > $output_objdir/$soname.def;
  6264. cat $export_symbols >> $output_objdir/$soname.def;
  6265. fi~
  6266. $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'
  6267. else
  6268. _LT_TAGVAR(ld_shlibs, $1)=no
  6269. fi
  6270. ;;
  6271. esac
  6272. ;;
  6273. darwin* | rhapsody*)
  6274. _LT_DARWIN_LINKER_FEATURES($1)
  6275. ;;
  6276. os2*)
  6277. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6278. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  6279. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6280. shrext_cmds=.dll
  6281. _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  6282. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  6283. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  6284. $ECHO EXPORTS >> $output_objdir/$libname.def~
  6285. emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
  6286. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  6287. emximp -o $lib $output_objdir/$libname.def'
  6288. _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  6289. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  6290. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  6291. $ECHO EXPORTS >> $output_objdir/$libname.def~
  6292. prefix_cmds="$SED"~
  6293. if test EXPORTS = "`$SED 1q $export_symbols`"; then
  6294. prefix_cmds="$prefix_cmds -e 1d";
  6295. fi~
  6296. prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
  6297. cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
  6298. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  6299. emximp -o $lib $output_objdir/$libname.def'
  6300. _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
  6301. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  6302. _LT_TAGVAR(file_list_spec, $1)='@'
  6303. ;;
  6304. dgux*)
  6305. case $cc_basename in
  6306. ec++*)
  6307. # FIXME: insert proper C++ library support
  6308. _LT_TAGVAR(ld_shlibs, $1)=no
  6309. ;;
  6310. ghcx*)
  6311. # Green Hills C++ Compiler
  6312. # FIXME: insert proper C++ library support
  6313. _LT_TAGVAR(ld_shlibs, $1)=no
  6314. ;;
  6315. *)
  6316. # FIXME: insert proper C++ library support
  6317. _LT_TAGVAR(ld_shlibs, $1)=no
  6318. ;;
  6319. esac
  6320. ;;
  6321. freebsd2.*)
  6322. # C++ shared libraries reported to be fairly broken before
  6323. # switch to ELF
  6324. _LT_TAGVAR(ld_shlibs, $1)=no
  6325. ;;
  6326. freebsd-elf*)
  6327. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6328. ;;
  6329. freebsd* | dragonfly* | midnightbsd*)
  6330. # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
  6331. # conventions
  6332. _LT_TAGVAR(ld_shlibs, $1)=yes
  6333. ;;
  6334. haiku*)
  6335. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  6336. _LT_TAGVAR(link_all_deplibs, $1)=no
  6337. ;;
  6338. hpux9*)
  6339. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  6340. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6341. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  6342. _LT_TAGVAR(hardcode_direct, $1)=yes
  6343. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  6344. # but as the default
  6345. # location of the library.
  6346. case $cc_basename in
  6347. CC*)
  6348. # FIXME: insert proper C++ library support
  6349. _LT_TAGVAR(ld_shlibs, $1)=no
  6350. ;;
  6351. aCC*)
  6352. _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'
  6353. # Commands to make compiler produce verbose output that lists
  6354. # what "hidden" libraries, object files and flags are used when
  6355. # linking a shared library.
  6356. #
  6357. # There doesn't appear to be a way to prevent this compiler from
  6358. # explicitly linking system object files so we need to strip them
  6359. # from the output so that they don't get included in the library
  6360. # dependencies.
  6361. 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"'
  6362. ;;
  6363. *)
  6364. if test yes = "$GXX"; then
  6365. _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'
  6366. else
  6367. # FIXME: insert proper C++ library support
  6368. _LT_TAGVAR(ld_shlibs, $1)=no
  6369. fi
  6370. ;;
  6371. esac
  6372. ;;
  6373. hpux10*|hpux11*)
  6374. if test no = "$with_gnu_ld"; then
  6375. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  6376. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6377. case $host_cpu in
  6378. hppa*64*|ia64*)
  6379. ;;
  6380. *)
  6381. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  6382. ;;
  6383. esac
  6384. fi
  6385. case $host_cpu in
  6386. hppa*64*|ia64*)
  6387. _LT_TAGVAR(hardcode_direct, $1)=no
  6388. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6389. ;;
  6390. *)
  6391. _LT_TAGVAR(hardcode_direct, $1)=yes
  6392. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6393. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  6394. # but as the default
  6395. # location of the library.
  6396. ;;
  6397. esac
  6398. case $cc_basename in
  6399. CC*)
  6400. # FIXME: insert proper C++ library support
  6401. _LT_TAGVAR(ld_shlibs, $1)=no
  6402. ;;
  6403. aCC*)
  6404. case $host_cpu in
  6405. hppa*64*)
  6406. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6407. ;;
  6408. ia64*)
  6409. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6410. ;;
  6411. *)
  6412. _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'
  6413. ;;
  6414. esac
  6415. # Commands to make compiler produce verbose output that lists
  6416. # what "hidden" libraries, object files and flags are used when
  6417. # linking a shared library.
  6418. #
  6419. # There doesn't appear to be a way to prevent this compiler from
  6420. # explicitly linking system object files so we need to strip them
  6421. # from the output so that they don't get included in the library
  6422. # dependencies.
  6423. 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"'
  6424. ;;
  6425. *)
  6426. if test yes = "$GXX"; then
  6427. if test no = "$with_gnu_ld"; then
  6428. case $host_cpu in
  6429. hppa*64*)
  6430. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6431. ;;
  6432. ia64*)
  6433. _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'
  6434. ;;
  6435. *)
  6436. _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'
  6437. ;;
  6438. esac
  6439. fi
  6440. else
  6441. # FIXME: insert proper C++ library support
  6442. _LT_TAGVAR(ld_shlibs, $1)=no
  6443. fi
  6444. ;;
  6445. esac
  6446. ;;
  6447. interix[[3-9]]*)
  6448. _LT_TAGVAR(hardcode_direct, $1)=no
  6449. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6450. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6451. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  6452. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  6453. # Instead, shared libraries are loaded at an image base (0x10000000 by
  6454. # default) and relocated if they conflict, which is a slow very memory
  6455. # consuming and fragmenting process. To avoid this, we pick a random,
  6456. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  6457. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  6458. _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'
  6459. _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'
  6460. ;;
  6461. irix5* | irix6*)
  6462. case $cc_basename in
  6463. CC*)
  6464. # SGI C++
  6465. _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'
  6466. # Archives containing C++ object files must be created using
  6467. # "CC -ar", where "CC" is the IRIX C++ compiler. This is
  6468. # necessary to make sure instantiated templates are included
  6469. # in the archive.
  6470. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
  6471. ;;
  6472. *)
  6473. if test yes = "$GXX"; then
  6474. if test no = "$with_gnu_ld"; then
  6475. _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'
  6476. else
  6477. _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'
  6478. fi
  6479. fi
  6480. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6481. ;;
  6482. esac
  6483. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  6484. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6485. _LT_TAGVAR(inherit_rpath, $1)=yes
  6486. ;;
  6487. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  6488. case $cc_basename in
  6489. KCC*)
  6490. # Kuck and Associates, Inc. (KAI) C++ Compiler
  6491. # KCC will only create a shared library if the output file
  6492. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  6493. # to its proper name (with version) after linking.
  6494. _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'
  6495. _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'
  6496. # Commands to make compiler produce verbose output that lists
  6497. # what "hidden" libraries, object files and flags are used when
  6498. # linking a shared library.
  6499. #
  6500. # There doesn't appear to be a way to prevent this compiler from
  6501. # explicitly linking system object files so we need to strip them
  6502. # from the output so that they don't get included in the library
  6503. # dependencies.
  6504. 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"'
  6505. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6506. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  6507. # Archives containing C++ object files must be created using
  6508. # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  6509. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  6510. ;;
  6511. icpc* | ecpc* )
  6512. # Intel C++
  6513. with_gnu_ld=yes
  6514. # version 8.0 and above of icpc choke on multiply defined symbols
  6515. # if we add $predep_objects and $postdep_objects, however 7.1 and
  6516. # earlier do not add the objects themselves.
  6517. case `$CC -V 2>&1` in
  6518. *"Version 7."*)
  6519. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  6520. _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'
  6521. ;;
  6522. *) # Version 8.0 or newer
  6523. tmp_idyn=
  6524. case $host_cpu in
  6525. ia64*) tmp_idyn=' -i_dynamic';;
  6526. esac
  6527. _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  6528. _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'
  6529. ;;
  6530. esac
  6531. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6532. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6533. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  6534. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
  6535. ;;
  6536. pgCC* | pgcpp*)
  6537. # Portland Group C++ compiler
  6538. case `$CC -V` in
  6539. *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
  6540. _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
  6541. rm -rf $tpldir~
  6542. $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
  6543. compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
  6544. _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
  6545. rm -rf $tpldir~
  6546. $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
  6547. $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
  6548. $RANLIB $oldlib'
  6549. _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
  6550. rm -rf $tpldir~
  6551. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  6552. $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  6553. _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
  6554. rm -rf $tpldir~
  6555. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  6556. $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'
  6557. ;;
  6558. *) # Version 6 and above use weak symbols
  6559. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  6560. _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'
  6561. ;;
  6562. esac
  6563. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
  6564. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  6565. _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'
  6566. ;;
  6567. cxx*)
  6568. # Compaq C++
  6569. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  6570. _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'
  6571. runpath_var=LD_RUN_PATH
  6572. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  6573. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6574. # Commands to make compiler produce verbose output that lists
  6575. # what "hidden" libraries, object files and flags are used when
  6576. # linking a shared library.
  6577. #
  6578. # There doesn't appear to be a way to prevent this compiler from
  6579. # explicitly linking system object files so we need to strip them
  6580. # from the output so that they don't get included in the library
  6581. # dependencies.
  6582. 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'
  6583. ;;
  6584. xl* | mpixl* | bgxl*)
  6585. # IBM XL 8.0 on PPC, with GNU ld
  6586. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  6587. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  6588. _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  6589. if test yes = "$supports_anon_versioning"; then
  6590. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  6591. cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  6592. echo "local: *; };" >> $output_objdir/$libname.ver~
  6593. $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
  6594. fi
  6595. ;;
  6596. *)
  6597. case `$CC -V 2>&1 | $SED 5q` in
  6598. *Sun\ C*)
  6599. # Sun C++ 5.9
  6600. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  6601. _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6602. _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'
  6603. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6604. _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'
  6605. _LT_TAGVAR(compiler_needs_object, $1)=yes
  6606. # Not sure whether something based on
  6607. # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
  6608. # would be better.
  6609. output_verbose_link_cmd='func_echo_all'
  6610. # Archives containing C++ object files must be created using
  6611. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  6612. # necessary to make sure instantiated templates are included
  6613. # in the archive.
  6614. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  6615. ;;
  6616. esac
  6617. ;;
  6618. esac
  6619. ;;
  6620. lynxos*)
  6621. # FIXME: insert proper C++ library support
  6622. _LT_TAGVAR(ld_shlibs, $1)=no
  6623. ;;
  6624. m88k*)
  6625. # FIXME: insert proper C++ library support
  6626. _LT_TAGVAR(ld_shlibs, $1)=no
  6627. ;;
  6628. mvs*)
  6629. case $cc_basename in
  6630. cxx*)
  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. *-mlibc)
  6641. _LT_TAGVAR(ld_shlibs, $1)=yes
  6642. ;;
  6643. netbsd*)
  6644. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  6645. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
  6646. wlarc=
  6647. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6648. _LT_TAGVAR(hardcode_direct, $1)=yes
  6649. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6650. fi
  6651. # Workaround some broken pre-1.5 toolchains
  6652. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
  6653. ;;
  6654. *nto* | *qnx*)
  6655. _LT_TAGVAR(ld_shlibs, $1)=yes
  6656. ;;
  6657. openbsd*)
  6658. if test -f /usr/libexec/ld.so; then
  6659. _LT_TAGVAR(hardcode_direct, $1)=yes
  6660. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6661. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6662. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  6663. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6664. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
  6665. _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'
  6666. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  6667. _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
  6668. fi
  6669. output_verbose_link_cmd=func_echo_all
  6670. else
  6671. _LT_TAGVAR(ld_shlibs, $1)=no
  6672. fi
  6673. ;;
  6674. osf3* | osf4* | osf5*)
  6675. case $cc_basename in
  6676. KCC*)
  6677. # Kuck and Associates, Inc. (KAI) C++ Compiler
  6678. # KCC will only create a shared library if the output file
  6679. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  6680. # to its proper name (with version) after linking.
  6681. _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'
  6682. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6683. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6684. # Archives containing C++ object files must be created using
  6685. # the KAI C++ compiler.
  6686. case $host in
  6687. osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
  6688. *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
  6689. esac
  6690. ;;
  6691. RCC*)
  6692. # Rational C++ 2.4.1
  6693. # FIXME: insert proper C++ library support
  6694. _LT_TAGVAR(ld_shlibs, $1)=no
  6695. ;;
  6696. cxx*)
  6697. case $host in
  6698. osf3*)
  6699. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
  6700. _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'
  6701. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  6702. ;;
  6703. *)
  6704. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  6705. _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'
  6706. _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
  6707. echo "-hidden">> $lib.exp~
  6708. $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~
  6709. $RM $lib.exp'
  6710. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  6711. ;;
  6712. esac
  6713. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6714. # Commands to make compiler produce verbose output that lists
  6715. # what "hidden" libraries, object files and flags are used when
  6716. # linking a shared library.
  6717. #
  6718. # There doesn't appear to be a way to prevent this compiler from
  6719. # explicitly linking system object files so we need to strip them
  6720. # from the output so that they don't get included in the library
  6721. # dependencies.
  6722. 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"'
  6723. ;;
  6724. *)
  6725. if test yes,no = "$GXX,$with_gnu_ld"; then
  6726. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
  6727. case $host in
  6728. osf3*)
  6729. _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'
  6730. ;;
  6731. *)
  6732. _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'
  6733. ;;
  6734. esac
  6735. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  6736. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6737. # Commands to make compiler produce verbose output that lists
  6738. # what "hidden" libraries, object files and flags are used when
  6739. # linking a shared library.
  6740. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [[-]]L"'
  6741. else
  6742. # FIXME: insert proper C++ library support
  6743. _LT_TAGVAR(ld_shlibs, $1)=no
  6744. fi
  6745. ;;
  6746. esac
  6747. ;;
  6748. psos*)
  6749. # FIXME: insert proper C++ library support
  6750. _LT_TAGVAR(ld_shlibs, $1)=no
  6751. ;;
  6752. serenity*)
  6753. ;;
  6754. sunos4*)
  6755. case $cc_basename in
  6756. CC*)
  6757. # Sun C++ 4.x
  6758. # FIXME: insert proper C++ library support
  6759. _LT_TAGVAR(ld_shlibs, $1)=no
  6760. ;;
  6761. lcc*)
  6762. # Lucid
  6763. # FIXME: insert proper C++ library support
  6764. _LT_TAGVAR(ld_shlibs, $1)=no
  6765. ;;
  6766. *)
  6767. # FIXME: insert proper C++ library support
  6768. _LT_TAGVAR(ld_shlibs, $1)=no
  6769. ;;
  6770. esac
  6771. ;;
  6772. solaris*)
  6773. case $cc_basename in
  6774. CC* | sunCC*)
  6775. # Sun C++ 4.2, 5.x and Centerline C++
  6776. _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
  6777. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  6778. _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6779. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6780. $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'
  6781. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6782. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6783. case $host_os in
  6784. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6785. *)
  6786. # The compiler driver will combine and reorder linker options,
  6787. # but understands '-z linker_flag'.
  6788. # Supported since Solaris 2.6 (maybe 2.5.1?)
  6789. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  6790. ;;
  6791. esac
  6792. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6793. output_verbose_link_cmd='func_echo_all'
  6794. # Archives containing C++ object files must be created using
  6795. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  6796. # necessary to make sure instantiated templates are included
  6797. # in the archive.
  6798. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  6799. ;;
  6800. gcx*)
  6801. # Green Hills C++ Compiler
  6802. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
  6803. # The C++ compiler must be used to create the archive.
  6804. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
  6805. ;;
  6806. *)
  6807. # GNU C++ compiler with Solaris linker
  6808. if test yes,no = "$GXX,$with_gnu_ld"; then
  6809. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
  6810. if $CC --version | $GREP -v '^2\.7' > /dev/null; then
  6811. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
  6812. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6813. $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'
  6814. # Commands to make compiler produce verbose output that lists
  6815. # what "hidden" libraries, object files and flags are used when
  6816. # linking a shared library.
  6817. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [[-]]L"'
  6818. else
  6819. # g++ 2.7 appears to require '-G' NOT '-shared' on this
  6820. # platform.
  6821. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
  6822. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6823. $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'
  6824. # Commands to make compiler produce verbose output that lists
  6825. # what "hidden" libraries, object files and flags are used when
  6826. # linking a shared library.
  6827. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [[-]]L"'
  6828. fi
  6829. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
  6830. case $host_os in
  6831. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6832. *)
  6833. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
  6834. ;;
  6835. esac
  6836. fi
  6837. ;;
  6838. esac
  6839. ;;
  6840. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  6841. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  6842. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6843. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6844. runpath_var='LD_RUN_PATH'
  6845. case $cc_basename in
  6846. CC*)
  6847. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6848. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6849. ;;
  6850. *)
  6851. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6852. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6853. ;;
  6854. esac
  6855. ;;
  6856. sysv5* | sco3.2v5* | sco5v6*)
  6857. # Note: We CANNOT use -z defs as we might desire, because we do not
  6858. # link with -lc, and that would cause any symbols used from libc to
  6859. # always be unresolved, which means just about no library would
  6860. # ever link correctly. If we're not using GNU ld we use -z text
  6861. # though, which does catch some bad symbols but isn't as heavy-handed
  6862. # as -z defs.
  6863. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  6864. _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
  6865. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6866. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6867. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
  6868. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  6869. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6870. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
  6871. runpath_var='LD_RUN_PATH'
  6872. case $cc_basename in
  6873. CC*)
  6874. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6875. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6876. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
  6877. '"$_LT_TAGVAR(old_archive_cmds, $1)"
  6878. _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
  6879. '"$_LT_TAGVAR(reload_cmds, $1)"
  6880. ;;
  6881. *)
  6882. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6883. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6884. ;;
  6885. esac
  6886. ;;
  6887. tandem*)
  6888. case $cc_basename in
  6889. NCC*)
  6890. # NonStop-UX NCC 3.20
  6891. # FIXME: insert proper C++ library support
  6892. _LT_TAGVAR(ld_shlibs, $1)=no
  6893. ;;
  6894. *)
  6895. # FIXME: insert proper C++ library support
  6896. _LT_TAGVAR(ld_shlibs, $1)=no
  6897. ;;
  6898. esac
  6899. ;;
  6900. vxworks*)
  6901. # FIXME: insert proper C++ library support
  6902. _LT_TAGVAR(ld_shlibs, $1)=no
  6903. ;;
  6904. *)
  6905. # FIXME: insert proper C++ library support
  6906. _LT_TAGVAR(ld_shlibs, $1)=no
  6907. ;;
  6908. esac
  6909. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  6910. test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
  6911. _LT_TAGVAR(GCC, $1)=$GXX
  6912. _LT_TAGVAR(LD, $1)=$LD
  6913. ## CAVEAT EMPTOR:
  6914. ## There is no encapsulation within the following macros, do not change
  6915. ## the running order or otherwise move them around unless you know exactly
  6916. ## what you are doing...
  6917. _LT_SYS_HIDDEN_LIBDEPS($1)
  6918. _LT_COMPILER_PIC($1)
  6919. _LT_COMPILER_C_O($1)
  6920. _LT_COMPILER_FILE_LOCKS($1)
  6921. _LT_LINKER_SHLIBS($1)
  6922. _LT_SYS_DYNAMIC_LINKER($1)
  6923. _LT_LINKER_HARDCODE_LIBPATH($1)
  6924. _LT_CONFIG($1)
  6925. fi # test -n "$compiler"
  6926. CC=$lt_save_CC
  6927. CFLAGS=$lt_save_CFLAGS
  6928. LDCXX=$LD
  6929. LD=$lt_save_LD
  6930. GCC=$lt_save_GCC
  6931. with_gnu_ld=$lt_save_with_gnu_ld
  6932. lt_cv_path_LDCXX=$lt_cv_path_LD
  6933. lt_cv_path_LD=$lt_save_path_LD
  6934. lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
  6935. lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
  6936. fi # test yes != "$_lt_caught_CXX_error"
  6937. AC_LANG_POP
  6938. ])# _LT_LANG_CXX_CONFIG
  6939. # _LT_FUNC_STRIPNAME_CNF
  6940. # ----------------------
  6941. # func_stripname_cnf prefix suffix name
  6942. # strip PREFIX and SUFFIX off of NAME.
  6943. # PREFIX and SUFFIX must not contain globbing or regex special
  6944. # characters, hashes, percent signs, but SUFFIX may contain a leading
  6945. # dot (in which case that matches only a dot).
  6946. #
  6947. # This function is identical to the (non-XSI) version of func_stripname,
  6948. # except this one can be used by m4 code that may be executed by configure,
  6949. # rather than the libtool script.
  6950. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
  6951. AC_REQUIRE([_LT_DECL_SED])
  6952. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
  6953. func_stripname_cnf ()
  6954. {
  6955. case @S|@2 in
  6956. .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
  6957. *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
  6958. esac
  6959. } # func_stripname_cnf
  6960. ])# _LT_FUNC_STRIPNAME_CNF
  6961. # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
  6962. # ---------------------------------
  6963. # Figure out "hidden" library dependencies from verbose
  6964. # compiler output when linking a shared library.
  6965. # Parse the compiler output and extract the necessary
  6966. # objects, libraries and library flags.
  6967. m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
  6968. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  6969. AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
  6970. # Dependencies to place before and after the object being linked:
  6971. _LT_TAGVAR(predep_objects, $1)=
  6972. _LT_TAGVAR(postdep_objects, $1)=
  6973. _LT_TAGVAR(predeps, $1)=
  6974. _LT_TAGVAR(postdeps, $1)=
  6975. _LT_TAGVAR(compiler_lib_search_path, $1)=
  6976. dnl we can't use the lt_simple_compile_test_code here,
  6977. dnl because it contains code intended for an executable,
  6978. dnl not a library. It's possible we should let each
  6979. dnl tag define a new lt_????_link_test_code variable,
  6980. dnl but it's only used here...
  6981. m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
  6982. int a;
  6983. void foo (void) { a = 0; }
  6984. _LT_EOF
  6985. ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
  6986. class Foo
  6987. {
  6988. public:
  6989. Foo (void) { a = 0; }
  6990. private:
  6991. int a;
  6992. };
  6993. _LT_EOF
  6994. ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
  6995. subroutine foo
  6996. implicit none
  6997. integer*4 a
  6998. a=0
  6999. return
  7000. end
  7001. _LT_EOF
  7002. ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
  7003. subroutine foo
  7004. implicit none
  7005. integer a
  7006. a=0
  7007. return
  7008. end
  7009. _LT_EOF
  7010. ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
  7011. public class foo {
  7012. private int a;
  7013. public void bar (void) {
  7014. a = 0;
  7015. }
  7016. };
  7017. _LT_EOF
  7018. ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
  7019. package foo
  7020. func foo() {
  7021. }
  7022. _LT_EOF
  7023. ])
  7024. _lt_libdeps_save_CFLAGS=$CFLAGS
  7025. case "$CC $CFLAGS " in #(
  7026. *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
  7027. *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
  7028. *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
  7029. esac
  7030. dnl Parse the compiler output and extract the necessary
  7031. dnl objects, libraries and library flags.
  7032. if AC_TRY_EVAL(ac_compile); then
  7033. # Parse the compiler output and extract the necessary
  7034. # objects, libraries and library flags.
  7035. # Sentinel used to keep track of whether or not we are before
  7036. # the conftest object file.
  7037. pre_test_object_deps_done=no
  7038. for p in `eval "$output_verbose_link_cmd"`; do
  7039. case $prev$p in
  7040. -L* | -R* | -l*)
  7041. # Some compilers place space between "-{L,R,l}" and the path.
  7042. # Remove the space.
  7043. if test x-L = x"$p" ||
  7044. test x-R = x"$p" ||
  7045. test x-l = x"$p"; then
  7046. prev=$p
  7047. continue
  7048. fi
  7049. # Expand the sysroot to ease extracting the directories later.
  7050. if test -z "$prev"; then
  7051. case $p in
  7052. -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
  7053. -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
  7054. -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
  7055. esac
  7056. fi
  7057. case $p in
  7058. =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
  7059. esac
  7060. if test no = "$pre_test_object_deps_done"; then
  7061. case $prev in
  7062. -L | -R)
  7063. # Internal compiler library paths should come after those
  7064. # provided the user. The postdeps already come after the
  7065. # user supplied libs so there is no need to process them.
  7066. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
  7067. _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
  7068. else
  7069. _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
  7070. fi
  7071. ;;
  7072. # The "-l" case would never come before the object being
  7073. # linked, so don't bother handling this case.
  7074. esac
  7075. else
  7076. if test -z "$_LT_TAGVAR(postdeps, $1)"; then
  7077. _LT_TAGVAR(postdeps, $1)=$prev$p
  7078. else
  7079. _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
  7080. fi
  7081. fi
  7082. prev=
  7083. ;;
  7084. *.lto.$objext) ;; # Ignore GCC LTO objects
  7085. *.$objext)
  7086. # This assumes that the test object file only shows up
  7087. # once in the compiler output.
  7088. if test "$p" = "conftest.$objext"; then
  7089. pre_test_object_deps_done=yes
  7090. continue
  7091. fi
  7092. if test no = "$pre_test_object_deps_done"; then
  7093. if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
  7094. _LT_TAGVAR(predep_objects, $1)=$p
  7095. else
  7096. _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
  7097. fi
  7098. else
  7099. if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
  7100. _LT_TAGVAR(postdep_objects, $1)=$p
  7101. else
  7102. _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
  7103. fi
  7104. fi
  7105. ;;
  7106. *) ;; # Ignore the rest.
  7107. esac
  7108. done
  7109. # Clean up.
  7110. rm -f a.out a.exe
  7111. else
  7112. echo "libtool.m4: error: problem compiling $1 test program"
  7113. fi
  7114. $RM -f confest.$objext
  7115. CFLAGS=$_lt_libdeps_save_CFLAGS
  7116. # PORTME: override above test on systems where it is broken
  7117. m4_if([$1], [CXX],
  7118. [case $host_os in
  7119. interix[[3-9]]*)
  7120. # Interix 3.5 installs completely hosed .la files for C++, so rather than
  7121. # hack all around it, let's just trust "g++" to DTRT.
  7122. _LT_TAGVAR(predep_objects,$1)=
  7123. _LT_TAGVAR(postdep_objects,$1)=
  7124. _LT_TAGVAR(postdeps,$1)=
  7125. ;;
  7126. esac
  7127. ])
  7128. case " $_LT_TAGVAR(postdeps, $1) " in
  7129. *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
  7130. esac
  7131. _LT_TAGVAR(compiler_lib_search_dirs, $1)=
  7132. if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
  7133. _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
  7134. fi
  7135. _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
  7136. [The directories searched by this compiler when creating a shared library])
  7137. _LT_TAGDECL([], [predep_objects], [1],
  7138. [Dependencies to place before and after the objects being linked to
  7139. create a shared library])
  7140. _LT_TAGDECL([], [postdep_objects], [1])
  7141. _LT_TAGDECL([], [predeps], [1])
  7142. _LT_TAGDECL([], [postdeps], [1])
  7143. _LT_TAGDECL([], [compiler_lib_search_path], [1],
  7144. [The library search path used internally by the compiler when linking
  7145. a shared library])
  7146. ])# _LT_SYS_HIDDEN_LIBDEPS
  7147. # _LT_LANG_F77_CONFIG([TAG])
  7148. # --------------------------
  7149. # Ensure that the configuration variables for a Fortran 77 compiler are
  7150. # suitably defined. These variables are subsequently used by _LT_CONFIG
  7151. # to write the compiler configuration to 'libtool'.
  7152. m4_defun([_LT_LANG_F77_CONFIG],
  7153. [AC_LANG_PUSH(Fortran 77)
  7154. if test -z "$F77" || test no = "$F77"; then
  7155. _lt_disable_F77=yes
  7156. fi
  7157. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7158. _LT_TAGVAR(allow_undefined_flag, $1)=
  7159. _LT_TAGVAR(always_export_symbols, $1)=no
  7160. _LT_TAGVAR(archive_expsym_cmds, $1)=
  7161. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  7162. _LT_TAGVAR(hardcode_direct, $1)=no
  7163. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  7164. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  7165. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  7166. _LT_TAGVAR(hardcode_minus_L, $1)=no
  7167. _LT_TAGVAR(hardcode_automatic, $1)=no
  7168. _LT_TAGVAR(inherit_rpath, $1)=no
  7169. _LT_TAGVAR(module_cmds, $1)=
  7170. _LT_TAGVAR(module_expsym_cmds, $1)=
  7171. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  7172. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7173. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  7174. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  7175. _LT_TAGVAR(no_undefined_flag, $1)=
  7176. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  7177. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  7178. # Source file extension for f77 test sources.
  7179. ac_ext=f
  7180. # Object file extension for compiled f77 test sources.
  7181. objext=o
  7182. _LT_TAGVAR(objext, $1)=$objext
  7183. # No sense in running all these tests if we already determined that
  7184. # the F77 compiler isn't working. Some variables (like enable_shared)
  7185. # are currently assumed to apply to all compilers on this platform,
  7186. # and will be corrupted by setting them based on a non-working compiler.
  7187. if test yes != "$_lt_disable_F77"; then
  7188. # Code to be used in simple compile tests
  7189. lt_simple_compile_test_code="\
  7190. subroutine t
  7191. return
  7192. end
  7193. "
  7194. # Code to be used in simple link tests
  7195. lt_simple_link_test_code="\
  7196. program t
  7197. end
  7198. "
  7199. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7200. _LT_TAG_COMPILER
  7201. # save warnings/boilerplate of simple test code
  7202. _LT_COMPILER_BOILERPLATE
  7203. _LT_LINKER_BOILERPLATE
  7204. # Allow CC to be a program name with arguments.
  7205. lt_save_CC=$CC
  7206. lt_save_GCC=$GCC
  7207. lt_save_CFLAGS=$CFLAGS
  7208. CC=${F77-"f77"}
  7209. CFLAGS=$FFLAGS
  7210. compiler=$CC
  7211. _LT_TAGVAR(compiler, $1)=$CC
  7212. _LT_CC_BASENAME([$compiler])
  7213. GCC=$G77
  7214. if test -n "$compiler"; then
  7215. AC_MSG_CHECKING([if libtool supports shared libraries])
  7216. AC_MSG_RESULT([$can_build_shared])
  7217. AC_MSG_CHECKING([whether to build shared libraries])
  7218. test no = "$can_build_shared" && enable_shared=no
  7219. # On AIX, shared libraries and static libraries use the same namespace, and
  7220. # are all built from PIC.
  7221. case $host_os in
  7222. aix3*)
  7223. test yes = "$enable_shared" && enable_static=no
  7224. if test -n "$RANLIB"; then
  7225. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  7226. postinstall_cmds='$RANLIB $lib'
  7227. fi
  7228. ;;
  7229. aix[[4-9]]*)
  7230. if test ia64 != "$host_cpu"; then
  7231. case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
  7232. yes,aix,yes) ;; # shared object as lib.so file only
  7233. yes,svr4,*) ;; # shared object as lib.so archive member only
  7234. yes,*) enable_static=no ;; # shared object in lib.a archive as well
  7235. esac
  7236. fi
  7237. ;;
  7238. esac
  7239. AC_MSG_RESULT([$enable_shared])
  7240. AC_MSG_CHECKING([whether to build static libraries])
  7241. # Make sure either enable_shared or enable_static is yes.
  7242. test yes = "$enable_shared" || enable_static=yes
  7243. AC_MSG_RESULT([$enable_static])
  7244. _LT_TAGVAR(GCC, $1)=$G77
  7245. _LT_TAGVAR(LD, $1)=$LD
  7246. ## CAVEAT EMPTOR:
  7247. ## There is no encapsulation within the following macros, do not change
  7248. ## the running order or otherwise move them around unless you know exactly
  7249. ## what you are doing...
  7250. _LT_COMPILER_PIC($1)
  7251. _LT_COMPILER_C_O($1)
  7252. _LT_COMPILER_FILE_LOCKS($1)
  7253. _LT_LINKER_SHLIBS($1)
  7254. _LT_SYS_DYNAMIC_LINKER($1)
  7255. _LT_LINKER_HARDCODE_LIBPATH($1)
  7256. _LT_CONFIG($1)
  7257. fi # test -n "$compiler"
  7258. GCC=$lt_save_GCC
  7259. CC=$lt_save_CC
  7260. CFLAGS=$lt_save_CFLAGS
  7261. fi # test yes != "$_lt_disable_F77"
  7262. AC_LANG_POP
  7263. ])# _LT_LANG_F77_CONFIG
  7264. # _LT_LANG_FC_CONFIG([TAG])
  7265. # -------------------------
  7266. # Ensure that the configuration variables for a Fortran compiler are
  7267. # suitably defined. These variables are subsequently used by _LT_CONFIG
  7268. # to write the compiler configuration to 'libtool'.
  7269. m4_defun([_LT_LANG_FC_CONFIG],
  7270. [AC_LANG_PUSH(Fortran)
  7271. if test -z "$FC" || test no = "$FC"; then
  7272. _lt_disable_FC=yes
  7273. fi
  7274. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7275. _LT_TAGVAR(allow_undefined_flag, $1)=
  7276. _LT_TAGVAR(always_export_symbols, $1)=no
  7277. _LT_TAGVAR(archive_expsym_cmds, $1)=
  7278. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  7279. _LT_TAGVAR(hardcode_direct, $1)=no
  7280. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  7281. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  7282. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  7283. _LT_TAGVAR(hardcode_minus_L, $1)=no
  7284. _LT_TAGVAR(hardcode_automatic, $1)=no
  7285. _LT_TAGVAR(inherit_rpath, $1)=no
  7286. _LT_TAGVAR(module_cmds, $1)=
  7287. _LT_TAGVAR(module_expsym_cmds, $1)=
  7288. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  7289. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7290. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  7291. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  7292. _LT_TAGVAR(no_undefined_flag, $1)=
  7293. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  7294. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  7295. # Source file extension for fc test sources.
  7296. ac_ext=${ac_fc_srcext-f}
  7297. # Object file extension for compiled fc test sources.
  7298. objext=o
  7299. _LT_TAGVAR(objext, $1)=$objext
  7300. # No sense in running all these tests if we already determined that
  7301. # the FC compiler isn't working. Some variables (like enable_shared)
  7302. # are currently assumed to apply to all compilers on this platform,
  7303. # and will be corrupted by setting them based on a non-working compiler.
  7304. if test yes != "$_lt_disable_FC"; then
  7305. # Code to be used in simple compile tests
  7306. lt_simple_compile_test_code="\
  7307. subroutine t
  7308. return
  7309. end
  7310. "
  7311. # Code to be used in simple link tests
  7312. lt_simple_link_test_code="\
  7313. program t
  7314. end
  7315. "
  7316. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7317. _LT_TAG_COMPILER
  7318. # save warnings/boilerplate of simple test code
  7319. _LT_COMPILER_BOILERPLATE
  7320. _LT_LINKER_BOILERPLATE
  7321. # Allow CC to be a program name with arguments.
  7322. lt_save_CC=$CC
  7323. lt_save_GCC=$GCC
  7324. lt_save_CFLAGS=$CFLAGS
  7325. CC=${FC-"f95"}
  7326. CFLAGS=$FCFLAGS
  7327. compiler=$CC
  7328. GCC=$ac_cv_fc_compiler_gnu
  7329. _LT_TAGVAR(compiler, $1)=$CC
  7330. _LT_CC_BASENAME([$compiler])
  7331. if test -n "$compiler"; then
  7332. AC_MSG_CHECKING([if libtool supports shared libraries])
  7333. AC_MSG_RESULT([$can_build_shared])
  7334. AC_MSG_CHECKING([whether to build shared libraries])
  7335. test no = "$can_build_shared" && enable_shared=no
  7336. # On AIX, shared libraries and static libraries use the same namespace, and
  7337. # are all built from PIC.
  7338. case $host_os in
  7339. aix3*)
  7340. test yes = "$enable_shared" && enable_static=no
  7341. if test -n "$RANLIB"; then
  7342. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  7343. postinstall_cmds='$RANLIB $lib'
  7344. fi
  7345. ;;
  7346. aix[[4-9]]*)
  7347. if test ia64 != "$host_cpu"; then
  7348. case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
  7349. yes,aix,yes) ;; # shared object as lib.so file only
  7350. yes,svr4,*) ;; # shared object as lib.so archive member only
  7351. yes,*) enable_static=no ;; # shared object in lib.a archive as well
  7352. esac
  7353. fi
  7354. ;;
  7355. esac
  7356. AC_MSG_RESULT([$enable_shared])
  7357. AC_MSG_CHECKING([whether to build static libraries])
  7358. # Make sure either enable_shared or enable_static is yes.
  7359. test yes = "$enable_shared" || enable_static=yes
  7360. AC_MSG_RESULT([$enable_static])
  7361. _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
  7362. _LT_TAGVAR(LD, $1)=$LD
  7363. ## CAVEAT EMPTOR:
  7364. ## There is no encapsulation within the following macros, do not change
  7365. ## the running order or otherwise move them around unless you know exactly
  7366. ## what you are doing...
  7367. _LT_SYS_HIDDEN_LIBDEPS($1)
  7368. _LT_COMPILER_PIC($1)
  7369. _LT_COMPILER_C_O($1)
  7370. _LT_COMPILER_FILE_LOCKS($1)
  7371. _LT_LINKER_SHLIBS($1)
  7372. _LT_SYS_DYNAMIC_LINKER($1)
  7373. _LT_LINKER_HARDCODE_LIBPATH($1)
  7374. _LT_CONFIG($1)
  7375. fi # test -n "$compiler"
  7376. GCC=$lt_save_GCC
  7377. CC=$lt_save_CC
  7378. CFLAGS=$lt_save_CFLAGS
  7379. fi # test yes != "$_lt_disable_FC"
  7380. AC_LANG_POP
  7381. ])# _LT_LANG_FC_CONFIG
  7382. # _LT_LANG_GCJ_CONFIG([TAG])
  7383. # --------------------------
  7384. # Ensure that the configuration variables for the GNU Java Compiler compiler
  7385. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  7386. # to write the compiler configuration to 'libtool'.
  7387. m4_defun([_LT_LANG_GCJ_CONFIG],
  7388. [AC_REQUIRE([LT_PROG_GCJ])dnl
  7389. AC_LANG_SAVE
  7390. # Source file extension for Java test sources.
  7391. ac_ext=java
  7392. # Object file extension for compiled Java test sources.
  7393. objext=o
  7394. _LT_TAGVAR(objext, $1)=$objext
  7395. # Code to be used in simple compile tests
  7396. lt_simple_compile_test_code="class foo {}"
  7397. # Code to be used in simple link tests
  7398. lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
  7399. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7400. _LT_TAG_COMPILER
  7401. # save warnings/boilerplate of simple test code
  7402. _LT_COMPILER_BOILERPLATE
  7403. _LT_LINKER_BOILERPLATE
  7404. # Allow CC to be a program name with arguments.
  7405. lt_save_CC=$CC
  7406. lt_save_CFLAGS=$CFLAGS
  7407. lt_save_GCC=$GCC
  7408. GCC=yes
  7409. CC=${GCJ-"gcj"}
  7410. CFLAGS=$GCJFLAGS
  7411. compiler=$CC
  7412. _LT_TAGVAR(compiler, $1)=$CC
  7413. _LT_TAGVAR(LD, $1)=$LD
  7414. _LT_CC_BASENAME([$compiler])
  7415. # GCJ did not exist at the time GCC didn't implicitly link libc in.
  7416. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7417. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7418. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  7419. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  7420. ## CAVEAT EMPTOR:
  7421. ## There is no encapsulation within the following macros, do not change
  7422. ## the running order or otherwise move them around unless you know exactly
  7423. ## what you are doing...
  7424. if test -n "$compiler"; then
  7425. _LT_COMPILER_NO_RTTI($1)
  7426. _LT_COMPILER_PIC($1)
  7427. _LT_COMPILER_C_O($1)
  7428. _LT_COMPILER_FILE_LOCKS($1)
  7429. _LT_LINKER_SHLIBS($1)
  7430. _LT_LINKER_HARDCODE_LIBPATH($1)
  7431. _LT_CONFIG($1)
  7432. fi
  7433. AC_LANG_RESTORE
  7434. GCC=$lt_save_GCC
  7435. CC=$lt_save_CC
  7436. CFLAGS=$lt_save_CFLAGS
  7437. ])# _LT_LANG_GCJ_CONFIG
  7438. # _LT_LANG_GO_CONFIG([TAG])
  7439. # --------------------------
  7440. # Ensure that the configuration variables for the GNU Go compiler
  7441. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  7442. # to write the compiler configuration to 'libtool'.
  7443. m4_defun([_LT_LANG_GO_CONFIG],
  7444. [AC_REQUIRE([LT_PROG_GO])dnl
  7445. AC_LANG_SAVE
  7446. # Source file extension for Go test sources.
  7447. ac_ext=go
  7448. # Object file extension for compiled Go test sources.
  7449. objext=o
  7450. _LT_TAGVAR(objext, $1)=$objext
  7451. # Code to be used in simple compile tests
  7452. lt_simple_compile_test_code="package main; func main() { }"
  7453. # Code to be used in simple link tests
  7454. lt_simple_link_test_code='package main; func main() { }'
  7455. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7456. _LT_TAG_COMPILER
  7457. # save warnings/boilerplate of simple test code
  7458. _LT_COMPILER_BOILERPLATE
  7459. _LT_LINKER_BOILERPLATE
  7460. # Allow CC to be a program name with arguments.
  7461. lt_save_CC=$CC
  7462. lt_save_CFLAGS=$CFLAGS
  7463. lt_save_GCC=$GCC
  7464. GCC=yes
  7465. CC=${GOC-"gccgo"}
  7466. CFLAGS=$GOFLAGS
  7467. compiler=$CC
  7468. _LT_TAGVAR(compiler, $1)=$CC
  7469. _LT_TAGVAR(LD, $1)=$LD
  7470. _LT_CC_BASENAME([$compiler])
  7471. # Go did not exist at the time GCC didn't implicitly link libc in.
  7472. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7473. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7474. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  7475. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  7476. ## CAVEAT EMPTOR:
  7477. ## There is no encapsulation within the following macros, do not change
  7478. ## the running order or otherwise move them around unless you know exactly
  7479. ## what you are doing...
  7480. if test -n "$compiler"; then
  7481. _LT_COMPILER_NO_RTTI($1)
  7482. _LT_COMPILER_PIC($1)
  7483. _LT_COMPILER_C_O($1)
  7484. _LT_COMPILER_FILE_LOCKS($1)
  7485. _LT_LINKER_SHLIBS($1)
  7486. _LT_LINKER_HARDCODE_LIBPATH($1)
  7487. _LT_CONFIG($1)
  7488. fi
  7489. AC_LANG_RESTORE
  7490. GCC=$lt_save_GCC
  7491. CC=$lt_save_CC
  7492. CFLAGS=$lt_save_CFLAGS
  7493. ])# _LT_LANG_GO_CONFIG
  7494. # _LT_LANG_RC_CONFIG([TAG])
  7495. # -------------------------
  7496. # Ensure that the configuration variables for the Windows resource compiler
  7497. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  7498. # to write the compiler configuration to 'libtool'.
  7499. m4_defun([_LT_LANG_RC_CONFIG],
  7500. [AC_REQUIRE([LT_PROG_RC])dnl
  7501. AC_LANG_SAVE
  7502. # Source file extension for RC test sources.
  7503. ac_ext=rc
  7504. # Object file extension for compiled RC test sources.
  7505. objext=o
  7506. _LT_TAGVAR(objext, $1)=$objext
  7507. # Code to be used in simple compile tests
  7508. lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
  7509. # Code to be used in simple link tests
  7510. lt_simple_link_test_code=$lt_simple_compile_test_code
  7511. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7512. _LT_TAG_COMPILER
  7513. # save warnings/boilerplate of simple test code
  7514. _LT_COMPILER_BOILERPLATE
  7515. _LT_LINKER_BOILERPLATE
  7516. # Allow CC to be a program name with arguments.
  7517. lt_save_CC=$CC
  7518. lt_save_CFLAGS=$CFLAGS
  7519. lt_save_GCC=$GCC
  7520. GCC=
  7521. CC=${RC-"windres"}
  7522. CFLAGS=
  7523. compiler=$CC
  7524. _LT_TAGVAR(compiler, $1)=$CC
  7525. _LT_CC_BASENAME([$compiler])
  7526. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  7527. if test -n "$compiler"; then
  7528. :
  7529. _LT_CONFIG($1)
  7530. fi
  7531. GCC=$lt_save_GCC
  7532. AC_LANG_RESTORE
  7533. CC=$lt_save_CC
  7534. CFLAGS=$lt_save_CFLAGS
  7535. ])# _LT_LANG_RC_CONFIG
  7536. # LT_PROG_GCJ
  7537. # -----------
  7538. AC_DEFUN([LT_PROG_GCJ],
  7539. [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
  7540. [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
  7541. [AC_CHECK_TOOL(GCJ, gcj,)
  7542. test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
  7543. AC_SUBST(GCJFLAGS)])])[]dnl
  7544. ])
  7545. # Old name:
  7546. AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
  7547. dnl aclocal-1.4 backwards compatibility:
  7548. dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
  7549. # LT_PROG_GO
  7550. # ----------
  7551. AC_DEFUN([LT_PROG_GO],
  7552. [AC_CHECK_TOOL(GOC, gccgo,)
  7553. ])
  7554. # LT_PROG_RC
  7555. # ----------
  7556. AC_DEFUN([LT_PROG_RC],
  7557. [AC_CHECK_TOOL(RC, windres,)
  7558. ])
  7559. # Old name:
  7560. AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
  7561. dnl aclocal-1.4 backwards compatibility:
  7562. dnl AC_DEFUN([LT_AC_PROG_RC], [])
  7563. # _LT_DECL_EGREP
  7564. # --------------
  7565. # If we don't have a new enough Autoconf to choose the best grep
  7566. # available, choose the one first in the user's PATH.
  7567. m4_defun([_LT_DECL_EGREP],
  7568. [AC_REQUIRE([AC_PROG_EGREP])dnl
  7569. AC_REQUIRE([AC_PROG_FGREP])dnl
  7570. test -z "$GREP" && GREP=grep
  7571. _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
  7572. _LT_DECL([], [EGREP], [1], [An ERE matcher])
  7573. _LT_DECL([], [FGREP], [1], [A literal string matcher])
  7574. dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
  7575. AC_SUBST([GREP])
  7576. ])
  7577. # _LT_DECL_OBJDUMP
  7578. # --------------
  7579. # If we don't have a new enough Autoconf to choose the best objdump
  7580. # available, choose the one first in the user's PATH.
  7581. m4_defun([_LT_DECL_OBJDUMP],
  7582. [AC_CHECK_TOOL(OBJDUMP, objdump, false)
  7583. test -z "$OBJDUMP" && OBJDUMP=objdump
  7584. _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
  7585. AC_SUBST([OBJDUMP])
  7586. ])
  7587. # _LT_DECL_DLLTOOL
  7588. # ----------------
  7589. # Ensure DLLTOOL variable is set.
  7590. m4_defun([_LT_DECL_DLLTOOL],
  7591. [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  7592. test -z "$DLLTOOL" && DLLTOOL=dlltool
  7593. _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
  7594. AC_SUBST([DLLTOOL])
  7595. ])
  7596. # _LT_DECL_FILECMD
  7597. # ----------------
  7598. # Check for a file(cmd) program that can be used to detect file type and magic
  7599. m4_defun([_LT_DECL_FILECMD],
  7600. [AC_CHECK_PROG([FILECMD], [file], [file], [:])
  7601. _LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types])
  7602. ])# _LD_DECL_FILECMD
  7603. # _LT_DECL_SED
  7604. # ------------
  7605. # Check for a fully-functional sed program, that truncates
  7606. # as few characters as possible. Prefer GNU sed if found.
  7607. m4_defun([_LT_DECL_SED],
  7608. [AC_PROG_SED
  7609. test -z "$SED" && SED=sed
  7610. Xsed="$SED -e 1s/^X//"
  7611. _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
  7612. _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
  7613. [Sed that helps us avoid accidentally triggering echo(1) options like -n])
  7614. ])# _LT_DECL_SED
  7615. dnl aclocal-1.4 backwards compatibility:
  7616. dnl AC_DEFUN([LT_AC_PROG_SED], [])
  7617. # _LT_CHECK_SHELL_FEATURES
  7618. # ------------------------
  7619. # Find out whether the shell is Bourne or XSI compatible,
  7620. # or has some other useful features.
  7621. m4_defun([_LT_CHECK_SHELL_FEATURES],
  7622. [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
  7623. lt_unset=unset
  7624. else
  7625. lt_unset=false
  7626. fi
  7627. _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
  7628. # test EBCDIC or ASCII
  7629. case `echo X|tr X '\101'` in
  7630. A) # ASCII based system
  7631. # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
  7632. lt_SP2NL='tr \040 \012'
  7633. lt_NL2SP='tr \015\012 \040\040'
  7634. ;;
  7635. *) # EBCDIC based system
  7636. lt_SP2NL='tr \100 \n'
  7637. lt_NL2SP='tr \r\n \100\100'
  7638. ;;
  7639. esac
  7640. _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
  7641. _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
  7642. ])# _LT_CHECK_SHELL_FEATURES
  7643. # _LT_PATH_CONVERSION_FUNCTIONS
  7644. # -----------------------------
  7645. # Determine what file name conversion functions should be used by
  7646. # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
  7647. # for certain cross-compile configurations and native mingw.
  7648. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
  7649. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  7650. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  7651. AC_MSG_CHECKING([how to convert $build file names to $host format])
  7652. AC_CACHE_VAL(lt_cv_to_host_file_cmd,
  7653. [case $host in
  7654. *-*-mingw* )
  7655. case $build in
  7656. *-*-mingw* | *-*-windows* ) # actually msys
  7657. lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
  7658. ;;
  7659. *-*-cygwin* )
  7660. lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
  7661. ;;
  7662. * ) # otherwise, assume *nix
  7663. lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
  7664. ;;
  7665. esac
  7666. ;;
  7667. *-*-cygwin* )
  7668. case $build in
  7669. *-*-mingw* | *-*-windows* ) # actually msys
  7670. lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
  7671. ;;
  7672. *-*-cygwin* )
  7673. lt_cv_to_host_file_cmd=func_convert_file_noop
  7674. ;;
  7675. * ) # otherwise, assume *nix
  7676. lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
  7677. ;;
  7678. esac
  7679. ;;
  7680. * ) # unhandled hosts (and "normal" native builds)
  7681. lt_cv_to_host_file_cmd=func_convert_file_noop
  7682. ;;
  7683. esac
  7684. ])
  7685. to_host_file_cmd=$lt_cv_to_host_file_cmd
  7686. AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
  7687. _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
  7688. [0], [convert $build file names to $host format])dnl
  7689. AC_MSG_CHECKING([how to convert $build file names to toolchain format])
  7690. AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
  7691. [#assume ordinary cross tools, or native build.
  7692. lt_cv_to_tool_file_cmd=func_convert_file_noop
  7693. case $host in
  7694. *-*-mingw* | *-*-windows* )
  7695. case $build in
  7696. *-*-mingw* | *-*-windows* ) # actually msys
  7697. lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
  7698. ;;
  7699. esac
  7700. ;;
  7701. esac
  7702. ])
  7703. to_tool_file_cmd=$lt_cv_to_tool_file_cmd
  7704. AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
  7705. _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
  7706. [0], [convert $build files to toolchain format])dnl
  7707. ])# _LT_PATH_CONVERSION_FUNCTIONS