GCC with OpenMP stream-computing extension and BatchQueue algorithm
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

libtool.m4 257KB

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