aclocal.m4 304 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398
  1. dnl
  2. dnl $Id$
  3. dnl
  4. dnl This file contains local autoconf functions.
  5. dnl
  6. dnl -------------------------------------------------------------------------
  7. dnl Output stylize macros for configure (help/runtime)
  8. dnl -------------------------------------------------------------------------
  9. dnl
  10. dnl PHP_HELP_SEPARATOR(title)
  11. dnl
  12. dnl Adds separator title into the configure --help display.
  13. dnl
  14. AC_DEFUN([PHP_HELP_SEPARATOR],[
  15. AC_ARG_ENABLE([],[
  16. $1
  17. ],[])
  18. ])
  19. dnl
  20. dnl PHP_CONFIGURE_PART(title)
  21. dnl
  22. dnl Adds separator title configure output (idea borrowed from mm)
  23. dnl
  24. AC_DEFUN([PHP_CONFIGURE_PART],[
  25. AC_MSG_RESULT()
  26. AC_MSG_RESULT([${T_MD}$1${T_ME}])
  27. ])
  28. dnl -------------------------------------------------------------------------
  29. dnl Build system helper macros
  30. dnl -------------------------------------------------------------------------
  31. dnl
  32. dnl PHP_DEF_HAVE(what)
  33. dnl
  34. dnl Generates 'AC_DEFINE(HAVE_WHAT, 1, [ ])'
  35. dnl
  36. AC_DEFUN([PHP_DEF_HAVE],[AC_DEFINE([HAVE_]translit($1,a-z_.-,A-Z___), 1, [ ])])
  37. dnl
  38. dnl PHP_RUN_ONCE(namespace, variable, code)
  39. dnl
  40. dnl execute code, if variable is not set in namespace
  41. dnl
  42. AC_DEFUN([PHP_RUN_ONCE],[
  43. changequote({,})
  44. unique=`echo $2|$SED 's/[^a-zA-Z0-9]/_/g'`
  45. changequote([,])
  46. cmd="echo $ac_n \"\$$1$unique$ac_c\""
  47. if test -n "$unique" && test "`eval $cmd`" = "" ; then
  48. eval "$1$unique=set"
  49. $3
  50. fi
  51. ])
  52. dnl
  53. dnl PHP_EXPAND_PATH(path, variable)
  54. dnl
  55. dnl expands path to an absolute path and assigns it to variable
  56. dnl
  57. AC_DEFUN([PHP_EXPAND_PATH],[
  58. if test -z "$1" || echo "$1" | grep '^/' >/dev/null ; then
  59. $2=$1
  60. else
  61. changequote({,})
  62. ep_dir=`echo $1|$SED 's%/*[^/][^/]*/*$%%'`
  63. changequote([,])
  64. ep_realdir=`(cd "$ep_dir" && pwd)`
  65. $2="$ep_realdir"/`basename "$1"`
  66. fi
  67. ])
  68. dnl
  69. dnl PHP_DEFINE(WHAT [, value[, directory]])
  70. dnl
  71. dnl Creates builddir/include/what.h and in there #define WHAT value
  72. dnl
  73. AC_DEFUN([PHP_DEFINE],[
  74. [echo "#define ]$1[]ifelse([$2],,[ 1],[ $2])[" > ]ifelse([$3],,[include],[$3])[/php_]translit($1,A-Z,a-z)[.h]
  75. ])
  76. dnl
  77. dnl PHP_SUBST(varname)
  78. dnl
  79. dnl Adds variable with it's value into Makefile, e.g.:
  80. dnl CC = gcc
  81. dnl
  82. AC_DEFUN([PHP_SUBST],[
  83. PHP_VAR_SUBST="$PHP_VAR_SUBST $1"
  84. ])
  85. dnl
  86. dnl PHP_SUBST_OLD(varname)
  87. dnl
  88. dnl Same as PHP_SUBST() but also substitutes all @VARNAME@
  89. dnl instances in every file passed to AC_OUTPUT()
  90. dnl
  91. AC_DEFUN([PHP_SUBST_OLD],[
  92. PHP_SUBST($1)
  93. AC_SUBST($1)
  94. ])
  95. dnl
  96. dnl PHP_OUTPUT(file)
  97. dnl
  98. dnl Adds "file" to the list of files generated by AC_OUTPUT
  99. dnl This macro can be used several times.
  100. dnl
  101. AC_DEFUN([PHP_OUTPUT],[
  102. PHP_OUTPUT_FILES="$PHP_OUTPUT_FILES $1"
  103. ])
  104. dnl -------------------------------------------------------------------------
  105. dnl Build system base macros
  106. dnl -------------------------------------------------------------------------
  107. dnl
  108. dnl PHP_CANONICAL_HOST_TARGET
  109. dnl
  110. AC_DEFUN([PHP_CANONICAL_HOST_TARGET],[
  111. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  112. AC_REQUIRE([AC_CANONICAL_TARGET])dnl
  113. dnl Make sure we do not continue if host_alias is empty.
  114. if test -z "$host_alias" && test -n "$host"; then
  115. host_alias=$host
  116. fi
  117. if test -z "$host_alias"; then
  118. AC_MSG_ERROR([host_alias is not set!])
  119. fi
  120. ])
  121. dnl
  122. dnl PHP_INIT_BUILD_SYSTEM
  123. dnl
  124. AC_DEFUN([PHP_INIT_BUILD_SYSTEM],[
  125. AC_REQUIRE([PHP_CANONICAL_HOST_TARGET])dnl
  126. test -d include || $php_shtool mkdir include
  127. > Makefile.objects
  128. > Makefile.fragments
  129. dnl We need to play tricks here to avoid matching the grep line itself
  130. pattern=define
  131. $EGREP $pattern'.*include/php' $srcdir/configure|$SED 's/.*>//'|xargs touch 2>/dev/null
  132. ])
  133. dnl
  134. dnl PHP_GEN_GLOBAL_MAKEFILE
  135. dnl
  136. dnl Generates the global makefile.
  137. dnl
  138. AC_DEFUN([PHP_GEN_GLOBAL_MAKEFILE],[
  139. cat >Makefile <<EOF
  140. srcdir = $abs_srcdir
  141. builddir = $abs_builddir
  142. top_srcdir = $abs_srcdir
  143. top_builddir = $abs_builddir
  144. EOF
  145. for i in $PHP_VAR_SUBST; do
  146. eval echo "$i = \$$i" >> Makefile
  147. done
  148. cat $abs_srcdir/Makefile.global Makefile.fragments Makefile.objects >> Makefile
  149. ])
  150. dnl
  151. dnl PHP_ADD_MAKEFILE_FRAGMENT([srcfile [, ext_srcdir [, ext_builddir]]])
  152. dnl
  153. dnl Processes a file called Makefile.frag in the source directory
  154. dnl of the most recently added extension. $(srcdir) and $(builddir)
  155. dnl are substituted with the proper paths. Can be used to supply
  156. dnl custom rules and/or additional targets.
  157. dnl
  158. AC_DEFUN([PHP_ADD_MAKEFILE_FRAGMENT],[
  159. ifelse($1,,src=$ext_srcdir/Makefile.frag,src=$1)
  160. ifelse($2,,ac_srcdir=$ext_srcdir,ac_srcdir=$2)
  161. ifelse($3,,ac_builddir=$ext_builddir,ac_builddir=$3)
  162. test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src >> Makefile.fragments
  163. ])
  164. dnl
  165. dnl PHP_ADD_SOURCES(source-path, sources [, special-flags [, type]])
  166. dnl
  167. dnl Adds sources which are located relative to source-path to the
  168. dnl array of type type. Sources are processed with optional
  169. dnl special-flags which are passed to the compiler. Sources
  170. dnl can be either written in C or C++ (filenames shall end in .c
  171. dnl or .cpp, respectively).
  172. dnl
  173. dnl Note: If source-path begins with a "/", the "/" is removed and
  174. dnl the path is interpreted relative to the top build-directory.
  175. dnl
  176. dnl which array to append to?
  177. AC_DEFUN([PHP_ADD_SOURCES],[
  178. PHP_ADD_SOURCES_X($1, $2, $3, ifelse($4,sapi,PHP_SAPI_OBJS,PHP_GLOBAL_OBJS))
  179. ])
  180. dnl
  181. dnl _PHP_ASSIGN_BUILD_VARS(type)
  182. dnl internal, don't use
  183. AC_DEFUN([_PHP_ASSIGN_BUILD_VARS],[
  184. ifelse($1,shared,[
  185. b_c_pre=$shared_c_pre
  186. b_cxx_pre=$shared_cxx_pre
  187. b_c_meta=$shared_c_meta
  188. b_cxx_meta=$shared_cxx_meta
  189. b_c_post=$shared_c_post
  190. b_cxx_post=$shared_cxx_post
  191. ],[
  192. b_c_pre=$php_c_pre
  193. b_cxx_pre=$php_cxx_pre
  194. b_c_meta=$php_c_meta
  195. b_cxx_meta=$php_cxx_meta
  196. b_c_post=$php_c_post
  197. b_cxx_post=$php_cxx_post
  198. ])dnl
  199. b_lo=[$]$1_lo
  200. ])
  201. dnl
  202. dnl PHP_ADD_SOURCES_X(source-path, sources[, special-flags[, target-var[, shared[, special-post-flags]]]])
  203. dnl
  204. dnl Additional to PHP_ADD_SOURCES (see above), this lets you set the
  205. dnl name of the array target-var directly, as well as whether
  206. dnl shared objects will be built from the sources.
  207. dnl
  208. dnl Should not be used directly.
  209. dnl
  210. AC_DEFUN([PHP_ADD_SOURCES_X],[
  211. dnl relative to source- or build-directory?
  212. dnl ac_srcdir/ac_bdir include trailing slash
  213. case $1 in
  214. ""[)] ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  215. /*[)] ac_srcdir=`echo "$1"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  216. *[)] ac_srcdir="$abs_srcdir/$1/"; ac_bdir="$1/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  217. esac
  218. dnl how to build .. shared or static?
  219. ifelse($5,yes,_PHP_ASSIGN_BUILD_VARS(shared),_PHP_ASSIGN_BUILD_VARS(php))
  220. dnl iterate over the sources
  221. old_IFS=[$]IFS
  222. for ac_src in $2; do
  223. dnl remove the suffix
  224. IFS=.
  225. set $ac_src
  226. ac_obj=[$]1
  227. IFS=$old_IFS
  228. dnl append to the array which has been dynamically chosen at m4 time
  229. $4="[$]$4 [$]ac_bdir[$]ac_obj.lo"
  230. dnl choose the right compiler/flags/etc. for the source-file
  231. case $ac_src in
  232. *.c[)] ac_comp="$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post" ;;
  233. *.s[)] ac_comp="$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post" ;;
  234. *.S[)] ac_comp="$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post" ;;
  235. *.cpp|*.cc|*.cxx[)] ac_comp="$b_cxx_pre $3 $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_cxx_post" ;;
  236. esac
  237. dnl create a rule for the object/source combo
  238. cat >>Makefile.objects<<EOF
  239. $ac_bdir[$]ac_obj.lo: $ac_srcdir[$]ac_src
  240. $ac_comp
  241. EOF
  242. done
  243. ])
  244. dnl -------------------------------------------------------------------------
  245. dnl Compiler characteristics checks
  246. dnl -------------------------------------------------------------------------
  247. dnl
  248. dnl PHP_TARGET_RDYNAMIC
  249. dnl
  250. dnl Checks whether -rdynamic is supported by the compiler. This
  251. dnl is necessary for some targets to populate the global symbol
  252. dnl table. Otherwise, dynamic modules would not be able to resolve
  253. dnl PHP-related symbols.
  254. dnl
  255. dnl If successful, adds -rdynamic to PHP_LDFLAGS.
  256. dnl
  257. AC_DEFUN([PHP_TARGET_RDYNAMIC],[
  258. if test -n "$GCC"; then
  259. dnl we should use a PHP-specific macro here
  260. PHP_CHECK_GCC_ARG(-rdynamic, gcc_rdynamic=yes)
  261. if test "$gcc_rdynamic" = "yes"; then
  262. PHP_LDFLAGS="$PHP_LDFLAGS -rdynamic"
  263. fi
  264. fi
  265. ])
  266. dnl
  267. dnl PHP_RUNPATH_SWITCH
  268. dnl
  269. dnl Checks for -R, etc. switch
  270. dnl
  271. AC_DEFUN([PHP_RUNPATH_SWITCH],[
  272. AC_MSG_CHECKING([if compiler supports -R])
  273. AC_CACHE_VAL(php_cv_cc_dashr,[
  274. SAVE_LIBS=$LIBS
  275. LIBS="-R /usr/$PHP_LIBDIR $LIBS"
  276. AC_TRY_LINK([], [], php_cv_cc_dashr=yes, php_cv_cc_dashr=no)
  277. LIBS=$SAVE_LIBS])
  278. AC_MSG_RESULT([$php_cv_cc_dashr])
  279. if test $php_cv_cc_dashr = "yes"; then
  280. ld_runpath_switch=-R
  281. else
  282. AC_MSG_CHECKING([if compiler supports -Wl,-rpath,])
  283. AC_CACHE_VAL(php_cv_cc_rpath,[
  284. SAVE_LIBS=$LIBS
  285. LIBS="-Wl,-rpath,/usr/$PHP_LIBDIR $LIBS"
  286. AC_TRY_LINK([], [], php_cv_cc_rpath=yes, php_cv_cc_rpath=no)
  287. LIBS=$SAVE_LIBS])
  288. AC_MSG_RESULT([$php_cv_cc_rpath])
  289. if test $php_cv_cc_rpath = "yes"; then
  290. ld_runpath_switch=-Wl,-rpath,
  291. else
  292. dnl something innocuous
  293. ld_runpath_switch=-L
  294. fi
  295. fi
  296. if test "$PHP_RPATH" = "no"; then
  297. ld_runpath_switch=
  298. fi
  299. ])
  300. dnl
  301. dnl PHP_CHECK_GCC_ARG(arg, action-if-found, action-if-not-found)
  302. dnl
  303. AC_DEFUN([PHP_CHECK_GCC_ARG],[
  304. gcc_arg_name=[ac_cv_gcc_arg]translit($1,A-Z-,a-z_)
  305. AC_CACHE_CHECK([whether $CC supports $1], [ac_cv_gcc_arg]translit($1,A-Z-,a-z_), [
  306. echo 'void somefunc() { };' > conftest.c
  307. cmd='$CC $1 -c conftest.c'
  308. if eval $cmd 2>&1 | $EGREP -e $1 >/dev/null ; then
  309. ac_result=no
  310. else
  311. ac_result=yes
  312. fi
  313. eval $gcc_arg_name=$ac_result
  314. rm -f conftest.*
  315. ])
  316. if eval test "\$$gcc_arg_name" = "yes"; then
  317. $2
  318. else
  319. :
  320. $3
  321. fi
  322. ])
  323. dnl
  324. dnl PHP_LIBGCC_LIBPATH(gcc)
  325. dnl
  326. dnl Stores the location of libgcc in libgcc_libpath
  327. dnl
  328. AC_DEFUN([PHP_LIBGCC_LIBPATH],[
  329. changequote({,})
  330. libgcc_libpath=`$1 --print-libgcc-file-name|$SED 's%/*[^/][^/]*$%%'`
  331. changequote([,])
  332. ])
  333. dnl -------------------------------------------------------------------------
  334. dnl Macros to modify LIBS, INCLUDES, etc. variables
  335. dnl -------------------------------------------------------------------------
  336. dnl
  337. dnl PHP_REMOVE_USR_LIB(NAME)
  338. dnl
  339. dnl Removes all -L/usr/$PHP_LIBDIR entries from variable NAME
  340. dnl
  341. AC_DEFUN([PHP_REMOVE_USR_LIB],[
  342. unset ac_new_flags
  343. for i in [$]$1; do
  344. case [$]i in
  345. -L/usr/$PHP_LIBDIR|-L/usr/$PHP_LIBDIR/[)] ;;
  346. *[)] ac_new_flags="[$]ac_new_flags [$]i" ;;
  347. esac
  348. done
  349. $1=[$]ac_new_flags
  350. ])
  351. dnl
  352. dnl PHP_EVAL_LIBLINE(libline, SHARED-LIBADD)
  353. dnl
  354. dnl Use this macro, if you need to add libraries and or library search
  355. dnl paths to the PHP build system which are only given in compiler
  356. dnl notation.
  357. dnl
  358. AC_DEFUN([PHP_EVAL_LIBLINE],[
  359. for ac_i in $1; do
  360. case $ac_i in
  361. -pthread[)]
  362. if test "$ext_shared" = "yes"; then
  363. $2="[$]$2 -pthread"
  364. else
  365. PHP_RUN_ONCE(EXTRA_LDFLAGS, [$ac_i], [EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"])
  366. fi
  367. ;;
  368. -l*[)]
  369. ac_ii=`echo $ac_i|cut -c 3-`
  370. PHP_ADD_LIBRARY($ac_ii,1,$2)
  371. ;;
  372. -L*[)]
  373. ac_ii=`echo $ac_i|cut -c 3-`
  374. PHP_ADD_LIBPATH($ac_ii,$2)
  375. ;;
  376. esac
  377. done
  378. ])
  379. dnl
  380. dnl PHP_EVAL_INCLINE(headerline)
  381. dnl
  382. dnl Use this macro, if you need to add header search paths to the PHP
  383. dnl build system which are only given in compiler notation.
  384. dnl
  385. AC_DEFUN([PHP_EVAL_INCLINE],[
  386. for ac_i in $1; do
  387. case $ac_i in
  388. -I*[)]
  389. ac_ii=`echo $ac_i|cut -c 3-`
  390. PHP_ADD_INCLUDE($ac_ii)
  391. ;;
  392. esac
  393. done
  394. ])
  395. dnl internal, don't use
  396. AC_DEFUN([_PHP_ADD_LIBPATH_GLOBAL],[
  397. PHP_RUN_ONCE(LIBPATH, $1, [
  398. test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$1"
  399. LDFLAGS="$LDFLAGS -L$1"
  400. PHP_RPATHS="$PHP_RPATHS $1"
  401. ])
  402. ])dnl
  403. dnl
  404. dnl
  405. dnl PHP_ADD_LIBPATH(path [, SHARED-LIBADD])
  406. dnl
  407. dnl Adds a path to linkpath/runpath (LDFLAGS)
  408. dnl
  409. AC_DEFUN([PHP_ADD_LIBPATH],[
  410. if test "$1" != "/usr/$PHP_LIBDIR" && test "$1" != "/usr/lib"; then
  411. PHP_EXPAND_PATH($1, ai_p)
  412. ifelse([$2],,[
  413. _PHP_ADD_LIBPATH_GLOBAL([$ai_p])
  414. ],[
  415. if test "$ext_shared" = "yes"; then
  416. $2="-L$ai_p [$]$2"
  417. test -n "$ld_runpath_switch" && $2="$ld_runpath_switch$ai_p [$]$2"
  418. else
  419. _PHP_ADD_LIBPATH_GLOBAL([$ai_p])
  420. fi
  421. ])
  422. fi
  423. ])
  424. dnl
  425. dnl PHP_UTILIZE_RPATHS()
  426. dnl
  427. dnl builds RPATHS/LDFLAGS from PHP_RPATHS
  428. dnl
  429. AC_DEFUN([PHP_UTILIZE_RPATHS],[
  430. OLD_RPATHS=$PHP_RPATHS
  431. unset PHP_RPATHS
  432. for i in $OLD_RPATHS; do
  433. dnl Can be passed to native cc/libtool
  434. PHP_LDFLAGS="$PHP_LDFLAGS -L$i"
  435. dnl Libtool-specific
  436. PHP_RPATHS="$PHP_RPATHS -R $i"
  437. dnl cc-specific
  438. NATIVE_RPATHS="$NATIVE_RPATHS $ld_runpath_switch$i"
  439. done
  440. if test "$PHP_RPATH" = "no"; then
  441. unset PHP_RPATHS
  442. unset NATIVE_RPATHS
  443. fi
  444. ])
  445. dnl
  446. dnl PHP_ADD_INCLUDE(path [,before])
  447. dnl
  448. dnl add an include path.
  449. dnl if before is 1, add in the beginning of INCLUDES.
  450. dnl
  451. AC_DEFUN([PHP_ADD_INCLUDE],[
  452. if test "$1" != "/usr/include"; then
  453. PHP_EXPAND_PATH($1, ai_p)
  454. PHP_RUN_ONCE(INCLUDEPATH, $ai_p, [
  455. if test "$2"; then
  456. INCLUDES="-I$ai_p $INCLUDES"
  457. else
  458. INCLUDES="$INCLUDES -I$ai_p"
  459. fi
  460. ])
  461. fi
  462. ])
  463. dnl internal, don't use
  464. AC_DEFUN([_PHP_X_ADD_LIBRARY],[dnl
  465. ifelse([$2],,$3="-l$1 [$]$3", $3="[$]$3 -l$1") dnl
  466. ])dnl
  467. dnl
  468. dnl internal, don't use
  469. AC_DEFUN([_PHP_ADD_LIBRARY_SKELETON],[
  470. case $1 in
  471. c|c_r|pthread*[)] ;;
  472. *[)] ifelse($3,,[
  473. _PHP_X_ADD_LIBRARY($1,$2,$5)
  474. ],[
  475. if test "$ext_shared" = "yes"; then
  476. _PHP_X_ADD_LIBRARY($1,$2,$3)
  477. else
  478. $4($1,$2)
  479. fi
  480. ]) ;;
  481. esac
  482. ])dnl
  483. dnl
  484. dnl
  485. dnl PHP_ADD_LIBRARY(library[, append[, shared-libadd]])
  486. dnl
  487. dnl add a library to the link line
  488. dnl
  489. AC_DEFUN([PHP_ADD_LIBRARY],[
  490. _PHP_ADD_LIBRARY_SKELETON([$1],[$2],[$3],[PHP_ADD_LIBRARY],[LIBS])
  491. ])
  492. dnl
  493. dnl PHP_ADD_LIBRARY_DEFER(library[, append[, shared-libadd]])
  494. dnl
  495. dnl add a library to the link line (deferred, not used during configure)
  496. dnl
  497. AC_DEFUN([PHP_ADD_LIBRARY_DEFER],[
  498. _PHP_ADD_LIBRARY_SKELETON([$1],[$2],[$3],[PHP_ADD_LIBRARY_DEFER],[DLIBS])
  499. ])
  500. dnl
  501. dnl PHP_ADD_LIBRARY_WITH_PATH(library, path[, shared-libadd])
  502. dnl
  503. dnl add a library to the link line and path to linkpath/runpath.
  504. dnl if shared-libadd is not empty and $ext_shared is yes,
  505. dnl shared-libadd will be assigned the library information
  506. dnl
  507. AC_DEFUN([PHP_ADD_LIBRARY_WITH_PATH],[
  508. ifelse($3,,[
  509. if test -n "$2"; then
  510. PHP_ADD_LIBPATH($2)
  511. fi
  512. PHP_ADD_LIBRARY($1)
  513. ],[
  514. if test "$ext_shared" = "yes"; then
  515. $3="-l$1 [$]$3"
  516. if test -n "$2"; then
  517. PHP_ADD_LIBPATH($2,$3)
  518. fi
  519. else
  520. PHP_ADD_LIBRARY_WITH_PATH($1,$2)
  521. fi
  522. ])
  523. ])
  524. dnl
  525. dnl PHP_ADD_LIBRARY_DEFER_WITH_PATH(library, path[, shared-libadd])
  526. dnl
  527. dnl add a library to the link line (deferred)
  528. dnl and path to linkpath/runpath (not deferred)
  529. dnl if shared-libadd is not empty and $ext_shared is yes,
  530. dnl shared-libadd will be assigned the library information
  531. dnl
  532. AC_DEFUN([PHP_ADD_LIBRARY_DEFER_WITH_PATH],[
  533. ifelse($3,,[
  534. if test -n "$2"; then
  535. PHP_ADD_LIBPATH($2)
  536. fi
  537. PHP_ADD_LIBRARY_DEFER($1)
  538. ],[
  539. if test "$ext_shared" = "yes"; then
  540. $3="-l$1 [$]$3"
  541. if test -n "$2"; then
  542. PHP_ADD_LIBPATH($2,$3)
  543. fi
  544. else
  545. PHP_ADD_LIBRARY_DEFER_WITH_PATH($1,$2)
  546. fi
  547. ])
  548. ])
  549. dnl
  550. dnl PHP_ADD_FRAMEWORK(framework [,before])
  551. dnl
  552. dnl add a (Darwin / Mac OS X) framework to the link
  553. dnl line. if before is 1, the framework is added
  554. dnl to the beginning of the line.
  555. dnl
  556. AC_DEFUN([PHP_ADD_FRAMEWORK], [
  557. PHP_RUN_ONCE(FRAMEWORKS, $1, [
  558. if test "$2"; then
  559. PHP_FRAMEWORKS="-framework $1 $PHP_FRAMEWORKS"
  560. else
  561. PHP_FRAMEWORKS="$PHP_FRAMEWORKS -framework $1"
  562. fi
  563. ])
  564. ])
  565. dnl
  566. dnl PHP_ADD_FRAMEWORKPATH(path [,before])
  567. dnl
  568. dnl add a (Darwin / Mac OS X) framework path to the link
  569. dnl and include lines. default paths include (but are
  570. dnl not limited to) /Local/Library/Frameworks and
  571. dnl /System/Library/Frameworks, so these don't need
  572. dnl to be specifically added. if before is 1, the
  573. dnl framework path is added to the beginning of the
  574. dnl relevant lines.
  575. dnl
  576. AC_DEFUN([PHP_ADD_FRAMEWORKPATH], [
  577. PHP_EXPAND_PATH($1, ai_p)
  578. PHP_RUN_ONCE(FRAMEWORKPATH, $ai_p, [
  579. if test "$2"; then
  580. PHP_FRAMEWORKPATH="-F$ai_p $PHP_FRAMEWORKPATH"
  581. else
  582. PHP_FRAMEWORKPATH="$PHP_FRAMEWORKPATH -F$ai_p"
  583. fi
  584. ])
  585. ])
  586. dnl
  587. dnl PHP_ADD_FRAMEWORK_WITH_PATH(framework, path)
  588. dnl
  589. dnl Adds a (Darwin / Mac OS X) framework path and the
  590. dnl framework itself to the link and include lines.
  591. dnl
  592. AC_DEFUN([PHP_ADD_FRAMEWORK_WITH_PATH], [
  593. PHP_ADD_FRAMEWORKPATH($2)
  594. PHP_ADD_FRAMEWORK($1)
  595. ])
  596. dnl
  597. dnl PHP_SET_LIBTOOL_VARIABLE(var)
  598. dnl
  599. dnl Set libtool variable
  600. dnl
  601. AC_DEFUN([PHP_SET_LIBTOOL_VARIABLE],[
  602. if test -z "$LIBTOOL"; then
  603. LIBTOOL='$(SHELL) $(top_builddir)/libtool $1'
  604. else
  605. LIBTOOL="$LIBTOOL $1"
  606. fi
  607. ])
  608. dnl -------------------------------------------------------------------------
  609. dnl Wrapper macros for AC_ARG_WITH / AC_ARG_ENABLE
  610. dnl -------------------------------------------------------------------------
  611. dnl PHP_ARG_ANALYZE_EX
  612. dnl internal
  613. AC_DEFUN([PHP_ARG_ANALYZE_EX],[
  614. ext_output="yes, shared"
  615. ext_shared=yes
  616. case [$]$1 in
  617. shared,*[)]
  618. $1=`echo "[$]$1"|$SED 's/^shared,//'`
  619. ;;
  620. shared[)]
  621. $1=yes
  622. ;;
  623. no[)]
  624. ext_output=no
  625. ext_shared=no
  626. ;;
  627. *[)]
  628. ext_output=yes
  629. ext_shared=no
  630. ;;
  631. esac
  632. PHP_ALWAYS_SHARED([$1])
  633. ])
  634. dnl PHP_ARG_ANALYZE
  635. dnl internal
  636. AC_DEFUN([PHP_ARG_ANALYZE],[
  637. ifelse([$3],yes,[PHP_ARG_ANALYZE_EX([$1])],[ext_output=ifelse([$]$1,,no,[$]$1)])
  638. ifelse([$2],,,[AC_MSG_RESULT([$ext_output])])
  639. ])
  640. dnl
  641. dnl PHP_ARG_WITH(arg-name, check message, help text[, default-val[, extension-or-not]])
  642. dnl Sets PHP_ARG_NAME either to the user value or to the default value.
  643. dnl default-val defaults to no. This will also set the variable ext_shared,
  644. dnl and will overwrite any previous variable of that name.
  645. dnl If extension-or-not is yes (default), then do the ENABLE_ALL check and run
  646. dnl the PHP_ARG_ANALYZE_EX.
  647. dnl
  648. AC_DEFUN([PHP_ARG_WITH],[
  649. php_with_[]translit($1,A-Z0-9-,a-z0-9_)=ifelse($4,,no,$4)
  650. PHP_REAL_ARG_WITH([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z0-9-,A-Z0-9_),[ifelse($5,,yes,$5)])
  651. ])
  652. dnl PHP_REAL_ARG_WITH
  653. dnl internal
  654. AC_DEFUN([PHP_REAL_ARG_WITH],[
  655. ifelse([$2],,,[AC_MSG_CHECKING([$2])])
  656. AC_ARG_WITH($1,[$3],$5=[$]withval,
  657. [
  658. $5=ifelse($4,,no,$4)
  659. ifelse($6,yes,[test "$PHP_ENABLE_ALL" && $5=$PHP_ENABLE_ALL])
  660. ])
  661. PHP_ARG_ANALYZE($5,[$2],$6)
  662. ])
  663. dnl
  664. dnl PHP_ARG_ENABLE(arg-name, check message, help text[, default-val[, extension-or-not]])
  665. dnl Sets PHP_ARG_NAME either to the user value or to the default value.
  666. dnl default-val defaults to no. This will also set the variable ext_shared,
  667. dnl and will overwrite any previous variable of that name.
  668. dnl If extension-or-not is yes (default), then do the ENABLE_ALL check and run
  669. dnl the PHP_ARG_ANALYZE_EX.
  670. dnl
  671. AC_DEFUN([PHP_ARG_ENABLE],[
  672. php_enable_[]translit($1,A-Z0-9-,a-z0-9_)=ifelse($4,,no,$4)
  673. PHP_REAL_ARG_ENABLE([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z0-9-,A-Z0-9_),[ifelse($5,,yes,$5)])
  674. ])
  675. dnl PHP_REAL_ARG_ENABLE
  676. dnl internal
  677. AC_DEFUN([PHP_REAL_ARG_ENABLE],[
  678. ifelse([$2],,,[AC_MSG_CHECKING([$2])])
  679. AC_ARG_ENABLE($1,[$3],$5=[$]enableval,
  680. [
  681. $5=ifelse($4,,no,$4)
  682. ifelse($6,yes,[test "$PHP_ENABLE_ALL" && $5=$PHP_ENABLE_ALL])
  683. ])
  684. PHP_ARG_ANALYZE($5,[$2],$6)
  685. ])
  686. dnl -------------------------------------------------------------------------
  687. dnl Build macros
  688. dnl -------------------------------------------------------------------------
  689. dnl
  690. dnl PHP_BUILD_THREAD_SAFE
  691. dnl
  692. AC_DEFUN([PHP_BUILD_THREAD_SAFE],[
  693. enable_maintainer_zts=yes
  694. if test "$pthreads_working" != "yes"; then
  695. AC_MSG_ERROR([ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads.])
  696. fi
  697. ])
  698. dnl
  699. dnl PHP_REQUIRE_CXX
  700. dnl
  701. AC_DEFUN([PHP_REQUIRE_CXX],[
  702. if test -z "$php_cxx_done"; then
  703. AC_PROG_CXX
  704. AC_PROG_CXXCPP
  705. PHP_ADD_LIBRARY(stdc++)
  706. php_cxx_done=yes
  707. fi
  708. ])
  709. dnl
  710. dnl PHP_BUILD_SHARED
  711. dnl
  712. AC_DEFUN([PHP_BUILD_SHARED],[
  713. PHP_BUILD_PROGRAM
  714. OVERALL_TARGET=libphp[]$PHP_MAJOR_VERSION[.la]
  715. php_sapi_module=shared
  716. php_c_pre=$shared_c_pre
  717. php_c_meta=$shared_c_meta
  718. php_c_post=$shared_c_post
  719. php_cxx_pre=$shared_cxx_pre
  720. php_cxx_meta=$shared_cxx_meta
  721. php_cxx_post=$shared_cxx_post
  722. php_lo=$shared_lo
  723. ])
  724. dnl
  725. dnl PHP_BUILD_STATIC
  726. dnl
  727. AC_DEFUN([PHP_BUILD_STATIC],[
  728. PHP_BUILD_PROGRAM
  729. OVERALL_TARGET=libphp[]$PHP_MAJOR_VERSION[.la]
  730. php_sapi_module=static
  731. ])
  732. dnl
  733. dnl PHP_BUILD_BUNDLE
  734. dnl
  735. AC_DEFUN([PHP_BUILD_BUNDLE],[
  736. PHP_BUILD_PROGRAM
  737. OVERALL_TARGET=libs/libphp[]$PHP_MAJOR_VERSION[.bundle]
  738. php_sapi_module=static
  739. ])
  740. dnl
  741. dnl PHP_BUILD_PROGRAM
  742. dnl
  743. AC_DEFUN([PHP_BUILD_PROGRAM],[
  744. php_c_pre='$(LIBTOOL) --mode=compile $(CC)'
  745. php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)'
  746. php_c_post=
  747. php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)'
  748. php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)'
  749. php_cxx_post=
  750. php_lo=lo
  751. case $with_pic in
  752. yes) pic_setting='-prefer-pic';;
  753. no) pic_setting='-prefer-non-pic';;
  754. esac
  755. shared_c_pre='$(LIBTOOL) --mode=compile $(CC)'
  756. shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting
  757. shared_c_post=
  758. shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)'
  759. shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting
  760. shared_cxx_post=
  761. shared_lo=lo
  762. ])
  763. dnl
  764. dnl PHP_SHARED_MODULE(module-name, object-var, build-dir, cxx, zend_ext)
  765. dnl
  766. dnl Basically sets up the link-stage for building module-name
  767. dnl from object_var in build-dir.
  768. dnl
  769. AC_DEFUN([PHP_SHARED_MODULE],[
  770. install_modules="install-modules"
  771. case $host_alias in
  772. *aix*[)]
  773. suffix=so
  774. link_cmd='$(LIBTOOL) --mode=link ifelse($4,,[$(CC)],[$(CXX)]) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$3'/$1.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $($2) $(translit($1,a-z_-,A-Z__)_SHARED_LIBADD) && mv -f '$3'/.libs/$1.so '$3'/$1.so'
  775. ;;
  776. *netware*[)]
  777. suffix=nlm
  778. link_cmd='$(LIBTOOL) --mode=link ifelse($4,,[$(CC)],[$(CXX)]) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o [$]@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $($2) ifelse($1, php5lib, , -L$(top_builddir)/netware -lphp5lib) $(translit(ifelse($1, php5lib, $1, m4_substr($1, 3)),a-z_-,A-Z__)_SHARED_LIBADD)'
  779. ;;
  780. *[)]
  781. suffix=la
  782. link_cmd='$(LIBTOOL) --mode=link ifelse($4,,[$(CC)],[$(CXX)]) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o [$]@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $($2) $(translit($1,a-z_-,A-Z__)_SHARED_LIBADD)'
  783. ;;
  784. esac
  785. if test "x$5" = "xyes"; then
  786. PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/$1.$suffix"
  787. else
  788. PHP_MODULES="$PHP_MODULES \$(phplibdir)/$1.$suffix"
  789. fi
  790. PHP_SUBST($2)
  791. cat >>Makefile.objects<<EOF
  792. \$(phplibdir)/$1.$suffix: $3/$1.$suffix
  793. \$(LIBTOOL) --mode=install cp $3/$1.$suffix \$(phplibdir)
  794. $3/$1.$suffix: \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_DEPENDENCIES)
  795. $link_cmd
  796. EOF
  797. ])
  798. dnl
  799. dnl PHP_SELECT_SAPI(name, type[, sources [, extra-cflags [, build-target]]])
  800. dnl
  801. dnl Selects the SAPI name and type (static, shared, bundle, program)
  802. dnl and optionally also the source-files for the SAPI-specific
  803. dnl objects.
  804. dnl
  805. AC_DEFUN([PHP_SELECT_SAPI],[
  806. if test "$2" = "program"; then
  807. PHP_BINARIES="$PHP_BINARIES $1"
  808. elif test "$PHP_SAPI" != "none"; then
  809. AC_MSG_ERROR([
  810. +--------------------------------------------------------------------+
  811. | *** ATTENTION *** |
  812. | |
  813. | You've configured multiple SAPIs to be build. You can build only |
  814. | one SAPI module plus CGI, CLI and FPM binaries at the same time. |
  815. +--------------------------------------------------------------------+
  816. ])
  817. else
  818. PHP_SAPI=$1
  819. fi
  820. PHP_ADD_BUILD_DIR([sapi/$1])
  821. PHP_INSTALLED_SAPIS="$PHP_INSTALLED_SAPIS $1"
  822. ifelse($2,program,[
  823. PHP_BUILD_PROGRAM
  824. install_binaries="install-binaries"
  825. install_binary_targets="$install_binary_targets install-$1"
  826. PHP_SUBST(PHP_[]translit($1,a-z0-9-,A-Z0-9_)[]_OBJS)
  827. ifelse($3,,,[PHP_ADD_SOURCES_X([sapi/$1],[$3],[$4],PHP_[]translit($1,a-z0-9-,A-Z0-9_)[]_OBJS)])
  828. ],[
  829. case "$2" in
  830. static[)] PHP_BUILD_STATIC;;
  831. shared[)] PHP_BUILD_SHARED;;
  832. bundle[)] PHP_BUILD_BUNDLE;;
  833. esac
  834. install_sapi="install-sapi"
  835. ifelse($3,,,[PHP_ADD_SOURCES([sapi/$1],[$3],[$4],[sapi])])
  836. ])
  837. ])
  838. dnl deprecated
  839. AC_DEFUN([PHP_EXTENSION],[
  840. sources=`$AWK -f $abs_srcdir/build/scan_makefile_in.awk < []PHP_EXT_SRCDIR($1)[]/Makefile.in`
  841. PHP_NEW_EXTENSION($1, $sources, $2, $3)
  842. if test -r "$ext_srcdir/Makefile.frag"; then
  843. PHP_ADD_MAKEFILE_FRAGMENT
  844. fi
  845. ])
  846. AC_DEFUN([PHP_ADD_BUILD_DIR],[
  847. ifelse($2,,[
  848. BUILD_DIR="$BUILD_DIR $1"
  849. ], [
  850. $php_shtool mkdir -p $1
  851. ])
  852. ])
  853. AC_DEFUN([PHP_GEN_BUILD_DIRS],[
  854. $php_shtool mkdir -p $BUILD_DIR
  855. ])
  856. dnl
  857. dnl PHP_NEW_EXTENSION(extname, sources [, shared [, sapi_class [, extra-cflags [, cxx [, zend_ext]]]]])
  858. dnl
  859. dnl Includes an extension in the build.
  860. dnl
  861. dnl "extname" is the name of the ext/ subdir where the extension resides.
  862. dnl "sources" is a list of files relative to the subdir which are used
  863. dnl to build the extension.
  864. dnl "shared" can be set to "shared" or "yes" to build the extension as
  865. dnl a dynamically loadable library. Optional parameter "sapi_class" can
  866. dnl be set to "cli" to mark extension build only with CLI or CGI sapi's.
  867. dnl "extra-cflags" are passed to the compiler, with
  868. dnl @ext_srcdir@ and @ext_builddir@ being substituted.
  869. dnl "cxx" can be used to indicate that a C++ shared module is desired.
  870. dnl "zend_ext" indicates a zend extension.
  871. AC_DEFUN([PHP_NEW_EXTENSION],[
  872. ext_builddir=[]PHP_EXT_BUILDDIR($1)
  873. ext_srcdir=[]PHP_EXT_SRCDIR($1)
  874. ifelse($5,,ac_extra=,[ac_extra=`echo "$5"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g`])
  875. if test "$3" != "shared" && test "$3" != "yes" && test "$4" != "cli"; then
  876. dnl ---------------------------------------------- Static module
  877. [PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=no
  878. PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,)
  879. EXT_STATIC="$EXT_STATIC $1"
  880. if test "$3" != "nocli"; then
  881. EXT_CLI_STATIC="$EXT_CLI_STATIC $1"
  882. fi
  883. else
  884. if test "$3" = "shared" || test "$3" = "yes"; then
  885. dnl ---------------------------------------------- Shared module
  886. [PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=yes
  887. PHP_ADD_SOURCES_X(PHP_EXT_DIR($1),$2,$ac_extra,shared_objects_$1,yes)
  888. case $host_alias in
  889. *netware*[)]
  890. PHP_SHARED_MODULE(php$1,shared_objects_$1, $ext_builddir, $6, $7)
  891. ;;
  892. *[)]
  893. PHP_SHARED_MODULE($1,shared_objects_$1, $ext_builddir, $6, $7)
  894. ;;
  895. esac
  896. AC_DEFINE_UNQUOTED([COMPILE_DL_]translit($1,a-z_-,A-Z__), 1, Whether to build $1 as dynamic module)
  897. fi
  898. fi
  899. if test "$3" != "shared" && test "$3" != "yes" && test "$4" = "cli"; then
  900. dnl ---------------------------------------------- CLI static module
  901. [PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=no
  902. case "$PHP_SAPI" in
  903. cgi|embed[)]
  904. PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,)
  905. EXT_STATIC="$EXT_STATIC $1"
  906. ;;
  907. *[)]
  908. PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,cli)
  909. ;;
  910. esac
  911. EXT_CLI_STATIC="$EXT_CLI_STATIC $1"
  912. fi
  913. PHP_ADD_BUILD_DIR($ext_builddir)
  914. dnl Set for phpize builds only
  915. dnl ---------------------------
  916. if test "$ext_builddir" = "."; then
  917. PHP_PECL_EXTENSION=$1
  918. PHP_SUBST(PHP_PECL_EXTENSION)
  919. fi
  920. ])
  921. dnl
  922. dnl PHP_WITH_SHARED
  923. dnl
  924. dnl Checks whether $withval is "shared" or starts with "shared,XXX"
  925. dnl and sets $shared to "yes" or "no", and removes "shared,?" stuff
  926. dnl from $withval.
  927. dnl
  928. AC_DEFUN([PHP_WITH_SHARED],[
  929. PHP_ARG_ANALYZE_EX(withval)
  930. shared=$ext_shared
  931. unset ext_shared ext_output
  932. ])
  933. dnl
  934. dnl PHP_ADD_EXTENSION_DEP(extname, depends [, depconf])
  935. dnl
  936. dnl This macro is scanned by genif.sh when it builds the internal functions
  937. dnl list, so that modules can be init'd in the correct order
  938. dnl $1 = name of extension, $2 = extension upon which it depends
  939. dnl $3 = optional: if true, it's ok for $2 to have not been configured
  940. dnl default is false and should halt the build.
  941. dnl To be effective, this macro must be invoked *after* PHP_NEW_EXTENSION.
  942. dnl The extension on which it depends must also have been configured.
  943. dnl See ADD_EXTENSION_DEP in win32 build
  944. dnl
  945. AC_DEFUN([PHP_ADD_EXTENSION_DEP], [
  946. am_i_shared=$[PHP_]translit($1,a-z_-,A-Z__)[_SHARED]
  947. is_it_shared=$[PHP_]translit($2,a-z_-,A-Z__)[_SHARED]
  948. is_it_enabled=$[PHP_]translit($2,a-z_-,A-Z__)
  949. if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
  950. AC_MSG_ERROR([
  951. You've configured extension $1 to build statically, but it
  952. depends on extension $2, which you've configured to build shared.
  953. You either need to build $1 shared or build $2 statically for the
  954. build to be successful.
  955. ])
  956. fi
  957. if test "x$is_it_enabled" = "xno" && test "x$3" != "xtrue"; then
  958. AC_MSG_ERROR([
  959. You've configured extension $1, which depends on extension $2,
  960. but you've either not enabled $2, or have disabled it.
  961. ])
  962. fi
  963. dnl Some systems require that we link $2 to $1 when building
  964. ])
  965. dnl -------------------------------------------------------------------------
  966. dnl Checks for structures, typedefs, broken functions, etc.
  967. dnl -------------------------------------------------------------------------
  968. dnl Internal helper macros
  969. dnl
  970. dnl _PHP_DEF_HAVE_FILE(what, filename)
  971. AC_DEFUN([_PHP_DEF_HAVE_FILE], [
  972. php_def_have_what=HAVE_[]`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_' `
  973. echo "#define $php_def_have_what 1" >> $2
  974. ])
  975. dnl
  976. dnl _PHP_CHECK_SIZEOF(type, cross-value, extra-headers [, found-action [, not-found-action]])
  977. dnl
  978. AC_DEFUN([_PHP_CHECK_SIZEOF], [
  979. php_cache_value=php_cv_sizeof_[]$1
  980. AC_CACHE_VAL(php_cv_sizeof_[]$1, [
  981. old_LIBS=$LIBS
  982. LIBS=
  983. old_LDFLAGS=$LDFLAGS
  984. LDFLAGS=
  985. AC_TRY_RUN([#include <stdio.h>
  986. #if STDC_HEADERS
  987. #include <stdlib.h>
  988. #include <stddef.h>
  989. #endif
  990. #ifdef HAVE_INTTYPES_H
  991. #include <inttypes.h>
  992. #endif
  993. #ifdef HAVE_UNISTD_H
  994. #include <unistd.h>
  995. #endif
  996. $3
  997. int main()
  998. {
  999. FILE *fp = fopen("conftestval", "w");
  1000. if (!fp) return(1);
  1001. fprintf(fp, "%d\n", sizeof($1));
  1002. return(0);
  1003. }
  1004. ], [
  1005. eval $php_cache_value=`cat conftestval`
  1006. ], [
  1007. eval $php_cache_value=0
  1008. ], [
  1009. ifelse([$2],,[eval $php_cache_value=0], [eval $php_cache_value=$2])
  1010. ])
  1011. LDFLAGS=$old_LDFLAGS
  1012. LIBS=$old_LIBS
  1013. ])
  1014. if eval test "\$$php_cache_value" != "0"; then
  1015. ifelse([$4],[],:,[$4])
  1016. ifelse([$5],[],,[else $5])
  1017. fi
  1018. ])
  1019. dnl
  1020. dnl PHP_CHECK_SIZEOF(type, cross-value, extra-headers)
  1021. dnl
  1022. AC_DEFUN([PHP_CHECK_SIZEOF], [
  1023. AC_MSG_CHECKING([size of $1])
  1024. _PHP_CHECK_SIZEOF($1, $2, $3, [
  1025. AC_DEFINE_UNQUOTED([SIZEOF_]translit($1,a-z,A-Z_), [$]php_cv_sizeof_[]$1, [Size of $1])
  1026. AC_DEFINE_UNQUOTED([HAVE_]translit($1,a-z,A-Z_), 1, [Whether $1 is available])
  1027. ])
  1028. AC_MSG_RESULT([[$][php_cv_sizeof_]translit($1, ,_)])
  1029. ])
  1030. dnl
  1031. dnl PHP_CHECK_TYPES(type-list, include-file [, extra-headers])
  1032. dnl
  1033. AC_DEFUN([PHP_CHECK_TYPES], [
  1034. for php_typename in $1; do
  1035. AC_MSG_CHECKING([whether $php_typename exists])
  1036. _PHP_CHECK_SIZEOF($php_typename, 0, $3, [
  1037. _PHP_DEF_HAVE_FILE($php_typename, $2)
  1038. AC_MSG_RESULT([yes])
  1039. ], [
  1040. AC_MSG_RESULT([no])
  1041. ])
  1042. done
  1043. ])
  1044. dnl
  1045. dnl PHP_CHECK_IN_ADDR_T
  1046. dnl
  1047. AC_DEFUN([PHP_CHECK_IN_ADDR_T], [
  1048. dnl AIX keeps in_addr_t in /usr/include/netinet/in.h
  1049. AC_MSG_CHECKING([for in_addr_t])
  1050. AC_CACHE_VAL(ac_cv_type_in_addr_t,
  1051. [AC_EGREP_CPP(dnl
  1052. changequote(<<,>>)dnl
  1053. <<in_addr_t[^a-zA-Z_0-9]>>dnl
  1054. changequote([,]), [#include <sys/types.h>
  1055. #if STDC_HEADERS
  1056. #include <stdlib.h>
  1057. #include <stddef.h>
  1058. #endif
  1059. #ifdef HAVE_NETINET_IN_H
  1060. #include <netinet/in.h>
  1061. #endif], ac_cv_type_in_addr_t=yes, ac_cv_type_in_addr_t=no)])dnl
  1062. AC_MSG_RESULT([$ac_cv_type_in_addr_t])
  1063. if test $ac_cv_type_in_addr_t = no; then
  1064. AC_DEFINE(in_addr_t, u_int, [ ])
  1065. fi
  1066. ])
  1067. dnl
  1068. dnl PHP_TIME_R_TYPE
  1069. dnl
  1070. dnl Check type of reentrant time-related functions
  1071. dnl Type can be: irix, hpux or POSIX
  1072. dnl
  1073. AC_DEFUN([PHP_TIME_R_TYPE],[
  1074. AC_CACHE_CHECK(for type of reentrant time-related functions, ac_cv_time_r_type,[
  1075. AC_TRY_RUN([
  1076. #include <time.h>
  1077. main() {
  1078. char buf[27];
  1079. struct tm t;
  1080. time_t old = 0;
  1081. int r, s;
  1082. s = gmtime_r(&old, &t);
  1083. r = (int) asctime_r(&t, buf, 26);
  1084. if (r == s && s == 0) return (0);
  1085. return (1);
  1086. }
  1087. ],[
  1088. ac_cv_time_r_type=hpux
  1089. ],[
  1090. AC_TRY_RUN([
  1091. #include <time.h>
  1092. main() {
  1093. struct tm t, *s;
  1094. time_t old = 0;
  1095. char buf[27], *p;
  1096. s = gmtime_r(&old, &t);
  1097. p = asctime_r(&t, buf, 26);
  1098. if (p == buf && s == &t) return (0);
  1099. return (1);
  1100. }
  1101. ],[
  1102. ac_cv_time_r_type=irix
  1103. ],[
  1104. ac_cv_time_r_type=POSIX
  1105. ],[
  1106. ac_cv_time_r_type=POSIX
  1107. ])
  1108. ],[
  1109. ac_cv_time_r_type=POSIX
  1110. ])
  1111. ])
  1112. case $ac_cv_time_r_type in
  1113. hpux[)] AC_DEFINE(PHP_HPUX_TIME_R,1,[Whether you have HP-UX 10.x]) ;;
  1114. irix[)] AC_DEFINE(PHP_IRIX_TIME_R,1,[Whether you have IRIX-style functions]) ;;
  1115. esac
  1116. ])
  1117. dnl
  1118. dnl PHP_DOES_PWRITE_WORK
  1119. dnl internal
  1120. AC_DEFUN([PHP_DOES_PWRITE_WORK],[
  1121. AC_TRY_RUN([
  1122. #include <sys/types.h>
  1123. #include <sys/stat.h>
  1124. #include <fcntl.h>
  1125. #include <unistd.h>
  1126. #include <errno.h>
  1127. $1
  1128. main() {
  1129. int fd = open("conftest_in", O_WRONLY|O_CREAT, 0600);
  1130. if (fd < 0) exit(1);
  1131. if (pwrite(fd, "text", 4, 0) != 4) exit(1);
  1132. /* Linux glibc breakage until 2.2.5 */
  1133. if (pwrite(fd, "text", 4, -1) != -1 || errno != EINVAL) exit(1);
  1134. exit(0);
  1135. }
  1136. ],[
  1137. ac_cv_pwrite=yes
  1138. ],[
  1139. ac_cv_pwrite=no
  1140. ],[
  1141. ac_cv_pwrite=no
  1142. ])
  1143. ])
  1144. dnl PHP_DOES_PREAD_WORK
  1145. dnl internal
  1146. AC_DEFUN([PHP_DOES_PREAD_WORK],[
  1147. echo test > conftest_in
  1148. AC_TRY_RUN([
  1149. #include <sys/types.h>
  1150. #include <sys/stat.h>
  1151. #include <fcntl.h>
  1152. #include <unistd.h>
  1153. #include <errno.h>
  1154. $1
  1155. main() {
  1156. char buf[3];
  1157. int fd = open("conftest_in", O_RDONLY);
  1158. if (fd < 0) exit(1);
  1159. if (pread(fd, buf, 2, 0) != 2) exit(1);
  1160. /* Linux glibc breakage until 2.2.5 */
  1161. if (pread(fd, buf, 2, -1) != -1 || errno != EINVAL) exit(1);
  1162. exit(0);
  1163. }
  1164. ],[
  1165. ac_cv_pread=yes
  1166. ],[
  1167. ac_cv_pread=no
  1168. ],[
  1169. ac_cv_pread=no
  1170. ])
  1171. rm -f conftest_in
  1172. ])
  1173. dnl
  1174. dnl PHP_PWRITE_TEST
  1175. dnl
  1176. AC_DEFUN([PHP_PWRITE_TEST],[
  1177. AC_CACHE_CHECK(whether pwrite works,ac_cv_pwrite,[
  1178. PHP_DOES_PWRITE_WORK
  1179. if test "$ac_cv_pwrite" = "no"; then
  1180. PHP_DOES_PWRITE_WORK([ssize_t pwrite(int, void *, size_t, off64_t);])
  1181. if test "$ac_cv_pwrite" = "yes"; then
  1182. ac_cv_pwrite=64
  1183. fi
  1184. fi
  1185. ])
  1186. if test "$ac_cv_pwrite" != "no"; then
  1187. AC_DEFINE(HAVE_PWRITE, 1, [ ])
  1188. if test "$ac_cv_pwrite" = "64"; then
  1189. AC_DEFINE(PHP_PWRITE_64, 1, [whether pwrite64 is default])
  1190. fi
  1191. fi
  1192. ])
  1193. dnl
  1194. dnl PHP_PREAD_TEST
  1195. dnl
  1196. AC_DEFUN([PHP_PREAD_TEST],[
  1197. AC_CACHE_CHECK(whether pread works,ac_cv_pread,[
  1198. PHP_DOES_PREAD_WORK
  1199. if test "$ac_cv_pread" = "no"; then
  1200. PHP_DOES_PREAD_WORK([ssize_t pread(int, void *, size_t, off64_t);])
  1201. if test "$ac_cv_pread" = "yes"; then
  1202. ac_cv_pread=64
  1203. fi
  1204. fi
  1205. ])
  1206. if test "$ac_cv_pread" != "no"; then
  1207. AC_DEFINE(HAVE_PREAD, 1, [ ])
  1208. if test "$ac_cv_pread" = "64"; then
  1209. AC_DEFINE(PHP_PREAD_64, 1, [whether pread64 is default])
  1210. fi
  1211. fi
  1212. ])
  1213. dnl
  1214. dnl PHP_MISSING_TIME_R_DECL
  1215. dnl
  1216. AC_DEFUN([PHP_MISSING_TIME_R_DECL],[
  1217. AC_MSG_CHECKING([for missing declarations of reentrant functions])
  1218. AC_TRY_COMPILE([#include <time.h>],[struct tm *(*func)() = localtime_r],[
  1219. :
  1220. ],[
  1221. AC_DEFINE(MISSING_LOCALTIME_R_DECL,1,[Whether localtime_r is declared])
  1222. ])
  1223. AC_TRY_COMPILE([#include <time.h>],[struct tm *(*func)() = gmtime_r],[
  1224. :
  1225. ],[
  1226. AC_DEFINE(MISSING_GMTIME_R_DECL,1,[Whether gmtime_r is declared])
  1227. ])
  1228. AC_TRY_COMPILE([#include <time.h>],[char *(*func)() = asctime_r],[
  1229. :
  1230. ],[
  1231. AC_DEFINE(MISSING_ASCTIME_R_DECL,1,[Whether asctime_r is declared])
  1232. ])
  1233. AC_TRY_COMPILE([#include <time.h>],[char *(*func)() = ctime_r],[
  1234. :
  1235. ],[
  1236. AC_DEFINE(MISSING_CTIME_R_DECL,1,[Whether ctime_r is declared])
  1237. ])
  1238. AC_TRY_COMPILE([#include <string.h>],[char *(*func)() = strtok_r],[
  1239. :
  1240. ],[
  1241. AC_DEFINE(MISSING_STRTOK_R_DECL,1,[Whether strtok_r is declared])
  1242. ])
  1243. AC_MSG_RESULT([done])
  1244. ])
  1245. dnl
  1246. dnl PHP_READDIR_R_TYPE
  1247. dnl
  1248. AC_DEFUN([PHP_READDIR_R_TYPE],[
  1249. dnl HAVE_READDIR_R is also defined by libmysql
  1250. AC_CHECK_FUNC(readdir_r,ac_cv_func_readdir_r=yes,ac_cv_func_readdir=no)
  1251. if test "$ac_cv_func_readdir_r" = "yes"; then
  1252. AC_CACHE_CHECK(for type of readdir_r, ac_cv_what_readdir_r,[
  1253. AC_TRY_RUN([
  1254. #define _REENTRANT
  1255. #include <sys/types.h>
  1256. #include <dirent.h>
  1257. #ifndef PATH_MAX
  1258. #define PATH_MAX 1024
  1259. #endif
  1260. main() {
  1261. DIR *dir;
  1262. char entry[sizeof(struct dirent)+PATH_MAX];
  1263. struct dirent *pentry = (struct dirent *) &entry;
  1264. dir = opendir("/");
  1265. if (!dir)
  1266. exit(1);
  1267. if (readdir_r(dir, (struct dirent *) entry, &pentry) == 0)
  1268. exit(0);
  1269. exit(1);
  1270. }
  1271. ],[
  1272. ac_cv_what_readdir_r=POSIX
  1273. ],[
  1274. AC_TRY_CPP([
  1275. #define _REENTRANT
  1276. #include <sys/types.h>
  1277. #include <dirent.h>
  1278. int readdir_r(DIR *, struct dirent *);
  1279. ],[
  1280. ac_cv_what_readdir_r=old-style
  1281. ],[
  1282. ac_cv_what_readdir_r=none
  1283. ])
  1284. ],[
  1285. ac_cv_what_readdir_r=none
  1286. ])
  1287. ])
  1288. case $ac_cv_what_readdir_r in
  1289. POSIX)
  1290. AC_DEFINE(HAVE_POSIX_READDIR_R,1,[whether you have POSIX readdir_r]);;
  1291. old-style)
  1292. AC_DEFINE(HAVE_OLD_READDIR_R,1,[whether you have old-style readdir_r]);;
  1293. esac
  1294. fi
  1295. ])
  1296. dnl
  1297. dnl PHP_TM_GMTOFF
  1298. dnl
  1299. AC_DEFUN([PHP_TM_GMTOFF],[
  1300. AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff,
  1301. [AC_TRY_COMPILE([#include <sys/types.h>
  1302. #include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_gmtoff;],
  1303. ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)])
  1304. if test "$ac_cv_struct_tm_gmtoff" = yes; then
  1305. AC_DEFINE(HAVE_TM_GMTOFF,1,[whether you have tm_gmtoff in struct tm])
  1306. fi
  1307. ])
  1308. dnl
  1309. dnl PHP_STRUCT_FLOCK
  1310. dnl
  1311. AC_DEFUN([PHP_STRUCT_FLOCK],[
  1312. AC_CACHE_CHECK(for struct flock,ac_cv_struct_flock,
  1313. AC_TRY_COMPILE([
  1314. #include <unistd.h>
  1315. #include <fcntl.h>
  1316. ],
  1317. [struct flock x;],
  1318. [
  1319. ac_cv_struct_flock=yes
  1320. ],[
  1321. ac_cv_struct_flock=no
  1322. ])
  1323. )
  1324. if test "$ac_cv_struct_flock" = "yes" ; then
  1325. AC_DEFINE(HAVE_STRUCT_FLOCK, 1,[whether you have struct flock])
  1326. fi
  1327. ])
  1328. dnl
  1329. dnl PHP_SOCKLEN_T
  1330. dnl
  1331. AC_DEFUN([PHP_SOCKLEN_T],[
  1332. AC_CACHE_CHECK(for socklen_t,ac_cv_socklen_t,
  1333. AC_TRY_COMPILE([
  1334. #include <sys/types.h>
  1335. #include <sys/socket.h>
  1336. ],[
  1337. socklen_t x;
  1338. ],[
  1339. ac_cv_socklen_t=yes
  1340. ],[
  1341. ac_cv_socklen_t=no
  1342. ]))
  1343. if test "$ac_cv_socklen_t" = "yes"; then
  1344. AC_DEFINE(HAVE_SOCKLEN_T, 1, [Whether you have socklen_t])
  1345. fi
  1346. ])
  1347. dnl
  1348. dnl PHP_MISSING_FCLOSE_DECL
  1349. dnl
  1350. dnl See if we have broken header files like SunOS has.
  1351. dnl
  1352. AC_DEFUN([PHP_MISSING_FCLOSE_DECL],[
  1353. AC_MSG_CHECKING([for fclose declaration])
  1354. AC_TRY_COMPILE([#include <stdio.h>],[int (*func)() = fclose],[
  1355. AC_DEFINE(MISSING_FCLOSE_DECL,0,[ ])
  1356. AC_MSG_RESULT([ok])
  1357. ],[
  1358. AC_DEFINE(MISSING_FCLOSE_DECL,1,[ ])
  1359. AC_MSG_RESULT([missing])
  1360. ])
  1361. ])
  1362. dnl
  1363. dnl PHP_AC_BROKEN_SPRINTF
  1364. dnl
  1365. dnl Check for broken sprintf(), C99 conformance
  1366. dnl
  1367. AC_DEFUN([PHP_AC_BROKEN_SPRINTF],[
  1368. AC_CACHE_CHECK(whether sprintf is broken, ac_cv_broken_sprintf,[
  1369. AC_TRY_RUN([main() {char buf[20];exit(sprintf(buf,"testing 123")!=11); }],[
  1370. ac_cv_broken_sprintf=no
  1371. ],[
  1372. ac_cv_broken_sprintf=yes
  1373. ],[
  1374. ac_cv_broken_sprintf=no
  1375. ])
  1376. ])
  1377. if test "$ac_cv_broken_sprintf" = "yes"; then
  1378. AC_DEFINE(PHP_BROKEN_SPRINTF, 1, [Whether sprintf is C99 conform])
  1379. else
  1380. AC_DEFINE(PHP_BROKEN_SPRINTF, 0, [Whether sprintf is C99 conform])
  1381. fi
  1382. ])
  1383. dnl
  1384. dnl PHP_AC_BROKEN_SNPRINTF
  1385. dnl
  1386. dnl Check for broken snprintf(), C99 conformance
  1387. dnl
  1388. AC_DEFUN([PHP_AC_BROKEN_SNPRINTF],[
  1389. AC_CACHE_CHECK(whether snprintf is broken, ac_cv_broken_snprintf,[
  1390. AC_TRY_RUN([
  1391. #define NULL (0L)
  1392. main() {
  1393. char buf[20];
  1394. int res = 0;
  1395. res = res || (snprintf(buf, 2, "marcus") != 6);
  1396. res = res || (buf[1] != '\0');
  1397. /* Implementations may consider this as an encoding error */
  1398. snprintf(buf, 0, "boerger");
  1399. /* However, they MUST ignore the pointer */
  1400. res = res || (buf[0] != 'm');
  1401. res = res || (snprintf(NULL, 0, "boerger") != 7);
  1402. res = res || (snprintf(buf, sizeof(buf), "%f", 0.12345678) != 8);
  1403. exit(res);
  1404. }
  1405. ],[
  1406. ac_cv_broken_snprintf=no
  1407. ],[
  1408. ac_cv_broken_snprintf=yes
  1409. ],[
  1410. ac_cv_broken_snprintf=no
  1411. ])
  1412. ])
  1413. if test "$ac_cv_broken_snprintf" = "yes"; then
  1414. AC_DEFINE(PHP_BROKEN_SNPRINTF, 1, [Whether snprintf is C99 conform])
  1415. else
  1416. AC_DEFINE(PHP_BROKEN_SNPRINTF, 0, [Whether snprintf is C99 conform])
  1417. fi
  1418. ])
  1419. dnl
  1420. dnl PHP_SOLARIS_PIC_WEIRDNESS
  1421. dnl
  1422. dnl Solaris requires main code to be position independent in order
  1423. dnl to let shared objects find symbols. Weird. Ugly.
  1424. dnl
  1425. dnl Must be run after all --with-NN options that let the user
  1426. dnl choose dynamic extensions, and after the gcc test.
  1427. dnl
  1428. AC_DEFUN([PHP_SOLARIS_PIC_WEIRDNESS],[
  1429. AC_MSG_CHECKING([whether -fPIC is required])
  1430. if test -n "$EXT_SHARED"; then
  1431. os=`uname -sr 2>/dev/null`
  1432. case $os in
  1433. "SunOS 5.6"|"SunOS 5.7"[)]
  1434. case $CC in
  1435. gcc*|egcs*)
  1436. CFLAGS="$CFLAGS -fPIC";;
  1437. *[)]
  1438. CFLAGS="$CFLAGS -fpic";;
  1439. esac
  1440. AC_MSG_RESULT([yes]);;
  1441. *[)]
  1442. AC_MSG_RESULT([no]);;
  1443. esac
  1444. else
  1445. AC_MSG_RESULT([no])
  1446. fi
  1447. ])
  1448. dnl
  1449. dnl PHP_SYS_LFS
  1450. dnl
  1451. dnl The problem is that the default compilation flags in Solaris 2.6 won't
  1452. dnl let programs access large files; you need to tell the compiler that
  1453. dnl you actually want your programs to work on large files. For more
  1454. dnl details about this brain damage please see:
  1455. dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html
  1456. dnl
  1457. dnl Written by Paul Eggert <eggert@twinsun.com>.
  1458. dnl
  1459. AC_DEFUN([PHP_SYS_LFS],
  1460. [dnl
  1461. # If available, prefer support for large files unless the user specified
  1462. # one of the CPPFLAGS, LDFLAGS, or LIBS variables.
  1463. AC_MSG_CHECKING([whether large file support needs explicit enabling])
  1464. ac_getconfs=''
  1465. ac_result=yes
  1466. ac_set=''
  1467. ac_shellvars='CPPFLAGS LDFLAGS LIBS'
  1468. for ac_shellvar in $ac_shellvars; do
  1469. case $ac_shellvar in
  1470. CPPFLAGS[)] ac_lfsvar=LFS_CFLAGS ;;
  1471. *[)] ac_lfsvar=LFS_$ac_shellvar ;;
  1472. esac
  1473. eval test '"${'$ac_shellvar'+set}"' = set && ac_set=$ac_shellvar
  1474. (getconf $ac_lfsvar) >/dev/null 2>&1 || { ac_result=no; break; }
  1475. ac_getconf=`getconf $ac_lfsvar`
  1476. ac_getconfs=$ac_getconfs$ac_getconf
  1477. eval ac_test_$ac_shellvar=\$ac_getconf
  1478. done
  1479. case "$ac_result$ac_getconfs" in
  1480. yes[)] ac_result=no ;;
  1481. esac
  1482. case "$ac_result$ac_set" in
  1483. yes?*[)] ac_result="yes, but $ac_set is already set, so use its settings"
  1484. esac
  1485. AC_MSG_RESULT([$ac_result])
  1486. case $ac_result in
  1487. yes[)]
  1488. for ac_shellvar in $ac_shellvars; do
  1489. eval $ac_shellvar=\$ac_test_$ac_shellvar
  1490. done ;;
  1491. esac
  1492. ])
  1493. dnl
  1494. dnl PHP_SOCKADDR_CHECKS
  1495. dnl
  1496. AC_DEFUN([PHP_SOCKADDR_CHECKS], [
  1497. dnl Check for struct sockaddr_storage exists
  1498. AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_sockaddr_storage,
  1499. [AC_TRY_COMPILE([#include <sys/types.h>
  1500. #include <sys/socket.h>],
  1501. [struct sockaddr_storage s; s],
  1502. [ac_cv_sockaddr_storage=yes], [ac_cv_sockaddr_storage=no])
  1503. ])
  1504. if test "$ac_cv_sockaddr_storage" = "yes"; then
  1505. AC_DEFINE(HAVE_SOCKADDR_STORAGE, 1, [Whether you have struct sockaddr_storage])
  1506. fi
  1507. dnl Check if field sa_len exists in struct sockaddr
  1508. AC_CACHE_CHECK([for field sa_len in struct sockaddr],ac_cv_sockaddr_sa_len,[
  1509. AC_TRY_COMPILE([#include <sys/types.h>
  1510. #include <sys/socket.h>],
  1511. [static struct sockaddr sa; int n = (int) sa.sa_len; return n;],
  1512. [ac_cv_sockaddr_sa_len=yes], [ac_cv_sockaddr_sa_len=no])
  1513. ])
  1514. if test "$ac_cv_sockaddr_sa_len" = "yes"; then
  1515. AC_DEFINE(HAVE_SOCKADDR_SA_LEN, 1, [Whether struct sockaddr has field sa_len])
  1516. fi
  1517. ])
  1518. dnl
  1519. dnl PHP_DECLARED_TIMEZONE
  1520. dnl
  1521. AC_DEFUN([PHP_DECLARED_TIMEZONE],[
  1522. AC_CACHE_CHECK(for declared timezone, ac_cv_declared_timezone,[
  1523. AC_TRY_COMPILE([
  1524. #include <sys/types.h>
  1525. #include <time.h>
  1526. #ifdef HAVE_SYS_TIME_H
  1527. #include <sys/time.h>
  1528. #endif
  1529. ],[
  1530. time_t foo = (time_t) timezone;
  1531. ],[
  1532. ac_cv_declared_timezone=yes
  1533. ],[
  1534. ac_cv_declared_timezone=no
  1535. ])])
  1536. if test "$ac_cv_declared_timezone" = "yes"; then
  1537. AC_DEFINE(HAVE_DECLARED_TIMEZONE, 1, [Whether system headers declare timezone])
  1538. fi
  1539. ])
  1540. dnl
  1541. dnl PHP_EBCDIC
  1542. dnl
  1543. AC_DEFUN([PHP_EBCDIC], [
  1544. AC_CACHE_CHECK([whether system uses EBCDIC],ac_cv_ebcdic,[
  1545. AC_TRY_RUN( [
  1546. int main(void) {
  1547. return (unsigned char)'A' != (unsigned char)0xC1;
  1548. }
  1549. ],[
  1550. ac_cv_ebcdic=yes
  1551. ],[
  1552. ac_cv_ebcdic=no
  1553. ],[
  1554. ac_cv_ebcdic=no
  1555. ])])
  1556. if test "$ac_cv_ebcdic" = "yes"; then
  1557. AC_DEFINE(CHARSET_EBCDIC,1, [Define if system uses EBCDIC])
  1558. fi
  1559. ])
  1560. dnl
  1561. dnl PHP_BROKEN_GETCWD
  1562. dnl
  1563. dnl Some systems, notably Solaris, cause getcwd() or realpath to fail if a
  1564. dnl component of the path has execute but not read permissions
  1565. dnl
  1566. AC_DEFUN([PHP_BROKEN_GETCWD],[
  1567. AC_MSG_CHECKING([for broken getcwd])
  1568. os=`uname -sr 2>/dev/null`
  1569. case $os in
  1570. SunOS*[)]
  1571. AC_DEFINE(HAVE_BROKEN_GETCWD,1, [Define if system has broken getcwd])
  1572. AC_MSG_RESULT([yes]);;
  1573. *[)]
  1574. AC_MSG_RESULT([no]);;
  1575. esac
  1576. ])
  1577. dnl
  1578. dnl PHP_BROKEN_GLIBC_FOPEN_APPEND
  1579. dnl
  1580. AC_DEFUN([PHP_BROKEN_GLIBC_FOPEN_APPEND], [
  1581. AC_MSG_CHECKING([for broken libc stdio])
  1582. AC_CACHE_VAL(_cv_have_broken_glibc_fopen_append,[
  1583. AC_TRY_RUN([
  1584. #include <stdio.h>
  1585. int main(int argc, char *argv[])
  1586. {
  1587. FILE *fp;
  1588. long position;
  1589. char *filename = tmpnam(NULL);
  1590. fp = fopen(filename, "w");
  1591. if (fp == NULL) {
  1592. perror("fopen");
  1593. exit(2);
  1594. }
  1595. fputs("foobar", fp);
  1596. fclose(fp);
  1597. fp = fopen(filename, "a+");
  1598. position = ftell(fp);
  1599. fclose(fp);
  1600. unlink(filename);
  1601. if (position == 0)
  1602. return 1;
  1603. return 0;
  1604. }
  1605. ],
  1606. [_cv_have_broken_glibc_fopen_append=no],
  1607. [_cv_have_broken_glibc_fopen_append=yes ],
  1608. AC_TRY_COMPILE([
  1609. #include <features.h>
  1610. ],[
  1611. #if !__GLIBC_PREREQ(2,2)
  1612. choke me
  1613. #endif
  1614. ],
  1615. [_cv_have_broken_glibc_fopen_append=yes],
  1616. [_cv_have_broken_glibc_fopen_append=no ])
  1617. )])
  1618. if test "$_cv_have_broken_glibc_fopen_append" = "yes"; then
  1619. AC_MSG_RESULT(yes)
  1620. AC_DEFINE(HAVE_BROKEN_GLIBC_FOPEN_APPEND,1, [Define if your glibc borks on fopen with mode a+])
  1621. else
  1622. AC_MSG_RESULT(no)
  1623. fi
  1624. ])
  1625. dnl
  1626. dnl PHP_FOPENCOOKIE
  1627. dnl
  1628. AC_DEFUN([PHP_FOPENCOOKIE], [
  1629. AC_CHECK_FUNC(fopencookie, [have_glibc_fopencookie=yes])
  1630. if test "$have_glibc_fopencookie" = "yes"; then
  1631. dnl this comes in two flavors:
  1632. dnl newer glibcs (since 2.1.2 ? )
  1633. dnl have a type called cookie_io_functions_t
  1634. AC_TRY_COMPILE([
  1635. #define _GNU_SOURCE
  1636. #include <stdio.h>
  1637. ], [cookie_io_functions_t cookie;], [have_cookie_io_functions_t=yes], [])
  1638. if test "$have_cookie_io_functions_t" = "yes"; then
  1639. cookie_io_functions_t=cookie_io_functions_t
  1640. have_fopen_cookie=yes
  1641. dnl even newer glibcs have a different seeker definition...
  1642. AC_TRY_RUN([
  1643. #define _GNU_SOURCE
  1644. #include <stdio.h>
  1645. struct cookiedata {
  1646. __off64_t pos;
  1647. };
  1648. __ssize_t reader(void *cookie, char *buffer, size_t size)
  1649. { return size; }
  1650. __ssize_t writer(void *cookie, const char *buffer, size_t size)
  1651. { return size; }
  1652. int closer(void *cookie)
  1653. { return 0; }
  1654. int seeker(void *cookie, __off64_t *position, int whence)
  1655. { ((struct cookiedata*)cookie)->pos = *position; return 0; }
  1656. cookie_io_functions_t funcs = {reader, writer, seeker, closer};
  1657. main() {
  1658. struct cookiedata g = { 0 };
  1659. FILE *fp = fopencookie(&g, "r", funcs);
  1660. if (fp && fseek(fp, 8192, SEEK_SET) == 0 && g.pos == 8192)
  1661. exit(0);
  1662. exit(1);
  1663. }
  1664. ], [
  1665. cookie_io_functions_use_off64_t=yes
  1666. ], [
  1667. cookie_io_functions_use_off64_t=no
  1668. ], [
  1669. cookie_io_functions_use_off64_t=no
  1670. ])
  1671. else
  1672. dnl older glibc versions (up to 2.1.2 ?)
  1673. dnl call it _IO_cookie_io_functions_t
  1674. AC_TRY_COMPILE([
  1675. #define _GNU_SOURCE
  1676. #include <stdio.h>
  1677. ], [ _IO_cookie_io_functions_t cookie; ], [have_IO_cookie_io_functions_t=yes], [])
  1678. if test "$have_cookie_io_functions_t" = "yes" ; then
  1679. cookie_io_functions_t=_IO_cookie_io_functions_t
  1680. have_fopen_cookie=yes
  1681. fi
  1682. fi
  1683. if test "$have_fopen_cookie" = "yes" ; then
  1684. AC_DEFINE(HAVE_FOPENCOOKIE, 1, [ ])
  1685. AC_DEFINE_UNQUOTED(COOKIE_IO_FUNCTIONS_T, $cookie_io_functions_t, [ ])
  1686. if test "$cookie_io_functions_use_off64_t" = "yes" ; then
  1687. AC_DEFINE(COOKIE_SEEKER_USES_OFF64_T, 1, [ ])
  1688. fi
  1689. fi
  1690. fi
  1691. ])
  1692. dnl -------------------------------------------------------------------------
  1693. dnl Library/function existence and build sanity checks
  1694. dnl -------------------------------------------------------------------------
  1695. dnl
  1696. dnl PHP_CHECK_LIBRARY(library, function [, action-found [, action-not-found [, extra-libs]]])
  1697. dnl
  1698. dnl Wrapper for AC_CHECK_LIB
  1699. dnl
  1700. AC_DEFUN([PHP_CHECK_LIBRARY], [
  1701. save_old_LDFLAGS=$LDFLAGS
  1702. ac_stuff="$5"
  1703. save_ext_shared=$ext_shared
  1704. ext_shared=yes
  1705. PHP_EVAL_LIBLINE([$]ac_stuff, LDFLAGS)
  1706. AC_CHECK_LIB([$1],[$2],[
  1707. LDFLAGS=$save_old_LDFLAGS
  1708. ext_shared=$save_ext_shared
  1709. $3
  1710. ],[
  1711. LDFLAGS=$save_old_LDFLAGS
  1712. ext_shared=$save_ext_shared
  1713. unset ac_cv_lib_$1[]_$2
  1714. $4
  1715. ])dnl
  1716. ])
  1717. dnl
  1718. dnl PHP_CHECK_FRAMEWORK(framework, function [, action-found [, action-not-found ]])
  1719. dnl
  1720. dnl El cheapo wrapper for AC_CHECK_LIB
  1721. dnl
  1722. AC_DEFUN([PHP_CHECK_FRAMEWORK], [
  1723. save_old_LDFLAGS=$LDFLAGS
  1724. LDFLAGS="-framework $1 $LDFLAGS"
  1725. dnl supplying "c" to AC_CHECK_LIB is technically cheating, but
  1726. dnl rewriting AC_CHECK_LIB is overkill and this only affects
  1727. dnl the "checking.." output anyway.
  1728. AC_CHECK_LIB(c,[$2],[
  1729. LDFLAGS=$save_old_LDFLAGS
  1730. $3
  1731. ],[
  1732. LDFLAGS=$save_old_LDFLAGS
  1733. $4
  1734. ])
  1735. ])
  1736. dnl
  1737. dnl PHP_CHECK_FUNC_LIB(func, libs)
  1738. dnl
  1739. dnl This macro checks whether 'func' or '__func' exists
  1740. dnl in the specified library.
  1741. dnl Defines HAVE_func and HAVE_library if found and adds the library to LIBS.
  1742. dnl This should be called in the ACTION-IF-NOT-FOUND part of PHP_CHECK_FUNC
  1743. dnl
  1744. dnl
  1745. dnl autoconf undefines the builtin "shift" :-(
  1746. dnl If possible, we use the builtin shift anyway, otherwise we use
  1747. dnl the ubercool definition I have tested so far with FreeBSD/GNU m4
  1748. ifdef([builtin],[builtin(define, phpshift, [builtin(shift, $@)])],[
  1749. define([phpshift],[ifelse(index([$@],[,]),-1,,[substr([$@],incr(index([$@],[,])))])])
  1750. ])
  1751. dnl
  1752. AC_DEFUN([PHP_CHECK_FUNC_LIB],[
  1753. ifelse($2,,:,[
  1754. unset ac_cv_lib_$2[]_$1
  1755. unset ac_cv_lib_$2[]___$1
  1756. unset found
  1757. AC_CHECK_LIB($2, $1, [found=yes], [
  1758. AC_CHECK_LIB($2, __$1, [found=yes], [found=no])
  1759. ])
  1760. if test "$found" = "yes"; then
  1761. ac_libs=$LIBS
  1762. LIBS="$LIBS -l$2"
  1763. AC_TRY_RUN([main() { return (0); }],[found=yes],[found=no],[found=no])
  1764. LIBS=$ac_libs
  1765. fi
  1766. if test "$found" = "yes"; then
  1767. PHP_ADD_LIBRARY($2)
  1768. PHP_DEF_HAVE($1)
  1769. PHP_DEF_HAVE(lib$2)
  1770. ac_cv_func_$1=yes
  1771. else
  1772. PHP_CHECK_FUNC_LIB($1,phpshift(phpshift($@)))
  1773. fi
  1774. ])
  1775. ])
  1776. dnl
  1777. dnl PHP_CHECK_FUNC(func, ...)
  1778. dnl
  1779. dnl This macro checks whether 'func' or '__func' exists
  1780. dnl in the default libraries and as a fall back in the specified library.
  1781. dnl Defines HAVE_func and HAVE_library if found and adds the library to LIBS.
  1782. dnl
  1783. AC_DEFUN([PHP_CHECK_FUNC],[
  1784. unset ac_cv_func_$1
  1785. unset ac_cv_func___$1
  1786. unset found
  1787. AC_CHECK_FUNC($1, [found=yes],[ AC_CHECK_FUNC(__$1,[found=yes],[found=no]) ])
  1788. case $found in
  1789. yes[)]
  1790. PHP_DEF_HAVE($1)
  1791. ac_cv_func_$1=yes
  1792. ;;
  1793. ifelse($#,1,,[
  1794. *[)] PHP_CHECK_FUNC_LIB($@) ;;
  1795. ])
  1796. esac
  1797. ])
  1798. dnl
  1799. dnl PHP_TEST_BUILD(function, action-if-ok, action-if-not-ok [, extra-libs [, extra-source]])
  1800. dnl
  1801. dnl This macro checks whether build works and given function exists.
  1802. dnl
  1803. AC_DEFUN([PHP_TEST_BUILD], [
  1804. old_LIBS=$LIBS
  1805. LIBS="$4 $LIBS"
  1806. AC_TRY_RUN([
  1807. $5
  1808. char $1();
  1809. int main() {
  1810. $1();
  1811. return 0;
  1812. }
  1813. ], [
  1814. LIBS=$old_LIBS
  1815. $2
  1816. ],[
  1817. LIBS=$old_LIBS
  1818. $3
  1819. ],[
  1820. LIBS=$old_LIBS
  1821. ])
  1822. ])
  1823. dnl -------------------------------------------------------------------------
  1824. dnl Platform characteristics checks
  1825. dnl -------------------------------------------------------------------------
  1826. dnl
  1827. dnl PHP_SHLIB_SUFFIX_NAMES
  1828. dnl
  1829. dnl Determines link library suffix SHLIB_SUFFIX_NAME
  1830. dnl which can be: .so, .sl or .dylib
  1831. dnl
  1832. dnl Determines shared library suffix SHLIB_DL_SUFFIX_NAME
  1833. dnl suffix can be: .so or .sl
  1834. dnl
  1835. AC_DEFUN([PHP_SHLIB_SUFFIX_NAMES],[
  1836. AC_REQUIRE([PHP_CANONICAL_HOST_TARGET])dnl
  1837. PHP_SUBST_OLD(SHLIB_SUFFIX_NAME)
  1838. PHP_SUBST_OLD(SHLIB_DL_SUFFIX_NAME)
  1839. SHLIB_SUFFIX_NAME=so
  1840. SHLIB_DL_SUFFIX_NAME=$SHLIB_SUFFIX_NAME
  1841. case $host_alias in
  1842. *hpux*[)]
  1843. SHLIB_SUFFIX_NAME=sl
  1844. SHLIB_DL_SUFFIX_NAME=sl
  1845. ;;
  1846. *darwin*[)]
  1847. SHLIB_SUFFIX_NAME=dylib
  1848. SHLIB_DL_SUFFIX_NAME=so
  1849. ;;
  1850. esac
  1851. ])
  1852. dnl
  1853. dnl PHP_CHECK_64BIT([do if 32], [do if 64])
  1854. dnl
  1855. dnl This macro is used to detect if we're at 64-bit platform or not.
  1856. dnl It could be useful for those external libs, that have different precompiled
  1857. dnl versions in different directories.
  1858. dnl
  1859. AC_DEFUN([PHP_CHECK_64BIT],[
  1860. AC_CHECK_SIZEOF(long int, 4)
  1861. AC_MSG_CHECKING([checking if we're at 64-bit platform])
  1862. if test "$ac_cv_sizeof_long_int" = "4" ; then
  1863. AC_MSG_RESULT([no])
  1864. $1
  1865. else
  1866. AC_MSG_RESULT([yes])
  1867. $2
  1868. fi
  1869. ])
  1870. dnl
  1871. dnl PHP_C_BIGENDIAN
  1872. dnl
  1873. dnl Replacement macro for AC_C_BIGENDIAN
  1874. dnl
  1875. AC_DEFUN([PHP_C_BIGENDIAN],
  1876. [AC_CACHE_CHECK([whether byte ordering is bigendian], ac_cv_c_bigendian_php,
  1877. [
  1878. ac_cv_c_bigendian_php=unknown
  1879. AC_TRY_RUN(
  1880. [
  1881. int main(void)
  1882. {
  1883. short one = 1;
  1884. char *cp = (char *)&one;
  1885. if (*cp == 0) {
  1886. return(0);
  1887. } else {
  1888. return(1);
  1889. }
  1890. }
  1891. ], [ac_cv_c_bigendian_php=yes], [ac_cv_c_bigendian_php=no], [ac_cv_c_bigendian_php=unknown])
  1892. ])
  1893. if test $ac_cv_c_bigendian_php = yes; then
  1894. AC_DEFINE(WORDS_BIGENDIAN, [], [Define if processor uses big-endian word])
  1895. fi
  1896. ])
  1897. dnl -------------------------------------------------------------------------
  1898. dnl Checks for programs: PHP_PROG_<program>
  1899. dnl -------------------------------------------------------------------------
  1900. dnl
  1901. dnl PHP_PROG_SENDMAIL
  1902. dnl
  1903. dnl Search for the sendmail binary
  1904. dnl
  1905. AC_DEFUN([PHP_PROG_SENDMAIL], [
  1906. PHP_ALT_PATH=/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib
  1907. AC_PATH_PROG(PROG_SENDMAIL, sendmail,[], $PATH:$PHP_ALT_PATH)
  1908. PHP_SUBST(PROG_SENDMAIL)
  1909. ])
  1910. dnl
  1911. dnl PHP_PROG_AWK
  1912. dnl
  1913. dnl Some vendors force mawk before gawk; mawk is broken so we don't like that
  1914. dnl
  1915. AC_DEFUN([PHP_PROG_AWK], [
  1916. AC_CHECK_PROGS(AWK, gawk nawk awk mawk, bork, /usr/xpg4/bin/:$PATH)
  1917. case "$AWK" in
  1918. *mawk)
  1919. AC_MSG_WARN([mawk is known to have problems on some systems. You should install GNU awk])
  1920. ;;
  1921. *gawk)
  1922. ;;
  1923. bork)
  1924. AC_MSG_ERROR([Could not find awk; Install GNU awk])
  1925. ;;
  1926. *)
  1927. AC_MSG_CHECKING([if $AWK is broken])
  1928. if ! $AWK 'function foo() {}' >/dev/null 2>&1 ; then
  1929. AC_MSG_RESULT([yes])
  1930. AC_MSG_ERROR([You should install GNU awk])
  1931. else
  1932. AC_MSG_RESULT([no])
  1933. fi
  1934. ;;
  1935. esac
  1936. PHP_SUBST(AWK)
  1937. ])
  1938. dnl
  1939. dnl PHP_PROG_BISON
  1940. dnl
  1941. dnl Search for bison and check it's version
  1942. dnl
  1943. AC_DEFUN([PHP_PROG_BISON], [
  1944. AC_PROG_YACC
  1945. LIBZEND_BISON_CHECK
  1946. PHP_SUBST(YACC)
  1947. ])
  1948. dnl
  1949. dnl PHP_PROG_LEX
  1950. dnl
  1951. dnl Search for (f)lex and check it's version
  1952. dnl
  1953. AC_DEFUN([PHP_PROG_LEX], [
  1954. dnl we only support certain flex versions
  1955. flex_version_list="2.5.4"
  1956. AC_PROG_LEX
  1957. if test "$LEX" = "flex"; then
  1958. dnl AC_DECL_YYTEXT is obsolete since autoconf 2.50 and merged into AC_PROG_LEX
  1959. dnl this is what causes that annoying "PHP_PROG_LEX is expanded from" warning with autoconf 2.50+
  1960. dnl it should be removed once we drop support of autoconf 2.13 (if ever)
  1961. AC_DECL_YYTEXT
  1962. :
  1963. fi
  1964. dnl ## Make flex scanners use const if they can, even if __STDC__ is not
  1965. dnl ## true, for compilers like Sun's that only set __STDC__ true in
  1966. dnl ## "limit-to-ANSI-standard" mode, not in "ANSI-compatible" mode
  1967. AC_C_CONST
  1968. if test "$ac_cv_c_const" = "yes" ; then
  1969. LEX_CFLAGS="-DYY_USE_CONST"
  1970. fi
  1971. if test "$LEX" = "flex"; then
  1972. AC_CACHE_CHECK([for flex version], php_cv_flex_version, [
  1973. flex_version=`$LEX -V -v --version 2>/dev/null | $SED -e 's/^.* //'`
  1974. php_cv_flex_version=invalid
  1975. for flex_check_version in $flex_version_list; do
  1976. if test "$flex_version" = "$flex_check_version"; then
  1977. php_cv_flex_version="$flex_check_version (ok)"
  1978. fi
  1979. done
  1980. ])
  1981. else
  1982. flex_version=none
  1983. fi
  1984. case $php_cv_flex_version in
  1985. ""|invalid[)]
  1986. if test -f "$abs_srcdir/Zend/zend_language_scanner.c" && test -f "$abs_srcdir/Zend/zend_ini_scanner.c"; then
  1987. AC_MSG_WARN([flex versions supported for regeneration of the Zend/PHP parsers: $flex_version_list (found: $flex_version)])
  1988. else
  1989. flex_msg="Supported flex versions are: $flex_version_list"
  1990. if test "$flex_version" = "none"; then
  1991. flex_msg="flex not found. flex is required to generate the Zend/PHP parsers! $flex_msg"
  1992. else
  1993. flex_msg="Found invalid flex version: $flex_version. $flex_msg"
  1994. fi
  1995. AC_MSG_ERROR([$flex_msg])
  1996. fi
  1997. LEX="exit 0;"
  1998. ;;
  1999. esac
  2000. PHP_SUBST(LEX)
  2001. ])
  2002. dnl
  2003. dnl PHP_PROG_RE2C
  2004. dnl
  2005. dnl Search for the re2c binary and check the version
  2006. dnl
  2007. AC_DEFUN([PHP_PROG_RE2C],[
  2008. AC_CHECK_PROG(RE2C, re2c, re2c)
  2009. if test -n "$RE2C"; then
  2010. AC_CACHE_CHECK([for re2c version], php_cv_re2c_version, [
  2011. re2c_vernum=`$RE2C --vernum 2>/dev/null`
  2012. if test -z "$re2c_vernum" || test "$re2c_vernum" -lt "1304"; then
  2013. php_cv_re2c_version=invalid
  2014. else
  2015. php_cv_re2c_version="`$RE2C --version | cut -d ' ' -f 2 2>/dev/null` (ok)"
  2016. fi
  2017. ])
  2018. fi
  2019. case $php_cv_re2c_version in
  2020. ""|invalid[)]
  2021. AC_MSG_WARN([You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.])
  2022. RE2C="exit 0;"
  2023. ;;
  2024. esac
  2025. PHP_SUBST(RE2C)
  2026. ])
  2027. dnl -------------------------------------------------------------------------
  2028. dnl Common setup macros: PHP_SETUP_<what>
  2029. dnl -------------------------------------------------------------------------
  2030. dnl
  2031. dnl PHP_SETUP_ICU([shared-add])
  2032. dnl
  2033. dnl Common setup macro for ICU
  2034. dnl
  2035. AC_DEFUN([PHP_SETUP_ICU],[
  2036. PHP_ARG_WITH(icu-dir,,
  2037. [ --with-icu-dir=DIR Specify where ICU libraries and headers can be found], DEFAULT, no)
  2038. if test "$PHP_ICU_DIR" = "no"; then
  2039. PHP_ICU_DIR=DEFAULT
  2040. fi
  2041. if test "$PHP_ICU_DIR" = "DEFAULT"; then
  2042. dnl Try to find icu-config
  2043. AC_PATH_PROG(ICU_CONFIG, icu-config, no, [$PATH:/usr/local/bin])
  2044. else
  2045. ICU_CONFIG="$PHP_ICU_DIR/bin/icu-config"
  2046. fi
  2047. AC_MSG_CHECKING([for location of ICU headers and libraries])
  2048. dnl Trust icu-config to know better what the install prefix is..
  2049. icu_install_prefix=`$ICU_CONFIG --prefix 2> /dev/null`
  2050. if test "$?" != "0" || test -z "$icu_install_prefix"; then
  2051. AC_MSG_RESULT([not found])
  2052. AC_MSG_ERROR([Unable to detect ICU prefix or $ICU_CONFIG failed. Please verify ICU install prefix and make sure icu-config works.])
  2053. else
  2054. AC_MSG_RESULT([$icu_install_prefix])
  2055. dnl Check ICU version
  2056. AC_MSG_CHECKING([for ICU 4.0 or greater])
  2057. icu_version_full=`$ICU_CONFIG --version`
  2058. ac_IFS=$IFS
  2059. IFS="."
  2060. set $icu_version_full
  2061. IFS=$ac_IFS
  2062. icu_version=`expr [$]1 \* 1000 + [$]2`
  2063. AC_MSG_RESULT([found $icu_version_full])
  2064. if test "$icu_version" -lt "4000"; then
  2065. AC_MSG_ERROR([ICU version 4.0 or later is required])
  2066. fi
  2067. ICU_VERSION=$icu_version
  2068. ICU_INCS=`$ICU_CONFIG --cppflags-searchpath`
  2069. ICU_LIBS=`$ICU_CONFIG --ldflags --ldflags-icuio`
  2070. PHP_EVAL_INCLINE($ICU_INCS)
  2071. PHP_EVAL_LIBLINE($ICU_LIBS, $1)
  2072. fi
  2073. ])
  2074. dnl
  2075. dnl PHP_SETUP_KERBEROS(shared-add [, action-found [, action-not-found]])
  2076. dnl
  2077. dnl Common setup macro for kerberos
  2078. dnl
  2079. AC_DEFUN([PHP_SETUP_KERBEROS],[
  2080. found_kerberos=no
  2081. unset KERBEROS_CFLAGS
  2082. unset KERBEROS_LIBS
  2083. dnl First try to find krb5-config
  2084. if test -z "$KRB5_CONFIG"; then
  2085. AC_PATH_PROG(KRB5_CONFIG, krb5-config, no, [$PATH:/usr/kerberos/bin:/usr/local/bin])
  2086. fi
  2087. dnl If krb5-config is found try using it
  2088. if test "$PHP_KERBEROS" = "yes" && test -x "$KRB5_CONFIG"; then
  2089. KERBEROS_LIBS=`$KRB5_CONFIG --libs gssapi`
  2090. KERBEROS_CFLAGS=`$KRB5_CONFIG --cflags gssapi`
  2091. if test -n "$KERBEROS_LIBS"; then
  2092. found_kerberos=yes
  2093. PHP_EVAL_LIBLINE($KERBEROS_LIBS, $1)
  2094. PHP_EVAL_INCLINE($KERBEROS_CFLAGS)
  2095. fi
  2096. fi
  2097. dnl If still not found use old skool method
  2098. if test "$found_kerberos" = "no"; then
  2099. if test "$PHP_KERBEROS" = "yes"; then
  2100. PHP_KERBEROS="/usr/kerberos /usr/local /usr"
  2101. fi
  2102. for i in $PHP_KERBEROS; do
  2103. if test -f $i/$PHP_LIBDIR/libkrb5.a || test -f $i/$PHP_LIBDIR/libkrb5.$SHLIB_SUFFIX_NAME; then
  2104. PHP_KERBEROS_DIR=$i
  2105. break
  2106. fi
  2107. done
  2108. if test "$PHP_KERBEROS_DIR"; then
  2109. found_kerberos=yes
  2110. PHP_ADD_LIBPATH($PHP_KERBEROS_DIR/$PHP_LIBDIR, $1)
  2111. PHP_ADD_LIBRARY(gssapi_krb5, 1, $1)
  2112. PHP_ADD_LIBRARY(krb5, 1, $1)
  2113. PHP_ADD_LIBRARY(k5crypto, 1, $1)
  2114. PHP_ADD_LIBRARY(com_err, 1, $1)
  2115. PHP_ADD_INCLUDE($PHP_KERBEROS_DIR/include)
  2116. fi
  2117. fi
  2118. if test "$found_kerberos" = "yes"; then
  2119. ifelse([$2],[],:,[$2])
  2120. ifelse([$3],[],,[else $3])
  2121. fi
  2122. ])
  2123. dnl
  2124. dnl PHP_SETUP_OPENSSL(shared-add [, action-found [, action-not-found]])
  2125. dnl
  2126. dnl Common setup macro for openssl
  2127. dnl
  2128. AC_DEFUN([PHP_SETUP_OPENSSL],[
  2129. found_openssl=no
  2130. unset OPENSSL_INCDIR
  2131. unset OPENSSL_LIBDIR
  2132. dnl Empty variable means 'no'
  2133. test -z "$PHP_OPENSSL" && PHP_OPENSSL=no
  2134. test -z "$PHP_IMAP_SSL" && PHP_IMAP_SSL=no
  2135. dnl Fallbacks for different configure options
  2136. if test "$PHP_OPENSSL" != "no"; then
  2137. PHP_OPENSSL_DIR=$PHP_OPENSSL
  2138. elif test "$PHP_IMAP_SSL" != "no"; then
  2139. PHP_OPENSSL_DIR=$PHP_IMAP_SSL
  2140. fi
  2141. dnl First try to find pkg-config
  2142. if test -z "$PKG_CONFIG"; then
  2143. AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
  2144. fi
  2145. dnl If pkg-config is found try using it
  2146. if test "$PHP_OPENSSL_DIR" = "yes" && test -x "$PKG_CONFIG" && $PKG_CONFIG --exists openssl; then
  2147. if $PKG_CONFIG --atleast-version=0.9.6 openssl; then
  2148. found_openssl=yes
  2149. OPENSSL_LIBS=`$PKG_CONFIG --libs openssl`
  2150. OPENSSL_INCS=`$PKG_CONFIG --cflags-only-I openssl`
  2151. OPENSSL_INCDIR=`$PKG_CONFIG --variable=includedir openssl`
  2152. else
  2153. AC_MSG_ERROR([OpenSSL version 0.9.6 or greater required.])
  2154. fi
  2155. if test -n "$OPENSSL_LIBS"; then
  2156. PHP_EVAL_LIBLINE($OPENSSL_LIBS, $1)
  2157. fi
  2158. if test -n "$OPENSSL_INCS"; then
  2159. PHP_EVAL_INCLINE($OPENSSL_INCS)
  2160. fi
  2161. fi
  2162. dnl If pkg-config fails for some reason, revert to the old method
  2163. if test "$found_openssl" = "no"; then
  2164. if test "$PHP_OPENSSL_DIR" = "yes"; then
  2165. PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl"
  2166. fi
  2167. for i in $PHP_OPENSSL_DIR; do
  2168. if test -r $i/include/openssl/evp.h; then
  2169. OPENSSL_INCDIR=$i/include
  2170. fi
  2171. if test -r $i/$PHP_LIBDIR/libssl.a -o -r $i/$PHP_LIBDIR/libssl.$SHLIB_SUFFIX_NAME; then
  2172. OPENSSL_LIBDIR=$i/$PHP_LIBDIR
  2173. fi
  2174. test -n "$OPENSSL_INCDIR" && test -n "$OPENSSL_LIBDIR" && break
  2175. done
  2176. if test -z "$OPENSSL_INCDIR"; then
  2177. AC_MSG_ERROR([Cannot find OpenSSL's <evp.h>])
  2178. fi
  2179. if test -z "$OPENSSL_LIBDIR"; then
  2180. AC_MSG_ERROR([Cannot find OpenSSL's libraries])
  2181. fi
  2182. old_CPPFLAGS=$CPPFLAGS
  2183. CPPFLAGS=-I$OPENSSL_INCDIR
  2184. AC_MSG_CHECKING([for OpenSSL version])
  2185. AC_EGREP_CPP(yes,[
  2186. #include <openssl/opensslv.h>
  2187. #if OPENSSL_VERSION_NUMBER >= 0x0090600fL
  2188. yes
  2189. #endif
  2190. ],[
  2191. AC_MSG_RESULT([>= 0.9.6])
  2192. ],[
  2193. AC_MSG_ERROR([OpenSSL version 0.9.6 or greater required.])
  2194. ])
  2195. CPPFLAGS=$old_CPPFLAGS
  2196. PHP_ADD_INCLUDE($OPENSSL_INCDIR)
  2197. PHP_CHECK_LIBRARY(crypto, CRYPTO_free, [
  2198. PHP_ADD_LIBRARY(crypto,,$1)
  2199. ],[
  2200. AC_MSG_ERROR([libcrypto not found!])
  2201. ],[
  2202. -L$OPENSSL_LIBDIR
  2203. ])
  2204. old_LIBS=$LIBS
  2205. LIBS="$LIBS -lcrypto"
  2206. PHP_CHECK_LIBRARY(ssl, SSL_CTX_set_ssl_version, [
  2207. found_openssl=yes
  2208. ],[
  2209. AC_MSG_ERROR([libssl not found!])
  2210. ],[
  2211. -L$OPENSSL_LIBDIR
  2212. ])
  2213. LIBS=$old_LIBS
  2214. PHP_ADD_LIBRARY(ssl,,$1)
  2215. PHP_ADD_LIBRARY(crypto,,$1)
  2216. PHP_ADD_LIBPATH($OPENSSL_LIBDIR, $1)
  2217. fi
  2218. if test "$found_openssl" = "yes"; then
  2219. dnl For apache 1.3.x static build
  2220. OPENSSL_INCDIR_OPT=-I$OPENSSL_INCDIR
  2221. AC_SUBST(OPENSSL_INCDIR_OPT)
  2222. ifelse([$2],[],:,[$2])
  2223. ifelse([$3],[],,[else $3])
  2224. fi
  2225. ])
  2226. dnl
  2227. dnl PHP_SETUP_ICONV(shared-add [, action-found [, action-not-found]])
  2228. dnl
  2229. dnl Common setup macro for iconv
  2230. dnl
  2231. AC_DEFUN([PHP_SETUP_ICONV], [
  2232. found_iconv=no
  2233. unset ICONV_DIR
  2234. # Create the directories for a VPATH build:
  2235. $php_shtool mkdir -p ext/iconv
  2236. echo > ext/iconv/php_have_bsd_iconv.h
  2237. echo > ext/iconv/php_have_ibm_iconv.h
  2238. echo > ext/iconv/php_have_glibc_iconv.h
  2239. echo > ext/iconv/php_have_libiconv.h
  2240. echo > ext/iconv/php_have_iconv.h
  2241. echo > ext/iconv/php_php_iconv_impl.h
  2242. echo > ext/iconv/php_iconv_aliased_libiconv.h
  2243. echo > ext/iconv/php_php_iconv_h_path.h
  2244. echo > ext/iconv/php_iconv_supports_errno.h
  2245. dnl
  2246. dnl Check libc first if no path is provided in --with-iconv
  2247. dnl
  2248. if test "$PHP_ICONV" = "yes"; then
  2249. dnl Reset LIBS temporarily as it may have already been included
  2250. dnl -liconv in.
  2251. LIBS_save="$LIBS"
  2252. LIBS=
  2253. AC_CHECK_FUNC(iconv, [
  2254. found_iconv=yes
  2255. ],[
  2256. AC_CHECK_FUNC(libiconv,[
  2257. PHP_DEFINE(HAVE_LIBICONV,1,[ext/iconv])
  2258. AC_DEFINE(HAVE_LIBICONV, 1, [ ])
  2259. found_iconv=yes
  2260. ])
  2261. ])
  2262. LIBS="$LIBS_save"
  2263. fi
  2264. dnl
  2265. dnl Check external libs for iconv funcs
  2266. dnl
  2267. if test "$found_iconv" = "no"; then
  2268. for i in $PHP_ICONV /usr/local /usr; do
  2269. if test -r $i/include/giconv.h; then
  2270. AC_DEFINE(HAVE_GICONV_H, 1, [ ])
  2271. ICONV_DIR=$i
  2272. iconv_lib_name=giconv
  2273. break
  2274. elif test -r $i/include/iconv.h; then
  2275. ICONV_DIR=$i
  2276. iconv_lib_name=iconv
  2277. break
  2278. fi
  2279. done
  2280. if test -z "$ICONV_DIR"; then
  2281. AC_MSG_ERROR([Please specify the install prefix of iconv with --with-iconv=<DIR>])
  2282. fi
  2283. if test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.a ||
  2284. test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME
  2285. then
  2286. PHP_CHECK_LIBRARY($iconv_lib_name, libiconv, [
  2287. found_iconv=yes
  2288. PHP_DEFINE(HAVE_LIBICONV,1,[ext/iconv])
  2289. AC_DEFINE(HAVE_LIBICONV,1,[ ])
  2290. PHP_DEFINE([ICONV_ALIASED_LIBICONV],1,[ext/iconv])
  2291. AC_DEFINE([ICONV_ALIASED_LIBICONV],1,[iconv() is aliased to libiconv() in -liconv])
  2292. ], [
  2293. PHP_CHECK_LIBRARY($iconv_lib_name, iconv, [
  2294. found_iconv=yes
  2295. ], [], [
  2296. -L$ICONV_DIR/$PHP_LIBDIR
  2297. ])
  2298. ], [
  2299. -L$ICONV_DIR/$PHP_LIBDIR
  2300. ])
  2301. fi
  2302. fi
  2303. if test "$found_iconv" = "yes"; then
  2304. PHP_DEFINE(HAVE_ICONV,1,[ext/iconv])
  2305. AC_DEFINE(HAVE_ICONV,1,[ ])
  2306. if test -n "$ICONV_DIR"; then
  2307. PHP_ADD_LIBRARY_WITH_PATH($iconv_lib_name, $ICONV_DIR/$PHP_LIBDIR, $1)
  2308. PHP_ADD_INCLUDE($ICONV_DIR/include)
  2309. fi
  2310. $2
  2311. ifelse([$3],[],,[else $3])
  2312. fi
  2313. ])
  2314. dnl
  2315. dnl PHP_SETUP_LIBXML(shared-add [, action-found [, action-not-found]])
  2316. dnl
  2317. dnl Common setup macro for libxml
  2318. dnl
  2319. AC_DEFUN([PHP_SETUP_LIBXML], [
  2320. AC_CACHE_CHECK([for xml2-config path], ac_cv_php_xml2_config_path,
  2321. [
  2322. for i in $PHP_LIBXML_DIR /usr/local /usr; do
  2323. if test -x "$i/bin/xml2-config"; then
  2324. ac_cv_php_xml2_config_path="$i/bin/xml2-config"
  2325. break
  2326. fi
  2327. done
  2328. ])
  2329. if test -x "$ac_cv_php_xml2_config_path"; then
  2330. XML2_CONFIG="$ac_cv_php_xml2_config_path"
  2331. libxml_full_version=`$XML2_CONFIG --version`
  2332. ac_IFS=$IFS
  2333. IFS="."
  2334. set $libxml_full_version
  2335. IFS=$ac_IFS
  2336. LIBXML_VERSION=`expr [$]1 \* 1000000 + [$]2 \* 1000 + [$]3`
  2337. if test "$LIBXML_VERSION" -ge "2006011"; then
  2338. LIBXML_LIBS=`$XML2_CONFIG --libs`
  2339. LIBXML_INCS=`$XML2_CONFIG --cflags`
  2340. PHP_EVAL_LIBLINE($LIBXML_LIBS, $1)
  2341. PHP_EVAL_INCLINE($LIBXML_INCS)
  2342. dnl Check that build works with given libs
  2343. AC_CACHE_CHECK(whether libxml build works, php_cv_libxml_build_works, [
  2344. PHP_TEST_BUILD(xmlInitParser,
  2345. [
  2346. php_cv_libxml_build_works=yes
  2347. ], [
  2348. AC_MSG_RESULT(no)
  2349. AC_MSG_ERROR([build test failed. Please check the config.log for details.])
  2350. ], [
  2351. [$]$1
  2352. ])
  2353. ])
  2354. if test "$php_cv_libxml_build_works" = "yes"; then
  2355. AC_DEFINE(HAVE_LIBXML, 1, [ ])
  2356. fi
  2357. $2
  2358. else
  2359. AC_MSG_ERROR([libxml2 version 2.6.11 or greater required.])
  2360. fi
  2361. ifelse([$3],[],,[else $3])
  2362. fi
  2363. ])
  2364. dnl -------------------------------------------------------------------------
  2365. dnl Misc. macros
  2366. dnl -------------------------------------------------------------------------
  2367. dnl
  2368. dnl PHP_INSTALL_HEADERS(path [, file ...])
  2369. dnl
  2370. dnl PHP header files to be installed
  2371. dnl
  2372. AC_DEFUN([PHP_INSTALL_HEADERS],[
  2373. ifelse([$2],[],[
  2374. for header_file in $1; do
  2375. PHP_RUN_ONCE(INSTALLHEADERS, $header_file, [
  2376. INSTALL_HEADERS="$INSTALL_HEADERS $header_file"
  2377. ])
  2378. done
  2379. ], [
  2380. header_path=$1
  2381. for header_file in $2; do
  2382. hp_hf="$header_path/$header_file"
  2383. PHP_RUN_ONCE(INSTALLHEADERS, $hp_hf, [
  2384. INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
  2385. ])
  2386. done
  2387. ])
  2388. ])
  2389. dnl
  2390. dnl PHP_AP_EXTRACT_VERSION(/path/httpd)
  2391. dnl
  2392. dnl This macro is used to get a comparable
  2393. dnl version for apache1/2.
  2394. dnl
  2395. AC_DEFUN([PHP_AP_EXTRACT_VERSION],[
  2396. ac_output=`$1 -v 2>&1 | grep version | $SED -e 's/Oracle-HTTP-//'`
  2397. ac_IFS=$IFS
  2398. IFS="- /.
  2399. "
  2400. set $ac_output
  2401. IFS=$ac_IFS
  2402. APACHE_VERSION=`expr [$]4 \* 1000000 + [$]5 \* 1000 + [$]6`
  2403. ])
  2404. dnl
  2405. dnl PHP_DEBUG_MACRO(filename)
  2406. dnl
  2407. AC_DEFUN([PHP_DEBUG_MACRO],[
  2408. DEBUG_LOG=$1
  2409. cat >$1 <<X
  2410. CONFIGURE: $CONFIGURE_COMMAND
  2411. CC: $CC
  2412. CFLAGS: $CFLAGS
  2413. CPPFLAGS: $CPPFLAGS
  2414. CXX: $CXX
  2415. CXXFLAGS: $CXXFLAGS
  2416. INCLUDES: $INCLUDES
  2417. LDFLAGS: $LDFLAGS
  2418. LIBS: $LIBS
  2419. DLIBS: $DLIBS
  2420. SAPI: $PHP_SAPI
  2421. PHP_RPATHS: $PHP_RPATHS
  2422. uname -a: `uname -a`
  2423. X
  2424. cat >conftest.$ac_ext <<X
  2425. main()
  2426. {
  2427. exit(0);
  2428. }
  2429. X
  2430. (eval echo \"$ac_link\"; eval $ac_link && ./conftest) >>$1 2>&1
  2431. rm -fr conftest*
  2432. ])
  2433. dnl
  2434. dnl PHP_CONFIG_NICE(filename)
  2435. dnl
  2436. dnl Generates the config.nice file
  2437. dnl
  2438. AC_DEFUN([PHP_CONFIG_NICE],[
  2439. AC_REQUIRE([AC_PROG_EGREP])
  2440. AC_REQUIRE([LT_AC_PROG_SED])
  2441. PHP_SUBST_OLD(EGREP)
  2442. PHP_SUBST_OLD(SED)
  2443. test -f $1 && mv $1 $1.old
  2444. rm -f $1.old
  2445. cat >$1<<EOF
  2446. #! /bin/sh
  2447. #
  2448. # Created by configure
  2449. EOF
  2450. for var in CFLAGS CXXFLAGS CPPFLAGS LDFLAGS EXTRA_LDFLAGS_PROGRAM LIBS CC CXX; do
  2451. eval val=\$$var
  2452. if test -n "$val"; then
  2453. echo "$var='$val' \\" >> $1
  2454. fi
  2455. done
  2456. echo "'[$]0' \\" >> $1
  2457. if test `expr -- [$]0 : "'.*"` = 0; then
  2458. CONFIGURE_COMMAND="$CONFIGURE_COMMAND '[$]0'"
  2459. else
  2460. CONFIGURE_COMMAND="$CONFIGURE_COMMAND [$]0"
  2461. fi
  2462. for arg in $ac_configure_args; do
  2463. if test `expr -- $arg : "'.*"` = 0; then
  2464. if test `expr -- $arg : "-.*"` = 0 && test `expr -- $arg : ".*=.*"` = 0; then
  2465. continue;
  2466. fi
  2467. echo "'[$]arg' \\" >> $1
  2468. CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS '[$]arg'"
  2469. else
  2470. if test `expr -- $arg : "'-.*"` = 0 && test `expr -- $arg : "'.*=.*"` = 0; then
  2471. continue;
  2472. fi
  2473. echo "[$]arg \\" >> $1
  2474. CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS [$]arg"
  2475. fi
  2476. done
  2477. echo '"[$]@"' >> $1
  2478. chmod +x $1
  2479. CONFIGURE_COMMAND="$CONFIGURE_COMMAND $CONFIGURE_OPTIONS"
  2480. PHP_SUBST_OLD(CONFIGURE_COMMAND)
  2481. PHP_SUBST_OLD(CONFIGURE_OPTIONS)
  2482. ])
  2483. dnl
  2484. dnl PHP_CHECK_CONFIGURE_OPTIONS
  2485. dnl
  2486. AC_DEFUN([PHP_CHECK_CONFIGURE_OPTIONS],[
  2487. for arg in $ac_configure_args; do
  2488. case $arg in
  2489. --with-*[)]
  2490. arg_name="`echo [$]arg | $SED -e 's/--with-/with-/g' -e 's/=.*//g'`"
  2491. ;;
  2492. --without-*[)]
  2493. arg_name="`echo [$]arg | $SED -e 's/--without-/with-/g' -e 's/=.*//g'`"
  2494. ;;
  2495. --enable-*[)]
  2496. arg_name="`echo [$]arg | $SED -e 's/--enable-/enable-/g' -e 's/=.*//g'`"
  2497. ;;
  2498. --disable-*[)]
  2499. arg_name="`echo [$]arg | $SED -e 's/--disable-/enable-/g' -e 's/=.*//g'`"
  2500. ;;
  2501. *[)]
  2502. continue
  2503. ;;
  2504. esac
  2505. case $arg_name in
  2506. # Allow --disable-all / --enable-all
  2507. enable-all[)];;
  2508. # Allow certain libtool options
  2509. enable-libtool-lock | with-pic | with-tags | enable-shared | enable-static | enable-fast-install | with-gnu-ld[)];;
  2510. # Allow certain TSRM options
  2511. with-tsrm-pth | with-tsrm-st | with-tsrm-pthreads[)];;
  2512. # Allow certain Zend options
  2513. with-zend-vm | enable-maintainer-zts | enable-inline-optimization[)];;
  2514. # All the rest must be set using the PHP_ARG_* macros
  2515. # PHP_ARG_* macros set php_enable_<arg_name> or php_with_<arg_name>
  2516. *[)]
  2517. # Options that exist before PHP 6
  2518. if test "$PHP_MAJOR_VERSION" -lt "6"; then
  2519. case $arg_name in
  2520. enable-zend-multibyte[)] continue;;
  2521. esac
  2522. fi
  2523. is_arg_set=php_[]`echo [$]arg_name | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ-' 'abcdefghijklmnopqrstuvwxyz_'`
  2524. if eval test "x\$$is_arg_set" = "x"; then
  2525. PHP_UNKNOWN_CONFIGURE_OPTIONS="$PHP_UNKNOWN_CONFIGURE_OPTIONS
  2526. [$]arg"
  2527. fi
  2528. ;;
  2529. esac
  2530. done
  2531. ])
  2532. dnl
  2533. dnl PHP_CHECK_PDO_INCLUDES([found [, not-found]])
  2534. dnl
  2535. AC_DEFUN([PHP_CHECK_PDO_INCLUDES],[
  2536. AC_CACHE_CHECK([for PDO includes], pdo_cv_inc_path, [
  2537. AC_MSG_CHECKING([for PDO includes])
  2538. if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
  2539. pdo_cv_inc_path=$abs_srcdir/ext
  2540. elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
  2541. pdo_cv_inc_path=$abs_srcdir/ext
  2542. elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then
  2543. pdo_cv_inc_path=$prefix/include/php/ext
  2544. fi
  2545. ])
  2546. if test -n "$pdo_cv_inc_path"; then
  2547. ifelse([$1],[],:,[$1])
  2548. else
  2549. ifelse([$2],[],[AC_MSG_ERROR([Cannot find php_pdo_driver.h.])],[$2])
  2550. fi
  2551. ])
  2552. dnl
  2553. dnl PHP_DETECT_ICC
  2554. dnl Detect Intel C++ Compiler and unset $GCC if ICC found
  2555. AC_DEFUN([PHP_DETECT_ICC],
  2556. [
  2557. ICC="no"
  2558. AC_MSG_CHECKING([for icc])
  2559. AC_EGREP_CPP([^__INTEL_COMPILER], [__INTEL_COMPILER],
  2560. ICC="no"
  2561. AC_MSG_RESULT([no]),
  2562. ICC="yes"
  2563. GCC="no"
  2564. AC_MSG_RESULT([yes])
  2565. )
  2566. ])
  2567. dnl PHP_DETECT_SUNCC
  2568. dnl Detect if the systems default compiler is suncc.
  2569. dnl We also set some useful CFLAGS if the user didn't set any
  2570. AC_DEFUN([PHP_DETECT_SUNCC],[
  2571. SUNCC="no"
  2572. AC_MSG_CHECKING([for suncc])
  2573. AC_EGREP_CPP([^__SUNPRO_C], [__SUNPRO_C],
  2574. SUNCC="no"
  2575. AC_MSG_RESULT([no]),
  2576. SUNCC="yes"
  2577. GCC="no"
  2578. test -n "$auto_cflags" && CFLAGS="-O -xs -xstrconst -zlazyload"
  2579. GCC=""
  2580. AC_MSG_RESULT([yes])
  2581. )
  2582. ])
  2583. dnl
  2584. dnl PHP_CRYPT_R_STYLE
  2585. dnl detect the style of crypt_r() is any is available
  2586. dnl see APR_CHECK_CRYPT_R_STYLE() for original version
  2587. dnl
  2588. AC_DEFUN([PHP_CRYPT_R_STYLE],
  2589. [
  2590. AC_CACHE_CHECK([which data struct is used by crypt_r], php_cv_crypt_r_style,[
  2591. php_cv_crypt_r_style=none
  2592. AC_TRY_COMPILE([
  2593. #define _REENTRANT 1
  2594. #include <crypt.h>
  2595. ],[
  2596. CRYPTD buffer;
  2597. crypt_r("passwd", "hash", &buffer);
  2598. ],
  2599. php_cv_crypt_r_style=cryptd)
  2600. if test "$php_cv_crypt_r_style" = "none"; then
  2601. AC_TRY_COMPILE([
  2602. #define _REENTRANT 1
  2603. #include <crypt.h>
  2604. ],[
  2605. struct crypt_data buffer;
  2606. crypt_r("passwd", "hash", &buffer);
  2607. ],
  2608. php_cv_crypt_r_style=struct_crypt_data)
  2609. fi
  2610. if test "$php_cv_crypt_r_style" = "none"; then
  2611. AC_TRY_COMPILE([
  2612. #define _REENTRANT 1
  2613. #define _GNU_SOURCE
  2614. #include <crypt.h>
  2615. ],[
  2616. struct crypt_data buffer;
  2617. crypt_r("passwd", "hash", &buffer);
  2618. ],
  2619. php_cv_crypt_r_style=struct_crypt_data_gnu_source)
  2620. fi
  2621. ])
  2622. if test "$php_cv_crypt_r_style" = "cryptd"; then
  2623. AC_DEFINE(CRYPT_R_CRYPTD, 1, [Define if crypt_r has uses CRYPTD])
  2624. fi
  2625. if test "$php_cv_crypt_r_style" = "struct_crypt_data" -o "$php_cv_crypt_r_style" = "struct_crypt_data_gnu_source"; then
  2626. AC_DEFINE(CRYPT_R_STRUCT_CRYPT_DATA, 1, [Define if crypt_r uses struct crypt_data])
  2627. fi
  2628. if test "$php_cv_crypt_r_style" = "struct_crypt_data_gnu_source"; then
  2629. AC_DEFINE(CRYPT_R_GNU_SOURCE, 1, [Define if struct crypt_data requires _GNU_SOURCE])
  2630. fi
  2631. if test "$php_cv_crypt_r_style" = "none"; then
  2632. AC_MSG_ERROR([Unable to detect data struct used by crypt_r])
  2633. fi
  2634. ])
  2635. dnl
  2636. dnl PHP_TEST_WRITE_STDOUT
  2637. dnl
  2638. AC_DEFUN([PHP_TEST_WRITE_STDOUT],[
  2639. AC_CACHE_CHECK(whether writing to stdout works,ac_cv_write_stdout,[
  2640. AC_TRY_RUN([
  2641. #ifdef HAVE_UNISTD_H
  2642. #include <unistd.h>
  2643. #endif
  2644. #define TEXT "This is the test message -- "
  2645. main()
  2646. {
  2647. int n;
  2648. n = write(1, TEXT, sizeof(TEXT)-1);
  2649. return (!(n == sizeof(TEXT)-1));
  2650. }
  2651. ],[
  2652. ac_cv_write_stdout=yes
  2653. ],[
  2654. ac_cv_write_stdout=no
  2655. ],[
  2656. ac_cv_write_stdout=no
  2657. ])
  2658. ])
  2659. if test "$ac_cv_write_stdout" = "yes"; then
  2660. AC_DEFINE(PHP_WRITE_STDOUT, 1, [whether write(2) works])
  2661. fi
  2662. ])
  2663. dnl
  2664. dnl PHP_INIT_DTRACE(providerdesc, header-file, sources [, module])
  2665. dnl
  2666. AC_DEFUN([PHP_INIT_DTRACE],[
  2667. dnl Set paths properly when called from extension
  2668. case "$4" in
  2669. ""[)] ac_srcdir="$abs_srcdir/"; unset ac_bdir;;
  2670. /*[)] ac_srcdir=`echo "$4"|cut -c 2-`"/"; ac_bdir=$ac_srcdir;;
  2671. *[)] ac_srcdir="$abs_srcdir/$1/"; ac_bdir="$4/";;
  2672. esac
  2673. dnl providerdesc
  2674. ac_provsrc=$1
  2675. old_IFS=[$]IFS
  2676. IFS=.
  2677. set $ac_provsrc
  2678. ac_provobj=[$]1
  2679. IFS=$old_IFS
  2680. dnl header-file
  2681. ac_hdrobj=$2
  2682. dnl Add providerdesc.o or .lo into global objects when needed
  2683. case $host_alias in
  2684. *freebsd*)
  2685. PHP_GLOBAL_OBJS="[$]PHP_GLOBAL_OBJS [$]ac_bdir[$]ac_provsrc.o"
  2686. PHP_LDFLAGS="$PHP_LDFLAGS -lelf"
  2687. ;;
  2688. *solaris*)
  2689. PHP_GLOBAL_OBJS="[$]PHP_GLOBAL_OBJS [$]ac_bdir[$]ac_provsrc.lo"
  2690. ;;
  2691. *linux*)
  2692. PHP_GLOBAL_OBJS="[$]PHP_GLOBAL_OBJS [$]ac_bdir[$]ac_provsrc.lo"
  2693. ;;
  2694. esac
  2695. dnl DTrace objects
  2696. old_IFS=[$]IFS
  2697. for ac_src in $3; do
  2698. IFS=.
  2699. set $ac_src
  2700. ac_obj=[$]1
  2701. IFS=$old_IFS
  2702. PHP_DTRACE_OBJS="[$]PHP_DTRACE_OBJS [$]ac_bdir[$]ac_obj.lo"
  2703. done;
  2704. case [$]php_sapi_module in
  2705. shared[)]
  2706. for ac_lo in $PHP_DTRACE_OBJS; do
  2707. dtrace_objs="[$]dtrace_objs `echo $ac_lo | $SED -e 's,\.lo$,.o,' -e 's#\(.*\)\/#\1\/.libs\/#'`"
  2708. done;
  2709. ;;
  2710. *[)]
  2711. dtrace_objs='$(PHP_DTRACE_OBJS:.lo=.o)'
  2712. ;;
  2713. esac
  2714. dnl Generate Makefile.objects entries
  2715. dnl The empty $ac_provsrc command stops an implicit circular dependency
  2716. dnl in GNU Make which causes the .d file to be overwritten (Bug 61268)
  2717. cat>>Makefile.objects<<EOF
  2718. $abs_srcdir/$ac_provsrc:;
  2719. $ac_bdir[$]ac_hdrobj: $abs_srcdir/$ac_provsrc
  2720. CFLAGS="\$(CFLAGS_CLEAN)" dtrace -h -C -s $ac_srcdir[$]ac_provsrc -o \$[]@.bak && \$(SED) -e 's,PHP_,DTRACE_,g' \$[]@.bak > \$[]@
  2721. \$(PHP_DTRACE_OBJS): $ac_bdir[$]ac_hdrobj
  2722. EOF
  2723. case $host_alias in
  2724. *solaris*|*linux*)
  2725. dtrace_prov_name="`echo $ac_provsrc | $SED -e 's#\(.*\)\/##'`.o"
  2726. dtrace_lib_dir="`echo $ac_bdir[$]ac_provsrc | $SED -e 's#\(.*\)/[^/]*#\1#'`/.libs"
  2727. dtrace_d_obj="`echo $ac_bdir[$]ac_provsrc | $SED -e 's#\(.*\)/\([^/]*\)#\1/.libs/\2#'`.o"
  2728. dtrace_nolib_objs='$(PHP_DTRACE_OBJS:.lo=.o)'
  2729. for ac_lo in $PHP_DTRACE_OBJS; do
  2730. dtrace_lib_objs="[$]dtrace_lib_objs `echo $ac_lo | $SED -e 's,\.lo$,.o,' -e 's#\(.*\)\/#\1\/.libs\/#'`"
  2731. done;
  2732. dnl Always attempt to create both PIC and non-PIC DTrace objects (Bug 63692)
  2733. cat>>Makefile.objects<<EOF
  2734. $ac_bdir[$]ac_provsrc.lo: \$(PHP_DTRACE_OBJS)
  2735. echo "[#] Generated by Makefile for libtool" > \$[]@
  2736. @test -d "$dtrace_lib_dir" || mkdir $dtrace_lib_dir
  2737. if CFLAGS="\$(CFLAGS_CLEAN)" dtrace -G -o $dtrace_d_obj -s $abs_srcdir/$ac_provsrc $dtrace_lib_objs 2> /dev/null && test -f "$dtrace_d_obj"; then [\\]
  2738. echo "pic_object=['].libs/$dtrace_prov_name[']" >> \$[]@ [;\\]
  2739. else [\\]
  2740. echo "pic_object='none'" >> \$[]@ [;\\]
  2741. fi
  2742. if CFLAGS="\$(CFLAGS_CLEAN)" dtrace -G -o $ac_bdir[$]ac_provsrc.o -s $abs_srcdir/$ac_provsrc $dtrace_nolib_objs 2> /dev/null && test -f "$ac_bdir[$]ac_provsrc.o"; then [\\]
  2743. echo "non_pic_object=[']$dtrace_prov_name[']" >> \$[]@ [;\\]
  2744. else [\\]
  2745. echo "non_pic_object='none'" >> \$[]@ [;\\]
  2746. fi
  2747. EOF
  2748. ;;
  2749. *)
  2750. cat>>Makefile.objects<<EOF
  2751. $ac_bdir[$]ac_provsrc.o: \$(PHP_DTRACE_OBJS)
  2752. CFLAGS="\$(CFLAGS_CLEAN)" dtrace -G -o \$[]@ -s $abs_srcdir/$ac_provsrc $dtrace_objs
  2753. EOF
  2754. ;;
  2755. esac
  2756. ])
  2757. dnl
  2758. dnl PHP_CHECK_STDINT_TYPES
  2759. dnl
  2760. AC_DEFUN([PHP_CHECK_STDINT_TYPES], [
  2761. AC_CHECK_SIZEOF([short], 2)
  2762. AC_CHECK_SIZEOF([int], 4)
  2763. AC_CHECK_SIZEOF([long], 4)
  2764. AC_CHECK_SIZEOF([long long], 8)
  2765. AC_CHECK_TYPES([int8, int16, int32, int64, int8_t, int16_t, int32_t, int64_t, uint8, uint16, uint32, uint64, uint8_t, uint16_t, uint32_t, uint64_t, u_int8_t, u_int16_t, u_int32_t, u_int64_t], [], [], [
  2766. #if HAVE_STDINT_H
  2767. # include <stdint.h>
  2768. #endif
  2769. #if HAVE_SYS_TYPES_H
  2770. # include <sys/types.h>
  2771. #endif
  2772. ])
  2773. AC_DEFINE([PHP_HAVE_STDINT_TYPES], [1], [Checked for stdint types])
  2774. ])
  2775. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
  2776. ## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007,
  2777. ## 2008 Free Software Foundation, Inc.
  2778. ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  2779. ##
  2780. ## This file is free software; the Free Software Foundation gives
  2781. ## unlimited permission to copy and/or distribute it, with or without
  2782. ## modifications, as long as this notice is preserved.
  2783. # serial 52 AC_PROG_LIBTOOL
  2784. ifdef([AC_ACVERSION],[
  2785. # autoconf 2.13 compatibility
  2786. # Set PATH_SEPARATOR variable
  2787. # ---------------------------------
  2788. # Find the correct PATH separator. Usually this is :', but
  2789. # DJGPP uses ;' like DOS.
  2790. if test "X${PATH_SEPARATOR+set}" != Xset; then
  2791. UNAME=${UNAME-`uname 2>/dev/null`}
  2792. case X$UNAME in
  2793. *-DOS) lt_cv_sys_path_separator=';' ;;
  2794. *) lt_cv_sys_path_separator=':' ;;
  2795. esac
  2796. PATH_SEPARATOR=$lt_cv_sys_path_separator
  2797. fi
  2798. ])
  2799. # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
  2800. # -----------------------------------------------------------
  2801. # If this macro is not defined by Autoconf, define it here.
  2802. ifdef([AC_PROVIDE_IFELSE],
  2803. [],
  2804. [define([AC_PROVIDE_IFELSE],
  2805. [ifdef([AC_PROVIDE_$1],
  2806. [$2], [$3])])])
  2807. # AC_PROG_LIBTOOL
  2808. # ---------------
  2809. AC_DEFUN([AC_PROG_LIBTOOL],
  2810. [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
  2811. dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
  2812. dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
  2813. AC_PROVIDE_IFELSE([AC_PROG_CXX],
  2814. [AC_LIBTOOL_CXX],
  2815. [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
  2816. ])])
  2817. ])# AC_PROG_LIBTOOL
  2818. # _AC_PROG_LIBTOOL
  2819. # ----------------
  2820. AC_DEFUN([_AC_PROG_LIBTOOL],
  2821. [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
  2822. AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
  2823. # This can be used to rebuild libtool when needed
  2824. LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
  2825. # Always use our own libtool.
  2826. LIBTOOL='$(SHELL) $(top_builddir)/libtool'
  2827. AC_SUBST(LIBTOOL)dnl
  2828. # Prevent multiple expansion
  2829. define([AC_PROG_LIBTOOL], [])
  2830. ])# _AC_PROG_LIBTOOL
  2831. # AC_LIBTOOL_SETUP
  2832. # ----------------
  2833. AC_DEFUN([AC_LIBTOOL_SETUP],
  2834. [AC_PREREQ(2.13)dnl
  2835. AC_REQUIRE([AC_ENABLE_SHARED])dnl
  2836. AC_REQUIRE([AC_ENABLE_STATIC])dnl
  2837. AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
  2838. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2839. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  2840. AC_REQUIRE([AC_PROG_CC])dnl
  2841. AC_REQUIRE([AC_PROG_LD])dnl
  2842. AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
  2843. AC_REQUIRE([AC_PROG_NM])dnl
  2844. AC_REQUIRE([AC_PROG_LN_S])dnl
  2845. AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
  2846. # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
  2847. AC_REQUIRE([AC_OBJEXT])dnl
  2848. AC_REQUIRE([AC_EXEEXT])dnl
  2849. dnl
  2850. AC_LIBTOOL_SYS_MAX_CMD_LEN
  2851. AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
  2852. AC_LIBTOOL_OBJDIR
  2853. AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
  2854. _LT_AC_PROG_ECHO_BACKSLASH
  2855. case $host_os in
  2856. aix3*)
  2857. # AIX sometimes has problems with the GCC collect2 program. For some
  2858. # reason, if we set the COLLECT_NAMES environment variable, the problems
  2859. # vanish in a puff of smoke.
  2860. if test "X${COLLECT_NAMES+set}" != Xset; then
  2861. COLLECT_NAMES=
  2862. export COLLECT_NAMES
  2863. fi
  2864. ;;
  2865. esac
  2866. # Sed substitution that helps us do robust quoting. It backslashifies
  2867. # metacharacters that are still active within double-quoted strings.
  2868. Xsed='sed -e 1s/^X//'
  2869. [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
  2870. # Same as above, but do not quote variable references.
  2871. [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
  2872. # Sed substitution to delay expansion of an escaped shell variable in a
  2873. # double_quote_subst'ed string.
  2874. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
  2875. # Sed substitution to avoid accidental globbing in evaled expressions
  2876. no_glob_subst='s/\*/\\\*/g'
  2877. # Constants:
  2878. rm="rm -f"
  2879. # Global variables:
  2880. default_ofile=libtool
  2881. can_build_shared=yes
  2882. # All known linkers require a `.a' archive for static linking (except MSVC,
  2883. # which needs '.lib').
  2884. libext=a
  2885. ltmain="$ac_aux_dir/ltmain.sh"
  2886. ofile="$default_ofile"
  2887. with_gnu_ld="$lt_cv_prog_gnu_ld"
  2888. AC_CHECK_TOOL(AR, ar, false)
  2889. AC_CHECK_TOOL(RANLIB, ranlib, :)
  2890. AC_CHECK_TOOL(STRIP, strip, :)
  2891. old_CC="$CC"
  2892. old_CFLAGS="$CFLAGS"
  2893. # Set sane defaults for various variables
  2894. test -z "$AR" && AR=ar
  2895. test -z "$AR_FLAGS" && AR_FLAGS=cru
  2896. test -z "$AS" && AS=as
  2897. test -z "$CC" && CC=cc
  2898. test -z "$LTCC" && LTCC=$CC
  2899. test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
  2900. test -z "$DLLTOOL" && DLLTOOL=dlltool
  2901. test -z "$LD" && LD=ld
  2902. test -z "$LN_S" && LN_S="ln -s"
  2903. test -z "$MAGIC_CMD" && MAGIC_CMD=file
  2904. test -z "$NM" && NM=nm
  2905. test -z "$SED" && SED=sed
  2906. test -z "$OBJDUMP" && OBJDUMP=objdump
  2907. test -z "$RANLIB" && RANLIB=:
  2908. test -z "$STRIP" && STRIP=:
  2909. test -z "$ac_objext" && ac_objext=o
  2910. # Determine commands to create old-style static archives.
  2911. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
  2912. old_postinstall_cmds='chmod 644 $oldlib'
  2913. old_postuninstall_cmds=
  2914. if test -n "$RANLIB"; then
  2915. case $host_os in
  2916. openbsd*)
  2917. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
  2918. ;;
  2919. *)
  2920. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
  2921. ;;
  2922. esac
  2923. old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
  2924. fi
  2925. _LT_CC_BASENAME([$compiler])
  2926. # Only perform the check for file, if the check method requires it
  2927. case $deplibs_check_method in
  2928. file_magic*)
  2929. if test "$file_magic_cmd" = '$MAGIC_CMD'; then
  2930. AC_PATH_MAGIC
  2931. fi
  2932. ;;
  2933. esac
  2934. _LT_REQUIRED_DARWIN_CHECKS
  2935. AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
  2936. AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
  2937. enable_win32_dll=yes, enable_win32_dll=no)
  2938. AC_ARG_ENABLE([libtool-lock],
  2939. [ --disable-libtool-lock Avoid locking (might break parallel builds)])
  2940. test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  2941. AC_ARG_WITH([pic],
  2942. [ --with-pic Try to use only PIC/non-PIC objects [default=use both]],
  2943. [pic_mode="$withval"],
  2944. [pic_mode=default])
  2945. test -z "$pic_mode" && pic_mode=default
  2946. # Use C for the default configuration in the libtool script
  2947. tagname=
  2948. AC_LIBTOOL_LANG_C_CONFIG
  2949. _LT_AC_TAGCONFIG
  2950. ])# AC_LIBTOOL_SETUP
  2951. # _LT_AC_SYS_COMPILER
  2952. # -------------------
  2953. AC_DEFUN([_LT_AC_SYS_COMPILER],
  2954. [AC_REQUIRE([AC_PROG_CC])dnl
  2955. # If no C compiler was specified, use CC.
  2956. LTCC=${LTCC-"$CC"}
  2957. # If no C compiler flags were specified, use CFLAGS.
  2958. LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
  2959. # Allow CC to be a program name with arguments.
  2960. compiler=$CC
  2961. ])# _LT_AC_SYS_COMPILER
  2962. # _LT_CC_BASENAME(CC)
  2963. # -------------------
  2964. # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
  2965. AC_DEFUN([_LT_CC_BASENAME],
  2966. [for cc_temp in $1""; do
  2967. case $cc_temp in
  2968. compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
  2969. distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
  2970. \-*) ;;
  2971. *) break;;
  2972. esac
  2973. done
  2974. cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
  2975. ])
  2976. # _LT_COMPILER_BOILERPLATE
  2977. # ------------------------
  2978. # Check for compiler boilerplate output or warnings with
  2979. # the simple compiler test code.
  2980. AC_DEFUN([_LT_COMPILER_BOILERPLATE],
  2981. [AC_REQUIRE([LT_AC_PROG_SED])dnl
  2982. ac_outfile=conftest.$ac_objext
  2983. echo "$lt_simple_compile_test_code" >conftest.$ac_ext
  2984. eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  2985. _lt_compiler_boilerplate=`cat conftest.err`
  2986. $rm conftest*
  2987. ])# _LT_COMPILER_BOILERPLATE
  2988. # _LT_LINKER_BOILERPLATE
  2989. # ----------------------
  2990. # Check for linker boilerplate output or warnings with
  2991. # the simple link test code.
  2992. AC_DEFUN([_LT_LINKER_BOILERPLATE],
  2993. [AC_REQUIRE([LT_AC_PROG_SED])dnl
  2994. ac_outfile=conftest.$ac_objext
  2995. echo "$lt_simple_link_test_code" >conftest.$ac_ext
  2996. eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  2997. _lt_linker_boilerplate=`cat conftest.err`
  2998. $rm -r conftest*
  2999. ])# _LT_LINKER_BOILERPLATE
  3000. dnl autoconf 2.13 compatibility
  3001. dnl _LT_AC_TRY_LINK()
  3002. AC_DEFUN(_LT_AC_TRY_LINK, [
  3003. cat > conftest.$ac_ext <<EOF
  3004. dnl This sometimes fails to find confdefs.h, for some reason.
  3005. dnl [#]line __oline__ "[$]0"
  3006. [#]line __oline__ "configure"
  3007. #include "confdefs.h"
  3008. int main() {
  3009. ; return 0; }
  3010. EOF
  3011. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
  3012. ifelse([$1], , :, [$1
  3013. rm -rf conftest*])
  3014. else
  3015. echo "configure: failed program was:" >&5
  3016. cat conftest.$ac_ext >&6
  3017. ifelse([$2], , , [$2
  3018. rm -rf conftest*
  3019. ])dnl
  3020. fi
  3021. rm -f conftest*])
  3022. # _LT_REQUIRED_DARWIN_CHECKS
  3023. # --------------------------
  3024. # Check for some things on darwin
  3025. AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[
  3026. case $host_os in
  3027. rhapsody* | darwin*)
  3028. AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
  3029. AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
  3030. AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
  3031. [lt_cv_apple_cc_single_mod=no
  3032. if test -z "${LT_MULTI_MODULE}"; then
  3033. # By default we will add the -single_module flag. You can override
  3034. # by either setting the environment variable LT_MULTI_MODULE
  3035. # non-empty at configure time, or by adding -multi_module to the
  3036. # link flags.
  3037. echo "int foo(void){return 1;}" > conftest.c
  3038. $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  3039. -dynamiclib ${wl}-single_module conftest.c
  3040. if test -f libconftest.dylib; then
  3041. lt_cv_apple_cc_single_mod=yes
  3042. rm -rf libconftest.dylib*
  3043. fi
  3044. rm conftest.c
  3045. fi])
  3046. AC_CACHE_CHECK([for -exported_symbols_list linker flag],
  3047. [lt_cv_ld_exported_symbols_list],
  3048. [lt_cv_ld_exported_symbols_list=no
  3049. save_LDFLAGS=$LDFLAGS
  3050. echo "_main" > conftest.sym
  3051. LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
  3052. _LT_AC_TRY_LINK([lt_cv_ld_exported_symbols_list=yes],[lt_cv_ld_exported_symbols_list=no])
  3053. LDFLAGS="$save_LDFLAGS"
  3054. ])
  3055. case $host_os in
  3056. rhapsody* | darwin1.[[0123]])
  3057. _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
  3058. darwin1.*)
  3059. _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
  3060. darwin*)
  3061. # if running on 10.5 or later, the deployment target defaults
  3062. # to the OS version, if on x86, and 10.4, the deployment
  3063. # target defaults to 10.4. Don't you love it?
  3064. case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
  3065. 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
  3066. _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
  3067. 10.[[012]]*)
  3068. _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
  3069. 10.*)
  3070. _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
  3071. esac
  3072. ;;
  3073. esac
  3074. if test "$lt_cv_apple_cc_single_mod" = "yes"; then
  3075. _lt_dar_single_mod='$single_module'
  3076. fi
  3077. if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
  3078. _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
  3079. else
  3080. _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}"
  3081. fi
  3082. if test "$DSYMUTIL" != ":"; then
  3083. _lt_dsymutil="~$DSYMUTIL \$lib || :"
  3084. else
  3085. _lt_dsymutil=
  3086. fi
  3087. ;;
  3088. esac
  3089. ])
  3090. # _LT_AC_SYS_LIBPATH_AIX
  3091. # ----------------------
  3092. # Links a minimal program and checks the executable
  3093. # for the system default hardcoded library path. In most cases,
  3094. # this is /usr/lib:/lib, but when the MPI compilers are used
  3095. # the location of the communication and MPI libs are included too.
  3096. # If we don't find anything, use the default library path according
  3097. # to the aix ld manual.
  3098. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
  3099. [AC_REQUIRE([LT_AC_PROG_SED])dnl
  3100. _LT_AC_TRY_LINK([
  3101. lt_aix_libpath_sed='
  3102. /Import File Strings/,/^$/ {
  3103. /^0/ {
  3104. s/^0 *\(.*\)$/\1/
  3105. p
  3106. }
  3107. }'
  3108. aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  3109. # Check for a 64-bit object if we didn't find anything.
  3110. if test -z "$aix_libpath"; then
  3111. aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  3112. fi],[])
  3113. if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  3114. ])# _LT_AC_SYS_LIBPATH_AIX
  3115. # _LT_AC_SHELL_INIT(ARG)
  3116. # ----------------------
  3117. AC_DEFUN([_LT_AC_SHELL_INIT],
  3118. [ifdef([AC_DIVERSION_NOTICE],
  3119. [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
  3120. [AC_DIVERT_PUSH(NOTICE)])
  3121. $1
  3122. AC_DIVERT_POP
  3123. ])# _LT_AC_SHELL_INIT
  3124. # _LT_AC_PROG_ECHO_BACKSLASH
  3125. # --------------------------
  3126. # Add some code to the start of the generated configure script which
  3127. # will find an echo command which doesn't interpret backslashes.
  3128. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
  3129. [_LT_AC_SHELL_INIT([
  3130. # Check that we are running under the correct shell.
  3131. SHELL=${CONFIG_SHELL-/bin/sh}
  3132. case X$ECHO in
  3133. X*--fallback-echo)
  3134. # Remove one level of quotation (which was required for Make).
  3135. ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
  3136. ;;
  3137. esac
  3138. echo=${ECHO-echo}
  3139. if test "X[$]1" = X--no-reexec; then
  3140. # Discard the --no-reexec flag, and continue.
  3141. shift
  3142. elif test "X[$]1" = X--fallback-echo; then
  3143. # Avoid inline document here, it may be left over
  3144. :
  3145. elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
  3146. # Yippee, $echo works!
  3147. :
  3148. else
  3149. # Restart under the correct shell.
  3150. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
  3151. fi
  3152. if test "X[$]1" = X--fallback-echo; then
  3153. # used as fallback echo
  3154. shift
  3155. cat <<EOF
  3156. [$]*
  3157. EOF
  3158. exit 0
  3159. fi
  3160. # The HP-UX ksh and POSIX shell print the target directory to stdout
  3161. # if CDPATH is set.
  3162. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  3163. if test -z "$ECHO"; then
  3164. if test "X${echo_test_string+set}" != Xset; then
  3165. # find a string as large as possible, as long as the shell can cope with it
  3166. for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
  3167. # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
  3168. if (echo_test_string=`eval $cmd`) 2>/dev/null &&
  3169. echo_test_string=`eval $cmd` &&
  3170. (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
  3171. then
  3172. break
  3173. fi
  3174. done
  3175. fi
  3176. if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
  3177. echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
  3178. test "X$echo_testing_string" = "X$echo_test_string"; then
  3179. :
  3180. else
  3181. # The Solaris, AIX, and Digital Unix default echo programs unquote
  3182. # backslashes. This makes it impossible to quote backslashes using
  3183. # echo "$something" | sed 's/\\/\\\\/g'
  3184. #
  3185. # So, first we look for a working echo in the user's PATH.
  3186. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  3187. for dir in $PATH /usr/ucb; do
  3188. IFS="$lt_save_ifs"
  3189. if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
  3190. test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
  3191. echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
  3192. test "X$echo_testing_string" = "X$echo_test_string"; then
  3193. echo="$dir/echo"
  3194. break
  3195. fi
  3196. done
  3197. IFS="$lt_save_ifs"
  3198. if test "X$echo" = Xecho; then
  3199. # We didn't find a better echo, so look for alternatives.
  3200. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
  3201. echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
  3202. test "X$echo_testing_string" = "X$echo_test_string"; then
  3203. # This shell has a builtin print -r that does the trick.
  3204. echo='print -r'
  3205. elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
  3206. test "X$CONFIG_SHELL" != X/bin/ksh; then
  3207. # If we have ksh, try running configure again with it.
  3208. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
  3209. export ORIGINAL_CONFIG_SHELL
  3210. CONFIG_SHELL=/bin/ksh
  3211. export CONFIG_SHELL
  3212. exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
  3213. else
  3214. # Try using printf.
  3215. echo='printf %s\n'
  3216. if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
  3217. echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
  3218. test "X$echo_testing_string" = "X$echo_test_string"; then
  3219. # Cool, printf works
  3220. :
  3221. elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
  3222. test "X$echo_testing_string" = 'X\t' &&
  3223. echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  3224. test "X$echo_testing_string" = "X$echo_test_string"; then
  3225. CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
  3226. export CONFIG_SHELL
  3227. SHELL="$CONFIG_SHELL"
  3228. export SHELL
  3229. echo="$CONFIG_SHELL [$]0 --fallback-echo"
  3230. elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
  3231. test "X$echo_testing_string" = 'X\t' &&
  3232. echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  3233. test "X$echo_testing_string" = "X$echo_test_string"; then
  3234. echo="$CONFIG_SHELL [$]0 --fallback-echo"
  3235. else
  3236. # maybe with a smaller string...
  3237. prev=:
  3238. for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
  3239. if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
  3240. then
  3241. break
  3242. fi
  3243. prev="$cmd"
  3244. done
  3245. if test "$prev" != 'sed 50q "[$]0"'; then
  3246. echo_test_string=`eval $prev`
  3247. export echo_test_string
  3248. exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
  3249. else
  3250. # Oops. We lost completely, so just stick with echo.
  3251. echo=echo
  3252. fi
  3253. fi
  3254. fi
  3255. fi
  3256. fi
  3257. fi
  3258. # Copy echo and quote the copy suitably for passing to libtool from
  3259. # the Makefile, instead of quoting the original, which is used later.
  3260. ECHO=$echo
  3261. if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
  3262. ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
  3263. fi
  3264. AC_SUBST(ECHO)
  3265. ])])# _LT_AC_PROG_ECHO_BACKSLASH
  3266. # _LT_AC_LOCK
  3267. # -----------
  3268. AC_DEFUN([_LT_AC_LOCK],
  3269. [dnl
  3270. #AC_ARG_ENABLE([libtool-lock],
  3271. #[ --disable-libtool-lock avoid locking (might break parallel builds)])
  3272. #test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  3273. # Some flags need to be propagated to the compiler or linker for good
  3274. # libtool support.
  3275. case $host in
  3276. ia64-*-hpux*)
  3277. # Find out which ABI we are using.
  3278. echo 'int i;' > conftest.$ac_ext
  3279. if AC_TRY_EVAL(ac_compile); then
  3280. case `/usr/bin/file conftest.$ac_objext` in
  3281. *ELF-32*)
  3282. HPUX_IA64_MODE="32"
  3283. ;;
  3284. *ELF-64*)
  3285. HPUX_IA64_MODE="64"
  3286. ;;
  3287. esac
  3288. fi
  3289. rm -rf conftest*
  3290. ;;
  3291. *-*-irix6*)
  3292. # Find out which ABI we are using.
  3293. echo '[#]line __oline__ "configure"' > conftest.$ac_ext
  3294. if AC_TRY_EVAL(ac_compile); then
  3295. if test "$lt_cv_prog_gnu_ld" = yes; then
  3296. case `/usr/bin/file conftest.$ac_objext` in
  3297. *32-bit*)
  3298. LD="${LD-ld} -melf32bsmip"
  3299. ;;
  3300. *N32*)
  3301. LD="${LD-ld} -melf32bmipn32"
  3302. ;;
  3303. *64-bit*)
  3304. LD="${LD-ld} -melf64bmip"
  3305. ;;
  3306. esac
  3307. else
  3308. case `/usr/bin/file conftest.$ac_objext` in
  3309. *32-bit*)
  3310. LD="${LD-ld} -32"
  3311. ;;
  3312. *N32*)
  3313. LD="${LD-ld} -n32"
  3314. ;;
  3315. *64-bit*)
  3316. LD="${LD-ld} -64"
  3317. ;;
  3318. esac
  3319. fi
  3320. fi
  3321. rm -rf conftest*
  3322. ;;
  3323. x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
  3324. s390*-*linux*|sparc*-*linux*)
  3325. # Find out which ABI we are using.
  3326. echo 'int i;' > conftest.$ac_ext
  3327. if AC_TRY_EVAL(ac_compile); then
  3328. case `/usr/bin/file conftest.o` in
  3329. *32-bit*)
  3330. case $host in
  3331. x86_64-*kfreebsd*-gnu)
  3332. LD="${LD-ld} -m elf_i386_fbsd"
  3333. ;;
  3334. x86_64-*linux*)
  3335. LD="${LD-ld} -m elf_i386"
  3336. ;;
  3337. powerpc64le-*linux*)
  3338. LD="${LD-ld} -m elf32lppclinux"
  3339. ;;
  3340. powerpc64-*linux*)
  3341. LD="${LD-ld} -m elf32ppclinux"
  3342. ;;
  3343. s390x-*linux*)
  3344. LD="${LD-ld} -m elf_s390"
  3345. ;;
  3346. sparc64-*linux*)
  3347. LD="${LD-ld} -m elf32_sparc"
  3348. ;;
  3349. esac
  3350. ;;
  3351. *64-bit*)
  3352. case $host in
  3353. x86_64-*kfreebsd*-gnu)
  3354. LD="${LD-ld} -m elf_x86_64_fbsd"
  3355. ;;
  3356. x86_64-*linux*)
  3357. LD="${LD-ld} -m elf_x86_64"
  3358. ;;
  3359. powerpcle-*linux*)
  3360. LD="${LD-ld} -m elf64lppc"
  3361. ;;
  3362. powerpc-*linux*)
  3363. LD="${LD-ld} -m elf64ppc"
  3364. ;;
  3365. s390*-*linux*)
  3366. LD="${LD-ld} -m elf64_s390"
  3367. ;;
  3368. sparc*-*linux*)
  3369. LD="${LD-ld} -m elf64_sparc"
  3370. ;;
  3371. esac
  3372. ;;
  3373. esac
  3374. fi
  3375. rm -rf conftest*
  3376. ;;
  3377. *-*-sco3.2v5*)
  3378. # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  3379. SAVE_CFLAGS="$CFLAGS"
  3380. CFLAGS="$CFLAGS -belf"
  3381. AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
  3382. [AC_LANG_SAVE
  3383. AC_LANG_C
  3384. AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
  3385. AC_LANG_RESTORE])
  3386. if test x"$lt_cv_cc_needs_belf" != x"yes"; then
  3387. # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  3388. CFLAGS="$SAVE_CFLAGS"
  3389. fi
  3390. ;;
  3391. sparc*-*solaris*)
  3392. # Find out which ABI we are using.
  3393. echo 'int i;' > conftest.$ac_ext
  3394. if AC_TRY_EVAL(ac_compile); then
  3395. case `/usr/bin/file conftest.o` in
  3396. *64-bit*)
  3397. case $lt_cv_prog_gnu_ld in
  3398. yes*) LD="${LD-ld} -m elf64_sparc" ;;
  3399. *)
  3400. if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
  3401. LD="${LD-ld} -64"
  3402. fi
  3403. ;;
  3404. esac
  3405. ;;
  3406. esac
  3407. fi
  3408. rm -rf conftest*
  3409. ;;
  3410. AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
  3411. [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
  3412. AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  3413. AC_CHECK_TOOL(AS, as, false)
  3414. AC_CHECK_TOOL(OBJDUMP, objdump, false)
  3415. ;;
  3416. ])
  3417. esac
  3418. need_locks="$enable_libtool_lock"
  3419. ])# _LT_AC_LOCK
  3420. # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  3421. # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
  3422. # ----------------------------------------------------------------
  3423. # Check whether the given compiler option works
  3424. AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
  3425. [AC_REQUIRE([LT_AC_PROG_SED])
  3426. AC_CACHE_CHECK([$1], [$2],
  3427. [$2=no
  3428. ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
  3429. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  3430. lt_compiler_flag="$3"
  3431. # Insert the option either (1) after the last *FLAGS variable, or
  3432. # (2) before a word containing "conftest.", or (3) at the end.
  3433. # Note that $ac_compile itself does not contain backslashes and begins
  3434. # with a dollar sign (not a hyphen), so the echo should work correctly.
  3435. # The option is referenced via a variable to avoid confusing sed.
  3436. lt_compile=`echo "$ac_compile" | $SED \
  3437. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  3438. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  3439. -e 's:$: $lt_compiler_flag:'`
  3440. (eval echo "\"configure:__oline__: $lt_compile\"" >&5)
  3441. (eval "$lt_compile" 2>conftest.err)
  3442. ac_status=$?
  3443. cat conftest.err >&5
  3444. echo "configure:__oline__: \$? = $ac_status" >&5
  3445. if (exit $ac_status) && test -s "$ac_outfile"; then
  3446. # The compiler can only warn and ignore the option if not recognized
  3447. # So say no if there are warnings other than the usual output.
  3448. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
  3449. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  3450. if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
  3451. $2=yes
  3452. fi
  3453. fi
  3454. $rm conftest*
  3455. ])
  3456. if test x"[$]$2" = xyes; then
  3457. ifelse([$5], , :, [$5])
  3458. else
  3459. ifelse([$6], , :, [$6])
  3460. fi
  3461. ])# AC_LIBTOOL_COMPILER_OPTION
  3462. # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  3463. # [ACTION-SUCCESS], [ACTION-FAILURE])
  3464. # ------------------------------------------------------------
  3465. # Check whether the given compiler option works
  3466. AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
  3467. [AC_REQUIRE([LT_AC_PROG_SED])dnl
  3468. AC_CACHE_CHECK([$1], [$2],
  3469. [$2=no
  3470. save_LDFLAGS="$LDFLAGS"
  3471. LDFLAGS="$LDFLAGS $3"
  3472. echo "$lt_simple_link_test_code" > conftest.$ac_ext
  3473. if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
  3474. # The linker can only warn and ignore the option if not recognized
  3475. # So say no if there are warnings
  3476. if test -s conftest.err; then
  3477. # Append any errors to the config.log.
  3478. cat conftest.err 1>&5
  3479. $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
  3480. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  3481. if diff conftest.exp conftest.er2 >/dev/null; then
  3482. $2=yes
  3483. fi
  3484. else
  3485. $2=yes
  3486. fi
  3487. fi
  3488. $rm -r conftest*
  3489. LDFLAGS="$save_LDFLAGS"
  3490. ])
  3491. if test x"[$]$2" = xyes; then
  3492. ifelse([$4], , :, [$4])
  3493. else
  3494. ifelse([$5], , :, [$5])
  3495. fi
  3496. ])# AC_LIBTOOL_LINKER_OPTION
  3497. # AC_LIBTOOL_SYS_MAX_CMD_LEN
  3498. # --------------------------
  3499. AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
  3500. [# find the maximum length of command line arguments
  3501. AC_MSG_CHECKING([the maximum length of command line arguments])
  3502. AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
  3503. i=0
  3504. teststring="ABCD"
  3505. case $build_os in
  3506. msdosdjgpp*)
  3507. # On DJGPP, this test can blow up pretty badly due to problems in libc
  3508. # (any single argument exceeding 2000 bytes causes a buffer overrun
  3509. # during glob expansion). Even if it were fixed, the result of this
  3510. # check would be larger than it should be.
  3511. lt_cv_sys_max_cmd_len=12288; # 12K is about right
  3512. ;;
  3513. gnu*)
  3514. # Under GNU Hurd, this test is not required because there is
  3515. # no limit to the length of command line arguments.
  3516. # Libtool will interpret -1 as no limit whatsoever
  3517. lt_cv_sys_max_cmd_len=-1;
  3518. ;;
  3519. cygwin* | mingw*)
  3520. # On Win9x/ME, this test blows up -- it succeeds, but takes
  3521. # about 5 minutes as the teststring grows exponentially.
  3522. # Worse, since 9x/ME are not pre-emptively multitasking,
  3523. # you end up with a "frozen" computer, even though with patience
  3524. # the test eventually succeeds (with a max line length of 256k).
  3525. # Instead, let's just punt: use the minimum linelength reported by
  3526. # all of the supported platforms: 8192 (on NT/2K/XP).
  3527. lt_cv_sys_max_cmd_len=8192;
  3528. ;;
  3529. amigaos*)
  3530. # On AmigaOS with pdksh, this test takes hours, literally.
  3531. # So we just punt and use a minimum line length of 8192.
  3532. lt_cv_sys_max_cmd_len=8192;
  3533. ;;
  3534. netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
  3535. # This has been around since 386BSD, at least. Likely further.
  3536. if test -x /sbin/sysctl; then
  3537. lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
  3538. elif test -x /usr/sbin/sysctl; then
  3539. lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
  3540. else
  3541. lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
  3542. fi
  3543. # And add a safety zone
  3544. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  3545. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  3546. ;;
  3547. interix*)
  3548. # We know the value 262144 and hardcode it with a safety zone (like BSD)
  3549. lt_cv_sys_max_cmd_len=196608
  3550. ;;
  3551. osf*)
  3552. # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
  3553. # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
  3554. # nice to cause kernel panics so lets avoid the loop below.
  3555. # First set a reasonable default.
  3556. lt_cv_sys_max_cmd_len=16384
  3557. #
  3558. if test -x /sbin/sysconfig; then
  3559. case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
  3560. *1*) lt_cv_sys_max_cmd_len=-1 ;;
  3561. esac
  3562. fi
  3563. ;;
  3564. sco3.2v5*)
  3565. lt_cv_sys_max_cmd_len=102400
  3566. ;;
  3567. sysv5* | sco5v6* | sysv4.2uw2*)
  3568. kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
  3569. if test -n "$kargmax"; then
  3570. lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
  3571. else
  3572. lt_cv_sys_max_cmd_len=32768
  3573. fi
  3574. ;;
  3575. *)
  3576. lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
  3577. if test -n "$lt_cv_sys_max_cmd_len"; then
  3578. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  3579. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  3580. else
  3581. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
  3582. while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
  3583. = "XX$teststring") >/dev/null 2>&1 &&
  3584. new_result=`expr "X$teststring" : ".*" 2>&1` &&
  3585. lt_cv_sys_max_cmd_len=$new_result &&
  3586. test $i != 17 # 1/2 MB should be enough
  3587. do
  3588. i=`expr $i + 1`
  3589. teststring=$teststring$teststring
  3590. done
  3591. teststring=
  3592. # Add a significant safety factor because C++ compilers can tack on massive
  3593. # amounts of additional arguments before passing them to the linker.
  3594. # It appears as though 1/2 is a usable value.
  3595. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
  3596. fi
  3597. ;;
  3598. esac
  3599. ])
  3600. if test -n $lt_cv_sys_max_cmd_len ; then
  3601. AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
  3602. else
  3603. AC_MSG_RESULT(none)
  3604. fi
  3605. ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
  3606. # _LT_AC_CHECK_DLFCN
  3607. # ------------------
  3608. AC_DEFUN([_LT_AC_CHECK_DLFCN],
  3609. [AC_CHECK_HEADERS(dlfcn.h)dnl
  3610. ])# _LT_AC_CHECK_DLFCN
  3611. # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
  3612. # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
  3613. # ---------------------------------------------------------------------
  3614. AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
  3615. [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
  3616. if test "$cross_compiling" = yes; then :
  3617. [$4]
  3618. else
  3619. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  3620. lt_status=$lt_dlunknown
  3621. cat > conftest.$ac_ext <<EOF
  3622. [#line __oline__ "configure"
  3623. #include "confdefs.h"
  3624. #if HAVE_DLFCN_H
  3625. #include <dlfcn.h>
  3626. #endif
  3627. #include <stdio.h>
  3628. #ifdef RTLD_GLOBAL
  3629. # define LT_DLGLOBAL RTLD_GLOBAL
  3630. #else
  3631. # ifdef DL_GLOBAL
  3632. # define LT_DLGLOBAL DL_GLOBAL
  3633. # else
  3634. # define LT_DLGLOBAL 0
  3635. # endif
  3636. #endif
  3637. /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
  3638. find out it does not work in some platform. */
  3639. #ifndef LT_DLLAZY_OR_NOW
  3640. # ifdef RTLD_LAZY
  3641. # define LT_DLLAZY_OR_NOW RTLD_LAZY
  3642. # else
  3643. # ifdef DL_LAZY
  3644. # define LT_DLLAZY_OR_NOW DL_LAZY
  3645. # else
  3646. # ifdef RTLD_NOW
  3647. # define LT_DLLAZY_OR_NOW RTLD_NOW
  3648. # else
  3649. # ifdef DL_NOW
  3650. # define LT_DLLAZY_OR_NOW DL_NOW
  3651. # else
  3652. # define LT_DLLAZY_OR_NOW 0
  3653. # endif
  3654. # endif
  3655. # endif
  3656. # endif
  3657. #endif
  3658. #ifdef __cplusplus
  3659. extern "C" void exit (int);
  3660. #endif
  3661. void fnord() { int i=42;}
  3662. int main ()
  3663. {
  3664. void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  3665. int status = $lt_dlunknown;
  3666. if (self)
  3667. {
  3668. if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
  3669. else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
  3670. /* dlclose (self); */
  3671. }
  3672. else
  3673. puts (dlerror ());
  3674. exit (status);
  3675. }]
  3676. EOF
  3677. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
  3678. (./conftest; exit; ) >&5 2>/dev/null
  3679. lt_status=$?
  3680. case x$lt_status in
  3681. x$lt_dlno_uscore) $1 ;;
  3682. x$lt_dlneed_uscore) $2 ;;
  3683. x$lt_dlunknown|x*) $3 ;;
  3684. esac
  3685. else :
  3686. # compilation failed
  3687. $3
  3688. fi
  3689. fi
  3690. rm -fr conftest*
  3691. ])# _LT_AC_TRY_DLOPEN_SELF
  3692. # AC_LIBTOOL_DLOPEN_SELF
  3693. # ----------------------
  3694. AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
  3695. [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
  3696. if test "x$enable_dlopen" != xyes; then
  3697. enable_dlopen=unknown
  3698. enable_dlopen_self=unknown
  3699. enable_dlopen_self_static=unknown
  3700. else
  3701. lt_cv_dlopen=no
  3702. lt_cv_dlopen_libs=
  3703. case $host_os in
  3704. beos*)
  3705. lt_cv_dlopen="load_add_on"
  3706. lt_cv_dlopen_libs=
  3707. lt_cv_dlopen_self=yes
  3708. ;;
  3709. mingw* | pw32*)
  3710. lt_cv_dlopen="LoadLibrary"
  3711. lt_cv_dlopen_libs=
  3712. ;;
  3713. cygwin*)
  3714. lt_cv_dlopen="dlopen"
  3715. lt_cv_dlopen_libs=
  3716. ;;
  3717. darwin*)
  3718. # if libdl is installed we need to link against it
  3719. AC_CHECK_LIB([dl], [dlopen],
  3720. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
  3721. lt_cv_dlopen="dyld"
  3722. lt_cv_dlopen_libs=
  3723. lt_cv_dlopen_self=yes
  3724. ])
  3725. ;;
  3726. *)
  3727. AC_CHECK_FUNC([shl_load],
  3728. [lt_cv_dlopen="shl_load"],
  3729. [AC_CHECK_LIB([dld], [shl_load],
  3730. [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
  3731. [AC_CHECK_FUNC([dlopen],
  3732. [lt_cv_dlopen="dlopen"],
  3733. [AC_CHECK_LIB([dl], [dlopen],
  3734. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
  3735. [AC_CHECK_LIB([svld], [dlopen],
  3736. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
  3737. [AC_CHECK_LIB([dld], [dld_link],
  3738. [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
  3739. ])
  3740. ])
  3741. ])
  3742. ])
  3743. ])
  3744. ;;
  3745. esac
  3746. if test "x$lt_cv_dlopen" != xno; then
  3747. enable_dlopen=yes
  3748. else
  3749. enable_dlopen=no
  3750. fi
  3751. case $lt_cv_dlopen in
  3752. dlopen)
  3753. save_CPPFLAGS="$CPPFLAGS"
  3754. test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  3755. save_LDFLAGS="$LDFLAGS"
  3756. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  3757. save_LIBS="$LIBS"
  3758. LIBS="$lt_cv_dlopen_libs $LIBS"
  3759. AC_CACHE_CHECK([whether a program can dlopen itself],
  3760. lt_cv_dlopen_self, [dnl
  3761. _LT_AC_TRY_DLOPEN_SELF(
  3762. lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
  3763. lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
  3764. ])
  3765. if test "x$lt_cv_dlopen_self" = xyes; then
  3766. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
  3767. AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
  3768. lt_cv_dlopen_self_static, [dnl
  3769. _LT_AC_TRY_DLOPEN_SELF(
  3770. lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
  3771. lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
  3772. ])
  3773. fi
  3774. CPPFLAGS="$save_CPPFLAGS"
  3775. LDFLAGS="$save_LDFLAGS"
  3776. LIBS="$save_LIBS"
  3777. ;;
  3778. esac
  3779. case $lt_cv_dlopen_self in
  3780. yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  3781. *) enable_dlopen_self=unknown ;;
  3782. esac
  3783. case $lt_cv_dlopen_self_static in
  3784. yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  3785. *) enable_dlopen_self_static=unknown ;;
  3786. esac
  3787. fi
  3788. ])# AC_LIBTOOL_DLOPEN_SELF
  3789. # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
  3790. # ---------------------------------
  3791. # Check to see if options -c and -o are simultaneously supported by compiler
  3792. AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
  3793. [AC_REQUIRE([LT_AC_PROG_SED])dnl
  3794. AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
  3795. AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
  3796. [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
  3797. [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
  3798. $rm -r conftest 2>/dev/null
  3799. mkdir conftest
  3800. cd conftest
  3801. mkdir out
  3802. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  3803. lt_compiler_flag="-o out/conftest2.$ac_objext"
  3804. # Insert the option either (1) after the last *FLAGS variable, or
  3805. # (2) before a word containing "conftest.", or (3) at the end.
  3806. # Note that $ac_compile itself does not contain backslashes and begins
  3807. # with a dollar sign (not a hyphen), so the echo should work correctly.
  3808. lt_compile=`echo "$ac_compile" | $SED \
  3809. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  3810. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  3811. -e 's:$: $lt_compiler_flag:'`
  3812. (eval echo "\"configure:__oline__: $lt_compile\"" >&5)
  3813. (eval "$lt_compile" 2>out/conftest.err)
  3814. ac_status=$?
  3815. cat out/conftest.err >&5
  3816. echo "configure:__oline__: \$? = $ac_status" >&5
  3817. if (exit $ac_status) && test -s out/conftest2.$ac_objext
  3818. then
  3819. # The compiler can only warn and ignore the option if not recognized
  3820. # So say no if there are warnings
  3821. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
  3822. $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
  3823. if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
  3824. _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  3825. fi
  3826. fi
  3827. chmod u+w . 2>&5
  3828. $rm conftest*
  3829. # SGI C++ compiler will create directory out/ii_files/ for
  3830. # template instantiation
  3831. test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
  3832. $rm out/* && rmdir out
  3833. cd ..
  3834. rmdir conftest
  3835. $rm conftest*
  3836. ])
  3837. ])# AC_LIBTOOL_PROG_CC_C_O
  3838. # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
  3839. # -----------------------------------------
  3840. # Check to see if we can do hard links to lock some files if needed
  3841. AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
  3842. [AC_REQUIRE([_LT_AC_LOCK])dnl
  3843. hard_links="nottested"
  3844. if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
  3845. # do not overwrite the value of need_locks provided by the user
  3846. AC_MSG_CHECKING([if we can lock with hard links])
  3847. hard_links=yes
  3848. $rm conftest*
  3849. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  3850. touch conftest.a
  3851. ln conftest.a conftest.b 2>&5 || hard_links=no
  3852. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  3853. AC_MSG_RESULT([$hard_links])
  3854. if test "$hard_links" = no; then
  3855. AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
  3856. need_locks=warn
  3857. fi
  3858. else
  3859. need_locks=no
  3860. fi
  3861. ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
  3862. # AC_LIBTOOL_OBJDIR
  3863. # -----------------
  3864. AC_DEFUN([AC_LIBTOOL_OBJDIR],
  3865. [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
  3866. [rm -f .libs 2>/dev/null
  3867. mkdir .libs 2>/dev/null
  3868. if test -d .libs; then
  3869. lt_cv_objdir=.libs
  3870. else
  3871. # MS-DOS does not allow filenames that begin with a dot.
  3872. lt_cv_objdir=_libs
  3873. fi
  3874. rmdir .libs 2>/dev/null])
  3875. objdir=$lt_cv_objdir
  3876. ])# AC_LIBTOOL_OBJDIR
  3877. # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
  3878. # ----------------------------------------------
  3879. # Check hardcoding attributes.
  3880. AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
  3881. [AC_MSG_CHECKING([how to hardcode library paths into programs])
  3882. _LT_AC_TAGVAR(hardcode_action, $1)=
  3883. if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
  3884. test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
  3885. test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
  3886. # We can hardcode non-existent directories.
  3887. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
  3888. # If the only mechanism to avoid hardcoding is shlibpath_var, we
  3889. # have to relink, otherwise we might link with an installed library
  3890. # when we should be linking with a yet-to-be-installed one
  3891. ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
  3892. test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
  3893. # Linking always hardcodes the temporary library directory.
  3894. _LT_AC_TAGVAR(hardcode_action, $1)=relink
  3895. else
  3896. # We can link without hardcoding, and we can hardcode nonexisting dirs.
  3897. _LT_AC_TAGVAR(hardcode_action, $1)=immediate
  3898. fi
  3899. else
  3900. # We cannot hardcode anything, or else we can only hardcode existing
  3901. # directories.
  3902. _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
  3903. fi
  3904. AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
  3905. if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
  3906. # Fast installation is not supported
  3907. enable_fast_install=no
  3908. elif test "$shlibpath_overrides_runpath" = yes ||
  3909. test "$enable_shared" = no; then
  3910. # Fast installation is not necessary
  3911. enable_fast_install=needless
  3912. fi
  3913. ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
  3914. # AC_LIBTOOL_SYS_LIB_STRIP
  3915. # ------------------------
  3916. AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
  3917. [striplib=
  3918. old_striplib=
  3919. AC_MSG_CHECKING([whether stripping libraries is possible])
  3920. if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
  3921. test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
  3922. test -z "$striplib" && striplib="$STRIP --strip-unneeded"
  3923. AC_MSG_RESULT([yes])
  3924. else
  3925. # FIXME - insert some real tests, host_os isn't really good enough
  3926. case $host_os in
  3927. darwin*)
  3928. if test -n "$STRIP" ; then
  3929. striplib="$STRIP -x"
  3930. old_striplib="$STRIP -S"
  3931. AC_MSG_RESULT([yes])
  3932. else
  3933. AC_MSG_RESULT([no])
  3934. fi
  3935. ;;
  3936. *)
  3937. AC_MSG_RESULT([no])
  3938. ;;
  3939. esac
  3940. fi
  3941. ])# AC_LIBTOOL_SYS_LIB_STRIP
  3942. # AC_LIBTOOL_SYS_DYNAMIC_LINKER
  3943. # -----------------------------
  3944. # PORTME Fill in your ld.so characteristics
  3945. AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
  3946. [AC_REQUIRE([LT_AC_PROG_SED])dnl
  3947. AC_MSG_CHECKING([dynamic linker characteristics])
  3948. library_names_spec=
  3949. libname_spec='lib$name'
  3950. soname_spec=
  3951. shrext_cmds=".so"
  3952. postinstall_cmds=
  3953. postuninstall_cmds=
  3954. finish_cmds=
  3955. finish_eval=
  3956. shlibpath_var=
  3957. shlibpath_overrides_runpath=unknown
  3958. version_type=none
  3959. dynamic_linker="$host_os ld.so"
  3960. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  3961. ifelse($1,[],[
  3962. if test "$GCC" = yes; then
  3963. case $host_os in
  3964. darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
  3965. *) lt_awk_arg="/^libraries:/" ;;
  3966. esac
  3967. lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
  3968. if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
  3969. # if the path contains ";" then we assume it to be the separator
  3970. # otherwise default to the standard path separator (i.e. ":") - it is
  3971. # assumed that no part of a normal pathname contains ";" but that should
  3972. # okay in the real world where ";" in dirpaths is itself problematic.
  3973. lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
  3974. else
  3975. lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  3976. fi
  3977. # Ok, now we have the path, separated by spaces, we can step through it
  3978. # and add multilib dir if necessary.
  3979. lt_tmp_lt_search_path_spec=
  3980. lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
  3981. for lt_sys_path in $lt_search_path_spec; do
  3982. if test -d "$lt_sys_path/$lt_multi_os_dir"; then
  3983. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
  3984. else
  3985. test -d "$lt_sys_path" && \
  3986. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
  3987. fi
  3988. done
  3989. lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
  3990. BEGIN {RS=" "; FS="/|\n";} {
  3991. lt_foo="";
  3992. lt_count=0;
  3993. for (lt_i = NF; lt_i > 0; lt_i--) {
  3994. if ($lt_i != "" && $lt_i != ".") {
  3995. if ($lt_i == "..") {
  3996. lt_count++;
  3997. } else {
  3998. if (lt_count == 0) {
  3999. lt_foo="/" $lt_i lt_foo;
  4000. } else {
  4001. lt_count--;
  4002. }
  4003. }
  4004. }
  4005. }
  4006. if (lt_foo != "") { lt_freq[[lt_foo]]++; }
  4007. if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
  4008. }'`
  4009. sys_lib_search_path_spec=`echo $lt_search_path_spec`
  4010. else
  4011. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  4012. fi])
  4013. need_lib_prefix=unknown
  4014. hardcode_into_libs=no
  4015. # when you set need_version to no, make sure it does not cause -set_version
  4016. # flags to be left without arguments
  4017. need_version=unknown
  4018. case $host_os in
  4019. aix3*)
  4020. version_type=linux
  4021. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
  4022. shlibpath_var=LIBPATH
  4023. # AIX 3 has no versioning support, so we append a major version to the name.
  4024. soname_spec='${libname}${release}${shared_ext}$major'
  4025. ;;
  4026. aix[[4-9]]*)
  4027. version_type=linux
  4028. need_lib_prefix=no
  4029. need_version=no
  4030. hardcode_into_libs=yes
  4031. if test "$host_cpu" = ia64; then
  4032. # AIX 5 supports IA64
  4033. library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
  4034. shlibpath_var=LD_LIBRARY_PATH
  4035. else
  4036. # With GCC up to 2.95.x, collect2 would create an import file
  4037. # for dependence libraries. The import file would start with
  4038. # the line `#! .'. This would cause the generated library to
  4039. # depend on `.', always an invalid library. This was fixed in
  4040. # development snapshots of GCC prior to 3.0.
  4041. case $host_os in
  4042. aix4 | aix4.[[01]] | aix4.[[01]].*)
  4043. if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
  4044. echo ' yes '
  4045. echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
  4046. :
  4047. else
  4048. can_build_shared=no
  4049. fi
  4050. ;;
  4051. esac
  4052. # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
  4053. # soname into executable. Probably we can add versioning support to
  4054. # collect2, so additional links can be useful in future.
  4055. if test "$aix_use_runtimelinking" = yes; then
  4056. # If using run time linking (on AIX 4.2 or later) use lib<name>.so
  4057. # instead of lib<name>.a to let people know that these are not
  4058. # typical AIX shared libraries.
  4059. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4060. else
  4061. # We preserve .a as extension for shared libraries through AIX4.2
  4062. # and later when we are not doing run time linking.
  4063. library_names_spec='${libname}${release}.a $libname.a'
  4064. soname_spec='${libname}${release}${shared_ext}$major'
  4065. fi
  4066. shlibpath_var=LIBPATH
  4067. fi
  4068. ;;
  4069. amigaos*)
  4070. library_names_spec='$libname.ixlibrary $libname.a'
  4071. # Create ${libname}_ixlibrary.a entries in /sys/libs.
  4072. 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'
  4073. ;;
  4074. beos*)
  4075. library_names_spec='${libname}${shared_ext}'
  4076. dynamic_linker="$host_os ld.so"
  4077. shlibpath_var=LIBRARY_PATH
  4078. ;;
  4079. bsdi[[45]]*)
  4080. version_type=linux
  4081. need_version=no
  4082. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4083. soname_spec='${libname}${release}${shared_ext}$major'
  4084. finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  4085. shlibpath_var=LD_LIBRARY_PATH
  4086. sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  4087. sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  4088. # the default ld.so.conf also contains /usr/contrib/lib and
  4089. # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  4090. # libtool to hard-code these into programs
  4091. ;;
  4092. cygwin* | mingw* | pw32*)
  4093. version_type=windows
  4094. shrext_cmds=".dll"
  4095. need_version=no
  4096. need_lib_prefix=no
  4097. case $GCC,$host_os in
  4098. yes,cygwin* | yes,mingw* | yes,pw32*)
  4099. library_names_spec='$libname.dll.a'
  4100. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  4101. postinstall_cmds='base_file=`basename \${file}`~
  4102. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
  4103. dldir=$destdir/`dirname \$dlpath`~
  4104. test -d \$dldir || mkdir -p \$dldir~
  4105. $install_prog $dir/$dlname \$dldir/$dlname~
  4106. chmod a+x \$dldir/$dlname'
  4107. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  4108. dlpath=$dir/\$dldll~
  4109. $rm \$dlpath'
  4110. shlibpath_overrides_runpath=yes
  4111. case $host_os in
  4112. cygwin*)
  4113. # Cygwin DLLs use 'cyg' prefix rather than 'lib'
  4114. soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  4115. sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
  4116. ;;
  4117. mingw*)
  4118. # MinGW DLLs use traditional 'lib' prefix
  4119. soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  4120. sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
  4121. if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
  4122. # It is most probably a Windows format PATH printed by
  4123. # mingw gcc, but we are running on Cygwin. Gcc prints its search
  4124. # path with ; separators, and with drive letters. We can handle the
  4125. # drive letters (cygwin fileutils understands them), so leave them,
  4126. # especially as we might pass files found there to a mingw objdump,
  4127. # which wouldn't understand a cygwinified path. Ahh.
  4128. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  4129. else
  4130. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  4131. fi
  4132. ;;
  4133. pw32*)
  4134. # pw32 DLLs use 'pw' prefix rather than 'lib'
  4135. library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  4136. ;;
  4137. esac
  4138. ;;
  4139. *)
  4140. library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
  4141. ;;
  4142. esac
  4143. dynamic_linker='Win32 ld.exe'
  4144. # FIXME: first we should search . and the directory the executable is in
  4145. shlibpath_var=PATH
  4146. ;;
  4147. darwin* | rhapsody*)
  4148. dynamic_linker="$host_os dyld"
  4149. version_type=darwin
  4150. need_lib_prefix=no
  4151. need_version=no
  4152. library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
  4153. soname_spec='${libname}${release}${major}$shared_ext'
  4154. shlibpath_overrides_runpath=yes
  4155. shlibpath_var=DYLD_LIBRARY_PATH
  4156. shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
  4157. ifelse([$1], [],[
  4158. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
  4159. sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
  4160. ;;
  4161. dgux*)
  4162. version_type=linux
  4163. need_lib_prefix=no
  4164. need_version=no
  4165. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
  4166. soname_spec='${libname}${release}${shared_ext}$major'
  4167. shlibpath_var=LD_LIBRARY_PATH
  4168. ;;
  4169. freebsd* | dragonfly*)
  4170. # DragonFly does not have aout. When/if they implement a new
  4171. # versioning mechanism, adjust this.
  4172. if test -x /usr/bin/objformat; then
  4173. objformat=`/usr/bin/objformat`
  4174. else
  4175. case $host_os in
  4176. freebsd[[123]].*) objformat=aout ;;
  4177. *) objformat=elf ;;
  4178. esac
  4179. fi
  4180. version_type=freebsd-$objformat
  4181. case $version_type in
  4182. freebsd-elf*)
  4183. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  4184. need_version=no
  4185. need_lib_prefix=no
  4186. ;;
  4187. freebsd-*)
  4188. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
  4189. need_version=yes
  4190. ;;
  4191. esac
  4192. shlibpath_var=LD_LIBRARY_PATH
  4193. case $host_os in
  4194. freebsd2*)
  4195. shlibpath_overrides_runpath=yes
  4196. ;;
  4197. freebsd3.[[01]]* | freebsdelf3.[[01]]*)
  4198. shlibpath_overrides_runpath=yes
  4199. hardcode_into_libs=yes
  4200. ;;
  4201. freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
  4202. freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
  4203. shlibpath_overrides_runpath=no
  4204. hardcode_into_libs=yes
  4205. ;;
  4206. *) # from 4.6 on, and DragonFly
  4207. shlibpath_overrides_runpath=yes
  4208. hardcode_into_libs=yes
  4209. ;;
  4210. esac
  4211. ;;
  4212. gnu*)
  4213. version_type=linux
  4214. need_lib_prefix=no
  4215. need_version=no
  4216. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  4217. soname_spec='${libname}${release}${shared_ext}$major'
  4218. shlibpath_var=LD_LIBRARY_PATH
  4219. hardcode_into_libs=yes
  4220. ;;
  4221. hpux9* | hpux10* | hpux11*)
  4222. # Give a soname corresponding to the major version so that dld.sl refuses to
  4223. # link against other versions.
  4224. version_type=sunos
  4225. need_lib_prefix=no
  4226. need_version=no
  4227. case $host_cpu in
  4228. ia64*)
  4229. shrext_cmds='.so'
  4230. hardcode_into_libs=yes
  4231. dynamic_linker="$host_os dld.so"
  4232. shlibpath_var=LD_LIBRARY_PATH
  4233. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  4234. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4235. soname_spec='${libname}${release}${shared_ext}$major'
  4236. if test "X$HPUX_IA64_MODE" = X32; then
  4237. sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
  4238. else
  4239. sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
  4240. fi
  4241. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  4242. ;;
  4243. hppa*64*)
  4244. shrext_cmds='.sl'
  4245. hardcode_into_libs=yes
  4246. dynamic_linker="$host_os dld.sl"
  4247. shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
  4248. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  4249. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4250. soname_spec='${libname}${release}${shared_ext}$major'
  4251. sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
  4252. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  4253. ;;
  4254. *)
  4255. shrext_cmds='.sl'
  4256. dynamic_linker="$host_os dld.sl"
  4257. shlibpath_var=SHLIB_PATH
  4258. shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  4259. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4260. soname_spec='${libname}${release}${shared_ext}$major'
  4261. ;;
  4262. esac
  4263. # HP-UX runs *really* slowly unless shared libraries are mode 555.
  4264. postinstall_cmds='chmod 555 $lib'
  4265. ;;
  4266. interix[[3-9]]*)
  4267. version_type=linux
  4268. need_lib_prefix=no
  4269. need_version=no
  4270. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  4271. soname_spec='${libname}${release}${shared_ext}$major'
  4272. dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
  4273. shlibpath_var=LD_LIBRARY_PATH
  4274. shlibpath_overrides_runpath=no
  4275. hardcode_into_libs=yes
  4276. ;;
  4277. irix5* | irix6* | nonstopux*)
  4278. case $host_os in
  4279. nonstopux*) version_type=nonstopux ;;
  4280. *)
  4281. if test "$lt_cv_prog_gnu_ld" = yes; then
  4282. version_type=linux
  4283. else
  4284. version_type=irix
  4285. fi ;;
  4286. esac
  4287. need_lib_prefix=no
  4288. need_version=no
  4289. soname_spec='${libname}${release}${shared_ext}$major'
  4290. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
  4291. case $host_os in
  4292. irix5* | nonstopux*)
  4293. libsuff= shlibsuff=
  4294. ;;
  4295. *)
  4296. case $LD in # libtool.m4 will add one of these switches to LD
  4297. *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
  4298. libsuff= shlibsuff= libmagic=32-bit;;
  4299. *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
  4300. libsuff=32 shlibsuff=N32 libmagic=N32;;
  4301. *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
  4302. libsuff=64 shlibsuff=64 libmagic=64-bit;;
  4303. *) libsuff= shlibsuff= libmagic=never-match;;
  4304. esac
  4305. ;;
  4306. esac
  4307. shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  4308. shlibpath_overrides_runpath=no
  4309. sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
  4310. sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
  4311. hardcode_into_libs=yes
  4312. ;;
  4313. # No shared lib support for Linux oldld, aout, or coff.
  4314. linux*oldld* | linux*aout* | linux*coff*)
  4315. dynamic_linker=no
  4316. ;;
  4317. # This must be Linux ELF.
  4318. linux* | k*bsd*-gnu)
  4319. version_type=linux
  4320. need_lib_prefix=no
  4321. need_version=no
  4322. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4323. soname_spec='${libname}${release}${shared_ext}$major'
  4324. finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  4325. shlibpath_var=LD_LIBRARY_PATH
  4326. shlibpath_overrides_runpath=no
  4327. # This implies no fast_install, which is unacceptable.
  4328. # Some rework will be needed to allow for fast_install
  4329. # before this can be enabled.
  4330. hardcode_into_libs=yes
  4331. # Append ld.so.conf contents to the search path
  4332. if test -f /etc/ld.so.conf; then
  4333. lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
  4334. sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
  4335. fi
  4336. # We used to test for /lib/ld.so.1 and disable shared libraries on
  4337. # powerpc, because MkLinux only supported shared libraries with the
  4338. # GNU dynamic linker. Since this was broken with cross compilers,
  4339. # most powerpc-linux boxes support dynamic linking these days and
  4340. # people can always --disable-shared, the test was removed, and we
  4341. # assume the GNU/Linux dynamic linker is in use.
  4342. dynamic_linker='GNU/Linux ld.so'
  4343. ;;
  4344. netbsd*)
  4345. version_type=sunos
  4346. need_lib_prefix=no
  4347. need_version=no
  4348. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  4349. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  4350. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  4351. dynamic_linker='NetBSD (a.out) ld.so'
  4352. else
  4353. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  4354. soname_spec='${libname}${release}${shared_ext}$major'
  4355. dynamic_linker='NetBSD ld.elf_so'
  4356. fi
  4357. shlibpath_var=LD_LIBRARY_PATH
  4358. shlibpath_overrides_runpath=yes
  4359. hardcode_into_libs=yes
  4360. ;;
  4361. newsos6)
  4362. version_type=linux
  4363. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4364. shlibpath_var=LD_LIBRARY_PATH
  4365. shlibpath_overrides_runpath=yes
  4366. ;;
  4367. nto-qnx*)
  4368. version_type=linux
  4369. need_lib_prefix=no
  4370. need_version=no
  4371. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4372. soname_spec='${libname}${release}${shared_ext}$major'
  4373. shlibpath_var=LD_LIBRARY_PATH
  4374. shlibpath_overrides_runpath=yes
  4375. ;;
  4376. openbsd*)
  4377. version_type=sunos
  4378. sys_lib_dlsearch_path_spec="/usr/lib"
  4379. need_lib_prefix=no
  4380. # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
  4381. case $host_os in
  4382. openbsd3.3 | openbsd3.3.*) need_version=yes ;;
  4383. *) need_version=no ;;
  4384. esac
  4385. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  4386. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  4387. shlibpath_var=LD_LIBRARY_PATH
  4388. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  4389. case $host_os in
  4390. openbsd2.[[89]] | openbsd2.[[89]].*)
  4391. shlibpath_overrides_runpath=no
  4392. ;;
  4393. *)
  4394. shlibpath_overrides_runpath=yes
  4395. ;;
  4396. esac
  4397. else
  4398. shlibpath_overrides_runpath=yes
  4399. fi
  4400. ;;
  4401. os2*)
  4402. libname_spec='$name'
  4403. shrext_cmds=".dll"
  4404. need_lib_prefix=no
  4405. library_names_spec='$libname${shared_ext} $libname.a'
  4406. dynamic_linker='OS/2 ld.exe'
  4407. shlibpath_var=LIBPATH
  4408. ;;
  4409. osf3* | osf4* | osf5*)
  4410. version_type=osf
  4411. need_lib_prefix=no
  4412. need_version=no
  4413. soname_spec='${libname}${release}${shared_ext}$major'
  4414. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4415. shlibpath_var=LD_LIBRARY_PATH
  4416. sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  4417. sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  4418. ;;
  4419. rdos*)
  4420. dynamic_linker=no
  4421. ;;
  4422. solaris*)
  4423. version_type=linux
  4424. need_lib_prefix=no
  4425. need_version=no
  4426. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4427. soname_spec='${libname}${release}${shared_ext}$major'
  4428. shlibpath_var=LD_LIBRARY_PATH
  4429. shlibpath_overrides_runpath=yes
  4430. hardcode_into_libs=yes
  4431. # ldd complains unless libraries are executable
  4432. postinstall_cmds='chmod +x $lib'
  4433. ;;
  4434. sunos4*)
  4435. version_type=sunos
  4436. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  4437. finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  4438. shlibpath_var=LD_LIBRARY_PATH
  4439. shlibpath_overrides_runpath=yes
  4440. if test "$with_gnu_ld" = yes; then
  4441. need_lib_prefix=no
  4442. fi
  4443. need_version=yes
  4444. ;;
  4445. sysv4 | sysv4.3*)
  4446. version_type=linux
  4447. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4448. soname_spec='${libname}${release}${shared_ext}$major'
  4449. shlibpath_var=LD_LIBRARY_PATH
  4450. case $host_vendor in
  4451. sni)
  4452. shlibpath_overrides_runpath=no
  4453. need_lib_prefix=no
  4454. export_dynamic_flag_spec='${wl}-Blargedynsym'
  4455. runpath_var=LD_RUN_PATH
  4456. ;;
  4457. siemens)
  4458. need_lib_prefix=no
  4459. ;;
  4460. motorola)
  4461. need_lib_prefix=no
  4462. need_version=no
  4463. shlibpath_overrides_runpath=no
  4464. sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  4465. ;;
  4466. esac
  4467. ;;
  4468. sysv4*MP*)
  4469. if test -d /usr/nec ;then
  4470. version_type=linux
  4471. library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
  4472. soname_spec='$libname${shared_ext}.$major'
  4473. shlibpath_var=LD_LIBRARY_PATH
  4474. fi
  4475. ;;
  4476. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  4477. version_type=freebsd-elf
  4478. need_lib_prefix=no
  4479. need_version=no
  4480. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  4481. soname_spec='${libname}${release}${shared_ext}$major'
  4482. shlibpath_var=LD_LIBRARY_PATH
  4483. hardcode_into_libs=yes
  4484. if test "$with_gnu_ld" = yes; then
  4485. sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
  4486. shlibpath_overrides_runpath=no
  4487. else
  4488. sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
  4489. shlibpath_overrides_runpath=yes
  4490. case $host_os in
  4491. sco3.2v5*)
  4492. sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
  4493. ;;
  4494. esac
  4495. fi
  4496. sys_lib_dlsearch_path_spec='/usr/lib'
  4497. ;;
  4498. uts4*)
  4499. version_type=linux
  4500. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4501. soname_spec='${libname}${release}${shared_ext}$major'
  4502. shlibpath_var=LD_LIBRARY_PATH
  4503. ;;
  4504. *)
  4505. dynamic_linker=no
  4506. ;;
  4507. esac
  4508. AC_MSG_RESULT([$dynamic_linker])
  4509. test "$dynamic_linker" = no && can_build_shared=no
  4510. AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec],
  4511. [lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"])
  4512. sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
  4513. AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec],
  4514. [lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"])
  4515. sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
  4516. variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  4517. if test "$GCC" = yes; then
  4518. variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  4519. fi
  4520. ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
  4521. # _LT_AC_TAGCONFIG
  4522. # ----------------
  4523. AC_DEFUN([_LT_AC_TAGCONFIG],
  4524. [AC_REQUIRE([LT_AC_PROG_SED])dnl
  4525. AC_ARG_WITH([tags],
  4526. [ --with-tags[=TAGS] Include additional configurations [automatic]
  4527. ],
  4528. [tagnames="$withval"])
  4529. if test -f "$ltmain" && test -n "$tagnames"; then
  4530. if test ! -f "${ofile}"; then
  4531. AC_MSG_WARN([output file \`$ofile' does not exist])
  4532. fi
  4533. if test -z "$LTCC"; then
  4534. eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
  4535. if test -z "$LTCC"; then
  4536. AC_MSG_WARN([output file \`$ofile' does not look like a libtool script])
  4537. else
  4538. AC_MSG_WARN([using \`LTCC=$LTCC', extracted from \`$ofile'])
  4539. fi
  4540. fi
  4541. if test -z "$LTCFLAGS"; then
  4542. eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
  4543. fi
  4544. # Extract list of available tagged configurations in $ofile.
  4545. # Note that this assumes the entire list is on one line.
  4546. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
  4547. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  4548. for tagname in $tagnames; do
  4549. IFS="$lt_save_ifs"
  4550. # Check whether tagname contains only valid characters
  4551. case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
  4552. "") ;;
  4553. *) AC_MSG_ERROR([invalid tag name: $tagname])
  4554. ;;
  4555. esac
  4556. if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
  4557. then
  4558. AC_MSG_ERROR([tag name \"$tagname\" already exists])
  4559. fi
  4560. # Update the list of available tags.
  4561. if test -n "$tagname"; then
  4562. echo appending configuration tag \"$tagname\" to $ofile
  4563. case $tagname in
  4564. CXX)
  4565. if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
  4566. ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
  4567. (test "X$CXX" != "Xg++"))) ; then
  4568. AC_LIBTOOL_LANG_CXX_CONFIG
  4569. else
  4570. tagname=""
  4571. fi
  4572. ;;
  4573. *)
  4574. AC_MSG_ERROR([Unsupported tag name: $tagname])
  4575. ;;
  4576. esac
  4577. # Append the new tag name to the list of available tags.
  4578. if test -n "$tagname" ; then
  4579. available_tags="$available_tags $tagname"
  4580. fi
  4581. fi
  4582. done
  4583. IFS="$lt_save_ifs"
  4584. # Now substitute the updated list of available tags.
  4585. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
  4586. mv "${ofile}T" "$ofile"
  4587. chmod +x "$ofile"
  4588. else
  4589. rm -f "${ofile}T"
  4590. AC_MSG_ERROR([unable to update list of available tagged configurations.])
  4591. fi
  4592. fi
  4593. ])# _LT_AC_TAGCONFIG
  4594. # AC_LIBTOOL_DLOPEN
  4595. # -----------------
  4596. # enable checks for dlopen support
  4597. AC_DEFUN([AC_LIBTOOL_DLOPEN],
  4598. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
  4599. ])# AC_LIBTOOL_DLOPEN
  4600. # AC_LIBTOOL_WIN32_DLL
  4601. # --------------------
  4602. # declare package support for building win32 DLLs
  4603. AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
  4604. [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
  4605. ])# AC_LIBTOOL_WIN32_DLL
  4606. # AC_ENABLE_SHARED([DEFAULT])
  4607. # ---------------------------
  4608. # implement the --enable-shared flag
  4609. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  4610. AC_DEFUN([AC_ENABLE_SHARED],
  4611. [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
  4612. AC_ARG_ENABLE([shared],
  4613. changequote(<<, >>)dnl
  4614. << --enable-shared[=PKGS] Build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
  4615. changequote([, ])dnl
  4616. [p=${PACKAGE-default}
  4617. case $enableval in
  4618. yes) enable_shared=yes ;;
  4619. no) enable_shared=no ;;
  4620. *)
  4621. enable_shared=no
  4622. # Look at the argument we got. We use all the common list separators.
  4623. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  4624. for pkg in $enableval; do
  4625. IFS="$lt_save_ifs"
  4626. if test "X$pkg" = "X$p"; then
  4627. enable_shared=yes
  4628. fi
  4629. done
  4630. IFS="$lt_save_ifs"
  4631. ;;
  4632. esac],
  4633. [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
  4634. ])# AC_ENABLE_SHARED
  4635. # AC_DISABLE_SHARED
  4636. # -----------------
  4637. # set the default shared flag to --disable-shared
  4638. AC_DEFUN([AC_DISABLE_SHARED],
  4639. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  4640. AC_ENABLE_SHARED(no)
  4641. ])# AC_DISABLE_SHARED
  4642. # AC_ENABLE_STATIC([DEFAULT])
  4643. # ---------------------------
  4644. # implement the --enable-static flag
  4645. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  4646. AC_DEFUN([AC_ENABLE_STATIC],
  4647. [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
  4648. AC_ARG_ENABLE([static],
  4649. changequote(<<, >>)dnl
  4650. << --enable-static[=PKGS] Build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
  4651. changequote([, ])dnl
  4652. [p=${PACKAGE-default}
  4653. case $enableval in
  4654. yes) enable_static=yes ;;
  4655. no) enable_static=no ;;
  4656. *)
  4657. enable_static=no
  4658. # Look at the argument we got. We use all the common list separators.
  4659. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  4660. for pkg in $enableval; do
  4661. IFS="$lt_save_ifs"
  4662. if test "X$pkg" = "X$p"; then
  4663. enable_static=yes
  4664. fi
  4665. done
  4666. IFS="$lt_save_ifs"
  4667. ;;
  4668. esac],
  4669. [enable_static=]AC_ENABLE_STATIC_DEFAULT)
  4670. ])# AC_ENABLE_STATIC
  4671. # AC_DISABLE_STATIC
  4672. # -----------------
  4673. # set the default static flag to --disable-static
  4674. AC_DEFUN([AC_DISABLE_STATIC],
  4675. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  4676. AC_ENABLE_STATIC(no)
  4677. ])# AC_DISABLE_STATIC
  4678. # AC_ENABLE_FAST_INSTALL([DEFAULT])
  4679. # ---------------------------------
  4680. # implement the --enable-fast-install flag
  4681. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  4682. AC_DEFUN([AC_ENABLE_FAST_INSTALL],
  4683. [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
  4684. AC_ARG_ENABLE([fast-install],
  4685. changequote(<<, >>)dnl
  4686. << --enable-fast-install[=PKGS]
  4687. Optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
  4688. changequote([, ])dnl
  4689. [p=${PACKAGE-default}
  4690. case $enableval in
  4691. yes) enable_fast_install=yes ;;
  4692. no) enable_fast_install=no ;;
  4693. *)
  4694. enable_fast_install=no
  4695. # Look at the argument we got. We use all the common list separators.
  4696. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  4697. for pkg in $enableval; do
  4698. IFS="$lt_save_ifs"
  4699. if test "X$pkg" = "X$p"; then
  4700. enable_fast_install=yes
  4701. fi
  4702. done
  4703. IFS="$lt_save_ifs"
  4704. ;;
  4705. esac],
  4706. [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
  4707. ])# AC_ENABLE_FAST_INSTALL
  4708. # AC_DISABLE_FAST_INSTALL
  4709. # -----------------------
  4710. # set the default to --disable-fast-install
  4711. AC_DEFUN([AC_DISABLE_FAST_INSTALL],
  4712. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  4713. AC_ENABLE_FAST_INSTALL(no)
  4714. ])# AC_DISABLE_FAST_INSTALL
  4715. # AC_LIBTOOL_PICMODE([MODE])
  4716. # --------------------------
  4717. # implement the --with-pic flag
  4718. # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
  4719. AC_DEFUN([AC_LIBTOOL_PICMODE],
  4720. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  4721. pic_mode=ifelse($#,1,$1,default)
  4722. ])# AC_LIBTOOL_PICMODE
  4723. # AC_PROG_EGREP
  4724. # -------------
  4725. ifdef([AC_PROG_EGREP], [], [AC_DEFUN([AC_PROG_EGREP],
  4726. [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
  4727. [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
  4728. then ac_cv_prog_egrep='grep -E'
  4729. else ac_cv_prog_egrep='egrep'
  4730. fi])
  4731. EGREP=$ac_cv_prog_egrep
  4732. AC_SUBST([EGREP])
  4733. ])])
  4734. # AC_PATH_TOOL_PREFIX
  4735. # -------------------
  4736. # find a file program which can recognize shared library
  4737. AC_DEFUN([AC_PATH_TOOL_PREFIX],
  4738. [AC_REQUIRE([AC_PROG_EGREP])dnl
  4739. AC_MSG_CHECKING([for $1])
  4740. AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
  4741. [case $MAGIC_CMD in
  4742. [[\\/*] | ?:[\\/]*])
  4743. lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
  4744. ;;
  4745. *)
  4746. lt_save_MAGIC_CMD="$MAGIC_CMD"
  4747. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  4748. dnl $ac_dummy forces splitting on constant user-supplied paths.
  4749. dnl POSIX.2 word splitting is done only on the output of word expansions,
  4750. dnl not every word. This closes a longstanding sh security hole.
  4751. ac_dummy="ifelse([$2], , $PATH, [$2])"
  4752. for ac_dir in $ac_dummy; do
  4753. IFS="$lt_save_ifs"
  4754. test -z "$ac_dir" && ac_dir=.
  4755. if test -f $ac_dir/$1; then
  4756. lt_cv_path_MAGIC_CMD="$ac_dir/$1"
  4757. if test -n "$file_magic_test_file"; then
  4758. case $deplibs_check_method in
  4759. "file_magic "*)
  4760. file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
  4761. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  4762. if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  4763. $EGREP "$file_magic_regex" > /dev/null; then
  4764. :
  4765. else
  4766. cat <<EOF 1>&2
  4767. *** Warning: the command libtool uses to detect shared libraries,
  4768. *** $file_magic_cmd, produces output that libtool cannot recognize.
  4769. *** The result is that libtool may fail to recognize shared libraries
  4770. *** as such. This will affect the creation of libtool libraries that
  4771. *** depend on shared libraries, but programs linked with such libtool
  4772. *** libraries will work regardless of this problem. Nevertheless, you
  4773. *** may want to report the problem to your system manager and/or to
  4774. *** bug-libtool@gnu.org
  4775. EOF
  4776. fi ;;
  4777. esac
  4778. fi
  4779. break
  4780. fi
  4781. done
  4782. IFS="$lt_save_ifs"
  4783. MAGIC_CMD="$lt_save_MAGIC_CMD"
  4784. ;;
  4785. esac])
  4786. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  4787. if test -n "$MAGIC_CMD"; then
  4788. AC_MSG_RESULT($MAGIC_CMD)
  4789. else
  4790. AC_MSG_RESULT(no)
  4791. fi
  4792. ])# AC_PATH_TOOL_PREFIX
  4793. # AC_PATH_MAGIC
  4794. # -------------
  4795. # find a file program which can recognize a shared library
  4796. AC_DEFUN([AC_PATH_MAGIC],
  4797. [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
  4798. if test -z "$lt_cv_path_MAGIC_CMD"; then
  4799. if test -n "$ac_tool_prefix"; then
  4800. AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
  4801. else
  4802. MAGIC_CMD=:
  4803. fi
  4804. fi
  4805. ])# AC_PATH_MAGIC
  4806. # AC_PROG_LD
  4807. # ----------
  4808. # find the pathname to the GNU or non-GNU linker
  4809. AC_DEFUN([AC_PROG_LD],
  4810. [AC_ARG_WITH([gnu-ld],
  4811. [ --with-gnu-ld Assume the C compiler uses GNU ld [default=no]],
  4812. [test "$withval" = no || with_gnu_ld=yes],
  4813. [with_gnu_ld=no])
  4814. AC_REQUIRE([LT_AC_PROG_SED])dnl
  4815. AC_REQUIRE([AC_PROG_CC])dnl
  4816. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  4817. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  4818. ac_prog=ld
  4819. if test "$GCC" = yes; then
  4820. # Check if gcc -print-prog-name=ld gives a path.
  4821. AC_MSG_CHECKING([for ld used by $CC])
  4822. case $host in
  4823. *-*-mingw*)
  4824. # gcc leaves a trailing carriage return which upsets mingw
  4825. ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  4826. *)
  4827. ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  4828. esac
  4829. case $ac_prog in
  4830. # Accept absolute paths.
  4831. [[\\/]]* | ?:[[\\/]]*)
  4832. re_direlt='/[[^/]][[^/]]*/\.\./'
  4833. # Canonicalize the pathname of ld
  4834. ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
  4835. while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
  4836. ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
  4837. done
  4838. test -z "$LD" && LD="$ac_prog"
  4839. ;;
  4840. "")
  4841. # If it fails, then pretend we aren't using GCC.
  4842. ac_prog=ld
  4843. ;;
  4844. *)
  4845. # If it is relative, then search for the first ld in PATH.
  4846. with_gnu_ld=unknown
  4847. ;;
  4848. esac
  4849. elif test "$with_gnu_ld" = yes; then
  4850. AC_MSG_CHECKING([for GNU ld])
  4851. else
  4852. AC_MSG_CHECKING([for non-GNU ld])
  4853. fi
  4854. AC_CACHE_VAL(lt_cv_path_LD,
  4855. [if test -z "$LD"; then
  4856. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  4857. for ac_dir in $PATH; do
  4858. IFS="$lt_save_ifs"
  4859. test -z "$ac_dir" && ac_dir=.
  4860. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  4861. lt_cv_path_LD="$ac_dir/$ac_prog"
  4862. # Check to see if the program is GNU ld. I'd rather use --version,
  4863. # but apparently some variants of GNU ld only accept -v.
  4864. # Break only if it was the GNU/non-GNU ld that we prefer.
  4865. case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
  4866. *GNU* | *'with BFD'*)
  4867. test "$with_gnu_ld" != no && break
  4868. ;;
  4869. *)
  4870. test "$with_gnu_ld" != yes && break
  4871. ;;
  4872. esac
  4873. fi
  4874. done
  4875. IFS="$lt_save_ifs"
  4876. else
  4877. lt_cv_path_LD="$LD" # Let the user override the test with a path.
  4878. fi])
  4879. LD="$lt_cv_path_LD"
  4880. if test -n "$LD"; then
  4881. AC_MSG_RESULT($LD)
  4882. else
  4883. AC_MSG_RESULT(no)
  4884. fi
  4885. test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  4886. AC_PROG_LD_GNU
  4887. ])# AC_PROG_LD
  4888. # AC_PROG_LD_GNU
  4889. # --------------
  4890. AC_DEFUN([AC_PROG_LD_GNU],
  4891. [AC_REQUIRE([AC_PROG_EGREP])dnl
  4892. AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
  4893. [# I'd rather use --version here, but apparently some GNU lds only accept -v.
  4894. case `$LD -v 2>&1 </dev/null` in
  4895. *GNU* | *'with BFD'*)
  4896. lt_cv_prog_gnu_ld=yes
  4897. ;;
  4898. *)
  4899. lt_cv_prog_gnu_ld=no
  4900. ;;
  4901. esac])
  4902. with_gnu_ld=$lt_cv_prog_gnu_ld
  4903. ])# AC_PROG_LD_GNU
  4904. # AC_PROG_LD_RELOAD_FLAG
  4905. # ----------------------
  4906. # find reload flag for linker
  4907. # -- PORTME Some linkers may need a different reload flag.
  4908. AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
  4909. [AC_CACHE_CHECK([for $LD option to reload object files],
  4910. lt_cv_ld_reload_flag,
  4911. [lt_cv_ld_reload_flag='-r'])
  4912. reload_flag=$lt_cv_ld_reload_flag
  4913. case $reload_flag in
  4914. "" | " "*) ;;
  4915. *) reload_flag=" $reload_flag" ;;
  4916. esac
  4917. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  4918. case $host_os in
  4919. darwin*)
  4920. if test "$GCC" = yes; then
  4921. reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
  4922. else
  4923. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  4924. fi
  4925. ;;
  4926. esac
  4927. ])# AC_PROG_LD_RELOAD_FLAG
  4928. # AC_DEPLIBS_CHECK_METHOD
  4929. # -----------------------
  4930. # how to check for library dependencies
  4931. # -- PORTME fill in with the dynamic library characteristics
  4932. AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
  4933. [AC_CACHE_CHECK([how to recognize dependent libraries],
  4934. lt_cv_deplibs_check_method,
  4935. [lt_cv_file_magic_cmd='$MAGIC_CMD'
  4936. lt_cv_file_magic_test_file=
  4937. lt_cv_deplibs_check_method='unknown'
  4938. # Need to set the preceding variable on all platforms that support
  4939. # interlibrary dependencies.
  4940. # 'none' -- dependencies not supported.
  4941. # `unknown' -- same as none, but documents that we really don't know.
  4942. # 'pass_all' -- all dependencies passed with no checks.
  4943. # 'test_compile' -- check by making test program.
  4944. # 'file_magic [[regex]]' -- check by looking for files in library path
  4945. # which responds to the $file_magic_cmd with a given extended regex.
  4946. # If you have `file' or equivalent on your system and you're not sure
  4947. # whether `pass_all' will *always* work, you probably want this one.
  4948. case $host_os in
  4949. aix[[4-9]]*)
  4950. lt_cv_deplibs_check_method=pass_all
  4951. ;;
  4952. beos*)
  4953. lt_cv_deplibs_check_method=pass_all
  4954. ;;
  4955. bsdi[[45]]*)
  4956. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
  4957. lt_cv_file_magic_cmd='/usr/bin/file -L'
  4958. lt_cv_file_magic_test_file=/shlib/libc.so
  4959. ;;
  4960. cygwin*)
  4961. # func_win32_libid is a shell function defined in ltmain.sh
  4962. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  4963. lt_cv_file_magic_cmd='func_win32_libid'
  4964. ;;
  4965. mingw* | pw32*)
  4966. # Base MSYS/MinGW do not provide the 'file' command needed by
  4967. # func_win32_libid shell function, so use a weaker test based on 'objdump',
  4968. # unless we find 'file', for example because we are cross-compiling.
  4969. if ( file / ) >/dev/null 2>&1; then
  4970. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  4971. lt_cv_file_magic_cmd='func_win32_libid'
  4972. else
  4973. lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
  4974. lt_cv_file_magic_cmd='$OBJDUMP -f'
  4975. fi
  4976. ;;
  4977. darwin* | rhapsody*)
  4978. lt_cv_deplibs_check_method=pass_all
  4979. ;;
  4980. freebsd* | dragonfly*)
  4981. if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  4982. case $host_cpu in
  4983. i*86 )
  4984. # Not sure whether the presence of OpenBSD here was a mistake.
  4985. # Let's accept both of them until this is cleared up.
  4986. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
  4987. lt_cv_file_magic_cmd=/usr/bin/file
  4988. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  4989. ;;
  4990. esac
  4991. else
  4992. lt_cv_deplibs_check_method=pass_all
  4993. fi
  4994. ;;
  4995. gnu*)
  4996. lt_cv_deplibs_check_method=pass_all
  4997. ;;
  4998. hpux10.20* | hpux11*)
  4999. lt_cv_file_magic_cmd=/usr/bin/file
  5000. case $host_cpu in
  5001. ia64*)
  5002. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
  5003. lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
  5004. ;;
  5005. hppa*64*)
  5006. [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]']
  5007. lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
  5008. ;;
  5009. *)
  5010. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
  5011. lt_cv_file_magic_test_file=/usr/lib/libc.sl
  5012. ;;
  5013. esac
  5014. ;;
  5015. interix[[3-9]]*)
  5016. # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
  5017. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
  5018. ;;
  5019. irix5* | irix6* | nonstopux*)
  5020. case $LD in
  5021. *-32|*"-32 ") libmagic=32-bit;;
  5022. *-n32|*"-n32 ") libmagic=N32;;
  5023. *-64|*"-64 ") libmagic=64-bit;;
  5024. *) libmagic=never-match;;
  5025. esac
  5026. lt_cv_deplibs_check_method=pass_all
  5027. ;;
  5028. # This must be Linux ELF.
  5029. linux* | k*bsd*-gnu)
  5030. lt_cv_deplibs_check_method=pass_all
  5031. ;;
  5032. netbsd*)
  5033. if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  5034. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  5035. else
  5036. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
  5037. fi
  5038. ;;
  5039. newos6*)
  5040. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
  5041. lt_cv_file_magic_cmd=/usr/bin/file
  5042. lt_cv_file_magic_test_file=/usr/lib/libnls.so
  5043. ;;
  5044. nto-qnx*)
  5045. lt_cv_deplibs_check_method=unknown
  5046. ;;
  5047. openbsd*)
  5048. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  5049. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
  5050. else
  5051. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  5052. fi
  5053. ;;
  5054. osf3* | osf4* | osf5*)
  5055. lt_cv_deplibs_check_method=pass_all
  5056. ;;
  5057. rdos*)
  5058. lt_cv_deplibs_check_method=pass_all
  5059. ;;
  5060. solaris*)
  5061. lt_cv_deplibs_check_method=pass_all
  5062. ;;
  5063. sysv4 | sysv4.3*)
  5064. case $host_vendor in
  5065. motorola)
  5066. 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]]'
  5067. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  5068. ;;
  5069. ncr)
  5070. lt_cv_deplibs_check_method=pass_all
  5071. ;;
  5072. sequent)
  5073. lt_cv_file_magic_cmd='/bin/file'
  5074. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
  5075. ;;
  5076. sni)
  5077. lt_cv_file_magic_cmd='/bin/file'
  5078. lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
  5079. lt_cv_file_magic_test_file=/lib/libc.so
  5080. ;;
  5081. siemens)
  5082. lt_cv_deplibs_check_method=pass_all
  5083. ;;
  5084. pc)
  5085. lt_cv_deplibs_check_method=pass_all
  5086. ;;
  5087. esac
  5088. ;;
  5089. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  5090. lt_cv_deplibs_check_method=pass_all
  5091. ;;
  5092. esac
  5093. ])
  5094. file_magic_cmd=$lt_cv_file_magic_cmd
  5095. deplibs_check_method=$lt_cv_deplibs_check_method
  5096. test -z "$deplibs_check_method" && deplibs_check_method=unknown
  5097. ])# AC_DEPLIBS_CHECK_METHOD
  5098. # AC_PROG_NM
  5099. # ----------
  5100. # find the pathname to a BSD-compatible name lister
  5101. AC_DEFUN([AC_PROG_NM],
  5102. [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
  5103. [if test -n "$NM"; then
  5104. # Let the user override the test.
  5105. lt_cv_path_NM="$NM"
  5106. else
  5107. lt_nm_to_check="${ac_tool_prefix}nm"
  5108. if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
  5109. lt_nm_to_check="$lt_nm_to_check nm"
  5110. fi
  5111. for lt_tmp_nm in $lt_nm_to_check; do
  5112. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  5113. for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
  5114. IFS="$lt_save_ifs"
  5115. test -z "$ac_dir" && ac_dir=.
  5116. tmp_nm="$ac_dir/$lt_tmp_nm"
  5117. if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
  5118. # Check to see if the nm accepts a BSD-compat flag.
  5119. # Adding the `sed 1q' prevents false positives on HP-UX, which says:
  5120. # nm: unknown option "B" ignored
  5121. # Tru64's nm complains that /dev/null is an invalid object file
  5122. case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
  5123. */dev/null* | *'Invalid file or object type'*)
  5124. lt_cv_path_NM="$tmp_nm -B"
  5125. break
  5126. ;;
  5127. *)
  5128. case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
  5129. */dev/null*)
  5130. lt_cv_path_NM="$tmp_nm -p"
  5131. break
  5132. ;;
  5133. *)
  5134. lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
  5135. continue # so that we can try to find one that supports BSD flags
  5136. ;;
  5137. esac
  5138. ;;
  5139. esac
  5140. fi
  5141. done
  5142. IFS="$lt_save_ifs"
  5143. done
  5144. test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
  5145. fi])
  5146. NM="$lt_cv_path_NM"
  5147. ])# AC_PROG_NM
  5148. # AC_CHECK_LIBM
  5149. # -------------
  5150. # check for math library
  5151. AC_DEFUN([AC_CHECK_LIBM],
  5152. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  5153. LIBM=
  5154. case $host in
  5155. *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
  5156. # These system don't have libm, or don't need it
  5157. ;;
  5158. *-ncr-sysv4.3*)
  5159. AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
  5160. AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
  5161. ;;
  5162. *)
  5163. AC_CHECK_LIB(m, cos, LIBM="-lm")
  5164. ;;
  5165. esac
  5166. ])# AC_CHECK_LIBM
  5167. # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
  5168. # -----------------------------------
  5169. # sets LIBLTDL to the link flags for the libltdl convenience library and
  5170. # LTDLINCL to the include flags for the libltdl header and adds
  5171. # --enable-ltdl-convenience to the configure arguments. Note that
  5172. # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
  5173. # it is assumed to be `libltdl'. LIBLTDL will be prefixed with
  5174. # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
  5175. # (note the single quotes!). If your package is not flat and you're not
  5176. # using automake, define top_builddir and top_srcdir appropriately in
  5177. # the Makefiles.
  5178. AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
  5179. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  5180. case $enable_ltdl_convenience in
  5181. no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
  5182. "") enable_ltdl_convenience=yes
  5183. ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
  5184. esac
  5185. LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
  5186. LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
  5187. # For backwards non-gettext consistent compatibility...
  5188. INCLTDL="$LTDLINCL"
  5189. ])# AC_LIBLTDL_CONVENIENCE
  5190. # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
  5191. # -----------------------------------
  5192. # sets LIBLTDL to the link flags for the libltdl installable library and
  5193. # LTDLINCL to the include flags for the libltdl header and adds
  5194. # --enable-ltdl-install to the configure arguments. Note that
  5195. # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
  5196. # and an installed libltdl is not found, it is assumed to be `libltdl'.
  5197. # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
  5198. # '${top_srcdir}/' (note the single quotes!). If your package is not
  5199. # flat and you're not using automake, define top_builddir and top_srcdir
  5200. # appropriately in the Makefiles.
  5201. # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
  5202. AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
  5203. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  5204. AC_CHECK_LIB(ltdl, lt_dlinit,
  5205. [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
  5206. [if test x"$enable_ltdl_install" = xno; then
  5207. AC_MSG_WARN([libltdl not installed, but installation disabled])
  5208. else
  5209. enable_ltdl_install=yes
  5210. fi
  5211. ])
  5212. if test x"$enable_ltdl_install" = x"yes"; then
  5213. ac_configure_args="$ac_configure_args --enable-ltdl-install"
  5214. LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
  5215. LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
  5216. else
  5217. ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
  5218. LIBLTDL="-lltdl"
  5219. LTDLINCL=
  5220. fi
  5221. # For backwards non-gettext consistent compatibility...
  5222. INCLTDL="$LTDLINCL"
  5223. ])# AC_LIBLTDL_INSTALLABLE
  5224. # AC_LIBTOOL_CXX
  5225. # --------------
  5226. # enable support for C++ libraries
  5227. AC_DEFUN([AC_LIBTOOL_CXX],
  5228. [AC_REQUIRE([_LT_AC_LANG_CXX])
  5229. ])# AC_LIBTOOL_CXX
  5230. # _LT_AC_LANG_CXX
  5231. # ---------------
  5232. AC_DEFUN([_LT_AC_LANG_CXX],
  5233. [AC_REQUIRE([AC_PROG_CXX])
  5234. AC_REQUIRE([_LT_AC_PROG_CXXCPP])
  5235. _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
  5236. ])# _LT_AC_LANG_CXX
  5237. # _LT_AC_PROG_CXXCPP
  5238. # ------------------
  5239. AC_DEFUN([_LT_AC_PROG_CXXCPP],
  5240. [
  5241. AC_REQUIRE([AC_PROG_CXX])
  5242. if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
  5243. ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
  5244. (test "X$CXX" != "Xg++"))) ; then
  5245. AC_PROG_CXXCPP
  5246. fi
  5247. ])# _LT_AC_PROG_CXXCPP
  5248. # AC_LIBTOOL_LANG_C_CONFIG
  5249. # ------------------------
  5250. # Ensure that the configuration vars for the C compiler are
  5251. # suitably defined. Those variables are subsequently used by
  5252. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  5253. AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
  5254. AC_DEFUN([_LT_AC_LANG_C_CONFIG],
  5255. [lt_save_CC="$CC"
  5256. AC_LANG_SAVE
  5257. AC_LANG_C
  5258. # Source file extension for C test sources.
  5259. ac_ext=c
  5260. # Object file extension for compiled C test sources.
  5261. objext=o
  5262. _LT_AC_TAGVAR(objext, $1)=$objext
  5263. # Code to be used in simple compile tests
  5264. lt_simple_compile_test_code="int some_variable = 0;"
  5265. # Code to be used in simple link tests
  5266. lt_simple_link_test_code='int main(){return(0);}'
  5267. _LT_AC_SYS_COMPILER
  5268. # save warnings/boilerplate of simple test code
  5269. _LT_COMPILER_BOILERPLATE
  5270. _LT_LINKER_BOILERPLATE
  5271. ## CAVEAT EMPTOR:
  5272. ## There is no encapsulation within the following macros, do not change
  5273. ## the running order or otherwise move them around unless you know exactly
  5274. ## what you are doing...
  5275. AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
  5276. AC_LIBTOOL_PROG_COMPILER_PIC($1)
  5277. AC_LIBTOOL_PROG_CC_C_O($1)
  5278. AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
  5279. AC_LIBTOOL_PROG_LD_SHLIBS($1)
  5280. AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  5281. AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  5282. AC_LIBTOOL_SYS_LIB_STRIP
  5283. AC_LIBTOOL_DLOPEN_SELF
  5284. # Report which library types will actually be built
  5285. AC_MSG_CHECKING([if libtool supports shared libraries])
  5286. AC_MSG_RESULT([$can_build_shared])
  5287. AC_MSG_CHECKING([whether to build shared libraries])
  5288. test "$can_build_shared" = "no" && enable_shared=no
  5289. # On AIX, shared libraries and static libraries use the same namespace, and
  5290. # are all built from PIC.
  5291. case $host_os in
  5292. aix3*)
  5293. test "$enable_shared" = yes && enable_static=no
  5294. if test -n "$RANLIB"; then
  5295. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  5296. postinstall_cmds='$RANLIB $lib'
  5297. fi
  5298. ;;
  5299. aix[[4-9]]*)
  5300. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  5301. test "$enable_shared" = yes && enable_static=no
  5302. fi
  5303. ;;
  5304. esac
  5305. AC_MSG_RESULT([$enable_shared])
  5306. AC_MSG_CHECKING([whether to build static libraries])
  5307. # Make sure either enable_shared or enable_static is yes.
  5308. test "$enable_shared" = yes || enable_static=yes
  5309. AC_MSG_RESULT([$enable_static])
  5310. AC_LIBTOOL_CONFIG($1)
  5311. AC_LANG_RESTORE
  5312. CC="$lt_save_CC"
  5313. ])# AC_LIBTOOL_LANG_C_CONFIG
  5314. # AC_LIBTOOL_LANG_CXX_CONFIG
  5315. # --------------------------
  5316. # Ensure that the configuration vars for the C compiler are
  5317. # suitably defined. Those variables are subsequently used by
  5318. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  5319. AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
  5320. AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
  5321. [AC_LANG_SAVE
  5322. AC_LANG_CPLUSPLUS
  5323. AC_REQUIRE([AC_PROG_CXX])
  5324. AC_REQUIRE([_LT_AC_PROG_CXXCPP])
  5325. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  5326. _LT_AC_TAGVAR(allow_undefined_flag, $1)=
  5327. _LT_AC_TAGVAR(always_export_symbols, $1)=no
  5328. _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
  5329. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
  5330. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  5331. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
  5332. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  5333. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  5334. _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
  5335. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  5336. _LT_AC_TAGVAR(hardcode_automatic, $1)=no
  5337. _LT_AC_TAGVAR(module_cmds, $1)=
  5338. _LT_AC_TAGVAR(module_expsym_cmds, $1)=
  5339. _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
  5340. _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  5341. _LT_AC_TAGVAR(no_undefined_flag, $1)=
  5342. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  5343. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  5344. # Dependencies to place before and after the object being linked:
  5345. _LT_AC_TAGVAR(predep_objects, $1)=
  5346. _LT_AC_TAGVAR(postdep_objects, $1)=
  5347. _LT_AC_TAGVAR(predeps, $1)=
  5348. _LT_AC_TAGVAR(postdeps, $1)=
  5349. _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
  5350. _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
  5351. # Source file extension for C++ test sources.
  5352. ac_ext=cpp
  5353. # Object file extension for compiled C++ test sources.
  5354. objext=o
  5355. _LT_AC_TAGVAR(objext, $1)=$objext
  5356. # Code to be used in simple compile tests
  5357. lt_simple_compile_test_code="int some_variable = 0;"
  5358. # Code to be used in simple link tests
  5359. lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
  5360. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  5361. _LT_AC_SYS_COMPILER
  5362. # save warnings/boilerplate of simple test code
  5363. _LT_COMPILER_BOILERPLATE
  5364. _LT_LINKER_BOILERPLATE
  5365. # Allow CC to be a program name with arguments.
  5366. lt_save_CC=$CC
  5367. lt_save_LD=$LD
  5368. lt_save_GCC=$GCC
  5369. GCC=$GXX
  5370. lt_save_with_gnu_ld=$with_gnu_ld
  5371. lt_save_path_LD=$lt_cv_path_LD
  5372. if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
  5373. lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
  5374. else
  5375. unset lt_cv_prog_gnu_ld
  5376. fi
  5377. if test -n "${lt_cv_path_LDCXX+set}"; then
  5378. lt_cv_path_LD=$lt_cv_path_LDCXX
  5379. else
  5380. unset lt_cv_path_LD
  5381. fi
  5382. test -z "${LDCXX+set}" || LD=$LDCXX
  5383. CC=${CXX-"c++"}
  5384. compiler=$CC
  5385. _LT_AC_TAGVAR(compiler, $1)=$CC
  5386. _LT_CC_BASENAME([$compiler])
  5387. # We don't want -fno-exception wen compiling C++ code, so set the
  5388. # no_builtin_flag separately
  5389. if test "$GXX" = yes; then
  5390. _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  5391. else
  5392. _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  5393. fi
  5394. if test "$GXX" = yes; then
  5395. # Set up default GNU C++ configuration
  5396. AC_PROG_LD
  5397. # Check if GNU C++ uses GNU ld as the underlying linker, since the
  5398. # archiving commands below assume that GNU ld is being used.
  5399. if test "$with_gnu_ld" = yes; then
  5400. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5401. _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'
  5402. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
  5403. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5404. # If archive_cmds runs LD, not CC, wlarc should be empty
  5405. # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
  5406. # investigate it a little bit more. (MM)
  5407. wlarc='${wl}'
  5408. # ancient GNU ld didn't support --whole-archive et. al.
  5409. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
  5410. grep 'no-whole-archive' > /dev/null; then
  5411. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  5412. else
  5413. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  5414. fi
  5415. else
  5416. with_gnu_ld=no
  5417. wlarc=
  5418. # A generic and very simple default shared library creation
  5419. # command for GNU C++ for the case where it uses the native
  5420. # linker, instead of GNU ld. If possible, this setting should
  5421. # overridden to take advantage of the native linker features on
  5422. # the platform it is being used on.
  5423. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  5424. fi
  5425. # Commands to make compiler produce verbose output that lists
  5426. # what "hidden" libraries, object files and flags are used when
  5427. # linking a shared library.
  5428. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
  5429. else
  5430. GXX=no
  5431. with_gnu_ld=no
  5432. wlarc=
  5433. fi
  5434. # PORTME: fill in a description of your system's C++ link characteristics
  5435. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  5436. _LT_AC_TAGVAR(ld_shlibs, $1)=yes
  5437. case $host_os in
  5438. aix3*)
  5439. # FIXME: insert proper C++ library support
  5440. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5441. ;;
  5442. aix[[4-9]]*)
  5443. if test "$host_cpu" = ia64; then
  5444. # On IA64, the linker does run time linking by default, so we don't
  5445. # have to do anything special.
  5446. aix_use_runtimelinking=no
  5447. exp_sym_flag='-Bexport'
  5448. no_entry_flag=""
  5449. else
  5450. aix_use_runtimelinking=no
  5451. # Test if we are trying to use run time linking or normal
  5452. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  5453. # need to do runtime linking.
  5454. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  5455. for ld_flag in $LDFLAGS; do
  5456. case $ld_flag in
  5457. *-brtl*)
  5458. aix_use_runtimelinking=yes
  5459. break
  5460. ;;
  5461. esac
  5462. done
  5463. ;;
  5464. esac
  5465. exp_sym_flag='-bexport'
  5466. no_entry_flag='-bnoentry'
  5467. fi
  5468. # When large executables or shared objects are built, AIX ld can
  5469. # have problems creating the table of contents. If linking a library
  5470. # or program results in "error TOC overflow" add -mminimal-toc to
  5471. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  5472. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  5473. _LT_AC_TAGVAR(archive_cmds, $1)=''
  5474. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5475. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
  5476. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  5477. if test "$GXX" = yes; then
  5478. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  5479. # We only want to do this on AIX 4.2 and lower, the check
  5480. # below for broken collect2 doesn't work under 4.3+
  5481. collect2name=`${CC} -print-prog-name=collect2`
  5482. if test -f "$collect2name" && \
  5483. strings "$collect2name" | grep resolve_lib_name >/dev/null
  5484. then
  5485. # We have reworked collect2
  5486. :
  5487. else
  5488. # We have old collect2
  5489. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
  5490. # It fails to find uninstalled libraries when the uninstalled
  5491. # path is not listed in the libpath. Setting hardcode_minus_L
  5492. # to unsupported forces relinking
  5493. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5494. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5495. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  5496. fi
  5497. ;;
  5498. esac
  5499. shared_flag='-shared'
  5500. if test "$aix_use_runtimelinking" = yes; then
  5501. shared_flag="$shared_flag "'${wl}-G'
  5502. fi
  5503. else
  5504. # not using gcc
  5505. if test "$host_cpu" = ia64; then
  5506. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  5507. # chokes on -Wl,-G. The following line is correct:
  5508. shared_flag='-G'
  5509. else
  5510. if test "$aix_use_runtimelinking" = yes; then
  5511. shared_flag='${wl}-G'
  5512. else
  5513. shared_flag='${wl}-bM:SRE'
  5514. fi
  5515. fi
  5516. fi
  5517. # It seems that -bexpall does not export symbols beginning with
  5518. # underscore (_), so it is better to generate a list of symbols to export.
  5519. _LT_AC_TAGVAR(always_export_symbols, $1)=yes
  5520. if test "$aix_use_runtimelinking" = yes; then
  5521. # Warning - without using the other runtime loading flags (-brtl),
  5522. # -berok will link without error, but may produce a broken library.
  5523. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
  5524. # Determine the default libpath from the value encoded in an empty executable.
  5525. _LT_AC_SYS_LIBPATH_AIX
  5526. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  5527. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
  5528. else
  5529. if test "$host_cpu" = ia64; then
  5530. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  5531. _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  5532. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
  5533. else
  5534. # Determine the default libpath from the value encoded in an empty executable.
  5535. _LT_AC_SYS_LIBPATH_AIX
  5536. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  5537. # Warning - without using the other run time loading flags,
  5538. # -berok will link without error, but may produce a broken library.
  5539. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  5540. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  5541. # Exported symbols can be pulled into shared objects from archives
  5542. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  5543. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
  5544. # This is similar to how AIX traditionally builds its shared libraries.
  5545. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
  5546. fi
  5547. fi
  5548. ;;
  5549. beos*)
  5550. if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  5551. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  5552. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  5553. # support --undefined. This deserves some investigation. FIXME
  5554. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5555. else
  5556. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5557. fi
  5558. ;;
  5559. chorus*)
  5560. case $cc_basename in
  5561. *)
  5562. # FIXME: insert proper C++ library support
  5563. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5564. ;;
  5565. esac
  5566. ;;
  5567. cygwin* | mingw* | pw32*)
  5568. # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  5569. # as there is no search path for DLLs.
  5570. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5571. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  5572. _LT_AC_TAGVAR(always_export_symbols, $1)=no
  5573. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5574. if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
  5575. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  5576. # If the export-symbols file already is a .def file (1st line
  5577. # is EXPORTS), use it as is; otherwise, prepend...
  5578. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  5579. cp $export_symbols $output_objdir/$soname.def;
  5580. else
  5581. echo EXPORTS > $output_objdir/$soname.def;
  5582. cat $export_symbols >> $output_objdir/$soname.def;
  5583. fi~
  5584. $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  5585. else
  5586. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5587. fi
  5588. ;;
  5589. darwin* | rhapsody*)
  5590. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  5591. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  5592. _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
  5593. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  5594. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
  5595. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  5596. _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
  5597. if test "$GXX" = yes ; then
  5598. output_verbose_link_cmd='echo'
  5599. _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
  5600. _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
  5601. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
  5602. _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
  5603. if test "$lt_cv_apple_cc_single_mod" != "yes"; then
  5604. _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${_lt_dsymutil}"
  5605. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed '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${_lt_dar_export_syms}${_lt_dsymutil}"
  5606. fi
  5607. else
  5608. case $cc_basename in
  5609. xlc*)
  5610. output_verbose_link_cmd='echo'
  5611. _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` $xlcverstring'
  5612. _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
  5613. # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
  5614. _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 $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  5615. _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}'
  5616. ;;
  5617. *)
  5618. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5619. ;;
  5620. esac
  5621. fi
  5622. ;;
  5623. dgux*)
  5624. case $cc_basename in
  5625. ec++*)
  5626. # FIXME: insert proper C++ library support
  5627. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5628. ;;
  5629. ghcx*)
  5630. # Green Hills C++ Compiler
  5631. # FIXME: insert proper C++ library support
  5632. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5633. ;;
  5634. *)
  5635. # FIXME: insert proper C++ library support
  5636. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5637. ;;
  5638. esac
  5639. ;;
  5640. freebsd[[12]].*)
  5641. # C++ shared libraries reported to be fairly broken before switch to ELF
  5642. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5643. ;;
  5644. freebsd-elf*)
  5645. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  5646. ;;
  5647. freebsd* | dragonfly*)
  5648. # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
  5649. # conventions
  5650. _LT_AC_TAGVAR(ld_shlibs, $1)=yes
  5651. ;;
  5652. gnu*)
  5653. ;;
  5654. hpux9*)
  5655. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5656. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5657. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5658. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5659. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  5660. # but as the default
  5661. # location of the library.
  5662. case $cc_basename in
  5663. CC*)
  5664. # FIXME: insert proper C++ library support
  5665. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5666. ;;
  5667. aCC*)
  5668. _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'
  5669. # Commands to make compiler produce verbose output that lists
  5670. # what "hidden" libraries, object files and flags are used when
  5671. # linking a shared library.
  5672. #
  5673. # There doesn't appear to be a way to prevent this compiler from
  5674. # explicitly linking system object files so we need to strip them
  5675. # from the output so that they don't get included in the library
  5676. # dependencies.
  5677. 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'
  5678. ;;
  5679. *)
  5680. if test "$GXX" = yes; then
  5681. _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'
  5682. else
  5683. # FIXME: insert proper C++ library support
  5684. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5685. fi
  5686. ;;
  5687. esac
  5688. ;;
  5689. hpux10*|hpux11*)
  5690. if test $with_gnu_ld = no; then
  5691. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5692. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5693. case $host_cpu in
  5694. hppa*64*|ia64*) ;;
  5695. *)
  5696. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5697. ;;
  5698. esac
  5699. fi
  5700. case $host_cpu in
  5701. hppa*64*|ia64*)
  5702. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  5703. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5704. ;;
  5705. *)
  5706. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5707. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  5708. # but as the default
  5709. # location of the library.
  5710. ;;
  5711. esac
  5712. case $cc_basename in
  5713. CC*)
  5714. # FIXME: insert proper C++ library support
  5715. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5716. ;;
  5717. aCC*)
  5718. case $host_cpu in
  5719. hppa*64*)
  5720. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5721. ;;
  5722. ia64*)
  5723. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5724. ;;
  5725. *)
  5726. _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'
  5727. ;;
  5728. esac
  5729. # Commands to make compiler produce verbose output that lists
  5730. # what "hidden" libraries, object files and flags are used when
  5731. # linking a shared library.
  5732. #
  5733. # There doesn't appear to be a way to prevent this compiler from
  5734. # explicitly linking system object files so we need to strip them
  5735. # from the output so that they don't get included in the library
  5736. # dependencies.
  5737. 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'
  5738. ;;
  5739. *)
  5740. if test "$GXX" = yes; then
  5741. if test $with_gnu_ld = no; then
  5742. case $host_cpu in
  5743. hppa*64*)
  5744. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5745. ;;
  5746. ia64*)
  5747. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5748. ;;
  5749. *)
  5750. _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'
  5751. ;;
  5752. esac
  5753. fi
  5754. else
  5755. # FIXME: insert proper C++ library support
  5756. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5757. fi
  5758. ;;
  5759. esac
  5760. ;;
  5761. interix[[3-9]]*)
  5762. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  5763. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5764. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5765. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5766. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  5767. # Instead, shared libraries are loaded at an image base (0x10000000 by
  5768. # default) and relocated if they conflict, which is a slow very memory
  5769. # consuming and fragmenting process. To avoid this, we pick a random,
  5770. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  5771. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  5772. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
  5773. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
  5774. ;;
  5775. irix5* | irix6*)
  5776. case $cc_basename in
  5777. CC*)
  5778. # SGI C++
  5779. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  5780. # Archives containing C++ object files must be created using
  5781. # "CC -ar", where "CC" is the IRIX C++ compiler. This is
  5782. # necessary to make sure instantiated templates are included
  5783. # in the archive.
  5784. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
  5785. ;;
  5786. *)
  5787. if test "$GXX" = yes; then
  5788. if test "$with_gnu_ld" = no; then
  5789. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  5790. else
  5791. _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'
  5792. fi
  5793. fi
  5794. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  5795. ;;
  5796. esac
  5797. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5798. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5799. ;;
  5800. linux* | k*bsd*-gnu)
  5801. case $cc_basename in
  5802. KCC*)
  5803. # Kuck and Associates, Inc. (KAI) C++ Compiler
  5804. # KCC will only create a shared library if the output file
  5805. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  5806. # to its proper name (with version) after linking.
  5807. _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'
  5808. _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'
  5809. # Commands to make compiler produce verbose output that lists
  5810. # what "hidden" libraries, object files and flags are used when
  5811. # linking a shared library.
  5812. #
  5813. # There doesn't appear to be a way to prevent this compiler from
  5814. # explicitly linking system object files so we need to strip them
  5815. # from the output so that they don't get included in the library
  5816. # dependencies.
  5817. 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'
  5818. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
  5819. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5820. # Archives containing C++ object files must be created using
  5821. # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  5822. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  5823. ;;
  5824. icpc*)
  5825. # Intel C++
  5826. with_gnu_ld=yes
  5827. # version 8.0 and above of icpc choke on multiply defined symbols
  5828. # if we add $predep_objects and $postdep_objects, however 7.1 and
  5829. # earlier do not add the objects themselves.
  5830. case `$CC -V 2>&1` in
  5831. *"Version 7."*)
  5832. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5833. _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'
  5834. ;;
  5835. *) # Version 8.0 or newer
  5836. tmp_idyn=
  5837. case $host_cpu in
  5838. ia64*) tmp_idyn=' -i_dynamic';;
  5839. esac
  5840. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5841. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  5842. ;;
  5843. esac
  5844. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  5845. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5846. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5847. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  5848. ;;
  5849. pgCC* | pgcpp*)
  5850. # Portland Group C++ compiler
  5851. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
  5852. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
  5853. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
  5854. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5855. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
  5856. ;;
  5857. cxx*)
  5858. # Compaq C++
  5859. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5860. _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'
  5861. runpath_var=LD_RUN_PATH
  5862. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  5863. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5864. # Commands to make compiler produce verbose output that lists
  5865. # what "hidden" libraries, object files and flags are used when
  5866. # linking a shared library.
  5867. #
  5868. # There doesn't appear to be a way to prevent this compiler from
  5869. # explicitly linking system object files so we need to strip them
  5870. # from the output so that they don't get included in the library
  5871. # dependencies.
  5872. 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'
  5873. ;;
  5874. *)
  5875. case `$CC -V 2>&1 | sed 5q` in
  5876. *Sun\ C*)
  5877. # Sun C++ 5.9
  5878. _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  5879. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5880. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
  5881. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5882. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
  5883. # Not sure whether something based on
  5884. # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
  5885. # would be better.
  5886. output_verbose_link_cmd='echo'
  5887. # Archives containing C++ object files must be created using
  5888. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  5889. # necessary to make sure instantiated templates are included
  5890. # in the archive.
  5891. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  5892. ;;
  5893. esac
  5894. ;;
  5895. esac
  5896. ;;
  5897. lynxos*)
  5898. # FIXME: insert proper C++ library support
  5899. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5900. ;;
  5901. m88k*)
  5902. # FIXME: insert proper C++ library support
  5903. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5904. ;;
  5905. mvs*)
  5906. case $cc_basename in
  5907. cxx*)
  5908. # FIXME: insert proper C++ library support
  5909. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5910. ;;
  5911. *)
  5912. # FIXME: insert proper C++ library support
  5913. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5914. ;;
  5915. esac
  5916. ;;
  5917. netbsd*)
  5918. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  5919. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
  5920. wlarc=
  5921. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5922. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5923. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5924. fi
  5925. # Workaround some broken pre-1.5 toolchains
  5926. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
  5927. ;;
  5928. openbsd2*)
  5929. # C++ shared libraries are fairly broken
  5930. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5931. ;;
  5932. openbsd*)
  5933. if test -f /usr/libexec/ld.so; then
  5934. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5935. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5936. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  5937. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5938. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  5939. _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'
  5940. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5941. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  5942. fi
  5943. output_verbose_link_cmd='echo'
  5944. else
  5945. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5946. fi
  5947. ;;
  5948. osf3*)
  5949. case $cc_basename in
  5950. KCC*)
  5951. # Kuck and Associates, Inc. (KAI) C++ Compiler
  5952. # KCC will only create a shared library if the output file
  5953. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  5954. # to its proper name (with version) after linking.
  5955. _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'
  5956. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5957. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5958. # Archives containing C++ object files must be created using
  5959. # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  5960. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  5961. ;;
  5962. RCC*)
  5963. # Rational C++ 2.4.1
  5964. # FIXME: insert proper C++ library support
  5965. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5966. ;;
  5967. cxx*)
  5968. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  5969. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  5970. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5971. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5972. # Commands to make compiler produce verbose output that lists
  5973. # what "hidden" libraries, object files and flags are used when
  5974. # linking a shared library.
  5975. #
  5976. # There doesn't appear to be a way to prevent this compiler from
  5977. # explicitly linking system object files so we need to strip them
  5978. # from the output so that they don't get included in the library
  5979. # dependencies.
  5980. 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'
  5981. ;;
  5982. *)
  5983. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  5984. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  5985. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  5986. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5987. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5988. # Commands to make compiler produce verbose output that lists
  5989. # what "hidden" libraries, object files and flags are used when
  5990. # linking a shared library.
  5991. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
  5992. else
  5993. # FIXME: insert proper C++ library support
  5994. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5995. fi
  5996. ;;
  5997. esac
  5998. ;;
  5999. osf4* | osf5*)
  6000. case $cc_basename in
  6001. KCC*)
  6002. # Kuck and Associates, Inc. (KAI) C++ Compiler
  6003. # KCC will only create a shared library if the output file
  6004. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  6005. # to its proper name (with version) after linking.
  6006. _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'
  6007. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  6008. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  6009. # Archives containing C++ object files must be created using
  6010. # the KAI C++ compiler.
  6011. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
  6012. ;;
  6013. RCC*)
  6014. # Rational C++ 2.4.1
  6015. # FIXME: insert proper C++ library support
  6016. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  6017. ;;
  6018. cxx*)
  6019. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  6020. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  6021. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
  6022. echo "-hidden">> $lib.exp~
  6023. $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
  6024. $rm $lib.exp'
  6025. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  6026. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  6027. # Commands to make compiler produce verbose output that lists
  6028. # what "hidden" libraries, object files and flags are used when
  6029. # linking a shared library.
  6030. #
  6031. # There doesn't appear to be a way to prevent this compiler from
  6032. # explicitly linking system object files so we need to strip them
  6033. # from the output so that they don't get included in the library
  6034. # dependencies.
  6035. 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'
  6036. ;;
  6037. *)
  6038. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  6039. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  6040. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  6041. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6042. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  6043. # Commands to make compiler produce verbose output that lists
  6044. # what "hidden" libraries, object files and flags are used when
  6045. # linking a shared library.
  6046. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
  6047. else
  6048. # FIXME: insert proper C++ library support
  6049. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  6050. fi
  6051. ;;
  6052. esac
  6053. ;;
  6054. psos*)
  6055. # FIXME: insert proper C++ library support
  6056. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  6057. ;;
  6058. sunos4*)
  6059. case $cc_basename in
  6060. CC*)
  6061. # Sun C++ 4.x
  6062. # FIXME: insert proper C++ library support
  6063. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  6064. ;;
  6065. lcc*)
  6066. # Lucid
  6067. # FIXME: insert proper C++ library support
  6068. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  6069. ;;
  6070. *)
  6071. # FIXME: insert proper C++ library support
  6072. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  6073. ;;
  6074. esac
  6075. ;;
  6076. solaris*)
  6077. case $cc_basename in
  6078. CC*)
  6079. # Sun C++ 4.2, 5.x and Centerline C++
  6080. _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
  6081. _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  6082. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6083. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  6084. $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
  6085. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6086. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  6087. case $host_os in
  6088. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6089. *)
  6090. # The compiler driver will combine and reorder linker options,
  6091. # but understands `-z linker_flag'.
  6092. # Supported since Solaris 2.6 (maybe 2.5.1?)
  6093. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  6094. ;;
  6095. esac
  6096. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  6097. output_verbose_link_cmd='echo'
  6098. # Archives containing C++ object files must be created using
  6099. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  6100. # necessary to make sure instantiated templates are included
  6101. # in the archive.
  6102. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  6103. ;;
  6104. gcx*)
  6105. # Green Hills C++ Compiler
  6106. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  6107. # The C++ compiler must be used to create the archive.
  6108. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
  6109. ;;
  6110. *)
  6111. # GNU C++ compiler with Solaris linker
  6112. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  6113. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
  6114. if $CC --version | grep -v '^2\.7' > /dev/null; then
  6115. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  6116. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  6117. $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
  6118. # Commands to make compiler produce verbose output that lists
  6119. # what "hidden" libraries, object files and flags are used when
  6120. # linking a shared library.
  6121. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
  6122. else
  6123. # g++ 2.7 appears to require `-G' NOT `-shared' on this
  6124. # platform.
  6125. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  6126. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  6127. $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
  6128. # Commands to make compiler produce verbose output that lists
  6129. # what "hidden" libraries, object files and flags are used when
  6130. # linking a shared library.
  6131. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
  6132. fi
  6133. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
  6134. case $host_os in
  6135. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6136. *)
  6137. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
  6138. ;;
  6139. esac
  6140. fi
  6141. ;;
  6142. esac
  6143. ;;
  6144. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  6145. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  6146. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  6147. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  6148. runpath_var='LD_RUN_PATH'
  6149. case $cc_basename in
  6150. CC*)
  6151. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6152. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6153. ;;
  6154. *)
  6155. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6156. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6157. ;;
  6158. esac
  6159. ;;
  6160. sysv5* | sco3.2v5* | sco5v6*)
  6161. # Note: We can NOT use -z defs as we might desire, because we do not
  6162. # link with -lc, and that would cause any symbols used from libc to
  6163. # always be unresolved, which means just about no library would
  6164. # ever link correctly. If we're not using GNU ld we use -z text
  6165. # though, which does catch some bad symbols but isn't as heavy-handed
  6166. # as -z defs.
  6167. # For security reasons, it is highly recommended that you always
  6168. # use absolute paths for naming shared libraries, and exclude the
  6169. # DT_RUNPATH tag from executables and libraries. But doing so
  6170. # requires that you compile everything twice, which is a pain.
  6171. # So that behaviour is only enabled if SCOABSPATH is set to a
  6172. # non-empty value in the environment. Most likely only useful for
  6173. # creating official distributions of packages.
  6174. # This is a hack until libtool officially supports absolute path
  6175. # names for shared libraries.
  6176. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  6177. _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
  6178. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  6179. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  6180. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
  6181. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
  6182. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  6183. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  6184. runpath_var='LD_RUN_PATH'
  6185. case $cc_basename in
  6186. CC*)
  6187. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
  6188. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
  6189. ;;
  6190. *)
  6191. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
  6192. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
  6193. ;;
  6194. esac
  6195. ;;
  6196. tandem*)
  6197. case $cc_basename in
  6198. NCC*)
  6199. # NonStop-UX NCC 3.20
  6200. # FIXME: insert proper C++ library support
  6201. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  6202. ;;
  6203. *)
  6204. # FIXME: insert proper C++ library support
  6205. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  6206. ;;
  6207. esac
  6208. ;;
  6209. vxworks*)
  6210. # FIXME: insert proper C++ library support
  6211. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  6212. ;;
  6213. *)
  6214. # FIXME: insert proper C++ library support
  6215. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  6216. ;;
  6217. esac
  6218. AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
  6219. test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  6220. _LT_AC_TAGVAR(GCC, $1)="$GXX"
  6221. _LT_AC_TAGVAR(LD, $1)="$LD"
  6222. ## CAVEAT EMPTOR:
  6223. ## There is no encapsulation within the following macros, do not change
  6224. ## the running order or otherwise move them around unless you know exactly
  6225. ## what you are doing...
  6226. AC_LIBTOOL_POSTDEP_PREDEP($1)
  6227. AC_LIBTOOL_PROG_COMPILER_PIC($1)
  6228. AC_LIBTOOL_PROG_CC_C_O($1)
  6229. AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
  6230. AC_LIBTOOL_PROG_LD_SHLIBS($1)
  6231. AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  6232. AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  6233. AC_LIBTOOL_CONFIG($1)
  6234. AC_LANG_RESTORE
  6235. CC=$lt_save_CC
  6236. LDCXX=$LD
  6237. LD=$lt_save_LD
  6238. GCC=$lt_save_GCC
  6239. with_gnu_ldcxx=$with_gnu_ld
  6240. with_gnu_ld=$lt_save_with_gnu_ld
  6241. lt_cv_path_LDCXX=$lt_cv_path_LD
  6242. lt_cv_path_LD=$lt_save_path_LD
  6243. lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
  6244. lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
  6245. ])# AC_LIBTOOL_LANG_CXX_CONFIG
  6246. # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
  6247. # ------------------------------------
  6248. # Figure out "hidden" library dependencies from verbose
  6249. # compiler output when linking a shared library.
  6250. # Parse the compiler output and extract the necessary
  6251. # objects, libraries and library flags.
  6252. AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],
  6253. [AC_REQUIRE([LT_AC_PROG_SED])dnl
  6254. dnl we can't use the lt_simple_compile_test_code here,
  6255. dnl because it contains code intended for an executable,
  6256. dnl not a library. It's possible we should let each
  6257. dnl tag define a new lt_????_link_test_code variable,
  6258. dnl but it's only used here...
  6259. ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
  6260. int a;
  6261. void foo (void) { a = 0; }
  6262. EOF
  6263. ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
  6264. class Foo
  6265. {
  6266. public:
  6267. Foo (void) { a = 0; }
  6268. private:
  6269. int a;
  6270. };
  6271. EOF
  6272. ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
  6273. subroutine foo
  6274. implicit none
  6275. integer*4 a
  6276. a=0
  6277. return
  6278. end
  6279. EOF
  6280. ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
  6281. public class foo {
  6282. private int a;
  6283. public void bar (void) {
  6284. a = 0;
  6285. }
  6286. };
  6287. EOF
  6288. ])
  6289. dnl Parse the compiler output and extract the necessary
  6290. dnl objects, libraries and library flags.
  6291. if AC_TRY_EVAL(ac_compile); then
  6292. # Parse the compiler output and extract the necessary
  6293. # objects, libraries and library flags.
  6294. # Sentinel used to keep track of whether or not we are before
  6295. # the conftest object file.
  6296. pre_test_object_deps_done=no
  6297. # The `*' in the case matches for architectures that use `case' in
  6298. # $output_verbose_cmd can trigger glob expansion during the loop
  6299. # eval without this substitution.
  6300. output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
  6301. for p in `eval $output_verbose_link_cmd`; do
  6302. case $p in
  6303. -L* | -R* | -l*)
  6304. # Some compilers place space between "-{L,R}" and the path.
  6305. # Remove the space.
  6306. if test $p = "-L" \
  6307. || test $p = "-R"; then
  6308. prev=$p
  6309. continue
  6310. else
  6311. prev=
  6312. fi
  6313. if test "$pre_test_object_deps_done" = no; then
  6314. case $p in
  6315. -L* | -R*)
  6316. # Internal compiler library paths should come after those
  6317. # provided the user. The postdeps already come after the
  6318. # user supplied libs so there is no need to process them.
  6319. if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
  6320. _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
  6321. else
  6322. _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
  6323. fi
  6324. ;;
  6325. # The "-l" case would never come before the object being
  6326. # linked, so don't bother handling this case.
  6327. esac
  6328. else
  6329. if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
  6330. _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
  6331. else
  6332. _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
  6333. fi
  6334. fi
  6335. ;;
  6336. *.$objext)
  6337. # This assumes that the test object file only shows up
  6338. # once in the compiler output.
  6339. if test "$p" = "conftest.$objext"; then
  6340. pre_test_object_deps_done=yes
  6341. continue
  6342. fi
  6343. if test "$pre_test_object_deps_done" = no; then
  6344. if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
  6345. _LT_AC_TAGVAR(predep_objects, $1)="$p"
  6346. else
  6347. _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
  6348. fi
  6349. else
  6350. if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
  6351. _LT_AC_TAGVAR(postdep_objects, $1)="$p"
  6352. else
  6353. _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
  6354. fi
  6355. fi
  6356. ;;
  6357. *) ;; # Ignore the rest.
  6358. esac
  6359. done
  6360. # Clean up.
  6361. rm -f a.out a.exe
  6362. else
  6363. echo "libtool.m4: error: problem compiling $1 test program"
  6364. fi
  6365. $rm -f confest.$objext
  6366. _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
  6367. if test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
  6368. _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
  6369. fi
  6370. # PORTME: override above test on systems where it is broken
  6371. ifelse([$1],[CXX],
  6372. [case $host_os in
  6373. interix[[3-9]]*)
  6374. # Interix 3.5 installs completely hosed .la files for C++, so rather than
  6375. # hack all around it, let's just trust "g++" to DTRT.
  6376. _LT_AC_TAGVAR(predep_objects,$1)=
  6377. _LT_AC_TAGVAR(postdep_objects,$1)=
  6378. _LT_AC_TAGVAR(postdeps,$1)=
  6379. ;;
  6380. linux*)
  6381. case `$CC -V 2>&1 | sed 5q` in
  6382. *Sun\ C*)
  6383. # Sun C++ 5.9
  6384. #
  6385. # The more standards-conforming stlport4 library is
  6386. # incompatible with the Cstd library. Avoid specifying
  6387. # it if it's in CXXFLAGS. Ignore libCrun as
  6388. # -library=stlport4 depends on it.
  6389. case " $CXX $CXXFLAGS " in
  6390. *" -library=stlport4 "*)
  6391. solaris_use_stlport4=yes
  6392. ;;
  6393. esac
  6394. if test "$solaris_use_stlport4" != yes; then
  6395. _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
  6396. fi
  6397. ;;
  6398. esac
  6399. ;;
  6400. solaris*)
  6401. case $cc_basename in
  6402. CC*)
  6403. # The more standards-conforming stlport4 library is
  6404. # incompatible with the Cstd library. Avoid specifying
  6405. # it if it's in CXXFLAGS. Ignore libCrun as
  6406. # -library=stlport4 depends on it.
  6407. case " $CXX $CXXFLAGS " in
  6408. *" -library=stlport4 "*)
  6409. solaris_use_stlport4=yes
  6410. ;;
  6411. esac
  6412. # Adding this requires a known-good setup of shared libraries for
  6413. # Sun compiler versions before 5.6, else PIC objects from an old
  6414. # archive will be linked into the output, leading to subtle bugs.
  6415. if test "$solaris_use_stlport4" != yes; then
  6416. _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
  6417. fi
  6418. ;;
  6419. esac
  6420. ;;
  6421. esac
  6422. ])
  6423. case " $_LT_AC_TAGVAR(postdeps, $1) " in
  6424. *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
  6425. esac
  6426. ])# AC_LIBTOOL_POSTDEP_PREDEP
  6427. # AC_LIBTOOL_CONFIG([TAGNAME])
  6428. # ----------------------------
  6429. # If TAGNAME is not passed, then create an initial libtool script
  6430. # with a default configuration from the untagged config vars. Otherwise
  6431. # add code to config.status for appending the configuration named by
  6432. # TAGNAME from the matching tagged config vars.
  6433. AC_DEFUN([AC_LIBTOOL_CONFIG],
  6434. [# The else clause should only fire when bootstrapping the
  6435. # libtool distribution, otherwise you forgot to ship ltmain.sh
  6436. # with your package, and you will get complaints that there are
  6437. # no rules to generate ltmain.sh.
  6438. if test -f "$ltmain"; then
  6439. # See if we are running on zsh, and set the options which allow our commands through
  6440. # without removal of \ escapes.
  6441. if test -n "${ZSH_VERSION+set}" ; then
  6442. setopt NO_GLOB_SUBST
  6443. fi
  6444. # Now quote all the things that may contain metacharacters while being
  6445. # careful not to overquote the AC_SUBSTed values. We take copies of the
  6446. # variables and quote the copies for generation of the libtool script.
  6447. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
  6448. SED SHELL STRIP \
  6449. libname_spec library_names_spec soname_spec extract_expsyms_cmds \
  6450. old_striplib striplib file_magic_cmd finish_cmds finish_eval \
  6451. deplibs_check_method reload_flag reload_cmds need_locks \
  6452. lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
  6453. lt_cv_sys_global_symbol_to_c_name_address \
  6454. sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
  6455. old_postinstall_cmds old_postuninstall_cmds \
  6456. _LT_AC_TAGVAR(compiler, $1) \
  6457. _LT_AC_TAGVAR(CC, $1) \
  6458. _LT_AC_TAGVAR(LD, $1) \
  6459. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
  6460. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
  6461. _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
  6462. _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
  6463. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
  6464. _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
  6465. _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
  6466. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
  6467. _LT_AC_TAGVAR(old_archive_cmds, $1) \
  6468. _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
  6469. _LT_AC_TAGVAR(predep_objects, $1) \
  6470. _LT_AC_TAGVAR(postdep_objects, $1) \
  6471. _LT_AC_TAGVAR(predeps, $1) \
  6472. _LT_AC_TAGVAR(postdeps, $1) \
  6473. _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
  6474. _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \
  6475. _LT_AC_TAGVAR(archive_cmds, $1) \
  6476. _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
  6477. _LT_AC_TAGVAR(postinstall_cmds, $1) \
  6478. _LT_AC_TAGVAR(postuninstall_cmds, $1) \
  6479. _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
  6480. _LT_AC_TAGVAR(allow_undefined_flag, $1) \
  6481. _LT_AC_TAGVAR(no_undefined_flag, $1) \
  6482. _LT_AC_TAGVAR(export_symbols_cmds, $1) \
  6483. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
  6484. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
  6485. _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
  6486. _LT_AC_TAGVAR(hardcode_automatic, $1) \
  6487. _LT_AC_TAGVAR(module_cmds, $1) \
  6488. _LT_AC_TAGVAR(module_expsym_cmds, $1) \
  6489. _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
  6490. _LT_AC_TAGVAR(fix_srcfile_path, $1) \
  6491. _LT_AC_TAGVAR(exclude_expsyms, $1) \
  6492. _LT_AC_TAGVAR(include_expsyms, $1); do
  6493. case $var in
  6494. _LT_AC_TAGVAR(old_archive_cmds, $1) | \
  6495. _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
  6496. _LT_AC_TAGVAR(archive_cmds, $1) | \
  6497. _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
  6498. _LT_AC_TAGVAR(module_cmds, $1) | \
  6499. _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
  6500. _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
  6501. _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
  6502. extract_expsyms_cmds | reload_cmds | finish_cmds | \
  6503. postinstall_cmds | postuninstall_cmds | \
  6504. old_postinstall_cmds | old_postuninstall_cmds | \
  6505. sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
  6506. # Double-quote double-evaled strings.
  6507. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
  6508. ;;
  6509. *)
  6510. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
  6511. ;;
  6512. esac
  6513. done
  6514. case $lt_echo in
  6515. *'\[$]0 --fallback-echo"')
  6516. lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
  6517. ;;
  6518. esac
  6519. ifelse([$1], [],
  6520. [cfgfile="${ofile}T"
  6521. trap "$rm \"$cfgfile\"; exit 1" 1 2 15
  6522. $rm -f "$cfgfile"
  6523. AC_MSG_RESULT([
  6524. creating $ofile])],
  6525. [cfgfile="$ofile"])
  6526. cat <<__EOF__ >> "$cfgfile"
  6527. ifelse([$1], [],
  6528. [#! $SHELL
  6529. # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
  6530. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
  6531. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  6532. #
  6533. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
  6534. # Free Software Foundation, Inc.
  6535. #
  6536. # This file is part of GNU Libtool:
  6537. # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  6538. #
  6539. # This program is free software; you can redistribute it and/or modify
  6540. # it under the terms of the GNU General Public License as published by
  6541. # the Free Software Foundation; either version 2 of the License, or
  6542. # (at your option) any later version.
  6543. #
  6544. # This program is distributed in the hope that it will be useful, but
  6545. # WITHOUT ANY WARRANTY; without even the implied warranty of
  6546. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  6547. # General Public License for more details.
  6548. #
  6549. # You should have received a copy of the GNU General Public License
  6550. # along with this program; if not, write to the Free Software
  6551. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  6552. #
  6553. # As a special exception to the GNU General Public License, if you
  6554. # distribute this file as part of a program that contains a
  6555. # configuration script generated by Autoconf, you may include it under
  6556. # the same distribution terms that you use for the rest of that program.
  6557. # A sed program that does not truncate output.
  6558. SED=$lt_SED
  6559. # Sed that helps us avoid accidentally triggering echo(1) options like -n.
  6560. Xsed="$SED -e 1s/^X//"
  6561. # The HP-UX ksh and POSIX shell print the target directory to stdout
  6562. # if CDPATH is set.
  6563. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  6564. # The names of the tagged configurations supported by this script.
  6565. available_tags=
  6566. # ### BEGIN LIBTOOL CONFIG],
  6567. [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
  6568. # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  6569. # Shell to use when invoking shell scripts.
  6570. SHELL=$lt_SHELL
  6571. # Whether or not to build shared libraries.
  6572. build_libtool_libs=$enable_shared
  6573. # Whether or not to build static libraries.
  6574. build_old_libs=$enable_static
  6575. # Whether or not to add -lc for building shared libraries.
  6576. build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
  6577. # Whether or not to disallow shared libs when runtime libs are static
  6578. allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
  6579. # Whether or not to optimize for fast installation.
  6580. fast_install=$enable_fast_install
  6581. # The host system.
  6582. host_alias=$host_alias
  6583. host=$host
  6584. host_os=$host_os
  6585. # The build system.
  6586. build_alias=$build_alias
  6587. build=$build
  6588. build_os=$build_os
  6589. # An echo program that does not interpret backslashes.
  6590. echo=$lt_echo
  6591. # The archiver.
  6592. AR=$lt_AR
  6593. AR_FLAGS=$lt_AR_FLAGS
  6594. # A C compiler.
  6595. LTCC=$lt_LTCC
  6596. # LTCC compiler flags.
  6597. LTCFLAGS=$lt_LTCFLAGS
  6598. # A language-specific compiler.
  6599. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
  6600. # Is the compiler the GNU C compiler?
  6601. with_gcc=$_LT_AC_TAGVAR(GCC, $1)
  6602. # An ERE matcher.
  6603. EGREP=$lt_EGREP
  6604. # The linker used to build libraries.
  6605. LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
  6606. # Whether we need hard or soft links.
  6607. LN_S=$lt_LN_S
  6608. # A BSD-compatible nm program.
  6609. NM=$lt_NM
  6610. # A symbol stripping program
  6611. STRIP=$lt_STRIP
  6612. # Used to examine libraries when file_magic_cmd begins "file"
  6613. MAGIC_CMD=$MAGIC_CMD
  6614. # Used on cygwin: DLL creation program.
  6615. DLLTOOL="$DLLTOOL"
  6616. # Used on cygwin: object dumper.
  6617. OBJDUMP="$OBJDUMP"
  6618. # Used on cygwin: assembler.
  6619. AS="$AS"
  6620. # The name of the directory that contains temporary libtool files.
  6621. objdir=$objdir
  6622. # How to create reloadable object files.
  6623. reload_flag=$lt_reload_flag
  6624. reload_cmds=$lt_reload_cmds
  6625. # How to pass a linker flag through the compiler.
  6626. wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
  6627. # Object file suffix (normally "o").
  6628. objext="$ac_objext"
  6629. # Old archive suffix (normally "a").
  6630. libext="$libext"
  6631. # Shared library suffix (normally ".so").
  6632. shrext_cmds='$shrext_cmds'
  6633. # Executable file suffix (normally "").
  6634. exeext="$exeext"
  6635. # Additional compiler flags for building library objects.
  6636. pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
  6637. pic_mode=$pic_mode
  6638. # What is the maximum length of a command?
  6639. max_cmd_len=$lt_cv_sys_max_cmd_len
  6640. # Does compiler simultaneously support -c and -o options?
  6641. compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
  6642. # Must we lock files when doing compilation?
  6643. need_locks=$lt_need_locks
  6644. # Do we need the lib prefix for modules?
  6645. need_lib_prefix=$need_lib_prefix
  6646. # Do we need a version for libraries?
  6647. need_version=$need_version
  6648. # Whether dlopen is supported.
  6649. dlopen_support=$enable_dlopen
  6650. # Whether dlopen of programs is supported.
  6651. dlopen_self=$enable_dlopen_self
  6652. # Whether dlopen of statically linked programs is supported.
  6653. dlopen_self_static=$enable_dlopen_self_static
  6654. # Compiler flag to prevent dynamic linking.
  6655. link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
  6656. # Compiler flag to turn off builtin functions.
  6657. no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
  6658. # Compiler flag to allow reflexive dlopens.
  6659. export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
  6660. # Compiler flag to generate shared objects directly from archives.
  6661. whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
  6662. # Compiler flag to generate thread-safe objects.
  6663. thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
  6664. # Library versioning type.
  6665. version_type=$version_type
  6666. # Format of library name prefix.
  6667. libname_spec=$lt_libname_spec
  6668. # List of archive names. First name is the real one, the rest are links.
  6669. # The last name is the one that the linker finds with -lNAME.
  6670. library_names_spec=$lt_library_names_spec
  6671. # The coded name of the library, if different from the real name.
  6672. soname_spec=$lt_soname_spec
  6673. # Commands used to build and install an old-style archive.
  6674. RANLIB=$lt_RANLIB
  6675. old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
  6676. old_postinstall_cmds=$lt_old_postinstall_cmds
  6677. old_postuninstall_cmds=$lt_old_postuninstall_cmds
  6678. # Create an old-style archive from a shared archive.
  6679. old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
  6680. # Create a temporary old-style archive to link instead of a shared archive.
  6681. old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
  6682. # Commands used to build and install a shared archive.
  6683. archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
  6684. archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
  6685. postinstall_cmds=$lt_postinstall_cmds
  6686. postuninstall_cmds=$lt_postuninstall_cmds
  6687. # Commands used to build a loadable module (assumed same as above if empty)
  6688. module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
  6689. module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
  6690. # Commands to strip libraries.
  6691. old_striplib=$lt_old_striplib
  6692. striplib=$lt_striplib
  6693. # Dependencies to place before the objects being linked to create a
  6694. # shared library.
  6695. predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
  6696. # Dependencies to place after the objects being linked to create a
  6697. # shared library.
  6698. postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
  6699. # Dependencies to place before the objects being linked to create a
  6700. # shared library.
  6701. predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
  6702. # Dependencies to place after the objects being linked to create a
  6703. # shared library.
  6704. postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
  6705. # The directories searched by this compiler when creating a shared
  6706. # library
  6707. compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)
  6708. # The library search path used internally by the compiler when linking
  6709. # a shared library.
  6710. compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
  6711. # Method to check whether dependent libraries are shared objects.
  6712. deplibs_check_method=$lt_deplibs_check_method
  6713. # Command to use when deplibs_check_method == file_magic.
  6714. file_magic_cmd=$lt_file_magic_cmd
  6715. # Flag that allows shared libraries with undefined symbols to be built.
  6716. allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
  6717. # Flag that forces no undefined symbols.
  6718. no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
  6719. # Commands used to finish a libtool library installation in a directory.
  6720. finish_cmds=$lt_finish_cmds
  6721. # Same as above, but a single script fragment to be evaled but not shown.
  6722. finish_eval=$lt_finish_eval
  6723. # Take the output of nm and produce a listing of raw symbols and C names.
  6724. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
  6725. # Transform the output of nm in a proper C declaration
  6726. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
  6727. # Transform the output of nm in a C name address pair
  6728. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
  6729. # This is the shared library runtime path variable.
  6730. runpath_var=$runpath_var
  6731. # This is the shared library path variable.
  6732. shlibpath_var=$shlibpath_var
  6733. # Is shlibpath searched before the hard-coded library search path?
  6734. shlibpath_overrides_runpath=$shlibpath_overrides_runpath
  6735. # How to hardcode a shared library path into an executable.
  6736. hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
  6737. # Whether we should hardcode library paths into libraries.
  6738. hardcode_into_libs=$hardcode_into_libs
  6739. # Flag to hardcode \$libdir into a binary during linking.
  6740. # This must work even if \$libdir does not exist.
  6741. hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
  6742. # If ld is used when linking, flag to hardcode \$libdir into
  6743. # a binary during linking. This must work even if \$libdir does
  6744. # not exist.
  6745. hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
  6746. # Whether we need a single -rpath flag with a separated argument.
  6747. hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
  6748. # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
  6749. # resulting binary.
  6750. hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
  6751. # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
  6752. # resulting binary.
  6753. hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
  6754. # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
  6755. # the resulting binary.
  6756. hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
  6757. # Set to yes if building a shared library automatically hardcodes DIR into the library
  6758. # and all subsequent libraries and executables linked against it.
  6759. hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
  6760. # Variables whose values should be saved in libtool wrapper scripts and
  6761. # restored at relink time.
  6762. variables_saved_for_relink="$variables_saved_for_relink"
  6763. # Whether libtool must link a program against all its dependency libraries.
  6764. link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
  6765. # Compile-time system search path for libraries
  6766. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
  6767. # Run-time system search path for libraries
  6768. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
  6769. # Fix the shell variable \$srcfile for the compiler.
  6770. fix_srcfile_path=$lt_fix_srcfile_path
  6771. # Set to yes if exported symbols are required.
  6772. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
  6773. # The commands to list exported symbols.
  6774. export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
  6775. # The commands to extract the exported symbol list from a shared archive.
  6776. extract_expsyms_cmds=$lt_extract_expsyms_cmds
  6777. # Symbols that should not be listed in the preloaded symbols.
  6778. exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
  6779. # Symbols that must always be exported.
  6780. include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
  6781. ifelse([$1],[],
  6782. [# ### END LIBTOOL CONFIG],
  6783. [# ### END LIBTOOL TAG CONFIG: $tagname])
  6784. __EOF__
  6785. ifelse([$1],[], [
  6786. case $host_os in
  6787. aix3*)
  6788. cat <<\EOF >> "$cfgfile"
  6789. # AIX sometimes has problems with the GCC collect2 program. For some
  6790. # reason, if we set the COLLECT_NAMES environment variable, the problems
  6791. # vanish in a puff of smoke.
  6792. if test "X${COLLECT_NAMES+set}" != Xset; then
  6793. COLLECT_NAMES=
  6794. export COLLECT_NAMES
  6795. fi
  6796. EOF
  6797. ;;
  6798. esac
  6799. # We use sed instead of cat because bash on DJGPP gets confused if
  6800. # if finds mixed CR/LF and LF-only lines. Since sed operates in
  6801. # text mode, it properly converts lines to CR/LF. This bash problem
  6802. # is reportedly fixed, but why not run on old versions too?
  6803. sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
  6804. mv -f "$cfgfile" "$ofile" || \
  6805. (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
  6806. chmod +x "$ofile"
  6807. ])
  6808. else
  6809. # If there is no Makefile yet, we rely on a make rule to execute
  6810. # `config.status --recheck' to rerun these tests and create the
  6811. # libtool script then.
  6812. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
  6813. if test -f "$ltmain_in"; then
  6814. test -f Makefile && make "$ltmain"
  6815. fi
  6816. fi
  6817. ])# AC_LIBTOOL_CONFIG
  6818. # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
  6819. # -------------------------------------------
  6820. AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
  6821. [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
  6822. _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  6823. if test "$GCC" = yes; then
  6824. _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  6825. AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
  6826. lt_cv_prog_compiler_rtti_exceptions,
  6827. [-fno-rtti -fno-exceptions], [],
  6828. [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
  6829. fi
  6830. ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
  6831. # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
  6832. # ---------------------------------
  6833. AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
  6834. [AC_REQUIRE([AC_CANONICAL_HOST])
  6835. AC_REQUIRE([LT_AC_PROG_SED])
  6836. AC_REQUIRE([AC_PROG_NM])
  6837. AC_REQUIRE([AC_OBJEXT])
  6838. # Check for command to grab the raw symbol name followed by C symbol from nm.
  6839. AC_MSG_CHECKING([command to parse $NM output from $compiler object])
  6840. AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
  6841. [
  6842. # These are sane defaults that work on at least a few old systems.
  6843. # [They come from Ultrix. What could be older than Ultrix?!! ;)]
  6844. # Character class describing NM global symbol codes.
  6845. symcode='[[BCDEGRST]]'
  6846. # Regexp to match symbols that can be accessed directly from C.
  6847. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
  6848. # Transform an extracted symbol line into a proper C declaration
  6849. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
  6850. # Transform an extracted symbol line into symbol name and symbol address
  6851. lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
  6852. # Define system-specific variables.
  6853. case $host_os in
  6854. aix*)
  6855. symcode='[[BCDT]]'
  6856. ;;
  6857. cygwin* | mingw* | pw32*)
  6858. symcode='[[ABCDGISTW]]'
  6859. ;;
  6860. hpux*) # Its linker distinguishes data from code symbols
  6861. if test "$host_cpu" = ia64; then
  6862. symcode='[[ABCDEGRST]]'
  6863. fi
  6864. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  6865. lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
  6866. ;;
  6867. linux* | k*bsd*-gnu)
  6868. if test "$host_cpu" = ia64; then
  6869. symcode='[[ABCDGIRSTW]]'
  6870. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  6871. lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
  6872. fi
  6873. ;;
  6874. irix* | nonstopux*)
  6875. symcode='[[BCDEGRST]]'
  6876. ;;
  6877. osf*)
  6878. symcode='[[BCDEGQRST]]'
  6879. ;;
  6880. solaris*)
  6881. symcode='[[BDRT]]'
  6882. ;;
  6883. sco3.2v5*)
  6884. symcode='[[DT]]'
  6885. ;;
  6886. sysv4.2uw2*)
  6887. symcode='[[DT]]'
  6888. ;;
  6889. sysv5* | sco5v6* | unixware* | OpenUNIX*)
  6890. symcode='[[ABDT]]'
  6891. ;;
  6892. sysv4)
  6893. symcode='[[DFNSTU]]'
  6894. ;;
  6895. esac
  6896. # Handle CRLF in mingw tool chain
  6897. opt_cr=
  6898. case $build_os in
  6899. mingw*)
  6900. opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  6901. ;;
  6902. esac
  6903. # If we're using GNU nm, then use its standard symbol codes.
  6904. case `$NM -V 2>&1` in
  6905. *GNU* | *'with BFD'*)
  6906. symcode='[[ABCDGIRSTW]]' ;;
  6907. esac
  6908. # Try without a prefix undercore, then with it.
  6909. for ac_symprfx in "" "_"; do
  6910. # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
  6911. symxfrm="\\1 $ac_symprfx\\2 \\2"
  6912. # Write the raw and C identifiers.
  6913. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
  6914. # Check to see that the pipe works correctly.
  6915. pipe_works=no
  6916. rm -f conftest*
  6917. cat > conftest.$ac_ext <<EOF
  6918. #ifdef __cplusplus
  6919. extern "C" {
  6920. #endif
  6921. char nm_test_var;
  6922. void nm_test_func(){}
  6923. #ifdef __cplusplus
  6924. }
  6925. #endif
  6926. int main(){nm_test_var='a';nm_test_func();return(0);}
  6927. EOF
  6928. if AC_TRY_EVAL(ac_compile); then
  6929. # Now try to grab the symbols.
  6930. nlist=conftest.nm
  6931. if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
  6932. # Try sorting and uniquifying the output.
  6933. if sort "$nlist" | uniq > "$nlist"T; then
  6934. mv -f "$nlist"T "$nlist"
  6935. else
  6936. rm -f "$nlist"T
  6937. fi
  6938. # Make sure that we snagged all the symbols we need.
  6939. if grep ' nm_test_var$' "$nlist" >/dev/null; then
  6940. if grep ' nm_test_func$' "$nlist" >/dev/null; then
  6941. cat <<EOF > conftest.$ac_ext
  6942. #ifdef __cplusplus
  6943. extern "C" {
  6944. #endif
  6945. EOF
  6946. # Now generate the symbol file.
  6947. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
  6948. cat <<EOF >> conftest.$ac_ext
  6949. #if defined (__STDC__) && __STDC__
  6950. # define lt_ptr_t void *
  6951. #else
  6952. # define lt_ptr_t char *
  6953. # define const
  6954. #endif
  6955. /* The mapping between symbol names and symbols. */
  6956. const struct {
  6957. const char *name;
  6958. lt_ptr_t address;
  6959. }
  6960. lt_preloaded_symbols[[]] =
  6961. {
  6962. EOF
  6963. $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
  6964. cat <<\EOF >> conftest.$ac_ext
  6965. {0, (lt_ptr_t) 0}
  6966. };
  6967. #ifdef __cplusplus
  6968. }
  6969. #endif
  6970. EOF
  6971. # Now try linking the two files.
  6972. mv conftest.$ac_objext conftstm.$ac_objext
  6973. lt_save_LIBS="$LIBS"
  6974. lt_save_CFLAGS="$CFLAGS"
  6975. LIBS="conftstm.$ac_objext"
  6976. CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
  6977. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
  6978. pipe_works=yes
  6979. fi
  6980. LIBS="$lt_save_LIBS"
  6981. CFLAGS="$lt_save_CFLAGS"
  6982. else
  6983. echo "cannot find nm_test_func in $nlist" >&5
  6984. fi
  6985. else
  6986. echo "cannot find nm_test_var in $nlist" >&5
  6987. fi
  6988. else
  6989. echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
  6990. fi
  6991. else
  6992. echo "$progname: failed program was:" >&5
  6993. cat conftest.$ac_ext >&5
  6994. fi
  6995. rm -rf conftest* conftst*
  6996. # Do not use the global_symbol_pipe unless it works.
  6997. if test "$pipe_works" = yes; then
  6998. break
  6999. else
  7000. lt_cv_sys_global_symbol_pipe=
  7001. fi
  7002. done
  7003. ])
  7004. if test -z "$lt_cv_sys_global_symbol_pipe"; then
  7005. lt_cv_sys_global_symbol_to_cdecl=
  7006. fi
  7007. if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
  7008. AC_MSG_RESULT(failed)
  7009. else
  7010. AC_MSG_RESULT(ok)
  7011. fi
  7012. ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
  7013. # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
  7014. # ---------------------------------------
  7015. AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
  7016. [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
  7017. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  7018. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
  7019. AC_MSG_CHECKING([for $compiler option to produce PIC])
  7020. ifelse([$1],[CXX],[
  7021. # C++ specific cases for pic, static, wl, etc.
  7022. if test "$GXX" = yes; then
  7023. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7024. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  7025. case $host_os in
  7026. aix*)
  7027. # All AIX code is PIC.
  7028. if test "$host_cpu" = ia64; then
  7029. # AIX 5 now supports IA64 processor
  7030. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  7031. fi
  7032. ;;
  7033. amigaos*)
  7034. # FIXME: we need at least 68020 code to build shared libraries, but
  7035. # adding the `-m68020' flag to GCC prevents building anything better,
  7036. # like `-m68040'.
  7037. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  7038. ;;
  7039. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  7040. # PIC is the default for these OSes.
  7041. ;;
  7042. mingw* | cygwin* | os2* | pw32*)
  7043. # This hack is so that the source file can tell whether it is being
  7044. # built for inclusion in a dll (and should export symbols for example).
  7045. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  7046. # (--disable-auto-import) libraries
  7047. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
  7048. ;;
  7049. darwin* | rhapsody*)
  7050. # PIC is the default on this platform
  7051. # Common symbols not allowed in MH_DYLIB files
  7052. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  7053. ;;
  7054. *djgpp*)
  7055. # DJGPP does not support shared libraries at all
  7056. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  7057. ;;
  7058. interix[[3-9]]*)
  7059. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  7060. # Instead, we relocate shared libraries at runtime.
  7061. ;;
  7062. sysv4*MP*)
  7063. if test -d /usr/nec; then
  7064. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  7065. fi
  7066. ;;
  7067. hpux*)
  7068. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  7069. # not for PA HP-UX.
  7070. case $host_cpu in
  7071. hppa*64*|ia64*)
  7072. ;;
  7073. *)
  7074. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  7075. ;;
  7076. esac
  7077. ;;
  7078. *)
  7079. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  7080. ;;
  7081. esac
  7082. else
  7083. case $host_os in
  7084. aix[[4-9]]*)
  7085. # All AIX code is PIC.
  7086. if test "$host_cpu" = ia64; then
  7087. # AIX 5 now supports IA64 processor
  7088. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  7089. else
  7090. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  7091. fi
  7092. ;;
  7093. chorus*)
  7094. case $cc_basename in
  7095. cxch68*)
  7096. # Green Hills C++ Compiler
  7097. # _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"
  7098. ;;
  7099. esac
  7100. ;;
  7101. darwin*)
  7102. # PIC is the default on this platform
  7103. # Common symbols not allowed in MH_DYLIB files
  7104. case $cc_basename in
  7105. xlc*)
  7106. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
  7107. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7108. ;;
  7109. esac
  7110. ;;
  7111. dgux*)
  7112. case $cc_basename in
  7113. ec++*)
  7114. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  7115. ;;
  7116. ghcx*)
  7117. # Green Hills C++ Compiler
  7118. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  7119. ;;
  7120. *)
  7121. ;;
  7122. esac
  7123. ;;
  7124. freebsd* | dragonfly*)
  7125. # FreeBSD uses GNU C++
  7126. ;;
  7127. hpux9* | hpux10* | hpux11*)
  7128. case $cc_basename in
  7129. CC*)
  7130. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7131. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  7132. if test "$host_cpu" != ia64; then
  7133. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  7134. fi
  7135. ;;
  7136. aCC*)
  7137. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7138. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  7139. case $host_cpu in
  7140. hppa*64*|ia64*)
  7141. # +Z the default
  7142. ;;
  7143. *)
  7144. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  7145. ;;
  7146. esac
  7147. ;;
  7148. *)
  7149. ;;
  7150. esac
  7151. ;;
  7152. interix*)
  7153. # This is c89, which is MS Visual C++ (no shared libs)
  7154. # Anyone wants to do a port?
  7155. ;;
  7156. irix5* | irix6* | nonstopux*)
  7157. case $cc_basename in
  7158. CC*)
  7159. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7160. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  7161. # CC pic flag -KPIC is the default.
  7162. ;;
  7163. *)
  7164. ;;
  7165. esac
  7166. ;;
  7167. linux* | k*bsd*-gnu)
  7168. case $cc_basename in
  7169. KCC*)
  7170. # KAI C++ Compiler
  7171. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  7172. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  7173. ;;
  7174. ecpc*)
  7175. # old Intel C++ for x86_64 which still supported -KPIC.
  7176. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7177. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  7178. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  7179. ;;
  7180. icpc*)
  7181. # Intel C++, used to be incompatible with GCC.
  7182. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7183. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  7184. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  7185. ;;
  7186. pgCC* | pgcpp*)
  7187. # Portland Group C++ compiler.
  7188. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7189. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  7190. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  7191. ;;
  7192. cxx*)
  7193. # Compaq C++
  7194. # Make sure the PIC flag is empty. It appears that all Alpha
  7195. # Linux and Compaq Tru64 Unix objects are PIC.
  7196. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  7197. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  7198. ;;
  7199. *)
  7200. case `$CC -V 2>&1 | sed 5q` in
  7201. *Sun\ C*)
  7202. # Sun C++ 5.9
  7203. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  7204. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  7205. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  7206. ;;
  7207. esac
  7208. ;;
  7209. esac
  7210. ;;
  7211. lynxos*)
  7212. ;;
  7213. m88k*)
  7214. ;;
  7215. mvs*)
  7216. case $cc_basename in
  7217. cxx*)
  7218. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
  7219. ;;
  7220. *)
  7221. ;;
  7222. esac
  7223. ;;
  7224. netbsd*)
  7225. ;;
  7226. osf3* | osf4* | osf5*)
  7227. case $cc_basename in
  7228. KCC*)
  7229. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  7230. ;;
  7231. RCC*)
  7232. # Rational C++ 2.4.1
  7233. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  7234. ;;
  7235. cxx*)
  7236. # Digital/Compaq C++
  7237. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7238. # Make sure the PIC flag is empty. It appears that all Alpha
  7239. # Linux and Compaq Tru64 Unix objects are PIC.
  7240. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  7241. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  7242. ;;
  7243. *)
  7244. ;;
  7245. esac
  7246. ;;
  7247. psos*)
  7248. ;;
  7249. solaris*)
  7250. case $cc_basename in
  7251. CC*)
  7252. # Sun C++ 4.2, 5.x and Centerline C++
  7253. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  7254. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  7255. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  7256. ;;
  7257. gcx*)
  7258. # Green Hills C++ Compiler
  7259. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  7260. ;;
  7261. *)
  7262. ;;
  7263. esac
  7264. ;;
  7265. sunos4*)
  7266. case $cc_basename in
  7267. CC*)
  7268. # Sun C++ 4.x
  7269. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  7270. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  7271. ;;
  7272. lcc*)
  7273. # Lucid
  7274. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  7275. ;;
  7276. *)
  7277. ;;
  7278. esac
  7279. ;;
  7280. tandem*)
  7281. case $cc_basename in
  7282. NCC*)
  7283. # NonStop-UX NCC 3.20
  7284. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  7285. ;;
  7286. *)
  7287. ;;
  7288. esac
  7289. ;;
  7290. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  7291. case $cc_basename in
  7292. CC*)
  7293. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7294. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  7295. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  7296. ;;
  7297. esac
  7298. ;;
  7299. vxworks*)
  7300. ;;
  7301. *)
  7302. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  7303. ;;
  7304. esac
  7305. fi
  7306. ],
  7307. [
  7308. if test "$GCC" = yes; then
  7309. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7310. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  7311. case $host_os in
  7312. aix*)
  7313. # All AIX code is PIC.
  7314. if test "$host_cpu" = ia64; then
  7315. # AIX 5 now supports IA64 processor
  7316. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  7317. fi
  7318. ;;
  7319. amigaos*)
  7320. # FIXME: we need at least 68020 code to build shared libraries, but
  7321. # adding the `-m68020' flag to GCC prevents building anything better,
  7322. # like `-m68040'.
  7323. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  7324. ;;
  7325. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  7326. # PIC is the default for these OSes.
  7327. ;;
  7328. mingw* | cygwin* | pw32* | os2*)
  7329. # This hack is so that the source file can tell whether it is being
  7330. # built for inclusion in a dll (and should export symbols for example).
  7331. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  7332. # (--disable-auto-import) libraries
  7333. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
  7334. ;;
  7335. darwin* | rhapsody*)
  7336. # PIC is the default on this platform
  7337. # Common symbols not allowed in MH_DYLIB files
  7338. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  7339. ;;
  7340. interix[[3-9]]*)
  7341. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  7342. # Instead, we relocate shared libraries at runtime.
  7343. ;;
  7344. msdosdjgpp*)
  7345. # Just because we use GCC doesn't mean we suddenly get shared libraries
  7346. # on systems that don't support them.
  7347. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  7348. enable_shared=no
  7349. ;;
  7350. sysv4*MP*)
  7351. if test -d /usr/nec; then
  7352. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  7353. fi
  7354. ;;
  7355. hpux*)
  7356. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  7357. # not for PA HP-UX.
  7358. case $host_cpu in
  7359. hppa*64*|ia64*)
  7360. # +Z the default
  7361. ;;
  7362. *)
  7363. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  7364. ;;
  7365. esac
  7366. ;;
  7367. *)
  7368. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  7369. ;;
  7370. esac
  7371. else
  7372. # PORTME Check for flag to pass linker flags through the system compiler.
  7373. case $host_os in
  7374. aix*)
  7375. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7376. if test "$host_cpu" = ia64; then
  7377. # AIX 5 now supports IA64 processor
  7378. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  7379. else
  7380. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  7381. fi
  7382. ;;
  7383. darwin*)
  7384. # PIC is the default on this platform
  7385. # Common symbols not allowed in MH_DYLIB files
  7386. case $cc_basename in
  7387. xlc*)
  7388. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
  7389. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7390. ;;
  7391. esac
  7392. ;;
  7393. mingw* | cygwin* | pw32* | os2*)
  7394. # This hack is so that the source file can tell whether it is being
  7395. # built for inclusion in a dll (and should export symbols for example).
  7396. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
  7397. ;;
  7398. hpux9* | hpux10* | hpux11*)
  7399. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7400. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  7401. # not for PA HP-UX.
  7402. case $host_cpu in
  7403. hppa*64*|ia64*)
  7404. # +Z the default
  7405. ;;
  7406. *)
  7407. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  7408. ;;
  7409. esac
  7410. # Is there a better lt_prog_compiler_static that works with the bundled CC?
  7411. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  7412. ;;
  7413. irix5* | irix6* | nonstopux*)
  7414. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7415. # PIC (with -KPIC) is the default.
  7416. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  7417. ;;
  7418. newsos6)
  7419. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  7420. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  7421. ;;
  7422. linux* | k*bsd*-gnu)
  7423. case $cc_basename in
  7424. # old Intel for x86_64 which still supported -KPIC.
  7425. ecc*)
  7426. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7427. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  7428. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  7429. ;;
  7430. # icc used to be incompatible with GCC.
  7431. # ICC 10 doesn't accept -KPIC any more.
  7432. icc*)
  7433. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7434. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  7435. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  7436. ;;
  7437. pgcc* | pgf77* | pgf90* | pgf95*)
  7438. # Portland Group compilers (*not* the Pentium gcc compiler,
  7439. # which looks to be a dead project)
  7440. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7441. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  7442. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  7443. ;;
  7444. ccc*)
  7445. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7446. # All Alpha code is PIC.
  7447. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  7448. ;;
  7449. *)
  7450. case `$CC -V 2>&1 | sed 5q` in
  7451. *Sun\ C*)
  7452. # Sun C 5.9
  7453. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  7454. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  7455. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7456. ;;
  7457. *Sun\ F*)
  7458. # Sun Fortran 8.3 passes all unrecognized flags to the linker
  7459. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  7460. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  7461. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
  7462. ;;
  7463. esac
  7464. ;;
  7465. esac
  7466. ;;
  7467. osf3* | osf4* | osf5*)
  7468. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7469. # All OSF/1 code is PIC.
  7470. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  7471. ;;
  7472. rdos*)
  7473. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  7474. ;;
  7475. solaris*)
  7476. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  7477. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  7478. case $cc_basename in
  7479. f77* | f90* | f95*)
  7480. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
  7481. *)
  7482. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
  7483. esac
  7484. ;;
  7485. sunos4*)
  7486. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  7487. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  7488. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  7489. ;;
  7490. sysv4 | sysv4.2uw2* | sysv4.3*)
  7491. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7492. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  7493. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  7494. ;;
  7495. sysv4*MP*)
  7496. if test -d /usr/nec ;then
  7497. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
  7498. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  7499. fi
  7500. ;;
  7501. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  7502. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7503. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  7504. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  7505. ;;
  7506. unicos*)
  7507. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7508. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  7509. ;;
  7510. uts4*)
  7511. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  7512. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  7513. ;;
  7514. *)
  7515. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  7516. ;;
  7517. esac
  7518. fi
  7519. ])
  7520. AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
  7521. #
  7522. # Check to make sure the PIC flag actually works.
  7523. #
  7524. if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
  7525. AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
  7526. _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1),
  7527. [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
  7528. [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
  7529. "" | " "*) ;;
  7530. *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
  7531. esac],
  7532. [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  7533. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
  7534. fi
  7535. case $host_os in
  7536. # For platforms which do not support PIC, -DPIC is meaningless:
  7537. *djgpp*)
  7538. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  7539. ;;
  7540. *)
  7541. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
  7542. ;;
  7543. esac
  7544. #
  7545. # Check to make sure the static flag actually works.
  7546. #
  7547. wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
  7548. AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
  7549. _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1),
  7550. $lt_tmp_static_flag,
  7551. [],
  7552. [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
  7553. ])
  7554. # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
  7555. # ------------------------------------
  7556. # See if the linker supports building shared libraries.
  7557. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
  7558. [AC_REQUIRE([LT_AC_PROG_SED])dnl
  7559. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  7560. ifelse([$1],[CXX],[
  7561. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  7562. case $host_os in
  7563. aix[[4-9]]*)
  7564. # If we're using GNU nm, then we don't want the "-C" option.
  7565. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  7566. if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
  7567. _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'
  7568. else
  7569. _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'
  7570. fi
  7571. ;;
  7572. pw32*)
  7573. _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
  7574. ;;
  7575. cygwin* | mingw*)
  7576. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
  7577. ;;
  7578. *)
  7579. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  7580. ;;
  7581. esac
  7582. _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  7583. ],[
  7584. runpath_var=
  7585. _LT_AC_TAGVAR(allow_undefined_flag, $1)=
  7586. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  7587. _LT_AC_TAGVAR(archive_cmds, $1)=
  7588. _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
  7589. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
  7590. _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
  7591. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
  7592. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  7593. _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
  7594. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
  7595. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  7596. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  7597. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  7598. _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
  7599. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  7600. _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
  7601. _LT_AC_TAGVAR(hardcode_automatic, $1)=no
  7602. _LT_AC_TAGVAR(module_cmds, $1)=
  7603. _LT_AC_TAGVAR(module_expsym_cmds, $1)=
  7604. _LT_AC_TAGVAR(always_export_symbols, $1)=no
  7605. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  7606. # include_expsyms should be a list of space-separated symbols to be *always*
  7607. # included in the symbol list
  7608. _LT_AC_TAGVAR(include_expsyms, $1)=
  7609. # exclude_expsyms can be an extended regexp of symbols to exclude
  7610. # it will be wrapped by ` (' and `)$', so one must not match beginning or
  7611. # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
  7612. # as well as any symbol that contains `d'.
  7613. _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  7614. # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  7615. # platforms (ab)use it in PIC code, but their linkers get confused if
  7616. # the symbol is explicitly referenced. Since portable code cannot
  7617. # rely on this symbol name, it's probably fine to never include it in
  7618. # preloaded symbol tables.
  7619. # Exclude shared library initialization/finalization symbols.
  7620. dnl Note also adjust exclude_expsyms for C++ above.
  7621. extract_expsyms_cmds=
  7622. # Just being paranoid about ensuring that cc_basename is set.
  7623. _LT_CC_BASENAME([$compiler])
  7624. case $host_os in
  7625. cygwin* | mingw* | pw32*)
  7626. # FIXME: the MSVC++ port hasn't been tested in a loooong time
  7627. # When not using gcc, we currently assume that we are using
  7628. # Microsoft Visual C++.
  7629. if test "$GCC" != yes; then
  7630. with_gnu_ld=no
  7631. fi
  7632. ;;
  7633. interix*)
  7634. # we just hope/assume this is gcc and not c89 (= MSVC++)
  7635. with_gnu_ld=yes
  7636. ;;
  7637. openbsd*)
  7638. with_gnu_ld=no
  7639. ;;
  7640. esac
  7641. _LT_AC_TAGVAR(ld_shlibs, $1)=yes
  7642. if test "$with_gnu_ld" = yes; then
  7643. # If archive_cmds runs LD, not CC, wlarc should be empty
  7644. wlarc='${wl}'
  7645. # Set some defaults for GNU ld with shared library support. These
  7646. # are reset later if shared libraries are not supported. Putting them
  7647. # here allows them to be overridden if necessary.
  7648. runpath_var=LD_RUN_PATH
  7649. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
  7650. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  7651. # ancient GNU ld didn't support --whole-archive et. al.
  7652. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
  7653. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  7654. else
  7655. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  7656. fi
  7657. supports_anon_versioning=no
  7658. case `$LD -v 2>/dev/null` in
  7659. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
  7660. *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
  7661. *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
  7662. *\ 2.11.*) ;; # other 2.11 versions
  7663. *) supports_anon_versioning=yes ;;
  7664. esac
  7665. # See if GNU ld supports shared libraries.
  7666. case $host_os in
  7667. aix[[3-9]]*)
  7668. # On AIX/PPC, the GNU linker is very broken
  7669. if test "$host_cpu" != ia64; then
  7670. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7671. cat <<EOF 1>&2
  7672. *** Warning: the GNU linker, at least up to release 2.9.1, is reported
  7673. *** to be unable to reliably create shared libraries on AIX.
  7674. *** Therefore, libtool is disabling shared libraries support. If you
  7675. *** really care for shared libraries, you may want to modify your PATH
  7676. *** so that a non-GNU linker is found, and then restart.
  7677. EOF
  7678. fi
  7679. ;;
  7680. amigaos*)
  7681. _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)'
  7682. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  7683. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  7684. # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
  7685. # that the semantics of dynamic libraries on AmigaOS, at least up
  7686. # to version 4, is to share data among multiple programs linked
  7687. # with the same dynamic library. Since this doesn't match the
  7688. # behavior of shared libraries on other platforms, we can't use
  7689. # them.
  7690. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7691. ;;
  7692. beos*)
  7693. if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  7694. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  7695. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  7696. # support --undefined. This deserves some investigation. FIXME
  7697. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  7698. else
  7699. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7700. fi
  7701. ;;
  7702. cygwin* | mingw* | pw32*)
  7703. # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  7704. # as there is no search path for DLLs.
  7705. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  7706. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  7707. _LT_AC_TAGVAR(always_export_symbols, $1)=no
  7708. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  7709. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
  7710. if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
  7711. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  7712. # If the export-symbols file already is a .def file (1st line
  7713. # is EXPORTS), use it as is; otherwise, prepend...
  7714. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  7715. cp $export_symbols $output_objdir/$soname.def;
  7716. else
  7717. echo EXPORTS > $output_objdir/$soname.def;
  7718. cat $export_symbols >> $output_objdir/$soname.def;
  7719. fi~
  7720. $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  7721. else
  7722. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7723. fi
  7724. ;;
  7725. interix[[3-9]]*)
  7726. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  7727. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  7728. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  7729. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  7730. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  7731. # Instead, shared libraries are loaded at an image base (0x10000000 by
  7732. # default) and relocated if they conflict, which is a slow very memory
  7733. # consuming and fragmenting process. To avoid this, we pick a random,
  7734. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  7735. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  7736. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
  7737. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
  7738. ;;
  7739. gnu* | linux* | k*bsd*-gnu)
  7740. if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  7741. tmp_addflag=
  7742. case $cc_basename,$host_cpu in
  7743. pgcc*) # Portland Group C compiler
  7744. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
  7745. tmp_addflag=' $pic_flag'
  7746. ;;
  7747. pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
  7748. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
  7749. tmp_addflag=' $pic_flag -Mnomain' ;;
  7750. ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
  7751. tmp_addflag=' -i_dynamic' ;;
  7752. efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
  7753. tmp_addflag=' -i_dynamic -nofor_main' ;;
  7754. ifc* | ifort*) # Intel Fortran compiler
  7755. tmp_addflag=' -nofor_main' ;;
  7756. esac
  7757. case `$CC -V 2>&1 | sed 5q` in
  7758. *Sun\ C*) # Sun C 5.9
  7759. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
  7760. tmp_sharedflag='-G' ;;
  7761. *Sun\ F*) # Sun Fortran 8.3
  7762. tmp_sharedflag='-G' ;;
  7763. *)
  7764. tmp_sharedflag='-shared' ;;
  7765. esac
  7766. _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  7767. if test $supports_anon_versioning = yes; then
  7768. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
  7769. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  7770. $echo "local: *; };" >> $output_objdir/$libname.ver~
  7771. $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  7772. fi
  7773. else
  7774. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7775. fi
  7776. ;;
  7777. netbsd*)
  7778. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  7779. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  7780. wlarc=
  7781. else
  7782. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  7783. _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'
  7784. fi
  7785. ;;
  7786. solaris*)
  7787. if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
  7788. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7789. cat <<EOF 1>&2
  7790. *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  7791. *** create shared libraries on Solaris systems. Therefore, libtool
  7792. *** is disabling shared libraries support. We urge you to upgrade GNU
  7793. *** binutils to release 2.9.1 or newer. Another option is to modify
  7794. *** your PATH or compiler configuration so that the native linker is
  7795. *** used, and then restart.
  7796. EOF
  7797. elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  7798. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  7799. _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'
  7800. else
  7801. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7802. fi
  7803. ;;
  7804. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
  7805. case `$LD -v 2>&1` in
  7806. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
  7807. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7808. cat <<_LT_EOF 1>&2
  7809. *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
  7810. *** reliably create shared libraries on SCO systems. Therefore, libtool
  7811. *** is disabling shared libraries support. We urge you to upgrade GNU
  7812. *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
  7813. *** your PATH or compiler configuration so that the native linker is
  7814. *** used, and then restart.
  7815. _LT_EOF
  7816. ;;
  7817. *)
  7818. if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  7819. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
  7820. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
  7821. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
  7822. else
  7823. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7824. fi
  7825. ;;
  7826. esac
  7827. ;;
  7828. sunos4*)
  7829. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  7830. wlarc=
  7831. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  7832. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  7833. ;;
  7834. *)
  7835. if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  7836. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  7837. _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'
  7838. else
  7839. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7840. fi
  7841. ;;
  7842. esac
  7843. if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
  7844. runpath_var=
  7845. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
  7846. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
  7847. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  7848. fi
  7849. else
  7850. # PORTME fill in a description of your system's linker (not GNU ld)
  7851. case $host_os in
  7852. aix3*)
  7853. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  7854. _LT_AC_TAGVAR(always_export_symbols, $1)=yes
  7855. _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'
  7856. # Note: this linker hardcodes the directories in LIBPATH if there
  7857. # are no directories specified by -L.
  7858. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  7859. if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
  7860. # Neither direct hardcoding nor static linking is supported with a
  7861. # broken collect2.
  7862. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
  7863. fi
  7864. ;;
  7865. aix[[4-9]]*)
  7866. if test "$host_cpu" = ia64; then
  7867. # On IA64, the linker does run time linking by default, so we don't
  7868. # have to do anything special.
  7869. aix_use_runtimelinking=no
  7870. exp_sym_flag='-Bexport'
  7871. no_entry_flag=""
  7872. else
  7873. # If we're using GNU nm, then we don't want the "-C" option.
  7874. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  7875. if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
  7876. _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'
  7877. else
  7878. _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'
  7879. fi
  7880. aix_use_runtimelinking=no
  7881. # Test if we are trying to use run time linking or normal
  7882. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  7883. # need to do runtime linking.
  7884. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  7885. for ld_flag in $LDFLAGS; do
  7886. if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
  7887. aix_use_runtimelinking=yes
  7888. break
  7889. fi
  7890. done
  7891. ;;
  7892. esac
  7893. exp_sym_flag='-bexport'
  7894. no_entry_flag='-bnoentry'
  7895. fi
  7896. # When large executables or shared objects are built, AIX ld can
  7897. # have problems creating the table of contents. If linking a library
  7898. # or program results in "error TOC overflow" add -mminimal-toc to
  7899. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  7900. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  7901. _LT_AC_TAGVAR(archive_cmds, $1)=''
  7902. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  7903. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
  7904. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  7905. if test "$GCC" = yes; then
  7906. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  7907. # We only want to do this on AIX 4.2 and lower, the check
  7908. # below for broken collect2 doesn't work under 4.3+
  7909. collect2name=`${CC} -print-prog-name=collect2`
  7910. if test -f "$collect2name" && \
  7911. strings "$collect2name" | grep resolve_lib_name >/dev/null
  7912. then
  7913. # We have reworked collect2
  7914. :
  7915. else
  7916. # We have old collect2
  7917. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
  7918. # It fails to find uninstalled libraries when the uninstalled
  7919. # path is not listed in the libpath. Setting hardcode_minus_L
  7920. # to unsupported forces relinking
  7921. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  7922. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  7923. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  7924. fi
  7925. ;;
  7926. esac
  7927. shared_flag='-shared'
  7928. if test "$aix_use_runtimelinking" = yes; then
  7929. shared_flag="$shared_flag "'${wl}-G'
  7930. fi
  7931. else
  7932. # not using gcc
  7933. if test "$host_cpu" = ia64; then
  7934. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  7935. # chokes on -Wl,-G. The following line is correct:
  7936. shared_flag='-G'
  7937. else
  7938. if test "$aix_use_runtimelinking" = yes; then
  7939. shared_flag='${wl}-G'
  7940. else
  7941. shared_flag='${wl}-bM:SRE'
  7942. fi
  7943. fi
  7944. fi
  7945. # It seems that -bexpall does not export symbols beginning with
  7946. # underscore (_), so it is better to generate a list of symbols to export.
  7947. _LT_AC_TAGVAR(always_export_symbols, $1)=yes
  7948. if test "$aix_use_runtimelinking" = yes; then
  7949. # Warning - without using the other runtime loading flags (-brtl),
  7950. # -berok will link without error, but may produce a broken library.
  7951. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
  7952. # Determine the default libpath from the value encoded in an empty executable.
  7953. _LT_AC_SYS_LIBPATH_AIX
  7954. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  7955. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
  7956. else
  7957. if test "$host_cpu" = ia64; then
  7958. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  7959. _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  7960. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
  7961. else
  7962. # Determine the default libpath from the value encoded in an empty executable.
  7963. _LT_AC_SYS_LIBPATH_AIX
  7964. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  7965. # Warning - without using the other run time loading flags,
  7966. # -berok will link without error, but may produce a broken library.
  7967. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  7968. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  7969. # Exported symbols can be pulled into shared objects from archives
  7970. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  7971. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
  7972. # This is similar to how AIX traditionally builds its shared libraries.
  7973. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
  7974. fi
  7975. fi
  7976. ;;
  7977. amigaos*)
  7978. _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)'
  7979. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  7980. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  7981. # see comment about different semantics on the GNU ld section
  7982. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  7983. ;;
  7984. bsdi[[45]]*)
  7985. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
  7986. ;;
  7987. cygwin* | mingw* | pw32*)
  7988. # When not using gcc, we currently assume that we are using
  7989. # Microsoft Visual C++.
  7990. # hardcode_libdir_flag_spec is actually meaningless, as there is
  7991. # no search path for DLLs.
  7992. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  7993. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  7994. # Tell ltmain to make .lib files, not .a files.
  7995. libext=lib
  7996. # Tell ltmain to make .dll files, not .so files.
  7997. shrext_cmds=".dll"
  7998. # FIXME: Setting linknames here is a bad hack.
  7999. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
  8000. # The linker will automatically build a .lib file if we build a DLL.
  8001. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
  8002. # FIXME: Should let the user specify the lib program.
  8003. _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
  8004. _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
  8005. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  8006. ;;
  8007. darwin* | rhapsody*)
  8008. case $host_os in
  8009. rhapsody* | darwin1.[[012]])
  8010. _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
  8011. ;;
  8012. *) # Darwin 1.3 on
  8013. if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
  8014. _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
  8015. else
  8016. case ${MACOSX_DEPLOYMENT_TARGET} in
  8017. 10.[[012]])
  8018. _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
  8019. ;;
  8020. 10.*)
  8021. _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
  8022. ;;
  8023. esac
  8024. fi
  8025. ;;
  8026. esac
  8027. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  8028. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  8029. _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
  8030. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  8031. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
  8032. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  8033. if test "$GCC" = yes ; then
  8034. output_verbose_link_cmd='echo'
  8035. _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
  8036. _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
  8037. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
  8038. _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
  8039. else
  8040. case $cc_basename in
  8041. xlc*)
  8042. output_verbose_link_cmd='echo'
  8043. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
  8044. _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
  8045. # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
  8046. _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 $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  8047. _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}'
  8048. ;;
  8049. *)
  8050. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  8051. ;;
  8052. esac
  8053. fi
  8054. ;;
  8055. dgux*)
  8056. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  8057. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  8058. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  8059. ;;
  8060. # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  8061. # support. Future versions do this automatically, but an explicit c++rt0.o
  8062. # does not break anything, and helps significantly (at the cost of a little
  8063. # extra space).
  8064. freebsd2.2*)
  8065. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
  8066. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  8067. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  8068. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  8069. ;;
  8070. # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  8071. freebsd2*)
  8072. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  8073. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  8074. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  8075. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  8076. ;;
  8077. # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  8078. freebsd* | dragonfly*)
  8079. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
  8080. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  8081. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  8082. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  8083. ;;
  8084. hpux9*)
  8085. if test "$GCC" = yes; then
  8086. _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'
  8087. else
  8088. _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'
  8089. fi
  8090. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  8091. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  8092. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  8093. # hardcode_minus_L: Not really in the search PATH,
  8094. # but as the default location of the library.
  8095. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  8096. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  8097. ;;
  8098. hpux10*)
  8099. if test "$GCC" = yes -a "$with_gnu_ld" = no; then
  8100. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  8101. else
  8102. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
  8103. fi
  8104. if test "$with_gnu_ld" = no; then
  8105. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  8106. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  8107. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  8108. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  8109. # hardcode_minus_L: Not really in the search PATH,
  8110. # but as the default location of the library.
  8111. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  8112. fi
  8113. ;;
  8114. hpux11*)
  8115. if test "$GCC" = yes -a "$with_gnu_ld" = no; then
  8116. case $host_cpu in
  8117. hppa*64*)
  8118. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  8119. ;;
  8120. ia64*)
  8121. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  8122. ;;
  8123. *)
  8124. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  8125. ;;
  8126. esac
  8127. else
  8128. case $host_cpu in
  8129. hppa*64*)
  8130. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  8131. ;;
  8132. ia64*)
  8133. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  8134. ;;
  8135. *)
  8136. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  8137. ;;
  8138. esac
  8139. fi
  8140. if test "$with_gnu_ld" = no; then
  8141. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  8142. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  8143. case $host_cpu in
  8144. hppa*64*|ia64*)
  8145. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
  8146. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  8147. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  8148. ;;
  8149. *)
  8150. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  8151. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  8152. # hardcode_minus_L: Not really in the search PATH,
  8153. # but as the default location of the library.
  8154. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  8155. ;;
  8156. esac
  8157. fi
  8158. ;;
  8159. irix5* | irix6* | nonstopux*)
  8160. if test "$GCC" = yes; then
  8161. _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'
  8162. else
  8163. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  8164. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
  8165. fi
  8166. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  8167. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  8168. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  8169. ;;
  8170. netbsd*)
  8171. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  8172. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
  8173. else
  8174. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
  8175. fi
  8176. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  8177. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  8178. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  8179. ;;
  8180. newsos6)
  8181. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  8182. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  8183. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  8184. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  8185. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  8186. ;;
  8187. openbsd*)
  8188. if test -f /usr/libexec/ld.so; then
  8189. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  8190. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  8191. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  8192. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  8193. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
  8194. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  8195. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  8196. else
  8197. case $host_os in
  8198. openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
  8199. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  8200. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  8201. ;;
  8202. *)
  8203. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  8204. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  8205. ;;
  8206. esac
  8207. fi
  8208. else
  8209. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  8210. fi
  8211. ;;
  8212. os2*)
  8213. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  8214. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  8215. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  8216. _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'
  8217. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
  8218. ;;
  8219. osf3*)
  8220. if test "$GCC" = yes; then
  8221. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  8222. _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'
  8223. else
  8224. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  8225. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  8226. fi
  8227. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  8228. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  8229. ;;
  8230. osf4* | osf5*) # as osf3* with the addition of -msym flag
  8231. if test "$GCC" = yes; then
  8232. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  8233. _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'
  8234. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  8235. else
  8236. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  8237. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  8238. _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~
  8239. $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
  8240. # Both c and cxx compiler support -rpath directly
  8241. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  8242. fi
  8243. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  8244. ;;
  8245. solaris*)
  8246. _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
  8247. if test "$GCC" = yes; then
  8248. wlarc='${wl}'
  8249. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  8250. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  8251. $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
  8252. else
  8253. wlarc=''
  8254. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
  8255. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  8256. $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
  8257. fi
  8258. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  8259. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  8260. case $host_os in
  8261. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  8262. *)
  8263. # The compiler driver will combine and reorder linker options,
  8264. # but understands `-z linker_flag'. GCC discards it without `$wl',
  8265. # but is careful enough not to reorder.
  8266. # Supported since Solaris 2.6 (maybe 2.5.1?)
  8267. if test "$GCC" = yes; then
  8268. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
  8269. else
  8270. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  8271. fi
  8272. ;;
  8273. esac
  8274. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  8275. ;;
  8276. sunos4*)
  8277. if test "x$host_vendor" = xsequent; then
  8278. # Use $CC to link under sequent, because it throws in some extra .o
  8279. # files that make .init and .fini sections work.
  8280. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
  8281. else
  8282. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
  8283. fi
  8284. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  8285. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  8286. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  8287. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  8288. ;;
  8289. sysv4)
  8290. case $host_vendor in
  8291. sni)
  8292. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  8293. _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
  8294. ;;
  8295. siemens)
  8296. ## LD is ld it makes a PLAMLIB
  8297. ## CC just makes a GrossModule.
  8298. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  8299. _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
  8300. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  8301. ;;
  8302. motorola)
  8303. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  8304. _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
  8305. ;;
  8306. esac
  8307. runpath_var='LD_RUN_PATH'
  8308. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  8309. ;;
  8310. sysv4.3*)
  8311. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  8312. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  8313. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
  8314. ;;
  8315. sysv4*MP*)
  8316. if test -d /usr/nec; then
  8317. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  8318. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  8319. runpath_var=LD_RUN_PATH
  8320. hardcode_runpath_var=yes
  8321. _LT_AC_TAGVAR(ld_shlibs, $1)=yes
  8322. fi
  8323. ;;
  8324. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  8325. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  8326. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  8327. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  8328. runpath_var='LD_RUN_PATH'
  8329. if test "$GCC" = yes; then
  8330. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  8331. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  8332. else
  8333. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  8334. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  8335. fi
  8336. ;;
  8337. sysv5* | sco3.2v5* | sco5v6*)
  8338. # Note: We can NOT use -z defs as we might desire, because we do not
  8339. # link with -lc, and that would cause any symbols used from libc to
  8340. # always be unresolved, which means just about no library would
  8341. # ever link correctly. If we're not using GNU ld we use -z text
  8342. # though, which does catch some bad symbols but isn't as heavy-handed
  8343. # as -z defs.
  8344. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  8345. _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
  8346. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  8347. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  8348. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
  8349. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
  8350. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  8351. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  8352. runpath_var='LD_RUN_PATH'
  8353. if test "$GCC" = yes; then
  8354. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
  8355. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
  8356. else
  8357. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
  8358. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
  8359. fi
  8360. ;;
  8361. uts4*)
  8362. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  8363. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  8364. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  8365. ;;
  8366. *)
  8367. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  8368. ;;
  8369. esac
  8370. fi
  8371. ])
  8372. AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
  8373. test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  8374. #
  8375. # Do we need to explicitly link libc?
  8376. #
  8377. case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
  8378. x|xyes)
  8379. # Assume -lc should be added
  8380. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
  8381. if test "$enable_shared" = yes && test "$GCC" = yes; then
  8382. case $_LT_AC_TAGVAR(archive_cmds, $1) in
  8383. *'~'*)
  8384. # FIXME: we may have to deal with multi-command sequences.
  8385. ;;
  8386. '$CC '*)
  8387. # Test whether the compiler implicitly links with -lc since on some
  8388. # systems, -lgcc has to come before -lc. If gcc already passes -lc
  8389. # to ld, don't add -lc before -lgcc.
  8390. AC_MSG_CHECKING([whether -lc should be explicitly linked in])
  8391. $rm conftest*
  8392. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  8393. if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
  8394. soname=conftest
  8395. lib=conftest
  8396. libobjs=conftest.$ac_objext
  8397. deplibs=
  8398. wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
  8399. pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
  8400. compiler_flags=-v
  8401. linker_flags=-v
  8402. verstring=
  8403. output_objdir=.
  8404. libname=conftest
  8405. lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
  8406. _LT_AC_TAGVAR(allow_undefined_flag, $1)=
  8407. if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
  8408. then
  8409. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  8410. else
  8411. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
  8412. fi
  8413. _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
  8414. else
  8415. cat conftest.err 1>&5
  8416. fi
  8417. $rm conftest*
  8418. AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
  8419. ;;
  8420. esac
  8421. fi
  8422. ;;
  8423. esac
  8424. ])# AC_LIBTOOL_PROG_LD_SHLIBS
  8425. # _LT_AC_FILE_LTDLL_C
  8426. # -------------------
  8427. # Be careful that the start marker always follows a newline.
  8428. AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
  8429. # /* ltdll.c starts here */
  8430. # #define WIN32_LEAN_AND_MEAN
  8431. # #include <windows.h>
  8432. # #undef WIN32_LEAN_AND_MEAN
  8433. # #include <stdio.h>
  8434. #
  8435. # #ifndef __CYGWIN__
  8436. # # ifdef __CYGWIN32__
  8437. # # define __CYGWIN__ __CYGWIN32__
  8438. # # endif
  8439. # #endif
  8440. #
  8441. # #ifdef __cplusplus
  8442. # extern "C" {
  8443. # #endif
  8444. # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
  8445. # #ifdef __cplusplus
  8446. # }
  8447. # #endif
  8448. #
  8449. # #ifdef __CYGWIN__
  8450. # #include <cygwin/cygwin_dll.h>
  8451. # DECLARE_CYGWIN_DLL( DllMain );
  8452. # #endif
  8453. # HINSTANCE __hDllInstance_base;
  8454. #
  8455. # BOOL APIENTRY
  8456. # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
  8457. # {
  8458. # __hDllInstance_base = hInst;
  8459. # return TRUE;
  8460. # }
  8461. # /* ltdll.c ends here */
  8462. ])# _LT_AC_FILE_LTDLL_C
  8463. # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
  8464. # ---------------------------------
  8465. AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
  8466. # old names
  8467. AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
  8468. AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
  8469. AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
  8470. AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
  8471. AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
  8472. AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
  8473. AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
  8474. # This is just to silence aclocal about the macro not being used
  8475. ifelse([AC_DISABLE_FAST_INSTALL])
  8476. ############################################################
  8477. # NOTE: This macro has been submitted for inclusion into #
  8478. # GNU Autoconf as AC_PROG_SED. When it is available in #
  8479. # a released version of Autoconf we should remove this #
  8480. # macro and use it instead. #
  8481. ############################################################
  8482. # LT_AC_PROG_SED
  8483. # --------------
  8484. # Check for a fully-functional sed program, that truncates
  8485. # as few characters as possible. Prefer GNU sed if found.
  8486. AC_DEFUN([LT_AC_PROG_SED],
  8487. [AC_MSG_CHECKING([for a sed that does not truncate output])
  8488. AC_CACHE_VAL(lt_cv_path_SED,
  8489. [# Loop through the user's path and test for sed and gsed.
  8490. # Then use that list of sed's as ones to test for truncation.
  8491. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  8492. for as_dir in $PATH
  8493. do
  8494. IFS=$as_save_IFS
  8495. test -z "$as_dir" && as_dir=.
  8496. for lt_ac_prog in sed gsed; do
  8497. for ac_exec_ext in '' $ac_executable_extensions; do
  8498. if test -f "$as_dir/$lt_ac_prog$ac_exec_ext"; then
  8499. lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
  8500. fi
  8501. done
  8502. done
  8503. done
  8504. lt_ac_max=0
  8505. lt_ac_count=0
  8506. # Add /usr/xpg4/bin/sed as it is typically found on Solaris
  8507. # along with /bin/sed that truncates output.
  8508. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
  8509. test ! -f $lt_ac_sed && continue
  8510. cat /dev/null > conftest.in
  8511. lt_ac_count=0
  8512. echo $ECHO_N "0123456789$ECHO_C" >conftest.in
  8513. # Check for GNU sed and select it if it is found.
  8514. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
  8515. lt_cv_path_SED=$lt_ac_sed
  8516. break
  8517. fi
  8518. while true; do
  8519. cat conftest.in conftest.in >conftest.tmp
  8520. mv conftest.tmp conftest.in
  8521. cp conftest.in conftest.nl
  8522. echo >>conftest.nl
  8523. $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
  8524. cmp -s conftest.out conftest.nl || break
  8525. # 10000 chars as input seems more than enough
  8526. test $lt_ac_count -gt 10 && break
  8527. lt_ac_count=`expr $lt_ac_count + 1`
  8528. if test $lt_ac_count -gt $lt_ac_max; then
  8529. lt_ac_max=$lt_ac_count
  8530. lt_cv_path_SED=$lt_ac_sed
  8531. fi
  8532. done
  8533. done
  8534. ])
  8535. SED=$lt_cv_path_SED
  8536. AC_MSG_RESULT([$SED])
  8537. ])