libtool.m4 225 KB

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