libtool.m4 299 KB

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