12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141 |
- #! /bin/sh
- # Guess values for system-dependent variables and create Makefiles.
- # Generated automatically using autoconf version 2.13.20030927
- # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
- #
- # This configure script is free software; the Free Software Foundation
- # gives unlimited permission to copy, distribute and modify it.
- # Defaults:
- ac_help=
- ac_default_prefix=/usr/local
- # Any additions from configure.in:
- # Initialize some variables set by options.
- # The variables have the same names as the options, with
- # dashes changed to underlines.
- build=NONE
- cache_file=./config.cache
- exec_prefix=NONE
- host=NONE
- no_create=
- nonopt=NONE
- no_recursion=
- prefix=NONE
- program_prefix=NONE
- program_suffix=NONE
- program_transform_name=s,x,x,
- silent=
- site=
- srcdir=
- target=NONE
- verbose=
- x_includes=NONE
- x_libraries=NONE
- bindir='${exec_prefix}/bin'
- sbindir='${exec_prefix}/sbin'
- libexecdir='${exec_prefix}/libexec'
- datadir='${prefix}/share'
- sysconfdir='${prefix}/etc'
- sharedstatedir='${prefix}/com'
- localstatedir='${prefix}/var'
- libdir='${exec_prefix}/lib'
- includedir='${prefix}/include'
- oldincludedir='/usr/include'
- infodir='${prefix}/info'
- mandir='${prefix}/man'
- # Initialize some other variables.
- subdirs=
- MFLAGS= MAKEFLAGS=
- SHELL=${CONFIG_SHELL-/bin/sh}
- # Maximum number of lines to put in a shell here document.
- ac_max_here_lines=12
- ac_prev=
- for ac_option
- do
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
- # Accept the important Cygnus configure options, so we can diagnose typos.
- case "$ac_option" in
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
- Usage: configure [options] [host]
- Options: [defaults in brackets after descriptions]
- Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
- Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
- EOF
- cat << EOF
- Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
- Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
- EOF
- cat <<\EOF
- --enable and --with options recognized:
- --disable-echo display "compiling" commands
- --enable-warnings test: turn on gcc compiler warnings
- --with-curses-dir=DIR directory in which (n)curses is installed
- --with-5lib use SunOS sysv-libraries
- --with-ncursesw use wide ncurses-libraries (installed)
- --with-ncurses use ncurses-libraries (installed)
- --with-pdcurses compile/link with pdcurses X11 library
- --with-x use the X Window System
- --with-Xaw3d link with Xaw 3d library
- --with-neXtaw link with neXT Athena library
- --with-XawPlus link with Athena-Plus library
- EOF
- exit 0 ;;
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13.20030927"
- exit 0 ;;
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
- esac
- done
- if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
- fi
- trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
- # File descriptor usage:
- # 0 standard input
- # 1 file creation
- # 2 errors and warnings
- # 3 some systems may open it to /dev/tty
- # 4 used on the Kubota Titan
- # 6 checking for... messages and results
- # 5 compiler messages saved in config.log
- if test "$silent" = yes; then
- exec 6>/dev/null
- else
- exec 6>&1
- fi
- exec 5>./config.log
- echo "\
- This file contains any messages produced by compilers while
- running configure, to aid debugging if configure makes a mistake.
- " 1>&5
- # Strip out --no-create and --no-recursion so they do not pile up.
- # Also quote any args containing shell metacharacters.
- ac_configure_args=
- for ac_arg
- do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
- done
- # NLS nuisances.
- # Only set these to C if already set. These must not be set unconditionally
- # because not all systems understand e.g. LANG=C (notably SCO).
- # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
- # Non-C LC_CTYPE values break the ctype check.
- if test "${LANG+set}" = set; then LANG=C; export LANG; fi
- if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
- if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
- if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
- # confdefs.h avoids OS command line length limits that DEFS can exceed.
- rm -rf conftest* confdefs.h
- # AIX cpp loses on an empty file, so make sure it contains at least a newline.
- echo > confdefs.h
- # A filename unique to this package, relative to the directory that
- # configure is in, which we can look for to find out if srcdir is correct.
- ac_unique_file=ncurses.c
- # Find the source files, if location was not specified.
- if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
- else
- ac_srcdir_defaulted=no
- fi
- if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
- fi
- srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
- # Prefer explicitly selected file to automatically selected ones.
- if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
- fi
- for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
- done
- if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
- else
- echo "creating cache $cache_file"
- > $cache_file
- fi
- ac_ext=c
- # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
- ac_cpp='$CPP $CPPFLAGS'
- ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
- ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
- cross_compiling=$ac_cv_prog_cc_cross
- ac_exeext=
- ac_objext=o
- if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
- ' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
- else
- ac_n= ac_c='\c' ac_t=
- fi
- # If we find X, set shell vars x_includes and x_libraries to the
- # paths, otherwise set no_x=yes.
- # Uses ac_ vars as temps to allow command line to override cache and checks.
- # --without-x overrides everything else, but does not touch the cache.
- echo $ac_n "checking for X""... $ac_c" 1>&6
- echo "configure:540: checking for X" >&5
- # Check whether --with-x or --without-x was given.
- if test "${with_x+set}" = set; then
- withval="$with_x"
- :
- fi
- # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
- if test "x$with_x" = xno; then
- # The user explicitly disabled X.
- have_x=disabled
- else
- if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
- # Both variables are already set.
- have_x=yes
- else
- if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- # One or both of the vars are not set, and there is no cached value.
- ac_x_includes=NO ac_x_libraries=NO
- rm -fr conftestdir
- if mkdir conftestdir; then
- cd conftestdir
- # Make sure to not put "make" in the Imakefile rules, since we grep it out.
- cat > Imakefile <<'EOF'
- acfindx:
- @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
- EOF
- if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
- # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
- eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
- # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
- for ac_extension in a so sl; do
- if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
- test -f $ac_im_libdir/libX11.$ac_extension; then
- ac_im_usrlibdir=$ac_im_libdir; break
- fi
- done
- # Screen out bogus values from the imake configuration. They are
- # bogus both because they are the default anyway, and because
- # using them would break gcc on systems where it needs fixed includes.
- case "$ac_im_incroot" in
- /usr/include) ;;
- *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
- esac
- case "$ac_im_usrlibdir" in
- /usr/lib | /lib) ;;
- *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
- esac
- fi
- cd ..
- rm -fr conftestdir
- fi
- if test "$ac_x_includes" = NO; then
- # Guess where to find include files, by looking for this one X11 .h file.
- test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
- # First, try using that file with no special directory specified.
- cat > conftest.$ac_ext <<EOF
- #line 603 "configure"
- #include "confdefs.h"
- #include <$x_direct_test_include>
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- { (eval echo configure:608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
- ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
- if test -z "$ac_err"; then
- rm -rf conftest*
- # We can compile using X headers with no special include directory.
- ac_x_includes=
- else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- # Look for the header file in a standard set of common directories.
- # Check X11 before X11Rn because it is often a symlink to the current release.
- for ac_dir in \
- /usr/X11/include \
- /usr/X11R6/include \
- /usr/X11R5/include \
- /usr/X11R4/include \
- \
- /usr/include/X11 \
- /usr/include/X11R6 \
- /usr/include/X11R5 \
- /usr/include/X11R4 \
- \
- /usr/local/X11/include \
- /usr/local/X11R6/include \
- /usr/local/X11R5/include \
- /usr/local/X11R4/include \
- \
- /usr/local/include/X11 \
- /usr/local/include/X11R6 \
- /usr/local/include/X11R5 \
- /usr/local/include/X11R4 \
- \
- /usr/X386/include \
- /usr/x386/include \
- /usr/XFree86/include/X11 \
- \
- /usr/include \
- /usr/local/include \
- /usr/unsupported/include \
- /usr/athena/include \
- /usr/local/x11r5/include \
- /usr/lpp/Xamples/include \
- \
- /usr/openwin/include \
- /usr/openwin/share/include \
- ; \
- do
- if test -r "$ac_dir/$x_direct_test_include"; then
- ac_x_includes=$ac_dir
- break
- fi
- done
- fi
- rm -f conftest*
- fi # $ac_x_includes = NO
- if test "$ac_x_libraries" = NO; then
- # Check for the libraries.
- test -z "$x_direct_test_library" && x_direct_test_library=Xt
- test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
- # See if we find them without any special options.
- # Don't add to $LIBS permanently.
- ac_save_LIBS="$LIBS"
- LIBS="-l$x_direct_test_library $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 677 "configure"
- #include "confdefs.h"
- int main() {
- ${x_direct_test_function}()
- ; return 0; }
- EOF
- if { (eval echo configure:684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- LIBS="$ac_save_LIBS"
- # We can link X programs with no special library path.
- ac_x_libraries=
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- LIBS="$ac_save_LIBS"
- # First see if replacing the include by lib works.
- # Check X11 before X11Rn because it is often a symlink to the current release.
- for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
- /usr/X11/lib \
- /usr/X11R6/lib \
- /usr/X11R5/lib \
- /usr/X11R4/lib \
- \
- /usr/lib/X11 \
- /usr/lib/X11R6 \
- /usr/lib/X11R5 \
- /usr/lib/X11R4 \
- \
- /usr/local/X11/lib \
- /usr/local/X11R6/lib \
- /usr/local/X11R5/lib \
- /usr/local/X11R4/lib \
- \
- /usr/local/lib/X11 \
- /usr/local/lib/X11R6 \
- /usr/local/lib/X11R5 \
- /usr/local/lib/X11R4 \
- \
- /usr/X386/lib \
- /usr/x386/lib \
- /usr/XFree86/lib/X11 \
- \
- /usr/lib \
- /usr/local/lib \
- /usr/unsupported/lib \
- /usr/athena/lib \
- /usr/local/x11r5/lib \
- /usr/lpp/Xamples/lib \
- /lib/usr/lib/X11 \
- \
- /usr/openwin/lib \
- /usr/openwin/share/lib \
- ; \
- do
- for ac_extension in a so sl; do
- if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
- ac_x_libraries=$ac_dir
- break 2
- fi
- done
- done
- fi
- rm -f conftest*
- fi # $ac_x_libraries = NO
- if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
- # Didn't find X anywhere. Cache the known absence of X.
- ac_cv_have_x="have_x=no"
- else
- # Record where we found X for the cache.
- ac_cv_have_x="have_x=yes \
- ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
- fi
- fi
- fi
- eval "$ac_cv_have_x"
- fi # $with_x != no
- if test "$have_x" != yes; then
- echo "$ac_t""$have_x" 1>&6
- no_x=yes
- else
- # If each of the values was on the command line, it overrides each guess.
- test "x$x_includes" = xNONE && x_includes=$ac_x_includes
- test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
- # Update the cache value to reflect the command line values.
- ac_cv_have_x="have_x=yes \
- ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
- echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
- fi
- test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
- test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
- ac_aux_dir=
- for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
- done
- if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
- fi
- ac_config_guess=$ac_aux_dir/config.guess
- ac_config_sub=$ac_aux_dir/config.sub
- ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
- if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
-
- # Make sure we can run config.sub.
- if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
- else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
- fi
- echo $ac_n "checking host system type""... $ac_c" 1>&6
- echo "configure:807: checking host system type" >&5
- host_alias=$host
- case "$host_alias" in
- NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
- esac
- host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
- host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
- host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
- host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
- echo "$ac_t""$host" 1>&6
- system_name="$host_os"
- else
- system_name="`(uname -s -r) 2>/dev/null`"
- if test -z "$system_name" ; then
- system_name="`(hostname) 2>/dev/null`"
- fi
- fi
- test -n "$system_name" && cat >> confdefs.h <<EOF
- #define SYSTEM_NAME "$system_name"
- EOF
- if eval "test \"`echo '$''{'cf_cv_system_name'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cf_cv_system_name="$system_name"
- fi
- test -z "$system_name" && system_name="$cf_cv_system_name"
- test -n "$cf_cv_system_name" && echo "$ac_t""Configuring for $cf_cv_system_name" 1>&6
- if test ".$system_name" != ".$cf_cv_system_name" ; then
- echo "$ac_t""Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" 1>&6
- { echo "configure: error: "Please remove config.cache and try again."" 1>&2; exit 1; }
- fi
- echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
- echo "configure:855: checking whether ${MAKE-make} sets \${MAKE}" >&5
- set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftestmake <<\EOF
- all:
- @echo 'ac_maketemp="${MAKE}"'
- EOF
- # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
- eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
- if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
- else
- eval ac_cv_prog_make_${ac_make}_set=no
- fi
- rm -f conftestmake
- fi
- if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
- else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
- fi
- # Extract the first word of "gcc", so it can be a program name with args.
- set dummy gcc; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
- echo "configure:884: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
- else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
- fi
- fi
- CC="$ac_cv_prog_CC"
- if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
- else
- echo "$ac_t""no" 1>&6
- fi
- if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
- set dummy cc; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
- echo "configure:914: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
- else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
- if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
- fi
- fi
- fi
- CC="$ac_cv_prog_CC"
- if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
- else
- echo "$ac_t""no" 1>&6
- fi
- if test -z "$CC"; then
- case "`uname -s`" in
- *win32* | *WIN32*)
- # Extract the first word of "cl", so it can be a program name with args.
- set dummy cl; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
- echo "configure:965: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
- else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="cl"
- break
- fi
- done
- IFS="$ac_save_ifs"
- fi
- fi
- CC="$ac_cv_prog_CC"
- if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
- else
- echo "$ac_t""no" 1>&6
- fi
- ;;
- esac
- fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
- fi
- echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
- echo "configure:997: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
- ac_ext=c
- # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
- ac_cpp='$CPP $CPPFLAGS'
- ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
- ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
- cross_compiling=$ac_cv_prog_cc_cross
- cat > conftest.$ac_ext << EOF
- #line 1008 "configure"
- #include "confdefs.h"
- main(){return(0);}
- EOF
- if { (eval echo configure:1013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- ac_cv_prog_cc_works=yes
- # If we can't run a trivial program, we are probably using a cross compiler.
- if (./conftest; exit) 2>/dev/null; then
- ac_cv_prog_cc_cross=no
- else
- ac_cv_prog_cc_cross=yes
- fi
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
- fi
- rm -fr conftest*
- ac_ext=c
- # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
- ac_cpp='$CPP $CPPFLAGS'
- ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
- ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
- cross_compiling=$ac_cv_prog_cc_cross
- echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
- if test $ac_cv_prog_cc_works = no; then
- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
- fi
- echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
- echo "configure:1039: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
- echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
- cross_compiling=$ac_cv_prog_cc_cross
- echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
- echo "configure:1044: checking whether we are using GNU C" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.c <<EOF
- #ifdef __GNUC__
- yes;
- #endif
- EOF
- if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
- else
- ac_cv_prog_gcc=no
- fi
- fi
- echo "$ac_t""$ac_cv_prog_gcc" 1>&6
- if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- else
- GCC=
- fi
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
- echo "configure:1072: checking whether ${CC-cc} accepts -g" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- echo 'void f(){}' > conftest.c
- if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
- else
- ac_cv_prog_cc_g=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
- else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
- fi
- echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
- echo "configure:1104: checking how to run the C preprocessor" >&5
- # On Suns, sometimes $CPP names a directory.
- if test -n "$CPP" && test -d "$CPP"; then
- CPP=
- fi
- if test -z "$CPP"; then
- if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- # This must be in double quotes, not single quotes, because CPP may get
- # substituted into the Makefile and "${CC-cc}" will confuse make.
- CPP="${CC-cc} -E"
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp.
- cat > conftest.$ac_ext <<EOF
- #line 1119 "configure"
- #include "confdefs.h"
- #include <assert.h>
- Syntax Error
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- { (eval echo configure:1125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
- ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
- if test -z "$ac_err"; then
- :
- else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -E -traditional-cpp"
- cat > conftest.$ac_ext <<EOF
- #line 1136 "configure"
- #include "confdefs.h"
- #include <assert.h>
- Syntax Error
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- { (eval echo configure:1142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
- ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
- if test -z "$ac_err"; then
- :
- else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -nologo -E"
- cat > conftest.$ac_ext <<EOF
- #line 1153 "configure"
- #include "confdefs.h"
- #include <assert.h>
- Syntax Error
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- { (eval echo configure:1159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
- ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
- if test -z "$ac_err"; then
- :
- else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP=/lib/cpp
- fi
- rm -f conftest*
- fi
- rm -f conftest*
- fi
- rm -f conftest*
- ac_cv_prog_CPP="$CPP"
- fi
- CPP="$ac_cv_prog_CPP"
- else
- ac_cv_prog_CPP="$CPP"
- fi
- echo "$ac_t""$CPP" 1>&6
- for ac_prog in mawk gawk nawk awk
- do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
- set dummy $ac_prog; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
- echo "configure:1188: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- if test -n "$AWK"; then
- ac_cv_prog_AWK="$AWK" # Let the user override the test.
- else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AWK="$ac_prog"
- break
- fi
- done
- IFS="$ac_save_ifs"
- fi
- fi
- AWK="$ac_cv_prog_AWK"
- if test -n "$AWK"; then
- echo "$ac_t""$AWK" 1>&6
- else
- echo "$ac_t""no" 1>&6
- fi
- test -n "$AWK" && break
- done
- CC_G_OPT="-g"
- CC_SHARED_OPTS=unknown
- CPPFLAGS="$CPPFLAGS"
- DFT_DEP_SUFFIX=""
- DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
- DFT_UPR_MODEL="NORMAL"
- LD="ld"
- LDFLAGS_SHARED=""
- LDFLAGS_STATIC=""
- LD_MODEL=""
- LD_SHARED_OPTS=""
- LIBTOOL=""
- LIB_CLEAN=""
- LIB_COMPILE=""
- LIB_LINK='${CC}'
- LINK_TESTS=""
- LINT=lint
- LINT_OPTS=""
- LOCAL_LDFLAGS=""
- MATH_LIB="-lm"
- PTHREAD="-lm"
- TEST_ARGS=""
- TEST_DEPS=""
- TEST_LIBS=""
- TINFO_ARGS='$(LIBS_CURSES)'
- cf_cv_abi_version=""
- cf_cv_rel_version=""
- cf_cv_screen=curses
- cf_cv_libtype=
- echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
- echo "configure:1250: checking for Cygwin environment" >&5
- if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 1255 "configure"
- #include "confdefs.h"
- int main() {
- #ifndef __CYGWIN__
- #define __CYGWIN__ __CYGWIN32__
- #endif
- return __CYGWIN__;
- ; return 0; }
- EOF
- if { (eval echo configure:1266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
- fi
- rm -f conftest*
- rm -f conftest*
- fi
- echo "$ac_t""$ac_cv_cygwin" 1>&6
- CYGWIN=
- test "$ac_cv_cygwin" = yes && CYGWIN=yes
- echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
- echo "configure:1283: checking for mingw32 environment" >&5
- if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 1288 "configure"
- #include "confdefs.h"
- int main() {
- return __MINGW32__;
- ; return 0; }
- EOF
- if { (eval echo configure:1295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
- fi
- rm -f conftest*
- rm -f conftest*
- fi
- echo "$ac_t""$ac_cv_mingw32" 1>&6
- MINGW32=
- test "$ac_cv_mingw32" = yes && MINGW32=yes
- echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
- echo "configure:1314: checking for executable suffix" >&5
- if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
- else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:1324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
- fi
- fi
- EXEEXT=""
- test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
- echo "$ac_t""${ac_cv_exeext}" 1>&6
- ac_exeext=$EXEEXT
- echo $ac_n "checking for object suffix""... $ac_c" 1>&6
- echo "configure:1345: checking for object suffix" >&5
- if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- rm -f conftest*
- echo 'int i = 1;' > conftest.$ac_ext
- if { (eval echo configure:1351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- for ac_file in conftest.*; do
- case $ac_file in
- *.c) ;;
- *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$ac_cv_objext" 1>&6
- OBJEXT=$ac_cv_objext
- ac_objext=$ac_cv_objext
- echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
- echo "configure:1371: checking for ${CC-cc} option to accept ANSI C" >&5
- if eval "test \"`echo '$''{'cf_cv_ansi_cc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cf_cv_ansi_cc=no
- cf_save_CFLAGS="$CFLAGS"
- cf_save_CPPFLAGS="$CPPFLAGS"
- # Don't try gcc -ansi; that turns off useful extensions and
- # breaks some systems' header files.
- # AIX -qlanglvl=ansi
- # Ultrix and OSF/1 -std1
- # HP-UX -Aa -D_HPUX_SOURCE
- # SVR4 -Xc
- # UnixWare 1.2 (cannot use -Xc, since ANSI/POSIX clashes)
- for cf_arg in "-DCC_HAS_PROTOS" \
- "" \
- -qlanglvl=ansi \
- -std1 \
- -Ae \
- "-Aa -D_HPUX_SOURCE" \
- -Xc
- do
-
- cf_fix_cppflags=no
- cf_new_cflags=
- cf_new_cppflags=
- cf_new_extra_cppflags=
- for cf_add_cflags in $cf_arg
- do
- case $cf_fix_cppflags in
- no)
- case $cf_add_cflags in #(vi
- -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
- case $cf_add_cflags in
- -D*)
- cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
- test "${cf_add_cflags}" != "${cf_tst_cflags}" \
- && test -z "${cf_tst_cflags}" \
- && cf_fix_cppflags=yes
- if test $cf_fix_cppflags = yes ; then
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
- continue
- elif test "${cf_tst_cflags}" = "\"'" ; then
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
- continue
- fi
- ;;
- esac
- case "$CPPFLAGS" in
- *$cf_add_cflags) #(vi
- ;;
- *) #(vi
- cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
- ;;
- esac
- ;;
- *)
- cf_new_cflags="$cf_new_cflags $cf_add_cflags"
- ;;
- esac
- ;;
- yes)
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
- cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
- test "${cf_add_cflags}" != "${cf_tst_cflags}" \
- && test -z "${cf_tst_cflags}" \
- && cf_fix_cppflags=no
- ;;
- esac
- done
- if test -n "$cf_new_cflags" ; then
-
- CFLAGS="$CFLAGS $cf_new_cflags"
- fi
- if test -n "$cf_new_cppflags" ; then
-
- CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
- fi
- if test -n "$cf_new_extra_cppflags" ; then
-
- EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
- fi
- cat > conftest.$ac_ext <<EOF
- #line 1467 "configure"
- #include "confdefs.h"
- #ifndef CC_HAS_PROTOS
- #if !defined(__STDC__) || (__STDC__ != 1)
- choke me
- #endif
- #endif
- int main() {
- int test (int i, double x);
- struct s1 {int (*f) (int a);};
- struct s2 {int (*f) (double a);};
- ; return 0; }
- EOF
- if { (eval echo configure:1483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- cf_cv_ansi_cc="$cf_arg"; break
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- fi
- rm -f conftest*
- done
- CFLAGS="$cf_save_CFLAGS"
- CPPFLAGS="$cf_save_CPPFLAGS"
- fi
- echo "$ac_t""$cf_cv_ansi_cc" 1>&6
- if test "$cf_cv_ansi_cc" != "no"; then
- if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
-
- cf_fix_cppflags=no
- cf_new_cflags=
- cf_new_cppflags=
- cf_new_extra_cppflags=
- for cf_add_cflags in $cf_cv_ansi_cc
- do
- case $cf_fix_cppflags in
- no)
- case $cf_add_cflags in #(vi
- -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
- case $cf_add_cflags in
- -D*)
- cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
- test "${cf_add_cflags}" != "${cf_tst_cflags}" \
- && test -z "${cf_tst_cflags}" \
- && cf_fix_cppflags=yes
- if test $cf_fix_cppflags = yes ; then
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
- continue
- elif test "${cf_tst_cflags}" = "\"'" ; then
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
- continue
- fi
- ;;
- esac
- case "$CPPFLAGS" in
- *$cf_add_cflags) #(vi
- ;;
- *) #(vi
- cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
- ;;
- esac
- ;;
- *)
- cf_new_cflags="$cf_new_cflags $cf_add_cflags"
- ;;
- esac
- ;;
- yes)
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
- cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
- test "${cf_add_cflags}" != "${cf_tst_cflags}" \
- && test -z "${cf_tst_cflags}" \
- && cf_fix_cppflags=no
- ;;
- esac
- done
- if test -n "$cf_new_cflags" ; then
-
- CFLAGS="$CFLAGS $cf_new_cflags"
- fi
- if test -n "$cf_new_cppflags" ; then
-
- CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
- fi
- if test -n "$cf_new_extra_cppflags" ; then
-
- EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
- fi
- else
- cat >> confdefs.h <<\EOF
- #define CC_HAS_PROTOS 1
- EOF
- fi
- fi
- if test "$cf_cv_ansi_cc" = "no"; then
- { echo "configure: error: Your compiler does not appear to recognize prototypes.
- You have the following choices:
- a. adjust your compiler options
- b. get an up-to-date compiler
- c. use a wrapper such as unproto" 1>&2; exit 1; }
- fi
- if test "$GCC" = yes
- then
- cat > conftest.i <<EOF
- #ifndef GCC_PRINTF
- #define GCC_PRINTF 0
- #endif
- #ifndef GCC_SCANF
- #define GCC_SCANF 0
- #endif
- #ifndef GCC_NORETURN
- #define GCC_NORETURN /* nothing */
- #endif
- #ifndef GCC_UNUSED
- #define GCC_UNUSED /* nothing */
- #endif
- EOF
- if test "$GCC" = yes
- then
- echo "checking for $CC __attribute__ directives" 1>&6
- echo "configure:1610: checking for $CC __attribute__ directives" >&5
- cat > conftest.$ac_ext <<EOF
- #line 1612 "${as_me-configure}"
- #include "confdefs.h"
- #include "conftest.h"
- #include "conftest.i"
- #if GCC_PRINTF
- #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
- #else
- #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
- #endif
- #if GCC_SCANF
- #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
- #else
- #define GCC_SCANFLIKE(fmt,var) /*nothing*/
- #endif
- extern void wow(char *,...) GCC_SCANFLIKE(1,2);
- extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
- extern void foo(void) GCC_NORETURN;
- int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
- EOF
- for cf_attribute in scanf printf unused noreturn
- do
-
- cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
- cf_directive="__attribute__(($cf_attribute))"
- echo "checking for $CC $cf_directive" 1>&5
- case $cf_attribute in
- scanf|printf)
- cat >conftest.h <<EOF
- #define GCC_$cf_ATTRIBUTE 1
- EOF
- ;;
- *)
- cat >conftest.h <<EOF
- #define GCC_$cf_ATTRIBUTE $cf_directive
- EOF
- ;;
- esac
- if { (eval echo configure:1650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6
- cat conftest.h >>confdefs.h
- fi
- done
- else
- fgrep define conftest.i >>confdefs.h
- fi
- rm -rf conftest*
- fi
- echo $ac_n "checking if $CC -U and -D options work together""... $ac_c" 1>&6
- echo "configure:1663: checking if $CC -U and -D options work together" >&5
- if eval "test \"`echo '$''{'cf_cv_cc_u_d_options'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cf_save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
- cat > conftest.$ac_ext <<EOF
- #line 1671 "configure"
- #include "confdefs.h"
- int main() {
- #ifndef U_D_OPTIONS
- make an undefined-error
- #endif
- #ifdef D_U_OPTIONS
- make a defined-error
- #endif
-
- ; return 0; }
- EOF
- if { (eval echo configure:1685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
-
- cf_cv_cc_u_d_options=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
-
- cf_cv_cc_u_d_options=no
- fi
- rm -f conftest*
- CPPFLAGS="$cf_save_CPPFLAGS"
- fi
- echo "$ac_t""$cf_cv_cc_u_d_options" 1>&6
- cf_XOPEN_SOURCE=500
- cf_POSIX_C_SOURCE=199506L
- case $host_os in #(vi
- aix[45]*) #(vi
- CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
- ;;
- freebsd*) #(vi
- # 5.x headers associate
- # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
- # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
- cf_POSIX_C_SOURCE=200112L
- cf_XOPEN_SOURCE=600
- CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
- ;;
- hpux*) #(vi
- CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
- ;;
- irix[56].*) #(vi
- CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
- ;;
- linux*|gnu*|k*bsd*-gnu) #(vi
-
- echo $ac_n "checking if we must define _GNU_SOURCE""... $ac_c" 1>&6
- echo "configure:1731: checking if we must define _GNU_SOURCE" >&5
- if eval "test \"`echo '$''{'cf_cv_gnu_source'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cat > conftest.$ac_ext <<EOF
- #line 1737 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- int main() {
- #ifndef _XOPEN_SOURCE
- make an error
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:1747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- cf_cv_gnu_source=no
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cf_save="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
- cat > conftest.$ac_ext <<EOF
- #line 1757 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- int main() {
- #ifdef _XOPEN_SOURCE
- make an error
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:1767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- cf_cv_gnu_source=no
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cf_cv_gnu_source=yes
- fi
- rm -f conftest*
- CPPFLAGS="$cf_save"
-
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$cf_cv_gnu_source" 1>&6
- test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
- ;;
- mirbsd*) #(vi
- # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
- ;;
- netbsd*) #(vi
- # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
- ;;
- openbsd*) #(vi
- # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
- ;;
- osf[45]*) #(vi
- CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
- ;;
- nto-qnx*) #(vi
- CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
- ;;
- sco*) #(vi
- # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
- ;;
- solaris*) #(vi
- CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
- ;;
- *)
- echo $ac_n "checking if we should define _XOPEN_SOURCE""... $ac_c" 1>&6
- echo "configure:1811: checking if we should define _XOPEN_SOURCE" >&5
- if eval "test \"`echo '$''{'cf_cv_xopen_source'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cat > conftest.$ac_ext <<EOF
- #line 1817 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- int main() {
- #ifndef _XOPEN_SOURCE
- make an error
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:1827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- cf_cv_xopen_source=no
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cf_save="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
- cat > conftest.$ac_ext <<EOF
- #line 1837 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- int main() {
- #ifdef _XOPEN_SOURCE
- make an error
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:1847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- cf_cv_xopen_source=no
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cf_cv_xopen_source=$cf_XOPEN_SOURCE
- fi
- rm -f conftest*
- CPPFLAGS="$cf_save"
-
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$cf_cv_xopen_source" 1>&6
- if test "$cf_cv_xopen_source" != no ; then
-
- # remove _XOPEN_SOURCE symbol from $CFLAGS
- CFLAGS=`echo "$CFLAGS" | \
- sed -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
- -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?$//g'`
-
- # remove _XOPEN_SOURCE symbol from $CPPFLAGS
- CPPFLAGS=`echo "$CPPFLAGS" | \
- sed -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
- -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?$//g'`
- test "$cf_cv_cc_u_d_options" = yes && \
- CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
- CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
- fi
-
- cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
- cf_save_CFLAGS="$CFLAGS"
- cf_save_CPPFLAGS="$CPPFLAGS"
- # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
- cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
- sed -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
- -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?$//g'`
- # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
- cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
- sed -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
- -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?$//g'`
- echo $ac_n "checking if we should define _POSIX_C_SOURCE""... $ac_c" 1>&6
- echo "configure:1902: checking if we should define _POSIX_C_SOURCE" >&5
- if eval "test \"`echo '$''{'cf_cv_posix_c_source'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
-
- echo "${as_me-configure}:1908: testing if the symbol is already defined go no further ..." 1>&5
- cat > conftest.$ac_ext <<EOF
- #line 1911 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- int main() {
- #ifndef _POSIX_C_SOURCE
- make an error
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:1921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- cf_cv_posix_c_source=no
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cf_want_posix_source=no
- case .$cf_POSIX_C_SOURCE in #(vi
- .[12]??*) #(vi
- cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
- ;;
- .2) #(vi
- cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
- cf_want_posix_source=yes
- ;;
- .*)
- cf_want_posix_source=yes
- ;;
- esac
- if test "$cf_want_posix_source" = yes ; then
- cat > conftest.$ac_ext <<EOF
- #line 1943 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- int main() {
- #ifdef _POSIX_SOURCE
- make an error
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:1953: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- :
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
- fi
- rm -f conftest*
- fi
-
- echo "${as_me-configure}:1964: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
- CFLAGS="$cf_trim_CFLAGS"
- CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
-
- echo "${as_me-configure}:1969: testing if the second compile does not leave our definition intact error ..." 1>&5
- cat > conftest.$ac_ext <<EOF
- #line 1972 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- int main() {
- #ifndef _POSIX_C_SOURCE
- make an error
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:1982: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- :
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cf_cv_posix_c_source=no
- fi
- rm -f conftest*
- CFLAGS="$cf_save_CFLAGS"
- CPPFLAGS="$cf_save_CPPFLAGS"
-
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$cf_cv_posix_c_source" 1>&6
- if test "$cf_cv_posix_c_source" != no ; then
- CFLAGS="$cf_trim_CFLAGS"
- CPPFLAGS="$cf_trim_CPPFLAGS"
- if test "$cf_cv_cc_u_d_options" = yes ; then
- cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
- sed -e 's/-D/-U/g' -e 's/=[^ ]*//g'`
- CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
- fi
- CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
- fi
- ;;
- esac
- echo $ac_n "checking for working const""... $ac_c" 1>&6
- echo "configure:2017: checking for working const" >&5
- if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 2022 "configure"
- #include "confdefs.h"
- int main() {
- /* Ultrix mips cc rejects this. */
- typedef int charset[2]; const charset x;
- /* SunOS 4.1.1 cc rejects this. */
- char const *const *ccp;
- char **p;
- /* NEC SVR4.0.2 mips cc rejects this. */
- struct point {int x, y;};
- static struct point const zero = {0,0};
- /* AIX XL C 1.02.0.0 rejects this.
- It does not let you subtract one const X* pointer from another in an arm
- of an if-expression whose if-part is not a constant expression */
- const char *g = "string";
- ccp = &g + (g ? g-g : 0);
- /* HPUX 7.0 cc rejects these. */
- ++ccp;
- p = (char**) ccp;
- ccp = (char const *const *) p;
- { /* SCO 3.2v4 cc rejects this. */
- char *t;
- char const *s = 0 ? (char *) 0 : (char const *) 0;
- *t++ = 0;
- }
- { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
- int x[] = {25, 17};
- const int *foo = &x[0];
- ++foo;
- }
- { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
- typedef const int *iptr;
- iptr p = 0;
- ++p;
- }
- { /* AIX XL C 1.02.0.0 rejects this saying
- "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
- struct s { int j; const int *ap[3]; };
- struct s *b; b->j = 5;
- }
- { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
- const int foo = 10;
- }
- ; return 0; }
- EOF
- if { (eval echo configure:2071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_c_const=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_c_const=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$ac_cv_c_const" 1>&6
- if test $ac_cv_c_const = no; then
- cat >> confdefs.h <<\EOF
- #define const
- EOF
- fi
- echo $ac_n "checking for signal global datatype""... $ac_c" 1>&6
- echo "configure:2093: checking for signal global datatype" >&5
- if eval "test \"`echo '$''{'cf_cv_sig_atomic_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- for cf_type in \
- "volatile sig_atomic_t" \
- "sig_atomic_t" \
- "int"
- do
- cat > conftest.$ac_ext <<EOF
- #line 2104 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <signal.h>
- #include <stdio.h>
- extern $cf_type x;
- $cf_type x;
- static void handler(int sig)
- {
- x = 5;
- }
- int main() {
- signal(SIGINT, handler);
- x = 1
- ; return 0; }
- EOF
- if { (eval echo configure:2122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- cf_cv_sig_atomic_t=$cf_type
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cf_cv_sig_atomic_t=no
- fi
- rm -f conftest*
- test "$cf_cv_sig_atomic_t" != no && break
- done
-
- fi
- echo "$ac_t""$cf_cv_sig_atomic_t" 1>&6
- test "$cf_cv_sig_atomic_t" != no && cat >> confdefs.h <<EOF
- #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
- EOF
- echo $ac_n "checking if you want to see long compiling messages""... $ac_c" 1>&6
- echo "configure:2146: checking if you want to see long compiling messages" >&5
- # Check whether --enable-echo or --disable-echo was given.
- if test "${enable_echo+set}" = set; then
- enableval="$enable_echo"
- test "$enableval" != no && enableval=yes
- if test "$enableval" != "yes" ; then
-
- ECHO_LT='--silent'
- ECHO_LD='@echo linking $@;'
- RULE_CC=' @echo compiling $<'
- SHOW_CC=' @echo compiling $@'
- ECHO_CC='@'
-
- else
-
- ECHO_LT=''
- ECHO_LD=''
- RULE_CC='# compiling'
- SHOW_CC='# compiling'
- ECHO_CC=''
- fi
- else
- enableval=yes
-
- ECHO_LT=''
- ECHO_LD=''
- RULE_CC='# compiling'
- SHOW_CC='# compiling'
- ECHO_CC=''
-
- fi
- echo "$ac_t""$enableval" 1>&6
- GCC_VERSION=none
- if test "$GCC" = yes ; then
- echo $ac_n "checking version of $CC""... $ac_c" 1>&6
- echo "configure:2193: checking version of $CC" >&5
- GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
- test -z "$GCC_VERSION" && GCC_VERSION=unknown
- echo "$ac_t""$GCC_VERSION" 1>&6
- fi
- if ( test "$GCC" = yes || test "$GXX" = yes )
- then
- echo $ac_n "checking if you want to turn on gcc warnings""... $ac_c" 1>&6
- echo "configure:2203: checking if you want to turn on gcc warnings" >&5
- # Check whether --enable-warnings or --disable-warnings was given.
- if test "${enable_warnings+set}" = set; then
- enableval="$enable_warnings"
- test "$enableval" != yes && enableval=no
- if test "$enableval" != "no" ; then
- with_warnings=yes
- else
- with_warnings=no
- fi
- else
- enableval=no
- with_warnings=no
-
- fi
- echo "$ac_t""$with_warnings" 1>&6
- if test "$with_warnings" = "yes"
- then
-
- INTEL_COMPILER=no
- if test "$GCC" = yes ; then
- case $host_os in
- linux*|gnu*)
- echo $ac_n "checking if this is really Intel C compiler""... $ac_c" 1>&6
- echo "configure:2232: checking if this is really Intel C compiler" >&5
- cf_save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -no-gcc"
- cat > conftest.$ac_ext <<EOF
- #line 2236 "configure"
- #include "confdefs.h"
- int main() {
- #ifdef __INTEL_COMPILER
- #else
- make an error
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:2248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- INTEL_COMPILER=yes
- cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- fi
- rm -f conftest*
- CFLAGS="$cf_save_CFLAGS"
- echo "$ac_t""$INTEL_COMPILER" 1>&6
- ;;
- esac
- fi
- cat > conftest.$ac_ext <<EOF
- #line 2266 "${as_me-configure}"
- int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
- EOF
- if test "$INTEL_COMPILER" = yes
- then
- # The "-wdXXX" options suppress warnings:
- # remark #1419: external declaration in primary source file
- # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
- # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
- # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
- # remark #193: zero used for undefined preprocessing identifier
- # remark #593: variable "curs_sb_left_arrow" was set but never used
- # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
- # remark #869: parameter "tw" was never referenced
- # remark #981: operands are evaluated in unspecified order
- # warning #269: invalid format string conversion
- echo "checking for $CC warning options" 1>&6
- echo "configure:2285: checking for $CC warning options" >&5
- cf_save_CFLAGS="$CFLAGS"
- EXTRA_CFLAGS="-Wall"
- for cf_opt in \
- wd1419 \
- wd1682 \
- wd1683 \
- wd1684 \
- wd193 \
- wd279 \
- wd593 \
- wd810 \
- wd869 \
- wd981
- do
- CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
- if { (eval echo configure:2301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
- EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
- fi
- done
- CFLAGS="$cf_save_CFLAGS"
- elif test "$GCC" = yes
- then
- echo "checking for $CC warning options" 1>&6
- echo "configure:2311: checking for $CC warning options" >&5
- cf_save_CFLAGS="$CFLAGS"
- EXTRA_CFLAGS="-W -Wall"
- cf_warn_CONST=""
- test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
- for cf_opt in \
- Wbad-function-cast \
- Wcast-align \
- Wcast-qual \
- Winline \
- Wmissing-declarations \
- Wmissing-prototypes \
- Wnested-externs \
- Wpointer-arith \
- Wshadow \
- Wstrict-prototypes \
- Wundef $cf_warn_CONST
- do
- CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
- if { (eval echo configure:2330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
- case $cf_opt in #(vi
- Wcast-qual) #(vi
- CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
- ;;
- Winline) #(vi
- case $GCC_VERSION in
- 3.3*)
- test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
- echo "${as_me-configure}:2341: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
- continue;;
- esac
- ;;
- esac
- EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
- fi
- done
- CFLAGS="$cf_save_CFLAGS"
- fi
- rm -f conftest*
- fi
- fi
- # Check whether --with-curses-dir or --without-curses-dir was given.
- if test "${with_curses_dir+set}" = set; then
- withval="$with_curses_dir"
-
- if test "x$prefix" != xNONE; then
- cf_path_syntax="$prefix"
- else
- cf_path_syntax="$ac_default_prefix"
- fi
- case ".$withval" in #(vi
- .\$\(*\)*|.\'*\'*) #(vi
- ;;
- ..|./*|.\\*) #(vi
- ;;
- .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
- ;;
- .\${*prefix}*) #(vi
- eval withval="$withval"
- case ".$withval" in #(vi
- .NONE/*)
- withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
- ;;
- esac
- ;; #(vi
- .no|.NONE/*)
- withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
- ;;
- *)
- { echo "configure: error: expected a pathname, not \"$withval\"" 1>&2; exit 1; }
- ;;
- esac
- cf_cv_curses_dir=$withval
- else
- cf_cv_curses_dir=no
- fi
- # Check whether --with-5lib or --without-5lib was given.
- if test "${with_5lib+set}" = set; then
- withval="$with_5lib"
- LIBS="-L/usr/5lib $LIBS"
- CPPFLAGS="$CPPFLAGS -I/usr/5include"
- fi
- # Check whether --with-ncursesw or --without-ncursesw was given.
- if test "${with_ncursesw+set}" = set; then
- withval="$with_ncursesw"
- cf_cv_screen=ncursesw
- else
-
- # Check whether --with-ncurses or --without-ncurses was given.
- if test "${with_ncurses+set}" = set; then
- withval="$with_ncurses"
- cf_cv_screen=ncurses
- else
-
- # Check whether --with-pdcurses or --without-pdcurses was given.
- if test "${with_pdcurses+set}" = set; then
- withval="$with_pdcurses"
- cf_cv_screen=pdcurses
- fi
- fi
- fi
- case $cf_cv_screen in
- curses)
-
- echo $ac_n "checking for extra include directories""... $ac_c" 1>&6
- echo "configure:2445: checking for extra include directories" >&5
- if eval "test \"`echo '$''{'cf_cv_curses_incdir'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cf_cv_curses_incdir=no
- case $host_os in #(vi
- hpux10.*) #(vi
- test -d /usr/include/curses_colr && \
- cf_cv_curses_incdir="-I/usr/include/curses_colr"
- ;;
- sunos3*|sunos4*)
- test -d /usr/5lib && \
- test -d /usr/5include && \
- cf_cv_curses_incdir="-I/usr/5include"
- ;;
- esac
- fi
- echo "$ac_t""$cf_cv_curses_incdir" 1>&6
- test "$cf_cv_curses_incdir" != no && CPPFLAGS="$cf_cv_curses_incdir $CPPFLAGS"
- echo $ac_n "checking if we have identified curses headers""... $ac_c" 1>&6
- echo "configure:2470: checking if we have identified curses headers" >&5
- if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cf_cv_ncurses_header=none
- for cf_header in \
- curses.h \
- ncurses.h \
- ncurses/curses.h \
- ncurses/ncurses.h
- do
- cat > conftest.$ac_ext <<EOF
- #line 2483 "configure"
- #include "confdefs.h"
- #include <${cf_header}>
- int main() {
- initscr(); tgoto("?", 0,0)
- ; return 0; }
- EOF
- if { (eval echo configure:2490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- cf_cv_ncurses_header=$cf_header; break
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- fi
- rm -f conftest*
- done
- fi
- echo "$ac_t""$cf_cv_ncurses_header" 1>&6
- if test "$cf_cv_ncurses_header" = none ; then
- { echo "configure: error: No curses header-files found" 1>&2; exit 1; }
- fi
- # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
- for ac_hdr in $cf_cv_ncurses_header
- do
- ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
- echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
- echo "configure:2513: checking for $ac_hdr" >&5
- if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 2518 "configure"
- #include "confdefs.h"
- #include <$ac_hdr>
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- { (eval echo configure:2523: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
- ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
- if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
- else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
- fi
- rm -f conftest*
- fi
- if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
- #define $ac_tr_hdr 1
- EOF
-
- else
- echo "$ac_t""no" 1>&6
- fi
- done
- echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
- echo "configure:2552: checking for terminfo header" >&5
- if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- case ${cf_cv_ncurses_header} in #(vi
- */ncurses.h|*/ncursesw.h) #(vi
- cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
- ;;
- *)
- cf_term_header=term.h
- ;;
- esac
- for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
- do
- cat > conftest.$ac_ext <<EOF
- #line 2569 "configure"
- #include "confdefs.h"
- #include <stdio.h>
- #include <${cf_cv_ncurses_header-curses.h}>
- #include <$cf_test>
- int main() {
- int x = auto_left_margin
- ; return 0; }
- EOF
- if { (eval echo configure:2579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
-
- cf_cv_term_header="$cf_test"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
-
- cf_cv_term_header=unknown
-
- fi
- rm -f conftest*
- test "$cf_cv_term_header" != unknown && break
- done
- fi
- echo "$ac_t""$cf_cv_term_header" 1>&6
- # Set definitions to allow ifdef'ing to accommodate subdirectories
- case $cf_cv_term_header in # (vi
- *term.h)
- cat >> confdefs.h <<\EOF
- #define HAVE_TERM_H 1
- EOF
- ;;
- esac
- case $cf_cv_term_header in # (vi
- ncurses/term.h) #(vi
- cat >> confdefs.h <<\EOF
- #define HAVE_NCURSES_TERM_H 1
- EOF
- ;;
- ncursesw/term.h)
- cat >> confdefs.h <<\EOF
- #define HAVE_NCURSESW_TERM_H 1
- EOF
- ;;
- esac
-
- echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
- echo "configure:2628: checking for ncurses version" >&5
- if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cf_cv_ncurses_version=no
- cf_tempfile=out$$
- rm -f $cf_tempfile
- if test "$cross_compiling" = yes; then
-
- # This will not work if the preprocessor splits the line after the
- # Autoconf token. The 'unproto' program does that.
- cat > conftest.$ac_ext <<EOF
- #include <${cf_cv_ncurses_header-curses.h}>
- #undef Autoconf
- #ifdef NCURSES_VERSION
- Autoconf NCURSES_VERSION
- #else
- #ifdef __NCURSES_H
- Autoconf "old"
- #endif
- ;
- #endif
- EOF
- cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
- { (eval echo configure:2654: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
- if test -f conftest.out ; then
- cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
- test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
- rm -f conftest.out
- fi
- else
- cat > conftest.$ac_ext <<EOF
- #line 2663 "configure"
- #include "confdefs.h"
- #include <${cf_cv_ncurses_header-curses.h}>
- #include <stdio.h>
- int main()
- {
- FILE *fp = fopen("$cf_tempfile", "w");
- #ifdef NCURSES_VERSION
- # ifdef NCURSES_VERSION_PATCH
- fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
- # else
- fprintf(fp, "%s\n", NCURSES_VERSION);
- # endif
- #else
- # ifdef __NCURSES_H
- fprintf(fp, "old\n");
- # else
- make an error
- # endif
- #endif
- ${cf_cv_main_return-return}(0);
- }
- EOF
- if { (eval echo configure:2687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
- then
-
- cf_cv_ncurses_version=`cat $cf_tempfile`
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- fi
- rm -fr conftest*
- fi
- rm -f $cf_tempfile
- fi
- echo "$ac_t""$cf_cv_ncurses_version" 1>&6
- test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
- #define NCURSES 1
- EOF
-
- echo $ac_n "checking if we have identified curses libraries""... $ac_c" 1>&6
- echo "configure:2711: checking if we have identified curses libraries" >&5
- cat > conftest.$ac_ext <<EOF
- #line 2713 "configure"
- #include "confdefs.h"
- #include <${cf_cv_ncurses_header-curses.h}>
- int main() {
- initscr(); tgoto("?", 0,0)
- ; return 0; }
- EOF
- if { (eval echo configure:2720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- cf_result=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cf_result=no
- fi
- rm -f conftest*
- echo "$ac_t""$cf_result" 1>&6
- if test "$cf_result" = no ; then
- case $host_os in #(vi
- freebsd*) #(vi
- echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
- echo "configure:2736: checking for tgoto in -lmytinfo" >&5
- ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lmytinfo $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 2744 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char tgoto();
- int main() {
- tgoto()
- ; return 0; }
- EOF
- if { (eval echo configure:2755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- LIBS="-lmytinfo $LIBS"
- else
- echo "$ac_t""no" 1>&6
- fi
- ;;
- hpux10.*) #(vi
- echo $ac_n "checking for initscr in -lcur_colr""... $ac_c" 1>&6
- echo "configure:2778: checking for initscr in -lcur_colr" >&5
- ac_lib_var=`echo cur_colr'_'initscr | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lcur_colr $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 2786 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char initscr();
- int main() {
- initscr()
- ; return 0; }
- EOF
- if { (eval echo configure:2797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
-
- LIBS="-lcur_colr $LIBS"
- ac_cv_func_initscr=yes
-
- else
- echo "$ac_t""no" 1>&6
- echo $ac_n "checking for initscr in -lHcurses""... $ac_c" 1>&6
- echo "configure:2820: checking for initscr in -lHcurses" >&5
- ac_lib_var=`echo Hcurses'_'initscr | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lHcurses $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 2828 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char initscr();
- int main() {
- initscr()
- ; return 0; }
- EOF
- if { (eval echo configure:2839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
-
- # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
- LIBS="-lHcurses $LIBS"
- CPPFLAGS="-D__HP_CURSES -D_HP_CURSES $CPPFLAGS"
- ac_cv_func_initscr=yes
-
- else
- echo "$ac_t""no" 1>&6
- fi
- fi
- ;;
- linux*) # Suse Linux does not follow /usr/lib convention
-
- if test -n "/lib" ; then
- for cf_add_libdir in /lib
- do
- if test $cf_add_libdir = /usr/lib ; then
- :
- elif test -d $cf_add_libdir
- then
- cf_have_libdir=no
- if test -n "$LDFLAGS$LIBS" ; then
- # a loop is needed to ensure we can add subdirs of existing dirs
- for cf_test_libdir in $LDFLAGS $LIBS ; do
- if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
- cf_have_libdir=yes; break
- fi
- done
- fi
- if test "$cf_have_libdir" = no ; then
- test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
- echo "${as_me-configure}:2888: testing adding $cf_add_libdir to library-path ..." 1>&5
- LDFLAGS="-L$cf_add_libdir $LDFLAGS"
- fi
- fi
- done
- fi
- ;;
- sunos3*|sunos4*)
- if test -d /usr/5lib ; then
-
- if test -n "/usr/5lib" ; then
- for cf_add_libdir in /usr/5lib
- do
- if test $cf_add_libdir = /usr/lib ; then
- :
- elif test -d $cf_add_libdir
- then
- cf_have_libdir=no
- if test -n "$LDFLAGS$LIBS" ; then
- # a loop is needed to ensure we can add subdirs of existing dirs
- for cf_test_libdir in $LDFLAGS $LIBS ; do
- if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
- cf_have_libdir=yes; break
- fi
- done
- fi
- if test "$cf_have_libdir" = no ; then
- test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
- echo "${as_me-configure}:2920: testing adding $cf_add_libdir to library-path ..." 1>&5
- LDFLAGS="-L$cf_add_libdir $LDFLAGS"
- fi
- fi
- done
- fi
- LIBS="$LIBS -lcurses -ltermcap"
- fi
- ac_cv_func_initscr=yes
- ;;
- esac
- if test ".$ac_cv_func_initscr" != .yes ; then
- cf_save_LIBS="$LIBS"
- cf_term_lib=""
- cf_curs_lib=""
- if test ".${cf_cv_ncurses_version-no}" != .no
- then
- cf_check_list="ncurses curses cursesX"
- else
- cf_check_list="cursesX curses ncurses"
- fi
- # Check for library containing tgoto. Do this before curses library
- # because it may be needed to link the test-case for initscr.
- echo $ac_n "checking for tgoto""... $ac_c" 1>&6
- echo "configure:2950: checking for tgoto" >&5
- if eval "test \"`echo '$''{'ac_cv_func_tgoto'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 2955 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char tgoto(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char tgoto();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_tgoto) || defined (__stub___tgoto)
- choke me
- #else
- tgoto();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:2978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_tgoto=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_tgoto=no"
- fi
- rm -f conftest*
- fi
- if eval "test \"`echo '$ac_cv_func_'tgoto`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cf_term_lib=predefined
- else
- echo "$ac_t""no" 1>&6
- for cf_term_lib in $cf_check_list termcap termlib unknown
- do
- echo $ac_n "checking for tgoto in -l$cf_term_lib""... $ac_c" 1>&6
- echo "configure:2999: checking for tgoto in -l$cf_term_lib" >&5
- ac_lib_var=`echo $cf_term_lib'_'tgoto | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-l$cf_term_lib $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 3007 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char tgoto();
- int main() {
- tgoto()
- ; return 0; }
- EOF
- if { (eval echo configure:3018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- break
- else
- echo "$ac_t""no" 1>&6
- fi
- done
-
- fi
- # Check for library containing initscr
- test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
- for cf_curs_lib in $cf_check_list xcurses jcurses unknown
- do
- echo $ac_n "checking for initscr in -l$cf_curs_lib""... $ac_c" 1>&6
- echo "configure:3048: checking for initscr in -l$cf_curs_lib" >&5
- ac_lib_var=`echo $cf_curs_lib'_'initscr | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-l$cf_curs_lib $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 3056 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char initscr();
- int main() {
- initscr()
- ; return 0; }
- EOF
- if { (eval echo configure:3067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- break
- else
- echo "$ac_t""no" 1>&6
- fi
- done
- test $cf_curs_lib = unknown && { echo "configure: error: no curses library found" 1>&2; exit 1; }
- LIBS="-l$cf_curs_lib $cf_save_LIBS"
- if test "$cf_term_lib" = unknown ; then
- echo $ac_n "checking if we can link with $cf_curs_lib library""... $ac_c" 1>&6
- echo "configure:3093: checking if we can link with $cf_curs_lib library" >&5
- cat > conftest.$ac_ext <<EOF
- #line 3095 "configure"
- #include "confdefs.h"
- #include <${cf_cv_ncurses_header-curses.h}>
- int main() {
- initscr()
- ; return 0; }
- EOF
- if { (eval echo configure:3102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- cf_result=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cf_result=no
- fi
- rm -f conftest*
- echo "$ac_t""$cf_result" 1>&6
- test $cf_result = no && { echo "configure: error: Cannot link curses library" 1>&2; exit 1; }
- elif test "$cf_curs_lib" = "$cf_term_lib" ; then
- :
- elif test "$cf_term_lib" != predefined ; then
- echo $ac_n "checking if we need both $cf_curs_lib and $cf_term_lib libraries""... $ac_c" 1>&6
- echo "configure:3118: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
- cat > conftest.$ac_ext <<EOF
- #line 3120 "configure"
- #include "confdefs.h"
- #include <${cf_cv_ncurses_header-curses.h}>
- int main() {
- initscr(); tgoto((char *)0, 0, 0);
- ; return 0; }
- EOF
- if { (eval echo configure:3127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- cf_result=no
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
-
- LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 3137 "configure"
- #include "confdefs.h"
- #include <${cf_cv_ncurses_header-curses.h}>
- int main() {
- initscr()
- ; return 0; }
- EOF
- if { (eval echo configure:3144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- cf_result=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cf_result=error
- fi
- rm -f conftest*
-
- fi
- rm -f conftest*
- echo "$ac_t""$cf_result" 1>&6
- fi
- fi
- fi
- ;;
- ncurses)
-
- cf_ncuhdr_root=ncurses
- test -n "$cf_cv_curses_dir" && \
- test "$cf_cv_curses_dir" != "no" && { \
-
- if test -n "$cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
- for cf_add_incdir in $cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root
- do
- while test $cf_add_incdir != /usr/include
- do
- if test -d $cf_add_incdir
- then
- cf_have_incdir=no
- if test -n "$CFLAGS$CPPFLAGS" ; then
- # a loop is needed to ensure we can add subdirs of existing dirs
- for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
- if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
- cf_have_incdir=yes; break
- fi
- done
- fi
- if test "$cf_have_incdir" = no ; then
- if test "$cf_add_incdir" = /usr/local/include ; then
- if test "$GCC" = yes
- then
- cf_save_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
- cat > conftest.$ac_ext <<EOF
- #line 3196 "configure"
- #include "confdefs.h"
- #include <stdio.h>
- int main() {
- printf("Hello")
- ; return 0; }
- EOF
- if { (eval echo configure:3203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- :
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cf_have_incdir=yes
- fi
- rm -f conftest*
- CPPFLAGS=$cf_save_CPPFLAGS
- fi
- fi
- fi
- if test "$cf_have_incdir" = no ; then
- test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
- echo "${as_me-configure}:3220: testing adding $cf_add_incdir to include-path ..." 1>&5
- CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
- cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
- test "$cf_top_incdir" = "$cf_add_incdir" && break
- cf_add_incdir="$cf_top_incdir"
- else
- break
- fi
- fi
- done
- done
- fi
- }
- echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
- echo "configure:3239: checking for $cf_ncuhdr_root header in include-path" >&5
- if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
- ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
- for cf_header in $cf_header_list
- do
-
- cat > conftest.$ac_ext <<EOF
- #line 3250 "configure"
- #include "confdefs.h"
- #include <$cf_header>
- int main() {
- #ifdef NCURSES_VERSION
- printf("%s\n", NCURSES_VERSION);
- #else
- #ifdef __NCURSES_H
- printf("old\n");
- #else
- make an error
- #endif
- #endif
-
-
- ; return 0; }
- EOF
- if { (eval echo configure:3271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- cf_cv_ncurses_h=$cf_header
-
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cf_cv_ncurses_h=no
- fi
- rm -f conftest*
- test "$cf_cv_ncurses_h" != no && break
- done
- fi
- echo "$ac_t""$cf_cv_ncurses_h" 1>&6
- if test "$cf_cv_ncurses_h" != no ; then
- cf_cv_ncurses_header=$cf_cv_ncurses_h
- else
- echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
- echo "configure:3297: checking for $cf_ncuhdr_root include-path" >&5
- if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- test -n "$verbose" && echo
- cf_search=""
- test "/usr" != "$prefix" && \
- test -d "/usr" && \
- (test $prefix = NONE || test -d $prefix) && {
- test -n "$verbose" && echo " ... testing for include-directories under /usr"
- test -d /usr/include && cf_search="$cf_search /usr/include"
- test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
- test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
- test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
- test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
- }
- test "$prefix" != "NONE" && \
- test -d "$prefix" && \
- {
- test -n "$verbose" && echo " ... testing for include-directories under $prefix"
- test -d $prefix/include && cf_search="$cf_search $prefix/include"
- test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
- test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
- test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
- test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
- }
- test "/usr/local" != "$prefix" && \
- test -d "/usr/local" && \
- (test $prefix = NONE || test -d $prefix) && {
- test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
- test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
- test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
- test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
- test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
- test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
- }
- test "/opt" != "$prefix" && \
- test -d "/opt" && \
- (test $prefix = NONE || test -d $prefix) && {
- test -n "$verbose" && echo " ... testing for include-directories under /opt"
- test -d /opt/include && cf_search="$cf_search /opt/include"
- test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
- test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
- test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
- test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
- }
- test "$HOME" != "$prefix" && \
- test -d "$HOME" && \
- (test $prefix = NONE || test -d $prefix) && {
- test -n "$verbose" && echo " ... testing for include-directories under $HOME"
- test -d $HOME/include && cf_search="$cf_search $HOME/include"
- test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
- test -d $HOME/include/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
- test -d $HOME/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
- test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
- }
- test "$includedir" != NONE && \
- test "$includedir" != "/usr/include" && \
- test -d "$includedir" && {
- test -d $includedir && cf_search="$cf_search $includedir"
- test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
- }
- test "$oldincludedir" != NONE && \
- test "$oldincludedir" != "/usr/include" && \
- test -d "$oldincludedir" && {
- test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
- test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
- }
- test -n "$verbose" && echo search path $cf_search
- cf_save2_CPPFLAGS="$CPPFLAGS"
- for cf_incdir in $cf_search
- do
-
- if test -n "$cf_incdir" ; then
- for cf_add_incdir in $cf_incdir
- do
- while test $cf_add_incdir != /usr/include
- do
- if test -d $cf_add_incdir
- then
- cf_have_incdir=no
- if test -n "$CFLAGS$CPPFLAGS" ; then
- # a loop is needed to ensure we can add subdirs of existing dirs
- for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
- if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
- cf_have_incdir=yes; break
- fi
- done
- fi
- if test "$cf_have_incdir" = no ; then
- if test "$cf_add_incdir" = /usr/local/include ; then
- if test "$GCC" = yes
- then
- cf_save_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
- cat > conftest.$ac_ext <<EOF
- #line 3410 "configure"
- #include "confdefs.h"
- #include <stdio.h>
- int main() {
- printf("Hello")
- ; return 0; }
- EOF
- if { (eval echo configure:3417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- :
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cf_have_incdir=yes
- fi
- rm -f conftest*
- CPPFLAGS=$cf_save_CPPFLAGS
- fi
- fi
- fi
- if test "$cf_have_incdir" = no ; then
- test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
- echo "${as_me-configure}:3434: testing adding $cf_add_incdir to include-path ..." 1>&5
- CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
- cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
- test "$cf_top_incdir" = "$cf_add_incdir" && break
- cf_add_incdir="$cf_top_incdir"
- else
- break
- fi
- fi
- done
- done
- fi
- for cf_header in \
- ncurses.h \
- curses.h
- do
-
- cat > conftest.$ac_ext <<EOF
- #line 3456 "configure"
- #include "confdefs.h"
- #include <$cf_header>
- int main() {
- #ifdef NCURSES_VERSION
- printf("%s\n", NCURSES_VERSION);
- #else
- #ifdef __NCURSES_H
- printf("old\n");
- #else
- make an error
- #endif
- #endif
-
-
- ; return 0; }
- EOF
- if { (eval echo configure:3477: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- cf_cv_ncurses_h2=$cf_header
-
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cf_cv_ncurses_h2=no
- fi
- rm -f conftest*
- if test "$cf_cv_ncurses_h2" != no ; then
- cf_cv_ncurses_h2=$cf_incdir/$cf_header
- test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
- break
- fi
- test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
- done
- CPPFLAGS="$cf_save2_CPPFLAGS"
- test "$cf_cv_ncurses_h2" != no && break
- done
- test "$cf_cv_ncurses_h2" = no && { echo "configure: error: not found" 1>&2; exit 1; }
-
- fi
- echo "$ac_t""$cf_cv_ncurses_h2" 1>&6
- cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
- cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
- if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
- cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
- fi
-
- if test -n "$cf_1st_incdir" ; then
- for cf_add_incdir in $cf_1st_incdir
- do
- while test $cf_add_incdir != /usr/include
- do
- if test -d $cf_add_incdir
- then
- cf_have_incdir=no
- if test -n "$CFLAGS$CPPFLAGS" ; then
- # a loop is needed to ensure we can add subdirs of existing dirs
- for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
- if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
- cf_have_incdir=yes; break
- fi
- done
- fi
- if test "$cf_have_incdir" = no ; then
- if test "$cf_add_incdir" = /usr/local/include ; then
- if test "$GCC" = yes
- then
- cf_save_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
- cat > conftest.$ac_ext <<EOF
- #line 3535 "configure"
- #include "confdefs.h"
- #include <stdio.h>
- int main() {
- printf("Hello")
- ; return 0; }
- EOF
- if { (eval echo configure:3542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- :
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cf_have_incdir=yes
- fi
- rm -f conftest*
- CPPFLAGS=$cf_save_CPPFLAGS
- fi
- fi
- fi
- if test "$cf_have_incdir" = no ; then
- test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
- echo "${as_me-configure}:3559: testing adding $cf_add_incdir to include-path ..." 1>&5
- CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
- cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
- test "$cf_top_incdir" = "$cf_add_incdir" && break
- cf_add_incdir="$cf_top_incdir"
- else
- break
- fi
- fi
- done
- done
- fi
- fi
- # Set definitions to allow ifdef'ing for ncurses.h
- case $cf_cv_ncurses_header in # (vi
- *ncurses.h)
- cat >> confdefs.h <<\EOF
- #define HAVE_NCURSES_H 1
- EOF
- ;;
- esac
- case $cf_cv_ncurses_header in # (vi
- ncurses/curses.h|ncurses/ncurses.h)
- cat >> confdefs.h <<\EOF
- #define HAVE_NCURSES_NCURSES_H 1
- EOF
- ;;
- ncursesw/curses.h|ncursesw/ncurses.h)
- cat >> confdefs.h <<\EOF
- #define HAVE_NCURSESW_NCURSES_H 1
- EOF
- ;;
- esac
- echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
- echo "configure:3607: checking for terminfo header" >&5
- if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- case ${cf_cv_ncurses_header} in #(vi
- */ncurses.h|*/ncursesw.h) #(vi
- cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
- ;;
- *)
- cf_term_header=term.h
- ;;
- esac
- for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
- do
- cat > conftest.$ac_ext <<EOF
- #line 3624 "configure"
- #include "confdefs.h"
- #include <stdio.h>
- #include <${cf_cv_ncurses_header-curses.h}>
- #include <$cf_test>
- int main() {
- int x = auto_left_margin
- ; return 0; }
- EOF
- if { (eval echo configure:3634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
-
- cf_cv_term_header="$cf_test"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
-
- cf_cv_term_header=unknown
-
- fi
- rm -f conftest*
- test "$cf_cv_term_header" != unknown && break
- done
- fi
- echo "$ac_t""$cf_cv_term_header" 1>&6
- # Set definitions to allow ifdef'ing to accommodate subdirectories
- case $cf_cv_term_header in # (vi
- *term.h)
- cat >> confdefs.h <<\EOF
- #define HAVE_TERM_H 1
- EOF
- ;;
- esac
- case $cf_cv_term_header in # (vi
- ncurses/term.h) #(vi
- cat >> confdefs.h <<\EOF
- #define HAVE_NCURSES_TERM_H 1
- EOF
- ;;
- ncursesw/term.h)
- cat >> confdefs.h <<\EOF
- #define HAVE_NCURSESW_TERM_H 1
- EOF
- ;;
- esac
- # some applications need this, but should check for NCURSES_VERSION
- cat >> confdefs.h <<\EOF
- #define NCURSES 1
- EOF
- echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
- echo "configure:3689: checking for ncurses version" >&5
- if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cf_cv_ncurses_version=no
- cf_tempfile=out$$
- rm -f $cf_tempfile
- if test "$cross_compiling" = yes; then
-
- # This will not work if the preprocessor splits the line after the
- # Autoconf token. The 'unproto' program does that.
- cat > conftest.$ac_ext <<EOF
- #include <${cf_cv_ncurses_header-curses.h}>
- #undef Autoconf
- #ifdef NCURSES_VERSION
- Autoconf NCURSES_VERSION
- #else
- #ifdef __NCURSES_H
- Autoconf "old"
- #endif
- ;
- #endif
- EOF
- cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
- { (eval echo configure:3715: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
- if test -f conftest.out ; then
- cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
- test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
- rm -f conftest.out
- fi
- else
- cat > conftest.$ac_ext <<EOF
- #line 3724 "configure"
- #include "confdefs.h"
- #include <${cf_cv_ncurses_header-curses.h}>
- #include <stdio.h>
- int main()
- {
- FILE *fp = fopen("$cf_tempfile", "w");
- #ifdef NCURSES_VERSION
- # ifdef NCURSES_VERSION_PATCH
- fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
- # else
- fprintf(fp, "%s\n", NCURSES_VERSION);
- # endif
- #else
- # ifdef __NCURSES_H
- fprintf(fp, "old\n");
- # else
- make an error
- # endif
- #endif
- ${cf_cv_main_return-return}(0);
- }
- EOF
- if { (eval echo configure:3748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
- then
-
- cf_cv_ncurses_version=`cat $cf_tempfile`
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- fi
- rm -fr conftest*
- fi
- rm -f $cf_tempfile
- fi
- echo "$ac_t""$cf_cv_ncurses_version" 1>&6
- test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
- #define NCURSES 1
- EOF
-
- cf_nculib_root=ncurses
- # This works, except for the special case where we find gpm, but
- # ncurses is in a nonstandard location via $LIBS, and we really want
- # to link gpm.
- cf_ncurses_LIBS=""
- cf_ncurses_SAVE="$LIBS"
- echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
- echo "configure:3779: checking for Gpm_Open in -lgpm" >&5
- ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lgpm $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 3787 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char Gpm_Open();
- int main() {
- Gpm_Open()
- ; return 0; }
- EOF
- if { (eval echo configure:3798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
- echo "configure:3814: checking for initscr in -lgpm" >&5
- ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lgpm $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 3822 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char initscr();
- int main() {
- initscr()
- ; return 0; }
- EOF
- if { (eval echo configure:3833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- LIBS="$cf_ncurses_SAVE"
- else
- echo "$ac_t""no" 1>&6
- cf_ncurses_LIBS="-lgpm"
- fi
- else
- echo "$ac_t""no" 1>&6
- fi
- case $host_os in #(vi
- freebsd*)
- # This is only necessary if you are linking against an obsolete
- # version of ncurses (but it should do no harm, since it's static).
- if test "$cf_nculib_root" = ncurses ; then
- echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
- echo "configure:3865: checking for tgoto in -lmytinfo" >&5
- ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lmytinfo $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 3873 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char tgoto();
- int main() {
- tgoto()
- ; return 0; }
- EOF
- if { (eval echo configure:3884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
- else
- echo "$ac_t""no" 1>&6
- fi
- fi
- ;;
- esac
- LIBS="$cf_ncurses_LIBS $LIBS"
- if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
- then
-
- if test -n "$cf_cv_curses_dir/lib" ; then
- for cf_add_libdir in $cf_cv_curses_dir/lib
- do
- if test $cf_add_libdir = /usr/lib ; then
- :
- elif test -d $cf_add_libdir
- then
- cf_have_libdir=no
- if test -n "$LDFLAGS$LIBS" ; then
- # a loop is needed to ensure we can add subdirs of existing dirs
- for cf_test_libdir in $LDFLAGS $LIBS ; do
- if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
- cf_have_libdir=yes; break
- fi
- done
- fi
- if test "$cf_have_libdir" = no ; then
- test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
- echo "${as_me-configure}:3932: testing adding $cf_add_libdir to library-path ..." 1>&5
- LDFLAGS="-L$cf_add_libdir $LDFLAGS"
- fi
- fi
- done
- fi
- LIBS="-l$cf_nculib_root $LIBS"
- else
-
- eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
- cf_libdir=""
- echo $ac_n "checking for initscr""... $ac_c" 1>&6
- echo "configure:3947: checking for initscr" >&5
- if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 3952 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char initscr(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char initscr();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_initscr) || defined (__stub___initscr)
- choke me
- #else
- initscr();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:3975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_initscr=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_initscr=no"
- fi
- rm -f conftest*
- fi
- if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
- else
- echo "$ac_t""no" 1>&6
- cf_save_LIBS="$LIBS"
- echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
- echo "configure:3995: checking for initscr in -l$cf_nculib_root" >&5
- LIBS="-l$cf_nculib_root $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 3998 "configure"
- #include "confdefs.h"
- #include <${cf_cv_ncurses_header-curses.h}>
- int main() {
- initscr()
- ; return 0; }
- EOF
- if { (eval echo configure:4005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- echo "$ac_t""yes" 1>&6
- eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
-
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- echo "$ac_t""no" 1>&6
- cf_search=""
- test "/usr" != "$prefix" && \
- test -d "/usr" && \
- (test $prefix = NONE || test -d $prefix) && {
- test -n "$verbose" && echo " ... testing for lib-directories under /usr"
- test -d /usr/lib && cf_search="$cf_search /usr/lib"
- test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
- test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
- test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
- test -d /usr/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
- }
- test "$prefix" != "NONE" && \
- test -d "$prefix" && \
- {
- test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
- test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
- test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
- test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
- test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
- test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
- }
- test "/usr/local" != "$prefix" && \
- test -d "/usr/local" && \
- (test $prefix = NONE || test -d $prefix) && {
- test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
- test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
- test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
- test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
- test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
- test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
- }
- test "/opt" != "$prefix" && \
- test -d "/opt" && \
- (test $prefix = NONE || test -d $prefix) && {
- test -n "$verbose" && echo " ... testing for lib-directories under /opt"
- test -d /opt/lib && cf_search="$cf_search /opt/lib"
- test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
- test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
- test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
- test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
- }
- test "$HOME" != "$prefix" && \
- test -d "$HOME" && \
- (test $prefix = NONE || test -d $prefix) && {
- test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
- test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
- test -d $HOME/lib/$cf_nculib_root && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
- test -d $HOME/lib/$cf_nculib_root/lib && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
- test -d $HOME/$cf_nculib_root/lib && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
- test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
- }
- for cf_libdir in $cf_search
- do
- echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
- echo "configure:4081: checking for -l$cf_nculib_root in $cf_libdir" >&5
- LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 4084 "configure"
- #include "confdefs.h"
- #include <${cf_cv_ncurses_header-curses.h}>
- int main() {
- initscr()
- ; return 0; }
- EOF
- if { (eval echo configure:4091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- echo "$ac_t""yes" 1>&6
- eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
- break
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- echo "$ac_t""no" 1>&6
- LIBS="$cf_save_LIBS"
- fi
- rm -f conftest*
- done
-
- fi
- rm -f conftest*
-
- fi
- eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
- if test $cf_found_library = no ; then
- { echo "configure: error: Cannot link $cf_nculib_root library" 1>&2; exit 1; }
- fi
- fi
- if test -n "$cf_ncurses_LIBS" ; then
- echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
- echo "configure:4122: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
- cf_ncurses_SAVE="$LIBS"
- for p in $cf_ncurses_LIBS ; do
- q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
- if test "$q" != "$LIBS" ; then
- LIBS="$q"
- fi
- done
- cat > conftest.$ac_ext <<EOF
- #line 4131 "configure"
- #include "confdefs.h"
- #include <${cf_cv_ncurses_header-curses.h}>
- int main() {
- initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
- ; return 0; }
- EOF
- if { (eval echo configure:4138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- echo "$ac_t""yes" 1>&6
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- echo "$ac_t""no" 1>&6
- LIBS="$cf_ncurses_SAVE"
- fi
- rm -f conftest*
- fi
- cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
- cat >> confdefs.h <<EOF
- #define $cf_nculib_ROOT 1
- EOF
- ;;
- ncursesw)
- cf_cv_libtype=w
-
- echo $ac_n "checking for multibyte character support""... $ac_c" 1>&6
- echo "configure:4164: checking for multibyte character support" >&5
- if eval "test \"`echo '$''{'cf_cv_utf8_lib'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cf_save_LIBS="$LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 4171 "configure"
- #include "confdefs.h"
- #include <stdlib.h>
- int main() {
- putwc(0,0);
- ; return 0; }
- EOF
- if { (eval echo configure:4179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- cf_cv_utf8_lib=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- LIBS="-lutf8 $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 4188 "configure"
- #include "confdefs.h"
- #include <libutf8.h>
- int main() {
- putwc(0,0);
- ; return 0; }
- EOF
- if { (eval echo configure:4196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- cf_cv_utf8_lib=add-on
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cf_cv_utf8_lib=no
- fi
- rm -f conftest*
- LIBS="$cf_save_LIBS"
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$cf_cv_utf8_lib" 1>&6
- # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
- # ncurses/ncursesw:
- if test "$cf_cv_utf8_lib" = "add-on" ; then
- cat >> confdefs.h <<\EOF
- #define HAVE_LIBUTF8_H 1
- EOF
- LIBS="-lutf8 $LIBS"
- fi
-
- cf_ncuhdr_root=ncursesw
- test -n "$cf_cv_curses_dir" && \
- test "$cf_cv_curses_dir" != "no" && { \
-
- if test -n "$cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
- for cf_add_incdir in $cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root
- do
- while test $cf_add_incdir != /usr/include
- do
- if test -d $cf_add_incdir
- then
- cf_have_incdir=no
- if test -n "$CFLAGS$CPPFLAGS" ; then
- # a loop is needed to ensure we can add subdirs of existing dirs
- for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
- if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
- cf_have_incdir=yes; break
- fi
- done
- fi
- if test "$cf_have_incdir" = no ; then
- if test "$cf_add_incdir" = /usr/local/include ; then
- if test "$GCC" = yes
- then
- cf_save_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
- cat > conftest.$ac_ext <<EOF
- #line 4255 "configure"
- #include "confdefs.h"
- #include <stdio.h>
- int main() {
- printf("Hello")
- ; return 0; }
- EOF
- if { (eval echo configure:4262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- :
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cf_have_incdir=yes
- fi
- rm -f conftest*
- CPPFLAGS=$cf_save_CPPFLAGS
- fi
- fi
- fi
- if test "$cf_have_incdir" = no ; then
- test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
- echo "${as_me-configure}:4279: testing adding $cf_add_incdir to include-path ..." 1>&5
- CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
- cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
- test "$cf_top_incdir" = "$cf_add_incdir" && break
- cf_add_incdir="$cf_top_incdir"
- else
- break
- fi
- fi
- done
- done
- fi
- }
- echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
- echo "configure:4298: checking for $cf_ncuhdr_root header in include-path" >&5
- if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
- ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
- for cf_header in $cf_header_list
- do
-
- cat > conftest.$ac_ext <<EOF
- #line 4309 "configure"
- #include "confdefs.h"
- #define _XOPEN_SOURCE_EXTENDED
- #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
- #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
- #include <$cf_header>
- int main() {
- #ifdef NCURSES_VERSION
- #ifndef WACS_BSSB
- make an error
- #endif
- printf("%s\n", NCURSES_VERSION);
- #else
- #ifdef __NCURSES_H
- printf("old\n");
- #else
- make an error
- #endif
- #endif
-
-
- ; return 0; }
- EOF
- if { (eval echo configure:4338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- cf_cv_ncurses_h=$cf_header
-
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cf_cv_ncurses_h=no
- fi
- rm -f conftest*
- test "$cf_cv_ncurses_h" != no && break
- done
- fi
- echo "$ac_t""$cf_cv_ncurses_h" 1>&6
- if test "$cf_cv_ncurses_h" != no ; then
- cf_cv_ncurses_header=$cf_cv_ncurses_h
- else
- echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
- echo "configure:4364: checking for $cf_ncuhdr_root include-path" >&5
- if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- test -n "$verbose" && echo
- cf_search=""
- test "/usr" != "$prefix" && \
- test -d "/usr" && \
- (test $prefix = NONE || test -d $prefix) && {
- test -n "$verbose" && echo " ... testing for include-directories under /usr"
- test -d /usr/include && cf_search="$cf_search /usr/include"
- test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
- test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
- test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
- test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
- }
- test "$prefix" != "NONE" && \
- test -d "$prefix" && \
- {
- test -n "$verbose" && echo " ... testing for include-directories under $prefix"
- test -d $prefix/include && cf_search="$cf_search $prefix/include"
- test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
- test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
- test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
- test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
- }
- test "/usr/local" != "$prefix" && \
- test -d "/usr/local" && \
- (test $prefix = NONE || test -d $prefix) && {
- test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
- test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
- test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
- test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
- test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
- test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
- }
- test "/opt" != "$prefix" && \
- test -d "/opt" && \
- (test $prefix = NONE || test -d $prefix) && {
- test -n "$verbose" && echo " ... testing for include-directories under /opt"
- test -d /opt/include && cf_search="$cf_search /opt/include"
- test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
- test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
- test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
- test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
- }
- test "$HOME" != "$prefix" && \
- test -d "$HOME" && \
- (test $prefix = NONE || test -d $prefix) && {
- test -n "$verbose" && echo " ... testing for include-directories under $HOME"
- test -d $HOME/include && cf_search="$cf_search $HOME/include"
- test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
- test -d $HOME/include/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
- test -d $HOME/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
- test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
- }
- test "$includedir" != NONE && \
- test "$includedir" != "/usr/include" && \
- test -d "$includedir" && {
- test -d $includedir && cf_search="$cf_search $includedir"
- test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
- }
- test "$oldincludedir" != NONE && \
- test "$oldincludedir" != "/usr/include" && \
- test -d "$oldincludedir" && {
- test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
- test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
- }
- test -n "$verbose" && echo search path $cf_search
- cf_save2_CPPFLAGS="$CPPFLAGS"
- for cf_incdir in $cf_search
- do
-
- if test -n "$cf_incdir" ; then
- for cf_add_incdir in $cf_incdir
- do
- while test $cf_add_incdir != /usr/include
- do
- if test -d $cf_add_incdir
- then
- cf_have_incdir=no
- if test -n "$CFLAGS$CPPFLAGS" ; then
- # a loop is needed to ensure we can add subdirs of existing dirs
- for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
- if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
- cf_have_incdir=yes; break
- fi
- done
- fi
- if test "$cf_have_incdir" = no ; then
- if test "$cf_add_incdir" = /usr/local/include ; then
- if test "$GCC" = yes
- then
- cf_save_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
- cat > conftest.$ac_ext <<EOF
- #line 4477 "configure"
- #include "confdefs.h"
- #include <stdio.h>
- int main() {
- printf("Hello")
- ; return 0; }
- EOF
- if { (eval echo configure:4484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- :
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cf_have_incdir=yes
- fi
- rm -f conftest*
- CPPFLAGS=$cf_save_CPPFLAGS
- fi
- fi
- fi
- if test "$cf_have_incdir" = no ; then
- test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
- echo "${as_me-configure}:4501: testing adding $cf_add_incdir to include-path ..." 1>&5
- CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
- cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
- test "$cf_top_incdir" = "$cf_add_incdir" && break
- cf_add_incdir="$cf_top_incdir"
- else
- break
- fi
- fi
- done
- done
- fi
- for cf_header in \
- ncurses.h \
- curses.h
- do
-
- cat > conftest.$ac_ext <<EOF
- #line 4523 "configure"
- #include "confdefs.h"
- #include <$cf_header>
- int main() {
- #ifdef NCURSES_VERSION
- printf("%s\n", NCURSES_VERSION);
- #else
- #ifdef __NCURSES_H
- printf("old\n");
- #else
- make an error
- #endif
- #endif
-
-
- ; return 0; }
- EOF
- if { (eval echo configure:4544: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- cf_cv_ncurses_h2=$cf_header
-
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cf_cv_ncurses_h2=no
- fi
- rm -f conftest*
- if test "$cf_cv_ncurses_h2" != no ; then
- cf_cv_ncurses_h2=$cf_incdir/$cf_header
- test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
- break
- fi
- test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
- done
- CPPFLAGS="$cf_save2_CPPFLAGS"
- test "$cf_cv_ncurses_h2" != no && break
- done
- test "$cf_cv_ncurses_h2" = no && { echo "configure: error: not found" 1>&2; exit 1; }
-
- fi
- echo "$ac_t""$cf_cv_ncurses_h2" 1>&6
- cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
- cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
- if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
- cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
- fi
-
- if test -n "$cf_1st_incdir" ; then
- for cf_add_incdir in $cf_1st_incdir
- do
- while test $cf_add_incdir != /usr/include
- do
- if test -d $cf_add_incdir
- then
- cf_have_incdir=no
- if test -n "$CFLAGS$CPPFLAGS" ; then
- # a loop is needed to ensure we can add subdirs of existing dirs
- for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
- if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
- cf_have_incdir=yes; break
- fi
- done
- fi
- if test "$cf_have_incdir" = no ; then
- if test "$cf_add_incdir" = /usr/local/include ; then
- if test "$GCC" = yes
- then
- cf_save_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
- cat > conftest.$ac_ext <<EOF
- #line 4602 "configure"
- #include "confdefs.h"
- #include <stdio.h>
- int main() {
- printf("Hello")
- ; return 0; }
- EOF
- if { (eval echo configure:4609: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- :
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cf_have_incdir=yes
- fi
- rm -f conftest*
- CPPFLAGS=$cf_save_CPPFLAGS
- fi
- fi
- fi
- if test "$cf_have_incdir" = no ; then
- test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
- echo "${as_me-configure}:4626: testing adding $cf_add_incdir to include-path ..." 1>&5
- CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
- cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
- test "$cf_top_incdir" = "$cf_add_incdir" && break
- cf_add_incdir="$cf_top_incdir"
- else
- break
- fi
- fi
- done
- done
- fi
- fi
- # Set definitions to allow ifdef'ing for ncurses.h
- case $cf_cv_ncurses_header in # (vi
- *ncurses.h)
- cat >> confdefs.h <<\EOF
- #define HAVE_NCURSES_H 1
- EOF
- ;;
- esac
- case $cf_cv_ncurses_header in # (vi
- ncurses/curses.h|ncurses/ncurses.h)
- cat >> confdefs.h <<\EOF
- #define HAVE_NCURSES_NCURSES_H 1
- EOF
- ;;
- ncursesw/curses.h|ncursesw/ncurses.h)
- cat >> confdefs.h <<\EOF
- #define HAVE_NCURSESW_NCURSES_H 1
- EOF
- ;;
- esac
- echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
- echo "configure:4674: checking for terminfo header" >&5
- if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- case ${cf_cv_ncurses_header} in #(vi
- */ncurses.h|*/ncursesw.h) #(vi
- cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
- ;;
- *)
- cf_term_header=term.h
- ;;
- esac
- for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
- do
- cat > conftest.$ac_ext <<EOF
- #line 4691 "configure"
- #include "confdefs.h"
- #include <stdio.h>
- #include <${cf_cv_ncurses_header-curses.h}>
- #include <$cf_test>
- int main() {
- int x = auto_left_margin
- ; return 0; }
- EOF
- if { (eval echo configure:4701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
-
- cf_cv_term_header="$cf_test"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
-
- cf_cv_term_header=unknown
-
- fi
- rm -f conftest*
- test "$cf_cv_term_header" != unknown && break
- done
- fi
- echo "$ac_t""$cf_cv_term_header" 1>&6
- # Set definitions to allow ifdef'ing to accommodate subdirectories
- case $cf_cv_term_header in # (vi
- *term.h)
- cat >> confdefs.h <<\EOF
- #define HAVE_TERM_H 1
- EOF
- ;;
- esac
- case $cf_cv_term_header in # (vi
- ncurses/term.h) #(vi
- cat >> confdefs.h <<\EOF
- #define HAVE_NCURSES_TERM_H 1
- EOF
- ;;
- ncursesw/term.h)
- cat >> confdefs.h <<\EOF
- #define HAVE_NCURSESW_TERM_H 1
- EOF
- ;;
- esac
- # some applications need this, but should check for NCURSES_VERSION
- cat >> confdefs.h <<\EOF
- #define NCURSES 1
- EOF
- echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
- echo "configure:4756: checking for ncurses version" >&5
- if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cf_cv_ncurses_version=no
- cf_tempfile=out$$
- rm -f $cf_tempfile
- if test "$cross_compiling" = yes; then
-
- # This will not work if the preprocessor splits the line after the
- # Autoconf token. The 'unproto' program does that.
- cat > conftest.$ac_ext <<EOF
- #include <${cf_cv_ncurses_header-curses.h}>
- #undef Autoconf
- #ifdef NCURSES_VERSION
- Autoconf NCURSES_VERSION
- #else
- #ifdef __NCURSES_H
- Autoconf "old"
- #endif
- ;
- #endif
- EOF
- cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
- { (eval echo configure:4782: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
- if test -f conftest.out ; then
- cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
- test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
- rm -f conftest.out
- fi
- else
- cat > conftest.$ac_ext <<EOF
- #line 4791 "configure"
- #include "confdefs.h"
- #include <${cf_cv_ncurses_header-curses.h}>
- #include <stdio.h>
- int main()
- {
- FILE *fp = fopen("$cf_tempfile", "w");
- #ifdef NCURSES_VERSION
- # ifdef NCURSES_VERSION_PATCH
- fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
- # else
- fprintf(fp, "%s\n", NCURSES_VERSION);
- # endif
- #else
- # ifdef __NCURSES_H
- fprintf(fp, "old\n");
- # else
- make an error
- # endif
- #endif
- ${cf_cv_main_return-return}(0);
- }
- EOF
- if { (eval echo configure:4815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
- then
-
- cf_cv_ncurses_version=`cat $cf_tempfile`
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- fi
- rm -fr conftest*
- fi
- rm -f $cf_tempfile
- fi
- echo "$ac_t""$cf_cv_ncurses_version" 1>&6
- test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
- #define NCURSES 1
- EOF
-
- cf_nculib_root=ncursesw
- # This works, except for the special case where we find gpm, but
- # ncurses is in a nonstandard location via $LIBS, and we really want
- # to link gpm.
- cf_ncurses_LIBS=""
- cf_ncurses_SAVE="$LIBS"
- echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
- echo "configure:4846: checking for Gpm_Open in -lgpm" >&5
- ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lgpm $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 4854 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char Gpm_Open();
- int main() {
- Gpm_Open()
- ; return 0; }
- EOF
- if { (eval echo configure:4865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
- echo "configure:4881: checking for initscr in -lgpm" >&5
- ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lgpm $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 4889 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char initscr();
- int main() {
- initscr()
- ; return 0; }
- EOF
- if { (eval echo configure:4900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- LIBS="$cf_ncurses_SAVE"
- else
- echo "$ac_t""no" 1>&6
- cf_ncurses_LIBS="-lgpm"
- fi
- else
- echo "$ac_t""no" 1>&6
- fi
- case $host_os in #(vi
- freebsd*)
- # This is only necessary if you are linking against an obsolete
- # version of ncurses (but it should do no harm, since it's static).
- if test "$cf_nculib_root" = ncurses ; then
- echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
- echo "configure:4932: checking for tgoto in -lmytinfo" >&5
- ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lmytinfo $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 4940 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char tgoto();
- int main() {
- tgoto()
- ; return 0; }
- EOF
- if { (eval echo configure:4951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
- else
- echo "$ac_t""no" 1>&6
- fi
- fi
- ;;
- esac
- LIBS="$cf_ncurses_LIBS $LIBS"
- if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
- then
-
- if test -n "$cf_cv_curses_dir/lib" ; then
- for cf_add_libdir in $cf_cv_curses_dir/lib
- do
- if test $cf_add_libdir = /usr/lib ; then
- :
- elif test -d $cf_add_libdir
- then
- cf_have_libdir=no
- if test -n "$LDFLAGS$LIBS" ; then
- # a loop is needed to ensure we can add subdirs of existing dirs
- for cf_test_libdir in $LDFLAGS $LIBS ; do
- if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
- cf_have_libdir=yes; break
- fi
- done
- fi
- if test "$cf_have_libdir" = no ; then
- test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
- echo "${as_me-configure}:4999: testing adding $cf_add_libdir to library-path ..." 1>&5
- LDFLAGS="-L$cf_add_libdir $LDFLAGS"
- fi
- fi
- done
- fi
- LIBS="-l$cf_nculib_root $LIBS"
- else
-
- eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
- cf_libdir=""
- echo $ac_n "checking for initscr""... $ac_c" 1>&6
- echo "configure:5014: checking for initscr" >&5
- if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 5019 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char initscr(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char initscr();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_initscr) || defined (__stub___initscr)
- choke me
- #else
- initscr();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:5042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_initscr=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_initscr=no"
- fi
- rm -f conftest*
- fi
- if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
- else
- echo "$ac_t""no" 1>&6
- cf_save_LIBS="$LIBS"
- echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
- echo "configure:5062: checking for initscr in -l$cf_nculib_root" >&5
- LIBS="-l$cf_nculib_root $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 5065 "configure"
- #include "confdefs.h"
- #include <${cf_cv_ncurses_header-curses.h}>
- int main() {
- initscr()
- ; return 0; }
- EOF
- if { (eval echo configure:5072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- echo "$ac_t""yes" 1>&6
- eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
-
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- echo "$ac_t""no" 1>&6
- cf_search=""
- test "/usr" != "$prefix" && \
- test -d "/usr" && \
- (test $prefix = NONE || test -d $prefix) && {
- test -n "$verbose" && echo " ... testing for lib-directories under /usr"
- test -d /usr/lib && cf_search="$cf_search /usr/lib"
- test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
- test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
- test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
- test -d /usr/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
- }
- test "$prefix" != "NONE" && \
- test -d "$prefix" && \
- {
- test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
- test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
- test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
- test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
- test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
- test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
- }
- test "/usr/local" != "$prefix" && \
- test -d "/usr/local" && \
- (test $prefix = NONE || test -d $prefix) && {
- test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
- test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
- test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
- test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
- test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
- test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
- }
- test "/opt" != "$prefix" && \
- test -d "/opt" && \
- (test $prefix = NONE || test -d $prefix) && {
- test -n "$verbose" && echo " ... testing for lib-directories under /opt"
- test -d /opt/lib && cf_search="$cf_search /opt/lib"
- test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
- test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
- test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
- test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
- }
- test "$HOME" != "$prefix" && \
- test -d "$HOME" && \
- (test $prefix = NONE || test -d $prefix) && {
- test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
- test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
- test -d $HOME/lib/$cf_nculib_root && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
- test -d $HOME/lib/$cf_nculib_root/lib && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
- test -d $HOME/$cf_nculib_root/lib && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
- test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
- }
- for cf_libdir in $cf_search
- do
- echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
- echo "configure:5148: checking for -l$cf_nculib_root in $cf_libdir" >&5
- LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 5151 "configure"
- #include "confdefs.h"
- #include <${cf_cv_ncurses_header-curses.h}>
- int main() {
- initscr()
- ; return 0; }
- EOF
- if { (eval echo configure:5158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- echo "$ac_t""yes" 1>&6
- eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
- break
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- echo "$ac_t""no" 1>&6
- LIBS="$cf_save_LIBS"
- fi
- rm -f conftest*
- done
-
- fi
- rm -f conftest*
-
- fi
- eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
- if test $cf_found_library = no ; then
- { echo "configure: error: Cannot link $cf_nculib_root library" 1>&2; exit 1; }
- fi
- fi
- if test -n "$cf_ncurses_LIBS" ; then
- echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
- echo "configure:5189: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
- cf_ncurses_SAVE="$LIBS"
- for p in $cf_ncurses_LIBS ; do
- q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
- if test "$q" != "$LIBS" ; then
- LIBS="$q"
- fi
- done
- cat > conftest.$ac_ext <<EOF
- #line 5198 "configure"
- #include "confdefs.h"
- #include <${cf_cv_ncurses_header-curses.h}>
- int main() {
- initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
- ; return 0; }
- EOF
- if { (eval echo configure:5205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- echo "$ac_t""yes" 1>&6
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- echo "$ac_t""no" 1>&6
- LIBS="$cf_ncurses_SAVE"
- fi
- rm -f conftest*
- fi
- cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
- cat >> confdefs.h <<EOF
- #define $cf_nculib_ROOT 1
- EOF
- ;;
- pdcurses) #(vi
- if test "$no_x" = yes; then
- # Not all programs may use this symbol, but it does not hurt to define it.
- cat >> confdefs.h <<\EOF
- #define X_DISPLAY_MISSING 1
- EOF
- X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
- else
- if test -n "$x_includes"; then
- X_CFLAGS="$X_CFLAGS -I$x_includes"
- fi
- # It would also be nice to do this for all -L options, not just this one.
- if test -n "$x_libraries"; then
- X_LIBS="$X_LIBS -L$x_libraries"
- # For Solaris; some versions of Sun CC require a space after -R and
- # others require no space. Words are not sufficient . . . .
- case "`(uname -sr) 2>/dev/null`" in
- "SunOS 5"*)
- echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
- echo "configure:5248: checking whether -R must be followed by a space" >&5
- ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
- cat > conftest.$ac_ext <<EOF
- #line 5251 "configure"
- #include "confdefs.h"
- int main() {
- ; return 0; }
- EOF
- if { (eval echo configure:5258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_R_nospace=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_R_nospace=no
- fi
- rm -f conftest*
- if test $ac_R_nospace = yes; then
- echo "$ac_t""no" 1>&6
- X_LIBS="$X_LIBS -R$x_libraries"
- else
- LIBS="$ac_xsave_LIBS -R $x_libraries"
- cat > conftest.$ac_ext <<EOF
- #line 5274 "configure"
- #include "confdefs.h"
- int main() {
- ; return 0; }
- EOF
- if { (eval echo configure:5281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_R_space=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_R_space=no
- fi
- rm -f conftest*
- if test $ac_R_space = yes; then
- echo "$ac_t""yes" 1>&6
- X_LIBS="$X_LIBS -R $x_libraries"
- else
- echo "$ac_t""neither works" 1>&6
- fi
- fi
- LIBS="$ac_xsave_LIBS"
- esac
- fi
- # Check for system-dependent libraries X programs must link with.
- # Do this before checking for the system-independent R6 libraries
- # (-lICE), since we may need -lsocket or whatever for X linking.
- if test "$ISC" = yes; then
- X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
- else
- # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
- # libraries were built with DECnet support. And karl@cs.umb.edu says
- # the Alpha needs dnet_stub (dnet does not exist).
- echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
- echo "configure:5313: checking for dnet_ntoa in -ldnet" >&5
- ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-ldnet $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 5321 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char dnet_ntoa();
- int main() {
- dnet_ntoa()
- ; return 0; }
- EOF
- if { (eval echo configure:5332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
- else
- echo "$ac_t""no" 1>&6
- fi
- if test $ac_cv_lib_dnet_dnet_ntoa = no; then
- echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
- echo "configure:5354: checking for dnet_ntoa in -ldnet_stub" >&5
- ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-ldnet_stub $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 5362 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char dnet_ntoa();
- int main() {
- dnet_ntoa()
- ; return 0; }
- EOF
- if { (eval echo configure:5373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
- else
- echo "$ac_t""no" 1>&6
- fi
- fi
- # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
- # to get the SysV transport functions.
- # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
- # needs -lnsl.
- # The nsl library prevents programs from opening the X display
- # on Irix 5.2, according to dickey@clark.net.
- echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
- echo "configure:5402: checking for gethostbyname" >&5
- if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 5407 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char gethostbyname(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char gethostbyname();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
- choke me
- #else
- gethostbyname();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:5430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_gethostbyname=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_gethostbyname=no"
- fi
- rm -f conftest*
- fi
- if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- :
- else
- echo "$ac_t""no" 1>&6
- fi
- if test $ac_cv_func_gethostbyname = no; then
- echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
- echo "configure:5451: checking for gethostbyname in -lnsl" >&5
- ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lnsl $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 5459 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char gethostbyname();
- int main() {
- gethostbyname()
- ; return 0; }
- EOF
- if { (eval echo configure:5470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
- else
- echo "$ac_t""no" 1>&6
- fi
- fi
- # lieder@skyler.mavd.honeywell.com says without -lsocket,
- # socket/setsockopt and other routines are undefined under SCO ODT
- # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
- # on later versions), says simon@lia.di.epfl.ch: it contains
- # gethostby* variants that don't use the nameserver (or something).
- # -lsocket must be given before -lnsl if both are needed.
- # We assume that if connect needs -lnsl, so does gethostbyname.
- echo $ac_n "checking for connect""... $ac_c" 1>&6
- echo "configure:5500: checking for connect" >&5
- if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 5505 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char connect(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char connect();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_connect) || defined (__stub___connect)
- choke me
- #else
- connect();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:5528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_connect=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_connect=no"
- fi
- rm -f conftest*
- fi
- if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- :
- else
- echo "$ac_t""no" 1>&6
- fi
- if test $ac_cv_func_connect = no; then
- echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
- echo "configure:5549: checking for connect in -lsocket" >&5
- ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 5557 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char connect();
- int main() {
- connect()
- ; return 0; }
- EOF
- if { (eval echo configure:5568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
- else
- echo "$ac_t""no" 1>&6
- fi
- fi
- # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
- echo $ac_n "checking for remove""... $ac_c" 1>&6
- echo "configure:5592: checking for remove" >&5
- if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 5597 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char remove(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char remove();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_remove) || defined (__stub___remove)
- choke me
- #else
- remove();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:5620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_remove=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_remove=no"
- fi
- rm -f conftest*
- fi
- if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- :
- else
- echo "$ac_t""no" 1>&6
- fi
- if test $ac_cv_func_remove = no; then
- echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
- echo "configure:5641: checking for remove in -lposix" >&5
- ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lposix $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 5649 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char remove();
- int main() {
- remove()
- ; return 0; }
- EOF
- if { (eval echo configure:5660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
- else
- echo "$ac_t""no" 1>&6
- fi
- fi
- # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
- echo $ac_n "checking for shmat""... $ac_c" 1>&6
- echo "configure:5684: checking for shmat" >&5
- if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 5689 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char shmat(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char shmat();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_shmat) || defined (__stub___shmat)
- choke me
- #else
- shmat();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:5712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_shmat=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_shmat=no"
- fi
- rm -f conftest*
- fi
- if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- :
- else
- echo "$ac_t""no" 1>&6
- fi
- if test $ac_cv_func_shmat = no; then
- echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
- echo "configure:5733: checking for shmat in -lipc" >&5
- ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lipc $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 5741 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char shmat();
- int main() {
- shmat()
- ; return 0; }
- EOF
- if { (eval echo configure:5752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
- else
- echo "$ac_t""no" 1>&6
- fi
- fi
- fi
- # Check for libraries that X11R6 Xt/Xaw programs need.
- ac_save_LDFLAGS="$LDFLAGS"
- test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
- # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
- # check for ICE first), but we must link in the order -lSM -lICE or
- # we get undefined symbols. So assume we have SM if we have ICE.
- # These have to be linked with before -lX11, unlike the other
- # libraries we check for below, so use a different variable.
- # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
- echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
- echo "configure:5785: checking for IceConnectionNumber in -lICE" >&5
- ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lICE $X_EXTRA_LIBS $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 5793 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char IceConnectionNumber();
- int main() {
- IceConnectionNumber()
- ; return 0; }
- EOF
- if { (eval echo configure:5804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
- else
- echo "$ac_t""no" 1>&6
- fi
- LDFLAGS="$ac_save_LDFLAGS"
- fi
- # SYSTEM_NAME=`echo "$cf_cv_system_name"|tr ' ' -`
- cf_have_X_LIBS=no
- LDFLAGS="$X_LIBS $LDFLAGS"
- test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
- echo "${as_me-configure}:5840: testing checking additions to CFLAGS ..." 1>&5
- cf_check_cflags="$CFLAGS"
- cf_check_cppflags="$CPPFLAGS"
- cf_fix_cppflags=no
- cf_new_cflags=
- cf_new_cppflags=
- cf_new_extra_cppflags=
- for cf_add_cflags in $X_CFLAGS
- do
- case $cf_fix_cppflags in
- no)
- case $cf_add_cflags in #(vi
- -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
- case $cf_add_cflags in
- -D*)
- cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
- test "${cf_add_cflags}" != "${cf_tst_cflags}" \
- && test -z "${cf_tst_cflags}" \
- && cf_fix_cppflags=yes
- if test $cf_fix_cppflags = yes ; then
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
- continue
- elif test "${cf_tst_cflags}" = "\"'" ; then
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
- continue
- fi
- ;;
- esac
- case "$CPPFLAGS" in
- *$cf_add_cflags) #(vi
- ;;
- *) #(vi
- cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
- ;;
- esac
- ;;
- *)
- cf_new_cflags="$cf_new_cflags $cf_add_cflags"
- ;;
- esac
- ;;
- yes)
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
- cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
- test "${cf_add_cflags}" != "${cf_tst_cflags}" \
- && test -z "${cf_tst_cflags}" \
- && cf_fix_cppflags=no
- ;;
- esac
- done
- if test -n "$cf_new_cflags" ; then
- test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
- echo "${as_me-configure}:5902: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
- CFLAGS="$CFLAGS $cf_new_cflags"
- fi
- if test -n "$cf_new_cppflags" ; then
- test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
- echo "${as_me-configure}:5911: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
- CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
- fi
- if test -n "$cf_new_extra_cppflags" ; then
- test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
- echo "${as_me-configure}:5920: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
- EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
- fi
- if test "$cf_check_cflags" != "$CFLAGS" ; then
- cat > conftest.$ac_ext <<EOF
- #line 5931 "configure"
- #include "confdefs.h"
- #include <stdio.h>
- int main() {
- printf("Hello world");
- ; return 0; }
- EOF
- if { (eval echo configure:5938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- :
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
- echo "${as_me-configure}:5946: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
- if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
- test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
- echo "${as_me-configure}:5952: testing but keeping change to \$CPPFLAGS ..." 1>&5
- fi
- CFLAGS="$cf_check_flags"
- fi
- rm -f conftest*
- fi
- echo $ac_n "checking for XOpenDisplay""... $ac_c" 1>&6
- echo "configure:5963: checking for XOpenDisplay" >&5
- if eval "test \"`echo '$''{'ac_cv_func_XOpenDisplay'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 5968 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char XOpenDisplay(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char XOpenDisplay();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
- choke me
- #else
- XOpenDisplay();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:5991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_XOpenDisplay=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_XOpenDisplay=no"
- fi
- rm -f conftest*
- fi
- if eval "test \"`echo '$ac_cv_func_'XOpenDisplay`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- :
- else
- echo "$ac_t""no" 1>&6
- echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
- echo "configure:6010: checking for XOpenDisplay in -lX11" >&5
- ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 6018 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char XOpenDisplay();
- int main() {
- XOpenDisplay()
- ; return 0; }
- EOF
- if { (eval echo configure:6029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- LIBS="-lX11 $LIBS"
- else
- echo "$ac_t""no" 1>&6
- fi
- fi
- echo $ac_n "checking for XtAppInitialize""... $ac_c" 1>&6
- echo "configure:6053: checking for XtAppInitialize" >&5
- if eval "test \"`echo '$''{'ac_cv_func_XtAppInitialize'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 6058 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char XtAppInitialize(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char XtAppInitialize();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
- choke me
- #else
- XtAppInitialize();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:6081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_XtAppInitialize=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_XtAppInitialize=no"
- fi
- rm -f conftest*
- fi
- if eval "test \"`echo '$ac_cv_func_'XtAppInitialize`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- :
- else
- echo "$ac_t""no" 1>&6
- echo $ac_n "checking for XtAppInitialize in -lXt""... $ac_c" 1>&6
- echo "configure:6100: checking for XtAppInitialize in -lXt" >&5
- ac_lib_var=`echo Xt'_'XtAppInitialize | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 6108 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char XtAppInitialize();
- int main() {
- XtAppInitialize()
- ; return 0; }
- EOF
- if { (eval echo configure:6119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
- #define HAVE_LIBXT 1
- EOF
- cf_have_X_LIBS=Xt
- LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
- else
- echo "$ac_t""no" 1>&6
- fi
- fi
- if test $cf_have_X_LIBS = no ; then
- echo "configure: warning: Unable to successfully link X Toolkit library (-lXt) with
- test program. You will have to check and add the proper libraries by hand
- to makefile." 1>&2
- fi
- cf_x_athena=${cf_x_athena-Xaw}
- echo $ac_n "checking if you want to link with Xaw 3d library""... $ac_c" 1>&6
- echo "configure:6157: checking if you want to link with Xaw 3d library" >&5
- withval=
- # Check whether --with-Xaw3d or --without-Xaw3d was given.
- if test "${with_Xaw3d+set}" = set; then
- withval="$with_Xaw3d"
- :
- fi
- if test "$withval" = yes ; then
- cf_x_athena=Xaw3d
- echo "$ac_t""yes" 1>&6
- else
- echo "$ac_t""no" 1>&6
- fi
- echo $ac_n "checking if you want to link with neXT Athena library""... $ac_c" 1>&6
- echo "configure:6174: checking if you want to link with neXT Athena library" >&5
- withval=
- # Check whether --with-neXtaw or --without-neXtaw was given.
- if test "${with_neXtaw+set}" = set; then
- withval="$with_neXtaw"
- :
- fi
- if test "$withval" = yes ; then
- cf_x_athena=neXtaw
- echo "$ac_t""yes" 1>&6
- else
- echo "$ac_t""no" 1>&6
- fi
- echo $ac_n "checking if you want to link with Athena-Plus library""... $ac_c" 1>&6
- echo "configure:6191: checking if you want to link with Athena-Plus library" >&5
- withval=
- # Check whether --with-XawPlus or --without-XawPlus was given.
- if test "${with_XawPlus+set}" = set; then
- withval="$with_XawPlus"
- :
- fi
- if test "$withval" = yes ; then
- cf_x_athena=XawPlus
- echo "$ac_t""yes" 1>&6
- else
- echo "$ac_t""no" 1>&6
- fi
- echo $ac_n "checking for XextCreateExtension in -lXext""... $ac_c" 1>&6
- echo "configure:6208: checking for XextCreateExtension in -lXext" >&5
- ac_lib_var=`echo Xext'_'XextCreateExtension | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lXext $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 6216 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char XextCreateExtension();
- int main() {
- XextCreateExtension()
- ; return 0; }
- EOF
- if { (eval echo configure:6227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- LIBS="-lXext $LIBS"
- else
- echo "$ac_t""no" 1>&6
- fi
- cf_x_athena_lib=""
- cf_x_athena_root=$cf_x_athena
- cf_x_athena_include=""
- for cf_path in default \
- /usr/contrib/X11R6 \
- /usr/contrib/X11R5 \
- /usr/lib/X11R5 \
- /usr/local
- do
- if test -z "$cf_x_athena_include" ; then
- cf_save="$CPPFLAGS"
- cf_test=X11/$cf_x_athena_root/SimpleMenu.h
- if test $cf_path != default ; then
- CPPFLAGS="-I$cf_path/include $cf_save"
- echo $ac_n "checking for $cf_test in $cf_path""... $ac_c" 1>&6
- echo "configure:6266: checking for $cf_test in $cf_path" >&5
- else
- echo $ac_n "checking for $cf_test""... $ac_c" 1>&6
- echo "configure:6269: checking for $cf_test" >&5
- fi
- cat > conftest.$ac_ext <<EOF
- #line 6272 "configure"
- #include "confdefs.h"
- #include <X11/Intrinsic.h>
- #include <$cf_test>
- int main() {
- ; return 0; }
- EOF
- if { (eval echo configure:6281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- cf_result=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cf_result=no
- fi
- rm -f conftest*
- echo "$ac_t""$cf_result" 1>&6
- if test "$cf_result" = yes ; then
- cf_x_athena_include=$cf_path
- break
- else
- CPPFLAGS="$cf_save"
- fi
- fi
- done
- if test -z "$cf_x_athena_include" ; then
- echo "configure: warning: Unable to successfully find Athena header files with test program" 1>&2
- elif test "$cf_x_athena_include" != default ; then
- CPPFLAGS="$CPPFLAGS -I$cf_x_athena_include"
- fi
- cf_x_athena_root=$cf_x_athena
- cf_x_athena_lib=""
- for cf_path in default \
- /usr/contrib/X11R6 \
- /usr/contrib/X11R5 \
- /usr/lib/X11R5 \
- /usr/local
- do
- for cf_lib in \
- "-l$cf_x_athena_root -lXmu" \
- "-l$cf_x_athena_root -lXpm -lXmu" \
- "-l${cf_x_athena_root}_s -lXmu_s"
- do
- if test -z "$cf_x_athena_lib" ; then
- cf_save="$LIBS"
- cf_test=XawSimpleMenuAddGlobalActions
- if test $cf_path != default ; then
- LIBS="-L$cf_path/lib $cf_lib $LIBS"
- echo $ac_n "checking for $cf_lib in $cf_path""... $ac_c" 1>&6
- echo "configure:6328: checking for $cf_lib in $cf_path" >&5
- else
- LIBS="$cf_lib $LIBS"
- echo $ac_n "checking for $cf_test in $cf_lib""... $ac_c" 1>&6
- echo "configure:6332: checking for $cf_test in $cf_lib" >&5
- fi
- cat > conftest.$ac_ext <<EOF
- #line 6335 "configure"
- #include "confdefs.h"
- int main() {
- $cf_test()
- ; return 0; }
- EOF
- if { (eval echo configure:6342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- cf_result=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cf_result=no
- fi
- rm -f conftest*
- echo "$ac_t""$cf_result" 1>&6
- if test "$cf_result" = yes ; then
- cf_x_athena_lib="$cf_lib"
- break
- fi
- LIBS="$cf_save"
- fi
- done
- done
- if test -z "$cf_x_athena_lib" ; then
- { echo "configure: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" 1>&2; exit 1; }
- fi
- cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
- cat >> confdefs.h <<EOF
- #define $cf_x_athena_LIBS 1
- EOF
- for ac_prog in xcurses-config
- do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
- set dummy $ac_prog; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
- echo "configure:6383: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_path_XCURSES_CONFIG'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- case "$XCURSES_CONFIG" in
- /*)
- ac_cv_path_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test with a path.
- ;;
- ?:/*)
- ac_cv_path_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test with a dos path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_path_XCURSES_CONFIG="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
- ;;
- esac
- fi
- XCURSES_CONFIG="$ac_cv_path_XCURSES_CONFIG"
- if test -n "$XCURSES_CONFIG"; then
- echo "$ac_t""$XCURSES_CONFIG" 1>&6
- else
- echo "$ac_t""no" 1>&6
- fi
- test -n "$XCURSES_CONFIG" && break
- done
- test -n "$XCURSES_CONFIG" || XCURSES_CONFIG="none"
- if test "$XCURSES_CONFIG" != none ; then
- CPPFLAGS="`$XCURSES_CONFIG --cflags` $CPPFLAGS"
- LIBS="`$XCURSES_CONFIG --libs` $LIBS"
- cf_cv_lib_XCurses=yes
- else
- LDFLAGS="$LDFLAGS $X_LIBS"
- test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
- echo "${as_me-configure}:6433: testing checking additions to CFLAGS ..." 1>&5
- cf_check_cflags="$CFLAGS"
- cf_check_cppflags="$CPPFLAGS"
- cf_fix_cppflags=no
- cf_new_cflags=
- cf_new_cppflags=
- cf_new_extra_cppflags=
- for cf_add_cflags in $X_CFLAGS
- do
- case $cf_fix_cppflags in
- no)
- case $cf_add_cflags in #(vi
- -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
- case $cf_add_cflags in
- -D*)
- cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
- test "${cf_add_cflags}" != "${cf_tst_cflags}" \
- && test -z "${cf_tst_cflags}" \
- && cf_fix_cppflags=yes
- if test $cf_fix_cppflags = yes ; then
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
- continue
- elif test "${cf_tst_cflags}" = "\"'" ; then
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
- continue
- fi
- ;;
- esac
- case "$CPPFLAGS" in
- *$cf_add_cflags) #(vi
- ;;
- *) #(vi
- cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
- ;;
- esac
- ;;
- *)
- cf_new_cflags="$cf_new_cflags $cf_add_cflags"
- ;;
- esac
- ;;
- yes)
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
- cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
- test "${cf_add_cflags}" != "${cf_tst_cflags}" \
- && test -z "${cf_tst_cflags}" \
- && cf_fix_cppflags=no
- ;;
- esac
- done
- if test -n "$cf_new_cflags" ; then
- test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
- echo "${as_me-configure}:6495: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
- CFLAGS="$CFLAGS $cf_new_cflags"
- fi
- if test -n "$cf_new_cppflags" ; then
- test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
- echo "${as_me-configure}:6504: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
- CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
- fi
- if test -n "$cf_new_extra_cppflags" ; then
- test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
- echo "${as_me-configure}:6513: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
- EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
- fi
- if test "$cf_check_cflags" != "$CFLAGS" ; then
- cat > conftest.$ac_ext <<EOF
- #line 6524 "configure"
- #include "confdefs.h"
- #include <stdio.h>
- int main() {
- printf("Hello world");
- ; return 0; }
- EOF
- if { (eval echo configure:6531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- :
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
- echo "${as_me-configure}:6539: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
- if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
- test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
- echo "${as_me-configure}:6545: testing but keeping change to \$CPPFLAGS ..." 1>&5
- fi
- CFLAGS="$cf_check_flags"
- fi
- rm -f conftest*
- fi
- echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
- echo "configure:6555: checking for XOpenDisplay in -lX11" >&5
- ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 6563 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char XOpenDisplay();
- int main() {
- XOpenDisplay()
- ; return 0; }
- EOF
- if { (eval echo configure:6574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- LIBS="-lX11 $LIBS"
- else
- echo "$ac_t""no" 1>&6
- fi
- echo $ac_n "checking for XCurses library""... $ac_c" 1>&6
- echo "configure:6595: checking for XCurses library" >&5
- if eval "test \"`echo '$''{'cf_cv_lib_XCurses'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- LIBS="-lXCurses $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 6602 "configure"
- #include "confdefs.h"
- #include <xcurses.h>
- char *XCursesProgramName = "test";
- int main() {
- XCursesExit();
- ; return 0; }
- EOF
- if { (eval echo configure:6612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- cf_cv_lib_XCurses=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cf_cv_lib_XCurses=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$cf_cv_lib_XCurses" 1>&6
- fi
- if test $cf_cv_lib_XCurses = yes ; then
- cat >> confdefs.h <<\EOF
- #define UNIX 1
- EOF
- cat >> confdefs.h <<\EOF
- #define XCURSES 1
- EOF
- cat >> confdefs.h <<\EOF
- #define HAVE_XCURSES 1
- EOF
- else
- { echo "configure: error: Cannot link with XCurses" 1>&2; exit 1; }
- fi
- ;;
- esac
- case $cf_cv_screen in #(vi
- pdcurses) #(vi
- ;;
- *)
- # look for curses-related libraries
- echo $ac_n "checking for new_panel in -lpanel$cf_cv_libtype""... $ac_c" 1>&6
- echo "configure:6657: checking for new_panel in -lpanel$cf_cv_libtype" >&5
- ac_lib_var=`echo panel$cf_cv_libtype'_'new_panel | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lpanel$cf_cv_libtype $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 6665 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char new_panel();
- int main() {
- new_panel()
- ; return 0; }
- EOF
- if { (eval echo configure:6676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_lib=HAVE_LIB`echo panel$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
- #define $ac_tr_lib 1
- EOF
- LIBS="-lpanel$cf_cv_libtype $LIBS"
- else
- echo "$ac_t""no" 1>&6
- fi
- echo $ac_n "checking for menu_driver in -lmenu$cf_cv_libtype""... $ac_c" 1>&6
- echo "configure:6704: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
- ac_lib_var=`echo menu$cf_cv_libtype'_'menu_driver | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lmenu$cf_cv_libtype $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 6712 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char menu_driver();
- int main() {
- menu_driver()
- ; return 0; }
- EOF
- if { (eval echo configure:6723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_lib=HAVE_LIB`echo menu$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
- #define $ac_tr_lib 1
- EOF
- LIBS="-lmenu$cf_cv_libtype $LIBS"
- else
- echo "$ac_t""no" 1>&6
- fi
- echo $ac_n "checking for form_driver in -lform$cf_cv_libtype""... $ac_c" 1>&6
- echo "configure:6751: checking for form_driver in -lform$cf_cv_libtype" >&5
- ac_lib_var=`echo form$cf_cv_libtype'_'form_driver | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lform$cf_cv_libtype $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 6759 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char form_driver();
- int main() {
- form_driver()
- ; return 0; }
- EOF
- if { (eval echo configure:6770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_lib=HAVE_LIB`echo form$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
- #define $ac_tr_lib 1
- EOF
- LIBS="-lform$cf_cv_libtype $LIBS"
- else
- echo "$ac_t""no" 1>&6
- fi
- # look for curses-related headers
- for ac_hdr in \
- nc_alloc.h \
- nomacros.h \
- form.h \
- menu.h \
- panel.h \
-
- do
- ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
- echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
- echo "configure:6809: checking for $ac_hdr" >&5
- if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 6814 "configure"
- #include "confdefs.h"
- #include <$ac_hdr>
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- { (eval echo configure:6819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
- ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
- if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
- else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
- fi
- rm -f conftest*
- fi
- if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
- #define $ac_tr_hdr 1
- EOF
-
- else
- echo "$ac_t""no" 1>&6
- fi
- done
- ;;
- esac
- echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
- echo "configure:6849: checking return type of signal handlers" >&5
- if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 6854 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <signal.h>
- #ifdef signal
- #undef signal
- #endif
- #ifdef __cplusplus
- extern "C" void (*signal (int, void (*)(int)))(int);
- #else
- void (*signal ()) ();
- #endif
- int main() {
- int i;
- ; return 0; }
- EOF
- if { (eval echo configure:6871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_type_signal=void
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_type_signal=int
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$ac_cv_type_signal" 1>&6
- cat >> confdefs.h <<EOF
- #define RETSIGTYPE $ac_cv_type_signal
- EOF
- echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
- echo "configure:6891: checking for ANSI C header files" >&5
- if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 6896 "configure"
- #include "confdefs.h"
- #include <stdlib.h>
- #include <stdarg.h>
- #include <string.h>
- #include <float.h>
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- { (eval echo configure:6904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
- ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
- if test -z "$ac_err"; then
- rm -rf conftest*
- ac_cv_header_stdc=yes
- else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_stdc=no
- fi
- rm -f conftest*
- if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat > conftest.$ac_ext <<EOF
- #line 6921 "configure"
- #include "confdefs.h"
- #include <string.h>
- EOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "memchr" >/dev/null 2>&1; then
- :
- else
- rm -rf conftest*
- ac_cv_header_stdc=no
- fi
- rm -f conftest*
- fi
- if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat > conftest.$ac_ext <<EOF
- #line 6939 "configure"
- #include "confdefs.h"
- #include <stdlib.h>
- EOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "free" >/dev/null 2>&1; then
- :
- else
- rm -rf conftest*
- ac_cv_header_stdc=no
- fi
- rm -f conftest*
- fi
- if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then
- :
- else
- cat > conftest.$ac_ext <<EOF
- #line 6960 "configure"
- #include "confdefs.h"
- #include <ctype.h>
- #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
- #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
- #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
- int main () { int i; for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
- exit (0); }
- EOF
- if { (eval echo configure:6971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
- then
- :
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_header_stdc=no
- fi
- rm -fr conftest*
- fi
- fi
- fi
- echo "$ac_t""$ac_cv_header_stdc" 1>&6
- if test $ac_cv_header_stdc = yes; then
- cat >> confdefs.h <<\EOF
- #define STDC_HEADERS 1
- EOF
- fi
- echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
- echo "configure:6995: checking whether time.h and sys/time.h may both be included" >&5
- if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 7000 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <sys/time.h>
- #include <time.h>
- int main() {
- struct tm *tp;
- ; return 0; }
- EOF
- if { (eval echo configure:7009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_header_time=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_time=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$ac_cv_header_time" 1>&6
- if test $ac_cv_header_time = yes; then
- cat >> confdefs.h <<\EOF
- #define TIME_WITH_SYS_TIME 1
- EOF
- fi
- for ac_hdr in \
- getopt.h \
- locale.h \
- stdarg.h \
- sys/ioctl.h \
- sys/select.h \
- sys/time.h \
- termios.h \
- unistd.h \
- do
- ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
- echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
- echo "configure:7042: checking for $ac_hdr" >&5
- if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 7047 "configure"
- #include "confdefs.h"
- #include <$ac_hdr>
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- { (eval echo configure:7052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
- ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
- if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
- else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
- fi
- rm -f conftest*
- fi
- if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
- #define $ac_tr_hdr 1
- EOF
-
- else
- echo "$ac_t""no" 1>&6
- fi
- done
- for ac_func in \
- gettimeofday \
- mblen \
- mbrlen \
- mbrtowc \
- mbsrtowcs \
- mbstowcs \
- mbtowc \
- strdup \
- wcsrtombs \
- wcstombs \
- do
- echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
- echo "configure:7093: checking for $ac_func" >&5
- if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 7098 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char $ac_func();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
- choke me
- #else
- $ac_func();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:7121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
- fi
- rm -f conftest*
- fi
- if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
- #define $ac_tr_func 1
- EOF
-
- else
- echo "$ac_t""no" 1>&6
- fi
- done
- echo $ac_n "checking if we must define _XOPEN_SOURCE_EXTENDED""... $ac_c" 1>&6
- echo "configure:7148: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
- if eval "test \"`echo '$''{'cf_cv_need_xopen_extension'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cat > conftest.$ac_ext <<EOF
- #line 7154 "configure"
- #include "confdefs.h"
- #include <stdlib.h>
- #include <${cf_cv_ncurses_header-curses.h}>
- int main() {
- long x = winnstr(stdscr, "", 0);
- int x1, y1;
- getbegyx(stdscr, y1, x1)
- ; return 0; }
- EOF
- if { (eval echo configure:7166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- cf_cv_need_xopen_extension=no
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cat > conftest.$ac_ext <<EOF
- #line 7174 "configure"
- #include "confdefs.h"
- #define _XOPEN_SOURCE_EXTENDED
- #include <stdlib.h>
- #include <${cf_cv_ncurses_header-curses.h}>
- int main() {
- long x = winnstr(stdscr, "", 0);
- int x1, y1;
- getbegyx(stdscr, y1, x1)
- ; return 0; }
- EOF
- if { (eval echo configure:7187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- cf_cv_need_xopen_extension=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cf_cv_need_xopen_extension=unknown
- fi
- rm -f conftest*
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$cf_cv_need_xopen_extension" 1>&6
- test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
- echo $ac_n "checking for term.h""... $ac_c" 1>&6
- echo "configure:7206: checking for term.h" >&5
- if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
- # for <term.h> if we do not find the variant.
- for cf_header in \
- `echo ${cf_cv_ncurses_header-curses.h} | sed -e 's%/.*%/%'`term.h \
- term.h
- do
- cat > conftest.$ac_ext <<EOF
- #line 7219 "configure"
- #include "confdefs.h"
- #include <${cf_cv_ncurses_header-curses.h}>
- #include <${cf_header}>
- int main() {
- WINDOW *x
- ; return 0; }
- EOF
- if { (eval echo configure:7228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- cf_cv_term_header=$cf_header
- break
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cf_cv_term_header=no
- fi
- rm -f conftest*
- done
- fi
- echo "$ac_t""$cf_cv_term_header" 1>&6
- case $cf_cv_term_header in #(vi
- term.h) #(vi
- cat >> confdefs.h <<\EOF
- #define HAVE_TERM_H 1
- EOF
- ;;
- ncurses/term.h)
- cat >> confdefs.h <<\EOF
- #define HAVE_NCURSES_TERM_H 1
- EOF
- ;;
- ncursesw/term.h)
- cat >> confdefs.h <<\EOF
- #define HAVE_NCURSESW_TERM_H 1
- EOF
- ;;
- esac
- for cf_func in \
- chgat \
- color_set \
- filter \
- getbegx \
- getcurx \
- getmaxx \
- getnstr \
- getparx \
- getwin \
- mvvline \
- mvwvline \
- napms \
- putwin \
- resize_term \
- resizeterm \
- ripoffline \
- setupterm \
- slk_color \
- slk_init \
- termattrs \
- tgetent \
- tigetnum \
- tigetstr \
- typeahead \
- use_default_colors \
- vsscanf \
- wchgat \
- winsstr \
- wresize \
- do
-
- cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
- echo $ac_n "checking for ${cf_func}""... $ac_c" 1>&6
- echo "configure:7305: checking for ${cf_func}" >&5
-
- echo "${as_me-configure}:7307: testing ${cf_func} ..." 1>&5
- if eval "test \"`echo '$''{'cf_cv_func_$cf_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- eval cf_result='$ac_cv_func_'$cf_func
- if test ".$cf_result" != ".no"; then
- cat > conftest.$ac_ext <<EOF
- #line 7316 "configure"
- #include "confdefs.h"
- #ifdef HAVE_XCURSES
- #include <xcurses.h>
- char * XCursesProgramName = "test";
- #else
- #include <${cf_cv_ncurses_header-curses.h}>
- #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
- #include <ncursesw/term.h>
- #else
- #if defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
- #include <ncurses/term.h>
- #else
- #ifdef HAVE_TERM_H
- #include <term.h>
- #endif
- #endif
- #endif
- #endif
- int main() {
- #ifndef ${cf_func}
- long foo = (long)(&${cf_func});
- ${cf_cv_main_return-return}(foo == 0);
- #endif
-
- ; return 0; }
- EOF
- if { (eval echo configure:7345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- cf_result=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cf_result=no
- fi
- rm -f conftest*
- fi
- eval 'cf_cv_func_'$cf_func'=$cf_result'
-
- fi
- # use the computed/retrieved cache-value:
- eval 'cf_result=$cf_cv_func_'$cf_func
- echo "$ac_t""$cf_result" 1>&6
- if test $cf_result != no; then
- cat >> confdefs.h <<EOF
- #define HAVE_${cf_tr_func} 1
- EOF
- fi
- done
- echo $ac_n "checking for ncurses extended functions""... $ac_c" 1>&6
- echo "configure:7373: checking for ncurses extended functions" >&5
- if eval "test \"`echo '$''{'cf_cv_ncurses_ext_funcs'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cat > conftest.$ac_ext <<EOF
- #line 7379 "configure"
- #include "confdefs.h"
- #include <${cf_cv_ncurses_header-curses.h}>
- int main() {
- (void) assume_default_colors (0, 0);
- (void) curses_version ();
- (void) define_key (0, 0);
- (void) is_term_resized (0, 0);
- (void) key_defined (0);
- (void) keybound (0, 0);
- (void) keyok (0, 0);
- (void) resize_term (0, 0);
- (void) resizeterm (0, 0);
- (void) use_default_colors ();
- (void) use_extended_names (0);
- (void) wresize (0, 0, 0);
- ; return 0; }
- EOF
- if { (eval echo configure:7399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- cf_cv_ncurses_ext_funcs=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cf_cv_ncurses_ext_funcs=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$cf_cv_ncurses_ext_funcs" 1>&6
- test "$cf_cv_ncurses_ext_funcs" != no && cat >> confdefs.h <<\EOF
- #define NCURSES_EXT_FUNCS 1
- EOF
- echo $ac_n "checking for wide-character functions""... $ac_c" 1>&6
- echo "configure:7419: checking for wide-character functions" >&5
- if eval "test \"`echo '$''{'cf_cv_widechar_funcs'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cat > conftest.$ac_ext <<EOF
- #line 7425 "configure"
- #include "confdefs.h"
- #include <${cf_cv_ncurses_header-curses.h}>
- int main() {
- static wchar_t src_wchar[2];
- static cchar_t dst_cchar;
- setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
-
- ; return 0; }
- EOF
- if { (eval echo configure:7437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- cf_cv_widechar_funcs=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cf_cv_widechar_funcs=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$cf_cv_widechar_funcs" 1>&6
- if test "$cf_cv_widechar_funcs" != no ; then
- cat >> confdefs.h <<\EOF
- #define USE_WIDEC_SUPPORT 1
- EOF
- else
- cat >> confdefs.h <<\EOF
- #define USE_WIDEC_SUPPORT 0
- EOF
- fi
- echo $ac_n "checking if sys/time.h works with sys/select.h""... $ac_c" 1>&6
- echo "configure:7465: checking if sys/time.h works with sys/select.h" >&5
- if eval "test \"`echo '$''{'cf_cv_sys_time_select'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cat > conftest.$ac_ext <<EOF
- #line 7471 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #ifdef HAVE_SYS_TIME_H
- #include <sys/time.h>
- #endif
- #ifdef HAVE_SYS_SELECT_H
- #include <sys/select.h>
- #endif
- int main() {
- ; return 0; }
- EOF
- if { (eval echo configure:7486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- cf_cv_sys_time_select=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cf_cv_sys_time_select=no
- fi
- rm -f conftest*
-
- fi
- echo "$ac_t""$cf_cv_sys_time_select" 1>&6
- test "$cf_cv_sys_time_select" = yes && cat >> confdefs.h <<\EOF
- #define HAVE_SYS_TIME_SELECT 1
- EOF
- echo $ac_n "checking for function curses_version""... $ac_c" 1>&6
- echo "configure:7507: checking for function curses_version" >&5
- if eval "test \"`echo '$''{'cf_cv_func_curses_version'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- if test "$cross_compiling" = yes; then
- cf_cv_func_curses_version=unknown
- else
- cat > conftest.$ac_ext <<EOF
- #line 7516 "configure"
- #include "confdefs.h"
- #include <${cf_cv_ncurses_header-curses.h}>
- int main()
- {
- char temp[1024];
- sprintf(temp, "%s\n", curses_version());
- ${cf_cv_main_return-return}(0);
- }
- EOF
- if { (eval echo configure:7528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
- then
- cf_cv_func_curses_version=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- cf_cv_func_curses_version=no
- fi
- rm -fr conftest*
- fi
- rm -f core
- fi
- echo "$ac_t""$cf_cv_func_curses_version" 1>&6
- test "$cf_cv_func_curses_version" = yes && cat >> confdefs.h <<\EOF
- #define HAVE_CURSES_VERSION 1
- EOF
- echo $ac_n "checking for alternate character set array""... $ac_c" 1>&6
- echo "configure:7553: checking for alternate character set array" >&5
- if eval "test \"`echo '$''{'cf_cv_curses_acs_map'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cf_cv_curses_acs_map=unknown
- for name in acs_map _acs_map __acs_map _nc_acs_map
- do
- cat > conftest.$ac_ext <<EOF
- #line 7562 "configure"
- #include "confdefs.h"
- #include <${cf_cv_ncurses_header-curses.h}>
- int main() {
- $name['k'] = ACS_PLUS
- ; return 0; }
- EOF
- if { (eval echo configure:7573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- cf_cv_curses_acs_map=$name; break
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- fi
- rm -f conftest*
- done
- fi
- echo "$ac_t""$cf_cv_curses_acs_map" 1>&6
- test "$cf_cv_curses_acs_map" != unknown && cat >> confdefs.h <<EOF
- #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
- EOF
- echo $ac_n "checking for wide alternate character set array""... $ac_c" 1>&6
- echo "configure:7594: checking for wide alternate character set array" >&5
- if eval "test \"`echo '$''{'cf_cv_curses_wacs_map'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cf_cv_curses_wacs_map=unknown
- for name in wacs_map _wacs_map __wacs_map _nc_wacs
- do
- cat > conftest.$ac_ext <<EOF
- #line 7603 "configure"
- #include "confdefs.h"
- #ifndef _XOPEN_SOURCE_EXTENDED
- #define _XOPEN_SOURCE_EXTENDED
- #endif
- #include <${cf_cv_ncurses_header-curses.h}>
- int main() {
- $name['k'] = *WACS_PLUS
- ; return 0; }
- EOF
- if { (eval echo configure:7614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- cf_cv_curses_wacs_map=$name
- break
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- fi
- rm -f conftest*
- done
- fi
- echo "$ac_t""$cf_cv_curses_wacs_map" 1>&6
- echo $ac_n "checking for type attr_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
- echo "configure:7630: checking for type attr_t in ${cf_cv_ncurses_header-curses.h}" >&5
- cat > conftest.$ac_ext <<EOF
- #line 7632 "configure"
- #include "confdefs.h"
- #ifndef _XOPEN_SOURCE_EXTENDED
- #define _XOPEN_SOURCE_EXTENDED
- #endif
- #include <${cf_cv_ncurses_header-curses.h}>
- int main() {
- attr_t foo
- ; return 0; }
- EOF
- if { (eval echo configure:7645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- cf_result=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cf_result=no
- fi
- rm -f conftest*
- echo "$ac_t""$cf_result" 1>&6
- if test $cf_result = yes ; then
-
- cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
- cat >> confdefs.h <<EOF
- #define $cf_result 1
- EOF
- else
- cat >> confdefs.h <<EOF
- #define attr_t long
- EOF
- fi
- echo $ac_n "checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
- echo "configure:7673: checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}" >&5
- cat > conftest.$ac_ext <<EOF
- #line 7675 "configure"
- #include "confdefs.h"
- #ifndef _XOPEN_SOURCE_EXTENDED
- #define _XOPEN_SOURCE_EXTENDED
- #endif
- #include <${cf_cv_ncurses_header-curses.h}>
- int main() {
- mbstate_t foo
- ; return 0; }
- EOF
- if { (eval echo configure:7688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- cf_result=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cf_result=no
- fi
- rm -f conftest*
- echo "$ac_t""$cf_result" 1>&6
- if test $cf_result = yes ; then
-
- cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
- cat >> confdefs.h <<EOF
- #define $cf_result 1
- EOF
- else
- cat >> confdefs.h <<EOF
- #define mbstate_t long
- EOF
- fi
- TEST_ARGS="$LIBS"
- LIBS=
- trap '' 1 2 15
- cat > confcache <<\EOF
- # This file is a shell script that caches the results of configure
- # tests run on this system so they can be shared between configure
- # scripts and configure runs. It is not useful on other systems.
- # If it contains results you don't want to keep, you may remove or edit it.
- #
- # By default, configure uses ./config.cache as the cache file,
- # creating it if it does not exist already. You can give configure
- # the --cache-file=FILE option to use a different cache file; that is
- # what configure does when it calls configure scripts in
- # subdirectories, so they share the cache.
- # Giving --cache-file=/dev/null disables caching, for debugging configure.
- # config.status only pays attention to the cache file if you give it the
- # --recheck option to rerun configure.
- #
- EOF
- # The following way of writing the cache mishandles newlines in values,
- # but we know of no workaround that is simple, portable, and efficient.
- # So, don't put newlines in cache variables' values.
- # Ultrix sh set writes to stderr and can't be redirected directly,
- # and sets the high bit in the cache file unless we assign to the vars.
- (set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
- if cmp -s $cache_file confcache; then
- :
- else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
- fi
- rm -f confcache
- trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
- test "x$prefix" = xNONE && prefix=$ac_default_prefix
- # Let make expand exec_prefix.
- test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
- # Any assignment to VPATH causes Sun make to only execute
- # the first set of double-colon rules, so remove it if not needed.
- # If there is a colon in the path, we need to keep it.
- if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
- fi
- trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
- DEFS=-DHAVE_CONFIG_H
- # Without the "./", some shells look in PATH for config.status.
- : ${CONFIG_STATUS=./config.status}
- echo creating $CONFIG_STATUS
- rm -f $CONFIG_STATUS
- cat > $CONFIG_STATUS <<EOF
- #! /bin/sh
- # Generated automatically by configure.
- # Run this file to recreate the current configuration.
- # This directory was configured as follows,
- # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
- #
- # $0 $ac_configure_args
- #
- # Compiler output produced by configure, useful for debugging
- # configure, is in ./config.log if it exists.
- ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
- for ac_option
- do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13.20030927"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
- done
- ac_given_srcdir=$srcdir
- trap 'rm -fr `echo "Makefile ncurses_cfg.h:ncurses_tst.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
- EOF
- cat >> $CONFIG_STATUS <<EOF
- # Protect against being on the right side of a sed subst in config.status.
- sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
- $ac_vpsub
- $extrasub
- s%@SHELL@%$SHELL%g
- s%@CFLAGS@%$CFLAGS%g
- s%@CPPFLAGS@%$CPPFLAGS%g
- s%@CXXFLAGS@%$CXXFLAGS%g
- s%@FFLAGS@%$FFLAGS%g
- s%@DEFS@%$DEFS%g
- s%@LDFLAGS@%$LDFLAGS%g
- s%@LIBS@%$LIBS%g
- s%@exec_prefix@%$exec_prefix%g
- s%@prefix@%$prefix%g
- s%@program_transform_name@%$program_transform_name%g
- s%@bindir@%$bindir%g
- s%@sbindir@%$sbindir%g
- s%@libexecdir@%$libexecdir%g
- s%@datadir@%$datadir%g
- s%@sysconfdir@%$sysconfdir%g
- s%@sharedstatedir@%$sharedstatedir%g
- s%@localstatedir@%$localstatedir%g
- s%@libdir@%$libdir%g
- s%@includedir@%$includedir%g
- s%@oldincludedir@%$oldincludedir%g
- s%@infodir@%$infodir%g
- s%@mandir@%$mandir%g
- s%@host@%$host%g
- s%@host_alias@%$host_alias%g
- s%@host_cpu@%$host_cpu%g
- s%@host_vendor@%$host_vendor%g
- s%@host_os@%$host_os%g
- s%@SET_MAKE@%$SET_MAKE%g
- s%@CC@%$CC%g
- s%@CPP@%$CPP%g
- s%@AWK@%$AWK%g
- s%@CC_G_OPT@%$CC_G_OPT%g
- s%@CC_SHARED_OPTS@%$CC_SHARED_OPTS%g
- s%@DFT_DEP_SUFFIX@%$DFT_DEP_SUFFIX%g
- s%@DFT_OBJ_SUBDIR@%$DFT_OBJ_SUBDIR%g
- s%@DFT_UPR_MODEL@%$DFT_UPR_MODEL%g
- s%@LD@%$LD%g
- s%@LDFLAGS_SHARED@%$LDFLAGS_SHARED%g
- s%@LDFLAGS_STATIC@%$LDFLAGS_STATIC%g
- s%@LD_MODEL@%$LD_MODEL%g
- s%@LD_SHARED_OPTS@%$LD_SHARED_OPTS%g
- s%@LIBTOOL@%$LIBTOOL%g
- s%@LIB_CLEAN@%$LIB_CLEAN%g
- s%@LIB_COMPILE@%$LIB_COMPILE%g
- s%@LIB_LINK@%$LIB_LINK%g
- s%@LINK_TESTS@%$LINK_TESTS%g
- s%@LINT@%$LINT%g
- s%@LINT_OPTS@%$LINT_OPTS%g
- s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g
- s%@MATH_LIB@%$MATH_LIB%g
- s%@PTHREAD@%$PTHREAD%g
- s%@TEST_ARGS@%$TEST_ARGS%g
- s%@TEST_DEPS@%$TEST_DEPS%g
- s%@TEST_LIBS@%$TEST_LIBS%g
- s%@TINFO_ARGS@%$TINFO_ARGS%g
- s%@cf_cv_abi_version@%$cf_cv_abi_version%g
- s%@cf_cv_rel_version@%$cf_cv_rel_version%g
- s%@EXEEXT@%$EXEEXT%g
- s%@OBJEXT@%$OBJEXT%g
- s%@EXTRA_CPPFLAGS@%$EXTRA_CPPFLAGS%g
- s%@ECHO_LT@%$ECHO_LT%g
- s%@ECHO_LD@%$ECHO_LD%g
- s%@RULE_CC@%$RULE_CC%g
- s%@SHOW_CC@%$SHOW_CC%g
- s%@ECHO_CC@%$ECHO_CC%g
- s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
- s%@X_CFLAGS@%$X_CFLAGS%g
- s%@X_PRE_LIBS@%$X_PRE_LIBS%g
- s%@X_LIBS@%$X_LIBS%g
- s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
- s%@XCURSES_CONFIG@%$XCURSES_CONFIG%g
- CEOF
- EOF
- cat >> $CONFIG_STATUS <<\EOF
- # Split the substitutions into bite-sized pieces for seds with
- # small command number limits, like on Digital OSF/1 and HP-UX.
- ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
- ac_file=1 # Number of current file.
- ac_beg=1 # First line for current file.
- ac_end=$ac_max_sed_cmds # Line after last line for current file.
- ac_more_lines=:
- ac_sed_cmds=""
- while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
- done
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
- fi
- EOF
- cat >> $CONFIG_STATUS <<EOF
- CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
- EOF
- cat >> $CONFIG_STATUS <<\EOF
- for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
- # $configure_input" ;;
- *) ac_comsub= ;;
- esac
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
- s%@configure_input@%$configure_input%g
- s%@srcdir@%$srcdir%g
- s%@top_srcdir@%$top_srcdir%g
- " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
- fi; done
- rm -f conftest.s*
- # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
- # NAME is the cpp macro being defined and VALUE is the value it is being given.
- #
- # ac_d sets the value in "#define NAME VALUE" lines.
- ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
- ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
- ac_dC='\3'
- ac_dD='%g'
- # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
- ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
- ac_uB='\([ ]\)%\1#\2define\3'
- ac_uC=' '
- ac_uD='\4%g'
- # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
- ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
- ac_eB='$%\1#\2define\3'
- ac_eC=' '
- ac_eD='%g'
- if test "${CONFIG_HEADERS+set}" != set; then
- EOF
- cat >> $CONFIG_STATUS <<EOF
- CONFIG_HEADERS="ncurses_cfg.h:ncurses_tst.hin"
- EOF
- cat >> $CONFIG_STATUS <<\EOF
- fi
- for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
- echo creating $ac_file
- rm -f conftest.frag conftest.in conftest.out
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- cat $ac_file_inputs > conftest.in
- EOF
- # Transform confdefs.h into a list of #define's. We won't use it as a sed
- # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
- # be either 'cat' or 'sort'.
- cat confdefs.h >conftest.vals
- # Break up conftest.vals because some shells have a limit on
- # the size of here documents, and old seds have small limits too.
- rm -f conftest.tail
- echo ' rm -f conftest.frag' >> $CONFIG_STATUS
- while :
- do
- ac_lines=`grep -c . conftest.vals`
- # grep -c gives empty output for an empty file on some AIX systems.
- if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
- # Write chunks of a limited-size here document to conftest.frag.
- echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
- echo 'CEOF' >> $CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
- rm -f conftest.vals
- mv conftest.tail conftest.vals
- done
- rm -f conftest.vals
- # Run sed to substitute the contents of conftest.frag into conftest.in at the
- # marker @DEFS@.
- echo ' cat >> conftest.edit <<CEOF
- /@DEFS@/r conftest.frag
- /@DEFS@/d
- CEOF
- sed -f conftest.edit conftest.in > conftest.out
- rm -f conftest.in
- mv conftest.out conftest.in
- rm -f conftest.edit conftest.frag
- ' >> $CONFIG_STATUS
- cat >> $CONFIG_STATUS <<\EOF
- rm -f conftest.frag conftest.h
- echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
- cat conftest.in >> conftest.h
- rm -f conftest.in
- if cmp -s $ac_file conftest.h 2>/dev/null; then
- echo "$ac_file is unchanged"
- rm -f conftest.h
- else
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- fi
- rm -f $ac_file
- mv conftest.h $ac_file
- fi
- fi; done
- EOF
- cat >> $CONFIG_STATUS <<EOF
- # Extra initialization commands, if any
- AWK="$AWK"
- ECHO_LD="$ECHO_LD"
- EOF
- cat >> $CONFIG_STATUS <<\EOF
- # Extra commands, if any
- for cf_dir in .
- do
- if test ! -d $srcdir/$cf_dir; then
- continue
- elif test -f $srcdir/$cf_dir/programs; then
- $AWK -f $srcdir/mk-test.awk ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
- fi
- done
- cat >>Makefile <<TEST_EOF
- # These rules are generated so we do not rely on suffix rules, which do not
- # work consistently for different make-programs (the '\$(MODEL)/' confuses
- # some, and the '\$x' confuses others).
- TEST_EOF
- LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
- for N in $LIST
- do
- cat >>Makefile <<TEST_EOF
- \$(MODEL)/$N.o : $N.c \\
- test.priv.h \\
- ncurses_cfg.h
- @echo compiling $N; \$(CC) -c \$(CFLAGS_DEFAULT) $N.c
- TEST_EOF
- done
- exit 0
- EOF
- chmod +x $CONFIG_STATUS
- rm -fr confdefs* $ac_clean_files
- test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
|