libtool.m4 299 KB

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