configure 217 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141
  1. #! /bin/sh
  2. # Guess values for system-dependent variables and create Makefiles.
  3. # Generated automatically using autoconf version 2.13.20030927
  4. # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
  5. #
  6. # This configure script is free software; the Free Software Foundation
  7. # gives unlimited permission to copy, distribute and modify it.
  8. # Defaults:
  9. ac_help=
  10. ac_default_prefix=/usr/local
  11. # Any additions from configure.in:
  12. # Initialize some variables set by options.
  13. # The variables have the same names as the options, with
  14. # dashes changed to underlines.
  15. build=NONE
  16. cache_file=./config.cache
  17. exec_prefix=NONE
  18. host=NONE
  19. no_create=
  20. nonopt=NONE
  21. no_recursion=
  22. prefix=NONE
  23. program_prefix=NONE
  24. program_suffix=NONE
  25. program_transform_name=s,x,x,
  26. silent=
  27. site=
  28. srcdir=
  29. target=NONE
  30. verbose=
  31. x_includes=NONE
  32. x_libraries=NONE
  33. bindir='${exec_prefix}/bin'
  34. sbindir='${exec_prefix}/sbin'
  35. libexecdir='${exec_prefix}/libexec'
  36. datadir='${prefix}/share'
  37. sysconfdir='${prefix}/etc'
  38. sharedstatedir='${prefix}/com'
  39. localstatedir='${prefix}/var'
  40. libdir='${exec_prefix}/lib'
  41. includedir='${prefix}/include'
  42. oldincludedir='/usr/include'
  43. infodir='${prefix}/info'
  44. mandir='${prefix}/man'
  45. # Initialize some other variables.
  46. subdirs=
  47. MFLAGS= MAKEFLAGS=
  48. SHELL=${CONFIG_SHELL-/bin/sh}
  49. # Maximum number of lines to put in a shell here document.
  50. ac_max_here_lines=12
  51. ac_prev=
  52. for ac_option
  53. do
  54. # If the previous option needs an argument, assign it.
  55. if test -n "$ac_prev"; then
  56. eval "$ac_prev=\$ac_option"
  57. ac_prev=
  58. continue
  59. fi
  60. case "$ac_option" in
  61. -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  62. *) ac_optarg= ;;
  63. esac
  64. # Accept the important Cygnus configure options, so we can diagnose typos.
  65. case "$ac_option" in
  66. -bindir | --bindir | --bindi | --bind | --bin | --bi)
  67. ac_prev=bindir ;;
  68. -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  69. bindir="$ac_optarg" ;;
  70. -build | --build | --buil | --bui | --bu)
  71. ac_prev=build ;;
  72. -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  73. build="$ac_optarg" ;;
  74. -cache-file | --cache-file | --cache-fil | --cache-fi \
  75. | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  76. ac_prev=cache_file ;;
  77. -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  78. | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  79. cache_file="$ac_optarg" ;;
  80. -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  81. ac_prev=datadir ;;
  82. -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  83. | --da=*)
  84. datadir="$ac_optarg" ;;
  85. -disable-* | --disable-*)
  86. ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  87. # Reject names that are not valid shell variable names.
  88. if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  89. { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  90. fi
  91. ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  92. eval "enable_${ac_feature}=no" ;;
  93. -enable-* | --enable-*)
  94. ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  95. # Reject names that are not valid shell variable names.
  96. if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  97. { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  98. fi
  99. ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  100. case "$ac_option" in
  101. *=*) ;;
  102. *) ac_optarg=yes ;;
  103. esac
  104. eval "enable_${ac_feature}='$ac_optarg'" ;;
  105. -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  106. | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  107. | --exec | --exe | --ex)
  108. ac_prev=exec_prefix ;;
  109. -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  110. | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  111. | --exec=* | --exe=* | --ex=*)
  112. exec_prefix="$ac_optarg" ;;
  113. -gas | --gas | --ga | --g)
  114. # Obsolete; use --with-gas.
  115. with_gas=yes ;;
  116. -help | --help | --hel | --he)
  117. # Omit some internal or obsolete options to make the list less imposing.
  118. # This message is too long to be a string in the A/UX 3.1 sh.
  119. cat << EOF
  120. Usage: configure [options] [host]
  121. Options: [defaults in brackets after descriptions]
  122. Configuration:
  123. --cache-file=FILE cache test results in FILE
  124. --help print this message
  125. --no-create do not create output files
  126. --quiet, --silent do not print \`checking...' messages
  127. --version print the version of autoconf that created configure
  128. Directory and file names:
  129. --prefix=PREFIX install architecture-independent files in PREFIX
  130. [$ac_default_prefix]
  131. --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
  132. [same as prefix]
  133. --bindir=DIR user executables in DIR [EPREFIX/bin]
  134. --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
  135. --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
  136. --datadir=DIR read-only architecture-independent data in DIR
  137. [PREFIX/share]
  138. --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
  139. --sharedstatedir=DIR modifiable architecture-independent data in DIR
  140. [PREFIX/com]
  141. --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
  142. --libdir=DIR object code libraries in DIR [EPREFIX/lib]
  143. --includedir=DIR C header files in DIR [PREFIX/include]
  144. --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
  145. --infodir=DIR info documentation in DIR [PREFIX/info]
  146. --mandir=DIR man documentation in DIR [PREFIX/man]
  147. --srcdir=DIR find the sources in DIR [configure dir or ..]
  148. --program-prefix=PREFIX prepend PREFIX to installed program names
  149. --program-suffix=SUFFIX append SUFFIX to installed program names
  150. --program-transform-name=PROGRAM
  151. run sed PROGRAM on installed program names
  152. EOF
  153. cat << EOF
  154. Host type:
  155. --build=BUILD configure for building on BUILD [BUILD=HOST]
  156. --host=HOST configure for HOST [guessed]
  157. --target=TARGET configure for TARGET [TARGET=HOST]
  158. Features and packages:
  159. --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
  160. --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
  161. --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
  162. --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
  163. --x-includes=DIR X include files are in DIR
  164. --x-libraries=DIR X library files are in DIR
  165. EOF
  166. cat <<\EOF
  167. --enable and --with options recognized:
  168. --disable-echo display "compiling" commands
  169. --enable-warnings test: turn on gcc compiler warnings
  170. --with-curses-dir=DIR directory in which (n)curses is installed
  171. --with-5lib use SunOS sysv-libraries
  172. --with-ncursesw use wide ncurses-libraries (installed)
  173. --with-ncurses use ncurses-libraries (installed)
  174. --with-pdcurses compile/link with pdcurses X11 library
  175. --with-x use the X Window System
  176. --with-Xaw3d link with Xaw 3d library
  177. --with-neXtaw link with neXT Athena library
  178. --with-XawPlus link with Athena-Plus library
  179. EOF
  180. exit 0 ;;
  181. -host | --host | --hos | --ho)
  182. ac_prev=host ;;
  183. -host=* | --host=* | --hos=* | --ho=*)
  184. host="$ac_optarg" ;;
  185. -includedir | --includedir | --includedi | --included | --include \
  186. | --includ | --inclu | --incl | --inc)
  187. ac_prev=includedir ;;
  188. -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  189. | --includ=* | --inclu=* | --incl=* | --inc=*)
  190. includedir="$ac_optarg" ;;
  191. -infodir | --infodir | --infodi | --infod | --info | --inf)
  192. ac_prev=infodir ;;
  193. -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  194. infodir="$ac_optarg" ;;
  195. -libdir | --libdir | --libdi | --libd)
  196. ac_prev=libdir ;;
  197. -libdir=* | --libdir=* | --libdi=* | --libd=*)
  198. libdir="$ac_optarg" ;;
  199. -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  200. | --libexe | --libex | --libe)
  201. ac_prev=libexecdir ;;
  202. -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  203. | --libexe=* | --libex=* | --libe=*)
  204. libexecdir="$ac_optarg" ;;
  205. -localstatedir | --localstatedir | --localstatedi | --localstated \
  206. | --localstate | --localstat | --localsta | --localst \
  207. | --locals | --local | --loca | --loc | --lo)
  208. ac_prev=localstatedir ;;
  209. -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  210. | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  211. | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  212. localstatedir="$ac_optarg" ;;
  213. -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  214. ac_prev=mandir ;;
  215. -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  216. mandir="$ac_optarg" ;;
  217. -nfp | --nfp | --nf)
  218. # Obsolete; use --without-fp.
  219. with_fp=no ;;
  220. -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  221. | --no-cr | --no-c)
  222. no_create=yes ;;
  223. -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  224. | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  225. no_recursion=yes ;;
  226. -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  227. | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  228. | --oldin | --oldi | --old | --ol | --o)
  229. ac_prev=oldincludedir ;;
  230. -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  231. | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  232. | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  233. oldincludedir="$ac_optarg" ;;
  234. -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  235. ac_prev=prefix ;;
  236. -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  237. prefix="$ac_optarg" ;;
  238. -program-prefix | --program-prefix | --program-prefi | --program-pref \
  239. | --program-pre | --program-pr | --program-p)
  240. ac_prev=program_prefix ;;
  241. -program-prefix=* | --program-prefix=* | --program-prefi=* \
  242. | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  243. program_prefix="$ac_optarg" ;;
  244. -program-suffix | --program-suffix | --program-suffi | --program-suff \
  245. | --program-suf | --program-su | --program-s)
  246. ac_prev=program_suffix ;;
  247. -program-suffix=* | --program-suffix=* | --program-suffi=* \
  248. | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  249. program_suffix="$ac_optarg" ;;
  250. -program-transform-name | --program-transform-name \
  251. | --program-transform-nam | --program-transform-na \
  252. | --program-transform-n | --program-transform- \
  253. | --program-transform | --program-transfor \
  254. | --program-transfo | --program-transf \
  255. | --program-trans | --program-tran \
  256. | --progr-tra | --program-tr | --program-t)
  257. ac_prev=program_transform_name ;;
  258. -program-transform-name=* | --program-transform-name=* \
  259. | --program-transform-nam=* | --program-transform-na=* \
  260. | --program-transform-n=* | --program-transform-=* \
  261. | --program-transform=* | --program-transfor=* \
  262. | --program-transfo=* | --program-transf=* \
  263. | --program-trans=* | --program-tran=* \
  264. | --progr-tra=* | --program-tr=* | --program-t=*)
  265. program_transform_name="$ac_optarg" ;;
  266. -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  267. | -silent | --silent | --silen | --sile | --sil)
  268. silent=yes ;;
  269. -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  270. ac_prev=sbindir ;;
  271. -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  272. | --sbi=* | --sb=*)
  273. sbindir="$ac_optarg" ;;
  274. -sharedstatedir | --sharedstatedir | --sharedstatedi \
  275. | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  276. | --sharedst | --shareds | --shared | --share | --shar \
  277. | --sha | --sh)
  278. ac_prev=sharedstatedir ;;
  279. -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  280. | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  281. | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  282. | --sha=* | --sh=*)
  283. sharedstatedir="$ac_optarg" ;;
  284. -site | --site | --sit)
  285. ac_prev=site ;;
  286. -site=* | --site=* | --sit=*)
  287. site="$ac_optarg" ;;
  288. -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  289. ac_prev=srcdir ;;
  290. -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  291. srcdir="$ac_optarg" ;;
  292. -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  293. | --syscon | --sysco | --sysc | --sys | --sy)
  294. ac_prev=sysconfdir ;;
  295. -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  296. | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  297. sysconfdir="$ac_optarg" ;;
  298. -target | --target | --targe | --targ | --tar | --ta | --t)
  299. ac_prev=target ;;
  300. -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  301. target="$ac_optarg" ;;
  302. -v | -verbose | --verbose | --verbos | --verbo | --verb)
  303. verbose=yes ;;
  304. -version | --version | --versio | --versi | --vers)
  305. echo "configure generated by autoconf version 2.13.20030927"
  306. exit 0 ;;
  307. -with-* | --with-*)
  308. ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  309. # Reject names that are not valid shell variable names.
  310. if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  311. { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  312. fi
  313. ac_package=`echo $ac_package| sed 's/-/_/g'`
  314. case "$ac_option" in
  315. *=*) ;;
  316. *) ac_optarg=yes ;;
  317. esac
  318. eval "with_${ac_package}='$ac_optarg'" ;;
  319. -without-* | --without-*)
  320. ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  321. # Reject names that are not valid shell variable names.
  322. if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  323. { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  324. fi
  325. ac_package=`echo $ac_package| sed 's/-/_/g'`
  326. eval "with_${ac_package}=no" ;;
  327. --x)
  328. # Obsolete; use --with-x.
  329. with_x=yes ;;
  330. -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  331. | --x-incl | --x-inc | --x-in | --x-i)
  332. ac_prev=x_includes ;;
  333. -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  334. | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  335. x_includes="$ac_optarg" ;;
  336. -x-libraries | --x-libraries | --x-librarie | --x-librari \
  337. | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  338. ac_prev=x_libraries ;;
  339. -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  340. | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  341. x_libraries="$ac_optarg" ;;
  342. -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  343. ;;
  344. *)
  345. if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  346. echo "configure: warning: $ac_option: invalid host type" 1>&2
  347. fi
  348. if test "x$nonopt" != xNONE; then
  349. { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  350. fi
  351. nonopt="$ac_option"
  352. ;;
  353. esac
  354. done
  355. if test -n "$ac_prev"; then
  356. { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  357. fi
  358. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  359. # File descriptor usage:
  360. # 0 standard input
  361. # 1 file creation
  362. # 2 errors and warnings
  363. # 3 some systems may open it to /dev/tty
  364. # 4 used on the Kubota Titan
  365. # 6 checking for... messages and results
  366. # 5 compiler messages saved in config.log
  367. if test "$silent" = yes; then
  368. exec 6>/dev/null
  369. else
  370. exec 6>&1
  371. fi
  372. exec 5>./config.log
  373. echo "\
  374. This file contains any messages produced by compilers while
  375. running configure, to aid debugging if configure makes a mistake.
  376. " 1>&5
  377. # Strip out --no-create and --no-recursion so they do not pile up.
  378. # Also quote any args containing shell metacharacters.
  379. ac_configure_args=
  380. for ac_arg
  381. do
  382. case "$ac_arg" in
  383. -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  384. | --no-cr | --no-c) ;;
  385. -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  386. | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  387. *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  388. ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  389. *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  390. esac
  391. done
  392. # NLS nuisances.
  393. # Only set these to C if already set. These must not be set unconditionally
  394. # because not all systems understand e.g. LANG=C (notably SCO).
  395. # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
  396. # Non-C LC_CTYPE values break the ctype check.
  397. if test "${LANG+set}" = set; then LANG=C; export LANG; fi
  398. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  399. if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
  400. if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
  401. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  402. rm -rf conftest* confdefs.h
  403. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  404. echo > confdefs.h
  405. # A filename unique to this package, relative to the directory that
  406. # configure is in, which we can look for to find out if srcdir is correct.
  407. ac_unique_file=ncurses.c
  408. # Find the source files, if location was not specified.
  409. if test -z "$srcdir"; then
  410. ac_srcdir_defaulted=yes
  411. # Try the directory containing this script, then its parent.
  412. ac_prog=$0
  413. ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  414. test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  415. srcdir=$ac_confdir
  416. if test ! -r $srcdir/$ac_unique_file; then
  417. srcdir=..
  418. fi
  419. else
  420. ac_srcdir_defaulted=no
  421. fi
  422. if test ! -r $srcdir/$ac_unique_file; then
  423. if test "$ac_srcdir_defaulted" = yes; then
  424. { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  425. else
  426. { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  427. fi
  428. fi
  429. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  430. # Prefer explicitly selected file to automatically selected ones.
  431. if test -z "$CONFIG_SITE"; then
  432. if test "x$prefix" != xNONE; then
  433. CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  434. else
  435. CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  436. fi
  437. fi
  438. for ac_site_file in $CONFIG_SITE; do
  439. if test -r "$ac_site_file"; then
  440. echo "loading site script $ac_site_file"
  441. . "$ac_site_file"
  442. fi
  443. done
  444. if test -r "$cache_file"; then
  445. echo "loading cache $cache_file"
  446. . $cache_file
  447. else
  448. echo "creating cache $cache_file"
  449. > $cache_file
  450. fi
  451. ac_ext=c
  452. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  453. ac_cpp='$CPP $CPPFLAGS'
  454. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  455. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  456. cross_compiling=$ac_cv_prog_cc_cross
  457. ac_exeext=
  458. ac_objext=o
  459. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  460. # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  461. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  462. ac_n= ac_c='
  463. ' ac_t=' '
  464. else
  465. ac_n=-n ac_c= ac_t=
  466. fi
  467. else
  468. ac_n= ac_c='\c' ac_t=
  469. fi
  470. # If we find X, set shell vars x_includes and x_libraries to the
  471. # paths, otherwise set no_x=yes.
  472. # Uses ac_ vars as temps to allow command line to override cache and checks.
  473. # --without-x overrides everything else, but does not touch the cache.
  474. echo $ac_n "checking for X""... $ac_c" 1>&6
  475. echo "configure:540: checking for X" >&5
  476. # Check whether --with-x or --without-x was given.
  477. if test "${with_x+set}" = set; then
  478. withval="$with_x"
  479. :
  480. fi
  481. # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
  482. if test "x$with_x" = xno; then
  483. # The user explicitly disabled X.
  484. have_x=disabled
  485. else
  486. if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
  487. # Both variables are already set.
  488. have_x=yes
  489. else
  490. if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
  491. echo $ac_n "(cached) $ac_c" 1>&6
  492. else
  493. # One or both of the vars are not set, and there is no cached value.
  494. ac_x_includes=NO ac_x_libraries=NO
  495. rm -fr conftestdir
  496. if mkdir conftestdir; then
  497. cd conftestdir
  498. # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  499. cat > Imakefile <<'EOF'
  500. acfindx:
  501. @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
  502. EOF
  503. if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
  504. # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  505. eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
  506. # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
  507. for ac_extension in a so sl; do
  508. if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
  509. test -f $ac_im_libdir/libX11.$ac_extension; then
  510. ac_im_usrlibdir=$ac_im_libdir; break
  511. fi
  512. done
  513. # Screen out bogus values from the imake configuration. They are
  514. # bogus both because they are the default anyway, and because
  515. # using them would break gcc on systems where it needs fixed includes.
  516. case "$ac_im_incroot" in
  517. /usr/include) ;;
  518. *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
  519. esac
  520. case "$ac_im_usrlibdir" in
  521. /usr/lib | /lib) ;;
  522. *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
  523. esac
  524. fi
  525. cd ..
  526. rm -fr conftestdir
  527. fi
  528. if test "$ac_x_includes" = NO; then
  529. # Guess where to find include files, by looking for this one X11 .h file.
  530. test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
  531. # First, try using that file with no special directory specified.
  532. cat > conftest.$ac_ext <<EOF
  533. #line 603 "configure"
  534. #include "confdefs.h"
  535. #include <$x_direct_test_include>
  536. EOF
  537. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  538. { (eval echo configure:608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  539. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  540. if test -z "$ac_err"; then
  541. rm -rf conftest*
  542. # We can compile using X headers with no special include directory.
  543. ac_x_includes=
  544. else
  545. echo "$ac_err" >&5
  546. echo "configure: failed program was:" >&5
  547. cat conftest.$ac_ext >&5
  548. rm -rf conftest*
  549. # Look for the header file in a standard set of common directories.
  550. # Check X11 before X11Rn because it is often a symlink to the current release.
  551. for ac_dir in \
  552. /usr/X11/include \
  553. /usr/X11R6/include \
  554. /usr/X11R5/include \
  555. /usr/X11R4/include \
  556. \
  557. /usr/include/X11 \
  558. /usr/include/X11R6 \
  559. /usr/include/X11R5 \
  560. /usr/include/X11R4 \
  561. \
  562. /usr/local/X11/include \
  563. /usr/local/X11R6/include \
  564. /usr/local/X11R5/include \
  565. /usr/local/X11R4/include \
  566. \
  567. /usr/local/include/X11 \
  568. /usr/local/include/X11R6 \
  569. /usr/local/include/X11R5 \
  570. /usr/local/include/X11R4 \
  571. \
  572. /usr/X386/include \
  573. /usr/x386/include \
  574. /usr/XFree86/include/X11 \
  575. \
  576. /usr/include \
  577. /usr/local/include \
  578. /usr/unsupported/include \
  579. /usr/athena/include \
  580. /usr/local/x11r5/include \
  581. /usr/lpp/Xamples/include \
  582. \
  583. /usr/openwin/include \
  584. /usr/openwin/share/include \
  585. ; \
  586. do
  587. if test -r "$ac_dir/$x_direct_test_include"; then
  588. ac_x_includes=$ac_dir
  589. break
  590. fi
  591. done
  592. fi
  593. rm -f conftest*
  594. fi # $ac_x_includes = NO
  595. if test "$ac_x_libraries" = NO; then
  596. # Check for the libraries.
  597. test -z "$x_direct_test_library" && x_direct_test_library=Xt
  598. test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
  599. # See if we find them without any special options.
  600. # Don't add to $LIBS permanently.
  601. ac_save_LIBS="$LIBS"
  602. LIBS="-l$x_direct_test_library $LIBS"
  603. cat > conftest.$ac_ext <<EOF
  604. #line 677 "configure"
  605. #include "confdefs.h"
  606. int main() {
  607. ${x_direct_test_function}()
  608. ; return 0; }
  609. EOF
  610. if { (eval echo configure:684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  611. rm -rf conftest*
  612. LIBS="$ac_save_LIBS"
  613. # We can link X programs with no special library path.
  614. ac_x_libraries=
  615. else
  616. echo "configure: failed program was:" >&5
  617. cat conftest.$ac_ext >&5
  618. rm -rf conftest*
  619. LIBS="$ac_save_LIBS"
  620. # First see if replacing the include by lib works.
  621. # Check X11 before X11Rn because it is often a symlink to the current release.
  622. for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
  623. /usr/X11/lib \
  624. /usr/X11R6/lib \
  625. /usr/X11R5/lib \
  626. /usr/X11R4/lib \
  627. \
  628. /usr/lib/X11 \
  629. /usr/lib/X11R6 \
  630. /usr/lib/X11R5 \
  631. /usr/lib/X11R4 \
  632. \
  633. /usr/local/X11/lib \
  634. /usr/local/X11R6/lib \
  635. /usr/local/X11R5/lib \
  636. /usr/local/X11R4/lib \
  637. \
  638. /usr/local/lib/X11 \
  639. /usr/local/lib/X11R6 \
  640. /usr/local/lib/X11R5 \
  641. /usr/local/lib/X11R4 \
  642. \
  643. /usr/X386/lib \
  644. /usr/x386/lib \
  645. /usr/XFree86/lib/X11 \
  646. \
  647. /usr/lib \
  648. /usr/local/lib \
  649. /usr/unsupported/lib \
  650. /usr/athena/lib \
  651. /usr/local/x11r5/lib \
  652. /usr/lpp/Xamples/lib \
  653. /lib/usr/lib/X11 \
  654. \
  655. /usr/openwin/lib \
  656. /usr/openwin/share/lib \
  657. ; \
  658. do
  659. for ac_extension in a so sl; do
  660. if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
  661. ac_x_libraries=$ac_dir
  662. break 2
  663. fi
  664. done
  665. done
  666. fi
  667. rm -f conftest*
  668. fi # $ac_x_libraries = NO
  669. if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
  670. # Didn't find X anywhere. Cache the known absence of X.
  671. ac_cv_have_x="have_x=no"
  672. else
  673. # Record where we found X for the cache.
  674. ac_cv_have_x="have_x=yes \
  675. ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
  676. fi
  677. fi
  678. fi
  679. eval "$ac_cv_have_x"
  680. fi # $with_x != no
  681. if test "$have_x" != yes; then
  682. echo "$ac_t""$have_x" 1>&6
  683. no_x=yes
  684. else
  685. # If each of the values was on the command line, it overrides each guess.
  686. test "x$x_includes" = xNONE && x_includes=$ac_x_includes
  687. test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
  688. # Update the cache value to reflect the command line values.
  689. ac_cv_have_x="have_x=yes \
  690. ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
  691. echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
  692. fi
  693. test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
  694. test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
  695. ac_aux_dir=
  696. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  697. if test -f $ac_dir/install-sh; then
  698. ac_aux_dir=$ac_dir
  699. ac_install_sh="$ac_aux_dir/install-sh -c"
  700. break
  701. elif test -f $ac_dir/install.sh; then
  702. ac_aux_dir=$ac_dir
  703. ac_install_sh="$ac_aux_dir/install.sh -c"
  704. break
  705. fi
  706. done
  707. if test -z "$ac_aux_dir"; then
  708. { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  709. fi
  710. ac_config_guess=$ac_aux_dir/config.guess
  711. ac_config_sub=$ac_aux_dir/config.sub
  712. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  713. if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
  714. # Make sure we can run config.sub.
  715. if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
  716. else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
  717. fi
  718. echo $ac_n "checking host system type""... $ac_c" 1>&6
  719. echo "configure:807: checking host system type" >&5
  720. host_alias=$host
  721. case "$host_alias" in
  722. NONE)
  723. case $nonopt in
  724. NONE)
  725. if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
  726. else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
  727. fi ;;
  728. *) host_alias=$nonopt ;;
  729. esac ;;
  730. esac
  731. host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
  732. host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
  733. host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
  734. host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
  735. echo "$ac_t""$host" 1>&6
  736. system_name="$host_os"
  737. else
  738. system_name="`(uname -s -r) 2>/dev/null`"
  739. if test -z "$system_name" ; then
  740. system_name="`(hostname) 2>/dev/null`"
  741. fi
  742. fi
  743. test -n "$system_name" && cat >> confdefs.h <<EOF
  744. #define SYSTEM_NAME "$system_name"
  745. EOF
  746. if eval "test \"`echo '$''{'cf_cv_system_name'+set}'`\" = set"; then
  747. echo $ac_n "(cached) $ac_c" 1>&6
  748. else
  749. cf_cv_system_name="$system_name"
  750. fi
  751. test -z "$system_name" && system_name="$cf_cv_system_name"
  752. test -n "$cf_cv_system_name" && echo "$ac_t""Configuring for $cf_cv_system_name" 1>&6
  753. if test ".$system_name" != ".$cf_cv_system_name" ; then
  754. echo "$ac_t""Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" 1>&6
  755. { echo "configure: error: "Please remove config.cache and try again."" 1>&2; exit 1; }
  756. fi
  757. echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
  758. echo "configure:855: checking whether ${MAKE-make} sets \${MAKE}" >&5
  759. set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
  760. if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
  761. echo $ac_n "(cached) $ac_c" 1>&6
  762. else
  763. cat > conftestmake <<\EOF
  764. all:
  765. @echo 'ac_maketemp="${MAKE}"'
  766. EOF
  767. # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  768. eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
  769. if test -n "$ac_maketemp"; then
  770. eval ac_cv_prog_make_${ac_make}_set=yes
  771. else
  772. eval ac_cv_prog_make_${ac_make}_set=no
  773. fi
  774. rm -f conftestmake
  775. fi
  776. if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  777. echo "$ac_t""yes" 1>&6
  778. SET_MAKE=
  779. else
  780. echo "$ac_t""no" 1>&6
  781. SET_MAKE="MAKE=${MAKE-make}"
  782. fi
  783. # Extract the first word of "gcc", so it can be a program name with args.
  784. set dummy gcc; ac_word=$2
  785. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  786. echo "configure:884: checking for $ac_word" >&5
  787. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  788. echo $ac_n "(cached) $ac_c" 1>&6
  789. else
  790. if test -n "$CC"; then
  791. ac_cv_prog_CC="$CC" # Let the user override the test.
  792. else
  793. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  794. ac_dummy="$PATH"
  795. for ac_dir in $ac_dummy; do
  796. test -z "$ac_dir" && ac_dir=.
  797. if test -f $ac_dir/$ac_word; then
  798. ac_cv_prog_CC="gcc"
  799. break
  800. fi
  801. done
  802. IFS="$ac_save_ifs"
  803. fi
  804. fi
  805. CC="$ac_cv_prog_CC"
  806. if test -n "$CC"; then
  807. echo "$ac_t""$CC" 1>&6
  808. else
  809. echo "$ac_t""no" 1>&6
  810. fi
  811. if test -z "$CC"; then
  812. # Extract the first word of "cc", so it can be a program name with args.
  813. set dummy cc; ac_word=$2
  814. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  815. echo "configure:914: checking for $ac_word" >&5
  816. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  817. echo $ac_n "(cached) $ac_c" 1>&6
  818. else
  819. if test -n "$CC"; then
  820. ac_cv_prog_CC="$CC" # Let the user override the test.
  821. else
  822. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  823. ac_prog_rejected=no
  824. ac_dummy="$PATH"
  825. for ac_dir in $ac_dummy; do
  826. test -z "$ac_dir" && ac_dir=.
  827. if test -f $ac_dir/$ac_word; then
  828. if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  829. ac_prog_rejected=yes
  830. continue
  831. fi
  832. ac_cv_prog_CC="cc"
  833. break
  834. fi
  835. done
  836. IFS="$ac_save_ifs"
  837. if test $ac_prog_rejected = yes; then
  838. # We found a bogon in the path, so make sure we never use it.
  839. set dummy $ac_cv_prog_CC
  840. shift
  841. if test $# -gt 0; then
  842. # We chose a different compiler from the bogus one.
  843. # However, it has the same basename, so the bogon will be chosen
  844. # first if we set CC to just the basename; use the full file name.
  845. shift
  846. set dummy "$ac_dir/$ac_word" "$@"
  847. shift
  848. ac_cv_prog_CC="$@"
  849. fi
  850. fi
  851. fi
  852. fi
  853. CC="$ac_cv_prog_CC"
  854. if test -n "$CC"; then
  855. echo "$ac_t""$CC" 1>&6
  856. else
  857. echo "$ac_t""no" 1>&6
  858. fi
  859. if test -z "$CC"; then
  860. case "`uname -s`" in
  861. *win32* | *WIN32*)
  862. # Extract the first word of "cl", so it can be a program name with args.
  863. set dummy cl; ac_word=$2
  864. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  865. echo "configure:965: checking for $ac_word" >&5
  866. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  867. echo $ac_n "(cached) $ac_c" 1>&6
  868. else
  869. if test -n "$CC"; then
  870. ac_cv_prog_CC="$CC" # Let the user override the test.
  871. else
  872. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  873. ac_dummy="$PATH"
  874. for ac_dir in $ac_dummy; do
  875. test -z "$ac_dir" && ac_dir=.
  876. if test -f $ac_dir/$ac_word; then
  877. ac_cv_prog_CC="cl"
  878. break
  879. fi
  880. done
  881. IFS="$ac_save_ifs"
  882. fi
  883. fi
  884. CC="$ac_cv_prog_CC"
  885. if test -n "$CC"; then
  886. echo "$ac_t""$CC" 1>&6
  887. else
  888. echo "$ac_t""no" 1>&6
  889. fi
  890. ;;
  891. esac
  892. fi
  893. test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  894. fi
  895. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  896. echo "configure:997: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  897. ac_ext=c
  898. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  899. ac_cpp='$CPP $CPPFLAGS'
  900. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  901. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  902. cross_compiling=$ac_cv_prog_cc_cross
  903. cat > conftest.$ac_ext << EOF
  904. #line 1008 "configure"
  905. #include "confdefs.h"
  906. main(){return(0);}
  907. EOF
  908. if { (eval echo configure:1013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  909. ac_cv_prog_cc_works=yes
  910. # If we can't run a trivial program, we are probably using a cross compiler.
  911. if (./conftest; exit) 2>/dev/null; then
  912. ac_cv_prog_cc_cross=no
  913. else
  914. ac_cv_prog_cc_cross=yes
  915. fi
  916. else
  917. echo "configure: failed program was:" >&5
  918. cat conftest.$ac_ext >&5
  919. ac_cv_prog_cc_works=no
  920. fi
  921. rm -fr conftest*
  922. ac_ext=c
  923. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  924. ac_cpp='$CPP $CPPFLAGS'
  925. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  926. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  927. cross_compiling=$ac_cv_prog_cc_cross
  928. echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
  929. if test $ac_cv_prog_cc_works = no; then
  930. { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  931. fi
  932. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  933. echo "configure:1039: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  934. echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  935. cross_compiling=$ac_cv_prog_cc_cross
  936. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  937. echo "configure:1044: checking whether we are using GNU C" >&5
  938. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  939. echo $ac_n "(cached) $ac_c" 1>&6
  940. else
  941. cat > conftest.c <<EOF
  942. #ifdef __GNUC__
  943. yes;
  944. #endif
  945. EOF
  946. 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
  947. ac_cv_prog_gcc=yes
  948. else
  949. ac_cv_prog_gcc=no
  950. fi
  951. fi
  952. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  953. if test $ac_cv_prog_gcc = yes; then
  954. GCC=yes
  955. else
  956. GCC=
  957. fi
  958. ac_test_CFLAGS="${CFLAGS+set}"
  959. ac_save_CFLAGS="$CFLAGS"
  960. CFLAGS=
  961. echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  962. echo "configure:1072: checking whether ${CC-cc} accepts -g" >&5
  963. if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  964. echo $ac_n "(cached) $ac_c" 1>&6
  965. else
  966. echo 'void f(){}' > conftest.c
  967. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  968. ac_cv_prog_cc_g=yes
  969. else
  970. ac_cv_prog_cc_g=no
  971. fi
  972. rm -f conftest*
  973. fi
  974. echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
  975. if test "$ac_test_CFLAGS" = set; then
  976. CFLAGS="$ac_save_CFLAGS"
  977. elif test $ac_cv_prog_cc_g = yes; then
  978. if test "$GCC" = yes; then
  979. CFLAGS="-g -O2"
  980. else
  981. CFLAGS="-g"
  982. fi
  983. else
  984. if test "$GCC" = yes; then
  985. CFLAGS="-O2"
  986. else
  987. CFLAGS=
  988. fi
  989. fi
  990. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  991. echo "configure:1104: checking how to run the C preprocessor" >&5
  992. # On Suns, sometimes $CPP names a directory.
  993. if test -n "$CPP" && test -d "$CPP"; then
  994. CPP=
  995. fi
  996. if test -z "$CPP"; then
  997. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  998. echo $ac_n "(cached) $ac_c" 1>&6
  999. else
  1000. # This must be in double quotes, not single quotes, because CPP may get
  1001. # substituted into the Makefile and "${CC-cc}" will confuse make.
  1002. CPP="${CC-cc} -E"
  1003. # On the NeXT, cc -E runs the code through the compiler's parser,
  1004. # not just through cpp.
  1005. cat > conftest.$ac_ext <<EOF
  1006. #line 1119 "configure"
  1007. #include "confdefs.h"
  1008. #include <assert.h>
  1009. Syntax Error
  1010. EOF
  1011. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1012. { (eval echo configure:1125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1013. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1014. if test -z "$ac_err"; then
  1015. :
  1016. else
  1017. echo "$ac_err" >&5
  1018. echo "configure: failed program was:" >&5
  1019. cat conftest.$ac_ext >&5
  1020. rm -rf conftest*
  1021. CPP="${CC-cc} -E -traditional-cpp"
  1022. cat > conftest.$ac_ext <<EOF
  1023. #line 1136 "configure"
  1024. #include "confdefs.h"
  1025. #include <assert.h>
  1026. Syntax Error
  1027. EOF
  1028. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1029. { (eval echo configure:1142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1030. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1031. if test -z "$ac_err"; then
  1032. :
  1033. else
  1034. echo "$ac_err" >&5
  1035. echo "configure: failed program was:" >&5
  1036. cat conftest.$ac_ext >&5
  1037. rm -rf conftest*
  1038. CPP="${CC-cc} -nologo -E"
  1039. cat > conftest.$ac_ext <<EOF
  1040. #line 1153 "configure"
  1041. #include "confdefs.h"
  1042. #include <assert.h>
  1043. Syntax Error
  1044. EOF
  1045. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1046. { (eval echo configure:1159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1047. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1048. if test -z "$ac_err"; then
  1049. :
  1050. else
  1051. echo "$ac_err" >&5
  1052. echo "configure: failed program was:" >&5
  1053. cat conftest.$ac_ext >&5
  1054. rm -rf conftest*
  1055. CPP=/lib/cpp
  1056. fi
  1057. rm -f conftest*
  1058. fi
  1059. rm -f conftest*
  1060. fi
  1061. rm -f conftest*
  1062. ac_cv_prog_CPP="$CPP"
  1063. fi
  1064. CPP="$ac_cv_prog_CPP"
  1065. else
  1066. ac_cv_prog_CPP="$CPP"
  1067. fi
  1068. echo "$ac_t""$CPP" 1>&6
  1069. for ac_prog in mawk gawk nawk awk
  1070. do
  1071. # Extract the first word of "$ac_prog", so it can be a program name with args.
  1072. set dummy $ac_prog; ac_word=$2
  1073. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1074. echo "configure:1188: checking for $ac_word" >&5
  1075. if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
  1076. echo $ac_n "(cached) $ac_c" 1>&6
  1077. else
  1078. if test -n "$AWK"; then
  1079. ac_cv_prog_AWK="$AWK" # Let the user override the test.
  1080. else
  1081. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  1082. ac_dummy="$PATH"
  1083. for ac_dir in $ac_dummy; do
  1084. test -z "$ac_dir" && ac_dir=.
  1085. if test -f $ac_dir/$ac_word; then
  1086. ac_cv_prog_AWK="$ac_prog"
  1087. break
  1088. fi
  1089. done
  1090. IFS="$ac_save_ifs"
  1091. fi
  1092. fi
  1093. AWK="$ac_cv_prog_AWK"
  1094. if test -n "$AWK"; then
  1095. echo "$ac_t""$AWK" 1>&6
  1096. else
  1097. echo "$ac_t""no" 1>&6
  1098. fi
  1099. test -n "$AWK" && break
  1100. done
  1101. CC_G_OPT="-g"
  1102. CC_SHARED_OPTS=unknown
  1103. CPPFLAGS="$CPPFLAGS"
  1104. DFT_DEP_SUFFIX=""
  1105. DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
  1106. DFT_UPR_MODEL="NORMAL"
  1107. LD="ld"
  1108. LDFLAGS_SHARED=""
  1109. LDFLAGS_STATIC=""
  1110. LD_MODEL=""
  1111. LD_SHARED_OPTS=""
  1112. LIBTOOL=""
  1113. LIB_CLEAN=""
  1114. LIB_COMPILE=""
  1115. LIB_LINK='${CC}'
  1116. LINK_TESTS=""
  1117. LINT=lint
  1118. LINT_OPTS=""
  1119. LOCAL_LDFLAGS=""
  1120. MATH_LIB="-lm"
  1121. PTHREAD="-lm"
  1122. TEST_ARGS=""
  1123. TEST_DEPS=""
  1124. TEST_LIBS=""
  1125. TINFO_ARGS='$(LIBS_CURSES)'
  1126. cf_cv_abi_version=""
  1127. cf_cv_rel_version=""
  1128. cf_cv_screen=curses
  1129. cf_cv_libtype=
  1130. echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
  1131. echo "configure:1250: checking for Cygwin environment" >&5
  1132. if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
  1133. echo $ac_n "(cached) $ac_c" 1>&6
  1134. else
  1135. cat > conftest.$ac_ext <<EOF
  1136. #line 1255 "configure"
  1137. #include "confdefs.h"
  1138. int main() {
  1139. #ifndef __CYGWIN__
  1140. #define __CYGWIN__ __CYGWIN32__
  1141. #endif
  1142. return __CYGWIN__;
  1143. ; return 0; }
  1144. EOF
  1145. if { (eval echo configure:1266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1146. rm -rf conftest*
  1147. ac_cv_cygwin=yes
  1148. else
  1149. echo "configure: failed program was:" >&5
  1150. cat conftest.$ac_ext >&5
  1151. rm -rf conftest*
  1152. ac_cv_cygwin=no
  1153. fi
  1154. rm -f conftest*
  1155. rm -f conftest*
  1156. fi
  1157. echo "$ac_t""$ac_cv_cygwin" 1>&6
  1158. CYGWIN=
  1159. test "$ac_cv_cygwin" = yes && CYGWIN=yes
  1160. echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
  1161. echo "configure:1283: checking for mingw32 environment" >&5
  1162. if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
  1163. echo $ac_n "(cached) $ac_c" 1>&6
  1164. else
  1165. cat > conftest.$ac_ext <<EOF
  1166. #line 1288 "configure"
  1167. #include "confdefs.h"
  1168. int main() {
  1169. return __MINGW32__;
  1170. ; return 0; }
  1171. EOF
  1172. if { (eval echo configure:1295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1173. rm -rf conftest*
  1174. ac_cv_mingw32=yes
  1175. else
  1176. echo "configure: failed program was:" >&5
  1177. cat conftest.$ac_ext >&5
  1178. rm -rf conftest*
  1179. ac_cv_mingw32=no
  1180. fi
  1181. rm -f conftest*
  1182. rm -f conftest*
  1183. fi
  1184. echo "$ac_t""$ac_cv_mingw32" 1>&6
  1185. MINGW32=
  1186. test "$ac_cv_mingw32" = yes && MINGW32=yes
  1187. echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
  1188. echo "configure:1314: checking for executable suffix" >&5
  1189. if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
  1190. echo $ac_n "(cached) $ac_c" 1>&6
  1191. else
  1192. if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
  1193. ac_cv_exeext=.exe
  1194. else
  1195. rm -f conftest*
  1196. echo 'int main () { return 0; }' > conftest.$ac_ext
  1197. ac_cv_exeext=
  1198. if { (eval echo configure:1324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1199. for file in conftest.*; do
  1200. case $file in
  1201. *.c | *.o | *.obj) ;;
  1202. *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
  1203. esac
  1204. done
  1205. else
  1206. { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
  1207. fi
  1208. rm -f conftest*
  1209. test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
  1210. fi
  1211. fi
  1212. EXEEXT=""
  1213. test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
  1214. echo "$ac_t""${ac_cv_exeext}" 1>&6
  1215. ac_exeext=$EXEEXT
  1216. echo $ac_n "checking for object suffix""... $ac_c" 1>&6
  1217. echo "configure:1345: checking for object suffix" >&5
  1218. if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
  1219. echo $ac_n "(cached) $ac_c" 1>&6
  1220. else
  1221. rm -f conftest*
  1222. echo 'int i = 1;' > conftest.$ac_ext
  1223. if { (eval echo configure:1351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1224. for ac_file in conftest.*; do
  1225. case $ac_file in
  1226. *.c) ;;
  1227. *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
  1228. esac
  1229. done
  1230. else
  1231. { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
  1232. fi
  1233. rm -f conftest*
  1234. fi
  1235. echo "$ac_t""$ac_cv_objext" 1>&6
  1236. OBJEXT=$ac_cv_objext
  1237. ac_objext=$ac_cv_objext
  1238. echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
  1239. echo "configure:1371: checking for ${CC-cc} option to accept ANSI C" >&5
  1240. if eval "test \"`echo '$''{'cf_cv_ansi_cc'+set}'`\" = set"; then
  1241. echo $ac_n "(cached) $ac_c" 1>&6
  1242. else
  1243. cf_cv_ansi_cc=no
  1244. cf_save_CFLAGS="$CFLAGS"
  1245. cf_save_CPPFLAGS="$CPPFLAGS"
  1246. # Don't try gcc -ansi; that turns off useful extensions and
  1247. # breaks some systems' header files.
  1248. # AIX -qlanglvl=ansi
  1249. # Ultrix and OSF/1 -std1
  1250. # HP-UX -Aa -D_HPUX_SOURCE
  1251. # SVR4 -Xc
  1252. # UnixWare 1.2 (cannot use -Xc, since ANSI/POSIX clashes)
  1253. for cf_arg in "-DCC_HAS_PROTOS" \
  1254. "" \
  1255. -qlanglvl=ansi \
  1256. -std1 \
  1257. -Ae \
  1258. "-Aa -D_HPUX_SOURCE" \
  1259. -Xc
  1260. do
  1261. cf_fix_cppflags=no
  1262. cf_new_cflags=
  1263. cf_new_cppflags=
  1264. cf_new_extra_cppflags=
  1265. for cf_add_cflags in $cf_arg
  1266. do
  1267. case $cf_fix_cppflags in
  1268. no)
  1269. case $cf_add_cflags in #(vi
  1270. -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
  1271. case $cf_add_cflags in
  1272. -D*)
  1273. cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
  1274. test "${cf_add_cflags}" != "${cf_tst_cflags}" \
  1275. && test -z "${cf_tst_cflags}" \
  1276. && cf_fix_cppflags=yes
  1277. if test $cf_fix_cppflags = yes ; then
  1278. cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
  1279. continue
  1280. elif test "${cf_tst_cflags}" = "\"'" ; then
  1281. cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
  1282. continue
  1283. fi
  1284. ;;
  1285. esac
  1286. case "$CPPFLAGS" in
  1287. *$cf_add_cflags) #(vi
  1288. ;;
  1289. *) #(vi
  1290. cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
  1291. ;;
  1292. esac
  1293. ;;
  1294. *)
  1295. cf_new_cflags="$cf_new_cflags $cf_add_cflags"
  1296. ;;
  1297. esac
  1298. ;;
  1299. yes)
  1300. cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
  1301. cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
  1302. test "${cf_add_cflags}" != "${cf_tst_cflags}" \
  1303. && test -z "${cf_tst_cflags}" \
  1304. && cf_fix_cppflags=no
  1305. ;;
  1306. esac
  1307. done
  1308. if test -n "$cf_new_cflags" ; then
  1309. CFLAGS="$CFLAGS $cf_new_cflags"
  1310. fi
  1311. if test -n "$cf_new_cppflags" ; then
  1312. CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
  1313. fi
  1314. if test -n "$cf_new_extra_cppflags" ; then
  1315. EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
  1316. fi
  1317. cat > conftest.$ac_ext <<EOF
  1318. #line 1467 "configure"
  1319. #include "confdefs.h"
  1320. #ifndef CC_HAS_PROTOS
  1321. #if !defined(__STDC__) || (__STDC__ != 1)
  1322. choke me
  1323. #endif
  1324. #endif
  1325. int main() {
  1326. int test (int i, double x);
  1327. struct s1 {int (*f) (int a);};
  1328. struct s2 {int (*f) (double a);};
  1329. ; return 0; }
  1330. EOF
  1331. if { (eval echo configure:1483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1332. rm -rf conftest*
  1333. cf_cv_ansi_cc="$cf_arg"; break
  1334. else
  1335. echo "configure: failed program was:" >&5
  1336. cat conftest.$ac_ext >&5
  1337. fi
  1338. rm -f conftest*
  1339. done
  1340. CFLAGS="$cf_save_CFLAGS"
  1341. CPPFLAGS="$cf_save_CPPFLAGS"
  1342. fi
  1343. echo "$ac_t""$cf_cv_ansi_cc" 1>&6
  1344. if test "$cf_cv_ansi_cc" != "no"; then
  1345. if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
  1346. cf_fix_cppflags=no
  1347. cf_new_cflags=
  1348. cf_new_cppflags=
  1349. cf_new_extra_cppflags=
  1350. for cf_add_cflags in $cf_cv_ansi_cc
  1351. do
  1352. case $cf_fix_cppflags in
  1353. no)
  1354. case $cf_add_cflags in #(vi
  1355. -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
  1356. case $cf_add_cflags in
  1357. -D*)
  1358. cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
  1359. test "${cf_add_cflags}" != "${cf_tst_cflags}" \
  1360. && test -z "${cf_tst_cflags}" \
  1361. && cf_fix_cppflags=yes
  1362. if test $cf_fix_cppflags = yes ; then
  1363. cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
  1364. continue
  1365. elif test "${cf_tst_cflags}" = "\"'" ; then
  1366. cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
  1367. continue
  1368. fi
  1369. ;;
  1370. esac
  1371. case "$CPPFLAGS" in
  1372. *$cf_add_cflags) #(vi
  1373. ;;
  1374. *) #(vi
  1375. cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
  1376. ;;
  1377. esac
  1378. ;;
  1379. *)
  1380. cf_new_cflags="$cf_new_cflags $cf_add_cflags"
  1381. ;;
  1382. esac
  1383. ;;
  1384. yes)
  1385. cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
  1386. cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
  1387. test "${cf_add_cflags}" != "${cf_tst_cflags}" \
  1388. && test -z "${cf_tst_cflags}" \
  1389. && cf_fix_cppflags=no
  1390. ;;
  1391. esac
  1392. done
  1393. if test -n "$cf_new_cflags" ; then
  1394. CFLAGS="$CFLAGS $cf_new_cflags"
  1395. fi
  1396. if test -n "$cf_new_cppflags" ; then
  1397. CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
  1398. fi
  1399. if test -n "$cf_new_extra_cppflags" ; then
  1400. EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
  1401. fi
  1402. else
  1403. cat >> confdefs.h <<\EOF
  1404. #define CC_HAS_PROTOS 1
  1405. EOF
  1406. fi
  1407. fi
  1408. if test "$cf_cv_ansi_cc" = "no"; then
  1409. { echo "configure: error: Your compiler does not appear to recognize prototypes.
  1410. You have the following choices:
  1411. a. adjust your compiler options
  1412. b. get an up-to-date compiler
  1413. c. use a wrapper such as unproto" 1>&2; exit 1; }
  1414. fi
  1415. if test "$GCC" = yes
  1416. then
  1417. cat > conftest.i <<EOF
  1418. #ifndef GCC_PRINTF
  1419. #define GCC_PRINTF 0
  1420. #endif
  1421. #ifndef GCC_SCANF
  1422. #define GCC_SCANF 0
  1423. #endif
  1424. #ifndef GCC_NORETURN
  1425. #define GCC_NORETURN /* nothing */
  1426. #endif
  1427. #ifndef GCC_UNUSED
  1428. #define GCC_UNUSED /* nothing */
  1429. #endif
  1430. EOF
  1431. if test "$GCC" = yes
  1432. then
  1433. echo "checking for $CC __attribute__ directives" 1>&6
  1434. echo "configure:1610: checking for $CC __attribute__ directives" >&5
  1435. cat > conftest.$ac_ext <<EOF
  1436. #line 1612 "${as_me-configure}"
  1437. #include "confdefs.h"
  1438. #include "conftest.h"
  1439. #include "conftest.i"
  1440. #if GCC_PRINTF
  1441. #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
  1442. #else
  1443. #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
  1444. #endif
  1445. #if GCC_SCANF
  1446. #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
  1447. #else
  1448. #define GCC_SCANFLIKE(fmt,var) /*nothing*/
  1449. #endif
  1450. extern void wow(char *,...) GCC_SCANFLIKE(1,2);
  1451. extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
  1452. extern void foo(void) GCC_NORETURN;
  1453. int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
  1454. EOF
  1455. for cf_attribute in scanf printf unused noreturn
  1456. do
  1457. cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
  1458. cf_directive="__attribute__(($cf_attribute))"
  1459. echo "checking for $CC $cf_directive" 1>&5
  1460. case $cf_attribute in
  1461. scanf|printf)
  1462. cat >conftest.h <<EOF
  1463. #define GCC_$cf_ATTRIBUTE 1
  1464. EOF
  1465. ;;
  1466. *)
  1467. cat >conftest.h <<EOF
  1468. #define GCC_$cf_ATTRIBUTE $cf_directive
  1469. EOF
  1470. ;;
  1471. esac
  1472. if { (eval echo configure:1650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1473. test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6
  1474. cat conftest.h >>confdefs.h
  1475. fi
  1476. done
  1477. else
  1478. fgrep define conftest.i >>confdefs.h
  1479. fi
  1480. rm -rf conftest*
  1481. fi
  1482. echo $ac_n "checking if $CC -U and -D options work together""... $ac_c" 1>&6
  1483. echo "configure:1663: checking if $CC -U and -D options work together" >&5
  1484. if eval "test \"`echo '$''{'cf_cv_cc_u_d_options'+set}'`\" = set"; then
  1485. echo $ac_n "(cached) $ac_c" 1>&6
  1486. else
  1487. cf_save_CPPFLAGS="$CPPFLAGS"
  1488. CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
  1489. cat > conftest.$ac_ext <<EOF
  1490. #line 1671 "configure"
  1491. #include "confdefs.h"
  1492. int main() {
  1493. #ifndef U_D_OPTIONS
  1494. make an undefined-error
  1495. #endif
  1496. #ifdef D_U_OPTIONS
  1497. make a defined-error
  1498. #endif
  1499. ; return 0; }
  1500. EOF
  1501. if { (eval echo configure:1685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1502. rm -rf conftest*
  1503. cf_cv_cc_u_d_options=yes
  1504. else
  1505. echo "configure: failed program was:" >&5
  1506. cat conftest.$ac_ext >&5
  1507. rm -rf conftest*
  1508. cf_cv_cc_u_d_options=no
  1509. fi
  1510. rm -f conftest*
  1511. CPPFLAGS="$cf_save_CPPFLAGS"
  1512. fi
  1513. echo "$ac_t""$cf_cv_cc_u_d_options" 1>&6
  1514. cf_XOPEN_SOURCE=500
  1515. cf_POSIX_C_SOURCE=199506L
  1516. case $host_os in #(vi
  1517. aix[45]*) #(vi
  1518. CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
  1519. ;;
  1520. freebsd*) #(vi
  1521. # 5.x headers associate
  1522. # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
  1523. # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
  1524. cf_POSIX_C_SOURCE=200112L
  1525. cf_XOPEN_SOURCE=600
  1526. CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
  1527. ;;
  1528. hpux*) #(vi
  1529. CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
  1530. ;;
  1531. irix[56].*) #(vi
  1532. CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
  1533. ;;
  1534. linux*|gnu*|k*bsd*-gnu) #(vi
  1535. echo $ac_n "checking if we must define _GNU_SOURCE""... $ac_c" 1>&6
  1536. echo "configure:1731: checking if we must define _GNU_SOURCE" >&5
  1537. if eval "test \"`echo '$''{'cf_cv_gnu_source'+set}'`\" = set"; then
  1538. echo $ac_n "(cached) $ac_c" 1>&6
  1539. else
  1540. cat > conftest.$ac_ext <<EOF
  1541. #line 1737 "configure"
  1542. #include "confdefs.h"
  1543. #include <sys/types.h>
  1544. int main() {
  1545. #ifndef _XOPEN_SOURCE
  1546. make an error
  1547. #endif
  1548. ; return 0; }
  1549. EOF
  1550. if { (eval echo configure:1747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1551. rm -rf conftest*
  1552. cf_cv_gnu_source=no
  1553. else
  1554. echo "configure: failed program was:" >&5
  1555. cat conftest.$ac_ext >&5
  1556. rm -rf conftest*
  1557. cf_save="$CPPFLAGS"
  1558. CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
  1559. cat > conftest.$ac_ext <<EOF
  1560. #line 1757 "configure"
  1561. #include "confdefs.h"
  1562. #include <sys/types.h>
  1563. int main() {
  1564. #ifdef _XOPEN_SOURCE
  1565. make an error
  1566. #endif
  1567. ; return 0; }
  1568. EOF
  1569. if { (eval echo configure:1767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1570. rm -rf conftest*
  1571. cf_cv_gnu_source=no
  1572. else
  1573. echo "configure: failed program was:" >&5
  1574. cat conftest.$ac_ext >&5
  1575. rm -rf conftest*
  1576. cf_cv_gnu_source=yes
  1577. fi
  1578. rm -f conftest*
  1579. CPPFLAGS="$cf_save"
  1580. fi
  1581. rm -f conftest*
  1582. fi
  1583. echo "$ac_t""$cf_cv_gnu_source" 1>&6
  1584. test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
  1585. ;;
  1586. mirbsd*) #(vi
  1587. # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
  1588. ;;
  1589. netbsd*) #(vi
  1590. # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
  1591. ;;
  1592. openbsd*) #(vi
  1593. # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
  1594. ;;
  1595. osf[45]*) #(vi
  1596. CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
  1597. ;;
  1598. nto-qnx*) #(vi
  1599. CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
  1600. ;;
  1601. sco*) #(vi
  1602. # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
  1603. ;;
  1604. solaris*) #(vi
  1605. CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
  1606. ;;
  1607. *)
  1608. echo $ac_n "checking if we should define _XOPEN_SOURCE""... $ac_c" 1>&6
  1609. echo "configure:1811: checking if we should define _XOPEN_SOURCE" >&5
  1610. if eval "test \"`echo '$''{'cf_cv_xopen_source'+set}'`\" = set"; then
  1611. echo $ac_n "(cached) $ac_c" 1>&6
  1612. else
  1613. cat > conftest.$ac_ext <<EOF
  1614. #line 1817 "configure"
  1615. #include "confdefs.h"
  1616. #include <sys/types.h>
  1617. int main() {
  1618. #ifndef _XOPEN_SOURCE
  1619. make an error
  1620. #endif
  1621. ; return 0; }
  1622. EOF
  1623. if { (eval echo configure:1827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1624. rm -rf conftest*
  1625. cf_cv_xopen_source=no
  1626. else
  1627. echo "configure: failed program was:" >&5
  1628. cat conftest.$ac_ext >&5
  1629. rm -rf conftest*
  1630. cf_save="$CPPFLAGS"
  1631. CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
  1632. cat > conftest.$ac_ext <<EOF
  1633. #line 1837 "configure"
  1634. #include "confdefs.h"
  1635. #include <sys/types.h>
  1636. int main() {
  1637. #ifdef _XOPEN_SOURCE
  1638. make an error
  1639. #endif
  1640. ; return 0; }
  1641. EOF
  1642. if { (eval echo configure:1847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1643. rm -rf conftest*
  1644. cf_cv_xopen_source=no
  1645. else
  1646. echo "configure: failed program was:" >&5
  1647. cat conftest.$ac_ext >&5
  1648. rm -rf conftest*
  1649. cf_cv_xopen_source=$cf_XOPEN_SOURCE
  1650. fi
  1651. rm -f conftest*
  1652. CPPFLAGS="$cf_save"
  1653. fi
  1654. rm -f conftest*
  1655. fi
  1656. echo "$ac_t""$cf_cv_xopen_source" 1>&6
  1657. if test "$cf_cv_xopen_source" != no ; then
  1658. # remove _XOPEN_SOURCE symbol from $CFLAGS
  1659. CFLAGS=`echo "$CFLAGS" | \
  1660. sed -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
  1661. -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?$//g'`
  1662. # remove _XOPEN_SOURCE symbol from $CPPFLAGS
  1663. CPPFLAGS=`echo "$CPPFLAGS" | \
  1664. sed -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
  1665. -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?$//g'`
  1666. test "$cf_cv_cc_u_d_options" = yes && \
  1667. CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
  1668. CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
  1669. fi
  1670. cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
  1671. cf_save_CFLAGS="$CFLAGS"
  1672. cf_save_CPPFLAGS="$CPPFLAGS"
  1673. # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
  1674. cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
  1675. sed -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
  1676. -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?$//g'`
  1677. # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
  1678. cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
  1679. sed -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
  1680. -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?$//g'`
  1681. echo $ac_n "checking if we should define _POSIX_C_SOURCE""... $ac_c" 1>&6
  1682. echo "configure:1902: checking if we should define _POSIX_C_SOURCE" >&5
  1683. if eval "test \"`echo '$''{'cf_cv_posix_c_source'+set}'`\" = set"; then
  1684. echo $ac_n "(cached) $ac_c" 1>&6
  1685. else
  1686. echo "${as_me-configure}:1908: testing if the symbol is already defined go no further ..." 1>&5
  1687. cat > conftest.$ac_ext <<EOF
  1688. #line 1911 "configure"
  1689. #include "confdefs.h"
  1690. #include <sys/types.h>
  1691. int main() {
  1692. #ifndef _POSIX_C_SOURCE
  1693. make an error
  1694. #endif
  1695. ; return 0; }
  1696. EOF
  1697. if { (eval echo configure:1921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1698. rm -rf conftest*
  1699. cf_cv_posix_c_source=no
  1700. else
  1701. echo "configure: failed program was:" >&5
  1702. cat conftest.$ac_ext >&5
  1703. rm -rf conftest*
  1704. cf_want_posix_source=no
  1705. case .$cf_POSIX_C_SOURCE in #(vi
  1706. .[12]??*) #(vi
  1707. cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
  1708. ;;
  1709. .2) #(vi
  1710. cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
  1711. cf_want_posix_source=yes
  1712. ;;
  1713. .*)
  1714. cf_want_posix_source=yes
  1715. ;;
  1716. esac
  1717. if test "$cf_want_posix_source" = yes ; then
  1718. cat > conftest.$ac_ext <<EOF
  1719. #line 1943 "configure"
  1720. #include "confdefs.h"
  1721. #include <sys/types.h>
  1722. int main() {
  1723. #ifdef _POSIX_SOURCE
  1724. make an error
  1725. #endif
  1726. ; return 0; }
  1727. EOF
  1728. if { (eval echo configure:1953: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1729. :
  1730. else
  1731. echo "configure: failed program was:" >&5
  1732. cat conftest.$ac_ext >&5
  1733. rm -rf conftest*
  1734. cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
  1735. fi
  1736. rm -f conftest*
  1737. fi
  1738. echo "${as_me-configure}:1964: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
  1739. CFLAGS="$cf_trim_CFLAGS"
  1740. CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
  1741. echo "${as_me-configure}:1969: testing if the second compile does not leave our definition intact error ..." 1>&5
  1742. cat > conftest.$ac_ext <<EOF
  1743. #line 1972 "configure"
  1744. #include "confdefs.h"
  1745. #include <sys/types.h>
  1746. int main() {
  1747. #ifndef _POSIX_C_SOURCE
  1748. make an error
  1749. #endif
  1750. ; return 0; }
  1751. EOF
  1752. if { (eval echo configure:1982: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1753. :
  1754. else
  1755. echo "configure: failed program was:" >&5
  1756. cat conftest.$ac_ext >&5
  1757. rm -rf conftest*
  1758. cf_cv_posix_c_source=no
  1759. fi
  1760. rm -f conftest*
  1761. CFLAGS="$cf_save_CFLAGS"
  1762. CPPFLAGS="$cf_save_CPPFLAGS"
  1763. fi
  1764. rm -f conftest*
  1765. fi
  1766. echo "$ac_t""$cf_cv_posix_c_source" 1>&6
  1767. if test "$cf_cv_posix_c_source" != no ; then
  1768. CFLAGS="$cf_trim_CFLAGS"
  1769. CPPFLAGS="$cf_trim_CPPFLAGS"
  1770. if test "$cf_cv_cc_u_d_options" = yes ; then
  1771. cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
  1772. sed -e 's/-D/-U/g' -e 's/=[^ ]*//g'`
  1773. CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
  1774. fi
  1775. CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
  1776. fi
  1777. ;;
  1778. esac
  1779. echo $ac_n "checking for working const""... $ac_c" 1>&6
  1780. echo "configure:2017: checking for working const" >&5
  1781. if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  1782. echo $ac_n "(cached) $ac_c" 1>&6
  1783. else
  1784. cat > conftest.$ac_ext <<EOF
  1785. #line 2022 "configure"
  1786. #include "confdefs.h"
  1787. int main() {
  1788. /* Ultrix mips cc rejects this. */
  1789. typedef int charset[2]; const charset x;
  1790. /* SunOS 4.1.1 cc rejects this. */
  1791. char const *const *ccp;
  1792. char **p;
  1793. /* NEC SVR4.0.2 mips cc rejects this. */
  1794. struct point {int x, y;};
  1795. static struct point const zero = {0,0};
  1796. /* AIX XL C 1.02.0.0 rejects this.
  1797. It does not let you subtract one const X* pointer from another in an arm
  1798. of an if-expression whose if-part is not a constant expression */
  1799. const char *g = "string";
  1800. ccp = &g + (g ? g-g : 0);
  1801. /* HPUX 7.0 cc rejects these. */
  1802. ++ccp;
  1803. p = (char**) ccp;
  1804. ccp = (char const *const *) p;
  1805. { /* SCO 3.2v4 cc rejects this. */
  1806. char *t;
  1807. char const *s = 0 ? (char *) 0 : (char const *) 0;
  1808. *t++ = 0;
  1809. }
  1810. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
  1811. int x[] = {25, 17};
  1812. const int *foo = &x[0];
  1813. ++foo;
  1814. }
  1815. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  1816. typedef const int *iptr;
  1817. iptr p = 0;
  1818. ++p;
  1819. }
  1820. { /* AIX XL C 1.02.0.0 rejects this saying
  1821. "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  1822. struct s { int j; const int *ap[3]; };
  1823. struct s *b; b->j = 5;
  1824. }
  1825. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  1826. const int foo = 10;
  1827. }
  1828. ; return 0; }
  1829. EOF
  1830. if { (eval echo configure:2071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1831. rm -rf conftest*
  1832. ac_cv_c_const=yes
  1833. else
  1834. echo "configure: failed program was:" >&5
  1835. cat conftest.$ac_ext >&5
  1836. rm -rf conftest*
  1837. ac_cv_c_const=no
  1838. fi
  1839. rm -f conftest*
  1840. fi
  1841. echo "$ac_t""$ac_cv_c_const" 1>&6
  1842. if test $ac_cv_c_const = no; then
  1843. cat >> confdefs.h <<\EOF
  1844. #define const
  1845. EOF
  1846. fi
  1847. echo $ac_n "checking for signal global datatype""... $ac_c" 1>&6
  1848. echo "configure:2093: checking for signal global datatype" >&5
  1849. if eval "test \"`echo '$''{'cf_cv_sig_atomic_t'+set}'`\" = set"; then
  1850. echo $ac_n "(cached) $ac_c" 1>&6
  1851. else
  1852. for cf_type in \
  1853. "volatile sig_atomic_t" \
  1854. "sig_atomic_t" \
  1855. "int"
  1856. do
  1857. cat > conftest.$ac_ext <<EOF
  1858. #line 2104 "configure"
  1859. #include "confdefs.h"
  1860. #include <sys/types.h>
  1861. #include <signal.h>
  1862. #include <stdio.h>
  1863. extern $cf_type x;
  1864. $cf_type x;
  1865. static void handler(int sig)
  1866. {
  1867. x = 5;
  1868. }
  1869. int main() {
  1870. signal(SIGINT, handler);
  1871. x = 1
  1872. ; return 0; }
  1873. EOF
  1874. if { (eval echo configure:2122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1875. rm -rf conftest*
  1876. cf_cv_sig_atomic_t=$cf_type
  1877. else
  1878. echo "configure: failed program was:" >&5
  1879. cat conftest.$ac_ext >&5
  1880. rm -rf conftest*
  1881. cf_cv_sig_atomic_t=no
  1882. fi
  1883. rm -f conftest*
  1884. test "$cf_cv_sig_atomic_t" != no && break
  1885. done
  1886. fi
  1887. echo "$ac_t""$cf_cv_sig_atomic_t" 1>&6
  1888. test "$cf_cv_sig_atomic_t" != no && cat >> confdefs.h <<EOF
  1889. #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
  1890. EOF
  1891. echo $ac_n "checking if you want to see long compiling messages""... $ac_c" 1>&6
  1892. echo "configure:2146: checking if you want to see long compiling messages" >&5
  1893. # Check whether --enable-echo or --disable-echo was given.
  1894. if test "${enable_echo+set}" = set; then
  1895. enableval="$enable_echo"
  1896. test "$enableval" != no && enableval=yes
  1897. if test "$enableval" != "yes" ; then
  1898. ECHO_LT='--silent'
  1899. ECHO_LD='@echo linking $@;'
  1900. RULE_CC=' @echo compiling $<'
  1901. SHOW_CC=' @echo compiling $@'
  1902. ECHO_CC='@'
  1903. else
  1904. ECHO_LT=''
  1905. ECHO_LD=''
  1906. RULE_CC='# compiling'
  1907. SHOW_CC='# compiling'
  1908. ECHO_CC=''
  1909. fi
  1910. else
  1911. enableval=yes
  1912. ECHO_LT=''
  1913. ECHO_LD=''
  1914. RULE_CC='# compiling'
  1915. SHOW_CC='# compiling'
  1916. ECHO_CC=''
  1917. fi
  1918. echo "$ac_t""$enableval" 1>&6
  1919. GCC_VERSION=none
  1920. if test "$GCC" = yes ; then
  1921. echo $ac_n "checking version of $CC""... $ac_c" 1>&6
  1922. echo "configure:2193: checking version of $CC" >&5
  1923. GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
  1924. test -z "$GCC_VERSION" && GCC_VERSION=unknown
  1925. echo "$ac_t""$GCC_VERSION" 1>&6
  1926. fi
  1927. if ( test "$GCC" = yes || test "$GXX" = yes )
  1928. then
  1929. echo $ac_n "checking if you want to turn on gcc warnings""... $ac_c" 1>&6
  1930. echo "configure:2203: checking if you want to turn on gcc warnings" >&5
  1931. # Check whether --enable-warnings or --disable-warnings was given.
  1932. if test "${enable_warnings+set}" = set; then
  1933. enableval="$enable_warnings"
  1934. test "$enableval" != yes && enableval=no
  1935. if test "$enableval" != "no" ; then
  1936. with_warnings=yes
  1937. else
  1938. with_warnings=no
  1939. fi
  1940. else
  1941. enableval=no
  1942. with_warnings=no
  1943. fi
  1944. echo "$ac_t""$with_warnings" 1>&6
  1945. if test "$with_warnings" = "yes"
  1946. then
  1947. INTEL_COMPILER=no
  1948. if test "$GCC" = yes ; then
  1949. case $host_os in
  1950. linux*|gnu*)
  1951. echo $ac_n "checking if this is really Intel C compiler""... $ac_c" 1>&6
  1952. echo "configure:2232: checking if this is really Intel C compiler" >&5
  1953. cf_save_CFLAGS="$CFLAGS"
  1954. CFLAGS="$CFLAGS -no-gcc"
  1955. cat > conftest.$ac_ext <<EOF
  1956. #line 2236 "configure"
  1957. #include "confdefs.h"
  1958. int main() {
  1959. #ifdef __INTEL_COMPILER
  1960. #else
  1961. make an error
  1962. #endif
  1963. ; return 0; }
  1964. EOF
  1965. if { (eval echo configure:2248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1966. rm -rf conftest*
  1967. INTEL_COMPILER=yes
  1968. cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
  1969. else
  1970. echo "configure: failed program was:" >&5
  1971. cat conftest.$ac_ext >&5
  1972. fi
  1973. rm -f conftest*
  1974. CFLAGS="$cf_save_CFLAGS"
  1975. echo "$ac_t""$INTEL_COMPILER" 1>&6
  1976. ;;
  1977. esac
  1978. fi
  1979. cat > conftest.$ac_ext <<EOF
  1980. #line 2266 "${as_me-configure}"
  1981. int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
  1982. EOF
  1983. if test "$INTEL_COMPILER" = yes
  1984. then
  1985. # The "-wdXXX" options suppress warnings:
  1986. # remark #1419: external declaration in primary source file
  1987. # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
  1988. # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
  1989. # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
  1990. # remark #193: zero used for undefined preprocessing identifier
  1991. # remark #593: variable "curs_sb_left_arrow" was set but never used
  1992. # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
  1993. # remark #869: parameter "tw" was never referenced
  1994. # remark #981: operands are evaluated in unspecified order
  1995. # warning #269: invalid format string conversion
  1996. echo "checking for $CC warning options" 1>&6
  1997. echo "configure:2285: checking for $CC warning options" >&5
  1998. cf_save_CFLAGS="$CFLAGS"
  1999. EXTRA_CFLAGS="-Wall"
  2000. for cf_opt in \
  2001. wd1419 \
  2002. wd1682 \
  2003. wd1683 \
  2004. wd1684 \
  2005. wd193 \
  2006. wd279 \
  2007. wd593 \
  2008. wd810 \
  2009. wd869 \
  2010. wd981
  2011. do
  2012. CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
  2013. if { (eval echo configure:2301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2014. test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
  2015. EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
  2016. fi
  2017. done
  2018. CFLAGS="$cf_save_CFLAGS"
  2019. elif test "$GCC" = yes
  2020. then
  2021. echo "checking for $CC warning options" 1>&6
  2022. echo "configure:2311: checking for $CC warning options" >&5
  2023. cf_save_CFLAGS="$CFLAGS"
  2024. EXTRA_CFLAGS="-W -Wall"
  2025. cf_warn_CONST=""
  2026. test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
  2027. for cf_opt in \
  2028. Wbad-function-cast \
  2029. Wcast-align \
  2030. Wcast-qual \
  2031. Winline \
  2032. Wmissing-declarations \
  2033. Wmissing-prototypes \
  2034. Wnested-externs \
  2035. Wpointer-arith \
  2036. Wshadow \
  2037. Wstrict-prototypes \
  2038. Wundef $cf_warn_CONST
  2039. do
  2040. CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
  2041. if { (eval echo configure:2330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2042. test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
  2043. case $cf_opt in #(vi
  2044. Wcast-qual) #(vi
  2045. CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
  2046. ;;
  2047. Winline) #(vi
  2048. case $GCC_VERSION in
  2049. 3.3*)
  2050. test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
  2051. echo "${as_me-configure}:2341: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
  2052. continue;;
  2053. esac
  2054. ;;
  2055. esac
  2056. EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
  2057. fi
  2058. done
  2059. CFLAGS="$cf_save_CFLAGS"
  2060. fi
  2061. rm -f conftest*
  2062. fi
  2063. fi
  2064. # Check whether --with-curses-dir or --without-curses-dir was given.
  2065. if test "${with_curses_dir+set}" = set; then
  2066. withval="$with_curses_dir"
  2067. if test "x$prefix" != xNONE; then
  2068. cf_path_syntax="$prefix"
  2069. else
  2070. cf_path_syntax="$ac_default_prefix"
  2071. fi
  2072. case ".$withval" in #(vi
  2073. .\$\(*\)*|.\'*\'*) #(vi
  2074. ;;
  2075. ..|./*|.\\*) #(vi
  2076. ;;
  2077. .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
  2078. ;;
  2079. .\${*prefix}*) #(vi
  2080. eval withval="$withval"
  2081. case ".$withval" in #(vi
  2082. .NONE/*)
  2083. withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
  2084. ;;
  2085. esac
  2086. ;; #(vi
  2087. .no|.NONE/*)
  2088. withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
  2089. ;;
  2090. *)
  2091. { echo "configure: error: expected a pathname, not \"$withval\"" 1>&2; exit 1; }
  2092. ;;
  2093. esac
  2094. cf_cv_curses_dir=$withval
  2095. else
  2096. cf_cv_curses_dir=no
  2097. fi
  2098. # Check whether --with-5lib or --without-5lib was given.
  2099. if test "${with_5lib+set}" = set; then
  2100. withval="$with_5lib"
  2101. LIBS="-L/usr/5lib $LIBS"
  2102. CPPFLAGS="$CPPFLAGS -I/usr/5include"
  2103. fi
  2104. # Check whether --with-ncursesw or --without-ncursesw was given.
  2105. if test "${with_ncursesw+set}" = set; then
  2106. withval="$with_ncursesw"
  2107. cf_cv_screen=ncursesw
  2108. else
  2109. # Check whether --with-ncurses or --without-ncurses was given.
  2110. if test "${with_ncurses+set}" = set; then
  2111. withval="$with_ncurses"
  2112. cf_cv_screen=ncurses
  2113. else
  2114. # Check whether --with-pdcurses or --without-pdcurses was given.
  2115. if test "${with_pdcurses+set}" = set; then
  2116. withval="$with_pdcurses"
  2117. cf_cv_screen=pdcurses
  2118. fi
  2119. fi
  2120. fi
  2121. case $cf_cv_screen in
  2122. curses)
  2123. echo $ac_n "checking for extra include directories""... $ac_c" 1>&6
  2124. echo "configure:2445: checking for extra include directories" >&5
  2125. if eval "test \"`echo '$''{'cf_cv_curses_incdir'+set}'`\" = set"; then
  2126. echo $ac_n "(cached) $ac_c" 1>&6
  2127. else
  2128. cf_cv_curses_incdir=no
  2129. case $host_os in #(vi
  2130. hpux10.*) #(vi
  2131. test -d /usr/include/curses_colr && \
  2132. cf_cv_curses_incdir="-I/usr/include/curses_colr"
  2133. ;;
  2134. sunos3*|sunos4*)
  2135. test -d /usr/5lib && \
  2136. test -d /usr/5include && \
  2137. cf_cv_curses_incdir="-I/usr/5include"
  2138. ;;
  2139. esac
  2140. fi
  2141. echo "$ac_t""$cf_cv_curses_incdir" 1>&6
  2142. test "$cf_cv_curses_incdir" != no && CPPFLAGS="$cf_cv_curses_incdir $CPPFLAGS"
  2143. echo $ac_n "checking if we have identified curses headers""... $ac_c" 1>&6
  2144. echo "configure:2470: checking if we have identified curses headers" >&5
  2145. if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" = set"; then
  2146. echo $ac_n "(cached) $ac_c" 1>&6
  2147. else
  2148. cf_cv_ncurses_header=none
  2149. for cf_header in \
  2150. curses.h \
  2151. ncurses.h \
  2152. ncurses/curses.h \
  2153. ncurses/ncurses.h
  2154. do
  2155. cat > conftest.$ac_ext <<EOF
  2156. #line 2483 "configure"
  2157. #include "confdefs.h"
  2158. #include <${cf_header}>
  2159. int main() {
  2160. initscr(); tgoto("?", 0,0)
  2161. ; return 0; }
  2162. EOF
  2163. if { (eval echo configure:2490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2164. rm -rf conftest*
  2165. cf_cv_ncurses_header=$cf_header; break
  2166. else
  2167. echo "configure: failed program was:" >&5
  2168. cat conftest.$ac_ext >&5
  2169. fi
  2170. rm -f conftest*
  2171. done
  2172. fi
  2173. echo "$ac_t""$cf_cv_ncurses_header" 1>&6
  2174. if test "$cf_cv_ncurses_header" = none ; then
  2175. { echo "configure: error: No curses header-files found" 1>&2; exit 1; }
  2176. fi
  2177. # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
  2178. for ac_hdr in $cf_cv_ncurses_header
  2179. do
  2180. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2181. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2182. echo "configure:2513: checking for $ac_hdr" >&5
  2183. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2184. echo $ac_n "(cached) $ac_c" 1>&6
  2185. else
  2186. cat > conftest.$ac_ext <<EOF
  2187. #line 2518 "configure"
  2188. #include "confdefs.h"
  2189. #include <$ac_hdr>
  2190. EOF
  2191. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2192. { (eval echo configure:2523: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2193. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2194. if test -z "$ac_err"; then
  2195. rm -rf conftest*
  2196. eval "ac_cv_header_$ac_safe=yes"
  2197. else
  2198. echo "$ac_err" >&5
  2199. echo "configure: failed program was:" >&5
  2200. cat conftest.$ac_ext >&5
  2201. rm -rf conftest*
  2202. eval "ac_cv_header_$ac_safe=no"
  2203. fi
  2204. rm -f conftest*
  2205. fi
  2206. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2207. echo "$ac_t""yes" 1>&6
  2208. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2209. cat >> confdefs.h <<EOF
  2210. #define $ac_tr_hdr 1
  2211. EOF
  2212. else
  2213. echo "$ac_t""no" 1>&6
  2214. fi
  2215. done
  2216. echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
  2217. echo "configure:2552: checking for terminfo header" >&5
  2218. if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
  2219. echo $ac_n "(cached) $ac_c" 1>&6
  2220. else
  2221. case ${cf_cv_ncurses_header} in #(vi
  2222. */ncurses.h|*/ncursesw.h) #(vi
  2223. cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
  2224. ;;
  2225. *)
  2226. cf_term_header=term.h
  2227. ;;
  2228. esac
  2229. for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
  2230. do
  2231. cat > conftest.$ac_ext <<EOF
  2232. #line 2569 "configure"
  2233. #include "confdefs.h"
  2234. #include <stdio.h>
  2235. #include <${cf_cv_ncurses_header-curses.h}>
  2236. #include <$cf_test>
  2237. int main() {
  2238. int x = auto_left_margin
  2239. ; return 0; }
  2240. EOF
  2241. if { (eval echo configure:2579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2242. rm -rf conftest*
  2243. cf_cv_term_header="$cf_test"
  2244. else
  2245. echo "configure: failed program was:" >&5
  2246. cat conftest.$ac_ext >&5
  2247. rm -rf conftest*
  2248. cf_cv_term_header=unknown
  2249. fi
  2250. rm -f conftest*
  2251. test "$cf_cv_term_header" != unknown && break
  2252. done
  2253. fi
  2254. echo "$ac_t""$cf_cv_term_header" 1>&6
  2255. # Set definitions to allow ifdef'ing to accommodate subdirectories
  2256. case $cf_cv_term_header in # (vi
  2257. *term.h)
  2258. cat >> confdefs.h <<\EOF
  2259. #define HAVE_TERM_H 1
  2260. EOF
  2261. ;;
  2262. esac
  2263. case $cf_cv_term_header in # (vi
  2264. ncurses/term.h) #(vi
  2265. cat >> confdefs.h <<\EOF
  2266. #define HAVE_NCURSES_TERM_H 1
  2267. EOF
  2268. ;;
  2269. ncursesw/term.h)
  2270. cat >> confdefs.h <<\EOF
  2271. #define HAVE_NCURSESW_TERM_H 1
  2272. EOF
  2273. ;;
  2274. esac
  2275. echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
  2276. echo "configure:2628: checking for ncurses version" >&5
  2277. if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
  2278. echo $ac_n "(cached) $ac_c" 1>&6
  2279. else
  2280. cf_cv_ncurses_version=no
  2281. cf_tempfile=out$$
  2282. rm -f $cf_tempfile
  2283. if test "$cross_compiling" = yes; then
  2284. # This will not work if the preprocessor splits the line after the
  2285. # Autoconf token. The 'unproto' program does that.
  2286. cat > conftest.$ac_ext <<EOF
  2287. #include <${cf_cv_ncurses_header-curses.h}>
  2288. #undef Autoconf
  2289. #ifdef NCURSES_VERSION
  2290. Autoconf NCURSES_VERSION
  2291. #else
  2292. #ifdef __NCURSES_H
  2293. Autoconf "old"
  2294. #endif
  2295. ;
  2296. #endif
  2297. EOF
  2298. cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
  2299. { (eval echo configure:2654: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
  2300. if test -f conftest.out ; then
  2301. cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
  2302. test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
  2303. rm -f conftest.out
  2304. fi
  2305. else
  2306. cat > conftest.$ac_ext <<EOF
  2307. #line 2663 "configure"
  2308. #include "confdefs.h"
  2309. #include <${cf_cv_ncurses_header-curses.h}>
  2310. #include <stdio.h>
  2311. int main()
  2312. {
  2313. FILE *fp = fopen("$cf_tempfile", "w");
  2314. #ifdef NCURSES_VERSION
  2315. # ifdef NCURSES_VERSION_PATCH
  2316. fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
  2317. # else
  2318. fprintf(fp, "%s\n", NCURSES_VERSION);
  2319. # endif
  2320. #else
  2321. # ifdef __NCURSES_H
  2322. fprintf(fp, "old\n");
  2323. # else
  2324. make an error
  2325. # endif
  2326. #endif
  2327. ${cf_cv_main_return-return}(0);
  2328. }
  2329. EOF
  2330. if { (eval echo configure:2687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2331. then
  2332. cf_cv_ncurses_version=`cat $cf_tempfile`
  2333. else
  2334. echo "configure: failed program was:" >&5
  2335. cat conftest.$ac_ext >&5
  2336. fi
  2337. rm -fr conftest*
  2338. fi
  2339. rm -f $cf_tempfile
  2340. fi
  2341. echo "$ac_t""$cf_cv_ncurses_version" 1>&6
  2342. test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
  2343. #define NCURSES 1
  2344. EOF
  2345. echo $ac_n "checking if we have identified curses libraries""... $ac_c" 1>&6
  2346. echo "configure:2711: checking if we have identified curses libraries" >&5
  2347. cat > conftest.$ac_ext <<EOF
  2348. #line 2713 "configure"
  2349. #include "confdefs.h"
  2350. #include <${cf_cv_ncurses_header-curses.h}>
  2351. int main() {
  2352. initscr(); tgoto("?", 0,0)
  2353. ; return 0; }
  2354. EOF
  2355. if { (eval echo configure:2720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2356. rm -rf conftest*
  2357. cf_result=yes
  2358. else
  2359. echo "configure: failed program was:" >&5
  2360. cat conftest.$ac_ext >&5
  2361. rm -rf conftest*
  2362. cf_result=no
  2363. fi
  2364. rm -f conftest*
  2365. echo "$ac_t""$cf_result" 1>&6
  2366. if test "$cf_result" = no ; then
  2367. case $host_os in #(vi
  2368. freebsd*) #(vi
  2369. echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
  2370. echo "configure:2736: checking for tgoto in -lmytinfo" >&5
  2371. ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
  2372. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2373. echo $ac_n "(cached) $ac_c" 1>&6
  2374. else
  2375. ac_save_LIBS="$LIBS"
  2376. LIBS="-lmytinfo $LIBS"
  2377. cat > conftest.$ac_ext <<EOF
  2378. #line 2744 "configure"
  2379. #include "confdefs.h"
  2380. /* Override any gcc2 internal prototype to avoid an error. */
  2381. /* We use char because int might match the return type of a gcc2
  2382. builtin and then its argument prototype would still apply. */
  2383. char tgoto();
  2384. int main() {
  2385. tgoto()
  2386. ; return 0; }
  2387. EOF
  2388. if { (eval echo configure:2755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2389. rm -rf conftest*
  2390. eval "ac_cv_lib_$ac_lib_var=yes"
  2391. else
  2392. echo "configure: failed program was:" >&5
  2393. cat conftest.$ac_ext >&5
  2394. rm -rf conftest*
  2395. eval "ac_cv_lib_$ac_lib_var=no"
  2396. fi
  2397. rm -f conftest*
  2398. LIBS="$ac_save_LIBS"
  2399. fi
  2400. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2401. echo "$ac_t""yes" 1>&6
  2402. LIBS="-lmytinfo $LIBS"
  2403. else
  2404. echo "$ac_t""no" 1>&6
  2405. fi
  2406. ;;
  2407. hpux10.*) #(vi
  2408. echo $ac_n "checking for initscr in -lcur_colr""... $ac_c" 1>&6
  2409. echo "configure:2778: checking for initscr in -lcur_colr" >&5
  2410. ac_lib_var=`echo cur_colr'_'initscr | sed 'y%./+-%__p_%'`
  2411. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2412. echo $ac_n "(cached) $ac_c" 1>&6
  2413. else
  2414. ac_save_LIBS="$LIBS"
  2415. LIBS="-lcur_colr $LIBS"
  2416. cat > conftest.$ac_ext <<EOF
  2417. #line 2786 "configure"
  2418. #include "confdefs.h"
  2419. /* Override any gcc2 internal prototype to avoid an error. */
  2420. /* We use char because int might match the return type of a gcc2
  2421. builtin and then its argument prototype would still apply. */
  2422. char initscr();
  2423. int main() {
  2424. initscr()
  2425. ; return 0; }
  2426. EOF
  2427. if { (eval echo configure:2797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2428. rm -rf conftest*
  2429. eval "ac_cv_lib_$ac_lib_var=yes"
  2430. else
  2431. echo "configure: failed program was:" >&5
  2432. cat conftest.$ac_ext >&5
  2433. rm -rf conftest*
  2434. eval "ac_cv_lib_$ac_lib_var=no"
  2435. fi
  2436. rm -f conftest*
  2437. LIBS="$ac_save_LIBS"
  2438. fi
  2439. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2440. echo "$ac_t""yes" 1>&6
  2441. LIBS="-lcur_colr $LIBS"
  2442. ac_cv_func_initscr=yes
  2443. else
  2444. echo "$ac_t""no" 1>&6
  2445. echo $ac_n "checking for initscr in -lHcurses""... $ac_c" 1>&6
  2446. echo "configure:2820: checking for initscr in -lHcurses" >&5
  2447. ac_lib_var=`echo Hcurses'_'initscr | sed 'y%./+-%__p_%'`
  2448. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2449. echo $ac_n "(cached) $ac_c" 1>&6
  2450. else
  2451. ac_save_LIBS="$LIBS"
  2452. LIBS="-lHcurses $LIBS"
  2453. cat > conftest.$ac_ext <<EOF
  2454. #line 2828 "configure"
  2455. #include "confdefs.h"
  2456. /* Override any gcc2 internal prototype to avoid an error. */
  2457. /* We use char because int might match the return type of a gcc2
  2458. builtin and then its argument prototype would still apply. */
  2459. char initscr();
  2460. int main() {
  2461. initscr()
  2462. ; return 0; }
  2463. EOF
  2464. if { (eval echo configure:2839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2465. rm -rf conftest*
  2466. eval "ac_cv_lib_$ac_lib_var=yes"
  2467. else
  2468. echo "configure: failed program was:" >&5
  2469. cat conftest.$ac_ext >&5
  2470. rm -rf conftest*
  2471. eval "ac_cv_lib_$ac_lib_var=no"
  2472. fi
  2473. rm -f conftest*
  2474. LIBS="$ac_save_LIBS"
  2475. fi
  2476. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2477. echo "$ac_t""yes" 1>&6
  2478. # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
  2479. LIBS="-lHcurses $LIBS"
  2480. CPPFLAGS="-D__HP_CURSES -D_HP_CURSES $CPPFLAGS"
  2481. ac_cv_func_initscr=yes
  2482. else
  2483. echo "$ac_t""no" 1>&6
  2484. fi
  2485. fi
  2486. ;;
  2487. linux*) # Suse Linux does not follow /usr/lib convention
  2488. if test -n "/lib" ; then
  2489. for cf_add_libdir in /lib
  2490. do
  2491. if test $cf_add_libdir = /usr/lib ; then
  2492. :
  2493. elif test -d $cf_add_libdir
  2494. then
  2495. cf_have_libdir=no
  2496. if test -n "$LDFLAGS$LIBS" ; then
  2497. # a loop is needed to ensure we can add subdirs of existing dirs
  2498. for cf_test_libdir in $LDFLAGS $LIBS ; do
  2499. if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
  2500. cf_have_libdir=yes; break
  2501. fi
  2502. done
  2503. fi
  2504. if test "$cf_have_libdir" = no ; then
  2505. test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
  2506. echo "${as_me-configure}:2888: testing adding $cf_add_libdir to library-path ..." 1>&5
  2507. LDFLAGS="-L$cf_add_libdir $LDFLAGS"
  2508. fi
  2509. fi
  2510. done
  2511. fi
  2512. ;;
  2513. sunos3*|sunos4*)
  2514. if test -d /usr/5lib ; then
  2515. if test -n "/usr/5lib" ; then
  2516. for cf_add_libdir in /usr/5lib
  2517. do
  2518. if test $cf_add_libdir = /usr/lib ; then
  2519. :
  2520. elif test -d $cf_add_libdir
  2521. then
  2522. cf_have_libdir=no
  2523. if test -n "$LDFLAGS$LIBS" ; then
  2524. # a loop is needed to ensure we can add subdirs of existing dirs
  2525. for cf_test_libdir in $LDFLAGS $LIBS ; do
  2526. if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
  2527. cf_have_libdir=yes; break
  2528. fi
  2529. done
  2530. fi
  2531. if test "$cf_have_libdir" = no ; then
  2532. test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
  2533. echo "${as_me-configure}:2920: testing adding $cf_add_libdir to library-path ..." 1>&5
  2534. LDFLAGS="-L$cf_add_libdir $LDFLAGS"
  2535. fi
  2536. fi
  2537. done
  2538. fi
  2539. LIBS="$LIBS -lcurses -ltermcap"
  2540. fi
  2541. ac_cv_func_initscr=yes
  2542. ;;
  2543. esac
  2544. if test ".$ac_cv_func_initscr" != .yes ; then
  2545. cf_save_LIBS="$LIBS"
  2546. cf_term_lib=""
  2547. cf_curs_lib=""
  2548. if test ".${cf_cv_ncurses_version-no}" != .no
  2549. then
  2550. cf_check_list="ncurses curses cursesX"
  2551. else
  2552. cf_check_list="cursesX curses ncurses"
  2553. fi
  2554. # Check for library containing tgoto. Do this before curses library
  2555. # because it may be needed to link the test-case for initscr.
  2556. echo $ac_n "checking for tgoto""... $ac_c" 1>&6
  2557. echo "configure:2950: checking for tgoto" >&5
  2558. if eval "test \"`echo '$''{'ac_cv_func_tgoto'+set}'`\" = set"; then
  2559. echo $ac_n "(cached) $ac_c" 1>&6
  2560. else
  2561. cat > conftest.$ac_ext <<EOF
  2562. #line 2955 "configure"
  2563. #include "confdefs.h"
  2564. /* System header to define __stub macros and hopefully few prototypes,
  2565. which can conflict with char tgoto(); below. */
  2566. #include <assert.h>
  2567. /* Override any gcc2 internal prototype to avoid an error. */
  2568. /* We use char because int might match the return type of a gcc2
  2569. builtin and then its argument prototype would still apply. */
  2570. char tgoto();
  2571. int main() {
  2572. /* The GNU C library defines this for functions which it implements
  2573. to always fail with ENOSYS. Some functions are actually named
  2574. something starting with __ and the normal name is an alias. */
  2575. #if defined (__stub_tgoto) || defined (__stub___tgoto)
  2576. choke me
  2577. #else
  2578. tgoto();
  2579. #endif
  2580. ; return 0; }
  2581. EOF
  2582. if { (eval echo configure:2978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2583. rm -rf conftest*
  2584. eval "ac_cv_func_tgoto=yes"
  2585. else
  2586. echo "configure: failed program was:" >&5
  2587. cat conftest.$ac_ext >&5
  2588. rm -rf conftest*
  2589. eval "ac_cv_func_tgoto=no"
  2590. fi
  2591. rm -f conftest*
  2592. fi
  2593. if eval "test \"`echo '$ac_cv_func_'tgoto`\" = yes"; then
  2594. echo "$ac_t""yes" 1>&6
  2595. cf_term_lib=predefined
  2596. else
  2597. echo "$ac_t""no" 1>&6
  2598. for cf_term_lib in $cf_check_list termcap termlib unknown
  2599. do
  2600. echo $ac_n "checking for tgoto in -l$cf_term_lib""... $ac_c" 1>&6
  2601. echo "configure:2999: checking for tgoto in -l$cf_term_lib" >&5
  2602. ac_lib_var=`echo $cf_term_lib'_'tgoto | sed 'y%./+-%__p_%'`
  2603. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2604. echo $ac_n "(cached) $ac_c" 1>&6
  2605. else
  2606. ac_save_LIBS="$LIBS"
  2607. LIBS="-l$cf_term_lib $LIBS"
  2608. cat > conftest.$ac_ext <<EOF
  2609. #line 3007 "configure"
  2610. #include "confdefs.h"
  2611. /* Override any gcc2 internal prototype to avoid an error. */
  2612. /* We use char because int might match the return type of a gcc2
  2613. builtin and then its argument prototype would still apply. */
  2614. char tgoto();
  2615. int main() {
  2616. tgoto()
  2617. ; return 0; }
  2618. EOF
  2619. if { (eval echo configure:3018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2620. rm -rf conftest*
  2621. eval "ac_cv_lib_$ac_lib_var=yes"
  2622. else
  2623. echo "configure: failed program was:" >&5
  2624. cat conftest.$ac_ext >&5
  2625. rm -rf conftest*
  2626. eval "ac_cv_lib_$ac_lib_var=no"
  2627. fi
  2628. rm -f conftest*
  2629. LIBS="$ac_save_LIBS"
  2630. fi
  2631. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2632. echo "$ac_t""yes" 1>&6
  2633. break
  2634. else
  2635. echo "$ac_t""no" 1>&6
  2636. fi
  2637. done
  2638. fi
  2639. # Check for library containing initscr
  2640. test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
  2641. for cf_curs_lib in $cf_check_list xcurses jcurses unknown
  2642. do
  2643. echo $ac_n "checking for initscr in -l$cf_curs_lib""... $ac_c" 1>&6
  2644. echo "configure:3048: checking for initscr in -l$cf_curs_lib" >&5
  2645. ac_lib_var=`echo $cf_curs_lib'_'initscr | sed 'y%./+-%__p_%'`
  2646. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2647. echo $ac_n "(cached) $ac_c" 1>&6
  2648. else
  2649. ac_save_LIBS="$LIBS"
  2650. LIBS="-l$cf_curs_lib $LIBS"
  2651. cat > conftest.$ac_ext <<EOF
  2652. #line 3056 "configure"
  2653. #include "confdefs.h"
  2654. /* Override any gcc2 internal prototype to avoid an error. */
  2655. /* We use char because int might match the return type of a gcc2
  2656. builtin and then its argument prototype would still apply. */
  2657. char initscr();
  2658. int main() {
  2659. initscr()
  2660. ; return 0; }
  2661. EOF
  2662. if { (eval echo configure:3067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2663. rm -rf conftest*
  2664. eval "ac_cv_lib_$ac_lib_var=yes"
  2665. else
  2666. echo "configure: failed program was:" >&5
  2667. cat conftest.$ac_ext >&5
  2668. rm -rf conftest*
  2669. eval "ac_cv_lib_$ac_lib_var=no"
  2670. fi
  2671. rm -f conftest*
  2672. LIBS="$ac_save_LIBS"
  2673. fi
  2674. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2675. echo "$ac_t""yes" 1>&6
  2676. break
  2677. else
  2678. echo "$ac_t""no" 1>&6
  2679. fi
  2680. done
  2681. test $cf_curs_lib = unknown && { echo "configure: error: no curses library found" 1>&2; exit 1; }
  2682. LIBS="-l$cf_curs_lib $cf_save_LIBS"
  2683. if test "$cf_term_lib" = unknown ; then
  2684. echo $ac_n "checking if we can link with $cf_curs_lib library""... $ac_c" 1>&6
  2685. echo "configure:3093: checking if we can link with $cf_curs_lib library" >&5
  2686. cat > conftest.$ac_ext <<EOF
  2687. #line 3095 "configure"
  2688. #include "confdefs.h"
  2689. #include <${cf_cv_ncurses_header-curses.h}>
  2690. int main() {
  2691. initscr()
  2692. ; return 0; }
  2693. EOF
  2694. if { (eval echo configure:3102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2695. rm -rf conftest*
  2696. cf_result=yes
  2697. else
  2698. echo "configure: failed program was:" >&5
  2699. cat conftest.$ac_ext >&5
  2700. rm -rf conftest*
  2701. cf_result=no
  2702. fi
  2703. rm -f conftest*
  2704. echo "$ac_t""$cf_result" 1>&6
  2705. test $cf_result = no && { echo "configure: error: Cannot link curses library" 1>&2; exit 1; }
  2706. elif test "$cf_curs_lib" = "$cf_term_lib" ; then
  2707. :
  2708. elif test "$cf_term_lib" != predefined ; then
  2709. echo $ac_n "checking if we need both $cf_curs_lib and $cf_term_lib libraries""... $ac_c" 1>&6
  2710. echo "configure:3118: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
  2711. cat > conftest.$ac_ext <<EOF
  2712. #line 3120 "configure"
  2713. #include "confdefs.h"
  2714. #include <${cf_cv_ncurses_header-curses.h}>
  2715. int main() {
  2716. initscr(); tgoto((char *)0, 0, 0);
  2717. ; return 0; }
  2718. EOF
  2719. if { (eval echo configure:3127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2720. rm -rf conftest*
  2721. cf_result=no
  2722. else
  2723. echo "configure: failed program was:" >&5
  2724. cat conftest.$ac_ext >&5
  2725. rm -rf conftest*
  2726. LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
  2727. cat > conftest.$ac_ext <<EOF
  2728. #line 3137 "configure"
  2729. #include "confdefs.h"
  2730. #include <${cf_cv_ncurses_header-curses.h}>
  2731. int main() {
  2732. initscr()
  2733. ; return 0; }
  2734. EOF
  2735. if { (eval echo configure:3144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2736. rm -rf conftest*
  2737. cf_result=yes
  2738. else
  2739. echo "configure: failed program was:" >&5
  2740. cat conftest.$ac_ext >&5
  2741. rm -rf conftest*
  2742. cf_result=error
  2743. fi
  2744. rm -f conftest*
  2745. fi
  2746. rm -f conftest*
  2747. echo "$ac_t""$cf_result" 1>&6
  2748. fi
  2749. fi
  2750. fi
  2751. ;;
  2752. ncurses)
  2753. cf_ncuhdr_root=ncurses
  2754. test -n "$cf_cv_curses_dir" && \
  2755. test "$cf_cv_curses_dir" != "no" && { \
  2756. if test -n "$cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
  2757. for cf_add_incdir in $cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root
  2758. do
  2759. while test $cf_add_incdir != /usr/include
  2760. do
  2761. if test -d $cf_add_incdir
  2762. then
  2763. cf_have_incdir=no
  2764. if test -n "$CFLAGS$CPPFLAGS" ; then
  2765. # a loop is needed to ensure we can add subdirs of existing dirs
  2766. for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
  2767. if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
  2768. cf_have_incdir=yes; break
  2769. fi
  2770. done
  2771. fi
  2772. if test "$cf_have_incdir" = no ; then
  2773. if test "$cf_add_incdir" = /usr/local/include ; then
  2774. if test "$GCC" = yes
  2775. then
  2776. cf_save_CPPFLAGS=$CPPFLAGS
  2777. CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
  2778. cat > conftest.$ac_ext <<EOF
  2779. #line 3196 "configure"
  2780. #include "confdefs.h"
  2781. #include <stdio.h>
  2782. int main() {
  2783. printf("Hello")
  2784. ; return 0; }
  2785. EOF
  2786. if { (eval echo configure:3203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2787. :
  2788. else
  2789. echo "configure: failed program was:" >&5
  2790. cat conftest.$ac_ext >&5
  2791. rm -rf conftest*
  2792. cf_have_incdir=yes
  2793. fi
  2794. rm -f conftest*
  2795. CPPFLAGS=$cf_save_CPPFLAGS
  2796. fi
  2797. fi
  2798. fi
  2799. if test "$cf_have_incdir" = no ; then
  2800. test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
  2801. echo "${as_me-configure}:3220: testing adding $cf_add_incdir to include-path ..." 1>&5
  2802. CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
  2803. cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
  2804. test "$cf_top_incdir" = "$cf_add_incdir" && break
  2805. cf_add_incdir="$cf_top_incdir"
  2806. else
  2807. break
  2808. fi
  2809. fi
  2810. done
  2811. done
  2812. fi
  2813. }
  2814. echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
  2815. echo "configure:3239: checking for $cf_ncuhdr_root header in include-path" >&5
  2816. if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
  2817. echo $ac_n "(cached) $ac_c" 1>&6
  2818. else
  2819. cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
  2820. ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
  2821. for cf_header in $cf_header_list
  2822. do
  2823. cat > conftest.$ac_ext <<EOF
  2824. #line 3250 "configure"
  2825. #include "confdefs.h"
  2826. #include <$cf_header>
  2827. int main() {
  2828. #ifdef NCURSES_VERSION
  2829. printf("%s\n", NCURSES_VERSION);
  2830. #else
  2831. #ifdef __NCURSES_H
  2832. printf("old\n");
  2833. #else
  2834. make an error
  2835. #endif
  2836. #endif
  2837. ; return 0; }
  2838. EOF
  2839. if { (eval echo configure:3271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2840. rm -rf conftest*
  2841. cf_cv_ncurses_h=$cf_header
  2842. else
  2843. echo "configure: failed program was:" >&5
  2844. cat conftest.$ac_ext >&5
  2845. rm -rf conftest*
  2846. cf_cv_ncurses_h=no
  2847. fi
  2848. rm -f conftest*
  2849. test "$cf_cv_ncurses_h" != no && break
  2850. done
  2851. fi
  2852. echo "$ac_t""$cf_cv_ncurses_h" 1>&6
  2853. if test "$cf_cv_ncurses_h" != no ; then
  2854. cf_cv_ncurses_header=$cf_cv_ncurses_h
  2855. else
  2856. echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
  2857. echo "configure:3297: checking for $cf_ncuhdr_root include-path" >&5
  2858. if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
  2859. echo $ac_n "(cached) $ac_c" 1>&6
  2860. else
  2861. test -n "$verbose" && echo
  2862. cf_search=""
  2863. test "/usr" != "$prefix" && \
  2864. test -d "/usr" && \
  2865. (test $prefix = NONE || test -d $prefix) && {
  2866. test -n "$verbose" && echo " ... testing for include-directories under /usr"
  2867. test -d /usr/include && cf_search="$cf_search /usr/include"
  2868. test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
  2869. test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
  2870. test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
  2871. test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
  2872. }
  2873. test "$prefix" != "NONE" && \
  2874. test -d "$prefix" && \
  2875. {
  2876. test -n "$verbose" && echo " ... testing for include-directories under $prefix"
  2877. test -d $prefix/include && cf_search="$cf_search $prefix/include"
  2878. test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
  2879. test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
  2880. test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
  2881. test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
  2882. }
  2883. test "/usr/local" != "$prefix" && \
  2884. test -d "/usr/local" && \
  2885. (test $prefix = NONE || test -d $prefix) && {
  2886. test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
  2887. test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
  2888. test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
  2889. test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
  2890. test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
  2891. test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
  2892. }
  2893. test "/opt" != "$prefix" && \
  2894. test -d "/opt" && \
  2895. (test $prefix = NONE || test -d $prefix) && {
  2896. test -n "$verbose" && echo " ... testing for include-directories under /opt"
  2897. test -d /opt/include && cf_search="$cf_search /opt/include"
  2898. test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
  2899. test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
  2900. test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
  2901. test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
  2902. }
  2903. test "$HOME" != "$prefix" && \
  2904. test -d "$HOME" && \
  2905. (test $prefix = NONE || test -d $prefix) && {
  2906. test -n "$verbose" && echo " ... testing for include-directories under $HOME"
  2907. test -d $HOME/include && cf_search="$cf_search $HOME/include"
  2908. test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
  2909. test -d $HOME/include/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
  2910. test -d $HOME/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
  2911. test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
  2912. }
  2913. test "$includedir" != NONE && \
  2914. test "$includedir" != "/usr/include" && \
  2915. test -d "$includedir" && {
  2916. test -d $includedir && cf_search="$cf_search $includedir"
  2917. test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
  2918. }
  2919. test "$oldincludedir" != NONE && \
  2920. test "$oldincludedir" != "/usr/include" && \
  2921. test -d "$oldincludedir" && {
  2922. test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
  2923. test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
  2924. }
  2925. test -n "$verbose" && echo search path $cf_search
  2926. cf_save2_CPPFLAGS="$CPPFLAGS"
  2927. for cf_incdir in $cf_search
  2928. do
  2929. if test -n "$cf_incdir" ; then
  2930. for cf_add_incdir in $cf_incdir
  2931. do
  2932. while test $cf_add_incdir != /usr/include
  2933. do
  2934. if test -d $cf_add_incdir
  2935. then
  2936. cf_have_incdir=no
  2937. if test -n "$CFLAGS$CPPFLAGS" ; then
  2938. # a loop is needed to ensure we can add subdirs of existing dirs
  2939. for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
  2940. if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
  2941. cf_have_incdir=yes; break
  2942. fi
  2943. done
  2944. fi
  2945. if test "$cf_have_incdir" = no ; then
  2946. if test "$cf_add_incdir" = /usr/local/include ; then
  2947. if test "$GCC" = yes
  2948. then
  2949. cf_save_CPPFLAGS=$CPPFLAGS
  2950. CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
  2951. cat > conftest.$ac_ext <<EOF
  2952. #line 3410 "configure"
  2953. #include "confdefs.h"
  2954. #include <stdio.h>
  2955. int main() {
  2956. printf("Hello")
  2957. ; return 0; }
  2958. EOF
  2959. if { (eval echo configure:3417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2960. :
  2961. else
  2962. echo "configure: failed program was:" >&5
  2963. cat conftest.$ac_ext >&5
  2964. rm -rf conftest*
  2965. cf_have_incdir=yes
  2966. fi
  2967. rm -f conftest*
  2968. CPPFLAGS=$cf_save_CPPFLAGS
  2969. fi
  2970. fi
  2971. fi
  2972. if test "$cf_have_incdir" = no ; then
  2973. test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
  2974. echo "${as_me-configure}:3434: testing adding $cf_add_incdir to include-path ..." 1>&5
  2975. CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
  2976. cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
  2977. test "$cf_top_incdir" = "$cf_add_incdir" && break
  2978. cf_add_incdir="$cf_top_incdir"
  2979. else
  2980. break
  2981. fi
  2982. fi
  2983. done
  2984. done
  2985. fi
  2986. for cf_header in \
  2987. ncurses.h \
  2988. curses.h
  2989. do
  2990. cat > conftest.$ac_ext <<EOF
  2991. #line 3456 "configure"
  2992. #include "confdefs.h"
  2993. #include <$cf_header>
  2994. int main() {
  2995. #ifdef NCURSES_VERSION
  2996. printf("%s\n", NCURSES_VERSION);
  2997. #else
  2998. #ifdef __NCURSES_H
  2999. printf("old\n");
  3000. #else
  3001. make an error
  3002. #endif
  3003. #endif
  3004. ; return 0; }
  3005. EOF
  3006. if { (eval echo configure:3477: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3007. rm -rf conftest*
  3008. cf_cv_ncurses_h2=$cf_header
  3009. else
  3010. echo "configure: failed program was:" >&5
  3011. cat conftest.$ac_ext >&5
  3012. rm -rf conftest*
  3013. cf_cv_ncurses_h2=no
  3014. fi
  3015. rm -f conftest*
  3016. if test "$cf_cv_ncurses_h2" != no ; then
  3017. cf_cv_ncurses_h2=$cf_incdir/$cf_header
  3018. test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
  3019. break
  3020. fi
  3021. test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
  3022. done
  3023. CPPFLAGS="$cf_save2_CPPFLAGS"
  3024. test "$cf_cv_ncurses_h2" != no && break
  3025. done
  3026. test "$cf_cv_ncurses_h2" = no && { echo "configure: error: not found" 1>&2; exit 1; }
  3027. fi
  3028. echo "$ac_t""$cf_cv_ncurses_h2" 1>&6
  3029. cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
  3030. cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
  3031. if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
  3032. cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
  3033. fi
  3034. if test -n "$cf_1st_incdir" ; then
  3035. for cf_add_incdir in $cf_1st_incdir
  3036. do
  3037. while test $cf_add_incdir != /usr/include
  3038. do
  3039. if test -d $cf_add_incdir
  3040. then
  3041. cf_have_incdir=no
  3042. if test -n "$CFLAGS$CPPFLAGS" ; then
  3043. # a loop is needed to ensure we can add subdirs of existing dirs
  3044. for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
  3045. if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
  3046. cf_have_incdir=yes; break
  3047. fi
  3048. done
  3049. fi
  3050. if test "$cf_have_incdir" = no ; then
  3051. if test "$cf_add_incdir" = /usr/local/include ; then
  3052. if test "$GCC" = yes
  3053. then
  3054. cf_save_CPPFLAGS=$CPPFLAGS
  3055. CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
  3056. cat > conftest.$ac_ext <<EOF
  3057. #line 3535 "configure"
  3058. #include "confdefs.h"
  3059. #include <stdio.h>
  3060. int main() {
  3061. printf("Hello")
  3062. ; return 0; }
  3063. EOF
  3064. if { (eval echo configure:3542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3065. :
  3066. else
  3067. echo "configure: failed program was:" >&5
  3068. cat conftest.$ac_ext >&5
  3069. rm -rf conftest*
  3070. cf_have_incdir=yes
  3071. fi
  3072. rm -f conftest*
  3073. CPPFLAGS=$cf_save_CPPFLAGS
  3074. fi
  3075. fi
  3076. fi
  3077. if test "$cf_have_incdir" = no ; then
  3078. test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
  3079. echo "${as_me-configure}:3559: testing adding $cf_add_incdir to include-path ..." 1>&5
  3080. CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
  3081. cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
  3082. test "$cf_top_incdir" = "$cf_add_incdir" && break
  3083. cf_add_incdir="$cf_top_incdir"
  3084. else
  3085. break
  3086. fi
  3087. fi
  3088. done
  3089. done
  3090. fi
  3091. fi
  3092. # Set definitions to allow ifdef'ing for ncurses.h
  3093. case $cf_cv_ncurses_header in # (vi
  3094. *ncurses.h)
  3095. cat >> confdefs.h <<\EOF
  3096. #define HAVE_NCURSES_H 1
  3097. EOF
  3098. ;;
  3099. esac
  3100. case $cf_cv_ncurses_header in # (vi
  3101. ncurses/curses.h|ncurses/ncurses.h)
  3102. cat >> confdefs.h <<\EOF
  3103. #define HAVE_NCURSES_NCURSES_H 1
  3104. EOF
  3105. ;;
  3106. ncursesw/curses.h|ncursesw/ncurses.h)
  3107. cat >> confdefs.h <<\EOF
  3108. #define HAVE_NCURSESW_NCURSES_H 1
  3109. EOF
  3110. ;;
  3111. esac
  3112. echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
  3113. echo "configure:3607: checking for terminfo header" >&5
  3114. if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
  3115. echo $ac_n "(cached) $ac_c" 1>&6
  3116. else
  3117. case ${cf_cv_ncurses_header} in #(vi
  3118. */ncurses.h|*/ncursesw.h) #(vi
  3119. cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
  3120. ;;
  3121. *)
  3122. cf_term_header=term.h
  3123. ;;
  3124. esac
  3125. for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
  3126. do
  3127. cat > conftest.$ac_ext <<EOF
  3128. #line 3624 "configure"
  3129. #include "confdefs.h"
  3130. #include <stdio.h>
  3131. #include <${cf_cv_ncurses_header-curses.h}>
  3132. #include <$cf_test>
  3133. int main() {
  3134. int x = auto_left_margin
  3135. ; return 0; }
  3136. EOF
  3137. if { (eval echo configure:3634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3138. rm -rf conftest*
  3139. cf_cv_term_header="$cf_test"
  3140. else
  3141. echo "configure: failed program was:" >&5
  3142. cat conftest.$ac_ext >&5
  3143. rm -rf conftest*
  3144. cf_cv_term_header=unknown
  3145. fi
  3146. rm -f conftest*
  3147. test "$cf_cv_term_header" != unknown && break
  3148. done
  3149. fi
  3150. echo "$ac_t""$cf_cv_term_header" 1>&6
  3151. # Set definitions to allow ifdef'ing to accommodate subdirectories
  3152. case $cf_cv_term_header in # (vi
  3153. *term.h)
  3154. cat >> confdefs.h <<\EOF
  3155. #define HAVE_TERM_H 1
  3156. EOF
  3157. ;;
  3158. esac
  3159. case $cf_cv_term_header in # (vi
  3160. ncurses/term.h) #(vi
  3161. cat >> confdefs.h <<\EOF
  3162. #define HAVE_NCURSES_TERM_H 1
  3163. EOF
  3164. ;;
  3165. ncursesw/term.h)
  3166. cat >> confdefs.h <<\EOF
  3167. #define HAVE_NCURSESW_TERM_H 1
  3168. EOF
  3169. ;;
  3170. esac
  3171. # some applications need this, but should check for NCURSES_VERSION
  3172. cat >> confdefs.h <<\EOF
  3173. #define NCURSES 1
  3174. EOF
  3175. echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
  3176. echo "configure:3689: checking for ncurses version" >&5
  3177. if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
  3178. echo $ac_n "(cached) $ac_c" 1>&6
  3179. else
  3180. cf_cv_ncurses_version=no
  3181. cf_tempfile=out$$
  3182. rm -f $cf_tempfile
  3183. if test "$cross_compiling" = yes; then
  3184. # This will not work if the preprocessor splits the line after the
  3185. # Autoconf token. The 'unproto' program does that.
  3186. cat > conftest.$ac_ext <<EOF
  3187. #include <${cf_cv_ncurses_header-curses.h}>
  3188. #undef Autoconf
  3189. #ifdef NCURSES_VERSION
  3190. Autoconf NCURSES_VERSION
  3191. #else
  3192. #ifdef __NCURSES_H
  3193. Autoconf "old"
  3194. #endif
  3195. ;
  3196. #endif
  3197. EOF
  3198. cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
  3199. { (eval echo configure:3715: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
  3200. if test -f conftest.out ; then
  3201. cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
  3202. test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
  3203. rm -f conftest.out
  3204. fi
  3205. else
  3206. cat > conftest.$ac_ext <<EOF
  3207. #line 3724 "configure"
  3208. #include "confdefs.h"
  3209. #include <${cf_cv_ncurses_header-curses.h}>
  3210. #include <stdio.h>
  3211. int main()
  3212. {
  3213. FILE *fp = fopen("$cf_tempfile", "w");
  3214. #ifdef NCURSES_VERSION
  3215. # ifdef NCURSES_VERSION_PATCH
  3216. fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
  3217. # else
  3218. fprintf(fp, "%s\n", NCURSES_VERSION);
  3219. # endif
  3220. #else
  3221. # ifdef __NCURSES_H
  3222. fprintf(fp, "old\n");
  3223. # else
  3224. make an error
  3225. # endif
  3226. #endif
  3227. ${cf_cv_main_return-return}(0);
  3228. }
  3229. EOF
  3230. if { (eval echo configure:3748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  3231. then
  3232. cf_cv_ncurses_version=`cat $cf_tempfile`
  3233. else
  3234. echo "configure: failed program was:" >&5
  3235. cat conftest.$ac_ext >&5
  3236. fi
  3237. rm -fr conftest*
  3238. fi
  3239. rm -f $cf_tempfile
  3240. fi
  3241. echo "$ac_t""$cf_cv_ncurses_version" 1>&6
  3242. test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
  3243. #define NCURSES 1
  3244. EOF
  3245. cf_nculib_root=ncurses
  3246. # This works, except for the special case where we find gpm, but
  3247. # ncurses is in a nonstandard location via $LIBS, and we really want
  3248. # to link gpm.
  3249. cf_ncurses_LIBS=""
  3250. cf_ncurses_SAVE="$LIBS"
  3251. echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
  3252. echo "configure:3779: checking for Gpm_Open in -lgpm" >&5
  3253. ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
  3254. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3255. echo $ac_n "(cached) $ac_c" 1>&6
  3256. else
  3257. ac_save_LIBS="$LIBS"
  3258. LIBS="-lgpm $LIBS"
  3259. cat > conftest.$ac_ext <<EOF
  3260. #line 3787 "configure"
  3261. #include "confdefs.h"
  3262. /* Override any gcc2 internal prototype to avoid an error. */
  3263. /* We use char because int might match the return type of a gcc2
  3264. builtin and then its argument prototype would still apply. */
  3265. char Gpm_Open();
  3266. int main() {
  3267. Gpm_Open()
  3268. ; return 0; }
  3269. EOF
  3270. if { (eval echo configure:3798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3271. rm -rf conftest*
  3272. eval "ac_cv_lib_$ac_lib_var=yes"
  3273. else
  3274. echo "configure: failed program was:" >&5
  3275. cat conftest.$ac_ext >&5
  3276. rm -rf conftest*
  3277. eval "ac_cv_lib_$ac_lib_var=no"
  3278. fi
  3279. rm -f conftest*
  3280. LIBS="$ac_save_LIBS"
  3281. fi
  3282. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3283. echo "$ac_t""yes" 1>&6
  3284. echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
  3285. echo "configure:3814: checking for initscr in -lgpm" >&5
  3286. ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
  3287. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3288. echo $ac_n "(cached) $ac_c" 1>&6
  3289. else
  3290. ac_save_LIBS="$LIBS"
  3291. LIBS="-lgpm $LIBS"
  3292. cat > conftest.$ac_ext <<EOF
  3293. #line 3822 "configure"
  3294. #include "confdefs.h"
  3295. /* Override any gcc2 internal prototype to avoid an error. */
  3296. /* We use char because int might match the return type of a gcc2
  3297. builtin and then its argument prototype would still apply. */
  3298. char initscr();
  3299. int main() {
  3300. initscr()
  3301. ; return 0; }
  3302. EOF
  3303. if { (eval echo configure:3833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3304. rm -rf conftest*
  3305. eval "ac_cv_lib_$ac_lib_var=yes"
  3306. else
  3307. echo "configure: failed program was:" >&5
  3308. cat conftest.$ac_ext >&5
  3309. rm -rf conftest*
  3310. eval "ac_cv_lib_$ac_lib_var=no"
  3311. fi
  3312. rm -f conftest*
  3313. LIBS="$ac_save_LIBS"
  3314. fi
  3315. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3316. echo "$ac_t""yes" 1>&6
  3317. LIBS="$cf_ncurses_SAVE"
  3318. else
  3319. echo "$ac_t""no" 1>&6
  3320. cf_ncurses_LIBS="-lgpm"
  3321. fi
  3322. else
  3323. echo "$ac_t""no" 1>&6
  3324. fi
  3325. case $host_os in #(vi
  3326. freebsd*)
  3327. # This is only necessary if you are linking against an obsolete
  3328. # version of ncurses (but it should do no harm, since it's static).
  3329. if test "$cf_nculib_root" = ncurses ; then
  3330. echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
  3331. echo "configure:3865: checking for tgoto in -lmytinfo" >&5
  3332. ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
  3333. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3334. echo $ac_n "(cached) $ac_c" 1>&6
  3335. else
  3336. ac_save_LIBS="$LIBS"
  3337. LIBS="-lmytinfo $LIBS"
  3338. cat > conftest.$ac_ext <<EOF
  3339. #line 3873 "configure"
  3340. #include "confdefs.h"
  3341. /* Override any gcc2 internal prototype to avoid an error. */
  3342. /* We use char because int might match the return type of a gcc2
  3343. builtin and then its argument prototype would still apply. */
  3344. char tgoto();
  3345. int main() {
  3346. tgoto()
  3347. ; return 0; }
  3348. EOF
  3349. if { (eval echo configure:3884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3350. rm -rf conftest*
  3351. eval "ac_cv_lib_$ac_lib_var=yes"
  3352. else
  3353. echo "configure: failed program was:" >&5
  3354. cat conftest.$ac_ext >&5
  3355. rm -rf conftest*
  3356. eval "ac_cv_lib_$ac_lib_var=no"
  3357. fi
  3358. rm -f conftest*
  3359. LIBS="$ac_save_LIBS"
  3360. fi
  3361. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3362. echo "$ac_t""yes" 1>&6
  3363. cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
  3364. else
  3365. echo "$ac_t""no" 1>&6
  3366. fi
  3367. fi
  3368. ;;
  3369. esac
  3370. LIBS="$cf_ncurses_LIBS $LIBS"
  3371. if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
  3372. then
  3373. if test -n "$cf_cv_curses_dir/lib" ; then
  3374. for cf_add_libdir in $cf_cv_curses_dir/lib
  3375. do
  3376. if test $cf_add_libdir = /usr/lib ; then
  3377. :
  3378. elif test -d $cf_add_libdir
  3379. then
  3380. cf_have_libdir=no
  3381. if test -n "$LDFLAGS$LIBS" ; then
  3382. # a loop is needed to ensure we can add subdirs of existing dirs
  3383. for cf_test_libdir in $LDFLAGS $LIBS ; do
  3384. if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
  3385. cf_have_libdir=yes; break
  3386. fi
  3387. done
  3388. fi
  3389. if test "$cf_have_libdir" = no ; then
  3390. test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
  3391. echo "${as_me-configure}:3932: testing adding $cf_add_libdir to library-path ..." 1>&5
  3392. LDFLAGS="-L$cf_add_libdir $LDFLAGS"
  3393. fi
  3394. fi
  3395. done
  3396. fi
  3397. LIBS="-l$cf_nculib_root $LIBS"
  3398. else
  3399. eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
  3400. cf_libdir=""
  3401. echo $ac_n "checking for initscr""... $ac_c" 1>&6
  3402. echo "configure:3947: checking for initscr" >&5
  3403. if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
  3404. echo $ac_n "(cached) $ac_c" 1>&6
  3405. else
  3406. cat > conftest.$ac_ext <<EOF
  3407. #line 3952 "configure"
  3408. #include "confdefs.h"
  3409. /* System header to define __stub macros and hopefully few prototypes,
  3410. which can conflict with char initscr(); below. */
  3411. #include <assert.h>
  3412. /* Override any gcc2 internal prototype to avoid an error. */
  3413. /* We use char because int might match the return type of a gcc2
  3414. builtin and then its argument prototype would still apply. */
  3415. char initscr();
  3416. int main() {
  3417. /* The GNU C library defines this for functions which it implements
  3418. to always fail with ENOSYS. Some functions are actually named
  3419. something starting with __ and the normal name is an alias. */
  3420. #if defined (__stub_initscr) || defined (__stub___initscr)
  3421. choke me
  3422. #else
  3423. initscr();
  3424. #endif
  3425. ; return 0; }
  3426. EOF
  3427. if { (eval echo configure:3975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3428. rm -rf conftest*
  3429. eval "ac_cv_func_initscr=yes"
  3430. else
  3431. echo "configure: failed program was:" >&5
  3432. cat conftest.$ac_ext >&5
  3433. rm -rf conftest*
  3434. eval "ac_cv_func_initscr=no"
  3435. fi
  3436. rm -f conftest*
  3437. fi
  3438. if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
  3439. echo "$ac_t""yes" 1>&6
  3440. eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
  3441. else
  3442. echo "$ac_t""no" 1>&6
  3443. cf_save_LIBS="$LIBS"
  3444. echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
  3445. echo "configure:3995: checking for initscr in -l$cf_nculib_root" >&5
  3446. LIBS="-l$cf_nculib_root $LIBS"
  3447. cat > conftest.$ac_ext <<EOF
  3448. #line 3998 "configure"
  3449. #include "confdefs.h"
  3450. #include <${cf_cv_ncurses_header-curses.h}>
  3451. int main() {
  3452. initscr()
  3453. ; return 0; }
  3454. EOF
  3455. if { (eval echo configure:4005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3456. rm -rf conftest*
  3457. echo "$ac_t""yes" 1>&6
  3458. eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
  3459. else
  3460. echo "configure: failed program was:" >&5
  3461. cat conftest.$ac_ext >&5
  3462. rm -rf conftest*
  3463. echo "$ac_t""no" 1>&6
  3464. cf_search=""
  3465. test "/usr" != "$prefix" && \
  3466. test -d "/usr" && \
  3467. (test $prefix = NONE || test -d $prefix) && {
  3468. test -n "$verbose" && echo " ... testing for lib-directories under /usr"
  3469. test -d /usr/lib && cf_search="$cf_search /usr/lib"
  3470. test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
  3471. test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
  3472. test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
  3473. test -d /usr/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
  3474. }
  3475. test "$prefix" != "NONE" && \
  3476. test -d "$prefix" && \
  3477. {
  3478. test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
  3479. test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
  3480. test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
  3481. test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
  3482. test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
  3483. test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
  3484. }
  3485. test "/usr/local" != "$prefix" && \
  3486. test -d "/usr/local" && \
  3487. (test $prefix = NONE || test -d $prefix) && {
  3488. test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
  3489. test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
  3490. test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
  3491. test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
  3492. test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
  3493. test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
  3494. }
  3495. test "/opt" != "$prefix" && \
  3496. test -d "/opt" && \
  3497. (test $prefix = NONE || test -d $prefix) && {
  3498. test -n "$verbose" && echo " ... testing for lib-directories under /opt"
  3499. test -d /opt/lib && cf_search="$cf_search /opt/lib"
  3500. test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
  3501. test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
  3502. test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
  3503. test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
  3504. }
  3505. test "$HOME" != "$prefix" && \
  3506. test -d "$HOME" && \
  3507. (test $prefix = NONE || test -d $prefix) && {
  3508. test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
  3509. test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
  3510. test -d $HOME/lib/$cf_nculib_root && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
  3511. test -d $HOME/lib/$cf_nculib_root/lib && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
  3512. test -d $HOME/$cf_nculib_root/lib && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
  3513. test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
  3514. }
  3515. for cf_libdir in $cf_search
  3516. do
  3517. echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
  3518. echo "configure:4081: checking for -l$cf_nculib_root in $cf_libdir" >&5
  3519. LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
  3520. cat > conftest.$ac_ext <<EOF
  3521. #line 4084 "configure"
  3522. #include "confdefs.h"
  3523. #include <${cf_cv_ncurses_header-curses.h}>
  3524. int main() {
  3525. initscr()
  3526. ; return 0; }
  3527. EOF
  3528. if { (eval echo configure:4091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3529. rm -rf conftest*
  3530. echo "$ac_t""yes" 1>&6
  3531. eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
  3532. break
  3533. else
  3534. echo "configure: failed program was:" >&5
  3535. cat conftest.$ac_ext >&5
  3536. rm -rf conftest*
  3537. echo "$ac_t""no" 1>&6
  3538. LIBS="$cf_save_LIBS"
  3539. fi
  3540. rm -f conftest*
  3541. done
  3542. fi
  3543. rm -f conftest*
  3544. fi
  3545. eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
  3546. if test $cf_found_library = no ; then
  3547. { echo "configure: error: Cannot link $cf_nculib_root library" 1>&2; exit 1; }
  3548. fi
  3549. fi
  3550. if test -n "$cf_ncurses_LIBS" ; then
  3551. echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
  3552. echo "configure:4122: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
  3553. cf_ncurses_SAVE="$LIBS"
  3554. for p in $cf_ncurses_LIBS ; do
  3555. q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
  3556. if test "$q" != "$LIBS" ; then
  3557. LIBS="$q"
  3558. fi
  3559. done
  3560. cat > conftest.$ac_ext <<EOF
  3561. #line 4131 "configure"
  3562. #include "confdefs.h"
  3563. #include <${cf_cv_ncurses_header-curses.h}>
  3564. int main() {
  3565. initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
  3566. ; return 0; }
  3567. EOF
  3568. if { (eval echo configure:4138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3569. rm -rf conftest*
  3570. echo "$ac_t""yes" 1>&6
  3571. else
  3572. echo "configure: failed program was:" >&5
  3573. cat conftest.$ac_ext >&5
  3574. rm -rf conftest*
  3575. echo "$ac_t""no" 1>&6
  3576. LIBS="$cf_ncurses_SAVE"
  3577. fi
  3578. rm -f conftest*
  3579. fi
  3580. cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
  3581. cat >> confdefs.h <<EOF
  3582. #define $cf_nculib_ROOT 1
  3583. EOF
  3584. ;;
  3585. ncursesw)
  3586. cf_cv_libtype=w
  3587. echo $ac_n "checking for multibyte character support""... $ac_c" 1>&6
  3588. echo "configure:4164: checking for multibyte character support" >&5
  3589. if eval "test \"`echo '$''{'cf_cv_utf8_lib'+set}'`\" = set"; then
  3590. echo $ac_n "(cached) $ac_c" 1>&6
  3591. else
  3592. cf_save_LIBS="$LIBS"
  3593. cat > conftest.$ac_ext <<EOF
  3594. #line 4171 "configure"
  3595. #include "confdefs.h"
  3596. #include <stdlib.h>
  3597. int main() {
  3598. putwc(0,0);
  3599. ; return 0; }
  3600. EOF
  3601. if { (eval echo configure:4179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3602. rm -rf conftest*
  3603. cf_cv_utf8_lib=yes
  3604. else
  3605. echo "configure: failed program was:" >&5
  3606. cat conftest.$ac_ext >&5
  3607. rm -rf conftest*
  3608. LIBS="-lutf8 $LIBS"
  3609. cat > conftest.$ac_ext <<EOF
  3610. #line 4188 "configure"
  3611. #include "confdefs.h"
  3612. #include <libutf8.h>
  3613. int main() {
  3614. putwc(0,0);
  3615. ; return 0; }
  3616. EOF
  3617. if { (eval echo configure:4196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3618. rm -rf conftest*
  3619. cf_cv_utf8_lib=add-on
  3620. else
  3621. echo "configure: failed program was:" >&5
  3622. cat conftest.$ac_ext >&5
  3623. rm -rf conftest*
  3624. cf_cv_utf8_lib=no
  3625. fi
  3626. rm -f conftest*
  3627. LIBS="$cf_save_LIBS"
  3628. fi
  3629. rm -f conftest*
  3630. fi
  3631. echo "$ac_t""$cf_cv_utf8_lib" 1>&6
  3632. # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
  3633. # ncurses/ncursesw:
  3634. if test "$cf_cv_utf8_lib" = "add-on" ; then
  3635. cat >> confdefs.h <<\EOF
  3636. #define HAVE_LIBUTF8_H 1
  3637. EOF
  3638. LIBS="-lutf8 $LIBS"
  3639. fi
  3640. cf_ncuhdr_root=ncursesw
  3641. test -n "$cf_cv_curses_dir" && \
  3642. test "$cf_cv_curses_dir" != "no" && { \
  3643. if test -n "$cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
  3644. for cf_add_incdir in $cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root
  3645. do
  3646. while test $cf_add_incdir != /usr/include
  3647. do
  3648. if test -d $cf_add_incdir
  3649. then
  3650. cf_have_incdir=no
  3651. if test -n "$CFLAGS$CPPFLAGS" ; then
  3652. # a loop is needed to ensure we can add subdirs of existing dirs
  3653. for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
  3654. if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
  3655. cf_have_incdir=yes; break
  3656. fi
  3657. done
  3658. fi
  3659. if test "$cf_have_incdir" = no ; then
  3660. if test "$cf_add_incdir" = /usr/local/include ; then
  3661. if test "$GCC" = yes
  3662. then
  3663. cf_save_CPPFLAGS=$CPPFLAGS
  3664. CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
  3665. cat > conftest.$ac_ext <<EOF
  3666. #line 4255 "configure"
  3667. #include "confdefs.h"
  3668. #include <stdio.h>
  3669. int main() {
  3670. printf("Hello")
  3671. ; return 0; }
  3672. EOF
  3673. if { (eval echo configure:4262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3674. :
  3675. else
  3676. echo "configure: failed program was:" >&5
  3677. cat conftest.$ac_ext >&5
  3678. rm -rf conftest*
  3679. cf_have_incdir=yes
  3680. fi
  3681. rm -f conftest*
  3682. CPPFLAGS=$cf_save_CPPFLAGS
  3683. fi
  3684. fi
  3685. fi
  3686. if test "$cf_have_incdir" = no ; then
  3687. test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
  3688. echo "${as_me-configure}:4279: testing adding $cf_add_incdir to include-path ..." 1>&5
  3689. CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
  3690. cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
  3691. test "$cf_top_incdir" = "$cf_add_incdir" && break
  3692. cf_add_incdir="$cf_top_incdir"
  3693. else
  3694. break
  3695. fi
  3696. fi
  3697. done
  3698. done
  3699. fi
  3700. }
  3701. echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
  3702. echo "configure:4298: checking for $cf_ncuhdr_root header in include-path" >&5
  3703. if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
  3704. echo $ac_n "(cached) $ac_c" 1>&6
  3705. else
  3706. cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
  3707. ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
  3708. for cf_header in $cf_header_list
  3709. do
  3710. cat > conftest.$ac_ext <<EOF
  3711. #line 4309 "configure"
  3712. #include "confdefs.h"
  3713. #define _XOPEN_SOURCE_EXTENDED
  3714. #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
  3715. #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
  3716. #include <$cf_header>
  3717. int main() {
  3718. #ifdef NCURSES_VERSION
  3719. #ifndef WACS_BSSB
  3720. make an error
  3721. #endif
  3722. printf("%s\n", NCURSES_VERSION);
  3723. #else
  3724. #ifdef __NCURSES_H
  3725. printf("old\n");
  3726. #else
  3727. make an error
  3728. #endif
  3729. #endif
  3730. ; return 0; }
  3731. EOF
  3732. if { (eval echo configure:4338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3733. rm -rf conftest*
  3734. cf_cv_ncurses_h=$cf_header
  3735. else
  3736. echo "configure: failed program was:" >&5
  3737. cat conftest.$ac_ext >&5
  3738. rm -rf conftest*
  3739. cf_cv_ncurses_h=no
  3740. fi
  3741. rm -f conftest*
  3742. test "$cf_cv_ncurses_h" != no && break
  3743. done
  3744. fi
  3745. echo "$ac_t""$cf_cv_ncurses_h" 1>&6
  3746. if test "$cf_cv_ncurses_h" != no ; then
  3747. cf_cv_ncurses_header=$cf_cv_ncurses_h
  3748. else
  3749. echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
  3750. echo "configure:4364: checking for $cf_ncuhdr_root include-path" >&5
  3751. if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
  3752. echo $ac_n "(cached) $ac_c" 1>&6
  3753. else
  3754. test -n "$verbose" && echo
  3755. cf_search=""
  3756. test "/usr" != "$prefix" && \
  3757. test -d "/usr" && \
  3758. (test $prefix = NONE || test -d $prefix) && {
  3759. test -n "$verbose" && echo " ... testing for include-directories under /usr"
  3760. test -d /usr/include && cf_search="$cf_search /usr/include"
  3761. test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
  3762. test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
  3763. test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
  3764. test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
  3765. }
  3766. test "$prefix" != "NONE" && \
  3767. test -d "$prefix" && \
  3768. {
  3769. test -n "$verbose" && echo " ... testing for include-directories under $prefix"
  3770. test -d $prefix/include && cf_search="$cf_search $prefix/include"
  3771. test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
  3772. test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
  3773. test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
  3774. test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
  3775. }
  3776. test "/usr/local" != "$prefix" && \
  3777. test -d "/usr/local" && \
  3778. (test $prefix = NONE || test -d $prefix) && {
  3779. test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
  3780. test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
  3781. test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
  3782. test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
  3783. test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
  3784. test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
  3785. }
  3786. test "/opt" != "$prefix" && \
  3787. test -d "/opt" && \
  3788. (test $prefix = NONE || test -d $prefix) && {
  3789. test -n "$verbose" && echo " ... testing for include-directories under /opt"
  3790. test -d /opt/include && cf_search="$cf_search /opt/include"
  3791. test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
  3792. test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
  3793. test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
  3794. test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
  3795. }
  3796. test "$HOME" != "$prefix" && \
  3797. test -d "$HOME" && \
  3798. (test $prefix = NONE || test -d $prefix) && {
  3799. test -n "$verbose" && echo " ... testing for include-directories under $HOME"
  3800. test -d $HOME/include && cf_search="$cf_search $HOME/include"
  3801. test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
  3802. test -d $HOME/include/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
  3803. test -d $HOME/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
  3804. test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
  3805. }
  3806. test "$includedir" != NONE && \
  3807. test "$includedir" != "/usr/include" && \
  3808. test -d "$includedir" && {
  3809. test -d $includedir && cf_search="$cf_search $includedir"
  3810. test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
  3811. }
  3812. test "$oldincludedir" != NONE && \
  3813. test "$oldincludedir" != "/usr/include" && \
  3814. test -d "$oldincludedir" && {
  3815. test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
  3816. test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
  3817. }
  3818. test -n "$verbose" && echo search path $cf_search
  3819. cf_save2_CPPFLAGS="$CPPFLAGS"
  3820. for cf_incdir in $cf_search
  3821. do
  3822. if test -n "$cf_incdir" ; then
  3823. for cf_add_incdir in $cf_incdir
  3824. do
  3825. while test $cf_add_incdir != /usr/include
  3826. do
  3827. if test -d $cf_add_incdir
  3828. then
  3829. cf_have_incdir=no
  3830. if test -n "$CFLAGS$CPPFLAGS" ; then
  3831. # a loop is needed to ensure we can add subdirs of existing dirs
  3832. for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
  3833. if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
  3834. cf_have_incdir=yes; break
  3835. fi
  3836. done
  3837. fi
  3838. if test "$cf_have_incdir" = no ; then
  3839. if test "$cf_add_incdir" = /usr/local/include ; then
  3840. if test "$GCC" = yes
  3841. then
  3842. cf_save_CPPFLAGS=$CPPFLAGS
  3843. CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
  3844. cat > conftest.$ac_ext <<EOF
  3845. #line 4477 "configure"
  3846. #include "confdefs.h"
  3847. #include <stdio.h>
  3848. int main() {
  3849. printf("Hello")
  3850. ; return 0; }
  3851. EOF
  3852. if { (eval echo configure:4484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3853. :
  3854. else
  3855. echo "configure: failed program was:" >&5
  3856. cat conftest.$ac_ext >&5
  3857. rm -rf conftest*
  3858. cf_have_incdir=yes
  3859. fi
  3860. rm -f conftest*
  3861. CPPFLAGS=$cf_save_CPPFLAGS
  3862. fi
  3863. fi
  3864. fi
  3865. if test "$cf_have_incdir" = no ; then
  3866. test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
  3867. echo "${as_me-configure}:4501: testing adding $cf_add_incdir to include-path ..." 1>&5
  3868. CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
  3869. cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
  3870. test "$cf_top_incdir" = "$cf_add_incdir" && break
  3871. cf_add_incdir="$cf_top_incdir"
  3872. else
  3873. break
  3874. fi
  3875. fi
  3876. done
  3877. done
  3878. fi
  3879. for cf_header in \
  3880. ncurses.h \
  3881. curses.h
  3882. do
  3883. cat > conftest.$ac_ext <<EOF
  3884. #line 4523 "configure"
  3885. #include "confdefs.h"
  3886. #include <$cf_header>
  3887. int main() {
  3888. #ifdef NCURSES_VERSION
  3889. printf("%s\n", NCURSES_VERSION);
  3890. #else
  3891. #ifdef __NCURSES_H
  3892. printf("old\n");
  3893. #else
  3894. make an error
  3895. #endif
  3896. #endif
  3897. ; return 0; }
  3898. EOF
  3899. if { (eval echo configure:4544: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3900. rm -rf conftest*
  3901. cf_cv_ncurses_h2=$cf_header
  3902. else
  3903. echo "configure: failed program was:" >&5
  3904. cat conftest.$ac_ext >&5
  3905. rm -rf conftest*
  3906. cf_cv_ncurses_h2=no
  3907. fi
  3908. rm -f conftest*
  3909. if test "$cf_cv_ncurses_h2" != no ; then
  3910. cf_cv_ncurses_h2=$cf_incdir/$cf_header
  3911. test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
  3912. break
  3913. fi
  3914. test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
  3915. done
  3916. CPPFLAGS="$cf_save2_CPPFLAGS"
  3917. test "$cf_cv_ncurses_h2" != no && break
  3918. done
  3919. test "$cf_cv_ncurses_h2" = no && { echo "configure: error: not found" 1>&2; exit 1; }
  3920. fi
  3921. echo "$ac_t""$cf_cv_ncurses_h2" 1>&6
  3922. cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
  3923. cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
  3924. if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
  3925. cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
  3926. fi
  3927. if test -n "$cf_1st_incdir" ; then
  3928. for cf_add_incdir in $cf_1st_incdir
  3929. do
  3930. while test $cf_add_incdir != /usr/include
  3931. do
  3932. if test -d $cf_add_incdir
  3933. then
  3934. cf_have_incdir=no
  3935. if test -n "$CFLAGS$CPPFLAGS" ; then
  3936. # a loop is needed to ensure we can add subdirs of existing dirs
  3937. for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
  3938. if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
  3939. cf_have_incdir=yes; break
  3940. fi
  3941. done
  3942. fi
  3943. if test "$cf_have_incdir" = no ; then
  3944. if test "$cf_add_incdir" = /usr/local/include ; then
  3945. if test "$GCC" = yes
  3946. then
  3947. cf_save_CPPFLAGS=$CPPFLAGS
  3948. CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
  3949. cat > conftest.$ac_ext <<EOF
  3950. #line 4602 "configure"
  3951. #include "confdefs.h"
  3952. #include <stdio.h>
  3953. int main() {
  3954. printf("Hello")
  3955. ; return 0; }
  3956. EOF
  3957. if { (eval echo configure:4609: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3958. :
  3959. else
  3960. echo "configure: failed program was:" >&5
  3961. cat conftest.$ac_ext >&5
  3962. rm -rf conftest*
  3963. cf_have_incdir=yes
  3964. fi
  3965. rm -f conftest*
  3966. CPPFLAGS=$cf_save_CPPFLAGS
  3967. fi
  3968. fi
  3969. fi
  3970. if test "$cf_have_incdir" = no ; then
  3971. test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
  3972. echo "${as_me-configure}:4626: testing adding $cf_add_incdir to include-path ..." 1>&5
  3973. CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
  3974. cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
  3975. test "$cf_top_incdir" = "$cf_add_incdir" && break
  3976. cf_add_incdir="$cf_top_incdir"
  3977. else
  3978. break
  3979. fi
  3980. fi
  3981. done
  3982. done
  3983. fi
  3984. fi
  3985. # Set definitions to allow ifdef'ing for ncurses.h
  3986. case $cf_cv_ncurses_header in # (vi
  3987. *ncurses.h)
  3988. cat >> confdefs.h <<\EOF
  3989. #define HAVE_NCURSES_H 1
  3990. EOF
  3991. ;;
  3992. esac
  3993. case $cf_cv_ncurses_header in # (vi
  3994. ncurses/curses.h|ncurses/ncurses.h)
  3995. cat >> confdefs.h <<\EOF
  3996. #define HAVE_NCURSES_NCURSES_H 1
  3997. EOF
  3998. ;;
  3999. ncursesw/curses.h|ncursesw/ncurses.h)
  4000. cat >> confdefs.h <<\EOF
  4001. #define HAVE_NCURSESW_NCURSES_H 1
  4002. EOF
  4003. ;;
  4004. esac
  4005. echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
  4006. echo "configure:4674: checking for terminfo header" >&5
  4007. if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
  4008. echo $ac_n "(cached) $ac_c" 1>&6
  4009. else
  4010. case ${cf_cv_ncurses_header} in #(vi
  4011. */ncurses.h|*/ncursesw.h) #(vi
  4012. cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
  4013. ;;
  4014. *)
  4015. cf_term_header=term.h
  4016. ;;
  4017. esac
  4018. for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
  4019. do
  4020. cat > conftest.$ac_ext <<EOF
  4021. #line 4691 "configure"
  4022. #include "confdefs.h"
  4023. #include <stdio.h>
  4024. #include <${cf_cv_ncurses_header-curses.h}>
  4025. #include <$cf_test>
  4026. int main() {
  4027. int x = auto_left_margin
  4028. ; return 0; }
  4029. EOF
  4030. if { (eval echo configure:4701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  4031. rm -rf conftest*
  4032. cf_cv_term_header="$cf_test"
  4033. else
  4034. echo "configure: failed program was:" >&5
  4035. cat conftest.$ac_ext >&5
  4036. rm -rf conftest*
  4037. cf_cv_term_header=unknown
  4038. fi
  4039. rm -f conftest*
  4040. test "$cf_cv_term_header" != unknown && break
  4041. done
  4042. fi
  4043. echo "$ac_t""$cf_cv_term_header" 1>&6
  4044. # Set definitions to allow ifdef'ing to accommodate subdirectories
  4045. case $cf_cv_term_header in # (vi
  4046. *term.h)
  4047. cat >> confdefs.h <<\EOF
  4048. #define HAVE_TERM_H 1
  4049. EOF
  4050. ;;
  4051. esac
  4052. case $cf_cv_term_header in # (vi
  4053. ncurses/term.h) #(vi
  4054. cat >> confdefs.h <<\EOF
  4055. #define HAVE_NCURSES_TERM_H 1
  4056. EOF
  4057. ;;
  4058. ncursesw/term.h)
  4059. cat >> confdefs.h <<\EOF
  4060. #define HAVE_NCURSESW_TERM_H 1
  4061. EOF
  4062. ;;
  4063. esac
  4064. # some applications need this, but should check for NCURSES_VERSION
  4065. cat >> confdefs.h <<\EOF
  4066. #define NCURSES 1
  4067. EOF
  4068. echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
  4069. echo "configure:4756: checking for ncurses version" >&5
  4070. if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
  4071. echo $ac_n "(cached) $ac_c" 1>&6
  4072. else
  4073. cf_cv_ncurses_version=no
  4074. cf_tempfile=out$$
  4075. rm -f $cf_tempfile
  4076. if test "$cross_compiling" = yes; then
  4077. # This will not work if the preprocessor splits the line after the
  4078. # Autoconf token. The 'unproto' program does that.
  4079. cat > conftest.$ac_ext <<EOF
  4080. #include <${cf_cv_ncurses_header-curses.h}>
  4081. #undef Autoconf
  4082. #ifdef NCURSES_VERSION
  4083. Autoconf NCURSES_VERSION
  4084. #else
  4085. #ifdef __NCURSES_H
  4086. Autoconf "old"
  4087. #endif
  4088. ;
  4089. #endif
  4090. EOF
  4091. cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
  4092. { (eval echo configure:4782: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
  4093. if test -f conftest.out ; then
  4094. cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
  4095. test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
  4096. rm -f conftest.out
  4097. fi
  4098. else
  4099. cat > conftest.$ac_ext <<EOF
  4100. #line 4791 "configure"
  4101. #include "confdefs.h"
  4102. #include <${cf_cv_ncurses_header-curses.h}>
  4103. #include <stdio.h>
  4104. int main()
  4105. {
  4106. FILE *fp = fopen("$cf_tempfile", "w");
  4107. #ifdef NCURSES_VERSION
  4108. # ifdef NCURSES_VERSION_PATCH
  4109. fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
  4110. # else
  4111. fprintf(fp, "%s\n", NCURSES_VERSION);
  4112. # endif
  4113. #else
  4114. # ifdef __NCURSES_H
  4115. fprintf(fp, "old\n");
  4116. # else
  4117. make an error
  4118. # endif
  4119. #endif
  4120. ${cf_cv_main_return-return}(0);
  4121. }
  4122. EOF
  4123. if { (eval echo configure:4815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  4124. then
  4125. cf_cv_ncurses_version=`cat $cf_tempfile`
  4126. else
  4127. echo "configure: failed program was:" >&5
  4128. cat conftest.$ac_ext >&5
  4129. fi
  4130. rm -fr conftest*
  4131. fi
  4132. rm -f $cf_tempfile
  4133. fi
  4134. echo "$ac_t""$cf_cv_ncurses_version" 1>&6
  4135. test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
  4136. #define NCURSES 1
  4137. EOF
  4138. cf_nculib_root=ncursesw
  4139. # This works, except for the special case where we find gpm, but
  4140. # ncurses is in a nonstandard location via $LIBS, and we really want
  4141. # to link gpm.
  4142. cf_ncurses_LIBS=""
  4143. cf_ncurses_SAVE="$LIBS"
  4144. echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
  4145. echo "configure:4846: checking for Gpm_Open in -lgpm" >&5
  4146. ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
  4147. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4148. echo $ac_n "(cached) $ac_c" 1>&6
  4149. else
  4150. ac_save_LIBS="$LIBS"
  4151. LIBS="-lgpm $LIBS"
  4152. cat > conftest.$ac_ext <<EOF
  4153. #line 4854 "configure"
  4154. #include "confdefs.h"
  4155. /* Override any gcc2 internal prototype to avoid an error. */
  4156. /* We use char because int might match the return type of a gcc2
  4157. builtin and then its argument prototype would still apply. */
  4158. char Gpm_Open();
  4159. int main() {
  4160. Gpm_Open()
  4161. ; return 0; }
  4162. EOF
  4163. if { (eval echo configure:4865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4164. rm -rf conftest*
  4165. eval "ac_cv_lib_$ac_lib_var=yes"
  4166. else
  4167. echo "configure: failed program was:" >&5
  4168. cat conftest.$ac_ext >&5
  4169. rm -rf conftest*
  4170. eval "ac_cv_lib_$ac_lib_var=no"
  4171. fi
  4172. rm -f conftest*
  4173. LIBS="$ac_save_LIBS"
  4174. fi
  4175. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4176. echo "$ac_t""yes" 1>&6
  4177. echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
  4178. echo "configure:4881: checking for initscr in -lgpm" >&5
  4179. ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
  4180. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4181. echo $ac_n "(cached) $ac_c" 1>&6
  4182. else
  4183. ac_save_LIBS="$LIBS"
  4184. LIBS="-lgpm $LIBS"
  4185. cat > conftest.$ac_ext <<EOF
  4186. #line 4889 "configure"
  4187. #include "confdefs.h"
  4188. /* Override any gcc2 internal prototype to avoid an error. */
  4189. /* We use char because int might match the return type of a gcc2
  4190. builtin and then its argument prototype would still apply. */
  4191. char initscr();
  4192. int main() {
  4193. initscr()
  4194. ; return 0; }
  4195. EOF
  4196. if { (eval echo configure:4900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4197. rm -rf conftest*
  4198. eval "ac_cv_lib_$ac_lib_var=yes"
  4199. else
  4200. echo "configure: failed program was:" >&5
  4201. cat conftest.$ac_ext >&5
  4202. rm -rf conftest*
  4203. eval "ac_cv_lib_$ac_lib_var=no"
  4204. fi
  4205. rm -f conftest*
  4206. LIBS="$ac_save_LIBS"
  4207. fi
  4208. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4209. echo "$ac_t""yes" 1>&6
  4210. LIBS="$cf_ncurses_SAVE"
  4211. else
  4212. echo "$ac_t""no" 1>&6
  4213. cf_ncurses_LIBS="-lgpm"
  4214. fi
  4215. else
  4216. echo "$ac_t""no" 1>&6
  4217. fi
  4218. case $host_os in #(vi
  4219. freebsd*)
  4220. # This is only necessary if you are linking against an obsolete
  4221. # version of ncurses (but it should do no harm, since it's static).
  4222. if test "$cf_nculib_root" = ncurses ; then
  4223. echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
  4224. echo "configure:4932: checking for tgoto in -lmytinfo" >&5
  4225. ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
  4226. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4227. echo $ac_n "(cached) $ac_c" 1>&6
  4228. else
  4229. ac_save_LIBS="$LIBS"
  4230. LIBS="-lmytinfo $LIBS"
  4231. cat > conftest.$ac_ext <<EOF
  4232. #line 4940 "configure"
  4233. #include "confdefs.h"
  4234. /* Override any gcc2 internal prototype to avoid an error. */
  4235. /* We use char because int might match the return type of a gcc2
  4236. builtin and then its argument prototype would still apply. */
  4237. char tgoto();
  4238. int main() {
  4239. tgoto()
  4240. ; return 0; }
  4241. EOF
  4242. if { (eval echo configure:4951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4243. rm -rf conftest*
  4244. eval "ac_cv_lib_$ac_lib_var=yes"
  4245. else
  4246. echo "configure: failed program was:" >&5
  4247. cat conftest.$ac_ext >&5
  4248. rm -rf conftest*
  4249. eval "ac_cv_lib_$ac_lib_var=no"
  4250. fi
  4251. rm -f conftest*
  4252. LIBS="$ac_save_LIBS"
  4253. fi
  4254. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4255. echo "$ac_t""yes" 1>&6
  4256. cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
  4257. else
  4258. echo "$ac_t""no" 1>&6
  4259. fi
  4260. fi
  4261. ;;
  4262. esac
  4263. LIBS="$cf_ncurses_LIBS $LIBS"
  4264. if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
  4265. then
  4266. if test -n "$cf_cv_curses_dir/lib" ; then
  4267. for cf_add_libdir in $cf_cv_curses_dir/lib
  4268. do
  4269. if test $cf_add_libdir = /usr/lib ; then
  4270. :
  4271. elif test -d $cf_add_libdir
  4272. then
  4273. cf_have_libdir=no
  4274. if test -n "$LDFLAGS$LIBS" ; then
  4275. # a loop is needed to ensure we can add subdirs of existing dirs
  4276. for cf_test_libdir in $LDFLAGS $LIBS ; do
  4277. if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
  4278. cf_have_libdir=yes; break
  4279. fi
  4280. done
  4281. fi
  4282. if test "$cf_have_libdir" = no ; then
  4283. test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
  4284. echo "${as_me-configure}:4999: testing adding $cf_add_libdir to library-path ..." 1>&5
  4285. LDFLAGS="-L$cf_add_libdir $LDFLAGS"
  4286. fi
  4287. fi
  4288. done
  4289. fi
  4290. LIBS="-l$cf_nculib_root $LIBS"
  4291. else
  4292. eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
  4293. cf_libdir=""
  4294. echo $ac_n "checking for initscr""... $ac_c" 1>&6
  4295. echo "configure:5014: checking for initscr" >&5
  4296. if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
  4297. echo $ac_n "(cached) $ac_c" 1>&6
  4298. else
  4299. cat > conftest.$ac_ext <<EOF
  4300. #line 5019 "configure"
  4301. #include "confdefs.h"
  4302. /* System header to define __stub macros and hopefully few prototypes,
  4303. which can conflict with char initscr(); below. */
  4304. #include <assert.h>
  4305. /* Override any gcc2 internal prototype to avoid an error. */
  4306. /* We use char because int might match the return type of a gcc2
  4307. builtin and then its argument prototype would still apply. */
  4308. char initscr();
  4309. int main() {
  4310. /* The GNU C library defines this for functions which it implements
  4311. to always fail with ENOSYS. Some functions are actually named
  4312. something starting with __ and the normal name is an alias. */
  4313. #if defined (__stub_initscr) || defined (__stub___initscr)
  4314. choke me
  4315. #else
  4316. initscr();
  4317. #endif
  4318. ; return 0; }
  4319. EOF
  4320. if { (eval echo configure:5042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4321. rm -rf conftest*
  4322. eval "ac_cv_func_initscr=yes"
  4323. else
  4324. echo "configure: failed program was:" >&5
  4325. cat conftest.$ac_ext >&5
  4326. rm -rf conftest*
  4327. eval "ac_cv_func_initscr=no"
  4328. fi
  4329. rm -f conftest*
  4330. fi
  4331. if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
  4332. echo "$ac_t""yes" 1>&6
  4333. eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
  4334. else
  4335. echo "$ac_t""no" 1>&6
  4336. cf_save_LIBS="$LIBS"
  4337. echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
  4338. echo "configure:5062: checking for initscr in -l$cf_nculib_root" >&5
  4339. LIBS="-l$cf_nculib_root $LIBS"
  4340. cat > conftest.$ac_ext <<EOF
  4341. #line 5065 "configure"
  4342. #include "confdefs.h"
  4343. #include <${cf_cv_ncurses_header-curses.h}>
  4344. int main() {
  4345. initscr()
  4346. ; return 0; }
  4347. EOF
  4348. if { (eval echo configure:5072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4349. rm -rf conftest*
  4350. echo "$ac_t""yes" 1>&6
  4351. eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
  4352. else
  4353. echo "configure: failed program was:" >&5
  4354. cat conftest.$ac_ext >&5
  4355. rm -rf conftest*
  4356. echo "$ac_t""no" 1>&6
  4357. cf_search=""
  4358. test "/usr" != "$prefix" && \
  4359. test -d "/usr" && \
  4360. (test $prefix = NONE || test -d $prefix) && {
  4361. test -n "$verbose" && echo " ... testing for lib-directories under /usr"
  4362. test -d /usr/lib && cf_search="$cf_search /usr/lib"
  4363. test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
  4364. test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
  4365. test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
  4366. test -d /usr/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
  4367. }
  4368. test "$prefix" != "NONE" && \
  4369. test -d "$prefix" && \
  4370. {
  4371. test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
  4372. test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
  4373. test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
  4374. test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
  4375. test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
  4376. test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
  4377. }
  4378. test "/usr/local" != "$prefix" && \
  4379. test -d "/usr/local" && \
  4380. (test $prefix = NONE || test -d $prefix) && {
  4381. test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
  4382. test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
  4383. test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
  4384. test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
  4385. test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
  4386. test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
  4387. }
  4388. test "/opt" != "$prefix" && \
  4389. test -d "/opt" && \
  4390. (test $prefix = NONE || test -d $prefix) && {
  4391. test -n "$verbose" && echo " ... testing for lib-directories under /opt"
  4392. test -d /opt/lib && cf_search="$cf_search /opt/lib"
  4393. test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
  4394. test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
  4395. test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
  4396. test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
  4397. }
  4398. test "$HOME" != "$prefix" && \
  4399. test -d "$HOME" && \
  4400. (test $prefix = NONE || test -d $prefix) && {
  4401. test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
  4402. test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
  4403. test -d $HOME/lib/$cf_nculib_root && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
  4404. test -d $HOME/lib/$cf_nculib_root/lib && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
  4405. test -d $HOME/$cf_nculib_root/lib && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
  4406. test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
  4407. }
  4408. for cf_libdir in $cf_search
  4409. do
  4410. echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
  4411. echo "configure:5148: checking for -l$cf_nculib_root in $cf_libdir" >&5
  4412. LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
  4413. cat > conftest.$ac_ext <<EOF
  4414. #line 5151 "configure"
  4415. #include "confdefs.h"
  4416. #include <${cf_cv_ncurses_header-curses.h}>
  4417. int main() {
  4418. initscr()
  4419. ; return 0; }
  4420. EOF
  4421. if { (eval echo configure:5158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4422. rm -rf conftest*
  4423. echo "$ac_t""yes" 1>&6
  4424. eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
  4425. break
  4426. else
  4427. echo "configure: failed program was:" >&5
  4428. cat conftest.$ac_ext >&5
  4429. rm -rf conftest*
  4430. echo "$ac_t""no" 1>&6
  4431. LIBS="$cf_save_LIBS"
  4432. fi
  4433. rm -f conftest*
  4434. done
  4435. fi
  4436. rm -f conftest*
  4437. fi
  4438. eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
  4439. if test $cf_found_library = no ; then
  4440. { echo "configure: error: Cannot link $cf_nculib_root library" 1>&2; exit 1; }
  4441. fi
  4442. fi
  4443. if test -n "$cf_ncurses_LIBS" ; then
  4444. echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
  4445. echo "configure:5189: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
  4446. cf_ncurses_SAVE="$LIBS"
  4447. for p in $cf_ncurses_LIBS ; do
  4448. q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
  4449. if test "$q" != "$LIBS" ; then
  4450. LIBS="$q"
  4451. fi
  4452. done
  4453. cat > conftest.$ac_ext <<EOF
  4454. #line 5198 "configure"
  4455. #include "confdefs.h"
  4456. #include <${cf_cv_ncurses_header-curses.h}>
  4457. int main() {
  4458. initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
  4459. ; return 0; }
  4460. EOF
  4461. if { (eval echo configure:5205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4462. rm -rf conftest*
  4463. echo "$ac_t""yes" 1>&6
  4464. else
  4465. echo "configure: failed program was:" >&5
  4466. cat conftest.$ac_ext >&5
  4467. rm -rf conftest*
  4468. echo "$ac_t""no" 1>&6
  4469. LIBS="$cf_ncurses_SAVE"
  4470. fi
  4471. rm -f conftest*
  4472. fi
  4473. cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
  4474. cat >> confdefs.h <<EOF
  4475. #define $cf_nculib_ROOT 1
  4476. EOF
  4477. ;;
  4478. pdcurses) #(vi
  4479. if test "$no_x" = yes; then
  4480. # Not all programs may use this symbol, but it does not hurt to define it.
  4481. cat >> confdefs.h <<\EOF
  4482. #define X_DISPLAY_MISSING 1
  4483. EOF
  4484. X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
  4485. else
  4486. if test -n "$x_includes"; then
  4487. X_CFLAGS="$X_CFLAGS -I$x_includes"
  4488. fi
  4489. # It would also be nice to do this for all -L options, not just this one.
  4490. if test -n "$x_libraries"; then
  4491. X_LIBS="$X_LIBS -L$x_libraries"
  4492. # For Solaris; some versions of Sun CC require a space after -R and
  4493. # others require no space. Words are not sufficient . . . .
  4494. case "`(uname -sr) 2>/dev/null`" in
  4495. "SunOS 5"*)
  4496. echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
  4497. echo "configure:5248: checking whether -R must be followed by a space" >&5
  4498. ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
  4499. cat > conftest.$ac_ext <<EOF
  4500. #line 5251 "configure"
  4501. #include "confdefs.h"
  4502. int main() {
  4503. ; return 0; }
  4504. EOF
  4505. if { (eval echo configure:5258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4506. rm -rf conftest*
  4507. ac_R_nospace=yes
  4508. else
  4509. echo "configure: failed program was:" >&5
  4510. cat conftest.$ac_ext >&5
  4511. rm -rf conftest*
  4512. ac_R_nospace=no
  4513. fi
  4514. rm -f conftest*
  4515. if test $ac_R_nospace = yes; then
  4516. echo "$ac_t""no" 1>&6
  4517. X_LIBS="$X_LIBS -R$x_libraries"
  4518. else
  4519. LIBS="$ac_xsave_LIBS -R $x_libraries"
  4520. cat > conftest.$ac_ext <<EOF
  4521. #line 5274 "configure"
  4522. #include "confdefs.h"
  4523. int main() {
  4524. ; return 0; }
  4525. EOF
  4526. if { (eval echo configure:5281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4527. rm -rf conftest*
  4528. ac_R_space=yes
  4529. else
  4530. echo "configure: failed program was:" >&5
  4531. cat conftest.$ac_ext >&5
  4532. rm -rf conftest*
  4533. ac_R_space=no
  4534. fi
  4535. rm -f conftest*
  4536. if test $ac_R_space = yes; then
  4537. echo "$ac_t""yes" 1>&6
  4538. X_LIBS="$X_LIBS -R $x_libraries"
  4539. else
  4540. echo "$ac_t""neither works" 1>&6
  4541. fi
  4542. fi
  4543. LIBS="$ac_xsave_LIBS"
  4544. esac
  4545. fi
  4546. # Check for system-dependent libraries X programs must link with.
  4547. # Do this before checking for the system-independent R6 libraries
  4548. # (-lICE), since we may need -lsocket or whatever for X linking.
  4549. if test "$ISC" = yes; then
  4550. X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
  4551. else
  4552. # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
  4553. # libraries were built with DECnet support. And karl@cs.umb.edu says
  4554. # the Alpha needs dnet_stub (dnet does not exist).
  4555. echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
  4556. echo "configure:5313: checking for dnet_ntoa in -ldnet" >&5
  4557. ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  4558. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4559. echo $ac_n "(cached) $ac_c" 1>&6
  4560. else
  4561. ac_save_LIBS="$LIBS"
  4562. LIBS="-ldnet $LIBS"
  4563. cat > conftest.$ac_ext <<EOF
  4564. #line 5321 "configure"
  4565. #include "confdefs.h"
  4566. /* Override any gcc2 internal prototype to avoid an error. */
  4567. /* We use char because int might match the return type of a gcc2
  4568. builtin and then its argument prototype would still apply. */
  4569. char dnet_ntoa();
  4570. int main() {
  4571. dnet_ntoa()
  4572. ; return 0; }
  4573. EOF
  4574. if { (eval echo configure:5332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4575. rm -rf conftest*
  4576. eval "ac_cv_lib_$ac_lib_var=yes"
  4577. else
  4578. echo "configure: failed program was:" >&5
  4579. cat conftest.$ac_ext >&5
  4580. rm -rf conftest*
  4581. eval "ac_cv_lib_$ac_lib_var=no"
  4582. fi
  4583. rm -f conftest*
  4584. LIBS="$ac_save_LIBS"
  4585. fi
  4586. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4587. echo "$ac_t""yes" 1>&6
  4588. X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
  4589. else
  4590. echo "$ac_t""no" 1>&6
  4591. fi
  4592. if test $ac_cv_lib_dnet_dnet_ntoa = no; then
  4593. echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
  4594. echo "configure:5354: checking for dnet_ntoa in -ldnet_stub" >&5
  4595. ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  4596. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4597. echo $ac_n "(cached) $ac_c" 1>&6
  4598. else
  4599. ac_save_LIBS="$LIBS"
  4600. LIBS="-ldnet_stub $LIBS"
  4601. cat > conftest.$ac_ext <<EOF
  4602. #line 5362 "configure"
  4603. #include "confdefs.h"
  4604. /* Override any gcc2 internal prototype to avoid an error. */
  4605. /* We use char because int might match the return type of a gcc2
  4606. builtin and then its argument prototype would still apply. */
  4607. char dnet_ntoa();
  4608. int main() {
  4609. dnet_ntoa()
  4610. ; return 0; }
  4611. EOF
  4612. if { (eval echo configure:5373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4613. rm -rf conftest*
  4614. eval "ac_cv_lib_$ac_lib_var=yes"
  4615. else
  4616. echo "configure: failed program was:" >&5
  4617. cat conftest.$ac_ext >&5
  4618. rm -rf conftest*
  4619. eval "ac_cv_lib_$ac_lib_var=no"
  4620. fi
  4621. rm -f conftest*
  4622. LIBS="$ac_save_LIBS"
  4623. fi
  4624. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4625. echo "$ac_t""yes" 1>&6
  4626. X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
  4627. else
  4628. echo "$ac_t""no" 1>&6
  4629. fi
  4630. fi
  4631. # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
  4632. # to get the SysV transport functions.
  4633. # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
  4634. # needs -lnsl.
  4635. # The nsl library prevents programs from opening the X display
  4636. # on Irix 5.2, according to dickey@clark.net.
  4637. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
  4638. echo "configure:5402: checking for gethostbyname" >&5
  4639. if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
  4640. echo $ac_n "(cached) $ac_c" 1>&6
  4641. else
  4642. cat > conftest.$ac_ext <<EOF
  4643. #line 5407 "configure"
  4644. #include "confdefs.h"
  4645. /* System header to define __stub macros and hopefully few prototypes,
  4646. which can conflict with char gethostbyname(); below. */
  4647. #include <assert.h>
  4648. /* Override any gcc2 internal prototype to avoid an error. */
  4649. /* We use char because int might match the return type of a gcc2
  4650. builtin and then its argument prototype would still apply. */
  4651. char gethostbyname();
  4652. int main() {
  4653. /* The GNU C library defines this for functions which it implements
  4654. to always fail with ENOSYS. Some functions are actually named
  4655. something starting with __ and the normal name is an alias. */
  4656. #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
  4657. choke me
  4658. #else
  4659. gethostbyname();
  4660. #endif
  4661. ; return 0; }
  4662. EOF
  4663. if { (eval echo configure:5430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4664. rm -rf conftest*
  4665. eval "ac_cv_func_gethostbyname=yes"
  4666. else
  4667. echo "configure: failed program was:" >&5
  4668. cat conftest.$ac_ext >&5
  4669. rm -rf conftest*
  4670. eval "ac_cv_func_gethostbyname=no"
  4671. fi
  4672. rm -f conftest*
  4673. fi
  4674. if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
  4675. echo "$ac_t""yes" 1>&6
  4676. :
  4677. else
  4678. echo "$ac_t""no" 1>&6
  4679. fi
  4680. if test $ac_cv_func_gethostbyname = no; then
  4681. echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
  4682. echo "configure:5451: checking for gethostbyname in -lnsl" >&5
  4683. ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
  4684. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4685. echo $ac_n "(cached) $ac_c" 1>&6
  4686. else
  4687. ac_save_LIBS="$LIBS"
  4688. LIBS="-lnsl $LIBS"
  4689. cat > conftest.$ac_ext <<EOF
  4690. #line 5459 "configure"
  4691. #include "confdefs.h"
  4692. /* Override any gcc2 internal prototype to avoid an error. */
  4693. /* We use char because int might match the return type of a gcc2
  4694. builtin and then its argument prototype would still apply. */
  4695. char gethostbyname();
  4696. int main() {
  4697. gethostbyname()
  4698. ; return 0; }
  4699. EOF
  4700. if { (eval echo configure:5470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4701. rm -rf conftest*
  4702. eval "ac_cv_lib_$ac_lib_var=yes"
  4703. else
  4704. echo "configure: failed program was:" >&5
  4705. cat conftest.$ac_ext >&5
  4706. rm -rf conftest*
  4707. eval "ac_cv_lib_$ac_lib_var=no"
  4708. fi
  4709. rm -f conftest*
  4710. LIBS="$ac_save_LIBS"
  4711. fi
  4712. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4713. echo "$ac_t""yes" 1>&6
  4714. X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
  4715. else
  4716. echo "$ac_t""no" 1>&6
  4717. fi
  4718. fi
  4719. # lieder@skyler.mavd.honeywell.com says without -lsocket,
  4720. # socket/setsockopt and other routines are undefined under SCO ODT
  4721. # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
  4722. # on later versions), says simon@lia.di.epfl.ch: it contains
  4723. # gethostby* variants that don't use the nameserver (or something).
  4724. # -lsocket must be given before -lnsl if both are needed.
  4725. # We assume that if connect needs -lnsl, so does gethostbyname.
  4726. echo $ac_n "checking for connect""... $ac_c" 1>&6
  4727. echo "configure:5500: checking for connect" >&5
  4728. if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
  4729. echo $ac_n "(cached) $ac_c" 1>&6
  4730. else
  4731. cat > conftest.$ac_ext <<EOF
  4732. #line 5505 "configure"
  4733. #include "confdefs.h"
  4734. /* System header to define __stub macros and hopefully few prototypes,
  4735. which can conflict with char connect(); below. */
  4736. #include <assert.h>
  4737. /* Override any gcc2 internal prototype to avoid an error. */
  4738. /* We use char because int might match the return type of a gcc2
  4739. builtin and then its argument prototype would still apply. */
  4740. char connect();
  4741. int main() {
  4742. /* The GNU C library defines this for functions which it implements
  4743. to always fail with ENOSYS. Some functions are actually named
  4744. something starting with __ and the normal name is an alias. */
  4745. #if defined (__stub_connect) || defined (__stub___connect)
  4746. choke me
  4747. #else
  4748. connect();
  4749. #endif
  4750. ; return 0; }
  4751. EOF
  4752. if { (eval echo configure:5528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4753. rm -rf conftest*
  4754. eval "ac_cv_func_connect=yes"
  4755. else
  4756. echo "configure: failed program was:" >&5
  4757. cat conftest.$ac_ext >&5
  4758. rm -rf conftest*
  4759. eval "ac_cv_func_connect=no"
  4760. fi
  4761. rm -f conftest*
  4762. fi
  4763. if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
  4764. echo "$ac_t""yes" 1>&6
  4765. :
  4766. else
  4767. echo "$ac_t""no" 1>&6
  4768. fi
  4769. if test $ac_cv_func_connect = no; then
  4770. echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
  4771. echo "configure:5549: checking for connect in -lsocket" >&5
  4772. ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
  4773. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4774. echo $ac_n "(cached) $ac_c" 1>&6
  4775. else
  4776. ac_save_LIBS="$LIBS"
  4777. LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
  4778. cat > conftest.$ac_ext <<EOF
  4779. #line 5557 "configure"
  4780. #include "confdefs.h"
  4781. /* Override any gcc2 internal prototype to avoid an error. */
  4782. /* We use char because int might match the return type of a gcc2
  4783. builtin and then its argument prototype would still apply. */
  4784. char connect();
  4785. int main() {
  4786. connect()
  4787. ; return 0; }
  4788. EOF
  4789. if { (eval echo configure:5568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4790. rm -rf conftest*
  4791. eval "ac_cv_lib_$ac_lib_var=yes"
  4792. else
  4793. echo "configure: failed program was:" >&5
  4794. cat conftest.$ac_ext >&5
  4795. rm -rf conftest*
  4796. eval "ac_cv_lib_$ac_lib_var=no"
  4797. fi
  4798. rm -f conftest*
  4799. LIBS="$ac_save_LIBS"
  4800. fi
  4801. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4802. echo "$ac_t""yes" 1>&6
  4803. X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
  4804. else
  4805. echo "$ac_t""no" 1>&6
  4806. fi
  4807. fi
  4808. # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
  4809. echo $ac_n "checking for remove""... $ac_c" 1>&6
  4810. echo "configure:5592: checking for remove" >&5
  4811. if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
  4812. echo $ac_n "(cached) $ac_c" 1>&6
  4813. else
  4814. cat > conftest.$ac_ext <<EOF
  4815. #line 5597 "configure"
  4816. #include "confdefs.h"
  4817. /* System header to define __stub macros and hopefully few prototypes,
  4818. which can conflict with char remove(); below. */
  4819. #include <assert.h>
  4820. /* Override any gcc2 internal prototype to avoid an error. */
  4821. /* We use char because int might match the return type of a gcc2
  4822. builtin and then its argument prototype would still apply. */
  4823. char remove();
  4824. int main() {
  4825. /* The GNU C library defines this for functions which it implements
  4826. to always fail with ENOSYS. Some functions are actually named
  4827. something starting with __ and the normal name is an alias. */
  4828. #if defined (__stub_remove) || defined (__stub___remove)
  4829. choke me
  4830. #else
  4831. remove();
  4832. #endif
  4833. ; return 0; }
  4834. EOF
  4835. if { (eval echo configure:5620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4836. rm -rf conftest*
  4837. eval "ac_cv_func_remove=yes"
  4838. else
  4839. echo "configure: failed program was:" >&5
  4840. cat conftest.$ac_ext >&5
  4841. rm -rf conftest*
  4842. eval "ac_cv_func_remove=no"
  4843. fi
  4844. rm -f conftest*
  4845. fi
  4846. if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
  4847. echo "$ac_t""yes" 1>&6
  4848. :
  4849. else
  4850. echo "$ac_t""no" 1>&6
  4851. fi
  4852. if test $ac_cv_func_remove = no; then
  4853. echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
  4854. echo "configure:5641: checking for remove in -lposix" >&5
  4855. ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
  4856. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4857. echo $ac_n "(cached) $ac_c" 1>&6
  4858. else
  4859. ac_save_LIBS="$LIBS"
  4860. LIBS="-lposix $LIBS"
  4861. cat > conftest.$ac_ext <<EOF
  4862. #line 5649 "configure"
  4863. #include "confdefs.h"
  4864. /* Override any gcc2 internal prototype to avoid an error. */
  4865. /* We use char because int might match the return type of a gcc2
  4866. builtin and then its argument prototype would still apply. */
  4867. char remove();
  4868. int main() {
  4869. remove()
  4870. ; return 0; }
  4871. EOF
  4872. if { (eval echo configure:5660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4873. rm -rf conftest*
  4874. eval "ac_cv_lib_$ac_lib_var=yes"
  4875. else
  4876. echo "configure: failed program was:" >&5
  4877. cat conftest.$ac_ext >&5
  4878. rm -rf conftest*
  4879. eval "ac_cv_lib_$ac_lib_var=no"
  4880. fi
  4881. rm -f conftest*
  4882. LIBS="$ac_save_LIBS"
  4883. fi
  4884. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4885. echo "$ac_t""yes" 1>&6
  4886. X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
  4887. else
  4888. echo "$ac_t""no" 1>&6
  4889. fi
  4890. fi
  4891. # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
  4892. echo $ac_n "checking for shmat""... $ac_c" 1>&6
  4893. echo "configure:5684: checking for shmat" >&5
  4894. if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
  4895. echo $ac_n "(cached) $ac_c" 1>&6
  4896. else
  4897. cat > conftest.$ac_ext <<EOF
  4898. #line 5689 "configure"
  4899. #include "confdefs.h"
  4900. /* System header to define __stub macros and hopefully few prototypes,
  4901. which can conflict with char shmat(); below. */
  4902. #include <assert.h>
  4903. /* Override any gcc2 internal prototype to avoid an error. */
  4904. /* We use char because int might match the return type of a gcc2
  4905. builtin and then its argument prototype would still apply. */
  4906. char shmat();
  4907. int main() {
  4908. /* The GNU C library defines this for functions which it implements
  4909. to always fail with ENOSYS. Some functions are actually named
  4910. something starting with __ and the normal name is an alias. */
  4911. #if defined (__stub_shmat) || defined (__stub___shmat)
  4912. choke me
  4913. #else
  4914. shmat();
  4915. #endif
  4916. ; return 0; }
  4917. EOF
  4918. if { (eval echo configure:5712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4919. rm -rf conftest*
  4920. eval "ac_cv_func_shmat=yes"
  4921. else
  4922. echo "configure: failed program was:" >&5
  4923. cat conftest.$ac_ext >&5
  4924. rm -rf conftest*
  4925. eval "ac_cv_func_shmat=no"
  4926. fi
  4927. rm -f conftest*
  4928. fi
  4929. if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
  4930. echo "$ac_t""yes" 1>&6
  4931. :
  4932. else
  4933. echo "$ac_t""no" 1>&6
  4934. fi
  4935. if test $ac_cv_func_shmat = no; then
  4936. echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
  4937. echo "configure:5733: checking for shmat in -lipc" >&5
  4938. ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
  4939. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4940. echo $ac_n "(cached) $ac_c" 1>&6
  4941. else
  4942. ac_save_LIBS="$LIBS"
  4943. LIBS="-lipc $LIBS"
  4944. cat > conftest.$ac_ext <<EOF
  4945. #line 5741 "configure"
  4946. #include "confdefs.h"
  4947. /* Override any gcc2 internal prototype to avoid an error. */
  4948. /* We use char because int might match the return type of a gcc2
  4949. builtin and then its argument prototype would still apply. */
  4950. char shmat();
  4951. int main() {
  4952. shmat()
  4953. ; return 0; }
  4954. EOF
  4955. if { (eval echo configure:5752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4956. rm -rf conftest*
  4957. eval "ac_cv_lib_$ac_lib_var=yes"
  4958. else
  4959. echo "configure: failed program was:" >&5
  4960. cat conftest.$ac_ext >&5
  4961. rm -rf conftest*
  4962. eval "ac_cv_lib_$ac_lib_var=no"
  4963. fi
  4964. rm -f conftest*
  4965. LIBS="$ac_save_LIBS"
  4966. fi
  4967. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4968. echo "$ac_t""yes" 1>&6
  4969. X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
  4970. else
  4971. echo "$ac_t""no" 1>&6
  4972. fi
  4973. fi
  4974. fi
  4975. # Check for libraries that X11R6 Xt/Xaw programs need.
  4976. ac_save_LDFLAGS="$LDFLAGS"
  4977. test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
  4978. # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
  4979. # check for ICE first), but we must link in the order -lSM -lICE or
  4980. # we get undefined symbols. So assume we have SM if we have ICE.
  4981. # These have to be linked with before -lX11, unlike the other
  4982. # libraries we check for below, so use a different variable.
  4983. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
  4984. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
  4985. echo "configure:5785: checking for IceConnectionNumber in -lICE" >&5
  4986. ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
  4987. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4988. echo $ac_n "(cached) $ac_c" 1>&6
  4989. else
  4990. ac_save_LIBS="$LIBS"
  4991. LIBS="-lICE $X_EXTRA_LIBS $LIBS"
  4992. cat > conftest.$ac_ext <<EOF
  4993. #line 5793 "configure"
  4994. #include "confdefs.h"
  4995. /* Override any gcc2 internal prototype to avoid an error. */
  4996. /* We use char because int might match the return type of a gcc2
  4997. builtin and then its argument prototype would still apply. */
  4998. char IceConnectionNumber();
  4999. int main() {
  5000. IceConnectionNumber()
  5001. ; return 0; }
  5002. EOF
  5003. if { (eval echo configure:5804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5004. rm -rf conftest*
  5005. eval "ac_cv_lib_$ac_lib_var=yes"
  5006. else
  5007. echo "configure: failed program was:" >&5
  5008. cat conftest.$ac_ext >&5
  5009. rm -rf conftest*
  5010. eval "ac_cv_lib_$ac_lib_var=no"
  5011. fi
  5012. rm -f conftest*
  5013. LIBS="$ac_save_LIBS"
  5014. fi
  5015. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5016. echo "$ac_t""yes" 1>&6
  5017. X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
  5018. else
  5019. echo "$ac_t""no" 1>&6
  5020. fi
  5021. LDFLAGS="$ac_save_LDFLAGS"
  5022. fi
  5023. # SYSTEM_NAME=`echo "$cf_cv_system_name"|tr ' ' -`
  5024. cf_have_X_LIBS=no
  5025. LDFLAGS="$X_LIBS $LDFLAGS"
  5026. test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
  5027. echo "${as_me-configure}:5840: testing checking additions to CFLAGS ..." 1>&5
  5028. cf_check_cflags="$CFLAGS"
  5029. cf_check_cppflags="$CPPFLAGS"
  5030. cf_fix_cppflags=no
  5031. cf_new_cflags=
  5032. cf_new_cppflags=
  5033. cf_new_extra_cppflags=
  5034. for cf_add_cflags in $X_CFLAGS
  5035. do
  5036. case $cf_fix_cppflags in
  5037. no)
  5038. case $cf_add_cflags in #(vi
  5039. -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
  5040. case $cf_add_cflags in
  5041. -D*)
  5042. cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
  5043. test "${cf_add_cflags}" != "${cf_tst_cflags}" \
  5044. && test -z "${cf_tst_cflags}" \
  5045. && cf_fix_cppflags=yes
  5046. if test $cf_fix_cppflags = yes ; then
  5047. cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
  5048. continue
  5049. elif test "${cf_tst_cflags}" = "\"'" ; then
  5050. cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
  5051. continue
  5052. fi
  5053. ;;
  5054. esac
  5055. case "$CPPFLAGS" in
  5056. *$cf_add_cflags) #(vi
  5057. ;;
  5058. *) #(vi
  5059. cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
  5060. ;;
  5061. esac
  5062. ;;
  5063. *)
  5064. cf_new_cflags="$cf_new_cflags $cf_add_cflags"
  5065. ;;
  5066. esac
  5067. ;;
  5068. yes)
  5069. cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
  5070. cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
  5071. test "${cf_add_cflags}" != "${cf_tst_cflags}" \
  5072. && test -z "${cf_tst_cflags}" \
  5073. && cf_fix_cppflags=no
  5074. ;;
  5075. esac
  5076. done
  5077. if test -n "$cf_new_cflags" ; then
  5078. test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
  5079. echo "${as_me-configure}:5902: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
  5080. CFLAGS="$CFLAGS $cf_new_cflags"
  5081. fi
  5082. if test -n "$cf_new_cppflags" ; then
  5083. test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
  5084. echo "${as_me-configure}:5911: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
  5085. CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
  5086. fi
  5087. if test -n "$cf_new_extra_cppflags" ; then
  5088. test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
  5089. echo "${as_me-configure}:5920: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
  5090. EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
  5091. fi
  5092. if test "$cf_check_cflags" != "$CFLAGS" ; then
  5093. cat > conftest.$ac_ext <<EOF
  5094. #line 5931 "configure"
  5095. #include "confdefs.h"
  5096. #include <stdio.h>
  5097. int main() {
  5098. printf("Hello world");
  5099. ; return 0; }
  5100. EOF
  5101. if { (eval echo configure:5938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5102. :
  5103. else
  5104. echo "configure: failed program was:" >&5
  5105. cat conftest.$ac_ext >&5
  5106. rm -rf conftest*
  5107. test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
  5108. echo "${as_me-configure}:5946: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
  5109. if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
  5110. test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
  5111. echo "${as_me-configure}:5952: testing but keeping change to \$CPPFLAGS ..." 1>&5
  5112. fi
  5113. CFLAGS="$cf_check_flags"
  5114. fi
  5115. rm -f conftest*
  5116. fi
  5117. echo $ac_n "checking for XOpenDisplay""... $ac_c" 1>&6
  5118. echo "configure:5963: checking for XOpenDisplay" >&5
  5119. if eval "test \"`echo '$''{'ac_cv_func_XOpenDisplay'+set}'`\" = set"; then
  5120. echo $ac_n "(cached) $ac_c" 1>&6
  5121. else
  5122. cat > conftest.$ac_ext <<EOF
  5123. #line 5968 "configure"
  5124. #include "confdefs.h"
  5125. /* System header to define __stub macros and hopefully few prototypes,
  5126. which can conflict with char XOpenDisplay(); below. */
  5127. #include <assert.h>
  5128. /* Override any gcc2 internal prototype to avoid an error. */
  5129. /* We use char because int might match the return type of a gcc2
  5130. builtin and then its argument prototype would still apply. */
  5131. char XOpenDisplay();
  5132. int main() {
  5133. /* The GNU C library defines this for functions which it implements
  5134. to always fail with ENOSYS. Some functions are actually named
  5135. something starting with __ and the normal name is an alias. */
  5136. #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
  5137. choke me
  5138. #else
  5139. XOpenDisplay();
  5140. #endif
  5141. ; return 0; }
  5142. EOF
  5143. if { (eval echo configure:5991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5144. rm -rf conftest*
  5145. eval "ac_cv_func_XOpenDisplay=yes"
  5146. else
  5147. echo "configure: failed program was:" >&5
  5148. cat conftest.$ac_ext >&5
  5149. rm -rf conftest*
  5150. eval "ac_cv_func_XOpenDisplay=no"
  5151. fi
  5152. rm -f conftest*
  5153. fi
  5154. if eval "test \"`echo '$ac_cv_func_'XOpenDisplay`\" = yes"; then
  5155. echo "$ac_t""yes" 1>&6
  5156. :
  5157. else
  5158. echo "$ac_t""no" 1>&6
  5159. echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
  5160. echo "configure:6010: checking for XOpenDisplay in -lX11" >&5
  5161. ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
  5162. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  5163. echo $ac_n "(cached) $ac_c" 1>&6
  5164. else
  5165. ac_save_LIBS="$LIBS"
  5166. LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
  5167. cat > conftest.$ac_ext <<EOF
  5168. #line 6018 "configure"
  5169. #include "confdefs.h"
  5170. /* Override any gcc2 internal prototype to avoid an error. */
  5171. /* We use char because int might match the return type of a gcc2
  5172. builtin and then its argument prototype would still apply. */
  5173. char XOpenDisplay();
  5174. int main() {
  5175. XOpenDisplay()
  5176. ; return 0; }
  5177. EOF
  5178. if { (eval echo configure:6029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5179. rm -rf conftest*
  5180. eval "ac_cv_lib_$ac_lib_var=yes"
  5181. else
  5182. echo "configure: failed program was:" >&5
  5183. cat conftest.$ac_ext >&5
  5184. rm -rf conftest*
  5185. eval "ac_cv_lib_$ac_lib_var=no"
  5186. fi
  5187. rm -f conftest*
  5188. LIBS="$ac_save_LIBS"
  5189. fi
  5190. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5191. echo "$ac_t""yes" 1>&6
  5192. LIBS="-lX11 $LIBS"
  5193. else
  5194. echo "$ac_t""no" 1>&6
  5195. fi
  5196. fi
  5197. echo $ac_n "checking for XtAppInitialize""... $ac_c" 1>&6
  5198. echo "configure:6053: checking for XtAppInitialize" >&5
  5199. if eval "test \"`echo '$''{'ac_cv_func_XtAppInitialize'+set}'`\" = set"; then
  5200. echo $ac_n "(cached) $ac_c" 1>&6
  5201. else
  5202. cat > conftest.$ac_ext <<EOF
  5203. #line 6058 "configure"
  5204. #include "confdefs.h"
  5205. /* System header to define __stub macros and hopefully few prototypes,
  5206. which can conflict with char XtAppInitialize(); below. */
  5207. #include <assert.h>
  5208. /* Override any gcc2 internal prototype to avoid an error. */
  5209. /* We use char because int might match the return type of a gcc2
  5210. builtin and then its argument prototype would still apply. */
  5211. char XtAppInitialize();
  5212. int main() {
  5213. /* The GNU C library defines this for functions which it implements
  5214. to always fail with ENOSYS. Some functions are actually named
  5215. something starting with __ and the normal name is an alias. */
  5216. #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
  5217. choke me
  5218. #else
  5219. XtAppInitialize();
  5220. #endif
  5221. ; return 0; }
  5222. EOF
  5223. if { (eval echo configure:6081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5224. rm -rf conftest*
  5225. eval "ac_cv_func_XtAppInitialize=yes"
  5226. else
  5227. echo "configure: failed program was:" >&5
  5228. cat conftest.$ac_ext >&5
  5229. rm -rf conftest*
  5230. eval "ac_cv_func_XtAppInitialize=no"
  5231. fi
  5232. rm -f conftest*
  5233. fi
  5234. if eval "test \"`echo '$ac_cv_func_'XtAppInitialize`\" = yes"; then
  5235. echo "$ac_t""yes" 1>&6
  5236. :
  5237. else
  5238. echo "$ac_t""no" 1>&6
  5239. echo $ac_n "checking for XtAppInitialize in -lXt""... $ac_c" 1>&6
  5240. echo "configure:6100: checking for XtAppInitialize in -lXt" >&5
  5241. ac_lib_var=`echo Xt'_'XtAppInitialize | sed 'y%./+-%__p_%'`
  5242. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  5243. echo $ac_n "(cached) $ac_c" 1>&6
  5244. else
  5245. ac_save_LIBS="$LIBS"
  5246. LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
  5247. cat > conftest.$ac_ext <<EOF
  5248. #line 6108 "configure"
  5249. #include "confdefs.h"
  5250. /* Override any gcc2 internal prototype to avoid an error. */
  5251. /* We use char because int might match the return type of a gcc2
  5252. builtin and then its argument prototype would still apply. */
  5253. char XtAppInitialize();
  5254. int main() {
  5255. XtAppInitialize()
  5256. ; return 0; }
  5257. EOF
  5258. if { (eval echo configure:6119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5259. rm -rf conftest*
  5260. eval "ac_cv_lib_$ac_lib_var=yes"
  5261. else
  5262. echo "configure: failed program was:" >&5
  5263. cat conftest.$ac_ext >&5
  5264. rm -rf conftest*
  5265. eval "ac_cv_lib_$ac_lib_var=no"
  5266. fi
  5267. rm -f conftest*
  5268. LIBS="$ac_save_LIBS"
  5269. fi
  5270. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5271. echo "$ac_t""yes" 1>&6
  5272. cat >> confdefs.h <<\EOF
  5273. #define HAVE_LIBXT 1
  5274. EOF
  5275. cf_have_X_LIBS=Xt
  5276. LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
  5277. else
  5278. echo "$ac_t""no" 1>&6
  5279. fi
  5280. fi
  5281. if test $cf_have_X_LIBS = no ; then
  5282. echo "configure: warning: Unable to successfully link X Toolkit library (-lXt) with
  5283. test program. You will have to check and add the proper libraries by hand
  5284. to makefile." 1>&2
  5285. fi
  5286. cf_x_athena=${cf_x_athena-Xaw}
  5287. echo $ac_n "checking if you want to link with Xaw 3d library""... $ac_c" 1>&6
  5288. echo "configure:6157: checking if you want to link with Xaw 3d library" >&5
  5289. withval=
  5290. # Check whether --with-Xaw3d or --without-Xaw3d was given.
  5291. if test "${with_Xaw3d+set}" = set; then
  5292. withval="$with_Xaw3d"
  5293. :
  5294. fi
  5295. if test "$withval" = yes ; then
  5296. cf_x_athena=Xaw3d
  5297. echo "$ac_t""yes" 1>&6
  5298. else
  5299. echo "$ac_t""no" 1>&6
  5300. fi
  5301. echo $ac_n "checking if you want to link with neXT Athena library""... $ac_c" 1>&6
  5302. echo "configure:6174: checking if you want to link with neXT Athena library" >&5
  5303. withval=
  5304. # Check whether --with-neXtaw or --without-neXtaw was given.
  5305. if test "${with_neXtaw+set}" = set; then
  5306. withval="$with_neXtaw"
  5307. :
  5308. fi
  5309. if test "$withval" = yes ; then
  5310. cf_x_athena=neXtaw
  5311. echo "$ac_t""yes" 1>&6
  5312. else
  5313. echo "$ac_t""no" 1>&6
  5314. fi
  5315. echo $ac_n "checking if you want to link with Athena-Plus library""... $ac_c" 1>&6
  5316. echo "configure:6191: checking if you want to link with Athena-Plus library" >&5
  5317. withval=
  5318. # Check whether --with-XawPlus or --without-XawPlus was given.
  5319. if test "${with_XawPlus+set}" = set; then
  5320. withval="$with_XawPlus"
  5321. :
  5322. fi
  5323. if test "$withval" = yes ; then
  5324. cf_x_athena=XawPlus
  5325. echo "$ac_t""yes" 1>&6
  5326. else
  5327. echo "$ac_t""no" 1>&6
  5328. fi
  5329. echo $ac_n "checking for XextCreateExtension in -lXext""... $ac_c" 1>&6
  5330. echo "configure:6208: checking for XextCreateExtension in -lXext" >&5
  5331. ac_lib_var=`echo Xext'_'XextCreateExtension | sed 'y%./+-%__p_%'`
  5332. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  5333. echo $ac_n "(cached) $ac_c" 1>&6
  5334. else
  5335. ac_save_LIBS="$LIBS"
  5336. LIBS="-lXext $LIBS"
  5337. cat > conftest.$ac_ext <<EOF
  5338. #line 6216 "configure"
  5339. #include "confdefs.h"
  5340. /* Override any gcc2 internal prototype to avoid an error. */
  5341. /* We use char because int might match the return type of a gcc2
  5342. builtin and then its argument prototype would still apply. */
  5343. char XextCreateExtension();
  5344. int main() {
  5345. XextCreateExtension()
  5346. ; return 0; }
  5347. EOF
  5348. if { (eval echo configure:6227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5349. rm -rf conftest*
  5350. eval "ac_cv_lib_$ac_lib_var=yes"
  5351. else
  5352. echo "configure: failed program was:" >&5
  5353. cat conftest.$ac_ext >&5
  5354. rm -rf conftest*
  5355. eval "ac_cv_lib_$ac_lib_var=no"
  5356. fi
  5357. rm -f conftest*
  5358. LIBS="$ac_save_LIBS"
  5359. fi
  5360. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5361. echo "$ac_t""yes" 1>&6
  5362. LIBS="-lXext $LIBS"
  5363. else
  5364. echo "$ac_t""no" 1>&6
  5365. fi
  5366. cf_x_athena_lib=""
  5367. cf_x_athena_root=$cf_x_athena
  5368. cf_x_athena_include=""
  5369. for cf_path in default \
  5370. /usr/contrib/X11R6 \
  5371. /usr/contrib/X11R5 \
  5372. /usr/lib/X11R5 \
  5373. /usr/local
  5374. do
  5375. if test -z "$cf_x_athena_include" ; then
  5376. cf_save="$CPPFLAGS"
  5377. cf_test=X11/$cf_x_athena_root/SimpleMenu.h
  5378. if test $cf_path != default ; then
  5379. CPPFLAGS="-I$cf_path/include $cf_save"
  5380. echo $ac_n "checking for $cf_test in $cf_path""... $ac_c" 1>&6
  5381. echo "configure:6266: checking for $cf_test in $cf_path" >&5
  5382. else
  5383. echo $ac_n "checking for $cf_test""... $ac_c" 1>&6
  5384. echo "configure:6269: checking for $cf_test" >&5
  5385. fi
  5386. cat > conftest.$ac_ext <<EOF
  5387. #line 6272 "configure"
  5388. #include "confdefs.h"
  5389. #include <X11/Intrinsic.h>
  5390. #include <$cf_test>
  5391. int main() {
  5392. ; return 0; }
  5393. EOF
  5394. if { (eval echo configure:6281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  5395. rm -rf conftest*
  5396. cf_result=yes
  5397. else
  5398. echo "configure: failed program was:" >&5
  5399. cat conftest.$ac_ext >&5
  5400. rm -rf conftest*
  5401. cf_result=no
  5402. fi
  5403. rm -f conftest*
  5404. echo "$ac_t""$cf_result" 1>&6
  5405. if test "$cf_result" = yes ; then
  5406. cf_x_athena_include=$cf_path
  5407. break
  5408. else
  5409. CPPFLAGS="$cf_save"
  5410. fi
  5411. fi
  5412. done
  5413. if test -z "$cf_x_athena_include" ; then
  5414. echo "configure: warning: Unable to successfully find Athena header files with test program" 1>&2
  5415. elif test "$cf_x_athena_include" != default ; then
  5416. CPPFLAGS="$CPPFLAGS -I$cf_x_athena_include"
  5417. fi
  5418. cf_x_athena_root=$cf_x_athena
  5419. cf_x_athena_lib=""
  5420. for cf_path in default \
  5421. /usr/contrib/X11R6 \
  5422. /usr/contrib/X11R5 \
  5423. /usr/lib/X11R5 \
  5424. /usr/local
  5425. do
  5426. for cf_lib in \
  5427. "-l$cf_x_athena_root -lXmu" \
  5428. "-l$cf_x_athena_root -lXpm -lXmu" \
  5429. "-l${cf_x_athena_root}_s -lXmu_s"
  5430. do
  5431. if test -z "$cf_x_athena_lib" ; then
  5432. cf_save="$LIBS"
  5433. cf_test=XawSimpleMenuAddGlobalActions
  5434. if test $cf_path != default ; then
  5435. LIBS="-L$cf_path/lib $cf_lib $LIBS"
  5436. echo $ac_n "checking for $cf_lib in $cf_path""... $ac_c" 1>&6
  5437. echo "configure:6328: checking for $cf_lib in $cf_path" >&5
  5438. else
  5439. LIBS="$cf_lib $LIBS"
  5440. echo $ac_n "checking for $cf_test in $cf_lib""... $ac_c" 1>&6
  5441. echo "configure:6332: checking for $cf_test in $cf_lib" >&5
  5442. fi
  5443. cat > conftest.$ac_ext <<EOF
  5444. #line 6335 "configure"
  5445. #include "confdefs.h"
  5446. int main() {
  5447. $cf_test()
  5448. ; return 0; }
  5449. EOF
  5450. if { (eval echo configure:6342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5451. rm -rf conftest*
  5452. cf_result=yes
  5453. else
  5454. echo "configure: failed program was:" >&5
  5455. cat conftest.$ac_ext >&5
  5456. rm -rf conftest*
  5457. cf_result=no
  5458. fi
  5459. rm -f conftest*
  5460. echo "$ac_t""$cf_result" 1>&6
  5461. if test "$cf_result" = yes ; then
  5462. cf_x_athena_lib="$cf_lib"
  5463. break
  5464. fi
  5465. LIBS="$cf_save"
  5466. fi
  5467. done
  5468. done
  5469. if test -z "$cf_x_athena_lib" ; then
  5470. { echo "configure: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" 1>&2; exit 1; }
  5471. fi
  5472. cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
  5473. cat >> confdefs.h <<EOF
  5474. #define $cf_x_athena_LIBS 1
  5475. EOF
  5476. for ac_prog in xcurses-config
  5477. do
  5478. # Extract the first word of "$ac_prog", so it can be a program name with args.
  5479. set dummy $ac_prog; ac_word=$2
  5480. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  5481. echo "configure:6383: checking for $ac_word" >&5
  5482. if eval "test \"`echo '$''{'ac_cv_path_XCURSES_CONFIG'+set}'`\" = set"; then
  5483. echo $ac_n "(cached) $ac_c" 1>&6
  5484. else
  5485. case "$XCURSES_CONFIG" in
  5486. /*)
  5487. ac_cv_path_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test with a path.
  5488. ;;
  5489. ?:/*)
  5490. ac_cv_path_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test with a dos path.
  5491. ;;
  5492. *)
  5493. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  5494. ac_dummy="$PATH"
  5495. for ac_dir in $ac_dummy; do
  5496. test -z "$ac_dir" && ac_dir=.
  5497. if test -f $ac_dir/$ac_word; then
  5498. ac_cv_path_XCURSES_CONFIG="$ac_dir/$ac_word"
  5499. break
  5500. fi
  5501. done
  5502. IFS="$ac_save_ifs"
  5503. ;;
  5504. esac
  5505. fi
  5506. XCURSES_CONFIG="$ac_cv_path_XCURSES_CONFIG"
  5507. if test -n "$XCURSES_CONFIG"; then
  5508. echo "$ac_t""$XCURSES_CONFIG" 1>&6
  5509. else
  5510. echo "$ac_t""no" 1>&6
  5511. fi
  5512. test -n "$XCURSES_CONFIG" && break
  5513. done
  5514. test -n "$XCURSES_CONFIG" || XCURSES_CONFIG="none"
  5515. if test "$XCURSES_CONFIG" != none ; then
  5516. CPPFLAGS="`$XCURSES_CONFIG --cflags` $CPPFLAGS"
  5517. LIBS="`$XCURSES_CONFIG --libs` $LIBS"
  5518. cf_cv_lib_XCurses=yes
  5519. else
  5520. LDFLAGS="$LDFLAGS $X_LIBS"
  5521. test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
  5522. echo "${as_me-configure}:6433: testing checking additions to CFLAGS ..." 1>&5
  5523. cf_check_cflags="$CFLAGS"
  5524. cf_check_cppflags="$CPPFLAGS"
  5525. cf_fix_cppflags=no
  5526. cf_new_cflags=
  5527. cf_new_cppflags=
  5528. cf_new_extra_cppflags=
  5529. for cf_add_cflags in $X_CFLAGS
  5530. do
  5531. case $cf_fix_cppflags in
  5532. no)
  5533. case $cf_add_cflags in #(vi
  5534. -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
  5535. case $cf_add_cflags in
  5536. -D*)
  5537. cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
  5538. test "${cf_add_cflags}" != "${cf_tst_cflags}" \
  5539. && test -z "${cf_tst_cflags}" \
  5540. && cf_fix_cppflags=yes
  5541. if test $cf_fix_cppflags = yes ; then
  5542. cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
  5543. continue
  5544. elif test "${cf_tst_cflags}" = "\"'" ; then
  5545. cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
  5546. continue
  5547. fi
  5548. ;;
  5549. esac
  5550. case "$CPPFLAGS" in
  5551. *$cf_add_cflags) #(vi
  5552. ;;
  5553. *) #(vi
  5554. cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
  5555. ;;
  5556. esac
  5557. ;;
  5558. *)
  5559. cf_new_cflags="$cf_new_cflags $cf_add_cflags"
  5560. ;;
  5561. esac
  5562. ;;
  5563. yes)
  5564. cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
  5565. cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
  5566. test "${cf_add_cflags}" != "${cf_tst_cflags}" \
  5567. && test -z "${cf_tst_cflags}" \
  5568. && cf_fix_cppflags=no
  5569. ;;
  5570. esac
  5571. done
  5572. if test -n "$cf_new_cflags" ; then
  5573. test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
  5574. echo "${as_me-configure}:6495: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
  5575. CFLAGS="$CFLAGS $cf_new_cflags"
  5576. fi
  5577. if test -n "$cf_new_cppflags" ; then
  5578. test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
  5579. echo "${as_me-configure}:6504: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
  5580. CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
  5581. fi
  5582. if test -n "$cf_new_extra_cppflags" ; then
  5583. test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
  5584. echo "${as_me-configure}:6513: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
  5585. EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
  5586. fi
  5587. if test "$cf_check_cflags" != "$CFLAGS" ; then
  5588. cat > conftest.$ac_ext <<EOF
  5589. #line 6524 "configure"
  5590. #include "confdefs.h"
  5591. #include <stdio.h>
  5592. int main() {
  5593. printf("Hello world");
  5594. ; return 0; }
  5595. EOF
  5596. if { (eval echo configure:6531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5597. :
  5598. else
  5599. echo "configure: failed program was:" >&5
  5600. cat conftest.$ac_ext >&5
  5601. rm -rf conftest*
  5602. test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
  5603. echo "${as_me-configure}:6539: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
  5604. if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
  5605. test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
  5606. echo "${as_me-configure}:6545: testing but keeping change to \$CPPFLAGS ..." 1>&5
  5607. fi
  5608. CFLAGS="$cf_check_flags"
  5609. fi
  5610. rm -f conftest*
  5611. fi
  5612. echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
  5613. echo "configure:6555: checking for XOpenDisplay in -lX11" >&5
  5614. ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
  5615. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  5616. echo $ac_n "(cached) $ac_c" 1>&6
  5617. else
  5618. ac_save_LIBS="$LIBS"
  5619. LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
  5620. cat > conftest.$ac_ext <<EOF
  5621. #line 6563 "configure"
  5622. #include "confdefs.h"
  5623. /* Override any gcc2 internal prototype to avoid an error. */
  5624. /* We use char because int might match the return type of a gcc2
  5625. builtin and then its argument prototype would still apply. */
  5626. char XOpenDisplay();
  5627. int main() {
  5628. XOpenDisplay()
  5629. ; return 0; }
  5630. EOF
  5631. if { (eval echo configure:6574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5632. rm -rf conftest*
  5633. eval "ac_cv_lib_$ac_lib_var=yes"
  5634. else
  5635. echo "configure: failed program was:" >&5
  5636. cat conftest.$ac_ext >&5
  5637. rm -rf conftest*
  5638. eval "ac_cv_lib_$ac_lib_var=no"
  5639. fi
  5640. rm -f conftest*
  5641. LIBS="$ac_save_LIBS"
  5642. fi
  5643. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5644. echo "$ac_t""yes" 1>&6
  5645. LIBS="-lX11 $LIBS"
  5646. else
  5647. echo "$ac_t""no" 1>&6
  5648. fi
  5649. echo $ac_n "checking for XCurses library""... $ac_c" 1>&6
  5650. echo "configure:6595: checking for XCurses library" >&5
  5651. if eval "test \"`echo '$''{'cf_cv_lib_XCurses'+set}'`\" = set"; then
  5652. echo $ac_n "(cached) $ac_c" 1>&6
  5653. else
  5654. LIBS="-lXCurses $LIBS"
  5655. cat > conftest.$ac_ext <<EOF
  5656. #line 6602 "configure"
  5657. #include "confdefs.h"
  5658. #include <xcurses.h>
  5659. char *XCursesProgramName = "test";
  5660. int main() {
  5661. XCursesExit();
  5662. ; return 0; }
  5663. EOF
  5664. if { (eval echo configure:6612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5665. rm -rf conftest*
  5666. cf_cv_lib_XCurses=yes
  5667. else
  5668. echo "configure: failed program was:" >&5
  5669. cat conftest.$ac_ext >&5
  5670. rm -rf conftest*
  5671. cf_cv_lib_XCurses=no
  5672. fi
  5673. rm -f conftest*
  5674. fi
  5675. echo "$ac_t""$cf_cv_lib_XCurses" 1>&6
  5676. fi
  5677. if test $cf_cv_lib_XCurses = yes ; then
  5678. cat >> confdefs.h <<\EOF
  5679. #define UNIX 1
  5680. EOF
  5681. cat >> confdefs.h <<\EOF
  5682. #define XCURSES 1
  5683. EOF
  5684. cat >> confdefs.h <<\EOF
  5685. #define HAVE_XCURSES 1
  5686. EOF
  5687. else
  5688. { echo "configure: error: Cannot link with XCurses" 1>&2; exit 1; }
  5689. fi
  5690. ;;
  5691. esac
  5692. case $cf_cv_screen in #(vi
  5693. pdcurses) #(vi
  5694. ;;
  5695. *)
  5696. # look for curses-related libraries
  5697. echo $ac_n "checking for new_panel in -lpanel$cf_cv_libtype""... $ac_c" 1>&6
  5698. echo "configure:6657: checking for new_panel in -lpanel$cf_cv_libtype" >&5
  5699. ac_lib_var=`echo panel$cf_cv_libtype'_'new_panel | sed 'y%./+-%__p_%'`
  5700. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  5701. echo $ac_n "(cached) $ac_c" 1>&6
  5702. else
  5703. ac_save_LIBS="$LIBS"
  5704. LIBS="-lpanel$cf_cv_libtype $LIBS"
  5705. cat > conftest.$ac_ext <<EOF
  5706. #line 6665 "configure"
  5707. #include "confdefs.h"
  5708. /* Override any gcc2 internal prototype to avoid an error. */
  5709. /* We use char because int might match the return type of a gcc2
  5710. builtin and then its argument prototype would still apply. */
  5711. char new_panel();
  5712. int main() {
  5713. new_panel()
  5714. ; return 0; }
  5715. EOF
  5716. if { (eval echo configure:6676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5717. rm -rf conftest*
  5718. eval "ac_cv_lib_$ac_lib_var=yes"
  5719. else
  5720. echo "configure: failed program was:" >&5
  5721. cat conftest.$ac_ext >&5
  5722. rm -rf conftest*
  5723. eval "ac_cv_lib_$ac_lib_var=no"
  5724. fi
  5725. rm -f conftest*
  5726. LIBS="$ac_save_LIBS"
  5727. fi
  5728. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5729. echo "$ac_t""yes" 1>&6
  5730. ac_tr_lib=HAVE_LIB`echo panel$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  5731. -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  5732. cat >> confdefs.h <<EOF
  5733. #define $ac_tr_lib 1
  5734. EOF
  5735. LIBS="-lpanel$cf_cv_libtype $LIBS"
  5736. else
  5737. echo "$ac_t""no" 1>&6
  5738. fi
  5739. echo $ac_n "checking for menu_driver in -lmenu$cf_cv_libtype""... $ac_c" 1>&6
  5740. echo "configure:6704: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
  5741. ac_lib_var=`echo menu$cf_cv_libtype'_'menu_driver | sed 'y%./+-%__p_%'`
  5742. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  5743. echo $ac_n "(cached) $ac_c" 1>&6
  5744. else
  5745. ac_save_LIBS="$LIBS"
  5746. LIBS="-lmenu$cf_cv_libtype $LIBS"
  5747. cat > conftest.$ac_ext <<EOF
  5748. #line 6712 "configure"
  5749. #include "confdefs.h"
  5750. /* Override any gcc2 internal prototype to avoid an error. */
  5751. /* We use char because int might match the return type of a gcc2
  5752. builtin and then its argument prototype would still apply. */
  5753. char menu_driver();
  5754. int main() {
  5755. menu_driver()
  5756. ; return 0; }
  5757. EOF
  5758. if { (eval echo configure:6723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5759. rm -rf conftest*
  5760. eval "ac_cv_lib_$ac_lib_var=yes"
  5761. else
  5762. echo "configure: failed program was:" >&5
  5763. cat conftest.$ac_ext >&5
  5764. rm -rf conftest*
  5765. eval "ac_cv_lib_$ac_lib_var=no"
  5766. fi
  5767. rm -f conftest*
  5768. LIBS="$ac_save_LIBS"
  5769. fi
  5770. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5771. echo "$ac_t""yes" 1>&6
  5772. ac_tr_lib=HAVE_LIB`echo menu$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  5773. -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  5774. cat >> confdefs.h <<EOF
  5775. #define $ac_tr_lib 1
  5776. EOF
  5777. LIBS="-lmenu$cf_cv_libtype $LIBS"
  5778. else
  5779. echo "$ac_t""no" 1>&6
  5780. fi
  5781. echo $ac_n "checking for form_driver in -lform$cf_cv_libtype""... $ac_c" 1>&6
  5782. echo "configure:6751: checking for form_driver in -lform$cf_cv_libtype" >&5
  5783. ac_lib_var=`echo form$cf_cv_libtype'_'form_driver | sed 'y%./+-%__p_%'`
  5784. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  5785. echo $ac_n "(cached) $ac_c" 1>&6
  5786. else
  5787. ac_save_LIBS="$LIBS"
  5788. LIBS="-lform$cf_cv_libtype $LIBS"
  5789. cat > conftest.$ac_ext <<EOF
  5790. #line 6759 "configure"
  5791. #include "confdefs.h"
  5792. /* Override any gcc2 internal prototype to avoid an error. */
  5793. /* We use char because int might match the return type of a gcc2
  5794. builtin and then its argument prototype would still apply. */
  5795. char form_driver();
  5796. int main() {
  5797. form_driver()
  5798. ; return 0; }
  5799. EOF
  5800. if { (eval echo configure:6770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5801. rm -rf conftest*
  5802. eval "ac_cv_lib_$ac_lib_var=yes"
  5803. else
  5804. echo "configure: failed program was:" >&5
  5805. cat conftest.$ac_ext >&5
  5806. rm -rf conftest*
  5807. eval "ac_cv_lib_$ac_lib_var=no"
  5808. fi
  5809. rm -f conftest*
  5810. LIBS="$ac_save_LIBS"
  5811. fi
  5812. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5813. echo "$ac_t""yes" 1>&6
  5814. ac_tr_lib=HAVE_LIB`echo form$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  5815. -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  5816. cat >> confdefs.h <<EOF
  5817. #define $ac_tr_lib 1
  5818. EOF
  5819. LIBS="-lform$cf_cv_libtype $LIBS"
  5820. else
  5821. echo "$ac_t""no" 1>&6
  5822. fi
  5823. # look for curses-related headers
  5824. for ac_hdr in \
  5825. nc_alloc.h \
  5826. nomacros.h \
  5827. form.h \
  5828. menu.h \
  5829. panel.h \
  5830. do
  5831. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5832. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5833. echo "configure:6809: checking for $ac_hdr" >&5
  5834. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  5835. echo $ac_n "(cached) $ac_c" 1>&6
  5836. else
  5837. cat > conftest.$ac_ext <<EOF
  5838. #line 6814 "configure"
  5839. #include "confdefs.h"
  5840. #include <$ac_hdr>
  5841. EOF
  5842. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5843. { (eval echo configure:6819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5844. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5845. if test -z "$ac_err"; then
  5846. rm -rf conftest*
  5847. eval "ac_cv_header_$ac_safe=yes"
  5848. else
  5849. echo "$ac_err" >&5
  5850. echo "configure: failed program was:" >&5
  5851. cat conftest.$ac_ext >&5
  5852. rm -rf conftest*
  5853. eval "ac_cv_header_$ac_safe=no"
  5854. fi
  5855. rm -f conftest*
  5856. fi
  5857. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5858. echo "$ac_t""yes" 1>&6
  5859. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5860. cat >> confdefs.h <<EOF
  5861. #define $ac_tr_hdr 1
  5862. EOF
  5863. else
  5864. echo "$ac_t""no" 1>&6
  5865. fi
  5866. done
  5867. ;;
  5868. esac
  5869. echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
  5870. echo "configure:6849: checking return type of signal handlers" >&5
  5871. if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
  5872. echo $ac_n "(cached) $ac_c" 1>&6
  5873. else
  5874. cat > conftest.$ac_ext <<EOF
  5875. #line 6854 "configure"
  5876. #include "confdefs.h"
  5877. #include <sys/types.h>
  5878. #include <signal.h>
  5879. #ifdef signal
  5880. #undef signal
  5881. #endif
  5882. #ifdef __cplusplus
  5883. extern "C" void (*signal (int, void (*)(int)))(int);
  5884. #else
  5885. void (*signal ()) ();
  5886. #endif
  5887. int main() {
  5888. int i;
  5889. ; return 0; }
  5890. EOF
  5891. if { (eval echo configure:6871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  5892. rm -rf conftest*
  5893. ac_cv_type_signal=void
  5894. else
  5895. echo "configure: failed program was:" >&5
  5896. cat conftest.$ac_ext >&5
  5897. rm -rf conftest*
  5898. ac_cv_type_signal=int
  5899. fi
  5900. rm -f conftest*
  5901. fi
  5902. echo "$ac_t""$ac_cv_type_signal" 1>&6
  5903. cat >> confdefs.h <<EOF
  5904. #define RETSIGTYPE $ac_cv_type_signal
  5905. EOF
  5906. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  5907. echo "configure:6891: checking for ANSI C header files" >&5
  5908. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  5909. echo $ac_n "(cached) $ac_c" 1>&6
  5910. else
  5911. cat > conftest.$ac_ext <<EOF
  5912. #line 6896 "configure"
  5913. #include "confdefs.h"
  5914. #include <stdlib.h>
  5915. #include <stdarg.h>
  5916. #include <string.h>
  5917. #include <float.h>
  5918. EOF
  5919. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5920. { (eval echo configure:6904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5921. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5922. if test -z "$ac_err"; then
  5923. rm -rf conftest*
  5924. ac_cv_header_stdc=yes
  5925. else
  5926. echo "$ac_err" >&5
  5927. echo "configure: failed program was:" >&5
  5928. cat conftest.$ac_ext >&5
  5929. rm -rf conftest*
  5930. ac_cv_header_stdc=no
  5931. fi
  5932. rm -f conftest*
  5933. if test $ac_cv_header_stdc = yes; then
  5934. # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  5935. cat > conftest.$ac_ext <<EOF
  5936. #line 6921 "configure"
  5937. #include "confdefs.h"
  5938. #include <string.h>
  5939. EOF
  5940. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  5941. egrep "memchr" >/dev/null 2>&1; then
  5942. :
  5943. else
  5944. rm -rf conftest*
  5945. ac_cv_header_stdc=no
  5946. fi
  5947. rm -f conftest*
  5948. fi
  5949. if test $ac_cv_header_stdc = yes; then
  5950. # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  5951. cat > conftest.$ac_ext <<EOF
  5952. #line 6939 "configure"
  5953. #include "confdefs.h"
  5954. #include <stdlib.h>
  5955. EOF
  5956. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  5957. egrep "free" >/dev/null 2>&1; then
  5958. :
  5959. else
  5960. rm -rf conftest*
  5961. ac_cv_header_stdc=no
  5962. fi
  5963. rm -f conftest*
  5964. fi
  5965. if test $ac_cv_header_stdc = yes; then
  5966. # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  5967. if test "$cross_compiling" = yes; then
  5968. :
  5969. else
  5970. cat > conftest.$ac_ext <<EOF
  5971. #line 6960 "configure"
  5972. #include "confdefs.h"
  5973. #include <ctype.h>
  5974. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  5975. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  5976. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  5977. int main () { int i; for (i = 0; i < 256; i++)
  5978. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  5979. exit (0); }
  5980. EOF
  5981. if { (eval echo configure:6971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  5982. then
  5983. :
  5984. else
  5985. echo "configure: failed program was:" >&5
  5986. cat conftest.$ac_ext >&5
  5987. rm -fr conftest*
  5988. ac_cv_header_stdc=no
  5989. fi
  5990. rm -fr conftest*
  5991. fi
  5992. fi
  5993. fi
  5994. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  5995. if test $ac_cv_header_stdc = yes; then
  5996. cat >> confdefs.h <<\EOF
  5997. #define STDC_HEADERS 1
  5998. EOF
  5999. fi
  6000. echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
  6001. echo "configure:6995: checking whether time.h and sys/time.h may both be included" >&5
  6002. if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
  6003. echo $ac_n "(cached) $ac_c" 1>&6
  6004. else
  6005. cat > conftest.$ac_ext <<EOF
  6006. #line 7000 "configure"
  6007. #include "confdefs.h"
  6008. #include <sys/types.h>
  6009. #include <sys/time.h>
  6010. #include <time.h>
  6011. int main() {
  6012. struct tm *tp;
  6013. ; return 0; }
  6014. EOF
  6015. if { (eval echo configure:7009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  6016. rm -rf conftest*
  6017. ac_cv_header_time=yes
  6018. else
  6019. echo "configure: failed program was:" >&5
  6020. cat conftest.$ac_ext >&5
  6021. rm -rf conftest*
  6022. ac_cv_header_time=no
  6023. fi
  6024. rm -f conftest*
  6025. fi
  6026. echo "$ac_t""$ac_cv_header_time" 1>&6
  6027. if test $ac_cv_header_time = yes; then
  6028. cat >> confdefs.h <<\EOF
  6029. #define TIME_WITH_SYS_TIME 1
  6030. EOF
  6031. fi
  6032. for ac_hdr in \
  6033. getopt.h \
  6034. locale.h \
  6035. stdarg.h \
  6036. sys/ioctl.h \
  6037. sys/select.h \
  6038. sys/time.h \
  6039. termios.h \
  6040. unistd.h \
  6041. do
  6042. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6043. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6044. echo "configure:7042: checking for $ac_hdr" >&5
  6045. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  6046. echo $ac_n "(cached) $ac_c" 1>&6
  6047. else
  6048. cat > conftest.$ac_ext <<EOF
  6049. #line 7047 "configure"
  6050. #include "confdefs.h"
  6051. #include <$ac_hdr>
  6052. EOF
  6053. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6054. { (eval echo configure:7052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6055. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6056. if test -z "$ac_err"; then
  6057. rm -rf conftest*
  6058. eval "ac_cv_header_$ac_safe=yes"
  6059. else
  6060. echo "$ac_err" >&5
  6061. echo "configure: failed program was:" >&5
  6062. cat conftest.$ac_ext >&5
  6063. rm -rf conftest*
  6064. eval "ac_cv_header_$ac_safe=no"
  6065. fi
  6066. rm -f conftest*
  6067. fi
  6068. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6069. echo "$ac_t""yes" 1>&6
  6070. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6071. cat >> confdefs.h <<EOF
  6072. #define $ac_tr_hdr 1
  6073. EOF
  6074. else
  6075. echo "$ac_t""no" 1>&6
  6076. fi
  6077. done
  6078. for ac_func in \
  6079. gettimeofday \
  6080. mblen \
  6081. mbrlen \
  6082. mbrtowc \
  6083. mbsrtowcs \
  6084. mbstowcs \
  6085. mbtowc \
  6086. strdup \
  6087. wcsrtombs \
  6088. wcstombs \
  6089. do
  6090. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  6091. echo "configure:7093: checking for $ac_func" >&5
  6092. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  6093. echo $ac_n "(cached) $ac_c" 1>&6
  6094. else
  6095. cat > conftest.$ac_ext <<EOF
  6096. #line 7098 "configure"
  6097. #include "confdefs.h"
  6098. /* System header to define __stub macros and hopefully few prototypes,
  6099. which can conflict with char $ac_func(); below. */
  6100. #include <assert.h>
  6101. /* Override any gcc2 internal prototype to avoid an error. */
  6102. /* We use char because int might match the return type of a gcc2
  6103. builtin and then its argument prototype would still apply. */
  6104. char $ac_func();
  6105. int main() {
  6106. /* The GNU C library defines this for functions which it implements
  6107. to always fail with ENOSYS. Some functions are actually named
  6108. something starting with __ and the normal name is an alias. */
  6109. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  6110. choke me
  6111. #else
  6112. $ac_func();
  6113. #endif
  6114. ; return 0; }
  6115. EOF
  6116. if { (eval echo configure:7121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6117. rm -rf conftest*
  6118. eval "ac_cv_func_$ac_func=yes"
  6119. else
  6120. echo "configure: failed program was:" >&5
  6121. cat conftest.$ac_ext >&5
  6122. rm -rf conftest*
  6123. eval "ac_cv_func_$ac_func=no"
  6124. fi
  6125. rm -f conftest*
  6126. fi
  6127. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  6128. echo "$ac_t""yes" 1>&6
  6129. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  6130. cat >> confdefs.h <<EOF
  6131. #define $ac_tr_func 1
  6132. EOF
  6133. else
  6134. echo "$ac_t""no" 1>&6
  6135. fi
  6136. done
  6137. echo $ac_n "checking if we must define _XOPEN_SOURCE_EXTENDED""... $ac_c" 1>&6
  6138. echo "configure:7148: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
  6139. if eval "test \"`echo '$''{'cf_cv_need_xopen_extension'+set}'`\" = set"; then
  6140. echo $ac_n "(cached) $ac_c" 1>&6
  6141. else
  6142. cat > conftest.$ac_ext <<EOF
  6143. #line 7154 "configure"
  6144. #include "confdefs.h"
  6145. #include <stdlib.h>
  6146. #include <${cf_cv_ncurses_header-curses.h}>
  6147. int main() {
  6148. long x = winnstr(stdscr, "", 0);
  6149. int x1, y1;
  6150. getbegyx(stdscr, y1, x1)
  6151. ; return 0; }
  6152. EOF
  6153. if { (eval echo configure:7166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6154. rm -rf conftest*
  6155. cf_cv_need_xopen_extension=no
  6156. else
  6157. echo "configure: failed program was:" >&5
  6158. cat conftest.$ac_ext >&5
  6159. rm -rf conftest*
  6160. cat > conftest.$ac_ext <<EOF
  6161. #line 7174 "configure"
  6162. #include "confdefs.h"
  6163. #define _XOPEN_SOURCE_EXTENDED
  6164. #include <stdlib.h>
  6165. #include <${cf_cv_ncurses_header-curses.h}>
  6166. int main() {
  6167. long x = winnstr(stdscr, "", 0);
  6168. int x1, y1;
  6169. getbegyx(stdscr, y1, x1)
  6170. ; return 0; }
  6171. EOF
  6172. if { (eval echo configure:7187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6173. rm -rf conftest*
  6174. cf_cv_need_xopen_extension=yes
  6175. else
  6176. echo "configure: failed program was:" >&5
  6177. cat conftest.$ac_ext >&5
  6178. rm -rf conftest*
  6179. cf_cv_need_xopen_extension=unknown
  6180. fi
  6181. rm -f conftest*
  6182. fi
  6183. rm -f conftest*
  6184. fi
  6185. echo "$ac_t""$cf_cv_need_xopen_extension" 1>&6
  6186. test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
  6187. echo $ac_n "checking for term.h""... $ac_c" 1>&6
  6188. echo "configure:7206: checking for term.h" >&5
  6189. if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
  6190. echo $ac_n "(cached) $ac_c" 1>&6
  6191. else
  6192. # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
  6193. # for <term.h> if we do not find the variant.
  6194. for cf_header in \
  6195. `echo ${cf_cv_ncurses_header-curses.h} | sed -e 's%/.*%/%'`term.h \
  6196. term.h
  6197. do
  6198. cat > conftest.$ac_ext <<EOF
  6199. #line 7219 "configure"
  6200. #include "confdefs.h"
  6201. #include <${cf_cv_ncurses_header-curses.h}>
  6202. #include <${cf_header}>
  6203. int main() {
  6204. WINDOW *x
  6205. ; return 0; }
  6206. EOF
  6207. if { (eval echo configure:7228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  6208. rm -rf conftest*
  6209. cf_cv_term_header=$cf_header
  6210. break
  6211. else
  6212. echo "configure: failed program was:" >&5
  6213. cat conftest.$ac_ext >&5
  6214. rm -rf conftest*
  6215. cf_cv_term_header=no
  6216. fi
  6217. rm -f conftest*
  6218. done
  6219. fi
  6220. echo "$ac_t""$cf_cv_term_header" 1>&6
  6221. case $cf_cv_term_header in #(vi
  6222. term.h) #(vi
  6223. cat >> confdefs.h <<\EOF
  6224. #define HAVE_TERM_H 1
  6225. EOF
  6226. ;;
  6227. ncurses/term.h)
  6228. cat >> confdefs.h <<\EOF
  6229. #define HAVE_NCURSES_TERM_H 1
  6230. EOF
  6231. ;;
  6232. ncursesw/term.h)
  6233. cat >> confdefs.h <<\EOF
  6234. #define HAVE_NCURSESW_TERM_H 1
  6235. EOF
  6236. ;;
  6237. esac
  6238. for cf_func in \
  6239. chgat \
  6240. color_set \
  6241. filter \
  6242. getbegx \
  6243. getcurx \
  6244. getmaxx \
  6245. getnstr \
  6246. getparx \
  6247. getwin \
  6248. mvvline \
  6249. mvwvline \
  6250. napms \
  6251. putwin \
  6252. resize_term \
  6253. resizeterm \
  6254. ripoffline \
  6255. setupterm \
  6256. slk_color \
  6257. slk_init \
  6258. termattrs \
  6259. tgetent \
  6260. tigetnum \
  6261. tigetstr \
  6262. typeahead \
  6263. use_default_colors \
  6264. vsscanf \
  6265. wchgat \
  6266. winsstr \
  6267. wresize \
  6268. do
  6269. cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
  6270. echo $ac_n "checking for ${cf_func}""... $ac_c" 1>&6
  6271. echo "configure:7305: checking for ${cf_func}" >&5
  6272. echo "${as_me-configure}:7307: testing ${cf_func} ..." 1>&5
  6273. if eval "test \"`echo '$''{'cf_cv_func_$cf_func'+set}'`\" = set"; then
  6274. echo $ac_n "(cached) $ac_c" 1>&6
  6275. else
  6276. eval cf_result='$ac_cv_func_'$cf_func
  6277. if test ".$cf_result" != ".no"; then
  6278. cat > conftest.$ac_ext <<EOF
  6279. #line 7316 "configure"
  6280. #include "confdefs.h"
  6281. #ifdef HAVE_XCURSES
  6282. #include <xcurses.h>
  6283. char * XCursesProgramName = "test";
  6284. #else
  6285. #include <${cf_cv_ncurses_header-curses.h}>
  6286. #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
  6287. #include <ncursesw/term.h>
  6288. #else
  6289. #if defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
  6290. #include <ncurses/term.h>
  6291. #else
  6292. #ifdef HAVE_TERM_H
  6293. #include <term.h>
  6294. #endif
  6295. #endif
  6296. #endif
  6297. #endif
  6298. int main() {
  6299. #ifndef ${cf_func}
  6300. long foo = (long)(&${cf_func});
  6301. ${cf_cv_main_return-return}(foo == 0);
  6302. #endif
  6303. ; return 0; }
  6304. EOF
  6305. if { (eval echo configure:7345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6306. rm -rf conftest*
  6307. cf_result=yes
  6308. else
  6309. echo "configure: failed program was:" >&5
  6310. cat conftest.$ac_ext >&5
  6311. rm -rf conftest*
  6312. cf_result=no
  6313. fi
  6314. rm -f conftest*
  6315. fi
  6316. eval 'cf_cv_func_'$cf_func'=$cf_result'
  6317. fi
  6318. # use the computed/retrieved cache-value:
  6319. eval 'cf_result=$cf_cv_func_'$cf_func
  6320. echo "$ac_t""$cf_result" 1>&6
  6321. if test $cf_result != no; then
  6322. cat >> confdefs.h <<EOF
  6323. #define HAVE_${cf_tr_func} 1
  6324. EOF
  6325. fi
  6326. done
  6327. echo $ac_n "checking for ncurses extended functions""... $ac_c" 1>&6
  6328. echo "configure:7373: checking for ncurses extended functions" >&5
  6329. if eval "test \"`echo '$''{'cf_cv_ncurses_ext_funcs'+set}'`\" = set"; then
  6330. echo $ac_n "(cached) $ac_c" 1>&6
  6331. else
  6332. cat > conftest.$ac_ext <<EOF
  6333. #line 7379 "configure"
  6334. #include "confdefs.h"
  6335. #include <${cf_cv_ncurses_header-curses.h}>
  6336. int main() {
  6337. (void) assume_default_colors (0, 0);
  6338. (void) curses_version ();
  6339. (void) define_key (0, 0);
  6340. (void) is_term_resized (0, 0);
  6341. (void) key_defined (0);
  6342. (void) keybound (0, 0);
  6343. (void) keyok (0, 0);
  6344. (void) resize_term (0, 0);
  6345. (void) resizeterm (0, 0);
  6346. (void) use_default_colors ();
  6347. (void) use_extended_names (0);
  6348. (void) wresize (0, 0, 0);
  6349. ; return 0; }
  6350. EOF
  6351. if { (eval echo configure:7399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6352. rm -rf conftest*
  6353. cf_cv_ncurses_ext_funcs=yes
  6354. else
  6355. echo "configure: failed program was:" >&5
  6356. cat conftest.$ac_ext >&5
  6357. rm -rf conftest*
  6358. cf_cv_ncurses_ext_funcs=no
  6359. fi
  6360. rm -f conftest*
  6361. fi
  6362. echo "$ac_t""$cf_cv_ncurses_ext_funcs" 1>&6
  6363. test "$cf_cv_ncurses_ext_funcs" != no && cat >> confdefs.h <<\EOF
  6364. #define NCURSES_EXT_FUNCS 1
  6365. EOF
  6366. echo $ac_n "checking for wide-character functions""... $ac_c" 1>&6
  6367. echo "configure:7419: checking for wide-character functions" >&5
  6368. if eval "test \"`echo '$''{'cf_cv_widechar_funcs'+set}'`\" = set"; then
  6369. echo $ac_n "(cached) $ac_c" 1>&6
  6370. else
  6371. cat > conftest.$ac_ext <<EOF
  6372. #line 7425 "configure"
  6373. #include "confdefs.h"
  6374. #include <${cf_cv_ncurses_header-curses.h}>
  6375. int main() {
  6376. static wchar_t src_wchar[2];
  6377. static cchar_t dst_cchar;
  6378. setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
  6379. ; return 0; }
  6380. EOF
  6381. if { (eval echo configure:7437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6382. rm -rf conftest*
  6383. cf_cv_widechar_funcs=yes
  6384. else
  6385. echo "configure: failed program was:" >&5
  6386. cat conftest.$ac_ext >&5
  6387. rm -rf conftest*
  6388. cf_cv_widechar_funcs=no
  6389. fi
  6390. rm -f conftest*
  6391. fi
  6392. echo "$ac_t""$cf_cv_widechar_funcs" 1>&6
  6393. if test "$cf_cv_widechar_funcs" != no ; then
  6394. cat >> confdefs.h <<\EOF
  6395. #define USE_WIDEC_SUPPORT 1
  6396. EOF
  6397. else
  6398. cat >> confdefs.h <<\EOF
  6399. #define USE_WIDEC_SUPPORT 0
  6400. EOF
  6401. fi
  6402. echo $ac_n "checking if sys/time.h works with sys/select.h""... $ac_c" 1>&6
  6403. echo "configure:7465: checking if sys/time.h works with sys/select.h" >&5
  6404. if eval "test \"`echo '$''{'cf_cv_sys_time_select'+set}'`\" = set"; then
  6405. echo $ac_n "(cached) $ac_c" 1>&6
  6406. else
  6407. cat > conftest.$ac_ext <<EOF
  6408. #line 7471 "configure"
  6409. #include "confdefs.h"
  6410. #include <sys/types.h>
  6411. #ifdef HAVE_SYS_TIME_H
  6412. #include <sys/time.h>
  6413. #endif
  6414. #ifdef HAVE_SYS_SELECT_H
  6415. #include <sys/select.h>
  6416. #endif
  6417. int main() {
  6418. ; return 0; }
  6419. EOF
  6420. if { (eval echo configure:7486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  6421. rm -rf conftest*
  6422. cf_cv_sys_time_select=yes
  6423. else
  6424. echo "configure: failed program was:" >&5
  6425. cat conftest.$ac_ext >&5
  6426. rm -rf conftest*
  6427. cf_cv_sys_time_select=no
  6428. fi
  6429. rm -f conftest*
  6430. fi
  6431. echo "$ac_t""$cf_cv_sys_time_select" 1>&6
  6432. test "$cf_cv_sys_time_select" = yes && cat >> confdefs.h <<\EOF
  6433. #define HAVE_SYS_TIME_SELECT 1
  6434. EOF
  6435. echo $ac_n "checking for function curses_version""... $ac_c" 1>&6
  6436. echo "configure:7507: checking for function curses_version" >&5
  6437. if eval "test \"`echo '$''{'cf_cv_func_curses_version'+set}'`\" = set"; then
  6438. echo $ac_n "(cached) $ac_c" 1>&6
  6439. else
  6440. if test "$cross_compiling" = yes; then
  6441. cf_cv_func_curses_version=unknown
  6442. else
  6443. cat > conftest.$ac_ext <<EOF
  6444. #line 7516 "configure"
  6445. #include "confdefs.h"
  6446. #include <${cf_cv_ncurses_header-curses.h}>
  6447. int main()
  6448. {
  6449. char temp[1024];
  6450. sprintf(temp, "%s\n", curses_version());
  6451. ${cf_cv_main_return-return}(0);
  6452. }
  6453. EOF
  6454. if { (eval echo configure:7528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  6455. then
  6456. cf_cv_func_curses_version=yes
  6457. else
  6458. echo "configure: failed program was:" >&5
  6459. cat conftest.$ac_ext >&5
  6460. rm -fr conftest*
  6461. cf_cv_func_curses_version=no
  6462. fi
  6463. rm -fr conftest*
  6464. fi
  6465. rm -f core
  6466. fi
  6467. echo "$ac_t""$cf_cv_func_curses_version" 1>&6
  6468. test "$cf_cv_func_curses_version" = yes && cat >> confdefs.h <<\EOF
  6469. #define HAVE_CURSES_VERSION 1
  6470. EOF
  6471. echo $ac_n "checking for alternate character set array""... $ac_c" 1>&6
  6472. echo "configure:7553: checking for alternate character set array" >&5
  6473. if eval "test \"`echo '$''{'cf_cv_curses_acs_map'+set}'`\" = set"; then
  6474. echo $ac_n "(cached) $ac_c" 1>&6
  6475. else
  6476. cf_cv_curses_acs_map=unknown
  6477. for name in acs_map _acs_map __acs_map _nc_acs_map
  6478. do
  6479. cat > conftest.$ac_ext <<EOF
  6480. #line 7562 "configure"
  6481. #include "confdefs.h"
  6482. #include <${cf_cv_ncurses_header-curses.h}>
  6483. int main() {
  6484. $name['k'] = ACS_PLUS
  6485. ; return 0; }
  6486. EOF
  6487. if { (eval echo configure:7573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6488. rm -rf conftest*
  6489. cf_cv_curses_acs_map=$name; break
  6490. else
  6491. echo "configure: failed program was:" >&5
  6492. cat conftest.$ac_ext >&5
  6493. fi
  6494. rm -f conftest*
  6495. done
  6496. fi
  6497. echo "$ac_t""$cf_cv_curses_acs_map" 1>&6
  6498. test "$cf_cv_curses_acs_map" != unknown && cat >> confdefs.h <<EOF
  6499. #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
  6500. EOF
  6501. echo $ac_n "checking for wide alternate character set array""... $ac_c" 1>&6
  6502. echo "configure:7594: checking for wide alternate character set array" >&5
  6503. if eval "test \"`echo '$''{'cf_cv_curses_wacs_map'+set}'`\" = set"; then
  6504. echo $ac_n "(cached) $ac_c" 1>&6
  6505. else
  6506. cf_cv_curses_wacs_map=unknown
  6507. for name in wacs_map _wacs_map __wacs_map _nc_wacs
  6508. do
  6509. cat > conftest.$ac_ext <<EOF
  6510. #line 7603 "configure"
  6511. #include "confdefs.h"
  6512. #ifndef _XOPEN_SOURCE_EXTENDED
  6513. #define _XOPEN_SOURCE_EXTENDED
  6514. #endif
  6515. #include <${cf_cv_ncurses_header-curses.h}>
  6516. int main() {
  6517. $name['k'] = *WACS_PLUS
  6518. ; return 0; }
  6519. EOF
  6520. if { (eval echo configure:7614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6521. rm -rf conftest*
  6522. cf_cv_curses_wacs_map=$name
  6523. break
  6524. else
  6525. echo "configure: failed program was:" >&5
  6526. cat conftest.$ac_ext >&5
  6527. fi
  6528. rm -f conftest*
  6529. done
  6530. fi
  6531. echo "$ac_t""$cf_cv_curses_wacs_map" 1>&6
  6532. echo $ac_n "checking for type attr_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
  6533. echo "configure:7630: checking for type attr_t in ${cf_cv_ncurses_header-curses.h}" >&5
  6534. cat > conftest.$ac_ext <<EOF
  6535. #line 7632 "configure"
  6536. #include "confdefs.h"
  6537. #ifndef _XOPEN_SOURCE_EXTENDED
  6538. #define _XOPEN_SOURCE_EXTENDED
  6539. #endif
  6540. #include <${cf_cv_ncurses_header-curses.h}>
  6541. int main() {
  6542. attr_t foo
  6543. ; return 0; }
  6544. EOF
  6545. if { (eval echo configure:7645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  6546. rm -rf conftest*
  6547. cf_result=yes
  6548. else
  6549. echo "configure: failed program was:" >&5
  6550. cat conftest.$ac_ext >&5
  6551. rm -rf conftest*
  6552. cf_result=no
  6553. fi
  6554. rm -f conftest*
  6555. echo "$ac_t""$cf_result" 1>&6
  6556. if test $cf_result = yes ; then
  6557. cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
  6558. cat >> confdefs.h <<EOF
  6559. #define $cf_result 1
  6560. EOF
  6561. else
  6562. cat >> confdefs.h <<EOF
  6563. #define attr_t long
  6564. EOF
  6565. fi
  6566. echo $ac_n "checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
  6567. echo "configure:7673: checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}" >&5
  6568. cat > conftest.$ac_ext <<EOF
  6569. #line 7675 "configure"
  6570. #include "confdefs.h"
  6571. #ifndef _XOPEN_SOURCE_EXTENDED
  6572. #define _XOPEN_SOURCE_EXTENDED
  6573. #endif
  6574. #include <${cf_cv_ncurses_header-curses.h}>
  6575. int main() {
  6576. mbstate_t foo
  6577. ; return 0; }
  6578. EOF
  6579. if { (eval echo configure:7688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  6580. rm -rf conftest*
  6581. cf_result=yes
  6582. else
  6583. echo "configure: failed program was:" >&5
  6584. cat conftest.$ac_ext >&5
  6585. rm -rf conftest*
  6586. cf_result=no
  6587. fi
  6588. rm -f conftest*
  6589. echo "$ac_t""$cf_result" 1>&6
  6590. if test $cf_result = yes ; then
  6591. cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
  6592. cat >> confdefs.h <<EOF
  6593. #define $cf_result 1
  6594. EOF
  6595. else
  6596. cat >> confdefs.h <<EOF
  6597. #define mbstate_t long
  6598. EOF
  6599. fi
  6600. TEST_ARGS="$LIBS"
  6601. LIBS=
  6602. trap '' 1 2 15
  6603. cat > confcache <<\EOF
  6604. # This file is a shell script that caches the results of configure
  6605. # tests run on this system so they can be shared between configure
  6606. # scripts and configure runs. It is not useful on other systems.
  6607. # If it contains results you don't want to keep, you may remove or edit it.
  6608. #
  6609. # By default, configure uses ./config.cache as the cache file,
  6610. # creating it if it does not exist already. You can give configure
  6611. # the --cache-file=FILE option to use a different cache file; that is
  6612. # what configure does when it calls configure scripts in
  6613. # subdirectories, so they share the cache.
  6614. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  6615. # config.status only pays attention to the cache file if you give it the
  6616. # --recheck option to rerun configure.
  6617. #
  6618. EOF
  6619. # The following way of writing the cache mishandles newlines in values,
  6620. # but we know of no workaround that is simple, portable, and efficient.
  6621. # So, don't put newlines in cache variables' values.
  6622. # Ultrix sh set writes to stderr and can't be redirected directly,
  6623. # and sets the high bit in the cache file unless we assign to the vars.
  6624. (set) 2>&1 |
  6625. case `(ac_space=' '; set | grep ac_space) 2>&1` in
  6626. *ac_space=\ *)
  6627. # `set' does not quote correctly, so add quotes (double-quote substitution
  6628. # turns \\\\ into \\, and sed turns \\ into \).
  6629. sed -n \
  6630. -e "s/'/'\\\\''/g" \
  6631. -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
  6632. ;;
  6633. *)
  6634. # `set' quotes correctly as required by POSIX, so do not add quotes.
  6635. sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
  6636. ;;
  6637. esac >> confcache
  6638. if cmp -s $cache_file confcache; then
  6639. :
  6640. else
  6641. if test -w $cache_file; then
  6642. echo "updating cache $cache_file"
  6643. cat confcache > $cache_file
  6644. else
  6645. echo "not updating unwritable cache $cache_file"
  6646. fi
  6647. fi
  6648. rm -f confcache
  6649. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  6650. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  6651. # Let make expand exec_prefix.
  6652. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  6653. # Any assignment to VPATH causes Sun make to only execute
  6654. # the first set of double-colon rules, so remove it if not needed.
  6655. # If there is a colon in the path, we need to keep it.
  6656. if test "x$srcdir" = x.; then
  6657. ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
  6658. fi
  6659. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  6660. DEFS=-DHAVE_CONFIG_H
  6661. # Without the "./", some shells look in PATH for config.status.
  6662. : ${CONFIG_STATUS=./config.status}
  6663. echo creating $CONFIG_STATUS
  6664. rm -f $CONFIG_STATUS
  6665. cat > $CONFIG_STATUS <<EOF
  6666. #! /bin/sh
  6667. # Generated automatically by configure.
  6668. # Run this file to recreate the current configuration.
  6669. # This directory was configured as follows,
  6670. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  6671. #
  6672. # $0 $ac_configure_args
  6673. #
  6674. # Compiler output produced by configure, useful for debugging
  6675. # configure, is in ./config.log if it exists.
  6676. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  6677. for ac_option
  6678. do
  6679. case "\$ac_option" in
  6680. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  6681. echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  6682. exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  6683. -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  6684. echo "$CONFIG_STATUS generated by autoconf version 2.13.20030927"
  6685. exit 0 ;;
  6686. -help | --help | --hel | --he | --h)
  6687. echo "\$ac_cs_usage"; exit 0 ;;
  6688. *) echo "\$ac_cs_usage"; exit 1 ;;
  6689. esac
  6690. done
  6691. ac_given_srcdir=$srcdir
  6692. trap 'rm -fr `echo "Makefile ncurses_cfg.h:ncurses_tst.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  6693. EOF
  6694. cat >> $CONFIG_STATUS <<EOF
  6695. # Protect against being on the right side of a sed subst in config.status.
  6696. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  6697. s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  6698. $ac_vpsub
  6699. $extrasub
  6700. s%@SHELL@%$SHELL%g
  6701. s%@CFLAGS@%$CFLAGS%g
  6702. s%@CPPFLAGS@%$CPPFLAGS%g
  6703. s%@CXXFLAGS@%$CXXFLAGS%g
  6704. s%@FFLAGS@%$FFLAGS%g
  6705. s%@DEFS@%$DEFS%g
  6706. s%@LDFLAGS@%$LDFLAGS%g
  6707. s%@LIBS@%$LIBS%g
  6708. s%@exec_prefix@%$exec_prefix%g
  6709. s%@prefix@%$prefix%g
  6710. s%@program_transform_name@%$program_transform_name%g
  6711. s%@bindir@%$bindir%g
  6712. s%@sbindir@%$sbindir%g
  6713. s%@libexecdir@%$libexecdir%g
  6714. s%@datadir@%$datadir%g
  6715. s%@sysconfdir@%$sysconfdir%g
  6716. s%@sharedstatedir@%$sharedstatedir%g
  6717. s%@localstatedir@%$localstatedir%g
  6718. s%@libdir@%$libdir%g
  6719. s%@includedir@%$includedir%g
  6720. s%@oldincludedir@%$oldincludedir%g
  6721. s%@infodir@%$infodir%g
  6722. s%@mandir@%$mandir%g
  6723. s%@host@%$host%g
  6724. s%@host_alias@%$host_alias%g
  6725. s%@host_cpu@%$host_cpu%g
  6726. s%@host_vendor@%$host_vendor%g
  6727. s%@host_os@%$host_os%g
  6728. s%@SET_MAKE@%$SET_MAKE%g
  6729. s%@CC@%$CC%g
  6730. s%@CPP@%$CPP%g
  6731. s%@AWK@%$AWK%g
  6732. s%@CC_G_OPT@%$CC_G_OPT%g
  6733. s%@CC_SHARED_OPTS@%$CC_SHARED_OPTS%g
  6734. s%@DFT_DEP_SUFFIX@%$DFT_DEP_SUFFIX%g
  6735. s%@DFT_OBJ_SUBDIR@%$DFT_OBJ_SUBDIR%g
  6736. s%@DFT_UPR_MODEL@%$DFT_UPR_MODEL%g
  6737. s%@LD@%$LD%g
  6738. s%@LDFLAGS_SHARED@%$LDFLAGS_SHARED%g
  6739. s%@LDFLAGS_STATIC@%$LDFLAGS_STATIC%g
  6740. s%@LD_MODEL@%$LD_MODEL%g
  6741. s%@LD_SHARED_OPTS@%$LD_SHARED_OPTS%g
  6742. s%@LIBTOOL@%$LIBTOOL%g
  6743. s%@LIB_CLEAN@%$LIB_CLEAN%g
  6744. s%@LIB_COMPILE@%$LIB_COMPILE%g
  6745. s%@LIB_LINK@%$LIB_LINK%g
  6746. s%@LINK_TESTS@%$LINK_TESTS%g
  6747. s%@LINT@%$LINT%g
  6748. s%@LINT_OPTS@%$LINT_OPTS%g
  6749. s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g
  6750. s%@MATH_LIB@%$MATH_LIB%g
  6751. s%@PTHREAD@%$PTHREAD%g
  6752. s%@TEST_ARGS@%$TEST_ARGS%g
  6753. s%@TEST_DEPS@%$TEST_DEPS%g
  6754. s%@TEST_LIBS@%$TEST_LIBS%g
  6755. s%@TINFO_ARGS@%$TINFO_ARGS%g
  6756. s%@cf_cv_abi_version@%$cf_cv_abi_version%g
  6757. s%@cf_cv_rel_version@%$cf_cv_rel_version%g
  6758. s%@EXEEXT@%$EXEEXT%g
  6759. s%@OBJEXT@%$OBJEXT%g
  6760. s%@EXTRA_CPPFLAGS@%$EXTRA_CPPFLAGS%g
  6761. s%@ECHO_LT@%$ECHO_LT%g
  6762. s%@ECHO_LD@%$ECHO_LD%g
  6763. s%@RULE_CC@%$RULE_CC%g
  6764. s%@SHOW_CC@%$SHOW_CC%g
  6765. s%@ECHO_CC@%$ECHO_CC%g
  6766. s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
  6767. s%@X_CFLAGS@%$X_CFLAGS%g
  6768. s%@X_PRE_LIBS@%$X_PRE_LIBS%g
  6769. s%@X_LIBS@%$X_LIBS%g
  6770. s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
  6771. s%@XCURSES_CONFIG@%$XCURSES_CONFIG%g
  6772. CEOF
  6773. EOF
  6774. cat >> $CONFIG_STATUS <<\EOF
  6775. # Split the substitutions into bite-sized pieces for seds with
  6776. # small command number limits, like on Digital OSF/1 and HP-UX.
  6777. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
  6778. ac_file=1 # Number of current file.
  6779. ac_beg=1 # First line for current file.
  6780. ac_end=$ac_max_sed_cmds # Line after last line for current file.
  6781. ac_more_lines=:
  6782. ac_sed_cmds=""
  6783. while $ac_more_lines; do
  6784. if test $ac_beg -gt 1; then
  6785. sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  6786. else
  6787. sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  6788. fi
  6789. if test ! -s conftest.s$ac_file; then
  6790. ac_more_lines=false
  6791. rm -f conftest.s$ac_file
  6792. else
  6793. if test -z "$ac_sed_cmds"; then
  6794. ac_sed_cmds="sed -f conftest.s$ac_file"
  6795. else
  6796. ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
  6797. fi
  6798. ac_file=`expr $ac_file + 1`
  6799. ac_beg=$ac_end
  6800. ac_end=`expr $ac_end + $ac_max_sed_cmds`
  6801. fi
  6802. done
  6803. if test -z "$ac_sed_cmds"; then
  6804. ac_sed_cmds=cat
  6805. fi
  6806. EOF
  6807. cat >> $CONFIG_STATUS <<EOF
  6808. CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
  6809. EOF
  6810. cat >> $CONFIG_STATUS <<\EOF
  6811. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  6812. # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  6813. case "$ac_file" in
  6814. *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  6815. ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  6816. *) ac_file_in="${ac_file}.in" ;;
  6817. esac
  6818. # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  6819. # Remove last slash and all that follows it. Not all systems have dirname.
  6820. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  6821. if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  6822. # The file is in a subdirectory.
  6823. test ! -d "$ac_dir" && mkdir "$ac_dir"
  6824. ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  6825. # A "../" for each directory in $ac_dir_suffix.
  6826. ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  6827. else
  6828. ac_dir_suffix= ac_dots=
  6829. fi
  6830. case "$ac_given_srcdir" in
  6831. .) srcdir=.
  6832. if test -z "$ac_dots"; then top_srcdir=.
  6833. else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  6834. /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  6835. *) # Relative path.
  6836. srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  6837. top_srcdir="$ac_dots$ac_given_srcdir" ;;
  6838. esac
  6839. echo creating "$ac_file"
  6840. rm -f "$ac_file"
  6841. configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  6842. case "$ac_file" in
  6843. *Makefile*) ac_comsub="1i\\
  6844. # $configure_input" ;;
  6845. *) ac_comsub= ;;
  6846. esac
  6847. ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  6848. sed -e "$ac_comsub
  6849. s%@configure_input@%$configure_input%g
  6850. s%@srcdir@%$srcdir%g
  6851. s%@top_srcdir@%$top_srcdir%g
  6852. " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  6853. fi; done
  6854. rm -f conftest.s*
  6855. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  6856. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  6857. #
  6858. # ac_d sets the value in "#define NAME VALUE" lines.
  6859. ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
  6860. ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
  6861. ac_dC='\3'
  6862. ac_dD='%g'
  6863. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  6864. ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
  6865. ac_uB='\([ ]\)%\1#\2define\3'
  6866. ac_uC=' '
  6867. ac_uD='\4%g'
  6868. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  6869. ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
  6870. ac_eB='$%\1#\2define\3'
  6871. ac_eC=' '
  6872. ac_eD='%g'
  6873. if test "${CONFIG_HEADERS+set}" != set; then
  6874. EOF
  6875. cat >> $CONFIG_STATUS <<EOF
  6876. CONFIG_HEADERS="ncurses_cfg.h:ncurses_tst.hin"
  6877. EOF
  6878. cat >> $CONFIG_STATUS <<\EOF
  6879. fi
  6880. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  6881. # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  6882. case "$ac_file" in
  6883. *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  6884. ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  6885. *) ac_file_in="${ac_file}.in" ;;
  6886. esac
  6887. echo creating $ac_file
  6888. rm -f conftest.frag conftest.in conftest.out
  6889. ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  6890. cat $ac_file_inputs > conftest.in
  6891. EOF
  6892. # Transform confdefs.h into a list of #define's. We won't use it as a sed
  6893. # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
  6894. # be either 'cat' or 'sort'.
  6895. cat confdefs.h >conftest.vals
  6896. # Break up conftest.vals because some shells have a limit on
  6897. # the size of here documents, and old seds have small limits too.
  6898. rm -f conftest.tail
  6899. echo ' rm -f conftest.frag' >> $CONFIG_STATUS
  6900. while :
  6901. do
  6902. ac_lines=`grep -c . conftest.vals`
  6903. # grep -c gives empty output for an empty file on some AIX systems.
  6904. if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  6905. # Write chunks of a limited-size here document to conftest.frag.
  6906. echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
  6907. sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  6908. echo 'CEOF' >> $CONFIG_STATUS
  6909. sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  6910. rm -f conftest.vals
  6911. mv conftest.tail conftest.vals
  6912. done
  6913. rm -f conftest.vals
  6914. # Run sed to substitute the contents of conftest.frag into conftest.in at the
  6915. # marker @DEFS@.
  6916. echo ' cat >> conftest.edit <<CEOF
  6917. /@DEFS@/r conftest.frag
  6918. /@DEFS@/d
  6919. CEOF
  6920. sed -f conftest.edit conftest.in > conftest.out
  6921. rm -f conftest.in
  6922. mv conftest.out conftest.in
  6923. rm -f conftest.edit conftest.frag
  6924. ' >> $CONFIG_STATUS
  6925. cat >> $CONFIG_STATUS <<\EOF
  6926. rm -f conftest.frag conftest.h
  6927. echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
  6928. cat conftest.in >> conftest.h
  6929. rm -f conftest.in
  6930. if cmp -s $ac_file conftest.h 2>/dev/null; then
  6931. echo "$ac_file is unchanged"
  6932. rm -f conftest.h
  6933. else
  6934. # Remove last slash and all that follows it. Not all systems have dirname.
  6935. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  6936. if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  6937. # The file is in a subdirectory.
  6938. test ! -d "$ac_dir" && mkdir "$ac_dir"
  6939. fi
  6940. rm -f $ac_file
  6941. mv conftest.h $ac_file
  6942. fi
  6943. fi; done
  6944. EOF
  6945. cat >> $CONFIG_STATUS <<EOF
  6946. # Extra initialization commands, if any
  6947. AWK="$AWK"
  6948. ECHO_LD="$ECHO_LD"
  6949. EOF
  6950. cat >> $CONFIG_STATUS <<\EOF
  6951. # Extra commands, if any
  6952. for cf_dir in .
  6953. do
  6954. if test ! -d $srcdir/$cf_dir; then
  6955. continue
  6956. elif test -f $srcdir/$cf_dir/programs; then
  6957. $AWK -f $srcdir/mk-test.awk ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
  6958. fi
  6959. done
  6960. cat >>Makefile <<TEST_EOF
  6961. # These rules are generated so we do not rely on suffix rules, which do not
  6962. # work consistently for different make-programs (the '\$(MODEL)/' confuses
  6963. # some, and the '\$x' confuses others).
  6964. TEST_EOF
  6965. LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
  6966. for N in $LIST
  6967. do
  6968. cat >>Makefile <<TEST_EOF
  6969. \$(MODEL)/$N.o : $N.c \\
  6970. test.priv.h \\
  6971. ncurses_cfg.h
  6972. @echo compiling $N; \$(CC) -c \$(CFLAGS_DEFAULT) $N.c
  6973. TEST_EOF
  6974. done
  6975. exit 0
  6976. EOF
  6977. chmod +x $CONFIG_STATUS
  6978. rm -fr confdefs* $ac_clean_files
  6979. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1