patch-ltmain_sh 146 KB

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