libtool.m4 225 KB

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