configure 400 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654
  1. #! /bin/sh
  2. # Guess values for system-dependent variables and create Makefiles.
  3. # Generated automatically using autoconf version 2.13
  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. ac_default_prefix=/usr/local
  13. ac_help="$ac_help
  14. --enable-macosx-app create a MacOSX application"
  15. ac_help="$ac_help
  16. --enable-shared build and link with shared libraries [--enable-shared]"
  17. ac_help="$ac_help
  18. --enable-64bit enable 64bit support (where applicable)"
  19. ac_help="$ac_help
  20. --enable-64bit-vis enable 64bit Sparc VIS support"
  21. ac_help="$ac_help
  22. --enable-w11 use W11 library for Windows X11 emulation"
  23. ac_help="$ac_help
  24. --with-cxx support C++ functionality (default: no)"
  25. ac_help="$ac_help
  26. --with-jpeg support JPEG functionality (default: yes)"
  27. ac_help="$ac_help
  28. --with-tiff support TIFF functionality (default: yes)"
  29. ac_help="$ac_help
  30. --with-png support PNG functionality (default: yes)"
  31. ac_help="$ac_help
  32. --with-tcltk support Tcl/Tk functionality (default: yes)"
  33. ac_help="$ac_help
  34. --with-postgres support PostgreSQL functionality (default: no)"
  35. ac_help="$ac_help
  36. --with-mysql support MySQL functionality (default: no)"
  37. ac_help="$ac_help
  38. --with-sqlite support SQLite functionality (default: no)"
  39. ac_help="$ac_help
  40. --with-ffmpeg support FFMPEG functionality (default: no)"
  41. ac_help="$ac_help
  42. --with-opengl support OpenGL functionality (default: yes)"
  43. ac_help="$ac_help
  44. --with-odbc support ODBC functionality (default: no)"
  45. ac_help="$ac_help
  46. --with-fftw support FFTW functionality (default: yes)"
  47. ac_help="$ac_help
  48. --with-blas support BLAS functionality (default: no)"
  49. ac_help="$ac_help
  50. --with-lapack support LAPACK functionality (default: no)"
  51. ac_help="$ac_help
  52. --with-cairo support Cairo functionality (default: no)"
  53. ac_help="$ac_help
  54. --with-freetype support FreeType functionality (default: no)"
  55. ac_help="$ac_help
  56. --with-nls support NLS functionality (default: no)"
  57. ac_help="$ac_help
  58. --with-readline support Readline functionality (default: no)"
  59. ac_help="$ac_help
  60. --with-opendwg support openDWG functionality (default: no)"
  61. ac_help="$ac_help
  62. --with-regex support regex functionality (default: yes)"
  63. ac_help="$ac_help
  64. --with-pthread support POSIX threads functionality (default: no)"
  65. ac_help="$ac_help
  66. --with-python[=path/python-config] enable support for Python SWIG bindings (python-config with path, \
  67. e.g. '--with-python=/usr/bin/python2.5-config', default: no)"
  68. ac_help="$ac_help
  69. --with-wxwidgets[=path/wx-config] enable wxWidgets support (wx-config with path, \
  70. e.g. '--with-wxwidgets=/usr/local/bin/wx-config', default: no)"
  71. ac_help="$ac_help
  72. --with-gdal[=path/gdal-config] enable GDAL/OGR support (gdal-config with path, \
  73. e.g. '--with-gdal=/usr/local/bin/gdal-config')"
  74. ac_help="$ac_help
  75. --with-includes=DIRS site include files are in DIRS"
  76. ac_help="$ac_help
  77. --with-libs=DIRS site library files are in DIRS"
  78. ac_help="$ac_help
  79. --with-zlib-includes=DIRS
  80. zlib include files are in DIRS"
  81. ac_help="$ac_help
  82. --with-zlib-libs=DIRS zlib library files are in DIRS"
  83. ac_help="$ac_help
  84. --with-readline-includes=DIRS
  85. Readline include files are in DIRS"
  86. ac_help="$ac_help
  87. --with-readline-libs=DIRS
  88. Readline library files are in DIRS"
  89. ac_help="$ac_help
  90. --with-jpeg-includes=DIRS
  91. JPEG include files are in DIRS"
  92. ac_help="$ac_help
  93. --with-jpeg-libs=DIRS JPEG library files are in DIRS"
  94. ac_help="$ac_help
  95. --with-tiff-includes=DIRS
  96. TIFF include files are in DIRS"
  97. ac_help="$ac_help
  98. --with-tiff-libs=DIRS TIFF library files are in DIRS"
  99. ac_help="$ac_help
  100. --with-png-includes=DIRS
  101. PNG include files are in DIRS"
  102. ac_help="$ac_help
  103. --with-png-libs=DIRS PNG library files are in DIRS"
  104. ac_help="$ac_help
  105. --with-tcltk-includes=DIRS
  106. Tcl/Tk include files are in DIRS"
  107. ac_help="$ac_help
  108. --with-tcltk-libs=DIRS Tcl/Tk library files are in DIRS"
  109. ac_help="$ac_help
  110. --with-postgres-includes=DIRS
  111. PostgreSQL include files are in DIRS"
  112. ac_help="$ac_help
  113. --with-postgres-libs=DIRS
  114. PostgreSQL library files are in DIRS"
  115. ac_help="$ac_help
  116. --with-mysql-includes=DIRS
  117. MySQL include files are in DIRS"
  118. ac_help="$ac_help
  119. --with-mysql-libs=DIRS MySQL library files are in DIRS"
  120. ac_help="$ac_help
  121. --with-sqlite-includes=DIRS
  122. SQLite include files are in DIRS"
  123. ac_help="$ac_help
  124. --with-sqlite-libs=DIRS SQLite library files are in DIRS"
  125. ac_help="$ac_help
  126. --with-ffmpeg-includes=DIRS
  127. FFMPEG include files are in DIRS"
  128. ac_help="$ac_help
  129. --with-ffmpeg-libs=DIRS FFMPEG library files are in DIRS"
  130. ac_help="$ac_help
  131. --with-opengl-includes=DIRS
  132. OpenGL include files are in DIRS"
  133. ac_help="$ac_help
  134. --with-opengl-libs=DIRS OpenGL library files are in DIRS"
  135. ac_help="$ac_help
  136. --with-opengl-framework=DIR
  137. OpenGL framework is in DIR"
  138. ac_help="$ac_help
  139. --with-odbc-includes=DIRS
  140. ODBC include files are in DIRS"
  141. ac_help="$ac_help
  142. --with-odbc-libs=DIRS ODBC library files are in DIRS"
  143. ac_help="$ac_help
  144. --with-fftw-includes=DIRS
  145. FFTW include files are in DIRS"
  146. ac_help="$ac_help
  147. --with-fftw-libs=DIRS FFTW library files are in DIRS"
  148. ac_help="$ac_help
  149. --with-blas-includes=DIRS
  150. BLAS include files are in DIRS"
  151. ac_help="$ac_help
  152. --with-blas-libs=DIRS BLAS library files are in DIRS"
  153. ac_help="$ac_help
  154. --with-lapack-includes=DIRS
  155. LAPACK include files are in DIRS"
  156. ac_help="$ac_help
  157. --with-lapack-libs=DIRS LAPACK library files are in DIRS"
  158. ac_help="$ac_help
  159. --with-cairo-includes=DIRS
  160. cairo include files are in DIRS"
  161. ac_help="$ac_help
  162. --with-cairo-libs=DIRS cairo library files are in DIRS"
  163. ac_help="$ac_help
  164. --with-cairo-ldflags=FLAGS
  165. cairo needs FLAGS when linking"
  166. ac_help="$ac_help
  167. --with-freetype-includes=DIRS
  168. FreeType include files are in DIRS"
  169. ac_help="$ac_help
  170. --with-freetype-libs=DIRS
  171. FreeType library files are in DIRS"
  172. ac_help="$ac_help
  173. --with-proj-includes=DIRS
  174. External PROJ.4 include files are in DIRS"
  175. ac_help="$ac_help
  176. --with-proj-libs=DIRS External PROJ.4 library files are in DIRS"
  177. ac_help="$ac_help
  178. --with-proj-share=DIR External PROJ.4 data files are in DIR"
  179. ac_help="$ac_help
  180. --with-opendwg-includes=DIRS
  181. openDWG include files are in DIRS"
  182. ac_help="$ac_help
  183. --with-opendwg-libs=DIRS
  184. openDWG library files are in DIRS"
  185. ac_help="$ac_help
  186. --with-regex-includes=DIRS
  187. regex include files are in DIRS"
  188. ac_help="$ac_help
  189. --with-regex-libs=DIRS regex library files are in DIRS"
  190. ac_help="$ac_help
  191. --with-pthread-includes=DIRS
  192. POSIX threads include files are in DIRS"
  193. ac_help="$ac_help
  194. --with-pthread-libs=DIRS
  195. POSIX threads library files are in DIRS"
  196. ac_help="$ac_help
  197. --with-x use the X Window System"
  198. ac_help="$ac_help
  199. --enable-largefile enable support for large files (LFS)"
  200. # Initialize some variables set by options.
  201. # The variables have the same names as the options, with
  202. # dashes changed to underlines.
  203. build=NONE
  204. cache_file=./config.cache
  205. exec_prefix=NONE
  206. host=NONE
  207. no_create=
  208. nonopt=NONE
  209. no_recursion=
  210. prefix=NONE
  211. program_prefix=NONE
  212. program_suffix=NONE
  213. program_transform_name=s,x,x,
  214. silent=
  215. site=
  216. srcdir=
  217. target=NONE
  218. verbose=
  219. x_includes=NONE
  220. x_libraries=NONE
  221. bindir='${exec_prefix}/bin'
  222. sbindir='${exec_prefix}/sbin'
  223. libexecdir='${exec_prefix}/libexec'
  224. datadir='${prefix}/share'
  225. sysconfdir='${prefix}/etc'
  226. sharedstatedir='${prefix}/com'
  227. localstatedir='${prefix}/var'
  228. libdir='${exec_prefix}/lib'
  229. includedir='${prefix}/include'
  230. oldincludedir='/usr/include'
  231. infodir='${prefix}/info'
  232. mandir='${prefix}/man'
  233. # Initialize some other variables.
  234. subdirs=
  235. MFLAGS= MAKEFLAGS=
  236. SHELL=${CONFIG_SHELL-/bin/sh}
  237. # Maximum number of lines to put in a shell here document.
  238. ac_max_here_lines=12
  239. ac_prev=
  240. for ac_option
  241. do
  242. # If the previous option needs an argument, assign it.
  243. if test -n "$ac_prev"; then
  244. eval "$ac_prev=\$ac_option"
  245. ac_prev=
  246. continue
  247. fi
  248. case "$ac_option" in
  249. -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  250. *) ac_optarg= ;;
  251. esac
  252. # Accept the important Cygnus configure options, so we can diagnose typos.
  253. case "$ac_option" in
  254. -bindir | --bindir | --bindi | --bind | --bin | --bi)
  255. ac_prev=bindir ;;
  256. -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  257. bindir="$ac_optarg" ;;
  258. -build | --build | --buil | --bui | --bu)
  259. ac_prev=build ;;
  260. -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  261. build="$ac_optarg" ;;
  262. -cache-file | --cache-file | --cache-fil | --cache-fi \
  263. | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  264. ac_prev=cache_file ;;
  265. -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  266. | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  267. cache_file="$ac_optarg" ;;
  268. -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  269. ac_prev=datadir ;;
  270. -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  271. | --da=*)
  272. datadir="$ac_optarg" ;;
  273. -disable-* | --disable-*)
  274. ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  275. # Reject names that are not valid shell variable names.
  276. if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  277. { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  278. fi
  279. ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  280. eval "enable_${ac_feature}=no" ;;
  281. -enable-* | --enable-*)
  282. ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  283. # Reject names that are not valid shell variable names.
  284. if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  285. { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  286. fi
  287. ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  288. case "$ac_option" in
  289. *=*) ;;
  290. *) ac_optarg=yes ;;
  291. esac
  292. eval "enable_${ac_feature}='$ac_optarg'" ;;
  293. -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  294. | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  295. | --exec | --exe | --ex)
  296. ac_prev=exec_prefix ;;
  297. -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  298. | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  299. | --exec=* | --exe=* | --ex=*)
  300. exec_prefix="$ac_optarg" ;;
  301. -gas | --gas | --ga | --g)
  302. # Obsolete; use --with-gas.
  303. with_gas=yes ;;
  304. -help | --help | --hel | --he)
  305. # Omit some internal or obsolete options to make the list less imposing.
  306. # This message is too long to be a string in the A/UX 3.1 sh.
  307. cat << EOF
  308. Usage: configure [options] [host]
  309. Options: [defaults in brackets after descriptions]
  310. Configuration:
  311. --cache-file=FILE cache test results in FILE
  312. --help print this message
  313. --no-create do not create output files
  314. --quiet, --silent do not print \`checking...' messages
  315. --version print the version of autoconf that created configure
  316. Directory and file names:
  317. --prefix=PREFIX install architecture-independent files in PREFIX
  318. [$ac_default_prefix]
  319. --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
  320. [same as prefix]
  321. --bindir=DIR user executables in DIR [EPREFIX/bin]
  322. --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
  323. --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
  324. --datadir=DIR read-only architecture-independent data in DIR
  325. [PREFIX/share]
  326. --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
  327. --sharedstatedir=DIR modifiable architecture-independent data in DIR
  328. [PREFIX/com]
  329. --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
  330. --libdir=DIR object code libraries in DIR [EPREFIX/lib]
  331. --includedir=DIR C header files in DIR [PREFIX/include]
  332. --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
  333. --infodir=DIR info documentation in DIR [PREFIX/info]
  334. --mandir=DIR man documentation in DIR [PREFIX/man]
  335. --srcdir=DIR find the sources in DIR [configure dir or ..]
  336. --program-prefix=PREFIX prepend PREFIX to installed program names
  337. --program-suffix=SUFFIX append SUFFIX to installed program names
  338. --program-transform-name=PROGRAM
  339. run sed PROGRAM on installed program names
  340. EOF
  341. cat << EOF
  342. Host type:
  343. --build=BUILD configure for building on BUILD [BUILD=HOST]
  344. --host=HOST configure for HOST [guessed]
  345. --target=TARGET configure for TARGET [TARGET=HOST]
  346. Features and packages:
  347. --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
  348. --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
  349. --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
  350. --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
  351. --x-includes=DIR X include files are in DIR
  352. --x-libraries=DIR X library files are in DIR
  353. EOF
  354. if test -n "$ac_help"; then
  355. echo "--enable and --with options recognized:$ac_help"
  356. fi
  357. exit 0 ;;
  358. -host | --host | --hos | --ho)
  359. ac_prev=host ;;
  360. -host=* | --host=* | --hos=* | --ho=*)
  361. host="$ac_optarg" ;;
  362. -includedir | --includedir | --includedi | --included | --include \
  363. | --includ | --inclu | --incl | --inc)
  364. ac_prev=includedir ;;
  365. -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  366. | --includ=* | --inclu=* | --incl=* | --inc=*)
  367. includedir="$ac_optarg" ;;
  368. -infodir | --infodir | --infodi | --infod | --info | --inf)
  369. ac_prev=infodir ;;
  370. -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  371. infodir="$ac_optarg" ;;
  372. -libdir | --libdir | --libdi | --libd)
  373. ac_prev=libdir ;;
  374. -libdir=* | --libdir=* | --libdi=* | --libd=*)
  375. libdir="$ac_optarg" ;;
  376. -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  377. | --libexe | --libex | --libe)
  378. ac_prev=libexecdir ;;
  379. -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  380. | --libexe=* | --libex=* | --libe=*)
  381. libexecdir="$ac_optarg" ;;
  382. -localstatedir | --localstatedir | --localstatedi | --localstated \
  383. | --localstate | --localstat | --localsta | --localst \
  384. | --locals | --local | --loca | --loc | --lo)
  385. ac_prev=localstatedir ;;
  386. -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  387. | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  388. | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  389. localstatedir="$ac_optarg" ;;
  390. -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  391. ac_prev=mandir ;;
  392. -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  393. mandir="$ac_optarg" ;;
  394. -nfp | --nfp | --nf)
  395. # Obsolete; use --without-fp.
  396. with_fp=no ;;
  397. -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  398. | --no-cr | --no-c)
  399. no_create=yes ;;
  400. -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  401. | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  402. no_recursion=yes ;;
  403. -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  404. | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  405. | --oldin | --oldi | --old | --ol | --o)
  406. ac_prev=oldincludedir ;;
  407. -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  408. | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  409. | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  410. oldincludedir="$ac_optarg" ;;
  411. -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  412. ac_prev=prefix ;;
  413. -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  414. prefix="$ac_optarg" ;;
  415. -program-prefix | --program-prefix | --program-prefi | --program-pref \
  416. | --program-pre | --program-pr | --program-p)
  417. ac_prev=program_prefix ;;
  418. -program-prefix=* | --program-prefix=* | --program-prefi=* \
  419. | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  420. program_prefix="$ac_optarg" ;;
  421. -program-suffix | --program-suffix | --program-suffi | --program-suff \
  422. | --program-suf | --program-su | --program-s)
  423. ac_prev=program_suffix ;;
  424. -program-suffix=* | --program-suffix=* | --program-suffi=* \
  425. | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  426. program_suffix="$ac_optarg" ;;
  427. -program-transform-name | --program-transform-name \
  428. | --program-transform-nam | --program-transform-na \
  429. | --program-transform-n | --program-transform- \
  430. | --program-transform | --program-transfor \
  431. | --program-transfo | --program-transf \
  432. | --program-trans | --program-tran \
  433. | --progr-tra | --program-tr | --program-t)
  434. ac_prev=program_transform_name ;;
  435. -program-transform-name=* | --program-transform-name=* \
  436. | --program-transform-nam=* | --program-transform-na=* \
  437. | --program-transform-n=* | --program-transform-=* \
  438. | --program-transform=* | --program-transfor=* \
  439. | --program-transfo=* | --program-transf=* \
  440. | --program-trans=* | --program-tran=* \
  441. | --progr-tra=* | --program-tr=* | --program-t=*)
  442. program_transform_name="$ac_optarg" ;;
  443. -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  444. | -silent | --silent | --silen | --sile | --sil)
  445. silent=yes ;;
  446. -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  447. ac_prev=sbindir ;;
  448. -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  449. | --sbi=* | --sb=*)
  450. sbindir="$ac_optarg" ;;
  451. -sharedstatedir | --sharedstatedir | --sharedstatedi \
  452. | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  453. | --sharedst | --shareds | --shared | --share | --shar \
  454. | --sha | --sh)
  455. ac_prev=sharedstatedir ;;
  456. -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  457. | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  458. | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  459. | --sha=* | --sh=*)
  460. sharedstatedir="$ac_optarg" ;;
  461. -site | --site | --sit)
  462. ac_prev=site ;;
  463. -site=* | --site=* | --sit=*)
  464. site="$ac_optarg" ;;
  465. -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  466. ac_prev=srcdir ;;
  467. -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  468. srcdir="$ac_optarg" ;;
  469. -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  470. | --syscon | --sysco | --sysc | --sys | --sy)
  471. ac_prev=sysconfdir ;;
  472. -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  473. | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  474. sysconfdir="$ac_optarg" ;;
  475. -target | --target | --targe | --targ | --tar | --ta | --t)
  476. ac_prev=target ;;
  477. -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  478. target="$ac_optarg" ;;
  479. -v | -verbose | --verbose | --verbos | --verbo | --verb)
  480. verbose=yes ;;
  481. -version | --version | --versio | --versi | --vers)
  482. echo "configure generated by autoconf version 2.13"
  483. exit 0 ;;
  484. -with-* | --with-*)
  485. ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  486. # Reject names that are not valid shell variable names.
  487. if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  488. { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  489. fi
  490. ac_package=`echo $ac_package| sed 's/-/_/g'`
  491. case "$ac_option" in
  492. *=*) ;;
  493. *) ac_optarg=yes ;;
  494. esac
  495. eval "with_${ac_package}='$ac_optarg'" ;;
  496. -without-* | --without-*)
  497. ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  498. # Reject names that are not valid shell variable names.
  499. if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  500. { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  501. fi
  502. ac_package=`echo $ac_package| sed 's/-/_/g'`
  503. eval "with_${ac_package}=no" ;;
  504. --x)
  505. # Obsolete; use --with-x.
  506. with_x=yes ;;
  507. -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  508. | --x-incl | --x-inc | --x-in | --x-i)
  509. ac_prev=x_includes ;;
  510. -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  511. | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  512. x_includes="$ac_optarg" ;;
  513. -x-libraries | --x-libraries | --x-librarie | --x-librari \
  514. | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  515. ac_prev=x_libraries ;;
  516. -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  517. | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  518. x_libraries="$ac_optarg" ;;
  519. -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  520. ;;
  521. *)
  522. if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  523. echo "configure: warning: $ac_option: invalid host type" 1>&2
  524. fi
  525. if test "x$nonopt" != xNONE; then
  526. { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  527. fi
  528. nonopt="$ac_option"
  529. ;;
  530. esac
  531. done
  532. if test -n "$ac_prev"; then
  533. { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  534. fi
  535. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  536. # File descriptor usage:
  537. # 0 standard input
  538. # 1 file creation
  539. # 2 errors and warnings
  540. # 3 some systems may open it to /dev/tty
  541. # 4 used on the Kubota Titan
  542. # 6 checking for... messages and results
  543. # 5 compiler messages saved in config.log
  544. if test "$silent" = yes; then
  545. exec 6>/dev/null
  546. else
  547. exec 6>&1
  548. fi
  549. exec 5>./config.log
  550. echo "\
  551. This file contains any messages produced by compilers while
  552. running configure, to aid debugging if configure makes a mistake.
  553. " 1>&5
  554. # Strip out --no-create and --no-recursion so they do not pile up.
  555. # Also quote any args containing shell metacharacters.
  556. ac_configure_args=
  557. for ac_arg
  558. do
  559. case "$ac_arg" in
  560. -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  561. | --no-cr | --no-c) ;;
  562. -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  563. | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  564. *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  565. ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  566. *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  567. esac
  568. done
  569. # NLS nuisances.
  570. # Only set these to C if already set. These must not be set unconditionally
  571. # because not all systems understand e.g. LANG=C (notably SCO).
  572. # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
  573. # Non-C LC_CTYPE values break the ctype check.
  574. if test "${LANG+set}" = set; then LANG=C; export LANG; fi
  575. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  576. if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
  577. if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
  578. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  579. rm -rf conftest* confdefs.h
  580. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  581. echo > confdefs.h
  582. # A filename unique to this package, relative to the directory that
  583. # configure is in, which we can look for to find out if srcdir is correct.
  584. ac_unique_file=configure.in
  585. # Find the source files, if location was not specified.
  586. if test -z "$srcdir"; then
  587. ac_srcdir_defaulted=yes
  588. # Try the directory containing this script, then its parent.
  589. ac_prog=$0
  590. ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  591. test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  592. srcdir=$ac_confdir
  593. if test ! -r $srcdir/$ac_unique_file; then
  594. srcdir=..
  595. fi
  596. else
  597. ac_srcdir_defaulted=no
  598. fi
  599. if test ! -r $srcdir/$ac_unique_file; then
  600. if test "$ac_srcdir_defaulted" = yes; then
  601. { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  602. else
  603. { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  604. fi
  605. fi
  606. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  607. # Prefer explicitly selected file to automatically selected ones.
  608. if test -z "$CONFIG_SITE"; then
  609. if test "x$prefix" != xNONE; then
  610. CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  611. else
  612. CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  613. fi
  614. fi
  615. for ac_site_file in $CONFIG_SITE; do
  616. if test -r "$ac_site_file"; then
  617. echo "loading site script $ac_site_file"
  618. . "$ac_site_file"
  619. fi
  620. done
  621. ac_ext=c
  622. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  623. ac_cpp='$CPP $CPPFLAGS'
  624. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  625. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  626. cross_compiling=$ac_cv_prog_cc_cross
  627. ac_exeext=
  628. ac_objext=o
  629. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  630. # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  631. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  632. ac_n= ac_c='
  633. ' ac_t=' '
  634. else
  635. ac_n=-n ac_c= ac_t=
  636. fi
  637. else
  638. ac_n= ac_c='\c' ac_t=
  639. fi
  640. ac_aux_dir=
  641. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  642. if test -f $ac_dir/install-sh; then
  643. ac_aux_dir=$ac_dir
  644. ac_install_sh="$ac_aux_dir/install-sh -c"
  645. break
  646. elif test -f $ac_dir/install.sh; then
  647. ac_aux_dir=$ac_dir
  648. ac_install_sh="$ac_aux_dir/install.sh -c"
  649. break
  650. fi
  651. done
  652. if test -z "$ac_aux_dir"; then
  653. { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  654. fi
  655. ac_config_guess=$ac_aux_dir/config.guess
  656. ac_config_sub=$ac_aux_dir/config.sub
  657. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  658. # Make sure we can run config.sub.
  659. if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
  660. else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
  661. fi
  662. echo $ac_n "checking host system type""... $ac_c" 1>&6
  663. echo "configure:735: checking host system type" >&5
  664. host_alias=$host
  665. case "$host_alias" in
  666. NONE)
  667. case $nonopt in
  668. NONE)
  669. if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
  670. else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
  671. fi ;;
  672. *) host_alias=$nonopt ;;
  673. esac ;;
  674. esac
  675. host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
  676. host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
  677. host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
  678. host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
  679. echo "$ac_t""$host" 1>&6
  680. # Extract the first word of "gcc", so it can be a program name with args.
  681. set dummy gcc; ac_word=$2
  682. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  683. echo "configure:758: checking for $ac_word" >&5
  684. if test -n "$CC"; then
  685. ac_cv_prog_CC="$CC" # Let the user override the test.
  686. else
  687. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  688. ac_dummy="$PATH"
  689. for ac_dir in $ac_dummy; do
  690. test -z "$ac_dir" && ac_dir=.
  691. if test -f $ac_dir/$ac_word; then
  692. ac_cv_prog_CC="gcc"
  693. break
  694. fi
  695. done
  696. IFS="$ac_save_ifs"
  697. fi
  698. CC="$ac_cv_prog_CC"
  699. if test -n "$CC"; then
  700. echo "$ac_t""$CC" 1>&6
  701. else
  702. echo "$ac_t""no" 1>&6
  703. fi
  704. if test -z "$CC"; then
  705. # Extract the first word of "cc", so it can be a program name with args.
  706. set dummy cc; ac_word=$2
  707. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  708. echo "configure:785: checking for $ac_word" >&5
  709. if test -n "$CC"; then
  710. ac_cv_prog_CC="$CC" # Let the user override the test.
  711. else
  712. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  713. ac_prog_rejected=no
  714. ac_dummy="$PATH"
  715. for ac_dir in $ac_dummy; do
  716. test -z "$ac_dir" && ac_dir=.
  717. if test -f $ac_dir/$ac_word; then
  718. if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  719. ac_prog_rejected=yes
  720. continue
  721. fi
  722. ac_cv_prog_CC="cc"
  723. break
  724. fi
  725. done
  726. IFS="$ac_save_ifs"
  727. if test $ac_prog_rejected = yes; then
  728. # We found a bogon in the path, so make sure we never use it.
  729. set dummy $ac_cv_prog_CC
  730. shift
  731. if test $# -gt 0; then
  732. # We chose a different compiler from the bogus one.
  733. # However, it has the same basename, so the bogon will be chosen
  734. # first if we set CC to just the basename; use the full file name.
  735. shift
  736. set dummy "$ac_dir/$ac_word" "$@"
  737. shift
  738. ac_cv_prog_CC="$@"
  739. fi
  740. fi
  741. fi
  742. CC="$ac_cv_prog_CC"
  743. if test -n "$CC"; then
  744. echo "$ac_t""$CC" 1>&6
  745. else
  746. echo "$ac_t""no" 1>&6
  747. fi
  748. if test -z "$CC"; then
  749. case "`uname -s`" in
  750. *win32* | *WIN32*)
  751. # Extract the first word of "cl", so it can be a program name with args.
  752. set dummy cl; ac_word=$2
  753. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  754. echo "configure:833: checking for $ac_word" >&5
  755. if test -n "$CC"; then
  756. ac_cv_prog_CC="$CC" # Let the user override the test.
  757. else
  758. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  759. ac_dummy="$PATH"
  760. for ac_dir in $ac_dummy; do
  761. test -z "$ac_dir" && ac_dir=.
  762. if test -f $ac_dir/$ac_word; then
  763. ac_cv_prog_CC="cl"
  764. break
  765. fi
  766. done
  767. IFS="$ac_save_ifs"
  768. fi
  769. CC="$ac_cv_prog_CC"
  770. if test -n "$CC"; then
  771. echo "$ac_t""$CC" 1>&6
  772. else
  773. echo "$ac_t""no" 1>&6
  774. fi
  775. ;;
  776. esac
  777. fi
  778. test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  779. fi
  780. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  781. echo "configure:862: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  782. ac_ext=c
  783. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  784. ac_cpp='$CPP $CPPFLAGS'
  785. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  786. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  787. cross_compiling=$ac_cv_prog_cc_cross
  788. cat > conftest.$ac_ext << EOF
  789. #line 873 "configure"
  790. #include "confdefs.h"
  791. main(){return(0);}
  792. EOF
  793. if { (eval echo configure:878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  794. ac_cv_prog_cc_works=yes
  795. # If we can't run a trivial program, we are probably using a cross compiler.
  796. if (./conftest; exit) 2>/dev/null; then
  797. ac_cv_prog_cc_cross=no
  798. else
  799. ac_cv_prog_cc_cross=yes
  800. fi
  801. else
  802. echo "configure: failed program was:" >&5
  803. cat conftest.$ac_ext >&5
  804. ac_cv_prog_cc_works=no
  805. fi
  806. rm -fr conftest*
  807. ac_ext=c
  808. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  809. ac_cpp='$CPP $CPPFLAGS'
  810. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  811. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  812. cross_compiling=$ac_cv_prog_cc_cross
  813. echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
  814. if test $ac_cv_prog_cc_works = no; then
  815. { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  816. fi
  817. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  818. echo "configure:904: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  819. echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  820. cross_compiling=$ac_cv_prog_cc_cross
  821. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  822. echo "configure:909: checking whether we are using GNU C" >&5
  823. cat > conftest.c <<EOF
  824. #ifdef __GNUC__
  825. yes;
  826. #endif
  827. EOF
  828. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  829. ac_cv_prog_gcc=yes
  830. else
  831. ac_cv_prog_gcc=no
  832. fi
  833. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  834. if test $ac_cv_prog_gcc = yes; then
  835. GCC=yes
  836. else
  837. GCC=
  838. fi
  839. ac_test_CFLAGS="${CFLAGS+set}"
  840. ac_save_CFLAGS="$CFLAGS"
  841. CFLAGS=
  842. echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  843. echo "configure:934: checking whether ${CC-cc} accepts -g" >&5
  844. echo 'void f(){}' > conftest.c
  845. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  846. ac_cv_prog_cc_g=yes
  847. else
  848. ac_cv_prog_cc_g=no
  849. fi
  850. rm -f conftest*
  851. echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
  852. if test "$ac_test_CFLAGS" = set; then
  853. CFLAGS="$ac_save_CFLAGS"
  854. elif test $ac_cv_prog_cc_g = yes; then
  855. if test "$GCC" = yes; then
  856. CFLAGS="-g -O2"
  857. else
  858. CFLAGS="-g"
  859. fi
  860. else
  861. if test "$GCC" = yes; then
  862. CFLAGS="-O2"
  863. else
  864. CFLAGS=
  865. fi
  866. fi
  867. echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
  868. echo "configure:963: checking for Cygwin environment" >&5
  869. cat > conftest.$ac_ext <<EOF
  870. #line 966 "configure"
  871. #include "confdefs.h"
  872. int main() {
  873. #ifndef __CYGWIN__
  874. #define __CYGWIN__ __CYGWIN32__
  875. #endif
  876. return __CYGWIN__;
  877. ; return 0; }
  878. EOF
  879. if { (eval echo configure:977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  880. rm -rf conftest*
  881. ac_cv_cygwin=yes
  882. else
  883. echo "configure: failed program was:" >&5
  884. cat conftest.$ac_ext >&5
  885. rm -rf conftest*
  886. ac_cv_cygwin=no
  887. fi
  888. rm -f conftest*
  889. rm -f conftest*
  890. echo "$ac_t""$ac_cv_cygwin" 1>&6
  891. CYGWIN=
  892. test "$ac_cv_cygwin" = yes && CYGWIN=yes
  893. echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
  894. echo "configure:993: checking for mingw32 environment" >&5
  895. cat > conftest.$ac_ext <<EOF
  896. #line 996 "configure"
  897. #include "confdefs.h"
  898. int main() {
  899. return __MINGW32__;
  900. ; return 0; }
  901. EOF
  902. if { (eval echo configure:1003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  903. rm -rf conftest*
  904. ac_cv_mingw32=yes
  905. else
  906. echo "configure: failed program was:" >&5
  907. cat conftest.$ac_ext >&5
  908. rm -rf conftest*
  909. ac_cv_mingw32=no
  910. fi
  911. rm -f conftest*
  912. rm -f conftest*
  913. echo "$ac_t""$ac_cv_mingw32" 1>&6
  914. MINGW32=
  915. test "$ac_cv_mingw32" = yes && MINGW32=yes
  916. echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
  917. echo "configure:1021: checking for executable suffix" >&5
  918. if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
  919. ac_cv_exeext=.exe
  920. else
  921. ac_cv_exeext=no
  922. fi
  923. EXEEXT=""
  924. test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
  925. echo "$ac_t""${ac_cv_exeext}" 1>&6
  926. ac_exeext=$EXEEXT
  927. # Check for full floating-point support, including Infinity and NaN
  928. IEEEFLAG=
  929. echo $ac_n "checking for full floating-point support""... $ac_c" 1>&6
  930. echo "configure:1040: checking for full floating-point support" >&5
  931. if test "$cross_compiling" = yes; then
  932. echo "$ac_t""unknown (cross-compiling)" 1>&6
  933. echo $ac_n "checking whether "cc -mieee" works""... $ac_c" 1>&6
  934. echo "configure:1045: checking whether "cc -mieee" works" >&5
  935. ac_save_cflags=${CFLAGS}
  936. CFLAGS="$CFLAGS -mieee"
  937. cat > conftest.$ac_ext <<EOF
  938. #line 1049 "configure"
  939. #include "confdefs.h"
  940. int main() {
  941. ; return 0; }
  942. EOF
  943. if { (eval echo configure:1056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  944. rm -rf conftest*
  945. echo "$ac_t""yes" 1>&6
  946. IEEEFLAG="-mieee"
  947. else
  948. echo "configure: failed program was:" >&5
  949. cat conftest.$ac_ext >&5
  950. rm -rf conftest*
  951. echo "$ac_t""no" 1>&6
  952. fi
  953. rm -f conftest*
  954. CFLAGS=${ac_save_cflags}
  955. else
  956. cat > conftest.$ac_ext <<EOF
  957. #line 1072 "configure"
  958. #include "confdefs.h"
  959. #include <float.h>
  960. int main(void) {
  961. double one = 1.0;
  962. double zero = 0.0;
  963. if (one/zero > DBL_MAX) /* infinity */
  964. if (zero/zero != zero/zero) /* NaN */
  965. return 0;
  966. return 1;
  967. }
  968. EOF
  969. if { (eval echo configure:1086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  970. then
  971. echo "$ac_t""yes" 1>&6
  972. else
  973. echo "configure: failed program was:" >&5
  974. cat conftest.$ac_ext >&5
  975. rm -fr conftest*
  976. echo "$ac_t""no" 1>&6
  977. ac_save_cflags=${CFLAGS}
  978. CFLAGS=-mieee
  979. echo $ac_n "checking for full floating-point support with -mieee""... $ac_c" 1>&6
  980. echo "configure:1099: checking for full floating-point support with -mieee" >&5
  981. if test "$cross_compiling" = yes; then
  982. echo "$ac_t""unknown (cross-compiling)" 1>&6
  983. { echo "configure: error: *** INTERNAL CONFIGURE ERROR" 1>&2; exit 1; }
  984. else
  985. cat > conftest.$ac_ext <<EOF
  986. #line 1106 "configure"
  987. #include "confdefs.h"
  988. #include <float.h>
  989. int main(void) {
  990. double one = 1.0;
  991. double zero = 0.0;
  992. if (one/zero > DBL_MAX) /* infinity */
  993. if (zero/zero != zero/zero) /* NaN */
  994. return 0;
  995. return 1;
  996. }
  997. EOF
  998. if { (eval echo configure:1120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  999. then
  1000. echo "$ac_t""yes" 1>&6
  1001. IEEEFLAG="-mieee"
  1002. else
  1003. echo "configure: failed program was:" >&5
  1004. cat conftest.$ac_ext >&5
  1005. rm -fr conftest*
  1006. echo "$ac_t""no" 1>&6
  1007. echo "configure: warning: *** Incomplete floating-point support." 1>&2
  1008. fi
  1009. rm -fr conftest*
  1010. fi
  1011. CFLAGS=${ac_save_cflags}
  1012. fi
  1013. rm -fr conftest*
  1014. fi
  1015. CFLAGS="$CFLAGS $IEEEFLAG"
  1016. # Set BINDIR
  1017. if test -n "${bindir}"; then
  1018. BINDIR="${bindir}"
  1019. else
  1020. BINDIR=/usr/local/bin
  1021. fi
  1022. # Set SRCDIR and DSTDIR
  1023. # Extract the first word of "pwd", so it can be a program name with args.
  1024. set dummy pwd; ac_word=$2
  1025. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1026. echo "configure:1157: checking for $ac_word" >&5
  1027. case "$pwd" in
  1028. /*)
  1029. ac_cv_path_pwd="$pwd" # Let the user override the test with a path.
  1030. ;;
  1031. ?:/*)
  1032. ac_cv_path_pwd="$pwd" # Let the user override the test with a dos path.
  1033. ;;
  1034. *)
  1035. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  1036. ac_dummy="$PATH"
  1037. for ac_dir in $ac_dummy; do
  1038. test -z "$ac_dir" && ac_dir=.
  1039. if test -f $ac_dir/$ac_word; then
  1040. ac_cv_path_pwd="$ac_dir/$ac_word"
  1041. break
  1042. fi
  1043. done
  1044. IFS="$ac_save_ifs"
  1045. test -z "$ac_cv_path_pwd" && ac_cv_path_pwd="pwd"
  1046. ;;
  1047. esac
  1048. pwd="$ac_cv_path_pwd"
  1049. if test -n "$pwd"; then
  1050. echo "$ac_t""$pwd" 1>&6
  1051. else
  1052. echo "$ac_t""no" 1>&6
  1053. fi
  1054. if test "$MINGW32" = yes ; then
  1055. winpwd="$pwd -W"
  1056. else
  1057. winpwd="$pwd"
  1058. fi
  1059. echo $ac_n "checking for source directory""... $ac_c" 1>&6
  1060. echo "configure:1195: checking for source directory" >&5
  1061. if test -z "$srcdir" ; then
  1062. SRCDIR=`$pwd`
  1063. else
  1064. SRCDIR=`(cd "$srcdir" ; $pwd)`
  1065. fi
  1066. echo "$ac_t"""$SRCDIR"" 1>&6
  1067. echo $ac_n "checking for build directory""... $ac_c" 1>&6
  1068. echo "configure:1206: checking for build directory" >&5
  1069. DSTDIR=`$pwd`
  1070. WINDSTDIR=`$winpwd`
  1071. echo "$ac_t"""$DSTDIR"" 1>&6
  1072. # Set ARCH
  1073. ARCH=
  1074. if test -z "${host}"; then
  1075. ARCH="unknown"
  1076. else
  1077. ARCH="${host}"
  1078. fi
  1079. # Use absolute path for aux directory so that install-sh works
  1080. ac_aux_dir=
  1081. for ac_dir in $SRCDIR $srcdir/$SRCDIR; do
  1082. if test -f $ac_dir/install-sh; then
  1083. ac_aux_dir=$ac_dir
  1084. ac_install_sh="$ac_aux_dir/install-sh -c"
  1085. break
  1086. elif test -f $ac_dir/install.sh; then
  1087. ac_aux_dir=$ac_dir
  1088. ac_install_sh="$ac_aux_dir/install.sh -c"
  1089. break
  1090. fi
  1091. done
  1092. if test -z "$ac_aux_dir"; then
  1093. { echo "configure: error: can not find install-sh or install.sh in $SRCDIR $srcdir/$SRCDIR" 1>&2; exit 1; }
  1094. fi
  1095. ac_config_guess=$ac_aux_dir/config.guess
  1096. ac_config_sub=$ac_aux_dir/config.sub
  1097. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  1098. # Set GISBASE and GRASS_BIN
  1099. GISBASE=${WINDSTDIR}/dist.${ARCH}
  1100. GRASS_BIN=${DSTDIR}/bin.${ARCH}
  1101. # Set GRASS_VERSION_*
  1102. GRASS_VERSION_FILE=include/VERSION
  1103. GRASS_VERSION_MAJOR=`sed -n 1p ${GRASS_VERSION_FILE}`
  1104. GRASS_VERSION_MINOR=`sed -n 2p ${GRASS_VERSION_FILE}`
  1105. GRASS_VERSION_RELEASE=`sed -n 3p ${GRASS_VERSION_FILE}`
  1106. GRASS_VERSION_DATE=`sed -n 4p ${GRASS_VERSION_FILE}`
  1107. GRASS_VERSION_NUMBER=`echo ${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}`
  1108. NAME_VER=`echo ${GRASS_VERSION_NUMBER} | sed 's/\..*//'`
  1109. LIB_VER=`echo ${GRASS_VERSION_NUMBER} | sed 's/^\([0-9.]*\).*$/\1/'`
  1110. # Check for MacOSX App
  1111. # Check whether --enable-macosx-app or --disable-macosx-app was given.
  1112. if test "${enable_macosx_app+set}" = set; then
  1113. enableval="$enable_macosx_app"
  1114. :
  1115. else
  1116. enable_macosx_app=no
  1117. fi
  1118. echo $ac_n "checking for MacOSX App""... $ac_c" 1>&6
  1119. echo "configure:1291: checking for MacOSX App" >&5
  1120. case "$enable_macosx_app" in
  1121. yes) MACOSX_APP=1 ;;
  1122. no) MACOSX_APP= ;;
  1123. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  1124. esac
  1125. echo "$ac_t"""$enable_macosx_app"" 1>&6
  1126. # Set INST_DIR
  1127. if test -n "$MACOSX_APP" ; then
  1128. INSTDIR='${prefix}'"/GRASS-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.app/Contents/MacOS"
  1129. else
  1130. INSTDIR='${prefix}'"/grass-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}"
  1131. fi
  1132. # Get flags for building shared libraries
  1133. echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
  1134. echo "configure:1314: checking how to build libraries" >&5
  1135. # Check whether --enable-shared or --disable-shared was given.
  1136. if test "${enable_shared+set}" = set; then
  1137. enableval="$enable_shared"
  1138. shared_ok=$enableval
  1139. else
  1140. shared_ok=yes
  1141. fi
  1142. if test "${enable_shared+set}" = set; then
  1143. enableval="$enable_shared"
  1144. shared_ok=$enableval
  1145. else
  1146. shared_ok=yes
  1147. fi
  1148. if test "$shared_ok" = "yes" ; then
  1149. echo "$ac_t""shared" 1>&6
  1150. SHARED_BUILD=1
  1151. GRASS_LIB_PREFIX='$(SHLIB_PREFIX)'
  1152. GRASS_LIB_SUFFIX='$(SHLIB_SUFFIX)'
  1153. GRASS_LIBRARY_TYPE='shlib'
  1154. else
  1155. echo "$ac_t""static" 1>&6
  1156. SHARED_BUILD=0
  1157. cat >> confdefs.h <<\EOF
  1158. #define STATIC_BUILD 1
  1159. EOF
  1160. GRASS_LIB_PREFIX='$(STLIB_PREFIX)'
  1161. GRASS_LIB_SUFFIX='$(STLIB_SUFFIX)'
  1162. GRASS_LIBRARY_TYPE='stlib'
  1163. fi
  1164. ac_save_ldflags="$LDFLAGS"
  1165. # Extract the first word of "ranlib", so it can be a program name with args.
  1166. set dummy ranlib; ac_word=$2
  1167. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1168. echo "configure:1357: checking for $ac_word" >&5
  1169. if test -n "$RANLIB"; then
  1170. ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  1171. else
  1172. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  1173. ac_dummy="$PATH"
  1174. for ac_dir in $ac_dummy; do
  1175. test -z "$ac_dir" && ac_dir=.
  1176. if test -f $ac_dir/$ac_word; then
  1177. ac_cv_prog_RANLIB="ranlib"
  1178. break
  1179. fi
  1180. done
  1181. IFS="$ac_save_ifs"
  1182. test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  1183. fi
  1184. RANLIB="$ac_cv_prog_RANLIB"
  1185. if test -n "$RANLIB"; then
  1186. echo "$ac_t""$RANLIB" 1>&6
  1187. else
  1188. echo "$ac_t""no" 1>&6
  1189. fi
  1190. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  1191. echo "configure:1382: checking how to run the C preprocessor" >&5
  1192. # On Suns, sometimes $CPP names a directory.
  1193. if test -n "$CPP" && test -d "$CPP"; then
  1194. CPP=
  1195. fi
  1196. if test -z "$CPP"; then
  1197. # This must be in double quotes, not single quotes, because CPP may get
  1198. # substituted into the Makefile and "${CC-cc}" will confuse make.
  1199. CPP="${CC-cc} -E"
  1200. # On the NeXT, cc -E runs the code through the compiler's parser,
  1201. # not just through cpp.
  1202. cat > conftest.$ac_ext <<EOF
  1203. #line 1395 "configure"
  1204. #include "confdefs.h"
  1205. #include <assert.h>
  1206. Syntax Error
  1207. EOF
  1208. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1209. { (eval echo configure:1401: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1210. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1211. if test -z "$ac_err"; then
  1212. :
  1213. else
  1214. echo "$ac_err" >&5
  1215. echo "configure: failed program was:" >&5
  1216. cat conftest.$ac_ext >&5
  1217. rm -rf conftest*
  1218. CPP="${CC-cc} -E -traditional-cpp"
  1219. cat > conftest.$ac_ext <<EOF
  1220. #line 1412 "configure"
  1221. #include "confdefs.h"
  1222. #include <assert.h>
  1223. Syntax Error
  1224. EOF
  1225. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1226. { (eval echo configure:1418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1227. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1228. if test -z "$ac_err"; then
  1229. :
  1230. else
  1231. echo "$ac_err" >&5
  1232. echo "configure: failed program was:" >&5
  1233. cat conftest.$ac_ext >&5
  1234. rm -rf conftest*
  1235. CPP="${CC-cc} -nologo -E"
  1236. cat > conftest.$ac_ext <<EOF
  1237. #line 1429 "configure"
  1238. #include "confdefs.h"
  1239. #include <assert.h>
  1240. Syntax Error
  1241. EOF
  1242. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1243. { (eval echo configure:1435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1244. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1245. if test -z "$ac_err"; then
  1246. :
  1247. else
  1248. echo "$ac_err" >&5
  1249. echo "configure: failed program was:" >&5
  1250. cat conftest.$ac_ext >&5
  1251. rm -rf conftest*
  1252. CPP=/lib/cpp
  1253. fi
  1254. rm -f conftest*
  1255. fi
  1256. rm -f conftest*
  1257. fi
  1258. rm -f conftest*
  1259. ac_cv_prog_CPP="$CPP"
  1260. CPP="$ac_cv_prog_CPP"
  1261. else
  1262. ac_cv_prog_CPP="$CPP"
  1263. fi
  1264. echo "$ac_t""$CPP" 1>&6
  1265. # Step 0.a: Enable 64 bit support?
  1266. echo $ac_n "checking if 64bit support is requested""... $ac_c" 1>&6
  1267. echo "configure:1463: checking if 64bit support is requested" >&5
  1268. # Check whether --enable-64bit or --disable-64bit was given.
  1269. if test "${enable_64bit+set}" = set; then
  1270. enableval="$enable_64bit"
  1271. :
  1272. else
  1273. enableval="no"
  1274. fi
  1275. if test "$enableval" = "yes"; then
  1276. do64bit=yes
  1277. else
  1278. do64bit=no
  1279. fi
  1280. echo "$ac_t""$do64bit" 1>&6
  1281. # Step 0.b: Enable Solaris 64 bit VIS support?
  1282. echo $ac_n "checking if 64bit Sparc VIS support is requested""... $ac_c" 1>&6
  1283. echo "configure:1483: checking if 64bit Sparc VIS support is requested" >&5
  1284. # Check whether --enable-64bit-vis or --disable-64bit-vis was given.
  1285. if test "${enable_64bit_vis+set}" = set; then
  1286. enableval="$enable_64bit_vis"
  1287. :
  1288. else
  1289. enableval="no"
  1290. fi
  1291. if test "$enableval" = "yes"; then
  1292. # Force 64bit on with VIS
  1293. do64bit=yes
  1294. do64bitVIS=yes
  1295. else
  1296. do64bitVIS=no
  1297. fi
  1298. echo "$ac_t""$do64bitVIS" 1>&6
  1299. # Step 1: set the variable "system" to hold the name and version number
  1300. # for the system. This can usually be done via the "uname" command, but
  1301. # there are a few systems, like Next, where this doesn't work.
  1302. echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6
  1303. echo "configure:1507: checking system version (for dynamic loading)" >&5
  1304. if test -f /usr/lib/NextStep/software_version; then
  1305. system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
  1306. else
  1307. system=`uname -s`-`uname -r`
  1308. if test "$?" -ne 0 ; then
  1309. echo "$ac_t""unknown (can't find uname command)" 1>&6
  1310. system=unknown
  1311. else
  1312. # Special check for weird MP-RAS system (uname returns weird
  1313. # results, and the version is kept in special file).
  1314. if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
  1315. system=MP-RAS-`awk '{print }' /etc/.relid`
  1316. fi
  1317. if test "`uname -s`" = "AIX" ; then
  1318. system=AIX-`uname -v`.`uname -r`
  1319. fi
  1320. echo "$ac_t""$system" 1>&6
  1321. fi
  1322. fi
  1323. # Step 2: check for existence of -ldl library. This is needed because
  1324. # Linux can use either -ldl or -ldld for dynamic loading.
  1325. echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
  1326. echo "configure:1533: checking for dlopen in -ldl" >&5
  1327. ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
  1328. ac_save_LIBS="$LIBS"
  1329. LIBS="-ldl $LIBS"
  1330. cat > conftest.$ac_ext <<EOF
  1331. #line 1539 "configure"
  1332. #include "confdefs.h"
  1333. /* Override any gcc2 internal prototype to avoid an error. */
  1334. /* We use char because int might match the return type of a gcc2
  1335. builtin and then its argument prototype would still apply. */
  1336. char dlopen();
  1337. int main() {
  1338. dlopen()
  1339. ; return 0; }
  1340. EOF
  1341. if { (eval echo configure:1550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1342. rm -rf conftest*
  1343. eval "ac_cv_lib_$ac_lib_var=yes"
  1344. else
  1345. echo "configure: failed program was:" >&5
  1346. cat conftest.$ac_ext >&5
  1347. rm -rf conftest*
  1348. eval "ac_cv_lib_$ac_lib_var=no"
  1349. fi
  1350. rm -f conftest*
  1351. LIBS="$ac_save_LIBS"
  1352. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1353. echo "$ac_t""yes" 1>&6
  1354. have_dl=yes
  1355. else
  1356. echo "$ac_t""no" 1>&6
  1357. have_dl=no
  1358. fi
  1359. # Require ranlib early so we can override it in special cases below.
  1360. # Step 3: set configuration options based on system name and version.
  1361. do64bit_ok=no
  1362. EXTRA_CFLAGS=""
  1363. GRASS_EXPORT_FILE_SUFFIX=""
  1364. UNSHARED_LIB_SUFFIX=""
  1365. GRASS_TRIM_DOTS='`echo ${LIB_VER} | tr -d .`'
  1366. ECHO_VERSION='`echo ${LIB_VER}`'
  1367. GRASS_LIB_VERSIONS_OK=ok
  1368. CFLAGS_DEBUG=-g
  1369. CFLAGS_OPTIMIZE=-O
  1370. if test "$GCC" = "yes" ; then
  1371. CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int"
  1372. else
  1373. CFLAGS_WARNING=""
  1374. fi
  1375. GRASS_NEEDS_EXP_FILE=0
  1376. GRASS_BUILD_EXP_FILE=""
  1377. GRASS_EXP_FILE=""
  1378. # Extract the first word of "ar", so it can be a program name with args.
  1379. set dummy ar; ac_word=$2
  1380. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1381. echo "configure:1597: checking for $ac_word" >&5
  1382. if test -n "$AR"; then
  1383. ac_cv_prog_AR="$AR" # Let the user override the test.
  1384. else
  1385. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  1386. ac_dummy="$PATH"
  1387. for ac_dir in $ac_dummy; do
  1388. test -z "$ac_dir" && ac_dir=.
  1389. if test -f $ac_dir/$ac_word; then
  1390. ac_cv_prog_AR="ar"
  1391. break
  1392. fi
  1393. done
  1394. IFS="$ac_save_ifs"
  1395. fi
  1396. AR="$ac_cv_prog_AR"
  1397. if test -n "$AR"; then
  1398. echo "$ac_t""$AR" 1>&6
  1399. else
  1400. echo "$ac_t""no" 1>&6
  1401. fi
  1402. if test "${AR}" = "" ; then
  1403. { echo "configure: error: Required archive tool 'ar' not found on PATH." 1>&2; exit 1; }
  1404. fi
  1405. STLIB_LD='${AR} cr'
  1406. LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
  1407. PLAT_OBJS=""
  1408. case $system in
  1409. AIX-5.*)
  1410. if test "${GRASS_THREADS}" = "1" -a "$GCC" != "yes" ; then
  1411. # AIX requires the _r compiler when gcc isn't being used
  1412. if test "${CC}" != "cc_r" ; then
  1413. CC=${CC}_r
  1414. fi
  1415. echo "$ac_t""Using $CC for compiling with threads" 1>&6
  1416. fi
  1417. LIBS="$LIBS -lc"
  1418. # AIX-5 uses ELF style dynamic libraries
  1419. SHLIB_CFLAGS=""
  1420. # Note: need the LIBS below, otherwise Tk won't find Tcl's
  1421. # symbols when dynamically loaded into tclsh.
  1422. SHLIB_LD_LIBS='${LIBS}'
  1423. SHLIB_SUFFIX=".so"
  1424. LDFLAGS=""
  1425. LD_LIBRARY_PATH_VAR="LIBPATH"
  1426. # Check to enable 64-bit flags for compiler/linker
  1427. if test "$do64bit" = "yes" ; then
  1428. if test "$GCC" = "yes" ; then
  1429. echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
  1430. else
  1431. do64bit_ok=yes
  1432. EXTRA_CFLAGS="-q64"
  1433. LDFLAGS="-q64"
  1434. RANLIB="${RANLIB} -X64"
  1435. AR="${AR} -X64"
  1436. SHLIB_LD_FLAGS="-b64"
  1437. fi
  1438. fi
  1439. if test "`uname -m`" = "ia64" ; then
  1440. # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
  1441. SHLIB_LD="/usr/ccs/bin/ld -G -z text"
  1442. # AIX-5 has dl* in libc.so
  1443. if test "$GCC" = "yes" ; then
  1444. CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
  1445. else
  1446. CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
  1447. fi
  1448. LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
  1449. else
  1450. SHLIB_LD="${SRCDIR}/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry ${SHLIB_LD_FLAGS}"
  1451. CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
  1452. LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  1453. GRASS_NEEDS_EXP_FILE=1
  1454. GRASS_EXPORT_FILE_SUFFIX='${LIB_VER}.exp'
  1455. fi
  1456. ;;
  1457. AIX-*)
  1458. if test "${GRASS_THREADS}" = "1" -a "$GCC" != "yes" ; then
  1459. # AIX requires the _r compiler when gcc isn't being used
  1460. if test "${CC}" != "cc_r" ; then
  1461. CC=${CC}_r
  1462. fi
  1463. echo "$ac_t""Using $CC for compiling with threads" 1>&6
  1464. fi
  1465. LIBS="$LIBS -lc"
  1466. SHLIB_CFLAGS=""
  1467. SHLIB_LD_LIBS='${LIBS}'
  1468. SHLIB_SUFFIX=".so"
  1469. LDFLAGS=""
  1470. CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
  1471. LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  1472. LD_LIBRARY_PATH_VAR="LIBPATH"
  1473. GRASS_NEEDS_EXP_FILE=1
  1474. GRASS_EXPORT_FILE_SUFFIX='${LIB_VER}.exp'
  1475. # Check to enable 64-bit flags for compiler/linker
  1476. if test "$do64bit" = "yes" ; then
  1477. if test "$GCC" = "yes" ; then
  1478. echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
  1479. else
  1480. do64bit_ok=yes
  1481. EXTRA_CFLAGS="-q64"
  1482. LDFLAGS="-q64"
  1483. RANLIB="${RANLIB} -X64"
  1484. AR="${AR} -X64"
  1485. SHLIB_LD_FLAGS="-b64"
  1486. fi
  1487. fi
  1488. SHLIB_LD="${SRCDIR}/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry ${SHLIB_LD_FLAGS}"
  1489. # On AIX <=v4 systems, libbsd.a has to be linked in to support
  1490. # non-blocking file IO. This library has to be linked in after
  1491. # the MATH_LIBS or it breaks the pow() function. The way to
  1492. # insure proper sequencing, is to add it to the tail of MATH_LIBS.
  1493. # This library also supplies gettimeofday.
  1494. #
  1495. # AIX does not have a timezone field in struct tm. When the AIX
  1496. # bsd library is used, the timezone global and the gettimeofday
  1497. # methods are to be avoided for timezone deduction instead, we
  1498. # deduce the timezone by comparing the localtime result on a
  1499. # known GMT value.
  1500. echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
  1501. echo "configure:1726: checking for gettimeofday in -lbsd" >&5
  1502. ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
  1503. ac_save_LIBS="$LIBS"
  1504. LIBS="-lbsd $LIBS"
  1505. cat > conftest.$ac_ext <<EOF
  1506. #line 1732 "configure"
  1507. #include "confdefs.h"
  1508. /* Override any gcc2 internal prototype to avoid an error. */
  1509. /* We use char because int might match the return type of a gcc2
  1510. builtin and then its argument prototype would still apply. */
  1511. char gettimeofday();
  1512. int main() {
  1513. gettimeofday()
  1514. ; return 0; }
  1515. EOF
  1516. if { (eval echo configure:1743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1517. rm -rf conftest*
  1518. eval "ac_cv_lib_$ac_lib_var=yes"
  1519. else
  1520. echo "configure: failed program was:" >&5
  1521. cat conftest.$ac_ext >&5
  1522. rm -rf conftest*
  1523. eval "ac_cv_lib_$ac_lib_var=no"
  1524. fi
  1525. rm -f conftest*
  1526. LIBS="$ac_save_LIBS"
  1527. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1528. echo "$ac_t""yes" 1>&6
  1529. libbsd=yes
  1530. else
  1531. echo "$ac_t""no" 1>&6
  1532. libbsd=no
  1533. fi
  1534. if test $libbsd = yes; then
  1535. MATH_LIBS="$MATH_LIBS -lbsd"
  1536. cat >> confdefs.h <<\EOF
  1537. #define USE_DELTA_FOR_TZ 1
  1538. EOF
  1539. fi
  1540. ;;
  1541. BeOS*)
  1542. SHLIB_CFLAGS="-fPIC"
  1543. SHLIB_LD="${CC} -nostart"
  1544. SHLIB_LD_LIBS='${LIBS}'
  1545. SHLIB_SUFFIX=".so"
  1546. LDFLAGS=""
  1547. #-----------------------------------------------------------
  1548. # Check for inet_ntoa in -lbind, for BeOS (which also needs
  1549. # -lsocket, even if the network functions are in -lnet which
  1550. # is always linked to, for compatibility.
  1551. #-----------------------------------------------------------
  1552. echo $ac_n "checking for inet_ntoa in -lbind""... $ac_c" 1>&6
  1553. echo "configure:1784: checking for inet_ntoa in -lbind" >&5
  1554. ac_lib_var=`echo bind'_'inet_ntoa | sed 'y%./+-%__p_%'`
  1555. ac_save_LIBS="$LIBS"
  1556. LIBS="-lbind $LIBS"
  1557. cat > conftest.$ac_ext <<EOF
  1558. #line 1790 "configure"
  1559. #include "confdefs.h"
  1560. /* Override any gcc2 internal prototype to avoid an error. */
  1561. /* We use char because int might match the return type of a gcc2
  1562. builtin and then its argument prototype would still apply. */
  1563. char inet_ntoa();
  1564. int main() {
  1565. inet_ntoa()
  1566. ; return 0; }
  1567. EOF
  1568. if { (eval echo configure:1801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1569. rm -rf conftest*
  1570. eval "ac_cv_lib_$ac_lib_var=yes"
  1571. else
  1572. echo "configure: failed program was:" >&5
  1573. cat conftest.$ac_ext >&5
  1574. rm -rf conftest*
  1575. eval "ac_cv_lib_$ac_lib_var=no"
  1576. fi
  1577. rm -f conftest*
  1578. LIBS="$ac_save_LIBS"
  1579. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1580. echo "$ac_t""yes" 1>&6
  1581. LIBS="$LIBS -lbind -lsocket"
  1582. else
  1583. echo "$ac_t""no" 1>&6
  1584. fi
  1585. ;;
  1586. BSD/OS-2.1*|BSD/OS-3*)
  1587. SHLIB_CFLAGS=""
  1588. SHLIB_LD="shlicc -r"
  1589. SHLIB_LD_LIBS='${LIBS}'
  1590. SHLIB_SUFFIX=".so"
  1591. LDFLAGS=""
  1592. CC_SEARCH_FLAGS=""
  1593. LD_SEARCH_FLAGS=""
  1594. ;;
  1595. BSD/OS-4.*)
  1596. SHLIB_CFLAGS="-export-dynamic -fPIC"
  1597. SHLIB_LD="cc -shared"
  1598. SHLIB_LD_LIBS='${LIBS}'
  1599. SHLIB_SUFFIX=".so"
  1600. LDFLAGS="-export-dynamic"
  1601. CC_SEARCH_FLAGS=""
  1602. LD_SEARCH_FLAGS=""
  1603. ;;
  1604. dgux*)
  1605. SHLIB_CFLAGS="-K PIC"
  1606. SHLIB_LD="cc -G"
  1607. SHLIB_LD_LIBS=""
  1608. SHLIB_SUFFIX=".so"
  1609. LDFLAGS=""
  1610. CC_SEARCH_FLAGS=""
  1611. LD_SEARCH_FLAGS=""
  1612. ;;
  1613. HP-UX-*.11.*)
  1614. # Use updated header definitions where possible
  1615. cat >> confdefs.h <<\EOF
  1616. #define _XOPEN_SOURCE 1
  1617. EOF
  1618. # Use the XOPEN network library
  1619. cat >> confdefs.h <<\EOF
  1620. #define _XOPEN_SOURCE_EXTENDED 1
  1621. EOF
  1622. # Use the XOPEN network library
  1623. LIBS="$LIBS -lxnet" # Use the XOPEN network library
  1624. SHLIB_SUFFIX=".sl"
  1625. echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
  1626. echo "configure:1862: checking for shl_load in -ldld" >&5
  1627. ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
  1628. ac_save_LIBS="$LIBS"
  1629. LIBS="-ldld $LIBS"
  1630. cat > conftest.$ac_ext <<EOF
  1631. #line 1868 "configure"
  1632. #include "confdefs.h"
  1633. /* Override any gcc2 internal prototype to avoid an error. */
  1634. /* We use char because int might match the return type of a gcc2
  1635. builtin and then its argument prototype would still apply. */
  1636. char shl_load();
  1637. int main() {
  1638. shl_load()
  1639. ; return 0; }
  1640. EOF
  1641. if { (eval echo configure:1879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1642. rm -rf conftest*
  1643. eval "ac_cv_lib_$ac_lib_var=yes"
  1644. else
  1645. echo "configure: failed program was:" >&5
  1646. cat conftest.$ac_ext >&5
  1647. rm -rf conftest*
  1648. eval "ac_cv_lib_$ac_lib_var=no"
  1649. fi
  1650. rm -f conftest*
  1651. LIBS="$ac_save_LIBS"
  1652. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1653. echo "$ac_t""yes" 1>&6
  1654. shared_ok=yes
  1655. else
  1656. echo "$ac_t""no" 1>&6
  1657. shared_ok=no
  1658. fi
  1659. if test "$shared_ok" = yes; then
  1660. SHLIB_CFLAGS="+z"
  1661. SHLIB_LD="ld -b"
  1662. SHLIB_LD_LIBS='${LIBS}'
  1663. LDFLAGS="-Wl,-E"
  1664. CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
  1665. LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
  1666. LD_LIBRARY_PATH_VAR="SHLIB_PATH"
  1667. fi
  1668. # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
  1669. #EXTRA_CFLAGS="+DAportable"
  1670. # Check to enable 64-bit flags for compiler/linker
  1671. if test "$do64bit" = "yes" ; then
  1672. if test "$GCC" = "yes" ; then
  1673. hpux_arch=`gcc -dumpmachine`
  1674. case $hpux_arch in
  1675. hppa64*)
  1676. # 64-bit gcc in use. Fix flags for GNU ld.
  1677. do64bit_ok=yes
  1678. SHLIB_LD="gcc -shared"
  1679. SHLIB_LD_LIBS=""
  1680. LD_SEARCH_FLAGS=''
  1681. CC_SEARCH_FLAGS=''
  1682. ;;
  1683. *)
  1684. echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
  1685. ;;
  1686. esac
  1687. else
  1688. do64bit_ok=yes
  1689. if test "`uname -m`" = "ia64" ; then
  1690. EXTRA_CFLAGS="+DD64"
  1691. LDFLAGS="+DD64 $LDFLAGS"
  1692. else
  1693. EXTRA_CFLAGS="+DA2.0W"
  1694. LDFLAGS="+DA2.0W $LDFLAGS"
  1695. fi
  1696. fi
  1697. fi
  1698. ;;
  1699. HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
  1700. SHLIB_SUFFIX=".sl"
  1701. echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
  1702. echo "configure:1944: checking for shl_load in -ldld" >&5
  1703. ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
  1704. ac_save_LIBS="$LIBS"
  1705. LIBS="-ldld $LIBS"
  1706. cat > conftest.$ac_ext <<EOF
  1707. #line 1950 "configure"
  1708. #include "confdefs.h"
  1709. /* Override any gcc2 internal prototype to avoid an error. */
  1710. /* We use char because int might match the return type of a gcc2
  1711. builtin and then its argument prototype would still apply. */
  1712. char shl_load();
  1713. int main() {
  1714. shl_load()
  1715. ; return 0; }
  1716. EOF
  1717. if { (eval echo configure:1961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1718. rm -rf conftest*
  1719. eval "ac_cv_lib_$ac_lib_var=yes"
  1720. else
  1721. echo "configure: failed program was:" >&5
  1722. cat conftest.$ac_ext >&5
  1723. rm -rf conftest*
  1724. eval "ac_cv_lib_$ac_lib_var=no"
  1725. fi
  1726. rm -f conftest*
  1727. LIBS="$ac_save_LIBS"
  1728. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1729. echo "$ac_t""yes" 1>&6
  1730. shared_ok=yes
  1731. else
  1732. echo "$ac_t""no" 1>&6
  1733. shared_ok=no
  1734. fi
  1735. if test "$shared_ok" = yes; then
  1736. SHLIB_CFLAGS="+z"
  1737. SHLIB_LD="ld -b"
  1738. SHLIB_LD_LIBS=""
  1739. LDFLAGS="-Wl,-E"
  1740. CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
  1741. LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
  1742. LD_LIBRARY_PATH_VAR="SHLIB_PATH"
  1743. fi
  1744. ;;
  1745. IRIX-4.*)
  1746. SHLIB_CFLAGS="-G 0"
  1747. SHLIB_SUFFIX=".a"
  1748. SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
  1749. SHLIB_LD_LIBS='${LIBS}'
  1750. LDFLAGS="-Wl,-D,08000000"
  1751. CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
  1752. LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  1753. SHARED_LIB_SUFFIX='${LIB_VER}.a'
  1754. ;;
  1755. IRIX-5.*)
  1756. SHLIB_CFLAGS=""
  1757. SHLIB_LD="ld -shared -rdata_shared"
  1758. SHLIB_LD_LIBS='${LIBS}'
  1759. SHLIB_SUFFIX=".so"
  1760. CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  1761. LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
  1762. EXTRA_CFLAGS=""
  1763. LDFLAGS=""
  1764. ;;
  1765. IRIX-6.2)
  1766. SHLIB_CFLAGS=""
  1767. SHLIB_LD="ld -shared -rdata_shared"
  1768. SHLIB_LD_LIBS='${LIBS}'
  1769. SHLIB_SUFFIX=".so"
  1770. CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  1771. LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
  1772. ;;
  1773. IRIX-6.*|IRIX64-6.5*)
  1774. SHLIB_CFLAGS=""
  1775. SHLIB_LD="ld -n32 -shared -rdata_shared"
  1776. SHLIB_LD_LIBS='${LIBS}'
  1777. SHLIB_SUFFIX=".so"
  1778. CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  1779. LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
  1780. if test "$GCC" = "yes" ; then
  1781. EXTRA_CFLAGS="-mabi=n32"
  1782. LDFLAGS="-mabi=n32"
  1783. else
  1784. case $system in
  1785. IRIX-6.3)
  1786. # Use to build 6.2 compatible binaries on 6.3.
  1787. EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS"
  1788. ;;
  1789. *)
  1790. EXTRA_CFLAGS="-n32"
  1791. ;;
  1792. esac
  1793. LDFLAGS="-n32"
  1794. fi
  1795. ;;
  1796. IRIX64-6.*)
  1797. SHLIB_CFLAGS=""
  1798. SHLIB_LD="ld -n32 -shared -rdata_shared"
  1799. SHLIB_LD_LIBS='${LIBS}'
  1800. SHLIB_SUFFIX=".so"
  1801. LDFLAGS=""
  1802. CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  1803. LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
  1804. # Check to enable 64-bit flags for compiler/linker
  1805. if test "$do64bit" = "yes" ; then
  1806. if test "$GCC" = "yes" ; then
  1807. echo "configure: warning: 64bit mode not supported by gcc" 1>&2
  1808. else
  1809. do64bit_ok=yes
  1810. SHLIB_LD="ld -64 -shared -rdata_shared"
  1811. EXTRA_CFLAGS="-64"
  1812. LDFLAGS="-64"
  1813. fi
  1814. fi
  1815. ;;
  1816. Linux*)
  1817. SHLIB_CFLAGS="-fPIC"
  1818. SHLIB_LD_LIBS='${LIBS}'
  1819. SHLIB_SUFFIX=".so"
  1820. CFLAGS_OPTIMIZE=-O2
  1821. # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings
  1822. # when you inline the string and math operations. Turn this off to
  1823. # get rid of the warnings.
  1824. #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
  1825. if test "$have_dl" = yes; then
  1826. SHLIB_LD="${CC} -shared"
  1827. LDFLAGS="-Wl,--export-dynamic"
  1828. CC_SEARCH_FLAGS='-Wl,-rpath-link,${LIB_RUNTIME_DIR}'
  1829. LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  1830. else
  1831. ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
  1832. echo $ac_n "checking for dld.h""... $ac_c" 1>&6
  1833. echo "configure:2083: checking for dld.h" >&5
  1834. cat > conftest.$ac_ext <<EOF
  1835. #line 2086 "configure"
  1836. #include "confdefs.h"
  1837. #include <dld.h>
  1838. EOF
  1839. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1840. { (eval echo configure:2091: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1841. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1842. if test -z "$ac_err"; then
  1843. rm -rf conftest*
  1844. eval "ac_cv_header_$ac_safe=yes"
  1845. else
  1846. echo "$ac_err" >&5
  1847. echo "configure: failed program was:" >&5
  1848. cat conftest.$ac_ext >&5
  1849. rm -rf conftest*
  1850. eval "ac_cv_header_$ac_safe=no"
  1851. fi
  1852. rm -f conftest*
  1853. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1854. echo "$ac_t""yes" 1>&6
  1855. SHLIB_LD="ld -shared"
  1856. LDFLAGS=""
  1857. CC_SEARCH_FLAGS=""
  1858. LD_SEARCH_FLAGS=""
  1859. else
  1860. echo "$ac_t""no" 1>&6
  1861. fi
  1862. fi
  1863. if test "`uname -m`" = "alpha" ; then
  1864. EXTRA_CFLAGS="-mieee"
  1865. fi
  1866. # The combo of gcc + glibc has a bug related
  1867. # to inlining of functions like strtod(). The
  1868. # -fno-builtin flag should address this problem
  1869. # but it does not work. The -fno-inline flag
  1870. # is kind of overkill but it works.
  1871. # Disable inlining only when one of the
  1872. # files in compat/*.c is being linked in.
  1873. if test x"${USE_COMPAT}" != x ; then
  1874. EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
  1875. fi
  1876. # XIM peeking works under XFree86.
  1877. cat >> confdefs.h <<\EOF
  1878. #define PEEK_XCLOSEIM 1
  1879. EOF
  1880. ;;
  1881. GNU*)
  1882. SHLIB_CFLAGS="-fPIC"
  1883. SHLIB_LD_LIBS='${LIBS}'
  1884. SHLIB_SUFFIX=".so"
  1885. if test "$have_dl" = yes; then
  1886. SHLIB_LD="${CC} -shared"
  1887. LDFLAGS="-Wl,--export-dynamic"
  1888. CC_SEARCH_FLAGS=""
  1889. LD_SEARCH_FLAGS=""
  1890. else
  1891. ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
  1892. echo $ac_n "checking for dld.h""... $ac_c" 1>&6
  1893. echo "configure:2151: checking for dld.h" >&5
  1894. cat > conftest.$ac_ext <<EOF
  1895. #line 2154 "configure"
  1896. #include "confdefs.h"
  1897. #include <dld.h>
  1898. EOF
  1899. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1900. { (eval echo configure:2159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1901. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1902. if test -z "$ac_err"; then
  1903. rm -rf conftest*
  1904. eval "ac_cv_header_$ac_safe=yes"
  1905. else
  1906. echo "$ac_err" >&5
  1907. echo "configure: failed program was:" >&5
  1908. cat conftest.$ac_ext >&5
  1909. rm -rf conftest*
  1910. eval "ac_cv_header_$ac_safe=no"
  1911. fi
  1912. rm -f conftest*
  1913. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1914. echo "$ac_t""yes" 1>&6
  1915. SHLIB_LD="ld -shared"
  1916. LDFLAGS=""
  1917. CC_SEARCH_FLAGS=""
  1918. LD_SEARCH_FLAGS=""
  1919. else
  1920. echo "$ac_t""no" 1>&6
  1921. fi
  1922. fi
  1923. if test "`uname -m`" = "alpha" ; then
  1924. EXTRA_CFLAGS="-mieee"
  1925. fi
  1926. ;;
  1927. CYGWIN*)
  1928. SHLIB_CFLAGS=""
  1929. SHLIB_LD_LIBS='${LIBS}'
  1930. SHLIB_SUFFIX=".dll"
  1931. SHLIB_LD="${CC} -shared"
  1932. LDFLAGS="-Wl,--export-dynamic"
  1933. CC_SEARCH_FLAGS=""
  1934. LD_SEARCH_FLAGS=""
  1935. LD_LIBRARY_PATH_VAR="PATH"
  1936. ;;
  1937. MINGW*)
  1938. SHLIB_CFLAGS=""
  1939. SHLIB_LD_LIBS='${LIBS}'
  1940. SHLIB_SUFFIX=".dll"
  1941. SHLIB_LD="${CC} -shared"
  1942. LDFLAGS="-Wl,--export-dynamic,--enable-runtime-pseudo-reloc"
  1943. CC_SEARCH_FLAGS=""
  1944. LD_SEARCH_FLAGS=""
  1945. LD_LIBRARY_PATH_VAR="PATH"
  1946. ;;
  1947. MP-RAS-02*)
  1948. SHLIB_CFLAGS="-K PIC"
  1949. SHLIB_LD="cc -G"
  1950. SHLIB_LD_LIBS=""
  1951. SHLIB_SUFFIX=".so"
  1952. LDFLAGS=""
  1953. CC_SEARCH_FLAGS=""
  1954. LD_SEARCH_FLAGS=""
  1955. ;;
  1956. MP-RAS-*)
  1957. SHLIB_CFLAGS="-K PIC"
  1958. SHLIB_LD="cc -G"
  1959. SHLIB_LD_LIBS=""
  1960. SHLIB_SUFFIX=".so"
  1961. LDFLAGS="-Wl,-Bexport"
  1962. CC_SEARCH_FLAGS=""
  1963. LD_SEARCH_FLAGS=""
  1964. ;;
  1965. NetBSD-*)
  1966. # NetBSD has ELF.
  1967. SHLIB_CFLAGS="-fPIC"
  1968. SHLIB_LD="ld -Bshareable -x"
  1969. SHLIB_LD_LIBS="${LIBS}"
  1970. SHLIB_SUFFIX=".so"
  1971. LDFLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR} -export-dynamic'
  1972. CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  1973. LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
  1974. if test "${GRASS_THREADS}" = "1" ; then
  1975. # The -pthread needs to go in the CFLAGS, not LIBS
  1976. LIBS=`echo $LIBS | sed s/-pthread//`
  1977. EXTRA_CFLAGS="-pthread"
  1978. LDFLAGS="$LDFLAGS -pthread"
  1979. fi
  1980. # NetBSD doesn't handle version numbers with dots.
  1981. UNSHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.a'
  1982. SHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.so',
  1983. GRASS_LIB_VERSIONS_OK=nodots
  1984. ;;
  1985. OpenBSD-*)
  1986. SHLIB_LD="${CC} -shared"
  1987. SHLIB_LD_LIBS='${LIBS}'
  1988. SHLIB_SUFFIX=".so"
  1989. LDFLAGS=""
  1990. CC_SEARCH_FLAGS=""
  1991. LD_SEARCH_FLAGS=""
  1992. echo $ac_n "checking for ELF""... $ac_c" 1>&6
  1993. echo "configure:2256: checking for ELF" >&5
  1994. cat > conftest.$ac_ext <<EOF
  1995. #line 2258 "configure"
  1996. #include "confdefs.h"
  1997. #ifdef __ELF__
  1998. yes
  1999. #endif
  2000. EOF
  2001. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2002. egrep "yes" >/dev/null 2>&1; then
  2003. rm -rf conftest*
  2004. echo "$ac_t""yes" 1>&6
  2005. SHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.so.1.0'
  2006. else
  2007. rm -rf conftest*
  2008. echo "$ac_t""no" 1>&6
  2009. SHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.so.1.0'
  2010. fi
  2011. rm -f conftest*
  2012. # OpenBSD doesn't do version numbers with dots.
  2013. UNSHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.a'
  2014. GRASS_LIB_VERSIONS_OK=nodots
  2015. ;;
  2016. FreeBSD-[1-2].*)
  2017. # Not available on all versions: check for include file.
  2018. ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
  2019. echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
  2020. echo "configure:2288: checking for dlfcn.h" >&5
  2021. cat > conftest.$ac_ext <<EOF
  2022. #line 2291 "configure"
  2023. #include "confdefs.h"
  2024. #include <dlfcn.h>
  2025. EOF
  2026. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2027. { (eval echo configure:2296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2028. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2029. if test -z "$ac_err"; then
  2030. rm -rf conftest*
  2031. eval "ac_cv_header_$ac_safe=yes"
  2032. else
  2033. echo "$ac_err" >&5
  2034. echo "configure: failed program was:" >&5
  2035. cat conftest.$ac_ext >&5
  2036. rm -rf conftest*
  2037. eval "ac_cv_header_$ac_safe=no"
  2038. fi
  2039. rm -f conftest*
  2040. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2041. echo "$ac_t""yes" 1>&6
  2042. SHLIB_CFLAGS="-fPIC"
  2043. SHLIB_LD="ld -Bshareable -x"
  2044. SHLIB_LD_LIBS=""
  2045. SHLIB_SUFFIX=".so"
  2046. LDFLAGS=""
  2047. CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  2048. LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
  2049. echo $ac_n "checking for ELF""... $ac_c" 1>&6
  2050. echo "configure:2320: checking for ELF" >&5
  2051. cat > conftest.$ac_ext <<EOF
  2052. #line 2322 "configure"
  2053. #include "confdefs.h"
  2054. #ifdef __ELF__
  2055. yes
  2056. #endif
  2057. EOF
  2058. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2059. egrep "yes" >/dev/null 2>&1; then
  2060. rm -rf conftest*
  2061. echo "$ac_t""yes" 1>&6
  2062. SHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.so'
  2063. else
  2064. rm -rf conftest*
  2065. echo "$ac_t""no" 1>&6
  2066. SHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.so.1.0'
  2067. fi
  2068. rm -f conftest*
  2069. else
  2070. echo "$ac_t""no" 1>&6
  2071. SHLIB_CFLAGS=""
  2072. SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
  2073. SHLIB_LD_LIBS='${LIBS}'
  2074. SHLIB_SUFFIX=".a"
  2075. LDFLAGS=""
  2076. CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
  2077. LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  2078. SHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.a'
  2079. fi
  2080. UNSHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.a'
  2081. GRASS_LIB_VERSIONS_OK=nodots
  2082. ;;
  2083. FreeBSD-*)
  2084. # FreeBSD 3.* and greater have ELF.
  2085. SHLIB_CFLAGS="-fPIC"
  2086. SHLIB_LD="ld -Bshareable -x"
  2087. SHLIB_LD_LIBS='${LIBS}'
  2088. SHLIB_SUFFIX=".so"
  2089. LDFLAGS="-export-dynamic"
  2090. CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  2091. LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
  2092. if test "${GRASS_THREADS}" = "1" ; then
  2093. # The -pthread needs to go in the CFLAGS, not LIBS
  2094. LIBS=`echo $LIBS | sed s/-pthread//`
  2095. EXTRA_CFLAGS="-pthread"
  2096. LDFLAGS="$LDFLAGS -pthread"
  2097. fi
  2098. case $system in
  2099. FreeBSD-3.*)
  2100. # FreeBSD-3 doesn't handle version numbers with dots.
  2101. UNSHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.a'
  2102. SHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.so'
  2103. GRASS_LIB_VERSIONS_OK=nodots
  2104. ;;
  2105. esac
  2106. ;;
  2107. Rhapsody-*|Darwin-*)
  2108. SHLIB_CFLAGS="-fno-common"
  2109. SHLIB_LD="cc -dynamiclib -compatibility_version \${GRASS_VERSION_MAJOR}.\${GRASS_VERSION_MINOR} -current_version \${GRASS_VERSION_MAJOR}.\${GRASS_VERSION_MINOR} -install_name \${INST_DIR}/lib/lib\${LIB_NAME}\${SHLIB_SUFFIX}"
  2110. GRASS_SHLIB_LD_EXTRAS=""
  2111. SHLIB_LD_LIBS='${LIBS}'
  2112. SHLIB_SUFFIX=".dylib"
  2113. PLAT_OBJS=""
  2114. CC_SEARCH_FLAGS=""
  2115. LD_SEARCH_FLAGS=""
  2116. CFLAGS_OPTIMIZE="-Os"
  2117. LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
  2118. # for compatibility with autoconf vers 2.13 :
  2119. HACK=""
  2120. EXTRA_CFLAGS=""
  2121. LIBS="$LIBS"
  2122. ;;
  2123. NEXTSTEP-*)
  2124. SHLIB_CFLAGS=""
  2125. SHLIB_LD="cc -nostdlib -r"
  2126. SHLIB_LD_LIBS=""
  2127. SHLIB_SUFFIX=".so"
  2128. LDFLAGS=""
  2129. CC_SEARCH_FLAGS=""
  2130. LD_SEARCH_FLAGS=""
  2131. ;;
  2132. OS/390-*)
  2133. CFLAGS_OPTIMIZE="" # Optimizer is buggy
  2134. cat >> confdefs.h <<\EOF
  2135. #define _OE_SOCKETS 1
  2136. EOF
  2137. # needed in sys/socket.h
  2138. ;;
  2139. OSF1-1.0|OSF1-1.1|OSF1-1.2)
  2140. # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
  2141. SHLIB_CFLAGS=""
  2142. # Hack: make package name same as library name
  2143. SHLIB_LD='ld -R -export :'
  2144. SHLIB_LD_LIBS=""
  2145. SHLIB_SUFFIX=".so"
  2146. LDFLAGS=""
  2147. CC_SEARCH_FLAGS=""
  2148. LD_SEARCH_FLAGS=""
  2149. ;;
  2150. OSF1-1.*)
  2151. # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
  2152. SHLIB_CFLAGS="-fPIC"
  2153. if test "$SHARED_BUILD" = "1" ; then
  2154. SHLIB_LD="ld -shared"
  2155. else
  2156. SHLIB_LD="ld -non_shared"
  2157. fi
  2158. SHLIB_LD_LIBS=""
  2159. SHLIB_SUFFIX=".so"
  2160. LDFLAGS=""
  2161. CC_SEARCH_FLAGS=""
  2162. LD_SEARCH_FLAGS=""
  2163. ;;
  2164. OSF1-V*)
  2165. # Digital OSF/1
  2166. SHLIB_CFLAGS=""
  2167. if test "$SHARED_BUILD" = "1" ; then
  2168. SHLIB_LD='ld -shared -expect_unresolved "*"'
  2169. else
  2170. SHLIB_LD='ld -non_shared -expect_unresolved "*"'
  2171. fi
  2172. SHLIB_LD_LIBS=""
  2173. SHLIB_SUFFIX=".so"
  2174.  LDFLAGS=""
  2175. CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  2176. LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
  2177. if test "$GCC" = "yes" ; then
  2178. EXTRA_CFLAGS="-mieee"
  2179. else
  2180. EXTRA_CFLAGS="-DHAVE_TZSET -std1 -ieee"
  2181. fi
  2182. # see pthread_intro(3) for pthread support on osf1, k.furukawa
  2183. if test "${GRASS_THREADS}" = "1" ; then
  2184. EXTRA_CFLAGS="${EXTRA_CFLAGS} -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
  2185. EXTRA_CFLAGS="${EXTRA_CFLAGS} -DGRASS_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
  2186. LIBS=`echo $LIBS | sed s/-lpthreads//`
  2187. if test "$GCC" = "yes" ; then
  2188. LIBS="$LIBS -lpthread -lmach -lexc"
  2189. else
  2190. EXTRA_CFLAGS="${EXTRA_CFLAGS} -pthread"
  2191. LDFLAGS="-pthread"
  2192. fi
  2193. fi
  2194. ;;
  2195. QNX-6*)
  2196. # QNX RTP
  2197. # This may work for all QNX, but it was only reported for v6.
  2198. SHLIB_CFLAGS="-fPIC"
  2199. SHLIB_LD="ld -Bshareable -x"
  2200. SHLIB_LD_LIBS=""
  2201. SHLIB_SUFFIX=".so"
  2202. LDFLAGS=""
  2203. CC_SEARCH_FLAGS=""
  2204. LD_SEARCH_FLAGS=""
  2205. ;;
  2206. RISCos-*)
  2207. SHLIB_CFLAGS="-G 0"
  2208. SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
  2209. SHLIB_LD_LIBS='${LIBS}'
  2210. SHLIB_SUFFIX=".a"
  2211. LDFLAGS="-Wl,-D,08000000"
  2212. CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
  2213. LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  2214. ;;
  2215. SCO_SV-3.2*)
  2216. # Note, dlopen is available only on SCO 3.2.5 and greater. However,
  2217. # this test works, since "uname -s" was non-standard in 3.2.4 and
  2218. # below.
  2219. if test "$GCC" = "yes" ; then
  2220. SHLIB_CFLAGS="-fPIC -melf"
  2221. LDFLAGS="-melf -Wl,-Bexport"
  2222. else
  2223. SHLIB_CFLAGS="-Kpic -belf"
  2224. LDFLAGS="-belf -Wl,-Bexport"
  2225. fi
  2226. SHLIB_LD="ld -G"
  2227. SHLIB_LD_LIBS=""
  2228. SHLIB_SUFFIX=".so"
  2229. CC_SEARCH_FLAGS=""
  2230. LD_SEARCH_FLAGS=""
  2231. ;;
  2232. SINIX*5.4*)
  2233. SHLIB_CFLAGS="-K PIC"
  2234. SHLIB_LD="cc -G"
  2235. SHLIB_LD_LIBS=""
  2236. SHLIB_SUFFIX=".so"
  2237. LDFLAGS=""
  2238. CC_SEARCH_FLAGS=""
  2239. LD_SEARCH_FLAGS=""
  2240. ;;
  2241. SunOS-4*)
  2242. SHLIB_CFLAGS="-PIC"
  2243. SHLIB_LD="ld"
  2244. SHLIB_LD_LIBS=""
  2245. SHLIB_SUFFIX=".so"
  2246. LDFLAGS=""
  2247. CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
  2248. LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  2249. # SunOS can't handle version numbers with dots in them in library
  2250. # specs, like -ltcl7.5, so use -ltcl75 instead. Also, it
  2251. # requires an extra version number at the end of .so file names.
  2252. # So, the library has to have a name like libtcl75.so.1.0
  2253. SHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.so.1.0'
  2254. UNSHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.a'
  2255. GRASS_LIB_VERSIONS_OK=nodots
  2256. ;;
  2257. SunOS-5.[0-6].*)
  2258. # Note: If _REENTRANT isn't defined, then Solaris
  2259. # won't define thread-safe library routines.
  2260. cat >> confdefs.h <<\EOF
  2261. #define _REENTRANT 1
  2262. EOF
  2263. cat >> confdefs.h <<\EOF
  2264. #define _POSIX_PTHREAD_SEMANTICS 1
  2265. EOF
  2266. # Note: need the LIBS below, otherwise Tk won't find Tcl's
  2267. # symbols when dynamically loaded into tclsh.
  2268. SHLIB_LD_LIBS='${LIBS}'
  2269. SHLIB_SUFFIX=".so"
  2270. LDFLAGS=""
  2271. if test "$GCC" = "yes" ; then
  2272. SHLIB_CFLAGS="-fPIC"
  2273. SHLIB_LD="$CC -shared"
  2274. CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
  2275. LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  2276. else
  2277. SHLIB_CFLAGS="-KPIC"
  2278. SHLIB_LD="/usr/ccs/bin/ld -G -z text"
  2279. CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
  2280. LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  2281. fi
  2282. ;;
  2283. SunOS-5*)
  2284. # Note: If _REENTRANT isn't defined, then Solaris
  2285. # won't define thread-safe library routines.
  2286. cat >> confdefs.h <<\EOF
  2287. #define _REENTRANT 1
  2288. EOF
  2289. cat >> confdefs.h <<\EOF
  2290. #define _POSIX_PTHREAD_SEMANTICS 1
  2291. EOF
  2292. LDFLAGS=""
  2293. # Check to enable 64-bit flags for compiler/linker
  2294. if test "$do64bit" = "yes" ; then
  2295. arch=`isainfo`
  2296. if test "$arch" = "sparcv9 sparc" ; then
  2297. if test "$GCC" = "yes" ; then
  2298. echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
  2299. else
  2300. SHLIB_CFLAGS="-KPIC"
  2301. do64bit_ok=yes
  2302. if test "$do64bitVIS" = "yes" ; then
  2303. EXTRA_CFLAGS="-xarch=v9a"
  2304. LDFLAGS="-xarch=v9a"
  2305. else
  2306. EXTRA_CFLAGS="-xarch=v9"
  2307. LDFLAGS="-xarch=v9"
  2308. fi
  2309. fi
  2310. else
  2311. echo "configure: warning: "64bit mode only supported sparcv9 system"" 1>&2
  2312. fi
  2313. fi
  2314. # Note: need the LIBS below, otherwise Tk won't find Tcl's
  2315. # symbols when dynamically loaded into tclsh.
  2316. SHLIB_LD_LIBS='${LIBS}'
  2317. SHLIB_SUFFIX=".so"
  2318. if test "$GCC" = "yes" ; then
  2319. SHLIB_CFLAGS="-fPIC"
  2320. SHLIB_LD="$CC -shared"
  2321. CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
  2322. LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  2323. else
  2324. SHLIB_CFLAGS="-KPIC"
  2325. SHLIB_LD="CC -G -z text"
  2326. CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
  2327. LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
  2328. fi
  2329. ;;
  2330. ULTRIX-4.*)
  2331. SHLIB_CFLAGS="-G 0"
  2332. SHLIB_SUFFIX=".a"
  2333. SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
  2334. SHLIB_LD_LIBS='${LIBS}'
  2335. LDFLAGS="-Wl,-D,08000000"
  2336. CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
  2337. LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  2338. if test "$GCC" != "yes" ; then
  2339. EXTRA_CFLAGS="-DHAVE_TZSET -std1"
  2340. fi
  2341. ;;
  2342. UNIX_SV* | UnixWare-5*)
  2343. SHLIB_CFLAGS="-KPIC"
  2344. SHLIB_LD="cc -G"
  2345. SHLIB_LD_LIBS=""
  2346. SHLIB_SUFFIX=".so"
  2347. # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
  2348. # that don't grok the -Bexport option. Test that it does.
  2349. hold_ldflags=$LDFLAGS
  2350. echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
  2351. echo "configure:2646: checking for ld accepts -Bexport flag" >&5
  2352. LDFLAGS="${LDFLAGS} -Wl,-Bexport"
  2353. cat > conftest.$ac_ext <<EOF
  2354. #line 2649 "configure"
  2355. #include "confdefs.h"
  2356. int main() {
  2357. int i;
  2358. ; return 0; }
  2359. EOF
  2360. if { (eval echo configure:2656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2361. rm -rf conftest*
  2362. found=yes
  2363. else
  2364. echo "configure: failed program was:" >&5
  2365. cat conftest.$ac_ext >&5
  2366. rm -rf conftest*
  2367. found=no
  2368. fi
  2369. rm -f conftest*
  2370. LDFLAGS=$hold_ldflags
  2371. echo "$ac_t""$found" 1>&6
  2372. if test $found = yes; then
  2373. LDFLAGS="-Wl,-Bexport"
  2374. else
  2375. LDFLAGS=""
  2376. fi
  2377. CC_SEARCH_FLAGS=""
  2378. LD_SEARCH_FLAGS=""
  2379. ;;
  2380. esac
  2381. # If we're running gcc, then change the C flags for compiling shared
  2382. # libraries to the right flags for gcc, instead of those for the
  2383. # standard manufacturer compiler.
  2384. if test "$GCC" = "yes" ; then
  2385. case $system in
  2386. AIX-*)
  2387. ;;
  2388. BSD/OS*)
  2389. ;;
  2390. *)
  2391. ;;
  2392. NetBSD-*|FreeBSD-*)
  2393. ;;
  2394. Rhapsody-*|Darwin-*)
  2395. ;;
  2396. RISCos-*)
  2397. ;;
  2398. SCO_SV-3.2*)
  2399. ;;
  2400. ULTRIX-4.*)
  2401. ;;
  2402. *)
  2403. SHLIB_CFLAGS="-fPIC"
  2404. ;;
  2405. esac
  2406. fi
  2407. if test "$SHARED_LIB_SUFFIX" = "" ; then
  2408. SHARED_LIB_SUFFIX='${LIB_VER}${SHLIB_SUFFIX}'
  2409. fi
  2410. if test "$UNSHARED_LIB_SUFFIX" = "" ; then
  2411. UNSHARED_LIB_SUFFIX='${LIB_VER}.a'
  2412. fi
  2413. if test "${SHARED_BUILD}" = "1" && test "${SHLIB_SUFFIX}" != "" ; then
  2414. LIB_SUFFIX=${SHARED_LIB_SUFFIX}
  2415. MAKE_LIB='${SHLIB_LD} -o $@ ${SHLIB_LD_FLAGS} ${OBJS} ${SHLIB_LD_LIBS} ${GRASS_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
  2416. INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
  2417. else
  2418. LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
  2419. if test "$RANLIB" = "" ; then
  2420. MAKE_LIB='$(STLIB_LD) $@ ${OBJS}'
  2421. INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
  2422. else
  2423. MAKE_LIB='${STLIB_LD} $@ ${OBJS} ; ${RANLIB} $@'
  2424. INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(LIB_FILE))'
  2425. fi
  2426. fi
  2427. # Stub lib does not depend on shared/static configuration
  2428. if test "$RANLIB" = "" ; then
  2429. MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS}'
  2430. INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)'
  2431. else
  2432. MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS} ; ${RANLIB} $@'
  2433. INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(STUB_LIB_FILE))'
  2434. fi
  2435. LDFLAGS="${ac_save_ldflags} $LDFLAGS"
  2436. # Enable options
  2437. # Check whether --enable-w11 or --disable-w11 was given.
  2438. if test "${enable_w11+set}" = set; then
  2439. enableval="$enable_w11"
  2440. :
  2441. else
  2442. enable_w11=no
  2443. fi
  2444. # With options
  2445. # Check whether --with-cxx or --without-cxx was given.
  2446. if test "${with_cxx+set}" = set; then
  2447. withval="$with_cxx"
  2448. :
  2449. else
  2450. with_cxx=no
  2451. fi
  2452. #LOC_ARG_WITH(g77, GNU Fortran 77, no)
  2453. # Check whether --with-jpeg or --without-jpeg was given.
  2454. if test "${with_jpeg+set}" = set; then
  2455. withval="$with_jpeg"
  2456. :
  2457. else
  2458. with_jpeg=yes
  2459. fi
  2460. # Check whether --with-tiff or --without-tiff was given.
  2461. if test "${with_tiff+set}" = set; then
  2462. withval="$with_tiff"
  2463. :
  2464. else
  2465. with_tiff=yes
  2466. fi
  2467. # Check whether --with-png or --without-png was given.
  2468. if test "${with_png+set}" = set; then
  2469. withval="$with_png"
  2470. :
  2471. else
  2472. with_png=yes
  2473. fi
  2474. # Check whether --with-tcltk or --without-tcltk was given.
  2475. if test "${with_tcltk+set}" = set; then
  2476. withval="$with_tcltk"
  2477. :
  2478. else
  2479. with_tcltk=yes
  2480. fi
  2481. # Check whether --with-postgres or --without-postgres was given.
  2482. if test "${with_postgres+set}" = set; then
  2483. withval="$with_postgres"
  2484. :
  2485. else
  2486. with_postgres=no
  2487. fi
  2488. # Check whether --with-mysql or --without-mysql was given.
  2489. if test "${with_mysql+set}" = set; then
  2490. withval="$with_mysql"
  2491. :
  2492. else
  2493. with_mysql=no
  2494. fi
  2495. # Check whether --with-sqlite or --without-sqlite was given.
  2496. if test "${with_sqlite+set}" = set; then
  2497. withval="$with_sqlite"
  2498. :
  2499. else
  2500. with_sqlite=no
  2501. fi
  2502. # Check whether --with-ffmpeg or --without-ffmpeg was given.
  2503. if test "${with_ffmpeg+set}" = set; then
  2504. withval="$with_ffmpeg"
  2505. :
  2506. else
  2507. with_ffmpeg=no
  2508. fi
  2509. # Check whether --with-opengl or --without-opengl was given.
  2510. if test "${with_opengl+set}" = set; then
  2511. withval="$with_opengl"
  2512. :
  2513. else
  2514. with_opengl=yes
  2515. fi
  2516. # Check whether --with-odbc or --without-odbc was given.
  2517. if test "${with_odbc+set}" = set; then
  2518. withval="$with_odbc"
  2519. :
  2520. else
  2521. with_odbc=no
  2522. fi
  2523. # Check whether --with-fftw or --without-fftw was given.
  2524. if test "${with_fftw+set}" = set; then
  2525. withval="$with_fftw"
  2526. :
  2527. else
  2528. with_fftw=yes
  2529. fi
  2530. # Check whether --with-blas or --without-blas was given.
  2531. if test "${with_blas+set}" = set; then
  2532. withval="$with_blas"
  2533. :
  2534. else
  2535. with_blas=no
  2536. fi
  2537. # Check whether --with-lapack or --without-lapack was given.
  2538. if test "${with_lapack+set}" = set; then
  2539. withval="$with_lapack"
  2540. :
  2541. else
  2542. with_lapack=no
  2543. fi
  2544. # Check whether --with-cairo or --without-cairo was given.
  2545. if test "${with_cairo+set}" = set; then
  2546. withval="$with_cairo"
  2547. :
  2548. else
  2549. with_cairo=no
  2550. fi
  2551. # Check whether --with-freetype or --without-freetype was given.
  2552. if test "${with_freetype+set}" = set; then
  2553. withval="$with_freetype"
  2554. :
  2555. else
  2556. with_freetype=no
  2557. fi
  2558. # Check whether --with-nls or --without-nls was given.
  2559. if test "${with_nls+set}" = set; then
  2560. withval="$with_nls"
  2561. :
  2562. else
  2563. with_nls=no
  2564. fi
  2565. # Check whether --with-readline or --without-readline was given.
  2566. if test "${with_readline+set}" = set; then
  2567. withval="$with_readline"
  2568. :
  2569. else
  2570. with_readline=no
  2571. fi
  2572. # Check whether --with-opendwg or --without-opendwg was given.
  2573. if test "${with_opendwg+set}" = set; then
  2574. withval="$with_opendwg"
  2575. :
  2576. else
  2577. with_opendwg=no
  2578. fi
  2579. # Check whether --with-regex or --without-regex was given.
  2580. if test "${with_regex+set}" = set; then
  2581. withval="$with_regex"
  2582. :
  2583. else
  2584. with_regex=yes
  2585. fi
  2586. # Check whether --with-pthread or --without-pthread was given.
  2587. if test "${with_pthread+set}" = set; then
  2588. withval="$with_pthread"
  2589. :
  2590. else
  2591. with_pthread=no
  2592. fi
  2593. # Check whether --with-python or --without-python was given.
  2594. if test "${with_python+set}" = set; then
  2595. withval="$with_python"
  2596. :
  2597. else
  2598. with_python="no"
  2599. fi
  2600. # Check whether --with-wxwidgets or --without-wxwidgets was given.
  2601. if test "${with_wxwidgets+set}" = set; then
  2602. withval="$with_wxwidgets"
  2603. :
  2604. else
  2605. with_wxwidgets="no"
  2606. fi
  2607. # With includes and libs options
  2608. # Check whether --with-gdal or --without-gdal was given.
  2609. if test "${with_gdal+set}" = set; then
  2610. withval="$with_gdal"
  2611. :
  2612. fi
  2613. # Check whether --with-includes or --without-includes was given.
  2614. if test "${with_includes+set}" = set; then
  2615. withval="$with_includes"
  2616. :
  2617. fi
  2618. # Check whether --with-libs or --without-libs was given.
  2619. if test "${with_libs+set}" = set; then
  2620. withval="$with_libs"
  2621. :
  2622. fi
  2623. # Check whether --with-zlib-includes or --without-zlib-includes was given.
  2624. if test "${with_zlib_includes+set}" = set; then
  2625. withval="$with_zlib_includes"
  2626. :
  2627. fi
  2628. # Check whether --with-zlib-libs or --without-zlib-libs was given.
  2629. if test "${with_zlib_libs+set}" = set; then
  2630. withval="$with_zlib_libs"
  2631. :
  2632. fi
  2633. # Check whether --with-readline-includes or --without-readline-includes was given.
  2634. if test "${with_readline_includes+set}" = set; then
  2635. withval="$with_readline_includes"
  2636. :
  2637. fi
  2638. # Check whether --with-readline-libs or --without-readline-libs was given.
  2639. if test "${with_readline_libs+set}" = set; then
  2640. withval="$with_readline_libs"
  2641. :
  2642. fi
  2643. # Check whether --with-jpeg-includes or --without-jpeg-includes was given.
  2644. if test "${with_jpeg_includes+set}" = set; then
  2645. withval="$with_jpeg_includes"
  2646. :
  2647. fi
  2648. # Check whether --with-jpeg-libs or --without-jpeg-libs was given.
  2649. if test "${with_jpeg_libs+set}" = set; then
  2650. withval="$with_jpeg_libs"
  2651. :
  2652. fi
  2653. # Check whether --with-tiff-includes or --without-tiff-includes was given.
  2654. if test "${with_tiff_includes+set}" = set; then
  2655. withval="$with_tiff_includes"
  2656. :
  2657. fi
  2658. # Check whether --with-tiff-libs or --without-tiff-libs was given.
  2659. if test "${with_tiff_libs+set}" = set; then
  2660. withval="$with_tiff_libs"
  2661. :
  2662. fi
  2663. # Check whether --with-png-includes or --without-png-includes was given.
  2664. if test "${with_png_includes+set}" = set; then
  2665. withval="$with_png_includes"
  2666. :
  2667. fi
  2668. # Check whether --with-png-libs or --without-png-libs was given.
  2669. if test "${with_png_libs+set}" = set; then
  2670. withval="$with_png_libs"
  2671. :
  2672. fi
  2673. # Check whether --with-tcltk-includes or --without-tcltk-includes was given.
  2674. if test "${with_tcltk_includes+set}" = set; then
  2675. withval="$with_tcltk_includes"
  2676. :
  2677. fi
  2678. # Check whether --with-tcltk-libs or --without-tcltk-libs was given.
  2679. if test "${with_tcltk_libs+set}" = set; then
  2680. withval="$with_tcltk_libs"
  2681. :
  2682. fi
  2683. # Check whether --with-postgres-includes or --without-postgres-includes was given.
  2684. if test "${with_postgres_includes+set}" = set; then
  2685. withval="$with_postgres_includes"
  2686. :
  2687. fi
  2688. # Check whether --with-postgres-libs or --without-postgres-libs was given.
  2689. if test "${with_postgres_libs+set}" = set; then
  2690. withval="$with_postgres_libs"
  2691. :
  2692. fi
  2693. # Check whether --with-mysql-includes or --without-mysql-includes was given.
  2694. if test "${with_mysql_includes+set}" = set; then
  2695. withval="$with_mysql_includes"
  2696. :
  2697. fi
  2698. # Check whether --with-mysql-libs or --without-mysql-libs was given.
  2699. if test "${with_mysql_libs+set}" = set; then
  2700. withval="$with_mysql_libs"
  2701. :
  2702. fi
  2703. # Check whether --with-sqlite-includes or --without-sqlite-includes was given.
  2704. if test "${with_sqlite_includes+set}" = set; then
  2705. withval="$with_sqlite_includes"
  2706. :
  2707. fi
  2708. # Check whether --with-sqlite-libs or --without-sqlite-libs was given.
  2709. if test "${with_sqlite_libs+set}" = set; then
  2710. withval="$with_sqlite_libs"
  2711. :
  2712. fi
  2713. # Check whether --with-ffmpeg-includes or --without-ffmpeg-includes was given.
  2714. if test "${with_ffmpeg_includes+set}" = set; then
  2715. withval="$with_ffmpeg_includes"
  2716. :
  2717. fi
  2718. # Check whether --with-ffmpeg-libs or --without-ffmpeg-libs was given.
  2719. if test "${with_ffmpeg_libs+set}" = set; then
  2720. withval="$with_ffmpeg_libs"
  2721. :
  2722. fi
  2723. # Check whether --with-opengl-includes or --without-opengl-includes was given.
  2724. if test "${with_opengl_includes+set}" = set; then
  2725. withval="$with_opengl_includes"
  2726. :
  2727. fi
  2728. # Check whether --with-opengl-libs or --without-opengl-libs was given.
  2729. if test "${with_opengl_libs+set}" = set; then
  2730. withval="$with_opengl_libs"
  2731. :
  2732. fi
  2733. # Check whether --with-opengl-framework or --without-opengl-framework was given.
  2734. if test "${with_opengl_framework+set}" = set; then
  2735. withval="$with_opengl_framework"
  2736. :
  2737. fi
  2738. # Check whether --with-odbc-includes or --without-odbc-includes was given.
  2739. if test "${with_odbc_includes+set}" = set; then
  2740. withval="$with_odbc_includes"
  2741. :
  2742. fi
  2743. # Check whether --with-odbc-libs or --without-odbc-libs was given.
  2744. if test "${with_odbc_libs+set}" = set; then
  2745. withval="$with_odbc_libs"
  2746. :
  2747. fi
  2748. # Check whether --with-fftw-includes or --without-fftw-includes was given.
  2749. if test "${with_fftw_includes+set}" = set; then
  2750. withval="$with_fftw_includes"
  2751. :
  2752. fi
  2753. # Check whether --with-fftw-libs or --without-fftw-libs was given.
  2754. if test "${with_fftw_libs+set}" = set; then
  2755. withval="$with_fftw_libs"
  2756. :
  2757. fi
  2758. # Check whether --with-blas-includes or --without-blas-includes was given.
  2759. if test "${with_blas_includes+set}" = set; then
  2760. withval="$with_blas_includes"
  2761. :
  2762. fi
  2763. # Check whether --with-blas-libs or --without-blas-libs was given.
  2764. if test "${with_blas_libs+set}" = set; then
  2765. withval="$with_blas_libs"
  2766. :
  2767. fi
  2768. # Check whether --with-lapack-includes or --without-lapack-includes was given.
  2769. if test "${with_lapack_includes+set}" = set; then
  2770. withval="$with_lapack_includes"
  2771. :
  2772. fi
  2773. # Check whether --with-lapack-libs or --without-lapack-libs was given.
  2774. if test "${with_lapack_libs+set}" = set; then
  2775. withval="$with_lapack_libs"
  2776. :
  2777. fi
  2778. # Check whether --with-cairo-includes or --without-cairo-includes was given.
  2779. if test "${with_cairo_includes+set}" = set; then
  2780. withval="$with_cairo_includes"
  2781. :
  2782. fi
  2783. # Check whether --with-cairo-libs or --without-cairo-libs was given.
  2784. if test "${with_cairo_libs+set}" = set; then
  2785. withval="$with_cairo_libs"
  2786. :
  2787. fi
  2788. # Check whether --with-cairo-ldflags or --without-cairo-ldflags was given.
  2789. if test "${with_cairo_ldflags+set}" = set; then
  2790. withval="$with_cairo_ldflags"
  2791. :
  2792. fi
  2793. # Check whether --with-freetype-includes or --without-freetype-includes was given.
  2794. if test "${with_freetype_includes+set}" = set; then
  2795. withval="$with_freetype_includes"
  2796. :
  2797. fi
  2798. # Check whether --with-freetype-libs or --without-freetype-libs was given.
  2799. if test "${with_freetype_libs+set}" = set; then
  2800. withval="$with_freetype_libs"
  2801. :
  2802. fi
  2803. # Check whether --with-proj-includes or --without-proj-includes was given.
  2804. if test "${with_proj_includes+set}" = set; then
  2805. withval="$with_proj_includes"
  2806. :
  2807. fi
  2808. # Check whether --with-proj-libs or --without-proj-libs was given.
  2809. if test "${with_proj_libs+set}" = set; then
  2810. withval="$with_proj_libs"
  2811. :
  2812. fi
  2813. # Check whether --with-proj-share or --without-proj-share was given.
  2814. if test "${with_proj_share+set}" = set; then
  2815. withval="$with_proj_share"
  2816. :
  2817. fi
  2818. # Check whether --with-opendwg-includes or --without-opendwg-includes was given.
  2819. if test "${with_opendwg_includes+set}" = set; then
  2820. withval="$with_opendwg_includes"
  2821. :
  2822. fi
  2823. # Check whether --with-opendwg-libs or --without-opendwg-libs was given.
  2824. if test "${with_opendwg_libs+set}" = set; then
  2825. withval="$with_opendwg_libs"
  2826. :
  2827. fi
  2828. # Check whether --with-regex-includes or --without-regex-includes was given.
  2829. if test "${with_regex_includes+set}" = set; then
  2830. withval="$with_regex_includes"
  2831. :
  2832. fi
  2833. # Check whether --with-regex-libs or --without-regex-libs was given.
  2834. if test "${with_regex_libs+set}" = set; then
  2835. withval="$with_regex_libs"
  2836. :
  2837. fi
  2838. # Check whether --with-pthread-includes or --without-pthread-includes was given.
  2839. if test "${with_pthread_includes+set}" = set; then
  2840. withval="$with_pthread_includes"
  2841. :
  2842. fi
  2843. # Check whether --with-pthread-libs or --without-pthread-libs was given.
  2844. if test "${with_pthread_libs+set}" = set; then
  2845. withval="$with_pthread_libs"
  2846. :
  2847. fi
  2848. # Put this early on so CPPFLAGS and LDFLAGS have any additional dirs
  2849. # With includes option
  2850. # Handle Fortran compiler choice
  2851. #LOC_CHECK_USE(g77, GNU Fortran 77, USE_G77)
  2852. # Done checking fortran
  2853. echo $ac_n "checking for additional include dirs""... $ac_c" 1>&6
  2854. echo "configure:3424: checking for additional include dirs" >&5
  2855. case "$with_includes" in
  2856. y | ye | yes | n | no)
  2857. { echo "configure: error: *** You must supply a directory to list --with-includes." 1>&2; exit 1; }
  2858. ;;
  2859. esac
  2860. echo "$ac_t""$with_includes" 1>&6
  2861. if test -n "$with_includes"; then
  2862. for dir in $with_includes; do
  2863. if test -d "$dir"; then
  2864. INCLUDE_DIRS="$INCLUDE_DIRS -I$dir"
  2865. else
  2866. { echo "configure: error: *** Include directory $dir does not exist." 1>&2; exit 1; }
  2867. fi
  2868. done
  2869. CPPFLAGS="$CPPFLAGS $INCLUDE_DIRS"
  2870. fi
  2871. # With libs option
  2872. echo $ac_n "checking for additional library dirs""... $ac_c" 1>&6
  2873. echo "configure:3447: checking for additional library dirs" >&5
  2874. case "$with_libs" in
  2875. y | ye | yes | n | no)
  2876. { echo "configure: error: *** You must supply a directory list to --with-libs." 1>&2; exit 1; }
  2877. ;;
  2878. esac
  2879. echo "$ac_t""$with_libs" 1>&6
  2880. if test -n "$with_libs"; then
  2881. for dir in $with_libs; do
  2882. if test -d "$dir"; then
  2883. LIBRARY_DIRS="$LIBRARY_DIRS -L$dir"
  2884. else
  2885. { echo "configure: error: *** Library directory $dir does not exist." 1>&2; exit 1; }
  2886. fi
  2887. done
  2888. LDFLAGS="$LDFLAGS $LIBRARY_DIRS"
  2889. fi
  2890. # Programs and standard headers, libraries, functions
  2891. # Find a good install program. We prefer a C program (faster),
  2892. # so one script is as good as another. But avoid the broken or
  2893. # incompatible versions:
  2894. # SysV /etc/install, /usr/sbin/install
  2895. # SunOS /usr/etc/install
  2896. # IRIX /sbin/install
  2897. # AIX /bin/install
  2898. # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
  2899. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  2900. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  2901. # ./install, which can be erroneously created by make from ./install.sh.
  2902. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  2903. echo "configure:3481: checking for a BSD compatible install" >&5
  2904. if test -z "$INSTALL"; then
  2905. IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
  2906. for ac_dir in $PATH; do
  2907. # Account for people who put trailing slashes in PATH elements.
  2908. case "$ac_dir/" in
  2909. /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  2910. *)
  2911. # OSF1 and SCO ODT 3.0 have their own names for install.
  2912. # Don't use installbsd from OSF since it installs stuff as root
  2913. # by default.
  2914. for ac_prog in ginstall scoinst install; do
  2915. if test -f $ac_dir/$ac_prog; then
  2916. if test $ac_prog = install &&
  2917. grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  2918. # AIX install. It has an incompatible calling convention.
  2919. :
  2920. else
  2921. ac_cv_path_install="$ac_dir/$ac_prog -c"
  2922. break 2
  2923. fi
  2924. fi
  2925. done
  2926. ;;
  2927. esac
  2928. done
  2929. IFS="$ac_save_IFS"
  2930. if test "${ac_cv_path_install+set}" = set; then
  2931. INSTALL="$ac_cv_path_install"
  2932. else
  2933. # As a last resort, use the slow shell script. We don't cache a
  2934. # path for INSTALL within a source directory, because that will
  2935. # break other packages using the cache if that directory is
  2936. # removed, or if the path is relative.
  2937. INSTALL="$ac_install_sh"
  2938. fi
  2939. fi
  2940. echo "$ac_t""$INSTALL" 1>&6
  2941. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  2942. # It thinks the first close brace ends the variable substitution.
  2943. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  2944. test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
  2945. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  2946. # Extract the first word of "flex", so it can be a program name with args.
  2947. set dummy flex; ac_word=$2
  2948. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2949. echo "configure:3534: checking for $ac_word" >&5
  2950. if test -n "$LEX"; then
  2951. ac_cv_prog_LEX="$LEX" # Let the user override the test.
  2952. else
  2953. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2954. ac_dummy="$PATH"
  2955. for ac_dir in $ac_dummy; do
  2956. test -z "$ac_dir" && ac_dir=.
  2957. if test -f $ac_dir/$ac_word; then
  2958. ac_cv_prog_LEX="flex"
  2959. break
  2960. fi
  2961. done
  2962. IFS="$ac_save_ifs"
  2963. test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
  2964. fi
  2965. LEX="$ac_cv_prog_LEX"
  2966. if test -n "$LEX"; then
  2967. echo "$ac_t""$LEX" 1>&6
  2968. else
  2969. echo "$ac_t""no" 1>&6
  2970. fi
  2971. if test -z "$LEXLIB"
  2972. then
  2973. case "$LEX" in
  2974. flex*) ac_lib=fl ;;
  2975. *) ac_lib=l ;;
  2976. esac
  2977. echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
  2978. echo "configure:3565: checking for yywrap in -l$ac_lib" >&5
  2979. ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
  2980. ac_save_LIBS="$LIBS"
  2981. LIBS="-l$ac_lib $LIBS"
  2982. cat > conftest.$ac_ext <<EOF
  2983. #line 3571 "configure"
  2984. #include "confdefs.h"
  2985. /* Override any gcc2 internal prototype to avoid an error. */
  2986. /* We use char because int might match the return type of a gcc2
  2987. builtin and then its argument prototype would still apply. */
  2988. char yywrap();
  2989. int main() {
  2990. yywrap()
  2991. ; return 0; }
  2992. EOF
  2993. if { (eval echo configure:3582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2994. rm -rf conftest*
  2995. eval "ac_cv_lib_$ac_lib_var=yes"
  2996. else
  2997. echo "configure: failed program was:" >&5
  2998. cat conftest.$ac_ext >&5
  2999. rm -rf conftest*
  3000. eval "ac_cv_lib_$ac_lib_var=no"
  3001. fi
  3002. rm -f conftest*
  3003. LIBS="$ac_save_LIBS"
  3004. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3005. echo "$ac_t""yes" 1>&6
  3006. LEXLIB="-l$ac_lib"
  3007. else
  3008. echo "$ac_t""no" 1>&6
  3009. fi
  3010. fi
  3011. if test "$LEX" = "lex"; then
  3012. # Extract the first word of "lex", so it can be a program name with args.
  3013. set dummy lex; ac_word=$2
  3014. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3015. echo "configure:3607: checking for $ac_word" >&5
  3016. case "$LEXPATH" in
  3017. /*)
  3018. ac_cv_path_LEXPATH="$LEXPATH" # Let the user override the test with a path.
  3019. ;;
  3020. ?:/*)
  3021. ac_cv_path_LEXPATH="$LEXPATH" # Let the user override the test with a dos path.
  3022. ;;
  3023. *)
  3024. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  3025. ac_dummy="$PATH"
  3026. for ac_dir in $ac_dummy; do
  3027. test -z "$ac_dir" && ac_dir=.
  3028. if test -f $ac_dir/$ac_word; then
  3029. ac_cv_path_LEXPATH="$ac_dir/$ac_word"
  3030. break
  3031. fi
  3032. done
  3033. IFS="$ac_save_ifs"
  3034. test -z "$ac_cv_path_LEXPATH" && ac_cv_path_LEXPATH="no"
  3035. ;;
  3036. esac
  3037. LEXPATH="$ac_cv_path_LEXPATH"
  3038. if test -n "$LEXPATH"; then
  3039. echo "$ac_t""$LEXPATH" 1>&6
  3040. else
  3041. echo "$ac_t""no" 1>&6
  3042. fi
  3043. if test "$LEXPATH" = "no"; then
  3044. { echo "configure: error: *** Unable to locate lex." 1>&2; exit 1; }
  3045. fi
  3046. fi
  3047. for ac_prog in 'bison -y' byacc
  3048. do
  3049. # Extract the first word of "$ac_prog", so it can be a program name with args.
  3050. set dummy $ac_prog; ac_word=$2
  3051. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3052. echo "configure:3647: checking for $ac_word" >&5
  3053. if test -n "$YACC"; then
  3054. ac_cv_prog_YACC="$YACC" # Let the user override the test.
  3055. else
  3056. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  3057. ac_dummy="$PATH"
  3058. for ac_dir in $ac_dummy; do
  3059. test -z "$ac_dir" && ac_dir=.
  3060. if test -f $ac_dir/$ac_word; then
  3061. ac_cv_prog_YACC="$ac_prog"
  3062. break
  3063. fi
  3064. done
  3065. IFS="$ac_save_ifs"
  3066. fi
  3067. YACC="$ac_cv_prog_YACC"
  3068. if test -n "$YACC"; then
  3069. echo "$ac_t""$YACC" 1>&6
  3070. else
  3071. echo "$ac_t""no" 1>&6
  3072. fi
  3073. test -n "$YACC" && break
  3074. done
  3075. test -n "$YACC" || YACC="yacc"
  3076. if test "$YACC" = "yacc"; then
  3077. # Extract the first word of "yacc", so it can be a program name with args.
  3078. set dummy yacc; ac_word=$2
  3079. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3080. echo "configure:3678: checking for $ac_word" >&5
  3081. case "$YACCPATH" in
  3082. /*)
  3083. ac_cv_path_YACCPATH="$YACCPATH" # Let the user override the test with a path.
  3084. ;;
  3085. ?:/*)
  3086. ac_cv_path_YACCPATH="$YACCPATH" # Let the user override the test with a dos path.
  3087. ;;
  3088. *)
  3089. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  3090. ac_dummy="$PATH"
  3091. for ac_dir in $ac_dummy; do
  3092. test -z "$ac_dir" && ac_dir=.
  3093. if test -f $ac_dir/$ac_word; then
  3094. ac_cv_path_YACCPATH="$ac_dir/$ac_word"
  3095. break
  3096. fi
  3097. done
  3098. IFS="$ac_save_ifs"
  3099. test -z "$ac_cv_path_YACCPATH" && ac_cv_path_YACCPATH="no"
  3100. ;;
  3101. esac
  3102. YACCPATH="$ac_cv_path_YACCPATH"
  3103. if test -n "$YACCPATH"; then
  3104. echo "$ac_t""$YACCPATH" 1>&6
  3105. else
  3106. echo "$ac_t""no" 1>&6
  3107. fi
  3108. if test "$YACCPATH" = "no"; then
  3109. { echo "configure: error: *** Unable to locate yacc." 1>&2; exit 1; }
  3110. fi
  3111. fi
  3112. # Extract the first word of "ranlib", so it can be a program name with args.
  3113. set dummy ranlib; ac_word=$2
  3114. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3115. echo "configure:3716: checking for $ac_word" >&5
  3116. if test -n "$RANLIB"; then
  3117. ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  3118. else
  3119. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  3120. ac_dummy="$PATH"
  3121. for ac_dir in $ac_dummy; do
  3122. test -z "$ac_dir" && ac_dir=.
  3123. if test -f $ac_dir/$ac_word; then
  3124. ac_cv_prog_RANLIB="ranlib"
  3125. break
  3126. fi
  3127. done
  3128. IFS="$ac_save_ifs"
  3129. test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  3130. fi
  3131. RANLIB="$ac_cv_prog_RANLIB"
  3132. if test -n "$RANLIB"; then
  3133. echo "$ac_t""$RANLIB" 1>&6
  3134. else
  3135. echo "$ac_t""no" 1>&6
  3136. fi
  3137. for ac_prog in ar
  3138. do
  3139. # Extract the first word of "$ac_prog", so it can be a program name with args.
  3140. set dummy $ac_prog; ac_word=$2
  3141. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3142. echo "configure:3745: checking for $ac_word" >&5
  3143. if test -n "$AR"; then
  3144. ac_cv_prog_AR="$AR" # Let the user override the test.
  3145. else
  3146. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  3147. ac_dummy="$PATH"
  3148. for ac_dir in $ac_dummy; do
  3149. test -z "$ac_dir" && ac_dir=.
  3150. if test -f $ac_dir/$ac_word; then
  3151. ac_cv_prog_AR="$ac_prog"
  3152. break
  3153. fi
  3154. done
  3155. IFS="$ac_save_ifs"
  3156. fi
  3157. AR="$ac_cv_prog_AR"
  3158. if test -n "$AR"; then
  3159. echo "$ac_t""$AR" 1>&6
  3160. else
  3161. echo "$ac_t""no" 1>&6
  3162. fi
  3163. test -n "$AR" && break
  3164. done
  3165. for ac_prog in env
  3166. do
  3167. # Extract the first word of "$ac_prog", so it can be a program name with args.
  3168. set dummy $ac_prog; ac_word=$2
  3169. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3170. echo "configure:3776: checking for $ac_word" >&5
  3171. if test -n "$ENV"; then
  3172. ac_cv_prog_ENV="$ENV" # Let the user override the test.
  3173. else
  3174. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  3175. ac_dummy="$PATH"
  3176. for ac_dir in $ac_dummy; do
  3177. test -z "$ac_dir" && ac_dir=.
  3178. if test -f $ac_dir/$ac_word; then
  3179. ac_cv_prog_ENV="$ac_prog"
  3180. break
  3181. fi
  3182. done
  3183. IFS="$ac_save_ifs"
  3184. fi
  3185. ENV="$ac_cv_prog_ENV"
  3186. if test -n "$ENV"; then
  3187. echo "$ac_t""$ENV" 1>&6
  3188. else
  3189. echo "$ac_t""no" 1>&6
  3190. fi
  3191. test -n "$ENV" && break
  3192. done
  3193. # Extract the first word of "perl", so it can be a program name with args.
  3194. set dummy perl; ac_word=$2
  3195. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3196. echo "configure:3805: checking for $ac_word" >&5
  3197. case "$PERL" in
  3198. /*)
  3199. ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
  3200. ;;
  3201. ?:/*)
  3202. ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
  3203. ;;
  3204. *)
  3205. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  3206. ac_dummy="$PATH"
  3207. for ac_dir in $ac_dummy; do
  3208. test -z "$ac_dir" && ac_dir=.
  3209. if test -f $ac_dir/$ac_word; then
  3210. ac_cv_path_PERL="$ac_dir/$ac_word"
  3211. break
  3212. fi
  3213. done
  3214. IFS="$ac_save_ifs"
  3215. test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="no"
  3216. ;;
  3217. esac
  3218. PERL="$ac_cv_path_PERL"
  3219. if test -n "$PERL"; then
  3220. echo "$ac_t""$PERL" 1>&6
  3221. else
  3222. echo "$ac_t""no" 1>&6
  3223. fi
  3224. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  3225. echo "configure:3836: checking for ANSI C header files" >&5
  3226. cat > conftest.$ac_ext <<EOF
  3227. #line 3839 "configure"
  3228. #include "confdefs.h"
  3229. #include <stdlib.h>
  3230. #include <stdarg.h>
  3231. #include <string.h>
  3232. #include <float.h>
  3233. EOF
  3234. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3235. { (eval echo configure:3847: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3236. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  3237. if test -z "$ac_err"; then
  3238. rm -rf conftest*
  3239. ac_cv_header_stdc=yes
  3240. else
  3241. echo "$ac_err" >&5
  3242. echo "configure: failed program was:" >&5
  3243. cat conftest.$ac_ext >&5
  3244. rm -rf conftest*
  3245. ac_cv_header_stdc=no
  3246. fi
  3247. rm -f conftest*
  3248. if test $ac_cv_header_stdc = yes; then
  3249. # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  3250. cat > conftest.$ac_ext <<EOF
  3251. #line 3864 "configure"
  3252. #include "confdefs.h"
  3253. #include <string.h>
  3254. EOF
  3255. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3256. egrep "memchr" >/dev/null 2>&1; then
  3257. :
  3258. else
  3259. rm -rf conftest*
  3260. ac_cv_header_stdc=no
  3261. fi
  3262. rm -f conftest*
  3263. fi
  3264. if test $ac_cv_header_stdc = yes; then
  3265. # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  3266. cat > conftest.$ac_ext <<EOF
  3267. #line 3882 "configure"
  3268. #include "confdefs.h"
  3269. #include <stdlib.h>
  3270. EOF
  3271. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3272. egrep "free" >/dev/null 2>&1; then
  3273. :
  3274. else
  3275. rm -rf conftest*
  3276. ac_cv_header_stdc=no
  3277. fi
  3278. rm -f conftest*
  3279. fi
  3280. if test $ac_cv_header_stdc = yes; then
  3281. # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  3282. if test "$cross_compiling" = yes; then
  3283. :
  3284. else
  3285. cat > conftest.$ac_ext <<EOF
  3286. #line 3903 "configure"
  3287. #include "confdefs.h"
  3288. #include <ctype.h>
  3289. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  3290. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  3291. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  3292. int main () { int i; for (i = 0; i < 256; i++)
  3293. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  3294. exit (0); }
  3295. EOF
  3296. if { (eval echo configure:3914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  3297. then
  3298. :
  3299. else
  3300. echo "configure: failed program was:" >&5
  3301. cat conftest.$ac_ext >&5
  3302. rm -fr conftest*
  3303. ac_cv_header_stdc=no
  3304. fi
  3305. rm -fr conftest*
  3306. fi
  3307. fi
  3308. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  3309. if test $ac_cv_header_stdc = yes; then
  3310. cat >> confdefs.h <<\EOF
  3311. #define STDC_HEADERS 1
  3312. EOF
  3313. fi
  3314. #AC_CHECK_HEADERS(curses.h limits.h termio.h termios.h unistd.h values.h)
  3315. for ac_hdr in limits.h termio.h termios.h unistd.h values.h f2c.h g2c.h
  3316. do
  3317. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  3318. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  3319. echo "configure:3941: checking for $ac_hdr" >&5
  3320. cat > conftest.$ac_ext <<EOF
  3321. #line 3944 "configure"
  3322. #include "confdefs.h"
  3323. #include <$ac_hdr>
  3324. EOF
  3325. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3326. { (eval echo configure:3949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3327. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  3328. if test -z "$ac_err"; then
  3329. rm -rf conftest*
  3330. eval "ac_cv_header_$ac_safe=yes"
  3331. else
  3332. echo "$ac_err" >&5
  3333. echo "configure: failed program was:" >&5
  3334. cat conftest.$ac_ext >&5
  3335. rm -rf conftest*
  3336. eval "ac_cv_header_$ac_safe=no"
  3337. fi
  3338. rm -f conftest*
  3339. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  3340. echo "$ac_t""yes" 1>&6
  3341. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  3342. cat >> confdefs.h <<EOF
  3343. #define $ac_tr_hdr 1
  3344. EOF
  3345. else
  3346. echo "$ac_t""no" 1>&6
  3347. fi
  3348. done
  3349. for ac_hdr in sys/ioctl.h sys/mtio.h sys/resource.h sys/time.h
  3350. do
  3351. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  3352. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  3353. echo "configure:3978: checking for $ac_hdr" >&5
  3354. cat > conftest.$ac_ext <<EOF
  3355. #line 3981 "configure"
  3356. #include "confdefs.h"
  3357. #include <$ac_hdr>
  3358. EOF
  3359. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3360. { (eval echo configure:3986: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3361. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  3362. if test -z "$ac_err"; then
  3363. rm -rf conftest*
  3364. eval "ac_cv_header_$ac_safe=yes"
  3365. else
  3366. echo "$ac_err" >&5
  3367. echo "configure: failed program was:" >&5
  3368. cat conftest.$ac_ext >&5
  3369. rm -rf conftest*
  3370. eval "ac_cv_header_$ac_safe=no"
  3371. fi
  3372. rm -f conftest*
  3373. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  3374. echo "$ac_t""yes" 1>&6
  3375. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  3376. cat >> confdefs.h <<EOF
  3377. #define $ac_tr_hdr 1
  3378. EOF
  3379. else
  3380. echo "$ac_t""no" 1>&6
  3381. fi
  3382. done
  3383. for ac_hdr in sys/timeb.h sys/types.h sys/utsname.h
  3384. do
  3385. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  3386. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  3387. echo "configure:4015: checking for $ac_hdr" >&5
  3388. cat > conftest.$ac_ext <<EOF
  3389. #line 4018 "configure"
  3390. #include "confdefs.h"
  3391. #include <$ac_hdr>
  3392. EOF
  3393. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3394. { (eval echo configure:4023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3395. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  3396. if test -z "$ac_err"; then
  3397. rm -rf conftest*
  3398. eval "ac_cv_header_$ac_safe=yes"
  3399. else
  3400. echo "$ac_err" >&5
  3401. echo "configure: failed program was:" >&5
  3402. cat conftest.$ac_ext >&5
  3403. rm -rf conftest*
  3404. eval "ac_cv_header_$ac_safe=no"
  3405. fi
  3406. rm -f conftest*
  3407. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  3408. echo "$ac_t""yes" 1>&6
  3409. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  3410. cat >> confdefs.h <<EOF
  3411. #define $ac_tr_hdr 1
  3412. EOF
  3413. else
  3414. echo "$ac_t""no" 1>&6
  3415. fi
  3416. done
  3417. for ac_hdr in libintl.h iconv.h
  3418. do
  3419. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  3420. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  3421. echo "configure:4052: checking for $ac_hdr" >&5
  3422. cat > conftest.$ac_ext <<EOF
  3423. #line 4055 "configure"
  3424. #include "confdefs.h"
  3425. #include <$ac_hdr>
  3426. EOF
  3427. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3428. { (eval echo configure:4060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3429. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  3430. if test -z "$ac_err"; then
  3431. rm -rf conftest*
  3432. eval "ac_cv_header_$ac_safe=yes"
  3433. else
  3434. echo "$ac_err" >&5
  3435. echo "configure: failed program was:" >&5
  3436. cat conftest.$ac_ext >&5
  3437. rm -rf conftest*
  3438. eval "ac_cv_header_$ac_safe=no"
  3439. fi
  3440. rm -f conftest*
  3441. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  3442. echo "$ac_t""yes" 1>&6
  3443. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  3444. cat >> confdefs.h <<EOF
  3445. #define $ac_tr_hdr 1
  3446. EOF
  3447. else
  3448. echo "$ac_t""no" 1>&6
  3449. fi
  3450. done
  3451. for ac_hdr in langinfo.h
  3452. do
  3453. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  3454. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  3455. echo "configure:4089: checking for $ac_hdr" >&5
  3456. cat > conftest.$ac_ext <<EOF
  3457. #line 4092 "configure"
  3458. #include "confdefs.h"
  3459. #include <$ac_hdr>
  3460. EOF
  3461. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3462. { (eval echo configure:4097: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3463. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  3464. if test -z "$ac_err"; then
  3465. rm -rf conftest*
  3466. eval "ac_cv_header_$ac_safe=yes"
  3467. else
  3468. echo "$ac_err" >&5
  3469. echo "configure: failed program was:" >&5
  3470. cat conftest.$ac_ext >&5
  3471. rm -rf conftest*
  3472. eval "ac_cv_header_$ac_safe=no"
  3473. fi
  3474. rm -f conftest*
  3475. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  3476. echo "$ac_t""yes" 1>&6
  3477. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  3478. cat >> confdefs.h <<EOF
  3479. #define $ac_tr_hdr 1
  3480. EOF
  3481. else
  3482. echo "$ac_t""no" 1>&6
  3483. fi
  3484. done
  3485. echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
  3486. echo "configure:4123: checking whether time.h and sys/time.h may both be included" >&5
  3487. cat > conftest.$ac_ext <<EOF
  3488. #line 4126 "configure"
  3489. #include "confdefs.h"
  3490. #include <sys/types.h>
  3491. #include <sys/time.h>
  3492. #include <time.h>
  3493. int main() {
  3494. struct tm *tp;
  3495. ; return 0; }
  3496. EOF
  3497. if { (eval echo configure:4135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3498. rm -rf conftest*
  3499. ac_cv_header_time=yes
  3500. else
  3501. echo "configure: failed program was:" >&5
  3502. cat conftest.$ac_ext >&5
  3503. rm -rf conftest*
  3504. ac_cv_header_time=no
  3505. fi
  3506. rm -f conftest*
  3507. echo "$ac_t""$ac_cv_header_time" 1>&6
  3508. if test $ac_cv_header_time = yes; then
  3509. cat >> confdefs.h <<\EOF
  3510. #define TIME_WITH_SYS_TIME 1
  3511. EOF
  3512. fi
  3513. echo $ac_n "checking for off_t""... $ac_c" 1>&6
  3514. echo "configure:4155: checking for off_t" >&5
  3515. cat > conftest.$ac_ext <<EOF
  3516. #line 4158 "configure"
  3517. #include "confdefs.h"
  3518. #include <sys/types.h>
  3519. #if STDC_HEADERS
  3520. #include <stdlib.h>
  3521. #include <stddef.h>
  3522. #endif
  3523. EOF
  3524. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3525. egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  3526. rm -rf conftest*
  3527. ac_cv_type_off_t=yes
  3528. else
  3529. rm -rf conftest*
  3530. ac_cv_type_off_t=no
  3531. fi
  3532. rm -f conftest*
  3533. echo "$ac_t""$ac_cv_type_off_t" 1>&6
  3534. if test $ac_cv_type_off_t = no; then
  3535. cat >> confdefs.h <<\EOF
  3536. #define off_t long
  3537. EOF
  3538. fi
  3539. echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
  3540. echo "configure:4185: checking for uid_t in sys/types.h" >&5
  3541. cat > conftest.$ac_ext <<EOF
  3542. #line 4188 "configure"
  3543. #include "confdefs.h"
  3544. #include <sys/types.h>
  3545. EOF
  3546. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3547. egrep "uid_t" >/dev/null 2>&1; then
  3548. rm -rf conftest*
  3549. ac_cv_type_uid_t=yes
  3550. else
  3551. rm -rf conftest*
  3552. ac_cv_type_uid_t=no
  3553. fi
  3554. rm -f conftest*
  3555. echo "$ac_t""$ac_cv_type_uid_t" 1>&6
  3556. if test $ac_cv_type_uid_t = no; then
  3557. cat >> confdefs.h <<\EOF
  3558. #define uid_t int
  3559. EOF
  3560. cat >> confdefs.h <<\EOF
  3561. #define gid_t int
  3562. EOF
  3563. fi
  3564. echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
  3565. echo "configure:4216: checking return type of signal handlers" >&5
  3566. cat > conftest.$ac_ext <<EOF
  3567. #line 4219 "configure"
  3568. #include "confdefs.h"
  3569. #include <sys/types.h>
  3570. #include <signal.h>
  3571. #ifdef signal
  3572. #undef signal
  3573. #endif
  3574. #ifdef __cplusplus
  3575. extern "C" void (*signal (int, void (*)(int)))(int);
  3576. #else
  3577. void (*signal ()) ();
  3578. #endif
  3579. int main() {
  3580. int i;
  3581. ; return 0; }
  3582. EOF
  3583. if { (eval echo configure:4236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3584. rm -rf conftest*
  3585. ac_cv_type_signal=void
  3586. else
  3587. echo "configure: failed program was:" >&5
  3588. cat conftest.$ac_ext >&5
  3589. rm -rf conftest*
  3590. ac_cv_type_signal=int
  3591. fi
  3592. rm -f conftest*
  3593. echo "$ac_t""$ac_cv_type_signal" 1>&6
  3594. cat >> confdefs.h <<EOF
  3595. #define RETSIGTYPE $ac_cv_type_signal
  3596. EOF
  3597. echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
  3598. echo "configure:4254: checking for Cygwin environment" >&5
  3599. cat > conftest.$ac_ext <<EOF
  3600. #line 4257 "configure"
  3601. #include "confdefs.h"
  3602. int main() {
  3603. #ifndef __CYGWIN__
  3604. #define __CYGWIN__ __CYGWIN32__
  3605. #endif
  3606. return __CYGWIN__;
  3607. ; return 0; }
  3608. EOF
  3609. if { (eval echo configure:4268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3610. rm -rf conftest*
  3611. ac_cv_cygwin=yes
  3612. else
  3613. echo "configure: failed program was:" >&5
  3614. cat conftest.$ac_ext >&5
  3615. rm -rf conftest*
  3616. ac_cv_cygwin=no
  3617. fi
  3618. rm -f conftest*
  3619. rm -f conftest*
  3620. echo "$ac_t""$ac_cv_cygwin" 1>&6
  3621. CYGWIN=
  3622. test "$ac_cv_cygwin" = yes && CYGWIN=yes
  3623. for ac_func in ftime gethostname gettimeofday lseek nice time uname
  3624. do
  3625. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3626. echo "configure:4286: checking for $ac_func" >&5
  3627. cat > conftest.$ac_ext <<EOF
  3628. #line 4289 "configure"
  3629. #include "confdefs.h"
  3630. /* System header to define __stub macros and hopefully few prototypes,
  3631. which can conflict with char $ac_func(); below. */
  3632. #include <assert.h>
  3633. /* Override any gcc2 internal prototype to avoid an error. */
  3634. /* We use char because int might match the return type of a gcc2
  3635. builtin and then its argument prototype would still apply. */
  3636. char $ac_func();
  3637. int main() {
  3638. /* The GNU C library defines this for functions which it implements
  3639. to always fail with ENOSYS. Some functions are actually named
  3640. something starting with __ and the normal name is an alias. */
  3641. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3642. choke me
  3643. #else
  3644. $ac_func();
  3645. #endif
  3646. ; return 0; }
  3647. EOF
  3648. if { (eval echo configure:4312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3649. rm -rf conftest*
  3650. eval "ac_cv_func_$ac_func=yes"
  3651. else
  3652. echo "configure: failed program was:" >&5
  3653. cat conftest.$ac_ext >&5
  3654. rm -rf conftest*
  3655. eval "ac_cv_func_$ac_func=no"
  3656. fi
  3657. rm -f conftest*
  3658. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3659. echo "$ac_t""yes" 1>&6
  3660. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3661. cat >> confdefs.h <<EOF
  3662. #define $ac_tr_func 1
  3663. EOF
  3664. else
  3665. echo "$ac_t""no" 1>&6
  3666. fi
  3667. done
  3668. for ac_func in seteuid setpriority setreuid setruid
  3669. do
  3670. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3671. echo "configure:4338: checking for $ac_func" >&5
  3672. cat > conftest.$ac_ext <<EOF
  3673. #line 4341 "configure"
  3674. #include "confdefs.h"
  3675. /* System header to define __stub macros and hopefully few prototypes,
  3676. which can conflict with char $ac_func(); below. */
  3677. #include <assert.h>
  3678. /* Override any gcc2 internal prototype to avoid an error. */
  3679. /* We use char because int might match the return type of a gcc2
  3680. builtin and then its argument prototype would still apply. */
  3681. char $ac_func();
  3682. int main() {
  3683. /* The GNU C library defines this for functions which it implements
  3684. to always fail with ENOSYS. Some functions are actually named
  3685. something starting with __ and the normal name is an alias. */
  3686. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3687. choke me
  3688. #else
  3689. $ac_func();
  3690. #endif
  3691. ; return 0; }
  3692. EOF
  3693. if { (eval echo configure:4364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3694. rm -rf conftest*
  3695. eval "ac_cv_func_$ac_func=yes"
  3696. else
  3697. echo "configure: failed program was:" >&5
  3698. cat conftest.$ac_ext >&5
  3699. rm -rf conftest*
  3700. eval "ac_cv_func_$ac_func=no"
  3701. fi
  3702. rm -f conftest*
  3703. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3704. echo "$ac_t""yes" 1>&6
  3705. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3706. cat >> confdefs.h <<EOF
  3707. #define $ac_tr_func 1
  3708. EOF
  3709. else
  3710. echo "$ac_t""no" 1>&6
  3711. fi
  3712. done
  3713. for ac_func in drand48
  3714. do
  3715. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3716. echo "configure:4390: checking for $ac_func" >&5
  3717. cat > conftest.$ac_ext <<EOF
  3718. #line 4393 "configure"
  3719. #include "confdefs.h"
  3720. /* System header to define __stub macros and hopefully few prototypes,
  3721. which can conflict with char $ac_func(); below. */
  3722. #include <assert.h>
  3723. /* Override any gcc2 internal prototype to avoid an error. */
  3724. /* We use char because int might match the return type of a gcc2
  3725. builtin and then its argument prototype would still apply. */
  3726. char $ac_func();
  3727. int main() {
  3728. /* The GNU C library defines this for functions which it implements
  3729. to always fail with ENOSYS. Some functions are actually named
  3730. something starting with __ and the normal name is an alias. */
  3731. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3732. choke me
  3733. #else
  3734. $ac_func();
  3735. #endif
  3736. ; return 0; }
  3737. EOF
  3738. if { (eval echo configure:4416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3739. rm -rf conftest*
  3740. eval "ac_cv_func_$ac_func=yes"
  3741. else
  3742. echo "configure: failed program was:" >&5
  3743. cat conftest.$ac_ext >&5
  3744. rm -rf conftest*
  3745. eval "ac_cv_func_$ac_func=no"
  3746. fi
  3747. rm -f conftest*
  3748. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3749. echo "$ac_t""yes" 1>&6
  3750. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3751. cat >> confdefs.h <<EOF
  3752. #define $ac_tr_func 1
  3753. EOF
  3754. else
  3755. echo "$ac_t""no" 1>&6
  3756. fi
  3757. done
  3758. for ac_func in putenv setenv
  3759. do
  3760. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3761. echo "configure:4442: checking for $ac_func" >&5
  3762. cat > conftest.$ac_ext <<EOF
  3763. #line 4445 "configure"
  3764. #include "confdefs.h"
  3765. /* System header to define __stub macros and hopefully few prototypes,
  3766. which can conflict with char $ac_func(); below. */
  3767. #include <assert.h>
  3768. /* Override any gcc2 internal prototype to avoid an error. */
  3769. /* We use char because int might match the return type of a gcc2
  3770. builtin and then its argument prototype would still apply. */
  3771. char $ac_func();
  3772. int main() {
  3773. /* The GNU C library defines this for functions which it implements
  3774. to always fail with ENOSYS. Some functions are actually named
  3775. something starting with __ and the normal name is an alias. */
  3776. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3777. choke me
  3778. #else
  3779. $ac_func();
  3780. #endif
  3781. ; return 0; }
  3782. EOF
  3783. if { (eval echo configure:4468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3784. rm -rf conftest*
  3785. eval "ac_cv_func_$ac_func=yes"
  3786. else
  3787. echo "configure: failed program was:" >&5
  3788. cat conftest.$ac_ext >&5
  3789. rm -rf conftest*
  3790. eval "ac_cv_func_$ac_func=no"
  3791. fi
  3792. rm -f conftest*
  3793. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3794. echo "$ac_t""yes" 1>&6
  3795. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3796. cat >> confdefs.h <<EOF
  3797. #define $ac_tr_func 1
  3798. EOF
  3799. else
  3800. echo "$ac_t""no" 1>&6
  3801. fi
  3802. done
  3803. for ac_func in nanosleep
  3804. do
  3805. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3806. echo "configure:4494: checking for $ac_func" >&5
  3807. cat > conftest.$ac_ext <<EOF
  3808. #line 4497 "configure"
  3809. #include "confdefs.h"
  3810. /* System header to define __stub macros and hopefully few prototypes,
  3811. which can conflict with char $ac_func(); below. */
  3812. #include <assert.h>
  3813. /* Override any gcc2 internal prototype to avoid an error. */
  3814. /* We use char because int might match the return type of a gcc2
  3815. builtin and then its argument prototype would still apply. */
  3816. char $ac_func();
  3817. int main() {
  3818. /* The GNU C library defines this for functions which it implements
  3819. to always fail with ENOSYS. Some functions are actually named
  3820. something starting with __ and the normal name is an alias. */
  3821. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3822. choke me
  3823. #else
  3824. $ac_func();
  3825. #endif
  3826. ; return 0; }
  3827. EOF
  3828. if { (eval echo configure:4520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3829. rm -rf conftest*
  3830. eval "ac_cv_func_$ac_func=yes"
  3831. else
  3832. echo "configure: failed program was:" >&5
  3833. cat conftest.$ac_ext >&5
  3834. rm -rf conftest*
  3835. eval "ac_cv_func_$ac_func=no"
  3836. fi
  3837. rm -f conftest*
  3838. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3839. echo "$ac_t""yes" 1>&6
  3840. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3841. cat >> confdefs.h <<EOF
  3842. #define $ac_tr_func 1
  3843. EOF
  3844. else
  3845. echo "$ac_t""no" 1>&6
  3846. fi
  3847. done
  3848. if test "$cross_compiling" != "yes" ; then
  3849. echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
  3850. echo "configure:4545: checking whether setpgrp takes no argument" >&5
  3851. if test "$cross_compiling" = yes; then
  3852. { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
  3853. else
  3854. cat > conftest.$ac_ext <<EOF
  3855. #line 4551 "configure"
  3856. #include "confdefs.h"
  3857. #ifdef HAVE_UNISTD_H
  3858. #include <unistd.h>
  3859. #endif
  3860. /*
  3861. * If this system has a BSD-style setpgrp, which takes arguments, exit
  3862. * successfully.
  3863. */
  3864. main()
  3865. {
  3866. if (setpgrp(1,1) == -1)
  3867. exit(0);
  3868. else
  3869. exit(1);
  3870. }
  3871. EOF
  3872. if { (eval echo configure:4571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  3873. then
  3874. ac_cv_func_setpgrp_void=no
  3875. else
  3876. echo "configure: failed program was:" >&5
  3877. cat conftest.$ac_ext >&5
  3878. rm -fr conftest*
  3879. ac_cv_func_setpgrp_void=yes
  3880. fi
  3881. rm -fr conftest*
  3882. fi
  3883. echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
  3884. if test $ac_cv_func_setpgrp_void = yes; then
  3885. cat >> confdefs.h <<\EOF
  3886. #define SETPGRP_VOID 1
  3887. EOF
  3888. fi
  3889. else
  3890. CROSS_COMPILING=1
  3891. fi
  3892. echo $ac_n "checking for long long int""... $ac_c" 1>&6
  3893. echo "configure:4599: checking for long long int" >&5
  3894. cat > conftest.$ac_ext <<EOF
  3895. #line 4601 "configure"
  3896. #include "confdefs.h"
  3897. int main() {
  3898. long long int x;
  3899. ; return 0; }
  3900. EOF
  3901. if { (eval echo configure:4608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3902. rm -rf conftest*
  3903. echo "$ac_t""yes" 1>&6
  3904. cat >> confdefs.h <<\EOF
  3905. #define HAVE_LONG_LONG_INT 1
  3906. EOF
  3907. else
  3908. echo "configure: failed program was:" >&5
  3909. cat conftest.$ac_ext >&5
  3910. rm -rf conftest*
  3911. echo "$ac_t""no" 1>&6
  3912. fi
  3913. rm -f conftest*
  3914. echo $ac_n "checking for W11""... $ac_c" 1>&6
  3915. echo "configure:4628: checking for W11" >&5
  3916. case "$enable_w11" in
  3917. yes|no) echo "$ac_t"""$enable_w11"" 1>&6 ;;
  3918. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  3919. esac
  3920. USE_X11=
  3921. USE_W11=
  3922. XLIB=
  3923. XTLIB=
  3924. if test "$enable_w11" = "yes" ; then
  3925. X_CFLAGS=-I${SRCDIR}/display/drivers/windows/libW11
  3926. X_LIBS='-L$(LIBDIR)'
  3927. USE_W11="1"
  3928. USE_X11="1"
  3929. XLIB=-lX11
  3930. CFLAGS="$CFLAGS -D__W98__"
  3931. else
  3932. # If we find X, set shell vars x_includes and x_libraries to the
  3933. # paths, otherwise set no_x=yes.
  3934. # Uses ac_ vars as temps to allow command line to override cache and checks.
  3935. # --without-x overrides everything else, but does not touch the cache.
  3936. echo $ac_n "checking for X""... $ac_c" 1>&6
  3937. echo "configure:4656: checking for X" >&5
  3938. # Check whether --with-x or --without-x was given.
  3939. if test "${with_x+set}" = set; then
  3940. withval="$with_x"
  3941. :
  3942. fi
  3943. # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
  3944. if test "x$with_x" = xno; then
  3945. # The user explicitly disabled X.
  3946. have_x=disabled
  3947. else
  3948. if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
  3949. # Both variables are already set.
  3950. have_x=yes
  3951. else
  3952. # One or both of the vars are not set, and there is no cached value.
  3953. ac_x_includes=NO ac_x_libraries=NO
  3954. rm -fr conftestdir
  3955. if mkdir conftestdir; then
  3956. cd conftestdir
  3957. # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  3958. cat > Imakefile <<'EOF'
  3959. acfindx:
  3960. @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
  3961. EOF
  3962. if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
  3963. # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  3964. eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
  3965. # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
  3966. for ac_extension in a so sl; do
  3967. if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
  3968. test -f $ac_im_libdir/libX11.$ac_extension; then
  3969. ac_im_usrlibdir=$ac_im_libdir; break
  3970. fi
  3971. done
  3972. # Screen out bogus values from the imake configuration. They are
  3973. # bogus both because they are the default anyway, and because
  3974. # using them would break gcc on systems where it needs fixed includes.
  3975. case "$ac_im_incroot" in
  3976. /usr/include) ;;
  3977. *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
  3978. esac
  3979. case "$ac_im_usrlibdir" in
  3980. /usr/lib | /lib) ;;
  3981. *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
  3982. esac
  3983. fi
  3984. cd ..
  3985. rm -fr conftestdir
  3986. fi
  3987. if test "$ac_x_includes" = NO; then
  3988. # Guess where to find include files, by looking for this one X11 .h file.
  3989. test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
  3990. # First, try using that file with no special directory specified.
  3991. cat > conftest.$ac_ext <<EOF
  3992. #line 4716 "configure"
  3993. #include "confdefs.h"
  3994. #include <$x_direct_test_include>
  3995. EOF
  3996. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3997. { (eval echo configure:4721: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3998. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  3999. if test -z "$ac_err"; then
  4000. rm -rf conftest*
  4001. # We can compile using X headers with no special include directory.
  4002. ac_x_includes=
  4003. else
  4004. echo "$ac_err" >&5
  4005. echo "configure: failed program was:" >&5
  4006. cat conftest.$ac_ext >&5
  4007. rm -rf conftest*
  4008. # Look for the header file in a standard set of common directories.
  4009. # Check X11 before X11Rn because it is often a symlink to the current release.
  4010. for ac_dir in \
  4011. /usr/X11/include \
  4012. /usr/X11R6/include \
  4013. /usr/X11R5/include \
  4014. /usr/X11R4/include \
  4015. \
  4016. /usr/include/X11 \
  4017. /usr/include/X11R6 \
  4018. /usr/include/X11R5 \
  4019. /usr/include/X11R4 \
  4020. \
  4021. /usr/local/X11/include \
  4022. /usr/local/X11R6/include \
  4023. /usr/local/X11R5/include \
  4024. /usr/local/X11R4/include \
  4025. \
  4026. /usr/local/include/X11 \
  4027. /usr/local/include/X11R6 \
  4028. /usr/local/include/X11R5 \
  4029. /usr/local/include/X11R4 \
  4030. \
  4031. /usr/X386/include \
  4032. /usr/x386/include \
  4033. /usr/XFree86/include/X11 \
  4034. \
  4035. /usr/include \
  4036. /usr/local/include \
  4037. /usr/unsupported/include \
  4038. /usr/athena/include \
  4039. /usr/local/x11r5/include \
  4040. /usr/lpp/Xamples/include \
  4041. \
  4042. /usr/openwin/include \
  4043. /usr/openwin/share/include \
  4044. ; \
  4045. do
  4046. if test -r "$ac_dir/$x_direct_test_include"; then
  4047. ac_x_includes=$ac_dir
  4048. break
  4049. fi
  4050. done
  4051. fi
  4052. rm -f conftest*
  4053. fi # $ac_x_includes = NO
  4054. if test "$ac_x_libraries" = NO; then
  4055. # Check for the libraries.
  4056. test -z "$x_direct_test_library" && x_direct_test_library=Xt
  4057. test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
  4058. # See if we find them without any special options.
  4059. # Don't add to $LIBS permanently.
  4060. ac_save_LIBS="$LIBS"
  4061. LIBS="-l$x_direct_test_library $LIBS"
  4062. cat > conftest.$ac_ext <<EOF
  4063. #line 4790 "configure"
  4064. #include "confdefs.h"
  4065. int main() {
  4066. ${x_direct_test_function}()
  4067. ; return 0; }
  4068. EOF
  4069. if { (eval echo configure:4797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4070. rm -rf conftest*
  4071. LIBS="$ac_save_LIBS"
  4072. # We can link X programs with no special library path.
  4073. ac_x_libraries=
  4074. else
  4075. echo "configure: failed program was:" >&5
  4076. cat conftest.$ac_ext >&5
  4077. rm -rf conftest*
  4078. LIBS="$ac_save_LIBS"
  4079. # First see if replacing the include by lib works.
  4080. # Check X11 before X11Rn because it is often a symlink to the current release.
  4081. for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
  4082. /usr/X11/lib \
  4083. /usr/X11R6/lib \
  4084. /usr/X11R5/lib \
  4085. /usr/X11R4/lib \
  4086. \
  4087. /usr/lib/X11 \
  4088. /usr/lib/X11R6 \
  4089. /usr/lib/X11R5 \
  4090. /usr/lib/X11R4 \
  4091. \
  4092. /usr/local/X11/lib \
  4093. /usr/local/X11R6/lib \
  4094. /usr/local/X11R5/lib \
  4095. /usr/local/X11R4/lib \
  4096. \
  4097. /usr/local/lib/X11 \
  4098. /usr/local/lib/X11R6 \
  4099. /usr/local/lib/X11R5 \
  4100. /usr/local/lib/X11R4 \
  4101. \
  4102. /usr/X386/lib \
  4103. /usr/x386/lib \
  4104. /usr/XFree86/lib/X11 \
  4105. \
  4106. /usr/lib \
  4107. /usr/local/lib \
  4108. /usr/unsupported/lib \
  4109. /usr/athena/lib \
  4110. /usr/local/x11r5/lib \
  4111. /usr/lpp/Xamples/lib \
  4112. /lib/usr/lib/X11 \
  4113. \
  4114. /usr/openwin/lib \
  4115. /usr/openwin/share/lib \
  4116. ; \
  4117. do
  4118. for ac_extension in a so sl; do
  4119. if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
  4120. ac_x_libraries=$ac_dir
  4121. break 2
  4122. fi
  4123. done
  4124. done
  4125. fi
  4126. rm -f conftest*
  4127. fi # $ac_x_libraries = NO
  4128. if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
  4129. # Didn't find X anywhere. Cache the known absence of X.
  4130. ac_cv_have_x="have_x=no"
  4131. else
  4132. # Record where we found X for the cache.
  4133. ac_cv_have_x="have_x=yes \
  4134. ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
  4135. fi
  4136. fi
  4137. eval "$ac_cv_have_x"
  4138. fi # $with_x != no
  4139. if test "$have_x" != yes; then
  4140. echo "$ac_t""$have_x" 1>&6
  4141. no_x=yes
  4142. else
  4143. # If each of the values was on the command line, it overrides each guess.
  4144. test "x$x_includes" = xNONE && x_includes=$ac_x_includes
  4145. test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
  4146. # Update the cache value to reflect the command line values.
  4147. ac_cv_have_x="have_x=yes \
  4148. ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
  4149. echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
  4150. fi
  4151. if test "$no_x" = yes; then
  4152. # Not all programs may use this symbol, but it does not hurt to define it.
  4153. cat >> confdefs.h <<\EOF
  4154. #define X_DISPLAY_MISSING 1
  4155. EOF
  4156. X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
  4157. else
  4158. if test -n "$x_includes"; then
  4159. X_CFLAGS="$X_CFLAGS -I$x_includes"
  4160. fi
  4161. # It would also be nice to do this for all -L options, not just this one.
  4162. if test -n "$x_libraries"; then
  4163. X_LIBS="$X_LIBS -L$x_libraries"
  4164. # For Solaris; some versions of Sun CC require a space after -R and
  4165. # others require no space. Words are not sufficient . . . .
  4166. case "`(uname -sr) 2>/dev/null`" in
  4167. "SunOS 5"*)
  4168. echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
  4169. echo "configure:4902: checking whether -R must be followed by a space" >&5
  4170. ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
  4171. cat > conftest.$ac_ext <<EOF
  4172. #line 4905 "configure"
  4173. #include "confdefs.h"
  4174. int main() {
  4175. ; return 0; }
  4176. EOF
  4177. if { (eval echo configure:4912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4178. rm -rf conftest*
  4179. ac_R_nospace=yes
  4180. else
  4181. echo "configure: failed program was:" >&5
  4182. cat conftest.$ac_ext >&5
  4183. rm -rf conftest*
  4184. ac_R_nospace=no
  4185. fi
  4186. rm -f conftest*
  4187. if test $ac_R_nospace = yes; then
  4188. echo "$ac_t""no" 1>&6
  4189. X_LIBS="$X_LIBS -R$x_libraries"
  4190. else
  4191. LIBS="$ac_xsave_LIBS -R $x_libraries"
  4192. cat > conftest.$ac_ext <<EOF
  4193. #line 4928 "configure"
  4194. #include "confdefs.h"
  4195. int main() {
  4196. ; return 0; }
  4197. EOF
  4198. if { (eval echo configure:4935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4199. rm -rf conftest*
  4200. ac_R_space=yes
  4201. else
  4202. echo "configure: failed program was:" >&5
  4203. cat conftest.$ac_ext >&5
  4204. rm -rf conftest*
  4205. ac_R_space=no
  4206. fi
  4207. rm -f conftest*
  4208. if test $ac_R_space = yes; then
  4209. echo "$ac_t""yes" 1>&6
  4210. X_LIBS="$X_LIBS -R $x_libraries"
  4211. else
  4212. echo "$ac_t""neither works" 1>&6
  4213. fi
  4214. fi
  4215. LIBS="$ac_xsave_LIBS"
  4216. esac
  4217. fi
  4218. # Check for system-dependent libraries X programs must link with.
  4219. # Do this before checking for the system-independent R6 libraries
  4220. # (-lICE), since we may need -lsocket or whatever for X linking.
  4221. if test "$ISC" = yes; then
  4222. X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
  4223. else
  4224. # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
  4225. # libraries were built with DECnet support. And karl@cs.umb.edu says
  4226. # the Alpha needs dnet_stub (dnet does not exist).
  4227. echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
  4228. echo "configure:4967: checking for dnet_ntoa in -ldnet" >&5
  4229. ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  4230. ac_save_LIBS="$LIBS"
  4231. LIBS="-ldnet $LIBS"
  4232. cat > conftest.$ac_ext <<EOF
  4233. #line 4973 "configure"
  4234. #include "confdefs.h"
  4235. /* Override any gcc2 internal prototype to avoid an error. */
  4236. /* We use char because int might match the return type of a gcc2
  4237. builtin and then its argument prototype would still apply. */
  4238. char dnet_ntoa();
  4239. int main() {
  4240. dnet_ntoa()
  4241. ; return 0; }
  4242. EOF
  4243. if { (eval echo configure:4984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4244. rm -rf conftest*
  4245. eval "ac_cv_lib_$ac_lib_var=yes"
  4246. else
  4247. echo "configure: failed program was:" >&5
  4248. cat conftest.$ac_ext >&5
  4249. rm -rf conftest*
  4250. eval "ac_cv_lib_$ac_lib_var=no"
  4251. fi
  4252. rm -f conftest*
  4253. LIBS="$ac_save_LIBS"
  4254. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4255. echo "$ac_t""yes" 1>&6
  4256. X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
  4257. else
  4258. echo "$ac_t""no" 1>&6
  4259. fi
  4260. if test $ac_cv_lib_dnet_dnet_ntoa = no; then
  4261. echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
  4262. echo "configure:5005: checking for dnet_ntoa in -ldnet_stub" >&5
  4263. ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  4264. ac_save_LIBS="$LIBS"
  4265. LIBS="-ldnet_stub $LIBS"
  4266. cat > conftest.$ac_ext <<EOF
  4267. #line 5011 "configure"
  4268. #include "confdefs.h"
  4269. /* Override any gcc2 internal prototype to avoid an error. */
  4270. /* We use char because int might match the return type of a gcc2
  4271. builtin and then its argument prototype would still apply. */
  4272. char dnet_ntoa();
  4273. int main() {
  4274. dnet_ntoa()
  4275. ; return 0; }
  4276. EOF
  4277. if { (eval echo configure:5022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4278. rm -rf conftest*
  4279. eval "ac_cv_lib_$ac_lib_var=yes"
  4280. else
  4281. echo "configure: failed program was:" >&5
  4282. cat conftest.$ac_ext >&5
  4283. rm -rf conftest*
  4284. eval "ac_cv_lib_$ac_lib_var=no"
  4285. fi
  4286. rm -f conftest*
  4287. LIBS="$ac_save_LIBS"
  4288. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4289. echo "$ac_t""yes" 1>&6
  4290. X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
  4291. else
  4292. echo "$ac_t""no" 1>&6
  4293. fi
  4294. fi
  4295. # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
  4296. # to get the SysV transport functions.
  4297. # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
  4298. # needs -lnsl.
  4299. # The nsl library prevents programs from opening the X display
  4300. # on Irix 5.2, according to dickey@clark.net.
  4301. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
  4302. echo "configure:5050: checking for gethostbyname" >&5
  4303. cat > conftest.$ac_ext <<EOF
  4304. #line 5053 "configure"
  4305. #include "confdefs.h"
  4306. /* System header to define __stub macros and hopefully few prototypes,
  4307. which can conflict with char gethostbyname(); below. */
  4308. #include <assert.h>
  4309. /* Override any gcc2 internal prototype to avoid an error. */
  4310. /* We use char because int might match the return type of a gcc2
  4311. builtin and then its argument prototype would still apply. */
  4312. char gethostbyname();
  4313. int main() {
  4314. /* The GNU C library defines this for functions which it implements
  4315. to always fail with ENOSYS. Some functions are actually named
  4316. something starting with __ and the normal name is an alias. */
  4317. #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
  4318. choke me
  4319. #else
  4320. gethostbyname();
  4321. #endif
  4322. ; return 0; }
  4323. EOF
  4324. if { (eval echo configure:5076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4325. rm -rf conftest*
  4326. eval "ac_cv_func_gethostbyname=yes"
  4327. else
  4328. echo "configure: failed program was:" >&5
  4329. cat conftest.$ac_ext >&5
  4330. rm -rf conftest*
  4331. eval "ac_cv_func_gethostbyname=no"
  4332. fi
  4333. rm -f conftest*
  4334. if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
  4335. echo "$ac_t""yes" 1>&6
  4336. :
  4337. else
  4338. echo "$ac_t""no" 1>&6
  4339. fi
  4340. if test $ac_cv_func_gethostbyname = no; then
  4341. echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
  4342. echo "configure:5096: checking for gethostbyname in -lnsl" >&5
  4343. ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
  4344. ac_save_LIBS="$LIBS"
  4345. LIBS="-lnsl $LIBS"
  4346. cat > conftest.$ac_ext <<EOF
  4347. #line 5102 "configure"
  4348. #include "confdefs.h"
  4349. /* Override any gcc2 internal prototype to avoid an error. */
  4350. /* We use char because int might match the return type of a gcc2
  4351. builtin and then its argument prototype would still apply. */
  4352. char gethostbyname();
  4353. int main() {
  4354. gethostbyname()
  4355. ; return 0; }
  4356. EOF
  4357. if { (eval echo configure:5113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4358. rm -rf conftest*
  4359. eval "ac_cv_lib_$ac_lib_var=yes"
  4360. else
  4361. echo "configure: failed program was:" >&5
  4362. cat conftest.$ac_ext >&5
  4363. rm -rf conftest*
  4364. eval "ac_cv_lib_$ac_lib_var=no"
  4365. fi
  4366. rm -f conftest*
  4367. LIBS="$ac_save_LIBS"
  4368. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4369. echo "$ac_t""yes" 1>&6
  4370. X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
  4371. else
  4372. echo "$ac_t""no" 1>&6
  4373. fi
  4374. fi
  4375. # lieder@skyler.mavd.honeywell.com says without -lsocket,
  4376. # socket/setsockopt and other routines are undefined under SCO ODT
  4377. # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
  4378. # on later versions), says simon@lia.di.epfl.ch: it contains
  4379. # gethostby* variants that don't use the nameserver (or something).
  4380. # -lsocket must be given before -lnsl if both are needed.
  4381. # We assume that if connect needs -lnsl, so does gethostbyname.
  4382. echo $ac_n "checking for connect""... $ac_c" 1>&6
  4383. echo "configure:5142: checking for connect" >&5
  4384. cat > conftest.$ac_ext <<EOF
  4385. #line 5145 "configure"
  4386. #include "confdefs.h"
  4387. /* System header to define __stub macros and hopefully few prototypes,
  4388. which can conflict with char connect(); below. */
  4389. #include <assert.h>
  4390. /* Override any gcc2 internal prototype to avoid an error. */
  4391. /* We use char because int might match the return type of a gcc2
  4392. builtin and then its argument prototype would still apply. */
  4393. char connect();
  4394. int main() {
  4395. /* The GNU C library defines this for functions which it implements
  4396. to always fail with ENOSYS. Some functions are actually named
  4397. something starting with __ and the normal name is an alias. */
  4398. #if defined (__stub_connect) || defined (__stub___connect)
  4399. choke me
  4400. #else
  4401. connect();
  4402. #endif
  4403. ; return 0; }
  4404. EOF
  4405. if { (eval echo configure:5168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4406. rm -rf conftest*
  4407. eval "ac_cv_func_connect=yes"
  4408. else
  4409. echo "configure: failed program was:" >&5
  4410. cat conftest.$ac_ext >&5
  4411. rm -rf conftest*
  4412. eval "ac_cv_func_connect=no"
  4413. fi
  4414. rm -f conftest*
  4415. if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
  4416. echo "$ac_t""yes" 1>&6
  4417. :
  4418. else
  4419. echo "$ac_t""no" 1>&6
  4420. fi
  4421. if test $ac_cv_func_connect = no; then
  4422. echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
  4423. echo "configure:5188: checking for connect in -lsocket" >&5
  4424. ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
  4425. ac_save_LIBS="$LIBS"
  4426. LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
  4427. cat > conftest.$ac_ext <<EOF
  4428. #line 5194 "configure"
  4429. #include "confdefs.h"
  4430. /* Override any gcc2 internal prototype to avoid an error. */
  4431. /* We use char because int might match the return type of a gcc2
  4432. builtin and then its argument prototype would still apply. */
  4433. char connect();
  4434. int main() {
  4435. connect()
  4436. ; return 0; }
  4437. EOF
  4438. if { (eval echo configure:5205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4439. rm -rf conftest*
  4440. eval "ac_cv_lib_$ac_lib_var=yes"
  4441. else
  4442. echo "configure: failed program was:" >&5
  4443. cat conftest.$ac_ext >&5
  4444. rm -rf conftest*
  4445. eval "ac_cv_lib_$ac_lib_var=no"
  4446. fi
  4447. rm -f conftest*
  4448. LIBS="$ac_save_LIBS"
  4449. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4450. echo "$ac_t""yes" 1>&6
  4451. X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
  4452. else
  4453. echo "$ac_t""no" 1>&6
  4454. fi
  4455. fi
  4456. # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
  4457. echo $ac_n "checking for remove""... $ac_c" 1>&6
  4458. echo "configure:5228: checking for remove" >&5
  4459. cat > conftest.$ac_ext <<EOF
  4460. #line 5231 "configure"
  4461. #include "confdefs.h"
  4462. /* System header to define __stub macros and hopefully few prototypes,
  4463. which can conflict with char remove(); below. */
  4464. #include <assert.h>
  4465. /* Override any gcc2 internal prototype to avoid an error. */
  4466. /* We use char because int might match the return type of a gcc2
  4467. builtin and then its argument prototype would still apply. */
  4468. char remove();
  4469. int main() {
  4470. /* The GNU C library defines this for functions which it implements
  4471. to always fail with ENOSYS. Some functions are actually named
  4472. something starting with __ and the normal name is an alias. */
  4473. #if defined (__stub_remove) || defined (__stub___remove)
  4474. choke me
  4475. #else
  4476. remove();
  4477. #endif
  4478. ; return 0; }
  4479. EOF
  4480. if { (eval echo configure:5254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4481. rm -rf conftest*
  4482. eval "ac_cv_func_remove=yes"
  4483. else
  4484. echo "configure: failed program was:" >&5
  4485. cat conftest.$ac_ext >&5
  4486. rm -rf conftest*
  4487. eval "ac_cv_func_remove=no"
  4488. fi
  4489. rm -f conftest*
  4490. if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
  4491. echo "$ac_t""yes" 1>&6
  4492. :
  4493. else
  4494. echo "$ac_t""no" 1>&6
  4495. fi
  4496. if test $ac_cv_func_remove = no; then
  4497. echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
  4498. echo "configure:5274: checking for remove in -lposix" >&5
  4499. ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
  4500. ac_save_LIBS="$LIBS"
  4501. LIBS="-lposix $LIBS"
  4502. cat > conftest.$ac_ext <<EOF
  4503. #line 5280 "configure"
  4504. #include "confdefs.h"
  4505. /* Override any gcc2 internal prototype to avoid an error. */
  4506. /* We use char because int might match the return type of a gcc2
  4507. builtin and then its argument prototype would still apply. */
  4508. char remove();
  4509. int main() {
  4510. remove()
  4511. ; return 0; }
  4512. EOF
  4513. if { (eval echo configure:5291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4514. rm -rf conftest*
  4515. eval "ac_cv_lib_$ac_lib_var=yes"
  4516. else
  4517. echo "configure: failed program was:" >&5
  4518. cat conftest.$ac_ext >&5
  4519. rm -rf conftest*
  4520. eval "ac_cv_lib_$ac_lib_var=no"
  4521. fi
  4522. rm -f conftest*
  4523. LIBS="$ac_save_LIBS"
  4524. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4525. echo "$ac_t""yes" 1>&6
  4526. X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
  4527. else
  4528. echo "$ac_t""no" 1>&6
  4529. fi
  4530. fi
  4531. # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
  4532. echo $ac_n "checking for shmat""... $ac_c" 1>&6
  4533. echo "configure:5314: checking for shmat" >&5
  4534. cat > conftest.$ac_ext <<EOF
  4535. #line 5317 "configure"
  4536. #include "confdefs.h"
  4537. /* System header to define __stub macros and hopefully few prototypes,
  4538. which can conflict with char shmat(); below. */
  4539. #include <assert.h>
  4540. /* Override any gcc2 internal prototype to avoid an error. */
  4541. /* We use char because int might match the return type of a gcc2
  4542. builtin and then its argument prototype would still apply. */
  4543. char shmat();
  4544. int main() {
  4545. /* The GNU C library defines this for functions which it implements
  4546. to always fail with ENOSYS. Some functions are actually named
  4547. something starting with __ and the normal name is an alias. */
  4548. #if defined (__stub_shmat) || defined (__stub___shmat)
  4549. choke me
  4550. #else
  4551. shmat();
  4552. #endif
  4553. ; return 0; }
  4554. EOF
  4555. if { (eval echo configure:5340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4556. rm -rf conftest*
  4557. eval "ac_cv_func_shmat=yes"
  4558. else
  4559. echo "configure: failed program was:" >&5
  4560. cat conftest.$ac_ext >&5
  4561. rm -rf conftest*
  4562. eval "ac_cv_func_shmat=no"
  4563. fi
  4564. rm -f conftest*
  4565. if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
  4566. echo "$ac_t""yes" 1>&6
  4567. :
  4568. else
  4569. echo "$ac_t""no" 1>&6
  4570. fi
  4571. if test $ac_cv_func_shmat = no; then
  4572. echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
  4573. echo "configure:5360: checking for shmat in -lipc" >&5
  4574. ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
  4575. ac_save_LIBS="$LIBS"
  4576. LIBS="-lipc $LIBS"
  4577. cat > conftest.$ac_ext <<EOF
  4578. #line 5366 "configure"
  4579. #include "confdefs.h"
  4580. /* Override any gcc2 internal prototype to avoid an error. */
  4581. /* We use char because int might match the return type of a gcc2
  4582. builtin and then its argument prototype would still apply. */
  4583. char shmat();
  4584. int main() {
  4585. shmat()
  4586. ; return 0; }
  4587. EOF
  4588. if { (eval echo configure:5377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4589. rm -rf conftest*
  4590. eval "ac_cv_lib_$ac_lib_var=yes"
  4591. else
  4592. echo "configure: failed program was:" >&5
  4593. cat conftest.$ac_ext >&5
  4594. rm -rf conftest*
  4595. eval "ac_cv_lib_$ac_lib_var=no"
  4596. fi
  4597. rm -f conftest*
  4598. LIBS="$ac_save_LIBS"
  4599. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4600. echo "$ac_t""yes" 1>&6
  4601. X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
  4602. else
  4603. echo "$ac_t""no" 1>&6
  4604. fi
  4605. fi
  4606. fi
  4607. # Check for libraries that X11R6 Xt/Xaw programs need.
  4608. ac_save_LDFLAGS="$LDFLAGS"
  4609. test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
  4610. # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
  4611. # check for ICE first), but we must link in the order -lSM -lICE or
  4612. # we get undefined symbols. So assume we have SM if we have ICE.
  4613. # These have to be linked with before -lX11, unlike the other
  4614. # libraries we check for below, so use a different variable.
  4615. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
  4616. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
  4617. echo "configure:5409: checking for IceConnectionNumber in -lICE" >&5
  4618. ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
  4619. ac_save_LIBS="$LIBS"
  4620. LIBS="-lICE $X_EXTRA_LIBS $LIBS"
  4621. cat > conftest.$ac_ext <<EOF
  4622. #line 5415 "configure"
  4623. #include "confdefs.h"
  4624. /* Override any gcc2 internal prototype to avoid an error. */
  4625. /* We use char because int might match the return type of a gcc2
  4626. builtin and then its argument prototype would still apply. */
  4627. char IceConnectionNumber();
  4628. int main() {
  4629. IceConnectionNumber()
  4630. ; return 0; }
  4631. EOF
  4632. if { (eval echo configure:5426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4633. rm -rf conftest*
  4634. eval "ac_cv_lib_$ac_lib_var=yes"
  4635. else
  4636. echo "configure: failed program was:" >&5
  4637. cat conftest.$ac_ext >&5
  4638. rm -rf conftest*
  4639. eval "ac_cv_lib_$ac_lib_var=no"
  4640. fi
  4641. rm -f conftest*
  4642. LIBS="$ac_save_LIBS"
  4643. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4644. echo "$ac_t""yes" 1>&6
  4645. X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
  4646. else
  4647. echo "$ac_t""no" 1>&6
  4648. fi
  4649. LDFLAGS="$ac_save_LDFLAGS"
  4650. fi
  4651. if test "$no_x" != "yes"; then
  4652. USE_X11="1"
  4653. XLIB=-lX11
  4654. XTLIB=-lXt
  4655. fi
  4656. fi
  4657. # Note that some systems (FreeBSD for example) need an extra library for
  4658. # cuserid
  4659. ac_save_libs="$LIBS"
  4660. LIBS=""
  4661. echo $ac_n "checking for library containing cuserid""... $ac_c" 1>&6
  4662. echo "configure:5466: checking for library containing cuserid" >&5
  4663. ac_func_search_save_LIBS="$LIBS"
  4664. ac_cv_search_cuserid="no"
  4665. cat > conftest.$ac_ext <<EOF
  4666. #line 5471 "configure"
  4667. #include "confdefs.h"
  4668. /* Override any gcc2 internal prototype to avoid an error. */
  4669. /* We use char because int might match the return type of a gcc2
  4670. builtin and then its argument prototype would still apply. */
  4671. char cuserid();
  4672. int main() {
  4673. cuserid()
  4674. ; return 0; }
  4675. EOF
  4676. if { (eval echo configure:5482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4677. rm -rf conftest*
  4678. ac_cv_search_cuserid="none required"
  4679. else
  4680. echo "configure: failed program was:" >&5
  4681. cat conftest.$ac_ext >&5
  4682. fi
  4683. rm -f conftest*
  4684. test "$ac_cv_search_cuserid" = "no" && for i in compat; do
  4685. LIBS="-l$i $ac_func_search_save_LIBS"
  4686. cat > conftest.$ac_ext <<EOF
  4687. #line 5493 "configure"
  4688. #include "confdefs.h"
  4689. /* Override any gcc2 internal prototype to avoid an error. */
  4690. /* We use char because int might match the return type of a gcc2
  4691. builtin and then its argument prototype would still apply. */
  4692. char cuserid();
  4693. int main() {
  4694. cuserid()
  4695. ; return 0; }
  4696. EOF
  4697. if { (eval echo configure:5504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4698. rm -rf conftest*
  4699. ac_cv_search_cuserid="-l$i"
  4700. break
  4701. else
  4702. echo "configure: failed program was:" >&5
  4703. cat conftest.$ac_ext >&5
  4704. fi
  4705. rm -f conftest*
  4706. done
  4707. LIBS="$ac_func_search_save_LIBS"
  4708. echo "$ac_t""$ac_cv_search_cuserid" 1>&6
  4709. if test "$ac_cv_search_cuserid" != "no"; then
  4710. test "$ac_cv_search_cuserid" = "none required" || LIBS="$ac_cv_search_cuserid $LIBS"
  4711. else :
  4712. fi
  4713. DBMIEXTRALIB=$LIBS
  4714. LIBS=$ac_save_libs
  4715. # Note: -lxdr -liberty -lws2_32 is for MinGW
  4716. echo $ac_n "checking for xdrmem_create""... $ac_c" 1>&6
  4717. echo "configure:5530: checking for xdrmem_create" >&5
  4718. cat > conftest.$ac_ext <<EOF
  4719. #line 5533 "configure"
  4720. #include "confdefs.h"
  4721. /* System header to define __stub macros and hopefully few prototypes,
  4722. which can conflict with char xdrmem_create(); below. */
  4723. #include <assert.h>
  4724. /* Override any gcc2 internal prototype to avoid an error. */
  4725. /* We use char because int might match the return type of a gcc2
  4726. builtin and then its argument prototype would still apply. */
  4727. char xdrmem_create();
  4728. int main() {
  4729. /* The GNU C library defines this for functions which it implements
  4730. to always fail with ENOSYS. Some functions are actually named
  4731. something starting with __ and the normal name is an alias. */
  4732. #if defined (__stub_xdrmem_create) || defined (__stub___xdrmem_create)
  4733. choke me
  4734. #else
  4735. xdrmem_create();
  4736. #endif
  4737. ; return 0; }
  4738. EOF
  4739. if { (eval echo configure:5556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4740. rm -rf conftest*
  4741. eval "ac_cv_func_xdrmem_create=yes"
  4742. else
  4743. echo "configure: failed program was:" >&5
  4744. cat conftest.$ac_ext >&5
  4745. rm -rf conftest*
  4746. eval "ac_cv_func_xdrmem_create=no"
  4747. fi
  4748. rm -f conftest*
  4749. if eval "test \"`echo '$ac_cv_func_'xdrmem_create`\" = yes"; then
  4750. echo "$ac_t""yes" 1>&6
  4751. XDRLIB=
  4752. else
  4753. echo "$ac_t""no" 1>&6
  4754. echo $ac_n "checking for xdrmem_create in -lsun""... $ac_c" 1>&6
  4755. echo "configure:5574: checking for xdrmem_create in -lsun" >&5
  4756. ac_lib_var=`echo sun'_'xdrmem_create | sed 'y%./+-%__p_%'`
  4757. ac_save_LIBS="$LIBS"
  4758. LIBS="-lsun $LIBS"
  4759. cat > conftest.$ac_ext <<EOF
  4760. #line 5580 "configure"
  4761. #include "confdefs.h"
  4762. /* Override any gcc2 internal prototype to avoid an error. */
  4763. /* We use char because int might match the return type of a gcc2
  4764. builtin and then its argument prototype would still apply. */
  4765. char xdrmem_create();
  4766. int main() {
  4767. xdrmem_create()
  4768. ; return 0; }
  4769. EOF
  4770. if { (eval echo configure:5591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4771. rm -rf conftest*
  4772. eval "ac_cv_lib_$ac_lib_var=yes"
  4773. else
  4774. echo "configure: failed program was:" >&5
  4775. cat conftest.$ac_ext >&5
  4776. rm -rf conftest*
  4777. eval "ac_cv_lib_$ac_lib_var=no"
  4778. fi
  4779. rm -f conftest*
  4780. LIBS="$ac_save_LIBS"
  4781. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4782. echo "$ac_t""yes" 1>&6
  4783. XDRLIB=-lsun
  4784. else
  4785. echo "$ac_t""no" 1>&6
  4786. echo $ac_n "checking for xdrmem_create in -lnsl""... $ac_c" 1>&6
  4787. echo "configure:5610: checking for xdrmem_create in -lnsl" >&5
  4788. ac_lib_var=`echo nsl'_'xdrmem_create | sed 'y%./+-%__p_%'`
  4789. ac_save_LIBS="$LIBS"
  4790. LIBS="-lnsl $LIBS"
  4791. cat > conftest.$ac_ext <<EOF
  4792. #line 5616 "configure"
  4793. #include "confdefs.h"
  4794. /* Override any gcc2 internal prototype to avoid an error. */
  4795. /* We use char because int might match the return type of a gcc2
  4796. builtin and then its argument prototype would still apply. */
  4797. char xdrmem_create();
  4798. int main() {
  4799. xdrmem_create()
  4800. ; return 0; }
  4801. EOF
  4802. if { (eval echo configure:5627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4803. rm -rf conftest*
  4804. eval "ac_cv_lib_$ac_lib_var=yes"
  4805. else
  4806. echo "configure: failed program was:" >&5
  4807. cat conftest.$ac_ext >&5
  4808. rm -rf conftest*
  4809. eval "ac_cv_lib_$ac_lib_var=no"
  4810. fi
  4811. rm -f conftest*
  4812. LIBS="$ac_save_LIBS"
  4813. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4814. echo "$ac_t""yes" 1>&6
  4815. XDRLIB=-lnsl
  4816. else
  4817. echo "$ac_t""no" 1>&6
  4818. echo $ac_n "checking for xdrmem_create in -lrpclib""... $ac_c" 1>&6
  4819. echo "configure:5646: checking for xdrmem_create in -lrpclib" >&5
  4820. ac_lib_var=`echo rpclib'_'xdrmem_create | sed 'y%./+-%__p_%'`
  4821. ac_save_LIBS="$LIBS"
  4822. LIBS="-lrpclib $LIBS"
  4823. cat > conftest.$ac_ext <<EOF
  4824. #line 5652 "configure"
  4825. #include "confdefs.h"
  4826. /* Override any gcc2 internal prototype to avoid an error. */
  4827. /* We use char because int might match the return type of a gcc2
  4828. builtin and then its argument prototype would still apply. */
  4829. char xdrmem_create();
  4830. int main() {
  4831. xdrmem_create()
  4832. ; return 0; }
  4833. EOF
  4834. if { (eval echo configure:5663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4835. rm -rf conftest*
  4836. eval "ac_cv_lib_$ac_lib_var=yes"
  4837. else
  4838. echo "configure: failed program was:" >&5
  4839. cat conftest.$ac_ext >&5
  4840. rm -rf conftest*
  4841. eval "ac_cv_lib_$ac_lib_var=no"
  4842. fi
  4843. rm -f conftest*
  4844. LIBS="$ac_save_LIBS"
  4845. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4846. echo "$ac_t""yes" 1>&6
  4847. XDRLIB=-lrpclib
  4848. else
  4849. echo "$ac_t""no" 1>&6
  4850. echo $ac_n "checking for xdrmem_create in -lxdr""... $ac_c" 1>&6
  4851. echo "configure:5682: checking for xdrmem_create in -lxdr" >&5
  4852. ac_lib_var=`echo xdr'_'xdrmem_create | sed 'y%./+-%__p_%'`
  4853. ac_save_LIBS="$LIBS"
  4854. LIBS="-lxdr -liberty -lws2_32 $LIBS"
  4855. cat > conftest.$ac_ext <<EOF
  4856. #line 5688 "configure"
  4857. #include "confdefs.h"
  4858. /* Override any gcc2 internal prototype to avoid an error. */
  4859. /* We use char because int might match the return type of a gcc2
  4860. builtin and then its argument prototype would still apply. */
  4861. char xdrmem_create();
  4862. int main() {
  4863. xdrmem_create()
  4864. ; return 0; }
  4865. EOF
  4866. if { (eval echo configure:5699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4867. rm -rf conftest*
  4868. eval "ac_cv_lib_$ac_lib_var=yes"
  4869. else
  4870. echo "configure: failed program was:" >&5
  4871. cat conftest.$ac_ext >&5
  4872. rm -rf conftest*
  4873. eval "ac_cv_lib_$ac_lib_var=no"
  4874. fi
  4875. rm -f conftest*
  4876. LIBS="$ac_save_LIBS"
  4877. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4878. echo "$ac_t""yes" 1>&6
  4879. XDRLIB="-lxdr -liberty -lws2_32"
  4880. else
  4881. echo "$ac_t""no" 1>&6
  4882. { echo "configure: error: *** Unable to locate XDR functions." 1>&2; exit 1; }
  4883. fi
  4884. fi
  4885. fi
  4886. fi
  4887. fi
  4888. for ac_func in asprintf
  4889. do
  4890. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  4891. echo "configure:5733: checking for $ac_func" >&5
  4892. cat > conftest.$ac_ext <<EOF
  4893. #line 5736 "configure"
  4894. #include "confdefs.h"
  4895. /* System header to define __stub macros and hopefully few prototypes,
  4896. which can conflict with char $ac_func(); below. */
  4897. #include <assert.h>
  4898. /* Override any gcc2 internal prototype to avoid an error. */
  4899. /* We use char because int might match the return type of a gcc2
  4900. builtin and then its argument prototype would still apply. */
  4901. char $ac_func();
  4902. int main() {
  4903. /* The GNU C library defines this for functions which it implements
  4904. to always fail with ENOSYS. Some functions are actually named
  4905. something starting with __ and the normal name is an alias. */
  4906. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  4907. choke me
  4908. #else
  4909. $ac_func();
  4910. #endif
  4911. ; return 0; }
  4912. EOF
  4913. if { (eval echo configure:5759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4914. rm -rf conftest*
  4915. eval "ac_cv_func_$ac_func=yes"
  4916. else
  4917. echo "configure: failed program was:" >&5
  4918. cat conftest.$ac_ext >&5
  4919. rm -rf conftest*
  4920. eval "ac_cv_func_$ac_func=no"
  4921. fi
  4922. rm -f conftest*
  4923. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  4924. echo "$ac_t""yes" 1>&6
  4925. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  4926. cat >> confdefs.h <<EOF
  4927. #define $ac_tr_func 1
  4928. EOF
  4929. else
  4930. echo "$ac_t""no" 1>&6
  4931. fi
  4932. done
  4933. # Test if mathlib needs -lm flag or is included with libc
  4934. echo $ac_n "checking for atan""... $ac_c" 1>&6
  4935. echo "configure:5786: checking for atan" >&5
  4936. cat > conftest.$ac_ext <<EOF
  4937. #line 5789 "configure"
  4938. #include "confdefs.h"
  4939. /* System header to define __stub macros and hopefully few prototypes,
  4940. which can conflict with char atan(); below. */
  4941. #include <assert.h>
  4942. /* Override any gcc2 internal prototype to avoid an error. */
  4943. /* We use char because int might match the return type of a gcc2
  4944. builtin and then its argument prototype would still apply. */
  4945. char atan();
  4946. int main() {
  4947. /* The GNU C library defines this for functions which it implements
  4948. to always fail with ENOSYS. Some functions are actually named
  4949. something starting with __ and the normal name is an alias. */
  4950. #if defined (__stub_atan) || defined (__stub___atan)
  4951. choke me
  4952. #else
  4953. atan();
  4954. #endif
  4955. ; return 0; }
  4956. EOF
  4957. if { (eval echo configure:5812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4958. rm -rf conftest*
  4959. eval "ac_cv_func_atan=yes"
  4960. else
  4961. echo "configure: failed program was:" >&5
  4962. cat conftest.$ac_ext >&5
  4963. rm -rf conftest*
  4964. eval "ac_cv_func_atan=no"
  4965. fi
  4966. rm -f conftest*
  4967. if eval "test \"`echo '$ac_cv_func_'atan`\" = yes"; then
  4968. echo "$ac_t""yes" 1>&6
  4969. MATHLIB=
  4970. else
  4971. echo "$ac_t""no" 1>&6
  4972. echo $ac_n "checking for atan in -lm""... $ac_c" 1>&6
  4973. echo "configure:5830: checking for atan in -lm" >&5
  4974. ac_lib_var=`echo m'_'atan | sed 'y%./+-%__p_%'`
  4975. ac_save_LIBS="$LIBS"
  4976. LIBS="-lm $LIBS"
  4977. cat > conftest.$ac_ext <<EOF
  4978. #line 5836 "configure"
  4979. #include "confdefs.h"
  4980. /* Override any gcc2 internal prototype to avoid an error. */
  4981. /* We use char because int might match the return type of a gcc2
  4982. builtin and then its argument prototype would still apply. */
  4983. char atan();
  4984. int main() {
  4985. atan()
  4986. ; return 0; }
  4987. EOF
  4988. if { (eval echo configure:5847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4989. rm -rf conftest*
  4990. eval "ac_cv_lib_$ac_lib_var=yes"
  4991. else
  4992. echo "configure: failed program was:" >&5
  4993. cat conftest.$ac_ext >&5
  4994. rm -rf conftest*
  4995. eval "ac_cv_lib_$ac_lib_var=no"
  4996. fi
  4997. rm -f conftest*
  4998. LIBS="$ac_save_LIBS"
  4999. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5000. echo "$ac_t""yes" 1>&6
  5001. MATHLIB=-lm
  5002. else
  5003. echo "$ac_t""no" 1>&6
  5004. { echo "configure: error: *** Failed check for math library." 1>&2; exit 1; }
  5005. fi
  5006. fi
  5007. echo $ac_n "checking for dlsym""... $ac_c" 1>&6
  5008. echo "configure:5874: checking for dlsym" >&5
  5009. cat > conftest.$ac_ext <<EOF
  5010. #line 5877 "configure"
  5011. #include "confdefs.h"
  5012. /* System header to define __stub macros and hopefully few prototypes,
  5013. which can conflict with char dlsym(); below. */
  5014. #include <assert.h>
  5015. /* Override any gcc2 internal prototype to avoid an error. */
  5016. /* We use char because int might match the return type of a gcc2
  5017. builtin and then its argument prototype would still apply. */
  5018. char dlsym();
  5019. int main() {
  5020. /* The GNU C library defines this for functions which it implements
  5021. to always fail with ENOSYS. Some functions are actually named
  5022. something starting with __ and the normal name is an alias. */
  5023. #if defined (__stub_dlsym) || defined (__stub___dlsym)
  5024. choke me
  5025. #else
  5026. dlsym();
  5027. #endif
  5028. ; return 0; }
  5029. EOF
  5030. if { (eval echo configure:5900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5031. rm -rf conftest*
  5032. eval "ac_cv_func_dlsym=yes"
  5033. else
  5034. echo "configure: failed program was:" >&5
  5035. cat conftest.$ac_ext >&5
  5036. rm -rf conftest*
  5037. eval "ac_cv_func_dlsym=no"
  5038. fi
  5039. rm -f conftest*
  5040. if eval "test \"`echo '$ac_cv_func_'dlsym`\" = yes"; then
  5041. echo "$ac_t""yes" 1>&6
  5042. DLLIB=
  5043. else
  5044. echo "$ac_t""no" 1>&6
  5045. echo $ac_n "checking for dlsym in -ldl""... $ac_c" 1>&6
  5046. echo "configure:5918: checking for dlsym in -ldl" >&5
  5047. ac_lib_var=`echo dl'_'dlsym | sed 'y%./+-%__p_%'`
  5048. ac_save_LIBS="$LIBS"
  5049. LIBS="-ldl $LIBS"
  5050. cat > conftest.$ac_ext <<EOF
  5051. #line 5924 "configure"
  5052. #include "confdefs.h"
  5053. /* Override any gcc2 internal prototype to avoid an error. */
  5054. /* We use char because int might match the return type of a gcc2
  5055. builtin and then its argument prototype would still apply. */
  5056. char dlsym();
  5057. int main() {
  5058. dlsym()
  5059. ; return 0; }
  5060. EOF
  5061. if { (eval echo configure:5935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5062. rm -rf conftest*
  5063. eval "ac_cv_lib_$ac_lib_var=yes"
  5064. else
  5065. echo "configure: failed program was:" >&5
  5066. cat conftest.$ac_ext >&5
  5067. rm -rf conftest*
  5068. eval "ac_cv_lib_$ac_lib_var=no"
  5069. fi
  5070. rm -f conftest*
  5071. LIBS="$ac_save_LIBS"
  5072. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5073. echo "$ac_t""yes" 1>&6
  5074. DLLIB=-ldl
  5075. else
  5076. echo "$ac_t""no" 1>&6
  5077. DLLIB=
  5078. fi
  5079. fi
  5080. echo $ac_n "checking for iconv""... $ac_c" 1>&6
  5081. echo "configure:5962: checking for iconv" >&5
  5082. cat > conftest.$ac_ext <<EOF
  5083. #line 5965 "configure"
  5084. #include "confdefs.h"
  5085. /* System header to define __stub macros and hopefully few prototypes,
  5086. which can conflict with char iconv(); below. */
  5087. #include <assert.h>
  5088. /* Override any gcc2 internal prototype to avoid an error. */
  5089. /* We use char because int might match the return type of a gcc2
  5090. builtin and then its argument prototype would still apply. */
  5091. char iconv();
  5092. int main() {
  5093. /* The GNU C library defines this for functions which it implements
  5094. to always fail with ENOSYS. Some functions are actually named
  5095. something starting with __ and the normal name is an alias. */
  5096. #if defined (__stub_iconv) || defined (__stub___iconv)
  5097. choke me
  5098. #else
  5099. iconv();
  5100. #endif
  5101. ; return 0; }
  5102. EOF
  5103. if { (eval echo configure:5988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5104. rm -rf conftest*
  5105. eval "ac_cv_func_iconv=yes"
  5106. else
  5107. echo "configure: failed program was:" >&5
  5108. cat conftest.$ac_ext >&5
  5109. rm -rf conftest*
  5110. eval "ac_cv_func_iconv=no"
  5111. fi
  5112. rm -f conftest*
  5113. if eval "test \"`echo '$ac_cv_func_'iconv`\" = yes"; then
  5114. echo "$ac_t""yes" 1>&6
  5115. ICONVLIB=
  5116. else
  5117. echo "$ac_t""no" 1>&6
  5118. echo $ac_n "checking for iconv in -liconv""... $ac_c" 1>&6
  5119. echo "configure:6006: checking for iconv in -liconv" >&5
  5120. ac_lib_var=`echo iconv'_'iconv | sed 'y%./+-%__p_%'`
  5121. ac_save_LIBS="$LIBS"
  5122. LIBS="-liconv $LIBS"
  5123. cat > conftest.$ac_ext <<EOF
  5124. #line 6012 "configure"
  5125. #include "confdefs.h"
  5126. /* Override any gcc2 internal prototype to avoid an error. */
  5127. /* We use char because int might match the return type of a gcc2
  5128. builtin and then its argument prototype would still apply. */
  5129. char iconv();
  5130. int main() {
  5131. iconv()
  5132. ; return 0; }
  5133. EOF
  5134. if { (eval echo configure:6023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5135. rm -rf conftest*
  5136. eval "ac_cv_lib_$ac_lib_var=yes"
  5137. else
  5138. echo "configure: failed program was:" >&5
  5139. cat conftest.$ac_ext >&5
  5140. rm -rf conftest*
  5141. eval "ac_cv_lib_$ac_lib_var=no"
  5142. fi
  5143. rm -f conftest*
  5144. LIBS="$ac_save_LIBS"
  5145. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5146. echo "$ac_t""yes" 1>&6
  5147. ICONVLIB=-liconv
  5148. else
  5149. echo "$ac_t""no" 1>&6
  5150. echo $ac_n "checking for iconv in -lgiconv""... $ac_c" 1>&6
  5151. echo "configure:6042: checking for iconv in -lgiconv" >&5
  5152. ac_lib_var=`echo giconv'_'iconv | sed 'y%./+-%__p_%'`
  5153. ac_save_LIBS="$LIBS"
  5154. LIBS="-lgiconv $LIBS"
  5155. cat > conftest.$ac_ext <<EOF
  5156. #line 6048 "configure"
  5157. #include "confdefs.h"
  5158. /* Override any gcc2 internal prototype to avoid an error. */
  5159. /* We use char because int might match the return type of a gcc2
  5160. builtin and then its argument prototype would still apply. */
  5161. char iconv();
  5162. int main() {
  5163. iconv()
  5164. ; return 0; }
  5165. EOF
  5166. if { (eval echo configure:6059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5167. rm -rf conftest*
  5168. eval "ac_cv_lib_$ac_lib_var=yes"
  5169. else
  5170. echo "configure: failed program was:" >&5
  5171. cat conftest.$ac_ext >&5
  5172. rm -rf conftest*
  5173. eval "ac_cv_lib_$ac_lib_var=no"
  5174. fi
  5175. rm -f conftest*
  5176. LIBS="$ac_save_LIBS"
  5177. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5178. echo "$ac_t""yes" 1>&6
  5179. ICONVLIB=-lgiconv
  5180. else
  5181. echo "$ac_t""no" 1>&6
  5182. echo $ac_n "checking for libiconv""... $ac_c" 1>&6
  5183. echo "configure:6078: checking for libiconv" >&5
  5184. cat > conftest.$ac_ext <<EOF
  5185. #line 6081 "configure"
  5186. #include "confdefs.h"
  5187. /* System header to define __stub macros and hopefully few prototypes,
  5188. which can conflict with char libiconv(); below. */
  5189. #include <assert.h>
  5190. /* Override any gcc2 internal prototype to avoid an error. */
  5191. /* We use char because int might match the return type of a gcc2
  5192. builtin and then its argument prototype would still apply. */
  5193. char libiconv();
  5194. int main() {
  5195. /* The GNU C library defines this for functions which it implements
  5196. to always fail with ENOSYS. Some functions are actually named
  5197. something starting with __ and the normal name is an alias. */
  5198. #if defined (__stub_libiconv) || defined (__stub___libiconv)
  5199. choke me
  5200. #else
  5201. libiconv();
  5202. #endif
  5203. ; return 0; }
  5204. EOF
  5205. if { (eval echo configure:6104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5206. rm -rf conftest*
  5207. eval "ac_cv_func_libiconv=yes"
  5208. else
  5209. echo "configure: failed program was:" >&5
  5210. cat conftest.$ac_ext >&5
  5211. rm -rf conftest*
  5212. eval "ac_cv_func_libiconv=no"
  5213. fi
  5214. rm -f conftest*
  5215. if eval "test \"`echo '$ac_cv_func_'libiconv`\" = yes"; then
  5216. echo "$ac_t""yes" 1>&6
  5217. ICONVLIB=
  5218. else
  5219. echo "$ac_t""no" 1>&6
  5220. echo $ac_n "checking for libiconv in -liconv""... $ac_c" 1>&6
  5221. echo "configure:6122: checking for libiconv in -liconv" >&5
  5222. ac_lib_var=`echo iconv'_'libiconv | sed 'y%./+-%__p_%'`
  5223. ac_save_LIBS="$LIBS"
  5224. LIBS="-liconv $LIBS"
  5225. cat > conftest.$ac_ext <<EOF
  5226. #line 6128 "configure"
  5227. #include "confdefs.h"
  5228. /* Override any gcc2 internal prototype to avoid an error. */
  5229. /* We use char because int might match the return type of a gcc2
  5230. builtin and then its argument prototype would still apply. */
  5231. char libiconv();
  5232. int main() {
  5233. libiconv()
  5234. ; return 0; }
  5235. EOF
  5236. if { (eval echo configure:6139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5237. rm -rf conftest*
  5238. eval "ac_cv_lib_$ac_lib_var=yes"
  5239. else
  5240. echo "configure: failed program was:" >&5
  5241. cat conftest.$ac_ext >&5
  5242. rm -rf conftest*
  5243. eval "ac_cv_lib_$ac_lib_var=no"
  5244. fi
  5245. rm -f conftest*
  5246. LIBS="$ac_save_LIBS"
  5247. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5248. echo "$ac_t""yes" 1>&6
  5249. ICONVLIB=-liconv
  5250. else
  5251. echo "$ac_t""no" 1>&6
  5252. echo $ac_n "checking for libiconv in -lgiconv""... $ac_c" 1>&6
  5253. echo "configure:6158: checking for libiconv in -lgiconv" >&5
  5254. ac_lib_var=`echo giconv'_'libiconv | sed 'y%./+-%__p_%'`
  5255. ac_save_LIBS="$LIBS"
  5256. LIBS="-lgiconv $LIBS"
  5257. cat > conftest.$ac_ext <<EOF
  5258. #line 6164 "configure"
  5259. #include "confdefs.h"
  5260. /* Override any gcc2 internal prototype to avoid an error. */
  5261. /* We use char because int might match the return type of a gcc2
  5262. builtin and then its argument prototype would still apply. */
  5263. char libiconv();
  5264. int main() {
  5265. libiconv()
  5266. ; return 0; }
  5267. EOF
  5268. if { (eval echo configure:6175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5269. rm -rf conftest*
  5270. eval "ac_cv_lib_$ac_lib_var=yes"
  5271. else
  5272. echo "configure: failed program was:" >&5
  5273. cat conftest.$ac_ext >&5
  5274. rm -rf conftest*
  5275. eval "ac_cv_lib_$ac_lib_var=no"
  5276. fi
  5277. rm -f conftest*
  5278. LIBS="$ac_save_LIBS"
  5279. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5280. echo "$ac_t""yes" 1>&6
  5281. ICONVLIB=-lgiconv
  5282. else
  5283. echo "$ac_t""no" 1>&6
  5284. echo "configure: warning: *** Unable to locate iconv() function." 1>&2
  5285. ICONVLIB=
  5286. fi
  5287. fi
  5288. fi
  5289. fi
  5290. fi
  5291. fi
  5292. have_socket=1
  5293. echo $ac_n "checking for socket""... $ac_c" 1>&6
  5294. echo "configure:6212: checking for socket" >&5
  5295. cat > conftest.$ac_ext <<EOF
  5296. #line 6215 "configure"
  5297. #include "confdefs.h"
  5298. /* System header to define __stub macros and hopefully few prototypes,
  5299. which can conflict with char socket(); below. */
  5300. #include <assert.h>
  5301. /* Override any gcc2 internal prototype to avoid an error. */
  5302. /* We use char because int might match the return type of a gcc2
  5303. builtin and then its argument prototype would still apply. */
  5304. char socket();
  5305. int main() {
  5306. /* The GNU C library defines this for functions which it implements
  5307. to always fail with ENOSYS. Some functions are actually named
  5308. something starting with __ and the normal name is an alias. */
  5309. #if defined (__stub_socket) || defined (__stub___socket)
  5310. choke me
  5311. #else
  5312. socket();
  5313. #endif
  5314. ; return 0; }
  5315. EOF
  5316. if { (eval echo configure:6238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5317. rm -rf conftest*
  5318. eval "ac_cv_func_socket=yes"
  5319. else
  5320. echo "configure: failed program was:" >&5
  5321. cat conftest.$ac_ext >&5
  5322. rm -rf conftest*
  5323. eval "ac_cv_func_socket=no"
  5324. fi
  5325. rm -f conftest*
  5326. if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
  5327. echo "$ac_t""yes" 1>&6
  5328. SOCKLIB=
  5329. else
  5330. echo "$ac_t""no" 1>&6
  5331. echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
  5332. echo "configure:6256: checking for socket in -lsocket" >&5
  5333. ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
  5334. ac_save_LIBS="$LIBS"
  5335. LIBS="-lsocket $LIBS"
  5336. cat > conftest.$ac_ext <<EOF
  5337. #line 6262 "configure"
  5338. #include "confdefs.h"
  5339. /* Override any gcc2 internal prototype to avoid an error. */
  5340. /* We use char because int might match the return type of a gcc2
  5341. builtin and then its argument prototype would still apply. */
  5342. char socket();
  5343. int main() {
  5344. socket()
  5345. ; return 0; }
  5346. EOF
  5347. if { (eval echo configure:6273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5348. rm -rf conftest*
  5349. eval "ac_cv_lib_$ac_lib_var=yes"
  5350. else
  5351. echo "configure: failed program was:" >&5
  5352. cat conftest.$ac_ext >&5
  5353. rm -rf conftest*
  5354. eval "ac_cv_lib_$ac_lib_var=no"
  5355. fi
  5356. rm -f conftest*
  5357. LIBS="$ac_save_LIBS"
  5358. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5359. echo "$ac_t""yes" 1>&6
  5360. SOCKLIB=-lsocket
  5361. else
  5362. echo "$ac_t""no" 1>&6
  5363. have_socket=0
  5364. echo "configure: warning: *** Unable to locate socket() function." 1>&2
  5365. fi
  5366. fi
  5367. if test "$have_socket" = 1 ; then
  5368. HAVE_SOCKET=1
  5369. cat >> confdefs.h <<\EOF
  5370. #define HAVE_SOCKET 1
  5371. EOF
  5372. else
  5373. HAVE_SOCKET=
  5374. fi
  5375. # Mandatory zlib dependency
  5376. ZLIBLIBPATH=
  5377. ZLIBINCPATH=
  5378. ZLIB=
  5379. # With zlib includes directory
  5380. echo $ac_n "checking for location of zlib includes""... $ac_c" 1>&6
  5381. echo "configure:6321: checking for location of zlib includes" >&5
  5382. case "$with_zlib_includes" in
  5383. y | ye | yes | n | no)
  5384. { echo "configure: error: *** You must supply a directory to --with-zlib-includes." 1>&2; exit 1; }
  5385. ;;
  5386. esac
  5387. echo "$ac_t""$with_zlib_includes" 1>&6
  5388. if test -n "$with_zlib_includes" ; then
  5389. for dir in $with_zlib_includes; do
  5390. if test -d "$dir"; then
  5391. ZLIBINCPATH="$ZLIBINCPATH -I$dir"
  5392. else
  5393. { echo "configure: error: *** zlib includes directory $dir does not exist." 1>&2; exit 1; }
  5394. fi
  5395. done
  5396. fi
  5397. ac_save_cppflags="$CPPFLAGS"
  5398. CPPFLAGS="$ZLIBINCPATH $CPPFLAGS"
  5399. for ac_hdr in zlib.h
  5400. do
  5401. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5402. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5403. echo "configure:6347: checking for $ac_hdr" >&5
  5404. cat > conftest.$ac_ext <<EOF
  5405. #line 6350 "configure"
  5406. #include "confdefs.h"
  5407. #include <$ac_hdr>
  5408. EOF
  5409. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5410. { (eval echo configure:6355: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5411. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5412. if test -z "$ac_err"; then
  5413. rm -rf conftest*
  5414. eval "ac_cv_header_$ac_safe=yes"
  5415. else
  5416. echo "$ac_err" >&5
  5417. echo "configure: failed program was:" >&5
  5418. cat conftest.$ac_ext >&5
  5419. rm -rf conftest*
  5420. eval "ac_cv_header_$ac_safe=no"
  5421. fi
  5422. rm -f conftest*
  5423. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5424. echo "$ac_t""yes" 1>&6
  5425. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5426. cat >> confdefs.h <<EOF
  5427. #define $ac_tr_hdr 1
  5428. EOF
  5429. else
  5430. echo "$ac_t""no" 1>&6
  5431. { echo "configure: error: *** Unable to locate zlib includes." 1>&2; exit 1; }
  5432. fi
  5433. done
  5434. CPPFLAGS=$ac_save_cppflags
  5435. # With zlib library directory
  5436. echo $ac_n "checking for location of zlib library""... $ac_c" 1>&6
  5437. echo "configure:6389: checking for location of zlib library" >&5
  5438. case "$with_zlib_libs" in
  5439. y | ye | yes | n | no)
  5440. { echo "configure: error: *** You must supply a directory to --with-zlib-libs." 1>&2; exit 1; }
  5441. ;;
  5442. esac
  5443. echo "$ac_t""$with_zlib_libs" 1>&6
  5444. if test -n "$with_zlib_libs"; then
  5445. for dir in $with_zlib_libs; do
  5446. if test -d "$dir"; then
  5447. ZLIBLIBPATH="$ZLIBLIBPATH -L$dir"
  5448. else
  5449. { echo "configure: error: *** zlib library directory $dir does not exist." 1>&2; exit 1; }
  5450. fi
  5451. done
  5452. fi
  5453. ac_save_ldflags="$LDFLAGS"
  5454. LDFLAGS="$ZLIBLIBPATH $LDFLAGS"
  5455. echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
  5456. echo "configure:6414: checking for deflate in -lz" >&5
  5457. ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
  5458. ac_save_LIBS="$LIBS"
  5459. LIBS="-lz $LIBS"
  5460. cat > conftest.$ac_ext <<EOF
  5461. #line 6420 "configure"
  5462. #include "confdefs.h"
  5463. /* Override any gcc2 internal prototype to avoid an error. */
  5464. /* We use char because int might match the return type of a gcc2
  5465. builtin and then its argument prototype would still apply. */
  5466. char deflate();
  5467. int main() {
  5468. deflate()
  5469. ; return 0; }
  5470. EOF
  5471. if { (eval echo configure:6431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5472. rm -rf conftest*
  5473. eval "ac_cv_lib_$ac_lib_var=yes"
  5474. else
  5475. echo "configure: failed program was:" >&5
  5476. cat conftest.$ac_ext >&5
  5477. rm -rf conftest*
  5478. eval "ac_cv_lib_$ac_lib_var=no"
  5479. fi
  5480. rm -f conftest*
  5481. LIBS="$ac_save_LIBS"
  5482. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5483. echo "$ac_t""yes" 1>&6
  5484. ZLIB="$ZLIB -lz "
  5485. else
  5486. echo "$ac_t""no" 1>&6
  5487. LDFLAGS=${ac_save_ldflags}
  5488. { echo "configure: error: *** Unable to locate zlib library." 1>&2; exit 1; }
  5489. fi
  5490. LDFLAGS=${ac_save_ldflags}
  5491. #
  5492. # Done checking zlib
  5493. # Mandatory PROJ dependency
  5494. PROJINC=
  5495. PROJLIB=
  5496. PROJSHARE=
  5497. # With PROJ includes directory
  5498. echo $ac_n "checking for location of External PROJ.4 includes""... $ac_c" 1>&6
  5499. echo "configure:6479: checking for location of External PROJ.4 includes" >&5
  5500. case "$with_proj_includes" in
  5501. y | ye | yes | n | no)
  5502. { echo "configure: error: *** You must supply a directory to --with-proj-includes." 1>&2; exit 1; }
  5503. ;;
  5504. esac
  5505. echo "$ac_t""$with_proj_includes" 1>&6
  5506. if test -n "$with_proj_includes" ; then
  5507. for dir in $with_proj_includes; do
  5508. if test -d "$dir"; then
  5509. PROJINC="$PROJINC -I$dir"
  5510. else
  5511. { echo "configure: error: *** External PROJ.4 includes directory $dir does not exist." 1>&2; exit 1; }
  5512. fi
  5513. done
  5514. fi
  5515. ac_save_cppflags="$CPPFLAGS"
  5516. CPPFLAGS="$PROJINC $CPPFLAGS"
  5517. for ac_hdr in proj_api.h
  5518. do
  5519. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5520. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5521. echo "configure:6505: checking for $ac_hdr" >&5
  5522. cat > conftest.$ac_ext <<EOF
  5523. #line 6508 "configure"
  5524. #include "confdefs.h"
  5525. #include <$ac_hdr>
  5526. EOF
  5527. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5528. { (eval echo configure:6513: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5529. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5530. if test -z "$ac_err"; then
  5531. rm -rf conftest*
  5532. eval "ac_cv_header_$ac_safe=yes"
  5533. else
  5534. echo "$ac_err" >&5
  5535. echo "configure: failed program was:" >&5
  5536. cat conftest.$ac_ext >&5
  5537. rm -rf conftest*
  5538. eval "ac_cv_header_$ac_safe=no"
  5539. fi
  5540. rm -f conftest*
  5541. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5542. echo "$ac_t""yes" 1>&6
  5543. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5544. cat >> confdefs.h <<EOF
  5545. #define $ac_tr_hdr 1
  5546. EOF
  5547. else
  5548. echo "$ac_t""no" 1>&6
  5549. { echo "configure: error: *** Unable to locate External PROJ.4 includes." 1>&2; exit 1; }
  5550. fi
  5551. done
  5552. CPPFLAGS=$ac_save_cppflags
  5553. # PROJ version check
  5554. if test "$cross_compiling" = yes; then
  5555. echo "configure: warning: *** Cannot check PROJ.4 version (cross-compiling)." 1>&2
  5556. else
  5557. echo $ac_n "checking External PROJ.4 version""... $ac_c" 1>&6
  5558. echo "configure:6550: checking External PROJ.4 version" >&5
  5559. ac_save_cppflags="$CPPFLAGS"
  5560. CPPFLAGS="$PROJINC $CPPFLAGS"
  5561. if test "$cross_compiling" = yes; then
  5562. proj_ver=0
  5563. echo "$ac_t""unknown (cross-compiling)" 1>&6
  5564. else
  5565. cat > conftest.$ac_ext <<EOF
  5566. #line 6558 "configure"
  5567. #include "confdefs.h"
  5568. #include <stdio.h>
  5569. #include <proj_api.h>
  5570. int main(void) {
  5571. FILE *fp = fopen("conftestdata","w");
  5572. fprintf(fp, "%d", PJ_VERSION);
  5573. return 0;
  5574. }
  5575. EOF
  5576. if { (eval echo configure:6570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  5577. then
  5578. proj_ver=`cat conftestdata`
  5579. echo "$ac_t""$proj_ver" 1>&6
  5580. else
  5581. echo "configure: failed program was:" >&5
  5582. cat conftest.$ac_ext >&5
  5583. rm -fr conftest*
  5584. { echo "configure: error: *** Could not determine External PROJ.4 version." 1>&2; exit 1; }
  5585. fi
  5586. rm -fr conftest*
  5587. fi
  5588. CPPFLAGS=$ac_save_cppflags
  5589. if test `expr "$proj_ver" \< 446` = 1 ; then
  5590. { echo "configure: error: *** PROJ.4.4.6 or later is required." 1>&2; exit 1; }
  5591. fi
  5592. fi
  5593. # With PROJ library directory
  5594. echo $ac_n "checking for location of External PROJ.4 library""... $ac_c" 1>&6
  5595. echo "configure:6595: checking for location of External PROJ.4 library" >&5
  5596. case "$with_proj_libs" in
  5597. y | ye | yes | n | no)
  5598. { echo "configure: error: *** You must supply a directory to --with-proj-libs." 1>&2; exit 1; }
  5599. ;;
  5600. esac
  5601. echo "$ac_t""$with_proj_libs" 1>&6
  5602. if test -n "$with_proj_libs"; then
  5603. for dir in $with_proj_libs; do
  5604. if test -d "$dir"; then
  5605. PROJLIB="$PROJLIB -L$dir"
  5606. else
  5607. { echo "configure: error: *** External PROJ.4 library directory $dir does not exist." 1>&2; exit 1; }
  5608. fi
  5609. done
  5610. fi
  5611. ac_save_ldflags="$LDFLAGS"
  5612. LDFLAGS="$PROJLIB $LDFLAGS"
  5613. echo $ac_n "checking for pj_get_def in -lproj""... $ac_c" 1>&6
  5614. echo "configure:6620: checking for pj_get_def in -lproj" >&5
  5615. ac_lib_var=`echo proj'_'pj_get_def | sed 'y%./+-%__p_%'`
  5616. ac_save_LIBS="$LIBS"
  5617. LIBS="-lproj $LIBS"
  5618. cat > conftest.$ac_ext <<EOF
  5619. #line 6626 "configure"
  5620. #include "confdefs.h"
  5621. /* Override any gcc2 internal prototype to avoid an error. */
  5622. /* We use char because int might match the return type of a gcc2
  5623. builtin and then its argument prototype would still apply. */
  5624. char pj_get_def();
  5625. int main() {
  5626. pj_get_def()
  5627. ; return 0; }
  5628. EOF
  5629. if { (eval echo configure:6637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5630. rm -rf conftest*
  5631. eval "ac_cv_lib_$ac_lib_var=yes"
  5632. else
  5633. echo "configure: failed program was:" >&5
  5634. cat conftest.$ac_ext >&5
  5635. rm -rf conftest*
  5636. eval "ac_cv_lib_$ac_lib_var=no"
  5637. fi
  5638. rm -f conftest*
  5639. LIBS="$ac_save_LIBS"
  5640. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5641. echo "$ac_t""yes" 1>&6
  5642. PROJLIB="$PROJLIB -lproj "
  5643. else
  5644. echo "$ac_t""no" 1>&6
  5645. LDFLAGS=${ac_save_ldflags}
  5646. { echo "configure: error: *** Unable to locate External PROJ.4 library." 1>&2; exit 1; }
  5647. fi
  5648. LDFLAGS=${ac_save_ldflags}
  5649. # With PROJ share directory
  5650. echo $ac_n "checking for location of External PROJ.4 data files""... $ac_c" 1>&6
  5651. echo "configure:6671: checking for location of External PROJ.4 data files" >&5
  5652. case "$with_proj_share" in
  5653. y | ye | yes | n | no)
  5654. { echo "configure: error: *** You must supply a directory to --with-proj-share." 1>&2; exit 1; }
  5655. ;;
  5656. esac
  5657. echo "$ac_t""$with_proj_share" 1>&6
  5658. if test -n "$with_proj_share" ; then
  5659. if test -d "$with_proj_share"; then
  5660. PROJSHARE="$with_proj_share"
  5661. else
  5662. { echo "configure: error: *** External PROJ.4 data directory $dir does not exist." 1>&2; exit 1; }
  5663. fi
  5664. fi
  5665. if test -z "$PROJSHARE" ; then
  5666. echo "configure: warning: *** External PROJ.4 directory not specified; default will be used" 1>&2
  5667. PROJSHARE=/usr/local/share/proj
  5668. fi
  5669. # LOC_CHECK_SHARE does not work when cross compiling
  5670. if test "$cross_compiling" = "yes" ; then
  5671. echo $ac_n "checking for epsg""... $ac_c" 1>&6
  5672. echo "configure:6695: checking for epsg" >&5
  5673. echo "$ac_t""unknown (cross-compiling)" 1>&6
  5674. else
  5675. ac_safe=`echo "$PROJSHARE/epsg" | sed 'y%./+-%__p_%'`
  5676. echo $ac_n "checking for $PROJSHARE/epsg""... $ac_c" 1>&6
  5677. echo "configure:6702: checking for $PROJSHARE/epsg" >&5
  5678. if test "$cross_compiling" = yes; then
  5679. { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
  5680. else
  5681. if test -r $PROJSHARE/epsg; then
  5682. eval "ac_cv_file_$ac_safe=yes"
  5683. else
  5684. eval "ac_cv_file_$ac_safe=no"
  5685. fi
  5686. fi
  5687. if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
  5688. echo "$ac_t""yes" 1>&6
  5689. :
  5690. else
  5691. echo "$ac_t""no" 1>&6
  5692. echo "configure: warning: *** Unable to locate PROJ data files." 1>&2
  5693. fi
  5694. fi
  5695. # nad2bin needs to be in path for installing datum gridshift files
  5696. # Extract the first word of "nad2bin", so it can be a program name with args.
  5697. set dummy nad2bin; ac_word=$2
  5698. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  5699. echo "configure:6734: checking for $ac_word" >&5
  5700. case "$NAD2BIN" in
  5701. /*)
  5702. ac_cv_path_NAD2BIN="$NAD2BIN" # Let the user override the test with a path.
  5703. ;;
  5704. ?:/*)
  5705. ac_cv_path_NAD2BIN="$NAD2BIN" # Let the user override the test with a dos path.
  5706. ;;
  5707. *)
  5708. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  5709. ac_dummy="$PATH"
  5710. for ac_dir in $ac_dummy; do
  5711. test -z "$ac_dir" && ac_dir=.
  5712. if test -f $ac_dir/$ac_word; then
  5713. ac_cv_path_NAD2BIN="$ac_dir/$ac_word"
  5714. break
  5715. fi
  5716. done
  5717. IFS="$ac_save_ifs"
  5718. test -z "$ac_cv_path_NAD2BIN" && ac_cv_path_NAD2BIN="no"
  5719. ;;
  5720. esac
  5721. NAD2BIN="$ac_cv_path_NAD2BIN"
  5722. if test -n "$NAD2BIN"; then
  5723. echo "$ac_t""$NAD2BIN" 1>&6
  5724. else
  5725. echo "$ac_t""no" 1>&6
  5726. fi
  5727. if test "$NAD2BIN" = "no"; then
  5728. { echo "configure: error: *** Unable to locate nad2bin (needs to be in PATH)." 1>&2; exit 1; }
  5729. fi
  5730. # Done checking PROJ
  5731. # Enable regex option
  5732. echo $ac_n "checking whether to use regex""... $ac_c" 1>&6
  5733. echo "configure:6774: checking whether to use regex" >&5
  5734. echo "$ac_t"""$with_regex"" 1>&6
  5735. case "$with_regex" in
  5736. "no") USE_REGEX= ;;
  5737. "yes") USE_REGEX="1" ;;
  5738. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  5739. esac
  5740. REGEXINCPATH=
  5741. REGEXLIBPATH=
  5742. REGEXLIB=
  5743. if test -n "$USE_REGEX"; then
  5744. # With regex includes directory
  5745. echo $ac_n "checking for location of regex includes""... $ac_c" 1>&6
  5746. echo "configure:6794: checking for location of regex includes" >&5
  5747. case "$with_regex_includes" in
  5748. y | ye | yes | n | no)
  5749. { echo "configure: error: *** You must supply a directory to --with-regex-includes." 1>&2; exit 1; }
  5750. ;;
  5751. esac
  5752. echo "$ac_t""$with_regex_includes" 1>&6
  5753. if test -n "$with_regex_includes" ; then
  5754. for dir in $with_regex_includes; do
  5755. if test -d "$dir"; then
  5756. REGEXINCPATH="$REGEXINCPATH -I$dir"
  5757. else
  5758. { echo "configure: error: *** regex includes directory $dir does not exist." 1>&2; exit 1; }
  5759. fi
  5760. done
  5761. fi
  5762. ac_save_cppflags="$CPPFLAGS"
  5763. CPPFLAGS="$REGEXINCPATH $CPPFLAGS"
  5764. for ac_hdr in regex.h
  5765. do
  5766. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5767. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5768. echo "configure:6820: checking for $ac_hdr" >&5
  5769. cat > conftest.$ac_ext <<EOF
  5770. #line 6823 "configure"
  5771. #include "confdefs.h"
  5772. #include <$ac_hdr>
  5773. EOF
  5774. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5775. { (eval echo configure:6828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5776. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5777. if test -z "$ac_err"; then
  5778. rm -rf conftest*
  5779. eval "ac_cv_header_$ac_safe=yes"
  5780. else
  5781. echo "$ac_err" >&5
  5782. echo "configure: failed program was:" >&5
  5783. cat conftest.$ac_ext >&5
  5784. rm -rf conftest*
  5785. eval "ac_cv_header_$ac_safe=no"
  5786. fi
  5787. rm -f conftest*
  5788. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5789. echo "$ac_t""yes" 1>&6
  5790. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5791. cat >> confdefs.h <<EOF
  5792. #define $ac_tr_hdr 1
  5793. EOF
  5794. else
  5795. echo "$ac_t""no" 1>&6
  5796. { echo "configure: error: *** Unable to locate regex includes." 1>&2; exit 1; }
  5797. fi
  5798. done
  5799. CPPFLAGS=$ac_save_cppflags
  5800. # With regex library directory
  5801. echo $ac_n "checking for location of regex library""... $ac_c" 1>&6
  5802. echo "configure:6862: checking for location of regex library" >&5
  5803. case "$with_regex_libs" in
  5804. y | ye | yes | n | no)
  5805. { echo "configure: error: *** You must supply a directory to --with-regex-libs." 1>&2; exit 1; }
  5806. ;;
  5807. esac
  5808. echo "$ac_t""$with_regex_libs" 1>&6
  5809. if test -n "$with_regex_libs"; then
  5810. for dir in $with_regex_libs; do
  5811. if test -d "$dir"; then
  5812. REGEXLIBPATH="$REGEXLIBPATH -L$dir"
  5813. else
  5814. { echo "configure: error: *** regex library directory $dir does not exist." 1>&2; exit 1; }
  5815. fi
  5816. done
  5817. fi
  5818. ac_save_libs="$LIBS"
  5819. ac_save_ldflags="$LDFLAGS"
  5820. LIBS=" $LIBS"
  5821. LDFLAGS=" $LDFLAGS"
  5822. echo $ac_n "checking for regcomp""... $ac_c" 1>&6
  5823. echo "configure:6887: checking for regcomp" >&5
  5824. cat > conftest.$ac_ext <<EOF
  5825. #line 6890 "configure"
  5826. #include "confdefs.h"
  5827. /* System header to define __stub macros and hopefully few prototypes,
  5828. which can conflict with char regcomp(); below. */
  5829. #include <assert.h>
  5830. /* Override any gcc2 internal prototype to avoid an error. */
  5831. /* We use char because int might match the return type of a gcc2
  5832. builtin and then its argument prototype would still apply. */
  5833. char regcomp();
  5834. int main() {
  5835. /* The GNU C library defines this for functions which it implements
  5836. to always fail with ENOSYS. Some functions are actually named
  5837. something starting with __ and the normal name is an alias. */
  5838. #if defined (__stub_regcomp) || defined (__stub___regcomp)
  5839. choke me
  5840. #else
  5841. regcomp();
  5842. #endif
  5843. ; return 0; }
  5844. EOF
  5845. if { (eval echo configure:6913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5846. rm -rf conftest*
  5847. eval "ac_cv_func_regcomp=yes"
  5848. else
  5849. echo "configure: failed program was:" >&5
  5850. cat conftest.$ac_ext >&5
  5851. rm -rf conftest*
  5852. eval "ac_cv_func_regcomp=no"
  5853. fi
  5854. rm -f conftest*
  5855. if eval "test \"`echo '$ac_cv_func_'regcomp`\" = yes"; then
  5856. echo "$ac_t""yes" 1>&6
  5857. REGEXLIB="$REGEXLIB "
  5858. else
  5859. echo "$ac_t""no" 1>&6
  5860. ac_save_ldflags="$LDFLAGS"
  5861. LDFLAGS="$REGEXLIBPATH $LDFLAGS"
  5862. echo $ac_n "checking for regcomp in -lregex""... $ac_c" 1>&6
  5863. echo "configure:6940: checking for regcomp in -lregex" >&5
  5864. ac_lib_var=`echo regex'_'regcomp | sed 'y%./+-%__p_%'`
  5865. ac_save_LIBS="$LIBS"
  5866. LIBS="-lregex $LIBS"
  5867. cat > conftest.$ac_ext <<EOF
  5868. #line 6946 "configure"
  5869. #include "confdefs.h"
  5870. /* Override any gcc2 internal prototype to avoid an error. */
  5871. /* We use char because int might match the return type of a gcc2
  5872. builtin and then its argument prototype would still apply. */
  5873. char regcomp();
  5874. int main() {
  5875. regcomp()
  5876. ; return 0; }
  5877. EOF
  5878. if { (eval echo configure:6957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5879. rm -rf conftest*
  5880. eval "ac_cv_lib_$ac_lib_var=yes"
  5881. else
  5882. echo "configure: failed program was:" >&5
  5883. cat conftest.$ac_ext >&5
  5884. rm -rf conftest*
  5885. eval "ac_cv_lib_$ac_lib_var=no"
  5886. fi
  5887. rm -f conftest*
  5888. LIBS="$ac_save_LIBS"
  5889. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5890. echo "$ac_t""yes" 1>&6
  5891. REGEXLIB="$REGEXLIB -lregex "
  5892. else
  5893. echo "$ac_t""no" 1>&6
  5894. LDFLAGS=${ac_save_ldflags}
  5895. { echo "configure: error: *** Unable to locate regex library." 1>&2; exit 1; }
  5896. fi
  5897. LDFLAGS=${ac_save_ldflags}
  5898. fi
  5899. LIBS=${ac_save_libs}
  5900. LDFLAGS=${ac_save_ldflags}
  5901. fi # $USE_REGEX
  5902. # Done checking regex
  5903. # Enable Readline option
  5904. echo $ac_n "checking whether to use Readline""... $ac_c" 1>&6
  5905. echo "configure:7007: checking whether to use Readline" >&5
  5906. echo "$ac_t"""$with_readline"" 1>&6
  5907. case "$with_readline" in
  5908. "no") USE_READLINE= ;;
  5909. "yes") USE_READLINE="1" ;;
  5910. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  5911. esac
  5912. READLINEINCPATH=
  5913. READLINELIBPATH=
  5914. READLINELIB=
  5915. HISTORYLIB=
  5916. if test -n "$USE_READLINE"; then
  5917. # With Readline includes directory
  5918. echo $ac_n "checking for location of Readline includes""... $ac_c" 1>&6
  5919. echo "configure:7028: checking for location of Readline includes" >&5
  5920. case "$with_readline_includes" in
  5921. y | ye | yes | n | no)
  5922. { echo "configure: error: *** You must supply a directory to --with-readline-includes." 1>&2; exit 1; }
  5923. ;;
  5924. esac
  5925. echo "$ac_t""$with_readline_includes" 1>&6
  5926. if test -n "$with_readline_includes" ; then
  5927. for dir in $with_readline_includes; do
  5928. if test -d "$dir"; then
  5929. READLINEINCPATH="$READLINEINCPATH -I$dir"
  5930. else
  5931. { echo "configure: error: *** Readline includes directory $dir does not exist." 1>&2; exit 1; }
  5932. fi
  5933. done
  5934. fi
  5935. ac_save_cppflags="$CPPFLAGS"
  5936. CPPFLAGS="$READLINEINCPATH $CPPFLAGS"
  5937. for ac_hdr in readline/readline.h
  5938. do
  5939. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5940. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5941. echo "configure:7054: checking for $ac_hdr" >&5
  5942. cat > conftest.$ac_ext <<EOF
  5943. #line 7057 "configure"
  5944. #include "confdefs.h"
  5945. #include <$ac_hdr>
  5946. EOF
  5947. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5948. { (eval echo configure:7062: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5949. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5950. if test -z "$ac_err"; then
  5951. rm -rf conftest*
  5952. eval "ac_cv_header_$ac_safe=yes"
  5953. else
  5954. echo "$ac_err" >&5
  5955. echo "configure: failed program was:" >&5
  5956. cat conftest.$ac_ext >&5
  5957. rm -rf conftest*
  5958. eval "ac_cv_header_$ac_safe=no"
  5959. fi
  5960. rm -f conftest*
  5961. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5962. echo "$ac_t""yes" 1>&6
  5963. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5964. cat >> confdefs.h <<EOF
  5965. #define $ac_tr_hdr 1
  5966. EOF
  5967. else
  5968. echo "$ac_t""no" 1>&6
  5969. { echo "configure: error: *** Unable to locate Readline includes." 1>&2; exit 1; }
  5970. fi
  5971. done
  5972. CPPFLAGS=$ac_save_cppflags
  5973. ac_save_cppflags="$CPPFLAGS"
  5974. CPPFLAGS="$READLINEINCPATH $CPPFLAGS"
  5975. for ac_hdr in readline/history.h
  5976. do
  5977. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5978. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5979. echo "configure:7098: checking for $ac_hdr" >&5
  5980. cat > conftest.$ac_ext <<EOF
  5981. #line 7101 "configure"
  5982. #include "confdefs.h"
  5983. #include <$ac_hdr>
  5984. EOF
  5985. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5986. { (eval echo configure:7106: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5987. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5988. if test -z "$ac_err"; then
  5989. rm -rf conftest*
  5990. eval "ac_cv_header_$ac_safe=yes"
  5991. else
  5992. echo "$ac_err" >&5
  5993. echo "configure: failed program was:" >&5
  5994. cat conftest.$ac_ext >&5
  5995. rm -rf conftest*
  5996. eval "ac_cv_header_$ac_safe=no"
  5997. fi
  5998. rm -f conftest*
  5999. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6000. echo "$ac_t""yes" 1>&6
  6001. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6002. cat >> confdefs.h <<EOF
  6003. #define $ac_tr_hdr 1
  6004. EOF
  6005. else
  6006. echo "$ac_t""no" 1>&6
  6007. { echo "configure: error: *** Unable to locate Readline includes." 1>&2; exit 1; }
  6008. fi
  6009. done
  6010. CPPFLAGS=$ac_save_cppflags
  6011. # With Readline library directory
  6012. echo $ac_n "checking for location of Readline library""... $ac_c" 1>&6
  6013. echo "configure:7140: checking for location of Readline library" >&5
  6014. case "$with_readline_libs" in
  6015. y | ye | yes | n | no)
  6016. { echo "configure: error: *** You must supply a directory to --with-readline-libs." 1>&2; exit 1; }
  6017. ;;
  6018. esac
  6019. echo "$ac_t""$with_readline_libs" 1>&6
  6020. if test -n "$with_readline_libs"; then
  6021. for dir in $with_readline_libs; do
  6022. if test -d "$dir"; then
  6023. READLINELIBPATH="$READLINELIBPATH -L$dir"
  6024. else
  6025. { echo "configure: error: *** Readline library directory $dir does not exist." 1>&2; exit 1; }
  6026. fi
  6027. done
  6028. fi
  6029. ac_save_ldflags="$LDFLAGS"
  6030. LDFLAGS="$READLINELIBPATH $LDFLAGS"
  6031. echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
  6032. echo "configure:7165: checking for readline in -lreadline" >&5
  6033. ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
  6034. ac_save_LIBS="$LIBS"
  6035. LIBS="-lreadline $LIBS"
  6036. cat > conftest.$ac_ext <<EOF
  6037. #line 7171 "configure"
  6038. #include "confdefs.h"
  6039. /* Override any gcc2 internal prototype to avoid an error. */
  6040. /* We use char because int might match the return type of a gcc2
  6041. builtin and then its argument prototype would still apply. */
  6042. char readline();
  6043. int main() {
  6044. readline()
  6045. ; return 0; }
  6046. EOF
  6047. if { (eval echo configure:7182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6048. rm -rf conftest*
  6049. eval "ac_cv_lib_$ac_lib_var=yes"
  6050. else
  6051. echo "configure: failed program was:" >&5
  6052. cat conftest.$ac_ext >&5
  6053. rm -rf conftest*
  6054. eval "ac_cv_lib_$ac_lib_var=no"
  6055. fi
  6056. rm -f conftest*
  6057. LIBS="$ac_save_LIBS"
  6058. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6059. echo "$ac_t""yes" 1>&6
  6060. READLINELIB="$READLINELIB -lreadline "
  6061. else
  6062. echo "$ac_t""no" 1>&6
  6063. LDFLAGS=${ac_save_ldflags}
  6064. { echo "configure: error: *** Unable to locate Readline library." 1>&2; exit 1; }
  6065. fi
  6066. LDFLAGS=${ac_save_ldflags}
  6067. ac_save_ldflags="$LDFLAGS"
  6068. LDFLAGS="$READLINELIBPATH $LDFLAGS"
  6069. echo $ac_n "checking for add_history in -lhistory""... $ac_c" 1>&6
  6070. echo "configure:7217: checking for add_history in -lhistory" >&5
  6071. ac_lib_var=`echo history'_'add_history | sed 'y%./+-%__p_%'`
  6072. ac_save_LIBS="$LIBS"
  6073. LIBS="-lhistory $LIBS"
  6074. cat > conftest.$ac_ext <<EOF
  6075. #line 7223 "configure"
  6076. #include "confdefs.h"
  6077. /* Override any gcc2 internal prototype to avoid an error. */
  6078. /* We use char because int might match the return type of a gcc2
  6079. builtin and then its argument prototype would still apply. */
  6080. char add_history();
  6081. int main() {
  6082. add_history()
  6083. ; return 0; }
  6084. EOF
  6085. if { (eval echo configure:7234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6086. rm -rf conftest*
  6087. eval "ac_cv_lib_$ac_lib_var=yes"
  6088. else
  6089. echo "configure: failed program was:" >&5
  6090. cat conftest.$ac_ext >&5
  6091. rm -rf conftest*
  6092. eval "ac_cv_lib_$ac_lib_var=no"
  6093. fi
  6094. rm -f conftest*
  6095. LIBS="$ac_save_LIBS"
  6096. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6097. echo "$ac_t""yes" 1>&6
  6098. HISTORYLIB="$HISTORYLIB -lhistory "
  6099. else
  6100. echo "$ac_t""no" 1>&6
  6101. LDFLAGS=${ac_save_ldflags}
  6102. { echo "configure: error: *** Unable to locate History library." 1>&2; exit 1; }
  6103. fi
  6104. LDFLAGS=${ac_save_ldflags}
  6105. fi # $USE_READLINE
  6106. # Done checking Readline
  6107. # Enable JPEG option
  6108. echo $ac_n "checking whether to use JPEG""... $ac_c" 1>&6
  6109. echo "configure:7277: checking whether to use JPEG" >&5
  6110. echo "$ac_t"""$with_jpeg"" 1>&6
  6111. case "$with_jpeg" in
  6112. "no") USE_JPEG= ;;
  6113. "yes") USE_JPEG="1" ;;
  6114. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  6115. esac
  6116. JPEGINCPATH=
  6117. JPEGLIBPATH=
  6118. JPEGLIB=
  6119. if test -n "$USE_JPEG"; then
  6120. # With JPEG includes directory
  6121. echo $ac_n "checking for location of JPEG includes""... $ac_c" 1>&6
  6122. echo "configure:7297: checking for location of JPEG includes" >&5
  6123. case "$with_jpeg_includes" in
  6124. y | ye | yes | n | no)
  6125. { echo "configure: error: *** You must supply a directory to --with-jpeg-includes." 1>&2; exit 1; }
  6126. ;;
  6127. esac
  6128. echo "$ac_t""$with_jpeg_includes" 1>&6
  6129. if test -n "$with_jpeg_includes" ; then
  6130. for dir in $with_jpeg_includes; do
  6131. if test -d "$dir"; then
  6132. JPEGINCPATH="$JPEGINCPATH -I$dir"
  6133. else
  6134. { echo "configure: error: *** JPEG includes directory $dir does not exist." 1>&2; exit 1; }
  6135. fi
  6136. done
  6137. fi
  6138. ac_save_cppflags="$CPPFLAGS"
  6139. CPPFLAGS="$JPEGINCPATH $CPPFLAGS"
  6140. for ac_hdr in jpeglib.h
  6141. do
  6142. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6143. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6144. echo "configure:7323: checking for $ac_hdr" >&5
  6145. cat > conftest.$ac_ext <<EOF
  6146. #line 7326 "configure"
  6147. #include "confdefs.h"
  6148. #include <$ac_hdr>
  6149. EOF
  6150. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6151. { (eval echo configure:7331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6152. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6153. if test -z "$ac_err"; then
  6154. rm -rf conftest*
  6155. eval "ac_cv_header_$ac_safe=yes"
  6156. else
  6157. echo "$ac_err" >&5
  6158. echo "configure: failed program was:" >&5
  6159. cat conftest.$ac_ext >&5
  6160. rm -rf conftest*
  6161. eval "ac_cv_header_$ac_safe=no"
  6162. fi
  6163. rm -f conftest*
  6164. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6165. echo "$ac_t""yes" 1>&6
  6166. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6167. cat >> confdefs.h <<EOF
  6168. #define $ac_tr_hdr 1
  6169. EOF
  6170. else
  6171. echo "$ac_t""no" 1>&6
  6172. { echo "configure: error: *** Unable to locate JPEG includes." 1>&2; exit 1; }
  6173. fi
  6174. done
  6175. CPPFLAGS=$ac_save_cppflags
  6176. # With JPEG library directory
  6177. echo $ac_n "checking for location of JPEG library""... $ac_c" 1>&6
  6178. echo "configure:7365: checking for location of JPEG library" >&5
  6179. case "$with_jpeg_libs" in
  6180. y | ye | yes | n | no)
  6181. { echo "configure: error: *** You must supply a directory to --with-jpeg-libs." 1>&2; exit 1; }
  6182. ;;
  6183. esac
  6184. echo "$ac_t""$with_jpeg_libs" 1>&6
  6185. if test -n "$with_jpeg_libs"; then
  6186. for dir in $with_jpeg_libs; do
  6187. if test -d "$dir"; then
  6188. JPEGLIBPATH="$JPEGLIBPATH -L$dir"
  6189. else
  6190. { echo "configure: error: *** JPEG library directory $dir does not exist." 1>&2; exit 1; }
  6191. fi
  6192. done
  6193. fi
  6194. ac_save_ldflags="$LDFLAGS"
  6195. LDFLAGS="$JPEGLIBPATH $LDFLAGS"
  6196. echo $ac_n "checking for jpeg_start_compress in -ljpeg""... $ac_c" 1>&6
  6197. echo "configure:7392: checking for jpeg_start_compress in -ljpeg" >&5
  6198. ac_lib_var=`echo jpeg'_'jpeg_start_compress | sed 'y%./+-%__p_%'`
  6199. ac_save_LIBS="$LIBS"
  6200. LIBS="-ljpeg $LIBS"
  6201. cat > conftest.$ac_ext <<EOF
  6202. #line 7398 "configure"
  6203. #include "confdefs.h"
  6204. /* Override any gcc2 internal prototype to avoid an error. */
  6205. /* We use char because int might match the return type of a gcc2
  6206. builtin and then its argument prototype would still apply. */
  6207. char jpeg_start_compress();
  6208. int main() {
  6209. jpeg_start_compress()
  6210. ; return 0; }
  6211. EOF
  6212. if { (eval echo configure:7409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6213. rm -rf conftest*
  6214. eval "ac_cv_lib_$ac_lib_var=yes"
  6215. else
  6216. echo "configure: failed program was:" >&5
  6217. cat conftest.$ac_ext >&5
  6218. rm -rf conftest*
  6219. eval "ac_cv_lib_$ac_lib_var=no"
  6220. fi
  6221. rm -f conftest*
  6222. LIBS="$ac_save_LIBS"
  6223. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6224. echo "$ac_t""yes" 1>&6
  6225. JPEGLIB="$JPEGLIB -ljpeg "
  6226. else
  6227. echo "$ac_t""no" 1>&6
  6228. echo $ac_n "checking for jpeg_start_compress in -ljpeg""... $ac_c" 1>&6
  6229. echo "configure:7428: checking for jpeg_start_compress in -ljpeg" >&5
  6230. ac_lib_var=`echo jpeg'_'jpeg_start_compress | sed 'y%./+-%__p_%'`
  6231. ac_save_LIBS="$LIBS"
  6232. LIBS="-ljpeg $ZLIB $LIBS"
  6233. cat > conftest.$ac_ext <<EOF
  6234. #line 7434 "configure"
  6235. #include "confdefs.h"
  6236. /* Override any gcc2 internal prototype to avoid an error. */
  6237. /* We use char because int might match the return type of a gcc2
  6238. builtin and then its argument prototype would still apply. */
  6239. char jpeg_start_compress();
  6240. int main() {
  6241. jpeg_start_compress()
  6242. ; return 0; }
  6243. EOF
  6244. if { (eval echo configure:7445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6245. rm -rf conftest*
  6246. eval "ac_cv_lib_$ac_lib_var=yes"
  6247. else
  6248. echo "configure: failed program was:" >&5
  6249. cat conftest.$ac_ext >&5
  6250. rm -rf conftest*
  6251. eval "ac_cv_lib_$ac_lib_var=no"
  6252. fi
  6253. rm -f conftest*
  6254. LIBS="$ac_save_LIBS"
  6255. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6256. echo "$ac_t""yes" 1>&6
  6257. JPEGLIB="$JPEGLIB -ljpeg $ZLIB"
  6258. else
  6259. echo "$ac_t""no" 1>&6
  6260. LDFLAGS=${ac_save_ldflags}
  6261. { echo "configure: error: *** Unable to locate JPEG library." 1>&2; exit 1; }
  6262. fi
  6263. fi
  6264. LDFLAGS=${ac_save_ldflags}
  6265. fi # $USE_JPEG
  6266. # Done checking JPEG
  6267. # GDAL option
  6268. echo $ac_n "checking whether to use GDAL""... $ac_c" 1>&6
  6269. echo "configure:7494: checking whether to use GDAL" >&5
  6270. GDAL_LIBS=
  6271. GDAL_CFLAGS=
  6272. USE_GDAL=
  6273. USE_OGR=
  6274. if test "`basename xx/$with_gdal`" = "gdal-config" ; then
  6275. GDAL_CONFIG="$with_gdal"
  6276. fi
  6277. if test "$with_gdal" = "no" ; then
  6278. echo "$ac_t""no" 1>&6
  6279. else
  6280. echo "$ac_t""yes" 1>&6
  6281. # Extract the first word of "gdal-config", so it can be a program name with args.
  6282. set dummy gdal-config; ac_word=$2
  6283. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  6284. echo "configure:7512: checking for $ac_word" >&5
  6285. case "$GDAL_CONFIG" in
  6286. /*)
  6287. ac_cv_path_GDAL_CONFIG="$GDAL_CONFIG" # Let the user override the test with a path.
  6288. ;;
  6289. ?:/*)
  6290. ac_cv_path_GDAL_CONFIG="$GDAL_CONFIG" # Let the user override the test with a dos path.
  6291. ;;
  6292. *)
  6293. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  6294. ac_dummy="$PATH"
  6295. for ac_dir in $ac_dummy; do
  6296. test -z "$ac_dir" && ac_dir=.
  6297. if test -f $ac_dir/$ac_word; then
  6298. ac_cv_path_GDAL_CONFIG="$ac_dir/$ac_word"
  6299. break
  6300. fi
  6301. done
  6302. IFS="$ac_save_ifs"
  6303. test -z "$ac_cv_path_GDAL_CONFIG" && ac_cv_path_GDAL_CONFIG="no"
  6304. ;;
  6305. esac
  6306. GDAL_CONFIG="$ac_cv_path_GDAL_CONFIG"
  6307. if test -n "$GDAL_CONFIG"; then
  6308. echo "$ac_t""$GDAL_CONFIG" 1>&6
  6309. else
  6310. echo "$ac_t""no" 1>&6
  6311. fi
  6312. if test "$GDAL_CONFIG" = "no" ; then
  6313. { echo "configure: error: *** couldn't find gdal-config" 1>&2; exit 1; }
  6314. fi
  6315. if test "$GDAL_CONFIG" != "" ; then
  6316. GDAL_LIBS=`"$GDAL_CONFIG" --libs`
  6317. GDAL_DEP_LIBS=`"$GDAL_CONFIG" --dep-libs`
  6318. GDAL_CFLAGS=`"$GDAL_CONFIG" --cflags`
  6319. USE_GDAL=1
  6320. if test `"$GDAL_CONFIG" --ogr-enabled` = "yes" ; then
  6321. cat >> confdefs.h <<\EOF
  6322. #define HAVE_OGR 1
  6323. EOF
  6324. USE_OGR=1
  6325. fi
  6326. fi
  6327. GDAL=
  6328. ac_save_libs="$LIBS"
  6329. ac_save_cflags="$CFLAGS"
  6330. LIBS="$LIBS $GDAL_LIBS"
  6331. CFLAGS="$CFLAGS $GDAL_CFLAGS"
  6332. cat > conftest.$ac_ext <<EOF
  6333. #line 7567 "configure"
  6334. #include "confdefs.h"
  6335. #include <gdal.h>
  6336. int main() {
  6337. GDALOpen("foo", GA_ReadOnly);
  6338. ; return 0; }
  6339. EOF
  6340. if { (eval echo configure:7574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6341. :
  6342. else
  6343. echo "configure: failed program was:" >&5
  6344. cat conftest.$ac_ext >&5
  6345. rm -rf conftest*
  6346. LIBS="$LIBS $GDAL_DEP_LIBS"
  6347. cat > conftest.$ac_ext <<EOF
  6348. #line 7583 "configure"
  6349. #include "confdefs.h"
  6350. #include <gdal.h>
  6351. int main() {
  6352. GDALOpen("foo", GA_ReadOnly);
  6353. ; return 0; }
  6354. EOF
  6355. if { (eval echo configure:7590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6356. rm -rf conftest*
  6357. GDAL_LIBS="$GDAL_LIBS $GDAL_DEP_LIBS"
  6358. else
  6359. echo "configure: failed program was:" >&5
  6360. cat conftest.$ac_ext >&5
  6361. rm -rf conftest*
  6362. { echo "configure: error: *** Unable to locate GDAL library." 1>&2; exit 1; }
  6363. fi
  6364. rm -f conftest*
  6365. fi
  6366. rm -f conftest*
  6367. LIBS=${ac_save_libs}
  6368. CFLAGS=${ac_save_cflags}
  6369. cat >> confdefs.h <<\EOF
  6370. #define HAVE_GDAL 1
  6371. EOF
  6372. fi
  6373. # Enable TIFF option
  6374. echo $ac_n "checking whether to use TIFF""... $ac_c" 1>&6
  6375. echo "configure:7623: checking whether to use TIFF" >&5
  6376. echo "$ac_t"""$with_tiff"" 1>&6
  6377. case "$with_tiff" in
  6378. "no") USE_TIFF= ;;
  6379. "yes") USE_TIFF="1" ;;
  6380. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  6381. esac
  6382. TIFF_INCLUDE_DIRS=
  6383. TIFF_LIBRARY_DIRS=
  6384. TIFFLIB=
  6385. if test -n "$USE_TIFF"; then
  6386. # With TIFF includes directory
  6387. echo $ac_n "checking for location of TIFF includes""... $ac_c" 1>&6
  6388. echo "configure:7643: checking for location of TIFF includes" >&5
  6389. case "$with_tiff_includes" in
  6390. y | ye | yes | n | no)
  6391. { echo "configure: error: *** You must supply a directory to --with-tiff-includes." 1>&2; exit 1; }
  6392. ;;
  6393. esac
  6394. echo "$ac_t""$with_tiff_includes" 1>&6
  6395. if test -n "$with_tiff_includes" ; then
  6396. for dir in $with_tiff_includes; do
  6397. if test -d "$dir"; then
  6398. TIFF_INCLUDE_DIRS="$TIFF_INCLUDE_DIRS -I$dir"
  6399. else
  6400. { echo "configure: error: *** TIFF includes directory $dir does not exist." 1>&2; exit 1; }
  6401. fi
  6402. done
  6403. fi
  6404. ac_save_cppflags="$CPPFLAGS"
  6405. CPPFLAGS="$TIFF_INCLUDE_DIRS $CPPFLAGS"
  6406. for ac_hdr in tiffio.h
  6407. do
  6408. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6409. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6410. echo "configure:7669: checking for $ac_hdr" >&5
  6411. cat > conftest.$ac_ext <<EOF
  6412. #line 7672 "configure"
  6413. #include "confdefs.h"
  6414. #include <$ac_hdr>
  6415. EOF
  6416. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6417. { (eval echo configure:7677: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6418. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6419. if test -z "$ac_err"; then
  6420. rm -rf conftest*
  6421. eval "ac_cv_header_$ac_safe=yes"
  6422. else
  6423. echo "$ac_err" >&5
  6424. echo "configure: failed program was:" >&5
  6425. cat conftest.$ac_ext >&5
  6426. rm -rf conftest*
  6427. eval "ac_cv_header_$ac_safe=no"
  6428. fi
  6429. rm -f conftest*
  6430. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6431. echo "$ac_t""yes" 1>&6
  6432. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6433. cat >> confdefs.h <<EOF
  6434. #define $ac_tr_hdr 1
  6435. EOF
  6436. else
  6437. echo "$ac_t""no" 1>&6
  6438. { echo "configure: error: *** Unable to locate TIFF includes." 1>&2; exit 1; }
  6439. fi
  6440. done
  6441. CPPFLAGS=$ac_save_cppflags
  6442. # With TIFF library directory
  6443. echo $ac_n "checking for location of TIFF library""... $ac_c" 1>&6
  6444. echo "configure:7711: checking for location of TIFF library" >&5
  6445. case "$with_tiff_libs" in
  6446. y | ye | yes | n | no)
  6447. { echo "configure: error: *** You must supply a directory to --with-tiff-libs." 1>&2; exit 1; }
  6448. ;;
  6449. esac
  6450. echo "$ac_t""$with_tiff_libs" 1>&6
  6451. if test -n "$with_tiff_libs"; then
  6452. for dir in $with_tiff_libs; do
  6453. if test -d "$dir"; then
  6454. TIFF_LIBRARY_DIRS="$TIFF_LIBRARY_DIRS -L$dir"
  6455. else
  6456. { echo "configure: error: *** TIFF library directory $dir does not exist." 1>&2; exit 1; }
  6457. fi
  6458. done
  6459. fi
  6460. ac_save_ldflags="$LDFLAGS"
  6461. LDFLAGS="$TIFF_LIBRARY_DIRS $LDFLAGS"
  6462. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6463. echo "configure:7742: checking for TIFFOpen in -ltiff" >&5
  6464. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6465. ac_save_LIBS="$LIBS"
  6466. LIBS="-ltiff $LIBS"
  6467. cat > conftest.$ac_ext <<EOF
  6468. #line 7748 "configure"
  6469. #include "confdefs.h"
  6470. /* Override any gcc2 internal prototype to avoid an error. */
  6471. /* We use char because int might match the return type of a gcc2
  6472. builtin and then its argument prototype would still apply. */
  6473. char TIFFOpen();
  6474. int main() {
  6475. TIFFOpen()
  6476. ; return 0; }
  6477. EOF
  6478. if { (eval echo configure:7759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6479. rm -rf conftest*
  6480. eval "ac_cv_lib_$ac_lib_var=yes"
  6481. else
  6482. echo "configure: failed program was:" >&5
  6483. cat conftest.$ac_ext >&5
  6484. rm -rf conftest*
  6485. eval "ac_cv_lib_$ac_lib_var=no"
  6486. fi
  6487. rm -f conftest*
  6488. LIBS="$ac_save_LIBS"
  6489. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6490. echo "$ac_t""yes" 1>&6
  6491. TIFFLIB="$TIFFLIB -ltiff "
  6492. else
  6493. echo "$ac_t""no" 1>&6
  6494. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6495. echo "configure:7778: checking for TIFFOpen in -ltiff" >&5
  6496. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6497. ac_save_LIBS="$LIBS"
  6498. LIBS="-ltiff $MATHLIB $LIBS"
  6499. cat > conftest.$ac_ext <<EOF
  6500. #line 7784 "configure"
  6501. #include "confdefs.h"
  6502. /* Override any gcc2 internal prototype to avoid an error. */
  6503. /* We use char because int might match the return type of a gcc2
  6504. builtin and then its argument prototype would still apply. */
  6505. char TIFFOpen();
  6506. int main() {
  6507. TIFFOpen()
  6508. ; return 0; }
  6509. EOF
  6510. if { (eval echo configure:7795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6511. rm -rf conftest*
  6512. eval "ac_cv_lib_$ac_lib_var=yes"
  6513. else
  6514. echo "configure: failed program was:" >&5
  6515. cat conftest.$ac_ext >&5
  6516. rm -rf conftest*
  6517. eval "ac_cv_lib_$ac_lib_var=no"
  6518. fi
  6519. rm -f conftest*
  6520. LIBS="$ac_save_LIBS"
  6521. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6522. echo "$ac_t""yes" 1>&6
  6523. TIFFLIB="$TIFFLIB -ltiff $MATHLIB"
  6524. else
  6525. echo "$ac_t""no" 1>&6
  6526. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6527. echo "configure:7814: checking for TIFFOpen in -ltiff" >&5
  6528. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6529. ac_save_LIBS="$LIBS"
  6530. LIBS="-ltiff $ZLIB $LIBS"
  6531. cat > conftest.$ac_ext <<EOF
  6532. #line 7820 "configure"
  6533. #include "confdefs.h"
  6534. /* Override any gcc2 internal prototype to avoid an error. */
  6535. /* We use char because int might match the return type of a gcc2
  6536. builtin and then its argument prototype would still apply. */
  6537. char TIFFOpen();
  6538. int main() {
  6539. TIFFOpen()
  6540. ; return 0; }
  6541. EOF
  6542. if { (eval echo configure:7831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6543. rm -rf conftest*
  6544. eval "ac_cv_lib_$ac_lib_var=yes"
  6545. else
  6546. echo "configure: failed program was:" >&5
  6547. cat conftest.$ac_ext >&5
  6548. rm -rf conftest*
  6549. eval "ac_cv_lib_$ac_lib_var=no"
  6550. fi
  6551. rm -f conftest*
  6552. LIBS="$ac_save_LIBS"
  6553. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6554. echo "$ac_t""yes" 1>&6
  6555. TIFFLIB="$TIFFLIB -ltiff $ZLIB"
  6556. else
  6557. echo "$ac_t""no" 1>&6
  6558. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6559. echo "configure:7850: checking for TIFFOpen in -ltiff" >&5
  6560. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6561. ac_save_LIBS="$LIBS"
  6562. LIBS="-ltiff $ZLIB $MATHLIB $LIBS"
  6563. cat > conftest.$ac_ext <<EOF
  6564. #line 7856 "configure"
  6565. #include "confdefs.h"
  6566. /* Override any gcc2 internal prototype to avoid an error. */
  6567. /* We use char because int might match the return type of a gcc2
  6568. builtin and then its argument prototype would still apply. */
  6569. char TIFFOpen();
  6570. int main() {
  6571. TIFFOpen()
  6572. ; return 0; }
  6573. EOF
  6574. if { (eval echo configure:7867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6575. rm -rf conftest*
  6576. eval "ac_cv_lib_$ac_lib_var=yes"
  6577. else
  6578. echo "configure: failed program was:" >&5
  6579. cat conftest.$ac_ext >&5
  6580. rm -rf conftest*
  6581. eval "ac_cv_lib_$ac_lib_var=no"
  6582. fi
  6583. rm -f conftest*
  6584. LIBS="$ac_save_LIBS"
  6585. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6586. echo "$ac_t""yes" 1>&6
  6587. TIFFLIB="$TIFFLIB -ltiff $ZLIB $MATHLIB"
  6588. else
  6589. echo "$ac_t""no" 1>&6
  6590. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6591. echo "configure:7886: checking for TIFFOpen in -ltiff" >&5
  6592. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6593. ac_save_LIBS="$LIBS"
  6594. LIBS="-ltiff $JPEGLIBPATH $JPEGLIB $LIBS"
  6595. cat > conftest.$ac_ext <<EOF
  6596. #line 7892 "configure"
  6597. #include "confdefs.h"
  6598. /* Override any gcc2 internal prototype to avoid an error. */
  6599. /* We use char because int might match the return type of a gcc2
  6600. builtin and then its argument prototype would still apply. */
  6601. char TIFFOpen();
  6602. int main() {
  6603. TIFFOpen()
  6604. ; return 0; }
  6605. EOF
  6606. if { (eval echo configure:7903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6607. rm -rf conftest*
  6608. eval "ac_cv_lib_$ac_lib_var=yes"
  6609. else
  6610. echo "configure: failed program was:" >&5
  6611. cat conftest.$ac_ext >&5
  6612. rm -rf conftest*
  6613. eval "ac_cv_lib_$ac_lib_var=no"
  6614. fi
  6615. rm -f conftest*
  6616. LIBS="$ac_save_LIBS"
  6617. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6618. echo "$ac_t""yes" 1>&6
  6619. TIFFLIB="$TIFFLIB -ltiff $JPEGLIBPATH $JPEGLIB"
  6620. else
  6621. echo "$ac_t""no" 1>&6
  6622. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6623. echo "configure:7922: checking for TIFFOpen in -ltiff" >&5
  6624. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6625. ac_save_LIBS="$LIBS"
  6626. LIBS="-ltiff $JPEGLIBPATH $JPEGLIB $MATHLIB $LIBS"
  6627. cat > conftest.$ac_ext <<EOF
  6628. #line 7928 "configure"
  6629. #include "confdefs.h"
  6630. /* Override any gcc2 internal prototype to avoid an error. */
  6631. /* We use char because int might match the return type of a gcc2
  6632. builtin and then its argument prototype would still apply. */
  6633. char TIFFOpen();
  6634. int main() {
  6635. TIFFOpen()
  6636. ; return 0; }
  6637. EOF
  6638. if { (eval echo configure:7939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6639. rm -rf conftest*
  6640. eval "ac_cv_lib_$ac_lib_var=yes"
  6641. else
  6642. echo "configure: failed program was:" >&5
  6643. cat conftest.$ac_ext >&5
  6644. rm -rf conftest*
  6645. eval "ac_cv_lib_$ac_lib_var=no"
  6646. fi
  6647. rm -f conftest*
  6648. LIBS="$ac_save_LIBS"
  6649. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6650. echo "$ac_t""yes" 1>&6
  6651. TIFFLIB="$TIFFLIB -ltiff $JPEGLIBPATH $JPEGLIB $MATHLIB"
  6652. else
  6653. echo "$ac_t""no" 1>&6
  6654. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6655. echo "configure:7958: checking for TIFFOpen in -ltiff" >&5
  6656. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6657. ac_save_LIBS="$LIBS"
  6658. LIBS="-ltiff $JPEGLIBPATH $JPEGLIB $ZLIB $LIBS"
  6659. cat > conftest.$ac_ext <<EOF
  6660. #line 7964 "configure"
  6661. #include "confdefs.h"
  6662. /* Override any gcc2 internal prototype to avoid an error. */
  6663. /* We use char because int might match the return type of a gcc2
  6664. builtin and then its argument prototype would still apply. */
  6665. char TIFFOpen();
  6666. int main() {
  6667. TIFFOpen()
  6668. ; return 0; }
  6669. EOF
  6670. if { (eval echo configure:7975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6671. rm -rf conftest*
  6672. eval "ac_cv_lib_$ac_lib_var=yes"
  6673. else
  6674. echo "configure: failed program was:" >&5
  6675. cat conftest.$ac_ext >&5
  6676. rm -rf conftest*
  6677. eval "ac_cv_lib_$ac_lib_var=no"
  6678. fi
  6679. rm -f conftest*
  6680. LIBS="$ac_save_LIBS"
  6681. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6682. echo "$ac_t""yes" 1>&6
  6683. TIFFLIB="$TIFFLIB -ltiff $JPEGLIBPATH $JPEGLIB $ZLIB"
  6684. else
  6685. echo "$ac_t""no" 1>&6
  6686. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6687. echo "configure:7994: checking for TIFFOpen in -ltiff" >&5
  6688. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6689. ac_save_LIBS="$LIBS"
  6690. LIBS="-ltiff $JPEGLIBPATH $JPEGLIB $ZLIB $MATHLIB $LIBS"
  6691. cat > conftest.$ac_ext <<EOF
  6692. #line 8000 "configure"
  6693. #include "confdefs.h"
  6694. /* Override any gcc2 internal prototype to avoid an error. */
  6695. /* We use char because int might match the return type of a gcc2
  6696. builtin and then its argument prototype would still apply. */
  6697. char TIFFOpen();
  6698. int main() {
  6699. TIFFOpen()
  6700. ; return 0; }
  6701. EOF
  6702. if { (eval echo configure:8011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6703. rm -rf conftest*
  6704. eval "ac_cv_lib_$ac_lib_var=yes"
  6705. else
  6706. echo "configure: failed program was:" >&5
  6707. cat conftest.$ac_ext >&5
  6708. rm -rf conftest*
  6709. eval "ac_cv_lib_$ac_lib_var=no"
  6710. fi
  6711. rm -f conftest*
  6712. LIBS="$ac_save_LIBS"
  6713. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6714. echo "$ac_t""yes" 1>&6
  6715. TIFFLIB="$TIFFLIB -ltiff $JPEGLIBPATH $JPEGLIB $ZLIB $MATHLIB"
  6716. else
  6717. echo "$ac_t""no" 1>&6
  6718. LDFLAGS=${ac_save_ldflags}
  6719. { echo "configure: error: *** Unable to locate TIFF library." 1>&2; exit 1; }
  6720. fi
  6721. fi
  6722. fi
  6723. fi
  6724. fi
  6725. fi
  6726. fi
  6727. fi
  6728. LDFLAGS=${ac_save_ldflags}
  6729. fi # $USE_TIFF
  6730. # Done checking TIFF
  6731. # Enable PNG option
  6732. echo $ac_n "checking whether to use PNG""... $ac_c" 1>&6
  6733. echo "configure:8109: checking whether to use PNG" >&5
  6734. echo "$ac_t"""$with_png"" 1>&6
  6735. case "$with_png" in
  6736. "no") USE_PNG= ;;
  6737. "yes") USE_PNG="1" ;;
  6738. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  6739. esac
  6740. PNGINC=
  6741. PNGLIB=
  6742. if test -n "$USE_PNG"; then
  6743. # With PNG includes directory
  6744. echo $ac_n "checking for location of PNG includes""... $ac_c" 1>&6
  6745. echo "configure:8128: checking for location of PNG includes" >&5
  6746. case "$with_png_includes" in
  6747. y | ye | yes | n | no)
  6748. { echo "configure: error: *** You must supply a directory to --with-png-includes." 1>&2; exit 1; }
  6749. ;;
  6750. esac
  6751. echo "$ac_t""$with_png_includes" 1>&6
  6752. if test -n "$with_png_includes" ; then
  6753. for dir in $with_png_includes; do
  6754. if test -d "$dir"; then
  6755. PNGINC="$PNGINC -I$dir"
  6756. else
  6757. { echo "configure: error: *** PNG includes directory $dir does not exist." 1>&2; exit 1; }
  6758. fi
  6759. done
  6760. fi
  6761. ac_save_cppflags="$CPPFLAGS"
  6762. CPPFLAGS="$PNGINC $CPPFLAGS"
  6763. for ac_hdr in png.h
  6764. do
  6765. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6766. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6767. echo "configure:8154: checking for $ac_hdr" >&5
  6768. cat > conftest.$ac_ext <<EOF
  6769. #line 8157 "configure"
  6770. #include "confdefs.h"
  6771. #include <$ac_hdr>
  6772. EOF
  6773. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6774. { (eval echo configure:8162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6775. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6776. if test -z "$ac_err"; then
  6777. rm -rf conftest*
  6778. eval "ac_cv_header_$ac_safe=yes"
  6779. else
  6780. echo "$ac_err" >&5
  6781. echo "configure: failed program was:" >&5
  6782. cat conftest.$ac_ext >&5
  6783. rm -rf conftest*
  6784. eval "ac_cv_header_$ac_safe=no"
  6785. fi
  6786. rm -f conftest*
  6787. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6788. echo "$ac_t""yes" 1>&6
  6789. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6790. cat >> confdefs.h <<EOF
  6791. #define $ac_tr_hdr 1
  6792. EOF
  6793. else
  6794. echo "$ac_t""no" 1>&6
  6795. { echo "configure: error: *** Unable to locate PNG includes." 1>&2; exit 1; }
  6796. fi
  6797. done
  6798. CPPFLAGS=$ac_save_cppflags
  6799. # With PNG library directory
  6800. echo $ac_n "checking for location of PNG library""... $ac_c" 1>&6
  6801. echo "configure:8196: checking for location of PNG library" >&5
  6802. case "$with_png_libs" in
  6803. y | ye | yes | n | no)
  6804. { echo "configure: error: *** You must supply a directory to --with-png-libs." 1>&2; exit 1; }
  6805. ;;
  6806. esac
  6807. echo "$ac_t""$with_png_libs" 1>&6
  6808. if test -n "$with_png_libs"; then
  6809. for dir in $with_png_libs; do
  6810. if test -d "$dir"; then
  6811. PNGLIB="$PNGLIB -L$dir"
  6812. else
  6813. { echo "configure: error: *** PNG library directory $dir does not exist." 1>&2; exit 1; }
  6814. fi
  6815. done
  6816. fi
  6817. ac_save_ldflags="$LDFLAGS"
  6818. LDFLAGS="$PNGLIB $LDFLAGS"
  6819. echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
  6820. echo "configure:8221: checking for png_read_image in -lpng" >&5
  6821. ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
  6822. ac_save_LIBS="$LIBS"
  6823. LIBS="-lpng $ZLIB $MATHLIB $LIBS"
  6824. cat > conftest.$ac_ext <<EOF
  6825. #line 8227 "configure"
  6826. #include "confdefs.h"
  6827. /* Override any gcc2 internal prototype to avoid an error. */
  6828. /* We use char because int might match the return type of a gcc2
  6829. builtin and then its argument prototype would still apply. */
  6830. char png_read_image();
  6831. int main() {
  6832. png_read_image()
  6833. ; return 0; }
  6834. EOF
  6835. if { (eval echo configure:8238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6836. rm -rf conftest*
  6837. eval "ac_cv_lib_$ac_lib_var=yes"
  6838. else
  6839. echo "configure: failed program was:" >&5
  6840. cat conftest.$ac_ext >&5
  6841. rm -rf conftest*
  6842. eval "ac_cv_lib_$ac_lib_var=no"
  6843. fi
  6844. rm -f conftest*
  6845. LIBS="$ac_save_LIBS"
  6846. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6847. echo "$ac_t""yes" 1>&6
  6848. PNGLIB="$PNGLIB -lpng $ZLIB $MATHLIB"
  6849. else
  6850. echo "$ac_t""no" 1>&6
  6851. LDFLAGS=${ac_save_ldflags}
  6852. { echo "configure: error: *** Unable to locate PNG library." 1>&2; exit 1; }
  6853. fi
  6854. LDFLAGS=${ac_save_ldflags}
  6855. fi # $USE_PNG
  6856. # Done checking PNG
  6857. # Enable TCLTK option
  6858. echo $ac_n "checking whether to use Tcl/Tk""... $ac_c" 1>&6
  6859. echo "configure:8280: checking whether to use Tcl/Tk" >&5
  6860. echo "$ac_t"""$with_tcltk"" 1>&6
  6861. case "$with_tcltk" in
  6862. "no") USE_TCLTK= ;;
  6863. "yes") USE_TCLTK="1" ;;
  6864. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  6865. esac
  6866. TCLINCDIR=
  6867. TCLTKLIBPATH=
  6868. TCLTKLIBS=
  6869. if test -n "$USE_TCLTK"; then
  6870. # With Tcl/Tk includes directory
  6871. echo $ac_n "checking for location of Tcl/Tk includes""... $ac_c" 1>&6
  6872. echo "configure:8300: checking for location of Tcl/Tk includes" >&5
  6873. case "$with_tcltk_includes" in
  6874. y | ye | yes | n | no)
  6875. { echo "configure: error: *** You must supply a directory to --with-tcltk-includes." 1>&2; exit 1; }
  6876. ;;
  6877. esac
  6878. echo "$ac_t""$with_tcltk_includes" 1>&6
  6879. if test -n "$with_tcltk_includes" ; then
  6880. for dir in $with_tcltk_includes; do
  6881. if test -d "$dir"; then
  6882. TCLINCDIR="$TCLINCDIR -I$dir"
  6883. else
  6884. { echo "configure: error: *** Tcl/Tk includes directory $dir does not exist." 1>&2; exit 1; }
  6885. fi
  6886. done
  6887. fi
  6888. ac_save_cppflags="$CPPFLAGS"
  6889. CPPFLAGS="$TCLINCDIR $CPPFLAGS"
  6890. for ac_hdr in tcl.h
  6891. do
  6892. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6893. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6894. echo "configure:8326: checking for $ac_hdr" >&5
  6895. cat > conftest.$ac_ext <<EOF
  6896. #line 8329 "configure"
  6897. #include "confdefs.h"
  6898. #include <$ac_hdr>
  6899. EOF
  6900. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6901. { (eval echo configure:8334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6902. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6903. if test -z "$ac_err"; then
  6904. rm -rf conftest*
  6905. eval "ac_cv_header_$ac_safe=yes"
  6906. else
  6907. echo "$ac_err" >&5
  6908. echo "configure: failed program was:" >&5
  6909. cat conftest.$ac_ext >&5
  6910. rm -rf conftest*
  6911. eval "ac_cv_header_$ac_safe=no"
  6912. fi
  6913. rm -f conftest*
  6914. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6915. echo "$ac_t""yes" 1>&6
  6916. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6917. cat >> confdefs.h <<EOF
  6918. #define $ac_tr_hdr 1
  6919. EOF
  6920. else
  6921. echo "$ac_t""no" 1>&6
  6922. { echo "configure: error: *** Unable to locate Tcl includes." 1>&2; exit 1; }
  6923. fi
  6924. done
  6925. CPPFLAGS=$ac_save_cppflags
  6926. ac_save_cppflags="$CPPFLAGS"
  6927. CPPFLAGS="$TCLINCDIR $X_CFLAGS $CPPFLAGS"
  6928. for ac_hdr in tk.h
  6929. do
  6930. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6931. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6932. echo "configure:8371: checking for $ac_hdr" >&5
  6933. cat > conftest.$ac_ext <<EOF
  6934. #line 8374 "configure"
  6935. #include "confdefs.h"
  6936. #include <$ac_hdr>
  6937. EOF
  6938. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6939. { (eval echo configure:8379: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6940. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6941. if test -z "$ac_err"; then
  6942. rm -rf conftest*
  6943. eval "ac_cv_header_$ac_safe=yes"
  6944. else
  6945. echo "$ac_err" >&5
  6946. echo "configure: failed program was:" >&5
  6947. cat conftest.$ac_ext >&5
  6948. rm -rf conftest*
  6949. eval "ac_cv_header_$ac_safe=no"
  6950. fi
  6951. rm -f conftest*
  6952. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6953. echo "$ac_t""yes" 1>&6
  6954. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6955. cat >> confdefs.h <<EOF
  6956. #define $ac_tr_hdr 1
  6957. EOF
  6958. else
  6959. echo "$ac_t""no" 1>&6
  6960. { echo "configure: error: *** Unable to locate Tk includes." 1>&2; exit 1; }
  6961. fi
  6962. done
  6963. CPPFLAGS=$ac_save_cppflags
  6964. # Tcl/Tk version checks
  6965. echo $ac_n "checking Tcl version""... $ac_c" 1>&6
  6966. echo "configure:8413: checking Tcl version" >&5
  6967. ac_save_cppflags="$CPPFLAGS"
  6968. CPPFLAGS="$TCLINCDIR $CPPFLAGS"
  6969. if test "$cross_compiling" = yes; then
  6970. tcl_ver=UNKNOWN
  6971. echo "$ac_t""unknown (cross-compiling)" 1>&6
  6972. else
  6973. cat > conftest.$ac_ext <<EOF
  6974. #line 8421 "configure"
  6975. #include "confdefs.h"
  6976. #include <stdio.h>
  6977. #include <tcl.h>
  6978. int main(void) {
  6979. FILE *fp = fopen("conftestdata","w");
  6980. fputs(TCL_VERSION, fp);
  6981. return 0;
  6982. }
  6983. EOF
  6984. if { (eval echo configure:8433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  6985. then
  6986. tcl_ver=`cat conftestdata`
  6987. echo "$ac_t""$tcl_ver" 1>&6
  6988. else
  6989. echo "configure: failed program was:" >&5
  6990. cat conftest.$ac_ext >&5
  6991. rm -fr conftest*
  6992. { echo "configure: error: *** Could not determine Tcl version." 1>&2; exit 1; }
  6993. fi
  6994. rm -fr conftest*
  6995. fi
  6996. CPPFLAGS=$ac_save_cppflags
  6997. echo $ac_n "checking Tk version""... $ac_c" 1>&6
  6998. echo "configure:8451: checking Tk version" >&5
  6999. ac_save_cppflags="$CPPFLAGS"
  7000. CPPFLAGS="$TCLINCDIR $X_CFLAGS $CPPFLAGS"
  7001. if test "$cross_compiling" = yes; then
  7002. tk_ver=UNKNOWN
  7003. echo "$ac_t""unknown (cross-compiling)" 1>&6
  7004. else
  7005. cat > conftest.$ac_ext <<EOF
  7006. #line 8459 "configure"
  7007. #include "confdefs.h"
  7008. #include <stdio.h>
  7009. #include <tk.h>
  7010. int main(void) {
  7011. FILE *fp = fopen("conftestdata","w");
  7012. fputs(TK_VERSION, fp);
  7013. return 0;
  7014. }
  7015. EOF
  7016. if { (eval echo configure:8471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  7017. then
  7018. tk_ver=`cat conftestdata`
  7019. echo "$ac_t""$tk_ver" 1>&6
  7020. else
  7021. echo "configure: failed program was:" >&5
  7022. cat conftest.$ac_ext >&5
  7023. rm -fr conftest*
  7024. { echo "configure: error: *** Could not determine Tk version." 1>&2; exit 1; }
  7025. fi
  7026. rm -fr conftest*
  7027. fi
  7028. CPPFLAGS=$ac_save_cppflags
  7029. if test "$tcl_ver" = "$tk_ver" ; then
  7030. tcltk_ver=$tcl_ver
  7031. else
  7032. { echo "configure: error: *** Tcl/Tk version mismatch." 1>&2; exit 1; }
  7033. fi
  7034. # FreeBSD and CygWin don't have a "dot" between major/minor version number
  7035. tcltk_ver2=`echo $tcltk_ver | sed 's/\.//g'`
  7036. # With Tcl/Tk library directory
  7037. echo $ac_n "checking for location of Tcl/Tk library""... $ac_c" 1>&6
  7038. echo "configure:8500: checking for location of Tcl/Tk library" >&5
  7039. case "$with_tcltk_libs" in
  7040. y | ye | yes | n | no)
  7041. { echo "configure: error: *** You must supply a directory to --with-tcltk-libs." 1>&2; exit 1; }
  7042. ;;
  7043. esac
  7044. echo "$ac_t""$with_tcltk_libs" 1>&6
  7045. if test -n "$with_tcltk_libs"; then
  7046. for dir in $with_tcltk_libs; do
  7047. if test -d "$dir"; then
  7048. TCLTKLIBPATH="$TCLTKLIBPATH -L$dir"
  7049. else
  7050. { echo "configure: error: *** Tcl/Tk library directory $dir does not exist." 1>&2; exit 1; }
  7051. fi
  7052. done
  7053. fi
  7054. TCLLIB=
  7055. TKLIB=
  7056. ac_save_ldflags="$LDFLAGS"
  7057. LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
  7058. echo $ac_n "checking for Tcl_Init in -ltcl""... $ac_c" 1>&6
  7059. echo "configure:8530: checking for Tcl_Init in -ltcl" >&5
  7060. ac_lib_var=`echo tcl'_'Tcl_Init | sed 'y%./+-%__p_%'`
  7061. ac_save_LIBS="$LIBS"
  7062. LIBS="-ltcl $MATHLIB $LIBS"
  7063. cat > conftest.$ac_ext <<EOF
  7064. #line 8536 "configure"
  7065. #include "confdefs.h"
  7066. /* Override any gcc2 internal prototype to avoid an error. */
  7067. /* We use char because int might match the return type of a gcc2
  7068. builtin and then its argument prototype would still apply. */
  7069. char Tcl_Init();
  7070. int main() {
  7071. Tcl_Init()
  7072. ; return 0; }
  7073. EOF
  7074. if { (eval echo configure:8547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7075. rm -rf conftest*
  7076. eval "ac_cv_lib_$ac_lib_var=yes"
  7077. else
  7078. echo "configure: failed program was:" >&5
  7079. cat conftest.$ac_ext >&5
  7080. rm -rf conftest*
  7081. eval "ac_cv_lib_$ac_lib_var=no"
  7082. fi
  7083. rm -f conftest*
  7084. LIBS="$ac_save_LIBS"
  7085. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7086. echo "$ac_t""yes" 1>&6
  7087. TCLLIB="$TCLLIB -ltcl $MATHLIB"
  7088. else
  7089. echo "$ac_t""no" 1>&6
  7090. echo $ac_n "checking for Tcl_Init in -ltcl""... $ac_c" 1>&6
  7091. echo "configure:8566: checking for Tcl_Init in -ltcl" >&5
  7092. ac_lib_var=`echo tcl'_'Tcl_Init | sed 'y%./+-%__p_%'`
  7093. ac_save_LIBS="$LIBS"
  7094. LIBS="-ltcl $MATHLIB $DLLIB $LIBS"
  7095. cat > conftest.$ac_ext <<EOF
  7096. #line 8572 "configure"
  7097. #include "confdefs.h"
  7098. /* Override any gcc2 internal prototype to avoid an error. */
  7099. /* We use char because int might match the return type of a gcc2
  7100. builtin and then its argument prototype would still apply. */
  7101. char Tcl_Init();
  7102. int main() {
  7103. Tcl_Init()
  7104. ; return 0; }
  7105. EOF
  7106. if { (eval echo configure:8583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7107. rm -rf conftest*
  7108. eval "ac_cv_lib_$ac_lib_var=yes"
  7109. else
  7110. echo "configure: failed program was:" >&5
  7111. cat conftest.$ac_ext >&5
  7112. rm -rf conftest*
  7113. eval "ac_cv_lib_$ac_lib_var=no"
  7114. fi
  7115. rm -f conftest*
  7116. LIBS="$ac_save_LIBS"
  7117. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7118. echo "$ac_t""yes" 1>&6
  7119. TCLLIB="$TCLLIB -ltcl $MATHLIB $DLLIB"
  7120. else
  7121. echo "$ac_t""no" 1>&6
  7122. LDFLAGS=${ac_save_ldflags}
  7123. ac_save_ldflags="$LDFLAGS"
  7124. LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
  7125. echo $ac_n "checking for Tcl_Init in -ltcl$tcltk_ver""... $ac_c" 1>&6
  7126. echo "configure:8610: checking for Tcl_Init in -ltcl$tcltk_ver" >&5
  7127. ac_lib_var=`echo tcl$tcltk_ver'_'Tcl_Init | sed 'y%./+-%__p_%'`
  7128. ac_save_LIBS="$LIBS"
  7129. LIBS="-ltcl$tcltk_ver $MATHLIB $LIBS"
  7130. cat > conftest.$ac_ext <<EOF
  7131. #line 8616 "configure"
  7132. #include "confdefs.h"
  7133. /* Override any gcc2 internal prototype to avoid an error. */
  7134. /* We use char because int might match the return type of a gcc2
  7135. builtin and then its argument prototype would still apply. */
  7136. char Tcl_Init();
  7137. int main() {
  7138. Tcl_Init()
  7139. ; return 0; }
  7140. EOF
  7141. if { (eval echo configure:8627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7142. rm -rf conftest*
  7143. eval "ac_cv_lib_$ac_lib_var=yes"
  7144. else
  7145. echo "configure: failed program was:" >&5
  7146. cat conftest.$ac_ext >&5
  7147. rm -rf conftest*
  7148. eval "ac_cv_lib_$ac_lib_var=no"
  7149. fi
  7150. rm -f conftest*
  7151. LIBS="$ac_save_LIBS"
  7152. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7153. echo "$ac_t""yes" 1>&6
  7154. TCLLIB="$TCLLIB -ltcl$tcltk_ver $MATHLIB"
  7155. else
  7156. echo "$ac_t""no" 1>&6
  7157. echo $ac_n "checking for Tcl_Init in -ltcl$tcltk_ver""... $ac_c" 1>&6
  7158. echo "configure:8646: checking for Tcl_Init in -ltcl$tcltk_ver" >&5
  7159. ac_lib_var=`echo tcl$tcltk_ver'_'Tcl_Init | sed 'y%./+-%__p_%'`
  7160. ac_save_LIBS="$LIBS"
  7161. LIBS="-ltcl$tcltk_ver $MATHLIB $DLLIB $LIBS"
  7162. cat > conftest.$ac_ext <<EOF
  7163. #line 8652 "configure"
  7164. #include "confdefs.h"
  7165. /* Override any gcc2 internal prototype to avoid an error. */
  7166. /* We use char because int might match the return type of a gcc2
  7167. builtin and then its argument prototype would still apply. */
  7168. char Tcl_Init();
  7169. int main() {
  7170. Tcl_Init()
  7171. ; return 0; }
  7172. EOF
  7173. if { (eval echo configure:8663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7174. rm -rf conftest*
  7175. eval "ac_cv_lib_$ac_lib_var=yes"
  7176. else
  7177. echo "configure: failed program was:" >&5
  7178. cat conftest.$ac_ext >&5
  7179. rm -rf conftest*
  7180. eval "ac_cv_lib_$ac_lib_var=no"
  7181. fi
  7182. rm -f conftest*
  7183. LIBS="$ac_save_LIBS"
  7184. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7185. echo "$ac_t""yes" 1>&6
  7186. TCLLIB="$TCLLIB -ltcl$tcltk_ver $MATHLIB $DLLIB"
  7187. else
  7188. echo "$ac_t""no" 1>&6
  7189. LDFLAGS=${ac_save_ldflags}
  7190. ac_save_ldflags="$LDFLAGS"
  7191. LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
  7192. echo $ac_n "checking for Tcl_Init in -ltcl$tcltk_ver2""... $ac_c" 1>&6
  7193. echo "configure:8690: checking for Tcl_Init in -ltcl$tcltk_ver2" >&5
  7194. ac_lib_var=`echo tcl$tcltk_ver2'_'Tcl_Init | sed 'y%./+-%__p_%'`
  7195. ac_save_LIBS="$LIBS"
  7196. LIBS="-ltcl$tcltk_ver2 $MATHLIB $LIBS"
  7197. cat > conftest.$ac_ext <<EOF
  7198. #line 8696 "configure"
  7199. #include "confdefs.h"
  7200. /* Override any gcc2 internal prototype to avoid an error. */
  7201. /* We use char because int might match the return type of a gcc2
  7202. builtin and then its argument prototype would still apply. */
  7203. char Tcl_Init();
  7204. int main() {
  7205. Tcl_Init()
  7206. ; return 0; }
  7207. EOF
  7208. if { (eval echo configure:8707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7209. rm -rf conftest*
  7210. eval "ac_cv_lib_$ac_lib_var=yes"
  7211. else
  7212. echo "configure: failed program was:" >&5
  7213. cat conftest.$ac_ext >&5
  7214. rm -rf conftest*
  7215. eval "ac_cv_lib_$ac_lib_var=no"
  7216. fi
  7217. rm -f conftest*
  7218. LIBS="$ac_save_LIBS"
  7219. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7220. echo "$ac_t""yes" 1>&6
  7221. TCLLIB="$TCLLIB -ltcl$tcltk_ver2 $MATHLIB"
  7222. else
  7223. echo "$ac_t""no" 1>&6
  7224. echo $ac_n "checking for Tcl_Init in -ltcl$tcltk_ver2""... $ac_c" 1>&6
  7225. echo "configure:8726: checking for Tcl_Init in -ltcl$tcltk_ver2" >&5
  7226. ac_lib_var=`echo tcl$tcltk_ver2'_'Tcl_Init | sed 'y%./+-%__p_%'`
  7227. ac_save_LIBS="$LIBS"
  7228. LIBS="-ltcl$tcltk_ver2 $MATHLIB $DLLIB $LIBS"
  7229. cat > conftest.$ac_ext <<EOF
  7230. #line 8732 "configure"
  7231. #include "confdefs.h"
  7232. /* Override any gcc2 internal prototype to avoid an error. */
  7233. /* We use char because int might match the return type of a gcc2
  7234. builtin and then its argument prototype would still apply. */
  7235. char Tcl_Init();
  7236. int main() {
  7237. Tcl_Init()
  7238. ; return 0; }
  7239. EOF
  7240. if { (eval echo configure:8743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7241. rm -rf conftest*
  7242. eval "ac_cv_lib_$ac_lib_var=yes"
  7243. else
  7244. echo "configure: failed program was:" >&5
  7245. cat conftest.$ac_ext >&5
  7246. rm -rf conftest*
  7247. eval "ac_cv_lib_$ac_lib_var=no"
  7248. fi
  7249. rm -f conftest*
  7250. LIBS="$ac_save_LIBS"
  7251. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7252. echo "$ac_t""yes" 1>&6
  7253. TCLLIB="$TCLLIB -ltcl$tcltk_ver2 $MATHLIB $DLLIB"
  7254. else
  7255. echo "$ac_t""no" 1>&6
  7256. LDFLAGS=${ac_save_ldflags}
  7257. { echo "configure: error: *** Unable to locate Tcl library." 1>&2; exit 1; }
  7258. fi
  7259. fi
  7260. LDFLAGS=${ac_save_ldflags}
  7261. fi
  7262. fi
  7263. LDFLAGS=${ac_save_ldflags}
  7264. fi
  7265. fi
  7266. LDFLAGS=${ac_save_ldflags}
  7267. ac_save_ldflags="$LDFLAGS"
  7268. LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
  7269. echo $ac_n "checking for Tk_MainWindow in -ltk""... $ac_c" 1>&6
  7270. echo "configure:8821: checking for Tk_MainWindow in -ltk" >&5
  7271. ac_lib_var=`echo tk'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
  7272. ac_save_LIBS="$LIBS"
  7273. LIBS="-ltk $TCLLIB $MATHLIB $LIBS"
  7274. cat > conftest.$ac_ext <<EOF
  7275. #line 8827 "configure"
  7276. #include "confdefs.h"
  7277. /* Override any gcc2 internal prototype to avoid an error. */
  7278. /* We use char because int might match the return type of a gcc2
  7279. builtin and then its argument prototype would still apply. */
  7280. char Tk_MainWindow();
  7281. int main() {
  7282. Tk_MainWindow()
  7283. ; return 0; }
  7284. EOF
  7285. if { (eval echo configure:8838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7286. rm -rf conftest*
  7287. eval "ac_cv_lib_$ac_lib_var=yes"
  7288. else
  7289. echo "configure: failed program was:" >&5
  7290. cat conftest.$ac_ext >&5
  7291. rm -rf conftest*
  7292. eval "ac_cv_lib_$ac_lib_var=no"
  7293. fi
  7294. rm -f conftest*
  7295. LIBS="$ac_save_LIBS"
  7296. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7297. echo "$ac_t""yes" 1>&6
  7298. TKLIB="$TKLIB -ltk $MATHLIB"
  7299. else
  7300. echo "$ac_t""no" 1>&6
  7301. echo $ac_n "checking for Tk_MainWindow in -ltk""... $ac_c" 1>&6
  7302. echo "configure:8857: checking for Tk_MainWindow in -ltk" >&5
  7303. ac_lib_var=`echo tk'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
  7304. ac_save_LIBS="$LIBS"
  7305. LIBS="-ltk $TCLLIB $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
  7306. cat > conftest.$ac_ext <<EOF
  7307. #line 8863 "configure"
  7308. #include "confdefs.h"
  7309. /* Override any gcc2 internal prototype to avoid an error. */
  7310. /* We use char because int might match the return type of a gcc2
  7311. builtin and then its argument prototype would still apply. */
  7312. char Tk_MainWindow();
  7313. int main() {
  7314. Tk_MainWindow()
  7315. ; return 0; }
  7316. EOF
  7317. if { (eval echo configure:8874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7318. rm -rf conftest*
  7319. eval "ac_cv_lib_$ac_lib_var=yes"
  7320. else
  7321. echo "configure: failed program was:" >&5
  7322. cat conftest.$ac_ext >&5
  7323. rm -rf conftest*
  7324. eval "ac_cv_lib_$ac_lib_var=no"
  7325. fi
  7326. rm -f conftest*
  7327. LIBS="$ac_save_LIBS"
  7328. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7329. echo "$ac_t""yes" 1>&6
  7330. TKLIB="$TKLIB -ltk $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
  7331. else
  7332. echo "$ac_t""no" 1>&6
  7333. LDFLAGS=${ac_save_ldflags}
  7334. ac_save_ldflags="$LDFLAGS"
  7335. LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
  7336. echo $ac_n "checking for Tk_MainWindow in -ltk$tcltk_ver""... $ac_c" 1>&6
  7337. echo "configure:8901: checking for Tk_MainWindow in -ltk$tcltk_ver" >&5
  7338. ac_lib_var=`echo tk$tcltk_ver'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
  7339. ac_save_LIBS="$LIBS"
  7340. LIBS="-ltk$tcltk_ver $TCLLIB $MATHLIB $LIBS"
  7341. cat > conftest.$ac_ext <<EOF
  7342. #line 8907 "configure"
  7343. #include "confdefs.h"
  7344. /* Override any gcc2 internal prototype to avoid an error. */
  7345. /* We use char because int might match the return type of a gcc2
  7346. builtin and then its argument prototype would still apply. */
  7347. char Tk_MainWindow();
  7348. int main() {
  7349. Tk_MainWindow()
  7350. ; return 0; }
  7351. EOF
  7352. if { (eval echo configure:8918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7353. rm -rf conftest*
  7354. eval "ac_cv_lib_$ac_lib_var=yes"
  7355. else
  7356. echo "configure: failed program was:" >&5
  7357. cat conftest.$ac_ext >&5
  7358. rm -rf conftest*
  7359. eval "ac_cv_lib_$ac_lib_var=no"
  7360. fi
  7361. rm -f conftest*
  7362. LIBS="$ac_save_LIBS"
  7363. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7364. echo "$ac_t""yes" 1>&6
  7365. TKLIB="$TKLIB -ltk$tcltk_ver $MATHLIB"
  7366. else
  7367. echo "$ac_t""no" 1>&6
  7368. echo $ac_n "checking for Tk_MainWindow in -ltk$tcltk_ver""... $ac_c" 1>&6
  7369. echo "configure:8937: checking for Tk_MainWindow in -ltk$tcltk_ver" >&5
  7370. ac_lib_var=`echo tk$tcltk_ver'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
  7371. ac_save_LIBS="$LIBS"
  7372. LIBS="-ltk$tcltk_ver $TCLLIB $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
  7373. cat > conftest.$ac_ext <<EOF
  7374. #line 8943 "configure"
  7375. #include "confdefs.h"
  7376. /* Override any gcc2 internal prototype to avoid an error. */
  7377. /* We use char because int might match the return type of a gcc2
  7378. builtin and then its argument prototype would still apply. */
  7379. char Tk_MainWindow();
  7380. int main() {
  7381. Tk_MainWindow()
  7382. ; return 0; }
  7383. EOF
  7384. if { (eval echo configure:8954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7385. rm -rf conftest*
  7386. eval "ac_cv_lib_$ac_lib_var=yes"
  7387. else
  7388. echo "configure: failed program was:" >&5
  7389. cat conftest.$ac_ext >&5
  7390. rm -rf conftest*
  7391. eval "ac_cv_lib_$ac_lib_var=no"
  7392. fi
  7393. rm -f conftest*
  7394. LIBS="$ac_save_LIBS"
  7395. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7396. echo "$ac_t""yes" 1>&6
  7397. TKLIB="$TKLIB -ltk$tcltk_ver $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
  7398. else
  7399. echo "$ac_t""no" 1>&6
  7400. LDFLAGS=${ac_save_ldflags}
  7401. ac_save_ldflags="$LDFLAGS"
  7402. LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
  7403. echo $ac_n "checking for Tk_MainWindow in -ltk$tcltk_ver2""... $ac_c" 1>&6
  7404. echo "configure:8981: checking for Tk_MainWindow in -ltk$tcltk_ver2" >&5
  7405. ac_lib_var=`echo tk$tcltk_ver2'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
  7406. ac_save_LIBS="$LIBS"
  7407. LIBS="-ltk$tcltk_ver2 $TCLLIB $MATHLIB $LIBS"
  7408. cat > conftest.$ac_ext <<EOF
  7409. #line 8987 "configure"
  7410. #include "confdefs.h"
  7411. /* Override any gcc2 internal prototype to avoid an error. */
  7412. /* We use char because int might match the return type of a gcc2
  7413. builtin and then its argument prototype would still apply. */
  7414. char Tk_MainWindow();
  7415. int main() {
  7416. Tk_MainWindow()
  7417. ; return 0; }
  7418. EOF
  7419. if { (eval echo configure:8998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7420. rm -rf conftest*
  7421. eval "ac_cv_lib_$ac_lib_var=yes"
  7422. else
  7423. echo "configure: failed program was:" >&5
  7424. cat conftest.$ac_ext >&5
  7425. rm -rf conftest*
  7426. eval "ac_cv_lib_$ac_lib_var=no"
  7427. fi
  7428. rm -f conftest*
  7429. LIBS="$ac_save_LIBS"
  7430. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7431. echo "$ac_t""yes" 1>&6
  7432. TKLIB="$TKLIB -ltk$tcltk_ver2 $MATHLIB"
  7433. else
  7434. echo "$ac_t""no" 1>&6
  7435. echo $ac_n "checking for Tk_MainWindow in -ltk$tcltk_ver2""... $ac_c" 1>&6
  7436. echo "configure:9017: checking for Tk_MainWindow in -ltk$tcltk_ver2" >&5
  7437. ac_lib_var=`echo tk$tcltk_ver2'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
  7438. ac_save_LIBS="$LIBS"
  7439. LIBS="-ltk$tcltk_ver2 $TCLLIB $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
  7440. cat > conftest.$ac_ext <<EOF
  7441. #line 9023 "configure"
  7442. #include "confdefs.h"
  7443. /* Override any gcc2 internal prototype to avoid an error. */
  7444. /* We use char because int might match the return type of a gcc2
  7445. builtin and then its argument prototype would still apply. */
  7446. char Tk_MainWindow();
  7447. int main() {
  7448. Tk_MainWindow()
  7449. ; return 0; }
  7450. EOF
  7451. if { (eval echo configure:9034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7452. rm -rf conftest*
  7453. eval "ac_cv_lib_$ac_lib_var=yes"
  7454. else
  7455. echo "configure: failed program was:" >&5
  7456. cat conftest.$ac_ext >&5
  7457. rm -rf conftest*
  7458. eval "ac_cv_lib_$ac_lib_var=no"
  7459. fi
  7460. rm -f conftest*
  7461. LIBS="$ac_save_LIBS"
  7462. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7463. echo "$ac_t""yes" 1>&6
  7464. TKLIB="$TKLIB -ltk$tcltk_ver2 $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
  7465. else
  7466. echo "$ac_t""no" 1>&6
  7467. LDFLAGS=${ac_save_ldflags}
  7468. { echo "configure: error: *** Unable to locate Tk library." 1>&2; exit 1; }
  7469. fi
  7470. fi
  7471. LDFLAGS=${ac_save_ldflags}
  7472. fi
  7473. fi
  7474. LDFLAGS=${ac_save_ldflags}
  7475. fi
  7476. fi
  7477. LDFLAGS=${ac_save_ldflags}
  7478. TCLTKLIBS="$TKLIB $TCLLIB"
  7479. cat >> confdefs.h <<\EOF
  7480. #define HAVE_TCLTK 1
  7481. EOF
  7482. fi # $USE_TCLTK
  7483. TKINCDIR=$TCLINCDIR
  7484. # Done checking Tcl/Tk
  7485. # Enable PostgreSQL option
  7486. echo $ac_n "checking whether to use PostgreSQL""... $ac_c" 1>&6
  7487. echo "configure:9126: checking whether to use PostgreSQL" >&5
  7488. echo "$ac_t"""$with_postgres"" 1>&6
  7489. case "$with_postgres" in
  7490. "no") USE_POSTGRES= ;;
  7491. "yes") USE_POSTGRES="1" ;;
  7492. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  7493. esac
  7494. if test -n "$USE_POSTGRES"; then
  7495. cat >> confdefs.h <<\EOF
  7496. #define HAVE_POSTGRES 1
  7497. EOF
  7498. fi # $USE_POSTGRES
  7499. PQINCPATH=
  7500. PQLIBPATH=
  7501. PQLIB=
  7502. if test -n "$USE_POSTGRES"; then
  7503. # With PostgreSQL includes directory
  7504. echo $ac_n "checking for location of PostgreSQL includes""... $ac_c" 1>&6
  7505. echo "configure:9153: checking for location of PostgreSQL includes" >&5
  7506. case "$with_postgres_includes" in
  7507. y | ye | yes | n | no)
  7508. { echo "configure: error: *** You must supply a directory to --with-postgres-includes." 1>&2; exit 1; }
  7509. ;;
  7510. esac
  7511. echo "$ac_t""$with_postgres_includes" 1>&6
  7512. if test -n "$with_postgres_includes" ; then
  7513. for dir in $with_postgres_includes; do
  7514. if test -d "$dir"; then
  7515. PQINCPATH="$PQINCPATH -I$dir"
  7516. else
  7517. { echo "configure: error: *** PostgreSQL includes directory $dir does not exist." 1>&2; exit 1; }
  7518. fi
  7519. done
  7520. fi
  7521. ac_save_cppflags="$CPPFLAGS"
  7522. CPPFLAGS="$PQINCPATH $CPPFLAGS"
  7523. for ac_hdr in libpq-fe.h
  7524. do
  7525. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  7526. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  7527. echo "configure:9179: checking for $ac_hdr" >&5
  7528. cat > conftest.$ac_ext <<EOF
  7529. #line 9182 "configure"
  7530. #include "confdefs.h"
  7531. #include <$ac_hdr>
  7532. EOF
  7533. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  7534. { (eval echo configure:9187: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  7535. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  7536. if test -z "$ac_err"; then
  7537. rm -rf conftest*
  7538. eval "ac_cv_header_$ac_safe=yes"
  7539. else
  7540. echo "$ac_err" >&5
  7541. echo "configure: failed program was:" >&5
  7542. cat conftest.$ac_ext >&5
  7543. rm -rf conftest*
  7544. eval "ac_cv_header_$ac_safe=no"
  7545. fi
  7546. rm -f conftest*
  7547. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  7548. echo "$ac_t""yes" 1>&6
  7549. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  7550. cat >> confdefs.h <<EOF
  7551. #define $ac_tr_hdr 1
  7552. EOF
  7553. else
  7554. echo "$ac_t""no" 1>&6
  7555. { echo "configure: error: *** Unable to locate PostgreSQL includes." 1>&2; exit 1; }
  7556. fi
  7557. done
  7558. CPPFLAGS=$ac_save_cppflags
  7559. fi # $USE_POSTGRES
  7560. if test -n "$USE_POSTGRES"; then
  7561. # With PostgreSQL library directory
  7562. echo $ac_n "checking for location of PostgreSQL library""... $ac_c" 1>&6
  7563. echo "configure:9225: checking for location of PostgreSQL library" >&5
  7564. case "$with_postgres_libs" in
  7565. y | ye | yes | n | no)
  7566. { echo "configure: error: *** You must supply a directory to --with-postgres-libs." 1>&2; exit 1; }
  7567. ;;
  7568. esac
  7569. echo "$ac_t""$with_postgres_libs" 1>&6
  7570. if test -n "$with_postgres_libs"; then
  7571. for dir in $with_postgres_libs; do
  7572. if test -d "$dir"; then
  7573. PQLIBPATH="$PQLIBPATH -L$dir"
  7574. else
  7575. { echo "configure: error: *** PostgreSQL library directory $dir does not exist." 1>&2; exit 1; }
  7576. fi
  7577. done
  7578. fi
  7579. ac_save_ldflags="$LDFLAGS"
  7580. LDFLAGS="$PQLIBPATH $LDFLAGS"
  7581. echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
  7582. echo "configure:9254: checking for PQsetdbLogin in -lpq" >&5
  7583. ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
  7584. ac_save_LIBS="$LIBS"
  7585. LIBS="-lpq $LIBS"
  7586. cat > conftest.$ac_ext <<EOF
  7587. #line 9260 "configure"
  7588. #include "confdefs.h"
  7589. /* Override any gcc2 internal prototype to avoid an error. */
  7590. /* We use char because int might match the return type of a gcc2
  7591. builtin and then its argument prototype would still apply. */
  7592. char PQsetdbLogin();
  7593. int main() {
  7594. PQsetdbLogin()
  7595. ; return 0; }
  7596. EOF
  7597. if { (eval echo configure:9271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7598. rm -rf conftest*
  7599. eval "ac_cv_lib_$ac_lib_var=yes"
  7600. else
  7601. echo "configure: failed program was:" >&5
  7602. cat conftest.$ac_ext >&5
  7603. rm -rf conftest*
  7604. eval "ac_cv_lib_$ac_lib_var=no"
  7605. fi
  7606. rm -f conftest*
  7607. LIBS="$ac_save_LIBS"
  7608. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7609. echo "$ac_t""yes" 1>&6
  7610. PQLIB="$PQLIB -lpq "
  7611. else
  7612. echo "$ac_t""no" 1>&6
  7613. echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
  7614. echo "configure:9290: checking for PQsetdbLogin in -lpq" >&5
  7615. ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
  7616. ac_save_LIBS="$LIBS"
  7617. LIBS="-lpq -lssl -lcrypto $LIBS"
  7618. cat > conftest.$ac_ext <<EOF
  7619. #line 9296 "configure"
  7620. #include "confdefs.h"
  7621. /* Override any gcc2 internal prototype to avoid an error. */
  7622. /* We use char because int might match the return type of a gcc2
  7623. builtin and then its argument prototype would still apply. */
  7624. char PQsetdbLogin();
  7625. int main() {
  7626. PQsetdbLogin()
  7627. ; return 0; }
  7628. EOF
  7629. if { (eval echo configure:9307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7630. rm -rf conftest*
  7631. eval "ac_cv_lib_$ac_lib_var=yes"
  7632. else
  7633. echo "configure: failed program was:" >&5
  7634. cat conftest.$ac_ext >&5
  7635. rm -rf conftest*
  7636. eval "ac_cv_lib_$ac_lib_var=no"
  7637. fi
  7638. rm -f conftest*
  7639. LIBS="$ac_save_LIBS"
  7640. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7641. echo "$ac_t""yes" 1>&6
  7642. PQLIB="$PQLIB -lpq -lssl -lcrypto"
  7643. else
  7644. echo "$ac_t""no" 1>&6
  7645. echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
  7646. echo "configure:9326: checking for PQsetdbLogin in -lpq" >&5
  7647. ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
  7648. ac_save_LIBS="$LIBS"
  7649. LIBS="-lpq -lcrypt $LIBS"
  7650. cat > conftest.$ac_ext <<EOF
  7651. #line 9332 "configure"
  7652. #include "confdefs.h"
  7653. /* Override any gcc2 internal prototype to avoid an error. */
  7654. /* We use char because int might match the return type of a gcc2
  7655. builtin and then its argument prototype would still apply. */
  7656. char PQsetdbLogin();
  7657. int main() {
  7658. PQsetdbLogin()
  7659. ; return 0; }
  7660. EOF
  7661. if { (eval echo configure:9343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7662. rm -rf conftest*
  7663. eval "ac_cv_lib_$ac_lib_var=yes"
  7664. else
  7665. echo "configure: failed program was:" >&5
  7666. cat conftest.$ac_ext >&5
  7667. rm -rf conftest*
  7668. eval "ac_cv_lib_$ac_lib_var=no"
  7669. fi
  7670. rm -f conftest*
  7671. LIBS="$ac_save_LIBS"
  7672. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7673. echo "$ac_t""yes" 1>&6
  7674. PQLIB="$PQLIB -lpq -lcrypt"
  7675. else
  7676. echo "$ac_t""no" 1>&6
  7677. echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
  7678. echo "configure:9362: checking for PQsetdbLogin in -lpq" >&5
  7679. ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
  7680. ac_save_LIBS="$LIBS"
  7681. LIBS="-lpq -lcrypt -lssl -lcrypto $LIBS"
  7682. cat > conftest.$ac_ext <<EOF
  7683. #line 9368 "configure"
  7684. #include "confdefs.h"
  7685. /* Override any gcc2 internal prototype to avoid an error. */
  7686. /* We use char because int might match the return type of a gcc2
  7687. builtin and then its argument prototype would still apply. */
  7688. char PQsetdbLogin();
  7689. int main() {
  7690. PQsetdbLogin()
  7691. ; return 0; }
  7692. EOF
  7693. if { (eval echo configure:9379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7694. rm -rf conftest*
  7695. eval "ac_cv_lib_$ac_lib_var=yes"
  7696. else
  7697. echo "configure: failed program was:" >&5
  7698. cat conftest.$ac_ext >&5
  7699. rm -rf conftest*
  7700. eval "ac_cv_lib_$ac_lib_var=no"
  7701. fi
  7702. rm -f conftest*
  7703. LIBS="$ac_save_LIBS"
  7704. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7705. echo "$ac_t""yes" 1>&6
  7706. PQLIB="$PQLIB -lpq -lcrypt -lssl -lcrypto"
  7707. else
  7708. echo "$ac_t""no" 1>&6
  7709. LDFLAGS=${ac_save_ldflags}
  7710. { echo "configure: error: *** Unable to locate PostgreSQL library." 1>&2; exit 1; }
  7711. fi
  7712. fi
  7713. fi
  7714. fi
  7715. LDFLAGS=${ac_save_ldflags}
  7716. ac_save_ldflags="$LDFLAGS"
  7717. LDFLAGS="$LDFLAGS $PQLIBPATH"
  7718. echo $ac_n "checking for PQcmdTuples in -lpq""... $ac_c" 1>&6
  7719. echo "configure:9436: checking for PQcmdTuples in -lpq" >&5
  7720. ac_lib_var=`echo pq'_'PQcmdTuples | sed 'y%./+-%__p_%'`
  7721. ac_save_LIBS="$LIBS"
  7722. LIBS="-lpq $LIBS"
  7723. cat > conftest.$ac_ext <<EOF
  7724. #line 9442 "configure"
  7725. #include "confdefs.h"
  7726. /* Override any gcc2 internal prototype to avoid an error. */
  7727. /* We use char because int might match the return type of a gcc2
  7728. builtin and then its argument prototype would still apply. */
  7729. char PQcmdTuples();
  7730. int main() {
  7731. PQcmdTuples()
  7732. ; return 0; }
  7733. EOF
  7734. if { (eval echo configure:9453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7735. rm -rf conftest*
  7736. eval "ac_cv_lib_$ac_lib_var=yes"
  7737. else
  7738. echo "configure: failed program was:" >&5
  7739. cat conftest.$ac_ext >&5
  7740. rm -rf conftest*
  7741. eval "ac_cv_lib_$ac_lib_var=no"
  7742. fi
  7743. rm -f conftest*
  7744. LIBS="$ac_save_LIBS"
  7745. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7746. echo "$ac_t""yes" 1>&6
  7747. cat >> confdefs.h <<\EOF
  7748. #define HAVE_PQCMDTUPLES 1
  7749. EOF
  7750. else
  7751. echo "$ac_t""no" 1>&6
  7752. echo $ac_n "checking for PQcmdTuples in -lpq""... $ac_c" 1>&6
  7753. echo "configure:9475: checking for PQcmdTuples in -lpq" >&5
  7754. ac_lib_var=`echo pq'_'PQcmdTuples | sed 'y%./+-%__p_%'`
  7755. ac_save_LIBS="$LIBS"
  7756. LIBS="-lpq -lcrypt $LIBS"
  7757. cat > conftest.$ac_ext <<EOF
  7758. #line 9481 "configure"
  7759. #include "confdefs.h"
  7760. /* Override any gcc2 internal prototype to avoid an error. */
  7761. /* We use char because int might match the return type of a gcc2
  7762. builtin and then its argument prototype would still apply. */
  7763. char PQcmdTuples();
  7764. int main() {
  7765. PQcmdTuples()
  7766. ; return 0; }
  7767. EOF
  7768. if { (eval echo configure:9492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7769. rm -rf conftest*
  7770. eval "ac_cv_lib_$ac_lib_var=yes"
  7771. else
  7772. echo "configure: failed program was:" >&5
  7773. cat conftest.$ac_ext >&5
  7774. rm -rf conftest*
  7775. eval "ac_cv_lib_$ac_lib_var=no"
  7776. fi
  7777. rm -f conftest*
  7778. LIBS="$ac_save_LIBS"
  7779. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7780. echo "$ac_t""yes" 1>&6
  7781. cat >> confdefs.h <<\EOF
  7782. #define HAVE_PQCMDTUPLES 1
  7783. EOF
  7784. else
  7785. echo "$ac_t""no" 1>&6
  7786. fi
  7787. fi
  7788. LDFLAGS=${ac_save_ldflags}
  7789. fi # $USE_POSTGRES
  7790. # Done checking PostgreSQL
  7791. # Enable MySQL option
  7792. echo $ac_n "checking whether to use MySQL""... $ac_c" 1>&6
  7793. echo "configure:9535: checking whether to use MySQL" >&5
  7794. echo "$ac_t"""$with_mysql"" 1>&6
  7795. case "$with_mysql" in
  7796. "no") USE_MYSQL= ;;
  7797. "yes") USE_MYSQL="1" ;;
  7798. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  7799. esac
  7800. MYSQLINCPATH=
  7801. MYSQLLIBPATH=
  7802. MYSQLLIB=
  7803. if test -n "$USE_MYSQL"; then
  7804. # With MySQL includes directory
  7805. echo $ac_n "checking for location of MySQL includes""... $ac_c" 1>&6
  7806. echo "configure:9555: checking for location of MySQL includes" >&5
  7807. case "$with_mysql_includes" in
  7808. y | ye | yes | n | no)
  7809. { echo "configure: error: *** You must supply a directory to --with-mysql-includes." 1>&2; exit 1; }
  7810. ;;
  7811. esac
  7812. echo "$ac_t""$with_mysql_includes" 1>&6
  7813. if test -n "$with_mysql_includes" ; then
  7814. for dir in $with_mysql_includes; do
  7815. if test -d "$dir"; then
  7816. MYSQLINCPATH="$MYSQLINCPATH -I$dir"
  7817. else
  7818. { echo "configure: error: *** MySQL includes directory $dir does not exist." 1>&2; exit 1; }
  7819. fi
  7820. done
  7821. fi
  7822. ac_save_cppflags="$CPPFLAGS"
  7823. CPPFLAGS="$MYSQLINCPATH $CPPFLAGS"
  7824. for ac_hdr in mysql.h
  7825. do
  7826. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  7827. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  7828. echo "configure:9581: checking for $ac_hdr" >&5
  7829. cat > conftest.$ac_ext <<EOF
  7830. #line 9584 "configure"
  7831. #include "confdefs.h"
  7832. #include <$ac_hdr>
  7833. EOF
  7834. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  7835. { (eval echo configure:9589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  7836. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  7837. if test -z "$ac_err"; then
  7838. rm -rf conftest*
  7839. eval "ac_cv_header_$ac_safe=yes"
  7840. else
  7841. echo "$ac_err" >&5
  7842. echo "configure: failed program was:" >&5
  7843. cat conftest.$ac_ext >&5
  7844. rm -rf conftest*
  7845. eval "ac_cv_header_$ac_safe=no"
  7846. fi
  7847. rm -f conftest*
  7848. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  7849. echo "$ac_t""yes" 1>&6
  7850. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  7851. cat >> confdefs.h <<EOF
  7852. #define $ac_tr_hdr 1
  7853. EOF
  7854. else
  7855. echo "$ac_t""no" 1>&6
  7856. { echo "configure: error: *** Unable to locate MySQL includes." 1>&2; exit 1; }
  7857. fi
  7858. done
  7859. CPPFLAGS=$ac_save_cppflags
  7860. fi # $USE_MYSQL
  7861. if test -n "$USE_MYSQL"; then
  7862. # With MySQL library directory
  7863. echo $ac_n "checking for location of MySQL library""... $ac_c" 1>&6
  7864. echo "configure:9626: checking for location of MySQL library" >&5
  7865. case "$with_mysql_libs" in
  7866. y | ye | yes | n | no)
  7867. { echo "configure: error: *** You must supply a directory to --with-mysql-libs." 1>&2; exit 1; }
  7868. ;;
  7869. esac
  7870. echo "$ac_t""$with_mysql_libs" 1>&6
  7871. if test -n "$with_mysql_libs"; then
  7872. for dir in $with_mysql_libs; do
  7873. if test -d "$dir"; then
  7874. MYSQLLIBPATH="$MYSQLLIBPATH -L$dir"
  7875. else
  7876. { echo "configure: error: *** MySQL library directory $dir does not exist." 1>&2; exit 1; }
  7877. fi
  7878. done
  7879. fi
  7880. ac_save_ldflags="$LDFLAGS"
  7881. LDFLAGS="$MYSQLLIBPATH $LDFLAGS"
  7882. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  7883. echo "configure:9657: checking for mysql_query in -lmysqlclient" >&5
  7884. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  7885. ac_save_LIBS="$LIBS"
  7886. LIBS="-lmysqlclient $LIBS"
  7887. cat > conftest.$ac_ext <<EOF
  7888. #line 9663 "configure"
  7889. #include "confdefs.h"
  7890. /* Override any gcc2 internal prototype to avoid an error. */
  7891. /* We use char because int might match the return type of a gcc2
  7892. builtin and then its argument prototype would still apply. */
  7893. char mysql_query();
  7894. int main() {
  7895. mysql_query()
  7896. ; return 0; }
  7897. EOF
  7898. if { (eval echo configure:9674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7899. rm -rf conftest*
  7900. eval "ac_cv_lib_$ac_lib_var=yes"
  7901. else
  7902. echo "configure: failed program was:" >&5
  7903. cat conftest.$ac_ext >&5
  7904. rm -rf conftest*
  7905. eval "ac_cv_lib_$ac_lib_var=no"
  7906. fi
  7907. rm -f conftest*
  7908. LIBS="$ac_save_LIBS"
  7909. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7910. echo "$ac_t""yes" 1>&6
  7911. MYSQLLIB="$MYSQLLIB -lmysqlclient "
  7912. else
  7913. echo "$ac_t""no" 1>&6
  7914. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  7915. echo "configure:9693: checking for mysql_query in -lmysqlclient" >&5
  7916. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  7917. ac_save_LIBS="$LIBS"
  7918. LIBS="-lmysqlclient $MATHLIB $LIBS"
  7919. cat > conftest.$ac_ext <<EOF
  7920. #line 9699 "configure"
  7921. #include "confdefs.h"
  7922. /* Override any gcc2 internal prototype to avoid an error. */
  7923. /* We use char because int might match the return type of a gcc2
  7924. builtin and then its argument prototype would still apply. */
  7925. char mysql_query();
  7926. int main() {
  7927. mysql_query()
  7928. ; return 0; }
  7929. EOF
  7930. if { (eval echo configure:9710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7931. rm -rf conftest*
  7932. eval "ac_cv_lib_$ac_lib_var=yes"
  7933. else
  7934. echo "configure: failed program was:" >&5
  7935. cat conftest.$ac_ext >&5
  7936. rm -rf conftest*
  7937. eval "ac_cv_lib_$ac_lib_var=no"
  7938. fi
  7939. rm -f conftest*
  7940. LIBS="$ac_save_LIBS"
  7941. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7942. echo "$ac_t""yes" 1>&6
  7943. MYSQLLIB="$MYSQLLIB -lmysqlclient $MATHLIB"
  7944. else
  7945. echo "$ac_t""no" 1>&6
  7946. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  7947. echo "configure:9729: checking for mysql_query in -lmysqlclient" >&5
  7948. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  7949. ac_save_LIBS="$LIBS"
  7950. LIBS="-lmysqlclient $SOCKLIB $LIBS"
  7951. cat > conftest.$ac_ext <<EOF
  7952. #line 9735 "configure"
  7953. #include "confdefs.h"
  7954. /* Override any gcc2 internal prototype to avoid an error. */
  7955. /* We use char because int might match the return type of a gcc2
  7956. builtin and then its argument prototype would still apply. */
  7957. char mysql_query();
  7958. int main() {
  7959. mysql_query()
  7960. ; return 0; }
  7961. EOF
  7962. if { (eval echo configure:9746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7963. rm -rf conftest*
  7964. eval "ac_cv_lib_$ac_lib_var=yes"
  7965. else
  7966. echo "configure: failed program was:" >&5
  7967. cat conftest.$ac_ext >&5
  7968. rm -rf conftest*
  7969. eval "ac_cv_lib_$ac_lib_var=no"
  7970. fi
  7971. rm -f conftest*
  7972. LIBS="$ac_save_LIBS"
  7973. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7974. echo "$ac_t""yes" 1>&6
  7975. MYSQLLIB="$MYSQLLIB -lmysqlclient $SOCKLIB"
  7976. else
  7977. echo "$ac_t""no" 1>&6
  7978. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  7979. echo "configure:9765: checking for mysql_query in -lmysqlclient" >&5
  7980. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  7981. ac_save_LIBS="$LIBS"
  7982. LIBS="-lmysqlclient $SOCKLIB $MATHLIB $LIBS"
  7983. cat > conftest.$ac_ext <<EOF
  7984. #line 9771 "configure"
  7985. #include "confdefs.h"
  7986. /* Override any gcc2 internal prototype to avoid an error. */
  7987. /* We use char because int might match the return type of a gcc2
  7988. builtin and then its argument prototype would still apply. */
  7989. char mysql_query();
  7990. int main() {
  7991. mysql_query()
  7992. ; return 0; }
  7993. EOF
  7994. if { (eval echo configure:9782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7995. rm -rf conftest*
  7996. eval "ac_cv_lib_$ac_lib_var=yes"
  7997. else
  7998. echo "configure: failed program was:" >&5
  7999. cat conftest.$ac_ext >&5
  8000. rm -rf conftest*
  8001. eval "ac_cv_lib_$ac_lib_var=no"
  8002. fi
  8003. rm -f conftest*
  8004. LIBS="$ac_save_LIBS"
  8005. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8006. echo "$ac_t""yes" 1>&6
  8007. MYSQLLIB="$MYSQLLIB -lmysqlclient $SOCKLIB $MATHLIB"
  8008. else
  8009. echo "$ac_t""no" 1>&6
  8010. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  8011. echo "configure:9801: checking for mysql_query in -lmysqlclient" >&5
  8012. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  8013. ac_save_LIBS="$LIBS"
  8014. LIBS="-lmysqlclient $ZLIB $LIBS"
  8015. cat > conftest.$ac_ext <<EOF
  8016. #line 9807 "configure"
  8017. #include "confdefs.h"
  8018. /* Override any gcc2 internal prototype to avoid an error. */
  8019. /* We use char because int might match the return type of a gcc2
  8020. builtin and then its argument prototype would still apply. */
  8021. char mysql_query();
  8022. int main() {
  8023. mysql_query()
  8024. ; return 0; }
  8025. EOF
  8026. if { (eval echo configure:9818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8027. rm -rf conftest*
  8028. eval "ac_cv_lib_$ac_lib_var=yes"
  8029. else
  8030. echo "configure: failed program was:" >&5
  8031. cat conftest.$ac_ext >&5
  8032. rm -rf conftest*
  8033. eval "ac_cv_lib_$ac_lib_var=no"
  8034. fi
  8035. rm -f conftest*
  8036. LIBS="$ac_save_LIBS"
  8037. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8038. echo "$ac_t""yes" 1>&6
  8039. MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB"
  8040. else
  8041. echo "$ac_t""no" 1>&6
  8042. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  8043. echo "configure:9837: checking for mysql_query in -lmysqlclient" >&5
  8044. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  8045. ac_save_LIBS="$LIBS"
  8046. LIBS="-lmysqlclient $ZLIB $MATHLIB $LIBS"
  8047. cat > conftest.$ac_ext <<EOF
  8048. #line 9843 "configure"
  8049. #include "confdefs.h"
  8050. /* Override any gcc2 internal prototype to avoid an error. */
  8051. /* We use char because int might match the return type of a gcc2
  8052. builtin and then its argument prototype would still apply. */
  8053. char mysql_query();
  8054. int main() {
  8055. mysql_query()
  8056. ; return 0; }
  8057. EOF
  8058. if { (eval echo configure:9854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8059. rm -rf conftest*
  8060. eval "ac_cv_lib_$ac_lib_var=yes"
  8061. else
  8062. echo "configure: failed program was:" >&5
  8063. cat conftest.$ac_ext >&5
  8064. rm -rf conftest*
  8065. eval "ac_cv_lib_$ac_lib_var=no"
  8066. fi
  8067. rm -f conftest*
  8068. LIBS="$ac_save_LIBS"
  8069. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8070. echo "$ac_t""yes" 1>&6
  8071. MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB $MATHLIB"
  8072. else
  8073. echo "$ac_t""no" 1>&6
  8074. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  8075. echo "configure:9873: checking for mysql_query in -lmysqlclient" >&5
  8076. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  8077. ac_save_LIBS="$LIBS"
  8078. LIBS="-lmysqlclient $ZLIB $SOCKLIB $LIBS"
  8079. cat > conftest.$ac_ext <<EOF
  8080. #line 9879 "configure"
  8081. #include "confdefs.h"
  8082. /* Override any gcc2 internal prototype to avoid an error. */
  8083. /* We use char because int might match the return type of a gcc2
  8084. builtin and then its argument prototype would still apply. */
  8085. char mysql_query();
  8086. int main() {
  8087. mysql_query()
  8088. ; return 0; }
  8089. EOF
  8090. if { (eval echo configure:9890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8091. rm -rf conftest*
  8092. eval "ac_cv_lib_$ac_lib_var=yes"
  8093. else
  8094. echo "configure: failed program was:" >&5
  8095. cat conftest.$ac_ext >&5
  8096. rm -rf conftest*
  8097. eval "ac_cv_lib_$ac_lib_var=no"
  8098. fi
  8099. rm -f conftest*
  8100. LIBS="$ac_save_LIBS"
  8101. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8102. echo "$ac_t""yes" 1>&6
  8103. MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB $SOCKLIB"
  8104. else
  8105. echo "$ac_t""no" 1>&6
  8106. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  8107. echo "configure:9909: checking for mysql_query in -lmysqlclient" >&5
  8108. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  8109. ac_save_LIBS="$LIBS"
  8110. LIBS="-lmysqlclient $ZLIB $SOCKLIB $MATHLIB $LIBS"
  8111. cat > conftest.$ac_ext <<EOF
  8112. #line 9915 "configure"
  8113. #include "confdefs.h"
  8114. /* Override any gcc2 internal prototype to avoid an error. */
  8115. /* We use char because int might match the return type of a gcc2
  8116. builtin and then its argument prototype would still apply. */
  8117. char mysql_query();
  8118. int main() {
  8119. mysql_query()
  8120. ; return 0; }
  8121. EOF
  8122. if { (eval echo configure:9926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8123. rm -rf conftest*
  8124. eval "ac_cv_lib_$ac_lib_var=yes"
  8125. else
  8126. echo "configure: failed program was:" >&5
  8127. cat conftest.$ac_ext >&5
  8128. rm -rf conftest*
  8129. eval "ac_cv_lib_$ac_lib_var=no"
  8130. fi
  8131. rm -f conftest*
  8132. LIBS="$ac_save_LIBS"
  8133. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8134. echo "$ac_t""yes" 1>&6
  8135. MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB $SOCKLIB $MATHLIB"
  8136. else
  8137. echo "$ac_t""no" 1>&6
  8138. LDFLAGS=${ac_save_ldflags}
  8139. { echo "configure: error: *** Unable to locate MySQL library." 1>&2; exit 1; }
  8140. fi
  8141. fi
  8142. fi
  8143. fi
  8144. fi
  8145. fi
  8146. fi
  8147. fi
  8148. LDFLAGS=${ac_save_ldflags}
  8149. # Check for libmysqld (for embeded version of the driver)
  8150. # Extract the first word of "mysql_config", so it can be a program name with args.
  8151. set dummy mysql_config; ac_word=$2
  8152. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  8153. echo "configure:10016: checking for $ac_word" >&5
  8154. case "$MYSQLD_CONFIG" in
  8155. /*)
  8156. ac_cv_path_MYSQLD_CONFIG="$MYSQLD_CONFIG" # Let the user override the test with a path.
  8157. ;;
  8158. ?:/*)
  8159. ac_cv_path_MYSQLD_CONFIG="$MYSQLD_CONFIG" # Let the user override the test with a dos path.
  8160. ;;
  8161. *)
  8162. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  8163. ac_dummy="$PATH"
  8164. for ac_dir in $ac_dummy; do
  8165. test -z "$ac_dir" && ac_dir=.
  8166. if test -f $ac_dir/$ac_word; then
  8167. ac_cv_path_MYSQLD_CONFIG="$ac_dir/$ac_word"
  8168. break
  8169. fi
  8170. done
  8171. IFS="$ac_save_ifs"
  8172. test -z "$ac_cv_path_MYSQLD_CONFIG" && ac_cv_path_MYSQLD_CONFIG="no"
  8173. ;;
  8174. esac
  8175. MYSQLD_CONFIG="$ac_cv_path_MYSQLD_CONFIG"
  8176. if test -n "$MYSQLD_CONFIG"; then
  8177. echo "$ac_t""$MYSQLD_CONFIG" 1>&6
  8178. else
  8179. echo "$ac_t""no" 1>&6
  8180. fi
  8181. if test "$MYSQLD_CONFIG" = "no" ; then
  8182. { echo "configure: error: *** couldn't find mysql_config" 1>&2; exit 1; }
  8183. fi
  8184. if test "$MYSQLD_CONFIG" != "" ; then
  8185. ac_ext=C
  8186. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  8187. ac_cpp='$CXXCPP $CPPFLAGS'
  8188. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  8189. ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  8190. cross_compiling=$ac_cv_prog_cxx_cross
  8191. ac_save_libs="$LIBS"
  8192. MYSQLDLIB=`"$MYSQLD_CONFIG" --libmysqld-libs`
  8193. LIBS="$MYSQLDLIB $LIBS"
  8194. echo $ac_n "checking for mysql_server_init""... $ac_c" 1>&6
  8195. echo "configure:10065: checking for mysql_server_init" >&5
  8196. cat > conftest.$ac_ext <<EOF
  8197. #line 10068 "configure"
  8198. #include "confdefs.h"
  8199. /* System header to define __stub macros and hopefully few prototypes,
  8200. which can conflict with char mysql_server_init(); below. */
  8201. #include <assert.h>
  8202. /* Override any gcc2 internal prototype to avoid an error. */
  8203. #ifdef __cplusplus
  8204. extern "C"
  8205. #endif
  8206. /* We use char because int might match the return type of a gcc2
  8207. builtin and then its argument prototype would still apply. */
  8208. char mysql_server_init();
  8209. int main() {
  8210. /* The GNU C library defines this for functions which it implements
  8211. to always fail with ENOSYS. Some functions are actually named
  8212. something starting with __ and the normal name is an alias. */
  8213. #if defined (__stub_mysql_server_init) || defined (__stub___mysql_server_init)
  8214. choke me
  8215. #else
  8216. mysql_server_init();
  8217. #endif
  8218. ; return 0; }
  8219. EOF
  8220. if { (eval echo configure:10094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8221. rm -rf conftest*
  8222. eval "ac_cv_func_mysql_server_init=yes"
  8223. else
  8224. echo "configure: failed program was:" >&5
  8225. cat conftest.$ac_ext >&5
  8226. rm -rf conftest*
  8227. eval "ac_cv_func_mysql_server_init=no"
  8228. fi
  8229. rm -f conftest*
  8230. if eval "test \"`echo '$ac_cv_func_'mysql_server_init`\" = yes"; then
  8231. echo "$ac_t""yes" 1>&6
  8232. :
  8233. else
  8234. echo "$ac_t""no" 1>&6
  8235. MYSQLDLIB="";
  8236. echo "configure: warning: libmysqld not found" 1>&2
  8237. fi
  8238. LIBS=$ac_save_libs
  8239. ac_ext=c
  8240. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  8241. ac_cpp='$CPP $CPPFLAGS'
  8242. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  8243. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  8244. cross_compiling=$ac_cv_prog_cc_cross
  8245. ac_ext=c
  8246. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  8247. ac_cpp='$CPP $CPPFLAGS'
  8248. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  8249. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  8250. cross_compiling=$ac_cv_prog_cc_cross
  8251. fi
  8252. fi # $USE_MYSQL
  8253. # Done checking MySQL
  8254. # Enable SQLite option
  8255. echo $ac_n "checking whether to use SQLite""... $ac_c" 1>&6
  8256. echo "configure:10146: checking whether to use SQLite" >&5
  8257. echo "$ac_t"""$with_sqlite"" 1>&6
  8258. case "$with_sqlite" in
  8259. "no") USE_SQLITE= ;;
  8260. "yes") USE_SQLITE="1" ;;
  8261. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  8262. esac
  8263. SQLITEINCPATH=
  8264. SQLITELIBPATH=
  8265. SQLITELIB=
  8266. if test -n "$USE_SQLITE"; then
  8267. # With SQLite includes directory
  8268. echo $ac_n "checking for location of SQLite includes""... $ac_c" 1>&6
  8269. echo "configure:10166: checking for location of SQLite includes" >&5
  8270. case "$with_sqlite_includes" in
  8271. y | ye | yes | n | no)
  8272. { echo "configure: error: *** You must supply a directory to --with-sqlite-includes." 1>&2; exit 1; }
  8273. ;;
  8274. esac
  8275. echo "$ac_t""$with_sqlite_includes" 1>&6
  8276. if test -n "$with_sqlite_includes" ; then
  8277. for dir in $with_sqlite_includes; do
  8278. if test -d "$dir"; then
  8279. SQLITEINCPATH="$SQLITEINCPATH -I$dir"
  8280. else
  8281. { echo "configure: error: *** SQLite includes directory $dir does not exist." 1>&2; exit 1; }
  8282. fi
  8283. done
  8284. fi
  8285. ac_save_cppflags="$CPPFLAGS"
  8286. CPPFLAGS="$SQLITEINCPATH $CPPFLAGS"
  8287. for ac_hdr in sqlite3.h
  8288. do
  8289. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8290. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8291. echo "configure:10192: checking for $ac_hdr" >&5
  8292. cat > conftest.$ac_ext <<EOF
  8293. #line 10195 "configure"
  8294. #include "confdefs.h"
  8295. #include <$ac_hdr>
  8296. EOF
  8297. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8298. { (eval echo configure:10200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8299. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8300. if test -z "$ac_err"; then
  8301. rm -rf conftest*
  8302. eval "ac_cv_header_$ac_safe=yes"
  8303. else
  8304. echo "$ac_err" >&5
  8305. echo "configure: failed program was:" >&5
  8306. cat conftest.$ac_ext >&5
  8307. rm -rf conftest*
  8308. eval "ac_cv_header_$ac_safe=no"
  8309. fi
  8310. rm -f conftest*
  8311. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8312. echo "$ac_t""yes" 1>&6
  8313. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8314. cat >> confdefs.h <<EOF
  8315. #define $ac_tr_hdr 1
  8316. EOF
  8317. else
  8318. echo "$ac_t""no" 1>&6
  8319. { echo "configure: error: *** Unable to locate SQLite includes." 1>&2; exit 1; }
  8320. fi
  8321. done
  8322. CPPFLAGS=$ac_save_cppflags
  8323. cat >> confdefs.h <<\EOF
  8324. #define HAVE_SQLITE 1
  8325. EOF
  8326. fi # $USE_SQLITE
  8327. if test -n "$USE_SQLITE"; then
  8328. # With SQLite library directory
  8329. echo $ac_n "checking for location of SQLite library""... $ac_c" 1>&6
  8330. echo "configure:10243: checking for location of SQLite library" >&5
  8331. case "$with_sqlite_libs" in
  8332. y | ye | yes | n | no)
  8333. { echo "configure: error: *** You must supply a directory to --with-sqlite-libs." 1>&2; exit 1; }
  8334. ;;
  8335. esac
  8336. echo "$ac_t""$with_sqlite_libs" 1>&6
  8337. if test -n "$with_sqlite_libs"; then
  8338. for dir in $with_sqlite_libs; do
  8339. if test -d "$dir"; then
  8340. SQLITELIBPATH="$SQLITELIBPATH -L$dir"
  8341. else
  8342. { echo "configure: error: *** SQLite library directory $dir does not exist." 1>&2; exit 1; }
  8343. fi
  8344. done
  8345. fi
  8346. ac_save_ldflags="$LDFLAGS"
  8347. LDFLAGS="$SQLITELIBPATH $LDFLAGS"
  8348. echo $ac_n "checking for sqlite3_open in -lsqlite3""... $ac_c" 1>&6
  8349. echo "configure:10270: checking for sqlite3_open in -lsqlite3" >&5
  8350. ac_lib_var=`echo sqlite3'_'sqlite3_open | sed 'y%./+-%__p_%'`
  8351. ac_save_LIBS="$LIBS"
  8352. LIBS="-lsqlite3 $LIBS"
  8353. cat > conftest.$ac_ext <<EOF
  8354. #line 10276 "configure"
  8355. #include "confdefs.h"
  8356. /* Override any gcc2 internal prototype to avoid an error. */
  8357. /* We use char because int might match the return type of a gcc2
  8358. builtin and then its argument prototype would still apply. */
  8359. char sqlite3_open();
  8360. int main() {
  8361. sqlite3_open()
  8362. ; return 0; }
  8363. EOF
  8364. if { (eval echo configure:10287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8365. rm -rf conftest*
  8366. eval "ac_cv_lib_$ac_lib_var=yes"
  8367. else
  8368. echo "configure: failed program was:" >&5
  8369. cat conftest.$ac_ext >&5
  8370. rm -rf conftest*
  8371. eval "ac_cv_lib_$ac_lib_var=no"
  8372. fi
  8373. rm -f conftest*
  8374. LIBS="$ac_save_LIBS"
  8375. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8376. echo "$ac_t""yes" 1>&6
  8377. SQLITELIB="$SQLITELIB -lsqlite3 "
  8378. else
  8379. echo "$ac_t""no" 1>&6
  8380. echo $ac_n "checking for sqlite3_open in -lsqlite3""... $ac_c" 1>&6
  8381. echo "configure:10306: checking for sqlite3_open in -lsqlite3" >&5
  8382. ac_lib_var=`echo sqlite3'_'sqlite3_open | sed 'y%./+-%__p_%'`
  8383. ac_save_LIBS="$LIBS"
  8384. LIBS="-lsqlite3 $MATHLIB $LIBS"
  8385. cat > conftest.$ac_ext <<EOF
  8386. #line 10312 "configure"
  8387. #include "confdefs.h"
  8388. /* Override any gcc2 internal prototype to avoid an error. */
  8389. /* We use char because int might match the return type of a gcc2
  8390. builtin and then its argument prototype would still apply. */
  8391. char sqlite3_open();
  8392. int main() {
  8393. sqlite3_open()
  8394. ; return 0; }
  8395. EOF
  8396. if { (eval echo configure:10323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8397. rm -rf conftest*
  8398. eval "ac_cv_lib_$ac_lib_var=yes"
  8399. else
  8400. echo "configure: failed program was:" >&5
  8401. cat conftest.$ac_ext >&5
  8402. rm -rf conftest*
  8403. eval "ac_cv_lib_$ac_lib_var=no"
  8404. fi
  8405. rm -f conftest*
  8406. LIBS="$ac_save_LIBS"
  8407. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8408. echo "$ac_t""yes" 1>&6
  8409. SQLITELIB="$SQLITELIB -lsqlite3 $MATHLIB"
  8410. else
  8411. echo "$ac_t""no" 1>&6
  8412. LDFLAGS=${ac_save_ldflags}
  8413. { echo "configure: error: *** Unable to locate SQLite library." 1>&2; exit 1; }
  8414. fi
  8415. fi
  8416. LDFLAGS=${ac_save_ldflags}
  8417. fi # $USE_SQLITE
  8418. # Done checking SQLite
  8419. # Enable FFMPEG option
  8420. echo $ac_n "checking whether to use FFMPEG""... $ac_c" 1>&6
  8421. echo "configure:10376: checking whether to use FFMPEG" >&5
  8422. echo "$ac_t"""$with_ffmpeg"" 1>&6
  8423. case "$with_ffmpeg" in
  8424. "no") USE_FFMPEG= ;;
  8425. "yes") USE_FFMPEG="1" ;;
  8426. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  8427. esac
  8428. FFMPEGINCPATH=
  8429. FFMPEGLIBPATH=
  8430. FFMPEGLIB=
  8431. if test -n "$USE_FFMPEG"; then
  8432. # With FFMPEG includes directory
  8433. echo $ac_n "checking for location of FFMPEG includes""... $ac_c" 1>&6
  8434. echo "configure:10396: checking for location of FFMPEG includes" >&5
  8435. case "$with_ffmpeg_includes" in
  8436. y | ye | yes | n | no)
  8437. { echo "configure: error: *** You must supply a directory to --with-ffmpeg-includes." 1>&2; exit 1; }
  8438. ;;
  8439. esac
  8440. echo "$ac_t""$with_ffmpeg_includes" 1>&6
  8441. if test -n "$with_ffmpeg_includes" ; then
  8442. for dir in $with_ffmpeg_includes; do
  8443. if test -d "$dir"; then
  8444. FFMPEGINCPATH="$FFMPEGINCPATH -I$dir"
  8445. else
  8446. { echo "configure: error: *** FFMPEG includes directory $dir does not exist." 1>&2; exit 1; }
  8447. fi
  8448. done
  8449. fi
  8450. ac_save_cppflags="$CPPFLAGS"
  8451. CPPFLAGS="$FFMPEGINCPATH $CPPFLAGS"
  8452. for ac_hdr in avcodec.h
  8453. do
  8454. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8455. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8456. echo "configure:10422: checking for $ac_hdr" >&5
  8457. cat > conftest.$ac_ext <<EOF
  8458. #line 10425 "configure"
  8459. #include "confdefs.h"
  8460. #include <$ac_hdr>
  8461. EOF
  8462. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8463. { (eval echo configure:10430: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8464. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8465. if test -z "$ac_err"; then
  8466. rm -rf conftest*
  8467. eval "ac_cv_header_$ac_safe=yes"
  8468. else
  8469. echo "$ac_err" >&5
  8470. echo "configure: failed program was:" >&5
  8471. cat conftest.$ac_ext >&5
  8472. rm -rf conftest*
  8473. eval "ac_cv_header_$ac_safe=no"
  8474. fi
  8475. rm -f conftest*
  8476. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8477. echo "$ac_t""yes" 1>&6
  8478. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8479. cat >> confdefs.h <<EOF
  8480. #define $ac_tr_hdr 1
  8481. EOF
  8482. else
  8483. echo "$ac_t""no" 1>&6
  8484. { echo "configure: error: *** Unable to locate FFMPEG includes." 1>&2; exit 1; }
  8485. fi
  8486. done
  8487. CPPFLAGS=$ac_save_cppflags
  8488. ac_save_cppflags="$CPPFLAGS"
  8489. CPPFLAGS="$FFMPEGINCPATH $CPPFLAGS"
  8490. for ac_hdr in avformat.h
  8491. do
  8492. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8493. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8494. echo "configure:10466: checking for $ac_hdr" >&5
  8495. cat > conftest.$ac_ext <<EOF
  8496. #line 10469 "configure"
  8497. #include "confdefs.h"
  8498. #include <$ac_hdr>
  8499. EOF
  8500. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8501. { (eval echo configure:10474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8502. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8503. if test -z "$ac_err"; then
  8504. rm -rf conftest*
  8505. eval "ac_cv_header_$ac_safe=yes"
  8506. else
  8507. echo "$ac_err" >&5
  8508. echo "configure: failed program was:" >&5
  8509. cat conftest.$ac_ext >&5
  8510. rm -rf conftest*
  8511. eval "ac_cv_header_$ac_safe=no"
  8512. fi
  8513. rm -f conftest*
  8514. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8515. echo "$ac_t""yes" 1>&6
  8516. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8517. cat >> confdefs.h <<EOF
  8518. #define $ac_tr_hdr 1
  8519. EOF
  8520. else
  8521. echo "$ac_t""no" 1>&6
  8522. { echo "configure: error: *** Unable to locate FFMPEG includes." 1>&2; exit 1; }
  8523. fi
  8524. done
  8525. CPPFLAGS=$ac_save_cppflags
  8526. ac_save_cppflags="$CPPFLAGS"
  8527. CPPFLAGS="$FFMPEGINCPATH $CPPFLAGS"
  8528. for ac_hdr in swscale.h
  8529. do
  8530. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8531. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8532. echo "configure:10510: checking for $ac_hdr" >&5
  8533. cat > conftest.$ac_ext <<EOF
  8534. #line 10513 "configure"
  8535. #include "confdefs.h"
  8536. #include <$ac_hdr>
  8537. EOF
  8538. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8539. { (eval echo configure:10518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8540. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8541. if test -z "$ac_err"; then
  8542. rm -rf conftest*
  8543. eval "ac_cv_header_$ac_safe=yes"
  8544. else
  8545. echo "$ac_err" >&5
  8546. echo "configure: failed program was:" >&5
  8547. cat conftest.$ac_ext >&5
  8548. rm -rf conftest*
  8549. eval "ac_cv_header_$ac_safe=no"
  8550. fi
  8551. rm -f conftest*
  8552. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8553. echo "$ac_t""yes" 1>&6
  8554. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8555. cat >> confdefs.h <<EOF
  8556. #define $ac_tr_hdr 1
  8557. EOF
  8558. else
  8559. echo "$ac_t""no" 1>&6
  8560. { echo "configure: error: *** Unable to locate FFMPEG includes." 1>&2; exit 1; }
  8561. fi
  8562. done
  8563. CPPFLAGS=$ac_save_cppflags
  8564. cat >> confdefs.h <<\EOF
  8565. #define HAVE_FFMPEG 1
  8566. EOF
  8567. fi # $USE_FFMPEG
  8568. if test -n "$USE_FFMPEG"; then
  8569. # With FFMPEG library directory
  8570. echo $ac_n "checking for location of FFMPEG library""... $ac_c" 1>&6
  8571. echo "configure:10561: checking for location of FFMPEG library" >&5
  8572. case "$with_ffmpeg_libs" in
  8573. y | ye | yes | n | no)
  8574. { echo "configure: error: *** You must supply a directory to --with-ffmpeg-libs." 1>&2; exit 1; }
  8575. ;;
  8576. esac
  8577. echo "$ac_t""$with_ffmpeg_libs" 1>&6
  8578. if test -n "$with_ffmpeg_libs"; then
  8579. for dir in $with_ffmpeg_libs; do
  8580. if test -d "$dir"; then
  8581. FFMPEGLIBPATH="$FFMPEGLIBPATH -L$dir"
  8582. else
  8583. { echo "configure: error: *** FFMPEG library directory $dir does not exist." 1>&2; exit 1; }
  8584. fi
  8585. done
  8586. fi
  8587. ac_save_ldflags="$LDFLAGS"
  8588. LDFLAGS="$FFMPEGLIBPATH $LDFLAGS"
  8589. echo $ac_n "checking for av_free in -lavutil""... $ac_c" 1>&6
  8590. echo "configure:10588: checking for av_free in -lavutil" >&5
  8591. ac_lib_var=`echo avutil'_'av_free | sed 'y%./+-%__p_%'`
  8592. ac_save_LIBS="$LIBS"
  8593. LIBS="-lavutil $LIBS"
  8594. cat > conftest.$ac_ext <<EOF
  8595. #line 10594 "configure"
  8596. #include "confdefs.h"
  8597. /* Override any gcc2 internal prototype to avoid an error. */
  8598. /* We use char because int might match the return type of a gcc2
  8599. builtin and then its argument prototype would still apply. */
  8600. char av_free();
  8601. int main() {
  8602. av_free()
  8603. ; return 0; }
  8604. EOF
  8605. if { (eval echo configure:10605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8606. rm -rf conftest*
  8607. eval "ac_cv_lib_$ac_lib_var=yes"
  8608. else
  8609. echo "configure: failed program was:" >&5
  8610. cat conftest.$ac_ext >&5
  8611. rm -rf conftest*
  8612. eval "ac_cv_lib_$ac_lib_var=no"
  8613. fi
  8614. rm -f conftest*
  8615. LIBS="$ac_save_LIBS"
  8616. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8617. echo "$ac_t""yes" 1>&6
  8618. FFMPEGLIB="$FFMPEGLIB -lavutil "
  8619. else
  8620. echo "$ac_t""no" 1>&6
  8621. echo $ac_n "checking for av_free in -lavutil""... $ac_c" 1>&6
  8622. echo "configure:10624: checking for av_free in -lavutil" >&5
  8623. ac_lib_var=`echo avutil'_'av_free | sed 'y%./+-%__p_%'`
  8624. ac_save_LIBS="$LIBS"
  8625. LIBS="-lavutil $MATHLIB $LIBS"
  8626. cat > conftest.$ac_ext <<EOF
  8627. #line 10630 "configure"
  8628. #include "confdefs.h"
  8629. /* Override any gcc2 internal prototype to avoid an error. */
  8630. /* We use char because int might match the return type of a gcc2
  8631. builtin and then its argument prototype would still apply. */
  8632. char av_free();
  8633. int main() {
  8634. av_free()
  8635. ; return 0; }
  8636. EOF
  8637. if { (eval echo configure:10641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8638. rm -rf conftest*
  8639. eval "ac_cv_lib_$ac_lib_var=yes"
  8640. else
  8641. echo "configure: failed program was:" >&5
  8642. cat conftest.$ac_ext >&5
  8643. rm -rf conftest*
  8644. eval "ac_cv_lib_$ac_lib_var=no"
  8645. fi
  8646. rm -f conftest*
  8647. LIBS="$ac_save_LIBS"
  8648. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8649. echo "$ac_t""yes" 1>&6
  8650. FFMPEGLIB="$FFMPEGLIB -lavutil $MATHLIB"
  8651. else
  8652. echo "$ac_t""no" 1>&6
  8653. LDFLAGS=${ac_save_ldflags}
  8654. { echo "configure: error: *** Unable to locate FFMPEG library." 1>&2; exit 1; }
  8655. fi
  8656. fi
  8657. LDFLAGS=${ac_save_ldflags}
  8658. ac_save_ldflags="$LDFLAGS"
  8659. LDFLAGS="$FFMPEGLIBPATH $LDFLAGS"
  8660. echo $ac_n "checking for avcodec_init in -lavcodec""... $ac_c" 1>&6
  8661. echo "configure:10686: checking for avcodec_init in -lavcodec" >&5
  8662. ac_lib_var=`echo avcodec'_'avcodec_init | sed 'y%./+-%__p_%'`
  8663. ac_save_LIBS="$LIBS"
  8664. LIBS="-lavcodec $FFMPEGLIB $LIBS"
  8665. cat > conftest.$ac_ext <<EOF
  8666. #line 10692 "configure"
  8667. #include "confdefs.h"
  8668. /* Override any gcc2 internal prototype to avoid an error. */
  8669. /* We use char because int might match the return type of a gcc2
  8670. builtin and then its argument prototype would still apply. */
  8671. char avcodec_init();
  8672. int main() {
  8673. avcodec_init()
  8674. ; return 0; }
  8675. EOF
  8676. if { (eval echo configure:10703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8677. rm -rf conftest*
  8678. eval "ac_cv_lib_$ac_lib_var=yes"
  8679. else
  8680. echo "configure: failed program was:" >&5
  8681. cat conftest.$ac_ext >&5
  8682. rm -rf conftest*
  8683. eval "ac_cv_lib_$ac_lib_var=no"
  8684. fi
  8685. rm -f conftest*
  8686. LIBS="$ac_save_LIBS"
  8687. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8688. echo "$ac_t""yes" 1>&6
  8689. FFMPEGLIB="$FFMPEGLIB -lavcodec "
  8690. else
  8691. echo "$ac_t""no" 1>&6
  8692. echo $ac_n "checking for avcodec_init in -lavcodec""... $ac_c" 1>&6
  8693. echo "configure:10722: checking for avcodec_init in -lavcodec" >&5
  8694. ac_lib_var=`echo avcodec'_'avcodec_init | sed 'y%./+-%__p_%'`
  8695. ac_save_LIBS="$LIBS"
  8696. LIBS="-lavcodec $FFMPEGLIB $MATHLIB $LIBS"
  8697. cat > conftest.$ac_ext <<EOF
  8698. #line 10728 "configure"
  8699. #include "confdefs.h"
  8700. /* Override any gcc2 internal prototype to avoid an error. */
  8701. /* We use char because int might match the return type of a gcc2
  8702. builtin and then its argument prototype would still apply. */
  8703. char avcodec_init();
  8704. int main() {
  8705. avcodec_init()
  8706. ; return 0; }
  8707. EOF
  8708. if { (eval echo configure:10739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8709. rm -rf conftest*
  8710. eval "ac_cv_lib_$ac_lib_var=yes"
  8711. else
  8712. echo "configure: failed program was:" >&5
  8713. cat conftest.$ac_ext >&5
  8714. rm -rf conftest*
  8715. eval "ac_cv_lib_$ac_lib_var=no"
  8716. fi
  8717. rm -f conftest*
  8718. LIBS="$ac_save_LIBS"
  8719. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8720. echo "$ac_t""yes" 1>&6
  8721. FFMPEGLIB="$FFMPEGLIB -lavcodec $MATHLIB"
  8722. else
  8723. echo "$ac_t""no" 1>&6
  8724. LDFLAGS=${ac_save_ldflags}
  8725. { echo "configure: error: *** Unable to locate FFMPEG library." 1>&2; exit 1; }
  8726. fi
  8727. fi
  8728. LDFLAGS=${ac_save_ldflags}
  8729. ac_save_ldflags="$LDFLAGS"
  8730. LDFLAGS="$FFMPEGLIBPATH $LDFLAGS"
  8731. echo $ac_n "checking for av_set_parameters in -lavformat""... $ac_c" 1>&6
  8732. echo "configure:10784: checking for av_set_parameters in -lavformat" >&5
  8733. ac_lib_var=`echo avformat'_'av_set_parameters | sed 'y%./+-%__p_%'`
  8734. ac_save_LIBS="$LIBS"
  8735. LIBS="-lavformat $FFMPEGLIB $LIBS"
  8736. cat > conftest.$ac_ext <<EOF
  8737. #line 10790 "configure"
  8738. #include "confdefs.h"
  8739. /* Override any gcc2 internal prototype to avoid an error. */
  8740. /* We use char because int might match the return type of a gcc2
  8741. builtin and then its argument prototype would still apply. */
  8742. char av_set_parameters();
  8743. int main() {
  8744. av_set_parameters()
  8745. ; return 0; }
  8746. EOF
  8747. if { (eval echo configure:10801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8748. rm -rf conftest*
  8749. eval "ac_cv_lib_$ac_lib_var=yes"
  8750. else
  8751. echo "configure: failed program was:" >&5
  8752. cat conftest.$ac_ext >&5
  8753. rm -rf conftest*
  8754. eval "ac_cv_lib_$ac_lib_var=no"
  8755. fi
  8756. rm -f conftest*
  8757. LIBS="$ac_save_LIBS"
  8758. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8759. echo "$ac_t""yes" 1>&6
  8760. FFMPEGLIB="$FFMPEGLIB -lavformat "
  8761. else
  8762. echo "$ac_t""no" 1>&6
  8763. echo $ac_n "checking for av_set_parameters in -lavformat""... $ac_c" 1>&6
  8764. echo "configure:10820: checking for av_set_parameters in -lavformat" >&5
  8765. ac_lib_var=`echo avformat'_'av_set_parameters | sed 'y%./+-%__p_%'`
  8766. ac_save_LIBS="$LIBS"
  8767. LIBS="-lavformat $FFMPEGLIB $MATHLIB $LIBS"
  8768. cat > conftest.$ac_ext <<EOF
  8769. #line 10826 "configure"
  8770. #include "confdefs.h"
  8771. /* Override any gcc2 internal prototype to avoid an error. */
  8772. /* We use char because int might match the return type of a gcc2
  8773. builtin and then its argument prototype would still apply. */
  8774. char av_set_parameters();
  8775. int main() {
  8776. av_set_parameters()
  8777. ; return 0; }
  8778. EOF
  8779. if { (eval echo configure:10837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8780. rm -rf conftest*
  8781. eval "ac_cv_lib_$ac_lib_var=yes"
  8782. else
  8783. echo "configure: failed program was:" >&5
  8784. cat conftest.$ac_ext >&5
  8785. rm -rf conftest*
  8786. eval "ac_cv_lib_$ac_lib_var=no"
  8787. fi
  8788. rm -f conftest*
  8789. LIBS="$ac_save_LIBS"
  8790. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8791. echo "$ac_t""yes" 1>&6
  8792. FFMPEGLIB="$FFMPEGLIB -lavformat $MATHLIB"
  8793. else
  8794. echo "$ac_t""no" 1>&6
  8795. LDFLAGS=${ac_save_ldflags}
  8796. { echo "configure: error: *** Unable to locate FFMPEG library." 1>&2; exit 1; }
  8797. fi
  8798. fi
  8799. LDFLAGS=${ac_save_ldflags}
  8800. fi # $USE_FFMPEG
  8801. # Done checking FFMPEG
  8802. # Enable OpenGL option
  8803. OPENGLINC=
  8804. OPENGLLIB=
  8805. OPENGLULIB=
  8806. USE_OPENGL=
  8807. OPENGL_X11=
  8808. OPENGL_AQUA=
  8809. OPENGL_WINDOWS=
  8810. echo $ac_n "checking whether to use OpenGL""... $ac_c" 1>&6
  8811. echo "configure:10897: checking whether to use OpenGL" >&5
  8812. echo "$ac_t"""$with_opengl"" 1>&6
  8813. case "$with_opengl" in
  8814. n|no)
  8815. OPENGL_TYPE=none
  8816. ;;
  8817. y|yes|x|x11|glx)
  8818. OPENGL_TYPE=X11
  8819. USE_OPENGL=1
  8820. OPENGL_X11=1
  8821. ;;
  8822. aqua|mac|osx|macosx|agl)
  8823. OPENGL_TYPE=Aqua
  8824. USE_OPENGL=1
  8825. OPENGL_AQUA=1
  8826. ;;
  8827. win|windows|mswin|wgl)
  8828. OPENGL_TYPE=Windows
  8829. USE_OPENGL=1
  8830. OPENGL_WINDOWS=1
  8831. ;;
  8832. *)
  8833. { echo "configure: error: *** Valid arguments for --with-opengl= are yes,no,x11,aqua,windows." 1>&2; exit 1; }
  8834. ;;
  8835. esac
  8836. if test -n "$USE_OPENGL" ; then
  8837. if test "$OPENGL_X11" = 1 ; then
  8838. # With OpenGL includes directory
  8839. echo $ac_n "checking for location of OpenGL includes""... $ac_c" 1>&6
  8840. echo "configure:10931: checking for location of OpenGL includes" >&5
  8841. case "$with_opengl_includes" in
  8842. y | ye | yes | n | no)
  8843. { echo "configure: error: *** You must supply a directory to --with-opengl-includes." 1>&2; exit 1; }
  8844. ;;
  8845. esac
  8846. echo "$ac_t""$with_opengl_includes" 1>&6
  8847. if test -n "$with_opengl_includes" ; then
  8848. for dir in $with_opengl_includes; do
  8849. if test -d "$dir"; then
  8850. OPENGLINC="$OPENGLINC -I$dir"
  8851. else
  8852. { echo "configure: error: *** OpenGL includes directory $dir does not exist." 1>&2; exit 1; }
  8853. fi
  8854. done
  8855. fi
  8856. ac_save_cppflags="$CPPFLAGS"
  8857. CPPFLAGS="$OPENGLINC $X_CFLAGS $CPPFLAGS"
  8858. for ac_hdr in GL/gl.h GL/glu.h
  8859. do
  8860. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8861. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8862. echo "configure:10957: checking for $ac_hdr" >&5
  8863. cat > conftest.$ac_ext <<EOF
  8864. #line 10960 "configure"
  8865. #include "confdefs.h"
  8866. #include <$ac_hdr>
  8867. EOF
  8868. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8869. { (eval echo configure:10965: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8870. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8871. if test -z "$ac_err"; then
  8872. rm -rf conftest*
  8873. eval "ac_cv_header_$ac_safe=yes"
  8874. else
  8875. echo "$ac_err" >&5
  8876. echo "configure: failed program was:" >&5
  8877. cat conftest.$ac_ext >&5
  8878. rm -rf conftest*
  8879. eval "ac_cv_header_$ac_safe=no"
  8880. fi
  8881. rm -f conftest*
  8882. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8883. echo "$ac_t""yes" 1>&6
  8884. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8885. cat >> confdefs.h <<EOF
  8886. #define $ac_tr_hdr 1
  8887. EOF
  8888. else
  8889. echo "$ac_t""no" 1>&6
  8890. { echo "configure: error: *** Unable to locate OpenGL includes." 1>&2; exit 1; }
  8891. fi
  8892. done
  8893. CPPFLAGS=$ac_save_cppflags
  8894. # With OpenGL library directory
  8895. echo $ac_n "checking for location of OpenGL library""... $ac_c" 1>&6
  8896. echo "configure:10999: checking for location of OpenGL library" >&5
  8897. case "$with_opengl_libs" in
  8898. y | ye | yes | n | no)
  8899. { echo "configure: error: *** You must supply a directory to --with-opengl-libs." 1>&2; exit 1; }
  8900. ;;
  8901. esac
  8902. echo "$ac_t""$with_opengl_libs" 1>&6
  8903. if test -n "$with_opengl_libs"; then
  8904. for dir in $with_opengl_libs; do
  8905. if test -d "$dir"; then
  8906. OPENGL_LIB_PATH="$OPENGL_LIB_PATH -L$dir"
  8907. else
  8908. { echo "configure: error: *** OpenGL library directory $dir does not exist." 1>&2; exit 1; }
  8909. fi
  8910. done
  8911. fi
  8912. ac_save_ldflags="$LDFLAGS"
  8913. LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
  8914. echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
  8915. echo "configure:11028: checking for glBegin in -lGL" >&5
  8916. ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
  8917. ac_save_LIBS="$LIBS"
  8918. LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB $LIBS"
  8919. cat > conftest.$ac_ext <<EOF
  8920. #line 11034 "configure"
  8921. #include "confdefs.h"
  8922. /* Override any gcc2 internal prototype to avoid an error. */
  8923. /* We use char because int might match the return type of a gcc2
  8924. builtin and then its argument prototype would still apply. */
  8925. char glBegin();
  8926. int main() {
  8927. glBegin()
  8928. ; return 0; }
  8929. EOF
  8930. if { (eval echo configure:11045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8931. rm -rf conftest*
  8932. eval "ac_cv_lib_$ac_lib_var=yes"
  8933. else
  8934. echo "configure: failed program was:" >&5
  8935. cat conftest.$ac_ext >&5
  8936. rm -rf conftest*
  8937. eval "ac_cv_lib_$ac_lib_var=no"
  8938. fi
  8939. rm -f conftest*
  8940. LIBS="$ac_save_LIBS"
  8941. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8942. echo "$ac_t""yes" 1>&6
  8943. OPENGLLIB="$OPENGLLIB -lGL "
  8944. else
  8945. echo "$ac_t""no" 1>&6
  8946. echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
  8947. echo "configure:11064: checking for glBegin in -lGL" >&5
  8948. ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
  8949. ac_save_LIBS="$LIBS"
  8950. LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lXext $LIBS"
  8951. cat > conftest.$ac_ext <<EOF
  8952. #line 11070 "configure"
  8953. #include "confdefs.h"
  8954. /* Override any gcc2 internal prototype to avoid an error. */
  8955. /* We use char because int might match the return type of a gcc2
  8956. builtin and then its argument prototype would still apply. */
  8957. char glBegin();
  8958. int main() {
  8959. glBegin()
  8960. ; return 0; }
  8961. EOF
  8962. if { (eval echo configure:11081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8963. rm -rf conftest*
  8964. eval "ac_cv_lib_$ac_lib_var=yes"
  8965. else
  8966. echo "configure: failed program was:" >&5
  8967. cat conftest.$ac_ext >&5
  8968. rm -rf conftest*
  8969. eval "ac_cv_lib_$ac_lib_var=no"
  8970. fi
  8971. rm -f conftest*
  8972. LIBS="$ac_save_LIBS"
  8973. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8974. echo "$ac_t""yes" 1>&6
  8975. OPENGLLIB="$OPENGLLIB -lGL -lXext"
  8976. else
  8977. echo "$ac_t""no" 1>&6
  8978. echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
  8979. echo "configure:11100: checking for glBegin in -lGL" >&5
  8980. ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
  8981. ac_save_LIBS="$LIBS"
  8982. LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lpthread $LIBS"
  8983. cat > conftest.$ac_ext <<EOF
  8984. #line 11106 "configure"
  8985. #include "confdefs.h"
  8986. /* Override any gcc2 internal prototype to avoid an error. */
  8987. /* We use char because int might match the return type of a gcc2
  8988. builtin and then its argument prototype would still apply. */
  8989. char glBegin();
  8990. int main() {
  8991. glBegin()
  8992. ; return 0; }
  8993. EOF
  8994. if { (eval echo configure:11117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8995. rm -rf conftest*
  8996. eval "ac_cv_lib_$ac_lib_var=yes"
  8997. else
  8998. echo "configure: failed program was:" >&5
  8999. cat conftest.$ac_ext >&5
  9000. rm -rf conftest*
  9001. eval "ac_cv_lib_$ac_lib_var=no"
  9002. fi
  9003. rm -f conftest*
  9004. LIBS="$ac_save_LIBS"
  9005. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9006. echo "$ac_t""yes" 1>&6
  9007. OPENGLLIB="$OPENGLLIB -lGL -lpthread"
  9008. else
  9009. echo "$ac_t""no" 1>&6
  9010. echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
  9011. echo "configure:11136: checking for glBegin in -lGL" >&5
  9012. ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
  9013. ac_save_LIBS="$LIBS"
  9014. LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lpthread -lXext $LIBS"
  9015. cat > conftest.$ac_ext <<EOF
  9016. #line 11142 "configure"
  9017. #include "confdefs.h"
  9018. /* Override any gcc2 internal prototype to avoid an error. */
  9019. /* We use char because int might match the return type of a gcc2
  9020. builtin and then its argument prototype would still apply. */
  9021. char glBegin();
  9022. int main() {
  9023. glBegin()
  9024. ; return 0; }
  9025. EOF
  9026. if { (eval echo configure:11153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9027. rm -rf conftest*
  9028. eval "ac_cv_lib_$ac_lib_var=yes"
  9029. else
  9030. echo "configure: failed program was:" >&5
  9031. cat conftest.$ac_ext >&5
  9032. rm -rf conftest*
  9033. eval "ac_cv_lib_$ac_lib_var=no"
  9034. fi
  9035. rm -f conftest*
  9036. LIBS="$ac_save_LIBS"
  9037. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9038. echo "$ac_t""yes" 1>&6
  9039. OPENGLLIB="$OPENGLLIB -lGL -lpthread -lXext"
  9040. else
  9041. echo "$ac_t""no" 1>&6
  9042. LDFLAGS=${ac_save_ldflags}
  9043. { echo "configure: error: *** Unable to locate OpenGL library." 1>&2; exit 1; }
  9044. fi
  9045. fi
  9046. fi
  9047. fi
  9048. LDFLAGS=${ac_save_ldflags}
  9049. ac_save_ldflags="$LDFLAGS"
  9050. LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
  9051. echo $ac_n "checking for gluBeginCurve in -lGLU""... $ac_c" 1>&6
  9052. echo "configure:11215: checking for gluBeginCurve in -lGLU" >&5
  9053. ac_lib_var=`echo GLU'_'gluBeginCurve | sed 'y%./+-%__p_%'`
  9054. ac_save_LIBS="$LIBS"
  9055. LIBS="-lGLU $OPENGLLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB $LIBS"
  9056. cat > conftest.$ac_ext <<EOF
  9057. #line 11221 "configure"
  9058. #include "confdefs.h"
  9059. /* Override any gcc2 internal prototype to avoid an error. */
  9060. /* We use char because int might match the return type of a gcc2
  9061. builtin and then its argument prototype would still apply. */
  9062. char gluBeginCurve();
  9063. int main() {
  9064. gluBeginCurve()
  9065. ; return 0; }
  9066. EOF
  9067. if { (eval echo configure:11232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9068. rm -rf conftest*
  9069. eval "ac_cv_lib_$ac_lib_var=yes"
  9070. else
  9071. echo "configure: failed program was:" >&5
  9072. cat conftest.$ac_ext >&5
  9073. rm -rf conftest*
  9074. eval "ac_cv_lib_$ac_lib_var=no"
  9075. fi
  9076. rm -f conftest*
  9077. LIBS="$ac_save_LIBS"
  9078. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9079. echo "$ac_t""yes" 1>&6
  9080. OPENGLULIB="$OPENGLULIB -lGLU "
  9081. else
  9082. echo "$ac_t""no" 1>&6
  9083. echo $ac_n "checking for gluBeginCurve in -lGLU""... $ac_c" 1>&6
  9084. echo "configure:11251: checking for gluBeginCurve in -lGLU" >&5
  9085. ac_lib_var=`echo GLU'_'gluBeginCurve | sed 'y%./+-%__p_%'`
  9086. ac_save_LIBS="$LIBS"
  9087. LIBS="-lGLU $OPENGLLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lstdc++ $LIBS"
  9088. cat > conftest.$ac_ext <<EOF
  9089. #line 11257 "configure"
  9090. #include "confdefs.h"
  9091. /* Override any gcc2 internal prototype to avoid an error. */
  9092. /* We use char because int might match the return type of a gcc2
  9093. builtin and then its argument prototype would still apply. */
  9094. char gluBeginCurve();
  9095. int main() {
  9096. gluBeginCurve()
  9097. ; return 0; }
  9098. EOF
  9099. if { (eval echo configure:11268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9100. rm -rf conftest*
  9101. eval "ac_cv_lib_$ac_lib_var=yes"
  9102. else
  9103. echo "configure: failed program was:" >&5
  9104. cat conftest.$ac_ext >&5
  9105. rm -rf conftest*
  9106. eval "ac_cv_lib_$ac_lib_var=no"
  9107. fi
  9108. rm -f conftest*
  9109. LIBS="$ac_save_LIBS"
  9110. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9111. echo "$ac_t""yes" 1>&6
  9112. OPENGLULIB="$OPENGLULIB -lGLU -lstdc++"
  9113. else
  9114. echo "$ac_t""no" 1>&6
  9115. LDFLAGS=${ac_save_ldflags}
  9116. { echo "configure: error: *** Unable to locate GLU library." 1>&2; exit 1; }
  9117. fi
  9118. fi
  9119. LDFLAGS=${ac_save_ldflags}
  9120. OPENGLLIB="$OPENGL_LIB_PATH $OPENGLLIB"
  9121. OPENGLULIB="$OPENGL_LIB_PATH $OPENGLULIB"
  9122. ac_save_libs="$LIBS"
  9123. ac_save_ldflags="$LDFLAGS"
  9124. LIBS=" $OPENGLLIB $LIBS"
  9125. LDFLAGS=" $LDFLAGS"
  9126. echo $ac_n "checking for glXCreatePbuffer""... $ac_c" 1>&6
  9127. echo "configure:11315: checking for glXCreatePbuffer" >&5
  9128. cat > conftest.$ac_ext <<EOF
  9129. #line 11318 "configure"
  9130. #include "confdefs.h"
  9131. /* System header to define __stub macros and hopefully few prototypes,
  9132. which can conflict with char glXCreatePbuffer(); below. */
  9133. #include <assert.h>
  9134. /* Override any gcc2 internal prototype to avoid an error. */
  9135. /* We use char because int might match the return type of a gcc2
  9136. builtin and then its argument prototype would still apply. */
  9137. char glXCreatePbuffer();
  9138. int main() {
  9139. /* The GNU C library defines this for functions which it implements
  9140. to always fail with ENOSYS. Some functions are actually named
  9141. something starting with __ and the normal name is an alias. */
  9142. #if defined (__stub_glXCreatePbuffer) || defined (__stub___glXCreatePbuffer)
  9143. choke me
  9144. #else
  9145. glXCreatePbuffer();
  9146. #endif
  9147. ; return 0; }
  9148. EOF
  9149. if { (eval echo configure:11341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9150. rm -rf conftest*
  9151. eval "ac_cv_func_glXCreatePbuffer=yes"
  9152. else
  9153. echo "configure: failed program was:" >&5
  9154. cat conftest.$ac_ext >&5
  9155. rm -rf conftest*
  9156. eval "ac_cv_func_glXCreatePbuffer=no"
  9157. fi
  9158. rm -f conftest*
  9159. if eval "test \"`echo '$ac_cv_func_'glXCreatePbuffer`\" = yes"; then
  9160. echo "$ac_t""yes" 1>&6
  9161. cat >> confdefs.h <<\EOF
  9162. #define HAVE_PBUFFERS 1
  9163. EOF
  9164. else
  9165. echo "$ac_t""no" 1>&6
  9166. { echo "configure: error: *** Unable to locate ." 1>&2; exit 1; }
  9167. fi
  9168. LIBS=${ac_save_libs}
  9169. LDFLAGS=${ac_save_ldflags}
  9170. ac_save_libs="$LIBS"
  9171. ac_save_ldflags="$LDFLAGS"
  9172. LIBS=" $OPENGLLIB $LIBS"
  9173. LDFLAGS=" $LDFLAGS"
  9174. echo $ac_n "checking for glXCreateGLXPixmap""... $ac_c" 1>&6
  9175. echo "configure:11378: checking for glXCreateGLXPixmap" >&5
  9176. cat > conftest.$ac_ext <<EOF
  9177. #line 11381 "configure"
  9178. #include "confdefs.h"
  9179. /* System header to define __stub macros and hopefully few prototypes,
  9180. which can conflict with char glXCreateGLXPixmap(); below. */
  9181. #include <assert.h>
  9182. /* Override any gcc2 internal prototype to avoid an error. */
  9183. /* We use char because int might match the return type of a gcc2
  9184. builtin and then its argument prototype would still apply. */
  9185. char glXCreateGLXPixmap();
  9186. int main() {
  9187. /* The GNU C library defines this for functions which it implements
  9188. to always fail with ENOSYS. Some functions are actually named
  9189. something starting with __ and the normal name is an alias. */
  9190. #if defined (__stub_glXCreateGLXPixmap) || defined (__stub___glXCreateGLXPixmap)
  9191. choke me
  9192. #else
  9193. glXCreateGLXPixmap();
  9194. #endif
  9195. ; return 0; }
  9196. EOF
  9197. if { (eval echo configure:11404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9198. rm -rf conftest*
  9199. eval "ac_cv_func_glXCreateGLXPixmap=yes"
  9200. else
  9201. echo "configure: failed program was:" >&5
  9202. cat conftest.$ac_ext >&5
  9203. rm -rf conftest*
  9204. eval "ac_cv_func_glXCreateGLXPixmap=no"
  9205. fi
  9206. rm -f conftest*
  9207. if eval "test \"`echo '$ac_cv_func_'glXCreateGLXPixmap`\" = yes"; then
  9208. echo "$ac_t""yes" 1>&6
  9209. cat >> confdefs.h <<\EOF
  9210. #define HAVE_PIXMAPS 1
  9211. EOF
  9212. else
  9213. echo "$ac_t""no" 1>&6
  9214. { echo "configure: error: *** Unable to locate ." 1>&2; exit 1; }
  9215. fi
  9216. LIBS=${ac_save_libs}
  9217. LDFLAGS=${ac_save_ldflags}
  9218. cat >> confdefs.h <<\EOF
  9219. #define OPENGL_X11 1
  9220. EOF
  9221. fi # $OPENGL_X11
  9222. if test "$OPENGL_AQUA" = 1 ; then
  9223. echo $ac_n "checking for location of OpenGL framework""... $ac_c" 1>&6
  9224. echo "configure:11447: checking for location of OpenGL framework" >&5
  9225. case "$with_opengl_framework" in
  9226. y | ye | yes | n | no)
  9227. { echo "configure: error: *** You must supply a directory to --with-opengl-framework." 1>&2; exit 1; }
  9228. ;;
  9229. esac
  9230. echo "$ac_t""$with_opengl_framework" 1>&6
  9231. if test -n "$with_opengl_framework"; then
  9232. if test -d $with_opengl_framework; then
  9233. OPENGLPATH="$OPENGLPATH -F$with_opengl_framework"
  9234. else
  9235. { echo "configure: error: *** OpenGL framework directory $dir does not exist." 1>&2; exit 1; }
  9236. fi
  9237. fi
  9238. ac_save_cppflags="$CPPFLAGS"
  9239. CPPFLAGS="$OPENGLPATH $CPPFLAGS"
  9240. for ac_hdr in OpenGL/gl.h OpenGL/glu.h
  9241. do
  9242. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  9243. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  9244. echo "configure:11471: checking for $ac_hdr" >&5
  9245. cat > conftest.$ac_ext <<EOF
  9246. #line 11474 "configure"
  9247. #include "confdefs.h"
  9248. #include <$ac_hdr>
  9249. EOF
  9250. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  9251. { (eval echo configure:11479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  9252. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  9253. if test -z "$ac_err"; then
  9254. rm -rf conftest*
  9255. eval "ac_cv_header_$ac_safe=yes"
  9256. else
  9257. echo "$ac_err" >&5
  9258. echo "configure: failed program was:" >&5
  9259. cat conftest.$ac_ext >&5
  9260. rm -rf conftest*
  9261. eval "ac_cv_header_$ac_safe=no"
  9262. fi
  9263. rm -f conftest*
  9264. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  9265. echo "$ac_t""yes" 1>&6
  9266. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9267. cat >> confdefs.h <<EOF
  9268. #define $ac_tr_hdr 1
  9269. EOF
  9270. else
  9271. echo "$ac_t""no" 1>&6
  9272. { echo "configure: error: *** Unable to locate OpenGL includes." 1>&2; exit 1; }
  9273. fi
  9274. done
  9275. CPPFLAGS=$ac_save_cppflags
  9276. ac_save_libs="$LIBS"
  9277. ac_save_ldflags="$LDFLAGS"
  9278. LIBS="-framework OpenGL -framework AGL -framework ApplicationServices $LIBS"
  9279. LDFLAGS="$OPENGLPATH $LDFLAGS"
  9280. echo $ac_n "checking for glBegin""... $ac_c" 1>&6
  9281. echo "configure:11515: checking for glBegin" >&5
  9282. cat > conftest.$ac_ext <<EOF
  9283. #line 11518 "configure"
  9284. #include "confdefs.h"
  9285. /* System header to define __stub macros and hopefully few prototypes,
  9286. which can conflict with char glBegin(); below. */
  9287. #include <assert.h>
  9288. /* Override any gcc2 internal prototype to avoid an error. */
  9289. /* We use char because int might match the return type of a gcc2
  9290. builtin and then its argument prototype would still apply. */
  9291. char glBegin();
  9292. int main() {
  9293. /* The GNU C library defines this for functions which it implements
  9294. to always fail with ENOSYS. Some functions are actually named
  9295. something starting with __ and the normal name is an alias. */
  9296. #if defined (__stub_glBegin) || defined (__stub___glBegin)
  9297. choke me
  9298. #else
  9299. glBegin();
  9300. #endif
  9301. ; return 0; }
  9302. EOF
  9303. if { (eval echo configure:11541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9304. rm -rf conftest*
  9305. eval "ac_cv_func_glBegin=yes"
  9306. else
  9307. echo "configure: failed program was:" >&5
  9308. cat conftest.$ac_ext >&5
  9309. rm -rf conftest*
  9310. eval "ac_cv_func_glBegin=no"
  9311. fi
  9312. rm -f conftest*
  9313. if eval "test \"`echo '$ac_cv_func_'glBegin`\" = yes"; then
  9314. echo "$ac_t""yes" 1>&6
  9315. OPENGLLIB="$OPENGLLIB -framework OpenGL -framework AGL -framework ApplicationServices"
  9316. else
  9317. echo "$ac_t""no" 1>&6
  9318. { echo "configure: error: *** Unable to locate glBegin." 1>&2; exit 1; }
  9319. fi
  9320. LIBS=${ac_save_libs}
  9321. LDFLAGS=${ac_save_ldflags}
  9322. ac_save_libs="$LIBS"
  9323. ac_save_ldflags="$LDFLAGS"
  9324. LIBS=" $OPENGLLIB $LIBS"
  9325. LDFLAGS="$OPENGLPATH $LDFLAGS"
  9326. echo $ac_n "checking for gluBeginCurve""... $ac_c" 1>&6
  9327. echo "configure:11578: checking for gluBeginCurve" >&5
  9328. cat > conftest.$ac_ext <<EOF
  9329. #line 11581 "configure"
  9330. #include "confdefs.h"
  9331. /* System header to define __stub macros and hopefully few prototypes,
  9332. which can conflict with char gluBeginCurve(); below. */
  9333. #include <assert.h>
  9334. /* Override any gcc2 internal prototype to avoid an error. */
  9335. /* We use char because int might match the return type of a gcc2
  9336. builtin and then its argument prototype would still apply. */
  9337. char gluBeginCurve();
  9338. int main() {
  9339. /* The GNU C library defines this for functions which it implements
  9340. to always fail with ENOSYS. Some functions are actually named
  9341. something starting with __ and the normal name is an alias. */
  9342. #if defined (__stub_gluBeginCurve) || defined (__stub___gluBeginCurve)
  9343. choke me
  9344. #else
  9345. gluBeginCurve();
  9346. #endif
  9347. ; return 0; }
  9348. EOF
  9349. if { (eval echo configure:11604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9350. rm -rf conftest*
  9351. eval "ac_cv_func_gluBeginCurve=yes"
  9352. else
  9353. echo "configure: failed program was:" >&5
  9354. cat conftest.$ac_ext >&5
  9355. rm -rf conftest*
  9356. eval "ac_cv_func_gluBeginCurve=no"
  9357. fi
  9358. rm -f conftest*
  9359. if eval "test \"`echo '$ac_cv_func_'gluBeginCurve`\" = yes"; then
  9360. echo "$ac_t""yes" 1>&6
  9361. OPENGLLIB="$OPENGLLIB "
  9362. else
  9363. echo "$ac_t""no" 1>&6
  9364. { echo "configure: error: *** Unable to locate gluBeginCurve." 1>&2; exit 1; }
  9365. fi
  9366. LIBS=${ac_save_libs}
  9367. LDFLAGS=${ac_save_ldflags}
  9368. OPENGLINC="$OPENGLPATH"
  9369. OPENGLLIBPATH="$OPENGLPATH"
  9370. cat >> confdefs.h <<\EOF
  9371. #define OPENGL_AQUA 1
  9372. EOF
  9373. fi # $OPENGL_AQUA
  9374. if test "$OPENGL_WINDOWS" = 1 ; then
  9375. # With OpenGL includes directory
  9376. echo $ac_n "checking for location of OpenGL includes""... $ac_c" 1>&6
  9377. echo "configure:11652: checking for location of OpenGL includes" >&5
  9378. case "$with_opengl_includes" in
  9379. y | ye | yes | n | no)
  9380. { echo "configure: error: *** You must supply a directory to --with-opengl-includes." 1>&2; exit 1; }
  9381. ;;
  9382. esac
  9383. echo "$ac_t""$with_opengl_includes" 1>&6
  9384. if test -n "$with_opengl_includes" ; then
  9385. for dir in $with_opengl_includes; do
  9386. if test -d "$dir"; then
  9387. OPENGLINC="$OPENGLINC -I$dir"
  9388. else
  9389. { echo "configure: error: *** OpenGL includes directory $dir does not exist." 1>&2; exit 1; }
  9390. fi
  9391. done
  9392. fi
  9393. ac_save_cppflags="$CPPFLAGS"
  9394. CPPFLAGS="$OPENGLINC $CPPFLAGS"
  9395. for ac_hdr in GL/gl.h GL/glu.h
  9396. do
  9397. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  9398. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  9399. echo "configure:11678: checking for $ac_hdr" >&5
  9400. cat > conftest.$ac_ext <<EOF
  9401. #line 11681 "configure"
  9402. #include "confdefs.h"
  9403. #include <$ac_hdr>
  9404. EOF
  9405. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  9406. { (eval echo configure:11686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  9407. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  9408. if test -z "$ac_err"; then
  9409. rm -rf conftest*
  9410. eval "ac_cv_header_$ac_safe=yes"
  9411. else
  9412. echo "$ac_err" >&5
  9413. echo "configure: failed program was:" >&5
  9414. cat conftest.$ac_ext >&5
  9415. rm -rf conftest*
  9416. eval "ac_cv_header_$ac_safe=no"
  9417. fi
  9418. rm -f conftest*
  9419. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  9420. echo "$ac_t""yes" 1>&6
  9421. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9422. cat >> confdefs.h <<EOF
  9423. #define $ac_tr_hdr 1
  9424. EOF
  9425. else
  9426. echo "$ac_t""no" 1>&6
  9427. { echo "configure: error: *** Unable to locate OpenGL includes." 1>&2; exit 1; }
  9428. fi
  9429. done
  9430. CPPFLAGS=$ac_save_cppflags
  9431. # With OpenGL library directory
  9432. echo $ac_n "checking for location of OpenGL library""... $ac_c" 1>&6
  9433. echo "configure:11720: checking for location of OpenGL library" >&5
  9434. case "$with_opengl_libs" in
  9435. y | ye | yes | n | no)
  9436. { echo "configure: error: *** You must supply a directory to --with-opengl-libs." 1>&2; exit 1; }
  9437. ;;
  9438. esac
  9439. echo "$ac_t""$with_opengl_libs" 1>&6
  9440. if test -n "$with_opengl_libs"; then
  9441. for dir in $with_opengl_libs; do
  9442. if test -d "$dir"; then
  9443. OPENGL_LIB_PATH="$OPENGL_LIB_PATH -L$dir"
  9444. else
  9445. { echo "configure: error: *** OpenGL library directory $dir does not exist." 1>&2; exit 1; }
  9446. fi
  9447. done
  9448. fi
  9449. ac_save_cflags="$CFLAGS"
  9450. CFLAGS="$CFLAGS $OPENGLINC"
  9451. ac_save_ldflags="$LDFLAGS"
  9452. ac_save_libs="$LIBS"
  9453. echo $ac_n "checking for OpenGL library""... $ac_c" 1>&6
  9454. echo "configure:11745: checking for OpenGL library" >&5
  9455. LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
  9456. LIBS="-lopengl32 "
  9457. cat > conftest.$ac_ext <<EOF
  9458. #line 11749 "configure"
  9459. #include "confdefs.h"
  9460. #include <GL/gl.h>
  9461. int main() {
  9462. glEnd();
  9463. ; return 0; }
  9464. EOF
  9465. if { (eval echo configure:11756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9466. rm -rf conftest*
  9467. echo "$ac_t""found" 1>&6
  9468. OPENGLLIB="$OPENGLLIB -lopengl32 "
  9469. else
  9470. echo "configure: failed program was:" >&5
  9471. cat conftest.$ac_ext >&5
  9472. rm -rf conftest*
  9473. { echo "configure: error: *** Unable to locate OpenGL library." 1>&2; exit 1; }
  9474. fi
  9475. rm -f conftest*
  9476. LIBS=${ac_save_libs}
  9477. LDFLAGS=${ac_save_ldflags}
  9478. ac_save_ldflags="$LDFLAGS"
  9479. ac_save_libs="$LIBS"
  9480. echo $ac_n "checking for GLU library""... $ac_c" 1>&6
  9481. echo "configure:11780: checking for GLU library" >&5
  9482. LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
  9483. LIBS="-lglu32 $OPENGLLIB "
  9484. cat > conftest.$ac_ext <<EOF
  9485. #line 11784 "configure"
  9486. #include "confdefs.h"
  9487. #include <GL/glu.h>
  9488. int main() {
  9489. gluNewQuadric();
  9490. ; return 0; }
  9491. EOF
  9492. if { (eval echo configure:11791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9493. rm -rf conftest*
  9494. echo "$ac_t""found" 1>&6
  9495. OPENGLULIB="$OPENGLULIB -lglu32 "
  9496. else
  9497. echo "configure: failed program was:" >&5
  9498. cat conftest.$ac_ext >&5
  9499. rm -rf conftest*
  9500. { echo "configure: error: *** Unable to locate GLU library." 1>&2; exit 1; }
  9501. fi
  9502. rm -f conftest*
  9503. LIBS=${ac_save_libs}
  9504. LDFLAGS=${ac_save_ldflags}
  9505. CFLAGS=${ac_save_cflags}
  9506. OPENGLLIB="$OPENGL_LIB_PATH $OPENGLLIB"
  9507. OPENGLULIB="$OPENGL_LIB_PATH $OPENGLULIB"
  9508. cat >> confdefs.h <<\EOF
  9509. #define OPENGL_WINDOWS 1
  9510. EOF
  9511. fi # $OPENGL_WINDOWS
  9512. fi # $USE_OPENGL
  9513. # Done checking OpenGL
  9514. # Enable ODBC option
  9515. echo $ac_n "checking whether to use ODBC""... $ac_c" 1>&6
  9516. echo "configure:11840: checking whether to use ODBC" >&5
  9517. echo "$ac_t"""$with_odbc"" 1>&6
  9518. case "$with_odbc" in
  9519. "no") USE_ODBC= ;;
  9520. "yes") USE_ODBC="1" ;;
  9521. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  9522. esac
  9523. ODBCINC=
  9524. ODBCLIB=
  9525. if test -n "$USE_ODBC"; then
  9526. # With ODBC includes directory
  9527. echo $ac_n "checking for location of ODBC includes""... $ac_c" 1>&6
  9528. echo "configure:11859: checking for location of ODBC includes" >&5
  9529. case "$with_odbc_includes" in
  9530. y | ye | yes | n | no)
  9531. { echo "configure: error: *** You must supply a directory to --with-odbc-includes." 1>&2; exit 1; }
  9532. ;;
  9533. esac
  9534. echo "$ac_t""$with_odbc_includes" 1>&6
  9535. if test -n "$with_odbc_includes" ; then
  9536. for dir in $with_odbc_includes; do
  9537. if test -d "$dir"; then
  9538. ODBCINC="$ODBCINC -I$dir"
  9539. else
  9540. { echo "configure: error: *** ODBC includes directory $dir does not exist." 1>&2; exit 1; }
  9541. fi
  9542. done
  9543. fi
  9544. ac_save_cppflags="$CPPFLAGS"
  9545. CPPFLAGS="$ODBCINC $CPPFLAGS"
  9546. for ac_hdr in sql.h
  9547. do
  9548. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  9549. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  9550. echo "configure:11885: checking for $ac_hdr" >&5
  9551. cat > conftest.$ac_ext <<EOF
  9552. #line 11888 "configure"
  9553. #include "confdefs.h"
  9554. #include <$ac_hdr>
  9555. EOF
  9556. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  9557. { (eval echo configure:11893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  9558. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  9559. if test -z "$ac_err"; then
  9560. rm -rf conftest*
  9561. eval "ac_cv_header_$ac_safe=yes"
  9562. else
  9563. echo "$ac_err" >&5
  9564. echo "configure: failed program was:" >&5
  9565. cat conftest.$ac_ext >&5
  9566. rm -rf conftest*
  9567. eval "ac_cv_header_$ac_safe=no"
  9568. fi
  9569. rm -f conftest*
  9570. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  9571. echo "$ac_t""yes" 1>&6
  9572. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9573. cat >> confdefs.h <<EOF
  9574. #define $ac_tr_hdr 1
  9575. EOF
  9576. else
  9577. echo "$ac_t""no" 1>&6
  9578. { echo "configure: error: *** Unable to locate ODBC includes." 1>&2; exit 1; }
  9579. fi
  9580. done
  9581. CPPFLAGS=$ac_save_cppflags
  9582. # With ODBC library directory
  9583. echo $ac_n "checking for location of ODBC library""... $ac_c" 1>&6
  9584. echo "configure:11927: checking for location of ODBC library" >&5
  9585. case "$with_odbc_libs" in
  9586. y | ye | yes | n | no)
  9587. { echo "configure: error: *** You must supply a directory to --with-odbc-libs." 1>&2; exit 1; }
  9588. ;;
  9589. esac
  9590. echo "$ac_t""$with_odbc_libs" 1>&6
  9591. if test -n "$with_odbc_libs"; then
  9592. for dir in $with_odbc_libs; do
  9593. if test -d "$dir"; then
  9594. ODBCLIB="$ODBCLIB -L$dir"
  9595. else
  9596. { echo "configure: error: *** ODBC library directory $dir does not exist." 1>&2; exit 1; }
  9597. fi
  9598. done
  9599. fi
  9600. ac_save_ldflags="$LDFLAGS"
  9601. LDFLAGS="$ODBCLIB $LDFLAGS"
  9602. echo $ac_n "checking for SQLConnect in -lodbc""... $ac_c" 1>&6
  9603. echo "configure:11952: checking for SQLConnect in -lodbc" >&5
  9604. ac_lib_var=`echo odbc'_'SQLConnect | sed 'y%./+-%__p_%'`
  9605. ac_save_LIBS="$LIBS"
  9606. LIBS="-lodbc $ICONVLIB $LIBS"
  9607. cat > conftest.$ac_ext <<EOF
  9608. #line 11958 "configure"
  9609. #include "confdefs.h"
  9610. /* Override any gcc2 internal prototype to avoid an error. */
  9611. /* We use char because int might match the return type of a gcc2
  9612. builtin and then its argument prototype would still apply. */
  9613. char SQLConnect();
  9614. int main() {
  9615. SQLConnect()
  9616. ; return 0; }
  9617. EOF
  9618. if { (eval echo configure:11969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9619. rm -rf conftest*
  9620. eval "ac_cv_lib_$ac_lib_var=yes"
  9621. else
  9622. echo "configure: failed program was:" >&5
  9623. cat conftest.$ac_ext >&5
  9624. rm -rf conftest*
  9625. eval "ac_cv_lib_$ac_lib_var=no"
  9626. fi
  9627. rm -f conftest*
  9628. LIBS="$ac_save_LIBS"
  9629. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9630. echo "$ac_t""yes" 1>&6
  9631. ODBCLIB="$ODBCLIB -lodbc "
  9632. else
  9633. echo "$ac_t""no" 1>&6
  9634. LDFLAGS=${ac_save_ldflags}
  9635. ac_save_ldflags="$LDFLAGS"
  9636. LDFLAGS="$ODBCLIB $LDFLAGS"
  9637. echo $ac_n "checking for SQLConnect in -liodbc""... $ac_c" 1>&6
  9638. echo "configure:11994: checking for SQLConnect in -liodbc" >&5
  9639. ac_lib_var=`echo iodbc'_'SQLConnect | sed 'y%./+-%__p_%'`
  9640. ac_save_LIBS="$LIBS"
  9641. LIBS="-liodbc $LIBS"
  9642. cat > conftest.$ac_ext <<EOF
  9643. #line 12000 "configure"
  9644. #include "confdefs.h"
  9645. /* Override any gcc2 internal prototype to avoid an error. */
  9646. /* We use char because int might match the return type of a gcc2
  9647. builtin and then its argument prototype would still apply. */
  9648. char SQLConnect();
  9649. int main() {
  9650. SQLConnect()
  9651. ; return 0; }
  9652. EOF
  9653. if { (eval echo configure:12011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9654. rm -rf conftest*
  9655. eval "ac_cv_lib_$ac_lib_var=yes"
  9656. else
  9657. echo "configure: failed program was:" >&5
  9658. cat conftest.$ac_ext >&5
  9659. rm -rf conftest*
  9660. eval "ac_cv_lib_$ac_lib_var=no"
  9661. fi
  9662. rm -f conftest*
  9663. LIBS="$ac_save_LIBS"
  9664. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9665. echo "$ac_t""yes" 1>&6
  9666. ODBCLIB="$ODBCLIB -liodbc "
  9667. else
  9668. echo "$ac_t""no" 1>&6
  9669. LDFLAGS=${ac_save_ldflags}
  9670. ac_save_cflags="$CFLAGS"
  9671. CFLAGS="$CFLAGS $ODBCINC"
  9672. ac_save_ldflags="$LDFLAGS"
  9673. ac_save_libs="$LIBS"
  9674. echo $ac_n "checking for ODBC library""... $ac_c" 1>&6
  9675. echo "configure:12036: checking for ODBC library" >&5
  9676. LDFLAGS="$ODBCLIB $LDFLAGS"
  9677. LIBS="-lodbc32 "
  9678. cat > conftest.$ac_ext <<EOF
  9679. #line 12040 "configure"
  9680. #include "confdefs.h"
  9681. #include <windows.h>
  9682. #include <sql.h>
  9683. int main() {
  9684. SQLAllocEnv((SQLHENV *)0);
  9685. ; return 0; }
  9686. EOF
  9687. if { (eval echo configure:12048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9688. rm -rf conftest*
  9689. echo "$ac_t""found" 1>&6
  9690. ODBCLIB="$ODBCLIB -lodbc32 "
  9691. else
  9692. echo "configure: failed program was:" >&5
  9693. cat conftest.$ac_ext >&5
  9694. rm -rf conftest*
  9695. { echo "configure: error: *** Unable to locate ODBC library." 1>&2; exit 1; }
  9696. fi
  9697. rm -f conftest*
  9698. LIBS=${ac_save_libs}
  9699. LDFLAGS=${ac_save_ldflags}
  9700. CFLAGS=${ac_save_cflags}
  9701. fi
  9702. LDFLAGS=${ac_save_ldflags}
  9703. fi
  9704. LDFLAGS=${ac_save_ldflags}
  9705. fi # $USE_ODBC
  9706. # Done checking ODBC
  9707. # Enable FFTW option
  9708. echo $ac_n "checking whether to use FFTW""... $ac_c" 1>&6
  9709. echo "configure:12097: checking whether to use FFTW" >&5
  9710. echo "$ac_t"""$with_fftw"" 1>&6
  9711. case "$with_fftw" in
  9712. "no") USE_FFTW= ;;
  9713. "yes") USE_FFTW="1" ;;
  9714. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  9715. esac
  9716. FFTWINC=
  9717. FFTWLIB=
  9718. if test -n "$USE_FFTW"; then
  9719. # With FFTW includes directory
  9720. echo $ac_n "checking for location of FFTW includes""... $ac_c" 1>&6
  9721. echo "configure:12116: checking for location of FFTW includes" >&5
  9722. case "$with_fftw_includes" in
  9723. y | ye | yes | n | no)
  9724. { echo "configure: error: *** You must supply a directory to --with-fftw-includes." 1>&2; exit 1; }
  9725. ;;
  9726. esac
  9727. echo "$ac_t""$with_fftw_includes" 1>&6
  9728. if test -n "$with_fftw_includes" ; then
  9729. for dir in $with_fftw_includes; do
  9730. if test -d "$dir"; then
  9731. FFTWINC="$FFTWINC -I$dir"
  9732. else
  9733. { echo "configure: error: *** FFTW includes directory $dir does not exist." 1>&2; exit 1; }
  9734. fi
  9735. done
  9736. fi
  9737. ac_save_cppflags="$CPPFLAGS"
  9738. CPPFLAGS="$FFTWINC $CPPFLAGS"
  9739. for ac_hdr in fftw3.h
  9740. do
  9741. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  9742. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  9743. echo "configure:12142: checking for $ac_hdr" >&5
  9744. cat > conftest.$ac_ext <<EOF
  9745. #line 12145 "configure"
  9746. #include "confdefs.h"
  9747. #include <$ac_hdr>
  9748. EOF
  9749. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  9750. { (eval echo configure:12150: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  9751. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  9752. if test -z "$ac_err"; then
  9753. rm -rf conftest*
  9754. eval "ac_cv_header_$ac_safe=yes"
  9755. else
  9756. echo "$ac_err" >&5
  9757. echo "configure: failed program was:" >&5
  9758. cat conftest.$ac_ext >&5
  9759. rm -rf conftest*
  9760. eval "ac_cv_header_$ac_safe=no"
  9761. fi
  9762. rm -f conftest*
  9763. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  9764. echo "$ac_t""yes" 1>&6
  9765. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9766. cat >> confdefs.h <<EOF
  9767. #define $ac_tr_hdr 1
  9768. EOF
  9769. else
  9770. echo "$ac_t""no" 1>&6
  9771. ac_save_cppflags="$CPPFLAGS"
  9772. CPPFLAGS=" $CPPFLAGS"
  9773. for ac_hdr in fftw.h
  9774. do
  9775. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  9776. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  9777. echo "configure:12178: checking for $ac_hdr" >&5
  9778. cat > conftest.$ac_ext <<EOF
  9779. #line 12181 "configure"
  9780. #include "confdefs.h"
  9781. #include <$ac_hdr>
  9782. EOF
  9783. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  9784. { (eval echo configure:12186: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  9785. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  9786. if test -z "$ac_err"; then
  9787. rm -rf conftest*
  9788. eval "ac_cv_header_$ac_safe=yes"
  9789. else
  9790. echo "$ac_err" >&5
  9791. echo "configure: failed program was:" >&5
  9792. cat conftest.$ac_ext >&5
  9793. rm -rf conftest*
  9794. eval "ac_cv_header_$ac_safe=no"
  9795. fi
  9796. rm -f conftest*
  9797. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  9798. echo "$ac_t""yes" 1>&6
  9799. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9800. cat >> confdefs.h <<EOF
  9801. #define $ac_tr_hdr 1
  9802. EOF
  9803. else
  9804. echo "$ac_t""no" 1>&6
  9805. ac_save_cppflags="$CPPFLAGS"
  9806. CPPFLAGS=" $CPPFLAGS"
  9807. for ac_hdr in dfftw.h
  9808. do
  9809. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  9810. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  9811. echo "configure:12214: checking for $ac_hdr" >&5
  9812. cat > conftest.$ac_ext <<EOF
  9813. #line 12217 "configure"
  9814. #include "confdefs.h"
  9815. #include <$ac_hdr>
  9816. EOF
  9817. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  9818. { (eval echo configure:12222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  9819. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  9820. if test -z "$ac_err"; then
  9821. rm -rf conftest*
  9822. eval "ac_cv_header_$ac_safe=yes"
  9823. else
  9824. echo "$ac_err" >&5
  9825. echo "configure: failed program was:" >&5
  9826. cat conftest.$ac_ext >&5
  9827. rm -rf conftest*
  9828. eval "ac_cv_header_$ac_safe=no"
  9829. fi
  9830. rm -f conftest*
  9831. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  9832. echo "$ac_t""yes" 1>&6
  9833. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9834. cat >> confdefs.h <<EOF
  9835. #define $ac_tr_hdr 1
  9836. EOF
  9837. else
  9838. echo "$ac_t""no" 1>&6
  9839. { echo "configure: error: *** Unable to locate FFTW includes." 1>&2; exit 1; }
  9840. fi
  9841. done
  9842. CPPFLAGS=$ac_save_cppflags
  9843. fi
  9844. done
  9845. CPPFLAGS=$ac_save_cppflags
  9846. fi
  9847. done
  9848. CPPFLAGS=$ac_save_cppflags
  9849. # With FFTW library directory
  9850. echo $ac_n "checking for location of FFTW library""... $ac_c" 1>&6
  9851. echo "configure:12268: checking for location of FFTW library" >&5
  9852. case "$with_fftw_libs" in
  9853. y | ye | yes | n | no)
  9854. { echo "configure: error: *** You must supply a directory to --with-fftw-libs." 1>&2; exit 1; }
  9855. ;;
  9856. esac
  9857. echo "$ac_t""$with_fftw_libs" 1>&6
  9858. if test -n "$with_fftw_libs"; then
  9859. for dir in $with_fftw_libs; do
  9860. if test -d "$dir"; then
  9861. FFTWLIB="$FFTWLIB -L$dir"
  9862. else
  9863. { echo "configure: error: *** FFTW library directory $dir does not exist." 1>&2; exit 1; }
  9864. fi
  9865. done
  9866. fi
  9867. ac_save_ldflags="$LDFLAGS"
  9868. LDFLAGS="$FFTWLIB $LDFLAGS"
  9869. echo $ac_n "checking for fftw_execute in -lfftw3""... $ac_c" 1>&6
  9870. echo "configure:12293: checking for fftw_execute in -lfftw3" >&5
  9871. ac_lib_var=`echo fftw3'_'fftw_execute | sed 'y%./+-%__p_%'`
  9872. ac_save_LIBS="$LIBS"
  9873. LIBS="-lfftw3 $MATHLIB $LIBS"
  9874. cat > conftest.$ac_ext <<EOF
  9875. #line 12299 "configure"
  9876. #include "confdefs.h"
  9877. /* Override any gcc2 internal prototype to avoid an error. */
  9878. /* We use char because int might match the return type of a gcc2
  9879. builtin and then its argument prototype would still apply. */
  9880. char fftw_execute();
  9881. int main() {
  9882. fftw_execute()
  9883. ; return 0; }
  9884. EOF
  9885. if { (eval echo configure:12310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9886. rm -rf conftest*
  9887. eval "ac_cv_lib_$ac_lib_var=yes"
  9888. else
  9889. echo "configure: failed program was:" >&5
  9890. cat conftest.$ac_ext >&5
  9891. rm -rf conftest*
  9892. eval "ac_cv_lib_$ac_lib_var=no"
  9893. fi
  9894. rm -f conftest*
  9895. LIBS="$ac_save_LIBS"
  9896. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9897. echo "$ac_t""yes" 1>&6
  9898. FFTWLIB="$FFTWLIB -lfftw3 $MATHLIB"
  9899. else
  9900. echo "$ac_t""no" 1>&6
  9901. LDFLAGS=${ac_save_ldflags}
  9902. ac_save_ldflags="$LDFLAGS"
  9903. LDFLAGS="$FFTWLIB $LDFLAGS"
  9904. echo $ac_n "checking for fftwnd_one in -lfftw""... $ac_c" 1>&6
  9905. echo "configure:12335: checking for fftwnd_one in -lfftw" >&5
  9906. ac_lib_var=`echo fftw'_'fftwnd_one | sed 'y%./+-%__p_%'`
  9907. ac_save_LIBS="$LIBS"
  9908. LIBS="-lfftw $MATHLIB $LIBS"
  9909. cat > conftest.$ac_ext <<EOF
  9910. #line 12341 "configure"
  9911. #include "confdefs.h"
  9912. /* Override any gcc2 internal prototype to avoid an error. */
  9913. /* We use char because int might match the return type of a gcc2
  9914. builtin and then its argument prototype would still apply. */
  9915. char fftwnd_one();
  9916. int main() {
  9917. fftwnd_one()
  9918. ; return 0; }
  9919. EOF
  9920. if { (eval echo configure:12352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9921. rm -rf conftest*
  9922. eval "ac_cv_lib_$ac_lib_var=yes"
  9923. else
  9924. echo "configure: failed program was:" >&5
  9925. cat conftest.$ac_ext >&5
  9926. rm -rf conftest*
  9927. eval "ac_cv_lib_$ac_lib_var=no"
  9928. fi
  9929. rm -f conftest*
  9930. LIBS="$ac_save_LIBS"
  9931. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9932. echo "$ac_t""yes" 1>&6
  9933. FFTWLIB="$FFTWLIB -lfftw $MATHLIB"
  9934. else
  9935. echo "$ac_t""no" 1>&6
  9936. LDFLAGS=${ac_save_ldflags}
  9937. ac_save_ldflags="$LDFLAGS"
  9938. LDFLAGS="$FFTWLIB $LDFLAGS"
  9939. echo $ac_n "checking for fftwnd_one in -ldfftw""... $ac_c" 1>&6
  9940. echo "configure:12377: checking for fftwnd_one in -ldfftw" >&5
  9941. ac_lib_var=`echo dfftw'_'fftwnd_one | sed 'y%./+-%__p_%'`
  9942. ac_save_LIBS="$LIBS"
  9943. LIBS="-ldfftw $MATHLIB $LIBS"
  9944. cat > conftest.$ac_ext <<EOF
  9945. #line 12383 "configure"
  9946. #include "confdefs.h"
  9947. /* Override any gcc2 internal prototype to avoid an error. */
  9948. /* We use char because int might match the return type of a gcc2
  9949. builtin and then its argument prototype would still apply. */
  9950. char fftwnd_one();
  9951. int main() {
  9952. fftwnd_one()
  9953. ; return 0; }
  9954. EOF
  9955. if { (eval echo configure:12394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9956. rm -rf conftest*
  9957. eval "ac_cv_lib_$ac_lib_var=yes"
  9958. else
  9959. echo "configure: failed program was:" >&5
  9960. cat conftest.$ac_ext >&5
  9961. rm -rf conftest*
  9962. eval "ac_cv_lib_$ac_lib_var=no"
  9963. fi
  9964. rm -f conftest*
  9965. LIBS="$ac_save_LIBS"
  9966. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9967. echo "$ac_t""yes" 1>&6
  9968. FFTWLIB="$FFTWLIB -ldfftw $MATHLIB"
  9969. else
  9970. echo "$ac_t""no" 1>&6
  9971. LDFLAGS=${ac_save_ldflags}
  9972. { echo "configure: error: *** Unable to locate FFTW library." 1>&2; exit 1; }
  9973. fi
  9974. LDFLAGS=${ac_save_ldflags}
  9975. fi
  9976. LDFLAGS=${ac_save_ldflags}
  9977. fi
  9978. LDFLAGS=${ac_save_ldflags}
  9979. fi # $USE_FFTW
  9980. # Done checking FFTW
  9981. # Enable BLAS option
  9982. echo $ac_n "checking whether to use BLAS""... $ac_c" 1>&6
  9983. echo "configure:12451: checking whether to use BLAS" >&5
  9984. echo "$ac_t"""$with_blas"" 1>&6
  9985. case "$with_blas" in
  9986. "no") USE_BLAS= ;;
  9987. "yes") USE_BLAS="1" ;;
  9988. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  9989. esac
  9990. BLASLIB=
  9991. BLASINC=
  9992. if test -n "$USE_BLAS"; then
  9993. # With BLAS includes directory
  9994. # BLAS doesn't have includes (FORTRAN library)
  9995. # With BLAS library directory
  9996. echo $ac_n "checking for location of BLAS includes""... $ac_c" 1>&6
  9997. echo "configure:12472: checking for location of BLAS includes" >&5
  9998. case "$with_blas_includes" in
  9999. y | ye | yes | n | no)
  10000. { echo "configure: error: *** You must supply a directory to --with-blas-includes." 1>&2; exit 1; }
  10001. ;;
  10002. esac
  10003. echo "$ac_t""$with_blas_includes" 1>&6
  10004. if test -n "$with_blas_includes" ; then
  10005. for dir in $with_blas_includes; do
  10006. if test -d "$dir"; then
  10007. BLASINC="$BLASINC -I$dir"
  10008. else
  10009. { echo "configure: error: *** BLAS includes directory $dir does not exist." 1>&2; exit 1; }
  10010. fi
  10011. done
  10012. fi
  10013. echo $ac_n "checking for location of BLAS library""... $ac_c" 1>&6
  10014. echo "configure:12492: checking for location of BLAS library" >&5
  10015. case "$with_blas_libs" in
  10016. y | ye | yes | n | no)
  10017. { echo "configure: error: *** You must supply a directory to --with-blas-libs." 1>&2; exit 1; }
  10018. ;;
  10019. esac
  10020. echo "$ac_t""$with_blas_libs" 1>&6
  10021. if test -n "$with_blas_libs"; then
  10022. for dir in $with_blas_libs; do
  10023. if test -d "$dir"; then
  10024. BLASLIB="$BLASLIB -L$dir"
  10025. else
  10026. { echo "configure: error: *** BLAS library directory $dir does not exist." 1>&2; exit 1; }
  10027. fi
  10028. done
  10029. fi
  10030. # See if cblas.h exists (CBLAS,ATLAS,others)
  10031. save_CPPFLAGS="$CPPFLAGS"
  10032. CPPFLAGS="$BLASINC $CPPFLAGS"
  10033. for ac_hdr in cblas.h
  10034. do
  10035. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10036. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  10037. echo "configure:12518: checking for $ac_hdr" >&5
  10038. cat > conftest.$ac_ext <<EOF
  10039. #line 12521 "configure"
  10040. #include "confdefs.h"
  10041. #include <$ac_hdr>
  10042. EOF
  10043. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  10044. { (eval echo configure:12526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  10045. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  10046. if test -z "$ac_err"; then
  10047. rm -rf conftest*
  10048. eval "ac_cv_header_$ac_safe=yes"
  10049. else
  10050. echo "$ac_err" >&5
  10051. echo "configure: failed program was:" >&5
  10052. cat conftest.$ac_ext >&5
  10053. rm -rf conftest*
  10054. eval "ac_cv_header_$ac_safe=no"
  10055. fi
  10056. rm -f conftest*
  10057. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  10058. echo "$ac_t""yes" 1>&6
  10059. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10060. cat >> confdefs.h <<EOF
  10061. #define $ac_tr_hdr 1
  10062. EOF
  10063. else
  10064. echo "$ac_t""no" 1>&6
  10065. fi
  10066. done
  10067. CPPFLAGS=$save_CPPFLAGS
  10068. ac_save_ldflags="$LDFLAGS"
  10069. LDFLAGS="$BLASLIB $LDFLAGS"
  10070. echo $ac_n "checking for dnrm2_ in -lblas""... $ac_c" 1>&6
  10071. echo "configure:12561: checking for dnrm2_ in -lblas" >&5
  10072. ac_lib_var=`echo blas'_'dnrm2_ | sed 'y%./+-%__p_%'`
  10073. ac_save_LIBS="$LIBS"
  10074. LIBS="-lblas $MATHLIB $LIBS"
  10075. cat > conftest.$ac_ext <<EOF
  10076. #line 12567 "configure"
  10077. #include "confdefs.h"
  10078. /* Override any gcc2 internal prototype to avoid an error. */
  10079. /* We use char because int might match the return type of a gcc2
  10080. builtin and then its argument prototype would still apply. */
  10081. char dnrm2_();
  10082. int main() {
  10083. dnrm2_()
  10084. ; return 0; }
  10085. EOF
  10086. if { (eval echo configure:12578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10087. rm -rf conftest*
  10088. eval "ac_cv_lib_$ac_lib_var=yes"
  10089. else
  10090. echo "configure: failed program was:" >&5
  10091. cat conftest.$ac_ext >&5
  10092. rm -rf conftest*
  10093. eval "ac_cv_lib_$ac_lib_var=no"
  10094. fi
  10095. rm -f conftest*
  10096. LIBS="$ac_save_LIBS"
  10097. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10098. echo "$ac_t""yes" 1>&6
  10099. BLASLIB="$BLASLIB -lblas "
  10100. else
  10101. echo "$ac_t""no" 1>&6
  10102. echo $ac_n "checking for dnrm2_ in -lblas""... $ac_c" 1>&6
  10103. echo "configure:12597: checking for dnrm2_ in -lblas" >&5
  10104. ac_lib_var=`echo blas'_'dnrm2_ | sed 'y%./+-%__p_%'`
  10105. ac_save_LIBS="$LIBS"
  10106. LIBS="-lblas $MATHLIB -lg2c $LIBS"
  10107. cat > conftest.$ac_ext <<EOF
  10108. #line 12603 "configure"
  10109. #include "confdefs.h"
  10110. /* Override any gcc2 internal prototype to avoid an error. */
  10111. /* We use char because int might match the return type of a gcc2
  10112. builtin and then its argument prototype would still apply. */
  10113. char dnrm2_();
  10114. int main() {
  10115. dnrm2_()
  10116. ; return 0; }
  10117. EOF
  10118. if { (eval echo configure:12614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10119. rm -rf conftest*
  10120. eval "ac_cv_lib_$ac_lib_var=yes"
  10121. else
  10122. echo "configure: failed program was:" >&5
  10123. cat conftest.$ac_ext >&5
  10124. rm -rf conftest*
  10125. eval "ac_cv_lib_$ac_lib_var=no"
  10126. fi
  10127. rm -f conftest*
  10128. LIBS="$ac_save_LIBS"
  10129. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10130. echo "$ac_t""yes" 1>&6
  10131. BLASLIB="$BLASLIB -lblas -lg2c"
  10132. else
  10133. echo "$ac_t""no" 1>&6
  10134. LDFLAGS=${ac_save_ldflags}
  10135. { echo "configure: error: *** Unable to locate BLAS library." 1>&2; exit 1; }
  10136. fi
  10137. fi
  10138. LDFLAGS=${ac_save_ldflags}
  10139. blas_ok=no
  10140. # Check for ATLAS
  10141. save_LDFLAGS="$LDFLAGS"
  10142. LDFLAGS="$BLASLIB $LDFLAGS"
  10143. echo $ac_n "checking for ATL_xerbla in -latlas""... $ac_c" 1>&6
  10144. echo "configure:12658: checking for ATL_xerbla in -latlas" >&5
  10145. ac_lib_var=`echo atlas'_'ATL_xerbla | sed 'y%./+-%__p_%'`
  10146. ac_save_LIBS="$LIBS"
  10147. LIBS="-latlas $LIBS"
  10148. cat > conftest.$ac_ext <<EOF
  10149. #line 12664 "configure"
  10150. #include "confdefs.h"
  10151. /* Override any gcc2 internal prototype to avoid an error. */
  10152. /* We use char because int might match the return type of a gcc2
  10153. builtin and then its argument prototype would still apply. */
  10154. char ATL_xerbla();
  10155. int main() {
  10156. ATL_xerbla()
  10157. ; return 0; }
  10158. EOF
  10159. if { (eval echo configure:12675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10160. rm -rf conftest*
  10161. eval "ac_cv_lib_$ac_lib_var=yes"
  10162. else
  10163. echo "configure: failed program was:" >&5
  10164. cat conftest.$ac_ext >&5
  10165. rm -rf conftest*
  10166. eval "ac_cv_lib_$ac_lib_var=no"
  10167. fi
  10168. rm -f conftest*
  10169. LIBS="$ac_save_LIBS"
  10170. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10171. echo "$ac_t""yes" 1>&6
  10172. echo $ac_n "checking for sgemm_ in -lf77blas""... $ac_c" 1>&6
  10173. echo "configure:12690: checking for sgemm_ in -lf77blas" >&5
  10174. ac_lib_var=`echo f77blas'_'sgemm_ | sed 'y%./+-%__p_%'`
  10175. ac_save_LIBS="$LIBS"
  10176. LIBS="-lf77blas -latlas $LIBS"
  10177. cat > conftest.$ac_ext <<EOF
  10178. #line 12696 "configure"
  10179. #include "confdefs.h"
  10180. /* Override any gcc2 internal prototype to avoid an error. */
  10181. /* We use char because int might match the return type of a gcc2
  10182. builtin and then its argument prototype would still apply. */
  10183. char sgemm_();
  10184. int main() {
  10185. sgemm_()
  10186. ; return 0; }
  10187. EOF
  10188. if { (eval echo configure:12707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10189. rm -rf conftest*
  10190. eval "ac_cv_lib_$ac_lib_var=yes"
  10191. else
  10192. echo "configure: failed program was:" >&5
  10193. cat conftest.$ac_ext >&5
  10194. rm -rf conftest*
  10195. eval "ac_cv_lib_$ac_lib_var=no"
  10196. fi
  10197. rm -f conftest*
  10198. LIBS="$ac_save_LIBS"
  10199. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10200. echo "$ac_t""yes" 1>&6
  10201. echo $ac_n "checking for cblas_dgemm in -lcblas""... $ac_c" 1>&6
  10202. echo "configure:12722: checking for cblas_dgemm in -lcblas" >&5
  10203. ac_lib_var=`echo cblas'_'cblas_dgemm | sed 'y%./+-%__p_%'`
  10204. ac_save_LIBS="$LIBS"
  10205. LIBS="-lcblas -lf77blas -latlas $LIBS"
  10206. cat > conftest.$ac_ext <<EOF
  10207. #line 12728 "configure"
  10208. #include "confdefs.h"
  10209. /* Override any gcc2 internal prototype to avoid an error. */
  10210. /* We use char because int might match the return type of a gcc2
  10211. builtin and then its argument prototype would still apply. */
  10212. char cblas_dgemm();
  10213. int main() {
  10214. cblas_dgemm()
  10215. ; return 0; }
  10216. EOF
  10217. if { (eval echo configure:12739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10218. rm -rf conftest*
  10219. eval "ac_cv_lib_$ac_lib_var=yes"
  10220. else
  10221. echo "configure: failed program was:" >&5
  10222. cat conftest.$ac_ext >&5
  10223. rm -rf conftest*
  10224. eval "ac_cv_lib_$ac_lib_var=no"
  10225. fi
  10226. rm -f conftest*
  10227. LIBS="$ac_save_LIBS"
  10228. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10229. echo "$ac_t""yes" 1>&6
  10230. blas_ok=yes; BLASLIB="-lcblas -lf77blas -latlas"
  10231. else
  10232. echo "$ac_t""no" 1>&6
  10233. fi
  10234. else
  10235. echo "$ac_t""no" 1>&6
  10236. fi
  10237. else
  10238. echo "$ac_t""no" 1>&6
  10239. fi
  10240. LDFLAGS="$save_LDFLAGS"
  10241. # Do we have ATLAS?
  10242. if test $blas_ok = yes; then
  10243. cat >> confdefs.h <<\EOF
  10244. #define HAVE_LIBATLAS 1
  10245. EOF
  10246. fi
  10247. # BLAS in Apple vecLib framework? (Mac OS-X)
  10248. if test -n "$MACOSX_APP"; then
  10249. if test $blas_ok = no; then
  10250. vlib_flags="-framework vecLib"
  10251. save_LIBS="$LIBS"
  10252. LIBS="$vlib_flags $LIBS"
  10253. echo $ac_n "checking for sgemm in $vlib_flags""... $ac_c" 1>&6
  10254. echo "configure:12784: checking for sgemm in $vlib_flags" >&5
  10255. cat > conftest.$ac_ext <<EOF
  10256. #line 12786 "configure"
  10257. #include "confdefs.h"
  10258. int main() {
  10259. sgemm
  10260. ; return 0; }
  10261. EOF
  10262. if { (eval echo configure:12793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10263. rm -rf conftest*
  10264. blas_ok=yes; BLASLIB="$vlib_flags"
  10265. else
  10266. echo "configure: failed program was:" >&5
  10267. cat conftest.$ac_ext >&5
  10268. rm -rf conftest*
  10269. BLASLIB=""
  10270. fi
  10271. rm -f conftest*
  10272. echo "$ac_t""$blas_ok" 1>&6
  10273. LIBS="$save_LIBS"
  10274. fi
  10275. fi # $MACOSX_APP
  10276. # BLAS in PhiPACK libraries? (requires generic BLAS, too)
  10277. if test $blas_ok = no; then
  10278. echo $ac_n "checking for sgemm_ in -lblas""... $ac_c" 1>&6
  10279. echo "configure:12811: checking for sgemm_ in -lblas" >&5
  10280. ac_lib_var=`echo blas'_'sgemm_ | sed 'y%./+-%__p_%'`
  10281. ac_save_LIBS="$LIBS"
  10282. LIBS="-lblas $LIBS"
  10283. cat > conftest.$ac_ext <<EOF
  10284. #line 12817 "configure"
  10285. #include "confdefs.h"
  10286. /* Override any gcc2 internal prototype to avoid an error. */
  10287. /* We use char because int might match the return type of a gcc2
  10288. builtin and then its argument prototype would still apply. */
  10289. char sgemm_();
  10290. int main() {
  10291. sgemm_()
  10292. ; return 0; }
  10293. EOF
  10294. if { (eval echo configure:12828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10295. rm -rf conftest*
  10296. eval "ac_cv_lib_$ac_lib_var=yes"
  10297. else
  10298. echo "configure: failed program was:" >&5
  10299. cat conftest.$ac_ext >&5
  10300. rm -rf conftest*
  10301. eval "ac_cv_lib_$ac_lib_var=no"
  10302. fi
  10303. rm -f conftest*
  10304. LIBS="$ac_save_LIBS"
  10305. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10306. echo "$ac_t""yes" 1>&6
  10307. echo $ac_n "checking for dgemm_ in -ldgemm""... $ac_c" 1>&6
  10308. echo "configure:12843: checking for dgemm_ in -ldgemm" >&5
  10309. ac_lib_var=`echo dgemm'_'dgemm_ | sed 'y%./+-%__p_%'`
  10310. ac_save_LIBS="$LIBS"
  10311. LIBS="-ldgemm -lblas $LIBS"
  10312. cat > conftest.$ac_ext <<EOF
  10313. #line 12849 "configure"
  10314. #include "confdefs.h"
  10315. /* Override any gcc2 internal prototype to avoid an error. */
  10316. /* We use char because int might match the return type of a gcc2
  10317. builtin and then its argument prototype would still apply. */
  10318. char dgemm_();
  10319. int main() {
  10320. dgemm_()
  10321. ; return 0; }
  10322. EOF
  10323. if { (eval echo configure:12860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10324. rm -rf conftest*
  10325. eval "ac_cv_lib_$ac_lib_var=yes"
  10326. else
  10327. echo "configure: failed program was:" >&5
  10328. cat conftest.$ac_ext >&5
  10329. rm -rf conftest*
  10330. eval "ac_cv_lib_$ac_lib_var=no"
  10331. fi
  10332. rm -f conftest*
  10333. LIBS="$ac_save_LIBS"
  10334. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10335. echo "$ac_t""yes" 1>&6
  10336. echo $ac_n "checking for sgemm_ in -lsgemm""... $ac_c" 1>&6
  10337. echo "configure:12875: checking for sgemm_ in -lsgemm" >&5
  10338. ac_lib_var=`echo sgemm'_'sgemm_ | sed 'y%./+-%__p_%'`
  10339. ac_save_LIBS="$LIBS"
  10340. LIBS="-lsgemm -lblas $LIBS"
  10341. cat > conftest.$ac_ext <<EOF
  10342. #line 12881 "configure"
  10343. #include "confdefs.h"
  10344. /* Override any gcc2 internal prototype to avoid an error. */
  10345. /* We use char because int might match the return type of a gcc2
  10346. builtin and then its argument prototype would still apply. */
  10347. char sgemm_();
  10348. int main() {
  10349. sgemm_()
  10350. ; return 0; }
  10351. EOF
  10352. if { (eval echo configure:12892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10353. rm -rf conftest*
  10354. eval "ac_cv_lib_$ac_lib_var=yes"
  10355. else
  10356. echo "configure: failed program was:" >&5
  10357. cat conftest.$ac_ext >&5
  10358. rm -rf conftest*
  10359. eval "ac_cv_lib_$ac_lib_var=no"
  10360. fi
  10361. rm -f conftest*
  10362. LIBS="$ac_save_LIBS"
  10363. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10364. echo "$ac_t""yes" 1>&6
  10365. blas_ok=yes; BLASLIB="-lsgemm -ldgemm -lblas"
  10366. else
  10367. echo "$ac_t""no" 1>&6
  10368. fi
  10369. else
  10370. echo "$ac_t""no" 1>&6
  10371. fi
  10372. else
  10373. echo "$ac_t""no" 1>&6
  10374. fi
  10375. fi
  10376. # BLAS in Sun Performance library?
  10377. if test $blas_ok = no; then
  10378. if test "x$GCC" != xyes; then # only works with Sun CC
  10379. echo $ac_n "checking for acosp in -lsunmath""... $ac_c" 1>&6
  10380. echo "configure:12926: checking for acosp in -lsunmath" >&5
  10381. ac_lib_var=`echo sunmath'_'acosp | sed 'y%./+-%__p_%'`
  10382. ac_save_LIBS="$LIBS"
  10383. LIBS="-lsunmath $LIBS"
  10384. cat > conftest.$ac_ext <<EOF
  10385. #line 12932 "configure"
  10386. #include "confdefs.h"
  10387. /* Override any gcc2 internal prototype to avoid an error. */
  10388. /* We use char because int might match the return type of a gcc2
  10389. builtin and then its argument prototype would still apply. */
  10390. char acosp();
  10391. int main() {
  10392. acosp()
  10393. ; return 0; }
  10394. EOF
  10395. if { (eval echo configure:12943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10396. rm -rf conftest*
  10397. eval "ac_cv_lib_$ac_lib_var=yes"
  10398. else
  10399. echo "configure: failed program was:" >&5
  10400. cat conftest.$ac_ext >&5
  10401. rm -rf conftest*
  10402. eval "ac_cv_lib_$ac_lib_var=no"
  10403. fi
  10404. rm -f conftest*
  10405. LIBS="$ac_save_LIBS"
  10406. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10407. echo "$ac_t""yes" 1>&6
  10408. echo $ac_n "checking for sgemm_ in -lsunperf""... $ac_c" 1>&6
  10409. echo "configure:12958: checking for sgemm_ in -lsunperf" >&5
  10410. ac_lib_var=`echo sunperf'_'sgemm_ | sed 'y%./+-%__p_%'`
  10411. ac_save_LIBS="$LIBS"
  10412. LIBS="-lsunperf -lsunmath $LIBS"
  10413. cat > conftest.$ac_ext <<EOF
  10414. #line 12964 "configure"
  10415. #include "confdefs.h"
  10416. /* Override any gcc2 internal prototype to avoid an error. */
  10417. /* We use char because int might match the return type of a gcc2
  10418. builtin and then its argument prototype would still apply. */
  10419. char sgemm_();
  10420. int main() {
  10421. sgemm_()
  10422. ; return 0; }
  10423. EOF
  10424. if { (eval echo configure:12975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10425. rm -rf conftest*
  10426. eval "ac_cv_lib_$ac_lib_var=yes"
  10427. else
  10428. echo "configure: failed program was:" >&5
  10429. cat conftest.$ac_ext >&5
  10430. rm -rf conftest*
  10431. eval "ac_cv_lib_$ac_lib_var=no"
  10432. fi
  10433. rm -f conftest*
  10434. LIBS="$ac_save_LIBS"
  10435. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10436. echo "$ac_t""yes" 1>&6
  10437. blas_ok=yes; BLASLIB="-xlic_lib=sunperf -lsunmath"
  10438. else
  10439. echo "$ac_t""no" 1>&6
  10440. fi
  10441. else
  10442. echo "$ac_t""no" 1>&6
  10443. fi
  10444. fi
  10445. fi
  10446. # Generic BLAS library
  10447. if test $blas_ok = no; then
  10448. echo $ac_n "checking for sgemm_ in -lblas""... $ac_c" 1>&6
  10449. echo "configure:13005: checking for sgemm_ in -lblas" >&5
  10450. ac_lib_var=`echo blas'_'sgemm_ | sed 'y%./+-%__p_%'`
  10451. ac_save_LIBS="$LIBS"
  10452. LIBS="-lblas $LIBS"
  10453. cat > conftest.$ac_ext <<EOF
  10454. #line 13011 "configure"
  10455. #include "confdefs.h"
  10456. /* Override any gcc2 internal prototype to avoid an error. */
  10457. /* We use char because int might match the return type of a gcc2
  10458. builtin and then its argument prototype would still apply. */
  10459. char sgemm_();
  10460. int main() {
  10461. sgemm_()
  10462. ; return 0; }
  10463. EOF
  10464. if { (eval echo configure:13022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10465. rm -rf conftest*
  10466. eval "ac_cv_lib_$ac_lib_var=yes"
  10467. else
  10468. echo "configure: failed program was:" >&5
  10469. cat conftest.$ac_ext >&5
  10470. rm -rf conftest*
  10471. eval "ac_cv_lib_$ac_lib_var=no"
  10472. fi
  10473. rm -f conftest*
  10474. LIBS="$ac_save_LIBS"
  10475. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10476. echo "$ac_t""yes" 1>&6
  10477. blas_ok=yes; BLASLIB="-lblas"
  10478. else
  10479. echo "$ac_t""no" 1>&6
  10480. fi
  10481. fi
  10482. if test $blas_ok = yes; then
  10483. cat >> confdefs.h <<\EOF
  10484. #define HAVE_LIBBLAS 1
  10485. EOF
  10486. fi
  10487. fi # $USE_BLAS
  10488. # Done checking BLAS
  10489. # Enable LAPACK option
  10490. echo $ac_n "checking whether to use LAPACK""... $ac_c" 1>&6
  10491. echo "configure:13061: checking whether to use LAPACK" >&5
  10492. echo "$ac_t"""$with_lapack"" 1>&6
  10493. case "$with_lapack" in
  10494. "no") USE_LAPACK= ;;
  10495. "yes") USE_LAPACK="1" ;;
  10496. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10497. esac
  10498. LAPACKLIB=
  10499. LAPACKINC=
  10500. # LAPACK is useless without BLAS
  10501. if test -n "$USE_BLAS"; then
  10502. if test -n "$USE_LAPACK"; then
  10503. # With LAPACK includes directory
  10504. # LAPACK doesn't have includes (FORTRAN library)
  10505. # With LAPACK library directory
  10506. lapack_ok=no
  10507. echo $ac_n "checking for location of LAPACK includes""... $ac_c" 1>&6
  10508. echo "configure:13086: checking for location of LAPACK includes" >&5
  10509. case "$with_lapack_includes" in
  10510. y | ye | yes | n | no)
  10511. { echo "configure: error: *** You must supply a directory to --with-lapack-includes." 1>&2; exit 1; }
  10512. ;;
  10513. esac
  10514. echo "$ac_t""$with_lapack_includes" 1>&6
  10515. if test -n "$with_lapack_includes" ; then
  10516. for dir in $with_lapack_includes; do
  10517. if test -d "$dir"; then
  10518. LAPACKINC="$LAPACKINC -I$dir"
  10519. else
  10520. { echo "configure: error: *** LAPACK includes directory $dir does not exist." 1>&2; exit 1; }
  10521. fi
  10522. done
  10523. fi
  10524. echo $ac_n "checking for location of LAPACK library""... $ac_c" 1>&6
  10525. echo "configure:13106: checking for location of LAPACK library" >&5
  10526. case "$with_lapack_libs" in
  10527. y | ye | yes | n | no)
  10528. { echo "configure: error: *** You must supply a directory to --with-lapack-libs." 1>&2; exit 1; }
  10529. ;;
  10530. esac
  10531. echo "$ac_t""$with_lapack_libs" 1>&6
  10532. if test -n "$with_lapack_libs"; then
  10533. for dir in $with_lapack_libs; do
  10534. if test -d "$dir"; then
  10535. LAPACKLIB="$LAPACKLIB -L$dir"
  10536. else
  10537. { echo "configure: error: *** LAPACK library directory $dir does not exist." 1>&2; exit 1; }
  10538. fi
  10539. done
  10540. fi
  10541. # See if clapack.h exists (ATLAS)
  10542. save_CPPFLAGS="$CPPFLAGS"
  10543. CPPFLAGS="$LAPACKINC $CPPFLAGS"
  10544. for ac_hdr in clapack.h
  10545. do
  10546. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10547. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  10548. echo "configure:13132: checking for $ac_hdr" >&5
  10549. cat > conftest.$ac_ext <<EOF
  10550. #line 13135 "configure"
  10551. #include "confdefs.h"
  10552. #include <$ac_hdr>
  10553. EOF
  10554. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  10555. { (eval echo configure:13140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  10556. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  10557. if test -z "$ac_err"; then
  10558. rm -rf conftest*
  10559. eval "ac_cv_header_$ac_safe=yes"
  10560. else
  10561. echo "$ac_err" >&5
  10562. echo "configure: failed program was:" >&5
  10563. cat conftest.$ac_ext >&5
  10564. rm -rf conftest*
  10565. eval "ac_cv_header_$ac_safe=no"
  10566. fi
  10567. rm -f conftest*
  10568. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  10569. echo "$ac_t""yes" 1>&6
  10570. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10571. cat >> confdefs.h <<EOF
  10572. #define $ac_tr_hdr 1
  10573. EOF
  10574. else
  10575. echo "$ac_t""no" 1>&6
  10576. fi
  10577. done
  10578. CPPFLAGS=$save_CPPFLAGS
  10579. # LAPACK linked to by default?
  10580. if test lapack_ok=no; then
  10581. save_LIBS="$LIBS"; LIBS="$LIBS $BLASLIB $MATHLIB $FLIBS"
  10582. save_LDFLAGS="$LDFLAGS"; LDFLAGS="$LAPACKLIB $LDFLAGS"
  10583. echo $ac_n "checking for dsegv_""... $ac_c" 1>&6
  10584. echo "configure:13172: checking for dsegv_" >&5
  10585. cat > conftest.$ac_ext <<EOF
  10586. #line 13175 "configure"
  10587. #include "confdefs.h"
  10588. /* System header to define __stub macros and hopefully few prototypes,
  10589. which can conflict with char dsegv_(); below. */
  10590. #include <assert.h>
  10591. /* Override any gcc2 internal prototype to avoid an error. */
  10592. /* We use char because int might match the return type of a gcc2
  10593. builtin and then its argument prototype would still apply. */
  10594. char dsegv_();
  10595. int main() {
  10596. /* The GNU C library defines this for functions which it implements
  10597. to always fail with ENOSYS. Some functions are actually named
  10598. something starting with __ and the normal name is an alias. */
  10599. #if defined (__stub_dsegv_) || defined (__stub___dsegv_)
  10600. choke me
  10601. #else
  10602. dsegv_();
  10603. #endif
  10604. ; return 0; }
  10605. EOF
  10606. if { (eval echo configure:13198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10607. rm -rf conftest*
  10608. eval "ac_cv_func_dsegv_=yes"
  10609. else
  10610. echo "configure: failed program was:" >&5
  10611. cat conftest.$ac_ext >&5
  10612. rm -rf conftest*
  10613. eval "ac_cv_func_dsegv_=no"
  10614. fi
  10615. rm -f conftest*
  10616. if eval "test \"`echo '$ac_cv_func_'dsegv_`\" = yes"; then
  10617. echo "$ac_t""yes" 1>&6
  10618. lapack_ok=yes
  10619. else
  10620. echo "$ac_t""no" 1>&6
  10621. fi
  10622. LIBS="$save_LIBS"
  10623. LDFLAGS="$save_LDFLAGS"
  10624. fi
  10625. # Generic LAPACK library?
  10626. if test $lapack_ok = no; then
  10627. save_libs="$LIBS"; LIBS="$BLASLIB $MATHLIB $LIBS"
  10628. save_LDFLAGS="$LDFLAGS"; LDFLAGS="$LAPACKLIB $LDFLAGS"
  10629. echo $ac_n "checking for desgv_ in -llapack""... $ac_c" 1>&6
  10630. echo "configure:13225: checking for desgv_ in -llapack" >&5
  10631. ac_lib_var=`echo lapack'_'desgv_ | sed 'y%./+-%__p_%'`
  10632. ac_save_LIBS="$LIBS"
  10633. LIBS="-llapack $FLIBS $LIBS"
  10634. cat > conftest.$ac_ext <<EOF
  10635. #line 13231 "configure"
  10636. #include "confdefs.h"
  10637. /* Override any gcc2 internal prototype to avoid an error. */
  10638. /* We use char because int might match the return type of a gcc2
  10639. builtin and then its argument prototype would still apply. */
  10640. char desgv_();
  10641. int main() {
  10642. desgv_()
  10643. ; return 0; }
  10644. EOF
  10645. if { (eval echo configure:13242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10646. rm -rf conftest*
  10647. eval "ac_cv_lib_$ac_lib_var=yes"
  10648. else
  10649. echo "configure: failed program was:" >&5
  10650. cat conftest.$ac_ext >&5
  10651. rm -rf conftest*
  10652. eval "ac_cv_lib_$ac_lib_var=no"
  10653. fi
  10654. rm -f conftest*
  10655. LIBS="$ac_save_LIBS"
  10656. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10657. echo "$ac_t""yes" 1>&6
  10658. lapack_ok=yes; LAPACKLIB="-llapack"
  10659. else
  10660. echo "$ac_t""no" 1>&6
  10661. fi
  10662. LIBS="$save_LIBS"
  10663. LDFLAGS="$save_LDFLAGS"
  10664. fi
  10665. if test $lapack_ok = no; then
  10666. ac_save_ldflags="$LDFLAGS"
  10667. LDFLAGS="$LAPACKLIB $LDFLAGS"
  10668. echo $ac_n "checking for dgesv_ in -llapack""... $ac_c" 1>&6
  10669. echo "configure:13274: checking for dgesv_ in -llapack" >&5
  10670. ac_lib_var=`echo lapack'_'dgesv_ | sed 'y%./+-%__p_%'`
  10671. ac_save_LIBS="$LIBS"
  10672. LIBS="-llapack $BLASLIB $MATHLIB $LIBS"
  10673. cat > conftest.$ac_ext <<EOF
  10674. #line 13280 "configure"
  10675. #include "confdefs.h"
  10676. /* Override any gcc2 internal prototype to avoid an error. */
  10677. /* We use char because int might match the return type of a gcc2
  10678. builtin and then its argument prototype would still apply. */
  10679. char dgesv_();
  10680. int main() {
  10681. dgesv_()
  10682. ; return 0; }
  10683. EOF
  10684. if { (eval echo configure:13291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10685. rm -rf conftest*
  10686. eval "ac_cv_lib_$ac_lib_var=yes"
  10687. else
  10688. echo "configure: failed program was:" >&5
  10689. cat conftest.$ac_ext >&5
  10690. rm -rf conftest*
  10691. eval "ac_cv_lib_$ac_lib_var=no"
  10692. fi
  10693. rm -f conftest*
  10694. LIBS="$ac_save_LIBS"
  10695. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10696. echo "$ac_t""yes" 1>&6
  10697. LAPACKLIB="$LAPACKLIB -llapack "
  10698. else
  10699. echo "$ac_t""no" 1>&6
  10700. echo $ac_n "checking for dgesv_ in -llapack""... $ac_c" 1>&6
  10701. echo "configure:13310: checking for dgesv_ in -llapack" >&5
  10702. ac_lib_var=`echo lapack'_'dgesv_ | sed 'y%./+-%__p_%'`
  10703. ac_save_LIBS="$LIBS"
  10704. LIBS="-llapack $BLASLIB $MATHLIB -lg2c $LIBS"
  10705. cat > conftest.$ac_ext <<EOF
  10706. #line 13316 "configure"
  10707. #include "confdefs.h"
  10708. /* Override any gcc2 internal prototype to avoid an error. */
  10709. /* We use char because int might match the return type of a gcc2
  10710. builtin and then its argument prototype would still apply. */
  10711. char dgesv_();
  10712. int main() {
  10713. dgesv_()
  10714. ; return 0; }
  10715. EOF
  10716. if { (eval echo configure:13327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10717. rm -rf conftest*
  10718. eval "ac_cv_lib_$ac_lib_var=yes"
  10719. else
  10720. echo "configure: failed program was:" >&5
  10721. cat conftest.$ac_ext >&5
  10722. rm -rf conftest*
  10723. eval "ac_cv_lib_$ac_lib_var=no"
  10724. fi
  10725. rm -f conftest*
  10726. LIBS="$ac_save_LIBS"
  10727. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10728. echo "$ac_t""yes" 1>&6
  10729. LAPACKLIB="$LAPACKLIB -llapack -lg2c"
  10730. else
  10731. echo "$ac_t""no" 1>&6
  10732. LDFLAGS=${ac_save_ldflags}
  10733. { echo "configure: error: *** Unable to locate LAPACK library." 1>&2; exit 1; }
  10734. fi
  10735. fi
  10736. LDFLAGS=${ac_save_ldflags}
  10737. fi
  10738. cat >> confdefs.h <<\EOF
  10739. #define HAVE_LIBLAPACK 1
  10740. EOF
  10741. fi # $USE_LAPACK
  10742. fi # $USE_BLAS
  10743. # Done checking LAPACK
  10744. # Enable Cairo display driver option
  10745. echo $ac_n "checking whether to use Cairo""... $ac_c" 1>&6
  10746. echo "configure:13383: checking whether to use Cairo" >&5
  10747. echo "$ac_t"""$with_cairo"" 1>&6
  10748. case "$with_cairo" in
  10749. "no") USE_CAIRO= ;;
  10750. "yes") USE_CAIRO="1" ;;
  10751. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10752. esac
  10753. CAIROINC=
  10754. CAIROLIB=
  10755. if test -n "$USE_CAIRO"; then
  10756. # With Cairo includes directory
  10757. CAIROINC=`pkg-config --cflags cairo`
  10758. echo $ac_n "checking for location of cairo includes""... $ac_c" 1>&6
  10759. echo "configure:13404: checking for location of cairo includes" >&5
  10760. case "$with_cairo_includes" in
  10761. y | ye | yes | n | no)
  10762. { echo "configure: error: *** You must supply a directory to --with-cairo-includes." 1>&2; exit 1; }
  10763. ;;
  10764. esac
  10765. echo "$ac_t""$with_cairo_includes" 1>&6
  10766. if test -n "$with_cairo_includes" ; then
  10767. for dir in $with_cairo_includes; do
  10768. if test -d "$dir"; then
  10769. CAIROINC="$CAIROINC -I$dir"
  10770. else
  10771. { echo "configure: error: *** cairo includes directory $dir does not exist." 1>&2; exit 1; }
  10772. fi
  10773. done
  10774. fi
  10775. ac_save_cppflags="$CPPFLAGS"
  10776. CPPFLAGS="$CAIROINC $CPPFLAGS"
  10777. for ac_hdr in cairo.h
  10778. do
  10779. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10780. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  10781. echo "configure:13430: checking for $ac_hdr" >&5
  10782. cat > conftest.$ac_ext <<EOF
  10783. #line 13433 "configure"
  10784. #include "confdefs.h"
  10785. #include <$ac_hdr>
  10786. EOF
  10787. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  10788. { (eval echo configure:13438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  10789. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  10790. if test -z "$ac_err"; then
  10791. rm -rf conftest*
  10792. eval "ac_cv_header_$ac_safe=yes"
  10793. else
  10794. echo "$ac_err" >&5
  10795. echo "configure: failed program was:" >&5
  10796. cat conftest.$ac_ext >&5
  10797. rm -rf conftest*
  10798. eval "ac_cv_header_$ac_safe=no"
  10799. fi
  10800. rm -f conftest*
  10801. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  10802. echo "$ac_t""yes" 1>&6
  10803. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10804. cat >> confdefs.h <<EOF
  10805. #define $ac_tr_hdr 1
  10806. EOF
  10807. else
  10808. echo "$ac_t""no" 1>&6
  10809. { echo "configure: error: *** Unable to locate Cairo includes." 1>&2; exit 1; }
  10810. fi
  10811. done
  10812. CPPFLAGS=$ac_save_cppflags
  10813. # With Cairo library directory
  10814. CAIROLIB=`pkg-config --libs cairo`
  10815. echo $ac_n "checking for location of cairo library""... $ac_c" 1>&6
  10816. echo "configure:13474: checking for location of cairo library" >&5
  10817. case "$with_cairo_libs" in
  10818. y | ye | yes | n | no)
  10819. { echo "configure: error: *** You must supply a directory to --with-cairo-libs." 1>&2; exit 1; }
  10820. ;;
  10821. esac
  10822. echo "$ac_t""$with_cairo_libs" 1>&6
  10823. if test -n "$with_cairo_libs"; then
  10824. for dir in $with_cairo_libs; do
  10825. if test -d "$dir"; then
  10826. CAIROLIB="$CAIROLIB -L$dir"
  10827. else
  10828. { echo "configure: error: *** cairo library directory $dir does not exist." 1>&2; exit 1; }
  10829. fi
  10830. done
  10831. fi
  10832. echo $ac_n "checking for cairo linking flags""... $ac_c" 1>&6
  10833. echo "configure:13494: checking for cairo linking flags" >&5
  10834. case "$with_cairo_ldflags" in
  10835. y | ye | yes | n | no)
  10836. { echo "configure: error: *** You must supply a directory to --with-cairo-ldflags." 1>&2; exit 1; }
  10837. ;;
  10838. esac
  10839. echo "$ac_t""$with_cairo_ldflags" 1>&6
  10840. CAIROLIB="$CAIROLIB $with_cairo_ldflags"
  10841. ac_save_libs="$LIBS"
  10842. ac_save_ldflags="$LDFLAGS"
  10843. LIBS=" $CAIROLIB $LIBS"
  10844. LDFLAGS=" $LDFLAGS"
  10845. echo $ac_n "checking for cairo_create""... $ac_c" 1>&6
  10846. echo "configure:13510: checking for cairo_create" >&5
  10847. cat > conftest.$ac_ext <<EOF
  10848. #line 13513 "configure"
  10849. #include "confdefs.h"
  10850. /* System header to define __stub macros and hopefully few prototypes,
  10851. which can conflict with char cairo_create(); below. */
  10852. #include <assert.h>
  10853. /* Override any gcc2 internal prototype to avoid an error. */
  10854. /* We use char because int might match the return type of a gcc2
  10855. builtin and then its argument prototype would still apply. */
  10856. char cairo_create();
  10857. int main() {
  10858. /* The GNU C library defines this for functions which it implements
  10859. to always fail with ENOSYS. Some functions are actually named
  10860. something starting with __ and the normal name is an alias. */
  10861. #if defined (__stub_cairo_create) || defined (__stub___cairo_create)
  10862. choke me
  10863. #else
  10864. cairo_create();
  10865. #endif
  10866. ; return 0; }
  10867. EOF
  10868. if { (eval echo configure:13536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10869. rm -rf conftest*
  10870. eval "ac_cv_func_cairo_create=yes"
  10871. else
  10872. echo "configure: failed program was:" >&5
  10873. cat conftest.$ac_ext >&5
  10874. rm -rf conftest*
  10875. eval "ac_cv_func_cairo_create=no"
  10876. fi
  10877. rm -f conftest*
  10878. if eval "test \"`echo '$ac_cv_func_'cairo_create`\" = yes"; then
  10879. echo "$ac_t""yes" 1>&6
  10880. :
  10881. else
  10882. echo "$ac_t""no" 1>&6
  10883. { echo "configure: error: *** Unable to locate ." 1>&2; exit 1; }
  10884. fi
  10885. LIBS=${ac_save_libs}
  10886. LDFLAGS=${ac_save_ldflags}
  10887. CAIROLIB="$CAIROLIB $CAIROLDFLAGS"
  10888. fi # $USE_CAIRO
  10889. # Done checking Cairo
  10890. # Enable FreeType option
  10891. echo $ac_n "checking whether to use FreeType""... $ac_c" 1>&6
  10892. echo "configure:13579: checking whether to use FreeType" >&5
  10893. echo "$ac_t"""$with_freetype"" 1>&6
  10894. case "$with_freetype" in
  10895. "no") USE_FREETYPE= ;;
  10896. "yes") USE_FREETYPE="1" ;;
  10897. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10898. esac
  10899. FTINC=
  10900. FTLIB=
  10901. if test -n "$USE_FREETYPE"; then
  10902. # With FreeType includes directory
  10903. echo $ac_n "checking for location of FreeType includes""... $ac_c" 1>&6
  10904. echo "configure:13598: checking for location of FreeType includes" >&5
  10905. case "$with_freetype_includes" in
  10906. y | ye | yes | n | no)
  10907. { echo "configure: error: *** You must supply a directory to --with-freetype-includes." 1>&2; exit 1; }
  10908. ;;
  10909. esac
  10910. echo "$ac_t""$with_freetype_includes" 1>&6
  10911. if test -n "$with_freetype_includes" ; then
  10912. for dir in $with_freetype_includes; do
  10913. if test -d "$dir"; then
  10914. FTINC="$FTINC -I$dir"
  10915. else
  10916. { echo "configure: error: *** FreeType includes directory $dir does not exist." 1>&2; exit 1; }
  10917. fi
  10918. done
  10919. fi
  10920. ac_save_cppflags="$CPPFLAGS"
  10921. CPPFLAGS="$FTINC $CPPFLAGS"
  10922. for ac_hdr in ft2build.h
  10923. do
  10924. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10925. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  10926. echo "configure:13624: checking for $ac_hdr" >&5
  10927. cat > conftest.$ac_ext <<EOF
  10928. #line 13627 "configure"
  10929. #include "confdefs.h"
  10930. #include <$ac_hdr>
  10931. EOF
  10932. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  10933. { (eval echo configure:13632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  10934. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  10935. if test -z "$ac_err"; then
  10936. rm -rf conftest*
  10937. eval "ac_cv_header_$ac_safe=yes"
  10938. else
  10939. echo "$ac_err" >&5
  10940. echo "configure: failed program was:" >&5
  10941. cat conftest.$ac_ext >&5
  10942. rm -rf conftest*
  10943. eval "ac_cv_header_$ac_safe=no"
  10944. fi
  10945. rm -f conftest*
  10946. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  10947. echo "$ac_t""yes" 1>&6
  10948. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10949. cat >> confdefs.h <<EOF
  10950. #define $ac_tr_hdr 1
  10951. EOF
  10952. else
  10953. echo "$ac_t""no" 1>&6
  10954. { echo "configure: error: *** Unable to locate FreeType includes." 1>&2; exit 1; }
  10955. fi
  10956. done
  10957. CPPFLAGS=$ac_save_cppflags
  10958. # With FreeType library directory
  10959. echo $ac_n "checking for location of FreeType library""... $ac_c" 1>&6
  10960. echo "configure:13666: checking for location of FreeType library" >&5
  10961. case "$with_freetype_libs" in
  10962. y | ye | yes | n | no)
  10963. { echo "configure: error: *** You must supply a directory to --with-freetype-libs." 1>&2; exit 1; }
  10964. ;;
  10965. esac
  10966. echo "$ac_t""$with_freetype_libs" 1>&6
  10967. if test -n "$with_freetype_libs"; then
  10968. for dir in $with_freetype_libs; do
  10969. if test -d "$dir"; then
  10970. FTLIB="$FTLIB -L$dir"
  10971. else
  10972. { echo "configure: error: *** FreeType library directory $dir does not exist." 1>&2; exit 1; }
  10973. fi
  10974. done
  10975. fi
  10976. ac_save_ldflags="$LDFLAGS"
  10977. LDFLAGS="$FTLIB $LDFLAGS"
  10978. echo $ac_n "checking for FT_Init_FreeType in -lfreetype""... $ac_c" 1>&6
  10979. echo "configure:13691: checking for FT_Init_FreeType in -lfreetype" >&5
  10980. ac_lib_var=`echo freetype'_'FT_Init_FreeType | sed 'y%./+-%__p_%'`
  10981. ac_save_LIBS="$LIBS"
  10982. LIBS="-lfreetype $LIBS"
  10983. cat > conftest.$ac_ext <<EOF
  10984. #line 13697 "configure"
  10985. #include "confdefs.h"
  10986. /* Override any gcc2 internal prototype to avoid an error. */
  10987. /* We use char because int might match the return type of a gcc2
  10988. builtin and then its argument prototype would still apply. */
  10989. char FT_Init_FreeType();
  10990. int main() {
  10991. FT_Init_FreeType()
  10992. ; return 0; }
  10993. EOF
  10994. if { (eval echo configure:13708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10995. rm -rf conftest*
  10996. eval "ac_cv_lib_$ac_lib_var=yes"
  10997. else
  10998. echo "configure: failed program was:" >&5
  10999. cat conftest.$ac_ext >&5
  11000. rm -rf conftest*
  11001. eval "ac_cv_lib_$ac_lib_var=no"
  11002. fi
  11003. rm -f conftest*
  11004. LIBS="$ac_save_LIBS"
  11005. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  11006. echo "$ac_t""yes" 1>&6
  11007. FTLIB="$FTLIB -lfreetype "
  11008. else
  11009. echo "$ac_t""no" 1>&6
  11010. LDFLAGS=${ac_save_ldflags}
  11011. { echo "configure: error: *** Unable to locate FreeType library." 1>&2; exit 1; }
  11012. fi
  11013. LDFLAGS=${ac_save_ldflags}
  11014. fi # $USE_FREETYPE
  11015. # Done checking FreeType
  11016. # Enable NLS option
  11017. echo $ac_n "checking whether to use NLS""... $ac_c" 1>&6
  11018. echo "configure:13749: checking whether to use NLS" >&5
  11019. echo "$ac_t"""$with_nls"" 1>&6
  11020. case "$with_nls" in
  11021. "no") USE_NLS= ;;
  11022. "yes") USE_NLS="1" ;;
  11023. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  11024. esac
  11025. INTLLIB=
  11026. HAVE_NLS=
  11027. if test -n "${USE_NLS}" ; then
  11028. cat >> confdefs.h <<\EOF
  11029. #define USE_NLS 1
  11030. EOF
  11031. echo $ac_n "checking for gettext""... $ac_c" 1>&6
  11032. echo "configure:13769: checking for gettext" >&5
  11033. cat > conftest.$ac_ext <<EOF
  11034. #line 13772 "configure"
  11035. #include "confdefs.h"
  11036. /* System header to define __stub macros and hopefully few prototypes,
  11037. which can conflict with char gettext(); below. */
  11038. #include <assert.h>
  11039. /* Override any gcc2 internal prototype to avoid an error. */
  11040. /* We use char because int might match the return type of a gcc2
  11041. builtin and then its argument prototype would still apply. */
  11042. char gettext();
  11043. int main() {
  11044. /* The GNU C library defines this for functions which it implements
  11045. to always fail with ENOSYS. Some functions are actually named
  11046. something starting with __ and the normal name is an alias. */
  11047. #if defined (__stub_gettext) || defined (__stub___gettext)
  11048. choke me
  11049. #else
  11050. gettext();
  11051. #endif
  11052. ; return 0; }
  11053. EOF
  11054. if { (eval echo configure:13795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  11055. rm -rf conftest*
  11056. eval "ac_cv_func_gettext=yes"
  11057. else
  11058. echo "configure: failed program was:" >&5
  11059. cat conftest.$ac_ext >&5
  11060. rm -rf conftest*
  11061. eval "ac_cv_func_gettext=no"
  11062. fi
  11063. rm -f conftest*
  11064. if eval "test \"`echo '$ac_cv_func_'gettext`\" = yes"; then
  11065. echo "$ac_t""yes" 1>&6
  11066. INTLLIB=
  11067. else
  11068. echo "$ac_t""no" 1>&6
  11069. echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
  11070. echo "configure:13813: checking for gettext in -lintl" >&5
  11071. ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
  11072. ac_save_LIBS="$LIBS"
  11073. LIBS="-lintl $LIBS"
  11074. cat > conftest.$ac_ext <<EOF
  11075. #line 13819 "configure"
  11076. #include "confdefs.h"
  11077. /* Override any gcc2 internal prototype to avoid an error. */
  11078. /* We use char because int might match the return type of a gcc2
  11079. builtin and then its argument prototype would still apply. */
  11080. char gettext();
  11081. int main() {
  11082. gettext()
  11083. ; return 0; }
  11084. EOF
  11085. if { (eval echo configure:13830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  11086. rm -rf conftest*
  11087. eval "ac_cv_lib_$ac_lib_var=yes"
  11088. else
  11089. echo "configure: failed program was:" >&5
  11090. cat conftest.$ac_ext >&5
  11091. rm -rf conftest*
  11092. eval "ac_cv_lib_$ac_lib_var=no"
  11093. fi
  11094. rm -f conftest*
  11095. LIBS="$ac_save_LIBS"
  11096. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  11097. echo "$ac_t""yes" 1>&6
  11098. INTLLIB=-lintl
  11099. else
  11100. echo "$ac_t""no" 1>&6
  11101. { echo "configure: error: *** Unable to locate gettext() function." 1>&2; exit 1; }
  11102. fi
  11103. fi
  11104. HAVE_NLS=1
  11105. fi
  11106. # Enable C++ option
  11107. echo $ac_n "checking whether to use C++""... $ac_c" 1>&6
  11108. echo "configure:13865: checking whether to use C++" >&5
  11109. echo "$ac_t"""$with_cxx"" 1>&6
  11110. case "$with_cxx" in
  11111. "no") USE_CXX= ;;
  11112. "yes") USE_CXX="1" ;;
  11113. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  11114. esac
  11115. if test -n "$USE_CXX"; then
  11116. for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
  11117. do
  11118. # Extract the first word of "$ac_prog", so it can be a program name with args.
  11119. set dummy $ac_prog; ac_word=$2
  11120. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  11121. echo "configure:13881: checking for $ac_word" >&5
  11122. if test -n "$CXX"; then
  11123. ac_cv_prog_CXX="$CXX" # Let the user override the test.
  11124. else
  11125. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  11126. ac_dummy="$PATH"
  11127. for ac_dir in $ac_dummy; do
  11128. test -z "$ac_dir" && ac_dir=.
  11129. if test -f $ac_dir/$ac_word; then
  11130. ac_cv_prog_CXX="$ac_prog"
  11131. break
  11132. fi
  11133. done
  11134. IFS="$ac_save_ifs"
  11135. fi
  11136. CXX="$ac_cv_prog_CXX"
  11137. if test -n "$CXX"; then
  11138. echo "$ac_t""$CXX" 1>&6
  11139. else
  11140. echo "$ac_t""no" 1>&6
  11141. fi
  11142. test -n "$CXX" && break
  11143. done
  11144. test -n "$CXX" || CXX="gcc"
  11145. echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  11146. echo "configure:13910: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
  11147. ac_ext=C
  11148. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  11149. ac_cpp='$CXXCPP $CPPFLAGS'
  11150. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  11151. ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  11152. cross_compiling=$ac_cv_prog_cxx_cross
  11153. cat > conftest.$ac_ext << EOF
  11154. #line 13921 "configure"
  11155. #include "confdefs.h"
  11156. int main(){return(0);}
  11157. EOF
  11158. if { (eval echo configure:13926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  11159. ac_cv_prog_cxx_works=yes
  11160. # If we can't run a trivial program, we are probably using a cross compiler.
  11161. if (./conftest; exit) 2>/dev/null; then
  11162. ac_cv_prog_cxx_cross=no
  11163. else
  11164. ac_cv_prog_cxx_cross=yes
  11165. fi
  11166. else
  11167. echo "configure: failed program was:" >&5
  11168. cat conftest.$ac_ext >&5
  11169. ac_cv_prog_cxx_works=no
  11170. fi
  11171. rm -fr conftest*
  11172. ac_ext=c
  11173. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  11174. ac_cpp='$CPP $CPPFLAGS'
  11175. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  11176. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  11177. cross_compiling=$ac_cv_prog_cc_cross
  11178. echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
  11179. if test $ac_cv_prog_cxx_works = no; then
  11180. { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
  11181. fi
  11182. echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  11183. echo "configure:13952: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
  11184. echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
  11185. cross_compiling=$ac_cv_prog_cxx_cross
  11186. echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
  11187. echo "configure:13957: checking whether we are using GNU C++" >&5
  11188. cat > conftest.C <<EOF
  11189. #ifdef __GNUC__
  11190. yes;
  11191. #endif
  11192. EOF
  11193. if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:13964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  11194. ac_cv_prog_gxx=yes
  11195. else
  11196. ac_cv_prog_gxx=no
  11197. fi
  11198. echo "$ac_t""$ac_cv_prog_gxx" 1>&6
  11199. if test $ac_cv_prog_gxx = yes; then
  11200. GXX=yes
  11201. else
  11202. GXX=
  11203. fi
  11204. ac_test_CXXFLAGS="${CXXFLAGS+set}"
  11205. ac_save_CXXFLAGS="$CXXFLAGS"
  11206. CXXFLAGS=
  11207. echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
  11208. echo "configure:13982: checking whether ${CXX-g++} accepts -g" >&5
  11209. echo 'void f(){}' > conftest.cc
  11210. if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
  11211. ac_cv_prog_cxx_g=yes
  11212. else
  11213. ac_cv_prog_cxx_g=no
  11214. fi
  11215. rm -f conftest*
  11216. echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
  11217. if test "$ac_test_CXXFLAGS" = set; then
  11218. CXXFLAGS="$ac_save_CXXFLAGS"
  11219. elif test $ac_cv_prog_cxx_g = yes; then
  11220. if test "$GXX" = yes; then
  11221. CXXFLAGS="-g -O2"
  11222. else
  11223. CXXFLAGS="-g"
  11224. fi
  11225. else
  11226. if test "$GXX" = yes; then
  11227. CXXFLAGS="-O2"
  11228. else
  11229. CXXFLAGS=
  11230. fi
  11231. fi
  11232. else
  11233. CXX=
  11234. CXXFLAGS=
  11235. fi
  11236. # Done checking C++
  11237. # Enable openDWG option
  11238. echo $ac_n "checking whether to use openDWG""... $ac_c" 1>&6
  11239. echo "configure:14023: checking whether to use openDWG" >&5
  11240. echo "$ac_t"""$with_opendwg"" 1>&6
  11241. case "$with_opendwg" in
  11242. "no") USE_OPENDWG= ;;
  11243. "yes") USE_OPENDWG="1" ;;
  11244. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  11245. esac
  11246. OPENDWGINCPATH=
  11247. OPENDWGLIBPATH=
  11248. OPENDWGLIB=
  11249. if test -n "${USE_OPENDWG}"; then
  11250. # With OPENDWG includes directory
  11251. echo $ac_n "checking for location of openDGW includes""... $ac_c" 1>&6
  11252. echo "configure:14043: checking for location of openDGW includes" >&5
  11253. case "$with_opendwg_includes" in
  11254. y | ye | yes | n | no)
  11255. { echo "configure: error: *** You must supply a directory to --with-opendwg-includes." 1>&2; exit 1; }
  11256. ;;
  11257. esac
  11258. echo "$ac_t""$with_opendwg_includes" 1>&6
  11259. if test -n "$with_opendwg_includes" ; then
  11260. for dir in $with_opendwg_includes; do
  11261. if test -d "$dir"; then
  11262. OPENDWGINCPATH="$OPENDWGINCPATH -I$dir"
  11263. else
  11264. { echo "configure: error: *** openDGW includes directory $dir does not exist." 1>&2; exit 1; }
  11265. fi
  11266. done
  11267. fi
  11268. ac_save_cppflags="$CPPFLAGS"
  11269. CPPFLAGS="$OPENDWGINCPATH $CPPFLAGS"
  11270. for ac_hdr in ad2.h
  11271. do
  11272. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  11273. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  11274. echo "configure:14069: checking for $ac_hdr" >&5
  11275. cat > conftest.$ac_ext <<EOF
  11276. #line 14072 "configure"
  11277. #include "confdefs.h"
  11278. #include <$ac_hdr>
  11279. EOF
  11280. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  11281. { (eval echo configure:14077: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  11282. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  11283. if test -z "$ac_err"; then
  11284. rm -rf conftest*
  11285. eval "ac_cv_header_$ac_safe=yes"
  11286. else
  11287. echo "$ac_err" >&5
  11288. echo "configure: failed program was:" >&5
  11289. cat conftest.$ac_ext >&5
  11290. rm -rf conftest*
  11291. eval "ac_cv_header_$ac_safe=no"
  11292. fi
  11293. rm -f conftest*
  11294. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  11295. echo "$ac_t""yes" 1>&6
  11296. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  11297. cat >> confdefs.h <<EOF
  11298. #define $ac_tr_hdr 1
  11299. EOF
  11300. else
  11301. echo "$ac_t""no" 1>&6
  11302. { echo "configure: error: *** Unable to locate openDWG includes." 1>&2; exit 1; }
  11303. fi
  11304. done
  11305. CPPFLAGS=$ac_save_cppflags
  11306. # With OPENDWG library directory
  11307. echo $ac_n "checking for location of openDWG library""... $ac_c" 1>&6
  11308. echo "configure:14111: checking for location of openDWG library" >&5
  11309. case "$with_opendwg_libs" in
  11310. y | ye | yes | n | no)
  11311. { echo "configure: error: *** You must supply a directory to --with-opendwg-libs." 1>&2; exit 1; }
  11312. ;;
  11313. esac
  11314. echo "$ac_t""$with_opendwg_libs" 1>&6
  11315. if test -n "$with_opendwg_libs"; then
  11316. for dir in $with_opendwg_libs; do
  11317. if test -d "$dir"; then
  11318. OPENDWGLIBPATH="$OPENDWGLIBPATH -L$dir"
  11319. else
  11320. { echo "configure: error: *** openDWG library directory $dir does not exist." 1>&2; exit 1; }
  11321. fi
  11322. done
  11323. fi
  11324. #search for ad2.a, ad3.a ... in openDWG toolkit directory:
  11325. #FIX ME how to program this test??
  11326. #LOC_CHECK_LIBS(ad?.a,adSeekLayer,openDWG,$OPENDWGLIBPATH,OPENDWGLIB,,)
  11327. #
  11328. #for now hack (but working):
  11329. TRUEOPENDWGLIBPATH=`echo $OPENDWGLIBPATH | cut -b3-`
  11330. adlib=`ls -1 $TRUEOPENDWGLIBPATH/ad?.a | tail -1`
  11331. OPENDWGLIB=$adlib
  11332. fi # $USE_OPENDWG
  11333. # Done checking OPENDWG
  11334. # Enable pthread option
  11335. echo $ac_n "checking whether to use POSIX threads""... $ac_c" 1>&6
  11336. echo "configure:14152: checking whether to use POSIX threads" >&5
  11337. echo "$ac_t"""$with_pthread"" 1>&6
  11338. case "$with_pthread" in
  11339. "no") USE_PTHREAD= ;;
  11340. "yes") USE_PTHREAD="1" ;;
  11341. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  11342. esac
  11343. PTHREADINCPATH=
  11344. PTHREADLIBPATH=
  11345. PTHREADLIB=
  11346. if test -n "$USE_PTHREAD"; then
  11347. # With pthread includes directory
  11348. echo $ac_n "checking for location of POSIX threads includes""... $ac_c" 1>&6
  11349. echo "configure:14172: checking for location of POSIX threads includes" >&5
  11350. case "$with_pthread_includes" in
  11351. y | ye | yes | n | no)
  11352. { echo "configure: error: *** You must supply a directory to --with-pthread-includes." 1>&2; exit 1; }
  11353. ;;
  11354. esac
  11355. echo "$ac_t""$with_pthread_includes" 1>&6
  11356. if test -n "$with_pthread_includes" ; then
  11357. for dir in $with_pthread_includes; do
  11358. if test -d "$dir"; then
  11359. PTHREADINCPATH="$PTHREADINCPATH -I$dir"
  11360. else
  11361. { echo "configure: error: *** POSIX threads includes directory $dir does not exist." 1>&2; exit 1; }
  11362. fi
  11363. done
  11364. fi
  11365. ac_save_cppflags="$CPPFLAGS"
  11366. CPPFLAGS="$PTHREADINCPATH $CPPFLAGS"
  11367. for ac_hdr in pthread.h
  11368. do
  11369. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  11370. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  11371. echo "configure:14198: checking for $ac_hdr" >&5
  11372. cat > conftest.$ac_ext <<EOF
  11373. #line 14201 "configure"
  11374. #include "confdefs.h"
  11375. #include <$ac_hdr>
  11376. EOF
  11377. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  11378. { (eval echo configure:14206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  11379. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  11380. if test -z "$ac_err"; then
  11381. rm -rf conftest*
  11382. eval "ac_cv_header_$ac_safe=yes"
  11383. else
  11384. echo "$ac_err" >&5
  11385. echo "configure: failed program was:" >&5
  11386. cat conftest.$ac_ext >&5
  11387. rm -rf conftest*
  11388. eval "ac_cv_header_$ac_safe=no"
  11389. fi
  11390. rm -f conftest*
  11391. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  11392. echo "$ac_t""yes" 1>&6
  11393. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  11394. cat >> confdefs.h <<EOF
  11395. #define $ac_tr_hdr 1
  11396. EOF
  11397. else
  11398. echo "$ac_t""no" 1>&6
  11399. { echo "configure: error: *** Unable to locate POSIX threads includes." 1>&2; exit 1; }
  11400. fi
  11401. done
  11402. CPPFLAGS=$ac_save_cppflags
  11403. # With pthread library directory
  11404. echo $ac_n "checking for location of POSIX threads library""... $ac_c" 1>&6
  11405. echo "configure:14240: checking for location of POSIX threads library" >&5
  11406. case "$with_pthread_libs" in
  11407. y | ye | yes | n | no)
  11408. { echo "configure: error: *** You must supply a directory to --with-pthread-libs." 1>&2; exit 1; }
  11409. ;;
  11410. esac
  11411. echo "$ac_t""$with_pthread_libs" 1>&6
  11412. if test -n "$with_pthread_libs"; then
  11413. for dir in $with_pthread_libs; do
  11414. if test -d "$dir"; then
  11415. PTHREADLIBPATH="$PTHREADLIBPATH -L$dir"
  11416. else
  11417. { echo "configure: error: *** POSIX threads library directory $dir does not exist." 1>&2; exit 1; }
  11418. fi
  11419. done
  11420. fi
  11421. ac_save_libs="$LIBS"
  11422. ac_save_ldflags="$LDFLAGS"
  11423. LIBS=" $LIBS"
  11424. LDFLAGS=" $LDFLAGS"
  11425. echo $ac_n "checking for pthread_create""... $ac_c" 1>&6
  11426. echo "configure:14265: checking for pthread_create" >&5
  11427. cat > conftest.$ac_ext <<EOF
  11428. #line 14268 "configure"
  11429. #include "confdefs.h"
  11430. /* System header to define __stub macros and hopefully few prototypes,
  11431. which can conflict with char pthread_create(); below. */
  11432. #include <assert.h>
  11433. /* Override any gcc2 internal prototype to avoid an error. */
  11434. /* We use char because int might match the return type of a gcc2
  11435. builtin and then its argument prototype would still apply. */
  11436. char pthread_create();
  11437. int main() {
  11438. /* The GNU C library defines this for functions which it implements
  11439. to always fail with ENOSYS. Some functions are actually named
  11440. something starting with __ and the normal name is an alias. */
  11441. #if defined (__stub_pthread_create) || defined (__stub___pthread_create)
  11442. choke me
  11443. #else
  11444. pthread_create();
  11445. #endif
  11446. ; return 0; }
  11447. EOF
  11448. if { (eval echo configure:14291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  11449. rm -rf conftest*
  11450. eval "ac_cv_func_pthread_create=yes"
  11451. else
  11452. echo "configure: failed program was:" >&5
  11453. cat conftest.$ac_ext >&5
  11454. rm -rf conftest*
  11455. eval "ac_cv_func_pthread_create=no"
  11456. fi
  11457. rm -f conftest*
  11458. if eval "test \"`echo '$ac_cv_func_'pthread_create`\" = yes"; then
  11459. echo "$ac_t""yes" 1>&6
  11460. PTHREADLIB="$PTHREADLIB "
  11461. else
  11462. echo "$ac_t""no" 1>&6
  11463. ac_save_ldflags="$LDFLAGS"
  11464. LDFLAGS="$PTHREADLIBPATH $LDFLAGS"
  11465. echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
  11466. echo "configure:14318: checking for pthread_create in -lpthread" >&5
  11467. ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
  11468. ac_save_LIBS="$LIBS"
  11469. LIBS="-lpthread $LIBS"
  11470. cat > conftest.$ac_ext <<EOF
  11471. #line 14324 "configure"
  11472. #include "confdefs.h"
  11473. /* Override any gcc2 internal prototype to avoid an error. */
  11474. /* We use char because int might match the return type of a gcc2
  11475. builtin and then its argument prototype would still apply. */
  11476. char pthread_create();
  11477. int main() {
  11478. pthread_create()
  11479. ; return 0; }
  11480. EOF
  11481. if { (eval echo configure:14335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  11482. rm -rf conftest*
  11483. eval "ac_cv_lib_$ac_lib_var=yes"
  11484. else
  11485. echo "configure: failed program was:" >&5
  11486. cat conftest.$ac_ext >&5
  11487. rm -rf conftest*
  11488. eval "ac_cv_lib_$ac_lib_var=no"
  11489. fi
  11490. rm -f conftest*
  11491. LIBS="$ac_save_LIBS"
  11492. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  11493. echo "$ac_t""yes" 1>&6
  11494. PTHREADLIB="$PTHREADLIB -lpthread "
  11495. else
  11496. echo "$ac_t""no" 1>&6
  11497. LDFLAGS=${ac_save_ldflags}
  11498. { echo "configure: error: *** Unable to locate POSIX threads library." 1>&2; exit 1; }
  11499. fi
  11500. LDFLAGS=${ac_save_ldflags}
  11501. fi
  11502. LIBS=${ac_save_libs}
  11503. LDFLAGS=${ac_save_ldflags}
  11504. fi # $USE_PTHREAD
  11505. # Done checking pthread
  11506. # Enable LFS (from cdr-tools)
  11507. # Check whether --enable-largefile or --disable-largefile was given.
  11508. if test "${enable_largefile+set}" = set; then
  11509. enableval="$enable_largefile"
  11510. :
  11511. fi
  11512. if test "$enable_largefile" = yes; then
  11513. echo $ac_n "checking for special C compiler options needed for large files""... $ac_c" 1>&6
  11514. echo "configure:14391: checking for special C compiler options needed for large files" >&5
  11515. ac_cv_sys_largefile_CC=no
  11516. largefile_cc_opt=""
  11517. if test "$GCC" != yes; then
  11518. # IRIX 6.2 and later do not support large files by default,
  11519. # so use the C compiler's -n32 option if that helps.
  11520. cat > conftest.$ac_ext <<EOF
  11521. #line 14399 "configure"
  11522. #include "confdefs.h"
  11523. #include <sys/types.h>
  11524. /* Check that off_t can represent 2**63 - 1 correctly.
  11525. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11526. since some C++ compilers masquerading as C compilers
  11527. incorrectly reject 9223372036854775807. */
  11528. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11529. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11530. && LARGE_OFF_T % 2147483647 == 1)
  11531. ? 1 : -1];
  11532. int main() {
  11533. ; return 0; }
  11534. EOF
  11535. if { (eval echo configure:14415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11536. :
  11537. else
  11538. echo "configure: failed program was:" >&5
  11539. cat conftest.$ac_ext >&5
  11540. rm -rf conftest*
  11541. ac_save_CC="${CC-cc}"
  11542. CC="$CC -n32"
  11543. cat > conftest.$ac_ext <<EOF
  11544. #line 14424 "configure"
  11545. #include "confdefs.h"
  11546. #include <sys/types.h>
  11547. /* Check that off_t can represent 2**63 - 1 correctly.
  11548. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11549. since some C++ compilers masquerading as C compilers
  11550. incorrectly reject 9223372036854775807. */
  11551. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11552. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11553. && LARGE_OFF_T % 2147483647 == 1)
  11554. ? 1 : -1];
  11555. int main() {
  11556. ; return 0; }
  11557. EOF
  11558. if { (eval echo configure:14440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11559. rm -rf conftest*
  11560. ac_cv_sys_largefile_CC=' -n32'
  11561. else
  11562. echo "configure: failed program was:" >&5
  11563. cat conftest.$ac_ext >&5
  11564. fi
  11565. rm -f conftest*
  11566. CC="$ac_save_CC"
  11567. fi
  11568. rm -f conftest*
  11569. fi
  11570. echo "$ac_t""$ac_cv_sys_largefile_CC" 1>&6
  11571. if test "$ac_cv_sys_largefile_CC" != no; then
  11572. CC="$CC$ac_cv_sys_largefile_CC"
  11573. largefile_cc_opt="$ac_cv_sys_largefile_CC"
  11574. fi
  11575. echo $ac_n "checking for _FILE_OFFSET_BITS value needed for large files""... $ac_c" 1>&6
  11576. echo "configure:14460: checking for _FILE_OFFSET_BITS value needed for large files" >&5
  11577. ac_cv_sys_file_offset_bits=no
  11578. cat > conftest.$ac_ext <<EOF
  11579. #line 14464 "configure"
  11580. #include "confdefs.h"
  11581. #include <sys/types.h>
  11582. /* Check that off_t can represent 2**63 - 1 correctly.
  11583. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11584. since some C++ compilers masquerading as C compilers
  11585. incorrectly reject 9223372036854775807. */
  11586. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11587. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11588. && LARGE_OFF_T % 2147483647 == 1)
  11589. ? 1 : -1];
  11590. int main() {
  11591. ; return 0; }
  11592. EOF
  11593. if { (eval echo configure:14480: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11594. :
  11595. else
  11596. echo "configure: failed program was:" >&5
  11597. cat conftest.$ac_ext >&5
  11598. rm -rf conftest*
  11599. cat > conftest.$ac_ext <<EOF
  11600. #line 14487 "configure"
  11601. #include "confdefs.h"
  11602. #define _FILE_OFFSET_BITS 64
  11603. #include <sys/types.h>
  11604. /* Check that off_t can represent 2**63 - 1 correctly.
  11605. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11606. since some C++ compilers masquerading as C compilers
  11607. incorrectly reject 9223372036854775807. */
  11608. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11609. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11610. && LARGE_OFF_T % 2147483647 == 1)
  11611. ? 1 : -1];
  11612. int main() {
  11613. ; return 0; }
  11614. EOF
  11615. if { (eval echo configure:14505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11616. rm -rf conftest*
  11617. ac_cv_sys_file_offset_bits=64
  11618. else
  11619. echo "configure: failed program was:" >&5
  11620. cat conftest.$ac_ext >&5
  11621. fi
  11622. rm -f conftest*
  11623. fi
  11624. rm -f conftest*
  11625. echo "$ac_t""$ac_cv_sys_file_offset_bits" 1>&6
  11626. if test "$ac_cv_sys_file_offset_bits" != no; then
  11627. cat >> confdefs.h <<EOF
  11628. #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
  11629. EOF
  11630. fi
  11631. echo $ac_n "checking for _LARGE_FILES value needed for large files""... $ac_c" 1>&6
  11632. echo "configure:14524: checking for _LARGE_FILES value needed for large files" >&5
  11633. ac_cv_sys_large_files=no
  11634. cat > conftest.$ac_ext <<EOF
  11635. #line 14528 "configure"
  11636. #include "confdefs.h"
  11637. #include <sys/types.h>
  11638. /* Check that off_t can represent 2**63 - 1 correctly.
  11639. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11640. since some C++ compilers masquerading as C compilers
  11641. incorrectly reject 9223372036854775807. */
  11642. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11643. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11644. && LARGE_OFF_T % 2147483647 == 1)
  11645. ? 1 : -1];
  11646. int main() {
  11647. ; return 0; }
  11648. EOF
  11649. if { (eval echo configure:14544: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11650. :
  11651. else
  11652. echo "configure: failed program was:" >&5
  11653. cat conftest.$ac_ext >&5
  11654. rm -rf conftest*
  11655. cat > conftest.$ac_ext <<EOF
  11656. #line 14551 "configure"
  11657. #include "confdefs.h"
  11658. #define _LARGE_FILES 1
  11659. #include <sys/types.h>
  11660. /* Check that off_t can represent 2**63 - 1 correctly.
  11661. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11662. since some C++ compilers masquerading as C compilers
  11663. incorrectly reject 9223372036854775807. */
  11664. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11665. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11666. && LARGE_OFF_T % 2147483647 == 1)
  11667. ? 1 : -1];
  11668. int main() {
  11669. ; return 0; }
  11670. EOF
  11671. if { (eval echo configure:14569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11672. rm -rf conftest*
  11673. ac_cv_sys_large_files=1
  11674. else
  11675. echo "configure: failed program was:" >&5
  11676. cat conftest.$ac_ext >&5
  11677. fi
  11678. rm -f conftest*
  11679. fi
  11680. rm -f conftest*
  11681. echo "$ac_t""$ac_cv_sys_large_files" 1>&6
  11682. if test "$ac_cv_sys_large_files" != no; then
  11683. cat >> confdefs.h <<EOF
  11684. #define _LARGE_FILES $ac_cv_sys_large_files
  11685. EOF
  11686. fi
  11687. echo $ac_n "checking for _LARGEFILE_SOURCE value needed for large files""... $ac_c" 1>&6
  11688. echo "configure:14588: checking for _LARGEFILE_SOURCE value needed for large files" >&5
  11689. ac_cv_sys_largefile_source=no
  11690. cat > conftest.$ac_ext <<EOF
  11691. #line 14592 "configure"
  11692. #include "confdefs.h"
  11693. #include <stdio.h>
  11694. int main() {
  11695. return !fseeko;
  11696. ; return 0; }
  11697. EOF
  11698. if { (eval echo configure:14599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11699. :
  11700. else
  11701. echo "configure: failed program was:" >&5
  11702. cat conftest.$ac_ext >&5
  11703. rm -rf conftest*
  11704. cat > conftest.$ac_ext <<EOF
  11705. #line 14606 "configure"
  11706. #include "confdefs.h"
  11707. #define _LARGEFILE_SOURCE 1
  11708. #include <stdio.h>
  11709. int main() {
  11710. return !fseeko;
  11711. ; return 0; }
  11712. EOF
  11713. if { (eval echo configure:14615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11714. rm -rf conftest*
  11715. ac_cv_sys_largefile_source=1
  11716. else
  11717. echo "configure: failed program was:" >&5
  11718. cat conftest.$ac_ext >&5
  11719. fi
  11720. rm -f conftest*
  11721. fi
  11722. rm -f conftest*
  11723. echo "$ac_t""$ac_cv_sys_largefile_source" 1>&6
  11724. if test "$ac_cv_sys_largefile_source" != no; then
  11725. cat >> confdefs.h <<EOF
  11726. #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
  11727. EOF
  11728. fi
  11729. fi
  11730. echo $ac_n "checking if system supports Large Files at all""... $ac_c" 1>&6
  11731. echo "configure:14636: checking if system supports Large Files at all" >&5
  11732. cat > conftest.$ac_ext <<EOF
  11733. #line 14639 "configure"
  11734. #include "confdefs.h"
  11735. #include <stdio.h>
  11736. #include <sys/types.h>
  11737. int main() {
  11738. /*
  11739. * Check that off_t can represent 2**63 - 1 correctly.
  11740. * We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11741. * since some C++ compilers masquerading as C compilers
  11742. * incorrectly reject 9223372036854775807.
  11743. *
  11744. * For MinGW, off64_t should be used and __MSVCRT_VERSION__ >= 0x0601
  11745. * (msvcrt.dll version 6.10 or higher) is needed for _fstat64 and _stat64.
  11746. */
  11747. #ifdef __MINGW32__
  11748. # define LARGE_OFF_T (((off64_t) 1 << 62) - 1 + ((off64_t) 1 << 62))
  11749. #else
  11750. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11751. #endif
  11752. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11753. && LARGE_OFF_T % 2147483647 == 1)
  11754. ? 1 : -1];
  11755. #ifdef __MINGW32__
  11756. return !fseeko64;
  11757. return !ftello64;
  11758. #else
  11759. return !fseeko;
  11760. return !ftello;
  11761. #endif
  11762. ; return 0; }
  11763. EOF
  11764. if { (eval echo configure:14671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11765. rm -rf conftest*
  11766. ac_cv_largefiles=yes
  11767. else
  11768. echo "configure: failed program was:" >&5
  11769. cat conftest.$ac_ext >&5
  11770. rm -rf conftest*
  11771. ac_cv_largefiles=no
  11772. fi
  11773. rm -f conftest*
  11774. echo "$ac_t""$ac_cv_largefiles" 1>&6
  11775. if test $ac_cv_largefiles = yes; then
  11776. cat >> confdefs.h <<\EOF
  11777. #define HAVE_LARGEFILES 1
  11778. EOF
  11779. fi
  11780. USE_LARGEFILES=
  11781. if test $ac_cv_largefiles = yes; then
  11782. USE_LARGEFILES=1
  11783. fi
  11784. # Done large file support
  11785. # Python check
  11786. echo $ac_n "checking whether to use Python""... $ac_c" 1>&6
  11787. echo "configure:14700: checking whether to use Python" >&5
  11788. PYTHONINC=
  11789. PYTHONCFLAGS=
  11790. PYTHONLDFLAGS=
  11791. SWIG=
  11792. USE_PYTHON=
  11793. if test "$with_python" = "no" ; then
  11794. echo "$ac_t""no" 1>&6
  11795. else
  11796. echo "$ac_t""yes" 1>&6
  11797. USE_PYTHON="1"
  11798. if test "$with_python" != "yes" ; then
  11799. PY_CONFIG="$with_python"
  11800. fi
  11801. # Extract the first word of "python-config", so it can be a program name with args.
  11802. set dummy python-config; ac_word=$2
  11803. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  11804. echo "configure:14720: checking for $ac_word" >&5
  11805. case "$PY_CONFIG" in
  11806. /*)
  11807. ac_cv_path_PY_CONFIG="$PY_CONFIG" # Let the user override the test with a path.
  11808. ;;
  11809. ?:/*)
  11810. ac_cv_path_PY_CONFIG="$PY_CONFIG" # Let the user override the test with a dos path.
  11811. ;;
  11812. *)
  11813. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  11814. ac_dummy="$PATH"
  11815. for ac_dir in $ac_dummy; do
  11816. test -z "$ac_dir" && ac_dir=.
  11817. if test -f $ac_dir/$ac_word; then
  11818. ac_cv_path_PY_CONFIG="$ac_dir/$ac_word"
  11819. break
  11820. fi
  11821. done
  11822. IFS="$ac_save_ifs"
  11823. test -z "$ac_cv_path_PY_CONFIG" && ac_cv_path_PY_CONFIG="no"
  11824. ;;
  11825. esac
  11826. PY_CONFIG="$ac_cv_path_PY_CONFIG"
  11827. if test -n "$PY_CONFIG"; then
  11828. echo "$ac_t""$PY_CONFIG" 1>&6
  11829. else
  11830. echo "$ac_t""no" 1>&6
  11831. fi
  11832. if test "$PY_CONFIG" = "no" ; then
  11833. { echo "configure: error: *** couldn't find python-config" 1>&2; exit 1; }
  11834. fi
  11835. # With Python includes directory
  11836. PYTHONINC=`"$PY_CONFIG" --includes`
  11837. ac_save_cppflags="$CPPFLAGS"
  11838. CPPFLAGS="$PYTHONINC $CPPFLAGS"
  11839. for ac_hdr in Python.h
  11840. do
  11841. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  11842. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  11843. echo "configure:14765: checking for $ac_hdr" >&5
  11844. cat > conftest.$ac_ext <<EOF
  11845. #line 14768 "configure"
  11846. #include "confdefs.h"
  11847. #include <$ac_hdr>
  11848. EOF
  11849. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  11850. { (eval echo configure:14773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  11851. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  11852. if test -z "$ac_err"; then
  11853. rm -rf conftest*
  11854. eval "ac_cv_header_$ac_safe=yes"
  11855. else
  11856. echo "$ac_err" >&5
  11857. echo "configure: failed program was:" >&5
  11858. cat conftest.$ac_ext >&5
  11859. rm -rf conftest*
  11860. eval "ac_cv_header_$ac_safe=no"
  11861. fi
  11862. rm -f conftest*
  11863. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  11864. echo "$ac_t""yes" 1>&6
  11865. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  11866. cat >> confdefs.h <<EOF
  11867. #define $ac_tr_hdr 1
  11868. EOF
  11869. else
  11870. echo "$ac_t""no" 1>&6
  11871. { echo "configure: error: *** Unable to locate Python includes." 1>&2; exit 1; }
  11872. fi
  11873. done
  11874. CPPFLAGS=$ac_save_cppflags
  11875. PYTHONCFLAGS=`"$PY_CONFIG" --cflags`
  11876. # With Python library directory
  11877. PYTHONLDFLAGS=`"$PY_CONFIG" --ldflags`
  11878. # look for the swig program
  11879. # Extract the first word of "swig", so it can be a program name with args.
  11880. set dummy swig; ac_word=$2
  11881. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  11882. echo "configure:14813: checking for $ac_word" >&5
  11883. case "$SWIG" in
  11884. /*)
  11885. ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
  11886. ;;
  11887. ?:/*)
  11888. ac_cv_path_SWIG="$SWIG" # Let the user override the test with a dos path.
  11889. ;;
  11890. *)
  11891. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  11892. ac_dummy="$PATH"
  11893. for ac_dir in $ac_dummy; do
  11894. test -z "$ac_dir" && ac_dir=.
  11895. if test -f $ac_dir/$ac_word; then
  11896. ac_cv_path_SWIG="$ac_dir/$ac_word"
  11897. break
  11898. fi
  11899. done
  11900. IFS="$ac_save_ifs"
  11901. test -z "$ac_cv_path_SWIG" && ac_cv_path_SWIG="no"
  11902. ;;
  11903. esac
  11904. SWIG="$ac_cv_path_SWIG"
  11905. if test -n "$SWIG"; then
  11906. echo "$ac_t""$SWIG" 1>&6
  11907. else
  11908. echo "$ac_t""no" 1>&6
  11909. fi
  11910. if test "$SWIG" = "no" ; then
  11911. { echo "configure: error: *** couldn't find swig" 1>&2; exit 1; }
  11912. fi
  11913. fi # Done checking Python
  11914. # Enable wxWidgets support (for wxGUI)
  11915. echo $ac_n "checking whether to use wxWidgets""... $ac_c" 1>&6
  11916. echo "configure:14859: checking whether to use wxWidgets" >&5
  11917. WXVERSION=
  11918. WXWIDGETSCXXFLAGS=
  11919. WXWIDGETSCPPFLAGS=
  11920. WXWIDGETSLIB=
  11921. USE_WXWIDGETS=
  11922. if test "$with_wxwidgets" = "no" ; then
  11923. echo "$ac_t""no" 1>&6
  11924. else
  11925. echo "$ac_t""yes" 1>&6
  11926. USE_WXWIDGETS="1"
  11927. if test "`basename $with_wxwidgets`" = "wx-config" ; then
  11928. WX_CONFIG="$with_wxwidgets"
  11929. fi
  11930. # Extract the first word of "wx-config", so it can be a program name with args.
  11931. set dummy wx-config; ac_word=$2
  11932. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  11933. echo "configure:14879: checking for $ac_word" >&5
  11934. case "$WX_CONFIG" in
  11935. /*)
  11936. ac_cv_path_WX_CONFIG="$WX_CONFIG" # Let the user override the test with a path.
  11937. ;;
  11938. ?:/*)
  11939. ac_cv_path_WX_CONFIG="$WX_CONFIG" # Let the user override the test with a dos path.
  11940. ;;
  11941. *)
  11942. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  11943. ac_dummy="$PATH"
  11944. for ac_dir in $ac_dummy; do
  11945. test -z "$ac_dir" && ac_dir=.
  11946. if test -f $ac_dir/$ac_word; then
  11947. ac_cv_path_WX_CONFIG="$ac_dir/$ac_word"
  11948. break
  11949. fi
  11950. done
  11951. IFS="$ac_save_ifs"
  11952. test -z "$ac_cv_path_WX_CONFIG" && ac_cv_path_WX_CONFIG="no"
  11953. ;;
  11954. esac
  11955. WX_CONFIG="$ac_cv_path_WX_CONFIG"
  11956. if test -n "$WX_CONFIG"; then
  11957. echo "$ac_t""$WX_CONFIG" 1>&6
  11958. else
  11959. echo "$ac_t""no" 1>&6
  11960. fi
  11961. if test "$WX_CONFIG" = "no" ; then
  11962. { echo "configure: error: *** couldn't find wx-config
  11963. wxWidgets must be installed on your system.
  11964. Please check that wx-config is in path, the directory
  11965. where wxWidgets libraries are installed (returned by
  11966. 'wx-config --libs' or 'wx-config --static --libs' command)
  11967. is in LD_LIBRARY_PATH or equivalent variable and
  11968. wxWidgets version is 2.8.1 or above." 1>&2; exit 1; }
  11969. fi
  11970. # Check wxWidgets version
  11971. REQWX="2.8.1"
  11972. echo $ac_n "checking wxWidgets version""... $ac_c" 1>&6
  11973. echo "configure:14927: checking wxWidgets version" >&5
  11974. if WXVERSION=`"$WX_CONFIG" --version`; then
  11975. echo "$ac_t""$WXVERSION" 1>&6
  11976. else
  11977. echo "$ac_t""not found" 1>&6
  11978. { echo "configure: error: wxWidgets is required." 1>&2; exit 1; }
  11979. fi
  11980. if test `expr "$WXVERSION" \< "$REQWX"` = 1 ; then
  11981. { echo "configure: error: *** wxWidgets "$REQWX" or later is required." 1>&2; exit 1; }
  11982. fi
  11983. # With wxWidgets includes directory
  11984. WXWIDGETSCXXFLAGS=`"$WX_CONFIG" --cxxflags`
  11985. WXWIDGETSCPPFLAGS=`"$WX_CONFIG" --cppflags`
  11986. ac_save_cppflags="$CPPFLAGS"
  11987. CPPFLAGS="$WXWIDGETSCPPFLAGS $CPPFLAGS"
  11988. for ac_hdr in wx/wxprec.h
  11989. do
  11990. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  11991. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  11992. echo "configure:14950: checking for $ac_hdr" >&5
  11993. cat > conftest.$ac_ext <<EOF
  11994. #line 14953 "configure"
  11995. #include "confdefs.h"
  11996. #include <$ac_hdr>
  11997. EOF
  11998. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  11999. { (eval echo configure:14958: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  12000. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  12001. if test -z "$ac_err"; then
  12002. rm -rf conftest*
  12003. eval "ac_cv_header_$ac_safe=yes"
  12004. else
  12005. echo "$ac_err" >&5
  12006. echo "configure: failed program was:" >&5
  12007. cat conftest.$ac_ext >&5
  12008. rm -rf conftest*
  12009. eval "ac_cv_header_$ac_safe=no"
  12010. fi
  12011. rm -f conftest*
  12012. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  12013. echo "$ac_t""yes" 1>&6
  12014. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  12015. cat >> confdefs.h <<EOF
  12016. #define $ac_tr_hdr 1
  12017. EOF
  12018. else
  12019. echo "$ac_t""no" 1>&6
  12020. { echo "configure: error: *** Unable to locate wxWidgets includes." 1>&2; exit 1; }
  12021. fi
  12022. done
  12023. CPPFLAGS=$ac_save_cppflags
  12024. ac_save_cppflags="$CPPFLAGS"
  12025. CPPFLAGS="$WXWIDGETSCPPFLAGS $CPPFLAGS"
  12026. for ac_hdr in wx/wxPython/pseudodc.h
  12027. do
  12028. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  12029. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  12030. echo "configure:14994: checking for $ac_hdr" >&5
  12031. cat > conftest.$ac_ext <<EOF
  12032. #line 14997 "configure"
  12033. #include "confdefs.h"
  12034. #include <$ac_hdr>
  12035. EOF
  12036. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  12037. { (eval echo configure:15002: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  12038. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  12039. if test -z "$ac_err"; then
  12040. rm -rf conftest*
  12041. eval "ac_cv_header_$ac_safe=yes"
  12042. else
  12043. echo "$ac_err" >&5
  12044. echo "configure: failed program was:" >&5
  12045. cat conftest.$ac_ext >&5
  12046. rm -rf conftest*
  12047. eval "ac_cv_header_$ac_safe=no"
  12048. fi
  12049. rm -f conftest*
  12050. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  12051. echo "$ac_t""yes" 1>&6
  12052. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  12053. cat >> confdefs.h <<EOF
  12054. #define $ac_tr_hdr 1
  12055. EOF
  12056. else
  12057. echo "$ac_t""no" 1>&6
  12058. { echo "configure: error: *** Unable to locate wxWidgets includes." 1>&2; exit 1; }
  12059. fi
  12060. done
  12061. CPPFLAGS=$ac_save_cppflags
  12062. # With wxWidgets library directory
  12063. WXWIDGETSLIB=`"$WX_CONFIG" --libs`
  12064. fi # $USE_WXWIDGETS
  12065. # Done checking wxWidgets
  12066. USE_TERMIO=
  12067. STRIPFLAG=
  12068. GRASS_HOME=${DSTDIR}
  12069. trap '' 1 2 15
  12070. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  12071. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  12072. # Let make expand exec_prefix.
  12073. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  12074. # Any assignment to VPATH causes Sun make to only execute
  12075. # the first set of double-colon rules, so remove it if not needed.
  12076. # If there is a colon in the path, we need to keep it.
  12077. if test "x$srcdir" = x.; then
  12078. ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
  12079. fi
  12080. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  12081. DEFS=-DHAVE_CONFIG_H
  12082. # Without the "./", some shells look in PATH for config.status.
  12083. : ${CONFIG_STATUS=./config.status}
  12084. echo creating $CONFIG_STATUS
  12085. rm -f $CONFIG_STATUS
  12086. cat > $CONFIG_STATUS <<EOF
  12087. #! /bin/sh
  12088. # Generated automatically by configure.
  12089. # Run this file to recreate the current configuration.
  12090. # This directory was configured as follows,
  12091. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  12092. #
  12093. # $0 $ac_configure_args
  12094. #
  12095. # Compiler output produced by configure, useful for debugging
  12096. # configure, is in ./config.log if it exists.
  12097. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  12098. for ac_option
  12099. do
  12100. case "\$ac_option" in
  12101. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  12102. echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  12103. exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  12104. -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  12105. echo "$CONFIG_STATUS generated by autoconf version 2.13"
  12106. exit 0 ;;
  12107. -help | --help | --hel | --he | --h)
  12108. echo "\$ac_cs_usage"; exit 0 ;;
  12109. *) echo "\$ac_cs_usage"; exit 1 ;;
  12110. esac
  12111. done
  12112. ac_given_srcdir=$srcdir
  12113. ac_given_INSTALL="$INSTALL"
  12114. trap 'rm -fr `echo "include/Make/Platform.make include/version.h swig/perl/Makefile.PL swig/perl2/make.pl grass.pc include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  12115. EOF
  12116. cat >> $CONFIG_STATUS <<EOF
  12117. # Protect against being on the right side of a sed subst in config.status.
  12118. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  12119. s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  12120. $ac_vpsub
  12121. $extrasub
  12122. s%@SHELL@%$SHELL%g
  12123. s%@CFLAGS@%$CFLAGS%g
  12124. s%@CPPFLAGS@%$CPPFLAGS%g
  12125. s%@CXXFLAGS@%$CXXFLAGS%g
  12126. s%@FFLAGS@%$FFLAGS%g
  12127. s%@DEFS@%$DEFS%g
  12128. s%@LDFLAGS@%$LDFLAGS%g
  12129. s%@LIBS@%$LIBS%g
  12130. s%@exec_prefix@%$exec_prefix%g
  12131. s%@prefix@%$prefix%g
  12132. s%@program_transform_name@%$program_transform_name%g
  12133. s%@bindir@%$bindir%g
  12134. s%@sbindir@%$sbindir%g
  12135. s%@libexecdir@%$libexecdir%g
  12136. s%@datadir@%$datadir%g
  12137. s%@sysconfdir@%$sysconfdir%g
  12138. s%@sharedstatedir@%$sharedstatedir%g
  12139. s%@localstatedir@%$localstatedir%g
  12140. s%@libdir@%$libdir%g
  12141. s%@includedir@%$includedir%g
  12142. s%@oldincludedir@%$oldincludedir%g
  12143. s%@infodir@%$infodir%g
  12144. s%@mandir@%$mandir%g
  12145. s%@host@%$host%g
  12146. s%@host_alias@%$host_alias%g
  12147. s%@host_cpu@%$host_cpu%g
  12148. s%@host_vendor@%$host_vendor%g
  12149. s%@host_os@%$host_os%g
  12150. s%@CC@%$CC%g
  12151. s%@EXEEXT@%$EXEEXT%g
  12152. s%@MINGW32@%$MINGW32%g
  12153. s%@BINDIR@%$BINDIR%g
  12154. s%@pwd@%$pwd%g
  12155. s%@SRCDIR@%$SRCDIR%g
  12156. s%@DSTDIR@%$DSTDIR%g
  12157. s%@ARCH@%$ARCH%g
  12158. s%@GISBASE@%$GISBASE%g
  12159. s%@GRASS_BIN@%$GRASS_BIN%g
  12160. s%@GRASS_VERSION_FILE@%$GRASS_VERSION_FILE%g
  12161. s%@GRASS_VERSION_MAJOR@%$GRASS_VERSION_MAJOR%g
  12162. s%@GRASS_VERSION_MINOR@%$GRASS_VERSION_MINOR%g
  12163. s%@GRASS_VERSION_RELEASE@%$GRASS_VERSION_RELEASE%g
  12164. s%@GRASS_VERSION_NUMBER@%$GRASS_VERSION_NUMBER%g
  12165. s%@GRASS_VERSION_DATE@%$GRASS_VERSION_DATE%g
  12166. s%@NAME_VER@%$NAME_VER%g
  12167. s%@LIB_VER@%$LIB_VER%g
  12168. s%@MACOSX_APP@%$MACOSX_APP%g
  12169. s%@INSTDIR@%$INSTDIR%g
  12170. s%@GRASS_LIB_PREFIX@%$GRASS_LIB_PREFIX%g
  12171. s%@GRASS_LIB_SUFFIX@%$GRASS_LIB_SUFFIX%g
  12172. s%@GRASS_LIBRARY_TYPE@%$GRASS_LIBRARY_TYPE%g
  12173. s%@RANLIB@%$RANLIB%g
  12174. s%@AR@%$AR%g
  12175. s%@CPP@%$CPP%g
  12176. s%@PLAT_OBJS@%$PLAT_OBJS%g
  12177. s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g
  12178. s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g
  12179. s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g
  12180. s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
  12181. s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g
  12182. s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g
  12183. s%@CC_SEARCH_FLAGS@%$CC_SEARCH_FLAGS%g
  12184. s%@LD_SEARCH_FLAGS@%$LD_SEARCH_FLAGS%g
  12185. s%@LD_LIBRARY_PATH_VAR@%$LD_LIBRARY_PATH_VAR%g
  12186. s%@STLIB_LD@%$STLIB_LD%g
  12187. s%@SHLIB_LD@%$SHLIB_LD%g
  12188. s%@GRASS_SHLIB_LD_EXTRAS@%$GRASS_SHLIB_LD_EXTRAS%g
  12189. s%@SHLIB_LD_FLAGS@%$SHLIB_LD_FLAGS%g
  12190. s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
  12191. s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
  12192. s%@SHLIB_SUFFIX@%$SHLIB_SUFFIX%g
  12193. s%@MAKE_LIB@%$MAKE_LIB%g
  12194. s%@MAKE_STUB_LIB@%$MAKE_STUB_LIB%g
  12195. s%@INSTALL_LIB@%$INSTALL_LIB%g
  12196. s%@INSTALL_STUB_LIB@%$INSTALL_STUB_LIB%g
  12197. s%@INCLUDE_DIRS@%$INCLUDE_DIRS%g
  12198. s%@LIBRARY_DIRS@%$LIBRARY_DIRS%g
  12199. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  12200. s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
  12201. s%@INSTALL_DATA@%$INSTALL_DATA%g
  12202. s%@LEX@%$LEX%g
  12203. s%@LEXLIB@%$LEXLIB%g
  12204. s%@LEXPATH@%$LEXPATH%g
  12205. s%@YACC@%$YACC%g
  12206. s%@YACCPATH@%$YACCPATH%g
  12207. s%@ENV@%$ENV%g
  12208. s%@PERL@%$PERL%g
  12209. s%@CROSS_COMPILING@%$CROSS_COMPILING%g
  12210. s%@X_CFLAGS@%$X_CFLAGS%g
  12211. s%@X_LIBS@%$X_LIBS%g
  12212. s%@X_PRE_LIBS@%$X_PRE_LIBS%g
  12213. s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
  12214. s%@XLIB@%$XLIB%g
  12215. s%@XTLIB@%$XTLIB%g
  12216. s%@USE_X11@%$USE_X11%g
  12217. s%@DBMIEXTRALIB@%$DBMIEXTRALIB%g
  12218. s%@XDRLIB@%$XDRLIB%g
  12219. s%@HAVE_ASPRINTF@%$HAVE_ASPRINTF%g
  12220. s%@MATHLIB@%$MATHLIB%g
  12221. s%@DLLIB@%$DLLIB%g
  12222. s%@ICONVLIB@%$ICONVLIB%g
  12223. s%@SOCKLIB@%$SOCKLIB%g
  12224. s%@HAVE_SOCKET@%$HAVE_SOCKET%g
  12225. s%@ZLIBINCPATH@%$ZLIBINCPATH%g
  12226. s%@ZLIBLIBPATH@%$ZLIBLIBPATH%g
  12227. s%@ZLIB@%$ZLIB%g
  12228. s%@PROJINC@%$PROJINC%g
  12229. s%@PROJLIB@%$PROJLIB%g
  12230. s%@PROJSHARE@%$PROJSHARE%g
  12231. s%@NAD2BIN@%$NAD2BIN%g
  12232. s%@REGEXINCPATH@%$REGEXINCPATH%g
  12233. s%@REGEXLIBPATH@%$REGEXLIBPATH%g
  12234. s%@REGEXLIB@%$REGEXLIB%g
  12235. s%@USE_REGEX@%$USE_REGEX%g
  12236. s%@READLINEINCPATH@%$READLINEINCPATH%g
  12237. s%@READLINELIBPATH@%$READLINELIBPATH%g
  12238. s%@READLINELIB@%$READLINELIB%g
  12239. s%@HISTORYLIB@%$HISTORYLIB%g
  12240. s%@JPEGINCPATH@%$JPEGINCPATH%g
  12241. s%@JPEGLIBPATH@%$JPEGLIBPATH%g
  12242. s%@JPEGLIB@%$JPEGLIB%g
  12243. s%@GDAL_CONFIG@%$GDAL_CONFIG%g
  12244. s%@GDAL_LIBS@%$GDAL_LIBS%g
  12245. s%@GDAL_CFLAGS@%$GDAL_CFLAGS%g
  12246. s%@USE_GDAL@%$USE_GDAL%g
  12247. s%@USE_OGR@%$USE_OGR%g
  12248. s%@TIFF_INCLUDE_DIRS@%$TIFF_INCLUDE_DIRS%g
  12249. s%@TIFF_LIBRARY_DIRS@%$TIFF_LIBRARY_DIRS%g
  12250. s%@TIFFLIB@%$TIFFLIB%g
  12251. s%@PNGINC@%$PNGINC%g
  12252. s%@PNGLIB@%$PNGLIB%g
  12253. s%@USE_PNG@%$USE_PNG%g
  12254. s%@TCLINCDIR@%$TCLINCDIR%g
  12255. s%@TKINCDIR@%$TKINCDIR%g
  12256. s%@TCLTKLIBPATH@%$TCLTKLIBPATH%g
  12257. s%@TCLTKLIBS@%$TCLTKLIBS%g
  12258. s%@USE_POSTGRES@%$USE_POSTGRES%g
  12259. s%@PQINCPATH@%$PQINCPATH%g
  12260. s%@PQLIBPATH@%$PQLIBPATH%g
  12261. s%@PQLIB@%$PQLIB%g
  12262. s%@MYSQLD_CONFIG@%$MYSQLD_CONFIG%g
  12263. s%@USE_MYSQL@%$USE_MYSQL%g
  12264. s%@MYSQLINCPATH@%$MYSQLINCPATH%g
  12265. s%@MYSQLLIBPATH@%$MYSQLLIBPATH%g
  12266. s%@MYSQLLIB@%$MYSQLLIB%g
  12267. s%@MYSQLDLIB@%$MYSQLDLIB%g
  12268. s%@USE_SQLITE@%$USE_SQLITE%g
  12269. s%@SQLITEINCPATH@%$SQLITEINCPATH%g
  12270. s%@SQLITELIBPATH@%$SQLITELIBPATH%g
  12271. s%@SQLITELIB@%$SQLITELIB%g
  12272. s%@USE_FFMPEG@%$USE_FFMPEG%g
  12273. s%@FFMPEGINCPATH@%$FFMPEGINCPATH%g
  12274. s%@FFMPEGLIBPATH@%$FFMPEGLIBPATH%g
  12275. s%@FFMPEGLIB@%$FFMPEGLIB%g
  12276. s%@USE_OPENGL@%$USE_OPENGL%g
  12277. s%@OPENGL_X11@%$OPENGL_X11%g
  12278. s%@OPENGL_AQUA@%$OPENGL_AQUA%g
  12279. s%@OPENGL_WINDOWS@%$OPENGL_WINDOWS%g
  12280. s%@OPENGLINC@%$OPENGLINC%g
  12281. s%@OPENGLLIB@%$OPENGLLIB%g
  12282. s%@OPENGLULIB@%$OPENGLULIB%g
  12283. s%@ODBCINC@%$ODBCINC%g
  12284. s%@ODBCLIB@%$ODBCLIB%g
  12285. s%@FFTWINC@%$FFTWINC%g
  12286. s%@FFTWLIB@%$FFTWLIB%g
  12287. s%@BLASLIB@%$BLASLIB%g
  12288. s%@BLASINC@%$BLASINC%g
  12289. s%@LAPACKLIB@%$LAPACKLIB%g
  12290. s%@LAPACKINC@%$LAPACKINC%g
  12291. s%@CAIROINC@%$CAIROINC%g
  12292. s%@CAIROLIB@%$CAIROLIB%g
  12293. s%@USE_CAIRO@%$USE_CAIRO%g
  12294. s%@FTINC@%$FTINC%g
  12295. s%@FTLIB@%$FTLIB%g
  12296. s%@INTLLIB@%$INTLLIB%g
  12297. s%@HAVE_NLS@%$HAVE_NLS%g
  12298. s%@CXX@%$CXX%g
  12299. s%@OPENDWGINCPATH@%$OPENDWGINCPATH%g
  12300. s%@OPENDWGLIBPATH@%$OPENDWGLIBPATH%g
  12301. s%@OPENDWGLIB@%$OPENDWGLIB%g
  12302. s%@USE_OPENDWG@%$USE_OPENDWG%g
  12303. s%@PTHREADINCPATH@%$PTHREADINCPATH%g
  12304. s%@PTHREADLIBPATH@%$PTHREADLIBPATH%g
  12305. s%@PTHREADLIB@%$PTHREADLIB%g
  12306. s%@USE_PTHREAD@%$USE_PTHREAD%g
  12307. s%@USE_LARGEFILES@%$USE_LARGEFILES%g
  12308. s%@PY_CONFIG@%$PY_CONFIG%g
  12309. s%@SWIG@%$SWIG%g
  12310. s%@PYTHONINC@%$PYTHONINC%g
  12311. s%@PYTHONCFLAGS@%$PYTHONCFLAGS%g
  12312. s%@PYTHONLDFLAGS@%$PYTHONLDFLAGS%g
  12313. s%@USE_PYTHON@%$USE_PYTHON%g
  12314. s%@WX_CONFIG@%$WX_CONFIG%g
  12315. s%@WXVERSION@%$WXVERSION%g
  12316. s%@WXWIDGETSCXXFLAGS@%$WXWIDGETSCXXFLAGS%g
  12317. s%@WXWIDGETSCPPFLAGS@%$WXWIDGETSCPPFLAGS%g
  12318. s%@WXWIDGETSLIB@%$WXWIDGETSLIB%g
  12319. s%@USE_WXWIDGETS@%$USE_WXWIDGETS%g
  12320. s%@USE_TERMIO@%$USE_TERMIO%g
  12321. s%@STRIPFLAG@%$STRIPFLAG%g
  12322. s%@GRASS_HOME@%$GRASS_HOME%g
  12323. CEOF
  12324. EOF
  12325. cat >> $CONFIG_STATUS <<\EOF
  12326. # Split the substitutions into bite-sized pieces for seds with
  12327. # small command number limits, like on Digital OSF/1 and HP-UX.
  12328. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
  12329. ac_file=1 # Number of current file.
  12330. ac_beg=1 # First line for current file.
  12331. ac_end=$ac_max_sed_cmds # Line after last line for current file.
  12332. ac_more_lines=:
  12333. ac_sed_cmds=""
  12334. while $ac_more_lines; do
  12335. if test $ac_beg -gt 1; then
  12336. sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  12337. else
  12338. sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  12339. fi
  12340. if test ! -s conftest.s$ac_file; then
  12341. ac_more_lines=false
  12342. rm -f conftest.s$ac_file
  12343. else
  12344. if test -z "$ac_sed_cmds"; then
  12345. ac_sed_cmds="sed -f conftest.s$ac_file"
  12346. else
  12347. ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
  12348. fi
  12349. ac_file=`expr $ac_file + 1`
  12350. ac_beg=$ac_end
  12351. ac_end=`expr $ac_end + $ac_max_sed_cmds`
  12352. fi
  12353. done
  12354. if test -z "$ac_sed_cmds"; then
  12355. ac_sed_cmds=cat
  12356. fi
  12357. EOF
  12358. cat >> $CONFIG_STATUS <<EOF
  12359. CONFIG_FILES=\${CONFIG_FILES-"include/Make/Platform.make include/version.h swig/perl/Makefile.PL swig/perl2/make.pl grass.pc"}
  12360. EOF
  12361. cat >> $CONFIG_STATUS <<\EOF
  12362. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  12363. # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  12364. case "$ac_file" in
  12365. *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  12366. ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  12367. *) ac_file_in="${ac_file}.in" ;;
  12368. esac
  12369. # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  12370. # Remove last slash and all that follows it. Not all systems have dirname.
  12371. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  12372. if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  12373. # The file is in a subdirectory.
  12374. test ! -d "$ac_dir" && mkdir "$ac_dir"
  12375. ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  12376. # A "../" for each directory in $ac_dir_suffix.
  12377. ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  12378. else
  12379. ac_dir_suffix= ac_dots=
  12380. fi
  12381. case "$ac_given_srcdir" in
  12382. .) srcdir=.
  12383. if test -z "$ac_dots"; then top_srcdir=.
  12384. else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  12385. /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  12386. *) # Relative path.
  12387. srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  12388. top_srcdir="$ac_dots$ac_given_srcdir" ;;
  12389. esac
  12390. case "$ac_given_INSTALL" in
  12391. [/$]*) INSTALL="$ac_given_INSTALL" ;;
  12392. *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  12393. esac
  12394. echo creating "$ac_file"
  12395. rm -f "$ac_file"
  12396. configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  12397. case "$ac_file" in
  12398. *Makefile*) ac_comsub="1i\\
  12399. # $configure_input" ;;
  12400. *) ac_comsub= ;;
  12401. esac
  12402. ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  12403. sed -e "$ac_comsub
  12404. s%@configure_input@%$configure_input%g
  12405. s%@srcdir@%$srcdir%g
  12406. s%@top_srcdir@%$top_srcdir%g
  12407. s%@INSTALL@%$INSTALL%g
  12408. " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  12409. fi; done
  12410. rm -f conftest.s*
  12411. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  12412. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  12413. #
  12414. # ac_d sets the value in "#define NAME VALUE" lines.
  12415. ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
  12416. ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
  12417. ac_dC='\3'
  12418. ac_dD='%g'
  12419. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  12420. ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
  12421. ac_uB='\([ ]\)%\1#\2define\3'
  12422. ac_uC=' '
  12423. ac_uD='\4%g'
  12424. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  12425. ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
  12426. ac_eB='$%\1#\2define\3'
  12427. ac_eC=' '
  12428. ac_eD='%g'
  12429. if test "${CONFIG_HEADERS+set}" != set; then
  12430. EOF
  12431. cat >> $CONFIG_STATUS <<EOF
  12432. CONFIG_HEADERS="include/config.h"
  12433. EOF
  12434. cat >> $CONFIG_STATUS <<\EOF
  12435. fi
  12436. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  12437. # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  12438. case "$ac_file" in
  12439. *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  12440. ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  12441. *) ac_file_in="${ac_file}.in" ;;
  12442. esac
  12443. echo creating $ac_file
  12444. rm -f conftest.frag conftest.in conftest.out
  12445. ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  12446. cat $ac_file_inputs > conftest.in
  12447. EOF
  12448. # Transform confdefs.h into a sed script conftest.vals that substitutes
  12449. # the proper values into config.h.in to produce config.h. And first:
  12450. # Protect against being on the right side of a sed subst in config.status.
  12451. # Protect against being in an unquoted here document in config.status.
  12452. rm -f conftest.vals
  12453. cat > conftest.hdr <<\EOF
  12454. s/[\\&%]/\\&/g
  12455. s%[\\$`]%\\&%g
  12456. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  12457. s%ac_d%ac_u%gp
  12458. s%ac_u%ac_e%gp
  12459. EOF
  12460. sed -n -f conftest.hdr confdefs.h > conftest.vals
  12461. rm -f conftest.hdr
  12462. # This sed command replaces #undef with comments. This is necessary, for
  12463. # example, in the case of _POSIX_SOURCE, which is predefined and required
  12464. # on some systems where configure will not decide to define it.
  12465. cat >> conftest.vals <<\EOF
  12466. s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  12467. EOF
  12468. # Break up conftest.vals because some shells have a limit on
  12469. # the size of here documents, and old seds have small limits too.
  12470. rm -f conftest.tail
  12471. while :
  12472. do
  12473. ac_lines=`grep -c . conftest.vals`
  12474. # grep -c gives empty output for an empty file on some AIX systems.
  12475. if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  12476. # Write a limited-size here document to conftest.frag.
  12477. echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  12478. sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  12479. echo 'CEOF
  12480. sed -f conftest.frag conftest.in > conftest.out
  12481. rm -f conftest.in
  12482. mv conftest.out conftest.in
  12483. ' >> $CONFIG_STATUS
  12484. sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  12485. rm -f conftest.vals
  12486. mv conftest.tail conftest.vals
  12487. done
  12488. rm -f conftest.vals
  12489. cat >> $CONFIG_STATUS <<\EOF
  12490. rm -f conftest.frag conftest.h
  12491. echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
  12492. cat conftest.in >> conftest.h
  12493. rm -f conftest.in
  12494. if cmp -s $ac_file conftest.h 2>/dev/null; then
  12495. echo "$ac_file is unchanged"
  12496. rm -f conftest.h
  12497. else
  12498. # Remove last slash and all that follows it. Not all systems have dirname.
  12499. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  12500. if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  12501. # The file is in a subdirectory.
  12502. test ! -d "$ac_dir" && mkdir "$ac_dir"
  12503. fi
  12504. rm -f $ac_file
  12505. mv conftest.h $ac_file
  12506. fi
  12507. fi; done
  12508. EOF
  12509. cat >> $CONFIG_STATUS <<EOF
  12510. EOF
  12511. cat >> $CONFIG_STATUS <<\EOF
  12512. exit 0
  12513. EOF
  12514. chmod +x $CONFIG_STATUS
  12515. rm -fr confdefs* $ac_clean_files
  12516. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  12517. echo "Copying config.status to config.status.${ARCH}"
  12518. cp -f config.status config.status.${ARCH}
  12519. # Display configuration status
  12520. USE_TOGL=
  12521. if test -n "${USE_TCLTK}" -a -n "${USE_OPENGL}" ; then
  12522. USE_TOGL="1"
  12523. fi
  12524. echo ""
  12525. echo "GRASS is now configured for: ${host}"
  12526. echo ""
  12527. echo " Source directory: ${SRCDIR}"
  12528. echo " Build directory: ${DSTDIR}"
  12529. echo " Installation directory: ${INSTDIR}"
  12530. echo " Startup script in directory: ${bindir}"
  12531. echo " C compiler: ${CC} ${CFLAGS}"
  12532. echo " C++ compiler: ${CXX} ${CXXFLAGS}"
  12533. #LOC_MSG([ FORTRAN compiler: ${F77} ${FFLAGS}])
  12534. echo " Building shared libraries: ${shared_ok}"
  12535. echo " 64bit support: ${do64bit}"
  12536. echo " OpenGL platform: ${OPENGL_TYPE}"
  12537. echo " MacOSX application: `if test -n "${MACOSX_APP}" ; then echo yes ; else echo no ; fi`"
  12538. echo ""
  12539. echo " NVIZ: `if test -n "${USE_TOGL}" ; then echo yes ; else echo no ; fi`"
  12540. echo ""
  12541. echo " BLAS support: `if test -n "${USE_BLAS}" ; then echo yes ; else echo no ; fi`"
  12542. echo " C++ support: `if test -n "${USE_CXX}" ; then echo yes ; else echo no ; fi`"
  12543. echo " Cairo support: `if test -n "${USE_CAIRO}" ; then echo yes ; else echo no ; fi`"
  12544. echo " DWG support: `if test -n "${USE_OPENDWG}" ; then echo yes ; else echo no ; fi`"
  12545. echo " FFMPEG support: `if test -n "${USE_FFMPEG}" ; then echo yes ; else echo no ; fi`"
  12546. echo " FFTW support: `if test -n "${USE_FFTW}" ; then echo yes ; else echo no ; fi`"
  12547. echo " FreeType support: `if test -n "${USE_FREETYPE}" ; then echo yes ; else echo no ; fi`"
  12548. echo " GDAL support: `if test -n "${USE_GDAL}" ; then echo yes ; else echo no ; fi`"
  12549. echo " JPEG support: `if test -n "${USE_JPEG}" ; then echo yes ; else echo no ; fi`"
  12550. echo " LAPACK support: `if test -n "${USE_LAPACK}" ; then echo yes ; else echo no ; fi`"
  12551. echo " Large File support (LFS): `if test -n "${USE_LARGEFILES}" ; then echo yes ; else echo no ; fi`"
  12552. echo " MySQL support: `if test -n "${USE_MYSQL}" ; then echo yes ; else echo no ; fi`"
  12553. echo " NLS support: `if test -n "${USE_NLS}" ; then echo yes ; else echo no ; fi`"
  12554. echo " ODBC support: `if test -n "${USE_ODBC}" ; then echo yes ; else echo no ; fi`"
  12555. echo " OGR support: `if test -n "${USE_OGR}" ; then echo yes ; else echo no ; fi`"
  12556. echo " OpenGL support: `if test -n "${USE_OPENGL}" ; then echo yes ; else echo no ; fi`"
  12557. echo " PNG support: `if test -n "${USE_PNG}" ; then echo yes ; else echo no ; fi`"
  12558. echo " PostgreSQL support: `if test -n "${USE_POSTGRES}" ; then echo yes ; else echo no ; fi`"
  12559. echo " Python support: `if test -n "${USE_PYTHON}" ; then echo yes ; else echo no ; fi`"
  12560. echo " Readline support: `if test -n "${USE_READLINE}" ; then echo yes ; else echo no ; fi`"
  12561. echo " SQLite support: `if test -n "${USE_SQLITE}" ; then echo yes ; else echo no ; fi`"
  12562. echo " Tcl/Tk support: `if test -n "${USE_TCLTK}" ; then echo yes ; else echo no ; fi`"
  12563. echo " wxWidgets support: `if test -n "${USE_WXWIDGETS}" ; then echo yes ; else echo no ; fi`"
  12564. echo " TIFF support: `if test -n "${USE_TIFF}" ; then echo yes ; else echo no ; fi`"
  12565. echo " X11 support: `if test -n "${USE_X11}" ; then echo yes ; else echo no ; fi`"
  12566. echo " Regex support: `if test -n "${USE_REGEX}" ; then echo yes ; else echo no ; fi`"
  12567. echo " POSIX thread support: `if test -n "${USE_PTHREAD}" ; then echo yes ; else echo no ; fi`"
  12568. echo ""