libtool.m4 251 KB

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