libtool 178 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346
  1. #! /bin/sh
  2. # libtoolT - Provide generalized library-building support services.
  3. # Generated automatically by (GNU )
  4. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  5. #
  6. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
  7. # Free Software Foundation, Inc.
  8. #
  9. # This file is part of GNU Libtool:
  10. # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  11. #
  12. # This program is free software; you can redistribute it and/or modify
  13. # it under the terms of the GNU General Public License as published by
  14. # the Free Software Foundation; either version 2 of the License, or
  15. # (at your option) any later version.
  16. #
  17. # This program is distributed in the hope that it will be useful, but
  18. # WITHOUT ANY WARRANTY; without even the implied warranty of
  19. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  20. # General Public License for more details.
  21. #
  22. # You should have received a copy of the GNU General Public License
  23. # along with this program; if not, write to the Free Software
  24. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  25. #
  26. # As a special exception to the GNU General Public License, if you
  27. # distribute this file as part of a program that contains a
  28. # configuration script generated by Autoconf, you may include it under
  29. # the same distribution terms that you use for the rest of that program.
  30. # Sed that helps us avoid accidentally triggering echo(1) options like -n.
  31. Xsed="sed -e s/^X//"
  32. # The HP-UX ksh and POSIX shell print the target directory to stdout
  33. # if CDPATH is set.
  34. if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
  35. # The names of the tagged configurations supported by this script.
  36. available_tags=" CXX GCJ"
  37. # ### BEGIN LIBTOOL CONFIG
  38. # Libtool was configured on host alice:
  39. # Shell to use when invoking shell scripts.
  40. SHELL="/bin/sh"
  41. # Whether or not to build shared libraries.
  42. build_libtool_libs=yes
  43. # Whether or not to build static libraries.
  44. build_old_libs=yes
  45. # Whether or not to add -lc for building shared libraries.
  46. build_libtool_need_lc=no
  47. # Whether or not to optimize for fast installation.
  48. fast_install=yes
  49. # The host system.
  50. host_alias=
  51. host=i686-pc-linux-gnu
  52. # An echo program that does not interpret backslashes.
  53. echo="echo"
  54. # The archiver.
  55. AR="ar"
  56. AR_FLAGS="cru"
  57. # A C compiler.
  58. LTCC=gcc
  59. # A language-specific compiler.
  60. CC="gcc"
  61. # Is the compiler the GNU C compiler?
  62. with_gcc=yes
  63. # The linker used to build libraries.
  64. LD="/usr/bin/ld"
  65. # Whether we need hard or soft links.
  66. LN_S="ln -s"
  67. # A BSD-compatible nm program.
  68. NM="/usr/bin/nm -B"
  69. # A symbol stripping program
  70. STRIP=strip
  71. # Used to examine libraries when file_magic_cmd begins "file"
  72. MAGIC_CMD=file
  73. # Used on cygwin: DLL creation program.
  74. DLLTOOL="dlltool"
  75. # Used on cygwin: object dumper.
  76. OBJDUMP="objdump"
  77. # Used on cygwin: assembler.
  78. AS="as"
  79. # The name of the directory that contains temporary libtool files.
  80. objdir=.libs
  81. # How to create reloadable object files.
  82. reload_flag=" -r"
  83. reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
  84. # How to pass a linker flag through the compiler.
  85. wl="-Wl,"
  86. # Object file suffix (normally "o").
  87. objext="o"
  88. # Old archive suffix (normally "a").
  89. libext="a"
  90. # Executable file suffix (normally "").
  91. exeext=""
  92. # Additional compiler flags for building library objects.
  93. pic_flag=" -fPIC -DPIC"
  94. pic_mode=default
  95. # What is the maximum length of a command?
  96. max_cmd_len=49153
  97. # Does compiler simultaneously support -c and -o options?
  98. compiler_c_o="yes"
  99. # Must we lock files when doing compilation ?
  100. need_locks="no"
  101. # Do we need the lib prefix for modules?
  102. need_lib_prefix=no
  103. # Do we need a version for libraries?
  104. need_version=no
  105. # Whether dlopen is supported.
  106. dlopen_support=unknown
  107. # Whether dlopen of programs is supported.
  108. dlopen_self=unknown
  109. # Whether dlopen of statically linked programs is supported.
  110. dlopen_self_static=unknown
  111. # Compiler flag to prevent dynamic linking.
  112. link_static_flag="-static"
  113. # Compiler flag to turn off builtin functions.
  114. no_builtin_flag=" -fno-builtin -fno-rtti -fno-exceptions"
  115. # Compiler flag to allow reflexive dlopens.
  116. export_dynamic_flag_spec="\${wl}--export-dynamic"
  117. # Compiler flag to generate shared objects directly from archives.
  118. whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
  119. # Compiler flag to generate thread-safe objects.
  120. thread_safe_flag_spec=""
  121. # Library versioning type.
  122. version_type=linux
  123. # Format of library name prefix.
  124. libname_spec="lib\$name"
  125. # List of archive names. First name is the real one, the rest are links.
  126. # The last name is the one that the linker finds with -lNAME.
  127. library_names_spec="\${libname}\${release}.so\$versuffix \${libname}\${release}.so\$major \$libname.so"
  128. # The coded name of the library, if different from the real name.
  129. soname_spec="\${libname}\${release}.so\$major"
  130. # Commands used to build and install an old-style archive.
  131. RANLIB="ranlib"
  132. old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
  133. old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib"
  134. old_postuninstall_cmds=""
  135. # Create an old-style archive from a shared archive.
  136. old_archive_from_new_cmds=""
  137. # Create a temporary old-style archive to link instead of a shared archive.
  138. old_archive_from_expsyms_cmds=""
  139. # Commands used to build and install a shared archive.
  140. archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
  141. archive_expsym_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-retain-symbols-file \$wl\$export_symbols -o \$lib"
  142. postinstall_cmds=""
  143. postuninstall_cmds=""
  144. # Commands to strip libraries.
  145. old_striplib="strip --strip-debug"
  146. striplib="strip --strip-unneeded"
  147. # Dependencies to place before the objects being linked to create a
  148. # shared library.
  149. predep_objects=""
  150. # Dependencies to place after the objects being linked to create a
  151. # shared library.
  152. postdep_objects=""
  153. # Dependencies to place before the objects being linked to create a
  154. # shared library.
  155. predeps=""
  156. # Dependencies to place after the objects being linked to create a
  157. # shared library.
  158. postdeps=""
  159. # The library search path used internally by the compiler when linking
  160. # a shared library.
  161. compiler_lib_search_path=""
  162. # Method to check whether dependent libraries are shared objects.
  163. deplibs_check_method="pass_all"
  164. # Command to use when deplibs_check_method == file_magic.
  165. file_magic_cmd="\$MAGIC_CMD"
  166. # Flag that allows shared libraries with undefined symbols to be built.
  167. allow_undefined_flag=""
  168. # Flag that forces no undefined symbols.
  169. no_undefined_flag=""
  170. # Commands used to finish a libtool library installation in a directory.
  171. finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
  172. # Same as above, but a single script fragment to be evaled but not shown.
  173. finish_eval=""
  174. # Take the output of nm and produce a listing of raw symbols and C names.
  175. global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGISTW][ABCDGISTW]*\\)[ ][ ]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'"
  176. # Transform the output of nm in a proper C declaration
  177. global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
  178. # Transform the output of nm in a C name address pair
  179. global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
  180. # This is the shared library runtime path variable.
  181. runpath_var=LD_RUN_PATH
  182. # This is the shared library path variable.
  183. shlibpath_var=LD_LIBRARY_PATH
  184. # Is shlibpath searched before the hard-coded library search path?
  185. shlibpath_overrides_runpath=no
  186. # How to hardcode a shared library path into an executable.
  187. hardcode_action=immediate
  188. # Whether we should hardcode library paths into libraries.
  189. hardcode_into_libs=yes
  190. # Flag to hardcode $libdir into a binary during linking.
  191. # This must work even if $libdir does not exist.
  192. hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"
  193. # Whether we need a single -rpath flag with a separated argument.
  194. hardcode_libdir_separator=""
  195. # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
  196. # resulting binary.
  197. hardcode_direct=no
  198. # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
  199. # resulting binary.
  200. hardcode_minus_L=no
  201. # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
  202. # the resulting binary.
  203. hardcode_shlibpath_var=unsupported
  204. # Variables whose values should be saved in libtool wrapper scripts and
  205. # restored at relink time.
  206. variables_saved_for_relink="PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  207. # Whether libtool must link a program against all its dependency libraries.
  208. link_all_deplibs=unknown
  209. # Compile-time system search path for libraries
  210. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  211. # Run-time system search path for libraries
  212. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  213. # Fix the shell variable $srcfile for the compiler.
  214. fix_srcfile_path=""
  215. # Set to yes if exported symbols are required.
  216. always_export_symbols=no
  217. # The commands to list exported symbols.
  218. export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | sed 's/.* //' | sort | uniq > \$export_symbols"
  219. # The commands to extract the exported symbol list from a shared archive.
  220. extract_expsyms_cmds=""
  221. # Symbols that should not be listed in the preloaded symbols.
  222. exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
  223. # Symbols that must always be exported.
  224. include_expsyms=""
  225. # ### END LIBTOOL CONFIG
  226. # ltmain.sh - Provide generalized library-building support services.
  227. # NOTE: Changing this file will not affect anything until you rerun configure.
  228. #
  229. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
  230. # Free Software Foundation, Inc.
  231. # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  232. #
  233. # This program is free software; you can redistribute it and/or modify
  234. # it under the terms of the GNU General Public License as published by
  235. # the Free Software Foundation; either version 2 of the License, or
  236. # (at your option) any later version.
  237. #
  238. # This program is distributed in the hope that it will be useful, but
  239. # WITHOUT ANY WARRANTY; without even the implied warranty of
  240. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  241. # General Public License for more details.
  242. #
  243. # You should have received a copy of the GNU General Public License
  244. # along with this program; if not, write to the Free Software
  245. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  246. #
  247. # As a special exception to the GNU General Public License, if you
  248. # distribute this file as part of a program that contains a
  249. # configuration script generated by Autoconf, you may include it under
  250. # the same distribution terms that you use for the rest of that program.
  251. # Check that we have a working $echo.
  252. if test "X$1" = X--no-reexec; then
  253. # Discard the --no-reexec flag, and continue.
  254. shift
  255. elif test "X$1" = X--fallback-echo; then
  256. # Avoid inline document here, it may be left over
  257. :
  258. elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
  259. # Yippee, $echo works!
  260. :
  261. else
  262. # Restart under the correct shell, and then maybe $echo will work.
  263. exec $SHELL "$0" --no-reexec ${1+"$@"}
  264. fi
  265. if test "X$1" = X--fallback-echo; then
  266. # used as fallback echo
  267. shift
  268. cat <<EOF
  269. $*
  270. EOF
  271. exit 0
  272. fi
  273. # The name of this program.
  274. progname=`$echo "$0" | sed 's%^.*/%%'`
  275. modename="$progname"
  276. # Constants.
  277. PROGRAM=ltmain.sh
  278. PACKAGE=libtool
  279. VERSION=1.4b
  280. TIMESTAMP=" (1.971 2001/07/09 22:02:09)"
  281. default_mode=
  282. help="Try \`$progname --help' for more information."
  283. magic="%%%MAGIC variable%%%"
  284. mkdir="mkdir"
  285. mv="mv -f"
  286. rm="rm -f"
  287. # Sed substitution that helps us do robust quoting. It backslashifies
  288. # metacharacters that are still active within double-quoted strings.
  289. Xsed='sed -e 1s/^X//'
  290. sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
  291. SP2NL='tr \040 \012'
  292. NL2SP='tr \015\012 \040\040'
  293. # NLS nuisances.
  294. # Only set LANG and LC_ALL to C if already set.
  295. # These must not be set unconditionally because not all systems understand
  296. # e.g. LANG=C (notably SCO).
  297. # We save the old values to restore during execute mode.
  298. if test "${LC_ALL+set}" = set; then
  299. save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
  300. fi
  301. if test "${LANG+set}" = set; then
  302. save_LANG="$LANG"; LANG=C; export LANG
  303. fi
  304. if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
  305. echo "$modename: not configured to build any kind of library" 1>&2
  306. echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
  307. exit 1
  308. fi
  309. # Global variables.
  310. mode=$default_mode
  311. nonopt=
  312. prev=
  313. prevopt=
  314. run=
  315. show="$echo"
  316. show_help=
  317. execute_dlfiles=
  318. lo2o="s/\\.lo\$/.${objext}/"
  319. o2lo="s/\\.${objext}\$/.lo/"
  320. # Parse our command line options once, thoroughly.
  321. while test $# -gt 0
  322. do
  323. arg="$1"
  324. shift
  325. case $arg in
  326. -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
  327. *) optarg= ;;
  328. esac
  329. # If the previous option needs an argument, assign it.
  330. if test -n "$prev"; then
  331. case $prev in
  332. execute_dlfiles)
  333. execute_dlfiles="$execute_dlfiles $arg"
  334. ;;
  335. tag)
  336. tagname="$arg"
  337. # Check whether tagname contains only valid characters
  338. case $tagname in
  339. *[!-_A-Za-z0-9,/]*)
  340. echo "$progname: invalid tag name: $tagname" 1>&2
  341. exit 1
  342. ;;
  343. esac
  344. case $tagname in
  345. CC)
  346. # Don't test for the "default" C tag, as we know, it's there, but
  347. # not specially marked.
  348. ;;
  349. *)
  350. if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then
  351. taglist="$taglist $tagname"
  352. # Evaluate the configuration.
  353. eval "`sed -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`"
  354. else
  355. echo "$progname: ignoring unknown tag $tagname" 1>&2
  356. fi
  357. ;;
  358. esac
  359. ;;
  360. *)
  361. eval "$prev=\$arg"
  362. ;;
  363. esac
  364. prev=
  365. prevopt=
  366. continue
  367. fi
  368. # Have we seen a non-optional argument yet?
  369. case $arg in
  370. --help)
  371. show_help=yes
  372. ;;
  373. --version)
  374. echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
  375. echo
  376. echo "Copyright 1996, 1997, 1998, 1999, 2000, 2001"
  377. echo "Free Software Foundation, Inc."
  378. echo "This is free software; see the source for copying conditions. There is NO"
  379. echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
  380. exit 0
  381. ;;
  382. --config)
  383. sed -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0
  384. # Now print the configurations for the tags.
  385. for tagname in $taglist; do
  386. sed -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$0"
  387. done
  388. exit 0
  389. ;;
  390. --debug)
  391. echo "$progname: enabling shell trace mode"
  392. set -x
  393. ;;
  394. --dry-run | -n)
  395. run=:
  396. ;;
  397. --features)
  398. echo "host: $host"
  399. if test "$build_libtool_libs" = yes; then
  400. echo "enable shared libraries"
  401. else
  402. echo "disable shared libraries"
  403. fi
  404. if test "$build_old_libs" = yes; then
  405. echo "enable static libraries"
  406. else
  407. echo "disable static libraries"
  408. fi
  409. exit 0
  410. ;;
  411. --finish) mode="finish" ;;
  412. --mode) prevopt="--mode" prev=mode ;;
  413. --mode=*) mode="$optarg" ;;
  414. --quiet | --silent)
  415. show=:
  416. ;;
  417. --tag) prevopt="--tag" prev=tag ;;
  418. --tag=*)
  419. set tag "$optarg" ${1+"$@"}
  420. shift
  421. prev=tag
  422. ;;
  423. -dlopen)
  424. prevopt="-dlopen"
  425. prev=execute_dlfiles
  426. ;;
  427. -*)
  428. $echo "$modename: unrecognized option \`$arg'" 1>&2
  429. $echo "$help" 1>&2
  430. exit 1
  431. ;;
  432. *)
  433. nonopt="$arg"
  434. break
  435. ;;
  436. esac
  437. done
  438. if test -n "$prevopt"; then
  439. $echo "$modename: option \`$prevopt' requires an argument" 1>&2
  440. $echo "$help" 1>&2
  441. exit 1
  442. fi
  443. # If this variable is set in any of the actions, the command in it
  444. # will be execed at the end. This prevents here-documents from being
  445. # left over by shells.
  446. exec_cmd=
  447. if test -z "$show_help"; then
  448. # Infer the operation mode.
  449. if test -z "$mode"; then
  450. case $nonopt in
  451. *cc | *++ | gcc* | *-gcc*)
  452. mode=link
  453. for arg
  454. do
  455. case $arg in
  456. -c)
  457. mode=compile
  458. break
  459. ;;
  460. esac
  461. done
  462. ;;
  463. *db | *dbx | *strace | *truss)
  464. mode=execute
  465. ;;
  466. *install*|cp|mv)
  467. mode=install
  468. ;;
  469. *rm)
  470. mode=uninstall
  471. ;;
  472. *)
  473. # If we have no mode, but dlfiles were specified, then do execute mode.
  474. test -n "$execute_dlfiles" && mode=execute
  475. # Just use the default operation mode.
  476. if test -z "$mode"; then
  477. if test -n "$nonopt"; then
  478. $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
  479. else
  480. $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
  481. fi
  482. fi
  483. ;;
  484. esac
  485. fi
  486. # Only execute mode is allowed to have -dlopen flags.
  487. if test -n "$execute_dlfiles" && test "$mode" != execute; then
  488. $echo "$modename: unrecognized option \`-dlopen'" 1>&2
  489. $echo "$help" 1>&2
  490. exit 1
  491. fi
  492. # Change the help message to a mode-specific one.
  493. generic_help="$help"
  494. help="Try \`$modename --help --mode=$mode' for more information."
  495. # These modes are in order of execution frequency so that they run quickly.
  496. case $mode in
  497. # libtool compile mode
  498. compile)
  499. modename="$modename: compile"
  500. # Get the compilation command and the source file.
  501. base_compile=
  502. prev=
  503. lastarg=
  504. srcfile="$nonopt"
  505. suppress_output=
  506. user_target=no
  507. for arg
  508. do
  509. case $prev in
  510. "") ;;
  511. xcompiler)
  512. # Aesthetically quote the previous argument.
  513. prev=
  514. lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
  515. case $arg in
  516. # Double-quote args containing other shell metacharacters.
  517. # Many Bourne shells cannot handle close brackets correctly
  518. # in scan sets, so we specify it separately.
  519. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
  520. arg="\"$arg\""
  521. ;;
  522. esac
  523. # Add the previous argument to base_compile.
  524. if test -z "$base_compile"; then
  525. base_compile="$lastarg"
  526. else
  527. base_compile="$base_compile $lastarg"
  528. fi
  529. continue
  530. ;;
  531. esac
  532. # Accept any command-line options.
  533. case $arg in
  534. -o)
  535. if test "$user_target" != "no"; then
  536. $echo "$modename: you cannot specify \`-o' more than once" 1>&2
  537. exit 1
  538. fi
  539. user_target=next
  540. ;;
  541. -static)
  542. build_old_libs=yes
  543. continue
  544. ;;
  545. -prefer-pic)
  546. pic_mode=yes
  547. continue
  548. ;;
  549. -prefer-non-pic)
  550. pic_mode=no
  551. continue
  552. ;;
  553. -Xcompiler)
  554. prev=xcompiler
  555. continue
  556. ;;
  557. -Wc,*)
  558. args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
  559. lastarg=
  560. IFS="${IFS= }"; save_ifs="$IFS"; IFS=','
  561. for arg in $args; do
  562. IFS="$save_ifs"
  563. # Double-quote args containing other shell metacharacters.
  564. # Many Bourne shells cannot handle close brackets correctly
  565. # in scan sets, so we specify it separately.
  566. case $arg in
  567. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
  568. arg="\"$arg\""
  569. ;;
  570. esac
  571. lastarg="$lastarg $arg"
  572. done
  573. IFS="$save_ifs"
  574. lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
  575. # Add the arguments to base_compile.
  576. if test -z "$base_compile"; then
  577. base_compile="$lastarg"
  578. else
  579. base_compile="$base_compile $lastarg"
  580. fi
  581. continue
  582. ;;
  583. esac
  584. case $user_target in
  585. next)
  586. # The next one is the -o target name
  587. user_target=yes
  588. continue
  589. ;;
  590. yes)
  591. # We got the output file
  592. user_target=set
  593. libobj="$arg"
  594. continue
  595. ;;
  596. esac
  597. # Accept the current argument as the source file.
  598. lastarg="$srcfile"
  599. srcfile="$arg"
  600. # Aesthetically quote the previous argument.
  601. # Backslashify any backslashes, double quotes, and dollar signs.
  602. # These are the only characters that are still specially
  603. # interpreted inside of double-quoted scrings.
  604. lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
  605. # Double-quote args containing other shell metacharacters.
  606. # Many Bourne shells cannot handle close brackets correctly
  607. # in scan sets, so we specify it separately.
  608. case $lastarg in
  609. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
  610. lastarg="\"$lastarg\""
  611. ;;
  612. esac
  613. # Add the previous argument to base_compile.
  614. if test -z "$base_compile"; then
  615. base_compile="$lastarg"
  616. else
  617. base_compile="$base_compile $lastarg"
  618. fi
  619. done
  620. case $user_target in
  621. set)
  622. ;;
  623. no)
  624. # Get the name of the library object.
  625. libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
  626. ;;
  627. *)
  628. $echo "$modename: you must specify a target with \`-o'" 1>&2
  629. exit 1
  630. ;;
  631. esac
  632. # Recognize several different file suffixes.
  633. # If the user specifies -o file.o, it is replaced with file.lo
  634. xform='[cCFSifmso]'
  635. case $libobj in
  636. *.ada) xform=ada ;;
  637. *.adb) xform=adb ;;
  638. *.ads) xform=ads ;;
  639. *.asm) xform=asm ;;
  640. *.c++) xform=c++ ;;
  641. *.cc) xform=cc ;;
  642. *.ii) xform=ii ;;
  643. *.class) xform=class ;;
  644. *.cpp) xform=cpp ;;
  645. *.cxx) xform=cxx ;;
  646. *.f90) xform=f90 ;;
  647. *.for) xform=for ;;
  648. *.java) xform=java ;;
  649. esac
  650. libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
  651. case $libobj in
  652. *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
  653. *)
  654. $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
  655. exit 1
  656. ;;
  657. esac
  658. # Infer tagged configuration to use if any are available and
  659. # if one wasn't chosen via the "--tag" command line option.
  660. # Only attempt this if the compiler in the base compile
  661. # command doesn't match the default compiler.
  662. if test -n "$available_tags" && test -z "$tagname"; then
  663. case $base_compile in
  664. "$CC "*) ;;
  665. # Blanks in the command may have been stripped by the calling shell,
  666. # but not from the CC environment variable when ltconfig was run.
  667. "`$echo $CC` "*) ;;
  668. *)
  669. for z in $available_tags; do
  670. if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
  671. # Evaluate the configuration.
  672. eval "`sed -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
  673. case $base_compile in
  674. "$CC "*)
  675. # The compiler in the base compile command matches
  676. # the one in the tagged configuration.
  677. # Assume this is the tagged configuration we want.
  678. tagname=$z
  679. break
  680. ;;
  681. "`$echo $CC` "*)
  682. tagname=$z
  683. break
  684. ;;
  685. esac
  686. fi
  687. done
  688. # If $tagname still isn't set, then no tagged configuration
  689. # was found and let the user know that the "--tag" command
  690. # line option must be used.
  691. if test -z "$tagname"; then
  692. echo "$modename: unable to infer tagged configuration"
  693. echo "$modename: specify a tag with \`--tag'" 1>&2
  694. exit 1
  695. # else
  696. # echo "$modename: using $tagname tagged configuration"
  697. fi
  698. ;;
  699. esac
  700. fi
  701. objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
  702. xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
  703. if test "X$xdir" = "X$obj"; then
  704. xdir=
  705. else
  706. xdir=$xdir/
  707. fi
  708. lobj=${xdir}$objdir/$objname
  709. if test -z "$base_compile"; then
  710. $echo "$modename: you must specify a compilation command" 1>&2
  711. $echo "$help" 1>&2
  712. exit 1
  713. fi
  714. # Delete any leftover library objects.
  715. if test "$build_old_libs" = yes; then
  716. removelist="$obj $lobj $libobj ${libobj}T"
  717. else
  718. removelist="$lobj $libobj ${libobj}T"
  719. fi
  720. $run $rm $removelist
  721. trap "$run $rm $removelist; exit 1" 1 2 15
  722. # On Cygwin there's no "real" PIC flag so we must build both object types
  723. case $host_os in
  724. cygwin* | mingw* | pw32* | os2*)
  725. pic_mode=default
  726. ;;
  727. esac
  728. if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
  729. # non-PIC code in shared libraries is not supported
  730. pic_mode=default
  731. fi
  732. # Calculate the filename of the output object if compiler does
  733. # not support -o with -c
  734. if test "$compiler_c_o" = no; then
  735. output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
  736. lockfile="$output_obj.lock"
  737. removelist="$removelist $output_obj $lockfile"
  738. trap "$run $rm $removelist; exit 1" 1 2 15
  739. else
  740. output_obj=
  741. need_locks=no
  742. lockfile=
  743. fi
  744. # Lock this critical section if it is needed
  745. # We use this script file to make the link, it avoids creating a new file
  746. if test "$need_locks" = yes; then
  747. until $run ln "$0" "$lockfile" 2>/dev/null; do
  748. $show "Waiting for $lockfile to be removed"
  749. sleep 2
  750. done
  751. elif test "$need_locks" = warn; then
  752. if test -f "$lockfile"; then
  753. echo "\
  754. *** ERROR, $lockfile exists and contains:
  755. `cat $lockfile 2>/dev/null`
  756. This indicates that another process is trying to use the same
  757. temporary object file, and libtool could not work around it because
  758. your compiler does not support \`-c' and \`-o' together. If you
  759. repeat this compilation, it may succeed, by chance, but you had better
  760. avoid parallel builds (make -j) in this platform, or get a better
  761. compiler."
  762. $run $rm $removelist
  763. exit 1
  764. fi
  765. echo $srcfile > "$lockfile"
  766. fi
  767. if test -n "$fix_srcfile_path"; then
  768. eval srcfile=\"$fix_srcfile_path\"
  769. fi
  770. $run $rm "$libobj" "${libobj}T"
  771. # Create a libtool object file (analogous to a ".la" file),
  772. # but don't create it if we're doing a dry run.
  773. test -z "$run" && cat > ${libobj}T <<EOF
  774. # $libobj - a libtool object file
  775. # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
  776. #
  777. # Please DO NOT delete this file!
  778. # It is necessary for linking the library.
  779. # Name of the PIC object.
  780. EOF
  781. # Only build a PIC object if we are building libtool libraries.
  782. if test "$build_libtool_libs" = yes; then
  783. # Without this assignment, base_compile gets emptied.
  784. fbsd_hideous_sh_bug=$base_compile
  785. if test "$pic_mode" != no; then
  786. command="$base_compile $srcfile $pic_flag"
  787. else
  788. # Don't build PIC code
  789. command="$base_compile $srcfile"
  790. fi
  791. if test ! -d ${xdir}$objdir; then
  792. $show "$mkdir ${xdir}$objdir"
  793. $run $mkdir ${xdir}$objdir
  794. status=$?
  795. if test $status -ne 0 && test ! -d ${xdir}$objdir; then
  796. exit $status
  797. fi
  798. fi
  799. if test -z "$output_obj"; then
  800. # Place PIC objects in $objdir
  801. command="$command -o $lobj"
  802. fi
  803. $run $rm "$lobj" "$output_obj"
  804. $show "$command"
  805. if $run eval "$command"; then :
  806. else
  807. test -n "$output_obj" && $run $rm $removelist
  808. exit 1
  809. fi
  810. if test "$need_locks" = warn &&
  811. test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
  812. echo "\
  813. *** ERROR, $lockfile contains:
  814. `cat $lockfile 2>/dev/null`
  815. but it should contain:
  816. $srcfile
  817. This indicates that another process is trying to use the same
  818. temporary object file, and libtool could not work around it because
  819. your compiler does not support \`-c' and \`-o' together. If you
  820. repeat this compilation, it may succeed, by chance, but you had better
  821. avoid parallel builds (make -j) in this platform, or get a better
  822. compiler."
  823. $run $rm $removelist
  824. exit 1
  825. fi
  826. # Just move the object if needed, then go on to compile the next one
  827. if test -n "$output_obj" && test "x$output_obj" != "x$lobj"; then
  828. $show "$mv $output_obj $lobj"
  829. if $run $mv $output_obj $lobj; then :
  830. else
  831. error=$?
  832. $run $rm $removelist
  833. exit $error
  834. fi
  835. fi
  836. # Append the name of the PIC object to the libtool object file.
  837. test -z "$run" && cat >> ${libobj}T <<EOF
  838. pic_object='$objdir/$objname'
  839. EOF
  840. # Allow error messages only from the first compilation.
  841. suppress_output=' >/dev/null 2>&1'
  842. else
  843. # No PIC object so indicate it doesn't exist in the libtool
  844. # object file.
  845. test -z "$run" && cat >> ${libobj}T <<EOF
  846. pic_object=none
  847. EOF
  848. fi
  849. # Only build a position-dependent object if we build old libraries.
  850. if test "$build_old_libs" = yes; then
  851. if test "$pic_mode" != yes; then
  852. # Don't build PIC code
  853. command="$base_compile $srcfile"
  854. else
  855. command="$base_compile $srcfile $pic_flag"
  856. fi
  857. if test "$compiler_c_o" = yes; then
  858. command="$command -o $obj"
  859. fi
  860. # Suppress compiler output if we already did a PIC compilation.
  861. command="$command$suppress_output"
  862. $run $rm "$obj" "$output_obj"
  863. $show "$command"
  864. if $run eval "$command"; then :
  865. else
  866. $run $rm $removelist
  867. exit 1
  868. fi
  869. if test "$need_locks" = warn &&
  870. test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
  871. echo "\
  872. *** ERROR, $lockfile contains:
  873. `cat $lockfile 2>/dev/null`
  874. but it should contain:
  875. $srcfile
  876. This indicates that another process is trying to use the same
  877. temporary object file, and libtool could not work around it because
  878. your compiler does not support \`-c' and \`-o' together. If you
  879. repeat this compilation, it may succeed, by chance, but you had better
  880. avoid parallel builds (make -j) in this platform, or get a better
  881. compiler."
  882. $run $rm $removelist
  883. exit 1
  884. fi
  885. # Just move the object if needed
  886. if test -n "$output_obj" && test "x$output_obj" != "x$obj"; then
  887. $show "$mv $output_obj $obj"
  888. if $run $mv $output_obj $obj; then :
  889. else
  890. error=$?
  891. $run $rm $removelist
  892. exit $error
  893. fi
  894. fi
  895. # Append the name of the non-PIC object the libtool object file.
  896. # Only append if the libtool object file exists.
  897. test -z "$run" && cat >> ${libobj}T <<EOF
  898. # Name of the non-PIC object.
  899. non_pic_object='$objname'
  900. EOF
  901. else
  902. # Append the name of the non-PIC object the libtool object file.
  903. # Only append if the libtool object file exists.
  904. test -z "$run" && cat >> ${libobj}T <<EOF
  905. # Name of the non-PIC object.
  906. non_pic_object=none
  907. EOF
  908. fi
  909. $run $mv "${libobj}T" "${libobj}"
  910. # Unlock the critical section if it was locked
  911. if test "$need_locks" != no; then
  912. $run $rm "$lockfile"
  913. fi
  914. exit 0
  915. ;;
  916. # libtool link mode
  917. link | relink)
  918. modename="$modename: link"
  919. case $host in
  920. *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
  921. # It is impossible to link a dll without this setting, and
  922. # we shouldn't force the makefile maintainer to figure out
  923. # which system we are compiling for in order to pass an extra
  924. # flag for every libtool invokation.
  925. # allow_undefined=no
  926. # FIXME: Unfortunately, there are problems with the above when trying
  927. # to make a dll which has undefined symbols, in which case not
  928. # even a static library is built. For now, we need to specify
  929. # -no-undefined on the libtool link line when we can be certain
  930. # that all symbols are satisfied, otherwise we get a static library.
  931. allow_undefined=yes
  932. ;;
  933. *)
  934. allow_undefined=yes
  935. ;;
  936. esac
  937. libtool_args="$nonopt"
  938. base_compile="$nonopt"
  939. compile_command="$nonopt"
  940. finalize_command="$nonopt"
  941. compile_rpath=
  942. finalize_rpath=
  943. compile_shlibpath=
  944. finalize_shlibpath=
  945. convenience=
  946. old_convenience=
  947. deplibs=
  948. old_deplibs=
  949. compiler_flags=
  950. linker_flags=
  951. dllsearchpath=
  952. lib_search_path=`pwd`
  953. avoid_version=no
  954. dlfiles=
  955. dlprefiles=
  956. dlself=no
  957. export_dynamic=no
  958. export_symbols=
  959. export_symbols_regex=
  960. generated=
  961. libobjs=
  962. ltlibs=
  963. module=no
  964. no_install=no
  965. objs=
  966. non_pic_objects=
  967. prefer_static_libs=no
  968. preload=no
  969. prev=
  970. prevarg=
  971. release=
  972. rpath=
  973. xrpath=
  974. perm_rpath=
  975. temp_rpath=
  976. thread_safe=no
  977. vinfo=
  978. # We need to know -static, to get the right output filenames.
  979. for arg
  980. do
  981. case $arg in
  982. -all-static | -static)
  983. if test "X$arg" = "X-all-static"; then
  984. if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
  985. $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
  986. fi
  987. if test -n "$link_static_flag"; then
  988. dlopen_self=$dlopen_self_static
  989. fi
  990. else
  991. if test -z "$pic_flag" && test -n "$link_static_flag"; then
  992. dlopen_self=$dlopen_self_static
  993. fi
  994. fi
  995. build_libtool_libs=no
  996. build_old_libs=yes
  997. prefer_static_libs=yes
  998. break
  999. ;;
  1000. esac
  1001. done
  1002. # See if our shared archives depend on static archives.
  1003. test -n "$old_archive_from_new_cmds" && build_old_libs=yes
  1004. # Go through the arguments, transforming them on the way.
  1005. while test $# -gt 0; do
  1006. arg="$1"
  1007. base_compile="$base_compile $arg"
  1008. shift
  1009. case $arg in
  1010. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
  1011. qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
  1012. ;;
  1013. *) qarg=$arg ;;
  1014. esac
  1015. libtool_args="$libtool_args $qarg"
  1016. # If the previous option needs an argument, assign it.
  1017. if test -n "$prev"; then
  1018. case $prev in
  1019. output)
  1020. compile_command="$compile_command @OUTPUT@"
  1021. finalize_command="$finalize_command @OUTPUT@"
  1022. ;;
  1023. esac
  1024. case $prev in
  1025. dlfiles|dlprefiles)
  1026. if test "$preload" = no; then
  1027. # Add the symbol object into the linking commands.
  1028. compile_command="$compile_command @SYMFILE@"
  1029. finalize_command="$finalize_command @SYMFILE@"
  1030. preload=yes
  1031. fi
  1032. case $arg in
  1033. *.la | *.lo) ;; # We handle these cases below.
  1034. force)
  1035. if test "$dlself" = no; then
  1036. dlself=needless
  1037. export_dynamic=yes
  1038. fi
  1039. prev=
  1040. continue
  1041. ;;
  1042. self)
  1043. if test "$prev" = dlprefiles; then
  1044. dlself=yes
  1045. elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
  1046. dlself=yes
  1047. else
  1048. dlself=needless
  1049. export_dynamic=yes
  1050. fi
  1051. prev=
  1052. continue
  1053. ;;
  1054. *)
  1055. if test "$prev" = dlfiles; then
  1056. dlfiles="$dlfiles $arg"
  1057. else
  1058. dlprefiles="$dlprefiles $arg"
  1059. fi
  1060. prev=
  1061. continue
  1062. ;;
  1063. esac
  1064. ;;
  1065. expsyms)
  1066. export_symbols="$arg"
  1067. if test ! -f "$arg"; then
  1068. $echo "$modename: symbol file \`$arg' does not exist"
  1069. exit 1
  1070. fi
  1071. prev=
  1072. continue
  1073. ;;
  1074. expsyms_regex)
  1075. export_symbols_regex="$arg"
  1076. prev=
  1077. continue
  1078. ;;
  1079. release)
  1080. release="-$arg"
  1081. prev=
  1082. continue
  1083. ;;
  1084. objectlist)
  1085. if test -f "$arg"; then
  1086. save_arg=$arg
  1087. moreargs=
  1088. for fil in `cat $save_arg`
  1089. do
  1090. # moreargs="$moreargs $fil"
  1091. arg=$fil
  1092. # A libtool-controlled object.
  1093. # Check to see that this really is a libtool object.
  1094. if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
  1095. pic_object=
  1096. non_pic_object=
  1097. # Read the .lo file
  1098. # If there is no directory component, then add one.
  1099. case $arg in
  1100. */* | *\\*) . $arg ;;
  1101. *) . ./$arg ;;
  1102. esac
  1103. if test -z "$pic_object" || \
  1104. test -z "$non_pic_object" ||
  1105. test "$pic_object" = none && \
  1106. test "$non_pic_object" = none; then
  1107. $echo "$modename: cannot find name of object for \`$arg'" 1>&2
  1108. exit 1
  1109. fi
  1110. # Extract subdirectory from the argument.
  1111. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
  1112. if test "X$xdir" = "X$arg"; then
  1113. xdir=
  1114. else
  1115. xdir="$xdir/"
  1116. fi
  1117. if test "$pic_object" != none; then
  1118. # Prepend the subdirectory the object is found in.
  1119. pic_object="$xdir$pic_object"
  1120. if test "$prev" = dlfiles; then
  1121. if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
  1122. dlfiles="$dlfiles $pic_object"
  1123. prev=
  1124. continue
  1125. else
  1126. # If libtool objects are unsupported, then we need to preload.
  1127. prev=dlprefiles
  1128. fi
  1129. fi
  1130. # CHECK ME: I think I busted this. -Ossama
  1131. if test "$prev" = dlprefiles; then
  1132. # Preload the old-style object.
  1133. dlprefiles="$dlprefiles $pic_object"
  1134. prev=
  1135. fi
  1136. # A PIC object.
  1137. libobjs="$libobjs $pic_object"
  1138. arg="$pic_object"
  1139. fi
  1140. # Non-PIC object.
  1141. if test "$non_pic_object" != none; then
  1142. # Prepend the subdirectory the object is found in.
  1143. non_pic_object="$xdir$non_pic_object"
  1144. # A standard non-PIC object
  1145. non_pic_objects="$non_pic_objects $non_pic_object"
  1146. if test -z "$pic_object" || test "$pic_object" = none ; then
  1147. arg="$non_pic_object"
  1148. fi
  1149. fi
  1150. else
  1151. # Only an error if not doing a dry-run.
  1152. if test -z "$run"; then
  1153. $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
  1154. exit 1
  1155. else
  1156. # Dry-run case.
  1157. # Extract subdirectory from the argument.
  1158. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
  1159. if test "X$xdir" = "X$arg"; then
  1160. xdir=
  1161. else
  1162. xdir="$xdir/"
  1163. fi
  1164. pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
  1165. non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
  1166. libobjs="$libobjs $pic_object"
  1167. non_pic_objects="$non_pic_objects $non_pic_object"
  1168. fi
  1169. fi
  1170. done
  1171. else
  1172. $echo "$modename: link input file \`$save_arg' does not exist"
  1173. exit 1
  1174. fi
  1175. arg=$save_arg
  1176. prev=
  1177. continue
  1178. ;;
  1179. rpath | xrpath)
  1180. # We need an absolute path.
  1181. case $arg in
  1182. [\\/]* | [A-Za-z]:[\\/]*) ;;
  1183. *)
  1184. $echo "$modename: only absolute run-paths are allowed" 1>&2
  1185. exit 1
  1186. ;;
  1187. esac
  1188. if test "$prev" = rpath; then
  1189. case "$rpath " in
  1190. *" $arg "*) ;;
  1191. *) rpath="$rpath $arg" ;;
  1192. esac
  1193. else
  1194. case "$xrpath " in
  1195. *" $arg "*) ;;
  1196. *) xrpath="$xrpath $arg" ;;
  1197. esac
  1198. fi
  1199. prev=
  1200. continue
  1201. ;;
  1202. xcompiler)
  1203. compiler_flags="$compiler_flags $qarg"
  1204. prev=
  1205. compile_command="$compile_command $qarg"
  1206. finalize_command="$finalize_command $qarg"
  1207. continue
  1208. ;;
  1209. xlinker)
  1210. linker_flags="$linker_flags $qarg"
  1211. compiler_flags="$compiler_flags $wl$qarg"
  1212. prev=
  1213. compile_command="$compile_command $wl$qarg"
  1214. finalize_command="$finalize_command $wl$qarg"
  1215. continue
  1216. ;;
  1217. *)
  1218. eval "$prev=\"\$arg\""
  1219. prev=
  1220. continue
  1221. ;;
  1222. esac
  1223. fi # test -n $prev
  1224. prevarg="$arg"
  1225. case $arg in
  1226. -all-static)
  1227. if test -n "$link_static_flag"; then
  1228. compile_command="$compile_command $link_static_flag"
  1229. finalize_command="$finalize_command $link_static_flag"
  1230. fi
  1231. continue
  1232. ;;
  1233. -allow-undefined)
  1234. # FIXME: remove this flag sometime in the future.
  1235. $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
  1236. continue
  1237. ;;
  1238. -avoid-version)
  1239. avoid_version=yes
  1240. continue
  1241. ;;
  1242. -dlopen)
  1243. prev=dlfiles
  1244. continue
  1245. ;;
  1246. -dlpreopen)
  1247. prev=dlprefiles
  1248. continue
  1249. ;;
  1250. -export-dynamic)
  1251. export_dynamic=yes
  1252. continue
  1253. ;;
  1254. -export-symbols | -export-symbols-regex)
  1255. if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
  1256. $echo "$modename: more than one -exported-symbols argument is not allowed"
  1257. exit 1
  1258. fi
  1259. if test "X$arg" = "X-export-symbols"; then
  1260. prev=expsyms
  1261. else
  1262. prev=expsyms_regex
  1263. fi
  1264. continue
  1265. ;;
  1266. # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
  1267. # so, if we see these flags be careful not to treat them like -L
  1268. -L[A-Z][A-Z]*:*)
  1269. case $with_gcc/$host in
  1270. no/*-*-irix*)
  1271. compile_command="$compile_command $arg"
  1272. finalize_command="$finalize_command $arg"
  1273. ;;
  1274. esac
  1275. continue
  1276. ;;
  1277. -L*)
  1278. dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
  1279. # We need an absolute path.
  1280. case $dir in
  1281. [\\/]* | [A-Za-z]:[\\/]*) ;;
  1282. *)
  1283. absdir=`cd "$dir" && pwd`
  1284. if test -z "$absdir"; then
  1285. $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
  1286. exit 1
  1287. fi
  1288. dir="$absdir"
  1289. ;;
  1290. esac
  1291. case "$deplibs " in
  1292. *" -L$dir "*) ;;
  1293. *)
  1294. deplibs="$deplibs -L$dir"
  1295. lib_search_path="$lib_search_path $dir"
  1296. ;;
  1297. esac
  1298. case $host in
  1299. *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
  1300. case :$dllsearchpath: in
  1301. *":$dir:"*) ;;
  1302. *) dllsearchpath="$dllsearchpath:$dir";;
  1303. esac
  1304. ;;
  1305. esac
  1306. continue
  1307. ;;
  1308. -l*)
  1309. if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
  1310. case $host in
  1311. *-*-cygwin* | *-*-pw32* | *-*-beos*)
  1312. # These systems don't actually have a C or math library (as such)
  1313. continue
  1314. ;;
  1315. *-*-mingw* | *-*-os2*)
  1316. # These systems don't actually have a C library (as such)
  1317. test "X$arg" = "X-lc" && continue
  1318. ;;
  1319. *-*-openbsd*)
  1320. # OpenBSD uses either libc or libc_r.
  1321. continue
  1322. ;;
  1323. *-*-rhapsody* | *-*-darwin1.[012])
  1324. # Rhapsody C and math libraries are in the System framework
  1325. deplibs="$deplibs -framework System"
  1326. continue
  1327. esac
  1328. fi
  1329. if test "X$arg" = "X-lc_r"; then
  1330. case $host in
  1331. *-*-openbsd*)
  1332. # Do not include libc_r directly, use -pthread flag.
  1333. continue
  1334. ;;
  1335. esac
  1336. fi
  1337. deplibs="$deplibs $arg"
  1338. continue
  1339. ;;
  1340. -module)
  1341. module=yes
  1342. continue
  1343. ;;
  1344. -no-fast-install)
  1345. fast_install=no
  1346. continue
  1347. ;;
  1348. -no-install)
  1349. case $host in
  1350. *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
  1351. # The PATH hackery in wrapper scripts is required on Windows
  1352. # in order for the loader to find any dlls it needs.
  1353. $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
  1354. $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
  1355. fast_install=no
  1356. ;;
  1357. *) no_install=yes ;;
  1358. esac
  1359. continue
  1360. ;;
  1361. -no-undefined)
  1362. allow_undefined=no
  1363. continue
  1364. ;;
  1365. -objectlist)
  1366. prev=objectlist
  1367. continue
  1368. ;;
  1369. -o) prev=output ;;
  1370. -release)
  1371. prev=release
  1372. continue
  1373. ;;
  1374. -rpath)
  1375. prev=rpath
  1376. continue
  1377. ;;
  1378. -R)
  1379. prev=xrpath
  1380. continue
  1381. ;;
  1382. -R*)
  1383. dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
  1384. # We need an absolute path.
  1385. case $dir in
  1386. [\\/]* | [A-Za-z]:[\\/]*) ;;
  1387. *)
  1388. $echo "$modename: only absolute run-paths are allowed" 1>&2
  1389. exit 1
  1390. ;;
  1391. esac
  1392. case "$xrpath " in
  1393. *" $dir "*) ;;
  1394. *) xrpath="$xrpath $dir" ;;
  1395. esac
  1396. continue
  1397. ;;
  1398. -static)
  1399. # The effects of -static are defined in a previous loop.
  1400. # We used to do the same as -all-static on platforms that
  1401. # didn't have a PIC flag, but the assumption that the effects
  1402. # would be equivalent was wrong. It would break on at least
  1403. # Digital Unix and AIX.
  1404. continue
  1405. ;;
  1406. -thread-safe)
  1407. thread_safe=yes
  1408. continue
  1409. ;;
  1410. -version-info)
  1411. prev=vinfo
  1412. continue
  1413. ;;
  1414. -Wc,*)
  1415. args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
  1416. arg=
  1417. IFS="${IFS= }"; save_ifs="$IFS"; IFS=','
  1418. for flag in $args; do
  1419. IFS="$save_ifs"
  1420. case $flag in
  1421. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
  1422. flag="\"$flag\""
  1423. ;;
  1424. esac
  1425. arg="$arg $wl$flag"
  1426. compiler_flags="$compiler_flags $flag"
  1427. done
  1428. IFS="$save_ifs"
  1429. arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
  1430. ;;
  1431. -Wl,*)
  1432. args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
  1433. arg=
  1434. IFS="${IFS= }"; save_ifs="$IFS"; IFS=','
  1435. for flag in $args; do
  1436. IFS="$save_ifs"
  1437. case $flag in
  1438. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
  1439. flag="\"$flag\""
  1440. ;;
  1441. esac
  1442. arg="$arg $wl$flag"
  1443. compiler_flags="$compiler_flags $wl$flag"
  1444. linker_flags="$linker_flags $flag"
  1445. done
  1446. IFS="$save_ifs"
  1447. arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
  1448. ;;
  1449. -Xcompiler)
  1450. prev=xcompiler
  1451. continue
  1452. ;;
  1453. -Xlinker)
  1454. prev=xlinker
  1455. continue
  1456. ;;
  1457. # Some other compiler flag.
  1458. -* | +*)
  1459. # Unknown arguments in both finalize_command and compile_command need
  1460. # to be aesthetically quoted because they are evaled later.
  1461. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
  1462. case $arg in
  1463. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
  1464. arg="\"$arg\""
  1465. ;;
  1466. esac
  1467. ;;
  1468. *.$objext)
  1469. # A standard object.
  1470. objs="$objs $arg"
  1471. ;;
  1472. *.lo)
  1473. # A libtool-controlled object.
  1474. # Check to see that this really is a libtool object.
  1475. if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
  1476. pic_object=
  1477. non_pic_object=
  1478. # Read the .lo file
  1479. # If there is no directory component, then add one.
  1480. case $arg in
  1481. */* | *\\*) . $arg ;;
  1482. *) . ./$arg ;;
  1483. esac
  1484. if test -z "$pic_object" || \
  1485. test -z "$non_pic_object" ||
  1486. test "$pic_object" = none && \
  1487. test "$non_pic_object" = none; then
  1488. $echo "$modename: cannot find name of object for \`$arg'" 1>&2
  1489. exit 1
  1490. fi
  1491. # Extract subdirectory from the argument.
  1492. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
  1493. if test "X$xdir" = "X$arg"; then
  1494. xdir=
  1495. else
  1496. xdir="$xdir/"
  1497. fi
  1498. if test "$pic_object" != none; then
  1499. # Prepend the subdirectory the object is found in.
  1500. pic_object="$xdir$pic_object"
  1501. if test "$prev" = dlfiles; then
  1502. if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
  1503. dlfiles="$dlfiles $pic_object"
  1504. prev=
  1505. continue
  1506. else
  1507. # If libtool objects are unsupported, then we need to preload.
  1508. prev=dlprefiles
  1509. fi
  1510. fi
  1511. # CHECK ME: I think I busted this. -Ossama
  1512. if test "$prev" = dlprefiles; then
  1513. # Preload the old-style object.
  1514. dlprefiles="$dlprefiles $pic_object"
  1515. prev=
  1516. fi
  1517. # A PIC object.
  1518. libobjs="$libobjs $pic_object"
  1519. arg="$pic_object"
  1520. fi
  1521. # Non-PIC object.
  1522. if test "$non_pic_object" != none; then
  1523. # Prepend the subdirectory the object is found in.
  1524. non_pic_object="$xdir$non_pic_object"
  1525. # A standard non-PIC object
  1526. non_pic_objects="$non_pic_objects $non_pic_object"
  1527. if test -z "$pic_object" || test "$pic_object" = none ; then
  1528. arg="$non_pic_object"
  1529. fi
  1530. fi
  1531. else
  1532. # Only an error if not doing a dry-run.
  1533. if test -z "$run"; then
  1534. $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
  1535. exit 1
  1536. else
  1537. # Dry-run case.
  1538. # Extract subdirectory from the argument.
  1539. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
  1540. if test "X$xdir" = "X$arg"; then
  1541. xdir=
  1542. else
  1543. xdir="$xdir/"
  1544. fi
  1545. pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
  1546. non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
  1547. libobjs="$libobjs $pic_object"
  1548. non_pic_objects="$non_pic_objects $non_pic_object"
  1549. fi
  1550. fi
  1551. ;;
  1552. *.$libext)
  1553. # An archive.
  1554. deplibs="$deplibs $arg"
  1555. old_deplibs="$old_deplibs $arg"
  1556. continue
  1557. ;;
  1558. *.la)
  1559. # A libtool-controlled library.
  1560. if test "$prev" = dlfiles; then
  1561. # This library was specified with -dlopen.
  1562. dlfiles="$dlfiles $arg"
  1563. prev=
  1564. elif test "$prev" = dlprefiles; then
  1565. # The library was specified with -dlpreopen.
  1566. dlprefiles="$dlprefiles $arg"
  1567. prev=
  1568. else
  1569. deplibs="$deplibs $arg"
  1570. fi
  1571. continue
  1572. ;;
  1573. # Some other compiler argument.
  1574. *)
  1575. # Unknown arguments in both finalize_command and compile_command need
  1576. # to be aesthetically quoted because they are evaled later.
  1577. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
  1578. case $arg in
  1579. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
  1580. arg="\"$arg\""
  1581. ;;
  1582. esac
  1583. ;;
  1584. esac # arg
  1585. # Now actually substitute the argument into the commands.
  1586. if test -n "$arg"; then
  1587. compile_command="$compile_command $arg"
  1588. finalize_command="$finalize_command $arg"
  1589. fi
  1590. done # argument parsing loop
  1591. if test -n "$prev"; then
  1592. $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
  1593. $echo "$help" 1>&2
  1594. exit 1
  1595. fi
  1596. # Infer tagged configuration to use if any are available and
  1597. # if one wasn't chosen via the "--tag" command line option.
  1598. # Only attempt this if the compiler in the base link
  1599. # command doesn't match the default compiler.
  1600. if test -n "$available_tags" && test -z "$tagname"; then
  1601. case $base_compile in
  1602. "$CC "*) ;;
  1603. # Blanks in the command may have been stripped by the calling shell,
  1604. # but not from the CC environment variable when ltconfig was run.
  1605. "`$echo $CC` "*) ;;
  1606. *)
  1607. for z in $available_tags; do
  1608. if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
  1609. # Evaluate the configuration.
  1610. eval "`sed -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
  1611. case $base_compile in
  1612. "$CC "*)
  1613. # The compiler in $compile_command matches
  1614. # the one in the tagged configuration.
  1615. # Assume this is the tagged configuration we want.
  1616. tagname=$z
  1617. break
  1618. ;;
  1619. "`$echo $CC` "*)
  1620. tagname=$z
  1621. break
  1622. ;;
  1623. esac
  1624. fi
  1625. done
  1626. # If $tagname still isn't set, then no tagged configuration
  1627. # was found and let the user know that the "--tag" command
  1628. # line option must be used.
  1629. if test -z "$tagname"; then
  1630. echo "$modename: unable to infer tagged configuration"
  1631. echo "$modename: specify a tag with \`--tag'" 1>&2
  1632. exit 1
  1633. # else
  1634. # echo "$modename: using $tagname tagged configuration"
  1635. fi
  1636. ;;
  1637. esac
  1638. fi
  1639. if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
  1640. eval arg=\"$export_dynamic_flag_spec\"
  1641. compile_command="$compile_command $arg"
  1642. finalize_command="$finalize_command $arg"
  1643. fi
  1644. oldlibs=
  1645. # calculate the name of the file, without its directory
  1646. outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
  1647. libobjs_save="$libobjs"
  1648. if test -n "$shlibpath_var"; then
  1649. # get the directories listed in $shlibpath_var
  1650. eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
  1651. else
  1652. shlib_search_path=
  1653. fi
  1654. eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
  1655. eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
  1656. output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
  1657. if test "X$output_objdir" = "X$output"; then
  1658. output_objdir="$objdir"
  1659. else
  1660. output_objdir="$output_objdir/$objdir"
  1661. fi
  1662. # Create the object directory.
  1663. if test ! -d $output_objdir; then
  1664. $show "$mkdir $output_objdir"
  1665. $run $mkdir $output_objdir
  1666. status=$?
  1667. if test $status -ne 0 && test ! -d $output_objdir; then
  1668. exit $status
  1669. fi
  1670. fi
  1671. # Determine the type of output
  1672. case $output in
  1673. "")
  1674. $echo "$modename: you must specify an output file" 1>&2
  1675. $echo "$help" 1>&2
  1676. exit 1
  1677. ;;
  1678. *.$libext) linkmode=oldlib ;;
  1679. *.lo | *.$objext) linkmode=obj ;;
  1680. *.la) linkmode=lib ;;
  1681. *) linkmode=prog ;; # Anything else should be a program.
  1682. esac
  1683. specialdeplibs=
  1684. libs=
  1685. # Find all interdependent deplibs by searching for libraries
  1686. # that are linked more than once (e.g. -la -lb -la)
  1687. for deplib in $deplibs; do
  1688. case "$libs " in
  1689. *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
  1690. esac
  1691. libs="$libs $deplib"
  1692. done
  1693. if test $linkmode = lib; then
  1694. libs="$predeps $libs $compiler_lib_search_path $postdeps"
  1695. # Compute libraries that are listed more than once in $predeps
  1696. # $postdeps and mark them as special (i.e., whose duplicates are
  1697. # not to be eliminated).
  1698. pre_post_deps=
  1699. for pre_post_dep in $predeps $postdeps; do
  1700. case "$pre_post_deps " in
  1701. *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
  1702. esac
  1703. pre_post_deps="$pre_post_deps $pre_post_dep"
  1704. done
  1705. pre_post_deps=
  1706. fi
  1707. deplibs=
  1708. newdependency_libs=
  1709. newlib_search_path=
  1710. need_relink=no # whether we're linking any uninstalled libtool libraries
  1711. notinst_deplibs= # not-installed libtool libraries
  1712. notinst_path= # paths that contain not-installed libtool libraries
  1713. case $linkmode in
  1714. lib)
  1715. passes="conv link"
  1716. for file in $dlfiles $dlprefiles; do
  1717. case $file in
  1718. *.la) ;;
  1719. *)
  1720. $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
  1721. exit 1
  1722. ;;
  1723. esac
  1724. done
  1725. ;;
  1726. prog)
  1727. compile_deplibs=
  1728. finalize_deplibs=
  1729. alldeplibs=no
  1730. newdlfiles=
  1731. newdlprefiles=
  1732. passes="conv scan dlopen dlpreopen link"
  1733. ;;
  1734. *) passes="conv"
  1735. ;;
  1736. esac
  1737. for pass in $passes; do
  1738. if test "$linkmode,$pass" = "lib,link" ||
  1739. test "$linkmode,$pass" = "prog,scan"; then
  1740. libs="$deplibs"
  1741. deplibs=
  1742. fi
  1743. if test $linkmode = prog; then
  1744. case $pass in
  1745. dlopen) libs="$dlfiles" ;;
  1746. dlpreopen) libs="$dlprefiles" ;;
  1747. link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
  1748. esac
  1749. fi
  1750. if test $pass = dlopen; then
  1751. # Collect dlpreopened libraries
  1752. save_deplibs="$deplibs"
  1753. deplibs=
  1754. fi
  1755. for deplib in $libs; do
  1756. lib=
  1757. found=no
  1758. case $deplib in
  1759. -l*)
  1760. if test $linkmode != lib && test $linkmode != prog; then
  1761. $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
  1762. continue
  1763. fi
  1764. if test $pass = conv; then
  1765. deplibs="$deplib $deplibs"
  1766. continue
  1767. fi
  1768. name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
  1769. for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
  1770. # Search the libtool library
  1771. lib="$searchdir/lib${name}.la"
  1772. if test -f "$lib"; then
  1773. found=yes
  1774. break
  1775. fi
  1776. done
  1777. if test "$found" != yes; then
  1778. # deplib doesn't seem to be a libtool library
  1779. if test "$linkmode,$pass" = "prog,link"; then
  1780. compile_deplibs="$deplib $compile_deplibs"
  1781. finalize_deplibs="$deplib $finalize_deplibs"
  1782. else
  1783. deplibs="$deplib $deplibs"
  1784. test $linkmode = lib && newdependency_libs="$deplib $newdependency_libs"
  1785. fi
  1786. continue
  1787. fi
  1788. ;; # -l
  1789. -L*)
  1790. case $linkmode in
  1791. lib)
  1792. deplibs="$deplib $deplibs"
  1793. test $pass = conv && continue
  1794. newdependency_libs="$deplib $newdependency_libs"
  1795. newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
  1796. ;;
  1797. prog)
  1798. if test $pass = conv; then
  1799. deplibs="$deplib $deplibs"
  1800. continue
  1801. fi
  1802. if test $pass = scan; then
  1803. deplibs="$deplib $deplibs"
  1804. newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
  1805. else
  1806. compile_deplibs="$deplib $compile_deplibs"
  1807. finalize_deplibs="$deplib $finalize_deplibs"
  1808. fi
  1809. ;;
  1810. *)
  1811. $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
  1812. ;;
  1813. esac # linkmode
  1814. continue
  1815. ;; # -L
  1816. -R*)
  1817. if test $pass = link; then
  1818. dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
  1819. # Make sure the xrpath contains only unique directories.
  1820. case "$xrpath " in
  1821. *" $dir "*) ;;
  1822. *) xrpath="$xrpath $dir" ;;
  1823. esac
  1824. fi
  1825. deplibs="$deplib $deplibs"
  1826. continue
  1827. ;;
  1828. *.la) lib="$deplib" ;;
  1829. *.$libext)
  1830. if test $pass = conv; then
  1831. deplibs="$deplib $deplibs"
  1832. continue
  1833. fi
  1834. case $linkmode in
  1835. lib)
  1836. if test "$deplibs_check_method" != pass_all; then
  1837. echo
  1838. echo "*** Warning: This library needs some functionality provided by $deplib."
  1839. echo "*** I have the capability to make that library automatically link in when"
  1840. echo "*** you link to this library. But I can only do this if you have a"
  1841. echo "*** shared version of the library, which you do not appear to have."
  1842. else
  1843. echo
  1844. echo "*** Warning: Linking the shared library $output against the"
  1845. echo "*** static library $deplib is not portable!"
  1846. deplibs="$deplib $deplibs"
  1847. fi
  1848. continue
  1849. ;;
  1850. prog)
  1851. if test $pass != link; then
  1852. deplibs="$deplib $deplibs"
  1853. else
  1854. compile_deplibs="$deplib $compile_deplibs"
  1855. finalize_deplibs="$deplib $finalize_deplibs"
  1856. fi
  1857. continue
  1858. ;;
  1859. esac # linkmode
  1860. ;; # *.$libext
  1861. *.lo | *.$objext)
  1862. if test $pass = conv; then
  1863. deplibs="$deplib $deplibs"
  1864. elif test $linkmode = prog; then
  1865. if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
  1866. # If there is no dlopen support or we're linking statically,
  1867. # we need to preload.
  1868. newdlprefiles="$newdlprefiles $deplib"
  1869. compile_deplibs="$deplib $compile_deplibs"
  1870. finalize_deplibs="$deplib $finalize_deplibs"
  1871. else
  1872. newdlfiles="$newdlfiles $deplib"
  1873. fi
  1874. fi
  1875. continue
  1876. ;;
  1877. %DEPLIBS%)
  1878. alldeplibs=yes
  1879. continue
  1880. ;;
  1881. esac # case $deplib
  1882. if test $found = yes || test -f "$lib"; then :
  1883. else
  1884. $echo "$modename: cannot find the library \`$lib'" 1>&2
  1885. exit 1
  1886. fi
  1887. # Check to see that this really is a libtool archive.
  1888. if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
  1889. else
  1890. $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
  1891. exit 1
  1892. fi
  1893. ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
  1894. test "X$ladir" = "X$lib" && ladir="."
  1895. dlname=
  1896. dlopen=
  1897. dlpreopen=
  1898. libdir=
  1899. library_names=
  1900. old_library=
  1901. # If the library was installed with an old release of libtool,
  1902. # it will not redefine variable installed.
  1903. installed=yes
  1904. # Read the .la file
  1905. case $lib in
  1906. */* | *\\*) . $lib ;;
  1907. *) . ./$lib ;;
  1908. esac
  1909. if test "$linkmode,$pass" = "lib,link" ||
  1910. test "$linkmode,$pass" = "prog,scan" ||
  1911. { test $linkmode != prog && test $linkmode != lib; }; then
  1912. test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
  1913. test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
  1914. fi
  1915. if test $pass = conv; then
  1916. # Only check for convenience libraries
  1917. deplibs="$lib $deplibs"
  1918. if test -z "$libdir"; then
  1919. if test -z "$old_library"; then
  1920. $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
  1921. exit 1
  1922. fi
  1923. # It is a libtool convenience library, so add in its objects.
  1924. convenience="$convenience $ladir/$objdir/$old_library"
  1925. old_convenience="$old_convenience $ladir/$objdir/$old_library"
  1926. tmp_libs=
  1927. for deplib in $dependency_libs; do
  1928. deplibs="$deplib $deplibs"
  1929. case "$tmp_libs " in
  1930. *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
  1931. esac
  1932. tmp_libs="$tmp_libs $deplib"
  1933. done
  1934. elif test $linkmode != prog && test $linkmode != lib; then
  1935. $echo "$modename: \`$lib' is not a convenience library" 1>&2
  1936. exit 1
  1937. fi
  1938. continue
  1939. fi # $pass = conv
  1940. # Get the name of the library we link against.
  1941. linklib=
  1942. for l in $old_library $library_names; do
  1943. linklib="$l"
  1944. done
  1945. if test -z "$linklib"; then
  1946. $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
  1947. exit 1
  1948. fi
  1949. # This library was specified with -dlopen.
  1950. if test $pass = dlopen; then
  1951. if test -z "$libdir"; then
  1952. $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
  1953. exit 1
  1954. fi
  1955. if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
  1956. # If there is no dlname, no dlopen support or we're linking
  1957. # statically, we need to preload. We also need to preload any
  1958. # dependent libraries so libltdl's deplib preloader doesn't
  1959. # bomb out in the load deplibs phase.
  1960. dlprefiles="$dlprefiles $lib $dependency_libs"
  1961. else
  1962. newdlfiles="$newdlfiles $lib"
  1963. fi
  1964. continue
  1965. fi # $pass = dlopen
  1966. # We need an absolute path.
  1967. case $ladir in
  1968. [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
  1969. *)
  1970. abs_ladir=`cd "$ladir" && pwd`
  1971. if test -z "$abs_ladir"; then
  1972. $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
  1973. $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
  1974. abs_ladir="$ladir"
  1975. fi
  1976. ;;
  1977. esac
  1978. laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
  1979. # Find the relevant object directory and library name.
  1980. if test "X$installed" = Xyes; then
  1981. if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
  1982. $echo "$modename: warning: library \`$lib' was moved." 1>&2
  1983. dir="$ladir"
  1984. absdir="$abs_ladir"
  1985. libdir="$abs_ladir"
  1986. else
  1987. dir="$libdir"
  1988. absdir="$libdir"
  1989. fi
  1990. else
  1991. dir="$ladir/$objdir"
  1992. absdir="$abs_ladir/$objdir"
  1993. # Remove this search path later
  1994. notinst_path="$notinst_path $abs_ladir"
  1995. fi # $installed = yes
  1996. name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
  1997. # This library was specified with -dlpreopen.
  1998. if test $pass = dlpreopen; then
  1999. if test -z "$libdir"; then
  2000. $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
  2001. exit 1
  2002. fi
  2003. # Prefer using a static library (so that no silly _DYNAMIC symbols
  2004. # are required to link).
  2005. if test -n "$old_library"; then
  2006. newdlprefiles="$newdlprefiles $dir/$old_library"
  2007. # Otherwise, use the dlname, so that lt_dlopen finds it.
  2008. elif test -n "$dlname"; then
  2009. newdlprefiles="$newdlprefiles $dir/$dlname"
  2010. else
  2011. newdlprefiles="$newdlprefiles $dir/$linklib"
  2012. fi
  2013. fi # $pass = dlpreopen
  2014. if test -z "$libdir"; then
  2015. # Link the convenience library
  2016. if test $linkmode = lib; then
  2017. deplibs="$dir/$old_library $deplibs"
  2018. elif test "$linkmode,$pass" = "prog,link"; then
  2019. compile_deplibs="$dir/$old_library $compile_deplibs"
  2020. finalize_deplibs="$dir/$old_library $finalize_deplibs"
  2021. else
  2022. deplibs="$lib $deplibs" # used for prog,scan pass
  2023. fi
  2024. continue
  2025. fi
  2026. if test $linkmode = prog && test $pass != link; then
  2027. newlib_search_path="$newlib_search_path $ladir"
  2028. deplibs="$lib $deplibs"
  2029. linkalldeplibs=no
  2030. if test "$link_all_deplibs" != no || test -z "$library_names" ||
  2031. test "$build_libtool_libs" = no; then
  2032. linkalldeplibs=yes
  2033. fi
  2034. tmp_libs=
  2035. for deplib in $dependency_libs; do
  2036. case $deplib in
  2037. -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
  2038. esac
  2039. # Need to link against all dependency_libs?
  2040. if test $linkalldeplibs = yes; then
  2041. deplibs="$deplib $deplibs"
  2042. else
  2043. # Need to hardcode shared library paths
  2044. # or/and link against static libraries
  2045. newdependency_libs="$deplib $newdependency_libs"
  2046. fi
  2047. case "$tmp_libs " in
  2048. *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
  2049. esac
  2050. tmp_libs="$tmp_libs $deplib"
  2051. done # for deplib
  2052. continue
  2053. fi # $linkmode = prog...
  2054. if test "$linkmode,$pass" = "prog,link"; then
  2055. if test -n "$library_names" &&
  2056. { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
  2057. # We need to hardcode the library path
  2058. if test -n "$shlibpath_var"; then
  2059. # Make sure the rpath contains only unique directories.
  2060. case "$temp_rpath " in
  2061. *" $dir "*) ;;
  2062. *" $absdir "*) ;;
  2063. *) temp_rpath="$temp_rpath $dir" ;;
  2064. esac
  2065. fi
  2066. # Hardcode the library path.
  2067. # Skip directories that are in the system default run-time
  2068. # search path.
  2069. case " $sys_lib_dlsearch_path " in
  2070. *" $absdir "*) ;;
  2071. *)
  2072. case "$compile_rpath " in
  2073. *" $absdir "*) ;;
  2074. *) compile_rpath="$compile_rpath $absdir"
  2075. esac
  2076. ;;
  2077. esac
  2078. case " $sys_lib_dlsearch_path " in
  2079. *" $libdir "*) ;;
  2080. *)
  2081. case "$finalize_rpath " in
  2082. *" $libdir "*) ;;
  2083. *) finalize_rpath="$finalize_rpath $libdir"
  2084. esac
  2085. ;;
  2086. esac
  2087. fi # $linkmode,$pass = prog,link...
  2088. if test "$alldeplibs" = yes &&
  2089. { test "$deplibs_check_method" = pass_all ||
  2090. { test "$build_libtool_libs" = yes &&
  2091. test -n "$library_names"; }; }; then
  2092. # We only need to search for static libraries
  2093. continue
  2094. fi
  2095. fi
  2096. link_static=no # Whether the deplib will be linked statically
  2097. if test -n "$library_names" &&
  2098. { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
  2099. if test "$installed" = no; then
  2100. notinst_deplibs="$notinst_deplibs $lib"
  2101. need_relink=yes
  2102. fi
  2103. # This is a shared library
  2104. if test $linkmode = lib &&
  2105. test $hardcode_into_libs = yes; then
  2106. # Hardcode the library path.
  2107. # Skip directories that are in the system default run-time
  2108. # search path.
  2109. case " $sys_lib_dlsearch_path " in
  2110. *" $absdir "*) ;;
  2111. *)
  2112. case "$compile_rpath " in
  2113. *" $absdir "*) ;;
  2114. *) compile_rpath="$compile_rpath $absdir"
  2115. esac
  2116. ;;
  2117. esac
  2118. case " $sys_lib_dlsearch_path " in
  2119. *" $libdir "*) ;;
  2120. *)
  2121. case "$finalize_rpath " in
  2122. *" $libdir "*) ;;
  2123. *) finalize_rpath="$finalize_rpath $libdir"
  2124. esac
  2125. ;;
  2126. esac
  2127. fi
  2128. if test -n "$old_archive_from_expsyms_cmds"; then
  2129. # figure out the soname
  2130. set dummy $library_names
  2131. realname="$2"
  2132. shift; shift
  2133. libname=`eval \\$echo \"$libname_spec\"`
  2134. # use dlname if we got it. it's perfectly good, no?
  2135. if test -n "$dlname"; then
  2136. soname="$dlname"
  2137. elif test -n "$soname_spec"; then
  2138. # bleh windows
  2139. case $host in
  2140. *cygwin*)
  2141. major=`expr $current - $age`
  2142. versuffix="-$major"
  2143. ;;
  2144. esac
  2145. eval soname=\"$soname_spec\"
  2146. else
  2147. soname="$realname"
  2148. fi
  2149. # Make a new name for the extract_expsyms_cmds to use
  2150. soroot="$soname"
  2151. soname=`echo $soroot | sed -e 's/^.*\///'`
  2152. newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a"
  2153. # If the library has no export list, then create one now
  2154. if test -f "$output_objdir/$soname-def"; then :
  2155. else
  2156. $show "extracting exported symbol list from \`$soname'"
  2157. IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
  2158. eval cmds=\"$extract_expsyms_cmds\"
  2159. for cmd in $cmds; do
  2160. IFS="$save_ifs"
  2161. $show "$cmd"
  2162. $run eval "$cmd" || exit $?
  2163. done
  2164. IFS="$save_ifs"
  2165. fi
  2166. # Create $newlib
  2167. if test -f "$output_objdir/$newlib"; then :; else
  2168. $show "generating import library for \`$soname'"
  2169. IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
  2170. eval cmds=\"$old_archive_from_expsyms_cmds\"
  2171. for cmd in $cmds; do
  2172. IFS="$save_ifs"
  2173. $show "$cmd"
  2174. $run eval "$cmd" || exit $?
  2175. done
  2176. IFS="$save_ifs"
  2177. fi
  2178. # make sure the library variables are pointing to the new library
  2179. dir=$output_objdir
  2180. linklib=$newlib
  2181. fi # test -n $old_archive_from_expsyms_cmds
  2182. if test $linkmode = prog || test "$mode" != relink; then
  2183. add_shlibpath=
  2184. add_dir=
  2185. add=
  2186. lib_linked=yes
  2187. case $hardcode_action in
  2188. immediate | unsupported)
  2189. if test "$hardcode_direct" = no; then
  2190. add="$dir/$linklib"
  2191. elif test "$hardcode_minus_L" = no; then
  2192. case $host in
  2193. *-*-sunos*) add_shlibpath="$dir" ;;
  2194. esac
  2195. add_dir="-L$dir"
  2196. add="-l$name"
  2197. elif test "$hardcode_shlibpath_var" = no; then
  2198. add_shlibpath="$dir"
  2199. add="-l$name"
  2200. else
  2201. lib_linked=no
  2202. fi
  2203. ;;
  2204. relink)
  2205. if test "$hardcode_direct" = yes; then
  2206. add="$dir/$linklib"
  2207. elif test "$hardcode_minus_L" = yes; then
  2208. add_dir="-L$dir"
  2209. add="-l$name"
  2210. elif test "$hardcode_shlibpath_var" = yes; then
  2211. add_shlibpath="$dir"
  2212. add="-l$name"
  2213. else
  2214. lib_linked=no
  2215. fi
  2216. ;;
  2217. *) lib_linked=no ;;
  2218. esac
  2219. if test "$lib_linked" != yes; then
  2220. $echo "$modename: configuration error: unsupported hardcode properties"
  2221. exit 1
  2222. fi
  2223. if test -n "$add_shlibpath"; then
  2224. case :$compile_shlibpath: in
  2225. *":$add_shlibpath:"*) ;;
  2226. *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
  2227. esac
  2228. fi
  2229. if test $linkmode = prog; then
  2230. test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
  2231. test -n "$add" && compile_deplibs="$add $compile_deplibs"
  2232. else
  2233. test -n "$add_dir" && deplibs="$add_dir $deplibs"
  2234. test -n "$add" && deplibs="$add $deplibs"
  2235. if test "$hardcode_direct" != yes && \
  2236. test "$hardcode_minus_L" != yes && \
  2237. test "$hardcode_shlibpath_var" = yes; then
  2238. case :$finalize_shlibpath: in
  2239. *":$libdir:"*) ;;
  2240. *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
  2241. esac
  2242. fi
  2243. fi
  2244. fi
  2245. if test $linkmode = prog || test "$mode" = relink; then
  2246. add_shlibpath=
  2247. add_dir=
  2248. add=
  2249. # Finalize command for both is simple: just hardcode it.
  2250. if test "$hardcode_direct" = yes; then
  2251. add="$libdir/$linklib"
  2252. elif test "$hardcode_minus_L" = yes; then
  2253. add_dir="-L$libdir"
  2254. add="-l$name"
  2255. elif test "$hardcode_shlibpath_var" = yes; then
  2256. case :$finalize_shlibpath: in
  2257. *":$libdir:"*) ;;
  2258. *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
  2259. esac
  2260. add="-l$name"
  2261. else
  2262. # We cannot seem to hardcode it, guess we'll fake it.
  2263. add_dir="-L$libdir"
  2264. add="-l$name"
  2265. fi
  2266. if test $linkmode = prog; then
  2267. test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
  2268. test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
  2269. else
  2270. test -n "$add_dir" && deplibs="$add_dir $deplibs"
  2271. test -n "$add" && deplibs="$add $deplibs"
  2272. fi
  2273. fi
  2274. elif test $linkmode = prog; then
  2275. # Here we assume that one of hardcode_direct or hardcode_minus_L
  2276. # is not unsupported. This is valid on all known static and
  2277. # shared platforms.
  2278. if test "$hardcode_direct" != unsupported; then
  2279. test -n "$old_library" && linklib="$old_library"
  2280. compile_deplibs="$dir/$linklib $compile_deplibs"
  2281. finalize_deplibs="$dir/$linklib $finalize_deplibs"
  2282. else
  2283. compile_deplibs="-l$name -L$dir $compile_deplibs"
  2284. finalize_deplibs="-l$name -L$dir $finalize_deplibs"
  2285. fi
  2286. elif test "$build_libtool_libs" = yes; then
  2287. # Not a shared library
  2288. if test "$deplibs_check_method" != pass_all; then
  2289. # We're trying link a shared library against a static one
  2290. # but the system doesn't support it.
  2291. # Just print a warning and add the library to dependency_libs so
  2292. # that the program can be linked against the static library.
  2293. echo
  2294. echo "*** Warning: This library needs some functionality provided by $lib."
  2295. echo "*** I have the capability to make that library automatically link in when"
  2296. echo "*** you link to this library. But I can only do this if you have a"
  2297. echo "*** shared version of the library, which you do not appear to have."
  2298. if test "$module" = yes; then
  2299. echo "*** Therefore, libtool will create a static module, that should work "
  2300. echo "*** as long as the dlopening application is linked with the -dlopen flag."
  2301. if test -z "$global_symbol_pipe"; then
  2302. echo
  2303. echo "*** However, this would only work if libtool was able to extract symbol"
  2304. echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
  2305. echo "*** not find such a program. So, this module is probably useless."
  2306. echo "*** \`nm' from GNU binutils and a full rebuild may help."
  2307. fi
  2308. if test "$build_old_libs" = no; then
  2309. build_libtool_libs=module
  2310. build_old_libs=yes
  2311. else
  2312. build_libtool_libs=no
  2313. fi
  2314. fi
  2315. else
  2316. convenience="$convenience $dir/$old_library"
  2317. old_convenience="$old_convenience $dir/$old_library"
  2318. deplibs="$dir/$old_library $deplibs"
  2319. link_static=yes
  2320. fi
  2321. fi # link shared/static library?
  2322. if test $linkmode = lib; then
  2323. if test -n "$dependency_libs" &&
  2324. { test $hardcode_into_libs != yes || test $build_old_libs = yes ||
  2325. test $link_static = yes; }; then
  2326. # Extract -R from dependency_libs
  2327. temp_deplibs=
  2328. for libdir in $dependency_libs; do
  2329. case $libdir in
  2330. -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
  2331. case " $xrpath " in
  2332. *" $temp_xrpath "*) ;;
  2333. *) xrpath="$xrpath $temp_xrpath";;
  2334. esac;;
  2335. *) temp_deplibs="$temp_deplibs $libdir";;
  2336. esac
  2337. done
  2338. dependency_libs="$temp_deplibs"
  2339. fi
  2340. newlib_search_path="$newlib_search_path $absdir"
  2341. # Link against this library
  2342. test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
  2343. # ... and its dependency_libs
  2344. tmp_libs=
  2345. for deplib in $dependency_libs; do
  2346. newdependency_libs="$deplib $newdependency_libs"
  2347. case "$tmp_libs " in
  2348. *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
  2349. esac
  2350. tmp_libs="$tmp_libs $deplib"
  2351. done
  2352. if test $link_all_deplibs != no; then
  2353. # Add the search paths of all dependency libraries
  2354. for deplib in $dependency_libs; do
  2355. case $deplib in
  2356. -L*) path="$deplib" ;;
  2357. *.la)
  2358. dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
  2359. test "X$dir" = "X$deplib" && dir="."
  2360. # We need an absolute path.
  2361. case $dir in
  2362. [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
  2363. *)
  2364. absdir=`cd "$dir" && pwd`
  2365. if test -z "$absdir"; then
  2366. $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
  2367. absdir="$dir"
  2368. fi
  2369. ;;
  2370. esac
  2371. if grep "^installed=no" $deplib > /dev/null; then
  2372. path="-L$absdir/$objdir"
  2373. else
  2374. eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
  2375. if test -z "$libdir"; then
  2376. $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
  2377. exit 1
  2378. fi
  2379. if test "$absdir" != "$libdir"; then
  2380. $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
  2381. fi
  2382. path="-L$absdir"
  2383. fi
  2384. ;;
  2385. *) continue ;;
  2386. esac
  2387. case " $deplibs " in
  2388. *" $path "*) ;;
  2389. *) deplibs="$deplibs $path" ;;
  2390. esac
  2391. done
  2392. fi # link_all_deplibs != no
  2393. fi # linkmode = lib
  2394. done # for deplib in $libs
  2395. dependency_libs="$newdependency_libs"
  2396. if test $pass = dlpreopen; then
  2397. # Link the dlpreopened libraries before other libraries
  2398. for deplib in $save_deplibs; do
  2399. deplibs="$deplib $deplibs"
  2400. done
  2401. fi
  2402. if test $pass != dlopen; then
  2403. if test $pass != conv; then
  2404. # Make sure lib_search_path contains only unique directories.
  2405. lib_search_path=
  2406. for dir in $newlib_search_path; do
  2407. case "$lib_search_path " in
  2408. *" $dir "*) ;;
  2409. *) lib_search_path="$lib_search_path $dir" ;;
  2410. esac
  2411. done
  2412. newlib_search_path=
  2413. fi
  2414. if test "$linkmode,$pass" != "prog,link"; then
  2415. vars="deplibs"
  2416. else
  2417. vars="compile_deplibs finalize_deplibs"
  2418. fi
  2419. for var in $vars dependency_libs; do
  2420. # Add libraries to $var in reverse order
  2421. eval tmp_libs=\"\$$var\"
  2422. new_libs=
  2423. for deplib in $tmp_libs; do
  2424. # FIXME: Pedantically, this is the right thing to do, so
  2425. # that some nasty dependency loop isn't accidentally
  2426. # broken:
  2427. #new_libs="$deplib $new_libs"
  2428. # Pragmatically, this seems to cause very few problems in
  2429. # practice:
  2430. case $deplib in
  2431. -L*) new_libs="$deplib $new_libs" ;;
  2432. *)
  2433. # And here is the reason: when a library appears more
  2434. # than once as an explicit dependence of a library, or
  2435. # is implicitly linked in more than once by the
  2436. # compiler, it is considered special, and multiple
  2437. # occurrences thereof are not removed. Compare this
  2438. # with having the same library being listed as a
  2439. # dependency of multiple other libraries: in this case,
  2440. # we know (pedantically, we assume) the library does not
  2441. # need to be listed more than once, so we keep only the
  2442. # last copy. This is not always right, but it is rare
  2443. # enough that we require users that really mean to play
  2444. # such unportable linking tricks to link the library
  2445. # using -Wl,-lname, so that libtool does not consider it
  2446. # for duplicate removal.
  2447. case " $specialdeplibs " in
  2448. *" $deplib "*) new_libs="$deplib $new_libs" ;;
  2449. *)
  2450. case " $new_libs " in
  2451. *" $deplib "*) ;;
  2452. *) new_libs="$deplib $new_libs" ;;
  2453. esac
  2454. ;;
  2455. esac
  2456. ;;
  2457. esac
  2458. done
  2459. tmp_libs=
  2460. for deplib in $new_libs; do
  2461. case $deplib in
  2462. -L*)
  2463. case " $tmp_libs " in
  2464. *" $deplib "*) ;;
  2465. *) tmp_libs="$tmp_libs $deplib" ;;
  2466. esac
  2467. ;;
  2468. *) tmp_libs="$tmp_libs $deplib" ;;
  2469. esac
  2470. done
  2471. eval $var=\"$tmp_libs\"
  2472. done # for var
  2473. fi
  2474. done # for pass
  2475. if test $linkmode = prog; then
  2476. dlfiles="$newdlfiles"
  2477. dlprefiles="$newdlprefiles"
  2478. fi
  2479. case $linkmode in
  2480. oldlib)
  2481. if test -n "$deplibs"; then
  2482. $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
  2483. fi
  2484. if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
  2485. $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
  2486. fi
  2487. if test -n "$rpath"; then
  2488. $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
  2489. fi
  2490. if test -n "$xrpath"; then
  2491. $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
  2492. fi
  2493. if test -n "$vinfo"; then
  2494. $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2
  2495. fi
  2496. if test -n "$release"; then
  2497. $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
  2498. fi
  2499. if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
  2500. $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
  2501. fi
  2502. # Now set the variables for building old libraries.
  2503. build_libtool_libs=no
  2504. oldlibs="$output"
  2505. objs="$objs$old_deplibs"
  2506. ;;
  2507. lib)
  2508. # Make sure we only generate libraries of the form `libNAME.la'.
  2509. case $outputname in
  2510. lib*)
  2511. name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
  2512. eval libname=\"$libname_spec\"
  2513. ;;
  2514. *)
  2515. if test "$module" = no; then
  2516. $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
  2517. $echo "$help" 1>&2
  2518. exit 1
  2519. fi
  2520. if test "$need_lib_prefix" != no; then
  2521. # Add the "lib" prefix for modules if required
  2522. name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
  2523. eval libname=\"$libname_spec\"
  2524. else
  2525. libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
  2526. fi
  2527. ;;
  2528. esac
  2529. if test -n "$objs"; then
  2530. if test "$deplibs_check_method" != pass_all; then
  2531. $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
  2532. exit 1
  2533. else
  2534. echo
  2535. echo "*** Warning: Linking the shared library $output against the non-libtool"
  2536. echo "*** objects $objs is not portable!"
  2537. libobjs="$libobjs $objs"
  2538. fi
  2539. fi
  2540. if test "$dlself" != no; then
  2541. $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
  2542. fi
  2543. set dummy $rpath
  2544. if test $# -gt 2; then
  2545. $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
  2546. fi
  2547. install_libdir="$2"
  2548. oldlibs=
  2549. if test -z "$rpath"; then
  2550. if test "$build_libtool_libs" = yes; then
  2551. # Building a libtool convenience library.
  2552. # Some compilers have problems with a `.al' extension so
  2553. # convenience libraries should have the same extension an
  2554. # archive normally would.
  2555. oldlibs="$output_objdir/$libname.$libext $oldlibs"
  2556. build_libtool_libs=convenience
  2557. build_old_libs=yes
  2558. fi
  2559. if test -n "$vinfo"; then
  2560. $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
  2561. fi
  2562. if test -n "$release"; then
  2563. $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
  2564. fi
  2565. else
  2566. # Parse the version information argument.
  2567. IFS="${IFS= }"; save_ifs="$IFS"; IFS=':'
  2568. set dummy $vinfo 0 0 0
  2569. IFS="$save_ifs"
  2570. if test -n "$8"; then
  2571. $echo "$modename: too many parameters to \`-version-info'" 1>&2
  2572. $echo "$help" 1>&2
  2573. exit 1
  2574. fi
  2575. current="$2"
  2576. revision="$3"
  2577. age="$4"
  2578. # Check that each of the things are valid numbers.
  2579. case $current in
  2580. 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
  2581. *)
  2582. $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
  2583. $echo "$modename: \`$vinfo' is not valid version information" 1>&2
  2584. exit 1
  2585. ;;
  2586. esac
  2587. case $revision in
  2588. 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
  2589. *)
  2590. $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
  2591. $echo "$modename: \`$vinfo' is not valid version information" 1>&2
  2592. exit 1
  2593. ;;
  2594. esac
  2595. case $age in
  2596. 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
  2597. *)
  2598. $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
  2599. $echo "$modename: \`$vinfo' is not valid version information" 1>&2
  2600. exit 1
  2601. ;;
  2602. esac
  2603. if test $age -gt $current; then
  2604. $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
  2605. $echo "$modename: \`$vinfo' is not valid version information" 1>&2
  2606. exit 1
  2607. fi
  2608. # Calculate the version variables.
  2609. major=
  2610. versuffix=
  2611. verstring=
  2612. case $version_type in
  2613. none) ;;
  2614. darwin)
  2615. # Like Linux, but with the current version available in
  2616. # verstring for coding it into the library header
  2617. major=.`expr $current - $age`
  2618. versuffix="$major.$age.$revision"
  2619. # Darwin ld doesn't like 0 for these options...
  2620. minor_current=`expr $current + 1`
  2621. verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
  2622. ;;
  2623. freebsd-aout)
  2624. major=".$current"
  2625. versuffix=".$current.$revision";
  2626. ;;
  2627. freebsd-elf)
  2628. major=".$current"
  2629. versuffix=".$current";
  2630. ;;
  2631. irix)
  2632. major=`expr $current - $age + 1`
  2633. verstring="sgi$major.$revision"
  2634. # Add in all the interfaces that we are compatible with.
  2635. loop=$revision
  2636. while test $loop != 0; do
  2637. iface=`expr $revision - $loop`
  2638. loop=`expr $loop - 1`
  2639. verstring="sgi$major.$iface:$verstring"
  2640. done
  2641. # Before this point, $major must not contain `.'.
  2642. major=.$major
  2643. versuffix="$major.$revision"
  2644. ;;
  2645. linux)
  2646. major=.`expr $current - $age`
  2647. versuffix="$major.$age.$revision"
  2648. ;;
  2649. osf)
  2650. major=`expr $current - $age`
  2651. versuffix=".$current.$age.$revision"
  2652. verstring="$current.$age.$revision"
  2653. # Add in all the interfaces that we are compatible with.
  2654. loop=$age
  2655. while test $loop != 0; do
  2656. iface=`expr $current - $loop`
  2657. loop=`expr $loop - 1`
  2658. verstring="$verstring:${iface}.0"
  2659. done
  2660. # Make executables depend on our current version.
  2661. verstring="$verstring:${current}.0"
  2662. ;;
  2663. sunos)
  2664. major=".$current"
  2665. versuffix=".$current.$revision"
  2666. ;;
  2667. windows)
  2668. # Use '-' rather than '.', since we only want one
  2669. # extension on DOS 8.3 filesystems.
  2670. major=`expr $current - $age`
  2671. versuffix="-$major"
  2672. ;;
  2673. *)
  2674. $echo "$modename: unknown library version type \`$version_type'" 1>&2
  2675. echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
  2676. exit 1
  2677. ;;
  2678. esac
  2679. # Clear the version info if we defaulted, and they specified a release.
  2680. if test -z "$vinfo" && test -n "$release"; then
  2681. major=
  2682. verstring="0.0"
  2683. if test "$need_version" = no; then
  2684. versuffix=
  2685. else
  2686. versuffix=".0.0"
  2687. fi
  2688. fi
  2689. # Remove version info from name if versioning should be avoided
  2690. if test "$avoid_version" = yes && test "$need_version" = no; then
  2691. major=
  2692. versuffix=
  2693. verstring=""
  2694. fi
  2695. # Check to see if the archive will have undefined symbols.
  2696. if test "$allow_undefined" = yes; then
  2697. if test "$allow_undefined_flag" = unsupported; then
  2698. $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
  2699. build_libtool_libs=no
  2700. build_old_libs=yes
  2701. fi
  2702. else
  2703. # Don't allow undefined symbols.
  2704. allow_undefined_flag="$no_undefined_flag"
  2705. fi
  2706. fi
  2707. if test "$mode" != relink; then
  2708. # Remove our outputs, but don't remove object files since they
  2709. # may have been created when compiling PIC objects.
  2710. removelist=
  2711. tempremovelist=`echo "$output_objdir/*"`
  2712. for p in $tempremovelist; do
  2713. case $p in
  2714. *.$objext)
  2715. ;;
  2716. $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
  2717. removelist="$removelist $p"
  2718. ;;
  2719. *) ;;
  2720. esac
  2721. done
  2722. if test -n "$removelist"; then
  2723. $show "${rm}r $removelist"
  2724. $run ${rm}r $removelist
  2725. fi
  2726. fi
  2727. # Now set the variables for building old libraries.
  2728. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
  2729. oldlibs="$oldlibs $output_objdir/$libname.$libext"
  2730. # Transform .lo files to .o files.
  2731. oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
  2732. fi
  2733. # Eliminate all temporary directories.
  2734. for path in $notinst_path; do
  2735. lib_search_path=`echo "$lib_search_path " | sed -e 's% $path % %g'`
  2736. deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'`
  2737. dependency_libs=`echo "$dependency_libs " | sed -e 's% -L$path % %g'`
  2738. done
  2739. if test -n "$xrpath"; then
  2740. # If the user specified any rpath flags, then add them.
  2741. temp_xrpath=
  2742. for libdir in $xrpath; do
  2743. temp_xrpath="$temp_xrpath -R$libdir"
  2744. case "$finalize_rpath " in
  2745. *" $libdir "*) ;;
  2746. *) finalize_rpath="$finalize_rpath $libdir" ;;
  2747. esac
  2748. done
  2749. if test $hardcode_into_libs != yes || test $build_old_libs = yes; then
  2750. dependency_libs="$temp_xrpath $dependency_libs"
  2751. fi
  2752. fi
  2753. # Make sure dlfiles contains only unique files that won't be dlpreopened
  2754. old_dlfiles="$dlfiles"
  2755. dlfiles=
  2756. for lib in $old_dlfiles; do
  2757. case " $dlprefiles $dlfiles " in
  2758. *" $lib "*) ;;
  2759. *) dlfiles="$dlfiles $lib" ;;
  2760. esac
  2761. done
  2762. # Make sure dlprefiles contains only unique files
  2763. old_dlprefiles="$dlprefiles"
  2764. dlprefiles=
  2765. for lib in $old_dlprefiles; do
  2766. case "$dlprefiles " in
  2767. *" $lib "*) ;;
  2768. *) dlprefiles="$dlprefiles $lib" ;;
  2769. esac
  2770. done
  2771. if test "$build_libtool_libs" = yes; then
  2772. if test -n "$rpath"; then
  2773. case $host in
  2774. *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
  2775. # these systems don't actually have a c library (as such)!
  2776. ;;
  2777. *-*-rhapsody* | *-*-darwin1.[012])
  2778. # Rhapsody C library is in the System framework
  2779. deplibs="$deplibs -framework System"
  2780. ;;
  2781. *-*-netbsd*)
  2782. # Don't link with libc until the a.out ld.so is fixed.
  2783. ;;
  2784. *-*-openbsd*)
  2785. # OpenBSD uses either libc or libc_r.
  2786. ;;
  2787. *)
  2788. # Add libc to deplibs on all other systems if necessary.
  2789. if test $build_libtool_need_lc = "yes"; then
  2790. deplibs="$deplibs -lc"
  2791. fi
  2792. ;;
  2793. esac
  2794. fi
  2795. # Transform deplibs into only deplibs that can be linked in shared.
  2796. name_save=$name
  2797. libname_save=$libname
  2798. release_save=$release
  2799. versuffix_save=$versuffix
  2800. major_save=$major
  2801. # I'm not sure if I'm treating the release correctly. I think
  2802. # release should show up in the -l (ie -lgmp5) so we don't want to
  2803. # add it in twice. Is that correct?
  2804. release=""
  2805. versuffix=""
  2806. major=""
  2807. newdeplibs=
  2808. droppeddeps=no
  2809. case $deplibs_check_method in
  2810. pass_all)
  2811. # Don't check for shared/static. Everything works.
  2812. # This might be a little naive. We might want to check
  2813. # whether the library exists or not. But this is on
  2814. # osf3 & osf4 and I'm not really sure... Just
  2815. # implementing what was already the behaviour.
  2816. newdeplibs=$deplibs
  2817. ;;
  2818. test_compile)
  2819. # This code stresses the "libraries are programs" paradigm to its
  2820. # limits. Maybe even breaks it. We compile a program, linking it
  2821. # against the deplibs as a proxy for the library. Then we can check
  2822. # whether they linked in statically or dynamically with ldd.
  2823. $rm conftest.c
  2824. cat > conftest.c <<EOF
  2825. int main() { return 0; }
  2826. EOF
  2827. $rm conftest
  2828. $LTCC -o conftest conftest.c $deplibs
  2829. if test $? -eq 0 ; then
  2830. ldd_output=`ldd conftest`
  2831. for i in $deplibs; do
  2832. name="`expr $i : '-l\(.*\)'`"
  2833. # If $name is empty we are operating on a -L argument.
  2834. if test "$name" != "" -a "$name" != "0"; then
  2835. libname=`eval \\$echo \"$libname_spec\"`
  2836. deplib_matches=`eval \\$echo \"$library_names_spec\"`
  2837. set dummy $deplib_matches
  2838. deplib_match=$2
  2839. if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
  2840. newdeplibs="$newdeplibs $i"
  2841. else
  2842. droppeddeps=yes
  2843. echo
  2844. echo "*** Warning: This library needs some functionality provided by $i."
  2845. echo "*** I have the capability to make that library automatically link in when"
  2846. echo "*** you link to this library. But I can only do this if you have a"
  2847. echo "*** shared version of the library, which you do not appear to have."
  2848. fi
  2849. else
  2850. newdeplibs="$newdeplibs $i"
  2851. fi
  2852. done
  2853. else
  2854. # Error occured in the first compile. Let's try to salvage the situation:
  2855. # Compile a seperate program for each library.
  2856. for i in $deplibs; do
  2857. name="`expr $i : '-l\(.*\)'`"
  2858. # If $name is empty we are operating on a -L argument.
  2859. if test "$name" != "" -a "$name" != "0"; then
  2860. $rm conftest
  2861. $LTCC -o conftest conftest.c $i
  2862. # Did it work?
  2863. if test $? -eq 0 ; then
  2864. ldd_output=`ldd conftest`
  2865. libname=`eval \\$echo \"$libname_spec\"`
  2866. deplib_matches=`eval \\$echo \"$library_names_spec\"`
  2867. set dummy $deplib_matches
  2868. deplib_match=$2
  2869. if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
  2870. newdeplibs="$newdeplibs $i"
  2871. else
  2872. droppeddeps=yes
  2873. echo
  2874. echo "*** Warning: This library needs some functionality provided by $i."
  2875. echo "*** I have the capability to make that library automatically link in when"
  2876. echo "*** you link to this library. But I can only do this if you have a"
  2877. echo "*** shared version of the library, which you do not appear to have."
  2878. fi
  2879. else
  2880. droppeddeps=yes
  2881. echo
  2882. echo "*** Warning! Library $i is needed by this library but I was not able to"
  2883. echo "*** make it link in! You will probably need to install it or some"
  2884. echo "*** library that it depends on before this library will be fully"
  2885. echo "*** functional. Installing it before continuing would be even better."
  2886. fi
  2887. else
  2888. newdeplibs="$newdeplibs $i"
  2889. fi
  2890. done
  2891. fi
  2892. ;;
  2893. file_magic*)
  2894. set dummy $deplibs_check_method
  2895. file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
  2896. for a_deplib in $deplibs; do
  2897. name="`expr $a_deplib : '-l\(.*\)'`"
  2898. # If $name is empty we are operating on a -L argument.
  2899. if test "$name" != "" -a "$name" != "0"; then
  2900. libname=`eval \\$echo \"$libname_spec\"`
  2901. for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
  2902. potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
  2903. for potent_lib in $potential_libs; do
  2904. # Follow soft links.
  2905. if ls -lLd "$potent_lib" 2>/dev/null \
  2906. | grep " -> " >/dev/null; then
  2907. continue
  2908. fi
  2909. # The statement above tries to avoid entering an
  2910. # endless loop below, in case of cyclic links.
  2911. # We might still enter an endless loop, since a link
  2912. # loop can be closed while we follow links,
  2913. # but so what?
  2914. potlib="$potent_lib"
  2915. while test -h "$potlib" 2>/dev/null; do
  2916. potliblink=`ls -ld $potlib | sed 's/.* -> //'`
  2917. case $potliblink in
  2918. [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
  2919. *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
  2920. esac
  2921. done
  2922. if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
  2923. | sed 10q \
  2924. | egrep "$file_magic_regex" > /dev/null; then
  2925. newdeplibs="$newdeplibs $a_deplib"
  2926. a_deplib=""
  2927. break 2
  2928. fi
  2929. done
  2930. done
  2931. if test -n "$a_deplib" ; then
  2932. droppeddeps=yes
  2933. echo
  2934. echo "*** Warning: This library needs some functionality provided by $a_deplib."
  2935. echo "*** I have the capability to make that library automatically link in when"
  2936. echo "*** you link to this library. But I can only do this if you have a"
  2937. echo "*** shared version of the library, which you do not appear to have."
  2938. fi
  2939. else
  2940. # Add a -L argument.
  2941. newdeplibs="$newdeplibs $a_deplib"
  2942. fi
  2943. done # Gone through all deplibs.
  2944. ;;
  2945. match_pattern*)
  2946. set dummy $deplibs_check_method
  2947. match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
  2948. for a_deplib in $deplibs; do
  2949. name="`expr $a_deplib : '-l\(.*\)'`"
  2950. # If $name is empty we are operating on a -L argument.
  2951. if test -n "$name" && test "$name" != "0"; then
  2952. libname=`eval \\$echo \"$libname_spec\"`
  2953. for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
  2954. potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
  2955. for potent_lib in $potential_libs; do
  2956. if eval echo \"$potent_lib\" 2>/dev/null \
  2957. | sed 10q \
  2958. | egrep "$match_pattern_regex" > /dev/null; then
  2959. newdeplibs="$newdeplibs $a_deplib"
  2960. a_deplib=""
  2961. break 2
  2962. fi
  2963. done
  2964. done
  2965. if test -n "$a_deplib" ; then
  2966. droppeddeps=yes
  2967. echo
  2968. echo "*** Warning: This library needs some functionality provided by $a_deplib."
  2969. echo "*** I have the capability to make that library automatically link in when"
  2970. echo "*** you link to this library. But I can only do this if you have a"
  2971. echo "*** shared version of the library, which you do not appear to have."
  2972. fi
  2973. else
  2974. # Add a -L argument.
  2975. newdeplibs="$newdeplibs $a_deplib"
  2976. fi
  2977. done # Gone through all deplibs.
  2978. ;;
  2979. none | unknown | *)
  2980. newdeplibs=""
  2981. if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
  2982. -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' |
  2983. grep . >/dev/null; then
  2984. echo
  2985. if test "X$deplibs_check_method" = "Xnone"; then
  2986. echo "*** Warning: inter-library dependencies are not supported in this platform."
  2987. else
  2988. echo "*** Warning: inter-library dependencies are not known to be supported."
  2989. fi
  2990. echo "*** All declared inter-library dependencies are being dropped."
  2991. droppeddeps=yes
  2992. fi
  2993. ;;
  2994. esac
  2995. versuffix=$versuffix_save
  2996. major=$major_save
  2997. release=$release_save
  2998. libname=$libname_save
  2999. name=$name_save
  3000. case $host in
  3001. *-*-rhapsody* | *-*-darwin1.[012])
  3002. # On Rhapsody replace the C library is the System framework
  3003. newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
  3004. ;;
  3005. esac
  3006. if test "$droppeddeps" = yes; then
  3007. if test "$module" = yes; then
  3008. echo
  3009. echo "*** Warning: libtool could not satisfy all declared inter-library"
  3010. echo "*** dependencies of module $libname. Therefore, libtool will create"
  3011. echo "*** a static module, that should work as long as the dlopening"
  3012. echo "*** application is linked with the -dlopen flag."
  3013. if test -z "$global_symbol_pipe"; then
  3014. echo
  3015. echo "*** However, this would only work if libtool was able to extract symbol"
  3016. echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
  3017. echo "*** not find such a program. So, this module is probably useless."
  3018. echo "*** \`nm' from GNU binutils and a full rebuild may help."
  3019. fi
  3020. if test "$build_old_libs" = no; then
  3021. oldlibs="$output_objdir/$libname.$libext"
  3022. build_libtool_libs=module
  3023. build_old_libs=yes
  3024. else
  3025. build_libtool_libs=no
  3026. fi
  3027. else
  3028. echo "*** The inter-library dependencies that have been dropped here will be"
  3029. echo "*** automatically added whenever a program is linked with this library"
  3030. echo "*** or is declared to -dlopen it."
  3031. if test $allow_undefined = no; then
  3032. echo
  3033. echo "*** Since this library must not contain undefined symbols,"
  3034. echo "*** because either the platform does not support them or"
  3035. echo "*** it was explicitly requested with -no-undefined,"
  3036. echo "*** libtool will only create a static version of it."
  3037. if test "$build_old_libs" = no; then
  3038. oldlibs="$output_objdir/$libname.$libext"
  3039. build_libtool_libs=module
  3040. build_old_libs=yes
  3041. else
  3042. build_libtool_libs=no
  3043. fi
  3044. fi
  3045. fi
  3046. fi
  3047. # Done checking deplibs!
  3048. deplibs=$newdeplibs
  3049. fi
  3050. # All the library-specific variables (install_libdir is set above).
  3051. library_names=
  3052. old_library=
  3053. dlname=
  3054. # Test again, we may have decided not to build it any more
  3055. if test "$build_libtool_libs" = yes; then
  3056. if test $hardcode_into_libs = yes; then
  3057. # Hardcode the library paths
  3058. hardcode_libdirs=
  3059. dep_rpath=
  3060. rpath="$finalize_rpath"
  3061. test "$mode" != relink && rpath="$compile_rpath$rpath"
  3062. for libdir in $rpath; do
  3063. if test -n "$hardcode_libdir_flag_spec"; then
  3064. if test -n "$hardcode_libdir_separator"; then
  3065. if test -z "$hardcode_libdirs"; then
  3066. hardcode_libdirs="$libdir"
  3067. else
  3068. # Just accumulate the unique libdirs.
  3069. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
  3070. *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
  3071. ;;
  3072. *)
  3073. hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
  3074. ;;
  3075. esac
  3076. fi
  3077. else
  3078. eval flag=\"$hardcode_libdir_flag_spec\"
  3079. dep_rpath="$dep_rpath $flag"
  3080. fi
  3081. elif test -n "$runpath_var"; then
  3082. case "$perm_rpath " in
  3083. *" $libdir "*) ;;
  3084. *) perm_rpath="$perm_rpath $libdir" ;;
  3085. esac
  3086. fi
  3087. done
  3088. # Substitute the hardcoded libdirs into the rpath.
  3089. if test -n "$hardcode_libdir_separator" &&
  3090. test -n "$hardcode_libdirs"; then
  3091. libdir="$hardcode_libdirs"
  3092. eval dep_rpath=\"$hardcode_libdir_flag_spec\"
  3093. fi
  3094. if test -n "$runpath_var" && test -n "$perm_rpath"; then
  3095. # We should set the runpath_var.
  3096. rpath=
  3097. for dir in $perm_rpath; do
  3098. rpath="$rpath$dir:"
  3099. done
  3100. eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
  3101. fi
  3102. test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
  3103. fi
  3104. shlibpath="$finalize_shlibpath"
  3105. test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
  3106. if test -n "$shlibpath"; then
  3107. eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
  3108. fi
  3109. # Get the real and link names of the library.
  3110. eval library_names=\"$library_names_spec\"
  3111. set dummy $library_names
  3112. realname="$2"
  3113. shift; shift
  3114. if test -n "$soname_spec"; then
  3115. eval soname=\"$soname_spec\"
  3116. else
  3117. soname="$realname"
  3118. fi
  3119. if test x$dlname = x; then
  3120. dlname=$soname
  3121. fi
  3122. lib="$output_objdir/$realname"
  3123. for link
  3124. do
  3125. linknames="$linknames $link"
  3126. done
  3127. # Use standard objects if they are pic
  3128. test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
  3129. # Prepare the list of exported symbols
  3130. if test -z "$export_symbols"; then
  3131. if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
  3132. $show "generating symbol list for \`$libname.la'"
  3133. export_symbols="$output_objdir/$libname.exp"
  3134. $run $rm $export_symbols
  3135. eval cmds=\"$export_symbols_cmds\"
  3136. IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
  3137. for cmd in $cmds; do
  3138. IFS="$save_ifs"
  3139. $show "$cmd"
  3140. $run eval "$cmd" || exit $?
  3141. done
  3142. IFS="$save_ifs"
  3143. if test -n "$export_symbols_regex"; then
  3144. $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
  3145. $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
  3146. $show "$mv \"${export_symbols}T\" \"$export_symbols\""
  3147. $run eval '$mv "${export_symbols}T" "$export_symbols"'
  3148. fi
  3149. fi
  3150. fi
  3151. if test -n "$export_symbols" && test -n "$include_expsyms"; then
  3152. $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
  3153. fi
  3154. if test -n "$convenience"; then
  3155. if test -n "$whole_archive_flag_spec"; then
  3156. save_libobjs=$libobjs
  3157. eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
  3158. else
  3159. gentop="$output_objdir/${outputname}x"
  3160. $show "${rm}r $gentop"
  3161. $run ${rm}r "$gentop"
  3162. $show "$mkdir $gentop"
  3163. $run $mkdir "$gentop"
  3164. status=$?
  3165. if test $status -ne 0 && test ! -d "$gentop"; then
  3166. exit $status
  3167. fi
  3168. generated="$generated $gentop"
  3169. for xlib in $convenience; do
  3170. # Extract the objects.
  3171. case $xlib in
  3172. [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
  3173. *) xabs=`pwd`"/$xlib" ;;
  3174. esac
  3175. xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
  3176. xdir="$gentop/$xlib"
  3177. $show "${rm}r $xdir"
  3178. $run ${rm}r "$xdir"
  3179. $show "$mkdir $xdir"
  3180. $run $mkdir "$xdir"
  3181. status=$?
  3182. if test $status -ne 0 && test ! -d "$xdir"; then
  3183. exit $status
  3184. fi
  3185. $show "(cd $xdir && $AR x $xabs)"
  3186. $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
  3187. libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
  3188. done
  3189. fi
  3190. fi
  3191. if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
  3192. eval flag=\"$thread_safe_flag_spec\"
  3193. linker_flags="$linker_flags $flag"
  3194. fi
  3195. # Make a backup of the uninstalled library when relinking
  3196. if test "$mode" = relink; then
  3197. $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
  3198. fi
  3199. # Do each of the archive commands.
  3200. if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
  3201. eval cmds=\"$archive_expsym_cmds\"
  3202. else
  3203. eval cmds=\"$archive_cmds\"
  3204. fi
  3205. if len=`expr "X$cmds" : ".*"` &&
  3206. test $len -le $max_cmd_len || test $max_cmd_len -le -1; then
  3207. :
  3208. else
  3209. # The command line is too long to link in one step, link piecewise.
  3210. $echo "creating reloadable object files..."
  3211. # Save the value of $output and $libobjs because we want to
  3212. # use them later. If we have whole_archive_flag_spec, we
  3213. # want to use save_libobjs as it was before
  3214. # whole_archive_flag_spec was expanded, because we can't
  3215. # assume the linker understands whole_archive_flag_spec.
  3216. # This may have to be revisited, in case too many
  3217. # convenience libraries get linked in and end up exceeding
  3218. # the spec.
  3219. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
  3220. save_libobjs=$libobjs
  3221. fi
  3222. save_output=$output
  3223. # Clear the reloadable object creation command queue and
  3224. # initialize k to one.
  3225. test_cmds=
  3226. concat_cmds=
  3227. objlist=
  3228. delfiles=
  3229. last_robj=
  3230. k=1
  3231. output=$output_objdir/$save_output-${k}.$objext
  3232. # Loop over the list of objects to be linked.
  3233. for obj in $save_libobjs
  3234. do
  3235. eval test_cmds=\"$reload_cmds $objlist $last_robj\"
  3236. if test "X$objlist" = X ||
  3237. { len=`expr "X$test_cmds" : ".*"` &&
  3238. test $len -le $max_cmd_len; }; then
  3239. objlist="$objlist $obj"
  3240. else
  3241. # The command $test_cmds is almost too long, add a
  3242. # command to the queue.
  3243. if test $k -eq 1 ; then
  3244. # The first file doesn't have a previous command to add.
  3245. eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
  3246. else
  3247. # All subsequent reloadable object files will link in
  3248. # the last one created.
  3249. eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
  3250. fi
  3251. last_robj=$output_objdir/$save_output-${k}.$objext
  3252. k=`expr $k + 1`
  3253. output=$output_objdir/$save_output-${k}.$objext
  3254. objlist=$obj
  3255. len=1
  3256. fi
  3257. done
  3258. # Handle the remaining objects by creating one last
  3259. # reloadable object file. All subsequent reloadable object
  3260. # files will link in the last one created.
  3261. test -z "$concat_cmds" || concat_cmds=$concat_cmds~
  3262. eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
  3263. # Set up a command to remove the reloadale object files
  3264. # after they are used.
  3265. i=0
  3266. while test $i -lt $k
  3267. do
  3268. i=`expr $i + 1`
  3269. delfiles="$delfiles $output_objdir/$save_output-${i}.$objext"
  3270. done
  3271. $echo "creating a temporary reloadable object file: $output"
  3272. # Loop through the commands generated above and execute them.
  3273. IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
  3274. for cmd in $concat_cmds; do
  3275. IFS="$save_ifs"
  3276. $show "$cmd"
  3277. $run eval "$cmd" || exit $?
  3278. done
  3279. IFS="$save_ifs"
  3280. libobjs=$output
  3281. # Restore the value of output.
  3282. output=$save_output
  3283. if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
  3284. eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
  3285. fi
  3286. # Expand the library linking commands again to reset the
  3287. # value of $libobjs for piecewise linking.
  3288. # Do each of the archive commands.
  3289. if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
  3290. eval cmds=\"$archive_expsym_cmds\"
  3291. else
  3292. eval cmds=\"$archive_cmds\"
  3293. fi
  3294. # Append the command to remove the reloadable object files
  3295. # to the just-reset $cmds.
  3296. eval cmds=\"\$cmds~$rm $delfiles\"
  3297. fi
  3298. IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
  3299. for cmd in $cmds; do
  3300. IFS="$save_ifs"
  3301. $show "$cmd"
  3302. $run eval "$cmd" || exit $?
  3303. done
  3304. IFS="$save_ifs"
  3305. # Restore the uninstalled library and exit
  3306. if test "$mode" = relink; then
  3307. $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
  3308. exit 0
  3309. fi
  3310. # Create links to the real library.
  3311. for linkname in $linknames; do
  3312. if test "$realname" != "$linkname"; then
  3313. $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
  3314. $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
  3315. fi
  3316. done
  3317. # If -module or -export-dynamic was specified, set the dlname.
  3318. if test "$module" = yes || test "$export_dynamic" = yes; then
  3319. # On all known operating systems, these are identical.
  3320. dlname="$soname"
  3321. fi
  3322. fi
  3323. ;;
  3324. obj)
  3325. if test -n "$deplibs"; then
  3326. $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
  3327. fi
  3328. if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
  3329. $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
  3330. fi
  3331. if test -n "$rpath"; then
  3332. $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
  3333. fi
  3334. if test -n "$xrpath"; then
  3335. $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
  3336. fi
  3337. if test -n "$vinfo"; then
  3338. $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
  3339. fi
  3340. if test -n "$release"; then
  3341. $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
  3342. fi
  3343. case $output in
  3344. *.lo)
  3345. if test -n "$objs$old_deplibs"; then
  3346. $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
  3347. exit 1
  3348. fi
  3349. libobj="$output"
  3350. obj=`$echo "X$output" | $Xsed -e "$lo2o"`
  3351. ;;
  3352. *)
  3353. libobj=
  3354. obj="$output"
  3355. ;;
  3356. esac
  3357. # Delete the old objects.
  3358. $run $rm $obj $libobj
  3359. # Objects from convenience libraries. This assumes
  3360. # single-version convenience libraries. Whenever we create
  3361. # different ones for PIC/non-PIC, this we'll have to duplicate
  3362. # the extraction.
  3363. reload_conv_objs=
  3364. gentop=
  3365. # reload_cmds runs $LD directly, so let us get rid of
  3366. # -Wl from whole_archive_flag_spec
  3367. wl=
  3368. if test -n "$convenience"; then
  3369. if test -n "$whole_archive_flag_spec"; then
  3370. eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
  3371. else
  3372. gentop="$output_objdir/${obj}x"
  3373. $show "${rm}r $gentop"
  3374. $run ${rm}r "$gentop"
  3375. $show "$mkdir $gentop"
  3376. $run $mkdir "$gentop"
  3377. status=$?
  3378. if test $status -ne 0 && test ! -d "$gentop"; then
  3379. exit $status
  3380. fi
  3381. generated="$generated $gentop"
  3382. for xlib in $convenience; do
  3383. # Extract the objects.
  3384. case $xlib in
  3385. [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
  3386. *) xabs=`pwd`"/$xlib" ;;
  3387. esac
  3388. xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
  3389. xdir="$gentop/$xlib"
  3390. $show "${rm}r $xdir"
  3391. $run ${rm}r "$xdir"
  3392. $show "$mkdir $xdir"
  3393. $run $mkdir "$xdir"
  3394. status=$?
  3395. if test $status -ne 0 && test ! -d "$xdir"; then
  3396. exit $status
  3397. fi
  3398. $show "(cd $xdir && $AR x $xabs)"
  3399. $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
  3400. reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
  3401. done
  3402. fi
  3403. fi
  3404. # Create the old-style object.
  3405. reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
  3406. output="$obj"
  3407. eval cmds=\"$reload_cmds\"
  3408. IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
  3409. for cmd in $cmds; do
  3410. IFS="$save_ifs"
  3411. $show "$cmd"
  3412. $run eval "$cmd" || exit $?
  3413. done
  3414. IFS="$save_ifs"
  3415. # Exit if we aren't doing a library object file.
  3416. if test -z "$libobj"; then
  3417. if test -n "$gentop"; then
  3418. $show "${rm}r $gentop"
  3419. $run ${rm}r $gentop
  3420. fi
  3421. exit 0
  3422. fi
  3423. if test "$build_libtool_libs" != yes; then
  3424. if test -n "$gentop"; then
  3425. $show "${rm}r $gentop"
  3426. $run ${rm}r $gentop
  3427. fi
  3428. # Create an invalid libtool object if no PIC, so that we don't
  3429. # accidentally link it into a program.
  3430. # $show "echo timestamp > $libobj"
  3431. # $run eval "echo timestamp > $libobj" || exit $?
  3432. exit 0
  3433. fi
  3434. if test -n "$pic_flag" || test "$pic_mode" != default; then
  3435. # Only do commands if we really have different PIC objects.
  3436. reload_objs="$libobjs $reload_conv_objs"
  3437. output="$libobj"
  3438. eval cmds=\"$reload_cmds\"
  3439. IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
  3440. for cmd in $cmds; do
  3441. IFS="$save_ifs"
  3442. $show "$cmd"
  3443. $run eval "$cmd" || exit $?
  3444. done
  3445. IFS="$save_ifs"
  3446. fi
  3447. if test -n "$gentop"; then
  3448. $show "${rm}r $gentop"
  3449. $run ${rm}r $gentop
  3450. fi
  3451. exit 0
  3452. ;;
  3453. prog)
  3454. case $host in
  3455. *cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;;
  3456. esac
  3457. if test -n "$vinfo"; then
  3458. $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
  3459. fi
  3460. if test -n "$release"; then
  3461. $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
  3462. fi
  3463. if test "$preload" = yes; then
  3464. if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
  3465. test "$dlopen_self_static" = unknown; then
  3466. $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
  3467. fi
  3468. fi
  3469. case $host in
  3470. *-*-rhapsody* | *-*-darwin1.[012])
  3471. # On Rhapsody replace the C library is the System framework
  3472. compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
  3473. finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
  3474. ;;
  3475. esac
  3476. compile_command="$compile_command $compile_deplibs"
  3477. finalize_command="$finalize_command $finalize_deplibs"
  3478. if test -n "$rpath$xrpath"; then
  3479. # If the user specified any rpath flags, then add them.
  3480. for libdir in $rpath $xrpath; do
  3481. # This is the magic to use -rpath.
  3482. case "$finalize_rpath " in
  3483. *" $libdir "*) ;;
  3484. *) finalize_rpath="$finalize_rpath $libdir" ;;
  3485. esac
  3486. done
  3487. fi
  3488. # Now hardcode the library paths
  3489. rpath=
  3490. hardcode_libdirs=
  3491. for libdir in $compile_rpath $finalize_rpath; do
  3492. if test -n "$hardcode_libdir_flag_spec"; then
  3493. if test -n "$hardcode_libdir_separator"; then
  3494. if test -z "$hardcode_libdirs"; then
  3495. hardcode_libdirs="$libdir"
  3496. else
  3497. # Just accumulate the unique libdirs.
  3498. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
  3499. *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
  3500. ;;
  3501. *)
  3502. hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
  3503. ;;
  3504. esac
  3505. fi
  3506. else
  3507. eval flag=\"$hardcode_libdir_flag_spec\"
  3508. rpath="$rpath $flag"
  3509. fi
  3510. elif test -n "$runpath_var"; then
  3511. case "$perm_rpath " in
  3512. *" $libdir "*) ;;
  3513. *) perm_rpath="$perm_rpath $libdir" ;;
  3514. esac
  3515. fi
  3516. case $host in
  3517. *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
  3518. case :$dllsearchpath: in
  3519. *":$libdir:"*) ;;
  3520. *) dllsearchpath="$dllsearchpath:$libdir";;
  3521. esac
  3522. ;;
  3523. esac
  3524. done
  3525. # Substitute the hardcoded libdirs into the rpath.
  3526. if test -n "$hardcode_libdir_separator" &&
  3527. test -n "$hardcode_libdirs"; then
  3528. libdir="$hardcode_libdirs"
  3529. eval rpath=\" $hardcode_libdir_flag_spec\"
  3530. fi
  3531. compile_rpath="$rpath"
  3532. rpath=
  3533. hardcode_libdirs=
  3534. for libdir in $finalize_rpath; do
  3535. if test -n "$hardcode_libdir_flag_spec"; then
  3536. if test -n "$hardcode_libdir_separator"; then
  3537. if test -z "$hardcode_libdirs"; then
  3538. hardcode_libdirs="$libdir"
  3539. else
  3540. # Just accumulate the unique libdirs.
  3541. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
  3542. *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
  3543. ;;
  3544. *)
  3545. hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
  3546. ;;
  3547. esac
  3548. fi
  3549. else
  3550. eval flag=\"$hardcode_libdir_flag_spec\"
  3551. rpath="$rpath $flag"
  3552. fi
  3553. elif test -n "$runpath_var"; then
  3554. case "$finalize_perm_rpath " in
  3555. *" $libdir "*) ;;
  3556. *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
  3557. esac
  3558. fi
  3559. done
  3560. # Substitute the hardcoded libdirs into the rpath.
  3561. if test -n "$hardcode_libdir_separator" &&
  3562. test -n "$hardcode_libdirs"; then
  3563. libdir="$hardcode_libdirs"
  3564. eval rpath=\" $hardcode_libdir_flag_spec\"
  3565. fi
  3566. finalize_rpath="$rpath"
  3567. if test -n "$libobjs" && test "$build_old_libs" = yes; then
  3568. # Transform all the library objects into standard objects.
  3569. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
  3570. finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
  3571. fi
  3572. dlsyms=
  3573. if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
  3574. if test -n "$NM" && test -n "$global_symbol_pipe"; then
  3575. dlsyms="${outputname}S.c"
  3576. else
  3577. $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
  3578. fi
  3579. fi
  3580. if test -n "$dlsyms"; then
  3581. case $dlsyms in
  3582. "") ;;
  3583. *.c)
  3584. # Discover the nlist of each of the dlfiles.
  3585. nlist="$output_objdir/${outputname}.nm"
  3586. $show "$rm $nlist ${nlist}S ${nlist}T"
  3587. $run $rm "$nlist" "${nlist}S" "${nlist}T"
  3588. # Parse the name list into a source file.
  3589. $show "creating $output_objdir/$dlsyms"
  3590. test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
  3591. /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
  3592. /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
  3593. #ifdef __cplusplus
  3594. extern \"C\" {
  3595. #endif
  3596. /* Prevent the only kind of declaration conflicts we can make. */
  3597. #define lt_preloaded_symbols some_other_symbol
  3598. /* External symbol declarations for the compiler. */\
  3599. "
  3600. if test "$dlself" = yes; then
  3601. $show "generating symbol list for \`$output'"
  3602. test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
  3603. # Add our own program objects to the symbol list.
  3604. progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
  3605. for arg in $progfiles; do
  3606. $show "extracting global C symbols from \`$arg'"
  3607. $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
  3608. done
  3609. if test -n "$exclude_expsyms"; then
  3610. $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
  3611. $run eval '$mv "$nlist"T "$nlist"'
  3612. fi
  3613. if test -n "$export_symbols_regex"; then
  3614. $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
  3615. $run eval '$mv "$nlist"T "$nlist"'
  3616. fi
  3617. # Prepare the list of exported symbols
  3618. if test -z "$export_symbols"; then
  3619. export_symbols="$output_objdir/$output.exp"
  3620. $run $rm $export_symbols
  3621. $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
  3622. else
  3623. $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
  3624. $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
  3625. $run eval 'mv "$nlist"T "$nlist"'
  3626. fi
  3627. fi
  3628. for arg in $dlprefiles; do
  3629. $show "extracting global C symbols from \`$arg'"
  3630. name=`echo "$arg" | sed -e 's%^.*/%%'`
  3631. $run eval 'echo ": $name " >> "$nlist"'
  3632. $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
  3633. done
  3634. if test -z "$run"; then
  3635. # Make sure we have at least an empty file.
  3636. test -f "$nlist" || : > "$nlist"
  3637. if test -n "$exclude_expsyms"; then
  3638. egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
  3639. $mv "$nlist"T "$nlist"
  3640. fi
  3641. # Try sorting and uniquifying the output.
  3642. if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then
  3643. :
  3644. else
  3645. grep -v "^: " < "$nlist" > "$nlist"S
  3646. fi
  3647. if test -f "$nlist"S; then
  3648. eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
  3649. else
  3650. echo '/* NONE */' >> "$output_objdir/$dlsyms"
  3651. fi
  3652. $echo >> "$output_objdir/$dlsyms" "\
  3653. #undef lt_preloaded_symbols
  3654. #if defined (__STDC__) && __STDC__
  3655. # define lt_ptr void *
  3656. #else
  3657. # define lt_ptr char *
  3658. # define const
  3659. #endif
  3660. /* The mapping between symbol names and symbols. */
  3661. const struct {
  3662. const char *name;
  3663. lt_ptr address;
  3664. }
  3665. lt_preloaded_symbols[] =
  3666. {\
  3667. "
  3668. eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
  3669. $echo >> "$output_objdir/$dlsyms" "\
  3670. {0, (lt_ptr) 0}
  3671. };
  3672. /* This works around a problem in FreeBSD linker */
  3673. #ifdef FREEBSD_WORKAROUND
  3674. static const void *lt_preloaded_setup() {
  3675. return lt_preloaded_symbols;
  3676. }
  3677. #endif
  3678. #ifdef __cplusplus
  3679. }
  3680. #endif\
  3681. "
  3682. fi
  3683. pic_flag_for_symtable=
  3684. case $host in
  3685. # compiling the symbol table file with pic_flag works around
  3686. # a FreeBSD bug that causes programs to crash when -lm is
  3687. # linked before any other PIC object. But we must not use
  3688. # pic_flag when linking with -static. The problem exists in
  3689. # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
  3690. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
  3691. case "$compile_command " in
  3692. *" -static "*) ;;
  3693. *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
  3694. esac;;
  3695. *-*-hpux*)
  3696. case "$compile_command " in
  3697. *" -static "*) ;;
  3698. *) pic_flag_for_symtable=" $pic_flag";;
  3699. esac
  3700. esac
  3701. # Now compile the dynamic symbol file.
  3702. $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
  3703. $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
  3704. # Clean up the generated files.
  3705. $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
  3706. $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
  3707. # Transform the symbol file into the correct name.
  3708. compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
  3709. finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
  3710. ;;
  3711. *)
  3712. $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
  3713. exit 1
  3714. ;;
  3715. esac
  3716. else
  3717. # We keep going just in case the user didn't refer to
  3718. # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
  3719. # really was required.
  3720. # Nullify the symbol file.
  3721. compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
  3722. finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
  3723. fi
  3724. if test $need_relink = no || test "$build_libtool_libs" != yes; then
  3725. # Replace the output file specification.
  3726. compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
  3727. link_command="$compile_command$compile_rpath"
  3728. # We have no uninstalled library dependencies, so finalize right now.
  3729. $show "$link_command"
  3730. $run eval "$link_command"
  3731. status=$?
  3732. # Delete the generated files.
  3733. if test -n "$dlsyms"; then
  3734. $show "$rm $output_objdir/${outputname}S.${objext}"
  3735. $run $rm "$output_objdir/${outputname}S.${objext}"
  3736. fi
  3737. exit $status
  3738. fi
  3739. if test -n "$shlibpath_var"; then
  3740. # We should set the shlibpath_var
  3741. rpath=
  3742. for dir in $temp_rpath; do
  3743. case $dir in
  3744. [\\/]* | [A-Za-z]:[\\/]*)
  3745. # Absolute path.
  3746. rpath="$rpath$dir:"
  3747. ;;
  3748. *)
  3749. # Relative path: add a thisdir entry.
  3750. rpath="$rpath\$thisdir/$dir:"
  3751. ;;
  3752. esac
  3753. done
  3754. temp_rpath="$rpath"
  3755. fi
  3756. if test -n "$compile_shlibpath$finalize_shlibpath"; then
  3757. compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
  3758. fi
  3759. if test -n "$finalize_shlibpath"; then
  3760. finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
  3761. fi
  3762. compile_var=
  3763. finalize_var=
  3764. if test -n "$runpath_var"; then
  3765. if test -n "$perm_rpath"; then
  3766. # We should set the runpath_var.
  3767. rpath=
  3768. for dir in $perm_rpath; do
  3769. rpath="$rpath$dir:"
  3770. done
  3771. compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
  3772. fi
  3773. if test -n "$finalize_perm_rpath"; then
  3774. # We should set the runpath_var.
  3775. rpath=
  3776. for dir in $finalize_perm_rpath; do
  3777. rpath="$rpath$dir:"
  3778. done
  3779. finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
  3780. fi
  3781. fi
  3782. if test "$no_install" = yes; then
  3783. # We don't need to create a wrapper script.
  3784. link_command="$compile_var$compile_command$compile_rpath"
  3785. # Replace the output file specification.
  3786. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
  3787. # Delete the old output file.
  3788. $run $rm $output
  3789. # Link the executable and exit
  3790. $show "$link_command"
  3791. $run eval "$link_command" || exit $?
  3792. exit 0
  3793. fi
  3794. if test "$hardcode_action" = relink; then
  3795. # Fast installation is not supported
  3796. link_command="$compile_var$compile_command$compile_rpath"
  3797. relink_command="$finalize_var$finalize_command$finalize_rpath"
  3798. $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
  3799. $echo "$modename: \`$output' will be relinked during installation" 1>&2
  3800. else
  3801. if test "$fast_install" != no; then
  3802. link_command="$finalize_var$compile_command$finalize_rpath"
  3803. if test "$fast_install" = yes; then
  3804. relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
  3805. else
  3806. # fast_install is set to needless
  3807. relink_command=
  3808. fi
  3809. else
  3810. link_command="$compile_var$compile_command$compile_rpath"
  3811. relink_command="$finalize_var$finalize_command$finalize_rpath"
  3812. fi
  3813. fi
  3814. # Replace the output file specification.
  3815. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
  3816. # Delete the old output files.
  3817. $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
  3818. $show "$link_command"
  3819. $run eval "$link_command" || exit $?
  3820. # Now create the wrapper script.
  3821. $show "creating $output"
  3822. # Quote the relink command for shipping.
  3823. if test -n "$relink_command"; then
  3824. # Preserve any variables that may affect compiler behavior
  3825. for var in $variables_saved_for_relink; do
  3826. if eval test -z \"\${$var+set}\"; then
  3827. relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
  3828. elif eval var_value=\$$var; test -z "$var_value"; then
  3829. relink_command="$var=; export $var; $relink_command"
  3830. else
  3831. var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
  3832. relink_command="$var=\"$var_value\"; export $var; $relink_command"
  3833. fi
  3834. done
  3835. relink_command="cd `pwd`; $relink_command"
  3836. relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
  3837. fi
  3838. # Quote $echo for shipping.
  3839. if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
  3840. case $0 in
  3841. [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
  3842. *) qecho="$SHELL `pwd`/$0 --fallback-echo";;
  3843. esac
  3844. qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
  3845. else
  3846. qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
  3847. fi
  3848. # Only actually do things if our run command is non-null.
  3849. if test -z "$run"; then
  3850. # win32 will think the script is a binary if it has
  3851. # a .exe suffix, so we strip it off here.
  3852. case $output in
  3853. *.exe) output=`echo $output|sed 's,.exe$,,'` ;;
  3854. esac
  3855. # test for cygwin because mv fails w/o .exe extensions
  3856. case $host in
  3857. *cygwin*) exeext=.exe ;;
  3858. *) exeext= ;;
  3859. esac
  3860. $rm $output
  3861. trap "$rm $output; exit 1" 1 2 15
  3862. $echo > $output "\
  3863. #! $SHELL
  3864. # $output - temporary wrapper script for $objdir/$outputname
  3865. # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
  3866. #
  3867. # The $output program cannot be directly executed until all the libtool
  3868. # libraries that it depends on are installed.
  3869. #
  3870. # This wrapper script should never be moved out of the build directory.
  3871. # If it is, it will not operate correctly.
  3872. # Sed substitution that helps us do robust quoting. It backslashifies
  3873. # metacharacters that are still active within double-quoted strings.
  3874. Xsed='sed -e 1s/^X//'
  3875. sed_quote_subst='$sed_quote_subst'
  3876. # The HP-UX ksh and POSIX shell print the target directory to stdout
  3877. # if CDPATH is set.
  3878. if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
  3879. relink_command=\"$relink_command\"
  3880. # This environment variable determines our operation mode.
  3881. if test \"\$libtool_install_magic\" = \"$magic\"; then
  3882. # install mode needs the following variable:
  3883. notinst_deplibs='$notinst_deplibs'
  3884. else
  3885. # When we are sourced in execute mode, \$file and \$echo are already set.
  3886. if test \"\$libtool_execute_magic\" != \"$magic\"; then
  3887. echo=\"$qecho\"
  3888. file=\"\$0\"
  3889. # Make sure echo works.
  3890. if test \"X\$1\" = X--no-reexec; then
  3891. # Discard the --no-reexec flag, and continue.
  3892. shift
  3893. elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
  3894. # Yippee, \$echo works!
  3895. :
  3896. else
  3897. # Restart under the correct shell, and then maybe \$echo will work.
  3898. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
  3899. fi
  3900. fi\
  3901. "
  3902. $echo >> $output "\
  3903. # Find the directory that this script lives in.
  3904. thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
  3905. test \"x\$thisdir\" = \"x\$file\" && thisdir=.
  3906. # Follow symbolic links until we get to the real thisdir.
  3907. file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
  3908. while test -n \"\$file\"; do
  3909. destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
  3910. # If there was a directory component, then change thisdir.
  3911. if test \"x\$destdir\" != \"x\$file\"; then
  3912. case \"\$destdir\" in
  3913. [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
  3914. *) thisdir=\"\$thisdir/\$destdir\" ;;
  3915. esac
  3916. fi
  3917. file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
  3918. file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
  3919. done
  3920. # Try to get the absolute directory name.
  3921. absdir=\`cd \"\$thisdir\" && pwd\`
  3922. test -n \"\$absdir\" && thisdir=\"\$absdir\"
  3923. "
  3924. if test "$fast_install" = yes; then
  3925. echo >> $output "\
  3926. program=lt-'$outputname'$exeext
  3927. progdir=\"\$thisdir/$objdir\"
  3928. if test ! -f \"\$progdir/\$program\" || \\
  3929. { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
  3930. test \"X\$file\" != \"X\$progdir/\$program\"; }; then
  3931. file=\"\$\$-\$program\"
  3932. if test ! -d \"\$progdir\"; then
  3933. $mkdir \"\$progdir\"
  3934. else
  3935. $rm \"\$progdir/\$file\"
  3936. fi"
  3937. echo >> $output "\
  3938. # relink executable if necessary
  3939. if test -n \"\$relink_command\"; then
  3940. if relink_command_output=\`eval \$relink_command 2>&1\`; then :
  3941. else
  3942. $echo \"\$relink_command_output\" >&2
  3943. $rm \"\$progdir/\$file\"
  3944. exit 1
  3945. fi
  3946. fi
  3947. $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
  3948. { $rm \"\$progdir/\$program\";
  3949. $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
  3950. $rm \"\$progdir/\$file\"
  3951. fi"
  3952. else
  3953. echo >> $output "\
  3954. program='$outputname'
  3955. progdir=\"\$thisdir/$objdir\"
  3956. "
  3957. fi
  3958. echo >> $output "\
  3959. if test -f \"\$progdir/\$program\"; then"
  3960. # Export our shlibpath_var if we have one.
  3961. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
  3962. $echo >> $output "\
  3963. # Add our own library path to $shlibpath_var
  3964. $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
  3965. # Some systems cannot cope with colon-terminated $shlibpath_var
  3966. # The second colon is a workaround for a bug in BeOS R4 sed
  3967. $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
  3968. export $shlibpath_var
  3969. "
  3970. fi
  3971. # fixup the dll searchpath if we need to.
  3972. if test -n "$dllsearchpath"; then
  3973. $echo >> $output "\
  3974. # Add the dll search path components to the executable PATH
  3975. PATH=$dllsearchpath:\$PATH
  3976. "
  3977. fi
  3978. $echo >> $output "\
  3979. if test \"\$libtool_execute_magic\" != \"$magic\"; then
  3980. # Run the actual program with our arguments.
  3981. "
  3982. case $host in
  3983. # win32 systems need to use the prog path for dll
  3984. # lookup to work
  3985. *-*-cygwin* | *-*-pw32*)
  3986. $echo >> $output "\
  3987. exec \$progdir/\$program \${1+\"\$@\"}
  3988. "
  3989. ;;
  3990. # Backslashes separate directories on plain windows
  3991. *-*-mingw | *-*-os2*)
  3992. $echo >> $output "\
  3993. exec \$progdir\\\\\$program \${1+\"\$@\"}
  3994. "
  3995. ;;
  3996. *)
  3997. $echo >> $output "\
  3998. # Export the path to the program.
  3999. PATH=\"\$progdir:\$PATH\"
  4000. export PATH
  4001. exec \$program \${1+\"\$@\"}
  4002. "
  4003. ;;
  4004. esac
  4005. $echo >> $output "\
  4006. \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
  4007. exit 1
  4008. fi
  4009. else
  4010. # The program doesn't exist.
  4011. \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
  4012. \$echo \"This script is just a wrapper for \$program.\" 1>&2
  4013. echo \"See the $PACKAGE documentation for more information.\" 1>&2
  4014. exit 1
  4015. fi
  4016. fi\
  4017. "
  4018. chmod +x $output
  4019. fi
  4020. exit 0
  4021. ;;
  4022. esac
  4023. # See if we need to build an old-fashioned archive.
  4024. for oldlib in $oldlibs; do
  4025. if test "$build_libtool_libs" = convenience; then
  4026. oldobjs="$libobjs_save"
  4027. addlibs="$convenience"
  4028. build_libtool_libs=no
  4029. else
  4030. if test "$build_libtool_libs" = module; then
  4031. oldobjs="$libobjs_save"
  4032. build_libtool_libs=no
  4033. else
  4034. oldobjs="$objs$old_deplibs $non_pic_objects"
  4035. fi
  4036. addlibs="$old_convenience"
  4037. fi
  4038. if test -n "$addlibs"; then
  4039. gentop="$output_objdir/${outputname}x"
  4040. $show "${rm}r $gentop"
  4041. $run ${rm}r "$gentop"
  4042. $show "$mkdir $gentop"
  4043. $run $mkdir "$gentop"
  4044. status=$?
  4045. if test $status -ne 0 && test ! -d "$gentop"; then
  4046. exit $status
  4047. fi
  4048. generated="$generated $gentop"
  4049. # Add in members from convenience archives.
  4050. for xlib in $addlibs; do
  4051. # Extract the objects.
  4052. case $xlib in
  4053. [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
  4054. *) xabs=`pwd`"/$xlib" ;;
  4055. esac
  4056. xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
  4057. xdir="$gentop/$xlib"
  4058. $show "${rm}r $xdir"
  4059. $run ${rm}r "$xdir"
  4060. $show "$mkdir $xdir"
  4061. $run $mkdir "$xdir"
  4062. status=$?
  4063. if test $status -ne 0 && test ! -d "$xdir"; then
  4064. exit $status
  4065. fi
  4066. $show "(cd $xdir && $AR x $xabs)"
  4067. $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
  4068. oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
  4069. done
  4070. fi
  4071. # Do each command in the archive commands.
  4072. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
  4073. eval cmds=\"$old_archive_from_new_cmds\"
  4074. else
  4075. eval cmds=\"$old_archive_cmds\"
  4076. if len=`expr "X$cmds" : ".*"` &&
  4077. test $len -le $max_cmd_len || test $max_cmd_len -le -1; then
  4078. :
  4079. else
  4080. # the command line is too long to link in one step, link in parts
  4081. $echo "using piecewise archive linking..."
  4082. save_RANLIB=$RANLIB
  4083. RANLIB=:
  4084. objlist=
  4085. concat_cmds=
  4086. save_oldobjs=$oldobjs
  4087. for obj in $save_oldobjs
  4088. do
  4089. oldobjs="$objlist $obj"
  4090. objlist="$objlist $obj"
  4091. eval test_cmds=\"$old_archive_cmds\"
  4092. if len=`expr "X$test_cmds" : ".*"` &&
  4093. test $len -le $max_cmd_len; then
  4094. :
  4095. else
  4096. # the above command should be used before it gets too long
  4097. oldobjs=$objlist
  4098. test -z "$concat_cmds" || concat_cmds=$concat_cmds~
  4099. eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
  4100. objlist=
  4101. fi
  4102. done
  4103. RANLIB=$save_RANLIB
  4104. oldobjs=$objlist
  4105. eval cmds=\"\$concat_cmds~$old_archive_cmds\"
  4106. fi
  4107. fi
  4108. IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
  4109. for cmd in $cmds; do
  4110. IFS="$save_ifs"
  4111. $show "$cmd"
  4112. $run eval "$cmd" || exit $?
  4113. done
  4114. IFS="$save_ifs"
  4115. done
  4116. if test -n "$generated"; then
  4117. $show "${rm}r$generated"
  4118. $run ${rm}r$generated
  4119. fi
  4120. # Now create the libtool archive.
  4121. case $output in
  4122. *.la)
  4123. old_library=
  4124. test "$build_old_libs" = yes && old_library="$libname.$libext"
  4125. $show "creating $output"
  4126. # Preserve any variables that may affect compiler behavior
  4127. for var in $variables_saved_for_relink; do
  4128. if eval test -z \"\${$var+set}\"; then
  4129. relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
  4130. elif eval var_value=\$$var; test -z "$var_value"; then
  4131. relink_command="$var=; export $var; $relink_command"
  4132. else
  4133. var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
  4134. relink_command="$var=\"$var_value\"; export $var; $relink_command"
  4135. fi
  4136. done
  4137. # Quote the link command for shipping.
  4138. relink_command="cd `pwd`; $SHELL $0 --mode=relink $libtool_args"
  4139. relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
  4140. # Only create the output if not a dry run.
  4141. if test -z "$run"; then
  4142. for installed in no yes; do
  4143. if test "$installed" = yes; then
  4144. if test -z "$install_libdir"; then
  4145. break
  4146. fi
  4147. output="$output_objdir/$outputname"i
  4148. # Replace all uninstalled libtool libraries with the installed ones
  4149. newdependency_libs=
  4150. for deplib in $dependency_libs; do
  4151. case $deplib in
  4152. *.la)
  4153. name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
  4154. eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
  4155. if test -z "$libdir"; then
  4156. $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
  4157. exit 1
  4158. fi
  4159. newdependency_libs="$newdependency_libs $libdir/$name"
  4160. ;;
  4161. *) newdependency_libs="$newdependency_libs $deplib" ;;
  4162. esac
  4163. done
  4164. dependency_libs="$newdependency_libs"
  4165. newdlfiles=
  4166. for lib in $dlfiles; do
  4167. name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
  4168. eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
  4169. if test -z "$libdir"; then
  4170. $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
  4171. exit 1
  4172. fi
  4173. newdlfiles="$newdlfiles $libdir/$name"
  4174. done
  4175. dlfiles="$newdlfiles"
  4176. newdlprefiles=
  4177. for lib in $dlprefiles; do
  4178. name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
  4179. eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
  4180. if test -z "$libdir"; then
  4181. $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
  4182. exit 1
  4183. fi
  4184. newdlprefiles="$newdlprefiles $libdir/$name"
  4185. done
  4186. dlprefiles="$newdlprefiles"
  4187. fi
  4188. $rm $output
  4189. # place dlname in correct position for cygwin
  4190. tdlname=$dlname
  4191. case $host,$output,$installed,$module,$dlname in
  4192. *cygwin*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
  4193. esac
  4194. $echo > $output "\
  4195. # $outputname - a libtool library file
  4196. # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
  4197. #
  4198. # Please DO NOT delete this file!
  4199. # It is necessary for linking the library.
  4200. # The name that we can dlopen(3).
  4201. dlname='$tdlname'
  4202. # Names of this library.
  4203. library_names='$library_names'
  4204. # The name of the static archive.
  4205. old_library='$old_library'
  4206. # Libraries that this one depends upon.
  4207. dependency_libs='$dependency_libs'
  4208. # Version information for $libname.
  4209. current=$current
  4210. age=$age
  4211. revision=$revision
  4212. # Is this an already installed library?
  4213. installed=$installed
  4214. # Files to dlopen/dlpreopen
  4215. dlopen='$dlfiles'
  4216. dlpreopen='$dlprefiles'
  4217. # Directory that this library needs to be installed in:
  4218. libdir='$install_libdir'"
  4219. if test "$installed" = no && test $need_relink = yes; then
  4220. $echo >> $output "\
  4221. relink_command=\"$relink_command\""
  4222. fi
  4223. done
  4224. fi
  4225. # Do a symbolic link so that the libtool archive can be found in
  4226. # LD_LIBRARY_PATH before the program is installed.
  4227. $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
  4228. $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
  4229. ;;
  4230. esac
  4231. exit 0
  4232. ;;
  4233. # libtool install mode
  4234. install)
  4235. modename="$modename: install"
  4236. # There may be an optional sh(1) argument at the beginning of
  4237. # install_prog (especially on Windows NT).
  4238. if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
  4239. # Allow the use of GNU shtool's install command.
  4240. $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
  4241. # Aesthetically quote it.
  4242. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
  4243. case $arg in
  4244. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
  4245. arg="\"$arg\""
  4246. ;;
  4247. esac
  4248. install_prog="$arg "
  4249. arg="$1"
  4250. shift
  4251. else
  4252. install_prog=
  4253. arg="$nonopt"
  4254. fi
  4255. # The real first argument should be the name of the installation program.
  4256. # Aesthetically quote it.
  4257. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
  4258. case $arg in
  4259. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
  4260. arg="\"$arg\""
  4261. ;;
  4262. esac
  4263. install_prog="$install_prog$arg"
  4264. # We need to accept at least all the BSD install flags.
  4265. dest=
  4266. files=
  4267. opts=
  4268. prev=
  4269. install_type=
  4270. isdir=no
  4271. stripme=
  4272. for arg
  4273. do
  4274. if test -n "$dest"; then
  4275. files="$files $dest"
  4276. dest="$arg"
  4277. continue
  4278. fi
  4279. case $arg in
  4280. -d) isdir=yes ;;
  4281. -f) prev="-f" ;;
  4282. -g) prev="-g" ;;
  4283. -m) prev="-m" ;;
  4284. -o) prev="-o" ;;
  4285. -s)
  4286. stripme=" -s"
  4287. continue
  4288. ;;
  4289. -*) ;;
  4290. *)
  4291. # If the previous option needed an argument, then skip it.
  4292. if test -n "$prev"; then
  4293. prev=
  4294. else
  4295. dest="$arg"
  4296. continue
  4297. fi
  4298. ;;
  4299. esac
  4300. # Aesthetically quote the argument.
  4301. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
  4302. case $arg in
  4303. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
  4304. arg="\"$arg\""
  4305. ;;
  4306. esac
  4307. install_prog="$install_prog $arg"
  4308. done
  4309. if test -z "$install_prog"; then
  4310. $echo "$modename: you must specify an install program" 1>&2
  4311. $echo "$help" 1>&2
  4312. exit 1
  4313. fi
  4314. if test -n "$prev"; then
  4315. $echo "$modename: the \`$prev' option requires an argument" 1>&2
  4316. $echo "$help" 1>&2
  4317. exit 1
  4318. fi
  4319. if test -z "$files"; then
  4320. if test -z "$dest"; then
  4321. $echo "$modename: no file or destination specified" 1>&2
  4322. else
  4323. $echo "$modename: you must specify a destination" 1>&2
  4324. fi
  4325. $echo "$help" 1>&2
  4326. exit 1
  4327. fi
  4328. # Strip any trailing slash from the destination.
  4329. dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
  4330. # Check to see that the destination is a directory.
  4331. test -d "$dest" && isdir=yes
  4332. if test "$isdir" = yes; then
  4333. destdir="$dest"
  4334. destname=
  4335. else
  4336. destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
  4337. test "X$destdir" = "X$dest" && destdir=.
  4338. destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
  4339. # Not a directory, so check to see that there is only one file specified.
  4340. set dummy $files
  4341. if test $# -gt 2; then
  4342. $echo "$modename: \`$dest' is not a directory" 1>&2
  4343. $echo "$help" 1>&2
  4344. exit 1
  4345. fi
  4346. fi
  4347. case $destdir in
  4348. [\\/]* | [A-Za-z]:[\\/]*) ;;
  4349. *)
  4350. for file in $files; do
  4351. case $file in
  4352. *.lo) ;;
  4353. *)
  4354. $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
  4355. $echo "$help" 1>&2
  4356. exit 1
  4357. ;;
  4358. esac
  4359. done
  4360. ;;
  4361. esac
  4362. # This variable tells wrapper scripts just to set variables rather
  4363. # than running their programs.
  4364. libtool_install_magic="$magic"
  4365. staticlibs=
  4366. future_libdirs=
  4367. current_libdirs=
  4368. for file in $files; do
  4369. # Do each installation.
  4370. case $file in
  4371. *.$libext)
  4372. # Do the static libraries later.
  4373. staticlibs="$staticlibs $file"
  4374. ;;
  4375. *.la)
  4376. # Check to see that this really is a libtool archive.
  4377. if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
  4378. else
  4379. $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
  4380. $echo "$help" 1>&2
  4381. exit 1
  4382. fi
  4383. library_names=
  4384. old_library=
  4385. relink_command=
  4386. # If there is no directory component, then add one.
  4387. case $file in
  4388. */* | *\\*) . $file ;;
  4389. *) . ./$file ;;
  4390. esac
  4391. # Add the libdir to current_libdirs if it is the destination.
  4392. if test "X$destdir" = "X$libdir"; then
  4393. case "$current_libdirs " in
  4394. *" $libdir "*) ;;
  4395. *) current_libdirs="$current_libdirs $libdir" ;;
  4396. esac
  4397. else
  4398. # Note the libdir as a future libdir.
  4399. case "$future_libdirs " in
  4400. *" $libdir "*) ;;
  4401. *) future_libdirs="$future_libdirs $libdir" ;;
  4402. esac
  4403. fi
  4404. dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
  4405. test "X$dir" = "X$file/" && dir=
  4406. dir="$dir$objdir"
  4407. if test -n "$relink_command"; then
  4408. $echo "$modename: warning: relinking \`$file'" 1>&2
  4409. $show "$relink_command"
  4410. if $run eval "$relink_command"; then :
  4411. else
  4412. $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
  4413. continue
  4414. fi
  4415. fi
  4416. # See the names of the shared library.
  4417. set dummy $library_names
  4418. if test -n "$2"; then
  4419. realname="$2"
  4420. shift
  4421. shift
  4422. srcname="$realname"
  4423. test -n "$relink_command" && srcname="$realname"T
  4424. # Install the shared library and build the symlinks.
  4425. $show "$install_prog $dir/$srcname $destdir/$realname"
  4426. $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
  4427. if test -n "$stripme" && test -n "$striplib"; then
  4428. $show "$striplib $destdir/$realname"
  4429. $run eval "$striplib $destdir/$realname" || exit $?
  4430. fi
  4431. if test $# -gt 0; then
  4432. # Delete the old symlinks, and create new ones.
  4433. for linkname
  4434. do
  4435. if test "$linkname" != "$realname"; then
  4436. $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
  4437. $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
  4438. fi
  4439. done
  4440. fi
  4441. # Do each command in the postinstall commands.
  4442. lib="$destdir/$realname"
  4443. eval cmds=\"$postinstall_cmds\"
  4444. IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
  4445. for cmd in $cmds; do
  4446. IFS="$save_ifs"
  4447. $show "$cmd"
  4448. $run eval "$cmd" || exit $?
  4449. done
  4450. IFS="$save_ifs"
  4451. fi
  4452. # Install the pseudo-library for information purposes.
  4453. name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
  4454. instname="$dir/$name"i
  4455. $show "$install_prog $instname $destdir/$name"
  4456. $run eval "$install_prog $instname $destdir/$name" || exit $?
  4457. # Maybe install the static library, too.
  4458. test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
  4459. ;;
  4460. *.lo)
  4461. # Install (i.e. copy) a libtool object.
  4462. # Figure out destination file name, if it wasn't already specified.
  4463. if test -n "$destname"; then
  4464. destfile="$destdir/$destname"
  4465. else
  4466. destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
  4467. destfile="$destdir/$destfile"
  4468. fi
  4469. # Deduce the name of the destination old-style object file.
  4470. case $destfile in
  4471. *.lo)
  4472. staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
  4473. ;;
  4474. *.$objext)
  4475. staticdest="$destfile"
  4476. destfile=
  4477. ;;
  4478. *)
  4479. $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
  4480. $echo "$help" 1>&2
  4481. exit 1
  4482. ;;
  4483. esac
  4484. # Install the libtool object if requested.
  4485. if test -n "$destfile"; then
  4486. $show "$install_prog $file $destfile"
  4487. $run eval "$install_prog $file $destfile" || exit $?
  4488. fi
  4489. # Install the old object if enabled.
  4490. if test "$build_old_libs" = yes; then
  4491. # Deduce the name of the old-style object file.
  4492. staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
  4493. $show "$install_prog $staticobj $staticdest"
  4494. $run eval "$install_prog \$staticobj \$staticdest" || exit $?
  4495. fi
  4496. exit 0
  4497. ;;
  4498. *)
  4499. # Figure out destination file name, if it wasn't already specified.
  4500. if test -n "$destname"; then
  4501. destfile="$destdir/$destname"
  4502. else
  4503. destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
  4504. destfile="$destdir/$destfile"
  4505. fi
  4506. # Do a test to see if this is really a libtool program.
  4507. if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
  4508. notinst_deplibs=
  4509. relink_command=
  4510. # If there is no directory component, then add one.
  4511. case $file in
  4512. */* | *\\*) . $file ;;
  4513. *) . ./$file ;;
  4514. esac
  4515. # Check the variables that should have been set.
  4516. if test -z "$notinst_deplibs"; then
  4517. $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
  4518. exit 1
  4519. fi
  4520. finalize=yes
  4521. for lib in $notinst_deplibs; do
  4522. # Check to see that each library is installed.
  4523. libdir=
  4524. if test -f "$lib"; then
  4525. # If there is no directory component, then add one.
  4526. case $lib in
  4527. */* | *\\*) . $lib ;;
  4528. *) . ./$lib ;;
  4529. esac
  4530. fi
  4531. libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
  4532. if test -n "$libdir" && test ! -f "$libfile"; then
  4533. $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
  4534. finalize=no
  4535. fi
  4536. done
  4537. relink_command=
  4538. # If there is no directory component, then add one.
  4539. case $file in
  4540. */* | *\\*) . $file ;;
  4541. *) . ./$file ;;
  4542. esac
  4543. outputname=
  4544. if test "$fast_install" = no && test -n "$relink_command"; then
  4545. if test "$finalize" = yes && test -z "$run"; then
  4546. tmpdir="/tmp"
  4547. test -n "$TMPDIR" && tmpdir="$TMPDIR"
  4548. tmpdir="$tmpdir/libtool-$$"
  4549. if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
  4550. else
  4551. $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
  4552. continue
  4553. fi
  4554. file=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
  4555. outputname="$tmpdir/$file"
  4556. # Replace the output file specification.
  4557. relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
  4558. $show "$relink_command"
  4559. if $run eval "$relink_command"; then :
  4560. else
  4561. $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
  4562. ${rm}r "$tmpdir"
  4563. continue
  4564. fi
  4565. file="$outputname"
  4566. else
  4567. $echo "$modename: warning: cannot relink \`$file'" 1>&2
  4568. fi
  4569. else
  4570. # Install the binary that we compiled earlier.
  4571. file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
  4572. fi
  4573. fi
  4574. # remove .exe since cygwin /usr/bin/install will append another
  4575. # one anyways
  4576. case $install_prog,$host in
  4577. */usr/bin/install*,*cygwin*)
  4578. case $file:$destfile in
  4579. *.exe:*.exe)
  4580. # this is ok
  4581. ;;
  4582. *.exe:*)
  4583. destfile=$destfile.exe
  4584. ;;
  4585. *:*.exe)
  4586. destfile=`echo $destfile | sed -e 's,.exe$,,'`
  4587. ;;
  4588. esac
  4589. ;;
  4590. esac
  4591. $show "$install_prog$stripme $file $destfile"
  4592. $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
  4593. test -n "$outputname" && ${rm}r "$tmpdir"
  4594. ;;
  4595. esac
  4596. done
  4597. for file in $staticlibs; do
  4598. name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
  4599. # Set up the ranlib parameters.
  4600. oldlib="$destdir/$name"
  4601. $show "$install_prog $file $oldlib"
  4602. $run eval "$install_prog \$file \$oldlib" || exit $?
  4603. if test -n "$stripme" && test -n "$striplib"; then
  4604. $show "$old_striplib $oldlib"
  4605. $run eval "$old_striplib $oldlib" || exit $?
  4606. fi
  4607. # Do each command in the postinstall commands.
  4608. eval cmds=\"$old_postinstall_cmds\"
  4609. IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
  4610. for cmd in $cmds; do
  4611. IFS="$save_ifs"
  4612. $show "$cmd"
  4613. $run eval "$cmd" || exit $?
  4614. done
  4615. IFS="$save_ifs"
  4616. done
  4617. if test -n "$future_libdirs"; then
  4618. $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
  4619. fi
  4620. if test -n "$current_libdirs"; then
  4621. # Maybe just do a dry run.
  4622. test -n "$run" && current_libdirs=" -n$current_libdirs"
  4623. exec_cmd='$SHELL $0 --finish$current_libdirs'
  4624. else
  4625. exit 0
  4626. fi
  4627. ;;
  4628. # libtool finish mode
  4629. finish)
  4630. modename="$modename: finish"
  4631. libdirs="$nonopt"
  4632. admincmds=
  4633. if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
  4634. for dir
  4635. do
  4636. libdirs="$libdirs $dir"
  4637. done
  4638. for libdir in $libdirs; do
  4639. if test -n "$finish_cmds"; then
  4640. # Do each command in the finish commands.
  4641. eval cmds=\"$finish_cmds\"
  4642. IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
  4643. for cmd in $cmds; do
  4644. IFS="$save_ifs"
  4645. $show "$cmd"
  4646. $run eval "$cmd" || admincmds="$admincmds
  4647. $cmd"
  4648. done
  4649. IFS="$save_ifs"
  4650. fi
  4651. if test -n "$finish_eval"; then
  4652. # Do the single finish_eval.
  4653. eval cmds=\"$finish_eval\"
  4654. $run eval "$cmds" || admincmds="$admincmds
  4655. $cmds"
  4656. fi
  4657. done
  4658. fi
  4659. # Exit here if they wanted silent mode.
  4660. test "$show" = : && exit 0
  4661. echo "----------------------------------------------------------------------"
  4662. echo "Libraries have been installed in:"
  4663. for libdir in $libdirs; do
  4664. echo " $libdir"
  4665. done
  4666. echo
  4667. echo "If you ever happen to want to link against installed libraries"
  4668. echo "in a given directory, LIBDIR, you must either use libtool, and"
  4669. echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
  4670. echo "flag during linking and do at least one of the following:"
  4671. if test -n "$shlibpath_var"; then
  4672. echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
  4673. echo " during execution"
  4674. fi
  4675. if test -n "$runpath_var"; then
  4676. echo " - add LIBDIR to the \`$runpath_var' environment variable"
  4677. echo " during linking"
  4678. fi
  4679. if test -n "$hardcode_libdir_flag_spec"; then
  4680. libdir=LIBDIR
  4681. eval flag=\"$hardcode_libdir_flag_spec\"
  4682. echo " - use the \`$flag' linker flag"
  4683. fi
  4684. if test -n "$admincmds"; then
  4685. echo " - have your system administrator run these commands:$admincmds"
  4686. fi
  4687. if test -f /etc/ld.so.conf; then
  4688. echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
  4689. fi
  4690. echo
  4691. echo "See any operating system documentation about shared libraries for"
  4692. echo "more information, such as the ld(1) and ld.so(8) manual pages."
  4693. echo "----------------------------------------------------------------------"
  4694. exit 0
  4695. ;;
  4696. # libtool execute mode
  4697. execute)
  4698. modename="$modename: execute"
  4699. # The first argument is the command name.
  4700. cmd="$nonopt"
  4701. if test -z "$cmd"; then
  4702. $echo "$modename: you must specify a COMMAND" 1>&2
  4703. $echo "$help"
  4704. exit 1
  4705. fi
  4706. # Handle -dlopen flags immediately.
  4707. for file in $execute_dlfiles; do
  4708. if test ! -f "$file"; then
  4709. $echo "$modename: \`$file' is not a file" 1>&2
  4710. $echo "$help" 1>&2
  4711. exit 1
  4712. fi
  4713. dir=
  4714. case $file in
  4715. *.la)
  4716. # Check to see that this really is a libtool archive.
  4717. if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
  4718. else
  4719. $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
  4720. $echo "$help" 1>&2
  4721. exit 1
  4722. fi
  4723. # Read the libtool library.
  4724. dlname=
  4725. library_names=
  4726. # If there is no directory component, then add one.
  4727. case $file in
  4728. */* | *\\*) . $file ;;
  4729. *) . ./$file ;;
  4730. esac
  4731. # Skip this library if it cannot be dlopened.
  4732. if test -z "$dlname"; then
  4733. # Warn if it was a shared library.
  4734. test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
  4735. continue
  4736. fi
  4737. dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
  4738. test "X$dir" = "X$file" && dir=.
  4739. if test -f "$dir/$objdir/$dlname"; then
  4740. dir="$dir/$objdir"
  4741. else
  4742. $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
  4743. exit 1
  4744. fi
  4745. ;;
  4746. *.lo)
  4747. # Just add the directory containing the .lo file.
  4748. dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
  4749. test "X$dir" = "X$file" && dir=.
  4750. ;;
  4751. *)
  4752. $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
  4753. continue
  4754. ;;
  4755. esac
  4756. # Get the absolute pathname.
  4757. absdir=`cd "$dir" && pwd`
  4758. test -n "$absdir" && dir="$absdir"
  4759. # Now add the directory to shlibpath_var.
  4760. if eval "test -z \"\$$shlibpath_var\""; then
  4761. eval "$shlibpath_var=\"\$dir\""
  4762. else
  4763. eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
  4764. fi
  4765. done
  4766. # This variable tells wrapper scripts just to set shlibpath_var
  4767. # rather than running their programs.
  4768. libtool_execute_magic="$magic"
  4769. # Check if any of the arguments is a wrapper script.
  4770. args=
  4771. for file
  4772. do
  4773. case $file in
  4774. -*) ;;
  4775. *)
  4776. # Do a test to see if this is really a libtool program.
  4777. if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
  4778. # If there is no directory component, then add one.
  4779. case $file in
  4780. */* | *\\*) . $file ;;
  4781. *) . ./$file ;;
  4782. esac
  4783. # Transform arg to wrapped name.
  4784. file="$progdir/$program"
  4785. fi
  4786. ;;
  4787. esac
  4788. # Quote arguments (to preserve shell metacharacters).
  4789. file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
  4790. args="$args \"$file\""
  4791. done
  4792. if test -z "$run"; then
  4793. if test -n "$shlibpath_var"; then
  4794. # Export the shlibpath_var.
  4795. eval "export $shlibpath_var"
  4796. fi
  4797. # Restore saved enviroment variables
  4798. if test "${save_LC_ALL+set}" = set; then
  4799. LC_ALL="$save_LC_ALL"; export LC_ALL
  4800. fi
  4801. if test "${save_LANG+set}" = set; then
  4802. LANG="$save_LANG"; export LANG
  4803. fi
  4804. # Now prepare to actually exec the command.
  4805. exec_cmd='"$cmd"$args'
  4806. else
  4807. # Display what would be done.
  4808. if test -n "$shlibpath_var"; then
  4809. eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
  4810. $echo "export $shlibpath_var"
  4811. fi
  4812. $echo "$cmd$args"
  4813. exit 0
  4814. fi
  4815. ;;
  4816. # libtool clean and uninstall mode
  4817. clean | uninstall)
  4818. modename="$modename: $mode"
  4819. rm="$nonopt"
  4820. files=
  4821. rmforce=
  4822. exit_status=0
  4823. # This variable tells wrapper scripts just to set variables rather
  4824. # than running their programs.
  4825. libtool_install_magic="$magic"
  4826. for arg
  4827. do
  4828. case $arg in
  4829. -f) rm="$rm $arg"; rmforce=yes ;;
  4830. -*) rm="$rm $arg" ;;
  4831. *) files="$files $arg" ;;
  4832. esac
  4833. done
  4834. if test -z "$rm"; then
  4835. $echo "$modename: you must specify an RM program" 1>&2
  4836. $echo "$help" 1>&2
  4837. exit 1
  4838. fi
  4839. rmdirs=
  4840. for file in $files; do
  4841. dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
  4842. if test "X$dir" = "X$file"; then
  4843. dir=.
  4844. objdir="$objdir"
  4845. else
  4846. objdir="$dir/$objdir"
  4847. fi
  4848. name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
  4849. test $mode = uninstall && objdir="$dir"
  4850. # Remember objdir for removal later, being careful to avoid duplicates
  4851. if test $mode = clean; then
  4852. case " $rmdirs " in
  4853. *" $objdir "*) ;;
  4854. *) rmdirs="$rmdirs $objdir" ;;
  4855. esac
  4856. fi
  4857. # Don't error if the file doesn't exist and rm -f was used.
  4858. if (test -L "$file") >/dev/null 2>&1 \
  4859. || (test -h "$file") >/dev/null 2>&1 \
  4860. || test -f "$file"; then
  4861. :
  4862. elif test -d "$file"; then
  4863. exit_status=1
  4864. continue
  4865. elif test "$rmforce" = yes; then
  4866. continue
  4867. fi
  4868. rmfiles="$file"
  4869. case $name in
  4870. *.la)
  4871. # Possibly a libtool archive, so verify it.
  4872. if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
  4873. . $dir/$name
  4874. # Delete the libtool libraries and symlinks.
  4875. for n in $library_names; do
  4876. rmfiles="$rmfiles $objdir/$n"
  4877. done
  4878. test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
  4879. test $mode = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
  4880. if test $mode = uninstall; then
  4881. if test -n "$library_names"; then
  4882. # Do each command in the postuninstall commands.
  4883. eval cmds=\"$postuninstall_cmds\"
  4884. IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
  4885. for cmd in $cmds; do
  4886. IFS="$save_ifs"
  4887. $show "$cmd"
  4888. $run eval "$cmd"
  4889. if test $? != 0 && test "$rmforce" != yes; then
  4890. exit_status=1
  4891. fi
  4892. done
  4893. IFS="$save_ifs"
  4894. fi
  4895. if test -n "$old_library"; then
  4896. # Do each command in the old_postuninstall commands.
  4897. eval cmds=\"$old_postuninstall_cmds\"
  4898. IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
  4899. for cmd in $cmds; do
  4900. IFS="$save_ifs"
  4901. $show "$cmd"
  4902. $run eval "$cmd"
  4903. if test $? != 0 && test "$rmforce" != yes; then
  4904. exit_status=1
  4905. fi
  4906. done
  4907. IFS="$save_ifs"
  4908. fi
  4909. # FIXME: should reinstall the best remaining shared library.
  4910. fi
  4911. fi
  4912. ;;
  4913. *.lo)
  4914. # Possibly a libtool object, so verify it.
  4915. if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
  4916. # Read the .lo file
  4917. . $dir/$name
  4918. # Add PIC object to the list of files to remove.
  4919. if test -n "$pic_object" \
  4920. && test "$pic_object" != none; then
  4921. rmfiles="$rmfiles $dir/$pic_object"
  4922. fi
  4923. # Add non-PIC object to the list of files to remove.
  4924. if test -n "$non_pic_object" \
  4925. && test "$non_pic_object" != none; then
  4926. rmfiles="$rmfiles $dir/$non_pic_object"
  4927. fi
  4928. fi
  4929. ;;
  4930. *)
  4931. # Do a test to see if this is a libtool program.
  4932. if test $mode = clean &&
  4933. (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
  4934. relink_command=
  4935. . $dir/$file
  4936. rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
  4937. if test "$fast_install" = yes && test -n "$relink_command"; then
  4938. rmfiles="$rmfiles $objdir/lt-$name"
  4939. fi
  4940. fi
  4941. ;;
  4942. esac
  4943. $show "$rm $rmfiles"
  4944. $run $rm $rmfiles || exit_status=1
  4945. done
  4946. # Try to remove the ${objdir}s in the directories where we deleted files
  4947. for dir in $rmdirs; do
  4948. if test -d "$dir"; then
  4949. $show "rmdir $dir"
  4950. $run rmdir $dir >/dev/null 2>&1
  4951. fi
  4952. done
  4953. exit $exit_status
  4954. ;;
  4955. "")
  4956. $echo "$modename: you must specify a MODE" 1>&2
  4957. $echo "$generic_help" 1>&2
  4958. exit 1
  4959. ;;
  4960. esac
  4961. if test -z "$exec_cmd"; then
  4962. $echo "$modename: invalid operation mode \`$mode'" 1>&2
  4963. $echo "$generic_help" 1>&2
  4964. exit 1
  4965. fi
  4966. fi # test -z "$show_help"
  4967. if test -n "$exec_cmd"; then
  4968. eval exec $exec_cmd
  4969. exit 1
  4970. fi
  4971. # We need to display help for each of the modes.
  4972. case $mode in
  4973. "") $echo \
  4974. "Usage: $modename [OPTION]... [MODE-ARG]...
  4975. Provide generalized library-building support services.
  4976. --config show all configuration variables
  4977. --debug enable verbose shell tracing
  4978. -n, --dry-run display commands without modifying any files
  4979. --features display basic configuration information and exit
  4980. --finish same as \`--mode=finish'
  4981. --help display this help message and exit
  4982. --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
  4983. --quiet same as \`--silent'
  4984. --silent don't print informational messages
  4985. --tag=TAG use configuration variables from tag TAG
  4986. --version print version information
  4987. MODE must be one of the following:
  4988. clean remove files from the build directory
  4989. compile compile a source file into a libtool object
  4990. execute automatically set library path, then run a program
  4991. finish complete the installation of libtool libraries
  4992. install install libraries or executables
  4993. link create a library or an executable
  4994. uninstall remove libraries from an installed directory
  4995. MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
  4996. a more detailed description of MODE."
  4997. exit 0
  4998. ;;
  4999. clean)
  5000. $echo \
  5001. "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
  5002. Remove files from the build directory.
  5003. RM is the name of the program to use to delete files associated with each FILE
  5004. (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
  5005. to RM.
  5006. If FILE is a libtool library, object or program, all the files associated
  5007. with it are deleted. Otherwise, only FILE itself is deleted using RM."
  5008. ;;
  5009. compile)
  5010. $echo \
  5011. "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
  5012. Compile a source file into a libtool library object.
  5013. This mode accepts the following additional options:
  5014. -o OUTPUT-FILE set the output file name to OUTPUT-FILE
  5015. -prefer-pic try to building PIC objects only
  5016. -prefer-non-pic try to building non-PIC objects only
  5017. -static always build a \`.o' file suitable for static linking
  5018. COMPILE-COMMAND is a command to be used in creating a \`standard' object file
  5019. from the given SOURCEFILE.
  5020. The output file name is determined by removing the directory component from
  5021. SOURCEFILE, then substituting the C source code suffix \`.c' with the
  5022. library object suffix, \`.lo'."
  5023. ;;
  5024. execute)
  5025. $echo \
  5026. "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
  5027. Automatically set library path, then run a program.
  5028. This mode accepts the following additional options:
  5029. -dlopen FILE add the directory containing FILE to the library path
  5030. This mode sets the library path environment variable according to \`-dlopen'
  5031. flags.
  5032. If any of the ARGS are libtool executable wrappers, then they are translated
  5033. into their corresponding uninstalled binary, and any of their required library
  5034. directories are added to the library path.
  5035. Then, COMMAND is executed, with ARGS as arguments."
  5036. ;;
  5037. finish)
  5038. $echo \
  5039. "Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
  5040. Complete the installation of libtool libraries.
  5041. Each LIBDIR is a directory that contains libtool libraries.
  5042. The commands that this mode executes may require superuser privileges. Use
  5043. the \`--dry-run' option if you just want to see what would be executed."
  5044. ;;
  5045. install)
  5046. $echo \
  5047. "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
  5048. Install executables or libraries.
  5049. INSTALL-COMMAND is the installation command. The first component should be
  5050. either the \`install' or \`cp' program.
  5051. The rest of the components are interpreted as arguments to that command (only
  5052. BSD-compatible install options are recognized)."
  5053. ;;
  5054. link)
  5055. $echo \
  5056. "Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
  5057. Link object files or libraries together to form another library, or to
  5058. create an executable program.
  5059. LINK-COMMAND is a command using the C compiler that you would use to create
  5060. a program from several object files.
  5061. The following components of LINK-COMMAND are treated specially:
  5062. -all-static do not do any dynamic linking at all
  5063. -avoid-version do not add a version suffix if possible
  5064. -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
  5065. -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
  5066. -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
  5067. -export-symbols SYMFILE
  5068. try to export only the symbols listed in SYMFILE
  5069. -export-symbols-regex REGEX
  5070. try to export only the symbols matching REGEX
  5071. -LLIBDIR search LIBDIR for required installed libraries
  5072. -lNAME OUTPUT-FILE requires the installed library libNAME
  5073. -module build a library that can dlopened
  5074. -no-fast-install disable the fast-install mode
  5075. -no-install link a not-installable executable
  5076. -no-undefined declare that a library does not refer to external symbols
  5077. -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
  5078. -objectlist FILE Use a list of object files found in FILE to specify objects
  5079. -release RELEASE specify package release information
  5080. -rpath LIBDIR the created library will eventually be installed in LIBDIR
  5081. -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
  5082. -static do not do any dynamic linking of libtool libraries
  5083. -version-info CURRENT[:REVISION[:AGE]]
  5084. specify library version info [each variable defaults to 0]
  5085. All other options (arguments beginning with \`-') are ignored.
  5086. Every other argument is treated as a filename. Files ending in \`.la' are
  5087. treated as uninstalled libtool libraries, other files are standard or library
  5088. object files.
  5089. If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
  5090. only library objects (\`.lo' files) may be specified, and \`-rpath' is
  5091. required, except when creating a convenience library.
  5092. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
  5093. using \`ar' and \`ranlib', or on Windows using \`lib'.
  5094. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
  5095. is created, otherwise an executable program is created."
  5096. ;;
  5097. uninstall)
  5098. $echo \
  5099. "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
  5100. Remove libraries from an installation directory.
  5101. RM is the name of the program to use to delete files associated with each FILE
  5102. (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
  5103. to RM.
  5104. If FILE is a libtool library, all the files associated with it are deleted.
  5105. Otherwise, only FILE itself is deleted using RM."
  5106. ;;
  5107. *)
  5108. $echo "$modename: invalid operation mode \`$mode'" 1>&2
  5109. $echo "$help" 1>&2
  5110. exit 1
  5111. ;;
  5112. esac
  5113. echo
  5114. $echo "Try \`$modename --help' for more information about other modes."
  5115. exit 0
  5116. # The TAGs below are defined such that we never get into a situation
  5117. # in which we disable both kinds of libraries. Given conflicting
  5118. # choices, we go for a static library, that is the most portable,
  5119. # since we can't tell whether shared libraries were disabled because
  5120. # the user asked for that or because the platform doesn't support
  5121. # them. This is particularly important on AIX, because we don't
  5122. # support having both static and shared libraries enabled at the same
  5123. # time on that platform, so we default to a shared-only configuration.
  5124. # If a disable-shared tag is given, we'll fallback to a static-only
  5125. # configuration. But we'll never go from static-only to shared-only.
  5126. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
  5127. build_libtool_libs=no
  5128. build_old_libs=yes
  5129. # ### END LIBTOOL TAG CONFIG: disable-shared
  5130. # ### BEGIN LIBTOOL TAG CONFIG: disable-static
  5131. build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
  5132. # ### END LIBTOOL TAG CONFIG: disable-static
  5133. # Local Variables:
  5134. # mode:shell-script
  5135. # sh-indentation:2
  5136. # End:
  5137. # ### BEGIN LIBTOOL TAG CONFIG: CXX
  5138. # Libtool was configured on host alice:
  5139. # Shell to use when invoking shell scripts.
  5140. SHELL="/bin/sh"
  5141. # Whether or not to build shared libraries.
  5142. build_libtool_libs=yes
  5143. # Whether or not to build static libraries.
  5144. build_old_libs=yes
  5145. # Whether or not to add -lc for building shared libraries.
  5146. build_libtool_need_lc=yes
  5147. # Whether or not to optimize for fast installation.
  5148. fast_install=yes
  5149. # The host system.
  5150. host_alias=
  5151. host=i686-pc-linux-gnu
  5152. # An echo program that does not interpret backslashes.
  5153. echo="echo"
  5154. # The archiver.
  5155. AR="ar"
  5156. AR_FLAGS="cru"
  5157. # A C compiler.
  5158. LTCC=gcc
  5159. # A language-specific compiler.
  5160. CC="g++"
  5161. # Is the compiler the GNU C compiler?
  5162. with_gcc=yes
  5163. # The linker used to build libraries.
  5164. LD="/usr/bin/ld"
  5165. # Whether we need hard or soft links.
  5166. LN_S="ln -s"
  5167. # A BSD-compatible nm program.
  5168. NM="/usr/bin/nm -B"
  5169. # A symbol stripping program
  5170. STRIP=strip
  5171. # Used to examine libraries when file_magic_cmd begins "file"
  5172. MAGIC_CMD=file
  5173. # Used on cygwin: DLL creation program.
  5174. DLLTOOL="dlltool"
  5175. # Used on cygwin: object dumper.
  5176. OBJDUMP="objdump"
  5177. # Used on cygwin: assembler.
  5178. AS="as"
  5179. # The name of the directory that contains temporary libtool files.
  5180. objdir=.libs
  5181. # How to create reloadable object files.
  5182. reload_flag=" -r"
  5183. reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
  5184. # How to pass a linker flag through the compiler.
  5185. wl="-Wl,"
  5186. # Object file suffix (normally "o").
  5187. objext="o"
  5188. # Old archive suffix (normally "a").
  5189. libext="a"
  5190. # Executable file suffix (normally "").
  5191. exeext=""
  5192. # Additional compiler flags for building library objects.
  5193. pic_flag=" -fPIC -DPIC"
  5194. pic_mode=default
  5195. # What is the maximum length of a command?
  5196. max_cmd_len=49153
  5197. # Does compiler simultaneously support -c and -o options?
  5198. compiler_c_o="yes"
  5199. # Must we lock files when doing compilation ?
  5200. need_locks="no"
  5201. # Do we need the lib prefix for modules?
  5202. need_lib_prefix=no
  5203. # Do we need a version for libraries?
  5204. need_version=no
  5205. # Whether dlopen is supported.
  5206. dlopen_support=unknown
  5207. # Whether dlopen of programs is supported.
  5208. dlopen_self=unknown
  5209. # Whether dlopen of statically linked programs is supported.
  5210. dlopen_self_static=unknown
  5211. # Compiler flag to prevent dynamic linking.
  5212. link_static_flag="-static"
  5213. # Compiler flag to turn off builtin functions.
  5214. no_builtin_flag=" -fno-builtin"
  5215. # Compiler flag to allow reflexive dlopens.
  5216. export_dynamic_flag_spec="\${wl}--export-dynamic"
  5217. # Compiler flag to generate shared objects directly from archives.
  5218. whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
  5219. # Compiler flag to generate thread-safe objects.
  5220. thread_safe_flag_spec=""
  5221. # Library versioning type.
  5222. version_type=linux
  5223. # Format of library name prefix.
  5224. libname_spec="lib\$name"
  5225. # List of archive names. First name is the real one, the rest are links.
  5226. # The last name is the one that the linker finds with -lNAME.
  5227. library_names_spec="\${libname}\${release}.so\$versuffix \${libname}\${release}.so\$major \$libname.so"
  5228. # The coded name of the library, if different from the real name.
  5229. soname_spec="\${libname}\${release}.so\$major"
  5230. # Commands used to build and install an old-style archive.
  5231. RANLIB="ranlib"
  5232. old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
  5233. old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib"
  5234. old_postuninstall_cmds=""
  5235. # Create an old-style archive from a shared archive.
  5236. old_archive_from_new_cmds=""
  5237. # Create a temporary old-style archive to link instead of a shared archive.
  5238. old_archive_from_expsyms_cmds=""
  5239. # Commands used to build and install a shared archive.
  5240. archive_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
  5241. archive_expsym_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-retain-symbols-file \$wl\$export_symbols -o \$lib"
  5242. postinstall_cmds=""
  5243. postuninstall_cmds=""
  5244. # Commands to strip libraries.
  5245. old_striplib="strip --strip-debug"
  5246. striplib="strip --strip-unneeded"
  5247. # Dependencies to place before the objects being linked to create a
  5248. # shared library.
  5249. predep_objects="/usr/lib/crti.o /usr/lib/gcc-lib/i386-linux/2.95.4/crtbeginS.o"
  5250. # Dependencies to place after the objects being linked to create a
  5251. # shared library.
  5252. postdep_objects="/usr/lib/gcc-lib/i386-linux/2.95.4/crtendS.o /usr/lib/crtn.o"
  5253. # Dependencies to place before the objects being linked to create a
  5254. # shared library.
  5255. predeps=""
  5256. # Dependencies to place after the objects being linked to create a
  5257. # shared library.
  5258. postdeps="-lstdc++ -lm -lgcc -lc -lgcc"
  5259. # The library search path used internally by the compiler when linking
  5260. # a shared library.
  5261. compiler_lib_search_path="-L/usr/lib/gcc-lib/i386-linux/2.95.4"
  5262. # Method to check whether dependent libraries are shared objects.
  5263. deplibs_check_method="pass_all"
  5264. # Command to use when deplibs_check_method == file_magic.
  5265. file_magic_cmd="\$MAGIC_CMD"
  5266. # Flag that allows shared libraries with undefined symbols to be built.
  5267. allow_undefined_flag=""
  5268. # Flag that forces no undefined symbols.
  5269. no_undefined_flag=""
  5270. # Commands used to finish a libtool library installation in a directory.
  5271. finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
  5272. # Same as above, but a single script fragment to be evaled but not shown.
  5273. finish_eval=""
  5274. # Take the output of nm and produce a listing of raw symbols and C names.
  5275. global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGISTW][ABCDGISTW]*\\)[ ][ ]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'"
  5276. # Transform the output of nm in a proper C declaration
  5277. global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
  5278. # Transform the output of nm in a C name address pair
  5279. global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
  5280. # This is the shared library runtime path variable.
  5281. runpath_var=LD_RUN_PATH
  5282. # This is the shared library path variable.
  5283. shlibpath_var=LD_LIBRARY_PATH
  5284. # Is shlibpath searched before the hard-coded library search path?
  5285. shlibpath_overrides_runpath=no
  5286. # How to hardcode a shared library path into an executable.
  5287. hardcode_action=immediate
  5288. # Whether we should hardcode library paths into libraries.
  5289. hardcode_into_libs=yes
  5290. # Flag to hardcode $libdir into a binary during linking.
  5291. # This must work even if $libdir does not exist.
  5292. hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"
  5293. # Whether we need a single -rpath flag with a separated argument.
  5294. hardcode_libdir_separator=""
  5295. # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
  5296. # resulting binary.
  5297. hardcode_direct=no
  5298. # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
  5299. # resulting binary.
  5300. hardcode_minus_L=no
  5301. # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
  5302. # the resulting binary.
  5303. hardcode_shlibpath_var=
  5304. # Variables whose values should be saved in libtool wrapper scripts and
  5305. # restored at relink time.
  5306. variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  5307. # Whether libtool must link a program against all its dependency libraries.
  5308. link_all_deplibs=unknown
  5309. # Compile-time system search path for libraries
  5310. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  5311. # Run-time system search path for libraries
  5312. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  5313. # Fix the shell variable $srcfile for the compiler.
  5314. fix_srcfile_path=""
  5315. # Set to yes if exported symbols are required.
  5316. always_export_symbols=no
  5317. # The commands to list exported symbols.
  5318. export_symbols_cmds=""
  5319. # The commands to extract the exported symbol list from a shared archive.
  5320. extract_expsyms_cmds=""
  5321. # Symbols that should not be listed in the preloaded symbols.
  5322. exclude_expsyms=""
  5323. # Symbols that must always be exported.
  5324. include_expsyms=""
  5325. # ### END LIBTOOL TAG CONFIG: CXX
  5326. # ### BEGIN LIBTOOL TAG CONFIG: GCJ
  5327. # Libtool was configured on host alice:
  5328. # Shell to use when invoking shell scripts.
  5329. SHELL="/bin/sh"
  5330. # Whether or not to build shared libraries.
  5331. build_libtool_libs=yes
  5332. # Whether or not to build static libraries.
  5333. build_old_libs=yes
  5334. # Whether or not to add -lc for building shared libraries.
  5335. build_libtool_need_lc=yes
  5336. # Whether or not to optimize for fast installation.
  5337. fast_install=yes
  5338. # The host system.
  5339. host_alias=
  5340. host=i686-pc-linux-gnu
  5341. # An echo program that does not interpret backslashes.
  5342. echo="echo"
  5343. # The archiver.
  5344. AR="ar"
  5345. AR_FLAGS="cru"
  5346. # A C compiler.
  5347. LTCC=gcc
  5348. # A language-specific compiler.
  5349. CC="gcj"
  5350. # Is the compiler the GNU C compiler?
  5351. with_gcc=
  5352. # The linker used to build libraries.
  5353. LD=""
  5354. # Whether we need hard or soft links.
  5355. LN_S="ln -s"
  5356. # A BSD-compatible nm program.
  5357. NM="/usr/bin/nm -B"
  5358. # A symbol stripping program
  5359. STRIP=strip
  5360. # Used to examine libraries when file_magic_cmd begins "file"
  5361. MAGIC_CMD=file
  5362. # Used on cygwin: DLL creation program.
  5363. DLLTOOL="dlltool"
  5364. # Used on cygwin: object dumper.
  5365. OBJDUMP="objdump"
  5366. # Used on cygwin: assembler.
  5367. AS="as"
  5368. # The name of the directory that contains temporary libtool files.
  5369. objdir=.libs
  5370. # How to create reloadable object files.
  5371. reload_flag=" -r"
  5372. reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
  5373. # How to pass a linker flag through the compiler.
  5374. wl="-Wl,"
  5375. # Object file suffix (normally "o").
  5376. objext="o"
  5377. # Old archive suffix (normally "a").
  5378. libext="a"
  5379. # Executable file suffix (normally "").
  5380. exeext=""
  5381. # Additional compiler flags for building library objects.
  5382. pic_flag=" -DPIC"
  5383. pic_mode=default
  5384. # What is the maximum length of a command?
  5385. max_cmd_len=49153
  5386. # Does compiler simultaneously support -c and -o options?
  5387. compiler_c_o="no"
  5388. # Must we lock files when doing compilation ?
  5389. need_locks="no"
  5390. # Do we need the lib prefix for modules?
  5391. need_lib_prefix=no
  5392. # Do we need a version for libraries?
  5393. need_version=no
  5394. # Whether dlopen is supported.
  5395. dlopen_support=unknown
  5396. # Whether dlopen of programs is supported.
  5397. dlopen_self=unknown
  5398. # Whether dlopen of statically linked programs is supported.
  5399. dlopen_self_static=unknown
  5400. # Compiler flag to prevent dynamic linking.
  5401. link_static_flag="-static"
  5402. # Compiler flag to turn off builtin functions.
  5403. no_builtin_flag=" -fno-builtin -fno-rtti -fno-exceptions"
  5404. # Compiler flag to allow reflexive dlopens.
  5405. export_dynamic_flag_spec="\${wl}--export-dynamic"
  5406. # Compiler flag to generate shared objects directly from archives.
  5407. whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
  5408. # Compiler flag to generate thread-safe objects.
  5409. thread_safe_flag_spec=""
  5410. # Library versioning type.
  5411. version_type=linux
  5412. # Format of library name prefix.
  5413. libname_spec="lib\$name"
  5414. # List of archive names. First name is the real one, the rest are links.
  5415. # The last name is the one that the linker finds with -lNAME.
  5416. library_names_spec="\${libname}\${release}.so\$versuffix \${libname}\${release}.so\$major \$libname.so"
  5417. # The coded name of the library, if different from the real name.
  5418. soname_spec="\${libname}\${release}.so\$major"
  5419. # Commands used to build and install an old-style archive.
  5420. RANLIB="ranlib"
  5421. old_archive_cmds=""
  5422. old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib"
  5423. old_postuninstall_cmds=""
  5424. # Create an old-style archive from a shared archive.
  5425. old_archive_from_new_cmds=""
  5426. # Create a temporary old-style archive to link instead of a shared archive.
  5427. old_archive_from_expsyms_cmds=""
  5428. # Commands used to build and install a shared archive.
  5429. archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
  5430. archive_expsym_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-retain-symbols-file \$wl\$export_symbols -o \$lib"
  5431. postinstall_cmds=""
  5432. postuninstall_cmds=""
  5433. # Commands to strip libraries.
  5434. old_striplib="strip --strip-debug"
  5435. striplib="strip --strip-unneeded"
  5436. # Dependencies to place before the objects being linked to create a
  5437. # shared library.
  5438. predep_objects=""
  5439. # Dependencies to place after the objects being linked to create a
  5440. # shared library.
  5441. postdep_objects=""
  5442. # Dependencies to place before the objects being linked to create a
  5443. # shared library.
  5444. predeps=""
  5445. # Dependencies to place after the objects being linked to create a
  5446. # shared library.
  5447. postdeps=""
  5448. # The library search path used internally by the compiler when linking
  5449. # a shared library.
  5450. compiler_lib_search_path=""
  5451. # Method to check whether dependent libraries are shared objects.
  5452. deplibs_check_method="pass_all"
  5453. # Command to use when deplibs_check_method == file_magic.
  5454. file_magic_cmd="\$MAGIC_CMD"
  5455. # Flag that allows shared libraries with undefined symbols to be built.
  5456. allow_undefined_flag=""
  5457. # Flag that forces no undefined symbols.
  5458. no_undefined_flag=""
  5459. # Commands used to finish a libtool library installation in a directory.
  5460. finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
  5461. # Same as above, but a single script fragment to be evaled but not shown.
  5462. finish_eval=""
  5463. # Take the output of nm and produce a listing of raw symbols and C names.
  5464. global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGISTW][ABCDGISTW]*\\)[ ][ ]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'"
  5465. # Transform the output of nm in a proper C declaration
  5466. global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
  5467. # Transform the output of nm in a C name address pair
  5468. global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
  5469. # This is the shared library runtime path variable.
  5470. runpath_var=LD_RUN_PATH
  5471. # This is the shared library path variable.
  5472. shlibpath_var=LD_LIBRARY_PATH
  5473. # Is shlibpath searched before the hard-coded library search path?
  5474. shlibpath_overrides_runpath=no
  5475. # How to hardcode a shared library path into an executable.
  5476. hardcode_action=immediate
  5477. # Whether we should hardcode library paths into libraries.
  5478. hardcode_into_libs=yes
  5479. # Flag to hardcode $libdir into a binary during linking.
  5480. # This must work even if $libdir does not exist.
  5481. hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"
  5482. # Whether we need a single -rpath flag with a separated argument.
  5483. hardcode_libdir_separator=""
  5484. # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
  5485. # resulting binary.
  5486. hardcode_direct=no
  5487. # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
  5488. # resulting binary.
  5489. hardcode_minus_L=no
  5490. # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
  5491. # the resulting binary.
  5492. hardcode_shlibpath_var=unsupported
  5493. # Variables whose values should be saved in libtool wrapper scripts and
  5494. # restored at relink time.
  5495. variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  5496. # Whether libtool must link a program against all its dependency libraries.
  5497. link_all_deplibs=unknown
  5498. # Compile-time system search path for libraries
  5499. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  5500. # Run-time system search path for libraries
  5501. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  5502. # Fix the shell variable $srcfile for the compiler.
  5503. fix_srcfile_path=""
  5504. # Set to yes if exported symbols are required.
  5505. always_export_symbols=no
  5506. # The commands to list exported symbols.
  5507. export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | sed 's/.* //' | sort | uniq > \$export_symbols"
  5508. # The commands to extract the exported symbol list from a shared archive.
  5509. extract_expsyms_cmds=""
  5510. # Symbols that should not be listed in the preloaded symbols.
  5511. exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
  5512. # Symbols that must always be exported.
  5513. include_expsyms=""
  5514. # ### END LIBTOOL TAG CONFIG: GCJ