libtool.m4 300 KB

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