1
0

libtool.m4 280 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993
  1. ##############################################################################
  2. # Based on libtool-2.4.2
  3. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
  4. #
  5. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
  6. # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
  7. # Foundation, Inc.
  8. # Written by Gordon Matzigkeit, 1996
  9. #
  10. # This file is free software; the Free Software Foundation gives
  11. # unlimited permission to copy and/or distribute it, with or without
  12. # modifications, as long as this notice is preserved.
  13. m4_define([_LT_COPYING], [dnl
  14. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
  15. # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
  16. # Foundation, Inc.
  17. # Written by Gordon Matzigkeit, 1996
  18. #
  19. # This file is part of GNU Libtool.
  20. #
  21. # GNU Libtool is free software; you can redistribute it and/or
  22. # modify it under the terms of the GNU General Public License as
  23. # published by the Free Software Foundation; either version 2 of
  24. # the License, or (at your option) any later version.
  25. #
  26. # As a special exception to the GNU General Public License,
  27. # if you distribute this file as part of a program or library that
  28. # is built using GNU Libtool, you may include this file under the
  29. # same distribution terms that you use for the rest of that program.
  30. #
  31. # GNU Libtool is distributed in the hope that it will be useful,
  32. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  33. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  34. # GNU General Public License for more details.
  35. #
  36. # You should have received a copy of the GNU General Public License
  37. # along with GNU Libtool; see the file COPYING. If not, a copy
  38. # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
  39. # obtained by writing to the Free Software Foundation, Inc.,
  40. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  41. ])
  42. # serial 57 LT_INIT
  43. # LT_PREREQ(VERSION)
  44. # ------------------
  45. # Complain and exit if this libtool version is less that VERSION.
  46. m4_defun([LT_PREREQ],
  47. [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
  48. [m4_default([$3],
  49. [m4_fatal([Libtool version $1 or higher is required],
  50. 63)])],
  51. [$2])])
  52. # _LT_CHECK_BUILDDIR
  53. # ------------------
  54. # Complain if the absolute build directory name contains unusual characters
  55. m4_defun([_LT_CHECK_BUILDDIR],
  56. [case `pwd` in
  57. *\ * | *\ *)
  58. AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
  59. esac
  60. ])
  61. # LT_INIT([OPTIONS])
  62. # ------------------
  63. AC_DEFUN([LT_INIT],
  64. [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
  65. AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  66. AC_BEFORE([$0], [LT_LANG])dnl
  67. AC_BEFORE([$0], [LT_OUTPUT])dnl
  68. AC_BEFORE([$0], [LTDL_INIT])dnl
  69. m4_require([_LT_CHECK_BUILDDIR])dnl
  70. dnl Autoconf doesn't catch unexpanded LT_ macros by default:
  71. m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
  72. m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
  73. dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
  74. dnl unless we require an AC_DEFUNed macro:
  75. AC_REQUIRE([LTOPTIONS_VERSION])dnl
  76. AC_REQUIRE([LTSUGAR_VERSION])dnl
  77. AC_REQUIRE([LTVERSION_VERSION])dnl
  78. AC_REQUIRE([LTOBSOLETE_VERSION])dnl
  79. m4_require([_LT_PROG_LTMAIN])dnl
  80. _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
  81. dnl Parse OPTIONS
  82. _LT_SET_OPTIONS([$0], [$1])
  83. # This can be used to rebuild libtool when needed
  84. LIBTOOL_DEPS="$ltmain"
  85. # Always use our own libtool.
  86. LIBTOOL='$(SHELL) $(top_builddir)/libtool'
  87. AC_SUBST(LIBTOOL)dnl
  88. _LT_SETUP
  89. # Only expand once:
  90. m4_define([LT_INIT])
  91. ])# LT_INIT
  92. # Old names:
  93. AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
  94. AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
  95. dnl aclocal-1.4 backwards compatibility:
  96. dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
  97. dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
  98. # _LT_CC_BASENAME(CC)
  99. # -------------------
  100. # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
  101. m4_defun([_LT_CC_BASENAME],
  102. [for cc_temp in $1""; do
  103. case $cc_temp in
  104. compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
  105. distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
  106. \-*) ;;
  107. *) break;;
  108. esac
  109. done
  110. cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
  111. ])
  112. # _LT_FILEUTILS_DEFAULTS
  113. # ----------------------
  114. # It is okay to use these file commands and assume they have been set
  115. # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
  116. m4_defun([_LT_FILEUTILS_DEFAULTS],
  117. [: ${CP="cp -f"}
  118. : ${MV="mv -f"}
  119. : ${RM="rm -f"}
  120. ])# _LT_FILEUTILS_DEFAULTS
  121. # _LT_SETUP
  122. # ---------
  123. m4_defun([_LT_SETUP],
  124. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  125. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  126. AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
  127. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
  128. _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
  129. dnl
  130. _LT_DECL([], [host_alias], [0], [The host system])dnl
  131. _LT_DECL([], [host], [0])dnl
  132. _LT_DECL([], [host_os], [0])dnl
  133. dnl
  134. _LT_DECL([], [build_alias], [0], [The build system])dnl
  135. _LT_DECL([], [build], [0])dnl
  136. _LT_DECL([], [build_os], [0])dnl
  137. dnl
  138. AC_REQUIRE([AC_PROG_CC])dnl
  139. AC_REQUIRE([LT_PATH_LD])dnl
  140. AC_REQUIRE([LT_PATH_NM])dnl
  141. dnl
  142. AC_REQUIRE([AC_PROG_LN_S])dnl
  143. test -z "$LN_S" && LN_S="ln -s"
  144. _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
  145. dnl
  146. AC_REQUIRE([LT_CMD_MAX_LEN])dnl
  147. _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
  148. _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
  149. dnl
  150. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  151. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  152. m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
  153. m4_require([_LT_CMD_RELOAD])dnl
  154. m4_require([_LT_CHECK_MAGIC_METHOD])dnl
  155. m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
  156. m4_require([_LT_CMD_OLD_ARCHIVE])dnl
  157. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  158. m4_require([_LT_WITH_SYSROOT])dnl
  159. _LT_CONFIG_LIBTOOL_INIT([
  160. # See if we are running on zsh, and set the options which allow our
  161. # commands through without removal of \ escapes INIT.
  162. if test -n "\${ZSH_VERSION+set}" ; then
  163. setopt NO_GLOB_SUBST
  164. fi
  165. ])
  166. if test -n "${ZSH_VERSION+set}" ; then
  167. setopt NO_GLOB_SUBST
  168. fi
  169. _LT_CHECK_OBJDIR
  170. m4_require([_LT_TAG_COMPILER])dnl
  171. case $host_os in
  172. aix3*)
  173. # AIX sometimes has problems with the GCC collect2 program. For some
  174. # reason, if we set the COLLECT_NAMES environment variable, the problems
  175. # vanish in a puff of smoke.
  176. if test "X${COLLECT_NAMES+set}" != Xset; then
  177. COLLECT_NAMES=
  178. export COLLECT_NAMES
  179. fi
  180. ;;
  181. esac
  182. # Global variables:
  183. ofile=libtool
  184. can_build_shared=yes
  185. # All known linkers require a `.a' archive for static linking (except MSVC,
  186. # which needs '.lib').
  187. libext=a
  188. with_gnu_ld="$lt_cv_prog_gnu_ld"
  189. old_CC="$CC"
  190. old_CFLAGS="$CFLAGS"
  191. # Set sane defaults for various variables
  192. test -z "$CC" && CC=cc
  193. test -z "$LTCC" && LTCC=$CC
  194. test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
  195. test -z "$LD" && LD=ld
  196. test -z "$ac_objext" && ac_objext=o
  197. _LT_CC_BASENAME([$compiler])
  198. # Only perform the check for file, if the check method requires it
  199. test -z "$MAGIC_CMD" && MAGIC_CMD=file
  200. case $deplibs_check_method in
  201. file_magic*)
  202. if test "$file_magic_cmd" = '$MAGIC_CMD'; then
  203. _LT_PATH_MAGIC
  204. fi
  205. ;;
  206. esac
  207. # Use C for the default configuration in the libtool script
  208. LT_SUPPORTED_TAG([CC])
  209. _LT_LANG_C_CONFIG
  210. _LT_LANG_DEFAULT_CONFIG
  211. _LT_CONFIG_COMMANDS
  212. ])# _LT_SETUP
  213. # _LT_PREPARE_SED_QUOTE_VARS
  214. # --------------------------
  215. # Define a few sed substitution that help us do robust quoting.
  216. m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
  217. [# Backslashify metacharacters that are still active within
  218. # double-quoted strings.
  219. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
  220. # Same as above, but do not quote variable references.
  221. double_quote_subst='s/\([["`\\]]\)/\\\1/g'
  222. # Sed substitution to delay expansion of an escaped shell variable in a
  223. # double_quote_subst'ed string.
  224. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
  225. # Sed substitution to delay expansion of an escaped single quote.
  226. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
  227. # Sed substitution to avoid accidental globbing in evaled expressions
  228. no_glob_subst='s/\*/\\\*/g'
  229. ])
  230. # _LT_PROG_LTMAIN
  231. # ---------------
  232. # Note that this code is called both from `configure', and `config.status'
  233. # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
  234. # `config.status' has no value for ac_aux_dir unless we are using Automake,
  235. # so we pass a copy along to make sure it has a sensible value anyway.
  236. m4_defun([_LT_PROG_LTMAIN],
  237. [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
  238. _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
  239. ltmain="$ac_aux_dir/ltmain.sh"
  240. ])# _LT_PROG_LTMAIN
  241. ## ------------------------------------- ##
  242. ## Accumulate code for creating libtool. ##
  243. ## ------------------------------------- ##
  244. # So that we can recreate a full libtool script including additional
  245. # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
  246. # in macros and then make a single call at the end using the `libtool'
  247. # label.
  248. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
  249. # ----------------------------------------
  250. # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  251. m4_define([_LT_CONFIG_LIBTOOL_INIT],
  252. [m4_ifval([$1],
  253. [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
  254. [$1
  255. ])])])
  256. # Initialize.
  257. m4_define([_LT_OUTPUT_LIBTOOL_INIT])
  258. # _LT_CONFIG_LIBTOOL([COMMANDS])
  259. # ------------------------------
  260. # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  261. m4_define([_LT_CONFIG_LIBTOOL],
  262. [m4_ifval([$1],
  263. [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
  264. [$1
  265. ])])])
  266. # Initialize.
  267. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
  268. # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
  269. # -----------------------------------------------------
  270. m4_defun([_LT_CONFIG_SAVE_COMMANDS],
  271. [_LT_CONFIG_LIBTOOL([$1])
  272. _LT_CONFIG_LIBTOOL_INIT([$2])
  273. ])
  274. # _LT_FORMAT_COMMENT([COMMENT])
  275. # -----------------------------
  276. # Add leading comment marks to the start of each line, and a trailing
  277. # full-stop to the whole comment if one is not present already.
  278. m4_define([_LT_FORMAT_COMMENT],
  279. [m4_ifval([$1], [
  280. m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
  281. [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
  282. )])
  283. ## ------------------------ ##
  284. ## FIXME: Eliminate VARNAME ##
  285. ## ------------------------ ##
  286. # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
  287. # -------------------------------------------------------------------
  288. # CONFIGNAME is the name given to the value in the libtool script.
  289. # VARNAME is the (base) name used in the configure script.
  290. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
  291. # VARNAME. Any other value will be used directly.
  292. m4_define([_LT_DECL],
  293. [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
  294. [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
  295. [m4_ifval([$1], [$1], [$2])])
  296. lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
  297. m4_ifval([$4],
  298. [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
  299. lt_dict_add_subkey([lt_decl_dict], [$2],
  300. [tagged?], [m4_ifval([$5], [yes], [no])])])
  301. ])
  302. # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
  303. # --------------------------------------------------------
  304. m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
  305. # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
  306. # ------------------------------------------------
  307. m4_define([lt_decl_tag_varnames],
  308. [_lt_decl_filter([tagged?], [yes], $@)])
  309. # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
  310. # ---------------------------------------------------------
  311. m4_define([_lt_decl_filter],
  312. [m4_case([$#],
  313. [0], [m4_fatal([$0: too few arguments: $#])],
  314. [1], [m4_fatal([$0: too few arguments: $#: $1])],
  315. [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
  316. [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
  317. [lt_dict_filter([lt_decl_dict], $@)])[]dnl
  318. ])
  319. # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
  320. # --------------------------------------------------
  321. m4_define([lt_decl_quote_varnames],
  322. [_lt_decl_filter([value], [1], $@)])
  323. # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
  324. # ---------------------------------------------------
  325. m4_define([lt_decl_dquote_varnames],
  326. [_lt_decl_filter([value], [2], $@)])
  327. # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
  328. # ---------------------------------------------------
  329. m4_define([lt_decl_varnames_tagged],
  330. [m4_assert([$# <= 2])dnl
  331. _$0(m4_quote(m4_default([$1], [[, ]])),
  332. m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
  333. m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
  334. m4_define([_lt_decl_varnames_tagged],
  335. [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
  336. # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
  337. # ------------------------------------------------
  338. m4_define([lt_decl_all_varnames],
  339. [_$0(m4_quote(m4_default([$1], [[, ]])),
  340. m4_if([$2], [],
  341. m4_quote(lt_decl_varnames),
  342. m4_quote(m4_shift($@))))[]dnl
  343. ])
  344. m4_define([_lt_decl_all_varnames],
  345. [lt_join($@, lt_decl_varnames_tagged([$1],
  346. lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
  347. ])
  348. # _LT_CONFIG_STATUS_DECLARE([VARNAME])
  349. # ------------------------------------
  350. # Quote a variable value, and forward it to `config.status' so that its
  351. # declaration there will have the same value as in `configure'. VARNAME
  352. # must have a single quote delimited value for this to work.
  353. m4_define([_LT_CONFIG_STATUS_DECLARE],
  354. [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
  355. # _LT_CONFIG_STATUS_DECLARATIONS
  356. # ------------------------------
  357. # We delimit libtool config variables with single quotes, so when
  358. # we write them to config.status, we have to be sure to quote all
  359. # embedded single quotes properly. In configure, this macro expands
  360. # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
  361. #
  362. # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
  363. m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
  364. [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
  365. [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
  366. # _LT_LIBTOOL_TAGS
  367. # ----------------
  368. # Output comment and list of tags supported by the script
  369. m4_defun([_LT_LIBTOOL_TAGS],
  370. [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
  371. available_tags="_LT_TAGS"dnl
  372. ])
  373. # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
  374. # -----------------------------------
  375. # Extract the dictionary values for VARNAME (optionally with TAG) and
  376. # expand to a commented shell variable setting:
  377. #
  378. # # Some comment about what VAR is for.
  379. # visible_name=$lt_internal_name
  380. m4_define([_LT_LIBTOOL_DECLARE],
  381. [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
  382. [description])))[]dnl
  383. m4_pushdef([_libtool_name],
  384. m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
  385. m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
  386. [0], [_libtool_name=[$]$1],
  387. [1], [_libtool_name=$lt_[]$1],
  388. [2], [_libtool_name=$lt_[]$1],
  389. [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
  390. m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
  391. ])
  392. # _LT_LIBTOOL_CONFIG_VARS
  393. # -----------------------
  394. # Produce commented declarations of non-tagged libtool config variables
  395. # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
  396. # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
  397. # section) are produced by _LT_LIBTOOL_TAG_VARS.
  398. m4_defun([_LT_LIBTOOL_CONFIG_VARS],
  399. [m4_foreach([_lt_var],
  400. m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
  401. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
  402. # _LT_LIBTOOL_TAG_VARS(TAG)
  403. # -------------------------
  404. m4_define([_LT_LIBTOOL_TAG_VARS],
  405. [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
  406. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
  407. # _LT_TAGVAR(VARNAME, [TAGNAME])
  408. # ------------------------------
  409. m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
  410. # _LT_CONFIG_COMMANDS
  411. # -------------------
  412. # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
  413. # variables for single and double quote escaping we saved from calls
  414. # to _LT_DECL, we can put quote escaped variables declarations
  415. # into `config.status', and then the shell code to quote escape them in
  416. # for loops in `config.status'. Finally, any additional code accumulated
  417. # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
  418. m4_defun([_LT_CONFIG_COMMANDS],
  419. [AC_PROVIDE_IFELSE([LT_OUTPUT],
  420. dnl If the libtool generation code has been placed in $CONFIG_LT,
  421. dnl instead of duplicating it all over again into config.status,
  422. dnl then we will have config.status run $CONFIG_LT later, so it
  423. dnl needs to know what name is stored there:
  424. [AC_CONFIG_COMMANDS([libtool],
  425. [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
  426. dnl If the libtool generation code is destined for config.status,
  427. dnl expand the accumulated commands and init code now:
  428. [AC_CONFIG_COMMANDS([libtool],
  429. [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
  430. ])#_LT_CONFIG_COMMANDS
  431. # Initialize.
  432. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
  433. [
  434. # The HP-UX ksh and POSIX shell print the target directory to stdout
  435. # if CDPATH is set.
  436. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  437. sed_quote_subst='$sed_quote_subst'
  438. double_quote_subst='$double_quote_subst'
  439. delay_variable_subst='$delay_variable_subst'
  440. _LT_CONFIG_STATUS_DECLARATIONS
  441. LTCC='$LTCC'
  442. LTCFLAGS='$LTCFLAGS'
  443. compiler='$compiler_DEFAULT'
  444. # A function that is used when there is no print builtin or printf.
  445. func_fallback_echo ()
  446. {
  447. eval 'cat <<_LTECHO_EOF
  448. \$[]1
  449. _LTECHO_EOF'
  450. }
  451. # Quote evaled strings.
  452. for var in lt_decl_all_varnames([[ \
  453. ]], lt_decl_quote_varnames); do
  454. case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  455. *[[\\\\\\\`\\"\\\$]]*)
  456. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
  457. ;;
  458. *)
  459. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  460. ;;
  461. esac
  462. done
  463. # Double-quote double-evaled strings.
  464. for var in lt_decl_all_varnames([[ \
  465. ]], lt_decl_dquote_varnames); do
  466. case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  467. *[[\\\\\\\`\\"\\\$]]*)
  468. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
  469. ;;
  470. *)
  471. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  472. ;;
  473. esac
  474. done
  475. _LT_OUTPUT_LIBTOOL_INIT
  476. ])
  477. # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
  478. # ------------------------------------
  479. # Generate a child script FILE with all initialization necessary to
  480. # reuse the environment learned by the parent script, and make the
  481. # file executable. If COMMENT is supplied, it is inserted after the
  482. # `#!' sequence but before initialization text begins. After this
  483. # macro, additional text can be appended to FILE to form the body of
  484. # the child script. The macro ends with non-zero status if the
  485. # file could not be fully written (such as if the disk is full).
  486. m4_ifdef([AS_INIT_GENERATED],
  487. [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
  488. [m4_defun([_LT_GENERATED_FILE_INIT],
  489. [m4_require([AS_PREPARE])]dnl
  490. [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
  491. [lt_write_fail=0
  492. cat >$1 <<_ASEOF || lt_write_fail=1
  493. #! $SHELL
  494. # Generated by $as_me.
  495. $2
  496. SHELL=\${CONFIG_SHELL-$SHELL}
  497. export SHELL
  498. _ASEOF
  499. cat >>$1 <<\_ASEOF || lt_write_fail=1
  500. AS_SHELL_SANITIZE
  501. _AS_PREPARE
  502. exec AS_MESSAGE_FD>&1
  503. _ASEOF
  504. test $lt_write_fail = 0 && chmod +x $1[]dnl
  505. m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
  506. # LT_OUTPUT
  507. # ---------
  508. # This macro allows early generation of the libtool script (before
  509. # AC_OUTPUT is called), incase it is used in configure for compilation
  510. # tests.
  511. AC_DEFUN([LT_OUTPUT],
  512. [: ${CONFIG_LT=./config.lt}
  513. AC_MSG_NOTICE([creating $CONFIG_LT])
  514. _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
  515. [# Run this file to recreate a libtool stub with the current configuration.])
  516. cat >>"$CONFIG_LT" <<\_LTEOF
  517. lt_cl_silent=false
  518. exec AS_MESSAGE_LOG_FD>>config.log
  519. {
  520. echo
  521. AS_BOX([Running $as_me.])
  522. } >&AS_MESSAGE_LOG_FD
  523. lt_cl_help="\
  524. \`$as_me' creates a local libtool stub from the current configuration,
  525. for use in further configure time tests before the real libtool is
  526. generated.
  527. Usage: $[0] [[OPTIONS]]
  528. -h, --help print this help, then exit
  529. -V, --version print version number, then exit
  530. -q, --quiet do not print progress messages
  531. -d, --debug don't remove temporary files
  532. Report bugs to <bug-libtool@gnu.org>."
  533. lt_cl_version="\
  534. m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
  535. m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
  536. configured by $[0], generated by m4_PACKAGE_STRING.
  537. Copyright (C) 2011 Free Software Foundation, Inc.
  538. This config.lt script is free software; the Free Software Foundation
  539. gives unlimited permision to copy, distribute and modify it."
  540. while test $[#] != 0
  541. do
  542. case $[1] in
  543. --version | --v* | -V )
  544. echo "$lt_cl_version"; exit 0 ;;
  545. --help | --h* | -h )
  546. echo "$lt_cl_help"; exit 0 ;;
  547. --debug | --d* | -d )
  548. debug=: ;;
  549. --quiet | --q* | --silent | --s* | -q )
  550. lt_cl_silent=: ;;
  551. -*) AC_MSG_ERROR([unrecognized option: $[1]
  552. Try \`$[0] --help' for more information.]) ;;
  553. *) AC_MSG_ERROR([unrecognized argument: $[1]
  554. Try \`$[0] --help' for more information.]) ;;
  555. esac
  556. shift
  557. done
  558. if $lt_cl_silent; then
  559. exec AS_MESSAGE_FD>/dev/null
  560. fi
  561. _LTEOF
  562. cat >>"$CONFIG_LT" <<_LTEOF
  563. _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
  564. _LTEOF
  565. cat >>"$CONFIG_LT" <<\_LTEOF
  566. AC_MSG_NOTICE([creating $ofile])
  567. _LT_OUTPUT_LIBTOOL_COMMANDS
  568. AS_EXIT(0)
  569. _LTEOF
  570. chmod +x "$CONFIG_LT"
  571. # configure is writing to config.log, but config.lt does its own redirection,
  572. # appending to config.log, which fails on DOS, as config.log is still kept
  573. # open by configure. Here we exec the FD to /dev/null, effectively closing
  574. # config.log, so it can be properly (re)opened and appended to by config.lt.
  575. lt_cl_success=:
  576. test "$silent" = yes &&
  577. lt_config_lt_args="$lt_config_lt_args --quiet"
  578. exec AS_MESSAGE_LOG_FD>/dev/null
  579. $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
  580. exec AS_MESSAGE_LOG_FD>>config.log
  581. $lt_cl_success || AS_EXIT(1)
  582. ])# LT_OUTPUT
  583. # _LT_CONFIG(TAG)
  584. # ---------------
  585. # If TAG is the built-in tag, create an initial libtool script with a
  586. # default configuration from the untagged config vars. Otherwise add code
  587. # to config.status for appending the configuration named by TAG from the
  588. # matching tagged config vars.
  589. m4_defun([_LT_CONFIG],
  590. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  591. _LT_CONFIG_SAVE_COMMANDS([
  592. m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
  593. m4_if(_LT_TAG, [C], [
  594. # See if we are running on zsh, and set the options which allow our
  595. # commands through without removal of \ escapes.
  596. if test -n "${ZSH_VERSION+set}" ; then
  597. setopt NO_GLOB_SUBST
  598. fi
  599. cfgfile="${ofile}T"
  600. trap "$RM \"$cfgfile\"; exit 1" 1 2 15
  601. $RM "$cfgfile"
  602. cat <<_LT_EOF >> "$cfgfile"
  603. #! $SHELL
  604. # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
  605. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
  606. # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  607. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  608. #
  609. _LT_COPYING
  610. _LT_LIBTOOL_TAGS
  611. # ### BEGIN LIBTOOL CONFIG
  612. _LT_LIBTOOL_CONFIG_VARS
  613. _LT_LIBTOOL_TAG_VARS
  614. # ### END LIBTOOL CONFIG
  615. _LT_EOF
  616. case $host_os in
  617. aix3*)
  618. cat <<\_LT_EOF >> "$cfgfile"
  619. # AIX sometimes has problems with the GCC collect2 program. For some
  620. # reason, if we set the COLLECT_NAMES environment variable, the problems
  621. # vanish in a puff of smoke.
  622. if test "X${COLLECT_NAMES+set}" != Xset; then
  623. COLLECT_NAMES=
  624. export COLLECT_NAMES
  625. fi
  626. _LT_EOF
  627. ;;
  628. esac
  629. _LT_PROG_LTMAIN
  630. # We use sed instead of cat because bash on DJGPP gets confused if
  631. # if finds mixed CR/LF and LF-only lines. Since sed operates in
  632. # text mode, it properly converts lines to CR/LF. This bash problem
  633. # is reportedly fixed, but why not run on old versions too?
  634. sed '$q' "$ltmain" >> "$cfgfile" \
  635. || (rm -f "$cfgfile"; exit 1)
  636. _LT_PROG_REPLACE_SHELLFNS
  637. mv -f "$cfgfile" "$ofile" ||
  638. (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
  639. chmod +x "$ofile"
  640. ],
  641. [cat <<_LT_EOF >> "$ofile"
  642. dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
  643. dnl in a comment (ie after a #).
  644. # ### BEGIN LIBTOOL TAG CONFIG: $1
  645. _LT_LIBTOOL_TAG_VARS(_LT_TAG)
  646. # ### END LIBTOOL TAG CONFIG: $1
  647. _LT_EOF
  648. ])dnl /m4_if
  649. ],
  650. [m4_if([$1], [], [
  651. PACKAGE='$PACKAGE'
  652. VERSION='$VERSION'
  653. TIMESTAMP='$TIMESTAMP'
  654. RM='$RM'
  655. ofile='$ofile'], [])
  656. ])dnl /_LT_CONFIG_SAVE_COMMANDS
  657. ])# _LT_CONFIG
  658. # LT_SUPPORTED_TAG(TAG)
  659. # ---------------------
  660. # Trace this macro to discover what tags are supported by the libtool
  661. # --tag option, using:
  662. # autoconf --trace 'LT_SUPPORTED_TAG:$1'
  663. AC_DEFUN([LT_SUPPORTED_TAG], [])
  664. # C support is built-in for now
  665. m4_define([_LT_LANG_C_enabled], [])
  666. m4_define([_LT_TAGS], [])
  667. # LT_LANG(LANG)
  668. # -------------
  669. # Enable libtool support for the given language if not already enabled.
  670. AC_DEFUN([LT_LANG],
  671. [AC_BEFORE([$0], [LT_OUTPUT])dnl
  672. m4_case([$1],
  673. [C], [_LT_LANG(C)],
  674. [C++], [_LT_LANG(CXX)],
  675. [Go], [_LT_LANG(GO)],
  676. [Java], [_LT_LANG(GCJ)],
  677. [Fortran 77], [_LT_LANG(F77)],
  678. [Fortran], [_LT_LANG(FC)],
  679. [Windows Resource], [_LT_LANG(RC)],
  680. [m4_ifdef([_LT_LANG_]$1[_CONFIG],
  681. [_LT_LANG($1)],
  682. [m4_fatal([$0: unsupported language: "$1"])])])dnl
  683. ])# LT_LANG
  684. # _LT_LANG(LANGNAME)
  685. # ------------------
  686. m4_defun([_LT_LANG],
  687. [m4_ifdef([_LT_LANG_]$1[_enabled], [],
  688. [LT_SUPPORTED_TAG([$1])dnl
  689. m4_append([_LT_TAGS], [$1 ])dnl
  690. m4_define([_LT_LANG_]$1[_enabled], [])dnl
  691. _LT_LANG_$1_CONFIG($1)])dnl
  692. ])# _LT_LANG
  693. m4_ifndef([AC_PROG_GO], [
  694. ############################################################
  695. # NOTE: This macro has been submitted for inclusion into #
  696. # GNU Autoconf as AC_PROG_GO. When it is available in #
  697. # a released version of Autoconf we should remove this #
  698. # macro and use it instead. #
  699. ############################################################
  700. m4_defun([AC_PROG_GO],
  701. [AC_LANG_PUSH(Go)dnl
  702. AC_ARG_VAR([GOC], [Go compiler command])dnl
  703. AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
  704. _AC_ARG_VAR_LDFLAGS()dnl
  705. AC_CHECK_TOOL(GOC, gccgo)
  706. if test -z "$GOC"; then
  707. if test -n "$ac_tool_prefix"; then
  708. AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
  709. fi
  710. fi
  711. if test -z "$GOC"; then
  712. AC_CHECK_PROG(GOC, gccgo, gccgo, false)
  713. fi
  714. ])#m4_defun
  715. ])#m4_ifndef
  716. # _LT_LANG_DEFAULT_CONFIG
  717. # -----------------------
  718. m4_defun([_LT_LANG_DEFAULT_CONFIG],
  719. [AC_PROVIDE_IFELSE([AC_PROG_CXX],
  720. [LT_LANG(CXX)],
  721. [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
  722. AC_PROVIDE_IFELSE([AC_PROG_F77],
  723. [LT_LANG(F77)],
  724. [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
  725. AC_PROVIDE_IFELSE([AC_PROG_FC],
  726. [LT_LANG(FC)],
  727. [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
  728. dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
  729. dnl pulling things in needlessly.
  730. AC_PROVIDE_IFELSE([AC_PROG_GCJ],
  731. [LT_LANG(GCJ)],
  732. [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
  733. [LT_LANG(GCJ)],
  734. [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
  735. [LT_LANG(GCJ)],
  736. [m4_ifdef([AC_PROG_GCJ],
  737. [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
  738. m4_ifdef([A][M_PROG_GCJ],
  739. [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
  740. m4_ifdef([LT_PROG_GCJ],
  741. [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
  742. AC_PROVIDE_IFELSE([AC_PROG_GO],
  743. [LT_LANG(GO)],
  744. [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
  745. AC_PROVIDE_IFELSE([LT_PROG_RC],
  746. [LT_LANG(RC)],
  747. [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
  748. ])# _LT_LANG_DEFAULT_CONFIG
  749. # Obsolete macros:
  750. AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
  751. AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
  752. AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
  753. AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
  754. AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
  755. dnl aclocal-1.4 backwards compatibility:
  756. dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
  757. dnl AC_DEFUN([AC_LIBTOOL_F77], [])
  758. dnl AC_DEFUN([AC_LIBTOOL_FC], [])
  759. dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
  760. dnl AC_DEFUN([AC_LIBTOOL_RC], [])
  761. # _LT_TAG_COMPILER
  762. # ----------------
  763. m4_defun([_LT_TAG_COMPILER],
  764. [AC_REQUIRE([AC_PROG_CC])dnl
  765. _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
  766. _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
  767. _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
  768. _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
  769. # If no C compiler was specified, use CC.
  770. LTCC=${LTCC-"$CC"}
  771. # If no C compiler flags were specified, use CFLAGS.
  772. LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
  773. # Allow CC to be a program name with arguments.
  774. compiler=$CC
  775. ])# _LT_TAG_COMPILER
  776. # _LT_COMPILER_BOILERPLATE
  777. # ------------------------
  778. # Check for compiler boilerplate output or warnings with
  779. # the simple compiler test code.
  780. m4_defun([_LT_COMPILER_BOILERPLATE],
  781. [m4_require([_LT_DECL_SED])dnl
  782. ac_outfile=conftest.$ac_objext
  783. echo "$lt_simple_compile_test_code" >conftest.$ac_ext
  784. eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  785. _lt_compiler_boilerplate=`cat conftest.err`
  786. $RM conftest*
  787. ])# _LT_COMPILER_BOILERPLATE
  788. # _LT_LINKER_BOILERPLATE
  789. # ----------------------
  790. # Check for linker boilerplate output or warnings with
  791. # the simple link test code.
  792. m4_defun([_LT_LINKER_BOILERPLATE],
  793. [m4_require([_LT_DECL_SED])dnl
  794. ac_outfile=conftest.$ac_objext
  795. echo "$lt_simple_link_test_code" >conftest.$ac_ext
  796. eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  797. _lt_linker_boilerplate=`cat conftest.err`
  798. $RM -r conftest*
  799. ])# _LT_LINKER_BOILERPLATE
  800. # _LT_REQUIRED_DARWIN_CHECKS
  801. # -------------------------
  802. m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
  803. case $host_os in
  804. rhapsody* | darwin*)
  805. AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
  806. AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
  807. AC_CHECK_TOOL([LIPO], [lipo], [:])
  808. AC_CHECK_TOOL([OTOOL], [otool], [:])
  809. AC_CHECK_TOOL([OTOOL64], [otool64], [:])
  810. _LT_DECL([], [DSYMUTIL], [1],
  811. [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
  812. _LT_DECL([], [NMEDIT], [1],
  813. [Tool to change global to local symbols on Mac OS X])
  814. _LT_DECL([], [LIPO], [1],
  815. [Tool to manipulate fat objects and archives on Mac OS X])
  816. _LT_DECL([], [OTOOL], [1],
  817. [ldd/readelf like tool for Mach-O binaries on Mac OS X])
  818. _LT_DECL([], [OTOOL64], [1],
  819. [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
  820. AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
  821. [lt_cv_apple_cc_single_mod=no
  822. if test -z "${LT_MULTI_MODULE}"; then
  823. # By default we will add the -single_module flag. You can override
  824. # by either setting the environment variable LT_MULTI_MODULE
  825. # non-empty at configure time, or by adding -multi_module to the
  826. # link flags.
  827. rm -rf libconftest.dylib*
  828. echo "int foo(void){return 1;}" > conftest.c
  829. echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  830. -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
  831. $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  832. -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
  833. _lt_result=$?
  834. # If there is a non-empty error log, and "single_module"
  835. # appears in it, assume the flag caused a linker warning
  836. if test -s conftest.err && $GREP single_module conftest.err; then
  837. cat conftest.err >&AS_MESSAGE_LOG_FD
  838. # Otherwise, if the output was created with a 0 exit code from
  839. # the compiler, it worked.
  840. elif test -f libconftest.dylib && test $_lt_result -eq 0; then
  841. lt_cv_apple_cc_single_mod=yes
  842. else
  843. cat conftest.err >&AS_MESSAGE_LOG_FD
  844. fi
  845. rm -rf libconftest.dylib*
  846. rm -f conftest.*
  847. fi])
  848. AC_CACHE_CHECK([for -exported_symbols_list linker flag],
  849. [lt_cv_ld_exported_symbols_list],
  850. [lt_cv_ld_exported_symbols_list=no
  851. save_LDFLAGS=$LDFLAGS
  852. echo "_main" > conftest.sym
  853. LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
  854. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  855. [lt_cv_ld_exported_symbols_list=yes],
  856. [lt_cv_ld_exported_symbols_list=no])
  857. LDFLAGS="$save_LDFLAGS"
  858. ])
  859. AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
  860. [lt_cv_ld_force_load=no
  861. cat > conftest.c << _LT_EOF
  862. int forced_loaded() { return 2;}
  863. _LT_EOF
  864. echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
  865. $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
  866. echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
  867. $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
  868. echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
  869. $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
  870. cat > conftest.c << _LT_EOF
  871. int main() { return 0;}
  872. _LT_EOF
  873. echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
  874. $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
  875. _lt_result=$?
  876. if test -s conftest.err && $GREP force_load conftest.err; then
  877. cat conftest.err >&AS_MESSAGE_LOG_FD
  878. elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
  879. lt_cv_ld_force_load=yes
  880. else
  881. cat conftest.err >&AS_MESSAGE_LOG_FD
  882. fi
  883. rm -f conftest.err libconftest.a conftest conftest.c
  884. rm -rf conftest.dSYM
  885. ])
  886. case $host_os in
  887. rhapsody* | darwin1.[[012]])
  888. _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
  889. darwin1.*)
  890. _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
  891. darwin*)
  892. case $MACOSX_DEPLOYMENT_TARGET,$host in
  893. 10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
  894. _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
  895. *)
  896. _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
  897. esac
  898. ;;
  899. esac
  900. if test "$lt_cv_apple_cc_single_mod" = "yes"; then
  901. _lt_dar_single_mod='$single_module'
  902. fi
  903. if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
  904. _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
  905. else
  906. _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
  907. fi
  908. if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
  909. _lt_dsymutil='~$DSYMUTIL $lib || :'
  910. else
  911. _lt_dsymutil=
  912. fi
  913. ;;
  914. esac
  915. ])
  916. # _LT_DARWIN_LINKER_FEATURES([TAG])
  917. # ---------------------------------
  918. # Checks for linker and compiler features on darwin
  919. m4_defun([_LT_DARWIN_LINKER_FEATURES],
  920. [
  921. m4_require([_LT_REQUIRED_DARWIN_CHECKS])
  922. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  923. _LT_TAGVAR(hardcode_direct, $1)=no
  924. _LT_TAGVAR(hardcode_automatic, $1)=yes
  925. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  926. if test "$lt_cv_ld_force_load" = "yes"; then
  927. _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\"`'
  928. m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
  929. [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
  930. else
  931. _LT_TAGVAR(whole_archive_flag_spec, $1)=''
  932. fi
  933. _LT_TAGVAR(link_all_deplibs, $1)=yes
  934. _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
  935. case $cc_basename in
  936. ifort*) _lt_dar_can_shared=yes ;;
  937. *) _lt_dar_can_shared=$GCC ;;
  938. esac
  939. if test "$_lt_dar_can_shared" = "yes"; then
  940. output_verbose_link_cmd=func_echo_all
  941. _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}"
  942. _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
  943. _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}"
  944. _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}"
  945. m4_if([$1], [CXX],
  946. [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
  947. _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}"
  948. _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}"
  949. fi
  950. ],[])
  951. else
  952. _LT_TAGVAR(ld_shlibs, $1)=no
  953. fi
  954. ])
  955. # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
  956. # ----------------------------------
  957. # Links a minimal program and checks the executable
  958. # for the system default hardcoded library path. In most cases,
  959. # this is /usr/lib:/lib, but when the MPI compilers are used
  960. # the location of the communication and MPI libs are included too.
  961. # If we don't find anything, use the default library path according
  962. # to the aix ld manual.
  963. # Store the results from the different compilers for each TAGNAME.
  964. # Allow to override them for all tags through lt_cv_aix_libpath.
  965. m4_defun([_LT_SYS_MODULE_PATH_AIX],
  966. [m4_require([_LT_DECL_SED])dnl
  967. if test "${lt_cv_aix_libpath+set}" = set; then
  968. aix_libpath=$lt_cv_aix_libpath
  969. else
  970. AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
  971. [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
  972. lt_aix_libpath_sed='[
  973. /Import File Strings/,/^$/ {
  974. /^0/ {
  975. s/^0 *\([^ ]*\) *$/\1/
  976. p
  977. }
  978. }]'
  979. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  980. # Check for a 64-bit object if we didn't find anything.
  981. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
  982. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  983. fi],[])
  984. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
  985. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
  986. fi
  987. ])
  988. aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
  989. fi
  990. ])# _LT_SYS_MODULE_PATH_AIX
  991. # _LT_SHELL_INIT(ARG)
  992. # -------------------
  993. m4_define([_LT_SHELL_INIT],
  994. [m4_divert_text([M4SH-INIT], [$1
  995. ])])# _LT_SHELL_INIT
  996. # _LT_PROG_ECHO_BACKSLASH
  997. # -----------------------
  998. # Find how we can fake an echo command that does not interpret backslash.
  999. # In particular, with Autoconf 2.60 or later we add some code to the start
  1000. # of the generated configure script which will find a shell with a builtin
  1001. # printf (which we can use as an echo command).
  1002. m4_defun([_LT_PROG_ECHO_BACKSLASH],
  1003. [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  1004. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  1005. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  1006. AC_MSG_CHECKING([how to print strings])
  1007. # Test print first, because it will be a builtin if present.
  1008. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
  1009. test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
  1010. ECHO='print -r --'
  1011. elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
  1012. ECHO='printf %s\n'
  1013. else
  1014. # Use this function as a fallback that always works.
  1015. func_fallback_echo ()
  1016. {
  1017. eval 'cat <<_LTECHO_EOF
  1018. $[]1
  1019. _LTECHO_EOF'
  1020. }
  1021. ECHO='func_fallback_echo'
  1022. fi
  1023. # func_echo_all arg...
  1024. # Invoke $ECHO with all args, space-separated.
  1025. func_echo_all ()
  1026. {
  1027. $ECHO "$*"
  1028. }
  1029. case "$ECHO" in
  1030. printf*) AC_MSG_RESULT([printf]) ;;
  1031. print*) AC_MSG_RESULT([print -r]) ;;
  1032. *) AC_MSG_RESULT([cat]) ;;
  1033. esac
  1034. m4_ifdef([_AS_DETECT_SUGGESTED],
  1035. [_AS_DETECT_SUGGESTED([
  1036. test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
  1037. ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  1038. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  1039. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  1040. PATH=/empty FPATH=/empty; export PATH FPATH
  1041. test "X`printf %s $ECHO`" = "X$ECHO" \
  1042. || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
  1043. _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
  1044. _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
  1045. ])# _LT_PROG_ECHO_BACKSLASH
  1046. # _LT_WITH_SYSROOT
  1047. # ----------------
  1048. AC_DEFUN([_LT_WITH_SYSROOT],
  1049. [AC_MSG_CHECKING([for sysroot])
  1050. AC_ARG_WITH([sysroot],
  1051. [ --with-sysroot[=DIR] Search for dependent libraries within DIR
  1052. (or the compiler's sysroot if not specified).],
  1053. [], [with_sysroot=no])
  1054. dnl lt_sysroot will always be passed unquoted. We quote it here
  1055. dnl in case the user passed a directory name.
  1056. lt_sysroot=
  1057. case ${with_sysroot} in #(
  1058. yes)
  1059. if test "$GCC" = yes; then
  1060. lt_sysroot=`$CC --print-sysroot 2>/dev/null`
  1061. fi
  1062. ;; #(
  1063. /*)
  1064. lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
  1065. ;; #(
  1066. no|'')
  1067. ;; #(
  1068. *)
  1069. AC_MSG_RESULT([${with_sysroot}])
  1070. AC_MSG_ERROR([The sysroot must be an absolute path.])
  1071. ;;
  1072. esac
  1073. AC_MSG_RESULT([${lt_sysroot:-no}])
  1074. _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
  1075. [dependent libraries, and in which our libraries should be installed.])])
  1076. # _LT_ENABLE_LOCK
  1077. # ---------------
  1078. m4_defun([_LT_ENABLE_LOCK],
  1079. [AC_ARG_ENABLE([libtool-lock],
  1080. [AS_HELP_STRING([--disable-libtool-lock],
  1081. [avoid locking (might break parallel builds)])])
  1082. test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  1083. # Some flags need to be propagated to the compiler or linker for good
  1084. # libtool support.
  1085. case $host in
  1086. ia64-*-hpux*)
  1087. # Find out which ABI we are using.
  1088. echo 'int i;' > conftest.$ac_ext
  1089. if AC_TRY_EVAL(ac_compile); then
  1090. case `/usr/bin/file conftest.$ac_objext` in
  1091. *ELF-32*)
  1092. HPUX_IA64_MODE="32"
  1093. ;;
  1094. *ELF-64*)
  1095. HPUX_IA64_MODE="64"
  1096. ;;
  1097. esac
  1098. fi
  1099. rm -rf conftest*
  1100. ;;
  1101. *-*-irix6*)
  1102. # Find out which ABI we are using.
  1103. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
  1104. if AC_TRY_EVAL(ac_compile); then
  1105. if test "$lt_cv_prog_gnu_ld" = yes; then
  1106. case `/usr/bin/file conftest.$ac_objext` in
  1107. *32-bit*)
  1108. LD="${LD-ld} -melf32bsmip"
  1109. ;;
  1110. *N32*)
  1111. LD="${LD-ld} -melf32bmipn32"
  1112. ;;
  1113. *64-bit*)
  1114. LD="${LD-ld} -melf64bmip"
  1115. ;;
  1116. esac
  1117. else
  1118. case `/usr/bin/file conftest.$ac_objext` in
  1119. *32-bit*)
  1120. LD="${LD-ld} -32"
  1121. ;;
  1122. *N32*)
  1123. LD="${LD-ld} -n32"
  1124. ;;
  1125. *64-bit*)
  1126. LD="${LD-ld} -64"
  1127. ;;
  1128. esac
  1129. fi
  1130. fi
  1131. rm -rf conftest*
  1132. ;;
  1133. x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
  1134. s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
  1135. # Find out which ABI we are using.
  1136. echo 'int i;' > conftest.$ac_ext
  1137. if AC_TRY_EVAL(ac_compile); then
  1138. case `/usr/bin/file conftest.o` in
  1139. *32-bit*)
  1140. case $host in
  1141. x86_64-*kfreebsd*-gnu)
  1142. LD="${LD-ld} -m elf_i386_fbsd"
  1143. ;;
  1144. x86_64-*linux*)
  1145. LD="${LD-ld} -m elf_i386"
  1146. ;;
  1147. ppc64-*linux*|powerpc64-*linux*)
  1148. LD="${LD-ld} -m elf32ppclinux"
  1149. ;;
  1150. s390x-*linux*)
  1151. LD="${LD-ld} -m elf_s390"
  1152. ;;
  1153. sparc64-*linux*)
  1154. LD="${LD-ld} -m elf32_sparc"
  1155. ;;
  1156. esac
  1157. ;;
  1158. *64-bit*)
  1159. case $host in
  1160. x86_64-*kfreebsd*-gnu)
  1161. LD="${LD-ld} -m elf_x86_64_fbsd"
  1162. ;;
  1163. x86_64-*linux*)
  1164. LD="${LD-ld} -m elf_x86_64"
  1165. ;;
  1166. powerpc64le-*linux*)
  1167. LD="${LD-ld} -m elf64lppc"
  1168. ;;
  1169. powerpc64-*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. # ...but if some path already ends with the multilib dir we assume
  1934. # that all is fine and trust -print-search-dirs as is (GCC 4.2 or newer).
  1935. case "$lt_multi_os_dir; $lt_search_path_spec " in
  1936. "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
  1937. lt_multi_os_dir=
  1938. ;;
  1939. esac
  1940. for lt_sys_path in $lt_search_path_spec; do
  1941. if test -d "$lt_sys_path$lt_multi_os_dir"; then
  1942. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
  1943. elif test -n "$lt_multi_os_dir"; then
  1944. test -d "$lt_sys_path" && \
  1945. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
  1946. fi
  1947. done
  1948. lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
  1949. BEGIN {RS=" "; FS="/|\n";} {
  1950. lt_foo="";
  1951. lt_count=0;
  1952. for (lt_i = NF; lt_i > 0; lt_i--) {
  1953. if ($lt_i != "" && $lt_i != ".") {
  1954. if ($lt_i == "..") {
  1955. lt_count++;
  1956. } else {
  1957. if (lt_count == 0) {
  1958. lt_foo="/" $lt_i lt_foo;
  1959. } else {
  1960. lt_count--;
  1961. }
  1962. }
  1963. }
  1964. }
  1965. if (lt_foo != "") { lt_freq[[lt_foo]]++; }
  1966. if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
  1967. }'`
  1968. # AWK program above erroneously prepends '/' to C:/dos/paths
  1969. # for these hosts.
  1970. case $host_os in
  1971. mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
  1972. $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
  1973. esac
  1974. sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
  1975. else
  1976. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  1977. fi])
  1978. library_names_spec=
  1979. libname_spec='lib$name'
  1980. soname_spec=
  1981. shrext_cmds=".so"
  1982. postinstall_cmds=
  1983. postuninstall_cmds=
  1984. finish_cmds=
  1985. finish_eval=
  1986. shlibpath_var=
  1987. shlibpath_overrides_runpath=unknown
  1988. version_type=none
  1989. dynamic_linker="$host_os ld.so"
  1990. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  1991. need_lib_prefix=unknown
  1992. hardcode_into_libs=no
  1993. # when you set need_version to no, make sure it does not cause -set_version
  1994. # flags to be left without arguments
  1995. need_version=unknown
  1996. case $host_os in
  1997. aix3*)
  1998. version_type=linux # correct to gnu/linux during the next big refactor
  1999. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
  2000. shlibpath_var=LIBPATH
  2001. # AIX 3 has no versioning support, so we append a major version to the name.
  2002. soname_spec='${libname}${release}${shared_ext}$major'
  2003. ;;
  2004. aix[[4-9]]*)
  2005. version_type=linux # correct to gnu/linux during the next big refactor
  2006. need_lib_prefix=no
  2007. need_version=no
  2008. hardcode_into_libs=yes
  2009. if test "$host_cpu" = ia64; then
  2010. # AIX 5 supports IA64
  2011. library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
  2012. shlibpath_var=LD_LIBRARY_PATH
  2013. else
  2014. # With GCC up to 2.95.x, collect2 would create an import file
  2015. # for dependence libraries. The import file would start with
  2016. # the line `#! .'. This would cause the generated library to
  2017. # depend on `.', always an invalid library. This was fixed in
  2018. # development snapshots of GCC prior to 3.0.
  2019. case $host_os in
  2020. aix4 | aix4.[[01]] | aix4.[[01]].*)
  2021. if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
  2022. echo ' yes '
  2023. echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
  2024. :
  2025. else
  2026. can_build_shared=no
  2027. fi
  2028. ;;
  2029. esac
  2030. # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
  2031. # soname into executable. Probably we can add versioning support to
  2032. # collect2, so additional links can be useful in future.
  2033. if test "$aix_use_runtimelinking" = yes; then
  2034. # If using run time linking (on AIX 4.2 or later) use lib<name>.so
  2035. # instead of lib<name>.a to let people know that these are not
  2036. # typical AIX shared libraries.
  2037. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2038. else
  2039. # We preserve .a as extension for shared libraries through AIX4.2
  2040. # and later when we are not doing run time linking.
  2041. library_names_spec='${libname}${release}.a $libname.a'
  2042. soname_spec='${libname}${release}${shared_ext}$major'
  2043. fi
  2044. shlibpath_var=LIBPATH
  2045. fi
  2046. ;;
  2047. amigaos*)
  2048. case $host_cpu in
  2049. powerpc)
  2050. # Since July 2007 AmigaOS4 officially supports .so libraries.
  2051. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
  2052. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2053. ;;
  2054. m68k)
  2055. library_names_spec='$libname.ixlibrary $libname.a'
  2056. # Create ${libname}_ixlibrary.a entries in /sys/libs.
  2057. 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'
  2058. ;;
  2059. esac
  2060. ;;
  2061. beos*)
  2062. library_names_spec='${libname}${shared_ext}'
  2063. dynamic_linker="$host_os ld.so"
  2064. shlibpath_var=LIBRARY_PATH
  2065. ;;
  2066. bsdi[[45]]*)
  2067. version_type=linux # correct to gnu/linux during the next big refactor
  2068. need_version=no
  2069. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2070. soname_spec='${libname}${release}${shared_ext}$major'
  2071. finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  2072. shlibpath_var=LD_LIBRARY_PATH
  2073. sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  2074. sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  2075. # the default ld.so.conf also contains /usr/contrib/lib and
  2076. # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  2077. # libtool to hard-code these into programs
  2078. ;;
  2079. cygwin* | mingw* | pw32* | cegcc*)
  2080. version_type=windows
  2081. shrext_cmds=".dll"
  2082. need_version=no
  2083. need_lib_prefix=no
  2084. case $GCC,$cc_basename in
  2085. yes,*)
  2086. # gcc
  2087. library_names_spec='$libname.dll.a'
  2088. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  2089. postinstall_cmds='base_file=`basename \${file}`~
  2090. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
  2091. dldir=$destdir/`dirname \$dlpath`~
  2092. test -d \$dldir || mkdir -p \$dldir~
  2093. $install_prog $dir/$dlname \$dldir/$dlname~
  2094. chmod a+x \$dldir/$dlname~
  2095. if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
  2096. eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
  2097. fi'
  2098. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  2099. dlpath=$dir/\$dldll~
  2100. $RM \$dlpath'
  2101. shlibpath_overrides_runpath=yes
  2102. case $host_os in
  2103. cygwin*)
  2104. # Cygwin DLLs use 'cyg' prefix rather than 'lib'
  2105. #soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  2106. soname_spec='`echo ${libname} | sed -e 's/^lib//'`${shared_ext}'
  2107. m4_if([$1], [],[
  2108. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
  2109. ;;
  2110. mingw* | cegcc*)
  2111. # MinGW DLLs use traditional 'lib' prefix
  2112. #soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  2113. soname_spec='`echo ${libname} | $SED -e 's/^lib//'`${shared_ext}'
  2114. ;;
  2115. pw32*)
  2116. # pw32 DLLs use 'pw' prefix rather than 'lib'
  2117. library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  2118. ;;
  2119. esac
  2120. dynamic_linker='Win32 ld.exe'
  2121. ;;
  2122. *,cl*)
  2123. # Native MSVC
  2124. libname_spec='$name'
  2125. soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  2126. library_names_spec='${libname}.dll.lib'
  2127. case $build_os in
  2128. mingw*)
  2129. sys_lib_search_path_spec=
  2130. lt_save_ifs=$IFS
  2131. IFS=';'
  2132. for lt_path in $LIB
  2133. do
  2134. IFS=$lt_save_ifs
  2135. # Let DOS variable expansion print the short 8.3 style file name.
  2136. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
  2137. sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
  2138. done
  2139. IFS=$lt_save_ifs
  2140. # Convert to MSYS style.
  2141. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
  2142. ;;
  2143. cygwin*)
  2144. # Convert to unix form, then to dos form, then back to unix form
  2145. # but this time dos style (no spaces!) so that the unix form looks
  2146. # like /cygdrive/c/PROGRA~1:/cygdr...
  2147. sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
  2148. sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
  2149. sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  2150. ;;
  2151. *)
  2152. sys_lib_search_path_spec="$LIB"
  2153. if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
  2154. # It is most probably a Windows format PATH.
  2155. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  2156. else
  2157. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  2158. fi
  2159. # FIXME: find the short name or the path components, as spaces are
  2160. # common. (e.g. "Program Files" -> "PROGRA~1")
  2161. ;;
  2162. esac
  2163. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  2164. postinstall_cmds='base_file=`basename \${file}`~
  2165. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
  2166. dldir=$destdir/`dirname \$dlpath`~
  2167. test -d \$dldir || mkdir -p \$dldir~
  2168. $install_prog $dir/$dlname \$dldir/$dlname'
  2169. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  2170. dlpath=$dir/\$dldll~
  2171. $RM \$dlpath'
  2172. shlibpath_overrides_runpath=yes
  2173. dynamic_linker='Win32 link.exe'
  2174. ;;
  2175. *)
  2176. # Assume MSVC wrapper
  2177. library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
  2178. dynamic_linker='Win32 ld.exe'
  2179. ;;
  2180. esac
  2181. # FIXME: first we should search . and the directory the executable is in
  2182. shlibpath_var=PATH
  2183. ;;
  2184. darwin* | rhapsody*)
  2185. dynamic_linker="$host_os dyld"
  2186. version_type=darwin
  2187. need_lib_prefix=no
  2188. need_version=no
  2189. library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
  2190. soname_spec='${libname}${release}${major}$shared_ext'
  2191. shlibpath_overrides_runpath=yes
  2192. shlibpath_var=DYLD_LIBRARY_PATH
  2193. shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
  2194. m4_if([$1], [],[
  2195. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
  2196. sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
  2197. ;;
  2198. dgux*)
  2199. version_type=linux # correct to gnu/linux during the next big refactor
  2200. need_lib_prefix=no
  2201. need_version=no
  2202. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
  2203. soname_spec='${libname}${release}${shared_ext}$major'
  2204. shlibpath_var=LD_LIBRARY_PATH
  2205. ;;
  2206. freebsd* | dragonfly*)
  2207. # DragonFly does not have aout. When/if they implement a new
  2208. # versioning mechanism, adjust this.
  2209. if test -x /usr/bin/objformat; then
  2210. objformat=`/usr/bin/objformat`
  2211. else
  2212. case $host_os in
  2213. freebsd[[23]].*) objformat=aout ;;
  2214. *) objformat=elf ;;
  2215. esac
  2216. fi
  2217. version_type=freebsd-$objformat
  2218. case $version_type in
  2219. freebsd-elf*)
  2220. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  2221. need_version=no
  2222. need_lib_prefix=no
  2223. ;;
  2224. freebsd-*)
  2225. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
  2226. need_version=yes
  2227. ;;
  2228. esac
  2229. shlibpath_var=LD_LIBRARY_PATH
  2230. case $host_os in
  2231. freebsd2.*)
  2232. shlibpath_overrides_runpath=yes
  2233. ;;
  2234. freebsd3.[[01]]* | freebsdelf3.[[01]]*)
  2235. shlibpath_overrides_runpath=yes
  2236. hardcode_into_libs=yes
  2237. ;;
  2238. freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
  2239. freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
  2240. shlibpath_overrides_runpath=no
  2241. hardcode_into_libs=yes
  2242. ;;
  2243. *) # from 4.6 on, and DragonFly
  2244. shlibpath_overrides_runpath=yes
  2245. hardcode_into_libs=yes
  2246. ;;
  2247. esac
  2248. ;;
  2249. gnu*)
  2250. version_type=linux # correct to gnu/linux during the next big refactor
  2251. need_lib_prefix=no
  2252. need_version=no
  2253. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  2254. soname_spec='${libname}${release}${shared_ext}$major'
  2255. shlibpath_var=LD_LIBRARY_PATH
  2256. shlibpath_overrides_runpath=no
  2257. hardcode_into_libs=yes
  2258. ;;
  2259. haiku*)
  2260. version_type=linux # correct to gnu/linux during the next big refactor
  2261. need_lib_prefix=no
  2262. need_version=no
  2263. dynamic_linker="$host_os runtime_loader"
  2264. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  2265. soname_spec='${libname}${release}${shared_ext}$major'
  2266. shlibpath_var=LIBRARY_PATH
  2267. shlibpath_overrides_runpath=yes
  2268. sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
  2269. hardcode_into_libs=yes
  2270. ;;
  2271. hpux9* | hpux10* | hpux11*)
  2272. # Give a soname corresponding to the major version so that dld.sl refuses to
  2273. # link against other versions.
  2274. version_type=sunos
  2275. need_lib_prefix=no
  2276. need_version=no
  2277. case $host_cpu in
  2278. ia64*)
  2279. shrext_cmds='.so'
  2280. hardcode_into_libs=yes
  2281. dynamic_linker="$host_os dld.so"
  2282. shlibpath_var=LD_LIBRARY_PATH
  2283. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  2284. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2285. soname_spec='${libname}${release}${shared_ext}$major'
  2286. if test "X$HPUX_IA64_MODE" = X32; then
  2287. sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
  2288. else
  2289. sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
  2290. fi
  2291. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2292. ;;
  2293. hppa*64*)
  2294. shrext_cmds='.sl'
  2295. hardcode_into_libs=yes
  2296. dynamic_linker="$host_os dld.sl"
  2297. shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
  2298. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  2299. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2300. soname_spec='${libname}${release}${shared_ext}$major'
  2301. sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
  2302. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2303. ;;
  2304. *)
  2305. shrext_cmds='.sl'
  2306. dynamic_linker="$host_os dld.sl"
  2307. shlibpath_var=SHLIB_PATH
  2308. shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  2309. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2310. soname_spec='${libname}${release}${shared_ext}$major'
  2311. ;;
  2312. esac
  2313. # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
  2314. postinstall_cmds='chmod 555 $lib'
  2315. # or fails outright, so override atomically:
  2316. install_override_mode=555
  2317. ;;
  2318. interix[[3-9]]*)
  2319. version_type=linux # correct to gnu/linux during the next big refactor
  2320. need_lib_prefix=no
  2321. need_version=no
  2322. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  2323. soname_spec='${libname}${release}${shared_ext}$major'
  2324. dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
  2325. shlibpath_var=LD_LIBRARY_PATH
  2326. shlibpath_overrides_runpath=no
  2327. hardcode_into_libs=yes
  2328. ;;
  2329. irix5* | irix6* | nonstopux*)
  2330. case $host_os in
  2331. nonstopux*) version_type=nonstopux ;;
  2332. *)
  2333. if test "$lt_cv_prog_gnu_ld" = yes; then
  2334. version_type=linux # correct to gnu/linux during the next big refactor
  2335. else
  2336. version_type=irix
  2337. fi ;;
  2338. esac
  2339. need_lib_prefix=no
  2340. need_version=no
  2341. soname_spec='${libname}${release}${shared_ext}$major'
  2342. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
  2343. case $host_os in
  2344. irix5* | nonstopux*)
  2345. libsuff= shlibsuff=
  2346. ;;
  2347. *)
  2348. case $LD in # libtool.m4 will add one of these switches to LD
  2349. *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
  2350. libsuff= shlibsuff= libmagic=32-bit;;
  2351. *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
  2352. libsuff=32 shlibsuff=N32 libmagic=N32;;
  2353. *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
  2354. libsuff=64 shlibsuff=64 libmagic=64-bit;;
  2355. *) libsuff= shlibsuff= libmagic=never-match;;
  2356. esac
  2357. ;;
  2358. esac
  2359. shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  2360. shlibpath_overrides_runpath=no
  2361. sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
  2362. sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
  2363. hardcode_into_libs=yes
  2364. ;;
  2365. # No shared lib support for Linux oldld, aout, or coff.
  2366. linux*oldld* | linux*aout* | linux*coff*)
  2367. dynamic_linker=no
  2368. ;;
  2369. # This must be glibc/ELF.
  2370. linux* | k*bsd*-gnu | kopensolaris*-gnu)
  2371. version_type=linux # correct to gnu/linux during the next big refactor
  2372. need_lib_prefix=no
  2373. need_version=no
  2374. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2375. soname_spec='${libname}${release}${shared_ext}$major'
  2376. finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  2377. shlibpath_var=LD_LIBRARY_PATH
  2378. shlibpath_overrides_runpath=no
  2379. # Some binutils ld are patched to set DT_RUNPATH
  2380. AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
  2381. [lt_cv_shlibpath_overrides_runpath=no
  2382. save_LDFLAGS=$LDFLAGS
  2383. save_libdir=$libdir
  2384. eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
  2385. LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
  2386. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  2387. [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
  2388. [lt_cv_shlibpath_overrides_runpath=yes])])
  2389. LDFLAGS=$save_LDFLAGS
  2390. libdir=$save_libdir
  2391. ])
  2392. shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
  2393. # This implies no fast_install, which is unacceptable.
  2394. # Some rework will be needed to allow for fast_install
  2395. # before this can be enabled.
  2396. hardcode_into_libs=yes
  2397. # Append ld.so.conf contents to the search path
  2398. if test -f /etc/ld.so.conf; then
  2399. 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' ' '`
  2400. sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
  2401. fi
  2402. # We used to test for /lib/ld.so.1 and disable shared libraries on
  2403. # powerpc, because MkLinux only supported shared libraries with the
  2404. # GNU dynamic linker. Since this was broken with cross compilers,
  2405. # most powerpc-linux boxes support dynamic linking these days and
  2406. # people can always --disable-shared, the test was removed, and we
  2407. # assume the GNU/Linux dynamic linker is in use.
  2408. dynamic_linker='GNU/Linux ld.so'
  2409. ;;
  2410. netbsd*)
  2411. version_type=sunos
  2412. need_lib_prefix=no
  2413. need_version=no
  2414. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  2415. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  2416. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2417. dynamic_linker='NetBSD (a.out) ld.so'
  2418. else
  2419. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  2420. soname_spec='${libname}${release}${shared_ext}$major'
  2421. dynamic_linker='NetBSD ld.elf_so'
  2422. fi
  2423. shlibpath_var=LD_LIBRARY_PATH
  2424. shlibpath_overrides_runpath=yes
  2425. hardcode_into_libs=yes
  2426. ;;
  2427. newsos6)
  2428. version_type=linux # correct to gnu/linux during the next big refactor
  2429. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2430. shlibpath_var=LD_LIBRARY_PATH
  2431. shlibpath_overrides_runpath=yes
  2432. ;;
  2433. *nto* | *qnx*)
  2434. version_type=qnx
  2435. need_lib_prefix=no
  2436. need_version=no
  2437. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2438. soname_spec='${libname}${release}${shared_ext}$major'
  2439. shlibpath_var=LD_LIBRARY_PATH
  2440. shlibpath_overrides_runpath=no
  2441. hardcode_into_libs=yes
  2442. dynamic_linker='ldqnx.so'
  2443. ;;
  2444. openbsd*)
  2445. version_type=sunos
  2446. sys_lib_dlsearch_path_spec="/usr/lib"
  2447. need_lib_prefix=no
  2448. # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
  2449. case $host_os in
  2450. openbsd3.3 | openbsd3.3.*) need_version=yes ;;
  2451. *) need_version=no ;;
  2452. esac
  2453. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  2454. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2455. shlibpath_var=LD_LIBRARY_PATH
  2456. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  2457. case $host_os in
  2458. openbsd2.[[89]] | openbsd2.[[89]].*)
  2459. shlibpath_overrides_runpath=no
  2460. ;;
  2461. *)
  2462. shlibpath_overrides_runpath=yes
  2463. ;;
  2464. esac
  2465. else
  2466. shlibpath_overrides_runpath=yes
  2467. fi
  2468. ;;
  2469. os2*)
  2470. libname_spec='$name'
  2471. shrext_cmds=".dll"
  2472. need_lib_prefix=no
  2473. library_names_spec='$libname${shared_ext} $libname.a'
  2474. dynamic_linker='OS/2 ld.exe'
  2475. shlibpath_var=LIBPATH
  2476. ;;
  2477. osf3* | osf4* | osf5*)
  2478. version_type=osf
  2479. need_lib_prefix=no
  2480. need_version=no
  2481. soname_spec='${libname}${release}${shared_ext}$major'
  2482. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2483. shlibpath_var=LD_LIBRARY_PATH
  2484. sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  2485. sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  2486. ;;
  2487. rdos*)
  2488. dynamic_linker=no
  2489. ;;
  2490. solaris*)
  2491. version_type=linux # correct to gnu/linux during the next big refactor
  2492. need_lib_prefix=no
  2493. need_version=no
  2494. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2495. soname_spec='${libname}${release}${shared_ext}$major'
  2496. shlibpath_var=LD_LIBRARY_PATH
  2497. shlibpath_overrides_runpath=yes
  2498. hardcode_into_libs=yes
  2499. # ldd complains unless libraries are executable
  2500. postinstall_cmds='chmod +x $lib'
  2501. ;;
  2502. sunos4*)
  2503. version_type=sunos
  2504. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  2505. finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  2506. shlibpath_var=LD_LIBRARY_PATH
  2507. shlibpath_overrides_runpath=yes
  2508. if test "$with_gnu_ld" = yes; then
  2509. need_lib_prefix=no
  2510. fi
  2511. need_version=yes
  2512. ;;
  2513. sysv4 | sysv4.3*)
  2514. version_type=linux # correct to gnu/linux during the next big refactor
  2515. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2516. soname_spec='${libname}${release}${shared_ext}$major'
  2517. shlibpath_var=LD_LIBRARY_PATH
  2518. case $host_vendor in
  2519. sni)
  2520. shlibpath_overrides_runpath=no
  2521. need_lib_prefix=no
  2522. runpath_var=LD_RUN_PATH
  2523. ;;
  2524. siemens)
  2525. need_lib_prefix=no
  2526. ;;
  2527. motorola)
  2528. need_lib_prefix=no
  2529. need_version=no
  2530. shlibpath_overrides_runpath=no
  2531. sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  2532. ;;
  2533. esac
  2534. ;;
  2535. sysv4*MP*)
  2536. if test -d /usr/nec ;then
  2537. version_type=linux # correct to gnu/linux during the next big refactor
  2538. library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
  2539. soname_spec='$libname${shared_ext}.$major'
  2540. shlibpath_var=LD_LIBRARY_PATH
  2541. fi
  2542. ;;
  2543. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  2544. version_type=freebsd-elf
  2545. need_lib_prefix=no
  2546. need_version=no
  2547. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  2548. soname_spec='${libname}${release}${shared_ext}$major'
  2549. shlibpath_var=LD_LIBRARY_PATH
  2550. shlibpath_overrides_runpath=yes
  2551. hardcode_into_libs=yes
  2552. if test "$with_gnu_ld" = yes; then
  2553. sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
  2554. else
  2555. sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
  2556. case $host_os in
  2557. sco3.2v5*)
  2558. sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
  2559. ;;
  2560. esac
  2561. fi
  2562. sys_lib_dlsearch_path_spec='/usr/lib'
  2563. ;;
  2564. tpf*)
  2565. # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
  2566. version_type=linux # correct to gnu/linux during the next big refactor
  2567. need_lib_prefix=no
  2568. need_version=no
  2569. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2570. shlibpath_var=LD_LIBRARY_PATH
  2571. shlibpath_overrides_runpath=no
  2572. hardcode_into_libs=yes
  2573. ;;
  2574. uts4*)
  2575. version_type=linux # correct to gnu/linux during the next big refactor
  2576. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2577. soname_spec='${libname}${release}${shared_ext}$major'
  2578. shlibpath_var=LD_LIBRARY_PATH
  2579. ;;
  2580. *)
  2581. dynamic_linker=no
  2582. ;;
  2583. esac
  2584. AC_MSG_RESULT([$dynamic_linker])
  2585. test "$dynamic_linker" = no && can_build_shared=no
  2586. variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  2587. if test "$GCC" = yes; then
  2588. variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  2589. fi
  2590. if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
  2591. sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
  2592. fi
  2593. if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
  2594. sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
  2595. fi
  2596. _LT_DECL([], [variables_saved_for_relink], [1],
  2597. [Variables whose values should be saved in libtool wrapper scripts and
  2598. restored at link time])
  2599. _LT_DECL([], [need_lib_prefix], [0],
  2600. [Do we need the "lib" prefix for modules?])
  2601. _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
  2602. _LT_DECL([], [version_type], [0], [Library versioning type])
  2603. _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
  2604. _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
  2605. _LT_DECL([], [shlibpath_overrides_runpath], [0],
  2606. [Is shlibpath searched before the hard-coded library search path?])
  2607. _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
  2608. _LT_DECL([], [library_names_spec], [1],
  2609. [[List of archive names. First name is the real one, the rest are links.
  2610. The last name is the one that the linker finds with -lNAME]])
  2611. _LT_DECL([], [soname_spec], [1],
  2612. [[The coded name of the library, if different from the real name]])
  2613. _LT_DECL([], [install_override_mode], [1],
  2614. [Permission mode override for installation of shared libraries])
  2615. _LT_DECL([], [postinstall_cmds], [2],
  2616. [Command to use after installation of a shared archive])
  2617. _LT_DECL([], [postuninstall_cmds], [2],
  2618. [Command to use after uninstallation of a shared archive])
  2619. _LT_DECL([], [finish_cmds], [2],
  2620. [Commands used to finish a libtool library installation in a directory])
  2621. _LT_DECL([], [finish_eval], [1],
  2622. [[As "finish_cmds", except a single script fragment to be evaled but
  2623. not shown]])
  2624. _LT_DECL([], [hardcode_into_libs], [0],
  2625. [Whether we should hardcode library paths into libraries])
  2626. _LT_DECL([], [sys_lib_search_path_spec], [2],
  2627. [Compile-time system search path for libraries])
  2628. _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
  2629. [Run-time system search path for libraries])
  2630. ])# _LT_SYS_DYNAMIC_LINKER
  2631. # _LT_PATH_TOOL_PREFIX(TOOL)
  2632. # --------------------------
  2633. # find a file program which can recognize shared library
  2634. AC_DEFUN([_LT_PATH_TOOL_PREFIX],
  2635. [m4_require([_LT_DECL_EGREP])dnl
  2636. AC_MSG_CHECKING([for $1])
  2637. AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
  2638. [case $MAGIC_CMD in
  2639. [[\\/*] | ?:[\\/]*])
  2640. lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
  2641. ;;
  2642. *)
  2643. lt_save_MAGIC_CMD="$MAGIC_CMD"
  2644. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  2645. dnl $ac_dummy forces splitting on constant user-supplied paths.
  2646. dnl POSIX.2 word splitting is done only on the output of word expansions,
  2647. dnl not every word. This closes a longstanding sh security hole.
  2648. ac_dummy="m4_if([$2], , $PATH, [$2])"
  2649. for ac_dir in $ac_dummy; do
  2650. IFS="$lt_save_ifs"
  2651. test -z "$ac_dir" && ac_dir=.
  2652. if test -f $ac_dir/$1; then
  2653. lt_cv_path_MAGIC_CMD="$ac_dir/$1"
  2654. if test -n "$file_magic_test_file"; then
  2655. case $deplibs_check_method in
  2656. "file_magic "*)
  2657. file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
  2658. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  2659. if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  2660. $EGREP "$file_magic_regex" > /dev/null; then
  2661. :
  2662. else
  2663. cat <<_LT_EOF 1>&2
  2664. *** Warning: the command libtool uses to detect shared libraries,
  2665. *** $file_magic_cmd, produces output that libtool cannot recognize.
  2666. *** The result is that libtool may fail to recognize shared libraries
  2667. *** as such. This will affect the creation of libtool libraries that
  2668. *** depend on shared libraries, but programs linked with such libtool
  2669. *** libraries will work regardless of this problem. Nevertheless, you
  2670. *** may want to report the problem to your system manager and/or to
  2671. *** bug-libtool@gnu.org
  2672. _LT_EOF
  2673. fi ;;
  2674. esac
  2675. fi
  2676. break
  2677. fi
  2678. done
  2679. IFS="$lt_save_ifs"
  2680. MAGIC_CMD="$lt_save_MAGIC_CMD"
  2681. ;;
  2682. esac])
  2683. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  2684. if test -n "$MAGIC_CMD"; then
  2685. AC_MSG_RESULT($MAGIC_CMD)
  2686. else
  2687. AC_MSG_RESULT(no)
  2688. fi
  2689. _LT_DECL([], [MAGIC_CMD], [0],
  2690. [Used to examine libraries when file_magic_cmd begins with "file"])dnl
  2691. ])# _LT_PATH_TOOL_PREFIX
  2692. # Old name:
  2693. AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
  2694. dnl aclocal-1.4 backwards compatibility:
  2695. dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
  2696. # _LT_PATH_MAGIC
  2697. # --------------
  2698. # find a file program which can recognize a shared library
  2699. m4_defun([_LT_PATH_MAGIC],
  2700. [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
  2701. if test -z "$lt_cv_path_MAGIC_CMD"; then
  2702. if test -n "$ac_tool_prefix"; then
  2703. _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
  2704. else
  2705. MAGIC_CMD=:
  2706. fi
  2707. fi
  2708. ])# _LT_PATH_MAGIC
  2709. # LT_PATH_LD
  2710. # ----------
  2711. # find the pathname to the GNU or non-GNU linker
  2712. AC_DEFUN([LT_PATH_LD],
  2713. [AC_REQUIRE([AC_PROG_CC])dnl
  2714. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2715. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  2716. m4_require([_LT_DECL_SED])dnl
  2717. m4_require([_LT_DECL_EGREP])dnl
  2718. m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
  2719. AC_ARG_WITH([gnu-ld],
  2720. [AS_HELP_STRING([--with-gnu-ld],
  2721. [assume the C compiler uses GNU ld @<:@default=no@:>@])],
  2722. [test "$withval" = no || with_gnu_ld=yes],
  2723. [with_gnu_ld=no])dnl
  2724. ac_prog=ld
  2725. if test "$GCC" = yes; then
  2726. # Check if gcc -print-prog-name=ld gives a path.
  2727. AC_MSG_CHECKING([for ld used by $CC])
  2728. case $host in
  2729. *-*-mingw*)
  2730. # gcc leaves a trailing carriage return which upsets mingw
  2731. ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  2732. *)
  2733. ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  2734. esac
  2735. case $ac_prog in
  2736. # Accept absolute paths.
  2737. [[\\/]]* | ?:[[\\/]]*)
  2738. re_direlt='/[[^/]][[^/]]*/\.\./'
  2739. # Canonicalize the pathname of ld
  2740. ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
  2741. while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
  2742. ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
  2743. done
  2744. test -z "$LD" && LD="$ac_prog"
  2745. ;;
  2746. "")
  2747. # If it fails, then pretend we aren't using GCC.
  2748. ac_prog=ld
  2749. ;;
  2750. *)
  2751. # If it is relative, then search for the first ld in PATH.
  2752. with_gnu_ld=unknown
  2753. ;;
  2754. esac
  2755. elif test "$with_gnu_ld" = yes; then
  2756. AC_MSG_CHECKING([for GNU ld])
  2757. else
  2758. AC_MSG_CHECKING([for non-GNU ld])
  2759. fi
  2760. AC_CACHE_VAL(lt_cv_path_LD,
  2761. [if test -z "$LD"; then
  2762. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  2763. for ac_dir in $PATH; do
  2764. IFS="$lt_save_ifs"
  2765. test -z "$ac_dir" && ac_dir=.
  2766. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  2767. lt_cv_path_LD="$ac_dir/$ac_prog"
  2768. # Check to see if the program is GNU ld. I'd rather use --version,
  2769. # but apparently some variants of GNU ld only accept -v.
  2770. # Break only if it was the GNU/non-GNU ld that we prefer.
  2771. case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
  2772. *GNU* | *'with BFD'*)
  2773. test "$with_gnu_ld" != no && break
  2774. ;;
  2775. *)
  2776. test "$with_gnu_ld" != yes && break
  2777. ;;
  2778. esac
  2779. fi
  2780. done
  2781. IFS="$lt_save_ifs"
  2782. else
  2783. lt_cv_path_LD="$LD" # Let the user override the test with a path.
  2784. fi])
  2785. LD="$lt_cv_path_LD"
  2786. if test -n "$LD"; then
  2787. AC_MSG_RESULT($LD)
  2788. else
  2789. AC_MSG_RESULT(no)
  2790. fi
  2791. test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  2792. _LT_PATH_LD_GNU
  2793. AC_SUBST([LD])
  2794. _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
  2795. ])# LT_PATH_LD
  2796. # Old names:
  2797. AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
  2798. AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
  2799. dnl aclocal-1.4 backwards compatibility:
  2800. dnl AC_DEFUN([AM_PROG_LD], [])
  2801. dnl AC_DEFUN([AC_PROG_LD], [])
  2802. # _LT_PATH_LD_GNU
  2803. #- --------------
  2804. m4_defun([_LT_PATH_LD_GNU],
  2805. [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
  2806. [# I'd rather use --version here, but apparently some GNU lds only accept -v.
  2807. case `$LD -v 2>&1 </dev/null` in
  2808. *GNU* | *'with BFD'*)
  2809. lt_cv_prog_gnu_ld=yes
  2810. ;;
  2811. *)
  2812. lt_cv_prog_gnu_ld=no
  2813. ;;
  2814. esac])
  2815. with_gnu_ld=$lt_cv_prog_gnu_ld
  2816. ])# _LT_PATH_LD_GNU
  2817. # _LT_CMD_RELOAD
  2818. # --------------
  2819. # find reload flag for linker
  2820. # -- PORTME Some linkers may need a different reload flag.
  2821. m4_defun([_LT_CMD_RELOAD],
  2822. [AC_CACHE_CHECK([for $LD option to reload object files],
  2823. lt_cv_ld_reload_flag,
  2824. [lt_cv_ld_reload_flag='-r'])
  2825. reload_flag=$lt_cv_ld_reload_flag
  2826. case $reload_flag in
  2827. "" | " "*) ;;
  2828. *) reload_flag=" $reload_flag" ;;
  2829. esac
  2830. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  2831. case $host_os in
  2832. cygwin* | mingw* | pw32* | cegcc*)
  2833. if test "$GCC" != yes; then
  2834. reload_cmds=false
  2835. fi
  2836. ;;
  2837. darwin*)
  2838. if test "$GCC" = yes; then
  2839. reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
  2840. else
  2841. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  2842. fi
  2843. ;;
  2844. esac
  2845. _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
  2846. _LT_TAGDECL([], [reload_cmds], [2])dnl
  2847. ])# _LT_CMD_RELOAD
  2848. # _LT_CHECK_MAGIC_METHOD
  2849. # ----------------------
  2850. # how to check for library dependencies
  2851. # -- PORTME fill in with the dynamic library characteristics
  2852. m4_defun([_LT_CHECK_MAGIC_METHOD],
  2853. [m4_require([_LT_DECL_EGREP])
  2854. m4_require([_LT_DECL_OBJDUMP])
  2855. AC_CACHE_CHECK([how to recognize dependent libraries],
  2856. lt_cv_deplibs_check_method,
  2857. [lt_cv_file_magic_cmd='$MAGIC_CMD'
  2858. lt_cv_file_magic_test_file=
  2859. lt_cv_deplibs_check_method='unknown'
  2860. # Need to set the preceding variable on all platforms that support
  2861. # interlibrary dependencies.
  2862. # 'none' -- dependencies not supported.
  2863. # `unknown' -- same as none, but documents that we really don't know.
  2864. # 'pass_all' -- all dependencies passed with no checks.
  2865. # 'test_compile' -- check by making test program.
  2866. # 'file_magic [[regex]]' -- check by looking for files in library path
  2867. # which responds to the $file_magic_cmd with a given extended regex.
  2868. # If you have `file' or equivalent on your system and you're not sure
  2869. # whether `pass_all' will *always* work, you probably want this one.
  2870. case $host_os in
  2871. aix[[4-9]]*)
  2872. lt_cv_deplibs_check_method=pass_all
  2873. ;;
  2874. beos*)
  2875. lt_cv_deplibs_check_method=pass_all
  2876. ;;
  2877. bsdi[[45]]*)
  2878. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
  2879. lt_cv_file_magic_cmd='/usr/bin/file -L'
  2880. lt_cv_file_magic_test_file=/shlib/libc.so
  2881. ;;
  2882. cygwin*)
  2883. # func_win32_libid is a shell function defined in ltmain.sh
  2884. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  2885. lt_cv_file_magic_cmd='func_win32_libid'
  2886. lt_cv_deplibs_check_method=pass_all
  2887. ;;
  2888. mingw* | pw32*)
  2889. # Base MSYS/MinGW do not provide the 'file' command needed by
  2890. # func_win32_libid shell function, so use a weaker test based on 'objdump',
  2891. # unless we find 'file', for example because we are cross-compiling.
  2892. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
  2893. if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
  2894. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  2895. lt_cv_file_magic_cmd='func_win32_libid'
  2896. else
  2897. # Keep this pattern in sync with the one in func_win32_libid.
  2898. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
  2899. lt_cv_file_magic_cmd='$OBJDUMP -f'
  2900. fi
  2901. lt_cv_deplibs_check_method=pass_all
  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*)
  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*)
  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. *)
  4161. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4162. ;;
  4163. esac
  4164. ], [
  4165. runpath_var=
  4166. _LT_TAGVAR(allow_undefined_flag, $1)=
  4167. _LT_TAGVAR(always_export_symbols, $1)=no
  4168. _LT_TAGVAR(archive_cmds, $1)=
  4169. _LT_TAGVAR(archive_expsym_cmds, $1)=
  4170. _LT_TAGVAR(compiler_needs_object, $1)=no
  4171. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  4172. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  4173. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4174. _LT_TAGVAR(hardcode_automatic, $1)=no
  4175. _LT_TAGVAR(hardcode_direct, $1)=no
  4176. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  4177. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4178. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  4179. _LT_TAGVAR(hardcode_minus_L, $1)=no
  4180. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  4181. _LT_TAGVAR(inherit_rpath, $1)=no
  4182. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  4183. _LT_TAGVAR(module_cmds, $1)=
  4184. _LT_TAGVAR(module_expsym_cmds, $1)=
  4185. _LT_TAGVAR(old_archive_from_new_cmds, $1)=
  4186. _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
  4187. _LT_TAGVAR(thread_safe_flag_spec, $1)=
  4188. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4189. # include_expsyms should be a list of space-separated symbols to be *always*
  4190. # included in the symbol list
  4191. _LT_TAGVAR(include_expsyms, $1)=
  4192. # exclude_expsyms can be an extended regexp of symbols to exclude
  4193. # it will be wrapped by ` (' and `)$', so one must not match beginning or
  4194. # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
  4195. # as well as any symbol that contains `d'.
  4196. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  4197. # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  4198. # platforms (ab)use it in PIC code, but their linkers get confused if
  4199. # the symbol is explicitly referenced. Since portable code cannot
  4200. # rely on this symbol name, it's probably fine to never include it in
  4201. # preloaded symbol tables.
  4202. # Exclude shared library initialization/finalization symbols.
  4203. dnl Note also adjust exclude_expsyms for C++ above.
  4204. extract_expsyms_cmds=
  4205. case $host_os in
  4206. cygwin* | mingw* | pw32* | cegcc*)
  4207. # FIXME: the MSVC++ port hasn't been tested in a loooong time
  4208. # When not using gcc, we currently assume that we are using
  4209. # Microsoft Visual C++.
  4210. if test "$GCC" != yes; then
  4211. with_gnu_ld=no
  4212. fi
  4213. ;;
  4214. interix*)
  4215. # we just hope/assume this is gcc and not c89 (= MSVC++)
  4216. with_gnu_ld=yes
  4217. ;;
  4218. openbsd*)
  4219. with_gnu_ld=no
  4220. ;;
  4221. esac
  4222. _LT_TAGVAR(ld_shlibs, $1)=yes
  4223. # On some targets, GNU ld is compatible enough with the native linker
  4224. # that we're better off using the native interface for both.
  4225. lt_use_gnu_ld_interface=no
  4226. if test "$with_gnu_ld" = yes; then
  4227. case $host_os in
  4228. aix*)
  4229. # The AIX port of GNU ld has always aspired to compatibility
  4230. # with the native linker. However, as the warning in the GNU ld
  4231. # block says, versions before 2.19.5* couldn't really create working
  4232. # shared libraries, regardless of the interface used.
  4233. case `$LD -v 2>&1` in
  4234. *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
  4235. *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
  4236. *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
  4237. *)
  4238. lt_use_gnu_ld_interface=yes
  4239. ;;
  4240. esac
  4241. ;;
  4242. *)
  4243. lt_use_gnu_ld_interface=yes
  4244. ;;
  4245. esac
  4246. fi
  4247. if test "$lt_use_gnu_ld_interface" = yes; then
  4248. # If archive_cmds runs LD, not CC, wlarc should be empty
  4249. wlarc='${wl}'
  4250. # Set some defaults for GNU ld with shared library support. These
  4251. # are reset later if shared libraries are not supported. Putting them
  4252. # here allows them to be overridden if necessary.
  4253. runpath_var=LD_RUN_PATH
  4254. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4255. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  4256. # ancient GNU ld didn't support --whole-archive et. al.
  4257. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
  4258. _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  4259. else
  4260. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4261. fi
  4262. supports_anon_versioning=no
  4263. case `$LD -v 2>&1` in
  4264. *GNU\ gold*) supports_anon_versioning=yes ;;
  4265. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
  4266. *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
  4267. *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
  4268. *\ 2.11.*) ;; # other 2.11 versions
  4269. *) supports_anon_versioning=yes ;;
  4270. esac
  4271. # See if GNU ld supports shared libraries.
  4272. case $host_os in
  4273. aix[[3-9]]*)
  4274. # On AIX/PPC, the GNU linker is very broken
  4275. if test "$host_cpu" != ia64; then
  4276. _LT_TAGVAR(ld_shlibs, $1)=no
  4277. cat <<_LT_EOF 1>&2
  4278. *** Warning: the GNU linker, at least up to release 2.19, is reported
  4279. *** to be unable to reliably create shared libraries on AIX.
  4280. *** Therefore, libtool is disabling shared libraries support. If you
  4281. *** really care for shared libraries, you may want to install binutils
  4282. *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
  4283. *** You will then need to restart the configuration process.
  4284. _LT_EOF
  4285. fi
  4286. ;;
  4287. amigaos*)
  4288. case $host_cpu in
  4289. powerpc)
  4290. # see comment about AmigaOS4 .so support
  4291. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4292. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  4293. ;;
  4294. m68k)
  4295. _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)'
  4296. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4297. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4298. ;;
  4299. esac
  4300. ;;
  4301. beos*)
  4302. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4303. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4304. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  4305. # support --undefined. This deserves some investigation. FIXME
  4306. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4307. else
  4308. _LT_TAGVAR(ld_shlibs, $1)=no
  4309. fi
  4310. ;;
  4311. cygwin* | mingw* | pw32* | cegcc*)
  4312. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  4313. # as there is no search path for DLLs.
  4314. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4315. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
  4316. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4317. _LT_TAGVAR(always_export_symbols, $1)=no
  4318. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4319. _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'
  4320. _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  4321. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  4322. _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'
  4323. # If the export-symbols file already is a .def file (1st line
  4324. # is EXPORTS), use it as is; otherwise, prepend...
  4325. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  4326. cp $export_symbols $output_objdir/$soname.def;
  4327. else
  4328. echo EXPORTS > $output_objdir/$soname.def;
  4329. cat $export_symbols >> $output_objdir/$soname.def;
  4330. fi~
  4331. $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  4332. else
  4333. _LT_TAGVAR(ld_shlibs, $1)=no
  4334. fi
  4335. ;;
  4336. haiku*)
  4337. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4338. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4339. ;;
  4340. interix[[3-9]]*)
  4341. _LT_TAGVAR(hardcode_direct, $1)=no
  4342. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4343. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  4344. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4345. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  4346. # Instead, shared libraries are loaded at an image base (0x10000000 by
  4347. # default) and relocated if they conflict, which is a slow very memory
  4348. # consuming and fragmenting process. To avoid this, we pick a random,
  4349. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  4350. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  4351. _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'
  4352. _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'
  4353. ;;
  4354. gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
  4355. tmp_diet=no
  4356. if test "$host_os" = linux-dietlibc; then
  4357. case $cc_basename in
  4358. diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
  4359. esac
  4360. fi
  4361. if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
  4362. && test "$tmp_diet" = no
  4363. then
  4364. tmp_addflag=' $pic_flag'
  4365. tmp_sharedflag='-shared'
  4366. case $cc_basename,$host_cpu in
  4367. pgcc*) # Portland Group C compiler
  4368. _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'
  4369. tmp_addflag=' $pic_flag'
  4370. ;;
  4371. pgf77* | pgf90* | pgf95* | pgfortran*)
  4372. # Portland Group f77 and f90 compilers
  4373. _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'
  4374. tmp_addflag=' $pic_flag -Mnomain' ;;
  4375. ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
  4376. tmp_addflag=' -i_dynamic' ;;
  4377. efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
  4378. tmp_addflag=' -i_dynamic -nofor_main' ;;
  4379. ifc* | ifort*) # Intel Fortran compiler
  4380. tmp_addflag=' -nofor_main' ;;
  4381. lf95*) # Lahey Fortran 8.1
  4382. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4383. tmp_sharedflag='--shared' ;;
  4384. xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
  4385. tmp_sharedflag='-qmkshrobj'
  4386. tmp_addflag= ;;
  4387. nvcc*) # Cuda Compiler Driver 2.2
  4388. _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'
  4389. _LT_TAGVAR(compiler_needs_object, $1)=yes
  4390. ;;
  4391. esac
  4392. case `$CC -V 2>&1 | sed 5q` in
  4393. *Sun\ C*) # Sun C 5.9
  4394. _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'
  4395. _LT_TAGVAR(compiler_needs_object, $1)=yes
  4396. tmp_sharedflag='-G' ;;
  4397. *Sun\ F*) # Sun Fortran 8.3
  4398. tmp_sharedflag='-G' ;;
  4399. esac
  4400. _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4401. if test "x$supports_anon_versioning" = xyes; then
  4402. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  4403. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4404. echo "local: *; };" >> $output_objdir/$libname.ver~
  4405. $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  4406. fi
  4407. case $cc_basename in
  4408. xlf* | bgf* | bgxlf* | mpixlf*)
  4409. # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
  4410. _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
  4411. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4412. _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
  4413. if test "x$supports_anon_versioning" = xyes; then
  4414. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  4415. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4416. echo "local: *; };" >> $output_objdir/$libname.ver~
  4417. $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
  4418. fi
  4419. ;;
  4420. esac
  4421. else
  4422. _LT_TAGVAR(ld_shlibs, $1)=no
  4423. fi
  4424. ;;
  4425. netbsd*)
  4426. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  4427. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  4428. wlarc=
  4429. else
  4430. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4431. _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'
  4432. fi
  4433. ;;
  4434. solaris*)
  4435. if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
  4436. _LT_TAGVAR(ld_shlibs, $1)=no
  4437. cat <<_LT_EOF 1>&2
  4438. *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  4439. *** create shared libraries on Solaris systems. Therefore, libtool
  4440. *** is disabling shared libraries support. We urge you to upgrade GNU
  4441. *** binutils to release 2.9.1 or newer. Another option is to modify
  4442. *** your PATH or compiler configuration so that the native linker is
  4443. *** used, and then restart.
  4444. _LT_EOF
  4445. elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4446. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4447. _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'
  4448. else
  4449. _LT_TAGVAR(ld_shlibs, $1)=no
  4450. fi
  4451. ;;
  4452. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
  4453. case `$LD -v 2>&1` in
  4454. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
  4455. _LT_TAGVAR(ld_shlibs, $1)=no
  4456. cat <<_LT_EOF 1>&2
  4457. *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
  4458. *** reliably create shared libraries on SCO systems. Therefore, libtool
  4459. *** is disabling shared libraries support. We urge you to upgrade GNU
  4460. *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
  4461. *** your PATH or compiler configuration so that the native linker is
  4462. *** used, and then restart.
  4463. _LT_EOF
  4464. ;;
  4465. *)
  4466. # For security reasons, it is highly recommended that you always
  4467. # use absolute paths for naming shared libraries, and exclude the
  4468. # DT_RUNPATH tag from executables and libraries. But doing so
  4469. # requires that you compile everything twice, which is a pain.
  4470. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4471. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4472. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4473. _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'
  4474. else
  4475. _LT_TAGVAR(ld_shlibs, $1)=no
  4476. fi
  4477. ;;
  4478. esac
  4479. ;;
  4480. sunos4*)
  4481. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4482. wlarc=
  4483. _LT_TAGVAR(hardcode_direct, $1)=yes
  4484. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4485. ;;
  4486. *)
  4487. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4488. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4489. _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'
  4490. else
  4491. _LT_TAGVAR(ld_shlibs, $1)=no
  4492. fi
  4493. ;;
  4494. esac
  4495. if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
  4496. runpath_var=
  4497. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4498. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  4499. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4500. fi
  4501. else
  4502. # PORTME fill in a description of your system's linker (not GNU ld)
  4503. case $host_os in
  4504. aix3*)
  4505. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4506. _LT_TAGVAR(always_export_symbols, $1)=yes
  4507. _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'
  4508. # Note: this linker hardcodes the directories in LIBPATH if there
  4509. # are no directories specified by -L.
  4510. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4511. if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
  4512. # Neither direct hardcoding nor static linking is supported with a
  4513. # broken collect2.
  4514. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  4515. fi
  4516. ;;
  4517. aix[[4-9]]*)
  4518. if test "$host_cpu" = ia64; then
  4519. # On IA64, the linker does run time linking by default, so we don't
  4520. # have to do anything special.
  4521. aix_use_runtimelinking=no
  4522. exp_sym_flag='-Bexport'
  4523. no_entry_flag=""
  4524. else
  4525. # If we're using GNU nm, then we don't want the "-C" option.
  4526. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  4527. # Also, AIX nm treats weak defined symbols like other global
  4528. # defined symbols, whereas GNU nm marks them as "W".
  4529. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  4530. _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'
  4531. else
  4532. _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'
  4533. fi
  4534. aix_use_runtimelinking=no
  4535. # Test if we are trying to use run time linking or normal
  4536. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  4537. # need to do runtime linking.
  4538. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  4539. for ld_flag in $LDFLAGS; do
  4540. if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
  4541. aix_use_runtimelinking=yes
  4542. break
  4543. fi
  4544. done
  4545. ;;
  4546. esac
  4547. exp_sym_flag='-bexport'
  4548. no_entry_flag='-bnoentry'
  4549. fi
  4550. # When large executables or shared objects are built, AIX ld can
  4551. # have problems creating the table of contents. If linking a library
  4552. # or program results in "error TOC overflow" add -mminimal-toc to
  4553. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  4554. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  4555. _LT_TAGVAR(archive_cmds, $1)=''
  4556. _LT_TAGVAR(hardcode_direct, $1)=yes
  4557. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4558. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  4559. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4560. _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
  4561. if test "$GCC" = yes; then
  4562. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  4563. # We only want to do this on AIX 4.2 and lower, the check
  4564. # below for broken collect2 doesn't work under 4.3+
  4565. collect2name=`${CC} -print-prog-name=collect2`
  4566. if test -f "$collect2name" &&
  4567. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  4568. then
  4569. # We have reworked collect2
  4570. :
  4571. else
  4572. # We have old collect2
  4573. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  4574. # It fails to find uninstalled libraries when the uninstalled
  4575. # path is not listed in the libpath. Setting hardcode_minus_L
  4576. # to unsupported forces relinking
  4577. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4578. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4579. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  4580. fi
  4581. ;;
  4582. esac
  4583. shared_flag='-shared'
  4584. if test "$aix_use_runtimelinking" = yes; then
  4585. shared_flag="$shared_flag "'${wl}-G'
  4586. fi
  4587. else
  4588. # not using gcc
  4589. if test "$host_cpu" = ia64; then
  4590. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  4591. # chokes on -Wl,-G. The following line is correct:
  4592. shared_flag='-G'
  4593. else
  4594. if test "$aix_use_runtimelinking" = yes; then
  4595. shared_flag='${wl}-G'
  4596. else
  4597. shared_flag='${wl}-bM:SRE'
  4598. fi
  4599. fi
  4600. fi
  4601. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
  4602. # It seems that -bexpall does not export symbols beginning with
  4603. # underscore (_), so it is better to generate a list of symbols to export.
  4604. _LT_TAGVAR(always_export_symbols, $1)=yes
  4605. if test "$aix_use_runtimelinking" = yes; then
  4606. # Warning - without using the other runtime loading flags (-brtl),
  4607. # -berok will link without error, but may produce a broken library.
  4608. _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
  4609. # Determine the default libpath from the value encoded in an
  4610. # empty executable.
  4611. _LT_SYS_MODULE_PATH_AIX([$1])
  4612. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  4613. _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"
  4614. else
  4615. if test "$host_cpu" = ia64; then
  4616. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  4617. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  4618. _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"
  4619. else
  4620. # Determine the default libpath from the value encoded in an
  4621. # empty executable.
  4622. _LT_SYS_MODULE_PATH_AIX([$1])
  4623. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  4624. # Warning - without using the other run time loading flags,
  4625. # -berok will link without error, but may produce a broken library.
  4626. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  4627. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  4628. if test "$with_gnu_ld" = yes; then
  4629. # We only use this code for GNU lds that support --whole-archive.
  4630. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  4631. else
  4632. # Exported symbols can be pulled into shared objects from archives
  4633. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  4634. fi
  4635. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  4636. # This is similar to how AIX traditionally builds its shared libraries.
  4637. _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'
  4638. fi
  4639. fi
  4640. ;;
  4641. amigaos*)
  4642. case $host_cpu in
  4643. powerpc)
  4644. # see comment about AmigaOS4 .so support
  4645. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4646. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  4647. ;;
  4648. m68k)
  4649. _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)'
  4650. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4651. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4652. ;;
  4653. esac
  4654. ;;
  4655. bsdi[[45]]*)
  4656. _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
  4657. ;;
  4658. cygwin* | mingw* | pw32* | cegcc*)
  4659. # When not using gcc, we currently assume that we are using
  4660. # Microsoft Visual C++.
  4661. # hardcode_libdir_flag_spec is actually meaningless, as there is
  4662. # no search path for DLLs.
  4663. case $cc_basename in
  4664. cl*)
  4665. # Native MSVC
  4666. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  4667. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4668. _LT_TAGVAR(always_export_symbols, $1)=yes
  4669. _LT_TAGVAR(file_list_spec, $1)='@'
  4670. # Tell ltmain to make .lib files, not .a files.
  4671. libext=lib
  4672. # Tell ltmain to make .dll files, not .so files.
  4673. shrext_cmds=".dll"
  4674. # FIXME: Setting linknames here is a bad hack.
  4675. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
  4676. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  4677. sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
  4678. else
  4679. sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
  4680. fi~
  4681. $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  4682. linknames='
  4683. # The linker will not automatically build a static lib if we build a DLL.
  4684. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  4685. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4686. _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  4687. _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'
  4688. # Don't use ranlib
  4689. _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  4690. _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  4691. lt_tool_outputfile="@TOOL_OUTPUT@"~
  4692. case $lt_outputfile in
  4693. *.exe|*.EXE) ;;
  4694. *)
  4695. lt_outputfile="$lt_outputfile.exe"
  4696. lt_tool_outputfile="$lt_tool_outputfile.exe"
  4697. ;;
  4698. esac~
  4699. if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
  4700. $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  4701. $RM "$lt_outputfile.manifest";
  4702. fi'
  4703. ;;
  4704. *)
  4705. # Assume MSVC wrapper
  4706. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  4707. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4708. # Tell ltmain to make .lib files, not .a files.
  4709. libext=lib
  4710. # Tell ltmain to make .dll files, not .so files.
  4711. shrext_cmds=".dll"
  4712. # FIXME: Setting linknames here is a bad hack.
  4713. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
  4714. # The linker will automatically build a .lib file if we build a DLL.
  4715. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  4716. # FIXME: Should let the user specify the lib program.
  4717. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
  4718. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4719. ;;
  4720. esac
  4721. ;;
  4722. darwin* | rhapsody*)
  4723. _LT_DARWIN_LINKER_FEATURES($1)
  4724. ;;
  4725. dgux*)
  4726. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  4727. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4728. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4729. ;;
  4730. # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  4731. # support. Future versions do this automatically, but an explicit c++rt0.o
  4732. # does not break anything, and helps significantly (at the cost of a little
  4733. # extra space).
  4734. freebsd2.2*)
  4735. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
  4736. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4737. _LT_TAGVAR(hardcode_direct, $1)=yes
  4738. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4739. ;;
  4740. # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  4741. freebsd2.*)
  4742. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4743. _LT_TAGVAR(hardcode_direct, $1)=yes
  4744. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4745. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4746. ;;
  4747. # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  4748. freebsd* | dragonfly*)
  4749. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  4750. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4751. _LT_TAGVAR(hardcode_direct, $1)=yes
  4752. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4753. ;;
  4754. hpux9*)
  4755. if test "$GCC" = yes; then
  4756. _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'
  4757. else
  4758. _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'
  4759. fi
  4760. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  4761. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4762. _LT_TAGVAR(hardcode_direct, $1)=yes
  4763. # hardcode_minus_L: Not really in the search PATH,
  4764. # but as the default location of the library.
  4765. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4766. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4767. ;;
  4768. hpux10*)
  4769. if test "$GCC" = yes && test "$with_gnu_ld" = no; then
  4770. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  4771. else
  4772. _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
  4773. fi
  4774. if test "$with_gnu_ld" = no; then
  4775. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  4776. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4777. _LT_TAGVAR(hardcode_direct, $1)=yes
  4778. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4779. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4780. # hardcode_minus_L: Not really in the search PATH,
  4781. # but as the default location of the library.
  4782. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4783. fi
  4784. ;;
  4785. hpux11*)
  4786. if test "$GCC" = yes && test "$with_gnu_ld" = no; then
  4787. case $host_cpu in
  4788. hppa*64*)
  4789. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  4790. ;;
  4791. ia64*)
  4792. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  4793. ;;
  4794. *)
  4795. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  4796. ;;
  4797. esac
  4798. else
  4799. case $host_cpu in
  4800. hppa*64*)
  4801. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  4802. ;;
  4803. ia64*)
  4804. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  4805. ;;
  4806. *)
  4807. m4_if($1, [], [
  4808. # Older versions of the 11.00 compiler do not understand -b yet
  4809. # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
  4810. _LT_LINKER_OPTION([if $CC understands -b],
  4811. _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
  4812. [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
  4813. [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
  4814. [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
  4815. ;;
  4816. esac
  4817. fi
  4818. if test "$with_gnu_ld" = no; then
  4819. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  4820. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4821. case $host_cpu in
  4822. hppa*64*|ia64*)
  4823. _LT_TAGVAR(hardcode_direct, $1)=no
  4824. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4825. ;;
  4826. *)
  4827. _LT_TAGVAR(hardcode_direct, $1)=yes
  4828. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4829. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4830. # hardcode_minus_L: Not really in the search PATH,
  4831. # but as the default location of the library.
  4832. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4833. ;;
  4834. esac
  4835. fi
  4836. ;;
  4837. irix5* | irix6* | nonstopux*)
  4838. if test "$GCC" = yes; then
  4839. _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'
  4840. # Try to use the -exported_symbol ld option, if it does not
  4841. # work, assume that -exports_file does not work either and
  4842. # implicitly export all symbols.
  4843. # This should be the same for all languages, so no per-tag cache variable.
  4844. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
  4845. [lt_cv_irix_exported_symbol],
  4846. [save_LDFLAGS="$LDFLAGS"
  4847. LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
  4848. AC_LINK_IFELSE(
  4849. [AC_LANG_SOURCE(
  4850. [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
  4851. [C++], [[int foo (void) { return 0; }]],
  4852. [Fortran 77], [[
  4853. subroutine foo
  4854. end]],
  4855. [Fortran], [[
  4856. subroutine foo
  4857. end]])])],
  4858. [lt_cv_irix_exported_symbol=yes],
  4859. [lt_cv_irix_exported_symbol=no])
  4860. LDFLAGS="$save_LDFLAGS"])
  4861. if test "$lt_cv_irix_exported_symbol" = yes; then
  4862. _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'
  4863. fi
  4864. else
  4865. _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'
  4866. _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'
  4867. fi
  4868. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  4869. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4870. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4871. _LT_TAGVAR(inherit_rpath, $1)=yes
  4872. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4873. ;;
  4874. netbsd*)
  4875. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  4876. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
  4877. else
  4878. _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
  4879. fi
  4880. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4881. _LT_TAGVAR(hardcode_direct, $1)=yes
  4882. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4883. ;;
  4884. newsos6)
  4885. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  4886. _LT_TAGVAR(hardcode_direct, $1)=yes
  4887. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4888. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4889. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4890. ;;
  4891. *nto* | *qnx*)
  4892. ;;
  4893. openbsd*)
  4894. if test -f /usr/libexec/ld.so; then
  4895. _LT_TAGVAR(hardcode_direct, $1)=yes
  4896. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4897. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4898. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  4899. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  4900. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
  4901. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  4902. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4903. else
  4904. case $host_os in
  4905. openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
  4906. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4907. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4908. ;;
  4909. *)
  4910. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  4911. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  4912. ;;
  4913. esac
  4914. fi
  4915. else
  4916. _LT_TAGVAR(ld_shlibs, $1)=no
  4917. fi
  4918. ;;
  4919. os2*)
  4920. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4921. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4922. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4923. _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'
  4924. _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
  4925. ;;
  4926. osf3*)
  4927. if test "$GCC" = yes; then
  4928. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  4929. _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'
  4930. else
  4931. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  4932. _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'
  4933. fi
  4934. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  4935. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4936. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4937. ;;
  4938. osf4* | osf5*) # as osf3* with the addition of -msym flag
  4939. if test "$GCC" = yes; then
  4940. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  4941. _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'
  4942. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4943. else
  4944. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  4945. _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'
  4946. _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~
  4947. $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'
  4948. # Both c and cxx compiler support -rpath directly
  4949. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  4950. fi
  4951. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  4952. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4953. ;;
  4954. solaris*)
  4955. _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
  4956. if test "$GCC" = yes; then
  4957. wlarc='${wl}'
  4958. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  4959. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  4960. $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'
  4961. else
  4962. case `$CC -V 2>&1` in
  4963. *"Compilers 5.0"*)
  4964. wlarc=''
  4965. _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_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. $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
  4968. ;;
  4969. *)
  4970. wlarc='${wl}'
  4971. _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
  4972. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  4973. $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
  4974. ;;
  4975. esac
  4976. fi
  4977. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4978. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4979. case $host_os in
  4980. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  4981. *)
  4982. # The compiler driver will combine and reorder linker options,
  4983. # but understands `-z linker_flag'. GCC discards it without `$wl',
  4984. # but is careful enough not to reorder.
  4985. # Supported since Solaris 2.6 (maybe 2.5.1?)
  4986. if test "$GCC" = yes; then
  4987. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
  4988. else
  4989. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  4990. fi
  4991. ;;
  4992. esac
  4993. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4994. ;;
  4995. sunos4*)
  4996. if test "x$host_vendor" = xsequent; then
  4997. # Use $CC to link under sequent, because it throws in some extra .o
  4998. # files that make .init and .fini sections work.
  4999. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
  5000. else
  5001. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
  5002. fi
  5003. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5004. _LT_TAGVAR(hardcode_direct, $1)=yes
  5005. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5006. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5007. ;;
  5008. sysv4)
  5009. case $host_vendor in
  5010. sni)
  5011. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5012. _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
  5013. ;;
  5014. siemens)
  5015. ## LD is ld it makes a PLAMLIB
  5016. ## CC just makes a GrossModule.
  5017. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  5018. _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
  5019. _LT_TAGVAR(hardcode_direct, $1)=no
  5020. ;;
  5021. motorola)
  5022. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5023. _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
  5024. ;;
  5025. esac
  5026. runpath_var='LD_RUN_PATH'
  5027. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5028. ;;
  5029. sysv4.3*)
  5030. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5031. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5032. _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
  5033. ;;
  5034. sysv4*MP*)
  5035. if test -d /usr/nec; then
  5036. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5037. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5038. runpath_var=LD_RUN_PATH
  5039. hardcode_runpath_var=yes
  5040. _LT_TAGVAR(ld_shlibs, $1)=yes
  5041. fi
  5042. ;;
  5043. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  5044. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  5045. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5046. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5047. runpath_var='LD_RUN_PATH'
  5048. if test "$GCC" = yes; then
  5049. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5050. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5051. else
  5052. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5053. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5054. fi
  5055. ;;
  5056. sysv5* | sco3.2v5* | sco5v6*)
  5057. # Note: We can NOT use -z defs as we might desire, because we do not
  5058. # link with -lc, and that would cause any symbols used from libc to
  5059. # always be unresolved, which means just about no library would
  5060. # ever link correctly. If we're not using GNU ld we use -z text
  5061. # though, which does catch some bad symbols but isn't as heavy-handed
  5062. # as -z defs.
  5063. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  5064. _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
  5065. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5066. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5067. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
  5068. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5069. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5070. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  5071. runpath_var='LD_RUN_PATH'
  5072. if test "$GCC" = yes; then
  5073. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5074. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5075. else
  5076. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5077. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5078. fi
  5079. ;;
  5080. uts4*)
  5081. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5082. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5083. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5084. ;;
  5085. *)
  5086. _LT_TAGVAR(ld_shlibs, $1)=no
  5087. ;;
  5088. esac
  5089. if test x$host_vendor = xsni; then
  5090. case $host in
  5091. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  5092. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
  5093. ;;
  5094. esac
  5095. fi
  5096. fi
  5097. ])
  5098. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  5099. test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  5100. _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
  5101. _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
  5102. _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
  5103. _LT_DECL([], [extract_expsyms_cmds], [2],
  5104. [The commands to extract the exported symbol list from a shared archive])
  5105. #
  5106. # Do we need to explicitly link libc?
  5107. #
  5108. case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
  5109. x|xyes)
  5110. # Assume -lc should be added
  5111. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5112. if test "$enable_shared" = yes && test "$GCC" = yes; then
  5113. case $_LT_TAGVAR(archive_cmds, $1) in
  5114. *'~'*)
  5115. # FIXME: we may have to deal with multi-command sequences.
  5116. ;;
  5117. '$CC '*)
  5118. # Test whether the compiler implicitly links with -lc since on some
  5119. # systems, -lgcc has to come before -lc. If gcc already passes -lc
  5120. # to ld, don't add -lc before -lgcc.
  5121. AC_CACHE_CHECK([whether -lc should be explicitly linked in],
  5122. [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
  5123. [$RM conftest*
  5124. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  5125. if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
  5126. soname=conftest
  5127. lib=conftest
  5128. libobjs=conftest.$ac_objext
  5129. deplibs=
  5130. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
  5131. pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
  5132. compiler_flags=-v
  5133. linker_flags=-v
  5134. verstring=
  5135. output_objdir=.
  5136. libname=conftest
  5137. lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
  5138. _LT_TAGVAR(allow_undefined_flag, $1)=
  5139. if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
  5140. then
  5141. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5142. else
  5143. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5144. fi
  5145. _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
  5146. else
  5147. cat conftest.err 1>&5
  5148. fi
  5149. $RM conftest*
  5150. ])
  5151. _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
  5152. ;;
  5153. esac
  5154. fi
  5155. ;;
  5156. esac
  5157. _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
  5158. [Whether or not to add -lc for building shared libraries])
  5159. _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
  5160. [enable_shared_with_static_runtimes], [0],
  5161. [Whether or not to disallow shared libs when runtime libs are static])
  5162. _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
  5163. [Compiler flag to allow reflexive dlopens])
  5164. _LT_TAGDECL([], [whole_archive_flag_spec], [1],
  5165. [Compiler flag to generate shared objects directly from archives])
  5166. _LT_TAGDECL([], [compiler_needs_object], [1],
  5167. [Whether the compiler copes with passing no objects directly])
  5168. _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
  5169. [Create an old-style archive from a shared archive])
  5170. _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
  5171. [Create a temporary old-style archive to link instead of a shared archive])
  5172. _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
  5173. _LT_TAGDECL([], [archive_expsym_cmds], [2])
  5174. _LT_TAGDECL([], [module_cmds], [2],
  5175. [Commands used to build a loadable module if different from building
  5176. a shared archive.])
  5177. _LT_TAGDECL([], [module_expsym_cmds], [2])
  5178. _LT_TAGDECL([], [with_gnu_ld], [1],
  5179. [Whether we are building with GNU ld or not])
  5180. _LT_TAGDECL([], [allow_undefined_flag], [1],
  5181. [Flag that allows shared libraries with undefined symbols to be built])
  5182. _LT_TAGDECL([], [no_undefined_flag], [1],
  5183. [Flag that enforces no undefined symbols])
  5184. _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
  5185. [Flag to hardcode $libdir into a binary during linking.
  5186. This must work even if $libdir does not exist])
  5187. _LT_TAGDECL([], [hardcode_libdir_separator], [1],
  5188. [Whether we need a single "-rpath" flag with a separated argument])
  5189. _LT_TAGDECL([], [hardcode_direct], [0],
  5190. [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
  5191. DIR into the resulting binary])
  5192. _LT_TAGDECL([], [hardcode_direct_absolute], [0],
  5193. [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
  5194. DIR into the resulting binary and the resulting library dependency is
  5195. "absolute", i.e impossible to change by setting ${shlibpath_var} if the
  5196. library is relocated])
  5197. _LT_TAGDECL([], [hardcode_minus_L], [0],
  5198. [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
  5199. into the resulting binary])
  5200. _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
  5201. [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
  5202. into the resulting binary])
  5203. _LT_TAGDECL([], [hardcode_automatic], [0],
  5204. [Set to "yes" if building a shared library automatically hardcodes DIR
  5205. into the library and all subsequent libraries and executables linked
  5206. against it])
  5207. _LT_TAGDECL([], [inherit_rpath], [0],
  5208. [Set to yes if linker adds runtime paths of dependent libraries
  5209. to runtime path list])
  5210. _LT_TAGDECL([], [link_all_deplibs], [0],
  5211. [Whether libtool must link a program against all its dependency libraries])
  5212. _LT_TAGDECL([], [always_export_symbols], [0],
  5213. [Set to "yes" if exported symbols are required])
  5214. _LT_TAGDECL([], [export_symbols_cmds], [2],
  5215. [The commands to list exported symbols])
  5216. _LT_TAGDECL([], [exclude_expsyms], [1],
  5217. [Symbols that should not be listed in the preloaded symbols])
  5218. _LT_TAGDECL([], [include_expsyms], [1],
  5219. [Symbols that must always be exported])
  5220. _LT_TAGDECL([], [prelink_cmds], [2],
  5221. [Commands necessary for linking programs (against libraries) with templates])
  5222. _LT_TAGDECL([], [postlink_cmds], [2],
  5223. [Commands necessary for finishing linking programs])
  5224. _LT_TAGDECL([], [file_list_spec], [1],
  5225. [Specify filename containing input files])
  5226. dnl FIXME: Not yet implemented
  5227. dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
  5228. dnl [Compiler flag to generate thread safe objects])
  5229. ])# _LT_LINKER_SHLIBS
  5230. # _LT_LANG_C_CONFIG([TAG])
  5231. # ------------------------
  5232. # Ensure that the configuration variables for a C compiler are suitably
  5233. # defined. These variables are subsequently used by _LT_CONFIG to write
  5234. # the compiler configuration to `libtool'.
  5235. m4_defun([_LT_LANG_C_CONFIG],
  5236. [m4_require([_LT_DECL_EGREP])dnl
  5237. lt_save_CC="$CC"
  5238. AC_LANG_PUSH(C)
  5239. # Source file extension for C test sources.
  5240. ac_ext=c
  5241. # Object file extension for compiled C test sources.
  5242. objext=o
  5243. _LT_TAGVAR(objext, $1)=$objext
  5244. # Code to be used in simple compile tests
  5245. lt_simple_compile_test_code="int some_variable = 0;"
  5246. # Code to be used in simple link tests
  5247. lt_simple_link_test_code='int main(){return(0);}'
  5248. _LT_TAG_COMPILER
  5249. # Save the default compiler, since it gets overwritten when the other
  5250. # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
  5251. compiler_DEFAULT=$CC
  5252. # save warnings/boilerplate of simple test code
  5253. _LT_COMPILER_BOILERPLATE
  5254. _LT_LINKER_BOILERPLATE
  5255. ## CAVEAT EMPTOR:
  5256. ## There is no encapsulation within the following macros, do not change
  5257. ## the running order or otherwise move them around unless you know exactly
  5258. ## what you are doing...
  5259. if test -n "$compiler"; then
  5260. _LT_COMPILER_NO_RTTI($1)
  5261. _LT_COMPILER_PIC($1)
  5262. _LT_COMPILER_C_O($1)
  5263. _LT_COMPILER_FILE_LOCKS($1)
  5264. _LT_LINKER_SHLIBS($1)
  5265. _LT_SYS_DYNAMIC_LINKER($1)
  5266. _LT_LINKER_HARDCODE_LIBPATH($1)
  5267. LT_SYS_DLOPEN_SELF
  5268. _LT_CMD_STRIPLIB
  5269. # Report which library types will actually be built
  5270. AC_MSG_CHECKING([if libtool supports shared libraries])
  5271. AC_MSG_RESULT([$can_build_shared])
  5272. AC_MSG_CHECKING([whether to build shared libraries])
  5273. test "$can_build_shared" = "no" && enable_shared=no
  5274. # On AIX, shared libraries and static libraries use the same namespace, and
  5275. # are all built from PIC.
  5276. case $host_os in
  5277. aix3*)
  5278. test "$enable_shared" = yes && enable_static=no
  5279. if test -n "$RANLIB"; then
  5280. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  5281. postinstall_cmds='$RANLIB $lib'
  5282. fi
  5283. ;;
  5284. aix[[4-9]]*)
  5285. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  5286. test "$enable_shared" = yes && enable_static=no
  5287. fi
  5288. ;;
  5289. esac
  5290. AC_MSG_RESULT([$enable_shared])
  5291. AC_MSG_CHECKING([whether to build static libraries])
  5292. # Make sure either enable_shared or enable_static is yes.
  5293. test "$enable_shared" = yes || enable_static=yes
  5294. AC_MSG_RESULT([$enable_static])
  5295. _LT_CONFIG($1)
  5296. fi
  5297. AC_LANG_POP
  5298. CC="$lt_save_CC"
  5299. ])# _LT_LANG_C_CONFIG
  5300. # _LT_LANG_CXX_CONFIG([TAG])
  5301. # --------------------------
  5302. # Ensure that the configuration variables for a C++ compiler are suitably
  5303. # defined. These variables are subsequently used by _LT_CONFIG to write
  5304. # the compiler configuration to `libtool'.
  5305. m4_defun([_LT_LANG_CXX_CONFIG],
  5306. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  5307. m4_require([_LT_DECL_EGREP])dnl
  5308. m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  5309. if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
  5310. ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
  5311. (test "X$CXX" != "Xg++"))) ; then
  5312. AC_PROG_CXXCPP
  5313. else
  5314. _lt_caught_CXX_error=yes
  5315. fi
  5316. AC_LANG_PUSH(C++)
  5317. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5318. _LT_TAGVAR(allow_undefined_flag, $1)=
  5319. _LT_TAGVAR(always_export_symbols, $1)=no
  5320. _LT_TAGVAR(archive_expsym_cmds, $1)=
  5321. _LT_TAGVAR(compiler_needs_object, $1)=no
  5322. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  5323. _LT_TAGVAR(hardcode_direct, $1)=no
  5324. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  5325. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  5326. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5327. _LT_TAGVAR(hardcode_minus_L, $1)=no
  5328. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  5329. _LT_TAGVAR(hardcode_automatic, $1)=no
  5330. _LT_TAGVAR(inherit_rpath, $1)=no
  5331. _LT_TAGVAR(module_cmds, $1)=
  5332. _LT_TAGVAR(module_expsym_cmds, $1)=
  5333. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  5334. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  5335. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  5336. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  5337. _LT_TAGVAR(no_undefined_flag, $1)=
  5338. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5339. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  5340. # Source file extension for C++ test sources.
  5341. ac_ext=cpp
  5342. # Object file extension for compiled C++ test sources.
  5343. objext=o
  5344. _LT_TAGVAR(objext, $1)=$objext
  5345. # No sense in running all these tests if we already determined that
  5346. # the CXX compiler isn't working. Some variables (like enable_shared)
  5347. # are currently assumed to apply to all compilers on this platform,
  5348. # and will be corrupted by setting them based on a non-working compiler.
  5349. if test "$_lt_caught_CXX_error" != yes; then
  5350. # Code to be used in simple compile tests
  5351. lt_simple_compile_test_code="int some_variable = 0;"
  5352. # Code to be used in simple link tests
  5353. lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
  5354. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  5355. _LT_TAG_COMPILER
  5356. # save warnings/boilerplate of simple test code
  5357. _LT_COMPILER_BOILERPLATE
  5358. _LT_LINKER_BOILERPLATE
  5359. # Allow CC to be a program name with arguments.
  5360. lt_save_CC=$CC
  5361. lt_save_CFLAGS=$CFLAGS
  5362. lt_save_LD=$LD
  5363. lt_save_GCC=$GCC
  5364. GCC=$GXX
  5365. lt_save_with_gnu_ld=$with_gnu_ld
  5366. lt_save_path_LD=$lt_cv_path_LD
  5367. if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
  5368. lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
  5369. else
  5370. $as_unset lt_cv_prog_gnu_ld
  5371. fi
  5372. if test -n "${lt_cv_path_LDCXX+set}"; then
  5373. lt_cv_path_LD=$lt_cv_path_LDCXX
  5374. else
  5375. $as_unset lt_cv_path_LD
  5376. fi
  5377. test -z "${LDCXX+set}" || LD=$LDCXX
  5378. CC=${CXX-"c++"}
  5379. CFLAGS=$CXXFLAGS
  5380. compiler=$CC
  5381. _LT_TAGVAR(compiler, $1)=$CC
  5382. _LT_CC_BASENAME([$compiler])
  5383. if test -n "$compiler"; then
  5384. # We don't want -fno-exception when compiling C++ code, so set the
  5385. # no_builtin_flag separately
  5386. if test "$GXX" = yes; then
  5387. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  5388. else
  5389. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  5390. fi
  5391. if test "$GXX" = yes; then
  5392. # Set up default GNU C++ configuration
  5393. LT_PATH_LD
  5394. # Check if GNU C++ uses GNU ld as the underlying linker, since the
  5395. # archiving commands below assume that GNU ld is being used.
  5396. if test "$with_gnu_ld" = yes; then
  5397. _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5398. _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'
  5399. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5400. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5401. # If archive_cmds runs LD, not CC, wlarc should be empty
  5402. # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
  5403. # investigate it a little bit more. (MM)
  5404. wlarc='${wl}'
  5405. # ancient GNU ld didn't support --whole-archive et. al.
  5406. if eval "`$CC -print-prog-name=ld` --help 2>&1" |
  5407. $GREP 'no-whole-archive' > /dev/null; then
  5408. _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  5409. else
  5410. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5411. fi
  5412. else
  5413. with_gnu_ld=no
  5414. wlarc=
  5415. # A generic and very simple default shared library creation
  5416. # command for GNU C++ for the case where it uses the native
  5417. # linker, instead of GNU ld. If possible, this setting should
  5418. # overridden to take advantage of the native linker features on
  5419. # the platform it is being used on.
  5420. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  5421. fi
  5422. # Commands to make compiler produce verbose output that lists
  5423. # what "hidden" libraries, object files and flags are used when
  5424. # linking a shared library.
  5425. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  5426. else
  5427. GXX=no
  5428. with_gnu_ld=no
  5429. wlarc=
  5430. fi
  5431. # PORTME: fill in a description of your system's C++ link characteristics
  5432. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  5433. _LT_TAGVAR(ld_shlibs, $1)=yes
  5434. case $host_os in
  5435. aix3*)
  5436. # FIXME: insert proper C++ library support
  5437. _LT_TAGVAR(ld_shlibs, $1)=no
  5438. ;;
  5439. aix[[4-9]]*)
  5440. if test "$host_cpu" = ia64; then
  5441. # On IA64, the linker does run time linking by default, so we don't
  5442. # have to do anything special.
  5443. aix_use_runtimelinking=no
  5444. exp_sym_flag='-Bexport'
  5445. no_entry_flag=""
  5446. else
  5447. aix_use_runtimelinking=no
  5448. # Test if we are trying to use run time linking or normal
  5449. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  5450. # need to do runtime linking.
  5451. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  5452. for ld_flag in $LDFLAGS; do
  5453. case $ld_flag in
  5454. *-brtl*)
  5455. aix_use_runtimelinking=yes
  5456. break
  5457. ;;
  5458. esac
  5459. done
  5460. ;;
  5461. esac
  5462. exp_sym_flag='-bexport'
  5463. no_entry_flag='-bnoentry'
  5464. fi
  5465. # When large executables or shared objects are built, AIX ld can
  5466. # have problems creating the table of contents. If linking a library
  5467. # or program results in "error TOC overflow" add -mminimal-toc to
  5468. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  5469. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  5470. _LT_TAGVAR(archive_cmds, $1)=''
  5471. _LT_TAGVAR(hardcode_direct, $1)=yes
  5472. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5473. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5474. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5475. _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
  5476. if test "$GXX" = yes; then
  5477. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  5478. # We only want to do this on AIX 4.2 and lower, the check
  5479. # below for broken collect2 doesn't work under 4.3+
  5480. collect2name=`${CC} -print-prog-name=collect2`
  5481. if test -f "$collect2name" &&
  5482. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  5483. then
  5484. # We have reworked collect2
  5485. :
  5486. else
  5487. # We have old collect2
  5488. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  5489. # It fails to find uninstalled libraries when the uninstalled
  5490. # path is not listed in the libpath. Setting hardcode_minus_L
  5491. # to unsupported forces relinking
  5492. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5493. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5494. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5495. fi
  5496. esac
  5497. shared_flag='-shared'
  5498. if test "$aix_use_runtimelinking" = yes; then
  5499. shared_flag="$shared_flag "'${wl}-G'
  5500. fi
  5501. else
  5502. # not using gcc
  5503. if test "$host_cpu" = ia64; then
  5504. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  5505. # chokes on -Wl,-G. The following line is correct:
  5506. shared_flag='-G'
  5507. else
  5508. if test "$aix_use_runtimelinking" = yes; then
  5509. shared_flag='${wl}-G'
  5510. else
  5511. shared_flag='${wl}-bM:SRE'
  5512. fi
  5513. fi
  5514. fi
  5515. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
  5516. # It seems that -bexpall does not export symbols beginning with
  5517. # underscore (_), so it is better to generate a list of symbols to
  5518. # export.
  5519. _LT_TAGVAR(always_export_symbols, $1)=yes
  5520. if test "$aix_use_runtimelinking" = yes; then
  5521. # Warning - without using the other runtime loading flags (-brtl),
  5522. # -berok will link without error, but may produce a broken library.
  5523. _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
  5524. # Determine the default libpath from the value encoded in an empty
  5525. # executable.
  5526. _LT_SYS_MODULE_PATH_AIX([$1])
  5527. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  5528. _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"
  5529. else
  5530. if test "$host_cpu" = ia64; then
  5531. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  5532. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  5533. _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"
  5534. else
  5535. # Determine the default libpath from the value encoded in an
  5536. # empty executable.
  5537. _LT_SYS_MODULE_PATH_AIX([$1])
  5538. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  5539. # Warning - without using the other run time loading flags,
  5540. # -berok will link without error, but may produce a broken library.
  5541. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  5542. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  5543. if test "$with_gnu_ld" = yes; then
  5544. # We only use this code for GNU lds that support --whole-archive.
  5545. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  5546. else
  5547. # Exported symbols can be pulled into shared objects from archives
  5548. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  5549. fi
  5550. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5551. # This is similar to how AIX traditionally builds its shared
  5552. # libraries.
  5553. _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'
  5554. fi
  5555. fi
  5556. ;;
  5557. beos*)
  5558. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  5559. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5560. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  5561. # support --undefined. This deserves some investigation. FIXME
  5562. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5563. else
  5564. _LT_TAGVAR(ld_shlibs, $1)=no
  5565. fi
  5566. ;;
  5567. chorus*)
  5568. case $cc_basename in
  5569. *)
  5570. # FIXME: insert proper C++ library support
  5571. _LT_TAGVAR(ld_shlibs, $1)=no
  5572. ;;
  5573. esac
  5574. ;;
  5575. cygwin* | mingw* | pw32* | cegcc*)
  5576. case $GXX,$cc_basename in
  5577. ,cl* | no,cl*)
  5578. # Native MSVC
  5579. # hardcode_libdir_flag_spec is actually meaningless, as there is
  5580. # no search path for DLLs.
  5581. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  5582. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5583. _LT_TAGVAR(always_export_symbols, $1)=yes
  5584. _LT_TAGVAR(file_list_spec, $1)='@'
  5585. # Tell ltmain to make .lib files, not .a files.
  5586. libext=lib
  5587. # Tell ltmain to make .dll files, not .so files.
  5588. shrext_cmds=".dll"
  5589. # FIXME: Setting linknames here is a bad hack.
  5590. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
  5591. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  5592. $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
  5593. else
  5594. $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
  5595. fi~
  5596. $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  5597. linknames='
  5598. # The linker will not automatically build a static lib if we build a DLL.
  5599. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  5600. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5601. # Don't use ranlib
  5602. _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  5603. _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  5604. lt_tool_outputfile="@TOOL_OUTPUT@"~
  5605. case $lt_outputfile in
  5606. *.exe|*.EXE) ;;
  5607. *)
  5608. lt_outputfile="$lt_outputfile.exe"
  5609. lt_tool_outputfile="$lt_tool_outputfile.exe"
  5610. ;;
  5611. esac~
  5612. func_to_tool_file "$lt_outputfile"~
  5613. if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
  5614. $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  5615. $RM "$lt_outputfile.manifest";
  5616. fi'
  5617. ;;
  5618. *)
  5619. # g++
  5620. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  5621. # as there is no search path for DLLs.
  5622. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5623. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
  5624. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5625. _LT_TAGVAR(always_export_symbols, $1)=no
  5626. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5627. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  5628. _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'
  5629. # If the export-symbols file already is a .def file (1st line
  5630. # is EXPORTS), use it as is; otherwise, prepend...
  5631. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  5632. cp $export_symbols $output_objdir/$soname.def;
  5633. else
  5634. echo EXPORTS > $output_objdir/$soname.def;
  5635. cat $export_symbols >> $output_objdir/$soname.def;
  5636. fi~
  5637. $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'
  5638. else
  5639. _LT_TAGVAR(ld_shlibs, $1)=no
  5640. fi
  5641. ;;
  5642. esac
  5643. ;;
  5644. darwin* | rhapsody*)
  5645. _LT_DARWIN_LINKER_FEATURES($1)
  5646. ;;
  5647. dgux*)
  5648. case $cc_basename in
  5649. ec++*)
  5650. # FIXME: insert proper C++ library support
  5651. _LT_TAGVAR(ld_shlibs, $1)=no
  5652. ;;
  5653. ghcx*)
  5654. # Green Hills C++ Compiler
  5655. # FIXME: insert proper C++ library support
  5656. _LT_TAGVAR(ld_shlibs, $1)=no
  5657. ;;
  5658. *)
  5659. # FIXME: insert proper C++ library support
  5660. _LT_TAGVAR(ld_shlibs, $1)=no
  5661. ;;
  5662. esac
  5663. ;;
  5664. freebsd2.*)
  5665. # C++ shared libraries reported to be fairly broken before
  5666. # switch to ELF
  5667. _LT_TAGVAR(ld_shlibs, $1)=no
  5668. ;;
  5669. freebsd-elf*)
  5670. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5671. ;;
  5672. freebsd* | dragonfly*)
  5673. # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
  5674. # conventions
  5675. _LT_TAGVAR(ld_shlibs, $1)=yes
  5676. ;;
  5677. gnu*)
  5678. ;;
  5679. haiku*)
  5680. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5681. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5682. ;;
  5683. hpux9*)
  5684. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5685. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5686. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5687. _LT_TAGVAR(hardcode_direct, $1)=yes
  5688. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  5689. # but as the default
  5690. # location of the library.
  5691. case $cc_basename in
  5692. CC*)
  5693. # FIXME: insert proper C++ library support
  5694. _LT_TAGVAR(ld_shlibs, $1)=no
  5695. ;;
  5696. aCC*)
  5697. _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'
  5698. # Commands to make compiler produce verbose output that lists
  5699. # what "hidden" libraries, object files and flags are used when
  5700. # linking a shared library.
  5701. #
  5702. # There doesn't appear to be a way to prevent this compiler from
  5703. # explicitly linking system object files so we need to strip them
  5704. # from the output so that they don't get included in the library
  5705. # dependencies.
  5706. 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"'
  5707. ;;
  5708. *)
  5709. if test "$GXX" = yes; then
  5710. _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'
  5711. else
  5712. # FIXME: insert proper C++ library support
  5713. _LT_TAGVAR(ld_shlibs, $1)=no
  5714. fi
  5715. ;;
  5716. esac
  5717. ;;
  5718. hpux10*|hpux11*)
  5719. if test $with_gnu_ld = no; then
  5720. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5721. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5722. case $host_cpu in
  5723. hppa*64*|ia64*)
  5724. ;;
  5725. *)
  5726. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5727. ;;
  5728. esac
  5729. fi
  5730. case $host_cpu in
  5731. hppa*64*|ia64*)
  5732. _LT_TAGVAR(hardcode_direct, $1)=no
  5733. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5734. ;;
  5735. *)
  5736. _LT_TAGVAR(hardcode_direct, $1)=yes
  5737. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5738. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  5739. # but as the default
  5740. # location of the library.
  5741. ;;
  5742. esac
  5743. case $cc_basename in
  5744. CC*)
  5745. # FIXME: insert proper C++ library support
  5746. _LT_TAGVAR(ld_shlibs, $1)=no
  5747. ;;
  5748. aCC*)
  5749. case $host_cpu in
  5750. hppa*64*)
  5751. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5752. ;;
  5753. ia64*)
  5754. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5755. ;;
  5756. *)
  5757. _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'
  5758. ;;
  5759. esac
  5760. # Commands to make compiler produce verbose output that lists
  5761. # what "hidden" libraries, object files and flags are used when
  5762. # linking a shared library.
  5763. #
  5764. # There doesn't appear to be a way to prevent this compiler from
  5765. # explicitly linking system object files so we need to strip them
  5766. # from the output so that they don't get included in the library
  5767. # dependencies.
  5768. 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"'
  5769. ;;
  5770. *)
  5771. if test "$GXX" = yes; then
  5772. if test $with_gnu_ld = no; then
  5773. case $host_cpu in
  5774. hppa*64*)
  5775. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5776. ;;
  5777. ia64*)
  5778. _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'
  5779. ;;
  5780. *)
  5781. _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'
  5782. ;;
  5783. esac
  5784. fi
  5785. else
  5786. # FIXME: insert proper C++ library support
  5787. _LT_TAGVAR(ld_shlibs, $1)=no
  5788. fi
  5789. ;;
  5790. esac
  5791. ;;
  5792. interix[[3-9]]*)
  5793. _LT_TAGVAR(hardcode_direct, $1)=no
  5794. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5795. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5796. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5797. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  5798. # Instead, shared libraries are loaded at an image base (0x10000000 by
  5799. # default) and relocated if they conflict, which is a slow very memory
  5800. # consuming and fragmenting process. To avoid this, we pick a random,
  5801. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  5802. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  5803. _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'
  5804. _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'
  5805. ;;
  5806. irix5* | irix6*)
  5807. case $cc_basename in
  5808. CC*)
  5809. # SGI C++
  5810. _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'
  5811. # Archives containing C++ object files must be created using
  5812. # "CC -ar", where "CC" is the IRIX C++ compiler. This is
  5813. # necessary to make sure instantiated templates are included
  5814. # in the archive.
  5815. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
  5816. ;;
  5817. *)
  5818. if test "$GXX" = yes; then
  5819. if test "$with_gnu_ld" = no; then
  5820. _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'
  5821. else
  5822. _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'
  5823. fi
  5824. fi
  5825. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5826. ;;
  5827. esac
  5828. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5829. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5830. _LT_TAGVAR(inherit_rpath, $1)=yes
  5831. ;;
  5832. linux* | k*bsd*-gnu | kopensolaris*-gnu)
  5833. case $cc_basename in
  5834. KCC*)
  5835. # Kuck and Associates, Inc. (KAI) C++ Compiler
  5836. # KCC will only create a shared library if the output file
  5837. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  5838. # to its proper name (with version) after linking.
  5839. _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'
  5840. _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'
  5841. # Commands to make compiler produce verbose output that lists
  5842. # what "hidden" libraries, object files and flags are used when
  5843. # linking a shared library.
  5844. #
  5845. # There doesn't appear to be a way to prevent this compiler from
  5846. # explicitly linking system object files so we need to strip them
  5847. # from the output so that they don't get included in the library
  5848. # dependencies.
  5849. 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"'
  5850. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5851. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5852. # Archives containing C++ object files must be created using
  5853. # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  5854. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  5855. ;;
  5856. icpc* | ecpc* )
  5857. # Intel C++
  5858. with_gnu_ld=yes
  5859. # version 8.0 and above of icpc choke on multiply defined symbols
  5860. # if we add $predep_objects and $postdep_objects, however 7.1 and
  5861. # earlier do not add the objects themselves.
  5862. case `$CC -V 2>&1` in
  5863. *"Version 7."*)
  5864. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5865. _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'
  5866. ;;
  5867. *) # Version 8.0 or newer
  5868. tmp_idyn=
  5869. case $host_cpu in
  5870. ia64*) tmp_idyn=' -i_dynamic';;
  5871. esac
  5872. _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5873. _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'
  5874. ;;
  5875. esac
  5876. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5877. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5878. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5879. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  5880. ;;
  5881. pgCC* | pgcpp*)
  5882. # Portland Group C++ compiler
  5883. case `$CC -V` in
  5884. *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
  5885. _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
  5886. rm -rf $tpldir~
  5887. $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
  5888. compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
  5889. _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
  5890. rm -rf $tpldir~
  5891. $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
  5892. $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
  5893. $RANLIB $oldlib'
  5894. _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
  5895. rm -rf $tpldir~
  5896. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  5897. $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
  5898. _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
  5899. rm -rf $tpldir~
  5900. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  5901. $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'
  5902. ;;
  5903. *) # Version 6 and above use weak symbols
  5904. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
  5905. _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'
  5906. ;;
  5907. esac
  5908. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
  5909. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5910. _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'
  5911. ;;
  5912. cxx*)
  5913. # Compaq C++
  5914. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5915. _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'
  5916. runpath_var=LD_RUN_PATH
  5917. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  5918. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5919. # Commands to make compiler produce verbose output that lists
  5920. # what "hidden" libraries, object files and flags are used when
  5921. # linking a shared library.
  5922. #
  5923. # There doesn't appear to be a way to prevent this compiler from
  5924. # explicitly linking system object files so we need to strip them
  5925. # from the output so that they don't get included in the library
  5926. # dependencies.
  5927. 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'
  5928. ;;
  5929. xl* | mpixl* | bgxl*)
  5930. # IBM XL 8.0 on PPC, with GNU ld
  5931. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5932. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5933. _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5934. if test "x$supports_anon_versioning" = xyes; then
  5935. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  5936. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  5937. echo "local: *; };" >> $output_objdir/$libname.ver~
  5938. $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  5939. fi
  5940. ;;
  5941. *)
  5942. case `$CC -V 2>&1 | sed 5q` in
  5943. *Sun\ C*)
  5944. # Sun C++ 5.9
  5945. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  5946. _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5947. _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'
  5948. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5949. _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'
  5950. _LT_TAGVAR(compiler_needs_object, $1)=yes
  5951. # Not sure whether something based on
  5952. # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
  5953. # would be better.
  5954. output_verbose_link_cmd='func_echo_all'
  5955. # Archives containing C++ object files must be created using
  5956. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  5957. # necessary to make sure instantiated templates are included
  5958. # in the archive.
  5959. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  5960. ;;
  5961. esac
  5962. ;;
  5963. esac
  5964. ;;
  5965. lynxos*)
  5966. # FIXME: insert proper C++ library support
  5967. _LT_TAGVAR(ld_shlibs, $1)=no
  5968. ;;
  5969. m88k*)
  5970. # FIXME: insert proper C++ library support
  5971. _LT_TAGVAR(ld_shlibs, $1)=no
  5972. ;;
  5973. mvs*)
  5974. case $cc_basename in
  5975. cxx*)
  5976. # FIXME: insert proper C++ library support
  5977. _LT_TAGVAR(ld_shlibs, $1)=no
  5978. ;;
  5979. *)
  5980. # FIXME: insert proper C++ library support
  5981. _LT_TAGVAR(ld_shlibs, $1)=no
  5982. ;;
  5983. esac
  5984. ;;
  5985. netbsd*)
  5986. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  5987. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
  5988. wlarc=
  5989. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5990. _LT_TAGVAR(hardcode_direct, $1)=yes
  5991. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5992. fi
  5993. # Workaround some broken pre-1.5 toolchains
  5994. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
  5995. ;;
  5996. *nto* | *qnx*)
  5997. _LT_TAGVAR(ld_shlibs, $1)=yes
  5998. ;;
  5999. openbsd2*)
  6000. # C++ shared libraries are fairly broken
  6001. _LT_TAGVAR(ld_shlibs, $1)=no
  6002. ;;
  6003. openbsd*)
  6004. if test -f /usr/libexec/ld.so; then
  6005. _LT_TAGVAR(hardcode_direct, $1)=yes
  6006. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6007. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6008. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  6009. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  6010. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  6011. _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'
  6012. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  6013. _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  6014. fi
  6015. output_verbose_link_cmd=func_echo_all
  6016. else
  6017. _LT_TAGVAR(ld_shlibs, $1)=no
  6018. fi
  6019. ;;
  6020. osf3* | osf4* | osf5*)
  6021. case $cc_basename in
  6022. KCC*)
  6023. # Kuck and Associates, Inc. (KAI) C++ Compiler
  6024. # KCC will only create a shared library if the output file
  6025. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  6026. # to its proper name (with version) after linking.
  6027. _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'
  6028. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  6029. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6030. # Archives containing C++ object files must be created using
  6031. # the KAI C++ compiler.
  6032. case $host in
  6033. osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
  6034. *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
  6035. esac
  6036. ;;
  6037. RCC*)
  6038. # Rational C++ 2.4.1
  6039. # FIXME: insert proper C++ library support
  6040. _LT_TAGVAR(ld_shlibs, $1)=no
  6041. ;;
  6042. cxx*)
  6043. case $host in
  6044. osf3*)
  6045. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  6046. _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'
  6047. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6048. ;;
  6049. *)
  6050. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  6051. _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'
  6052. _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
  6053. echo "-hidden">> $lib.exp~
  6054. $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~
  6055. $RM $lib.exp'
  6056. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  6057. ;;
  6058. esac
  6059. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6060. # Commands to make compiler produce verbose output that lists
  6061. # what "hidden" libraries, object files and flags are used when
  6062. # linking a shared library.
  6063. #
  6064. # There doesn't appear to be a way to prevent this compiler from
  6065. # explicitly linking system object files so we need to strip them
  6066. # from the output so that they don't get included in the library
  6067. # dependencies.
  6068. 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"'
  6069. ;;
  6070. *)
  6071. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  6072. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  6073. case $host in
  6074. osf3*)
  6075. _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'
  6076. ;;
  6077. *)
  6078. _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'
  6079. ;;
  6080. esac
  6081. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6082. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6083. # Commands to make compiler produce verbose output that lists
  6084. # what "hidden" libraries, object files and flags are used when
  6085. # linking a shared library.
  6086. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  6087. else
  6088. # FIXME: insert proper C++ library support
  6089. _LT_TAGVAR(ld_shlibs, $1)=no
  6090. fi
  6091. ;;
  6092. esac
  6093. ;;
  6094. psos*)
  6095. # FIXME: insert proper C++ library support
  6096. _LT_TAGVAR(ld_shlibs, $1)=no
  6097. ;;
  6098. sunos4*)
  6099. case $cc_basename in
  6100. CC*)
  6101. # Sun C++ 4.x
  6102. # FIXME: insert proper C++ library support
  6103. _LT_TAGVAR(ld_shlibs, $1)=no
  6104. ;;
  6105. lcc*)
  6106. # Lucid
  6107. # FIXME: insert proper C++ library support
  6108. _LT_TAGVAR(ld_shlibs, $1)=no
  6109. ;;
  6110. *)
  6111. # FIXME: insert proper C++ library support
  6112. _LT_TAGVAR(ld_shlibs, $1)=no
  6113. ;;
  6114. esac
  6115. ;;
  6116. solaris*)
  6117. case $cc_basename in
  6118. CC* | sunCC*)
  6119. # Sun C++ 4.2, 5.x and Centerline C++
  6120. _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
  6121. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  6122. _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6123. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6124. $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'
  6125. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6126. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6127. case $host_os in
  6128. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6129. *)
  6130. # The compiler driver will combine and reorder linker options,
  6131. # but understands `-z linker_flag'.
  6132. # Supported since Solaris 2.6 (maybe 2.5.1?)
  6133. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  6134. ;;
  6135. esac
  6136. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6137. output_verbose_link_cmd='func_echo_all'
  6138. # Archives containing C++ object files must be created using
  6139. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  6140. # necessary to make sure instantiated templates are included
  6141. # in the archive.
  6142. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  6143. ;;
  6144. gcx*)
  6145. # Green Hills C++ Compiler
  6146. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  6147. # The C++ compiler must be used to create the archive.
  6148. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
  6149. ;;
  6150. *)
  6151. # GNU C++ compiler with Solaris linker
  6152. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  6153. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
  6154. if $CC --version | $GREP -v '^2\.7' > /dev/null; then
  6155. _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'
  6156. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6157. $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  6158. # Commands to make compiler produce verbose output that lists
  6159. # what "hidden" libraries, object files and flags are used when
  6160. # linking a shared library.
  6161. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  6162. else
  6163. # g++ 2.7 appears to require `-G' NOT `-shared' on this
  6164. # platform.
  6165. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  6166. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6167. $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  6168. # Commands to make compiler produce verbose output that lists
  6169. # what "hidden" libraries, object files and flags are used when
  6170. # linking a shared library.
  6171. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  6172. fi
  6173. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
  6174. case $host_os in
  6175. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6176. *)
  6177. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
  6178. ;;
  6179. esac
  6180. fi
  6181. ;;
  6182. esac
  6183. ;;
  6184. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  6185. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  6186. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6187. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6188. runpath_var='LD_RUN_PATH'
  6189. case $cc_basename in
  6190. CC*)
  6191. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6192. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6193. ;;
  6194. *)
  6195. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6196. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6197. ;;
  6198. esac
  6199. ;;
  6200. sysv5* | sco3.2v5* | sco5v6*)
  6201. # Note: We can NOT use -z defs as we might desire, because we do not
  6202. # link with -lc, and that would cause any symbols used from libc to
  6203. # always be unresolved, which means just about no library would
  6204. # ever link correctly. If we're not using GNU ld we use -z text
  6205. # though, which does catch some bad symbols but isn't as heavy-handed
  6206. # as -z defs.
  6207. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  6208. _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
  6209. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6210. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6211. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
  6212. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  6213. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6214. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  6215. runpath_var='LD_RUN_PATH'
  6216. case $cc_basename in
  6217. CC*)
  6218. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6219. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6220. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
  6221. '"$_LT_TAGVAR(old_archive_cmds, $1)"
  6222. _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
  6223. '"$_LT_TAGVAR(reload_cmds, $1)"
  6224. ;;
  6225. *)
  6226. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6227. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6228. ;;
  6229. esac
  6230. ;;
  6231. tandem*)
  6232. case $cc_basename in
  6233. NCC*)
  6234. # NonStop-UX NCC 3.20
  6235. # FIXME: insert proper C++ library support
  6236. _LT_TAGVAR(ld_shlibs, $1)=no
  6237. ;;
  6238. *)
  6239. # FIXME: insert proper C++ library support
  6240. _LT_TAGVAR(ld_shlibs, $1)=no
  6241. ;;
  6242. esac
  6243. ;;
  6244. vxworks*)
  6245. # FIXME: insert proper C++ library support
  6246. _LT_TAGVAR(ld_shlibs, $1)=no
  6247. ;;
  6248. *)
  6249. # FIXME: insert proper C++ library support
  6250. _LT_TAGVAR(ld_shlibs, $1)=no
  6251. ;;
  6252. esac
  6253. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  6254. test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  6255. _LT_TAGVAR(GCC, $1)="$GXX"
  6256. _LT_TAGVAR(LD, $1)="$LD"
  6257. ## CAVEAT EMPTOR:
  6258. ## There is no encapsulation within the following macros, do not change
  6259. ## the running order or otherwise move them around unless you know exactly
  6260. ## what you are doing...
  6261. _LT_SYS_HIDDEN_LIBDEPS($1)
  6262. _LT_COMPILER_PIC($1)
  6263. _LT_COMPILER_C_O($1)
  6264. _LT_COMPILER_FILE_LOCKS($1)
  6265. _LT_LINKER_SHLIBS($1)
  6266. _LT_SYS_DYNAMIC_LINKER($1)
  6267. _LT_LINKER_HARDCODE_LIBPATH($1)
  6268. _LT_CONFIG($1)
  6269. fi # test -n "$compiler"
  6270. CC=$lt_save_CC
  6271. CFLAGS=$lt_save_CFLAGS
  6272. LDCXX=$LD
  6273. LD=$lt_save_LD
  6274. GCC=$lt_save_GCC
  6275. with_gnu_ld=$lt_save_with_gnu_ld
  6276. lt_cv_path_LDCXX=$lt_cv_path_LD
  6277. lt_cv_path_LD=$lt_save_path_LD
  6278. lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
  6279. lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
  6280. fi # test "$_lt_caught_CXX_error" != yes
  6281. AC_LANG_POP
  6282. ])# _LT_LANG_CXX_CONFIG
  6283. # _LT_FUNC_STRIPNAME_CNF
  6284. # ----------------------
  6285. # func_stripname_cnf prefix suffix name
  6286. # strip PREFIX and SUFFIX off of NAME.
  6287. # PREFIX and SUFFIX must not contain globbing or regex special
  6288. # characters, hashes, percent signs, but SUFFIX may contain a leading
  6289. # dot (in which case that matches only a dot).
  6290. #
  6291. # This function is identical to the (non-XSI) version of func_stripname,
  6292. # except this one can be used by m4 code that may be executed by configure,
  6293. # rather than the libtool script.
  6294. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
  6295. AC_REQUIRE([_LT_DECL_SED])
  6296. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
  6297. func_stripname_cnf ()
  6298. {
  6299. case ${2} in
  6300. .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
  6301. *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
  6302. esac
  6303. } # func_stripname_cnf
  6304. ])# _LT_FUNC_STRIPNAME_CNF
  6305. # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
  6306. # ---------------------------------
  6307. # Figure out "hidden" library dependencies from verbose
  6308. # compiler output when linking a shared library.
  6309. # Parse the compiler output and extract the necessary
  6310. # objects, libraries and library flags.
  6311. m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
  6312. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  6313. AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
  6314. # Dependencies to place before and after the object being linked:
  6315. _LT_TAGVAR(predep_objects, $1)=
  6316. _LT_TAGVAR(postdep_objects, $1)=
  6317. _LT_TAGVAR(predeps, $1)=
  6318. _LT_TAGVAR(postdeps, $1)=
  6319. _LT_TAGVAR(compiler_lib_search_path, $1)=
  6320. dnl we can't use the lt_simple_compile_test_code here,
  6321. dnl because it contains code intended for an executable,
  6322. dnl not a library. It's possible we should let each
  6323. dnl tag define a new lt_????_link_test_code variable,
  6324. dnl but it's only used here...
  6325. m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
  6326. int a;
  6327. void foo (void) { a = 0; }
  6328. _LT_EOF
  6329. ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
  6330. class Foo
  6331. {
  6332. public:
  6333. Foo (void) { a = 0; }
  6334. private:
  6335. int a;
  6336. };
  6337. _LT_EOF
  6338. ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
  6339. subroutine foo
  6340. implicit none
  6341. integer*4 a
  6342. a=0
  6343. return
  6344. end
  6345. _LT_EOF
  6346. ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
  6347. subroutine foo
  6348. implicit none
  6349. integer a
  6350. a=0
  6351. return
  6352. end
  6353. _LT_EOF
  6354. ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
  6355. public class foo {
  6356. private int a;
  6357. public void bar (void) {
  6358. a = 0;
  6359. }
  6360. };
  6361. _LT_EOF
  6362. ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
  6363. package foo
  6364. func foo() {
  6365. }
  6366. _LT_EOF
  6367. ])
  6368. _lt_libdeps_save_CFLAGS=$CFLAGS
  6369. case "$CC $CFLAGS " in #(
  6370. *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
  6371. *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
  6372. *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
  6373. esac
  6374. dnl Parse the compiler output and extract the necessary
  6375. dnl objects, libraries and library flags.
  6376. if AC_TRY_EVAL(ac_compile); then
  6377. # Parse the compiler output and extract the necessary
  6378. # objects, libraries and library flags.
  6379. # Sentinel used to keep track of whether or not we are before
  6380. # the conftest object file.
  6381. pre_test_object_deps_done=no
  6382. for p in `eval "$output_verbose_link_cmd"`; do
  6383. case ${prev}${p} in
  6384. -L* | -R* | -l*)
  6385. # Some compilers place space between "-{L,R}" and the path.
  6386. # Remove the space.
  6387. if test $p = "-L" ||
  6388. test $p = "-R"; then
  6389. prev=$p
  6390. continue
  6391. fi
  6392. # Expand the sysroot to ease extracting the directories later.
  6393. if test -z "$prev"; then
  6394. case $p in
  6395. -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
  6396. -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
  6397. -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
  6398. esac
  6399. fi
  6400. case $p in
  6401. =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
  6402. esac
  6403. if test "$pre_test_object_deps_done" = no; then
  6404. case ${prev} in
  6405. -L | -R)
  6406. # Internal compiler library paths should come after those
  6407. # provided the user. The postdeps already come after the
  6408. # user supplied libs so there is no need to process them.
  6409. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
  6410. _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
  6411. else
  6412. _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
  6413. fi
  6414. ;;
  6415. # The "-l" case would never come before the object being
  6416. # linked, so don't bother handling this case.
  6417. esac
  6418. else
  6419. if test -z "$_LT_TAGVAR(postdeps, $1)"; then
  6420. _LT_TAGVAR(postdeps, $1)="${prev}${p}"
  6421. else
  6422. _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
  6423. fi
  6424. fi
  6425. prev=
  6426. ;;
  6427. *.lto.$objext) ;; # Ignore GCC LTO objects
  6428. *.$objext)
  6429. # This assumes that the test object file only shows up
  6430. # once in the compiler output.
  6431. if test "$p" = "conftest.$objext"; then
  6432. pre_test_object_deps_done=yes
  6433. continue
  6434. fi
  6435. if test "$pre_test_object_deps_done" = no; then
  6436. if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
  6437. _LT_TAGVAR(predep_objects, $1)="$p"
  6438. else
  6439. _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
  6440. fi
  6441. else
  6442. if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
  6443. _LT_TAGVAR(postdep_objects, $1)="$p"
  6444. else
  6445. _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
  6446. fi
  6447. fi
  6448. ;;
  6449. *) ;; # Ignore the rest.
  6450. esac
  6451. done
  6452. # Clean up.
  6453. rm -f a.out a.exe
  6454. else
  6455. echo "libtool.m4: error: problem compiling $1 test program"
  6456. fi
  6457. $RM -f confest.$objext
  6458. CFLAGS=$_lt_libdeps_save_CFLAGS
  6459. # PORTME: override above test on systems where it is broken
  6460. m4_if([$1], [CXX],
  6461. [case $host_os in
  6462. interix[[3-9]]*)
  6463. # Interix 3.5 installs completely hosed .la files for C++, so rather than
  6464. # hack all around it, let's just trust "g++" to DTRT.
  6465. _LT_TAGVAR(predep_objects,$1)=
  6466. _LT_TAGVAR(postdep_objects,$1)=
  6467. _LT_TAGVAR(postdeps,$1)=
  6468. ;;
  6469. linux*)
  6470. case `$CC -V 2>&1 | sed 5q` in
  6471. *Sun\ C*)
  6472. # Sun C++ 5.9
  6473. # The more standards-conforming stlport4 library is
  6474. # incompatible with the Cstd library. Avoid specifying
  6475. # it if it's in CXXFLAGS. Ignore libCrun as
  6476. # -library=stlport4 depends on it.
  6477. case " $CXX $CXXFLAGS " in
  6478. *" -library=stlport4 "*)
  6479. solaris_use_stlport4=yes
  6480. ;;
  6481. esac
  6482. if test "$solaris_use_stlport4" != yes; then
  6483. _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
  6484. fi
  6485. ;;
  6486. esac
  6487. ;;
  6488. solaris*)
  6489. case $cc_basename in
  6490. CC* | sunCC*)
  6491. # The more standards-conforming stlport4 library is
  6492. # incompatible with the Cstd library. Avoid specifying
  6493. # it if it's in CXXFLAGS. Ignore libCrun as
  6494. # -library=stlport4 depends on it.
  6495. case " $CXX $CXXFLAGS " in
  6496. *" -library=stlport4 "*)
  6497. solaris_use_stlport4=yes
  6498. ;;
  6499. esac
  6500. # Adding this requires a known-good setup of shared libraries for
  6501. # Sun compiler versions before 5.6, else PIC objects from an old
  6502. # archive will be linked into the output, leading to subtle bugs.
  6503. if test "$solaris_use_stlport4" != yes; then
  6504. _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
  6505. fi
  6506. ;;
  6507. esac
  6508. ;;
  6509. esac
  6510. ])
  6511. case " $_LT_TAGVAR(postdeps, $1) " in
  6512. *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
  6513. esac
  6514. _LT_TAGVAR(compiler_lib_search_dirs, $1)=
  6515. if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
  6516. _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
  6517. fi
  6518. _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
  6519. [The directories searched by this compiler when creating a shared library])
  6520. _LT_TAGDECL([], [predep_objects], [1],
  6521. [Dependencies to place before and after the objects being linked to
  6522. create a shared library])
  6523. _LT_TAGDECL([], [postdep_objects], [1])
  6524. _LT_TAGDECL([], [predeps], [1])
  6525. _LT_TAGDECL([], [postdeps], [1])
  6526. _LT_TAGDECL([], [compiler_lib_search_path], [1],
  6527. [The library search path used internally by the compiler when linking
  6528. a shared library])
  6529. ])# _LT_SYS_HIDDEN_LIBDEPS
  6530. # _LT_LANG_F77_CONFIG([TAG])
  6531. # --------------------------
  6532. # Ensure that the configuration variables for a Fortran 77 compiler are
  6533. # suitably defined. These variables are subsequently used by _LT_CONFIG
  6534. # to write the compiler configuration to `libtool'.
  6535. m4_defun([_LT_LANG_F77_CONFIG],
  6536. [AC_LANG_PUSH(Fortran 77)
  6537. if test -z "$F77" || test "X$F77" = "Xno"; then
  6538. _lt_disable_F77=yes
  6539. fi
  6540. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6541. _LT_TAGVAR(allow_undefined_flag, $1)=
  6542. _LT_TAGVAR(always_export_symbols, $1)=no
  6543. _LT_TAGVAR(archive_expsym_cmds, $1)=
  6544. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  6545. _LT_TAGVAR(hardcode_direct, $1)=no
  6546. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  6547. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  6548. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  6549. _LT_TAGVAR(hardcode_minus_L, $1)=no
  6550. _LT_TAGVAR(hardcode_automatic, $1)=no
  6551. _LT_TAGVAR(inherit_rpath, $1)=no
  6552. _LT_TAGVAR(module_cmds, $1)=
  6553. _LT_TAGVAR(module_expsym_cmds, $1)=
  6554. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  6555. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  6556. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  6557. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  6558. _LT_TAGVAR(no_undefined_flag, $1)=
  6559. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  6560. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  6561. # Source file extension for f77 test sources.
  6562. ac_ext=f
  6563. # Object file extension for compiled f77 test sources.
  6564. objext=o
  6565. _LT_TAGVAR(objext, $1)=$objext
  6566. # No sense in running all these tests if we already determined that
  6567. # the F77 compiler isn't working. Some variables (like enable_shared)
  6568. # are currently assumed to apply to all compilers on this platform,
  6569. # and will be corrupted by setting them based on a non-working compiler.
  6570. if test "$_lt_disable_F77" != yes; then
  6571. # Code to be used in simple compile tests
  6572. lt_simple_compile_test_code="\
  6573. subroutine t
  6574. return
  6575. end
  6576. "
  6577. # Code to be used in simple link tests
  6578. lt_simple_link_test_code="\
  6579. program t
  6580. end
  6581. "
  6582. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6583. _LT_TAG_COMPILER
  6584. # save warnings/boilerplate of simple test code
  6585. _LT_COMPILER_BOILERPLATE
  6586. _LT_LINKER_BOILERPLATE
  6587. # Allow CC to be a program name with arguments.
  6588. lt_save_CC="$CC"
  6589. lt_save_GCC=$GCC
  6590. lt_save_CFLAGS=$CFLAGS
  6591. CC=${F77-"f77"}
  6592. CFLAGS=$FFLAGS
  6593. compiler=$CC
  6594. _LT_TAGVAR(compiler, $1)=$CC
  6595. _LT_CC_BASENAME([$compiler])
  6596. GCC=$G77
  6597. if test -n "$compiler"; then
  6598. AC_MSG_CHECKING([if libtool supports shared libraries])
  6599. AC_MSG_RESULT([$can_build_shared])
  6600. AC_MSG_CHECKING([whether to build shared libraries])
  6601. test "$can_build_shared" = "no" && enable_shared=no
  6602. # On AIX, shared libraries and static libraries use the same namespace, and
  6603. # are all built from PIC.
  6604. case $host_os in
  6605. aix3*)
  6606. test "$enable_shared" = yes && enable_static=no
  6607. if test -n "$RANLIB"; then
  6608. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  6609. postinstall_cmds='$RANLIB $lib'
  6610. fi
  6611. ;;
  6612. aix[[4-9]]*)
  6613. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  6614. test "$enable_shared" = yes && enable_static=no
  6615. fi
  6616. ;;
  6617. esac
  6618. AC_MSG_RESULT([$enable_shared])
  6619. AC_MSG_CHECKING([whether to build static libraries])
  6620. # Make sure either enable_shared or enable_static is yes.
  6621. test "$enable_shared" = yes || enable_static=yes
  6622. AC_MSG_RESULT([$enable_static])
  6623. _LT_TAGVAR(GCC, $1)="$G77"
  6624. _LT_TAGVAR(LD, $1)="$LD"
  6625. ## CAVEAT EMPTOR:
  6626. ## There is no encapsulation within the following macros, do not change
  6627. ## the running order or otherwise move them around unless you know exactly
  6628. ## what you are doing...
  6629. _LT_COMPILER_PIC($1)
  6630. _LT_COMPILER_C_O($1)
  6631. _LT_COMPILER_FILE_LOCKS($1)
  6632. _LT_LINKER_SHLIBS($1)
  6633. _LT_SYS_DYNAMIC_LINKER($1)
  6634. _LT_LINKER_HARDCODE_LIBPATH($1)
  6635. _LT_CONFIG($1)
  6636. fi # test -n "$compiler"
  6637. GCC=$lt_save_GCC
  6638. CC="$lt_save_CC"
  6639. CFLAGS="$lt_save_CFLAGS"
  6640. fi # test "$_lt_disable_F77" != yes
  6641. AC_LANG_POP
  6642. ])# _LT_LANG_F77_CONFIG
  6643. # _LT_LANG_FC_CONFIG([TAG])
  6644. # -------------------------
  6645. # Ensure that the configuration variables for a Fortran compiler are
  6646. # suitably defined. These variables are subsequently used by _LT_CONFIG
  6647. # to write the compiler configuration to `libtool'.
  6648. m4_defun([_LT_LANG_FC_CONFIG],
  6649. [AC_LANG_PUSH(Fortran)
  6650. if test -z "$FC" || test "X$FC" = "Xno"; then
  6651. _lt_disable_FC=yes
  6652. fi
  6653. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6654. _LT_TAGVAR(allow_undefined_flag, $1)=
  6655. _LT_TAGVAR(always_export_symbols, $1)=no
  6656. _LT_TAGVAR(archive_expsym_cmds, $1)=
  6657. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  6658. _LT_TAGVAR(hardcode_direct, $1)=no
  6659. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  6660. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  6661. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  6662. _LT_TAGVAR(hardcode_minus_L, $1)=no
  6663. _LT_TAGVAR(hardcode_automatic, $1)=no
  6664. _LT_TAGVAR(inherit_rpath, $1)=no
  6665. _LT_TAGVAR(module_cmds, $1)=
  6666. _LT_TAGVAR(module_expsym_cmds, $1)=
  6667. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  6668. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  6669. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  6670. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  6671. _LT_TAGVAR(no_undefined_flag, $1)=
  6672. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  6673. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  6674. # Source file extension for fc test sources.
  6675. ac_ext=${ac_fc_srcext-f}
  6676. # Object file extension for compiled fc test sources.
  6677. objext=o
  6678. _LT_TAGVAR(objext, $1)=$objext
  6679. # No sense in running all these tests if we already determined that
  6680. # the FC compiler isn't working. Some variables (like enable_shared)
  6681. # are currently assumed to apply to all compilers on this platform,
  6682. # and will be corrupted by setting them based on a non-working compiler.
  6683. if test "$_lt_disable_FC" != yes; then
  6684. # Code to be used in simple compile tests
  6685. lt_simple_compile_test_code="\
  6686. subroutine t
  6687. return
  6688. end
  6689. "
  6690. # Code to be used in simple link tests
  6691. lt_simple_link_test_code="\
  6692. program t
  6693. end
  6694. "
  6695. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6696. _LT_TAG_COMPILER
  6697. # save warnings/boilerplate of simple test code
  6698. _LT_COMPILER_BOILERPLATE
  6699. _LT_LINKER_BOILERPLATE
  6700. # Allow CC to be a program name with arguments.
  6701. lt_save_CC="$CC"
  6702. lt_save_GCC=$GCC
  6703. lt_save_CFLAGS=$CFLAGS
  6704. CC=${FC-"f95"}
  6705. CFLAGS=$FCFLAGS
  6706. compiler=$CC
  6707. GCC=$ac_cv_fc_compiler_gnu
  6708. _LT_TAGVAR(compiler, $1)=$CC
  6709. _LT_CC_BASENAME([$compiler])
  6710. if test -n "$compiler"; then
  6711. AC_MSG_CHECKING([if libtool supports shared libraries])
  6712. AC_MSG_RESULT([$can_build_shared])
  6713. AC_MSG_CHECKING([whether to build shared libraries])
  6714. test "$can_build_shared" = "no" && enable_shared=no
  6715. # On AIX, shared libraries and static libraries use the same namespace, and
  6716. # are all built from PIC.
  6717. case $host_os in
  6718. aix3*)
  6719. test "$enable_shared" = yes && enable_static=no
  6720. if test -n "$RANLIB"; then
  6721. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  6722. postinstall_cmds='$RANLIB $lib'
  6723. fi
  6724. ;;
  6725. aix[[4-9]]*)
  6726. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  6727. test "$enable_shared" = yes && enable_static=no
  6728. fi
  6729. ;;
  6730. esac
  6731. AC_MSG_RESULT([$enable_shared])
  6732. AC_MSG_CHECKING([whether to build static libraries])
  6733. # Make sure either enable_shared or enable_static is yes.
  6734. test "$enable_shared" = yes || enable_static=yes
  6735. AC_MSG_RESULT([$enable_static])
  6736. _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
  6737. _LT_TAGVAR(LD, $1)="$LD"
  6738. ## CAVEAT EMPTOR:
  6739. ## There is no encapsulation within the following macros, do not change
  6740. ## the running order or otherwise move them around unless you know exactly
  6741. ## what you are doing...
  6742. _LT_SYS_HIDDEN_LIBDEPS($1)
  6743. _LT_COMPILER_PIC($1)
  6744. _LT_COMPILER_C_O($1)
  6745. _LT_COMPILER_FILE_LOCKS($1)
  6746. _LT_LINKER_SHLIBS($1)
  6747. _LT_SYS_DYNAMIC_LINKER($1)
  6748. _LT_LINKER_HARDCODE_LIBPATH($1)
  6749. _LT_CONFIG($1)
  6750. fi # test -n "$compiler"
  6751. GCC=$lt_save_GCC
  6752. CC=$lt_save_CC
  6753. CFLAGS=$lt_save_CFLAGS
  6754. fi # test "$_lt_disable_FC" != yes
  6755. AC_LANG_POP
  6756. ])# _LT_LANG_FC_CONFIG
  6757. # _LT_LANG_GCJ_CONFIG([TAG])
  6758. # --------------------------
  6759. # Ensure that the configuration variables for the GNU Java Compiler compiler
  6760. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  6761. # to write the compiler configuration to `libtool'.
  6762. m4_defun([_LT_LANG_GCJ_CONFIG],
  6763. [AC_REQUIRE([LT_PROG_GCJ])dnl
  6764. AC_LANG_SAVE
  6765. # Source file extension for Java test sources.
  6766. ac_ext=java
  6767. # Object file extension for compiled Java test sources.
  6768. objext=o
  6769. _LT_TAGVAR(objext, $1)=$objext
  6770. # Code to be used in simple compile tests
  6771. lt_simple_compile_test_code="class foo {}"
  6772. # Code to be used in simple link tests
  6773. lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
  6774. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6775. _LT_TAG_COMPILER
  6776. # save warnings/boilerplate of simple test code
  6777. _LT_COMPILER_BOILERPLATE
  6778. _LT_LINKER_BOILERPLATE
  6779. # Allow CC to be a program name with arguments.
  6780. lt_save_CC=$CC
  6781. lt_save_CFLAGS=$CFLAGS
  6782. lt_save_GCC=$GCC
  6783. GCC=yes
  6784. CC=${GCJ-"gcj"}
  6785. CFLAGS=$GCJFLAGS
  6786. compiler=$CC
  6787. _LT_TAGVAR(compiler, $1)=$CC
  6788. _LT_TAGVAR(LD, $1)="$LD"
  6789. _LT_CC_BASENAME([$compiler])
  6790. # GCJ did not exist at the time GCC didn't implicitly link libc in.
  6791. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6792. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  6793. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  6794. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  6795. ## CAVEAT EMPTOR:
  6796. ## There is no encapsulation within the following macros, do not change
  6797. ## the running order or otherwise move them around unless you know exactly
  6798. ## what you are doing...
  6799. if test -n "$compiler"; then
  6800. _LT_COMPILER_NO_RTTI($1)
  6801. _LT_COMPILER_PIC($1)
  6802. _LT_COMPILER_C_O($1)
  6803. _LT_COMPILER_FILE_LOCKS($1)
  6804. _LT_LINKER_SHLIBS($1)
  6805. _LT_LINKER_HARDCODE_LIBPATH($1)
  6806. _LT_CONFIG($1)
  6807. fi
  6808. AC_LANG_RESTORE
  6809. GCC=$lt_save_GCC
  6810. CC=$lt_save_CC
  6811. CFLAGS=$lt_save_CFLAGS
  6812. ])# _LT_LANG_GCJ_CONFIG
  6813. # _LT_LANG_GO_CONFIG([TAG])
  6814. # --------------------------
  6815. # Ensure that the configuration variables for the GNU Go compiler
  6816. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  6817. # to write the compiler configuration to `libtool'.
  6818. m4_defun([_LT_LANG_GO_CONFIG],
  6819. [AC_REQUIRE([LT_PROG_GO])dnl
  6820. AC_LANG_SAVE
  6821. # Source file extension for Go test sources.
  6822. ac_ext=go
  6823. # Object file extension for compiled Go test sources.
  6824. objext=o
  6825. _LT_TAGVAR(objext, $1)=$objext
  6826. # Code to be used in simple compile tests
  6827. lt_simple_compile_test_code="package main; func main() { }"
  6828. # Code to be used in simple link tests
  6829. lt_simple_link_test_code='package main; func main() { }'
  6830. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6831. _LT_TAG_COMPILER
  6832. # save warnings/boilerplate of simple test code
  6833. _LT_COMPILER_BOILERPLATE
  6834. _LT_LINKER_BOILERPLATE
  6835. # Allow CC to be a program name with arguments.
  6836. lt_save_CC=$CC
  6837. lt_save_CFLAGS=$CFLAGS
  6838. lt_save_GCC=$GCC
  6839. GCC=yes
  6840. CC=${GOC-"gccgo"}
  6841. CFLAGS=$GOFLAGS
  6842. compiler=$CC
  6843. _LT_TAGVAR(compiler, $1)=$CC
  6844. _LT_TAGVAR(LD, $1)="$LD"
  6845. _LT_CC_BASENAME([$compiler])
  6846. # Go did not exist at the time GCC didn't implicitly link libc in.
  6847. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6848. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  6849. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  6850. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  6851. ## CAVEAT EMPTOR:
  6852. ## There is no encapsulation within the following macros, do not change
  6853. ## the running order or otherwise move them around unless you know exactly
  6854. ## what you are doing...
  6855. if test -n "$compiler"; then
  6856. _LT_COMPILER_NO_RTTI($1)
  6857. _LT_COMPILER_PIC($1)
  6858. _LT_COMPILER_C_O($1)
  6859. _LT_COMPILER_FILE_LOCKS($1)
  6860. _LT_LINKER_SHLIBS($1)
  6861. _LT_LINKER_HARDCODE_LIBPATH($1)
  6862. _LT_CONFIG($1)
  6863. fi
  6864. AC_LANG_RESTORE
  6865. GCC=$lt_save_GCC
  6866. CC=$lt_save_CC
  6867. CFLAGS=$lt_save_CFLAGS
  6868. ])# _LT_LANG_GO_CONFIG
  6869. # _LT_LANG_RC_CONFIG([TAG])
  6870. # -------------------------
  6871. # Ensure that the configuration variables for the Windows resource compiler
  6872. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  6873. # to write the compiler configuration to `libtool'.
  6874. m4_defun([_LT_LANG_RC_CONFIG],
  6875. [AC_REQUIRE([LT_PROG_RC])dnl
  6876. AC_LANG_SAVE
  6877. # Source file extension for RC test sources.
  6878. ac_ext=rc
  6879. # Object file extension for compiled RC test sources.
  6880. objext=o
  6881. _LT_TAGVAR(objext, $1)=$objext
  6882. # Code to be used in simple compile tests
  6883. lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
  6884. # Code to be used in simple link tests
  6885. lt_simple_link_test_code="$lt_simple_compile_test_code"
  6886. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6887. _LT_TAG_COMPILER
  6888. # save warnings/boilerplate of simple test code
  6889. _LT_COMPILER_BOILERPLATE
  6890. _LT_LINKER_BOILERPLATE
  6891. # Allow CC to be a program name with arguments.
  6892. lt_save_CC="$CC"
  6893. lt_save_CFLAGS=$CFLAGS
  6894. lt_save_GCC=$GCC
  6895. GCC=
  6896. CC=${RC-"windres"}
  6897. CFLAGS=
  6898. compiler=$CC
  6899. _LT_TAGVAR(compiler, $1)=$CC
  6900. _LT_CC_BASENAME([$compiler])
  6901. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  6902. if test -n "$compiler"; then
  6903. :
  6904. _LT_CONFIG($1)
  6905. fi
  6906. GCC=$lt_save_GCC
  6907. AC_LANG_RESTORE
  6908. CC=$lt_save_CC
  6909. CFLAGS=$lt_save_CFLAGS
  6910. ])# _LT_LANG_RC_CONFIG
  6911. # LT_PROG_GCJ
  6912. # -----------
  6913. AC_DEFUN([LT_PROG_GCJ],
  6914. [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
  6915. [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
  6916. [AC_CHECK_TOOL(GCJ, gcj,)
  6917. test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
  6918. AC_SUBST(GCJFLAGS)])])[]dnl
  6919. ])
  6920. # Old name:
  6921. AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
  6922. dnl aclocal-1.4 backwards compatibility:
  6923. dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
  6924. # LT_PROG_GO
  6925. # ----------
  6926. AC_DEFUN([LT_PROG_GO],
  6927. [AC_CHECK_TOOL(GOC, gccgo,)
  6928. ])
  6929. # LT_PROG_RC
  6930. # ----------
  6931. AC_DEFUN([LT_PROG_RC],
  6932. [AC_CHECK_TOOL(RC, windres,)
  6933. ])
  6934. # Old name:
  6935. AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
  6936. dnl aclocal-1.4 backwards compatibility:
  6937. dnl AC_DEFUN([LT_AC_PROG_RC], [])
  6938. # _LT_DECL_EGREP
  6939. # --------------
  6940. # If we don't have a new enough Autoconf to choose the best grep
  6941. # available, choose the one first in the user's PATH.
  6942. m4_defun([_LT_DECL_EGREP],
  6943. [AC_REQUIRE([AC_PROG_EGREP])dnl
  6944. AC_REQUIRE([AC_PROG_FGREP])dnl
  6945. test -z "$GREP" && GREP=grep
  6946. _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
  6947. _LT_DECL([], [EGREP], [1], [An ERE matcher])
  6948. _LT_DECL([], [FGREP], [1], [A literal string matcher])
  6949. dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
  6950. AC_SUBST([GREP])
  6951. ])
  6952. # _LT_DECL_OBJDUMP
  6953. # --------------
  6954. # If we don't have a new enough Autoconf to choose the best objdump
  6955. # available, choose the one first in the user's PATH.
  6956. m4_defun([_LT_DECL_OBJDUMP],
  6957. [AC_CHECK_TOOL(OBJDUMP, objdump, false)
  6958. test -z "$OBJDUMP" && OBJDUMP=objdump
  6959. _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
  6960. AC_SUBST([OBJDUMP])
  6961. ])
  6962. # _LT_DECL_DLLTOOL
  6963. # ----------------
  6964. # Ensure DLLTOOL variable is set.
  6965. m4_defun([_LT_DECL_DLLTOOL],
  6966. [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  6967. test -z "$DLLTOOL" && DLLTOOL=dlltool
  6968. _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
  6969. AC_SUBST([DLLTOOL])
  6970. ])
  6971. # _LT_DECL_SED
  6972. # ------------
  6973. # Check for a fully-functional sed program, that truncates
  6974. # as few characters as possible. Prefer GNU sed if found.
  6975. m4_defun([_LT_DECL_SED],
  6976. [AC_PROG_SED
  6977. test -z "$SED" && SED=sed
  6978. Xsed="$SED -e 1s/^X//"
  6979. _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
  6980. _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
  6981. [Sed that helps us avoid accidentally triggering echo(1) options like -n])
  6982. ])# _LT_DECL_SED
  6983. m4_ifndef([AC_PROG_SED], [
  6984. ############################################################
  6985. # NOTE: This macro has been submitted for inclusion into #
  6986. # GNU Autoconf as AC_PROG_SED. When it is available in #
  6987. # a released version of Autoconf we should remove this #
  6988. # macro and use it instead. #
  6989. ############################################################
  6990. m4_defun([AC_PROG_SED],
  6991. [AC_MSG_CHECKING([for a sed that does not truncate output])
  6992. AC_CACHE_VAL(lt_cv_path_SED,
  6993. [# Loop through the user's path and test for sed and gsed.
  6994. # Then use that list of sed's as ones to test for truncation.
  6995. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6996. for as_dir in $PATH
  6997. do
  6998. IFS=$as_save_IFS
  6999. test -z "$as_dir" && as_dir=.
  7000. for lt_ac_prog in sed gsed; do
  7001. for ac_exec_ext in '' $ac_executable_extensions; do
  7002. if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
  7003. lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
  7004. fi
  7005. done
  7006. done
  7007. done
  7008. IFS=$as_save_IFS
  7009. lt_ac_max=0
  7010. lt_ac_count=0
  7011. # Add /usr/xpg4/bin/sed as it is typically found on Solaris
  7012. # along with /bin/sed that truncates output.
  7013. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
  7014. test ! -f $lt_ac_sed && continue
  7015. cat /dev/null > conftest.in
  7016. lt_ac_count=0
  7017. echo $ECHO_N "0123456789$ECHO_C" >conftest.in
  7018. # Check for GNU sed and select it if it is found.
  7019. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
  7020. lt_cv_path_SED=$lt_ac_sed
  7021. break
  7022. fi
  7023. while true; do
  7024. cat conftest.in conftest.in >conftest.tmp
  7025. mv conftest.tmp conftest.in
  7026. cp conftest.in conftest.nl
  7027. echo >>conftest.nl
  7028. $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
  7029. cmp -s conftest.out conftest.nl || break
  7030. # 10000 chars as input seems more than enough
  7031. test $lt_ac_count -gt 10 && break
  7032. lt_ac_count=`expr $lt_ac_count + 1`
  7033. if test $lt_ac_count -gt $lt_ac_max; then
  7034. lt_ac_max=$lt_ac_count
  7035. lt_cv_path_SED=$lt_ac_sed
  7036. fi
  7037. done
  7038. done
  7039. ])
  7040. SED=$lt_cv_path_SED
  7041. AC_SUBST([SED])
  7042. AC_MSG_RESULT([$SED])
  7043. ])#AC_PROG_SED
  7044. ])#m4_ifndef
  7045. # Old name:
  7046. AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
  7047. dnl aclocal-1.4 backwards compatibility:
  7048. dnl AC_DEFUN([LT_AC_PROG_SED], [])
  7049. # _LT_CHECK_SHELL_FEATURES
  7050. # ------------------------
  7051. # Find out whether the shell is Bourne or XSI compatible,
  7052. # or has some other useful features.
  7053. m4_defun([_LT_CHECK_SHELL_FEATURES],
  7054. [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
  7055. # Try some XSI features
  7056. xsi_shell=no
  7057. ( _lt_dummy="a/b/c"
  7058. test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
  7059. = c,a/b,b/c, \
  7060. && eval 'test $(( 1 + 1 )) -eq 2 \
  7061. && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
  7062. && xsi_shell=yes
  7063. AC_MSG_RESULT([$xsi_shell])
  7064. _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
  7065. AC_MSG_CHECKING([whether the shell understands "+="])
  7066. lt_shell_append=no
  7067. ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
  7068. >/dev/null 2>&1 \
  7069. && lt_shell_append=yes
  7070. AC_MSG_RESULT([$lt_shell_append])
  7071. _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
  7072. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
  7073. lt_unset=unset
  7074. else
  7075. lt_unset=false
  7076. fi
  7077. _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
  7078. # test EBCDIC or ASCII
  7079. case `echo X|tr X '\101'` in
  7080. A) # ASCII based system
  7081. # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
  7082. lt_SP2NL='tr \040 \012'
  7083. lt_NL2SP='tr \015\012 \040\040'
  7084. ;;
  7085. *) # EBCDIC based system
  7086. lt_SP2NL='tr \100 \n'
  7087. lt_NL2SP='tr \r\n \100\100'
  7088. ;;
  7089. esac
  7090. _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
  7091. _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
  7092. ])# _LT_CHECK_SHELL_FEATURES
  7093. # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
  7094. # ------------------------------------------------------
  7095. # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
  7096. # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
  7097. m4_defun([_LT_PROG_FUNCTION_REPLACE],
  7098. [dnl {
  7099. sed -e '/^$1 ()$/,/^} # $1 /c\
  7100. $1 ()\
  7101. {\
  7102. m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
  7103. } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
  7104. && mv -f "$cfgfile.tmp" "$cfgfile" \
  7105. || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
  7106. test 0 -eq $? || _lt_function_replace_fail=:
  7107. ])
  7108. # _LT_PROG_REPLACE_SHELLFNS
  7109. # -------------------------
  7110. # Replace existing portable implementations of several shell functions with
  7111. # equivalent extended shell implementations where those features are available..
  7112. m4_defun([_LT_PROG_REPLACE_SHELLFNS],
  7113. [if test x"$xsi_shell" = xyes; then
  7114. _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
  7115. case ${1} in
  7116. */*) func_dirname_result="${1%/*}${2}" ;;
  7117. * ) func_dirname_result="${3}" ;;
  7118. esac])
  7119. _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
  7120. func_basename_result="${1##*/}"])
  7121. _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
  7122. case ${1} in
  7123. */*) func_dirname_result="${1%/*}${2}" ;;
  7124. * ) func_dirname_result="${3}" ;;
  7125. esac
  7126. func_basename_result="${1##*/}"])
  7127. _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
  7128. # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
  7129. # positional parameters, so assign one to ordinary parameter first.
  7130. func_stripname_result=${3}
  7131. func_stripname_result=${func_stripname_result#"${1}"}
  7132. func_stripname_result=${func_stripname_result%"${2}"}])
  7133. _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
  7134. func_split_long_opt_name=${1%%=*}
  7135. func_split_long_opt_arg=${1#*=}])
  7136. _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
  7137. func_split_short_opt_arg=${1#??}
  7138. func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
  7139. _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
  7140. case ${1} in
  7141. *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
  7142. *) func_lo2o_result=${1} ;;
  7143. esac])
  7144. _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
  7145. _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
  7146. _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
  7147. fi
  7148. if test x"$lt_shell_append" = xyes; then
  7149. _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
  7150. _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
  7151. func_quote_for_eval "${2}"
  7152. dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
  7153. eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
  7154. # Save a `func_append' function call where possible by direct use of '+='
  7155. sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
  7156. && mv -f "$cfgfile.tmp" "$cfgfile" \
  7157. || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
  7158. test 0 -eq $? || _lt_function_replace_fail=:
  7159. else
  7160. # Save a `func_append' function call even when '+=' is not available
  7161. sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
  7162. && mv -f "$cfgfile.tmp" "$cfgfile" \
  7163. || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
  7164. test 0 -eq $? || _lt_function_replace_fail=:
  7165. fi
  7166. if test x"$_lt_function_replace_fail" = x":"; then
  7167. AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
  7168. fi
  7169. ])
  7170. # _LT_PATH_CONVERSION_FUNCTIONS
  7171. # -----------------------------
  7172. # Determine which file name conversion functions should be used by
  7173. # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
  7174. # for certain cross-compile configurations and native mingw.
  7175. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
  7176. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  7177. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  7178. AC_MSG_CHECKING([how to convert $build file names to $host format])
  7179. AC_CACHE_VAL(lt_cv_to_host_file_cmd,
  7180. [case $host in
  7181. *-*-mingw* )
  7182. case $build in
  7183. *-*-mingw* ) # actually msys
  7184. lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
  7185. ;;
  7186. *-*-cygwin* )
  7187. lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
  7188. ;;
  7189. * ) # otherwise, assume *nix
  7190. lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
  7191. ;;
  7192. esac
  7193. ;;
  7194. *-*-cygwin* )
  7195. case $build in
  7196. *-*-mingw* ) # actually msys
  7197. lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
  7198. ;;
  7199. *-*-cygwin* )
  7200. lt_cv_to_host_file_cmd=func_convert_file_noop
  7201. ;;
  7202. * ) # otherwise, assume *nix
  7203. lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
  7204. ;;
  7205. esac
  7206. ;;
  7207. * ) # unhandled hosts (and "normal" native builds)
  7208. lt_cv_to_host_file_cmd=func_convert_file_noop
  7209. ;;
  7210. esac
  7211. ])
  7212. to_host_file_cmd=$lt_cv_to_host_file_cmd
  7213. AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
  7214. _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
  7215. [0], [convert $build file names to $host format])dnl
  7216. AC_MSG_CHECKING([how to convert $build file names to toolchain format])
  7217. AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
  7218. [#assume ordinary cross tools, or native build.
  7219. lt_cv_to_tool_file_cmd=func_convert_file_noop
  7220. case $host in
  7221. *-*-mingw* )
  7222. case $build in
  7223. *-*-mingw* ) # actually msys
  7224. lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
  7225. ;;
  7226. esac
  7227. ;;
  7228. esac
  7229. ])
  7230. to_tool_file_cmd=$lt_cv_to_tool_file_cmd
  7231. AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
  7232. _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
  7233. [0], [convert $build files to toolchain format])dnl
  7234. ])# _LT_PATH_CONVERSION_FUNCTIONS