1
0

libtool.m4 254 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357
  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. # Append ld.so.conf contents to the search path
  2203. if test -f /etc/ld.so.conf; then
  2204. 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' ' '`
  2205. sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
  2206. fi
  2207. # We used to test for /lib/ld.so.1 and disable shared libraries on
  2208. # powerpc, because MkLinux only supported shared libraries with the
  2209. # GNU dynamic linker. Since this was broken with cross compilers,
  2210. # most powerpc-linux boxes support dynamic linking these days and
  2211. # people can always --disable-shared, the test was removed, and we
  2212. # assume the GNU/Linux dynamic linker is in use.
  2213. dynamic_linker='GNU/Linux ld.so'
  2214. ;;
  2215. netbsd*)
  2216. version_type=sunos
  2217. need_lib_prefix=no
  2218. need_version=no
  2219. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  2220. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  2221. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2222. dynamic_linker='NetBSD (a.out) ld.so'
  2223. else
  2224. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  2225. soname_spec='${libname}${release}${shared_ext}$major'
  2226. dynamic_linker='NetBSD ld.elf_so'
  2227. fi
  2228. shlibpath_var=LD_LIBRARY_PATH
  2229. shlibpath_overrides_runpath=yes
  2230. hardcode_into_libs=yes
  2231. ;;
  2232. newsos6)
  2233. version_type=linux
  2234. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2235. shlibpath_var=LD_LIBRARY_PATH
  2236. shlibpath_overrides_runpath=yes
  2237. ;;
  2238. *nto* | *qnx*)
  2239. version_type=qnx
  2240. need_lib_prefix=no
  2241. need_version=no
  2242. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2243. soname_spec='${libname}${release}${shared_ext}$major'
  2244. shlibpath_var=LD_LIBRARY_PATH
  2245. shlibpath_overrides_runpath=no
  2246. hardcode_into_libs=yes
  2247. dynamic_linker='ldqnx.so'
  2248. ;;
  2249. openbsd*)
  2250. version_type=sunos
  2251. sys_lib_dlsearch_path_spec="/usr/lib"
  2252. need_lib_prefix=no
  2253. # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
  2254. case $host_os in
  2255. openbsd3.3 | openbsd3.3.*) need_version=yes ;;
  2256. *) need_version=no ;;
  2257. esac
  2258. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  2259. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2260. shlibpath_var=LD_LIBRARY_PATH
  2261. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  2262. case $host_os in
  2263. openbsd2.[[89]] | openbsd2.[[89]].*)
  2264. shlibpath_overrides_runpath=no
  2265. ;;
  2266. *)
  2267. shlibpath_overrides_runpath=yes
  2268. ;;
  2269. esac
  2270. else
  2271. shlibpath_overrides_runpath=yes
  2272. fi
  2273. ;;
  2274. os2*)
  2275. libname_spec='$name'
  2276. shrext_cmds=".dll"
  2277. need_lib_prefix=no
  2278. library_names_spec='$libname${shared_ext} $libname.a'
  2279. dynamic_linker='OS/2 ld.exe'
  2280. shlibpath_var=LIBPATH
  2281. ;;
  2282. osf3* | osf4* | osf5*)
  2283. version_type=osf
  2284. need_lib_prefix=no
  2285. need_version=no
  2286. soname_spec='${libname}${release}${shared_ext}$major'
  2287. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2288. shlibpath_var=LD_LIBRARY_PATH
  2289. sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  2290. sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  2291. ;;
  2292. rdos*)
  2293. dynamic_linker=no
  2294. ;;
  2295. solaris*)
  2296. version_type=linux
  2297. need_lib_prefix=no
  2298. need_version=no
  2299. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2300. soname_spec='${libname}${release}${shared_ext}$major'
  2301. shlibpath_var=LD_LIBRARY_PATH
  2302. shlibpath_overrides_runpath=yes
  2303. hardcode_into_libs=yes
  2304. # ldd complains unless libraries are executable
  2305. postinstall_cmds='chmod +x $lib'
  2306. ;;
  2307. sunos4*)
  2308. version_type=sunos
  2309. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  2310. finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  2311. shlibpath_var=LD_LIBRARY_PATH
  2312. shlibpath_overrides_runpath=yes
  2313. if test "$with_gnu_ld" = yes; then
  2314. need_lib_prefix=no
  2315. fi
  2316. need_version=yes
  2317. ;;
  2318. sysv4 | sysv4.3*)
  2319. version_type=linux
  2320. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2321. soname_spec='${libname}${release}${shared_ext}$major'
  2322. shlibpath_var=LD_LIBRARY_PATH
  2323. case $host_vendor in
  2324. sni)
  2325. shlibpath_overrides_runpath=no
  2326. need_lib_prefix=no
  2327. runpath_var=LD_RUN_PATH
  2328. ;;
  2329. siemens)
  2330. need_lib_prefix=no
  2331. ;;
  2332. motorola)
  2333. need_lib_prefix=no
  2334. need_version=no
  2335. shlibpath_overrides_runpath=no
  2336. sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  2337. ;;
  2338. esac
  2339. ;;
  2340. sysv4*MP*)
  2341. if test -d /usr/nec ;then
  2342. version_type=linux
  2343. library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
  2344. soname_spec='$libname${shared_ext}.$major'
  2345. shlibpath_var=LD_LIBRARY_PATH
  2346. fi
  2347. ;;
  2348. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  2349. version_type=freebsd-elf
  2350. need_lib_prefix=no
  2351. need_version=no
  2352. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  2353. soname_spec='${libname}${release}${shared_ext}$major'
  2354. shlibpath_var=LD_LIBRARY_PATH
  2355. shlibpath_overrides_runpath=yes
  2356. hardcode_into_libs=yes
  2357. if test "$with_gnu_ld" = yes; then
  2358. sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
  2359. else
  2360. sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
  2361. case $host_os in
  2362. sco3.2v5*)
  2363. sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
  2364. ;;
  2365. esac
  2366. fi
  2367. sys_lib_dlsearch_path_spec='/usr/lib'
  2368. ;;
  2369. tpf*)
  2370. # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
  2371. version_type=linux
  2372. need_lib_prefix=no
  2373. need_version=no
  2374. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2375. shlibpath_var=LD_LIBRARY_PATH
  2376. shlibpath_overrides_runpath=no
  2377. hardcode_into_libs=yes
  2378. ;;
  2379. uts4*)
  2380. version_type=linux
  2381. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2382. soname_spec='${libname}${release}${shared_ext}$major'
  2383. shlibpath_var=LD_LIBRARY_PATH
  2384. ;;
  2385. *)
  2386. dynamic_linker=no
  2387. ;;
  2388. esac
  2389. AC_MSG_RESULT([$dynamic_linker])
  2390. test "$dynamic_linker" = no && can_build_shared=no
  2391. variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  2392. if test "$GCC" = yes; then
  2393. variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  2394. fi
  2395. if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
  2396. sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
  2397. fi
  2398. if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
  2399. sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
  2400. fi
  2401. _LT_DECL([], [variables_saved_for_relink], [1],
  2402. [Variables whose values should be saved in libtool wrapper scripts and
  2403. restored at link time])
  2404. _LT_DECL([], [need_lib_prefix], [0],
  2405. [Do we need the "lib" prefix for modules?])
  2406. _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
  2407. _LT_DECL([], [version_type], [0], [Library versioning type])
  2408. _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
  2409. _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
  2410. _LT_DECL([], [shlibpath_overrides_runpath], [0],
  2411. [Is shlibpath searched before the hard-coded library search path?])
  2412. _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
  2413. _LT_DECL([], [library_names_spec], [1],
  2414. [[List of archive names. First name is the real one, the rest are links.
  2415. The last name is the one that the linker finds with -lNAME]])
  2416. _LT_DECL([], [soname_spec], [1],
  2417. [[The coded name of the library, if different from the real name]])
  2418. _LT_DECL([], [postinstall_cmds], [2],
  2419. [Command to use after installation of a shared archive])
  2420. _LT_DECL([], [postuninstall_cmds], [2],
  2421. [Command to use after uninstallation of a shared archive])
  2422. _LT_DECL([], [finish_cmds], [2],
  2423. [Commands used to finish a libtool library installation in a directory])
  2424. _LT_DECL([], [finish_eval], [1],
  2425. [[As "finish_cmds", except a single script fragment to be evaled but
  2426. not shown]])
  2427. _LT_DECL([], [hardcode_into_libs], [0],
  2428. [Whether we should hardcode library paths into libraries])
  2429. _LT_DECL([], [sys_lib_search_path_spec], [2],
  2430. [Compile-time system search path for libraries])
  2431. _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
  2432. [Run-time system search path for libraries])
  2433. ])# _LT_SYS_DYNAMIC_LINKER
  2434. # _LT_PATH_TOOL_PREFIX(TOOL)
  2435. # --------------------------
  2436. # find a file program which can recognize shared library
  2437. AC_DEFUN([_LT_PATH_TOOL_PREFIX],
  2438. [m4_require([_LT_DECL_EGREP])dnl
  2439. AC_MSG_CHECKING([for $1])
  2440. AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
  2441. [case $MAGIC_CMD in
  2442. [[\\/*] | ?:[\\/]*])
  2443. lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
  2444. ;;
  2445. *)
  2446. lt_save_MAGIC_CMD="$MAGIC_CMD"
  2447. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  2448. dnl $ac_dummy forces splitting on constant user-supplied paths.
  2449. dnl POSIX.2 word splitting is done only on the output of word expansions,
  2450. dnl not every word. This closes a longstanding sh security hole.
  2451. ac_dummy="m4_if([$2], , $PATH, [$2])"
  2452. for ac_dir in $ac_dummy; do
  2453. IFS="$lt_save_ifs"
  2454. test -z "$ac_dir" && ac_dir=.
  2455. if test -f $ac_dir/$1; then
  2456. lt_cv_path_MAGIC_CMD="$ac_dir/$1"
  2457. if test -n "$file_magic_test_file"; then
  2458. case $deplibs_check_method in
  2459. "file_magic "*)
  2460. file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
  2461. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  2462. if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  2463. $EGREP "$file_magic_regex" > /dev/null; then
  2464. :
  2465. else
  2466. cat <<_LT_EOF 1>&2
  2467. *** Warning: the command libtool uses to detect shared libraries,
  2468. *** $file_magic_cmd, produces output that libtool cannot recognize.
  2469. *** The result is that libtool may fail to recognize shared libraries
  2470. *** as such. This will affect the creation of libtool libraries that
  2471. *** depend on shared libraries, but programs linked with such libtool
  2472. *** libraries will work regardless of this problem. Nevertheless, you
  2473. *** may want to report the problem to your system manager and/or to
  2474. *** bug-libtool@gnu.org
  2475. _LT_EOF
  2476. fi ;;
  2477. esac
  2478. fi
  2479. break
  2480. fi
  2481. done
  2482. IFS="$lt_save_ifs"
  2483. MAGIC_CMD="$lt_save_MAGIC_CMD"
  2484. ;;
  2485. esac])
  2486. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  2487. if test -n "$MAGIC_CMD"; then
  2488. AC_MSG_RESULT($MAGIC_CMD)
  2489. else
  2490. AC_MSG_RESULT(no)
  2491. fi
  2492. _LT_DECL([], [MAGIC_CMD], [0],
  2493. [Used to examine libraries when file_magic_cmd begins with "file"])dnl
  2494. ])# _LT_PATH_TOOL_PREFIX
  2495. # Old name:
  2496. AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
  2497. dnl aclocal-1.4 backwards compatibility:
  2498. dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
  2499. # _LT_PATH_MAGIC
  2500. # --------------
  2501. # find a file program which can recognize a shared library
  2502. m4_defun([_LT_PATH_MAGIC],
  2503. [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
  2504. if test -z "$lt_cv_path_MAGIC_CMD"; then
  2505. if test -n "$ac_tool_prefix"; then
  2506. _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
  2507. else
  2508. MAGIC_CMD=:
  2509. fi
  2510. fi
  2511. ])# _LT_PATH_MAGIC
  2512. # LT_PATH_LD
  2513. # ----------
  2514. # find the pathname to the GNU or non-GNU linker
  2515. AC_DEFUN([LT_PATH_LD],
  2516. [AC_REQUIRE([AC_PROG_CC])dnl
  2517. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2518. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  2519. m4_require([_LT_DECL_SED])dnl
  2520. m4_require([_LT_DECL_EGREP])dnl
  2521. AC_ARG_WITH([gnu-ld],
  2522. [AS_HELP_STRING([--with-gnu-ld],
  2523. [assume the C compiler uses GNU ld @<:@default=no@:>@])],
  2524. [test "$withval" = no || with_gnu_ld=yes],
  2525. [with_gnu_ld=no])dnl
  2526. ac_prog=ld
  2527. if test "$GCC" = yes; then
  2528. # Check if gcc -print-prog-name=ld gives a path.
  2529. AC_MSG_CHECKING([for ld used by $CC])
  2530. case $host in
  2531. *-*-mingw*)
  2532. # gcc leaves a trailing carriage return which upsets mingw
  2533. ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  2534. *)
  2535. ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  2536. esac
  2537. case $ac_prog in
  2538. # Accept absolute paths.
  2539. [[\\/]]* | ?:[[\\/]]*)
  2540. re_direlt='/[[^/]][[^/]]*/\.\./'
  2541. # Canonicalize the pathname of ld
  2542. ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
  2543. while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
  2544. ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
  2545. done
  2546. test -z "$LD" && LD="$ac_prog"
  2547. ;;
  2548. "")
  2549. # If it fails, then pretend we aren't using GCC.
  2550. ac_prog=ld
  2551. ;;
  2552. *)
  2553. # If it is relative, then search for the first ld in PATH.
  2554. with_gnu_ld=unknown
  2555. ;;
  2556. esac
  2557. elif test "$with_gnu_ld" = yes; then
  2558. AC_MSG_CHECKING([for GNU ld])
  2559. else
  2560. AC_MSG_CHECKING([for non-GNU ld])
  2561. fi
  2562. AC_CACHE_VAL(lt_cv_path_LD,
  2563. [if test -z "$LD"; then
  2564. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  2565. for ac_dir in $PATH; do
  2566. IFS="$lt_save_ifs"
  2567. test -z "$ac_dir" && ac_dir=.
  2568. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  2569. lt_cv_path_LD="$ac_dir/$ac_prog"
  2570. # Check to see if the program is GNU ld. I'd rather use --version,
  2571. # but apparently some variants of GNU ld only accept -v.
  2572. # Break only if it was the GNU/non-GNU ld that we prefer.
  2573. case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
  2574. *GNU* | *'with BFD'*)
  2575. test "$with_gnu_ld" != no && break
  2576. ;;
  2577. *)
  2578. test "$with_gnu_ld" != yes && break
  2579. ;;
  2580. esac
  2581. fi
  2582. done
  2583. IFS="$lt_save_ifs"
  2584. else
  2585. lt_cv_path_LD="$LD" # Let the user override the test with a path.
  2586. fi])
  2587. LD="$lt_cv_path_LD"
  2588. if test -n "$LD"; then
  2589. AC_MSG_RESULT($LD)
  2590. else
  2591. AC_MSG_RESULT(no)
  2592. fi
  2593. test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  2594. _LT_PATH_LD_GNU
  2595. AC_SUBST([LD])
  2596. _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
  2597. ])# LT_PATH_LD
  2598. # Old names:
  2599. AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
  2600. AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
  2601. dnl aclocal-1.4 backwards compatibility:
  2602. dnl AC_DEFUN([AM_PROG_LD], [])
  2603. dnl AC_DEFUN([AC_PROG_LD], [])
  2604. # _LT_PATH_LD_GNU
  2605. #- --------------
  2606. m4_defun([_LT_PATH_LD_GNU],
  2607. [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
  2608. [# I'd rather use --version here, but apparently some GNU lds only accept -v.
  2609. case `$LD -v 2>&1 </dev/null` in
  2610. *GNU* | *'with BFD'*)
  2611. lt_cv_prog_gnu_ld=yes
  2612. ;;
  2613. *)
  2614. lt_cv_prog_gnu_ld=no
  2615. ;;
  2616. esac])
  2617. with_gnu_ld=$lt_cv_prog_gnu_ld
  2618. ])# _LT_PATH_LD_GNU
  2619. # _LT_CMD_RELOAD
  2620. # --------------
  2621. # find reload flag for linker
  2622. # -- PORTME Some linkers may need a different reload flag.
  2623. m4_defun([_LT_CMD_RELOAD],
  2624. [AC_CACHE_CHECK([for $LD option to reload object files],
  2625. lt_cv_ld_reload_flag,
  2626. [lt_cv_ld_reload_flag='-r'])
  2627. reload_flag=$lt_cv_ld_reload_flag
  2628. case $reload_flag in
  2629. "" | " "*) ;;
  2630. *) reload_flag=" $reload_flag" ;;
  2631. esac
  2632. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  2633. case $host_os in
  2634. darwin*)
  2635. if test "$GCC" = yes; then
  2636. reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
  2637. else
  2638. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  2639. fi
  2640. ;;
  2641. esac
  2642. _LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
  2643. _LT_DECL([], [reload_cmds], [2])dnl
  2644. ])# _LT_CMD_RELOAD
  2645. # _LT_CHECK_MAGIC_METHOD
  2646. # ----------------------
  2647. # how to check for library dependencies
  2648. # -- PORTME fill in with the dynamic library characteristics
  2649. m4_defun([_LT_CHECK_MAGIC_METHOD],
  2650. [m4_require([_LT_DECL_EGREP])
  2651. m4_require([_LT_DECL_OBJDUMP])
  2652. AC_CACHE_CHECK([how to recognize dependent libraries],
  2653. lt_cv_deplibs_check_method,
  2654. [lt_cv_file_magic_cmd='$MAGIC_CMD'
  2655. lt_cv_file_magic_test_file=
  2656. lt_cv_deplibs_check_method='unknown'
  2657. # Need to set the preceding variable on all platforms that support
  2658. # interlibrary dependencies.
  2659. # 'none' -- dependencies not supported.
  2660. # `unknown' -- same as none, but documents that we really don't know.
  2661. # 'pass_all' -- all dependencies passed with no checks.
  2662. # 'test_compile' -- check by making test program.
  2663. # 'file_magic [[regex]]' -- check by looking for files in library path
  2664. # which responds to the $file_magic_cmd with a given extended regex.
  2665. # If you have `file' or equivalent on your system and you're not sure
  2666. # whether `pass_all' will *always* work, you probably want this one.
  2667. case $host_os in
  2668. aix[[4-9]]*)
  2669. lt_cv_deplibs_check_method=pass_all
  2670. ;;
  2671. beos*)
  2672. lt_cv_deplibs_check_method=pass_all
  2673. ;;
  2674. bsdi[[45]]*)
  2675. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
  2676. lt_cv_file_magic_cmd='/usr/bin/file -L'
  2677. lt_cv_file_magic_test_file=/shlib/libc.so
  2678. ;;
  2679. cygwin*)
  2680. # func_win32_libid is a shell function defined in ltmain.sh
  2681. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  2682. lt_cv_file_magic_cmd='func_win32_libid'
  2683. ;;
  2684. mingw* | pw32*)
  2685. # Base MSYS/MinGW do not provide the 'file' command needed by
  2686. # func_win32_libid shell function, so use a weaker test based on 'objdump',
  2687. # unless we find 'file', for example because we are cross-compiling.
  2688. if ( file / ) >/dev/null 2>&1; then
  2689. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  2690. lt_cv_file_magic_cmd='func_win32_libid'
  2691. else
  2692. lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
  2693. lt_cv_file_magic_cmd='$OBJDUMP -f'
  2694. fi
  2695. ;;
  2696. cegcc)
  2697. # use the weaker test based on 'objdump'. See mingw*.
  2698. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
  2699. lt_cv_file_magic_cmd='$OBJDUMP -f'
  2700. ;;
  2701. darwin* | rhapsody*)
  2702. lt_cv_deplibs_check_method=pass_all
  2703. ;;
  2704. freebsd* | dragonfly*)
  2705. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  2706. case $host_cpu in
  2707. i*86 )
  2708. # Not sure whether the presence of OpenBSD here was a mistake.
  2709. # Let's accept both of them until this is cleared up.
  2710. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
  2711. lt_cv_file_magic_cmd=/usr/bin/file
  2712. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  2713. ;;
  2714. esac
  2715. else
  2716. lt_cv_deplibs_check_method=pass_all
  2717. fi
  2718. ;;
  2719. gnu*)
  2720. lt_cv_deplibs_check_method=pass_all
  2721. ;;
  2722. hpux10.20* | hpux11*)
  2723. lt_cv_file_magic_cmd=/usr/bin/file
  2724. case $host_cpu in
  2725. ia64*)
  2726. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
  2727. lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
  2728. ;;
  2729. hppa*64*)
  2730. [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]']
  2731. lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
  2732. ;;
  2733. *)
  2734. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
  2735. lt_cv_file_magic_test_file=/usr/lib/libc.sl
  2736. ;;
  2737. esac
  2738. ;;
  2739. interix[[3-9]]*)
  2740. # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
  2741. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
  2742. ;;
  2743. irix5* | irix6* | nonstopux*)
  2744. case $LD in
  2745. *-32|*"-32 ") libmagic=32-bit;;
  2746. *-n32|*"-n32 ") libmagic=N32;;
  2747. *-64|*"-64 ") libmagic=64-bit;;
  2748. *) libmagic=never-match;;
  2749. esac
  2750. lt_cv_deplibs_check_method=pass_all
  2751. ;;
  2752. # This must be Linux ELF.
  2753. linux* | k*bsd*-gnu)
  2754. lt_cv_deplibs_check_method=pass_all
  2755. ;;
  2756. netbsd*)
  2757. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  2758. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  2759. else
  2760. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
  2761. fi
  2762. ;;
  2763. newos6*)
  2764. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
  2765. lt_cv_file_magic_cmd=/usr/bin/file
  2766. lt_cv_file_magic_test_file=/usr/lib/libnls.so
  2767. ;;
  2768. *nto* | *qnx*)
  2769. lt_cv_deplibs_check_method=pass_all
  2770. ;;
  2771. openbsd*)
  2772. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  2773. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
  2774. else
  2775. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  2776. fi
  2777. ;;
  2778. osf3* | osf4* | osf5*)
  2779. lt_cv_deplibs_check_method=pass_all
  2780. ;;
  2781. rdos*)
  2782. lt_cv_deplibs_check_method=pass_all
  2783. ;;
  2784. solaris*)
  2785. lt_cv_deplibs_check_method=pass_all
  2786. ;;
  2787. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  2788. lt_cv_deplibs_check_method=pass_all
  2789. ;;
  2790. sysv4 | sysv4.3*)
  2791. case $host_vendor in
  2792. motorola)
  2793. 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]]'
  2794. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  2795. ;;
  2796. ncr)
  2797. lt_cv_deplibs_check_method=pass_all
  2798. ;;
  2799. sequent)
  2800. lt_cv_file_magic_cmd='/bin/file'
  2801. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
  2802. ;;
  2803. sni)
  2804. lt_cv_file_magic_cmd='/bin/file'
  2805. lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
  2806. lt_cv_file_magic_test_file=/lib/libc.so
  2807. ;;
  2808. siemens)
  2809. lt_cv_deplibs_check_method=pass_all
  2810. ;;
  2811. pc)
  2812. lt_cv_deplibs_check_method=pass_all
  2813. ;;
  2814. esac
  2815. ;;
  2816. tpf*)
  2817. lt_cv_deplibs_check_method=pass_all
  2818. ;;
  2819. esac
  2820. ])
  2821. file_magic_cmd=$lt_cv_file_magic_cmd
  2822. deplibs_check_method=$lt_cv_deplibs_check_method
  2823. test -z "$deplibs_check_method" && deplibs_check_method=unknown
  2824. _LT_DECL([], [deplibs_check_method], [1],
  2825. [Method to check whether dependent libraries are shared objects])
  2826. _LT_DECL([], [file_magic_cmd], [1],
  2827. [Command to use when deplibs_check_method == "file_magic"])
  2828. ])# _LT_CHECK_MAGIC_METHOD
  2829. # LT_PATH_NM
  2830. # ----------
  2831. # find the pathname to a BSD- or MS-compatible name lister
  2832. AC_DEFUN([LT_PATH_NM],
  2833. [AC_REQUIRE([AC_PROG_CC])dnl
  2834. AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
  2835. [if test -n "$NM"; then
  2836. # Let the user override the test.
  2837. lt_cv_path_NM="$NM"
  2838. else
  2839. lt_nm_to_check="${ac_tool_prefix}nm"
  2840. if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
  2841. lt_nm_to_check="$lt_nm_to_check nm"
  2842. fi
  2843. for lt_tmp_nm in $lt_nm_to_check; do
  2844. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  2845. for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
  2846. IFS="$lt_save_ifs"
  2847. test -z "$ac_dir" && ac_dir=.
  2848. tmp_nm="$ac_dir/$lt_tmp_nm"
  2849. if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
  2850. # Check to see if the nm accepts a BSD-compat flag.
  2851. # Adding the `sed 1q' prevents false positives on HP-UX, which says:
  2852. # nm: unknown option "B" ignored
  2853. # Tru64's nm complains that /dev/null is an invalid object file
  2854. case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
  2855. */dev/null* | *'Invalid file or object type'*)
  2856. lt_cv_path_NM="$tmp_nm -B"
  2857. break
  2858. ;;
  2859. *)
  2860. case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
  2861. */dev/null*)
  2862. lt_cv_path_NM="$tmp_nm -p"
  2863. break
  2864. ;;
  2865. *)
  2866. lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
  2867. continue # so that we can try to find one that supports BSD flags
  2868. ;;
  2869. esac
  2870. ;;
  2871. esac
  2872. fi
  2873. done
  2874. IFS="$lt_save_ifs"
  2875. done
  2876. : ${lt_cv_path_NM=no}
  2877. fi])
  2878. if test "$lt_cv_path_NM" != "no"; then
  2879. NM="$lt_cv_path_NM"
  2880. else
  2881. # Didn't find any BSD compatible name lister, look for dumpbin.
  2882. AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
  2883. AC_SUBST([DUMPBIN])
  2884. if test "$DUMPBIN" != ":"; then
  2885. NM="$DUMPBIN"
  2886. fi
  2887. fi
  2888. test -z "$NM" && NM=nm
  2889. AC_SUBST([NM])
  2890. _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
  2891. AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
  2892. [lt_cv_nm_interface="BSD nm"
  2893. echo "int some_variable = 0;" > conftest.$ac_ext
  2894. (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
  2895. (eval "$ac_compile" 2>conftest.err)
  2896. cat conftest.err >&AS_MESSAGE_LOG_FD
  2897. (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
  2898. (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
  2899. cat conftest.err >&AS_MESSAGE_LOG_FD
  2900. (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
  2901. cat conftest.out >&AS_MESSAGE_LOG_FD
  2902. if $GREP 'External.*some_variable' conftest.out > /dev/null; then
  2903. lt_cv_nm_interface="MS dumpbin"
  2904. fi
  2905. rm -f conftest*])
  2906. ])# LT_PATH_NM
  2907. # Old names:
  2908. AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
  2909. AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
  2910. dnl aclocal-1.4 backwards compatibility:
  2911. dnl AC_DEFUN([AM_PROG_NM], [])
  2912. dnl AC_DEFUN([AC_PROG_NM], [])
  2913. # LT_LIB_M
  2914. # --------
  2915. # check for math library
  2916. AC_DEFUN([LT_LIB_M],
  2917. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2918. LIBM=
  2919. case $host in
  2920. *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
  2921. # These system don't have libm, or don't need it
  2922. ;;
  2923. *-ncr-sysv4.3*)
  2924. AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
  2925. AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
  2926. ;;
  2927. *)
  2928. AC_CHECK_LIB(m, cos, LIBM="-lm")
  2929. ;;
  2930. esac
  2931. AC_SUBST([LIBM])
  2932. ])# LT_LIB_M
  2933. # Old name:
  2934. AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
  2935. dnl aclocal-1.4 backwards compatibility:
  2936. dnl AC_DEFUN([AC_CHECK_LIBM], [])
  2937. # _LT_COMPILER_NO_RTTI([TAGNAME])
  2938. # -------------------------------
  2939. m4_defun([_LT_COMPILER_NO_RTTI],
  2940. [m4_require([_LT_TAG_COMPILER])dnl
  2941. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  2942. if test "$GCC" = yes; then
  2943. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  2944. _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
  2945. lt_cv_prog_compiler_rtti_exceptions,
  2946. [-fno-rtti -fno-exceptions], [],
  2947. [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
  2948. fi
  2949. _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
  2950. [Compiler flag to turn off builtin functions])
  2951. ])# _LT_COMPILER_NO_RTTI
  2952. # _LT_CMD_GLOBAL_SYMBOLS
  2953. # ----------------------
  2954. m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
  2955. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2956. AC_REQUIRE([AC_PROG_CC])dnl
  2957. AC_REQUIRE([LT_PATH_NM])dnl
  2958. AC_REQUIRE([LT_PATH_LD])dnl
  2959. m4_require([_LT_DECL_SED])dnl
  2960. m4_require([_LT_DECL_EGREP])dnl
  2961. m4_require([_LT_TAG_COMPILER])dnl
  2962. # Check for command to grab the raw symbol name followed by C symbol from nm.
  2963. AC_MSG_CHECKING([command to parse $NM output from $compiler object])
  2964. AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
  2965. [
  2966. # These are sane defaults that work on at least a few old systems.
  2967. # [They come from Ultrix. What could be older than Ultrix?!! ;)]
  2968. # Character class describing NM global symbol codes.
  2969. symcode='[[BCDEGRST]]'
  2970. # Regexp to match symbols that can be accessed directly from C.
  2971. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
  2972. # Define system-specific variables.
  2973. case $host_os in
  2974. aix*)
  2975. symcode='[[BCDT]]'
  2976. ;;
  2977. cygwin* | mingw* | pw32* | cegcc*)
  2978. symcode='[[ABCDGISTW]]'
  2979. ;;
  2980. hpux*)
  2981. if test "$host_cpu" = ia64; then
  2982. symcode='[[ABCDEGRST]]'
  2983. fi
  2984. ;;
  2985. irix* | nonstopux*)
  2986. symcode='[[BCDEGRST]]'
  2987. ;;
  2988. osf*)
  2989. symcode='[[BCDEGQRST]]'
  2990. ;;
  2991. solaris*)
  2992. symcode='[[BDRT]]'
  2993. ;;
  2994. sco3.2v5*)
  2995. symcode='[[DT]]'
  2996. ;;
  2997. sysv4.2uw2*)
  2998. symcode='[[DT]]'
  2999. ;;
  3000. sysv5* | sco5v6* | unixware* | OpenUNIX*)
  3001. symcode='[[ABDT]]'
  3002. ;;
  3003. sysv4)
  3004. symcode='[[DFNSTU]]'
  3005. ;;
  3006. esac
  3007. # If we're using GNU nm, then use its standard symbol codes.
  3008. case `$NM -V 2>&1` in
  3009. *GNU* | *'with BFD'*)
  3010. symcode='[[ABCDGIRSTW]]' ;;
  3011. esac
  3012. # Transform an extracted symbol line into a proper C declaration.
  3013. # Some systems (esp. on ia64) link data and code symbols differently,
  3014. # so use this general approach.
  3015. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  3016. # Transform an extracted symbol line into symbol name and symbol address
  3017. lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
  3018. 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'"
  3019. # Handle CRLF in mingw tool chain
  3020. opt_cr=
  3021. case $build_os in
  3022. mingw*)
  3023. opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  3024. ;;
  3025. esac
  3026. # Try without a prefix underscore, then with it.
  3027. for ac_symprfx in "" "_"; do
  3028. # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
  3029. symxfrm="\\1 $ac_symprfx\\2 \\2"
  3030. # Write the raw and C identifiers.
  3031. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3032. # Fake it for dumpbin and say T for any non-static function
  3033. # and D for any global variable.
  3034. # Also find C++ and __fastcall symbols from MSVC++,
  3035. # which start with @ or ?.
  3036. lt_cv_sys_global_symbol_pipe="$AWK ['"\
  3037. " {last_section=section; section=\$ 3};"\
  3038. " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
  3039. " \$ 0!~/External *\|/{next};"\
  3040. " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
  3041. " {if(hide[section]) next};"\
  3042. " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
  3043. " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
  3044. " s[1]~/^[@?]/{print s[1], s[1]; next};"\
  3045. " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
  3046. " ' prfx=^$ac_symprfx]"
  3047. else
  3048. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
  3049. fi
  3050. # Check to see that the pipe works correctly.
  3051. pipe_works=no
  3052. rm -f conftest*
  3053. cat > conftest.$ac_ext <<_LT_EOF
  3054. #ifdef __cplusplus
  3055. extern "C" {
  3056. #endif
  3057. char nm_test_var;
  3058. void nm_test_func(void);
  3059. void nm_test_func(void){}
  3060. #ifdef __cplusplus
  3061. }
  3062. #endif
  3063. int main(){nm_test_var='a';nm_test_func();return(0);}
  3064. _LT_EOF
  3065. if AC_TRY_EVAL(ac_compile); then
  3066. # Now try to grab the symbols.
  3067. nlist=conftest.nm
  3068. if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
  3069. # Try sorting and uniquifying the output.
  3070. if sort "$nlist" | uniq > "$nlist"T; then
  3071. mv -f "$nlist"T "$nlist"
  3072. else
  3073. rm -f "$nlist"T
  3074. fi
  3075. # Make sure that we snagged all the symbols we need.
  3076. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
  3077. if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
  3078. cat <<_LT_EOF > conftest.$ac_ext
  3079. #ifdef __cplusplus
  3080. extern "C" {
  3081. #endif
  3082. _LT_EOF
  3083. # Now generate the symbol file.
  3084. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
  3085. cat <<_LT_EOF >> conftest.$ac_ext
  3086. /* The mapping between symbol names and symbols. */
  3087. const struct {
  3088. const char *name;
  3089. void *address;
  3090. }
  3091. lt__PROGRAM__LTX_preloaded_symbols[[]] =
  3092. {
  3093. { "@PROGRAM@", (void *) 0 },
  3094. _LT_EOF
  3095. $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
  3096. cat <<\_LT_EOF >> conftest.$ac_ext
  3097. {0, (void *) 0}
  3098. };
  3099. /* This works around a problem in FreeBSD linker */
  3100. #ifdef FREEBSD_WORKAROUND
  3101. static const void *lt_preloaded_setup() {
  3102. return lt__PROGRAM__LTX_preloaded_symbols;
  3103. }
  3104. #endif
  3105. #ifdef __cplusplus
  3106. }
  3107. #endif
  3108. _LT_EOF
  3109. # Now try linking the two files.
  3110. mv conftest.$ac_objext conftstm.$ac_objext
  3111. lt_save_LIBS="$LIBS"
  3112. lt_save_CFLAGS="$CFLAGS"
  3113. LIBS="conftstm.$ac_objext"
  3114. CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
  3115. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
  3116. pipe_works=yes
  3117. fi
  3118. LIBS="$lt_save_LIBS"
  3119. CFLAGS="$lt_save_CFLAGS"
  3120. else
  3121. echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
  3122. fi
  3123. else
  3124. echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
  3125. fi
  3126. else
  3127. echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
  3128. fi
  3129. else
  3130. echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
  3131. cat conftest.$ac_ext >&5
  3132. fi
  3133. rm -rf conftest* conftst*
  3134. # Do not use the global_symbol_pipe unless it works.
  3135. if test "$pipe_works" = yes; then
  3136. break
  3137. else
  3138. lt_cv_sys_global_symbol_pipe=
  3139. fi
  3140. done
  3141. ])
  3142. if test -z "$lt_cv_sys_global_symbol_pipe"; then
  3143. lt_cv_sys_global_symbol_to_cdecl=
  3144. fi
  3145. if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
  3146. AC_MSG_RESULT(failed)
  3147. else
  3148. AC_MSG_RESULT(ok)
  3149. fi
  3150. _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
  3151. [Take the output of nm and produce a listing of raw symbols and C names])
  3152. _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
  3153. [Transform the output of nm in a proper C declaration])
  3154. _LT_DECL([global_symbol_to_c_name_address],
  3155. [lt_cv_sys_global_symbol_to_c_name_address], [1],
  3156. [Transform the output of nm in a C name address pair])
  3157. _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
  3158. [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
  3159. [Transform the output of nm in a C name address pair when lib prefix is needed])
  3160. ]) # _LT_CMD_GLOBAL_SYMBOLS
  3161. # _LT_COMPILER_PIC([TAGNAME])
  3162. # ---------------------------
  3163. m4_defun([_LT_COMPILER_PIC],
  3164. [m4_require([_LT_TAG_COMPILER])dnl
  3165. _LT_TAGVAR(lt_prog_compiler_wl, $1)=
  3166. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3167. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3168. AC_MSG_CHECKING([for $compiler option to produce PIC])
  3169. m4_if([$1], [CXX], [
  3170. # C++ specific cases for pic, static, wl, etc.
  3171. if test "$GXX" = yes; then
  3172. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3173. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3174. case $host_os in
  3175. aix*)
  3176. # All AIX code is PIC.
  3177. if test "$host_cpu" = ia64; then
  3178. # AIX 5 now supports IA64 processor
  3179. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3180. fi
  3181. ;;
  3182. amigaos*)
  3183. case $host_cpu in
  3184. powerpc)
  3185. # see comment about AmigaOS4 .so support
  3186. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3187. ;;
  3188. m68k)
  3189. # FIXME: we need at least 68020 code to build shared libraries, but
  3190. # adding the `-m68020' flag to GCC prevents building anything better,
  3191. # like `-m68040'.
  3192. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  3193. ;;
  3194. esac
  3195. ;;
  3196. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  3197. # PIC is the default for these OSes.
  3198. ;;
  3199. mingw* | cygwin* | os2* | pw32* | cegcc*)
  3200. # This hack is so that the source file can tell whether it is being
  3201. # built for inclusion in a dll (and should export symbols for example).
  3202. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  3203. # (--disable-auto-import) libraries
  3204. m4_if([$1], [GCJ], [],
  3205. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3206. ;;
  3207. darwin* | rhapsody*)
  3208. # PIC is the default on this platform
  3209. # Common symbols not allowed in MH_DYLIB files
  3210. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  3211. ;;
  3212. *djgpp*)
  3213. # DJGPP does not support shared libraries at all
  3214. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3215. ;;
  3216. interix[[3-9]]*)
  3217. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  3218. # Instead, we relocate shared libraries at runtime.
  3219. ;;
  3220. sysv4*MP*)
  3221. if test -d /usr/nec; then
  3222. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  3223. fi
  3224. ;;
  3225. hpux*)
  3226. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  3227. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  3228. # sets the default TLS model and affects inlining.
  3229. case $host_cpu in
  3230. hppa*64*)
  3231. ;;
  3232. *)
  3233. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3234. ;;
  3235. esac
  3236. ;;
  3237. *qnx* | *nto*)
  3238. # QNX uses GNU C++, but need to define -shared option too, otherwise
  3239. # it will coredump.
  3240. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  3241. ;;
  3242. *)
  3243. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3244. ;;
  3245. esac
  3246. else
  3247. case $host_os in
  3248. aix[[4-9]]*)
  3249. # All AIX code is PIC.
  3250. if test "$host_cpu" = ia64; then
  3251. # AIX 5 now supports IA64 processor
  3252. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3253. else
  3254. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  3255. fi
  3256. ;;
  3257. chorus*)
  3258. case $cc_basename in
  3259. cxch68*)
  3260. # Green Hills C++ Compiler
  3261. # _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"
  3262. ;;
  3263. esac
  3264. ;;
  3265. dgux*)
  3266. case $cc_basename in
  3267. ec++*)
  3268. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3269. ;;
  3270. ghcx*)
  3271. # Green Hills C++ Compiler
  3272. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3273. ;;
  3274. *)
  3275. ;;
  3276. esac
  3277. ;;
  3278. freebsd* | dragonfly*)
  3279. # FreeBSD uses GNU C++
  3280. ;;
  3281. hpux9* | hpux10* | hpux11*)
  3282. case $cc_basename in
  3283. CC*)
  3284. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3285. _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  3286. if test "$host_cpu" != ia64; then
  3287. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  3288. fi
  3289. ;;
  3290. aCC*)
  3291. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3292. _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  3293. case $host_cpu in
  3294. hppa*64*|ia64*)
  3295. # +Z the default
  3296. ;;
  3297. *)
  3298. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  3299. ;;
  3300. esac
  3301. ;;
  3302. *)
  3303. ;;
  3304. esac
  3305. ;;
  3306. interix*)
  3307. # This is c89, which is MS Visual C++ (no shared libs)
  3308. # Anyone wants to do a port?
  3309. ;;
  3310. irix5* | irix6* | nonstopux*)
  3311. case $cc_basename in
  3312. CC*)
  3313. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3314. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3315. # CC pic flag -KPIC is the default.
  3316. ;;
  3317. *)
  3318. ;;
  3319. esac
  3320. ;;
  3321. linux* | k*bsd*-gnu)
  3322. case $cc_basename in
  3323. KCC*)
  3324. # KAI C++ Compiler
  3325. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  3326. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3327. ;;
  3328. ecpc* )
  3329. # old Intel C++ for x86_64 which still supported -KPIC.
  3330. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3331. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3332. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3333. ;;
  3334. icpc* )
  3335. # Intel C++, used to be incompatible with GCC.
  3336. # ICC 10 doesn't accept -KPIC any more.
  3337. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3338. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3339. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3340. ;;
  3341. pgCC* | pgcpp*)
  3342. # Portland Group C++ compiler
  3343. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3344. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  3345. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3346. ;;
  3347. cxx*)
  3348. # Compaq C++
  3349. # Make sure the PIC flag is empty. It appears that all Alpha
  3350. # Linux and Compaq Tru64 Unix objects are PIC.
  3351. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3352. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3353. ;;
  3354. xlc* | xlC*)
  3355. # IBM XL 8.0 on PPC
  3356. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3357. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  3358. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  3359. ;;
  3360. *)
  3361. case `$CC -V 2>&1 | sed 5q` in
  3362. *Sun\ C*)
  3363. # Sun C++ 5.9
  3364. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3365. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3366. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  3367. ;;
  3368. esac
  3369. ;;
  3370. esac
  3371. ;;
  3372. lynxos*)
  3373. ;;
  3374. m88k*)
  3375. ;;
  3376. mvs*)
  3377. case $cc_basename in
  3378. cxx*)
  3379. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
  3380. ;;
  3381. *)
  3382. ;;
  3383. esac
  3384. ;;
  3385. netbsd*)
  3386. ;;
  3387. *qnx* | *nto*)
  3388. # QNX uses GNU C++, but need to define -shared option too, otherwise
  3389. # it will coredump.
  3390. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  3391. ;;
  3392. osf3* | osf4* | osf5*)
  3393. case $cc_basename in
  3394. KCC*)
  3395. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  3396. ;;
  3397. RCC*)
  3398. # Rational C++ 2.4.1
  3399. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3400. ;;
  3401. cxx*)
  3402. # Digital/Compaq C++
  3403. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3404. # Make sure the PIC flag is empty. It appears that all Alpha
  3405. # Linux and Compaq Tru64 Unix objects are PIC.
  3406. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3407. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3408. ;;
  3409. *)
  3410. ;;
  3411. esac
  3412. ;;
  3413. psos*)
  3414. ;;
  3415. solaris*)
  3416. case $cc_basename in
  3417. CC*)
  3418. # Sun C++ 4.2, 5.x and Centerline C++
  3419. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3420. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3421. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  3422. ;;
  3423. gcx*)
  3424. # Green Hills C++ Compiler
  3425. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  3426. ;;
  3427. *)
  3428. ;;
  3429. esac
  3430. ;;
  3431. sunos4*)
  3432. case $cc_basename in
  3433. CC*)
  3434. # Sun C++ 4.x
  3435. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3436. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3437. ;;
  3438. lcc*)
  3439. # Lucid
  3440. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3441. ;;
  3442. *)
  3443. ;;
  3444. esac
  3445. ;;
  3446. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  3447. case $cc_basename in
  3448. CC*)
  3449. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3450. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3451. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3452. ;;
  3453. esac
  3454. ;;
  3455. tandem*)
  3456. case $cc_basename in
  3457. NCC*)
  3458. # NonStop-UX NCC 3.20
  3459. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3460. ;;
  3461. *)
  3462. ;;
  3463. esac
  3464. ;;
  3465. vxworks*)
  3466. ;;
  3467. *)
  3468. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  3469. ;;
  3470. esac
  3471. fi
  3472. ],
  3473. [
  3474. if test "$GCC" = yes; then
  3475. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3476. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3477. case $host_os in
  3478. aix*)
  3479. # All AIX code is PIC.
  3480. if test "$host_cpu" = ia64; then
  3481. # AIX 5 now supports IA64 processor
  3482. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3483. fi
  3484. ;;
  3485. amigaos*)
  3486. case $host_cpu in
  3487. powerpc)
  3488. # see comment about AmigaOS4 .so support
  3489. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3490. ;;
  3491. m68k)
  3492. # FIXME: we need at least 68020 code to build shared libraries, but
  3493. # adding the `-m68020' flag to GCC prevents building anything better,
  3494. # like `-m68040'.
  3495. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  3496. ;;
  3497. esac
  3498. ;;
  3499. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  3500. # PIC is the default for these OSes.
  3501. ;;
  3502. mingw* | cygwin* | pw32* | os2* | cegcc*)
  3503. # This hack is so that the source file can tell whether it is being
  3504. # built for inclusion in a dll (and should export symbols for example).
  3505. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  3506. # (--disable-auto-import) libraries
  3507. m4_if([$1], [GCJ], [],
  3508. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3509. ;;
  3510. darwin* | rhapsody*)
  3511. # PIC is the default on this platform
  3512. # Common symbols not allowed in MH_DYLIB files
  3513. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  3514. ;;
  3515. hpux*)
  3516. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  3517. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  3518. # sets the default TLS model and affects inlining.
  3519. case $host_cpu in
  3520. hppa*64*)
  3521. # +Z the default
  3522. ;;
  3523. *)
  3524. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3525. ;;
  3526. esac
  3527. ;;
  3528. interix[[3-9]]*)
  3529. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  3530. # Instead, we relocate shared libraries at runtime.
  3531. ;;
  3532. msdosdjgpp*)
  3533. # Just because we use GCC doesn't mean we suddenly get shared libraries
  3534. # on systems that don't support them.
  3535. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  3536. enable_shared=no
  3537. ;;
  3538. *nto* | *qnx*)
  3539. # QNX uses GNU C++, but need to define -shared option too, otherwise
  3540. # it will coredump.
  3541. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  3542. ;;
  3543. sysv4*MP*)
  3544. if test -d /usr/nec; then
  3545. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  3546. fi
  3547. ;;
  3548. *)
  3549. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3550. ;;
  3551. esac
  3552. else
  3553. # PORTME Check for flag to pass linker flags through the system compiler.
  3554. case $host_os in
  3555. aix*)
  3556. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3557. if test "$host_cpu" = ia64; then
  3558. # AIX 5 now supports IA64 processor
  3559. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3560. else
  3561. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  3562. fi
  3563. ;;
  3564. mingw* | cygwin* | pw32* | os2* | cegcc*)
  3565. # This hack is so that the source file can tell whether it is being
  3566. # built for inclusion in a dll (and should export symbols for example).
  3567. m4_if([$1], [GCJ], [],
  3568. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3569. ;;
  3570. hpux9* | hpux10* | hpux11*)
  3571. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3572. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  3573. # not for PA HP-UX.
  3574. case $host_cpu in
  3575. hppa*64*|ia64*)
  3576. # +Z the default
  3577. ;;
  3578. *)
  3579. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  3580. ;;
  3581. esac
  3582. # Is there a better lt_prog_compiler_static that works with the bundled CC?
  3583. _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  3584. ;;
  3585. irix5* | irix6* | nonstopux*)
  3586. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3587. # PIC (with -KPIC) is the default.
  3588. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3589. ;;
  3590. linux* | k*bsd*-gnu)
  3591. case $cc_basename in
  3592. # old Intel for x86_64 which still supported -KPIC.
  3593. ecc*)
  3594. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3595. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3596. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3597. ;;
  3598. # icc used to be incompatible with GCC.
  3599. # ICC 10 doesn't accept -KPIC any more.
  3600. icc* | ifort*)
  3601. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3602. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3603. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3604. ;;
  3605. # Lahey Fortran 8.1.
  3606. lf95*)
  3607. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3608. _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
  3609. _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
  3610. ;;
  3611. pgcc* | pgf77* | pgf90* | pgf95*)
  3612. # Portland Group compilers (*not* the Pentium gcc compiler,
  3613. # which looks to be a dead project)
  3614. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3615. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  3616. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3617. ;;
  3618. ccc*)
  3619. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3620. # All Alpha code is PIC.
  3621. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3622. ;;
  3623. xl*)
  3624. # IBM XL C 8.0/Fortran 10.1 on PPC
  3625. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3626. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  3627. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  3628. ;;
  3629. *)
  3630. case `$CC -V 2>&1 | sed 5q` in
  3631. *Sun\ C*)
  3632. # Sun C 5.9
  3633. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3634. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3635. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3636. ;;
  3637. *Sun\ F*)
  3638. # Sun Fortran 8.3 passes all unrecognized flags to the linker
  3639. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3640. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3641. _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
  3642. ;;
  3643. esac
  3644. ;;
  3645. esac
  3646. ;;
  3647. newsos6)
  3648. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3649. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3650. ;;
  3651. *nto* | *qnx*)
  3652. # QNX uses GNU C++, but need to define -shared option too, otherwise
  3653. # it will coredump.
  3654. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  3655. ;;
  3656. osf3* | osf4* | osf5*)
  3657. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3658. # All OSF/1 code is PIC.
  3659. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3660. ;;
  3661. rdos*)
  3662. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3663. ;;
  3664. solaris*)
  3665. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3666. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3667. case $cc_basename in
  3668. f77* | f90* | f95*)
  3669. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
  3670. *)
  3671. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
  3672. esac
  3673. ;;
  3674. sunos4*)
  3675. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  3676. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  3677. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3678. ;;
  3679. sysv4 | sysv4.2uw2* | sysv4.3*)
  3680. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3681. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3682. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3683. ;;
  3684. sysv4*MP*)
  3685. if test -d /usr/nec ;then
  3686. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
  3687. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3688. fi
  3689. ;;
  3690. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  3691. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3692. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3693. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3694. ;;
  3695. unicos*)
  3696. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3697. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  3698. ;;
  3699. uts4*)
  3700. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3701. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3702. ;;
  3703. *)
  3704. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  3705. ;;
  3706. esac
  3707. fi
  3708. ])
  3709. case $host_os in
  3710. # For platforms which do not support PIC, -DPIC is meaningless:
  3711. *djgpp*)
  3712. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3713. ;;
  3714. *)
  3715. _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
  3716. ;;
  3717. esac
  3718. AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
  3719. _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
  3720. [How to pass a linker flag through the compiler])
  3721. #
  3722. # Check to make sure the PIC flag actually works.
  3723. #
  3724. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  3725. _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
  3726. [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
  3727. [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
  3728. [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
  3729. "" | " "*) ;;
  3730. *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
  3731. esac],
  3732. [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3733. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
  3734. fi
  3735. _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
  3736. [Additional compiler flags for building library objects])
  3737. #
  3738. # Check to make sure the static flag actually works.
  3739. #
  3740. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
  3741. _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
  3742. _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
  3743. $lt_tmp_static_flag,
  3744. [],
  3745. [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
  3746. _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
  3747. [Compiler flag to prevent dynamic linking])
  3748. ])# _LT_COMPILER_PIC
  3749. # _LT_LINKER_SHLIBS([TAGNAME])
  3750. # ----------------------------
  3751. # See if the linker supports building shared libraries.
  3752. m4_defun([_LT_LINKER_SHLIBS],
  3753. [AC_REQUIRE([LT_PATH_LD])dnl
  3754. AC_REQUIRE([LT_PATH_NM])dnl
  3755. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  3756. m4_require([_LT_DECL_EGREP])dnl
  3757. m4_require([_LT_DECL_SED])dnl
  3758. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  3759. m4_require([_LT_TAG_COMPILER])dnl
  3760. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  3761. m4_if([$1], [CXX], [
  3762. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  3763. case $host_os in
  3764. aix[[4-9]]*)
  3765. # If we're using GNU nm, then we don't want the "-C" option.
  3766. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  3767. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  3768. _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'
  3769. else
  3770. _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'
  3771. fi
  3772. ;;
  3773. pw32*)
  3774. _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
  3775. ;;
  3776. cygwin* | mingw* | cegcc*)
  3777. _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'
  3778. ;;
  3779. *)
  3780. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  3781. ;;
  3782. esac
  3783. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  3784. ], [
  3785. runpath_var=
  3786. _LT_TAGVAR(allow_undefined_flag, $1)=
  3787. _LT_TAGVAR(always_export_symbols, $1)=no
  3788. _LT_TAGVAR(archive_cmds, $1)=
  3789. _LT_TAGVAR(archive_expsym_cmds, $1)=
  3790. _LT_TAGVAR(compiler_needs_object, $1)=no
  3791. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  3792. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  3793. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  3794. _LT_TAGVAR(hardcode_automatic, $1)=no
  3795. _LT_TAGVAR(hardcode_direct, $1)=no
  3796. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  3797. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  3798. _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  3799. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  3800. _LT_TAGVAR(hardcode_minus_L, $1)=no
  3801. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  3802. _LT_TAGVAR(inherit_rpath, $1)=no
  3803. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  3804. _LT_TAGVAR(module_cmds, $1)=
  3805. _LT_TAGVAR(module_expsym_cmds, $1)=
  3806. _LT_TAGVAR(old_archive_from_new_cmds, $1)=
  3807. _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
  3808. _LT_TAGVAR(thread_safe_flag_spec, $1)=
  3809. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  3810. # include_expsyms should be a list of space-separated symbols to be *always*
  3811. # included in the symbol list
  3812. _LT_TAGVAR(include_expsyms, $1)=
  3813. # exclude_expsyms can be an extended regexp of symbols to exclude
  3814. # it will be wrapped by ` (' and `)$', so one must not match beginning or
  3815. # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
  3816. # as well as any symbol that contains `d'.
  3817. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  3818. # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  3819. # platforms (ab)use it in PIC code, but their linkers get confused if
  3820. # the symbol is explicitly referenced. Since portable code cannot
  3821. # rely on this symbol name, it's probably fine to never include it in
  3822. # preloaded symbol tables.
  3823. # Exclude shared library initialization/finalization symbols.
  3824. dnl Note also adjust exclude_expsyms for C++ above.
  3825. extract_expsyms_cmds=
  3826. case $host_os in
  3827. cygwin* | mingw* | pw32* | cegcc*)
  3828. # FIXME: the MSVC++ port hasn't been tested in a loooong time
  3829. # When not using gcc, we currently assume that we are using
  3830. # Microsoft Visual C++.
  3831. if test "$GCC" != yes; then
  3832. with_gnu_ld=no
  3833. fi
  3834. ;;
  3835. interix*)
  3836. # we just hope/assume this is gcc and not c89 (= MSVC++)
  3837. with_gnu_ld=yes
  3838. ;;
  3839. openbsd*)
  3840. with_gnu_ld=no
  3841. ;;
  3842. esac
  3843. _LT_TAGVAR(ld_shlibs, $1)=yes
  3844. if test "$with_gnu_ld" = yes; then
  3845. # If archive_cmds runs LD, not CC, wlarc should be empty
  3846. wlarc='${wl}'
  3847. # Set some defaults for GNU ld with shared library support. These
  3848. # are reset later if shared libraries are not supported. Putting them
  3849. # here allows them to be overridden if necessary.
  3850. runpath_var=LD_RUN_PATH
  3851. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  3852. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  3853. # ancient GNU ld didn't support --whole-archive et. al.
  3854. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
  3855. _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  3856. else
  3857. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  3858. fi
  3859. supports_anon_versioning=no
  3860. case `$LD -v 2>&1` in
  3861. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
  3862. *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
  3863. *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
  3864. *\ 2.11.*) ;; # other 2.11 versions
  3865. *) supports_anon_versioning=yes ;;
  3866. esac
  3867. # See if GNU ld supports shared libraries.
  3868. case $host_os in
  3869. aix[[3-9]]*)
  3870. # On AIX/PPC, the GNU linker is very broken
  3871. if test "$host_cpu" != ia64; then
  3872. _LT_TAGVAR(ld_shlibs, $1)=no
  3873. cat <<_LT_EOF 1>&2
  3874. *** Warning: the GNU linker, at least up to release 2.9.1, is reported
  3875. *** to be unable to reliably create shared libraries on AIX.
  3876. *** Therefore, libtool is disabling shared libraries support. If you
  3877. *** really care for shared libraries, you may want to modify your PATH
  3878. *** so that a non-GNU linker is found, and then restart.
  3879. _LT_EOF
  3880. fi
  3881. ;;
  3882. amigaos*)
  3883. case $host_cpu in
  3884. powerpc)
  3885. # see comment about AmigaOS4 .so support
  3886. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  3887. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  3888. ;;
  3889. m68k)
  3890. _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)'
  3891. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  3892. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  3893. ;;
  3894. esac
  3895. ;;
  3896. beos*)
  3897. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  3898. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  3899. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  3900. # support --undefined. This deserves some investigation. FIXME
  3901. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  3902. else
  3903. _LT_TAGVAR(ld_shlibs, $1)=no
  3904. fi
  3905. ;;
  3906. cygwin* | mingw* | pw32* | cegcc*)
  3907. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  3908. # as there is no search path for DLLs.
  3909. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  3910. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  3911. _LT_TAGVAR(always_export_symbols, $1)=no
  3912. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  3913. _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'
  3914. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  3915. _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'
  3916. # If the export-symbols file already is a .def file (1st line
  3917. # is EXPORTS), use it as is; otherwise, prepend...
  3918. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  3919. cp $export_symbols $output_objdir/$soname.def;
  3920. else
  3921. echo EXPORTS > $output_objdir/$soname.def;
  3922. cat $export_symbols >> $output_objdir/$soname.def;
  3923. fi~
  3924. $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  3925. else
  3926. _LT_TAGVAR(ld_shlibs, $1)=no
  3927. fi
  3928. ;;
  3929. interix[[3-9]]*)
  3930. _LT_TAGVAR(hardcode_direct, $1)=no
  3931. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  3932. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  3933. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  3934. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  3935. # Instead, shared libraries are loaded at an image base (0x10000000 by
  3936. # default) and relocated if they conflict, which is a slow very memory
  3937. # consuming and fragmenting process. To avoid this, we pick a random,
  3938. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  3939. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  3940. _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'
  3941. _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'
  3942. ;;
  3943. gnu* | linux* | tpf* | k*bsd*-gnu)
  3944. tmp_diet=no
  3945. if test "$host_os" = linux-dietlibc; then
  3946. case $cc_basename in
  3947. diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
  3948. esac
  3949. fi
  3950. if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
  3951. && test "$tmp_diet" = no
  3952. then
  3953. tmp_addflag=
  3954. tmp_sharedflag='-shared'
  3955. case $cc_basename,$host_cpu in
  3956. pgcc*) # Portland Group C compiler
  3957. _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'
  3958. tmp_addflag=' $pic_flag'
  3959. ;;
  3960. pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
  3961. _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'
  3962. tmp_addflag=' $pic_flag -Mnomain' ;;
  3963. ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
  3964. tmp_addflag=' -i_dynamic' ;;
  3965. efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
  3966. tmp_addflag=' -i_dynamic -nofor_main' ;;
  3967. ifc* | ifort*) # Intel Fortran compiler
  3968. tmp_addflag=' -nofor_main' ;;
  3969. lf95*) # Lahey Fortran 8.1
  3970. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  3971. tmp_sharedflag='--shared' ;;
  3972. xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
  3973. tmp_sharedflag='-qmkshrobj'
  3974. tmp_addflag= ;;
  3975. esac
  3976. case `$CC -V 2>&1 | sed 5q` in
  3977. *Sun\ C*) # Sun C 5.9
  3978. _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'
  3979. _LT_TAGVAR(compiler_needs_object, $1)=yes
  3980. tmp_sharedflag='-G' ;;
  3981. *Sun\ F*) # Sun Fortran 8.3
  3982. tmp_sharedflag='-G' ;;
  3983. esac
  3984. _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  3985. if test "x$supports_anon_versioning" = xyes; then
  3986. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  3987. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  3988. echo "local: *; };" >> $output_objdir/$libname.ver~
  3989. $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  3990. fi
  3991. case $cc_basename in
  3992. xlf*)
  3993. # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
  3994. _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
  3995. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  3996. _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
  3997. _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
  3998. if test "x$supports_anon_versioning" = xyes; then
  3999. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  4000. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4001. echo "local: *; };" >> $output_objdir/$libname.ver~
  4002. $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
  4003. fi
  4004. ;;
  4005. esac
  4006. else
  4007. _LT_TAGVAR(ld_shlibs, $1)=no
  4008. fi
  4009. ;;
  4010. netbsd*)
  4011. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  4012. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  4013. wlarc=
  4014. else
  4015. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4016. _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'
  4017. fi
  4018. ;;
  4019. solaris*)
  4020. if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
  4021. _LT_TAGVAR(ld_shlibs, $1)=no
  4022. cat <<_LT_EOF 1>&2
  4023. *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  4024. *** create shared libraries on Solaris systems. Therefore, libtool
  4025. *** is disabling shared libraries support. We urge you to upgrade GNU
  4026. *** binutils to release 2.9.1 or newer. Another option is to modify
  4027. *** your PATH or compiler configuration so that the native linker is
  4028. *** used, and then restart.
  4029. _LT_EOF
  4030. elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4031. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4032. _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'
  4033. else
  4034. _LT_TAGVAR(ld_shlibs, $1)=no
  4035. fi
  4036. ;;
  4037. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
  4038. case `$LD -v 2>&1` in
  4039. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
  4040. _LT_TAGVAR(ld_shlibs, $1)=no
  4041. cat <<_LT_EOF 1>&2
  4042. *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
  4043. *** reliably create shared libraries on SCO systems. Therefore, libtool
  4044. *** is disabling shared libraries support. We urge you to upgrade GNU
  4045. *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
  4046. *** your PATH or compiler configuration so that the native linker is
  4047. *** used, and then restart.
  4048. _LT_EOF
  4049. ;;
  4050. *)
  4051. # For security reasons, it is highly recommended that you always
  4052. # use absolute paths for naming shared libraries, and exclude the
  4053. # DT_RUNPATH tag from executables and libraries. But doing so
  4054. # requires that you compile everything twice, which is a pain.
  4055. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4056. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4057. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4058. _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'
  4059. else
  4060. _LT_TAGVAR(ld_shlibs, $1)=no
  4061. fi
  4062. ;;
  4063. esac
  4064. ;;
  4065. sunos4*)
  4066. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4067. wlarc=
  4068. _LT_TAGVAR(hardcode_direct, $1)=yes
  4069. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4070. ;;
  4071. *)
  4072. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4073. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4074. _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'
  4075. else
  4076. _LT_TAGVAR(ld_shlibs, $1)=no
  4077. fi
  4078. ;;
  4079. esac
  4080. if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
  4081. runpath_var=
  4082. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4083. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  4084. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4085. fi
  4086. else
  4087. # PORTME fill in a description of your system's linker (not GNU ld)
  4088. case $host_os in
  4089. aix3*)
  4090. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4091. _LT_TAGVAR(always_export_symbols, $1)=yes
  4092. _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'
  4093. # Note: this linker hardcodes the directories in LIBPATH if there
  4094. # are no directories specified by -L.
  4095. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4096. if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
  4097. # Neither direct hardcoding nor static linking is supported with a
  4098. # broken collect2.
  4099. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  4100. fi
  4101. ;;
  4102. aix[[4-9]]*)
  4103. if test "$host_cpu" = ia64; then
  4104. # On IA64, the linker does run time linking by default, so we don't
  4105. # have to do anything special.
  4106. aix_use_runtimelinking=no
  4107. exp_sym_flag='-Bexport'
  4108. no_entry_flag=""
  4109. else
  4110. # If we're using GNU nm, then we don't want the "-C" option.
  4111. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  4112. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  4113. _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'
  4114. else
  4115. _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'
  4116. fi
  4117. aix_use_runtimelinking=no
  4118. # Test if we are trying to use run time linking or normal
  4119. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  4120. # need to do runtime linking.
  4121. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  4122. for ld_flag in $LDFLAGS; do
  4123. if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
  4124. aix_use_runtimelinking=yes
  4125. break
  4126. fi
  4127. done
  4128. ;;
  4129. esac
  4130. exp_sym_flag='-bexport'
  4131. no_entry_flag='-bnoentry'
  4132. fi
  4133. # When large executables or shared objects are built, AIX ld can
  4134. # have problems creating the table of contents. If linking a library
  4135. # or program results in "error TOC overflow" add -mminimal-toc to
  4136. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  4137. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  4138. _LT_TAGVAR(archive_cmds, $1)=''
  4139. _LT_TAGVAR(hardcode_direct, $1)=yes
  4140. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4141. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  4142. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4143. _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
  4144. if test "$GCC" = yes; then
  4145. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  4146. # We only want to do this on AIX 4.2 and lower, the check
  4147. # below for broken collect2 doesn't work under 4.3+
  4148. collect2name=`${CC} -print-prog-name=collect2`
  4149. if test -f "$collect2name" &&
  4150. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  4151. then
  4152. # We have reworked collect2
  4153. :
  4154. else
  4155. # We have old collect2
  4156. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  4157. # It fails to find uninstalled libraries when the uninstalled
  4158. # path is not listed in the libpath. Setting hardcode_minus_L
  4159. # to unsupported forces relinking
  4160. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4161. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4162. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  4163. fi
  4164. ;;
  4165. esac
  4166. shared_flag='-shared'
  4167. if test "$aix_use_runtimelinking" = yes; then
  4168. shared_flag="$shared_flag "'${wl}-G'
  4169. fi
  4170. else
  4171. # not using gcc
  4172. if test "$host_cpu" = ia64; then
  4173. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  4174. # chokes on -Wl,-G. The following line is correct:
  4175. shared_flag='-G'
  4176. else
  4177. if test "$aix_use_runtimelinking" = yes; then
  4178. shared_flag='${wl}-G'
  4179. else
  4180. shared_flag='${wl}-bM:SRE'
  4181. fi
  4182. fi
  4183. fi
  4184. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
  4185. # It seems that -bexpall does not export symbols beginning with
  4186. # underscore (_), so it is better to generate a list of symbols to export.
  4187. _LT_TAGVAR(always_export_symbols, $1)=yes
  4188. if test "$aix_use_runtimelinking" = yes; then
  4189. # Warning - without using the other runtime loading flags (-brtl),
  4190. # -berok will link without error, but may produce a broken library.
  4191. _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
  4192. # Determine the default libpath from the value encoded in an
  4193. # empty executable.
  4194. _LT_SYS_MODULE_PATH_AIX
  4195. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  4196. _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"
  4197. else
  4198. if test "$host_cpu" = ia64; then
  4199. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  4200. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  4201. _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"
  4202. else
  4203. # Determine the default libpath from the value encoded in an
  4204. # empty executable.
  4205. _LT_SYS_MODULE_PATH_AIX
  4206. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  4207. # Warning - without using the other run time loading flags,
  4208. # -berok will link without error, but may produce a broken library.
  4209. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  4210. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  4211. # Exported symbols can be pulled into shared objects from archives
  4212. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  4213. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  4214. # This is similar to how AIX traditionally builds its shared libraries.
  4215. _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'
  4216. fi
  4217. fi
  4218. ;;
  4219. amigaos*)
  4220. case $host_cpu in
  4221. powerpc)
  4222. # see comment about AmigaOS4 .so support
  4223. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4224. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  4225. ;;
  4226. m68k)
  4227. _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)'
  4228. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4229. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4230. ;;
  4231. esac
  4232. ;;
  4233. bsdi[[45]]*)
  4234. _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
  4235. ;;
  4236. cygwin* | mingw* | pw32* | cegcc*)
  4237. # When not using gcc, we currently assume that we are using
  4238. # Microsoft Visual C++.
  4239. # hardcode_libdir_flag_spec is actually meaningless, as there is
  4240. # no search path for DLLs.
  4241. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  4242. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4243. # Tell ltmain to make .lib files, not .a files.
  4244. libext=lib
  4245. # Tell ltmain to make .dll files, not .so files.
  4246. shrext_cmds=".dll"
  4247. # FIXME: Setting linknames here is a bad hack.
  4248. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
  4249. # The linker will automatically build a .lib file if we build a DLL.
  4250. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  4251. # FIXME: Should let the user specify the lib program.
  4252. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
  4253. _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
  4254. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4255. ;;
  4256. darwin* | rhapsody*)
  4257. _LT_DARWIN_LINKER_FEATURES($1)
  4258. ;;
  4259. dgux*)
  4260. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  4261. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4262. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4263. ;;
  4264. freebsd1*)
  4265. _LT_TAGVAR(ld_shlibs, $1)=no
  4266. ;;
  4267. # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  4268. # support. Future versions do this automatically, but an explicit c++rt0.o
  4269. # does not break anything, and helps significantly (at the cost of a little
  4270. # extra space).
  4271. freebsd2.2*)
  4272. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
  4273. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4274. _LT_TAGVAR(hardcode_direct, $1)=yes
  4275. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4276. ;;
  4277. # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  4278. freebsd2*)
  4279. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4280. _LT_TAGVAR(hardcode_direct, $1)=yes
  4281. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4282. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4283. ;;
  4284. # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  4285. freebsd* | dragonfly*)
  4286. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
  4287. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4288. _LT_TAGVAR(hardcode_direct, $1)=yes
  4289. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4290. ;;
  4291. hpux9*)
  4292. if test "$GCC" = yes; then
  4293. _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'
  4294. else
  4295. _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'
  4296. fi
  4297. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  4298. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4299. _LT_TAGVAR(hardcode_direct, $1)=yes
  4300. # hardcode_minus_L: Not really in the search PATH,
  4301. # but as the default location of the library.
  4302. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4303. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4304. ;;
  4305. hpux10*)
  4306. if test "$GCC" = yes -a "$with_gnu_ld" = no; then
  4307. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  4308. else
  4309. _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
  4310. fi
  4311. if test "$with_gnu_ld" = no; then
  4312. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  4313. _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
  4314. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4315. _LT_TAGVAR(hardcode_direct, $1)=yes
  4316. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4317. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4318. # hardcode_minus_L: Not really in the search PATH,
  4319. # but as the default location of the library.
  4320. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4321. fi
  4322. ;;
  4323. hpux11*)
  4324. if test "$GCC" = yes -a "$with_gnu_ld" = no; then
  4325. case $host_cpu in
  4326. hppa*64*)
  4327. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  4328. ;;
  4329. ia64*)
  4330. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  4331. ;;
  4332. *)
  4333. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  4334. ;;
  4335. esac
  4336. else
  4337. case $host_cpu in
  4338. hppa*64*)
  4339. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  4340. ;;
  4341. ia64*)
  4342. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  4343. ;;
  4344. *)
  4345. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  4346. ;;
  4347. esac
  4348. fi
  4349. if test "$with_gnu_ld" = no; then
  4350. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  4351. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4352. case $host_cpu in
  4353. hppa*64*|ia64*)
  4354. _LT_TAGVAR(hardcode_direct, $1)=no
  4355. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4356. ;;
  4357. *)
  4358. _LT_TAGVAR(hardcode_direct, $1)=yes
  4359. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4360. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4361. # hardcode_minus_L: Not really in the search PATH,
  4362. # but as the default location of the library.
  4363. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4364. ;;
  4365. esac
  4366. fi
  4367. ;;
  4368. irix5* | irix6* | nonstopux*)
  4369. if test "$GCC" = yes; then
  4370. _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'
  4371. # Try to use the -exported_symbol ld option, if it does not
  4372. # work, assume that -exports_file does not work either and
  4373. # implicitly export all symbols.
  4374. save_LDFLAGS="$LDFLAGS"
  4375. LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
  4376. AC_LINK_IFELSE(int foo(void) {},
  4377. _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'
  4378. )
  4379. LDFLAGS="$save_LDFLAGS"
  4380. else
  4381. _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'
  4382. _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'
  4383. fi
  4384. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  4385. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4386. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4387. _LT_TAGVAR(inherit_rpath, $1)=yes
  4388. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4389. ;;
  4390. netbsd*)
  4391. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  4392. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
  4393. else
  4394. _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
  4395. fi
  4396. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4397. _LT_TAGVAR(hardcode_direct, $1)=yes
  4398. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4399. ;;
  4400. newsos6)
  4401. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  4402. _LT_TAGVAR(hardcode_direct, $1)=yes
  4403. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4404. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4405. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4406. ;;
  4407. *nto* | *qnx*)
  4408. ;;
  4409. openbsd*)
  4410. if test -f /usr/libexec/ld.so; then
  4411. _LT_TAGVAR(hardcode_direct, $1)=yes
  4412. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4413. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4414. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  4415. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  4416. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
  4417. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  4418. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4419. else
  4420. case $host_os in
  4421. openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
  4422. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4423. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4424. ;;
  4425. *)
  4426. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  4427. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  4428. ;;
  4429. esac
  4430. fi
  4431. else
  4432. _LT_TAGVAR(ld_shlibs, $1)=no
  4433. fi
  4434. ;;
  4435. os2*)
  4436. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4437. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4438. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4439. _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'
  4440. _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
  4441. ;;
  4442. osf3*)
  4443. if test "$GCC" = yes; then
  4444. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  4445. _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'
  4446. else
  4447. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  4448. _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'
  4449. fi
  4450. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  4451. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4452. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4453. ;;
  4454. osf4* | osf5*) # as osf3* with the addition of -msym flag
  4455. if test "$GCC" = yes; then
  4456. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  4457. _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'
  4458. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4459. else
  4460. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  4461. _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'
  4462. _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~
  4463. $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'
  4464. # Both c and cxx compiler support -rpath directly
  4465. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  4466. fi
  4467. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  4468. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4469. ;;
  4470. solaris*)
  4471. _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
  4472. if test "$GCC" = yes; then
  4473. wlarc='${wl}'
  4474. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  4475. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  4476. $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
  4477. else
  4478. case `$CC -V 2>&1` in
  4479. *"Compilers 5.0"*)
  4480. wlarc=''
  4481. _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
  4482. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  4483. $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
  4484. ;;
  4485. *)
  4486. wlarc='${wl}'
  4487. _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
  4488. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  4489. $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
  4490. ;;
  4491. esac
  4492. fi
  4493. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4494. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4495. case $host_os in
  4496. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  4497. *)
  4498. # The compiler driver will combine and reorder linker options,
  4499. # but understands `-z linker_flag'. GCC discards it without `$wl',
  4500. # but is careful enough not to reorder.
  4501. # Supported since Solaris 2.6 (maybe 2.5.1?)
  4502. if test "$GCC" = yes; then
  4503. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
  4504. else
  4505. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  4506. fi
  4507. ;;
  4508. esac
  4509. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4510. ;;
  4511. sunos4*)
  4512. if test "x$host_vendor" = xsequent; then
  4513. # Use $CC to link under sequent, because it throws in some extra .o
  4514. # files that make .init and .fini sections work.
  4515. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
  4516. else
  4517. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
  4518. fi
  4519. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4520. _LT_TAGVAR(hardcode_direct, $1)=yes
  4521. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4522. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4523. ;;
  4524. sysv4)
  4525. case $host_vendor in
  4526. sni)
  4527. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  4528. _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
  4529. ;;
  4530. siemens)
  4531. ## LD is ld it makes a PLAMLIB
  4532. ## CC just makes a GrossModule.
  4533. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  4534. _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
  4535. _LT_TAGVAR(hardcode_direct, $1)=no
  4536. ;;
  4537. motorola)
  4538. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  4539. _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
  4540. ;;
  4541. esac
  4542. runpath_var='LD_RUN_PATH'
  4543. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4544. ;;
  4545. sysv4.3*)
  4546. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  4547. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4548. _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
  4549. ;;
  4550. sysv4*MP*)
  4551. if test -d /usr/nec; then
  4552. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  4553. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4554. runpath_var=LD_RUN_PATH
  4555. hardcode_runpath_var=yes
  4556. _LT_TAGVAR(ld_shlibs, $1)=yes
  4557. fi
  4558. ;;
  4559. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  4560. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  4561. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  4562. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4563. runpath_var='LD_RUN_PATH'
  4564. if test "$GCC" = yes; then
  4565. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  4566. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  4567. else
  4568. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  4569. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  4570. fi
  4571. ;;
  4572. sysv5* | sco3.2v5* | sco5v6*)
  4573. # Note: We can NOT use -z defs as we might desire, because we do not
  4574. # link with -lc, and that would cause any symbols used from libc to
  4575. # always be unresolved, which means just about no library would
  4576. # ever link correctly. If we're not using GNU ld we use -z text
  4577. # though, which does catch some bad symbols but isn't as heavy-handed
  4578. # as -z defs.
  4579. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  4580. _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
  4581. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  4582. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4583. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
  4584. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  4585. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4586. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  4587. runpath_var='LD_RUN_PATH'
  4588. if test "$GCC" = yes; then
  4589. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  4590. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  4591. else
  4592. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  4593. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  4594. fi
  4595. ;;
  4596. uts4*)
  4597. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  4598. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4599. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4600. ;;
  4601. *)
  4602. _LT_TAGVAR(ld_shlibs, $1)=no
  4603. ;;
  4604. esac
  4605. if test x$host_vendor = xsni; then
  4606. case $host in
  4607. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  4608. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
  4609. ;;
  4610. esac
  4611. fi
  4612. fi
  4613. ])
  4614. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  4615. test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  4616. _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
  4617. _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
  4618. _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
  4619. _LT_DECL([], [extract_expsyms_cmds], [2],
  4620. [The commands to extract the exported symbol list from a shared archive])
  4621. #
  4622. # Do we need to explicitly link libc?
  4623. #
  4624. case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
  4625. x|xyes)
  4626. # Assume -lc should be added
  4627. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  4628. if test "$enable_shared" = yes && test "$GCC" = yes; then
  4629. case $_LT_TAGVAR(archive_cmds, $1) in
  4630. *'~'*)
  4631. # FIXME: we may have to deal with multi-command sequences.
  4632. ;;
  4633. '$CC '*)
  4634. # Test whether the compiler implicitly links with -lc since on some
  4635. # systems, -lgcc has to come before -lc. If gcc already passes -lc
  4636. # to ld, don't add -lc before -lgcc.
  4637. AC_MSG_CHECKING([whether -lc should be explicitly linked in])
  4638. $RM conftest*
  4639. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  4640. if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
  4641. soname=conftest
  4642. lib=conftest
  4643. libobjs=conftest.$ac_objext
  4644. deplibs=
  4645. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
  4646. pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
  4647. compiler_flags=-v
  4648. linker_flags=-v
  4649. verstring=
  4650. output_objdir=.
  4651. libname=conftest
  4652. lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
  4653. _LT_TAGVAR(allow_undefined_flag, $1)=
  4654. if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
  4655. then
  4656. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  4657. else
  4658. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  4659. fi
  4660. _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
  4661. else
  4662. cat conftest.err 1>&5
  4663. fi
  4664. $RM conftest*
  4665. AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
  4666. ;;
  4667. esac
  4668. fi
  4669. ;;
  4670. esac
  4671. _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
  4672. [Whether or not to add -lc for building shared libraries])
  4673. _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
  4674. [enable_shared_with_static_runtimes], [0],
  4675. [Whether or not to disallow shared libs when runtime libs are static])
  4676. _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
  4677. [Compiler flag to allow reflexive dlopens])
  4678. _LT_TAGDECL([], [whole_archive_flag_spec], [1],
  4679. [Compiler flag to generate shared objects directly from archives])
  4680. _LT_TAGDECL([], [compiler_needs_object], [1],
  4681. [Whether the compiler copes with passing no objects directly])
  4682. _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
  4683. [Create an old-style archive from a shared archive])
  4684. _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
  4685. [Create a temporary old-style archive to link instead of a shared archive])
  4686. _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
  4687. _LT_TAGDECL([], [archive_expsym_cmds], [2])
  4688. _LT_TAGDECL([], [module_cmds], [2],
  4689. [Commands used to build a loadable module if different from building
  4690. a shared archive.])
  4691. _LT_TAGDECL([], [module_expsym_cmds], [2])
  4692. _LT_TAGDECL([], [with_gnu_ld], [1],
  4693. [Whether we are building with GNU ld or not])
  4694. _LT_TAGDECL([], [allow_undefined_flag], [1],
  4695. [Flag that allows shared libraries with undefined symbols to be built])
  4696. _LT_TAGDECL([], [no_undefined_flag], [1],
  4697. [Flag that enforces no undefined symbols])
  4698. _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
  4699. [Flag to hardcode $libdir into a binary during linking.
  4700. This must work even if $libdir does not exist])
  4701. _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
  4702. [[If ld is used when linking, flag to hardcode $libdir into a binary
  4703. during linking. This must work even if $libdir does not exist]])
  4704. _LT_TAGDECL([], [hardcode_libdir_separator], [1],
  4705. [Whether we need a single "-rpath" flag with a separated argument])
  4706. _LT_TAGDECL([], [hardcode_direct], [0],
  4707. [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
  4708. DIR into the resulting binary])
  4709. _LT_TAGDECL([], [hardcode_direct_absolute], [0],
  4710. [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
  4711. DIR into the resulting binary and the resulting library dependency is
  4712. "absolute", i.e impossible to change by setting ${shlibpath_var} if the
  4713. library is relocated])
  4714. _LT_TAGDECL([], [hardcode_minus_L], [0],
  4715. [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
  4716. into the resulting binary])
  4717. _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
  4718. [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
  4719. into the resulting binary])
  4720. _LT_TAGDECL([], [hardcode_automatic], [0],
  4721. [Set to "yes" if building a shared library automatically hardcodes DIR
  4722. into the library and all subsequent libraries and executables linked
  4723. against it])
  4724. _LT_TAGDECL([], [inherit_rpath], [0],
  4725. [Set to yes if linker adds runtime paths of dependent libraries
  4726. to runtime path list])
  4727. _LT_TAGDECL([], [link_all_deplibs], [0],
  4728. [Whether libtool must link a program against all its dependency libraries])
  4729. _LT_TAGDECL([], [fix_srcfile_path], [1],
  4730. [Fix the shell variable $srcfile for the compiler])
  4731. _LT_TAGDECL([], [always_export_symbols], [0],
  4732. [Set to "yes" if exported symbols are required])
  4733. _LT_TAGDECL([], [export_symbols_cmds], [2],
  4734. [The commands to list exported symbols])
  4735. _LT_TAGDECL([], [exclude_expsyms], [1],
  4736. [Symbols that should not be listed in the preloaded symbols])
  4737. _LT_TAGDECL([], [include_expsyms], [1],
  4738. [Symbols that must always be exported])
  4739. _LT_TAGDECL([], [prelink_cmds], [2],
  4740. [Commands necessary for linking programs (against libraries) with templates])
  4741. _LT_TAGDECL([], [file_list_spec], [1],
  4742. [Specify filename containing input files])
  4743. dnl FIXME: Not yet implemented
  4744. dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
  4745. dnl [Compiler flag to generate thread safe objects])
  4746. ])# _LT_LINKER_SHLIBS
  4747. # _LT_LANG_C_CONFIG([TAG])
  4748. # ------------------------
  4749. # Ensure that the configuration variables for a C compiler are suitably
  4750. # defined. These variables are subsequently used by _LT_CONFIG to write
  4751. # the compiler configuration to `libtool'.
  4752. m4_defun([_LT_LANG_C_CONFIG],
  4753. [m4_require([_LT_DECL_EGREP])dnl
  4754. lt_save_CC="$CC"
  4755. AC_LANG_PUSH(C)
  4756. # Source file extension for C test sources.
  4757. ac_ext=c
  4758. # Object file extension for compiled C test sources.
  4759. objext=o
  4760. _LT_TAGVAR(objext, $1)=$objext
  4761. # Code to be used in simple compile tests
  4762. lt_simple_compile_test_code="int some_variable = 0;"
  4763. # Code to be used in simple link tests
  4764. lt_simple_link_test_code='int main(){return(0);}'
  4765. _LT_TAG_COMPILER
  4766. # Save the default compiler, since it gets overwritten when the other
  4767. # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
  4768. compiler_DEFAULT=$CC
  4769. # save warnings/boilerplate of simple test code
  4770. _LT_COMPILER_BOILERPLATE
  4771. _LT_LINKER_BOILERPLATE
  4772. ## CAVEAT EMPTOR:
  4773. ## There is no encapsulation within the following macros, do not change
  4774. ## the running order or otherwise move them around unless you know exactly
  4775. ## what you are doing...
  4776. if test -n "$compiler"; then
  4777. _LT_COMPILER_NO_RTTI($1)
  4778. _LT_COMPILER_PIC($1)
  4779. _LT_COMPILER_C_O($1)
  4780. _LT_COMPILER_FILE_LOCKS($1)
  4781. _LT_LINKER_SHLIBS($1)
  4782. _LT_SYS_DYNAMIC_LINKER($1)
  4783. _LT_LINKER_HARDCODE_LIBPATH($1)
  4784. LT_SYS_DLOPEN_SELF
  4785. _LT_CMD_STRIPLIB
  4786. # Report which library types will actually be built
  4787. AC_MSG_CHECKING([if libtool supports shared libraries])
  4788. AC_MSG_RESULT([$can_build_shared])
  4789. AC_MSG_CHECKING([whether to build shared libraries])
  4790. test "$can_build_shared" = "no" && enable_shared=no
  4791. # On AIX, shared libraries and static libraries use the same namespace, and
  4792. # are all built from PIC.
  4793. case $host_os in
  4794. aix3*)
  4795. test "$enable_shared" = yes && enable_static=no
  4796. if test -n "$RANLIB"; then
  4797. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  4798. postinstall_cmds='$RANLIB $lib'
  4799. fi
  4800. ;;
  4801. aix[[4-9]]*)
  4802. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  4803. test "$enable_shared" = yes && enable_static=no
  4804. fi
  4805. ;;
  4806. esac
  4807. AC_MSG_RESULT([$enable_shared])
  4808. AC_MSG_CHECKING([whether to build static libraries])
  4809. # Make sure either enable_shared or enable_static is yes.
  4810. test "$enable_shared" = yes || enable_static=yes
  4811. AC_MSG_RESULT([$enable_static])
  4812. _LT_CONFIG($1)
  4813. fi
  4814. AC_LANG_POP
  4815. CC="$lt_save_CC"
  4816. ])# _LT_LANG_C_CONFIG
  4817. # _LT_PROG_CXX
  4818. # ------------
  4819. # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
  4820. # compiler, we have our own version here.
  4821. m4_defun([_LT_PROG_CXX],
  4822. [
  4823. pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
  4824. AC_PROG_CXX
  4825. if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
  4826. ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
  4827. (test "X$CXX" != "Xg++"))) ; then
  4828. AC_PROG_CXXCPP
  4829. else
  4830. _lt_caught_CXX_error=yes
  4831. fi
  4832. popdef([AC_MSG_ERROR])
  4833. ])# _LT_PROG_CXX
  4834. dnl aclocal-1.4 backwards compatibility:
  4835. dnl AC_DEFUN([_LT_PROG_CXX], [])
  4836. # _LT_LANG_CXX_CONFIG([TAG])
  4837. # --------------------------
  4838. # Ensure that the configuration variables for a C++ compiler are suitably
  4839. # defined. These variables are subsequently used by _LT_CONFIG to write
  4840. # the compiler configuration to `libtool'.
  4841. m4_defun([_LT_LANG_CXX_CONFIG],
  4842. [AC_REQUIRE([_LT_PROG_CXX])dnl
  4843. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  4844. m4_require([_LT_DECL_EGREP])dnl
  4845. AC_LANG_PUSH(C++)
  4846. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  4847. _LT_TAGVAR(allow_undefined_flag, $1)=
  4848. _LT_TAGVAR(always_export_symbols, $1)=no
  4849. _LT_TAGVAR(archive_expsym_cmds, $1)=
  4850. _LT_TAGVAR(compiler_needs_object, $1)=no
  4851. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  4852. _LT_TAGVAR(hardcode_direct, $1)=no
  4853. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  4854. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4855. _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  4856. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  4857. _LT_TAGVAR(hardcode_minus_L, $1)=no
  4858. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  4859. _LT_TAGVAR(hardcode_automatic, $1)=no
  4860. _LT_TAGVAR(inherit_rpath, $1)=no
  4861. _LT_TAGVAR(module_cmds, $1)=
  4862. _LT_TAGVAR(module_expsym_cmds, $1)=
  4863. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  4864. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  4865. _LT_TAGVAR(no_undefined_flag, $1)=
  4866. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4867. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  4868. # Source file extension for C++ test sources.
  4869. ac_ext=cpp
  4870. # Object file extension for compiled C++ test sources.
  4871. objext=o
  4872. _LT_TAGVAR(objext, $1)=$objext
  4873. # No sense in running all these tests if we already determined that
  4874. # the CXX compiler isn't working. Some variables (like enable_shared)
  4875. # are currently assumed to apply to all compilers on this platform,
  4876. # and will be corrupted by setting them based on a non-working compiler.
  4877. if test "$_lt_caught_CXX_error" != yes; then
  4878. # Code to be used in simple compile tests
  4879. lt_simple_compile_test_code="int some_variable = 0;"
  4880. # Code to be used in simple link tests
  4881. lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
  4882. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  4883. _LT_TAG_COMPILER
  4884. # save warnings/boilerplate of simple test code
  4885. _LT_COMPILER_BOILERPLATE
  4886. _LT_LINKER_BOILERPLATE
  4887. # Allow CC to be a program name with arguments.
  4888. lt_save_CC=$CC
  4889. lt_save_LD=$LD
  4890. lt_save_GCC=$GCC
  4891. GCC=$GXX
  4892. lt_save_with_gnu_ld=$with_gnu_ld
  4893. lt_save_path_LD=$lt_cv_path_LD
  4894. if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
  4895. lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
  4896. else
  4897. $as_unset lt_cv_prog_gnu_ld
  4898. fi
  4899. if test -n "${lt_cv_path_LDCXX+set}"; then
  4900. lt_cv_path_LD=$lt_cv_path_LDCXX
  4901. else
  4902. $as_unset lt_cv_path_LD
  4903. fi
  4904. test -z "${LDCXX+set}" || LD=$LDCXX
  4905. CC=${CXX-"c++"}
  4906. compiler=$CC
  4907. _LT_TAGVAR(compiler, $1)=$CC
  4908. _LT_CC_BASENAME([$compiler])
  4909. if test -n "$compiler"; then
  4910. # We don't want -fno-exception when compiling C++ code, so set the
  4911. # no_builtin_flag separately
  4912. if test "$GXX" = yes; then
  4913. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  4914. else
  4915. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  4916. fi
  4917. if test "$GXX" = yes; then
  4918. # Set up default GNU C++ configuration
  4919. LT_PATH_LD
  4920. # Check if GNU C++ uses GNU ld as the underlying linker, since the
  4921. # archiving commands below assume that GNU ld is being used.
  4922. if test "$with_gnu_ld" = yes; then
  4923. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4924. _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'
  4925. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4926. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  4927. # If archive_cmds runs LD, not CC, wlarc should be empty
  4928. # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
  4929. # investigate it a little bit more. (MM)
  4930. wlarc='${wl}'
  4931. # ancient GNU ld didn't support --whole-archive et. al.
  4932. if eval "`$CC -print-prog-name=ld` --help 2>&1" |
  4933. $GREP 'no-whole-archive' > /dev/null; then
  4934. _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  4935. else
  4936. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4937. fi
  4938. else
  4939. with_gnu_ld=no
  4940. wlarc=
  4941. # A generic and very simple default shared library creation
  4942. # command for GNU C++ for the case where it uses the native
  4943. # linker, instead of GNU ld. If possible, this setting should
  4944. # overridden to take advantage of the native linker features on
  4945. # the platform it is being used on.
  4946. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  4947. fi
  4948. # Commands to make compiler produce verbose output that lists
  4949. # what "hidden" libraries, object files and flags are used when
  4950. # linking a shared library.
  4951. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
  4952. else
  4953. GXX=no
  4954. with_gnu_ld=no
  4955. wlarc=
  4956. fi
  4957. # PORTME: fill in a description of your system's C++ link characteristics
  4958. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  4959. _LT_TAGVAR(ld_shlibs, $1)=yes
  4960. case $host_os in
  4961. aix3*)
  4962. # FIXME: insert proper C++ library support
  4963. _LT_TAGVAR(ld_shlibs, $1)=no
  4964. ;;
  4965. aix[[4-9]]*)
  4966. if test "$host_cpu" = ia64; then
  4967. # On IA64, the linker does run time linking by default, so we don't
  4968. # have to do anything special.
  4969. aix_use_runtimelinking=no
  4970. exp_sym_flag='-Bexport'
  4971. no_entry_flag=""
  4972. else
  4973. aix_use_runtimelinking=no
  4974. # Test if we are trying to use run time linking or normal
  4975. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  4976. # need to do runtime linking.
  4977. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  4978. for ld_flag in $LDFLAGS; do
  4979. case $ld_flag in
  4980. *-brtl*)
  4981. aix_use_runtimelinking=yes
  4982. break
  4983. ;;
  4984. esac
  4985. done
  4986. ;;
  4987. esac
  4988. exp_sym_flag='-bexport'
  4989. no_entry_flag='-bnoentry'
  4990. fi
  4991. # When large executables or shared objects are built, AIX ld can
  4992. # have problems creating the table of contents. If linking a library
  4993. # or program results in "error TOC overflow" add -mminimal-toc to
  4994. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  4995. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  4996. _LT_TAGVAR(archive_cmds, $1)=''
  4997. _LT_TAGVAR(hardcode_direct, $1)=yes
  4998. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4999. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5000. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5001. _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
  5002. if test "$GXX" = yes; then
  5003. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  5004. # We only want to do this on AIX 4.2 and lower, the check
  5005. # below for broken collect2 doesn't work under 4.3+
  5006. collect2name=`${CC} -print-prog-name=collect2`
  5007. if test -f "$collect2name" &&
  5008. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  5009. then
  5010. # We have reworked collect2
  5011. :
  5012. else
  5013. # We have old collect2
  5014. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  5015. # It fails to find uninstalled libraries when the uninstalled
  5016. # path is not listed in the libpath. Setting hardcode_minus_L
  5017. # to unsupported forces relinking
  5018. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5019. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5020. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5021. fi
  5022. esac
  5023. shared_flag='-shared'
  5024. if test "$aix_use_runtimelinking" = yes; then
  5025. shared_flag="$shared_flag "'${wl}-G'
  5026. fi
  5027. else
  5028. # not using gcc
  5029. if test "$host_cpu" = ia64; then
  5030. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  5031. # chokes on -Wl,-G. The following line is correct:
  5032. shared_flag='-G'
  5033. else
  5034. if test "$aix_use_runtimelinking" = yes; then
  5035. shared_flag='${wl}-G'
  5036. else
  5037. shared_flag='${wl}-bM:SRE'
  5038. fi
  5039. fi
  5040. fi
  5041. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
  5042. # It seems that -bexpall does not export symbols beginning with
  5043. # underscore (_), so it is better to generate a list of symbols to
  5044. # export.
  5045. _LT_TAGVAR(always_export_symbols, $1)=yes
  5046. if test "$aix_use_runtimelinking" = yes; then
  5047. # Warning - without using the other runtime loading flags (-brtl),
  5048. # -berok will link without error, but may produce a broken library.
  5049. _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
  5050. # Determine the default libpath from the value encoded in an empty
  5051. # executable.
  5052. _LT_SYS_MODULE_PATH_AIX
  5053. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  5054. _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"
  5055. else
  5056. if test "$host_cpu" = ia64; then
  5057. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  5058. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  5059. _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"
  5060. else
  5061. # Determine the default libpath from the value encoded in an
  5062. # empty executable.
  5063. _LT_SYS_MODULE_PATH_AIX
  5064. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  5065. # Warning - without using the other run time loading flags,
  5066. # -berok will link without error, but may produce a broken library.
  5067. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  5068. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  5069. # Exported symbols can be pulled into shared objects from archives
  5070. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  5071. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5072. # This is similar to how AIX traditionally builds its shared
  5073. # libraries.
  5074. _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'
  5075. fi
  5076. fi
  5077. ;;
  5078. beos*)
  5079. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  5080. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5081. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  5082. # support --undefined. This deserves some investigation. FIXME
  5083. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5084. else
  5085. _LT_TAGVAR(ld_shlibs, $1)=no
  5086. fi
  5087. ;;
  5088. chorus*)
  5089. case $cc_basename in
  5090. *)
  5091. # FIXME: insert proper C++ library support
  5092. _LT_TAGVAR(ld_shlibs, $1)=no
  5093. ;;
  5094. esac
  5095. ;;
  5096. cygwin* | mingw* | pw32* | cegcc*)
  5097. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  5098. # as there is no search path for DLLs.
  5099. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5100. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5101. _LT_TAGVAR(always_export_symbols, $1)=no
  5102. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5103. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  5104. _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'
  5105. # If the export-symbols file already is a .def file (1st line
  5106. # is EXPORTS), use it as is; otherwise, prepend...
  5107. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  5108. cp $export_symbols $output_objdir/$soname.def;
  5109. else
  5110. echo EXPORTS > $output_objdir/$soname.def;
  5111. cat $export_symbols >> $output_objdir/$soname.def;
  5112. fi~
  5113. $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'
  5114. else
  5115. _LT_TAGVAR(ld_shlibs, $1)=no
  5116. fi
  5117. ;;
  5118. darwin* | rhapsody*)
  5119. _LT_DARWIN_LINKER_FEATURES($1)
  5120. ;;
  5121. dgux*)
  5122. case $cc_basename in
  5123. ec++*)
  5124. # FIXME: insert proper C++ library support
  5125. _LT_TAGVAR(ld_shlibs, $1)=no
  5126. ;;
  5127. ghcx*)
  5128. # Green Hills C++ Compiler
  5129. # FIXME: insert proper C++ library support
  5130. _LT_TAGVAR(ld_shlibs, $1)=no
  5131. ;;
  5132. *)
  5133. # FIXME: insert proper C++ library support
  5134. _LT_TAGVAR(ld_shlibs, $1)=no
  5135. ;;
  5136. esac
  5137. ;;
  5138. freebsd[[12]]*)
  5139. # C++ shared libraries reported to be fairly broken before
  5140. # switch to ELF
  5141. _LT_TAGVAR(ld_shlibs, $1)=no
  5142. ;;
  5143. freebsd-elf*)
  5144. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5145. ;;
  5146. freebsd* | dragonfly*)
  5147. # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
  5148. # conventions
  5149. _LT_TAGVAR(ld_shlibs, $1)=yes
  5150. ;;
  5151. gnu*)
  5152. ;;
  5153. hpux9*)
  5154. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5155. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5156. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5157. _LT_TAGVAR(hardcode_direct, $1)=yes
  5158. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  5159. # but as the default
  5160. # location of the library.
  5161. case $cc_basename in
  5162. CC*)
  5163. # FIXME: insert proper C++ library support
  5164. _LT_TAGVAR(ld_shlibs, $1)=no
  5165. ;;
  5166. aCC*)
  5167. _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'
  5168. # Commands to make compiler produce verbose output that lists
  5169. # what "hidden" libraries, object files and flags are used when
  5170. # linking a shared library.
  5171. #
  5172. # There doesn't appear to be a way to prevent this compiler from
  5173. # explicitly linking system object files so we need to strip them
  5174. # from the output so that they don't get included in the library
  5175. # dependencies.
  5176. 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'
  5177. ;;
  5178. *)
  5179. if test "$GXX" = yes; then
  5180. _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'
  5181. else
  5182. # FIXME: insert proper C++ library support
  5183. _LT_TAGVAR(ld_shlibs, $1)=no
  5184. fi
  5185. ;;
  5186. esac
  5187. ;;
  5188. hpux10*|hpux11*)
  5189. if test $with_gnu_ld = no; then
  5190. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5191. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5192. case $host_cpu in
  5193. hppa*64*|ia64*)
  5194. ;;
  5195. *)
  5196. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5197. ;;
  5198. esac
  5199. fi
  5200. case $host_cpu in
  5201. hppa*64*|ia64*)
  5202. _LT_TAGVAR(hardcode_direct, $1)=no
  5203. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5204. ;;
  5205. *)
  5206. _LT_TAGVAR(hardcode_direct, $1)=yes
  5207. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5208. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  5209. # but as the default
  5210. # location of the library.
  5211. ;;
  5212. esac
  5213. case $cc_basename in
  5214. CC*)
  5215. # FIXME: insert proper C++ library support
  5216. _LT_TAGVAR(ld_shlibs, $1)=no
  5217. ;;
  5218. aCC*)
  5219. case $host_cpu in
  5220. hppa*64*)
  5221. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5222. ;;
  5223. ia64*)
  5224. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5225. ;;
  5226. *)
  5227. _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'
  5228. ;;
  5229. esac
  5230. # Commands to make compiler produce verbose output that lists
  5231. # what "hidden" libraries, object files and flags are used when
  5232. # linking a shared library.
  5233. #
  5234. # There doesn't appear to be a way to prevent this compiler from
  5235. # explicitly linking system object files so we need to strip them
  5236. # from the output so that they don't get included in the library
  5237. # dependencies.
  5238. 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'
  5239. ;;
  5240. *)
  5241. if test "$GXX" = yes; then
  5242. if test $with_gnu_ld = no; then
  5243. case $host_cpu in
  5244. hppa*64*)
  5245. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5246. ;;
  5247. ia64*)
  5248. _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'
  5249. ;;
  5250. *)
  5251. _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'
  5252. ;;
  5253. esac
  5254. fi
  5255. else
  5256. # FIXME: insert proper C++ library support
  5257. _LT_TAGVAR(ld_shlibs, $1)=no
  5258. fi
  5259. ;;
  5260. esac
  5261. ;;
  5262. interix[[3-9]]*)
  5263. _LT_TAGVAR(hardcode_direct, $1)=no
  5264. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5265. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5266. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5267. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  5268. # Instead, shared libraries are loaded at an image base (0x10000000 by
  5269. # default) and relocated if they conflict, which is a slow very memory
  5270. # consuming and fragmenting process. To avoid this, we pick a random,
  5271. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  5272. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  5273. _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'
  5274. _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'
  5275. ;;
  5276. irix5* | irix6*)
  5277. case $cc_basename in
  5278. CC*)
  5279. # SGI C++
  5280. _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'
  5281. # Archives containing C++ object files must be created using
  5282. # "CC -ar", where "CC" is the IRIX C++ compiler. This is
  5283. # necessary to make sure instantiated templates are included
  5284. # in the archive.
  5285. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
  5286. ;;
  5287. *)
  5288. if test "$GXX" = yes; then
  5289. if test "$with_gnu_ld" = no; then
  5290. _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'
  5291. else
  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` -o $lib'
  5293. fi
  5294. fi
  5295. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5296. ;;
  5297. esac
  5298. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5299. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5300. _LT_TAGVAR(inherit_rpath, $1)=yes
  5301. ;;
  5302. linux* | k*bsd*-gnu)
  5303. case $cc_basename in
  5304. KCC*)
  5305. # Kuck and Associates, Inc. (KAI) C++ Compiler
  5306. # KCC will only create a shared library if the output file
  5307. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  5308. # to its proper name (with version) after linking.
  5309. _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'
  5310. _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'
  5311. # Commands to make compiler produce verbose output that lists
  5312. # what "hidden" libraries, object files and flags are used when
  5313. # linking a shared library.
  5314. #
  5315. # There doesn't appear to be a way to prevent this compiler from
  5316. # explicitly linking system object files so we need to strip them
  5317. # from the output so that they don't get included in the library
  5318. # dependencies.
  5319. 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'
  5320. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5321. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5322. # Archives containing C++ object files must be created using
  5323. # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  5324. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  5325. ;;
  5326. icpc* | ecpc* )
  5327. # Intel C++
  5328. with_gnu_ld=yes
  5329. # version 8.0 and above of icpc choke on multiply defined symbols
  5330. # if we add $predep_objects and $postdep_objects, however 7.1 and
  5331. # earlier do not add the objects themselves.
  5332. case `$CC -V 2>&1` in
  5333. *"Version 7."*)
  5334. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5335. _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'
  5336. ;;
  5337. *) # Version 8.0 or newer
  5338. tmp_idyn=
  5339. case $host_cpu in
  5340. ia64*) tmp_idyn=' -i_dynamic';;
  5341. esac
  5342. _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5343. _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'
  5344. ;;
  5345. esac
  5346. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5347. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5348. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5349. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  5350. ;;
  5351. pgCC* | pgcpp*)
  5352. # Portland Group C++ compiler
  5353. case `$CC -V` in
  5354. *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
  5355. _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
  5356. rm -rf $tpldir~
  5357. $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
  5358. compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
  5359. _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
  5360. rm -rf $tpldir~
  5361. $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
  5362. $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
  5363. $RANLIB $oldlib'
  5364. _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
  5365. rm -rf $tpldir~
  5366. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  5367. $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
  5368. _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
  5369. rm -rf $tpldir~
  5370. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  5371. $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'
  5372. ;;
  5373. *) # Version 6 will use weak symbols
  5374. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
  5375. _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'
  5376. ;;
  5377. esac
  5378. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
  5379. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5380. _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'
  5381. ;;
  5382. cxx*)
  5383. # Compaq C++
  5384. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5385. _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'
  5386. runpath_var=LD_RUN_PATH
  5387. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  5388. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5389. # Commands to make compiler produce verbose output that lists
  5390. # what "hidden" libraries, object files and flags are used when
  5391. # linking a shared library.
  5392. #
  5393. # There doesn't appear to be a way to prevent this compiler from
  5394. # explicitly linking system object files so we need to strip them
  5395. # from the output so that they don't get included in the library
  5396. # dependencies.
  5397. 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'
  5398. ;;
  5399. xl*)
  5400. # IBM XL 8.0 on PPC, with GNU ld
  5401. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5402. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5403. _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5404. if test "x$supports_anon_versioning" = xyes; then
  5405. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  5406. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  5407. echo "local: *; };" >> $output_objdir/$libname.ver~
  5408. $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  5409. fi
  5410. ;;
  5411. *)
  5412. case `$CC -V 2>&1 | sed 5q` in
  5413. *Sun\ C*)
  5414. # Sun C++ 5.9
  5415. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  5416. _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5417. _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'
  5418. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5419. _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'
  5420. _LT_TAGVAR(compiler_needs_object, $1)=yes
  5421. # Not sure whether something based on
  5422. # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
  5423. # would be better.
  5424. output_verbose_link_cmd='echo'
  5425. # Archives containing C++ object files must be created using
  5426. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  5427. # necessary to make sure instantiated templates are included
  5428. # in the archive.
  5429. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  5430. ;;
  5431. esac
  5432. ;;
  5433. esac
  5434. ;;
  5435. lynxos*)
  5436. # FIXME: insert proper C++ library support
  5437. _LT_TAGVAR(ld_shlibs, $1)=no
  5438. ;;
  5439. m88k*)
  5440. # FIXME: insert proper C++ library support
  5441. _LT_TAGVAR(ld_shlibs, $1)=no
  5442. ;;
  5443. mvs*)
  5444. case $cc_basename in
  5445. cxx*)
  5446. # FIXME: insert proper C++ library support
  5447. _LT_TAGVAR(ld_shlibs, $1)=no
  5448. ;;
  5449. *)
  5450. # FIXME: insert proper C++ library support
  5451. _LT_TAGVAR(ld_shlibs, $1)=no
  5452. ;;
  5453. esac
  5454. ;;
  5455. netbsd*)
  5456. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  5457. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
  5458. wlarc=
  5459. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5460. _LT_TAGVAR(hardcode_direct, $1)=yes
  5461. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5462. fi
  5463. # Workaround some broken pre-1.5 toolchains
  5464. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
  5465. ;;
  5466. *nto* | *qnx*)
  5467. _LT_TAGVAR(ld_shlibs, $1)=yes
  5468. ;;
  5469. openbsd2*)
  5470. # C++ shared libraries are fairly broken
  5471. _LT_TAGVAR(ld_shlibs, $1)=no
  5472. ;;
  5473. openbsd*)
  5474. if test -f /usr/libexec/ld.so; then
  5475. _LT_TAGVAR(hardcode_direct, $1)=yes
  5476. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5477. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5478. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  5479. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5480. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  5481. _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'
  5482. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5483. _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  5484. fi
  5485. output_verbose_link_cmd=echo
  5486. else
  5487. _LT_TAGVAR(ld_shlibs, $1)=no
  5488. fi
  5489. ;;
  5490. osf3* | osf4* | osf5*)
  5491. case $cc_basename in
  5492. KCC*)
  5493. # Kuck and Associates, Inc. (KAI) C++ Compiler
  5494. # KCC will only create a shared library if the output file
  5495. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  5496. # to its proper name (with version) after linking.
  5497. _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'
  5498. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5499. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5500. # Archives containing C++ object files must be created using
  5501. # the KAI C++ compiler.
  5502. case $host in
  5503. osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
  5504. *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
  5505. esac
  5506. ;;
  5507. RCC*)
  5508. # Rational C++ 2.4.1
  5509. # FIXME: insert proper C++ library support
  5510. _LT_TAGVAR(ld_shlibs, $1)=no
  5511. ;;
  5512. cxx*)
  5513. case $host in
  5514. osf3*)
  5515. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  5516. _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'
  5517. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5518. ;;
  5519. *)
  5520. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  5521. _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'
  5522. _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
  5523. echo "-hidden">> $lib.exp~
  5524. $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~
  5525. $RM $lib.exp'
  5526. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  5527. ;;
  5528. esac
  5529. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5530. # Commands to make compiler produce verbose output that lists
  5531. # what "hidden" libraries, object files and flags are used when
  5532. # linking a shared library.
  5533. #
  5534. # There doesn't appear to be a way to prevent this compiler from
  5535. # explicitly linking system object files so we need to strip them
  5536. # from the output so that they don't get included in the library
  5537. # dependencies.
  5538. 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'
  5539. ;;
  5540. *)
  5541. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  5542. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  5543. case $host in
  5544. osf3*)
  5545. _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'
  5546. ;;
  5547. *)
  5548. _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'
  5549. ;;
  5550. esac
  5551. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5552. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5553. # Commands to make compiler produce verbose output that lists
  5554. # what "hidden" libraries, object files and flags are used when
  5555. # linking a shared library.
  5556. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
  5557. else
  5558. # FIXME: insert proper C++ library support
  5559. _LT_TAGVAR(ld_shlibs, $1)=no
  5560. fi
  5561. ;;
  5562. esac
  5563. ;;
  5564. psos*)
  5565. # FIXME: insert proper C++ library support
  5566. _LT_TAGVAR(ld_shlibs, $1)=no
  5567. ;;
  5568. sunos4*)
  5569. case $cc_basename in
  5570. CC*)
  5571. # Sun C++ 4.x
  5572. # FIXME: insert proper C++ library support
  5573. _LT_TAGVAR(ld_shlibs, $1)=no
  5574. ;;
  5575. lcc*)
  5576. # Lucid
  5577. # FIXME: insert proper C++ library support
  5578. _LT_TAGVAR(ld_shlibs, $1)=no
  5579. ;;
  5580. *)
  5581. # FIXME: insert proper C++ library support
  5582. _LT_TAGVAR(ld_shlibs, $1)=no
  5583. ;;
  5584. esac
  5585. ;;
  5586. solaris*)
  5587. case $cc_basename in
  5588. CC*)
  5589. # Sun C++ 4.2, 5.x and Centerline C++
  5590. _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
  5591. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  5592. _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5593. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5594. $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'
  5595. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5596. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5597. case $host_os in
  5598. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  5599. *)
  5600. # The compiler driver will combine and reorder linker options,
  5601. # but understands `-z linker_flag'.
  5602. # Supported since Solaris 2.6 (maybe 2.5.1?)
  5603. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  5604. ;;
  5605. esac
  5606. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5607. output_verbose_link_cmd='echo'
  5608. # Archives containing C++ object files must be created using
  5609. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  5610. # necessary to make sure instantiated templates are included
  5611. # in the archive.
  5612. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  5613. ;;
  5614. gcx*)
  5615. # Green Hills C++ Compiler
  5616. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  5617. # The C++ compiler must be used to create the archive.
  5618. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
  5619. ;;
  5620. *)
  5621. # GNU C++ compiler with Solaris linker
  5622. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  5623. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
  5624. if $CC --version | $GREP -v '^2\.7' > /dev/null; then
  5625. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  5626. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5627. $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  5628. # Commands to make compiler produce verbose output that lists
  5629. # what "hidden" libraries, object files and flags are used when
  5630. # linking a shared library.
  5631. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
  5632. else
  5633. # g++ 2.7 appears to require `-G' NOT `-shared' on this
  5634. # platform.
  5635. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  5636. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5637. $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  5638. # Commands to make compiler produce verbose output that lists
  5639. # what "hidden" libraries, object files and flags are used when
  5640. # linking a shared library.
  5641. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
  5642. fi
  5643. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
  5644. case $host_os in
  5645. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  5646. *)
  5647. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
  5648. ;;
  5649. esac
  5650. fi
  5651. ;;
  5652. esac
  5653. ;;
  5654. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  5655. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  5656. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5657. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5658. runpath_var='LD_RUN_PATH'
  5659. case $cc_basename in
  5660. CC*)
  5661. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5662. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5663. ;;
  5664. *)
  5665. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5666. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5667. ;;
  5668. esac
  5669. ;;
  5670. sysv5* | sco3.2v5* | sco5v6*)
  5671. # Note: We can NOT use -z defs as we might desire, because we do not
  5672. # link with -lc, and that would cause any symbols used from libc to
  5673. # always be unresolved, which means just about no library would
  5674. # ever link correctly. If we're not using GNU ld we use -z text
  5675. # though, which does catch some bad symbols but isn't as heavy-handed
  5676. # as -z defs.
  5677. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  5678. _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
  5679. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5680. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5681. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
  5682. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5683. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5684. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  5685. runpath_var='LD_RUN_PATH'
  5686. case $cc_basename in
  5687. CC*)
  5688. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5689. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5690. ;;
  5691. *)
  5692. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5693. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5694. ;;
  5695. esac
  5696. ;;
  5697. tandem*)
  5698. case $cc_basename in
  5699. NCC*)
  5700. # NonStop-UX NCC 3.20
  5701. # FIXME: insert proper C++ library support
  5702. _LT_TAGVAR(ld_shlibs, $1)=no
  5703. ;;
  5704. *)
  5705. # FIXME: insert proper C++ library support
  5706. _LT_TAGVAR(ld_shlibs, $1)=no
  5707. ;;
  5708. esac
  5709. ;;
  5710. vxworks*)
  5711. # FIXME: insert proper C++ library support
  5712. _LT_TAGVAR(ld_shlibs, $1)=no
  5713. ;;
  5714. *)
  5715. # FIXME: insert proper C++ library support
  5716. _LT_TAGVAR(ld_shlibs, $1)=no
  5717. ;;
  5718. esac
  5719. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  5720. test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  5721. _LT_TAGVAR(GCC, $1)="$GXX"
  5722. _LT_TAGVAR(LD, $1)="$LD"
  5723. ## CAVEAT EMPTOR:
  5724. ## There is no encapsulation within the following macros, do not change
  5725. ## the running order or otherwise move them around unless you know exactly
  5726. ## what you are doing...
  5727. _LT_SYS_HIDDEN_LIBDEPS($1)
  5728. _LT_COMPILER_PIC($1)
  5729. _LT_COMPILER_C_O($1)
  5730. _LT_COMPILER_FILE_LOCKS($1)
  5731. _LT_LINKER_SHLIBS($1)
  5732. _LT_SYS_DYNAMIC_LINKER($1)
  5733. _LT_LINKER_HARDCODE_LIBPATH($1)
  5734. _LT_CONFIG($1)
  5735. fi # test -n "$compiler"
  5736. CC=$lt_save_CC
  5737. LDCXX=$LD
  5738. LD=$lt_save_LD
  5739. GCC=$lt_save_GCC
  5740. with_gnu_ld=$lt_save_with_gnu_ld
  5741. lt_cv_path_LDCXX=$lt_cv_path_LD
  5742. lt_cv_path_LD=$lt_save_path_LD
  5743. lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
  5744. lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
  5745. fi # test "$_lt_caught_CXX_error" != yes
  5746. AC_LANG_POP
  5747. ])# _LT_LANG_CXX_CONFIG
  5748. # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
  5749. # ---------------------------------
  5750. # Figure out "hidden" library dependencies from verbose
  5751. # compiler output when linking a shared library.
  5752. # Parse the compiler output and extract the necessary
  5753. # objects, libraries and library flags.
  5754. m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
  5755. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  5756. # Dependencies to place before and after the object being linked:
  5757. _LT_TAGVAR(predep_objects, $1)=
  5758. _LT_TAGVAR(postdep_objects, $1)=
  5759. _LT_TAGVAR(predeps, $1)=
  5760. _LT_TAGVAR(postdeps, $1)=
  5761. _LT_TAGVAR(compiler_lib_search_path, $1)=
  5762. dnl we can't use the lt_simple_compile_test_code here,
  5763. dnl because it contains code intended for an executable,
  5764. dnl not a library. It's possible we should let each
  5765. dnl tag define a new lt_????_link_test_code variable,
  5766. dnl but it's only used here...
  5767. m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
  5768. int a;
  5769. void foo (void) { a = 0; }
  5770. _LT_EOF
  5771. ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
  5772. class Foo
  5773. {
  5774. public:
  5775. Foo (void) { a = 0; }
  5776. private:
  5777. int a;
  5778. };
  5779. _LT_EOF
  5780. ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
  5781. subroutine foo
  5782. implicit none
  5783. integer*4 a
  5784. a=0
  5785. return
  5786. end
  5787. _LT_EOF
  5788. ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
  5789. subroutine foo
  5790. implicit none
  5791. integer a
  5792. a=0
  5793. return
  5794. end
  5795. _LT_EOF
  5796. ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
  5797. public class foo {
  5798. private int a;
  5799. public void bar (void) {
  5800. a = 0;
  5801. }
  5802. };
  5803. _LT_EOF
  5804. ])
  5805. dnl Parse the compiler output and extract the necessary
  5806. dnl objects, libraries and library flags.
  5807. if AC_TRY_EVAL(ac_compile); then
  5808. # Parse the compiler output and extract the necessary
  5809. # objects, libraries and library flags.
  5810. # Sentinel used to keep track of whether or not we are before
  5811. # the conftest object file.
  5812. pre_test_object_deps_done=no
  5813. for p in `eval "$output_verbose_link_cmd"`; do
  5814. case $p in
  5815. -L* | -R* | -l*)
  5816. # Some compilers place space between "-{L,R}" and the path.
  5817. # Remove the space.
  5818. if test $p = "-L" ||
  5819. test $p = "-R"; then
  5820. prev=$p
  5821. continue
  5822. else
  5823. prev=
  5824. fi
  5825. if test "$pre_test_object_deps_done" = no; then
  5826. case $p in
  5827. -L* | -R*)
  5828. # Internal compiler library paths should come after those
  5829. # provided the user. The postdeps already come after the
  5830. # user supplied libs so there is no need to process them.
  5831. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
  5832. _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
  5833. else
  5834. _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
  5835. fi
  5836. ;;
  5837. # The "-l" case would never come before the object being
  5838. # linked, so don't bother handling this case.
  5839. esac
  5840. else
  5841. if test -z "$_LT_TAGVAR(postdeps, $1)"; then
  5842. _LT_TAGVAR(postdeps, $1)="${prev}${p}"
  5843. else
  5844. _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
  5845. fi
  5846. fi
  5847. ;;
  5848. *.$objext)
  5849. # This assumes that the test object file only shows up
  5850. # once in the compiler output.
  5851. if test "$p" = "conftest.$objext"; then
  5852. pre_test_object_deps_done=yes
  5853. continue
  5854. fi
  5855. if test "$pre_test_object_deps_done" = no; then
  5856. if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
  5857. _LT_TAGVAR(predep_objects, $1)="$p"
  5858. else
  5859. _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
  5860. fi
  5861. else
  5862. if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
  5863. _LT_TAGVAR(postdep_objects, $1)="$p"
  5864. else
  5865. _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
  5866. fi
  5867. fi
  5868. ;;
  5869. *) ;; # Ignore the rest.
  5870. esac
  5871. done
  5872. # Clean up.
  5873. rm -f a.out a.exe
  5874. else
  5875. echo "libtool.m4: error: problem compiling $1 test program"
  5876. fi
  5877. $RM -f confest.$objext
  5878. # PORTME: override above test on systems where it is broken
  5879. m4_if([$1], [CXX],
  5880. [case $host_os in
  5881. interix[[3-9]]*)
  5882. # Interix 3.5 installs completely hosed .la files for C++, so rather than
  5883. # hack all around it, let's just trust "g++" to DTRT.
  5884. _LT_TAGVAR(predep_objects,$1)=
  5885. _LT_TAGVAR(postdep_objects,$1)=
  5886. _LT_TAGVAR(postdeps,$1)=
  5887. ;;
  5888. linux*)
  5889. case `$CC -V 2>&1 | sed 5q` in
  5890. *Sun\ C*)
  5891. # Sun C++ 5.9
  5892. # The more standards-conforming stlport4 library is
  5893. # incompatible with the Cstd library. Avoid specifying
  5894. # it if it's in CXXFLAGS. Ignore libCrun as
  5895. # -library=stlport4 depends on it.
  5896. case " $CXX $CXXFLAGS " in
  5897. *" -library=stlport4 "*)
  5898. solaris_use_stlport4=yes
  5899. ;;
  5900. esac
  5901. if test "$solaris_use_stlport4" != yes; then
  5902. _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
  5903. fi
  5904. ;;
  5905. esac
  5906. ;;
  5907. solaris*)
  5908. case $cc_basename in
  5909. CC*)
  5910. # The more standards-conforming stlport4 library is
  5911. # incompatible with the Cstd library. Avoid specifying
  5912. # it if it's in CXXFLAGS. Ignore libCrun as
  5913. # -library=stlport4 depends on it.
  5914. case " $CXX $CXXFLAGS " in
  5915. *" -library=stlport4 "*)
  5916. solaris_use_stlport4=yes
  5917. ;;
  5918. esac
  5919. # Adding this requires a known-good setup of shared libraries for
  5920. # Sun compiler versions before 5.6, else PIC objects from an old
  5921. # archive will be linked into the output, leading to subtle bugs.
  5922. if test "$solaris_use_stlport4" != yes; then
  5923. _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
  5924. fi
  5925. ;;
  5926. esac
  5927. ;;
  5928. esac
  5929. ])
  5930. case " $_LT_TAGVAR(postdeps, $1) " in
  5931. *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
  5932. esac
  5933. _LT_TAGVAR(compiler_lib_search_dirs, $1)=
  5934. if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
  5935. _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
  5936. fi
  5937. _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
  5938. [The directories searched by this compiler when creating a shared library])
  5939. _LT_TAGDECL([], [predep_objects], [1],
  5940. [Dependencies to place before and after the objects being linked to
  5941. create a shared library])
  5942. _LT_TAGDECL([], [postdep_objects], [1])
  5943. _LT_TAGDECL([], [predeps], [1])
  5944. _LT_TAGDECL([], [postdeps], [1])
  5945. _LT_TAGDECL([], [compiler_lib_search_path], [1],
  5946. [The library search path used internally by the compiler when linking
  5947. a shared library])
  5948. ])# _LT_SYS_HIDDEN_LIBDEPS
  5949. # _LT_PROG_F77
  5950. # ------------
  5951. # Since AC_PROG_F77 is broken, in that it returns the empty string
  5952. # if there is no fortran compiler, we have our own version here.
  5953. m4_defun([_LT_PROG_F77],
  5954. [
  5955. pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
  5956. AC_PROG_F77
  5957. if test -z "$F77" || test "X$F77" = "Xno"; then
  5958. _lt_disable_F77=yes
  5959. fi
  5960. popdef([AC_MSG_ERROR])
  5961. ])# _LT_PROG_F77
  5962. dnl aclocal-1.4 backwards compatibility:
  5963. dnl AC_DEFUN([_LT_PROG_F77], [])
  5964. # _LT_LANG_F77_CONFIG([TAG])
  5965. # --------------------------
  5966. # Ensure that the configuration variables for a Fortran 77 compiler are
  5967. # suitably defined. These variables are subsequently used by _LT_CONFIG
  5968. # to write the compiler configuration to `libtool'.
  5969. m4_defun([_LT_LANG_F77_CONFIG],
  5970. [AC_REQUIRE([_LT_PROG_F77])dnl
  5971. AC_LANG_PUSH(Fortran 77)
  5972. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5973. _LT_TAGVAR(allow_undefined_flag, $1)=
  5974. _LT_TAGVAR(always_export_symbols, $1)=no
  5975. _LT_TAGVAR(archive_expsym_cmds, $1)=
  5976. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  5977. _LT_TAGVAR(hardcode_direct, $1)=no
  5978. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  5979. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  5980. _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  5981. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5982. _LT_TAGVAR(hardcode_minus_L, $1)=no
  5983. _LT_TAGVAR(hardcode_automatic, $1)=no
  5984. _LT_TAGVAR(inherit_rpath, $1)=no
  5985. _LT_TAGVAR(module_cmds, $1)=
  5986. _LT_TAGVAR(module_expsym_cmds, $1)=
  5987. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  5988. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  5989. _LT_TAGVAR(no_undefined_flag, $1)=
  5990. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5991. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  5992. # Source file extension for f77 test sources.
  5993. ac_ext=f
  5994. # Object file extension for compiled f77 test sources.
  5995. objext=o
  5996. _LT_TAGVAR(objext, $1)=$objext
  5997. # No sense in running all these tests if we already determined that
  5998. # the F77 compiler isn't working. Some variables (like enable_shared)
  5999. # are currently assumed to apply to all compilers on this platform,
  6000. # and will be corrupted by setting them based on a non-working compiler.
  6001. if test "$_lt_disable_F77" != yes; then
  6002. # Code to be used in simple compile tests
  6003. lt_simple_compile_test_code="\
  6004. subroutine t
  6005. return
  6006. end
  6007. "
  6008. # Code to be used in simple link tests
  6009. lt_simple_link_test_code="\
  6010. program t
  6011. end
  6012. "
  6013. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6014. _LT_TAG_COMPILER
  6015. # save warnings/boilerplate of simple test code
  6016. _LT_COMPILER_BOILERPLATE
  6017. _LT_LINKER_BOILERPLATE
  6018. # Allow CC to be a program name with arguments.
  6019. lt_save_CC="$CC"
  6020. lt_save_GCC=$GCC
  6021. CC=${F77-"f77"}
  6022. compiler=$CC
  6023. _LT_TAGVAR(compiler, $1)=$CC
  6024. _LT_CC_BASENAME([$compiler])
  6025. GCC=$G77
  6026. if test -n "$compiler"; then
  6027. AC_MSG_CHECKING([if libtool supports shared libraries])
  6028. AC_MSG_RESULT([$can_build_shared])
  6029. AC_MSG_CHECKING([whether to build shared libraries])
  6030. test "$can_build_shared" = "no" && enable_shared=no
  6031. # On AIX, shared libraries and static libraries use the same namespace, and
  6032. # are all built from PIC.
  6033. case $host_os in
  6034. aix3*)
  6035. test "$enable_shared" = yes && enable_static=no
  6036. if test -n "$RANLIB"; then
  6037. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  6038. postinstall_cmds='$RANLIB $lib'
  6039. fi
  6040. ;;
  6041. aix[[4-9]]*)
  6042. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  6043. test "$enable_shared" = yes && enable_static=no
  6044. fi
  6045. ;;
  6046. esac
  6047. AC_MSG_RESULT([$enable_shared])
  6048. AC_MSG_CHECKING([whether to build static libraries])
  6049. # Make sure either enable_shared or enable_static is yes.
  6050. test "$enable_shared" = yes || enable_static=yes
  6051. AC_MSG_RESULT([$enable_static])
  6052. _LT_TAGVAR(GCC, $1)="$G77"
  6053. _LT_TAGVAR(LD, $1)="$LD"
  6054. ## CAVEAT EMPTOR:
  6055. ## There is no encapsulation within the following macros, do not change
  6056. ## the running order or otherwise move them around unless you know exactly
  6057. ## what you are doing...
  6058. _LT_COMPILER_PIC($1)
  6059. _LT_COMPILER_C_O($1)
  6060. _LT_COMPILER_FILE_LOCKS($1)
  6061. _LT_LINKER_SHLIBS($1)
  6062. _LT_SYS_DYNAMIC_LINKER($1)
  6063. _LT_LINKER_HARDCODE_LIBPATH($1)
  6064. _LT_CONFIG($1)
  6065. fi # test -n "$compiler"
  6066. GCC=$lt_save_GCC
  6067. CC="$lt_save_CC"
  6068. fi # test "$_lt_disable_F77" != yes
  6069. AC_LANG_POP
  6070. ])# _LT_LANG_F77_CONFIG
  6071. # _LT_PROG_FC
  6072. # -----------
  6073. # Since AC_PROG_FC is broken, in that it returns the empty string
  6074. # if there is no fortran compiler, we have our own version here.
  6075. m4_defun([_LT_PROG_FC],
  6076. [
  6077. pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
  6078. AC_PROG_FC
  6079. if test -z "$FC" || test "X$FC" = "Xno"; then
  6080. _lt_disable_FC=yes
  6081. fi
  6082. popdef([AC_MSG_ERROR])
  6083. ])# _LT_PROG_FC
  6084. dnl aclocal-1.4 backwards compatibility:
  6085. dnl AC_DEFUN([_LT_PROG_FC], [])
  6086. # _LT_LANG_FC_CONFIG([TAG])
  6087. # -------------------------
  6088. # Ensure that the configuration variables for a Fortran compiler are
  6089. # suitably defined. These variables are subsequently used by _LT_CONFIG
  6090. # to write the compiler configuration to `libtool'.
  6091. m4_defun([_LT_LANG_FC_CONFIG],
  6092. [AC_REQUIRE([_LT_PROG_FC])dnl
  6093. AC_LANG_PUSH(Fortran)
  6094. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6095. _LT_TAGVAR(allow_undefined_flag, $1)=
  6096. _LT_TAGVAR(always_export_symbols, $1)=no
  6097. _LT_TAGVAR(archive_expsym_cmds, $1)=
  6098. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  6099. _LT_TAGVAR(hardcode_direct, $1)=no
  6100. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  6101. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  6102. _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  6103. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  6104. _LT_TAGVAR(hardcode_minus_L, $1)=no
  6105. _LT_TAGVAR(hardcode_automatic, $1)=no
  6106. _LT_TAGVAR(inherit_rpath, $1)=no
  6107. _LT_TAGVAR(module_cmds, $1)=
  6108. _LT_TAGVAR(module_expsym_cmds, $1)=
  6109. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  6110. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  6111. _LT_TAGVAR(no_undefined_flag, $1)=
  6112. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  6113. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  6114. # Source file extension for fc test sources.
  6115. ac_ext=${ac_fc_srcext-f}
  6116. # Object file extension for compiled fc test sources.
  6117. objext=o
  6118. _LT_TAGVAR(objext, $1)=$objext
  6119. # No sense in running all these tests if we already determined that
  6120. # the FC compiler isn't working. Some variables (like enable_shared)
  6121. # are currently assumed to apply to all compilers on this platform,
  6122. # and will be corrupted by setting them based on a non-working compiler.
  6123. if test "$_lt_disable_FC" != yes; then
  6124. # Code to be used in simple compile tests
  6125. lt_simple_compile_test_code="\
  6126. subroutine t
  6127. return
  6128. end
  6129. "
  6130. # Code to be used in simple link tests
  6131. lt_simple_link_test_code="\
  6132. program t
  6133. end
  6134. "
  6135. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6136. _LT_TAG_COMPILER
  6137. # save warnings/boilerplate of simple test code
  6138. _LT_COMPILER_BOILERPLATE
  6139. _LT_LINKER_BOILERPLATE
  6140. # Allow CC to be a program name with arguments.
  6141. lt_save_CC="$CC"
  6142. lt_save_GCC=$GCC
  6143. CC=${FC-"f95"}
  6144. compiler=$CC
  6145. GCC=$ac_cv_fc_compiler_gnu
  6146. _LT_TAGVAR(compiler, $1)=$CC
  6147. _LT_CC_BASENAME([$compiler])
  6148. if test -n "$compiler"; then
  6149. AC_MSG_CHECKING([if libtool supports shared libraries])
  6150. AC_MSG_RESULT([$can_build_shared])
  6151. AC_MSG_CHECKING([whether to build shared libraries])
  6152. test "$can_build_shared" = "no" && enable_shared=no
  6153. # On AIX, shared libraries and static libraries use the same namespace, and
  6154. # are all built from PIC.
  6155. case $host_os in
  6156. aix3*)
  6157. test "$enable_shared" = yes && enable_static=no
  6158. if test -n "$RANLIB"; then
  6159. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  6160. postinstall_cmds='$RANLIB $lib'
  6161. fi
  6162. ;;
  6163. aix[[4-9]]*)
  6164. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  6165. test "$enable_shared" = yes && enable_static=no
  6166. fi
  6167. ;;
  6168. esac
  6169. AC_MSG_RESULT([$enable_shared])
  6170. AC_MSG_CHECKING([whether to build static libraries])
  6171. # Make sure either enable_shared or enable_static is yes.
  6172. test "$enable_shared" = yes || enable_static=yes
  6173. AC_MSG_RESULT([$enable_static])
  6174. _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
  6175. _LT_TAGVAR(LD, $1)="$LD"
  6176. ## CAVEAT EMPTOR:
  6177. ## There is no encapsulation within the following macros, do not change
  6178. ## the running order or otherwise move them around unless you know exactly
  6179. ## what you are doing...
  6180. _LT_SYS_HIDDEN_LIBDEPS($1)
  6181. _LT_COMPILER_PIC($1)
  6182. _LT_COMPILER_C_O($1)
  6183. _LT_COMPILER_FILE_LOCKS($1)
  6184. _LT_LINKER_SHLIBS($1)
  6185. _LT_SYS_DYNAMIC_LINKER($1)
  6186. _LT_LINKER_HARDCODE_LIBPATH($1)
  6187. _LT_CONFIG($1)
  6188. fi # test -n "$compiler"
  6189. GCC=$lt_save_GCC
  6190. CC="$lt_save_CC"
  6191. fi # test "$_lt_disable_FC" != yes
  6192. AC_LANG_POP
  6193. ])# _LT_LANG_FC_CONFIG
  6194. # _LT_LANG_GCJ_CONFIG([TAG])
  6195. # --------------------------
  6196. # Ensure that the configuration variables for the GNU Java Compiler compiler
  6197. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  6198. # to write the compiler configuration to `libtool'.
  6199. m4_defun([_LT_LANG_GCJ_CONFIG],
  6200. [AC_REQUIRE([LT_PROG_GCJ])dnl
  6201. AC_LANG_SAVE
  6202. # Source file extension for Java test sources.
  6203. ac_ext=java
  6204. # Object file extension for compiled Java test sources.
  6205. objext=o
  6206. _LT_TAGVAR(objext, $1)=$objext
  6207. # Code to be used in simple compile tests
  6208. lt_simple_compile_test_code="class foo {}"
  6209. # Code to be used in simple link tests
  6210. lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
  6211. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6212. _LT_TAG_COMPILER
  6213. # save warnings/boilerplate of simple test code
  6214. _LT_COMPILER_BOILERPLATE
  6215. _LT_LINKER_BOILERPLATE
  6216. # Allow CC to be a program name with arguments.
  6217. lt_save_CC="$CC"
  6218. lt_save_GCC=$GCC
  6219. GCC=yes
  6220. CC=${GCJ-"gcj"}
  6221. compiler=$CC
  6222. _LT_TAGVAR(compiler, $1)=$CC
  6223. _LT_TAGVAR(LD, $1)="$LD"
  6224. _LT_CC_BASENAME([$compiler])
  6225. # GCJ did not exist at the time GCC didn't implicitly link libc in.
  6226. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6227. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  6228. ## CAVEAT EMPTOR:
  6229. ## There is no encapsulation within the following macros, do not change
  6230. ## the running order or otherwise move them around unless you know exactly
  6231. ## what you are doing...
  6232. if test -n "$compiler"; then
  6233. _LT_COMPILER_NO_RTTI($1)
  6234. _LT_COMPILER_PIC($1)
  6235. _LT_COMPILER_C_O($1)
  6236. _LT_COMPILER_FILE_LOCKS($1)
  6237. _LT_LINKER_SHLIBS($1)
  6238. _LT_LINKER_HARDCODE_LIBPATH($1)
  6239. _LT_CONFIG($1)
  6240. fi
  6241. AC_LANG_RESTORE
  6242. GCC=$lt_save_GCC
  6243. CC="$lt_save_CC"
  6244. ])# _LT_LANG_GCJ_CONFIG
  6245. # _LT_LANG_RC_CONFIG([TAG])
  6246. # -------------------------
  6247. # Ensure that the configuration variables for the Windows resource compiler
  6248. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  6249. # to write the compiler configuration to `libtool'.
  6250. m4_defun([_LT_LANG_RC_CONFIG],
  6251. [AC_REQUIRE([LT_PROG_RC])dnl
  6252. AC_LANG_SAVE
  6253. # Source file extension for RC test sources.
  6254. ac_ext=rc
  6255. # Object file extension for compiled RC test sources.
  6256. objext=o
  6257. _LT_TAGVAR(objext, $1)=$objext
  6258. # Code to be used in simple compile tests
  6259. lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
  6260. # Code to be used in simple link tests
  6261. lt_simple_link_test_code="$lt_simple_compile_test_code"
  6262. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6263. _LT_TAG_COMPILER
  6264. # save warnings/boilerplate of simple test code
  6265. _LT_COMPILER_BOILERPLATE
  6266. _LT_LINKER_BOILERPLATE
  6267. # Allow CC to be a program name with arguments.
  6268. lt_save_CC="$CC"
  6269. lt_save_GCC=$GCC
  6270. GCC=
  6271. CC=${RC-"windres"}
  6272. compiler=$CC
  6273. _LT_TAGVAR(compiler, $1)=$CC
  6274. _LT_CC_BASENAME([$compiler])
  6275. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  6276. if test -n "$compiler"; then
  6277. :
  6278. _LT_CONFIG($1)
  6279. fi
  6280. GCC=$lt_save_GCC
  6281. AC_LANG_RESTORE
  6282. CC="$lt_save_CC"
  6283. ])# _LT_LANG_RC_CONFIG
  6284. # LT_PROG_GCJ
  6285. # -----------
  6286. AC_DEFUN([LT_PROG_GCJ],
  6287. [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
  6288. [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
  6289. [AC_CHECK_TOOL(GCJ, gcj,)
  6290. test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
  6291. AC_SUBST(GCJFLAGS)])])[]dnl
  6292. ])
  6293. # Old name:
  6294. AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
  6295. dnl aclocal-1.4 backwards compatibility:
  6296. dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
  6297. # LT_PROG_RC
  6298. # ----------
  6299. AC_DEFUN([LT_PROG_RC],
  6300. [AC_CHECK_TOOL(RC, windres,)
  6301. ])
  6302. # Old name:
  6303. AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
  6304. dnl aclocal-1.4 backwards compatibility:
  6305. dnl AC_DEFUN([LT_AC_PROG_RC], [])
  6306. # _LT_DECL_EGREP
  6307. # --------------
  6308. # If we don't have a new enough Autoconf to choose the best grep
  6309. # available, choose the one first in the user's PATH.
  6310. m4_defun([_LT_DECL_EGREP],
  6311. [AC_REQUIRE([AC_PROG_EGREP])dnl
  6312. AC_REQUIRE([AC_PROG_FGREP])dnl
  6313. test -z "$GREP" && GREP=grep
  6314. _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
  6315. _LT_DECL([], [EGREP], [1], [An ERE matcher])
  6316. _LT_DECL([], [FGREP], [1], [A literal string matcher])
  6317. dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
  6318. AC_SUBST([GREP])
  6319. ])
  6320. # _LT_DECL_OBJDUMP
  6321. # --------------
  6322. # If we don't have a new enough Autoconf to choose the best objdump
  6323. # available, choose the one first in the user's PATH.
  6324. m4_defun([_LT_DECL_OBJDUMP],
  6325. [AC_CHECK_TOOL(OBJDUMP, objdump, false)
  6326. test -z "$OBJDUMP" && OBJDUMP=objdump
  6327. _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
  6328. AC_SUBST([OBJDUMP])
  6329. ])
  6330. # _LT_DECL_SED
  6331. # ------------
  6332. # Check for a fully-functional sed program, that truncates
  6333. # as few characters as possible. Prefer GNU sed if found.
  6334. m4_defun([_LT_DECL_SED],
  6335. [AC_PROG_SED
  6336. test -z "$SED" && SED=sed
  6337. Xsed="$SED -e 1s/^X//"
  6338. _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
  6339. _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
  6340. [Sed that helps us avoid accidentally triggering echo(1) options like -n])
  6341. ])# _LT_DECL_SED
  6342. m4_ifndef([AC_PROG_SED], [
  6343. ############################################################
  6344. # NOTE: This macro has been submitted for inclusion into #
  6345. # GNU Autoconf as AC_PROG_SED. When it is available in #
  6346. # a released version of Autoconf we should remove this #
  6347. # macro and use it instead. #
  6348. ############################################################
  6349. m4_defun([AC_PROG_SED],
  6350. [AC_MSG_CHECKING([for a sed that does not truncate output])
  6351. AC_CACHE_VAL(lt_cv_path_SED,
  6352. [# Loop through the user's path and test for sed and gsed.
  6353. # Then use that list of sed's as ones to test for truncation.
  6354. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6355. for as_dir in $PATH
  6356. do
  6357. IFS=$as_save_IFS
  6358. test -z "$as_dir" && as_dir=.
  6359. for lt_ac_prog in sed gsed; do
  6360. for ac_exec_ext in '' $ac_executable_extensions; do
  6361. if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
  6362. lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
  6363. fi
  6364. done
  6365. done
  6366. done
  6367. IFS=$as_save_IFS
  6368. lt_ac_max=0
  6369. lt_ac_count=0
  6370. # Add /usr/xpg4/bin/sed as it is typically found on Solaris
  6371. # along with /bin/sed that truncates output.
  6372. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
  6373. test ! -f $lt_ac_sed && continue
  6374. cat /dev/null > conftest.in
  6375. lt_ac_count=0
  6376. echo $ECHO_N "0123456789$ECHO_C" >conftest.in
  6377. # Check for GNU sed and select it if it is found.
  6378. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
  6379. lt_cv_path_SED=$lt_ac_sed
  6380. break
  6381. fi
  6382. while true; do
  6383. cat conftest.in conftest.in >conftest.tmp
  6384. mv conftest.tmp conftest.in
  6385. cp conftest.in conftest.nl
  6386. echo >>conftest.nl
  6387. $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
  6388. cmp -s conftest.out conftest.nl || break
  6389. # 10000 chars as input seems more than enough
  6390. test $lt_ac_count -gt 10 && break
  6391. lt_ac_count=`expr $lt_ac_count + 1`
  6392. if test $lt_ac_count -gt $lt_ac_max; then
  6393. lt_ac_max=$lt_ac_count
  6394. lt_cv_path_SED=$lt_ac_sed
  6395. fi
  6396. done
  6397. done
  6398. ])
  6399. SED=$lt_cv_path_SED
  6400. AC_SUBST([SED])
  6401. AC_MSG_RESULT([$SED])
  6402. ])#AC_PROG_SED
  6403. ])#m4_ifndef
  6404. # Old name:
  6405. AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
  6406. dnl aclocal-1.4 backwards compatibility:
  6407. dnl AC_DEFUN([LT_AC_PROG_SED], [])
  6408. # _LT_CHECK_SHELL_FEATURES
  6409. # ------------------------
  6410. # Find out whether the shell is Bourne or XSI compatible,
  6411. # or has some other useful features.
  6412. m4_defun([_LT_CHECK_SHELL_FEATURES],
  6413. [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
  6414. # Try some XSI features
  6415. xsi_shell=no
  6416. ( _lt_dummy="a/b/c"
  6417. test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
  6418. = c,a/b,, \
  6419. && eval 'test $(( 1 + 1 )) -eq 2 \
  6420. && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
  6421. && xsi_shell=yes
  6422. AC_MSG_RESULT([$xsi_shell])
  6423. _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
  6424. AC_MSG_CHECKING([whether the shell understands "+="])
  6425. lt_shell_append=no
  6426. ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
  6427. >/dev/null 2>&1 \
  6428. && lt_shell_append=yes
  6429. AC_MSG_RESULT([$lt_shell_append])
  6430. _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
  6431. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
  6432. lt_unset=unset
  6433. else
  6434. lt_unset=false
  6435. fi
  6436. _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
  6437. # test EBCDIC or ASCII
  6438. case `echo X|tr X '\101'` in
  6439. A) # ASCII based system
  6440. # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
  6441. lt_SP2NL='tr \040 \012'
  6442. lt_NL2SP='tr \015\012 \040\040'
  6443. ;;
  6444. *) # EBCDIC based system
  6445. lt_SP2NL='tr \100 \n'
  6446. lt_NL2SP='tr \r\n \100\100'
  6447. ;;
  6448. esac
  6449. _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
  6450. _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
  6451. ])# _LT_CHECK_SHELL_FEATURES
  6452. # _LT_PROG_XSI_SHELLFNS
  6453. # ---------------------
  6454. # Bourne and XSI compatible variants of some useful shell functions.
  6455. m4_defun([_LT_PROG_XSI_SHELLFNS],
  6456. [case $xsi_shell in
  6457. yes)
  6458. cat << \_LT_EOF >> "$cfgfile"
  6459. # func_dirname file append nondir_replacement
  6460. # Compute the dirname of FILE. If nonempty, add APPEND to the result,
  6461. # otherwise set result to NONDIR_REPLACEMENT.
  6462. func_dirname ()
  6463. {
  6464. case ${1} in
  6465. */*) func_dirname_result="${1%/*}${2}" ;;
  6466. * ) func_dirname_result="${3}" ;;
  6467. esac
  6468. }
  6469. # func_basename file
  6470. func_basename ()
  6471. {
  6472. func_basename_result="${1##*/}"
  6473. }
  6474. # func_dirname_and_basename file append nondir_replacement
  6475. # perform func_basename and func_dirname in a single function
  6476. # call:
  6477. # dirname: Compute the dirname of FILE. If nonempty,
  6478. # add APPEND to the result, otherwise set result
  6479. # to NONDIR_REPLACEMENT.
  6480. # value returned in "$func_dirname_result"
  6481. # basename: Compute filename of FILE.
  6482. # value retuned in "$func_basename_result"
  6483. # Implementation must be kept synchronized with func_dirname
  6484. # and func_basename. For efficiency, we do not delegate to
  6485. # those functions but instead duplicate the functionality here.
  6486. func_dirname_and_basename ()
  6487. {
  6488. case ${1} in
  6489. */*) func_dirname_result="${1%/*}${2}" ;;
  6490. * ) func_dirname_result="${3}" ;;
  6491. esac
  6492. func_basename_result="${1##*/}"
  6493. }
  6494. # func_stripname prefix suffix name
  6495. # strip PREFIX and SUFFIX off of NAME.
  6496. # PREFIX and SUFFIX must not contain globbing or regex special
  6497. # characters, hashes, percent signs, but SUFFIX may contain a leading
  6498. # dot (in which case that matches only a dot).
  6499. func_stripname ()
  6500. {
  6501. # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
  6502. # positional parameters, so assign one to ordinary parameter first.
  6503. func_stripname_result=${3}
  6504. func_stripname_result=${func_stripname_result#"${1}"}
  6505. func_stripname_result=${func_stripname_result%"${2}"}
  6506. }
  6507. # func_opt_split
  6508. func_opt_split ()
  6509. {
  6510. func_opt_split_opt=${1%%=*}
  6511. func_opt_split_arg=${1#*=}
  6512. }
  6513. # func_lo2o object
  6514. func_lo2o ()
  6515. {
  6516. case ${1} in
  6517. *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
  6518. *) func_lo2o_result=${1} ;;
  6519. esac
  6520. }
  6521. # func_xform libobj-or-source
  6522. func_xform ()
  6523. {
  6524. func_xform_result=${1%.*}.lo
  6525. }
  6526. # func_arith arithmetic-term...
  6527. func_arith ()
  6528. {
  6529. func_arith_result=$(( $[*] ))
  6530. }
  6531. # func_len string
  6532. # STRING may not start with a hyphen.
  6533. func_len ()
  6534. {
  6535. func_len_result=${#1}
  6536. }
  6537. _LT_EOF
  6538. ;;
  6539. *) # Bourne compatible functions.
  6540. cat << \_LT_EOF >> "$cfgfile"
  6541. # func_dirname file append nondir_replacement
  6542. # Compute the dirname of FILE. If nonempty, add APPEND to the result,
  6543. # otherwise set result to NONDIR_REPLACEMENT.
  6544. func_dirname ()
  6545. {
  6546. # Extract subdirectory from the argument.
  6547. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
  6548. if test "X$func_dirname_result" = "X${1}"; then
  6549. func_dirname_result="${3}"
  6550. else
  6551. func_dirname_result="$func_dirname_result${2}"
  6552. fi
  6553. }
  6554. # func_basename file
  6555. func_basename ()
  6556. {
  6557. func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
  6558. }
  6559. dnl func_dirname_and_basename
  6560. dnl A portable version of this function is already defined in general.m4sh
  6561. dnl so there is no need for it here.
  6562. # func_stripname prefix suffix name
  6563. # strip PREFIX and SUFFIX off of NAME.
  6564. # PREFIX and SUFFIX must not contain globbing or regex special
  6565. # characters, hashes, percent signs, but SUFFIX may contain a leading
  6566. # dot (in which case that matches only a dot).
  6567. # func_strip_suffix prefix name
  6568. func_stripname ()
  6569. {
  6570. case ${2} in
  6571. .*) func_stripname_result=`$ECHO "X${3}" \
  6572. | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
  6573. *) func_stripname_result=`$ECHO "X${3}" \
  6574. | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
  6575. esac
  6576. }
  6577. # sed scripts:
  6578. my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
  6579. my_sed_long_arg='1s/^-[[^=]]*=//'
  6580. # func_opt_split
  6581. func_opt_split ()
  6582. {
  6583. func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
  6584. func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
  6585. }
  6586. # func_lo2o object
  6587. func_lo2o ()
  6588. {
  6589. func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
  6590. }
  6591. # func_xform libobj-or-source
  6592. func_xform ()
  6593. {
  6594. func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
  6595. }
  6596. # func_arith arithmetic-term...
  6597. func_arith ()
  6598. {
  6599. func_arith_result=`expr "$[@]"`
  6600. }
  6601. # func_len string
  6602. # STRING may not start with a hyphen.
  6603. func_len ()
  6604. {
  6605. func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
  6606. }
  6607. _LT_EOF
  6608. esac
  6609. case $lt_shell_append in
  6610. yes)
  6611. cat << \_LT_EOF >> "$cfgfile"
  6612. # func_append var value
  6613. # Append VALUE to the end of shell variable VAR.
  6614. func_append ()
  6615. {
  6616. eval "$[1]+=\$[2]"
  6617. }
  6618. _LT_EOF
  6619. ;;
  6620. *)
  6621. cat << \_LT_EOF >> "$cfgfile"
  6622. # func_append var value
  6623. # Append VALUE to the end of shell variable VAR.
  6624. func_append ()
  6625. {
  6626. eval "$[1]=\$$[1]\$[2]"
  6627. }
  6628. _LT_EOF
  6629. ;;
  6630. esac
  6631. ])