libtool.m4 300 KB

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