libtool.m4 260 KB

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