patch-libtool 155 KB

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