libtool.m4 280 KB

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