libtool.m4 208 KB

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