libtool.m4 254 KB

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